@arcgis/core 4.33.0-next.20250512 → 4.33.0-next.20250514
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/functions/centroid.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/geometry/operators.js +1 -1
- package/arcade/geometry/operatorsWorker.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/icon/calendarHeatChart16.json +1 -0
- package/assets/components/assets/icon/calendarHeatChart24.json +1 -0
- package/assets/components/assets/icon/calendarHeatChart32.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart16.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart24.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart32.json +1 -0
- package/assets/components/assets/icon/progressBarChart16.json +1 -0
- package/assets/components/assets/icon/progressBarChart24.json +1 -0
- package/assets/components/assets/icon/progressBarChart32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined16F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined24F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined32F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{4deeeceb784e4390441d.js → 0a4cece5e96fb7e8a57b.js} +1 -1
- package/assets/esri/core/workers/chunks/12e99071f6582f6caeaf.js +1 -0
- package/assets/esri/core/workers/chunks/191a45a594ecaf7f1abb.js +1 -0
- package/assets/esri/core/workers/chunks/1991f0d0f0a12175f849.js +1 -0
- package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{07695960aa0344dbfbf3.js → 28d9e2ffc3059a55311e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5e746e10239a3bfe237.js → 30f3014c0ac6e2bc14bf.js} +1 -1
- package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/4899cdc8bb5085c356f9.js +1 -0
- package/assets/esri/core/workers/chunks/498886c321a2501658bc.js +1 -0
- package/assets/esri/core/workers/chunks/56569d0c2cf5c5167651.js +1 -0
- package/assets/esri/core/workers/chunks/{ba3193ea145960a50e87.js → 5c8d52b72a3bea4202ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{fbcd94f60f92257a7303.js → 6394ab6f629aa90292e6.js} +2 -2
- package/assets/esri/core/workers/chunks/{fbcd94f60f92257a7303.js.LICENSE.txt → 6394ab6f629aa90292e6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{8b74b609de4f70e1a75c.js → 64af433e88d4dd21a2ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b01e3bce78541620a86.js → 6cbe8205a4e0f62da519.js} +1 -1
- package/assets/esri/core/workers/chunks/6e64ce0958c3432004b6.js +346 -0
- package/assets/esri/core/workers/chunks/6e8c6c9112ecb867b7be.js +1 -0
- package/assets/esri/core/workers/chunks/{a8430e1e2142f1ce9b92.js → 82c395d8649096609a8a.js} +1 -1
- package/assets/esri/core/workers/chunks/{a73c6b4bc5baf440f85a.js → 88b7265270feede80e1d.js} +1 -1
- package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/8c21cc9af4ce9652cc5c.js +1 -0
- package/assets/esri/core/workers/chunks/{243dc74ec62891ba1ef7.js → 8e82acd1f730571680f4.js} +1 -1
- package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/a09b5700c92bb76c3234.js +1 -0
- package/assets/esri/core/workers/chunks/b06cb23048c32940f5de.js +1 -0
- package/assets/esri/core/workers/chunks/{079434fe765c53d304f2.js → b1e275607d9754079f60.js} +1 -1
- package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{3c45603af279ad7fed8c.js → b8b5dfd2d73a8410fba2.js} +1 -1
- package/assets/esri/core/workers/chunks/c604fefedccfd4db9953.js +1 -0
- package/assets/esri/core/workers/chunks/{0aca29f7156b2b412f2e.js → d1f7bfb8daf11ecada9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b816b608f31954128246.js → d21d9e8b8c8a2e0485d5.js} +1 -1
- package/assets/esri/core/workers/chunks/da3c62a851a4332f6dda.js +1 -0
- package/assets/esri/core/workers/chunks/{a8b42d8c0b76c234c09f.js → e0247252c6a0f3340e33.js} +81 -82
- package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/e5608e5232e983531f72.js +1 -0
- package/assets/esri/core/workers/chunks/f8fb0c7eaf73709bd855.js +1 -0
- package/assets/esri/core/workers/chunks/fd24dd602a3fed88d90e.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +17 -10
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +4 -0
- package/assets/esri/themes/base/widgets/_SelectionList.scss +7 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDefinitions.js +5 -0
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +5 -5
- package/chunks/Theme.js +1 -1
- package/chunks/Tick.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/accessorSupport/Lifecycle.js +5 -0
- package/core/accessorSupport/Properties.js +1 -1
- package/core/accessorSupport/decorators/subclass.js +1 -1
- package/core/accessorSupport/tracking/Flags.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorSimplifyOGC.js +1 -1
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/interfaces.d.ts +368 -2450
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/knowledgeGraph/supportUtils.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +3 -4
- package/smartMapping/statistics/uniqueValues.js +1 -1
- package/smartMapping/support/adapters/support/layerUtils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectRadial.js +1 -1
- package/versionManagement/versionAdapters/FeatureLayerVersionAdapter.js +1 -1
- package/versionManagement/versionAdapters/NetworkVersionAdapter.js +1 -1
- package/versionManagement/versionAdapters/SubTypeGroupLayerVersionAdapter.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/FocusAreasView.js +5 -0
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWasm.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/FeatureProcessingContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/TileLocks.js +5 -0
- package/views/3d/layers/graphics/pipeline/featureData/FeatureData.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureData/FeatureDataSubset.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SQueryResultGeometry.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +5 -0
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/TileTexture.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -27
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +29 -0
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/layers/BuildingComponentSublayerView.js +1 -1
- package/views/layers/BuildingSceneLayerView.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/009dbddfc6499e2cee4f.js +0 -1
- package/assets/esri/core/workers/chunks/1b8cc83aa1179245b2dc.js +0 -1
- package/assets/esri/core/workers/chunks/26ebb7816dd8c8cd4f3b.js +0 -1
- package/assets/esri/core/workers/chunks/2abce00d812c7f6b542d.js +0 -1
- package/assets/esri/core/workers/chunks/47cd99ab3ed11a931084.js +0 -1
- package/assets/esri/core/workers/chunks/51d9eaeeb781fd1d1162.js +0 -1
- package/assets/esri/core/workers/chunks/5228fc7fcdf57f44781e.js +0 -1
- package/assets/esri/core/workers/chunks/83d6a1b3db7d364d156b.js +0 -1
- package/assets/esri/core/workers/chunks/83e13baab4b90a88d967.js +0 -1
- package/assets/esri/core/workers/chunks/92cbe9af8a6c061bfb57.js +0 -346
- package/assets/esri/core/workers/chunks/93cc26e5636040fdc0b8.js +0 -1
- package/assets/esri/core/workers/chunks/c17c269cc30e7e1d0bfb.js +0 -1
- package/assets/esri/core/workers/chunks/c3f144ca69995dca34a9.js +0 -1
- package/assets/esri/core/workers/chunks/d551f70560a2b1ef5696.js +0 -1
- package/core/accessorSupport/interfaces.js +0 -5
- package/views/3d/layers/graphics/pipeline/TileActionSynchronizer.js +0 -5
- package/views/FocusAreasView.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7445],{1873:(e,t,r)=>{r.d(t,{$y:()=>B,Ak:()=>G,FM:()=>v,G_:()=>y,Rw:()=>z,Vb:()=>p,b3:()=>O,gJ:()=>m,jM:()=>U,lv:()=>C,oZ:()=>D,qg:()=>b,sU:()=>R,z9:()=>g,zS:()=>k});var i=r(9760),n=r(84892);const s="<Null>",a="equal-interval",l=1,o=5,c=10,u=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,d=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),h=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),f=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function m(e){return null==e||"string"==typeof e&&!e?s:e}function p(e){const t=null!=e.normalizationField||null!=e.normalizationType,r=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!r&&!i}function g(e){const{outStatisticTypes:t}=e,r=e.returnDistinct?[...new Set(e.values)]:e.values,i=r.filter((e=>null!=e)).sort(),n=i.length,s={count:n,min:i[0],max:i[n-1]};return e.supportsNullCount&&(s.nullcount=r.length-n),!e.percentileParams||t?.include?.length&&!t.include.includes("median")||t?.exclude?.length&&t.exclude.includes("median")||(s.median=b(r,e.percentileParams)),s}function y(e){const{values:t,useSampleStdDev:r,supportsNullCount:i,outStatisticTypes:n}=e;let s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,l=null,o=null,c=null,u=null,d=0;const h=null==e.minValue?-1/0:e.minValue,f=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=f&&(l=null===l?e:l+e,s=Math.min(s,e),a=Math.max(a,e),d++):"string"==typeof e&&d++;if(d&&null!=l){o=l/d;let e=0;for(const r of t)Number.isFinite(r)&&r>=h&&r<=f&&(e+=(r-o)**2);u=r?d>1?e/(d-1):0:d>0?e/d:0,c=Math.sqrt(u)}else s=null,a=null;const m={avg:o,count:d,max:a,min:s,stddev:c,sum:l,variance:u};return i&&(m.nullcount=t.length-d),!e.percentileParams||n?.include?.length&&!n.include.includes("median")||n?.exclude?.length&&n.exclude.includes("median")||(m.median=b(t,e.percentileParams)),m}function b(e,t){const{fieldType:r,value:i,orderBy:n,isDiscrete:s}=t,a=v(r,"desc"===n);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const l=(e.length-1)*i,o=Math.floor(l),c=o+1,u=l%1,d=e[o],h=e[c];return c>=e.length||s||"string"==typeof d||"string"==typeof h?d:d*(1-u)+h*u}function v(e,t){if(e){if(d.has(e))return F(t);if(h.has(e))return x(t,!1);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?w:T}(t);const r=x(t,!0);if("esriFieldTypeString"===e)return r;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>r(E(e),E(t))}const r=t?1:-1,i=F(t),n=x(t,!0),s=S(t);return(e,t)=>"number"==typeof e&&"number"==typeof t?i(e,t):"string"==typeof e&&"string"==typeof t?n(e,t):s(e,t)??r}const _=(e,t)=>null==e?null==t?0:1:null==t?-1:null,M=(e,t)=>null==e?null==t?0:-1:null==t?1:null;function S(e){return e?_:M}const T=(e,t)=>M(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),w=(e,t)=>_(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),I=(e,t)=>M(e,t)??(e===t?0:e<t?-1:1),L=(e,t)=>_(e,t)??(e===t?0:e<t?1:-1);function x(e,t){if(!t)return e?L:I;const r=S(e);return e?(e,t)=>{const i=r(e,t);return null!=i?i:(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0}:(e,t)=>{const i=r(e,t);return null!=i?i:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}}const A=(e,t)=>_(e,t)??t-e,V=(e,t)=>M(e,t)??e-t;function F(e){return e?A:V}function E(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function D(e,t,r){let i;for(i in e)t?.include?.length&&!t.include.includes(i)||t?.exclude?.length&&t.exclude.includes(i)?delete e[i]:f.includes(i)&&(Number.isFinite(e[i])||(e[i]=null));return r?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))})),e):e}function O(e){const t={};for(let r of e)(null==r||"string"==typeof r&&""===r.trim())&&(r=null),null==t[r]?t[r]={count:1,data:r}:t[r].count++;return{count:t}}function N(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function C(e,t,r,i){const n=e.count,s=[];if(r&&t){const e=[],r=N(t[0]);for(const n of r)if(t[1]){const r=N(t[1]);for(const s of r)if(t[2]){const r=N(t[2]);for(const t of r)e.push(`${m(n)}${i}${m(s)}${i}${m(t)}`)}else e.push(`${m(n)}${i}${m(s)}`)}else e.push(n);for(const t of e)n.hasOwnProperty(t)||(n[t]={data:t,count:0})}for(const e in n){const t=n[e];s.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:s}}function k(e,t,r,i){let n=null;switch(t){case"log":0!==e&&(n=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(n=e/i*100);break;case"field":Number.isFinite(r)&&0!==r&&(n=e/r);break;case"natural-log":e>0&&(n=Math.log(e));break;case"square-root":e>0&&(n=e**.5)}return n}function z(e,t,r){const i=$({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||o});return e=function(e,t,r){const i=t??-1/0,n=r??1/0;return e.filter((e=>Number.isFinite(e)&&e>=i&&e<=n))}(e,t.minValue,t.maxValue),(0,n.t)({definition:i,values:e,normalizationTotal:t.normalizationTotal},r)}function $(e){const{breakCount:t,field:r,normalizationField:n,normalizationType:s}=e,o=e.classificationMethod||a,c="standard-deviation"===o?e.standardDeviationInterval||l:void 0,u="defined-interval"===o?e.definedInterval:void 0;return new i.A({breakCount:t,classificationField:r,classificationMethod:o,normalizationField:"field"===s?n:void 0,normalizationType:s,standardDeviationInterval:c,definedInterval:u})}function U(e,t){let r=e.classBreaks;const i=r.length,n=r[0]?.minValue,s=r[i-1]?.maxValue,a="standard-deviation"===t,l=u;return r=r.map((e=>{const t=e.label,r={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(l),i=e?.map((e=>+e.trim()))??[];2===i.length?(r.minStdDev=i[0],r.maxStdDev=i[1],i[0]<0&&i[1]>0&&(r.hasAvg=!0)):1===i.length&&(t.includes("<")?(r.minStdDev=null,r.maxStdDev=i[0]):t.includes(">")&&(r.minStdDev=i[0],r.maxStdDev=null))}return r})),{minValue:n,maxValue:s,classBreakInfos:r,normalizationTotal:e.normalizationTotal}}function B(e,t){const r=R(e,t);if(null==r.min&&null==r.max)return{bins:[],minValue:r.min,maxValue:r.max,normalizationTotal:t.normalizationTotal};const i=r.intervals,n=r.min??0,s=r.max??0,a=i.map(((e,t)=>({minValue:i[t][0],maxValue:i[t][1],count:0})));for(const t of e)if(null!=t&&t>=n&&t<=s){const e=G(i,t);e>-1&&a[e].count++}return{bins:a,minValue:n,maxValue:s,normalizationTotal:t.normalizationTotal}}function R(e,t,r=!1){const{field:i,classificationMethod:n,standardDeviationInterval:s,definedInterval:a,normalizationType:l,normalizationField:o,normalizationTotal:u,minValue:d,maxValue:h}=t,f=t.numBins||c;let m=null,g=null,b=null;if(n&&"equal-interval"!==n||l){const{classBreaks:t}=z(e,{field:i,normalizationType:l,normalizationField:o,normalizationTotal:u,classificationMethod:n,standardDeviationInterval:s,definedInterval:a,minValue:d,maxValue:h,numClasses:f},null!=d&&null!=h?[d,h]:void 0);m=t[0]?.minValue,g=t[t.length-1]?.maxValue,b=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=d&&null!=h)m=d,g=h;else{const t=y({values:e,minValue:d,maxValue:h,useSampleStdDev:!l,supportsNullCount:p({normalizationType:l,normalizationField:o,minValue:d,maxValue:h})});m=t.min??null,g=t.max??null}b=function(e,t,r){const i=(t-e)/r,n=[];let s,a=e;for(let e=1;e<=r;e++)s=a+i,s=Number(s.toFixed(16)),n.push([a,e===r?t:s]),a=s;return n}(m??0,g??0,f)}if(r){const e=b.at(-1)[1];b.push([e,e])}return{min:m,max:g,intervals:b}}function G(e,t){let r=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){r=i;break}return r}},3483:(e,t,r)=>{function i(e,t){for(const r of e.values())if(t(r))return!0;return!1}function n(e,t){if(!t)return e;for(const r of t)null!=r&&e.add(r);return e}function s(e,t){return null!=t&&e.add(t),e}function a(e,t){const r=new Set;return n(r,e),n(r,t),r}function l(e,t){const r=new Set;for(const i of t)e.has(i)&&r.add(i);return r}function o(e,t){if(!e||!t)return!1;if(e===t)return!0;for(const r of e)if(!t.has(r))return!1;return!0}function c(e,t){if(null==e&&null==t)return!0;if(null==e||null==t||e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function u(e,t){const r=new Set(e);for(const e of t)r.delete(e);return r}r.d(t,{E$:()=>l,FB:()=>n,KC:()=>a,Yy:()=>o,aI:()=>c,bw:()=>i,iv:()=>u,kb:()=>s})},4560:(e,t,r)=>{r.d(t,{i0:()=>o,fs:()=>l});var i=r(97770),n=r(30524);r(5503),r(84952),r(27865),r(43281);var s=r(98623),a=r(56400);function l(e){return(0,n.vE)(e)||(0,n.zD)(e)||(0,n.Ah)(e)}function o(e,t){const{format:r,timeZoneOptions:n,fieldType:l}=t??{};let o,c;if(n&&({timeZone:o,timeZoneName:c}=(0,a.hv)(n.layerTimeZone,n.datesInUnknownTimezone,n.viewTimeZone,(0,i.J2)(r||"short-date-short-time"),l)),"string"==typeof e&&isNaN(Date.parse("time-only"===l?`1970-01-01T${e}Z`:e)))return e;switch(l){case"date-only":{const t=(0,i.J2)(r||"short-date");return"string"==typeof e?(0,i.iS)(e,{...t}):(0,i.Yq)(e,{...t,timeZone:s.n$})}case"time-only":{const t=(0,i.J2)(r||"short-time");return"string"==typeof e?(0,i.F8)(e,t):(0,i.Yq)(e,{...t,timeZone:s.n$})}case"timestamp-offset":{if(!o&&"string"==typeof e&&new Date(e).toISOString()!==e)return e;const t=r||n?(0,i.J2)(r||"short-date-short-time"):void 0,s=t?{...t,timeZone:o,timeZoneName:c}:void 0;return"string"==typeof e?(0,i.Ey)(e,s):(0,i.Yq)(e,s)}default:{const t=r||n?(0,i.J2)(r||"short-date-short-time"):void 0;return(0,i.Yq)("string"==typeof e?new Date(e):e,t?{...t,timeZone:o,timeZoneName:c}:void 0)}}}new Set(["integer","small-integer"])},5503:(e,t,r)=>{r.d(t,{A:()=>D});var i,n=r(90237),s=r(98291),a=r(65529),l=r(36563),o=r(4718),c=r(93687);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var u,d=r(11932),h=r(56507),f=r(62788),m=r(10107),p=r(7695),g=r(40608),y=r(95488),b=r(12195);class v{constructor(e,t,r,i,n){this.target=e,this.added=t,this.removed=r,this.start=i,this.deleteCount=n}}const _=new c.A(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function M(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function S(e){return e?e instanceof E?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function T(e){if(e?.length)return e[0]}function w(e,t,r,i){const n=Math.min(e.length-r,t.length-i);let s=0;for(;s<n&&e[r+s]===t[i+s];)s++;return s}function I(e,t,r,i){t&&t.forEach(((t,n,s)=>{e.push(t),I(e,r.call(i,t,n,s),r,i)}))}const L=new Set,x=new Set,A=new Set,V=new Map;let F=0,E=class extends a.A.EventedAccessor{static{u=this}static{this.ofType=e=>{if(!e)return u;if(V.has(e))return V.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const i=e.typeMap[r].prototype.declaredClass;t?t+=` | ${i}`:t=i}let r=class extends u{};return(0,n._)([(0,p.u)({Type:e,ensureType:"function"==typeof e?(0,h.dp)(e):(0,h.aq)(e)})],r.prototype,"itemType",void 0),r=(0,n._)([(0,g.$)(`esri.core.Collection<${t}>`)],r),V.set(e,r),r}}static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new y.I,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:F++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,S(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)((()=>{r.removed=!0,e.splice(e.indexOf(r),1)}))}return this._emitter.on(e,t)}once(e,t){const r="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{r()?.call(null,e),i.remove()}));return i}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,S(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(o.o8)})}concat(...e){(0,f.gc)(this._observable);const t=e.map(S);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const r=this._splice(0,this.length),n=r.length;for(let i=0;i<n;i++)e.call(t,r[i],i,r);this._emitAfterChanges(i.REMOVE)}destroyAll(){this.drain(M)}destroyMany(e){const t=this.removeMany(e);return t.forEach(M),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);const r=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:r})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);const r=[];return I(r,this,e,t),new u(r)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);const r=this._items.map(e,t);return new u({items:r})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=T(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,f.gc)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=T(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof u?e.toArray():e,r=this._items,n=[],s=t.length;for(let e=0;e<s;e++){const i=t[e],s=r.indexOf(i);if(s>-1){const i=1+w(t,r,e+1,s+1),a=this._splice(s,i);a&&a.length>0&&n.push.apply(n,a),e+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=T(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let r=0;r<t;r++)if(e(this.items[r],this.items[r+1])>0)return!0;return!1}splice(e,t,...r){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const n=(t?i.REMOVE:0)|(r.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const s=this._splice(e,t,r)||[];return this._emitAfterChanges(n),s}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map((t=>(0,b.W)(t)?t.toJSON(e):t))}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const i=this._items,n=this.itemType;let s,a;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,d._)((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(a=i.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let r=0,n=a.length;r<n;r++)s=a[r],t.reset(s),this.emit("before-remove",t),t.defaultPrevented&&(a.splice(r,1),i.splice(e,0,s),e+=1,r-=1,n-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=a.length;for(let r=0;r<t;r++)e.reset(a[r]),this.emit("after-remove",e);_.release(e)}}if(r?.length){if(n){const e=[];for(const t of r){const r=n.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),s=this.hasEventListener("after-add"),a=e===this.length;if(t||s){const n=_.acquire();n.target=this,n.cancellable=!0;const l=_.acquire();l.target=this,l.cancellable=!1;for(const o of r)t?(n.reset(o),this.emit("before-add",n),n.defaultPrevented||(a?i.push(o):i.splice(e++,0,o),this._set("length",i.length),s&&(l.reset(o),this.emit("after-add",l)))):(a?i.push(o):i.splice(e++,0,o),this._set("length",i.length),l.reset(o),this.emit("after-add",l));_.release(l),_.release(n)}else{if(a)for(const e of r)i.push(e);else i.splice(e,0,...r);this._set("length",i.length)}}if((r?.length||a?.length)&&this._notifyChangeEvent(r,a),this.hasEventListener("after-splice")){const i=new v(this,r,a,e,t);this.emit("after-splice",i)}return a}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=_.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,_.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;L.clear(),x.clear(),A.clear();for(const{added:t,removed:r}of e){if(t)if(0===A.size&&0===x.size)for(const e of t)L.add(e);else for(const e of t)x.has(e)?(A.add(e),x.delete(e)):A.has(e)||L.add(e);if(r)if(0===A.size&&0===L.size)for(const e of r)x.add(e);else for(const e of r)L.has(e)?L.delete(e):(A.delete(e),x.add(e))}const r=s.A.acquire();L.forEach((e=>{r.push(e)}));const i=s.A.acquire();x.forEach((e=>{i.push(e)}));const n=this._items,a=t.items,l=s.A.acquire();if(A.forEach((e=>{a.indexOf(e)!==n.indexOf(e)&&l.push(e)})),t.listeners&&(r.length||i.length||l.length)){const e={target:this,added:r,removed:i,moved:l},n=t.listeners.length;for(let r=0;r<n;r++){const i=t.listeners[r];i.removed||i.callback.call(this,e)}}s.A.release(r),s.A.release(i),s.A.release(l)}L.clear(),x.clear(),A.clear()}};(0,n._)([(0,m.MZ)()],E.prototype,"_updating",void 0),(0,n._)([(0,m.MZ)()],E.prototype,"length",void 0),(0,n._)([(0,m.MZ)()],E.prototype,"items",null),(0,n._)([(0,m.MZ)({readOnly:!0})],E.prototype,"updating",null),E=u=(0,n._)([(0,g.$)("esri.core.Collection")],E);const D=E},7695:(e,t,r)=>{function i(e){return(t,r)=>{t[r]=e}}r.d(t,{u:()=>i})},9760:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(66552),s=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),o=r(40608);const c=new n.J({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new n.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let d=class extends s.A{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i._)([(0,l.e)({classBreaksDef:"class-breaks-definition"})],d.prototype,"type",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"breakCount",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"classificationField",void 0),(0,i._)([(0,a.MZ)({type:String,json:{read:c.read,write:c.write}})],d.prototype,"classificationMethod",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"normalizationField",void 0),(0,i._)([(0,a.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"normalizationType",void 0),(0,i._)([(0,a.MZ)({value:null,json:{write:!0}})],d.prototype,"standardDeviationInterval",null),(0,i._)([(0,a.MZ)({value:null,json:{write:!0}})],d.prototype,"definedInterval",null),d=(0,i._)([(0,o.$)("esri.rest.support.ClassBreaksDefinition")],d)},27865:(e,t,r)=>{r.d(t,{O9:()=>s,dw:()=>a,mj:()=>n});var i=r(59247);function n(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function s(e,t){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;for(let e=n.length;e<r.length;e++)n.push((0,i.sK)(r[e]))}function a(e){const t=e[0];return!!t&&"type"in t}},30524:(e,t,r)=>{r.d(t,{Ah:()=>J,Bz:()=>D,CJ:()=>re,DB:()=>b,Dx:()=>S,JL:()=>de,Kl:()=>ue,OG:()=>K,OH:()=>Y,R$:()=>E,R3:()=>P,WA:()=>j,WX:()=>te,Xz:()=>H,_b:()=>N,_w:()=>v,eX:()=>I,hL:()=>M,lD:()=>O,mB:()=>T,nw:()=>he,rS:()=>d,rq:()=>_,sv:()=>g,te:()=>X,uo:()=>ce,vE:()=>Z,yM:()=>q,yp:()=>m,zD:()=>W}),r(49186);var i=r(93637),n=r(3483),s=r(68463),a=r(69309),l=r(54218),o=r(43668);const c=/^([0-9_])/,u=/[^a-z0-9_\u0080-\uffff]+/gi;function d(e){return null==e?null:e.trim().replaceAll(u,"_").replace(c,"F$1")||null}const h=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],f=["field","normalizationField"];function m(e,t){if(null!=e&&null!=t)for(const r of Array.isArray(e)?e:[e])if(p(h,r,t),"visualVariables"in r&&r.visualVariables)for(const e of r.visualVariables)p(f,e,t)}function p(e,t,r){if(e)for(const n of e){const e=(0,i.wc)(n,t),s=e&&"function"!=typeof e&&r.get(e);s&&(0,i.sM)(n,s.name,t)}}function g(e,t){if(null!=e&&t?.fields?.length)if("startField"in e){const r=t.get(e.startField),i=t.get(e.endField);e.startField=r?.name??null,e.endField=i?.name??null}else{const r=t.get(e.startTimeField),i=t.get(e.endTimeField);e.startTimeField=r?.name??null,e.endTimeField=i?.name??null}}const y=new Set;function b(e,t){return e&&t?(y.clear(),v(y,e,t),Array.from(y).sort()):[]}function v(e,t,r){if(r)if(t?.fields?.length)if(r.includes("*"))for(const{name:r}of t.fields)e.add(r);else for(const i of r)_(e,t,i);else{if(r.includes("*"))return e.clear(),void e.add("*");for(const t of r)null!=t&&e.add(t)}}function _(e,t,r){if("string"==typeof r)if(t){const i=t.get(r);i&&e.add(i.name)}else e.add(r)}function M(e,t){return null==t||null==e?[]:t.includes("*")?(e.fields??[]).map((e=>e.name)):t}async function S(e,t,r){if(!r)return;let i;const n=(0,a.o)(r);if(n)i=[n];else{const{arcadeUtils:e}=await(0,o.l)();i=e.extractFieldNames(r,t?.fields?.map((e=>e.name)))}for(const r of i)_(e,t,r)}function T({displayField:e,fields:t}){return e||(t?.length?w(t,"name-or-title")||w(t,"unique-identifier")||w(t,"type-or-category")||function(e){for(const t of e){if(!t?.name)continue;const e=t.name.toLowerCase();if(e.includes("name")||e.includes("title"))return t.name}return null}(t):null)}function w(e,t){for(const r of e)if(r?.valueType&&r.valueType===t)return r.name;return null}function I(e){return e?b(e.fieldsIndex,V(e)):[]}const L=new Set(["oid","global-id","guid"]),x=new Set(["oid","global-id"]),A=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function V(e){if(!e)return[];const t="editFieldsInfo"in e&&e.editFieldsInfo;if(!t)return[];const{creationDateField:r,creatorField:i,editDateField:n,editorField:s}=t;return[r,i,n,s].filter(Boolean)}function F(e){return V(e).map((e=>e.toLowerCase()))}function E(e,t){return e.editable&&!L.has(e.type)&&!F(t).includes(e.name?.toLowerCase()??"")}function D(e,t){const r=e.name?.toLowerCase()??"";return!(null!=t?.objectIdField&&r===t.objectIdField.toLowerCase()||null!=t?.globalIdField&&r===t.globalIdField.toLowerCase()||function(e){const t=new Set;F(e).forEach((e=>t.add(e))),function(e){if(!e)return[];const t=e.geometryFieldsInfo;return t?b(e.fieldsIndex,[t.shapeAreaField,t.shapeLengthField]):[]}(e).forEach((e=>t.add(e.toLowerCase())));const r=e&&"infoFor3D"in e?e.infoFor3D:void 0;return r&&(Object.values(r.assetMapFieldRoles).forEach((e=>t.add(e.toLowerCase()))),Object.values(r.transformFieldRoles).forEach((e=>t.add(e.toLowerCase())))),Array.from(t)}(t).includes(r)||x.has(e.type)||A.some((e=>e.test(r))))}function O(e){const t=e.defaultValue;return void 0!==t&&U(e,t)?t:e.nullable?null:void 0}function N(e){const t="string"==typeof e?{type:e}:e;return q(t)?255:"esriFieldTypeDate"===t.type||"date"===t.type?8:void 0}function C(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function k(e){return null===e||C(e)}function z(e){return null===e||Number.isInteger(e)}function $(){return!0}function U(e,t){let r;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":r=e.nullable?z:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":r=e.nullable?k:C;break;case"string":case"esriFieldTypeString":r=e.nullable?l.CO:l.Kg;break;default:r=$}return 1===arguments.length?r:r(t)}const B=new Set(["integer","small-integer","big-integer","long","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"]),R=new Set(["single","double","esriFieldTypeSingle","esriFieldTypeDouble"]),G=(0,n.KC)(B,R);function P(e){return null!=e&&B.has(e.type)}function j(e){return null!=e&&G.has(e.type)}function q(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Z(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function W(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function J(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function Y(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function X(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function H(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function K(e,t){return null===re(e,t)}var Q,ee;function te(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function re(e,t){return null==e||e.nullable&&null===t?null:U(e,t)?j(e)&&!function(e,t){const r="string"==typeof e?ie(e):e;if(!r)return!1;const i=r.min,n=r.max;return r.isInteger?Number.isInteger(t)&&t>=i&&t<=n:t>=i&&t<=n}(e.type,Number(t))?Q.OUT_OF_RANGE:null:ee.INVALID_TYPE}function ie(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return ne;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return se;case"esriFieldTypeBigInteger":case"big-integer":return ae;case"esriFieldTypeSingle":case"single":return le;case"esriFieldTypeDouble":case"double":return oe}}(Q||(Q={})).OUT_OF_RANGE="numeric-range-validation-error::out-of-range",function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(ee||(ee={}));const ne={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},se={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},ae={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},le={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},oe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function ce(e,t,r){switch(e){case s.Mh.INVALID_CODED_VALUE:return`Value ${r} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case s.Mh.VALUE_OUT_OF_RANGE:return`Value ${r} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case ee.INVALID_TYPE:return`Value ${r} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case Q.OUT_OF_RANGE:{const{min:e,max:i}=ie(t.type);return`Value ${r} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${e} to ${i}`}}}function ue(e,t){return!function(e,t){if(!t?.attributes||!e)return!0;const r=new Set(Object.keys(t.attributes));let i=!1;for(const t of e)if(!r.has(t)){i=!0;break}return i}(e,t)}function de(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((t=>e.toLowerCase().startsWith(t)))}function he(e){const t=e?.match(/{[^}]+}/g);return t?t.map((e=>e.slice(1,-1).split(":")[0].trim())):[]}},43281:(e,t,r)=>{r.d(t,{H:()=>a,q:()=>s});var i=r(2741),n=r(10838);async function s(e){if(!e)return;const t=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,r=await(0,n.ud)("esri/t9n/basemaps");return r[e]||r[t]}const a={satellite:{id:"satellite",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/styles/root.json",layerType:"VectorTileLayer",title:"Hybrid Reference Layer",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},osm:{id:"osm",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get"dark-gray"(){return{...this["dark-gray-vector"],id:"dark-gray"}},"gray-vector":{id:"gray-vector",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get gray(){return{...this["gray-vector"],id:"gray"}},"streets-vector":{id:"streets-vector",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},get streets(){return{...this["streets-vector"],id:"streets"}},"topo-vector":{id:"topo-vector",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},get topo(){return{...this["topo-vector"],id:"topo"}},"streets-night-vector":{id:"streets-night-vector",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",classic:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"topo-3d":{id:"topo-3d",is3d:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/topo-3d.png")},baseMapLayers:[{id:"topo-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/1e7d1784d1ef4b79ba6764d0bd6c3150/resources/styles/root.json",layerType:"VectorTileLayer",title:"Topographic",visibility:!0,opacity:1},{id:"topo-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"navigation-3d":{id:"navigation-3d",is3d:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/navigation-3d.jpg")},baseMapLayers:[{id:"navigation-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/ccc904ff872b4144b94934e55e32784b/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation",visibility:!0,opacity:1},{id:"navigation-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"streets-3d":{id:"streets-3d",is3d:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/streets-3d.png")},baseMapLayers:[{id:"streets-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/198298c4c64c4cb19de5b46aa00c198d/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"streets-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"streets-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"osm-3d":{id:"osm-3d",is3d:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/osm-3d.png")},baseMapLayers:[{id:"osm-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/8628d259c9d14bdc848771c23c513940/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap",visibility:!0,opacity:1},{id:"osm-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"gray-3d":{id:"gray-3d",is3d:!0,get thumbnailUrl(){return(0,i.s)("esri/images/basemap/gray-3d.png")},baseMapLayers:[{id:"gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/01a14b466345455ba4176d2e6390db92/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"navigation-dark-3d":{id:"navigation-dark-3d",itemId:"5a1365328b4943f09a54cf5fd1205707",is3d:!0,baseMapLayers:[{id:"navigation-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/451a1777ab3f4bf095fae24a117439d9/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation Dark"},{id:"navigation-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"streets-dark-3d":{id:"streets-dark-3d",itemId:"8a4efa2c20484ec9b4557895e65736ff",is3d:!0,baseMapLayers:[{id:"streets-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/bc599b6d741a4ac084b7eea7bf8c5938/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Streets Night (for 3D)"},{id:"streets-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"streets-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"dark-gray-3d":{id:"dark-gray-3d",itemId:"a8b7322a5fe94002bb0f5e0eeb0c5c18",is3d:!0,baseMapLayers:[{id:"dark-gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/4178f71acb934fb89f169e7d667c20c6/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Dark Gray Canvas (for 3D)"},{id:"dark-gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"dark-gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]}}},43668:(e,t,r)=>{let i;function n(){return i||(i=(async()=>{const[e,t,i]=await Promise.all([Promise.all([r.e(708),r.e(8368),r.e(655),r.e(3367),r.e(7727)]).then(r.bind(r,43766)),r.e(8010).then(r.bind(r,8010)),Promise.all([r.e(655),r.e(3367),r.e(6343)]).then(r.bind(r,76343))]);return{arcade:e.arcade,arcadeUtils:e,batchExec:t,aiServices:i,Dictionary:e.Dictionary,Feature:e.arcadeFeature,Voxel:e.Voxel}})()),i}r.d(t,{l:()=>n})},54218:(e,t,r)=>{function i(e){return"number"==typeof e}function n(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function s(e){return"boolean"==typeof e}function a(e){return"string"==typeof e||e instanceof String}function l(e){return null==e||a(e)}function o(e){return Array.isArray(e)}function c(e){return"esri.Graphic"===e?.declaredClass}function u(e){return e instanceof Date}r.d(t,{$P:()=>u,CO:()=>l,DU:()=>c,Et:()=>i,Fq:()=>n,Kg:()=>a,Lm:()=>s,cy:()=>o})},59247:(e,t,r)=>{r.d(t,{bv:()=>o,Fk:()=>c,yG:()=>u,$b:()=>d,Nd:()=>h,jm:()=>f,sK:()=>g});var i=r(40876),n=r(90629);function s(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const a=s();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:s,fromValues:function(e,t,r,i,n,s,a,l,o,c,u,d,h,f,m,p){const g=new Float32Array(16);return g[0]=e,g[1]=t,g[2]=r,g[3]=i,g[4]=n,g[5]=s,g[6]=a,g[7]=l,g[8]=o,g[9]=c,g[10]=u,g[11]=d,g[12]=h,g[13]=f,g[14]=m,g[15]=p,g}},Symbol.toStringTag,{value:"Module"}));var l=r(58083);class o{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=m(e.strength,t.strength,r),this.radius=m(e.radius,t.radius,r),this.threshold=m(e.threshold,t.threshold,r)}clone(){return new o(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:p(this.radius),strength:this.strength,threshold:this.threshold}}}class c{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(m(e.radius,t.radius,r))}clone(){return new c(this.radius)}toJSON(){return{type:"blur",radius:p(this.radius)}}}class u{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=m(e.amount,t.amount,r),this._updateMatrix()}clone(){return new u(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||s();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,l.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,l.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,l.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,l.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,l.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,l.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,i=(0,l.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,l.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,l.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,l.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,l.mg)(r,r)})(e)}}}class d{constructor(e,t,r,i){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=i,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=m(e.offsetX,t.offsetX,r),this.offsetY=m(e.offsetY,t.offsetY,r),this.blurRadius=m(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(m(e.color[0],t.color[0],r)),this.color[1]=Math.round(m(e.color[1],t.color[1],r)),this.color[2]=Math.round(m(e.color[2],t.color[2],r)),this.color[3]=m(e.color[3],t.color[3],r)}clone(){return new d(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:p(this.offsetX),yoffset:p(this.offsetY),blurRadius:p(this.blurRadius),color:e}}}class h{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=m(e.angle,t.angle,r),this._updateMatrix()}clone(){return new h(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||s();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),i=Math.cos(t*Math.PI/180),n=(0,l.hZ)(e,.213+.787*i-.213*r,.715-.715*i-.715*r,.072-.072*i+.928*r,0,.213-.213*i+.143*r,.715+.285*i+.14*r,.072-.072*i-.283*r,0,.213-.213*i-.787*r,.715-.715*i+.715*r,.072+.928*i+.072*r,0,0,0,0,1);return(0,l.mg)(n,n)})(e,this.angle)}}class f{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=m(e.amount,t.amount,r)}clone(){return new f(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function m(e,t,r){return e+(t-e)*r}function p(e){return Math.round(1e3*(0,n.PN)(e))/1e3}function g(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new u(e.type,0);case"saturate":case"brightness":case"contrast":return new u(e.type,1);case"opacity":return new f(1);case"hue-rotate":return new h(0);case"blur":return new c(0);case"drop-shadow":return new d(0,0,0,[...(0,i.TS)("transparent")]);case"bloom":return new o(0,0,1)}}},61760:(e,t,r)=>{r.d(t,{PU:()=>a,YW:()=>o,ex:()=>n,hv:()=>l,zp:()=>s}),r(34727);var i=r(90629);r(87317),r(91829);const n=2.4;function s(e){return(0,i.PN)(e*n)}function a(e){return(0,i.Lz)(e)/n}function l(e,t,r){const i=Math.sqrt(e**2+t**2)/r;return i>1?0:3/(Math.PI*r**2)*(1-i**2)**2}function o(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},62577:(e,t,r)=>{function i(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]:[0,0,0,0]}:null}function n(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;const{originPosition:t,scale:r,translate:i}=e,n=r[0]??1,s=r[1]??1;return{originPosition:"lowerLeft",scale:[n,"lowerLeft"===t?s:-s,r[2]??1,r[3]??1],translate:[i[0]??0,i[1]??0,i[2]??0,i[3]??0]}}function s({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function a({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}function l({scale:e,translate:t},r){return r*e[0]+t[0]}function o({scale:e,translate:t},r){return r*e[1]+t[1]}function c({scale:e,translate:t},r){return(r??0)*e[2]+t[2]}function u({scale:e,translate:t},r){return r?r*e[3]+t[3]:0}function d(e,t){return e&&t?p:e&&!t?f:!e&&t?m:h}r.d(t,{$X:()=>_,B2:()=>a,Gy:()=>y,IE:()=>s,P5:()=>M,Q1:()=>n,SW:()=>b,Tr:()=>v,VV:()=>i}),r(65864);const h=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const i=t[0];let n=l(e,i[0]),s=o(e,i[1]);r[0]=[n,s];const{scale:a,originPosition:c}=e,u=a[0],d="lowerLeft"===c?a[1]:-a[1];for(let e=1;e<t.length;e++){const[i,a]=t[e];n+=u*i,s+=d*a,r[e]=[n,s]}return r},f=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const i=t[0];let n=l(e,i[0]),s=o(e,i[1]);r[0]=[n,s,c(e,i[2])];const{scale:a,originPosition:u}=e,d=a[0],h="lowerLeft"===u?a[1]:-a[1];for(let i=1;i<t.length;i++){const[a,l,o]=t[i];n+=d*a,s+=h*l,r[i]=[n,s,c(e,o)]}return r},m=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const i=t[0];let n=l(e,i[0]),s=o(e,i[1]);r[0]=[n,s,u(e,i[2])];const{scale:a,originPosition:c}=e,d=a[0],h="lowerLeft"===c?a[1]:-a[1];for(let i=1;i<t.length;i++){const[a,l,o]=t[i];n+=d*a,s+=h*l,r[i]=[n,s,u(e,o)]}return r},p=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const i=t[0];let n=l(e,i[0]),s=o(e,i[1]);r[0]=[n,s,c(e,i[2]),u(e,i[3])];const{scale:a,originPosition:d}=e,h=a[0],f="lowerLeft"===d?a[1]:-a[1];for(let i=1;i<t.length;i++){const[a,l,o,d]=t[i];n+=h*a,s+=f*l,r[i]=[n,s,c(e,o),u(e,d)]}return r};function g(e,t,r){const i=new Array(r.length);for(let n=0;n<r.length;n++)i[n]=t(e,r[n]);return i}function y(e,t,r){const i=n(e);return t.x=s(i,r.x),t.y=a(i,r.y),null!=r.z&&(t.z=function({scale:e,translate:t},r){return Math.round(((r??0)-t[2])/e[2])}(i,r.z)),null!=r.m&&(t.m=function({scale:e,translate:t},r){return r?Math.round((r-t[3])/e[3]):0}(i,r.m)),t}function b(e,t,r,i=r?.hasZ??!1,s=r?.hasM??!1){if(null!=r){const a=n(e);t.points=d(i,s)(a,r.points),t.hasZ=i,t.hasM=s}return t}function v(e,t,r,i=null!=r?.z,s=null!=r?.m){if(null==r)return t;const a=n(e);return t.x=l(a,r.x),t.y=o(a,r.y),i&&(t.z=c(a,r.z)),s&&(t.m=u(a,r.m)),t}function _(e,t,r,i=r?.hasZ??!1,s=r?.hasM??!1){if(null!=r){const a=n(e);t.rings=g(a,d(i,s),r.rings),t.hasZ=i,t.hasM=s}return t}function M(e,t,r,i=r?.hasZ??!1,s=r?.hasM??!1){if(null!=r){const a=n(e);t.paths=g(a,d(i,s),r.paths),t.hasZ=i,t.hasM=s}return t}},65529:(e,t,r)=>{r.d(t,{A:()=>o});var i=r(90237),n=r(69622),s=r(36563),a=r(40608);class l{constructor(){this._emitter=new l.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){let r=this._listenersMap?.get(e);if(!r)return!1;const i=this._target||this;let n=!1;for(const e of r.slice()){const r="deref"in e?e.deref():e;r?r?.call(i,t):n=!0}return n&&(r=r.filter((e=>!("deref"in e)||null!=e.deref())),this._listenersMap.set(e,r)),r.length>0}on(e,t){if(Array.isArray(e)){const r=e.map((e=>this.on(e,t)));return(0,s.vE)(r)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;const r=this._listenersMap.get(e)||[];return r.push(t),this._listenersMap.set(e,r),(0,s.hA)((()=>{const r=this._listenersMap?.get(e),i=r?.indexOf(t)??-1;i>=0&&r.splice(i,1)}))}once(e,t){const r=this.on(e,(e=>{r.remove();const i="deref"in t?t.deref():t;i?.call(null,e)}));return r}hasEventListener(e){const t=this._listenersMap?.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let r=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return r=(0,i._)([(0,a.$)("esri.core.Evented")],r),r};let r=class extends n.A{constructor(){super(...arguments),this._emitter=new l.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};r=(0,i._)([(0,a.$)("esri.core.Evented.EventedAccessor")],r),e.EventedAccessor=r}(l||(l={}));const o=l},68463:(e,t,r)=>{r.d(t,{Mh:()=>h,A5:()=>v});var i=r(3483),n=r(97768),s=r(54218),a=r(96285);const l=["HH:mm:ss.SSS","HH:mm:ss","HH:mm","TT"],o="yyyy-MM-dd";function c(e){if(!e||!(0,s.Kg)(e))return null;const t=a.c9.fromFormat(e,o);return t.isValid?t:null}function u(e){return e&&(0,s.Kg)(e)?(0,n.Pb)(l,(t=>{const r=a.c9.fromFormat(e,t);return r.isValid?r:null}))??null:null}function d(e){if(!e||!(0,s.Kg)(e))return null;const t=a.c9.fromISO(e);return t.isValid?t:null}var h,f;(f=h||(h={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",f.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";const m=new Set(["integer","small-integer","long","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"]);function p(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function g(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function y(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}const b=new Set(["single","double","esriFieldTypeSingle","esriFieldTypeDouble"]);function v(e,t){const r=t??e?.domain;if(!r||"range"!==r.type)return;const i="range"in r?r.range[0]:r.minValue,n="range"in r?r.range[1]:r.maxValue,s=function(e){return null!=e&&m.has(e.type)}(e);return p(e)||y(e)||g(e)?{..._(e,n,i),isInteger:s}:{min:null!=i&&"number"==typeof i?i:null,max:null!=n&&"number"==typeof n?n:null,rawMin:i,rawMax:n,isInteger:s}}function _(e,t,r){return p(e)?{min:c(r)?.toMillis(),max:c(t)?.toMillis(),rawMin:r,rawMax:t}:y(e)?{min:u(r)?.toMillis(),max:u(t)?.toMillis(),rawMin:r,rawMax:t}:g(e)?{min:d(r)?.toMillis(),max:d(t)?.toMillis(),rawMin:r,rawMax:t}:{max:null,min:null}}(0,i.KC)(m,b)},69309:(e,t,r)=>{function i(e){if(!e)return;const t=e.match(n);return t?.groups?t.groups.doubleQuoted??t.groups.singleQuoted??t.groups.dotNotation:void 0}r.d(t,{D:()=>s,o:()=>i});const n=/^(\$feature\[(?:"(?<doubleQuoted>[^"]+)"|'(?<singleQuoted>[^']+)')\]|\$feature\.(?<dotNotation>[a-zA-Z_][a-zA-Z0-9_]*))$/i;function s(e){return e.match(a)?.[1]?.replace(/\\'/g,"'")??null}const a=/^hash\(\$feature\['((\\'|[^'])+)'\]\) \* 8\.381e-8$/},84892:(e,t,r)=>{r.d(t,{t:()=>a});var i=r(53966);const n=()=>i.A.getLogger("esri.rest.support.generateRendererUtils");function s(e,t){return Number(e.toFixed(t))}function a(e,t){const{normalizationTotal:r}=e;return{classBreaks:l(e,t),normalizationTotal:r}}function l(e,t){const r=e.definition,{classificationMethod:i,normalizationType:n,definedInterval:a}=r,l=r.breakCount??1,u=[];let d=e.values;if(0===d.length)return[];d=d.sort(((e,t)=>e-t));const[h,f]=t??[d.at(0),d.at(-1)];if("equal-interval"===i)if(d.length>=l){const e=(f-h)/l;let t=h;for(let r=1;r<l;r++){const i=s(h+r*e,6);u.push({minValue:t,maxValue:i,label:o(t,i,n)}),t=i}u.push({minValue:t,maxValue:f,label:o(t,f,n)})}else d.forEach((e=>{u.push({minValue:e,maxValue:e,label:o(e,e,n)})}));else if("natural-breaks"===i){const t=function(e){const t=[],r=[];let i=Number.MIN_VALUE,n=1,s=-1;for(let a=0;a<e.length;a++){const l=e[a];l===i?(n++,r[s]=n):null!==l&&(t.push(l),i=l,n=1,r.push(n),s++)}return{uniqueValues:t,valueFrequency:r}}(d),r=e.valueFrequency||t.valueFrequency,i=c(t.uniqueValues,r,l);let a=h;for(let e=1;e<l;e++)if(t.uniqueValues.length>e){const r=s(t.uniqueValues[i[e]],6);u.push({minValue:a,maxValue:r,label:o(a,r,n)}),a=r}u.push({minValue:a,maxValue:f,label:o(a,f,n)})}else if("quantile"===i)if(d.length>=l&&h!==f){let e=h,t=Math.ceil(d.length/l),r=0;for(let i=1;i<l;i++){let s=t+r-1;s>d.length&&(s=d.length-1),s<0&&(s=0),u.push({minValue:e,maxValue:d[s],label:o(e,d[s],n)}),e=d[s],r+=t,t=Math.ceil((d.length-r)/(l-i))}u.push({minValue:e,maxValue:f,label:o(e,f,n)})}else{let e=-1;for(let t=0;t<d.length;t++){const r=d[t];r!==e&&(e=r,u.push({minValue:e,maxValue:r,label:o(e,r,n)}),e=r)}}else if("standard-deviation"===i){const e=function(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t/=e.length,t}(d),t=function(e,t){let r=0;for(let i=0;i<e.length;i++){const n=e[i];r+=(n-t)*(n-t)}return r/=e.length,Math.sqrt(r)}(d,e);if(0===t)u.push({minValue:d[0],maxValue:d[0],label:o(d[0],d[0],n)});else{const r=function(e,t,r,i,n){let s=Math.max(i-e,t-i)/n/r;return s=s>=1?1:s>=.5?.5:.25,s}(h,f,l,e,t)*t;let i=0,a=h;for(let t=l;t>=1;t--){const l=s(e-(t-.5)*r,6);u.push({minValue:a,maxValue:l,label:o(a,l,n)}),a=l,i++}let c=s(e+.5*r,6);u.push({minValue:a,maxValue:c,label:o(a,c,n)}),a=c,i++;for(let t=1;t<=l;t++)c=i===2*l?f:s(e+(t+.5)*r,6),u.push({minValue:a,maxValue:c,label:o(a,c,n)}),a=c,i++}}else if("defined-interval"===i){if(!a)return u;const[e,r]=t??[d.at(0),d.at(-1)],i=Math.ceil((r-e)/a);let l=e;for(let t=1;t<i;t++){const r=s(e+t*a,6);u.push({minValue:l,maxValue:r,label:o(l,r,n)}),l=r}u.push({minValue:l,maxValue:r,label:o(l,r,n)})}return u}function o(e,t,r){let i=null;return i=e===t?r&&"percent-of-total"===r?e+"%":e.toString():r&&"percent-of-total"===r?e+"% - "+t+"%":e+" - "+t,i}function c(e,t,r){const i=e.length,n=[];r>i&&(r=i);for(let e=0;e<r;e++)n.push(Math.round(e*i/r-1));n.push(i-1);let s=u(n,e,t,r);return function(e,t,r,i,n,s){let a=0,l=0,o=0,c=0,u=!0;for(let h=0;h<2&&u;h++){0===h&&(u=!1);for(let h=0;h<s-1;h++)for(;r[h+1]+1!==r[h+2];){r[h+1]=r[h+1]+1;const s=d(h,r,i,n);o=s.sbMean,a=s.sbSdcm;const f=d(h+1,r,i,n);if(c=f.sbMean,l=f.sbSdcm,!(a+l<t[h]+t[h+1])){r[h+1]=r[h+1]-1;break}t[h]=a,t[h+1]=l,e[h]=o,e[h+1]=c,u=!0}for(let h=s-1;h>0;h--)for(;r[h]!==r[h-1]+1;){r[h]=r[h]-1;const s=d(h-1,r,i,n);o=s.sbMean,a=s.sbSdcm;const f=d(h,r,i,n);if(c=f.sbMean,l=f.sbSdcm,!(a+l<t[h-1]+t[h])){r[h]=r[h]+1;break}t[h-1]=a,t[h]=l,e[h-1]=o,e[h]=c,u=!0}}return u}(s.mean,s.sdcm,n,e,t,r)&&(s=u(n,e,t,r)),n}function u(e,t,r,i){let n=[],s=[],a=[],l=0;const o=[],c=[];for(let n=0;n<i;n++){const i=d(n,e,t,r);o.push(i.sbMean),c.push(i.sbSdcm),l+=c[n]}let u,h=l,f=!0;for(;f||l<h;){f=!1,n=[];for(let t=0;t<i;t++)n.push(e[t]);for(let r=0;r<i;r++)for(let n=e[r]+1;n<=e[r+1];n++)if(u=t[n],r>0&&n!==e[r+1]&&Math.abs(u-o[r])>Math.abs(u-o[r-1]))e[r]=n;else if(r<i-1&&e[r]!==n-1&&Math.abs(u-o[r])>Math.abs(u-o[r+1])){e[r+1]=n-1;break}h=l,l=0,s=[],a=[];for(let n=0;n<i;n++){s.push(o[n]),a.push(c[n]);const i=d(n,e,t,r);o[n]=i.sbMean,c[n]=i.sbSdcm,l+=c[n]}}if(l>h){for(let t=0;t<i;t++)e[t]=n[t],o[t]=s[t],c[t]=a[t];l=h}return{mean:o,sdcm:c}}function d(e,t,r,i){let s=0,a=0;for(let n=t[e]+1;n<=t[e+1];n++){const e=i[n];s+=r[n]*e,a+=e}a<=0&&n().warn("Exception in Natural Breaks calculation");const l=s/a;let o=0;for(let n=t[e]+1;n<=t[e+1];n++)o+=i[n]*(r[n]-l)**2;return{sbMean:l,sbSdcm:o}}},87445:(e,t,r)=>{r.d(t,{$r:()=>g,Jc:()=>v,gV:()=>y,rb:()=>b}),r(49186);var i=r(90629),n=r(88930),s=r(86738),a=r(16930),l=r(62577),o=r(21325),c=r(30524),u=r(61760),d=r(4560),h=r(1873),f=r(43668);let m=null;const p=/^(?<hh>([0-1][0-9])|([2][0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?([.](?<ms>\d+))?$/;function g(e,t,r,i){const n=(0,o.d9)(r)?(0,o.Vp)(r):null,a=n?Math.round((n.valid[1]-n.valid[0])/t.scale[0]):null;return e.map((e=>{const r=new s.A(e.geometry);return(0,l.Gy)(t,r,r),e.geometry=n?function(e,t,r){return e.x<0?e.x+=t:e.x>r&&(e.x-=t),e}(r,a??0,i[0]):r,e}))}function y(e,t=18,r,n,s){const a=new Float64Array(n*s);t=Math.round((0,i.Lz)(t));let l=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;const c=(0,u.YW)(r);for(const{geometry:r,attributes:i}of e){const{x:e,y:d}=r,h=Math.max(0,e-t),f=Math.max(0,d-t),m=Math.min(s,d+t),p=Math.min(n,e+t),g=+c(i);for(let r=f;r<m;r++)for(let i=h;i<p;i++){const s=r*n+i,c=(0,u.hv)(i-e,r-d,t)*g,h=a[s]+=c;l=Math.min(l,h),o=Math.max(o,h)}}return{min:l,max:o}}function b(e){const t=p.exec(e);if(!t)return null;const{hh:r,mm:i,ss:s,ms:a}=t.groups;return Number(r)*n.vf.hours+Number(i)*n.vf.minutes+Number(s)*n.vf.seconds+Number(a||0)}async function v(e,t,r=!0){if(!t)return[];const{field:i,field2:n,field3:s,fieldDelimiter:l,fieldInfos:o,timeZone:u}=e,p=i&&o?.find((e=>e.name.toLowerCase()===i.toLowerCase())),g=!!p&&(0,c.OH)(p),y=!!p&&(0,d.fs)(p),v=e.valueExpression,_=e.normalizationType,M=e.normalizationField,S=e.normalizationTotal,T=[],w=e.viewInfoParams;let I=null,L=null;if(v){if(!m){const{arcadeUtils:e}=await(0,f.l)();m=e}m.hasGeometryOperations(v)&&await m.enableGeometryOperations(),I=m.createFunction(v),L=w?m.getViewInfo({viewingMode:w.viewingMode,scale:w.scale,spatialReference:new a.A(w.spatialReference)}):null}const x=e.fieldInfos,A=t[0]&&"declaredClass"in t[0]&&"esri.Graphic"===t[0].declaredClass||!x?null:{fields:x};return t.forEach((e=>{const t=e.attributes;let a;if(v){const t=A?{...e,layer:A}:e,r=m.createExecContext(t,L,u);a=m.executeFunction(I,r)}else t&&(a=t[i],n?(a=`${(0,h.gJ)(a)}${l}${(0,h.gJ)(t[n])}`,s&&(a=`${a}${l}${(0,h.gJ)(t[s])}`)):"string"==typeof a&&r&&(y?a=a?new Date(a).getTime():null:g&&(a=a?b(a):null)));if(_&&"number"==typeof a&&isFinite(a)){const e=t&&parseFloat(t[M]);a=(0,h.zS)(a,_,e,S)}T.push(a)})),T}},90629:(e,t,r)=>{r.d(t,{Lz:()=>a,PN:()=>l,cr:()=>o,tc:()=>c});const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,n="screenUtils.toPt: input not recognized!",s=96;function a(e){return e?e/72*s:0}function l(e){return e?72*e/s:0}function o(e){if("string"==typeof e){const t=e.match(i);if(t){const r=Number(t[1]),i=t[3]&&t[3].toLowerCase(),n="-"===e.charAt(0),s="px"===i?l(r):r;return n?-s:s}return console.warn(n),null}return e}function c(e=0,t=0){return{x:e,y:t}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[984],{4095:(t,e,r)=>{r.d(e,{CW:()=>u});var n=r(44208),o=r(53966),i=(r(34727),r(74887)),s=r(87811);r(5443),r(21325);const a=()=>o.A.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(t,e,r,o){const u=performance.now(),c=function(t,e){const r=function(t,e,r,n){if(0===n)return t;const o=Math.round(3*n),i=new Array(2*o+1);let s=0;for(let t=-o;t<=o;t++){const e=Math.exp(-t*t/(n*n));i[t+o]=e,s+=e}for(let t=-o;t<=o;t++)i[t+o]/=s;const a=new Float32Array(t.length);for(let n=0;n<r;n++)for(let r=0;r<e;r++){let s=0,l=0;for(let a=-o;a<=o;a++){if(r+a<0||r+a>=e)continue;const u=i[a+o];s+=u*t[2*(n*e+(r+a))],l+=u*t[2*(n*e+(r+a))+1]}a[2*(n*e+r)]=s,a[2*(n*e+r)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let n=0;n<r;n++){let s=0,u=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=r)continue;const c=i[l+o];s+=c*a[2*((n+l)*e+t)],u+=c*a[2*((n+l)*e+t)+1]}l[2*(n*e+t)]=s,l[2*(n*e+t)+1]=u}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,n)=>{const o=Math.floor(t),i=Math.floor(n);if(o<0||o>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-o,a=n-i,l=o,u=i,c=o<e.width-1?o+1:o,h=i<e.height-1?i+1:i,f=r[2*(u*e.width+l)],p=r[2*(u*e.width+c)],d=r[2*(h*e.width+l)],m=r[2*(h*e.width+c)],g=r[2*(u*e.width+l)+1],y=r[2*(u*e.width+c)+1];return[(f*(1-a)+d*a)*(1-s)+(p*(1-a)+m*a)*s,(g*(1-a)+r[2*(h*e.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(h*e.width+c)+1]*a)*s]}:(t,n)=>{const o=Math.round(t),i=Math.round(n);return o<0||o>=e.width||i<0||i>=e.height?[0,0]:[r[2*(i*e.width+o)],r[2*(i*e.width+o)+1]]}}(e,r),f=performance.now(),p=h(e,c,r.width,r.height),d=performance.now(),m=function(t){const e=new s.A,r=t.reduce(((t,e)=>t+e.length),0),n=new Float32Array(4*r),o=new Array(t.length);let i=0,a=0;for(const r of t){const t=i;for(const t of r)n[4*i]=t.x,n[4*i+1]=t.y,n[4*i+2]=t.t,n[4*i+3]=t.speed,i++;o[a++]={startVertex:t,numberOfVertices:r.length,totalTime:r[r.length-1].t,timeSeed:e.getFloat()}}return{lineVertices:n,lineDescriptors:o}}(p),g=performance.now(),y="Streamlines"===t?function(t,e){const{lineVertices:r,lineDescriptors:n}=t;let o=0,i=0;for(const t of n)o+=2*t.numberOfVertices,i+=6*(t.numberOfVertices-1);const s=new Float32Array(9*o),a=new Uint32Array(i);let l=0,u=0;function c(){a[u++]=l-2,a[u++]=l,a[u++]=l-1,a[u++]=l,a[u++]=l+1,a[u++]=l-1}function h(t,e,r,n,o,i,a,u){const c=9*l;let h=0;s[c+h++]=t,s[c+h++]=e,s[c+h++]=1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=n/2,s[c+h++]=o/2,s[c+h++]=u,l++,s[c+h++]=t,s[c+h++]=e,s[c+h++]=-1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=-n/2,s[c+h++]=-o/2,s[c+h++]=u,l++}for(const t of n){const{totalTime:n,timeSeed:o}=t;let i=null,s=null,a=null,l=null,u=null,f=null;for(let p=0;p<t.numberOfVertices;p++){const d=r[4*(t.startVertex+p)],m=r[4*(t.startVertex+p)+1],g=r[4*(t.startVertex+p)+2],y=r[4*(t.startVertex+p)+3];let w=null,b=null,C=null,v=null;if(p>0){w=d-i,b=m-s;const t=Math.sqrt(w*w+b*b);if(w/=t,b/=t,p>1){let t=w+u,r=b+f;const n=Math.sqrt(t*t+r*r);t/=n,r/=n;const o=Math.min(1/(t*w+r*b),e);t*=o,r*=o,C=-r,v=t}else C=-b,v=w;null!==C&&null!==v&&(h(i,s,a,C,v,n,o,y),c())}i=d,s=m,a=g,u=w,f=b,l=y}h(i,s,a,-f,u,n,o,l)}return{vertexData:s,indexData:a}}(m,l):function(t){const{lineVertices:e,lineDescriptors:r}=t;let n=0,o=0;for(const t of r){const e=t.numberOfVertices-1;n+=4*e*2,o+=6*e*2}const i=new Float32Array(16*n),s=new Uint32Array(o);let a,l,u,c,h,f,p,d,m,g,y,w,b,C,v=0,x=0;function A(){s[x++]=v-8,s[x++]=v-7,s[x++]=v-6,s[x++]=v-7,s[x++]=v-5,s[x++]=v-6,s[x++]=v-4,s[x++]=v-3,s[x++]=v-2,s[x++]=v-3,s[x++]=v-1,s[x++]=v-2}function k(t,e,r,n,o,s,a,l,u,c,h,f,p,d){const m=16*v;let g=0;for(const y of[1,2])for(const w of[1,2,3,4])i[m+g++]=t,i[m+g++]=e,i[m+g++]=r,i[m+g++]=n,i[m+g++]=a,i[m+g++]=l,i[m+g++]=u,i[m+g++]=c,i[m+g++]=y,i[m+g++]=w,i[m+g++]=p,i[m+g++]=d,i[m+g++]=o/2,i[m+g++]=s/2,i[m+g++]=h/2,i[m+g++]=f/2,v++}function M(t,e){let r=m+y,n=g+w;const o=Math.sqrt(r*r+n*n);r/=o,n/=o;const i=m*r+g*n;r/=i,n/=i;let s=y+b,v=w+C;const x=Math.sqrt(s*s+v*v);s/=x,v/=x;const M=y*s+w*v;s/=M,v/=M,k(a,l,u,c,-n,r,h,f,p,d,-v,s,t,e),A()}function S(t,e,r,n,o,i){if(m=y,g=w,y=b,w=C,null==m&&null==g&&(m=y,g=w),null!=h&&null!=f){b=t-h,C=e-f;const r=Math.sqrt(b*b+C*C);b/=r,C/=r}null!=m&&null!=g&&M(o,i),a=h,l=f,u=p,c=d,h=t,f=e,p=r,d=n}function T(t,e){m=y,g=w,y=b,w=C,null==m&&null==g&&(m=y,g=w),null!=m&&null!=g&&M(t,e)}for(const t of r){a=null,l=null,u=null,c=null,h=null,f=null,p=null,d=null,m=null,g=null,y=null,w=null,b=null,C=null;const{totalTime:r,timeSeed:n}=t;for(let o=0;o<t.numberOfVertices;o++)S(e[4*(t.startVertex+o)],e[4*(t.startVertex+o)+1],e[4*(t.startVertex+o)+2],e[4*(t.startVertex+o)+3],r,n);T(r,n)}return{vertexData:i,indexData:s}}(m),w=performance.now();return(0,n.A)("esri-2d-profiler")&&(a().info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a().info("I.2","_getStreamlines (ms)",Math.round(d-f)),a().info("I.3","createAnimatedLinesData (ms)",Math.round(g-d)),a().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-g)),a().info("I.5","createFlowMesh (ms)",Math.round(w-u)),a().info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.Te)(o),y}function c(t,e,r,n,o,i,s,a,l){const u=[];let c=r,h=n,f=0,[p,d]=e(c,h);p*=t.velocityScale,d*=t.velocityScale;const m=Math.sqrt(p*p+d*d);let g,y;u.push({x:c,y:h,t:f,speed:m});for(let r=0;r<t.verticesPerLine;r++){let[r,n]=e(c,h);r*=t.velocityScale,n*=t.velocityScale;const p=Math.sqrt(r*r+n*n);if(p<t.minSpeedThreshold)return u;const d=r/p,m=n/p;if(c+=d*t.segmentLength,h+=m*t.segmentLength,f+=t.segmentLength/p,Math.acos(d*g+m*y)>t.maxTurnAngle)return u;if(t.collisions){const t=Math.round(c*l),e=Math.round(h*l);if(t<0||t>s-1||e<0||e>a-1)return u;const r=i[e*s+t];if(-1!==r&&r!==o)return u;i[e*s+t]=o}u.push({x:c,y:h,t:f,speed:p}),g=d,y=m}return u}function h(t,e,r,n){const o=[],i=new s.A,a=1/Math.max(t.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(n*a),h=new Int32Array(l*u);for(let t=0;t<h.length;t++)h[t]=-1;const f=[];for(let e=0;e<n;e+=t.lineSpacing)for(let n=0;n<r;n+=t.lineSpacing)f.push({x:n,y:e,sort:i.getFloat()});f.sort(((t,e)=>t.sort-e.sort));for(const{x:r,y:n}of f)if(i.getFloat()<t.density){const i=c(t,e,r,n,o.length,h,l,u,a);if(i.length<2)continue;o.push(i)}return o}},4151:(t,e,r)=>{r.d(e,{z:()=>n});class n{constructor(t=null,e=null,r=null){this.minValue=t,this.maxValue=e,this.noDataValue=r}}},6952:(t,e,r)=>{r.d(e,{DP:()=>w,Nh:()=>b,Pg:()=>y,RP:()=>h,WF:()=>c,_N:()=>C,eH:()=>m,f4:()=>g,fP:()=>p,zj:()=>f,zt:()=>u});var n=r(97768),o=r(14140),i=r(16019),s=r(70274);const a=1,l=[.299,.587,.114];function u(t){if(null==t)return!1;const{max:e,min:r,size:n}=t;return(e-r)/n==1&&r>=-.5&&.5===Math.abs(r%1)&&e<=255.5}function c(t,e=256){e=Math.min(e,256);const{size:r,counts:n}=t,o=new Float64Array(r);o[0]=n[0]/e;for(let t=1;t<r;t++)o[t]=o[t-1]+n[t]/e;const i=new Uint8Array(e),s=e/o[o.length-1];if(r<=e){const n=u(t)?Math.max(0,Math.round(t.min+.5)):0;for(let t=n;t<e;t++)i[t]=t>=r+n?255:Math.min(255,Math.trunc(o[t-n]*s))}else{const t=o.map((t=>Math.min(255,Math.trunc(t*s))));for(let n=0;n<e;n++)i[n]=t[Math.round(r/e)];i[e-1]=255}return i}function h(t){const{minCutOff:e,maxCutOff:r,gamma:n,pixelType:o,rounding:i}=t;if(!["u8","u16","s8","s16"].includes(o))return null;const s=e.length,a="s8"===o?-127:"s16"===o?-32767:0,l=["u16","s16"].includes(o)?65536:256,u=[],c=[],{minOutput:h=0,maxOutput:p=255}=t,d=p-h;for(let t=0;t<s;t++)c[t]=r[t]-e[t],u[t]=0===c[t]?0:d/c[t];const m=[];if(n&&n.length>=s){const t=b(s,n);for(let o=0;o<s;o++){const s=[];for(let u=0;u<l;u++){if(0===c[o]){s[u]=h;continue}const l=u+a,f=(l-e[o])/c[o];let m=1;if(n[o]>1&&(m-=(1/d)**(f*t[o])),l<r[o]&&l>e[o]){const t=m*d*f**(1/n[o])+h;s[u]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}else l>=r[o]?s[u]=p:s[u]=h}m[o]=s}}else for(let t=0;t<s;t++){const n=[];for(let o=0;o<l;o++){const s=o+a;if(s<=e[t])n[o]=h;else if(s>=r[t])n[o]=p;else{const r=(s-e[t])*u[t]+h;n[o]="floor"===i?Math.floor(r):"round"===i?Math.round(r):r}}m[t]=n}if(null!=t.contrastOffset){const e=f(t.contrastOffset,t.brightnessOffset);for(let t=0;t<s;t++){const r=m[t];for(let t=0;t<l;t++)r[t]=e[r[t]]}}return{lut:m,offset:a}}function f(t,e){const r=Math.min(Math.max(t,-100),100),n=Math.min(Math.max(e??0,-100),100),o=new Uint8Array(256);for(let t=0;t<256;t++){let e=0;r>0&&r<100?e=(200*t-25500+510*n)/(2*(100-r))+128:r<=0&&r>-100?e=(200*t-25500+510*n)*(100+r)/2e4+128:100===r?(e=200*t-25500+256*(100-r)+510*n,e=e>0?255:0):-100===r&&(e=128),o[t]=e>255?255:e<0?0:e}return o}function p(t,e,r){const n=[];for(let o=0;o<e.length;o++){let i=0,s=0,a=0;"min"in e[o]?({min:i,max:s,avg:a}=e[o]):[i,s,a]=e[o];let u=a??0;"u8"!==t&&(u=255*(u-i)/(s-i)),r&&(u*=l[o]),n.push(d(u))}return n}function d(t){if(t<=0||t>=255)return a;const e=t+(150===t?0:t<150?45*Math.cos(.01047*t):17*Math.sin(.021*t)),r=Math.log(t/255),n=Math.log(e/255);if(0===n)return a;const o=r/n;return isNaN(o)?a:Math.min(9.9,Math.max(.01,o))}function m(t){const{pixels:e,mask:r,pixelType:n,bandMasks:o}=t,i=e.map(((t,e)=>function(t,e,r){let n=1/0,o=-1/0,i=0,s=0,a=0,l=0;const u=t.length,c=new Map,h=[];for(let r=0;r<u;r++){const u=t[r];if(!e||e[r]){h.push(u);const t=(c.get(u)??0)+1;c.set(u,t),t>l&&(l=t,a=u),n=u<n?u:n,o=u>o?u:o,i+=u,s++}}if(0===s)return{statistics:{min:0,max:0,avg:0,stddev:0,mode:0,median:0},histogram:null};const f=i/s;let p=0;for(let r=0;r<u;r++)e&&!e[r]||(p+=(t[r]-f)**2);const d=e?e.filter((t=>t)).length:u,m=d<=1?0:Math.sqrt(p/(d-1));h.sort(((t,e)=>t-e));const g=s>>>1,y={min:n,max:o,avg:f,stddev:m,mode:a,median:s%2?h[Math.floor(g)]:(h[g-1]+h[g])/2};if(["u8","s8","u4","u2","u1"].includes(r)){const r=o-n+1,i=new Uint32Array(r);for(let r=0;r<u;r++)e&&!e[r]||i[t[r]-n]++;return{statistics:y,histogram:{min:n-.5,max:o+.5,size:r,counts:i}}}const w=256,b=new Uint32Array(w),C=(o-n)/w;if(0===C)return{statistics:y,histogram:{min:n,max:o,size:1,counts:new Uint32Array(1).fill(s)}};const v=new Uint32Array(257);for(let r=0;r<u;r++)e&&!e[r]||v[Math.floor((t[r]-n)/C)]++;for(let t=0;t<255;t++)b[t]=v[t];return b[255]=v[255]+v[w],{statistics:y,histogram:{min:n,max:o,size:w,counts:b}}}(t,o?.[e]??r,n)));return{statistics:i.map((({statistics:t})=>t)),histograms:i.map((({histogram:t})=>t))}}function g(t){if(!t?.pixels?.length)return null;const{pixels:e,mask:r,bandMasks:n,pixelType:o}=t,i=t.width*t.height,s=e.length,a=[],l=[],u=256;let c,h;for(let f=0;f<s;f++){let s=new Uint32Array(u);const p=e[f],d=n?.[f]??r;if("u8"===o){if(c=255,h=0,d){for(let t=0;t<i;t++)if(d[t]){const e=p[t];c=e<c?e:c,h=e>h?e:h,s[e]++}}else for(let t=0;t<i;t++){const e=p[t];c=e<c?e:c,h=e>h?e:h,s[e]++}s=s.slice(c,h+1)}else{let e=!1;t.statistics||(t.updateStatistics(),e=!0);const r=t.statistics;c=r[f].minValue,h=r[f].maxValue;const n=(h-c)/u;if(0===n){!r||t.validPixelCount||e||t.updateStatistics();const n=(t.validPixelCount||t.width*t.height)/u;for(let t=0;t<u;t++)s[t]=Math.round(n*(t+1))-Math.round(n*t)}else{const t=new Uint32Array(257);for(let e=0;e<i;e++)d&&!d[e]||t[Math.floor((p[e]-c)/n)]++;for(let e=0;e<255;e++)s[e]=t[e];s[255]=t[255]+t[u]}}const m="u8"===o?c-.5:c,g="u8"===o?h+.5:h;a.push({min:m,max:g,size:s.length,counts:s});let y=0,w=0,b=0;for(let t=0;t<s.length;t++)y+=s[t],w+=t*s[t];const C=w/y;for(let t=0;t<s.length;t++)b+=s[t]*(t-C)**2;const v=Math.sqrt(b/(y-1)),x=(g-m)/s.length,A=(C+("u8"===o?0:.5))*x+c,k=v*x;l.push({min:c,max:h,avg:A,stddev:k})}return{statistics:l,histograms:a}}function y(t){const e=[];for(let r=0;r<t.length;r++){const{min:n,max:o,size:i,counts:s}=t[r];let a=0,l=0;for(let t=0;t<i;t++)a+=s[t],l+=t*s[t];const u=l/a;let c=0;for(let t=0;t<i;t++)c+=s[t]*(t-u)**2;const h=(o-n)/i,f=(u+.5)*h+n,p=Math.sqrt(c/(a-1))*h;e.push({min:n,max:o,avg:f,stddev:p})}return e}function w(t,e){const{pixelBlock:r,bandIds:o,returnHistogramLut:a,rasterInfo:l}=e;let u=null,h=null,f=t.stretchType;if("number"==typeof f&&(f=s.x[f]),t.dra)if("minMax"===f&&r?.statistics)u=r.statistics.map((t=>[t.minValue,t.maxValue,0,0]));else{const t=g(r);u=null!=t?t.statistics:null,h=null!=t?t.histograms:null}else u=t.statistics?.length?t.statistics:l.statistics,h="histograms"in t?t.histograms:void 0,h||(h=l.histograms);"percentClip"!==f&&"histogramEqualization"!==f||h?.length||(f="minMax");const p=u?.length||h?.length||l.bandCount,d=[],m=[];u&&!Array.isArray(u[0])&&(u=u.map((t=>[t.min,t.max,t.avg,t.stddev])));const[y,w]=(0,i.hP)(l.pixelType);if(!u?.length){u=[];for(let t=0;t<p;t++)u.push([y,w,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(let t=0;t<p;t++)d[t]=y,m[t]=w;break;case"minMax":for(let t=0;t<p;t++){const e=u[t];d[t]=e[0],m[t]=e[1]}break;case"standardDeviation":{const{numberOfStandardDeviations:e=2}=t;for(let t=0;t<p;t++){const r=u[t];d[t]=r[2]-e*r[3],m[t]=r[2]+e*r[3],d[t]<r[0]&&(d[t]=r[0]),m[t]>r[1]&&(m[t]=r[1])}}break;case"histogramEqualization":(0,n.Lw)(h);for(let t=0;t<p;t++)d[t]=h[t].min,m[t]=h[t].max;break;case"percentClip":(0,n.Lw)(h);for(let e=0;e<h.length;e++){const r=h[e],n=new Uint32Array(r.size),o=[...r.counts];o.length>=20&&(o[0]=o[1]=o[2]=o[o.length-1]=o[o.length-2]=0);let i=0;const s=(r.max-r.min)/r.size,a=-.5===r.min&&1===s?.5:0;for(let t=0;t<r.size;t++)i+=o[t],n[t]=i;let l=(t.minPercent||0)*i/100;d[e]=r.min+a;for(let t=0;t<r.size;t++)if(n[t]>l){d[e]=r.min+s*(t+a);break}l=(1-(t.maxPercent||0)/100)*i,m[e]=r.max+a;for(let t=r.size-2;t>=0;t--)if(n[t]<l){m[e]=r.min+s*(t+2-a);break}if(m[e]<d[e]){const t=d[e];d[e]=m[e],m[e]=t}}break;default:for(let t=0;t<p;t++){const e=u[t];d[t]=e[0],m[t]=e[1]}}let b,C,v;return"histogramEqualization"===f?((0,n.Lw)(h),C=h[0].size||256,b=0,a&&(v=h.map((t=>c(t))))):(C=t.max||255,b=t.min||0),function(t,e){if(null==e||0===e.length)return t;const r=Math.max.apply(null,e),{minCutOff:n,maxCutOff:o,minOutput:i,maxOutput:s,histogramLut:a}=t;return n.length===e.length||n.length<=r?t:{minCutOff:e.map((t=>n[t])),maxCutOff:e.map((t=>o[t])),histogramLut:a?e.map((t=>a[t])):null,minOutput:i,maxOutput:s}}({minCutOff:d,maxCutOff:m,maxOutput:C,minOutput:b,histogramLut:v},o)}function b(t,e){const r=new Float32Array(t);for(let n=0;n<t;n++)e[n]>1?e[n]>2?r[n]=6.5+(e[n]-2)**2.5:r[n]=6.5+100*(2-e[n])**4:r[n]=1;return r}function C(t,e){if(!t?.pixels?.length)return t;const{mask:r,bandMasks:n,width:i,height:s,pixels:a}=t,{minCutOff:l,maxCutOff:u,minOutput:c,maxOutput:h,gamma:f}=e,p=i*s,d=e.outputPixelType||"u8",m=t.pixels.map((()=>o.A.createEmptyBand(d,p))),g=m.length,y=h-c,w=[],C=[];for(let t=0;t<g;t++)C[t]=u[t]-l[t],w[t]=0===C[t]?0:y/C[t];const v=d.startsWith("u")||d.startsWith("s"),x=f&&f.length>=g,A=!!e.isRenderer;if(x){const t=b(g,f);for(let e=0;e<g;e++){const o=n?.[e]??r;for(let r=0;r<p;r++)if(null==o||o[r]){if(0===C[e]){m[e][r]=c;continue}const n=a[e][r],o=(n-l[e])/C[e];let i=1;if(f[e]>1&&(i-=(1/y)**(o*t[e])),n<u[e]&&n>l[e]){const t=i*y*o**(1/f[e])+c;m[e][r]=A?Math.floor(t):v?Math.round(t):t}else n>=u[e]?m[e][r]=h:m[e][r]=c}}}else for(let t=0;t<g;t++){const e=n?.[t]??r;for(let r=0;r<p;r++)if(null==e||e[r]){const e=a[t][r];if(e<u[t]&&e>l[t]){const n=(e-l[t])*w[t]+c;m[t][r]=A?Math.floor(n):v?Math.round(n):n}else e>=u[t]?m[t][r]=h:m[t][r]=c}}const k=new o.A({width:i,height:s,mask:r,bandMasks:n,pixels:m,pixelType:d});return k.updateStatistics(),k}},11053:(t,e,r)=>{r.d(e,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},12196:(t,e,r)=>{r.d(e,{NB:()=>n,RR:()=>a,YC:()=>i,kq:()=>s});const n=(()=>{const t=[];return t[254]="NEWSUBFILETYPE",t[255]="SUBFILETYPE",t[256]="IMAGEWIDTH",t[257]="IMAGELENGTH",t[258]="BITSPERSAMPLE",t[259]="COMPRESSION",t[262]="PHOTOMETRICINTERPRETATION",t[263]="THRESHHOLDING",t[264]="CELLWIDTH",t[265]="CELLLENGTH",t[266]="FILLORDER",t[269]="DOCUMENTNAME",t[270]="IMAGEDESCRIPTION",t[271]="MAKE",t[272]="MODEL",t[273]="STRIPOFFSETS",t[274]="ORIENTATION",t[277]="SAMPLESPERPIXEL",t[278]="ROWSPERSTRIP",t[279]="STRIPBYTECOUNTS",t[280]="MINSAMPLEVALUE",t[281]="MAXSAMPLEVALUE",t[282]="XRESOLUTION",t[283]="YRESOLUTION",t[284]="PLANARCONFIGURATION",t[285]="PAGENAME",t[286]="XPOSITION",t[287]="YPOSITION",t[288]="FREEOFFSETS",t[289]="FREEBYTECOUNTS",t[290]="GRAYRESPONSEUNIT",t[291]="GRAYRESPONSECURVE",t[292]="T4OPTIONS",t[293]="T6OPTIONS",t[296]="RESOLUTIONUNIT",t[297]="PAGENUMBER",t[300]="COLORRESPONSEUNIT",t[301]="TRANSFERFUNCTION",t[305]="SOFTWARE",t[306]="DATETIME",t[315]="ARTIST",t[316]="HOSTCOMPUTER",t[317]="PREDICTOR",t[318]="WHITEPOINT",t[319]="PRIMARYCHROMATICITIES",t[320]="COLORMAP",t[321]="HALFTONEHINTS",t[322]="TILEWIDTH",t[323]="TILELENGTH",t[324]="TILEOFFSETS",t[325]="TILEBYTECOUNTS",t[326]="BADFAXLINES",t[327]="CLEANFAXDATA",t[328]="CONSECUTIVEBADFAXLINES",t[330]="SUBIFD",t[332]="INKSET",t[333]="INKNAMES",t[334]="NUMBEROFINKS",t[336]="DOTRANGE",t[337]="TARGETPRINTER",t[338]="EXTRASAMPLES",t[339]="SAMPLEFORMAT",t[340]="SMINSAMPLEVALUE",t[341]="SMAXSAMPLEVALUE",t[342]="TRANSFERRANGE",t[347]="JPEGTABLES",t[512]="JPEGPROC",t[513]="JPEGIFOFFSET",t[514]="JPEGIFBYTECOUNT",t[515]="JPEGRESTARTINTERVAL",t[517]="JPEGLOSSLESSPREDICTORS",t[518]="JPEGPOINTTRANSFORM",t[519]="JPEGQTABLES",t[520]="JPEGDCTABLES",t[521]="JPEGACTABLES",t[529]="YCBCRCOEFFICIENTS",t[530]="YCBCRSUBSAMPLING",t[531]="YCBCRPOSITIONING",t[532]="REFERENCEBLACKWHITE",t[700]="XMP",t[33550]="GEOPIXELSCALE",t[33922]="GEOTIEPOINTS",t[33432]="COPYRIGHT",t[42112]="GDAL_METADATA",t[42113]="GDAL_NODATA",t[50844]="RPCCOEFFICIENT",t[34264]="GEOTRANSMATRIX",t[34735]="GEOKEYDIRECTORY",t[34736]="GEODOUBLEPARAMS",t[34737]="GEOASCIIPARAMS",t[34665]="EXIFIFD",t[34853]="GPSIFD",t[40965]="INTEROPERABILITYIFD",t})(),o=(()=>{const t=n.slice();return t[36864]="ExifVersion",t[40960]="FlashpixVersion",t[40961]="ColorSpace",t[42240]="Gamma",t[37121]="ComponentsConfiguration",t[37122]="CompressedBitsPerPixel",t[40962]="PixelXDimension",t[40963]="PixelYDimension",t[37500]="MakerNote",t[37510]="UserComment",t[40964]="RelatedSoundFile",t[36867]="DateTimeOriginal",t[36868]="DateTimeDigitized",t[36880]="OffsetTime",t[36881]="OffsetTimeOriginal",t[36882]="OffsetTimeDigitized",t[37520]="SubSecTime",t[37521]="SubSecTimeOriginal",t[37522]="SubSecTimeDigitized",t[37888]="Temperature",t[37889]="Humidity",t[37890]="Pressure",t[37891]="WaterDepth",t[37892]="Acceleration",t[37893]="CameraElevationAngle",t[42016]="ImageUniqueID",t[42032]="CameraOwnerName",t[42033]="BodySerialNumber",t[42034]="LensSpecification",t[42035]="LensMake",t[42036]="LensModel",t[42037]="LensSerialNumber",t[33434]="ExposureTime",t[33437]="FNumber",t[34850]="ExposureProgram",t[34852]="SpectralSensitivity",t[34855]="PhotographicSensitivity",t[34856]="OECF",t[34864]="SensitivityType",t[34865]="StandardOutputSensitivity",t[34866]="RecommendedExposureIndex",t[34867]="ISOSpeed",t[34868]="ISOSpeedLatitudeyyy",t[34869]="ISOSpeedLatitudezzz",t[37377]="ShutterSpeedValue",t[37378]="ApertureValue",t[37379]="BrightnessValue",t[37380]="ExposureBiasValue",t[37381]="MaxApertureValue",t[37382]="SubjectDistance",t[37383]="MeteringMode",t[37384]="LightSource",t[37385]="Flash",t[37386]="FocalLength",t[37396]="SubjectArea",t[41483]="FlashEnergy",t[41484]="SpatialFrequencyResponse",t[41486]="FocalPlaneXResolution",t[41487]="FocalPlaneYResolution",t[41488]="FocalPlaneResolutionUnit",t[41492]="SubjectLocation",t[41493]="ExposureIndex",t[41495]="SensingMethod",t[41728]="FileSource",t[41729]="SceneType",t[41730]="CFAPattern",t[41985]="CustomRendered",t[41986]="ExposureMode",t[41987]="WhiteBalance",t[41988]="DigitalZoomRatio",t[41989]="FocalLengthIn35mmFilm",t[41990]="SceneCaptureType",t[41991]="GainControl",t[41992]="Contrast",t[41993]="Saturation",t[41994]="Sharpness",t[41995]="DeviceSettingDescription",t[41996]="SubjectDistanceRange",t})(),i=(()=>{const t=[];return t[1024]="GTModelTypeGeoKey",t[1025]="GTRasterTypeGeoKey",t[1026]="GTCitationGeoKey",t[2048]="GeographicTypeGeoKey",t[2049]="GeogCitationGeoKey",t[2050]="GeogGeodeticDatumGeoKey",t[2051]="GeogPrimeMeridianGeoKey",t[2052]="GeogLinearUnitsGeoKey",t[2053]="GeogLinearUnitSizeGeoKey",t[2054]="GeogAngularUnitsGeoKey",t[2055]="GeogAngularUnitSizeGeoKey",t[2056]="GeogEllipsoidGeoKey",t[2057]="GeogSemiMajorAxisGeoKey",t[2058]="GeogSemiMinorAxisGeoKey",t[2059]="GeogInvFlatteningGeoKey",t[2061]="GeogPrimeMeridianLongGeoKey",t[2060]="GeogAzimuthUnitsGeoKey",t[3072]="ProjectedCSTypeGeoKey",t[3073]="PCSCitationGeoKey",t[3074]="ProjectionGeoKey",t[3075]="ProjCoordTransGeoKey",t[3076]="ProjLinearUnitsGeoKey",t[3077]="ProjLinearUnitSizeGeoKey",t[3078]="ProjStdParallel1GeoKey",t[3079]="ProjStdParallel2GeoKey",t[3080]="ProjNatOriginLongGeoKey",t[3081]="ProjNatOriginLatGeoKey",t[3082]="ProjFalseEastingGeoKey",t[3083]="ProjFalseNorthingGeoKey",t[3084]="ProjFalseOriginLongGeoKey",t[3085]="ProjFalseOriginLatGeoKey",t[3086]="ProjFalseOriginEastingGeoKey",t[3087]="ProjFalseOriginNorthingGeoKey",t[3088]="ProjCenterLongGeoKey",t[3090]="ProjCenterEastingGeoKey",t[3091]="ProjCenterNorthingGeoKey",t[3092]="ProjScaleAtNatOriginGeoKey",t[3093]="ProjScaleAtCenterGeoKey",t[3094]="ProjAzimuthAngleGeoKey",t[3095]="ProjStraightVertPoleLongGeoKey",t[4096]="VerticalCSTypeGeoKey",t[4097]="VerticalCitationGeoKey",t[4098]="VerticalDatumGeoKey",t[4099]="VerticalUnitsGeoKey",t})(),s=(t,e)=>{let r=(e||n)[t];return void 0===r&&(r="unknown"+String(t)),r},a=new Map([["EXIFIFD",o],["GPSIFD",["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"]]])},13868:(t,e,r)=>{r.d(e,{SZ:()=>o,e8:()=>s,hm:()=>i});var n=r(66552);const o=(0,n.O)()({RSP_NearestNeighbor:"nearest",RSP_BilinearInterpolation:"bilinear",RSP_CubicConvolution:"cubic",RSP_Majority:"majority"}),i=(0,n.O)()({esriNoDataMatchAny:"any",esriNoDataMatchAll:"all"}),s=(0,n.O)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"})},14140:(t,e,r)=>{r.d(e,{A:()=>d});var n,o=r(90237),i=r(49186),s=r(25482),a=r(4718),l=r(53966),u=r(10107),c=r(79901),h=r(40608),f=r(4151),p=r(16019);let d=n=class extends s.A{static createEmptyBand(t,e){return new(n.getPixelArrayConstructor(t))(e)}static combineBandMasks(t){if(t.length<2)return t[0];const e=t[0].length,r=new Uint8Array(e).fill(255);for(let n=0;n<t.length;n++){const o=t[n];for(let t=0;t<e;t++)o[t]||(r[t]=0)}return r}static getPixelArrayConstructor(t){let e;switch(t){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":e=Float32Array;break;case"f64":e=Float64Array}return e}constructor(t){super(t),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(t){if(!t)return"f32";let e=t.toLowerCase();return["u1","u2","u4"].includes(e)?e="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(e)||(e="f32"),e}getPlaneCount(){return this.pixels?.length}addData(t){if(!t.pixels||t.pixels.length!==this.width*this.height)throw new i.A("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(t.pixels),this.statistics.push(t.statistics??new f.z)}getAsRGBA(){const t=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(t);break;default:this._fillFrom8Bit(t)}return new Uint8ClampedArray(t)}getAsRGBAFloat(){const t=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(t),t}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((t=>function(t,e){let r=1/0,n=-1/0;const o=t.length;let i,s=0;if(null!=e)for(i=0;i<o;i++)e[i]&&(s=t[i],r=s<r?s:r,n=s>n?s:n);else for(i=0;i<o;i++)s=t[i],r=s<r?s:r,n=s>n?s:n;return new f.z(r,n)}(t,this.mask)));const t=this.mask;let e=0;if(null!=t)for(let r=0;r<t.length;r++)t[r]&&e++;else e=this.width*this.height;this.validPixelCount=e}clamp(t){if(!t||"f64"===t||"f32"===t||!this.pixels)return;const[e,r]=(0,p.hP)(t),o=this.pixels,i=this.width*this.height,s=o.length;let a,l,u;const c=[];for(let h=0;h<s;h++){u=n.createEmptyBand(t,i),a=o[h];for(let t=0;t<i;t++)l=a[t],u[t]=l>r?r:l<e?e:l;c.push(u)}this.pixels=c,this.pixelType=t}extractBands(t){const{pixels:e,statistics:r}=this;if(null==t||0===t.length||!e||0===e.length)return this;const o=e.length,i=t.some((t=>t>=e.length)),s=o===t.length&&!t.some(((t,e)=>t!==e));if(i||s)return this;const a=this.bandMasks?.length===o?t.map((t=>this.bandMasks[t])):void 0;let{mask:l,validPixelCount:u}=this;const{width:c,height:h}=this;return a?.length&&(l=n.combineBandMasks(a),u=l.filter((t=>!!t)).length),new n({pixelType:this.pixelType,width:c,height:h,mask:l,bandMasks:a,validPixelCount:u,maskIsAlpha:this.maskIsAlpha,pixels:t.map((t=>e[t])),statistics:r&&t.map((t=>r[t]))})}clone(){const t=new n({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let e;null!=this.mask&&(t.mask=new Uint8Array(this.mask)),this.bandMasks&&(t.bandMasks=this.bandMasks.map((t=>new Uint8Array(t))));const r=n.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){t.pixels=[];const n=!!this.pixels[0].slice;for(e=0;e<this.pixels.length;e++)t.pixels[e]=n?this.pixels[e].slice():new r(this.pixels[e])}if(this.statistics)for(t.statistics=[],e=0;e<this.statistics.length;e++)t.statistics[e]=(0,a.o8)(this.statistics[e]);return t.premultiplyAlpha=this.premultiplyAlpha,t}_fillFrom8Bit(t){const{mask:e,maskIsAlpha:r,premultiplyAlpha:n,pixels:o}=this;if(!t||!o?.length)return void l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,a,u;i=s=a=o[0],o.length>=3?(s=o[1],a=o[2]):2===o.length&&(s=o[1]);const c=new Uint32Array(t),h=this.width*this.height;if(i.length===h)if(null!=e&&e.length===h)if(r)for(u=0;u<h;u++){const t=e[u];if(t){const e=t/255;c[u]=n?t<<24|a[u]*e<<16|s[u]*e<<8|i[u]*e:t<<24|a[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<h;u++)e[u]&&(c[u]=255<<24|a[u]<<16|s[u]<<8|i[u]);else for(u=0;u<h;u++)c[u]=255<<24|a[u]<<16|s[u]<<8|i[u];else l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(t){const{pixels:e,mask:r,statistics:n}=this;if(!t||!e?.length)return void l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const o=this.pixelType;let i=1,s=0,a=1;if(n&&n.length>0){for(const t of n)if(null!=t.minValue&&(s=Math.min(s,t.minValue)),null!=t.maxValue&&null!=t.minValue){const e=t.maxValue-t.minValue;a=Math.max(a,e)}i=255/a}else{let t=255;"s8"===o?(s=-128,t=127):"u16"===o?t=65535:"s16"===o?(s=-32768,t=32767):"u32"===o?t=4294967295:"s32"===o?(s=-2147483648,t=2147483647):"f32"===o?(s=-34e38,t=34e38):"f64"===o&&(s=-Number.MAX_VALUE,t=Number.MAX_VALUE),i=255/(t-s)}const u=new Uint32Array(t),c=this.width*this.height;let h,f,p,d,m;if(h=f=p=e[0],h.length!==c)return l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(e.length>=2)if(f=e[1],e.length>=3&&(p=e[2]),null!=r&&r.length===c)for(d=0;d<c;d++)r[d]&&(u[d]=255<<24|(p[d]-s)*i<<16|(f[d]-s)*i<<8|(h[d]-s)*i);else for(d=0;d<c;d++)u[d]=255<<24|(p[d]-s)*i<<16|(f[d]-s)*i<<8|(h[d]-s)*i;else if(null!=r&&r.length===c)for(d=0;d<c;d++)m=(h[d]-s)*i,r[d]&&(u[d]=255<<24|m<<16|m<<8|m);else for(d=0;d<c;d++)m=(h[d]-s)*i,u[d]=255<<24|m<<16|m<<8|m}_fillFrom32Bit(t){const{pixels:e,mask:r}=this;if(!t||!e?.length)return l.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let n,o,i,s;n=o=i=e[0],e.length>=3?(o=e[1],i=e[2]):2===e.length&&(o=e[1]);const a=this.width*this.height;if(n.length!==a)return l.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=r&&r.length===a)for(s=0;s<a;s++)t[u++]=n[s],t[u++]=o[s],t[u++]=i[s],t[u++]=1&r[s];else for(s=0;s<a;s++)t[u++]=n[s],t[u++]=o[s],t[u++]=i[s],t[u++]=1}};(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"width",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"height",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"pixelType",void 0),(0,o._)([(0,c.w)("pixelType")],d.prototype,"castPixelType",null),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"validPixelCount",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"mask",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"maskIsAlpha",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"pixels",void 0),(0,o._)([(0,u.MZ)()],d.prototype,"premultiplyAlpha",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"statistics",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"depthCount",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"noDataValues",void 0),(0,o._)([(0,u.MZ)({json:{write:!0}})],d.prototype,"bandMasks",void 0),d=n=(0,o._)([(0,h.$)("esri.layers.support.PixelBlock")],d)},14636:(t,e,r)=>{r.d(e,{FI:()=>d,KL:()=>u,Lu:()=>h,MD:()=>l,Rn:()=>m,Y2:()=>p});var n=r(66552),o=r(14140),i=r(28435);const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const a=180/Math.PI,l=new n.J({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(t,e){return s.get(t)/s.get(e)||1}function c(t){return(450-t)%360}function h(t,e="geographic"){const[r,n]=t,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r)*a;return i=(360+i)%360,"geographic"===e&&(i=c(i)),[o,i]}function f(t,e="geographic"){let r=t[1];"geographic"===e&&(r=c(r)),r%=360;const n=t[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function p(t,e,r,n="geographic"){if(!(0,i.AB)(t)||null==r)return t;const o="vector-magdir"===e?t.clone():d(t,e),s=o.pixels[1];for(let t=0;t<s.length;t++)s[t]="geographic"===n?(s[t]+r[t]+270)%360:(s[t]+360-r[t])%360;return"vector-magdir"===e?o:d(o,"vector-magdir")}function d(t,e,r="geographic",n=1){if(!(0,i.AB)(t))return t;const{pixels:s,width:a,height:l}=t,u=a*l,c=s[0],p=s[1],d=t.pixelType.startsWith("f")?t.pixelType:"f32",m=o.A.createEmptyBand(d,u),g=o.A.createEmptyBand(d,u);let y=0;for(let t=0;t<l;t++)for(let t=0;t<a;t++)"vector-uv"===e?([m[y],g[y]]=h([c[y],p[y]],r),m[y]*=n):([m[y],g[y]]=f([c[y],p[y]],r),m[y]*=n,g[y]*=n),y++;const w=new o.A({pixelType:d,width:t.width,height:t.height,mask:t.mask,validPixelCount:t.validPixelCount,maskIsAlpha:t.maskIsAlpha,pixels:[m,g]});return w.updateStatistics(),w}function m(t,e,r=1){if(1===r||!(0,i.AB)(t))return t;const n=t.clone(),{pixels:o,width:s,height:a}=n,l=o[0],u=o[1];let c=0;for(let t=0;t<a;t++)for(let t=0;t<s;t++)"vector-uv"===e?(l[c]*=r,u[c]*=r):l[c]*=r,c++;return n.updateStatistics(),n}function g(t,e,r,n=1){const o=Math.sqrt(t*t+e*e)/n,i=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[o,(2*Math.PI+i-r)%(2*Math.PI)]}!function(t=0,e=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));const o=n?-1:1,i=13*o,s=-7*o,a=-2*o,l=-16*o,u=21.75,[c,h]=g(0,e+i,r,u),[f,p]=g(t-5.5,e+s,r,u),[d,m]=g(t+5.5,e+s,r,u),[y,w]=g(t-1.5,e+a,r,u),[b,C]=g(t+1.5,e+a,r,u),[v,x]=g(t-1.5,e+l,r,u),[A,k]=g(t+1.5,e+l,r,u)}(0,0,0)},15265:(t,e,r)=>{function n(t,e){let r=0,n="",o=0,i=0;const s=t.length;for(;r<s;)i=t[r++],o=i>>4,o<8?o=1:15===o?(o=4,i=(7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++]):14===o?(o=3,i=(15&i)<<12|(63&t[r++])<<6|63&t[r++]):(o=2,i=(31&i)<<6|63&t[r++]),(0!==i||e)&&(n+=String.fromCharCode(i));return n}r.d(e,{w:()=>n})},16019:(t,e,r)=>{r.d(e,{$p:()=>c,Sp:()=>h,X1:()=>a,hP:()=>s,yM:()=>u,zw:()=>l});const n=9999999e31,o=2e-7,i={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function s(t){return i[t]??[-34028234663852886e22,34028234663852886e22]}function a(t,e){return null==t||null==e?"s32":t<0?t>=-128&&e<128?"s8":t>=-32768&&e<32768?"s16":"s32":e<256?"u8":e<65536?"u16":"u32"}function l(t){return(t?.startsWith("s")||t?.startsWith("u"))??!1}function u(t,e,r,n){let[o,i]=s(r);const a=l(r);return a&&(o-=1e-5,i+=1e-5),a?r.startsWith("u")?function(t,e,r,n){const[o,i]=n;for(let n=0;n<e.length;n++)if(e[n]){const s=t[n];s<o||s>i?e[n]=0:r[n]=s+.5|0}}(t,e,n,[o,i]):function(t,e,r,n){const[o,i]=n;for(let n=0;n<e.length;n++)if(e[n]){const s=t[n];s<o||s>i?e[n]=0:r[n]=s+(s>0?.5:-.5)|0}}(t,e,n,[o,i]):function(t,e,r,n){const[o,i]=n;for(let n=0;n<e.length;n++)if(e[n]){const s=t[n];s<o||s>i?e[n]=0:r[n]=s}}(t,e,n,[o,i])}function c(t,e){for(let r=0;r<e.length;r++)e[r]&&isNaN(t[r])&&(e[r]=0,t[r]=0)}function h(t,e,r){if(t.depthCount&&t.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=t,u=i[0].length,c=t.bandMasks??[],h=t.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,p=s(l);let d=!1;for(let t=0;t<i.length;t++){const s="number"==typeof e?e:e[t];if(null==s)continue;const u=a?.[t]?.minValue??p[0],m=a?.[t]?.maxValue??p[1];if(u>s+Number.EPSILON||m<s-Number.EPSILON)continue;const g=c[t]||h.slice(),y=i[t],w=r?.customFloatTolerance;if(f&&0!==w){let t=w;t||(t=Math.abs(s)>=n?o*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let e=0;e<y.length;e++)g[e]&&Math.abs(y[e]-s)<t&&(y[e]=0,g[e]=0,h[e]=0,d=!0)}else for(let t=0;t<y.length;t++)g[t]&&y[t]===s&&(y[t]=0,g[t]=0,h[t]=0,d=!0);c[t]=g}if(d){const e=t.bandMasks||t.pixels.length>1?c:null;r?.matchAllNoData?t.mask=e&&e.length>1?function(t){if(t.length<2)return t[0];const e=t[0].length,r=new Uint8Array(e).fill(0);for(let n=0;n<t.length;n++){const o=t[n];for(let t=0;t<e;t++)o[t]&&(r[t]=255)}return r}(e):h:(t.bandMasks=e,t.mask=h)}d&&"updateStatistics"in t&&t.updateStatistics()}},20223:(t,e,r)=>{r.d(e,{A:()=>c});var n,o=r(90237),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(40608)),u=r(86738);let c=n=class extends i.A{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isBsqTile=!1,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.o8)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.o8)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.o8)(this.tileInfo),transposeInfo:(0,s.o8)(this.transposeInfo),blockBoundary:(0,s.o8)(this.blockBoundary)})}};(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],c.prototype,"origin",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"isBsqTile",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,o._)([(0,a.MZ)()],c.prototype,"transposeInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"blockBoundary",void 0),c=n=(0,o._)([(0,l.$)("esri.layers.support.RasterStorageInfo")],c)},28435:(t,e,r)=>{r.d(e,{$Q:()=>L,$i:()=>G,AB:()=>c,Ew:()=>w,Hx:()=>g,IB:()=>n,J$:()=>O,QF:()=>N,UK:()=>m,Wb:()=>o,Wt:()=>k,Wy:()=>h,XU:()=>A,bL:()=>y,dK:()=>x,eH:()=>d,et:()=>u,lD:()=>D,qL:()=>p,z$:()=>T,z7:()=>S,zg:()=>f});var n,o,i,s=r(34727),a=r(14140),l=r(16019);(i=n||(n={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(t){t[t.bestMatch=0]="bestMatch",t[t.fail=1]="fail"}(o||(o={}));const u=9;function c(t){return null!=t&&t.pixels?.length>0}function h(t){if(!t?.length||t.some((t=>!c(t))))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:r,height:n,pixelType:o}=e[0];if(e.some((t=>t.width!==r||t.height!==n)))return null;const i=e.map((({mask:t})=>t)).filter((t=>null!=t));let s=null;i.length&&(s=new Uint8Array(r*n),s.set(i[0]),i.length>1&&v(i.slice(1),s));const l=[];e.forEach((({pixels:t})=>l.push(...t)));const u=e.map((({statistics:t})=>t)).filter((t=>t?.length)),h=[];return u.forEach((t=>h.push(...t))),new a.A({pixelType:o,width:r,height:n,mask:s,pixels:l,statistics:h.length?h:null})}function f(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const r=e.sort(((t,e)=>t[0]-e[0])),n=r[0][0]<0?r[0][0]:0,o=Math.max(256,r[r.length-1][0]-n+1),i=new Uint8Array(4*o),s=[],a=5===r[0].length;if(o>65536)return r.forEach((t=>{s[t[0]-n]=a?t.slice(1):t.slice(1).concat([255])})),{indexed2DColormap:s,offset:n,alphaSpecified:a};if(t.fillUnspecified){let t=r[0];for(let e=t[0]-n,s=0;e<o;e++)i[4*e]=t[1],i[4*e+1]=t[2],i[4*e+2]=t[3],i[4*e+3]=a?t[4]:255,e===t[0]-n&&(t=s===r.length-1?t:r[++s])}else for(let t=0;t<r.length;t++){const e=r[t],o=4*(e[0]-n);i[o]=e[1],i[o+1]=e[2],i[o+2]=e[3],i[o+3]=a?e[4]:255}return{indexedColormap:i,offset:n,alphaSpecified:a}}function p(t,e){if(!c(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const r=t.clone(),n=r.pixels;let o=r.mask;const i=r.width*r.height;if(1!==n.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:u}=e,h=n[0],f=new Uint8Array(h.length),p=new Uint8Array(h.length),d=new Uint8Array(h.length);let m,g=0;if(s){const t=s.length-1;if(null!=o)for(let e=0;e<i;e++)o[e]&&(g=4*(h[e]-l),g<l||g>t?o[e]=0:(f[e]=s[g],p[e]=s[g+1],d[e]=s[g+2],o[e]=s[g+3]));else{o=new Uint8Array(i);for(let e=0;e<i;e++)g=4*(h[e]-l),g<l||g>t?o[e]=0:(f[e]=s[g],p[e]=s[g+1],d[e]=s[g+2],o[e]=s[g+3]);r.mask=o}}else if(a)if(null!=o)for(let t=0;t<i;t++)o[t]&&(m=a[h[t]],f[t]=m[0],p[t]=m[1],d[t]=m[2],o[t]=m[3]);else{o=new Uint8Array(i);for(let t=0;t<i;t++)m=a[h[t]],f[t]=m[0],p[t]=m[1],d[t]=m[2],o[t]=m[3];r.mask=o}return r.pixels=[f,p,d],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=u,r}function d(t,e){if(!c(t))return null;const{pixels:r,mask:n}=t,o=r.length;let i=e.lut;const{offset:s}=e;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],u=e.outputPixelType||"u8";for(let t=0;t<o;t++){const e=m(r[t],n,i[t],s||0,u);l.push(e)}const h=new a.A({width:t.width,height:t.height,pixels:l,mask:n,pixelType:u});return h.updateStatistics(),h}function m(t,e,r,n,o){const i=t.length,s=a.A.createEmptyBand(o,i);if(e)for(let o=0;o<i;o++)e[o]&&(s[o]=r[t[o]-n]);else for(let e=0;e<i;e++)s[e]=r[t[e]-n];return s}function g(t,e){if(!c(t))return null;const r=t.clone(),{pixels:n}=r,o=r.width*r.height,i=e.length,s=Math.floor(i/2),a=e[Math.floor(s)],l=n[0],u=new Uint8Array(o),h=new Uint8Array(o),f=new Uint8Array(o);let p=r.mask;const d=4===e[0].mappedColor.length;p||(p=new Uint8Array(o),p.fill(d?255:1),r.mask=p);for(let t=0;t<o;t++)if(p[t]){const r=l[t];let n=!1,o=s,c=a,d=0,m=i-1;for(;m-d>1;){if(r===c.value){n=!0;break}r>c.value?d=o:m=o,o=Math.floor((d+m)/2),c=e[Math.floor(o)]}n||(r===e[d].value?(c=e[d],n=!0):r===e[m].value?(c=e[m],n=!0):r<e[d].value?n=!1:r>e[d].value&&(r<e[m].value?(c=e[d],n=!0):m===i-1?n=!1:(c=e[m],n=!0))),n?(u[t]=c.mappedColor[0],h[t]=c.mappedColor[1],f[t]=c.mappedColor[2],p[t]=c.mappedColor[3]):u[t]=h[t]=f[t]=p[t]=0}return r.pixels=[u,h,f],r.mask=p,r.pixelType="u8",r.maskIsAlpha=d,r}function y(t,e,r=!1){const n=1e-5,o=new Float32Array(3*u),i=e.length;for(let a=0;a<u;a++)o[3*a]=t[2*a]??s.pq-1,o[3*a+1]=t[2*a+1]??s.pq,o[3*a+2]=e[a]??0,a<i&&(a>0&&(o[3*a]-=n),(a<i-1||!r)&&(o[3*a+1]-=n));return o}function w(t,e){if(!c(t))return null;const{width:r,height:n}=t,{inputRanges:o,outputValues:i,outputPixelType:s,noDataRanges:u,allowUnmatched:h,replacementValue:f,isLastInputRangeInclusive:p}=e,d=t.pixels[0],m=a.A.createEmptyBand(s,d.length),g=t.mask,y=new Uint8Array(r*n);g?y.set(g):y.fill(255);const w=t.pixelType.startsWith("f")?1e-6:0,b=o.map((t=>t-w));b[0]=o[0],b[b.length-1]=o[o.length-1]+(p?1e-6:0);const C=o.length/2,[v,x]=(0,l.hP)(s);for(let t=0;t<n;t++)for(let e=0;e<r;e++){const n=t*r+e;if(y[n]){const t=d[n];let e=!1;for(let r=C-1;r>=0;r--)if(t===b[2*r]||t>b[2*r]&&t<b[2*r+1]){m[n]=i[r],e=!0;break}e||(h?m[n]=t>x?x:t<v?v:f??t:y[n]=0)}}const A=u?.length;if(A)for(let t=0;t<n;t++)for(let e=0;e<r;e++){const n=t*r+e;if(!g||g[n]){const t=d[n];for(let e=0;e<A;e+=2)if(t>=u[e]&&t<=u[e+1]){m[n]=0,y[n]=0;break}}}return new a.A({width:r,height:n,pixelType:s,pixels:[m],mask:y})}function b(t,e,r,n){const o=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!e?.length;for(let r=0;r<t.length;r++)if(n[r]){const a=t[r];if(s){let t=!1;for(let r=0;r<e.length;r+=2)if(a>=e[r]&&a<=e[r+1]){t=!0;break}t||(n[r]=0)}n[r]&&(a===i||o?.has(a))&&(n[r]=0)}}function C(t,e){const r=t[0].length;for(let n=0;n<r;n++)if(e[n]){let r=!1;for(let e=0;e<t.length;e++)if(t[e][n]){r=!0;break}r||(e[n]=0)}}function v(t,e){const r=t[0].length;for(let n=0;n<r;n++)if(e[n]){let r=!1;for(let e=0;e<t.length;e++)if(0===t[e][n]){r=!0;break}r&&(e[n]=0)}}function x(t,e){if(!c(t))return null;const{width:r,height:n,pixels:o}=t,i=r*n,s=new Uint8Array(i);t.mask?s.set(t.mask):s.fill(255);const l=o.length,{includedRanges:u,noDataValues:h,outputPixelType:f,matchAll:p,lookups:d}=e;if(d){const t=[];for(let e=0;e<l;e++){const r=d[e],n=m(o[e],s,r.lut,r.offset||0,"u8");t.push(n)}1===t.length?s.set(t[0]):p?C(t,s):v(t,s)}else if(p){const t=[];for(let e=0;e<l;e++){const r=new Uint8Array(i);r.set(s),b(o[e],u?.slice(2*e,2*e+2),h?.[e],r),t.push(r)}1===t.length?s.set(t[0]):C(t,s)}else for(let t=0;t<l;t++)b(o[t],u?.slice(2*t,2*t+2),h?.[t],s);return new a.A({width:r,height:n,pixelType:f,pixels:o,mask:s})}function A(t){const{srcPixelType:e,inputRanges:r,outputValues:n,allowUnmatched:o,noDataRanges:i,isLastInputRangeInclusive:s,outputPixelType:u}=t;if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const c=e.includes("16")?65536:256,h=e.includes("s")?-c/2:0,f=a.A.createEmptyBand(u,c),p=new Uint8Array(c);o&&p.fill(255);const[d,m]=(0,l.hP)(u);if(r?.length&&n?.length){const t=1e-6,e=r.map((e=>e-t));e[0]=r[0],s&&(e[e.length-1]=r[r.length-1]);for(let t=0;t<e.length;t++){const r=n[t]>m?m:n[t]<d?d:n[t],o=Math.ceil(e[2*t]-h),i=Math.floor(e[2*t+1]-h);for(let t=o;t<=i;t++)f[t]=r,p[t]=255}}if(i?.length)for(let t=0;t<i.length;t++){const e=Math.ceil(i[2*t]-h),r=Math.floor(i[2*t+1]-h);for(let t=e;t<=r;t++)p[t]=0}return{lut:f,offset:h,mask:p}}function k(t,e,r){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const n=t.includes("16")?65536:256,o=t.includes("s")?-n/2:0,i=new Uint8Array(n);if(e)for(let t=0;t<e.length;t++){const r=Math.ceil(e[2*t]-o),n=Math.floor(e[2*t+1]-o);for(let t=r;t<=n;t++)i[t]=255}else i.fill(255);if(r)for(let t=0;t<r.length;t++)i[r[t]-o]=0;return{lut:i,offset:o}}function M(t,e,r,n,o,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:c,height:h}=r.mosaic,f=function(t,e,r,n,o,i,s,a){return{xmin:o<=r*t?0:o<r*t+t?o-r*t:t,ymin:i<=n*e?0:i<n*e+e?i-n*e:e,xmax:o+s<=r*t?0:o+s<r*t+t?o+s-r*t:t,ymax:i+a<=n*e?0:i+a<n*e+e?i+a-n*e:e}}(s,a,n,o,l,u,c,h);let p=0,d=0;if(i){const t=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,e=s*i.resolutionX,r=i.startX+n*e;r<t&&r+e>t?d=i.rightPadding:r>=t&&(p=i.leftMargin-i.rightPadding,d=0)}if(f.xmax-=d,"number"!=typeof e)for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*c+(n*s-l)+p,h=r*s;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e[h+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*c+(n*s-l)+p;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e}}function S(t,e,r={}){const{clipOffset:n,clipSize:o,alignmentInfo:i,blockWidths:s}=r;if(s)return function(t,e,r){const n=t.find((t=>null!=t));if(null==n)return null;const o=t.some((t=>null==t||!!t.mask)),{width:i,height:s}=e,l=o?new Uint8Array(i*s):null,{blockWidths:u}=r,h=[],f=n.getPlaneCount(),p=a.A.getPixelArrayConstructor(n.pixelType);if(o)for(let e=0,r=0;e<t.length;r+=u[e],e++){const n=t[e];if(!c(n))continue;const o=n.mask;for(let t=0;t<s;t++)for(let s=0;s<u[e];s++)l[t*i+s+r]=null==o?255:o[t*n.width+s]}const d=t.some((t=>t?.bandMasks&&t.bandMasks.length>1)),m=d?[]:void 0,g=i*s;for(let e=0;e<f;e++){const r=new p(g),n=d?new Uint8Array(g):void 0;for(let o=0,a=0;o<t.length;a+=u[o],o++){const l=t[o];if(!c(l))continue;const h=l.pixels[e];if(null!=h){for(let t=0;t<s;t++)for(let e=0;e<u[o];e++)r[t*i+e+a]=h[t*l.width+e];if(n){const t=l.bandMasks?.[e]??l.mask;for(let e=0;e<s;e++)for(let r=0;r<u[o];r++)n[e*i+r+a]=t?t[e*l.width+r]:255}}}h.push(r),m&&n&&m.push(n)}const y=new a.A({width:i,height:s,mask:l,bandMasks:m,pixels:h,pixelType:n.pixelType});return y.updateStatistics(),y}(t,e,{blockWidths:s});const l=t.find((t=>c(t)));if(null==l)return null;const u=o?o.width:e.width,h=o?o.height:e.height,f=l.width,p=l.height,d=e.width/f,m=e.height/p,g={offset:n||{x:0,y:0},mosaic:o||e,block:{width:f,height:p}},y=l.pixelType,w=a.A.getPixelArrayConstructor(y),b=l.pixels.length,C=[];let v,x;for(let e=0;e<b;e++){x=new w(u*h);for(let r=0;r<m;r++)for(let n=0;n<d;n++){const o=t[r*d+n];c(o)&&(v=o.pixels[e],M(x,v,g,n,r,i))}C.push(x)}const A=t.some((t=>null==t||null!=t.mask&&t.mask.length>0)),k=t.some((t=>t?.bandMasks&&t.bandMasks.length>1)),S=A?new Uint8Array(u*h):void 0,T=k?[]:void 0;if(S){for(let e=0;e<m;e++)for(let r=0;r<d;r++){const n=t[e*d+r],o=null!=n?n.mask:null;M(S,null!=o?o:n?255:0,g,r,e,i)}if(T)for(let e=0;e<b;e++){const r=new Uint8Array(u*h);for(let n=0;n<m;n++)for(let o=0;o<d;o++){const s=t[n*d+o],a=s?.bandMasks?.[e]??s?.mask;M(r,null!=a?a:s?255:0,g,o,n,i)}T.push(r)}}const I=new a.A({width:u,height:h,pixels:C,pixelType:y,bandMasks:T,mask:S});return I.updateStatistics(),I}function T(t,e,r){if(!c(t))return null;const{width:n,height:o}=t,i=e.x,s=e.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>n||l>o)return t;if(0===i&&0===s&&a===n&&l===o)return t;t.mask||(t.mask=new Uint8Array(n*o));const u=t.mask;for(let t=0;t<o;t++){const e=t*n;for(let r=0;r<n;r++)u[e+r]=t<s||t>=l||r<i||r>=a?0:1}return t.updateStatistics(),t}function I(t){if(!c(t))return null;const e=t.clone(),{width:r,height:n,pixels:o}=t,i=o[0],s=e.pixels[0],a=t.mask;for(let t=2;t<n-1;t++){const e=new Map;for(let n=t-2;n<t+2;n++)for(let t=0;t<4;t++){const o=n*r+t;R(e,i[o],a?a[o]:1)}s[t*r]=P(e),s[t*r+1]=s[t*r+2]=s[t*r];let n=3;for(;n<r-1;n++){let o=(t-2)*r+n+1;R(e,i[o],a?a[o]:1),o=(t-1)*r+n+1,R(e,i[o],a?a[o]:1),o=t*r+n+1,R(e,i[o],a?a[o]:1),o=(t+1)*r+n+1,R(e,i[o],a?a[o]:1),o=(t-2)*r+n-3,E(e,i[o],a?a[o]:1),o=(t-1)*r+n-3,E(e,i[o],a?a[o]:1),o=t*r+n-3,E(e,i[o],a?a[o]:1),o=(t+1)*r+n-3,E(e,i[o],a?a[o]:1),s[t*r+n]=P(e)}s[t*r+n+1]=s[t*r+n]}for(let t=0;t<r;t++)s[t]=s[r+t]=s[2*r+t],s[(n-1)*r+t]=s[(n-2)*r+t];return e.updateStatistics(),e}function P(t){if(0===t.size)return 0;let e=0,r=-1,n=0;const o=t.keys();let i=o.next();for(;!i.done;)n=t.get(i.value),n>e&&(r=i.value,e=n),i=o.next();return r}function E(t,e,r){if(0===r)return;const n=t.get(e);1===n?t.delete(e):t.set(e,n-1)}function R(t,e,r){0!==r&&t.set(e,t.has(e)?t.get(e)+1:1)}function L(t,e,r){let{x:n,y:o}=e;const{width:i,height:s}=r;if(0===n&&0===o&&s===t.height&&i===t.width)return t;const{width:l,height:u}=t,h=Math.max(0,o),f=Math.max(0,n),p=Math.min(n+i,l),d=Math.min(o+s,u);if(p<0||d<0||!c(t))return null;n=Math.max(0,-n),o=Math.max(0,-o);const{pixels:m}=t,g=i*s,y=m.length,w=[];for(let e=0;e<y;e++){const r=m[e],s=a.A.createEmptyBand(t.pixelType,g);for(let t=h;t<d;t++){const e=t*l;let a=(t+o-h)*i+n;for(let t=f;t<p;t++)s[a++]=r[e+t]}w.push(s)}const b=new Uint8Array(g),C=t.mask;for(let t=h;t<d;t++){const e=t*l;let r=(t+o-h)*i+n;for(let t=f;t<p;t++)b[r++]=C?C[e+t]:1}const v=new a.A({width:r.width,height:r.height,pixelType:t.pixelType,pixels:w,mask:b});return v.updateStatistics(),v}function U(t,e=!0){if(!c(t))return null;const{pixels:r,width:n,height:o,mask:i,pixelType:s}=t,l=[],u=Math.round(n/2),h=Math.round(o/2),f=o-1,p=n-1;for(let t=0;t<r.length;t++){const i=r[t],c=a.A.createEmptyBand(s,u*h);let d=0;for(let t=0;t<o;t+=2)for(let r=0;r<n;r+=2){const o=i[t*n+r];if(e){const e=r===p?o:i[t*n+r+1],s=t===f?o:i[t*n+r+n],a=r===p?s:t===f?e:i[t*n+r+n+1];c[d++]=(o+e+s+a)/4}else c[d++]=o}l.push(c)}let d=null;if(null!=i){d=new Uint8Array(u*h);let t=0;for(let r=0;r<o;r+=2)for(let o=0;o<n;o+=2){const s=i[r*n+o];if(e){const e=o===p?s:i[r*n+o+1],a=r===f?s:i[r*n+o+n],l=o===p?a:r===f?e:i[r*n+o+n+1];d[t++]=s*e*a*l?1:0}else d[t++]=s}}return new a.A({width:u,height:h,pixelType:s,pixels:l,mask:d})}function D(t,e,r=0,n=!0){if(!c(t))return null;const{width:o,height:i}=e;let{width:s,height:a}=t;const l=new Map,u={x:0,y:0},h=1+r;let f=t;for(let t=0;t<h;t++){const r=Math.ceil(s/o),c=Math.ceil(a/i);for(let n=0;n<c;n++){u.y=n*i;for(let i=0;i<r;i++){u.x=i*o;const r=L(f,u,e);l.set(`${t}/${n}/${i}`,r)}}t<h-1&&(f=U(f,n)),s=Math.round(s/2),a=Math.round(a/2)}return l}function O(t){const{pixelBlock:e,tileSize:r,level:n,row:o,col:i,useBilinear:s}=t;if(!c(e))return null;const{width:a,height:l}=r,u=2**n,h=u*a,f=u*l;let p=L(e,{y:o*f,x:i*h},{width:h,height:f});if(!p)return null;for(let t=n;t>0;t--)p=U(p,s);return p}function B(t,e,r,n,o=0){const{width:i,height:s}=t,{width:a,height:l}=e,u=n.cols,c=n.rows,h=Math.ceil(a/u-.1/u),f=Math.ceil(l/c-.1/c);let p,d,m,g,y,w,b;const C=h*u,v=C*f*c,x=new Float32Array(v),A=new Float32Array(v),k=new Uint32Array(v),M=new Uint32Array(v);let S,T,I=0;for(let t=0;t<f;t++)for(let e=0;e<h;e++){p=12*(t*h+e),d=r[p],m=r[p+1],g=r[p+2],y=r[p+3],w=r[p+4],b=r[p+5];for(let r=0;r<c;r++){I=(t*c+r)*C+e*u,T=(r+.5)/c;for(let t=0;t<r;t++)S=(t+.5)/u,x[I+t]=(d*S+m*T+g)*i+o,A[I+t]=(y*S+w*T+b)*s+o,k[I+t]=Math.floor(x[I+t]),M[I+t]=Math.floor(A[I+t])}p+=6,d=r[p],m=r[p+1],g=r[p+2],y=r[p+3],w=r[p+4],b=r[p+5];for(let r=0;r<c;r++){I=(t*c+r)*C+e*u,T=(r+.5)/c;for(let t=r;t<u;t++)S=(t+.5)/u,x[I+t]=(d*S+m*T+g)*i+o,A[I+t]=(y*S+w*T+b)*s+o,k[I+t]=Math.floor(x[I+t]),M[I+t]=Math.floor(A[I+t])}}return{offsets_x:x,offsets_y:A,offsets_xi:k,offsets_yi:M,gridWidth:C}}function N(t,e){const{coefficients:r,spacing:n}=e,{offsets_x:o,offsets_y:i,gridWidth:s}=B(t,t,r,{rows:n[0],cols:n[1]}),{width:a,height:l}=t,u=new Float32Array(a*l),c=180/Math.PI;for(let t=0;t<l;t++)for(let e=0;e<a;e++){const r=t*s+e,n=0===t?r:r-s,h=t===l-1?r:r+s,f=o[n]-o[h],p=i[h]-i[n];if(isNaN(f)||isNaN(p))u[t*a+e]=90;else{let r=Math.atan2(p,f)*c;r=(360+r)%360,u[t*a+e]=r}}return u}function G(t,e,r,n,o="nearest"){if(!c(t))return null;"majority"===o&&(t=I(t));const{pixels:i,mask:s,bandMasks:l,pixelType:u}=t,h=t.width,f=t.height,p=a.A.getPixelArrayConstructor(u),d=i.length,{width:m,height:g}=e;let y=!1;for(let t=0;t<r.length;t+=3)-1===r[t]&&-1===r[t+1]&&-1===r[t+2]&&(y=!0);const{offsets_x:w,offsets_y:b,offsets_xi:C,offsets_yi:v,gridWidth:x}=B({width:h,height:f},e,r,n,"majority"===o?.5:0);let A;const k=(t,e,r,n)=>{const o=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let i=0;i<g;i++){A=i*x;for(let s=0;s<m;s++){if(w[A]<0||b[A]<0)t[i*m+s]=0;else if(n)t[i*m+s]=e[C[A]+v[A]*h];else{const n=Math.floor(w[A]),a=Math.floor(b[A]),l=Math.ceil(w[A]),u=Math.ceil(b[A]),c=w[A]-n,f=b[A]-a;if(!r||r[n+a*h]&&r[l+a*h]&&r[n+u*h]&&r[l+u*h]){const r=(1-c)*e[n+a*h]+c*e[l+a*h],p=(1-c)*e[n+u*h]+c*e[l+u*h];t[i*m+s]=(1-f)*r+f*p+o}else t[i*m+s]=e[C[A]+v[A]*h]}A++}}},M=[];let S;const T=l?.length===d,P=[];for(let t=0;t<d;t++){if(T){const e=new Uint8Array(m*g);k(e,l[t],l[t],!0),P.push(e)}S=new p(m*g),k(S,i[t],T?l[t]:s,"nearest"===o||"majority"===o),M.push(S)}const E=new a.A({width:m,height:g,pixelType:u,pixels:M,bandMasks:T?P:void 0});if(null!=s)E.mask=new Uint8Array(m*g),k(E.mask,s,s,!0);else if(y){E.mask=new Uint8Array(m*g);for(let t=0;t<m*g;t++)E.mask[t]=w[t]<0||b[t]<0?0:1}return E.updateStatistics(),E}},39062:(t,e,r)=>{r.d(e,{E0:()=>m,PP:()=>g,SC:()=>f,di:()=>d,fw:()=>h,ng:()=>l,rk:()=>a,yy:()=>p});var n=r(14140),o=r(4151),i=r(28435);const s=1,a=1/111e3;function l(t){let{altitude:e,azimuth:r}=t;const{hillshadeType:n,pixelSizePower:o=1,pixelSizeFactor:i=1,scalingType:s,isGCS:l,resolution:u}=t,c="multi-directional"===n?2*t.zFactor:t.zFactor,{x:h,y:f}=u;let p=c/(8*h),d=c/(8*f);if(l&&c>.001&&(p/=a,d/=a),"adjusted"===s)if(l){const t=h*a,e=f*a;p=(c+t**o*i)/(8*t),d=(c+e**o*i)/(8*e)}else p=(c+h**o*i)/(8*h),d=(c+f**o*i)/(8*f);let m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y);const C=[315,270,225,360,180,0],v=[60,60,60,60,60,90],x=new Float32Array([3,5,3,2,1,4]),A=x.reduce(((t,e)=>t+e)),k=x.map((t=>t/A)),M="multi-directional"===n?C.length:1,S=new Float32Array(6),T=new Float32Array(6),I=new Float32Array(6);if("multi-directional"===n)for(let t=0;t<M;t++)e=v[t],r=C[t],m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y),S[t]=g,T[t]=w,I[t]=b;else S.fill(g),T.fill(w),I.fill(b);return{resolution:u,factor:[p,d],sinZcosA:w,sinZsinA:b,cosZ:g,sinZcosAs:[...T],sinZsinAs:[...I],cosZs:[...S],weights:[...k],hillshadeType:["traditional","multi-directional"].indexOf(n)}}function u(t,e){const{width:r,height:n}=t,o=r*n,i=new Uint8Array(o),a=null!=t.mask;let l;if(a){l=new Uint8Array(t.mask);for(let t=0;t<l.length;t++)l[t]&&(i[t]=1,l[t]=1)}const u=t.pixels[0],c=new Float32Array(o),h=new Float32Array(o);let f,p=0;if(e){const{resolution:t}=e,r=t?(t.x+t.y)/2:1;p=200*e.zFactor/(r*r),f=new Float32Array(o)}const d=e?.curvatureType;let m,g,y,w,b,C,v,x;for(let t=s;t<n-s;t++){const e=t*r;for(let t=s;t<r-s;t++){const n=e+t;if(!l||0!==l[n]){if(l){if(l[n-r-1]+l[n-r]+l[n-r+1]+l[n-1]+l[n+1]+l[n+r-1]+l[n+r]+l[n+r+1]<7){i[n]=0;continue}m=l[n-r-1]?u[n-r-1]:u[n],g=l[n-r]?u[n-r]:u[n],y=l[n-r+1]?u[n-r+1]:u[n],w=l[n-1]?u[n-1]:u[n],b=l[n+1]?u[n+1]:u[n],C=l[n+r-1]?u[n+r-1]:u[n],v=l[n+r]?u[n+r]:u[n],x=l[n+r+1]?u[n+r+1]:u[n]}else m=u[n-r-1],g=u[n-r],y=u[n-r+1],w=u[n-1],b=u[n+1],C=u[n+r-1],v=u[n+r],x=u[n+r+1];if(c[n]=y+b+b+x-(m+w+w+C),h[n]=C+v+v+x-(m+g+g+y),null!=f){const t=u[n],e=.5*(w+b)-t,r=.5*(g+v)-t;if("standard"===d)f[n]=-p*(e+r);else{const t=(-m+y+C-x)/4,o=(-w+b)/2,i=(g-v)/2,s=o*o,a=i*i,l=s+a;l&&(f[n]="profile"===d?p*(e*s+r*a+t*o*i)/l:-p*(e*a+r*s-t*o*i)/l)}}}}}return{outMask:a?i:null,dzxs:c,dzys:h,curvatures:f}}function c(t,e,r){for(let n=0;n<r;n++)t[n*e]=t[n*e+1],t[(n+1)*e-1]=t[(n+1)*e-2];for(let n=1;n<e-1;n++)t[n]=t[n+e],t[n+(r-1)*e]=t[n+(r-2)*e]}function h(t,e){if(!(0,i.AB)(t))return t;const{factor:r,sinZcosA:a,sinZsinA:h,cosZ:f,sinZcosAs:p,sinZsinAs:d,cosZs:m,weights:g}=l(e),[y,w]=r,b="traditional"===e.hillshadeType,{width:C,height:v}=t,x=new Uint8Array(C*v),{dzxs:A,dzys:k,outMask:M}=u(t);for(let t=s;t<v-s;t++){const e=t*C;for(let t=s;t<C-s;t++){const r=e+t;if(!M||M[r]){const t=A[r]*y,e=k[r]*w,n=Math.sqrt(1+t*t+e*e);let o=0;if(b){let r=255*(f+h*e-a*t)/n;r<0&&(r=0),o=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(m[i]+d[i]*e-p[i]*t)/n;r<0&&(r=0),o+=r*g[i]}}x[r]=255&o}}}return c(x,C,v),new n.A({width:C,height:v,pixels:[x],mask:M,pixelType:"u8",validPixelCount:t.validPixelCount,statistics:[new o.z(0,255)]})}function f(t,e,r,n){if(!(0,i.AB)(t)||!(0,i.AB)(e))return;const{min:o,max:s}=n,a=t.pixels[0],{pixels:l,mask:u}=e,c=l[0],h=255.00001/(s-o),f=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),m=r.length-1;for(let t=0;t<c.length;t++){if(u&&0===u[t])continue;const e=Math.floor((c[t]-o)*h),[n,i]=r[e<0?0:e>m?m:e],s=a[t],l=s*i,g=l*(1-Math.abs(n%2-1)),y=s-l;switch(Math.floor(n)){case 0:f[t]=l+y,p[t]=g+y,d[t]=y;break;case 1:f[t]=g+y,p[t]=l+y,d[t]=y;break;case 2:f[t]=y,p[t]=l+y,d[t]=g+y;break;case 3:f[t]=y,p[t]=g+y,d[t]=l+y;break;case 4:f[t]=g+y,p[t]=y,d[t]=l+y;break;case 5:case 6:f[t]=l+y,p[t]=y,d[t]=g+y}}t.pixels=[f,p,d],t.updateStatistics()}function p(t,e){if(!(0,i.AB)(t))return t;const r=e.zFactor,o=e.pixelSizePower??1,l=e.pixelSizeFactor??1,h=e.slopeType,f=e.isGCS,{x:p,y:d}=e.resolution;let m=r/(8*p),g=r/(8*d);f&&Math.abs(r-1)<1e-4&&(m/=a,g/=a),"adjusted"===h&&(m=(r+p**o*l)/(8*p),g=(r+d**o*l)/(8*d));const{dzxs:y,dzys:w,outMask:b}=u(t),{width:C,height:v}=t,x=new Float32Array(C*v);for(let t=s;t<v-s;t++){const e=t*C;for(let t=s;t<C-s;t++){const r=e+t;if(!b||b[r]){const n=y[r]*m,o=w[r]*g,i=Math.sqrt(n*n+o*o);x[e+t]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}c(x,C,v);const A=new n.A({width:C,height:v,pixels:[x],mask:b,pixelType:"f32",validPixelCount:t.validPixelCount});return A.updateStatistics(),A}function d(t,e={}){if(!(0,i.AB)(t))return t;const{resolution:r}=e,a=r?1/r.x:1,l=r?1/r.y:1,{dzxs:h,dzys:f,outMask:p}=u(t),{width:d,height:m}=t,g=new Float32Array(d*m);for(let t=s;t<m-s;t++){const e=t*d;for(let t=s;t<d-s;t++){const r=e+t;if(!p||p[r]){const n=h[r]*a,o=f[r]*l;let i=-1;0===n&&0===o||(i=90-57.29578*Math.atan2(o,-n),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),g[e+t]=i}}}return c(g,d,m),new n.A({width:d,height:m,pixels:[g],mask:p,pixelType:"f32",validPixelCount:t.validPixelCount,statistics:[new o.z(-1,360)]})}function m(t,e){if(!(0,i.AB)(t))return t;const{curvatures:r,outMask:o}=u(t,e),{width:s,height:a}=t;c(r,s,a);const l=new n.A({width:s,height:a,pixels:[r],mask:o,pixelType:"f32",validPixelCount:t.validPixelCount});return l.updateStatistics(),l}function g(t,e,r){const{hillshadeType:n,altitude:o,azimuth:i,zFactor:s,pixelSizeFactor:a,pixelSizePower:l,slopeType:u}=t;return{hillshadeType:n,altitude:o,azimuth:i,zFactor:s,pixelSizePower:l,pixelSizeFactor:a,scalingType:"scaled"===u?"adjusted":"none",resolution:e,isGCS:r}}},45664:(t,e,r)=>{r.d(e,{Cr:()=>E,D4:()=>z,JM:()=>_,XO:()=>L,r9:()=>D,s$:()=>V,uT:()=>G,uc:()=>R,zS:()=>U}),r(44208);var n=r(15265),o=r(61294),i=r(49589),s=r(56582),a=r(16019),l=r(12196),u=r(47124),c=r(68060);const h=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,p=new Set([1,5,6,7,8,34712,34887]);function d(t,e){let r="unknown";return 3===t?r=64===e?"f64":"f32":1===t?1===e?r="u1":2===e?r="u2":4===e?r="u4":e<=8?r="u8":e<=16?r="u16":e<=32&&(r="u32"):2===t&&(e<=8?r="s8":e<=16?r="s16":e<=32&&(r="s32")),r}function m(t){let e=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f64":e=Float64Array;break;default:e=Float32Array}return e}function g(t,e){return{x:e[0]*t.x+e[1]*t.y+e[2],y:e[3]*t.x+e[4]*t.y+e[5]}}function y(t,e){return t.get(e)?.values}function w(t,e){return t.get(e)?.values}function b(t,e){return t.get(e)?.values?.[0]}function C(t,e){return t.get(e)?.values?.[0]}function v(t,e,r,n=0,o=l.NB,i=4){const s=8===i,a=s?O(new DataView(t,r,8),0,e):new DataView(t,r,2).getUint16(0,e),u=4+2*i,c=s?8:2,h=c+a*u;if(r+h>t.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=8===i?8:4,p=r+h+f<=t.byteLength?N(new DataView(t,r+h,f),0,e,8===i):null,d=r+c,m=new Map;let g,y,w,b,C,v=0,x=0;for(let r=0;r<a;r++){y=new DataView(t,d+u*r,u),w=y.getUint16(0,e),C=y.getUint16(2,e),b=(0,l.kq)(w,o);const s=[];2===i?(v=y.getUint16(4,e),x=y.getUint16(6,e)):4===i?(v=y.getUint32(4,e),x=y.getUint32(8,e)):8===i&&(v=N(y,4,e,!0),x=N(y,12,e,!0),s.push(y.getUint32(12,e)),s.push(y.getUint32(16,e))),g={id:w,type:C,valueCount:v,valueOffset:x,valueOffsets:s,values:null},E(t,e,g,n,!1,i),m.set(b,g)}return{success:!0,ifd:m,nextIFD:p,requiredBufferSize:h}}const x=(t,e)=>(0,i.D4)(t,{inputOffset:e}).pixels[0];function A(t,e){if(1!==e&&2!==e&&4!==e)return t;const r=new Uint8Array(t),n=8/e,o=new Uint8Array(t.byteLength*n);let i=0;const s=2**e-1;for(let t=0;t<r.length;t++){const a=r[t];for(let t=0;t<n;t++)o[i++]=a<<e*t>>>8-e&s}return o.buffer}function k(t,e,r){const n=new o.J;n.parse(t),n.colorTransform=6===r?-1:0;const i=n.getData(n.width,n.height,1!==e&&4!==e);return new Uint8Array(i.buffer)}function M(t){const e=new c.Z(t).getBytes(),r=new ArrayBuffer(e.length),n=new Uint8Array(r);return n.set(e),n}async function S(t,e,r,n,o){const a=u.Z===e,l=C(r,"BITSPERSAMPLE"),c=C(r,"SAMPLESPERPIXEL")??1,h=C(r,"PHOTOMETRICINTERPRETATION"),f=C(r,"SAMPLEFORMAT")??1,p=d(f,l),g=C(r,"COMPRESSION")??1,y=m(p);let w,b,v;if(34887===g)return await(0,i.Hh)(),x(t,n);if(1===g)w=t.slice(n,n+o),b=new Uint8Array(w);else if(8===g||32946===g)b=new Uint8Array(t,n,o),b=M(b),w=b.buffer;else if(6===g)b=new Uint8Array(t,n,o),b=k(b,c,h),w=b.buffer;else if(7===g){const e=r.get("JPEGTABLES").values,i=e.length-2;b=new Uint8Array(i+o-2);for(let t=0;t<i;t++)b[t]=e[t];const s=new Uint8Array(t,n+2,o-2);for(let t=0;t<s.length;t++)b[i+t]=s[t];b=k(b,c,h),w=b.buffer}else{if(5!==g)throw new Error("tiff-decode: unsupport compression "+g);b=(0,s.D)(t,n,o,e),w=b.buffer}if(w=A(w,l),"u8"===p||"s8"===p||a)v=new y(w);else{w=new ArrayBuffer(b.length);const t=new Uint8Array(w);switch(p){case"u16":case"s16":for(let e=0;e<b.length;e+=2)t[e]=b[e+1],t[e+1]=b[e];break;case"u32":case"s32":case"f32":for(let e=0;e<b.length;e+=4)t[e]=b[e+3],t[e+1]=b[e+2],t[e+2]=b[e+1],t[e+3]=b[e]}v=new y(w)}const S=C(r,"PREDICTOR")??1,T=C(r,"TILEWIDTH"),I=C(r,"TILELENGTH");if(S>1&&(5===g||8===g||32946===g)&&T&&I){const t=L(r),e=new y(v.length);e.set(v),v=function(t,e,r,n,o){const i=n?4:1,s=r*i*o;n&&(t=new Uint8Array(t.buffer));for(let r=0;r<e;r++){const e=r*s;for(let r=o;r<s;r++)t[e+r]+=t[e+r-o]}if(!n)return t;const a=new Uint8Array(t.length),l=r*o;for(let r=0;r<e;r++){const e=r*s;for(let r=0;r<l;r++)for(let n=0;n<i;n++)a[e+r*i+n]=t[e+r+(i-n-1)*l]}return new Float32Array(a.buffer)}(e,I,T,3===f&&3===S,t?1:c)}return v}const T=(t,e,r)=>{const n=u.Z===e.littleEndian,o=w(r,"STRIPOFFSETS");if(void 0===o)return null;const{width:i,height:a,pixelType:l}=R([r]),c=C(r,"SAMPLESPERPIXEL")||e.planes,h=C(r,"PHOTOMETRICINTERPRETATION"),f=i*a,p=C(r,"BITSPERSAMPLE"),d=m(l),g=new d(f*c),y=w(r,"STRIPBYTECOUNTS"),b=C(r,"ROWSPERSTRIP"),v=C(r,"COMPRESSION")??1;let x,S,T,I,P,E,L,U,D;if(p%8==0)for(x=0;x<o.length;x++){if(P=x*(b*i)*c,"u8"===l||"s8"===l||n)8===v||32946===v?(L=new Uint8Array(t,o[x],y[x]),L=M(L),E=L.buffer):6===v?(L=new Uint8Array(t,o[x],y[x]),L=k(L,c,h),E=L.buffer):5===v?(L=(0,s.D)(t,o[x],y[x],e.littleEndian),E=L.buffer):E=t.slice(o[x],o[x]+y[x]),E=A(E,p),I=new d(E);else{switch(6===v||8===v||32946===v?(L=new Uint8Array(t,o[x],y[x]),U=M(L),E=U.buffer):(E=new ArrayBuffer(y[x]),L=new Uint8Array(t,o[x],y[x]),U=new Uint8Array(E)),l){case"u16":case"s16":for(T=0;T<L.length;T+=2)U[T]=L[T+1],U[T+1]=L[T];break;case"u32":case"s32":case"f32":for(T=0;T<L.length;T+=4)U[T]=L[T+3],U[T+1]=L[T+2],U[T+2]=L[T+1],U[T+3]=L[T]}E=A(E,p),I=new d(E)}g.set(I,P)}const O=[];if(1===c)O.push(g);else for(x=0;x<c;x++){for(D=new d(f),S=0;S<f;S++)D[S]=g[S*c+x];O.push(D)}return{width:i,height:a,pixelType:l,pixels:O}},I=(t,e,r)=>{if(!(t&&t.length>0&&e&&r))return null;let n,o,i;const s=t[0].length,a=t.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(n=t[u],o=e[u],i=r[u],0===u)for(let t=0;t<s;t++)l[t]=n[t]<o||n[t]>i?0:1;else for(let t=0;t<s;t++)l[t]&&(l[t]=n[t]<o||n[t]>i?0:1);return l},P=t=>{if(!t)return null;const e=t.match(/<Item(.*?)Item>/gi);if(!e||0===e.length)return null;const r=new Map;let n,o,i,s,a;for(let t=0;t<e.length;t++)n=e[t],o=n.slice(6,n.indexOf(">")),s=n.indexOf("sample="),s>-1&&(a=n.slice(s+8,n.indexOf('"',s+8))),s=n.indexOf("name="),s>-1&&(o=n.slice(s+6,n.indexOf('"',s+6))),o&&(i=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim(),null!=a?r.has(o)?r.get(o)[a]=i:r.set(o,[i]):r.set(o,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),c=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let t=0;t<l.length;t++)f.push({min:parseFloat(l[t]),max:parseFloat(u[t]),avg:c&&parseFloat(c[t]),stddev:h&&parseFloat(h[t])})}const p=r.get("BandName"),d=r.get("WavelengthMin"),m=r.get("WavelengthMax");let g=null;if(p){g=[];for(let t=0;t<p.length;t++)g.push({BandName:p[t],WavelengthMin:d&&parseFloat(d[t]),WavelengthMax:m&&parseFloat(m[t])})}return{statistics:f,bandProperties:g,dataType:r.get("DataType"),rawMetadata:r}};function E(t,e,r,n=0,o=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const c=h[s],p=8*c,d=a*c,m=a*h[s]*8;let g,y;const w=8===i?64:32,b=r.valueOffsets;if(m>w&&d>(o?t.byteLength:t?t.byteLength-l+n:0))return r.offlineOffsetSize=[l,d],r.values=null,!1;if(m<=w){if(!e)if(w<=32)l>>>=32-m;else{const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);m<=32?(l=t>>>32-m,b[0]=l):(l=t*2**(32-m)+(e>>>32-m),b[0]=t,b[1]=e>>>32-m)}if(1===a&&p===w)u=[l];else if(64===w){const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);let r=t,n=32;for(y=1;y<=a;y++){const t=32-p*y%32;if(n<p){const o=r<<t>>>32-n,i=e<<32-n>>>32-n;r=e,u.push(o+i*2**(p-n)),n-=32-(p-n)}else u.push(r<<t>>>32-p),n-=p;0===n&&(n=32,r=e)}}else for(y=1;y<=a;y++){const t=32-p*y;u.push(l<<t>>>32-p)}}else{l-=n,o&&(l=0);for(let r=l;r<l+d;r+=c){switch(s){case 1:case 2:case 7:g=new DataView(t,r,1).getUint8(0);break;case 3:g=new DataView(t,r,2).getUint16(0,e);break;case 4:case 13:g=new DataView(t,r,4).getUint32(0,e);break;case 5:g=new DataView(t,r,4).getUint32(0,e)/new DataView(t,r+4,4).getUint32(0,e);break;case 6:g=new DataView(t,r,1).getInt8(0);break;case 8:g=new DataView(t,r,2).getInt16(0,e);break;case 9:g=new DataView(t,r,4).getInt32(0,e);break;case 10:g=new DataView(t,r,4).getInt32(0,e)/new DataView(t,r+4,4).getInt32(0,e);break;case 11:g=new DataView(t,r,4).getFloat32(0,e);break;case 12:g=new DataView(t,r,8).getFloat64(0,e);break;case 16:case 18:g=O(new DataView(t,r,8),0,e);break;case 17:g=B(new DataView(t,r,8),0,e);break;default:g=null}u.push(g)}}if(2===s){let t="";const e=u;for(u=[],y=0;y<e.length;y++)0===e[y]&&""!==t?(u.push(t),t=""):t+=String.fromCharCode(e[y]);""===t&&0!==u.length||u.push(t)}return r.values=u,!0}function R(t){const e=t[0],r=C(e,"TILEWIDTH"),n=C(e,"TILELENGTH"),o=C(e,"IMAGEWIDTH"),i=C(e,"IMAGELENGTH"),s=C(e,"BITSPERSAMPLE"),a=C(e,"SAMPLESPERPIXEL"),l=C(e,"SAMPLEFORMAT")??1,u=d(l,s),c=L(e),h=y(e,"GDAL_NODATA");let f=null;h?.length&&(f=h.map((t=>parseFloat(t))),f.some((t=>isNaN(t)))&&(f=null));const m=C(e,"COMPRESSION")??1;let v;switch(m){case 1:v="NONE";break;case 2:case 3:case 4:case 32771:v="CCITT";break;case 5:v="LZW";break;case 6:case 7:v="JPEG";break;case 32773:v="PACKBITS";break;case 8:case 32946:v="DEFLATE";break;case 34712:v="JPEG2000";break;case 34887:v="LERC";break;default:v=String(m)}let x=!0,A="";p.has(m)||(x=!1,A+="unsupported tag compression "+m),l>3&&(x=!1,A+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(x=!1,A+="unsupported tag bitsPerSample "+s);const k=b(e,"GEOASCIIPARAMS");let M;if(k){const t=k.split("|").find((t=>t.includes("ESRI PE String = "))),e=t?t.replace("ESRI PE String = ",""):"";M=e.startsWith("COMPD_CS")||e.startsWith("PROJCS")||e.startsWith("GEOGCS")?{wkid:null,wkt:e}:null}const S=w(e,"GEOTIEPOINTS"),T=w(e,"GEOPIXELSCALE"),I=w(e,"GEOTRANSMATRIX"),E=e.has("GEOKEYDIRECTORY")?e.get("GEOKEYDIRECTORY").data:null;let R,O,B=!1,N=!1;if(E){B=2===C(E,"GTRasterTypeGeoKey");const t=C(E,"GTModelTypeGeoKey");if(2===t){const t=C(E,"GeographicTypeGeoKey");t>=1024&&t<=32766&&(M={wkid:t}),M||32767!==t||(N=!0,M={wkid:4326})}else if(1===t){const t=C(E,"ProjectedCSTypeGeoKey");t>=1024&&t<=32766&&(M={wkid:t})}}if(T&&S&&S.length>=6?(R=[T[0],0,S[3]-S[0]*T[0],0,-Math.abs(T[1]),S[4]-S[1]*T[1]],B&&(R[2]-=.5*R[0]+.5*R[1],R[5]-=.5*R[3]+.5*R[4])):I&&16===I.length&&(R=B?[I[0],I[1],I[3]-.5*I[0],I[4],I[5],I[7]-.5*I[5]]:[I[0],I[1],I[3],I[4],I[5],I[7]]),R){const t=[{x:0,y:i},{x:0,y:0},{x:o,y:i},{x:o,y:0}];let e,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let o=0;o<t.length;o++)e=g(t[o],R),r=e.x>r?r:e.x,s=e.x<s?s:e.x,n=e.y>n?n:e.y,a=e.y<a?a:e.y;O={xmin:r,xmax:s,ymin:n,ymax:a,spatialReference:M}}else O={xmin:-.5,ymin:.5-i,xmax:o-.5,ymax:.5,spatialReference:M};N&&(O.xmax-O.xmin>400||Math.max(Math.abs(O.xmin),Math.abs(O.xmax))>361)&&(M=null,O.spatialReference=null);const G=U(t);let _,V,z,j,W;if(G.length>0){z=Math.round(Math.log(o/C(G[0],"IMAGEWIDTH"))/Math.LN2);const t=G[G.length-1];j=G.length,_=C(t,"TILEWIDTH"),V=C(t,"TILELENGTH")}_=null!=j&&j>0?_||r:null,V=null!=j&&j>0?V||n:null,r&&(W=[{maxCol:Math.ceil(o/r)-1,maxRow:Math.ceil(i/n)-1,minRow:0,minCol:0}],G.forEach((t=>{W.push({maxCol:Math.ceil(C(t,"IMAGEWIDTH")/C(t,"TILEWIDTH"))-1,maxRow:Math.ceil(C(t,"IMAGELENGTH")/C(t,"TILELENGTH"))-1,minRow:0,minCol:0})})));const Z=b(t[0],"GDAL_METADATA"),H=P(Z);A+=" "+F({width:o,height:i,tileWidth:r,tileHeight:n,planes:a,ifds:t});const q=D(t).length===G.length+1,K=G?.length?G.map((t=>({x:o/C(t,"IMAGEWIDTH"),y:i/C(t,"IMAGELENGTH")}))):void 0;return{width:o,height:i,tileWidth:r,tileHeight:n,planes:a,isBSQ:c,pixelType:u,compression:v,noData:f,hasMaskBand:q,isSupported:x,pyramidResolutions:K,message:A,extent:O,isPseudoGeographic:N,affine:T?null:R,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:_,pyramidBlockHeight:V,tileBoundary:W,metadata:H}}function L(t,e){const r=y(t,"PLANARCONFIGURATION");return r?2===r[0]:!!e&&e.isBSQ}function U(t){return t.filter((t=>1===C(t,"NEWSUBFILETYPE")))}function D(t){return t.filter((t=>{const e=!(4&~(C(t,"NEWSUBFILETYPE")??0)),r=4===C(t,"PHOTOMETRICINTERPRETATION");return e&&r}))}function O(t,e,r){const n=t.getUint32(e,r),o=t.getUint32(e+4,r);return r?o*f+n:n*f+o}function B(t,e,r){let n=r?t.getInt32(e,r):t.getUint32(e,r),o=r?t.getUint32(e+4,r):t.getInt32(e+4,r);const i=(r?n:o)>=0?1:-1;return r?n*=i:o*=i,i*(r?o*f+n:n*f+o)}function N(t,e,r,n){return n?O(t,e,r):t.getUint32(e,r)}function G(t){const e=new DataView(t,0,16),r=e.getUint16(0,!1);let n=null;if(18761===r)n=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");n=!1}const o=e.getUint16(2,n);if(42!==o&&43!==o)throw new Error("unexpected tiff identifier");let i=4;const s=43===o;if(s){const t=e.getUint16(i,n);if(i+=2,8!==t)throw new Error("unsupported bigtiff version");if(0!==e.getUint16(i,n))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:n,isBigTiff:s,firstIFDPos:N(e,i,n,s)}}function _(t,e,r,o=0,i=l.NB,s=4){const a=v(t,e,r,o,i,s);let u;const c=a.ifd;if(c){if(l.RR.forEach(((r,n)=>{c.has(n)&&(u=c.get(n),u.data=v(t,e,u.valueOffset-o,o,r).ifd)})),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const n=r[0]+"."+r[1]+"."+r[2];u.data=v(t,e,u.valueOffset+6-o,o,l.YC,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}if(c.has("XMP")){u=c.get("XMP");const t=u.values;"number"==typeof t[0]&&7===u.type&&(u.values=[(0,n.w)(new Uint8Array(t))])}}return a}function F(t){const{width:e,height:r,tileHeight:n,tileWidth:o}=t,i=t.planes,s=o?o*n:e*r,a=C(t.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=o?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(t,e){const{headerInfo:r,ifd:n,offsets:o,sizes:i}=e,s=[];for(let e=0;e<o.length;e++){i[e];const a=await S(t,r.littleEndian,n,o[e],i[e]||t.byteLength);s.push(a)}const l=L(n,r),u=C(n,"BITSPERSAMPLE"),c=d(C(n,"SAMPLEFORMAT")??1,u),h=C(n,"SAMPLESPERPIXEL")||r.planes,f=m(c),p=C(n,"TILEWIDTH"),g=C(n,"TILELENGTH"),y=C(n,"COMPRESSION")??1,w=p*g;let b;const v=[];let x=s[0];const A=34887===y;for(let t=0;t<h;t++){if(b=new f(w),s.length===h)x=s[t],x.length===w&&(b=x);else if(x.length)if(l||A)b=x.length===w?x:x.slice(w*t,w*(t+1));else for(let e=0;e<w;e++)b[e]=x[e*h+t];v.push(b)}const k=r.noData?r.noData[0]:e.noDataValue,M=r.metadata?r.metadata.statistics:null,T=M?M.map((t=>t.min)):null,P=M?M.map((t=>t.max)):null,E={pixelType:c,width:p,height:g,pixels:v,noDataValue:k};return null!=k?(0,a.Sp)(E,k,{matchAllNoData:e?.matchAllNoData}):T&&P&&e.applyMinMaxConstraint&&(E.mask=I(v,T,P)),E}async function z(t,e={}){const r=e.pyramidLevel||0,n=e.headerInfo||function(t){const{littleEndian:e,isBigTiff:r,firstIFDPos:n}=G(t);let o=n;const i=[];do{const n=_(t,e,o,0,l.NB,r?8:4);if(!n.success)break;i.push(n.ifd),o=n.nextIFD}while(o>0);return{...R(i),littleEndian:e,isBigTiff:r,ifds:i,pyramidIFDs:U(i),maskIFDs:D(i)}}(t),{ifds:o,noData:i}=n;if(0===o.length)throw new Error("no valid image file directory");const s=F(n);if(s)throw s;let u=null;const c=-1===r?o[o.length-1]:o[r],h=i??e.noDataValue;return u=n.tileWidth?await async function(t,e,r){const n=w(r,"TILEOFFSETS");if(void 0===n)return null;const o=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=R([r]),c=L(r,e),h=C(r,"SAMPLESPERPIXEL")||e.planes,f=i*s,p=C(r,"BITSPERSAMPLE"),d=34887===(C(r,"COMPRESSION")??1),g=m(a),y=[];for(let t=0;t<h;t++)y.push(new g(f));let b,v,x,A,k,M,T,I,P,E,U,D,O;const B=Math.ceil(i/l),N=new Uint8Array(f).fill(255);let G=!1;if(p%8==0)if(d&&c&&h>1){const a=Math.round(n.length/h);for(b=0;b<a;b++){M=Math.floor(b/B)*u,T=b%B*l,I=M*i+T;for(let a=0;a<h;a++){const c=b*h+a;for(0===o[c]?(x=null,G=!0):x=await S(t,e.littleEndian,r,n[c],o[c]),E=0,P=I,D=Math.min(l,i-T),U=Math.min(u,s-M),O=y[a],A=0;A<U;A++)for(P=I+A*i,E=A*l,k=0;k<D;k++,P++,E++)x?O[P]=x[E]:N[P]=0}}}else for(b=0;b<n.length;b++)for(M=Math.floor(b/B)*u,T=b%B*l,I=M*i+T,0===o[b]?(x=null,G=!0):x=await S(t,e.littleEndian,r,n[b],o[b]),E=0,P=I,D=Math.min(l,i-T),U=Math.min(u,s-M),v=0;v<h;v++)if(O=y[v],c||d)for(A=0;A<U;A++)for(P=I+A*i,E=l*u*v+A*l,k=0;k<D;k++,P++,E++)x?O[P]=x[E]:N[P]=0;else for(A=0;A<U;A++)for(P=I+A*i,E=A*l*h+v,k=0;k<D;k++,P++,E+=h)x?O[P]=x[E]:N[P]=0;return{width:i,height:s,pixelType:a,pixels:y,mask:G?N:void 0}}(t,n,c):T(t,n,c),u?(null!=h&&(0,a.Sp)(u,h,{matchAllNoData:null==i&&e?.matchAllNoData}),u):u}},47124:(t,e,r)=>{r.d(e,{Z:()=>n});const n=(()=>{const t=new ArrayBuffer(4),e=new Uint8Array(t);return new Uint32Array(t)[0]=1,1===e[0]})()},49589:(t,e,r)=>{r.d(e,{D4:()=>c,Hh:()=>s});var n=r(2741);const o=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null;function s(){return i||(i=r.e(382).then(r.bind(r,30382)).then((t=>t.l)).then((({default:t})=>t({locateFile:t=>(0,n.s)(`esri/layers/support/rasterFormats/${t}`)}))).then((t=>{!function(t){const{_malloc:e,_free:r,_lerc_getBlobInfo:n,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:u}=t;let c;const h=Object.values(u).find((e=>e&&"buffer"in e&&e.buffer===t.HEAPU8.buffer)),f=t=>{const r=t.map((t=>function(t){return 16+(t>>3<<3)}(t))),n=r.reduce(((t,e)=>t+e)),o=e(n);c=new Uint8Array(h.buffer);let i=r[0];r[0]=o;for(let t=1;t<r.length;t++){const e=r[t];r[t]=r[t-1]+i,i=e}return r};a.getBlobInfo=t=>{const e=new Uint8Array(48),o=new Uint8Array(24),[s,a,u]=f([t.length,e.length,o.length]);c.set(t,s),c.set(e,a),c.set(o,u);let p=n(s,t.length,a,u,12,3);if(p)throw r(s),new Error(`lerc-getBlobInfo: error code is ${p}`);c=new Uint8Array(h.buffer),l(c,a,e),l(c,u,o);const d=new Uint32Array(e.buffer),m=new Float64Array(o.buffer),[g,y,,w,b,C,v,x,A,k,M]=d,S={version:g,depthCount:k,width:w,height:b,validPixelCount:v,bandCount:C,blobSize:x,maskCount:A,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:M};if(M&&k>1)return r(s),S;if(1===k&&1===C)return r(s),S.statistics.push({minValue:m[0],maxValue:m[1]}),S;const T=k*C*8,I=new Uint8Array(T),P=new Uint8Array(T);let E=s,R=0,L=0,U=!1;if(c.byteLength<s+2*T?(r(s),U=!0,[E,R,L]=f([t.length,T,T]),c.set(t,E)):[R,L]=f([T,T]),c.set(I,R),c.set(P,L),p=i(E,t.length,k,C,R,L),p)throw r(E),U||r(R),new Error(`lerc-getDataRanges: error code is ${p}`);c=new Uint8Array(h.buffer),l(c,R,I),l(c,L,P);const D=new Float64Array(I.buffer),O=new Float64Array(P.buffer),B=S.statistics;for(let t=0;t<C;t++)if(k>1){const e=D.slice(t*k,(t+1)*k),r=O.slice(t*k,(t+1)*k),n=Math.min.apply(null,e),o=Math.max.apply(null,r);B.push({minValue:n,maxValue:o,depthStats:{minValues:e,maxValues:r}})}else B.push({minValue:D[t],maxValue:O[t]});return r(E),U||r(R),S},a.decode=(t,e)=>{const{maskCount:n,depthCount:i,bandCount:a,width:u,height:p,dataType:d,bandCountWithNoData:m}=e,g=o[d],y=u*p,w=new Uint8Array(y*a),b=y*i*a*g.size,C=new Uint8Array(b),v=new Uint8Array(a),x=new Uint8Array(8*a),[A,k,M,S,T]=f([t.length,w.length,C.length,v.length,x.length]);c.set(t,A),c.set(w,k),c.set(C,M),c.set(v,S),c.set(x,T);const I=s(A,t.length,n,k,i,u,p,a,d,M,S,T);if(I)throw r(A),new Error(`lerc-decode: error code is ${I}`);c=new Uint8Array(h.buffer),l(c,M,C),l(c,k,w);let P=null;if(m){l(c,S,v),l(c,T,x),P=[];const t=new Float64Array(x.buffer);for(let e=0;e<v.length;e++)P.push(v[e]?t[e]:null)}return r(A),{data:C,maskData:w,noDataValues:P}}}(t)})),i)}const a={getBlobInfo:null,decode:null};function l(t,e,r){r.set(t.slice(e,e+r.length))}function u(t,e,r,n,o){if(r<2)return t;const i=new n(e*r);for(let n=0,o=0;n<e;n++)for(let s=0,a=n;s<r;s++,a+=e)i[a]=t[o++];return i}function c(t,e={}){const r=e.inputOffset??0,n=t instanceof Uint8Array?t.subarray(r):new Uint8Array(t,r),i=a.getBlobInfo(n),{data:s,maskData:l,noDataValues:c}=a.decode(n,i),{width:h,height:f,bandCount:p,depthCount:d,dataType:m,maskCount:g,statistics:y}=i,w=o[m],b=new w.ctor(s.buffer),C=[],v=[],x=h*f,A=x*d;for(let t=0;t<p;t++){const r=b.subarray(t*A,(t+1)*A);if(e.returnInterleaved)C.push(r);else{const t=u(r,x,d,w.ctor);C.push(t)}v.push(l.subarray(t*A,(t+1)*A))}const k=0===g?null:1===g?v[0]:new Uint8Array(x);if(g>1){k.set(v[0]);for(let t=1;t<v.length;t++){const e=v[t];for(let t=0;t<x;t++)k[t]=k[t]&e[t]}}const{noDataValue:M}=e,S=null!=M&&w.range[0]<=M&&w.range[1]>=M;if(g>0&&S)for(let t=0;t<p;t++){const e=C[t],r=v[t]||k;for(let t=0;t<x;t++)0===r[t]&&(e[t]=M)}const T=g===p&&p>1?v:null,{pixelType:I}=w;return{width:h,height:f,bandCount:p,pixelType:I,depthCount:d,statistics:y,pixels:C,mask:k,bandMasks:T,noDataValues:c}}},51244:(t,e,r)=>{r.d(e,{D:()=>L,g:()=>R});var n=r(49186),o=r(97768),i=r(14140),s=r(4151),a=r(74887),l=r(68060);class u{constructor(t){this._canvas=null,this._ctx=null,t&&(this._canvas=t.canvas,this._ctx=t.ctx||t.canvas&&t.canvas.getContext("2d"))}decode(t,e,r){if(!t||t.byteLength<10)throw new n.A("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:o=0,height:i=0,format:s}=e;const{applyJpegMask:l}=e;if(l&&(!o||!i))throw new n.A("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((n,c)=>{let h=null;"jpg"===s&&l&&(h=u._getMask(t,{width:o,height:i}));const f=new Blob([new Uint8Array(t)],{type:"image/"+s=="jpg"?"jpeg":s}),p=URL.createObjectURL(f),d=new Image;let m;d.src=p,d.onload=()=>{if(URL.revokeObjectURL(p),(0,a.G4)(r))return void c((0,a.NK)());o=d.width,i=d.height,this._canvas&&this._ctx?(this._canvas.width===o&&this._canvas.height===i||(this._canvas.width=o,this._canvas.height=i),this._ctx.clearRect(0,0,o,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=o,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(d,0,0);const t=this._ctx.getImageData(0,0,o,i);let s;if(m=t.data,e.renderOnCanvas){if(h)for(s=0;s<h.length;s++)h[s]?m[4*s+3]=255:m[4*s+3]=0;return this._ctx.putImageData(t,0,0),void n(null)}const l=o*i,u=new Uint8Array(l),f=new Uint8Array(l),g=new Uint8Array(l);if(h)for(s=0;s<l;s++)u[s]=m[4*s],f[s]=m[4*s+1],g[s]=m[4*s+2];else for(h=new Uint8Array(l),s=0;s<l;s++)u[s]=m[4*s],f[s]=m[4*s+1],g[s]=m[4*s+2],h[s]=m[4*s+3];n({width:o,height:i,pixels:[u,f,g],mask:h,pixelType:"u8"})},d.onerror=()=>{URL.revokeObjectURL(p),c("cannot load image")}}))}static _getMask(t,e){let r=null;try{const n=new Uint8Array(t),o=Math.ceil(n.length/2);let i=0;const s=n.length-2;for(i=o;i<s&&(255!==n[i]||217!==n[i+1]);i++);if(i+=2,i<n.length-1){const t=new l.Z(n.subarray(i)).getBytes();r=new Uint8Array(e.width*e.height);let o=0;for(let e=0;e<t.length;e++)for(let n=7;n>=0;n--)r[o++]=t[e]>>n&1}}catch(t){}return r}}var c=r(61294);class h{static decode(t,e=!1){const r=new Uint8Array(t),n=new c.J;n.parse(r);const{width:o,height:i,numComponents:s,eof:a}=n,u=n.getData(o,i,!0),h=o*i;let f,p=null,d=0,m=0,g=0;if(!e&&a<r.length-1)try{const t=new l.Z(r.subarray(a)).getBytes();p=new Uint8Array(h);let e=0;for(d=0;d<t.length;d++)for(g=7;g>=0;g--)p[e++]=t[d]>>g&1}catch{}if(1===s&&u.length===o*i){const t=new Uint8Array(u.buffer);f=[t,t,t]}else{for(f=[],d=0;d<3;d++)f.push(new Uint8Array(h));for(g=0,m=0;m<h;m++)for(d=0;d<3;d++)f[d][m]=u[g++]}return{width:o,height:i,pixels:f,mask:p}}}var f=r(49589),p=r(56582),d=r(16019);const m=(t,e)=>{const r=e.width*e.height,n=e.pixelType;return Math.floor(t.byteLength/(r*g(n)))},g=t=>{let e=1;switch(t){case Uint8Array:case Int8Array:e=1;break;case Uint16Array:case Int16Array:e=2;break;case Uint32Array:case Int32Array:case Float32Array:e=4;break;case Float64Array:e=8}return e};class y{static decode(t,e){const r=e.pixelType,n=[],o=e.width*e.height,i=m(t,e),{bandIds:s,format:a}=e,l=s?.length||m(t,e),u=t.byteLength-t.byteLength%(o*g(r)),c=new r(t,0,o*i);let h,f,p,d,y=null;if("bip"===a)for(h=0;h<l;h++){for(p=new r(o),d=s?s[h]:h,f=0;f<o;f++)p[f]=c[f*i+d];n.push(p)}else if("bsq"===a)for(h=0;h<l;h++)d=s?s[h]:h,n.push(c.subarray(d*o,(d+1)*o));return u<t.byteLength-1&&(y=((t,e)=>{if(8*t.byteLength<e)return null;const r=new Uint8Array(t,0,Math.ceil(e/8)),n=new Uint8Array(e);let o=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)n[o++]=i>>a&1;for(a=7;o<e-1;)i=r[r.length-1],n[o++]=i>>a&1,a--;return n})(t.slice(u),o)),{pixels:n,mask:y}}}var w=r(45664),b=r(47124),C=function(t){var e,r,n;function o(t){var e,r,n,o,i,s,a,l,u,c,h,f,p;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join(""),l){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},o=this.readUInt16(),n=this.readUInt16()||100,i.delay=1e3*o/n,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,e-=4),t=(null!=i?i.data:void 0)||this.imgData,h=0;0<=e?h<e:h>e;0<=e?++h:--h)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(c=this.read(e)).indexOf(0),a=String.fromCharCode.apply(String,c.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,c.slice(s+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(p=this.colorType)||6===p,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return o.load=function(t,e,r){var n;return"function"==typeof e&&(r=e),(n=new XMLHttpRequest).open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){var t;return t=new o(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof r?r(t):void 0},n.send(null)},o.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},o.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.decodePixels=function(t){var e,r,n,o,i,s,a,u,c,h,f,p,d,m,g,y,w,b,C,v,x,A,k;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=(t=new l.Z(t)).getBytes(),y=(p=this.pixelBitlength/8)*this.width,d=new Uint8Array(y*this.height),s=t.length,g=0,m=0,r=0;m<s;){switch(t[m++]){case 0:for(o=C=0;C<y;o=C+=1)d[r++]=t[m++];break;case 1:for(o=v=0;v<y;o=v+=1)e=t[m++],i=o<p?0:d[r-p],d[r++]=(e+i)%256;break;case 2:for(o=x=0;x<y;o=x+=1)e=t[m++],n=(o-o%p)/p,w=g&&d[(g-1)*y+n*p+o%p],d[r++]=(w+e)%256;break;case 3:for(o=A=0;A<y;o=A+=1)e=t[m++],n=(o-o%p)/p,i=o<p?0:d[r-p],w=g&&d[(g-1)*y+n*p+o%p],d[r++]=(e+Math.floor((i+w)/2))%256;break;case 4:for(o=k=0;k<y;o=k+=1)e=t[m++],n=(o-o%p)/p,i=o<p?0:d[r-p],0===g?w=b=0:(w=d[(g-1)*y+n*p+o%p],b=n&&d[(g-1)*y+(n-1)*p+o%p]),a=i+w-b,u=Math.abs(a-i),h=Math.abs(a-w),f=Math.abs(a-b),c=u<=h&&u<=f?i:h<=f?w:b,d[r++]=(e+c)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}g++}return d},o.prototype.decodePalette=function(){var t,e,r,n,o,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+r.length),n=0,r.length,t=0,e=s=0,a=r.length;s<a;e=s+=3)o[n++]=r[e],o[n++]=r[e+1],o[n++]=r[e+2],o[n++]=null!=(l=i[t++])?l:255;return o},o.prototype.copyToImageData=function(t,e){var r,n,o,i,s,a,l,u,c,h,f;if(n=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(o=t.data||t).length,s=c||e,i=a=0,1===n)for(;i<u;)l=c?4*e[i/4]:a,h=s[l++],o[i++]=h,o[i++]=h,o[i++]=h,o[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,a=l;else for(;i<u;)l=c?4*e[i/4]:a,o[i++]=s[l++],o[i++]=s[l++],o[i++]=s[l++],o[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},o.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},r=t.document&&t.document.createElement("canvas"),n=r&&r.getContext("2d"),e=function(t){var e;return n.width=t.width,n.height=t.height,n.clearRect(0,0,t.width,t.height),n.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},o.prototype.decodeFrames=function(t){var r,n,o,i,s,a,l,u;if(this.animation){for(u=[],n=s=0,a=(l=this.animation.frames).length;s<a;n=++s)r=l[n],o=t.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(o,i),r.imageData=o,u.push(r.image=e(o));return u}},o.prototype.renderFrame=function(t,e){var r,n,o;return r=(n=this.animation.frames)[e],o=n[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=o?o.disposeOp:void 0)?t.clearRect(o.xOffset,o.yOffset,o.width,o.height):2===(null!=o?o.disposeOp:void 0)&&t.putImageData(o.imageData,o.xOffset,o.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},o.prototype.animate=function(t){var e,r,n,o,i,s,a=this;return r=0,s=this.animation,o=s.numFrames,n=s.frames,i=s.numPlays,(e=function(){var s,l;if(s=r++%o,l=n[s],a.renderFrame(t,s),o>1&&r/o<i)return a.animation._timeout=setTimeout(e,l.delay)})()},o.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},o.prototype.render=function(t){var e,r;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},o}(self);const v=new Set(["jpg","png","bmp","gif"]);async function x(t,e){if(!b.Z)throw new n.A("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,f.Hh)();const{offset:r}=e,{width:o,height:a,pixelType:l,statistics:u,depthCount:c,noDataValues:h,bandMasks:p,pixels:d,mask:m}=(0,f.D4)(t,{inputOffset:r,returnInterleaved:e.returnInterleaved}),g=new i.A({width:o,height:a,pixelType:l.toLowerCase(),pixels:d,mask:m,statistics:u.map((({minValue:t,maxValue:e})=>new s.z(t,e))),bandMasks:p,depthCount:c,noDataValues:h});return u?.length||g.updateStatistics(),g}async function A(t,e){const r=await(0,w.D4)(t,{...e,noDataValue:e.tiffNoDataValue,matchAllNoData:e.matchAllNoData});(0,o.Lw)(r);const n=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,bandMasks:r.bandMasks,statistics:null});return n.updateStatistics(),n}function k(t,e){const r=e.pixelType||"u8",n=i.A.getPixelArrayConstructor(r),o="u8"===r?t:new n(t.buffer),s=[],a=e.planes||1;if(1===a)s.push(o);else for(let r=0;r<a;r++){const i=(e.width||1)*(e.height||t.length),l=new n(i);for(let t=0;t<i;t++)l[t]=o[t*a+r];s.push(l)}const l=new i.A({width:e.width||1,height:e.height||t.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function M(t,e){return k(new l.Z(new Uint8Array(t)).getBytes(),e)}function S(t,e){return k((0,p.D)(t,e.offset,e.eof,!e.isInputBigEndian),e)}function T(t,e,r){const{pixelTypeCtor:n}=function(t){let e=null,r=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,e=Uint8Array;break;case"u16":r=r||65535,e=Uint16Array;break;case"u32":r=r||2**32-1,e=Uint32Array;break;case"s8":r=r||-128,e=Int8Array;break;case"s16":r=r||-32768,e=Int16Array;break;case"s32":r=r||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:r}}(e.pixelType),o=(0,y.decode)(t,{width:e.width,height:e.height,pixelType:n,format:r}),s=new i.A({width:e.width,height:e.height,pixels:o.pixels,pixelType:e.pixelType,mask:o.mask,statistics:null});return s.updateStatistics(),s}function I(t,e){const r=h.decode(t,e.hasNoZlibMask??void 0),n=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:"u8",mask:r.mask,statistics:null});return n.updateStatistics(),n}function P(t,e){const r=new Uint8Array(t),n=new C(r),{width:o,height:s}=e,a=o*s,l=n.decode();let u,c=0,h=0;const f=new Uint8Array(a);for(c=0;c<a;c++)f[c]=l[4*c+3];const p=new i.A({width:o,height:s,pixels:[],pixelType:"u8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];p.addData({pixels:u})}return p.updateStatistics(),p}function E(t){if(null==t)throw new n.A("rasterCodec:decode","parameter encodeddata is required.");const e=new Uint8Array(t,0,10);let r="";return 255===e[0]&&216===e[1]?r="jpg":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?r="png":67===e[0]&&110===e[1]&&116===e[2]&&90===e[3]&&73===e[4]&&109===e[5]&&97===e[6]&&103===e[7]&&101===e[8]&&32===e[9]?r="lerc":76===e[0]&&101===e[1]&&114===e[2]&&99===e[3]&&50===e[4]&&32===e[5]?r="lerc2":73===e[0]&&73===e[1]&&42===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&42===e[3]||73===e[0]&&73===e[1]&&43===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&43===e[3]?r="tiff":71===e[0]&&73===e[1]&&70===e[2]?r="gif":66===e[0]&&77===e[1]?r="bmp":String.fromCharCode.apply(null,e).toLowerCase().includes("error")&&(r="error"),r}function R(t){let e=E(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function L(t,e={},r){if(null==t)throw new n.A("rasterCodec:decode","missing encodeddata parameter.");let o=e.format?.toLowerCase();if(!("bsq"!==o&&"bip"!==o||null!=e.width&&null!=e.height))throw new n.A("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===o&&e.customOptions)return async function(t,e){const r=await(0,w.s$)(t,e.customOptions),n=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}(t,e);if((!o||"bsq"!==o&&"bip"!==o&&"deflate"!==o&&"lzw"!==o)&&(o=E(t)),e.useCanvas&&v.has(o))return async function(t,e,r,n){const o=new u,s={applyJpegMask:!1,format:e,...r},a=await o.decode(t,s,n),l=new i.A(a);return l.updateStatistics(),l}(t,o,e,r);const s=function(t){let e=null;switch(t){case"lerc":case"lerc2":e=x;break;case"jpg":e=I;break;case"png":e=P;break;case"bsq":case"bip":e=(e,r)=>T(e,r,t);break;case"tiff":e=A;break;case"deflate":e=M;break;case"lzw":e=S;break;case"error":e=()=>{throw new n.A("rasterCodec:decode","input data contains error")};break;default:e=()=>{throw new n.A("rasterCodec:decode","unsupported raster format")}}return e}(o);let a;e.isPoint&&(null!=(e={...e}).width&&e.width++,null!=e.height&&e.height++);const{offsets:l}=e;if(l&&l.length>1){const r=l.map(((r,n)=>s(t.slice(r,l[n+1]),e))),n=await Promise.all(r);a=n[0],a.pixels=n.map((t=>t.pixels[0]));const o=n.map((t=>t.mask));n.some((t=>null!=t))&&(o.forEach(((t,e)=>{null==t&&(o[e]=new Uint8Array(a.width*a.height).fill(255))})),a.bandMasks=o,a.mask=i.A.combineBandMasks(o)),a.updateStatistics()}else a=await s(t,{...e,offset:l?.[0]??e.offset});return"jpg"!==o&&null!=e.noDataValue&&1===a.depthCount&&(0,d.Sp)(a,e.noDataValue,{customFloatTolerance:e.tolerance}),e.isPoint&&function(t,e=1){if(!t)return;const{pixels:r,width:n,height:o,mask:s}=t;if(!r||0===r.length)return;const a=r.length,l=n-1,u=o-1,c=[];let h,f,p,d,m,g,y=null;const w=i.A.getPixelArrayConstructor(t.pixelType);if(0===e){for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(d=f*n,p=0;p<l;p++)g[f*l+p]=m[d+p];c.push(g)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(d=f*n,p=0;p<l;p++)y[f*l+p]=s[d+p]}else{for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(d=f*n,p=0;p<l;p++)g[f*l+p]=(m[d+p]+m[d+p+1]+m[d+n+p]+m[d+n+p+1])/4;c.push(g)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(d=f*n,p=0;p<l;p++)y[f*l+p]=Math.min.apply(null,[s[d+p],s[d+p+1],s[d+n+p],s[d+n+p+1]])}t.width=l,t.height=u,t.mask=y,t.pixels=c}(a),a}},56582:(t,e,r)=>{function n(){const t=[];for(let e=0;e<=257;e++)t[e]=[e];return t}function o(t,e){for(let r=0;r<e.length;r++)t.push(e[r])}r.d(e,{D:()=>s});const i=new Set;function s(t,e,r,s=!0){const a=function(t,e,r,n=!0){if(e%4!=0||r%4!=0){const o=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(o),s=new Uint8Array(t,e,r);if(n)for(let t=0;t<i.length;t+=4)i[t]=s[t+3],i[t+1]=s[t+2],i[t+2]=s[t+1],i[t+3]=s[t];else i.set(s);return new Uint32Array(i.buffer)}if(n){const n=new Uint8Array(t,e,r),o=new Uint8Array(n.length);for(let t=0;t<o.length;t+=4)o[t]=n[t+3],o[t+1]=n[t+2],o[t+2]=n[t+1],o[t+3]=n[t];return new Uint32Array(o.buffer)}return new Uint32Array(t,e,r/4)}(t,e,r,s);let l=9,u=n(),c=32,h=u.length,f=[],p=1,d=a[0],m=0;const g=a.length,y=8*(4*g-r),w=[];for(;null!=d;){if(c>=l)c-=l,m=d>>>32-l,d<<=l;else{m=d>>>32-c,d=a[p++];const t=l-c;c=32-t,m=(m<<t)+(d>>>c),d<<=t}if(257===m)break;if(256===m){l=9,u=n(),h=u.length,f=[];continue}const t=u[m];if(null==t){if(m>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[h++]=f.slice(),o(w,f)}else o(w,t),f.push(t[0]),f.length>1&&(u[h++]=f.slice()),f=t.slice();if(i.has(h)&&l++,0===c&&(d=a[p++],c=32),p>g||p===g&&c<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},61294:(t,e,r)=>{r.d(e,{J:()=>s});var n,o=r(11053),i={exports:{}};const s=(0,o.g)(function(){return n||(n=1,t=i,e=function(){var t=function(){function t(t){this.message="JPEG error: "+t}return t.prototype=new Error,t.prototype.name="JpegError",t.constructor=t,t}();return function(){if(!self||!self.Uint8ClampedArray)return null;var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,n=799,o=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function c(){this.decodeTransform=null,this.colorTransform=-1}function h(t,e){for(var r,n,o=0,i=[],s=16;s>0&&!t[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(n=0;n<t[r];n++){for((l=i.pop()).children[l.index]=e[o];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;o++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(t,e,r){return 64*((t.blocksPerLine+1)*e+r)}function p(r,n,o,i,s,a,l,u,c){var h=o.mcusPerLine,p=o.progressive,d=n,m=0,y=0;function w(){if(y>0)return y--,m>>y&1;if(255===(m=r[n++])){var e=r[n++];if(e)throw new t("unexpected marker "+(m<<8|e).toString(16))}return y=7,m>>>7}function b(e){for(var r=e;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new t("invalid huffman sequence")}}function C(t){for(var e=0;t>0;)e=e<<1|w(),t--;return e}function v(t){if(1===t)return 1===w()?1:-1;var e=C(t);return e>=1<<t-1?e:e+(-1<<t)+1}var x,A=0,k=0;function M(t,e,r,n,o){var i=r%h;e(t,f(t,(r/h|0)*t.v+n,i*t.h+o))}function S(t,e,r){e(t,f(t,r/t.blocksPerLine|0,r%t.blocksPerLine))}var T,I,P,E,R,L,U=i.length;L=p?0===a?0===u?function(t,e){var r=b(t.huffmanTableDC),n=0===r?0:v(r)<<c;t.blockData[e]=t.pred+=n}:function(t,e){t.blockData[e]|=w()<<c}:0===u?function(t,r){if(A>0)A--;else for(var n=a,o=l;n<=o;){var i=b(t.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=e[n+=u];t.blockData[r+h]=v(s)*(1<<c),n++}else{if(u<15){A=C(u)+(1<<u)-1;break}n+=16}}}:function(r,n){for(var o,i,s=a,u=l,h=0;s<=u;){var f=e[s];switch(k){case 0:if(h=(i=b(r.huffmanTableAC))>>4,0==(o=15&i))h<15?(A=C(h)+(1<<h),k=4):(h=16,k=1);else{if(1!==o)throw new t("invalid ACn encoding");x=v(o),k=h?2:3}continue;case 1:case 2:r.blockData[n+f]?r.blockData[n+f]+=w()<<c:0==--h&&(k=2===k?3:0);break;case 3:r.blockData[n+f]?r.blockData[n+f]+=w()<<c:(r.blockData[n+f]=x<<c,k=0);break;case 4:r.blockData[n+f]&&(r.blockData[n+f]+=w()<<c)}s++}4===k&&0==--A&&(k=0)}:function(t,r){var n=b(t.huffmanTableDC),o=0===n?0:v(n);t.blockData[r]=t.pred+=o;for(var i=1;i<64;){var s=b(t.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=e[i+=l];t.blockData[r+u]=v(a),i++}else{if(l<15)break;i+=16}}};var D,O,B,N,G=0;for(O=1===U?i[0].blocksPerLine*i[0].blocksPerColumn:h*o.mcusPerColumn;G<O;){var _=s?Math.min(O-G,s):O;for(I=0;I<U;I++)i[I].pred=0;if(A=0,1===U)for(T=i[0],R=0;R<_;R++)S(T,L,G),G++;else for(R=0;R<_;R++){for(I=0;I<U;I++)for(B=(T=i[I]).h,N=T.v,P=0;P<N;P++)for(E=0;E<B;E++)M(T,L,G,P,E);G++}y=0,(D=g(r,n))&&D.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+D.invalid),n=D.offset);var F=D&&D.marker;if(!F||F<=65280)throw new t("marker was not found");if(!(F>=65488&&F<=65495))break;n+=2}return(D=g(r,n))&&D.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+D.invalid),n=D.offset),n-d}function d(e,c,h){var f,p,d,m,g,y,w,b,C,v,x,A,k,M,S,T,I,P=e.quantizationTable,E=e.blockData;if(!P)throw new t("missing required Quantization Table.");for(var R=0;R<64;R+=8)C=E[c+R],v=E[c+R+1],x=E[c+R+2],A=E[c+R+3],k=E[c+R+4],M=E[c+R+5],S=E[c+R+6],T=E[c+R+7],C*=P[R],v|x|A|k|M|S|T?(v*=P[R+1],x*=P[R+2],A*=P[R+3],k*=P[R+4],M*=P[R+5],S*=P[R+6],T*=P[R+7],p=(f=(f=l*C+128>>8)+(p=l*k+128>>8)+1>>1)-p,I=(d=x)*a+(m=S)*s+128>>8,d=d*s-m*a+128>>8,w=(g=(g=u*(v-T)+128>>8)+(w=M<<4)+1>>1)-w,y=(b=(b=u*(v+T)+128>>8)+(y=A<<4)+1>>1)-y,m=(f=f+(m=I)+1>>1)-m,d=(p=p+d+1>>1)-d,I=g*i+b*o+2048>>12,g=g*o-b*i+2048>>12,b=I,I=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,w=I,h[R]=f+b,h[R+7]=f-b,h[R+1]=p+w,h[R+6]=p-w,h[R+2]=d+y,h[R+5]=d-y,h[R+3]=m+g,h[R+4]=m-g):(I=l*C+512>>10,h[R]=I,h[R+1]=I,h[R+2]=I,h[R+3]=I,h[R+4]=I,h[R+5]=I,h[R+6]=I,h[R+7]=I);for(var L=0;L<8;++L)C=h[L],(v=h[L+8])|(x=h[L+16])|(A=h[L+24])|(k=h[L+32])|(M=h[L+40])|(S=h[L+48])|(T=h[L+56])?(p=(f=4112+((f=l*C+2048>>12)+(p=l*k+2048>>12)+1>>1))-p,I=(d=x)*a+(m=S)*s+2048>>12,d=d*s-m*a+2048>>12,m=I,w=(g=(g=u*(v-T)+2048>>12)+(w=M)+1>>1)-w,y=(b=(b=u*(v+T)+2048>>12)+(y=A)+1>>1)-y,I=g*i+b*o+2048>>12,g=g*o-b*i+2048>>12,b=I,I=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,C=(C=(f=f+m+1>>1)+b)<16?0:C>=4080?255:C>>4,v=(v=(p=p+d+1>>1)+(w=I))<16?0:v>=4080?255:v>>4,x=(x=(d=p-d)+y)<16?0:x>=4080?255:x>>4,A=(A=(m=f-m)+g)<16?0:A>=4080?255:A>>4,k=(k=m-g)<16?0:k>=4080?255:k>>4,M=(M=d-y)<16?0:M>=4080?255:M>>4,S=(S=p-w)<16?0:S>=4080?255:S>>4,T=(T=f-b)<16?0:T>=4080?255:T>>4,E[c+L]=C,E[c+L+8]=v,E[c+L+16]=x,E[c+L+24]=A,E[c+L+32]=k,E[c+L+40]=M,E[c+L+48]=S,E[c+L+56]=T):(I=(I=l*C+8192>>14)<-2040?0:I>=2024?255:I+2056>>4,E[c+L]=I,E[c+L+8]=I,E[c+L+16]=I,E[c+L+24]=I,E[c+L+32]=I,E[c+L+40]=I,E[c+L+48]=I,E[c+L+56]=I)}function m(t,e){for(var r=e.blocksPerLine,n=e.blocksPerColumn,o=new Int16Array(64),i=0;i<n;i++)for(var s=0;s<r;s++)d(e,f(e,i,s),o);return e.blockData}function g(t,e,r){function n(e){return t[e]<<8|t[e+1]}var o=t.length-1,i=r<e?r:e;if(e>=o)return null;var s=n(e);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:e};for(var a=n(i);!(a>=65472&&a<=65534);){if(++i>=o)return null;a=n(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function n(){var t=r[l]<<8|r[l+1];return l+=2,t}function o(){var t=n(),e=l+t-2,o=g(r,e,l);o&&o.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+o.invalid),e=o.offset);var i=r.subarray(l,e);return l+=i.length,i}function i(t){for(var e=Math.ceil(t.samplesPerLine/8/t.maxH),r=Math.ceil(t.scanLines/8/t.maxV),n=0;n<t.components.length;n++){G=t.components[n];var o=Math.ceil(Math.ceil(t.samplesPerLine/8)*G.h/t.maxH),i=Math.ceil(Math.ceil(t.scanLines/8)*G.v/t.maxV),s=e*G.h,a=r*G.v*64*(s+1);G.blockData=new Int16Array(a),G.blocksPerLine=o,G.blocksPerColumn=i}t.mcusPerLine=e,t.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],d=[],y=[],w=n();if(65496!==w)throw new t("SOI not found");for(w=n();65497!==w;){var b,C,v;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var x=o();65504===w&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65518===w&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]<<8|x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var A=n()+l-2;l<A;){var k=r[l++],M=new Uint16Array(64);if(k>>4){if(k>>4!=1)throw new t("DQT - invalid table spec");for(C=0;C<64;C++)M[e[C]]=n()}else for(C=0;C<64;C++)M[e[C]]=r[l++];f[15&k]=M}break;case 65472:case 65473:case 65474:if(s)throw new t("Only single frame JPEGs supported");n(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=n(),s.samplesPerLine=n(),s.components=[],s.componentIds={};var S,T=r[l++],I=0,P=0;for(b=0;b<T;b++){S=r[l];var E=r[l+1]>>4,R=15&r[l+1];I<E&&(I=E),P<R&&(P=R);var L=r[l+2];v=s.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),s.componentIds[S]=v-1,l+=3}s.maxH=I,s.maxV=P,i(s);break;case 65476:var U=n();for(b=2;b<U;){var D=r[l++],O=new Uint8Array(16),B=0;for(C=0;C<16;C++,l++)B+=O[C]=r[l];var N=new Uint8Array(B);for(C=0;C<B;C++,l++)N[C]=r[l];b+=17+B,(D>>4?d:y)[15&D]=h(O,N)}break;case 65501:n(),a=n();break;case 65498:n();var G,_=r[l++],F=[];for(b=0;b<_;b++){var V=s.componentIds[r[l++]];G=s.components[V];var z=r[l++];G.huffmanTableDC=y[z>>4],G.huffmanTableAC=d[15&z],F.push(G)}var j=r[l++],W=r[l++],Z=r[l++],H=p(r,l,s,F,a,j,W,Z>>4,15&Z);l+=H;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new t("unknown marker "+w.toString(16))}w=n()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=c,this.components=[],b=0;b<s.components.length;b++){var q=f[(G=s.components[b]).quantizationId];q&&(G.quantizationTable=q),this.components.push({output:m(0,G),scaleX:G.h/s.maxH,scaleY:G.v/s.maxV,blocksPerLine:G.blocksPerLine,blocksPerColumn:G.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(t,e){var r,n,o,i,s,a,l,u,c,h,f,p=this.width/t,d=this.height/e,m=0,g=this.components.length,y=t*e*g,w=new Uint8ClampedArray(y),b=new Uint32Array(t),C=4294967288;for(l=0;l<g;l++){for(n=(r=this.components[l]).scaleX*p,o=r.scaleY*d,m=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<t;s++)u=0|s*n,b[s]=(u&C)<<3|7&u;for(a=0;a<e;a++)for(h=i*((u=0|a*o)&C)|(7&u)<<3,s=0;s<t;s++)w[m]=f[h+b[s]],m+=g}var v=this.decodeTransform;if(v)for(l=0;l<y;)for(u=0,c=0;u<g;u++,l++,c+=2)w[l]=(w[l]*v[c]>>8)+v[c+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(t){for(var e,r,n,o=0,i=t.length;o<i;o+=3)e=t[o],r=t[o+1],n=t[o+2],t[o]=e-179.456+1.402*n,t[o+1]=e+135.459-.344*r-.714*n,t[o+2]=e-226.816+1.772*r;return t},_convertYcckToRgb:function(t){for(var e,r,n,o,i=0,s=0,a=t.length;s<a;s+=4)e=t[s],r=t[s+1],n=t[s+2],o=t[s+3],t[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*e+.00048449797120281*o-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*e-.00477271405408747*o+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*o+.48357088451265)+o*(-.000336197177618394*o+.484791561490776),t[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*e+.000426105652938837*o-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*e+.000770482631801132*o-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*o+.25802910206845)+o*(-.000318913117588328*o-.213742400323665),t[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*e-.00288260236853442*o+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*e+.000560833691242812*o-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*o+.116935020465145)+o*(-.000343531996510555*o+.24165260232407);return t},_convertYcckToCmyk:function(t){for(var e,r,n,o=0,i=t.length;o<i;o+=4)e=t[o],r=t[o+1],n=t[o+2],t[o]=434.456-e-1.402*n,t[o+1]=119.541-e+.344*r+.714*n,t[o+2]=481.816-e-1.772*r;return t},_convertCmykToRgb:function(t){for(var e,r,n,o,i=0,s=1/255,a=0,l=t.length;a<l;a+=4)e=t[a]*s,r=t[a+1]*s,n=t[a+2]*s,o=t[a+3]*s,t[i++]=255+e*(-4.387332384609988*e+54.48615194189176*r+18.82290502165302*n+212.25662451639585*o-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*n-17.873870861415444*o-5.497006427196366)+n*(-2.5217340131683033*n-21.248923337353073*o+17.5119270841813)-o*(21.86122147463605*o+189.48180835922747),t[i++]=255+e*(8.841041422036149*e+60.118027045597366*r+6.871425592049007*n+31.159100130055922*o-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*n+131.35250912493976*o-190.9453302588951)+n*(4.444339102852739*n+9.8632861493405*o-24.86741582555878)-o*(20.737325471181034*o+187.80453709719578),t[i++]=255+e*(.8842522430003296*e+8.078677503112928*r+30.89978309703729*n-.23883238689178934*o-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*n+50.606957656360734*o-112.23884253719248)+n*(.03296041114873217*n+115.60384449646641*o-193.58209356861505)-o*(22.33816807309886*o+180.12613974708367);return t},getData:function(e,r,n){if(this.numComponents>4)throw new t("Unsupported color mode");var o=this._getLinearizedBlockData(e,r);if(1===this.numComponents&&n){for(var i=o.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=o[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(o);if(4===this.numComponents){if(this._isColorConversionNeeded())return n?this._convertYcckToRgb(o):this._convertYcckToCmyk(o);if(n)return this._convertCmykToRgb(o)}return o}},c}()},void 0!==(r=e())&&(t.exports=r)),i.exports;var t,e,r}())},67369:(t,e,r)=>{r.d(e,{L7:()=>a,M5:()=>d,R8:()=>w,S2:()=>b,hf:()=>x,hs:()=>p,iv:()=>y,kH:()=>u,vL:()=>A,vj:()=>l});var n=r(68197),o=r(85334),i=r(66552),s=r(12195);const a=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],l=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],u=new i.J({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function c(t,e){if(!t||!e||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]>e[r]+2||t[r]<e[r]-2)return!1;return!0}function h(t){const e=t.clone();return e.fromColor=t.toColor,e.toColor=t.fromColor,e.algorithm=t.algorithm,e}function f(t,e){if(!t)return;const r=e??l;let o=null;return"algorithmic"===t.type?r.some((e=>{if(c(t.fromColor.toRgb(),e.fromColor)&&c(t.toColor.toRgb(),e.toColor))return o=e.id,!0})):"multipart"===t.type&&r.some((e=>{const r=t.colorRamps,i=e.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((t,e)=>{if(!c(r[e].fromColor.toRgb(),new n.A(t.fromColor).toRgb())||!c(r[e].toColor.toRgb(),new n.A(t.toColor).toRgb()))return!0}))){if(o)return!0;o=e.id}})),o}function p(t,e=!1){const r="string"==typeof t?t:function(t,e,r=!1){if(!t)return;let n=!1,o=f(t,e);return null!=o||r||(n=!0,o=f(t=function(t){if("multipart"===t.type){const e=t.clone();return e.colorRamps?.length?(e.colorRamps=e.colorRamps.reverse().map((t=>h(t))),e):e}return h(t)}(t),e)),o?{id:o,inverted:n}:void 0}(t,void 0,e)?.id;return r?u.toJSON(r):null}function d(t,e="esriCIELabAlgorithm"){const r=l.find((({id:e})=>e===t));return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map((t=>({type:"algorithmic",algorithm:e,fromColor:[...t.fromColor],toColor:[...t.toColor]})))}:{type:"algorithmic",algorithm:e,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function m(t){const e=(t=t||{}).numColors||256,r=t.distanceOffset||0,n=null!=t.isCustomInterval?t.isCustomInterval:null!==t.distanceInterval&&t.distanceInterval!==1/(e-1),o=t.distanceInterval||1/(e-1);return{...t,numColors:e,distanceOffset:r,interpolateAlpha:!!t.interpolateAlpha,distanceInterval:o,isCustomInterval:n,weights:t.weights}}function g(t,e){let{fromColor:r,toColor:n}=t;r=[...r],n=[...n],3===r.length&&(r=r.concat([255])),3===n.length&&(n=n.concat([255]));const i=t.algorithm||"esriCIELabAlgorithm",s=m(e),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:c}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,n];const h={r:r[0],g:r[1],b:r[2]},f={r:n[0],g:n[1],b:n[2]},p="esriCIELabAlgorithm"===i?function(t,e,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=t;const c=(e.l-a)*i,h=(e.a-l)*i,f=(e.b-u)*i,p=[];if(o){const t=o/i;a+=t*c,l+=t*h,u+=t*f}for(let t=0;t<n-1;t++)p.push({l:a,a:l,b:u}),a+=c,l+=h,u+=f;return p.push(s?{l:a,a:l,b:u}:e),p}((0,o.ZD)(h),(0,o.ZD)(f),s):"esriHSVAlgorithm"===i?function(t,e,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=0===t.s,l=0===e.s;let u=t.h,c=e.h;a&&!l?u=c:l&&!a&&(e={...e,h:u},c=u);let h,f=Math.abs(c-u);const p=360;f<180?h=(c-u)*i:(f=p-f,h=u>c?f*i:-f*i);const d=(e.s-t.s)*i,m=(e.v-t.v)*i;let{s:g,v:y}=t,w=u;if(o){const t=o/i;w=(w+t*h+p)%p,g+=t*d,y+=t*m}const b=[];for(let t=0;t<n-1;t++)b.push({h:w,s:g,v:y}),w=(w+h+p)%p,g+=d,y+=m;return b.push(s?{h:w,s:g,v:y}:e),b}((0,o.N2)(h),(0,o.N2)(f),s):function(t,e,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=t.h,l=e.h,u=2*Math.PI;let c;if(a<=l){const t=l-a,e=l-a-u;c=Math.abs(e)<Math.abs(t)?e:t}else{const t=l+u-a,e=l-a;c=Math.abs(e)<Math.abs(t)?e:t}const h=c*i,f=(e.l-t.l)*i,p=(e.c-t.c)*i;let{l:d,c:m,h:g}=t;if(o){const t=o/i;d+=t*f,m+=t*p,g=(g+t*h+u)%u}const y=[];for(let t=0;t<n-1;t++)y.push({l:d,c:m,h:g}),d+=f,m+=p,g=(g+h+u)%u;return y.push(s?{l:d,c:m,h:g}:e),y}((0,o.RH)(h),(0,o.RH)(f),s),d=[],g=r[3]??255,y=((n[3]??255)-g)/(a-1);for(let t=0;t<a;t++){const{r:e,g:r,b:n}=(0,o.$)(p[t]),i=c?Math.round(g+y*t):255;d.push([e,r,n,i])}return d}function y(t,e){const r=(0,s.W)(t)?t.toJSON():t;return"multipart"===r.type?function(t,e){const{numColors:r,interpolateAlpha:n}=m(e);let o=e?.weights;const{colorRamps:i}=t;if(o){const t=o.reduce(((t,e)=>t+e));o=o.map((e=>e/t))}else{o=[];for(let t=0;t<i.length;t++)o[t]=1/i.length}const s=[],a=1/(r-1);let l=0,u=!1;for(let t=0;t<i.length;t++){const e=s.length,c=u?0:e*a-l;l+=o[t];let h=t===i.length-1?r-1-e:(o[t]-c)/a;if(u=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;const f=g(i[t],{numColors:h,interpolateAlpha:n,distanceOffset:c/o[t],distanceInterval:a/o[t]});s.push(...f)}const c=[...i[i.length-1].toColor];return 3===c.length&&c.push(255),s.push(c),s}(r,e):g(r,e)}function w(t,e){const r=y(t,e),n=e?.interpolateAlpha;return r.forEach(((t,e)=>{t.unshift(e),n||t.pop()})),r}function b(t){const e=[];for(let r=0;r<t.length;r+=4){const n=(0,o.N2)({r:t[r],g:t[r+1],b:t[r+2]});e.push([n.h/60,n.s/100,255*n.v/100])}return e}function C(t){const e=(0,o.N2)(t);return{type:"HsvColor",Hue:e.h,Saturation:e.s,Value:e.v,AlphaValue:255}}function v(t){const e=t.toJSON();return{Algorithm:e?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:C(t.fromColor),ToColor:C(t.toColor)}}function x(t){const e=p(t);if(!e)return null;if("algorithmic"===t.type)return{...v(t),Name:e};if(t.colorRamps){const r=t.colorRamps.map(v);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:e}}return null}function A(t){const e=t.reverse().map((t=>{const e=t.toString(16);return e.length<2?"0"+e:e}));return 4294967295&Number.parseInt(e.join(""),16)}},68060:(t,e,r)=>{r.d(e,{Z:()=>s});var n,o=r(11053),i={exports:{}};const s=(0,o.g)(function(){return n||(n=1,e=i,void 0!==(t=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(t){var e=this.buffer,r=e?e.byteLength:0;if(t<r)return e;for(var n=512;n<t;)n<<=1;for(var o=new Uint8Array(n),i=0;i<r;++i)o[i]=e[i];return this.buffer=o},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var r=e+t;!this.eof&&this.bufferLength<r;)this.readBlock();var n=this.bufferLength;r>n&&(r=n)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(e,r)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,r){for(var n=t+e;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,r)},skip:function(t){t||(t=1),this.pos+=t},reset:function(){this.pos=0}},t}(),r=function(){if(!self||!self.Uint32Array)return null;var e=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),r=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),n=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],i=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function s(t){throw new Error(t)}function a(e){var r=0,n=e[r++],o=e[r++];-1!=n&&-1!=o||s("Invalid header in flate stream"),8!=(15&n)&&s("Unknown compression method in flate stream"),((n<<8)+o)%31!=0&&s("Bad FCHECK in flate stream"),32&o&&s("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,t.call(this)}return a.prototype=Object.create(t.prototype),a.prototype.getBits=function(t){for(var e,r=this.codeSize,n=this.codeBuf,o=this.bytes,i=this.bytesPos;r<t;)void 0===(e=o[i++])&&s("Bad encoding in flate stream"),n|=e<<r,r+=8;return e=n&(1<<t)-1,this.codeBuf=n>>t,this.codeSize=r-=t,this.bytesPos=i,e},a.prototype.getCode=function(t){for(var e=t[0],r=t[1],n=this.codeSize,o=this.codeBuf,i=this.bytes,a=this.bytesPos;n<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),o|=l<<n,n+=8}var u=e[o&(1<<r)-1],c=u>>16,h=65535&u;return(0==n||n<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=o>>c,this.codeSize=n-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(t){for(var e=t.length,r=0,n=0;n<e;++n)t[n]>r&&(r=t[n]);for(var o=1<<r,i=new Uint32Array(o),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<e;++u)if(t[u]==s){var c=0,h=a;for(n=0;n<s;++n)c=c<<1|1&h,h>>=1;for(n=c;n<o;n+=l)i[n]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function t(t,e,r,n,o){for(var i=t.getBits(r)+n;i-- >0;)e[d++]=o}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=o,u=i;else if(2==a){for(var c=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,p=Array(e.length),d=0;d<f;)p[e[d++]]=this.getBits(3);for(var m=this.generateHuffmanTable(p),g=0,y=(d=0,c+h),w=new Array(y);d<y;){var b=this.getCode(m);16==b?t(this,w,2,3,g):17==b?t(this,w,3,3,g=0):18==b?t(this,w,7,11,g=0):w[d++]=g=b}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var C=(L=this.buffer)?L.length:0,v=this.bufferLength;;){var x=this.getCode(l);if(x<256)v+1>=C&&(C=(L=this.ensureBuffer(v+1)).length),L[v++]=x;else{if(256==x)return void(this.bufferLength=v);var A=(x=r[x-=257])>>16;A>0&&(A=this.getBits(A)),g=(65535&x)+A,x=this.getCode(u),(A=(x=n[x])>>16)>0&&(A=this.getBits(A));var k=(65535&x)+A;v+g>=C&&(C=(L=this.ensureBuffer(v+g)).length);for(var M=0;M<g;++M,++v)L[v]=L[v-k]}}}else{var S,T=this.bytes,I=this.bytesPos;void 0===(S=T[I++])&&s("Bad block header in flate stream");var P=S;void 0===(S=T[I++])&&s("Bad block header in flate stream"),P|=S<<8,void 0===(S=T[I++])&&s("Bad block header in flate stream");var E=S;void 0===(S=T[I++])&&s("Bad block header in flate stream"),(E|=S<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,L=this.ensureBuffer(R+P),U=R+P;this.bufferLength=U;for(var D=R;D<U;++D){if(void 0===(S=T[I++])){this.eof=!0;break}L[D]=S}this.bytesPos=I}},a}())&&(e.exports=r)),i.exports;var t,e,r}())},70274:(t,e,r)=>{r.d(e,{u:()=>n,x:()=>o});const n=new(r(66552).J)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),o={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},85334:(t,e,r)=>{r.d(e,{$:()=>y,IB:()=>s,Iy:()=>A,N2:()=>w,RH:()=>C,ZD:()=>b});var n=r(68197),o=r(4576),i=r(4718);function s(t){return"r"in t&&"g"in t&&"b"in t}function a(t){return"h"in t&&"s"in t&&"v"in t}function l(t){return"l"in t&&"a"in t&&"b"in t}function u(t){return"l"in t&&"c"in t&&"h"in t}r(34727),r(87317),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],h=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function f(t,e){const r=[];let n,o;if(t[0].length!==e.length)throw new Error("dimensions do not match");const i=t.length,s=t[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=t[n][o]*e[o];r.push(a)}return r}function p(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=f(c,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function d(t){const e=f(h,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function m(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function g(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(t){return s(t)?t:u(t)?function(t){return d(g(function(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}(t)))}(t):l(t)?function(t){return d(g(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?d(t):a(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,o=n*r,i=o*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(t):t}function w(t){return a(t)?t:function(t){const e=t.r,r=t.g,n=t.b,o=Math.max(e,r,n),i=o-Math.min(e,r,n);let s=o,a=0===i?0:o===e?(r-n)/i%6:o===r?(n-e)/i+2:(e-r)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(y(t))}function b(t){return l(t)?t:function(t){return m(p(t))}(y(t))}function C(t){return u(t)?t:function(t){return function(t){const e=t.l,r=t.a,n=t.b,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i=i>0?i:i+2*Math.PI,{l:e,c:o,h:i}}(m(p(t)))}(y(t))}var v,x;function A(t,e,r={}){if(0===t.length||e<=0)return[];if(1===(t=t.map((t=>"string"==typeof t?new n.A(t):t))).length||1===e){const r=[],n=t[0];for(let t=0;t<e;t++)r.push(n.clone());return r}if(r.shuffle&&(t=(0,o.k4)((0,i.o8)(t),r.seed)),t.length>=e){const r=[],n=(t.length-1)/(e-1);for(let o=0;o<e;o++){const e=Math.round(o*n);r.push(t[e].clone())}return r}return function(t,e,r={}){const n=[],i=t.length-1,s=Math.ceil((e-t.length)/i);t:for(let o=0;o<i;o++){const i=t[o],a=t[o+1];for(let o=1;o<=s;o++){const l=o/(s+1);if(n.push(M(i,a,l,r)),n.length+t.length===e)break t}}return[...t.map((t=>t.clone())),...(0,o.k4)(n,r.seed??1)]}(t,e,r)}(x=v||(v={}))[x.Low=160]="Low",x[x.High=225]="High";const k=(t,e)=>{const r=Math.floor(10*e())-5;return Math.min(255,Math.max(0,t+r))};function M(t,e,r,i={}){const s=t.r,a=t.g,l=t.b,u=e.r,c=e.g,h=e.b,f=Math.round(s+(u-s)*r),p=Math.round(a+(c-a)*r),d=Math.round(l+(h-l)*r);if(!i.offset)return new n.A([f,p,d]);const m=(0,o.Mo)(i.seed);return new n.A([k(f,m),k(p,m),k(d,m)])}},85676:(t,e,r)=>{r.d(e,{A:()=>d});var n=r(90237),o=(r(44208),r(25482)),i=r(53966),s=r(10107),a=(r(87811),r(40608)),l=r(87186),u=r(28435),c=r(6952),h=r(39062),f=r(67369),p=r(88178);let d=class extends o.A{constructor(t){super(t),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){const{rendererJSON:t}=this;if(!t)return{success:!1};let e;switch(this.lookup={rendererJSON:{}},t.type){case"uniqueValue":e=this._updateUVRenderer(t);break;case"rasterColormap":e=this._updateColormapRenderer(t);break;case"rasterStretch":e=this._updateStretchRenderer(t);break;case"classBreaks":e=this._updateClassBreaksRenderer(t);break;case"rasterShadedRelief":e=this._updateShadedReliefRenderer(t);break;case"vectorField":e=this._updateVectorFieldRenderer();break;case"flowRenderer":e=this._updateFlowRenderer()}return e}symbolize(t){let e=t?.pixelBlock;if(!m(e))return e;if(t.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(e,t.simpleStretchParams);try{let r;switch(e.pixels.length>3&&(e=e.extractBands(t.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(e);break;case"classBreaks":r=this._symbolizeClassBreaks(e);break;case"rasterStretch":r=this._symbolizeStretch(e,t.bandIds);break;case"rasterShadedRelief":{const n=t.extent,o=n.spatialReference.isGeographic,i={x:(n.xmax-n.xmin)/e.width,y:(n.ymax-n.ymin)/e.height};r=this._symbolizeShadedRelief(e,{isGCS:o,resolution:i});break}}return r}catch(t){return i.A.getLogger(this).error("symbolize",t.message),e}}simpleStretch(t,e){if(!m(t))return t;try{return t.pixels.length>3&&(t=t.extractBands([0,1,2])),(0,c._N)(t,{...e,isRenderer:!0})}catch(e){return i.A.getLogger(this).error("symbolize",e.message),t}}generateWebGLParameters(t){const{rendererJSON:e}=this;switch(e.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===e.type);case"rasterStretch":return this._generateStretchWebGLParams(t.pixelBlock,e,t.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(e,t.isGCS,t.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(e);default:return null}}_isLUTChanged(t){const e=this.lookup.rendererJSON;if(!e)return!0;const{rendererJSON:r}=this;if("colorRamp"in r&&r.colorRamp){const n=r.colorRamp;if(t)return JSON.stringify(n)!==JSON.stringify(e.colorRamp)}return JSON.stringify(r)!==JSON.stringify(e)}_symbolizeColormap(t){return this._isLUTChanged()&&!this.bind().success?t:(0,u.qL)(t,this.lookup.colormapLut)}_symbolizeClassBreaks(t){const{canUseIndexedLUT:e}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?t:e?(0,u.qL)(t,this.lookup.colormapLut):(0,u.Hx)(t,this.lookup.remapLut??[])}_symbolizeStretch(t,e){if(!t)return null;const{rasterInfo:r,lookup:n}=this,{pixelType:o,bandCount:i}=r,s=this.rendererJSON,a=["u8","u16","s8","s16"].includes(o);let l;const{dra:h}=s,{gamma:f}=n;if("histogramEqualization"===s.stretchType){const o=h?null:n.histogramLut,i=(0,c.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e,returnHistogramLut:!o}),a="u8"===r.pixelType&&!h&&(0,c.zt)(r.histograms?.[0])?t:(0,c._N)(t,{...i,gamma:f,isRenderer:!0});l=(0,u.eH)(a,{lut:h?i.histogramLut:e?.length?e.map((t=>o[t])):o,offset:0})}else if(a){let a;if(h){const n=(0,c.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e});a=(0,c.RP)({pixelType:o,...n,gamma:f,rounding:"floor"})}else{if(this._isLUTChanged()&&!this.bind().success)return t;a=n.stretchLut}if(!a)return t;i>1&&null!=e&&e.length===t?.pixels.length&&a.lut.length===i&&(a={lut:e.map((t=>a.lut[t])),offset:a.offset}),l=(0,u.eH)(t,a)}else{const n=(0,c.DP)(s,{rasterInfo:r,pixelBlock:t,bandIds:e});l=(0,c._N)(t,{...n,gamma:f,isRenderer:!0})}if(s.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return t;l=(0,u.qL)(l,n.colormapLut)}return l}_symbolizeShadedRelief(t,e){const r=this.rendererJSON,n={...r,...e},o=(0,h.fw)(t,n);if(!r.colorRamp)return o;if(this._isLUTChanged(!0)&&!this.bind().success)return o;const{hsvMap:i}=this.lookup;if(!i)return o;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,h.SC)(o,t,i,s),o}_isVectorFieldData(){const{bandCount:t,dataType:e}=this.rasterInfo;return 2===t&&("vector-magdir"===e||"vector-uv"===e)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(t){const{bandCount:e,attributeTable:r,pixelType:n}=this.rasterInfo,o=t.field1;if(!o)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=t.defaultSymbol,s=1===e&&["u8","s8"].includes(n);if(!(0,p.hu)(this.rasterInfo,o)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const e=r.fields.find((t=>"value"===t.name.toLowerCase()));if(!e)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const n=t.uniqueValueInfos?.find((t=>String(t.value)===String(r.attributes[o]))),s=n?.symbol?.color;s?a.push([r.attributes[e.name]].concat(s)):i&&a.push([r.attributes[e.name]].concat(i.color))}))}else{if("value"!==o.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};t.uniqueValueInfos?.forEach((t=>{const e=t?.symbol?.color;e?a.push([parseInt(""+t.value,10)].concat(e)):i&&a.push([parseInt(""+t.value,10)].concat(i?.color))}))}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,u.zg)({colormap:a});return this.lookup={rendererJSON:t,colormapLut:l},this.canRenderInWebGL=(0,p.WN)(l?.indexedColormap),{success:!0}}_updateColormapRenderer(t){if(!(0,p.FA)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const e=t.colormapInfos.map((t=>[t.value].concat(t.color))).sort(((t,e)=>t[0]-e[0]));if(!e||0===e.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,u.zg)({colormap:e});return this.lookup={rendererJSON:t,colormapLut:r},this.canRenderInWebGL=(0,p.WN)(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(t){if(!(0,p.iL)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(t.colorRamp){const e=(0,f.R8)(t.colorRamp,{interpolateAlpha:!0}),r=(0,u.zg)({colormap:e}),n=(0,f.S2)(r.indexedColormap);this.lookup={rendererJSON:t,colormapLut:r,hsvMap:n}}else this.lookup={rendererJSON:t};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(t){const{attributeTable:e,pixelType:r}=this.rasterInfo,n=e?.fields.find((t=>"value"===t.name.toLowerCase())),o=e?.fields.find((e=>e.name.toLowerCase()===t.field.toLowerCase())),i=null!=n&&null!==o;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:n,tableBreakField:o}}_updateClassBreaksRenderer(t){const{attributeTable:e}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:n,tableBreakField:o}=this._analyzeClassBreaks(t),i=t.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((t,e)=>t.classMaxValue-e.classMaxValue)),a=s[s.length-1];let l=t.minValue;if(!r){const e=[];for(let t=0;t<s.length;t++)e.push({value:s[t].classMinValue??l,mappedColor:s[t].symbol.color}),l=s[t].classMaxValue;return e.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:t,remapLut:e},this.canRenderInWebGL=!1,{success:!0}}const c=[];if(null!=e&&null!=n&&null!==o&&n!==o){const r=n.name,i=o.name,a=s[s.length-1],{classMaxValue:u}=a;l=t.minValue;for(const t of e.features){const e=t.attributes[r],n=t.attributes[i],o=n===u?a:n<l?null:s.find((({classMaxValue:t})=>t>n));o&&c.push([e].concat(o.symbol.color))}}else{l=Math.floor(t.minValue);for(let t=0;t<s.length;t++){const e=s[t];for(let t=l;t<e.classMaxValue;t++)c.push([t].concat(e.symbol.color));l=Math.ceil(e.classMaxValue)}a.classMaxValue===l&&c.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,u.zg)({colormap:c,fillUnspecified:!1});return this.lookup={rendererJSON:t,colormapLut:h},this.canRenderInWebGL=(0,p.WN)(h?.indexedColormap),{success:!0}}_updateStretchRenderer(t){let{stretchType:e,dra:r}=t;if(!("none"===e||t.statistics?.length||function(t){return null!=t&&t.length>0&&null!=t[0].min&&null!=t[0].max}(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const n=t.histograms||this.rasterInfo.histograms;!function(t){return"percentClip"===t||"histogramEqualization"===t}(t.stretchType)||n?.length||r||(e="minMax");const{computeGamma:o,useGamma:i,colorRamp:s}=t;let{gamma:a}=t;if(i&&o&&!a?.length){const e=t.statistics?.length?t.statistics:this.rasterInfo.statistics;a=(0,c.fP)(this.rasterInfo.pixelType,e)}const l=this.rasterInfo.pixelType,h=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===e){const e=n.map((t=>(0,c.WF)(t)));this.lookup={rendererJSON:t,histogramLut:e}}else if(h){const e=(0,c.DP)(t,{rasterInfo:this.rasterInfo}),r=(0,c.RP)({pixelType:l,...e,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:t,stretchLut:r}}else this.lookup={rendererJSON:t};if(s&&!function(t){return"algorithmic"===t.type&&["0,0,0,255","0,0,0"].includes(t.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(t.toColor.join(","))}(s)){const e=(0,f.R8)(s,{interpolateAlpha:!0});this.lookup.colormapLut=(0,u.zg)({colormap:e}),this.lookup.rendererJSON=t}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL="histogramEqualization"!==e,{success:!0}}_generateColormapWebGLParams(t){const{indexedColormap:e,offset:r}=this.lookup.colormapLut||{};return{colormap:e,colormapOffset:r,isClassBreaks:t,type:"lut"}}_generateStretchWebGLParams(t,e,r){const{colormapLut:n}=this.lookup,o=e.colorRamp?n?.indexedColormap:null,i=e.colorRamp?n?.offset:null;"histogramEqualization"===e.stretchType&&(e={...e,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!(!e.useGamma||!s?.some((t=>1!==t))),{minCutOff:l,maxCutOff:u,minOutput:h,maxOutput:f}=(0,c.DP)(e,{rasterInfo:this.rasterInfo,pixelBlock:t,bandIds:r});let p=0;null!=t&&(p=t.getPlaneCount(),2===p&&((t=t.clone()).statistics=[t.statistics[0]],t.pixels=[t.pixels[0]]));const{bandCount:d}=this.rasterInfo,m=Math.min(3,r?.length||p||d,d),g=o||a?1:255,y=new Float32Array(m);if(a&&s)for(let t=0;t<m;t++)s[t]>1?s[t]>2?y[t]=6.5+(s[t]-2)**2.5:y[t]=6.5+100*(2-s[t])**4:y[t]=1;1===l.length&&(l[2]=l[1]=l[0]),1===u.length&&(u[2]=u[1]=u[0]);const w=a&&s?[s[0],s[1]??s[0],s[2]??s[0]]:[1,1,1],b=a?[y[0],y[1]??y[0],y[2]??y[0]]:[1,1,1],C=u.map(((t,e)=>u[e]===l[e]?0:(f-h)/(u[e]-l[e])/g));return{bandCount:m,minOutput:h/g,maxOutput:f/g,minCutOff:l,maxCutOff:u,factor:C,useGamma:a,gamma:w,gammaCorrection:b,colormap:o,colormapOffset:i,stretchType:e.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(t,e=!1,r={x:0,y:0}){const{colormapLut:n}=this.lookup,o=t.colorRamp?n?.indexedColormap:null,i=t.colorRamp?n?.offset:null,s={...t,isGCS:e,resolution:r},a=(0,h.ng)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===t.hillshadeType?0:1,type:"hillshade",colormap:o,colormapOffset:i}}_generateVectorFieldWebGLParams(t){const{style:e,inputUnit:r,outputUnit:n,visualVariables:o,symbolTileSize:i,flowRepresentation:s}=t,a=this.rasterInfo.statistics?.[0].min??0,l=this.rasterInfo.statistics?.[0].max??50,u=o?.find((t=>"sizeInfo"===t.type))??{maxDataValue:l,maxSize:.8*i,minDataValue:a,minSize:.2*i},c=u.minDataValue??a,h=u.maxDataValue??l,f=null!=u.maxSize&&null!=u.minSize?[u.minSize/i,u.maxSize/i]:[.2,.8];if("wind_speed"===e){const t=(f[0]+f[1])/2;f[0]=f[1]=t}const p=null!=c&&null!=h?[c,h]:null;let d=null;if("classified_arrow"===e)if(null!=c&&null!=h&&null!=u){d=[];const t=(u.maxDataValue-u.minDataValue)/5;for(let e=0;e<6;e++)d.push(u.minDataValue+t*e)}else d=[0,1e-6,3.5,7,10.5,14];const m="flow_to"===s==("ocean_current_kn"===e||"ocean_current_m"===e)?0:Math.PI,g=o?.find((t=>"rotationInfo"===t.type));return{breakValues:d,dataRange:p,inputUnit:r,outputUnit:n,symbolTileSize:i,symbolPercentRange:f,style:e||"single_arrow",rotation:m,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||t.rotationType,type:"vectorField"}}};function m(t){return(0,u.AB)(t)&&0!==t.validPixelCount}(0,n._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"rendererJSON",void 0),(0,n._)([(0,s.MZ)({type:l.A,json:{write:!0}})],d.prototype,"rasterInfo",void 0),(0,n._)([(0,s.MZ)({json:{write:!0}})],d.prototype,"lookup",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"canRenderInWebGL",void 0),d=(0,n._)([(0,a.$)("esri.renderers.support.RasterSymbolizer")],d)},87186:(t,e,r)=>{r.d(e,{A:()=>v});var n,o=r(90237),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(40608)),u=r(5443),c=r(16930);function h(t){return t=Number(t),isNaN(t)?void 0:t}r(87811);let f=n=class extends i.A{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new n({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,o._)([(0,a.MZ)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,a.MZ)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,o._)([(0,a.MZ)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,o._)([(0,a.MZ)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,o._)([(0,a.MZ)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,o._)([(0,a.MZ)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,o._)([(0,a.MZ)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,o._)([(0,a.MZ)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=n=(0,o._)([(0,l.$)("esri.layers.support.RasterBandInfo")],f);var p,d=r(13868),m=r(36005),g=r(43937);function y(t){return t=Number(t),isNaN(t)?void 0:t}let w=p=class extends i.A{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(t){return new Date(t)}writeAcquisitionDate(t,e){e.AcquisitionDate=t.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,o._)([(0,a.MZ)({type:Date,json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,o._)([(0,m.w)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,o._)([(0,g.K)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,o._)([(0,a.MZ)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,o._)([(0,a.MZ)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,o._)([(0,a.MZ)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,o._)([(0,a.MZ)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,o._)([(0,a.MZ)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,o._)([(0,a.MZ)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,o._)([(0,a.MZ)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,o._)([(0,l.$)("esri.layers.support.RasterSensorInfo")],w);var b,C=r(20223);let v=b=class extends i.A{constructor(t){super(t),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get bandInfos(){const t=this.keyProperties.BandProperties,{bandCount:e}=this;if(!t?.length||t.length<e){const t=[];for(let r=1;r<=e;r++)t.push(new f({name:"band_"+r}));return t}const r=t.map((t=>f.fromJSON(t)));for(let t=0;t<r.length;t++)r[t].name=r[t].name||"band_"+(t+1);return r}get dataType(){const t=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===t?"standard-time":t}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(t){t&&this._set("nativeExtent",t)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const t=this.nativeExtent;return{x:t.width/this.width,y:t.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return w.fromJSON(this.keyProperties)}clone(){return new b({attributeTable:(0,s.o8)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.o8)(this.colormap),extent:(0,s.o8)(this.extent),format:this.format,height:this.height,width:this.width,histograms:(0,s.o8)(this.histograms),keyProperties:(0,s.o8)(this.keyProperties),multidimensionalInfo:(0,s.o8)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.o8)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.o8)(this.spatialReference),statistics:(0,s.o8)(this.statistics),storageInfo:(0,s.o8)(this.storageInfo),transform:(0,s.o8)(this.transform)})}};(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"attributeTable",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"bandCount",void 0),(0,o._)([(0,a.MZ)({readOnly:!0})],v.prototype,"bandInfos",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"colormap",void 0),(0,o._)([(0,a.MZ)({type:String,readOnly:!0})],v.prototype,"dataType",null),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],v.prototype,"extent",void 0),(0,o._)([(0,a.MZ)({type:u.A,json:{write:!0}})],v.prototype,"nativeExtent",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"nativePixelSize",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"format",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"height",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"width",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"hasMultidimensionalTranspose",null),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"histograms",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"keyProperties",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"multidimensionalInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"noDataValue",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"pixelSize",void 0),(0,o._)([(0,a.MZ)({type:d.e8.apiValues,json:{write:!0}})],v.prototype,"pixelType",void 0),(0,o._)([(0,a.MZ)()],v.prototype,"isPseudoSpatialReference",void 0),(0,o._)([(0,a.MZ)({readOnly:!0})],v.prototype,"sensorInfo",null),(0,o._)([(0,a.MZ)({type:c.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"statistics",void 0),(0,o._)([(0,a.MZ)({type:C.A,json:{write:!0}})],v.prototype,"storageInfo",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=b=(0,o._)([(0,l.$)("esri.layers.support.RasterInfo")],v)},88178:(t,e,r)=>{function n(t,e){const{attributeTable:r,bandCount:n}=t;return!((null!=r||(o=t,!["u8","s8"].includes(o.pixelType)||null==o.statistics?.[0]?.min||null==o.statistics[0]?.max||1!==o.bandCount))&&(null==r||n>1||e&&null==r.fields.find((t=>t.name.toLowerCase()===e.toLowerCase()))));var o}function o(t){const{bandCount:e,dataType:r,pixelType:n}=t;return"elevation"===r||"generic"===r&&1===e&&("s16"===n||"s32"===n||"f32"===n||"f64"===n)}function i(t,e=!1){const{bandCount:r,colormap:n,pixelType:o}=t;return 1===r&&(!!n?.length||!e&&"u8"===o)}function s(t,e=!1){const{attributeTable:r,bandCount:n}=t;return 1===n&&(!e||null!=r||null!=t.histograms)}function a(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}function l(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}function u(t){return!!t?.length&&t.length<=16384}r.d(e,{FA:()=>i,QJ:()=>l,WN:()=>u,hu:()=>n,iL:()=>o,rd:()=>a,xX:()=>s})}}]);
|