@arcgis/core 5.2.0-next.154 → 5.2.0-next.156
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d994bcf0a65d1c07160f.js → 0320cbd825f9a4222042.js} +1 -1
- package/assets/esri/core/workers/chunks/0590857215c547e63b51.js +1 -0
- package/assets/esri/core/workers/chunks/08fe248e412bb170210d.js +1 -0
- package/assets/esri/core/workers/chunks/0cb50bc2b2125c5fedf2.js +1 -0
- package/assets/esri/core/workers/chunks/1201b8c5852830836eac.js +1 -0
- package/assets/esri/core/workers/chunks/129e04d24ced77c9bb6d.js +1 -0
- package/assets/esri/core/workers/chunks/15e1117a706a98b17ad5.js +1 -0
- package/assets/esri/core/workers/chunks/164e74d586297946a717.js +1 -0
- package/assets/esri/core/workers/chunks/168a523bdc3653081f8a.js +1 -0
- package/assets/esri/core/workers/chunks/{6f4e6022a52de0c54aab.js → 172cfeb5f415e4662432.js} +1 -1
- package/assets/esri/core/workers/chunks/1aa4f5394a596e544aeb.js +1 -0
- package/assets/esri/core/workers/chunks/22b01fe31bbf0bdc48db.js +1 -0
- package/assets/esri/core/workers/chunks/27c2da2e779def2ee08b.js +1 -0
- package/assets/esri/core/workers/chunks/28b74bc77f7c13080074.js +1 -0
- package/assets/esri/core/workers/chunks/{481589c3eddad6e026ad.js → 369780276b2755361f7d.js} +1 -1
- package/assets/esri/core/workers/chunks/3914d96147642a9d4b01.js +1 -0
- package/assets/esri/core/workers/chunks/{731018c0deffc41ffc97.js → 3e3e076fa5e8d5d5f33f.js} +1 -1
- package/assets/esri/core/workers/chunks/43cf862577bf37344ff4.js +1 -0
- package/assets/esri/core/workers/chunks/4932773663469919d10a.js +1 -0
- package/assets/esri/core/workers/chunks/4996869b9cbd8c8ddcfa.js +1 -0
- package/assets/esri/core/workers/chunks/4c389472b8cdb0c55154.js +1 -0
- package/assets/esri/core/workers/chunks/4e4f747de424941a0bfa.js +1 -0
- package/assets/esri/core/workers/chunks/{eb815148ae65388dd733.js → 544070198d2ca556103a.js} +1 -1
- package/assets/esri/core/workers/chunks/5736feefa261589b6273.js +1 -0
- package/assets/esri/core/workers/chunks/{aeaaff7a4b1a99540f52.js → 5cb26bbaa08114aec5ce.js} +1 -1
- package/assets/esri/core/workers/chunks/5f4feca26102088ea565.js +1 -0
- package/assets/esri/core/workers/chunks/{407f1e8176f3b0af73b4.js → 66867e523cc82f8fe35b.js} +1 -1
- package/assets/esri/core/workers/chunks/6f73e41e14817acfaead.js +1 -0
- package/assets/esri/core/workers/chunks/{320e5942a098dd104366.js → 74137ffec5265628c33b.js} +1 -1
- package/assets/esri/core/workers/chunks/7446d0dfebf93e86c098.js +1 -0
- package/assets/esri/core/workers/chunks/{688f2dbf784e66082308.js → 74c866e0b66e61751861.js} +1 -1
- package/assets/esri/core/workers/chunks/7711ae5612f685078fc8.js +1 -0
- package/assets/esri/core/workers/chunks/{5116b569a8dbda4910c8.js → 784a2fba3e18286958d1.js} +1 -1
- package/assets/esri/core/workers/chunks/{693873b3eb99fba58fa9.js → 78c4e43cfa1eda06b4d9.js} +1 -1
- package/assets/esri/core/workers/chunks/{f6e62d2d279a328cbed7.js → 7bcedf479b07a4b4a234.js} +1 -1
- package/assets/esri/core/workers/chunks/81cad8d2f62a5f671c55.js +1 -0
- package/assets/esri/core/workers/chunks/{588e677f33df86a595bf.js → 820c8aaf3632edb0150c.js} +1 -1
- package/assets/esri/core/workers/chunks/842893e75696428d536f.js +1 -0
- package/assets/esri/core/workers/chunks/8e19629899a5becf8e19.js +1 -0
- package/assets/esri/core/workers/chunks/950d4578dc450467404c.js +1 -0
- package/assets/esri/core/workers/chunks/{68be3fb88ca61f82fb90.js → 95dbbddac6581b9d671f.js} +1 -1
- package/assets/esri/core/workers/chunks/{a4162a8660bf763d542d.js → 967b4992b400517ee712.js} +1 -1
- package/assets/esri/core/workers/chunks/{adf25e5ed99615b83c68.js → a62c12925303ff802c3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{900181f68449d8f82eeb.js → aa1ac7954e4f0fefe15b.js} +1 -1
- package/assets/esri/core/workers/chunks/ac24b4370dc7194a3107.js +1 -0
- package/assets/esri/core/workers/chunks/acdfd275dbf8533a67f3.js +1 -0
- package/assets/esri/core/workers/chunks/ace2e0a9d9013edd8624.js +1 -0
- package/assets/esri/core/workers/chunks/b1d5d236d5268fcbc74b.js +1 -0
- package/assets/esri/core/workers/chunks/b3007aedbf731dacaff1.js +1 -0
- package/assets/esri/core/workers/chunks/{53e2f2b922116a45fe8f.js → b573df59391ca41ee5a7.js} +1 -1
- package/assets/esri/core/workers/chunks/bac8c32665e982896ecc.js +1 -0
- package/assets/esri/core/workers/chunks/{f3da30d7300b92bd8bb0.js → befa32b9e7b3fbdd431e.js} +1 -1
- package/assets/esri/core/workers/chunks/c19f238b55ff2893f7c2.js +1 -0
- package/assets/esri/core/workers/chunks/c5ed67fdf261cbb1624b.js +1 -0
- package/assets/esri/core/workers/chunks/c72a904e01dc8c17d992.js +1 -0
- package/assets/esri/core/workers/chunks/d9b1aed88b205689cec6.js +1 -0
- package/assets/esri/core/workers/chunks/de6081df29183bf80787.js +1 -0
- package/assets/esri/core/workers/chunks/{c598b22f78ccc57f9d6d.js → dfd2dc5cdc97ffba8926.js} +1 -1
- package/assets/esri/core/workers/chunks/e1b7806ab3e1967b15f0.js +1 -0
- package/assets/esri/core/workers/chunks/e653c81ffb3d818645dd.js +1 -0
- package/assets/esri/core/workers/chunks/eaddffcc7004101fc230.js +1 -0
- package/assets/esri/core/workers/chunks/eb2652ec48faa78de3c5.js +1 -0
- package/assets/esri/core/workers/chunks/{c62738f84c914671b143.js → f4a7aa3cdbc0c429c359.js} +1 -1
- package/assets/esri/core/workers/chunks/fda83bcb8e40e8044c24.js +1 -0
- package/assets/esri/libs/pdfjs/wasm/openjpeg_nowasm_fallback.js +1 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/support/uriUtils/t9n/messages.fr.json +1 -1
- package/config.d.ts +2 -0
- package/config.js +1 -1
- package/core/ObjectPool.js +1 -1
- package/core/PooledArray.js +1 -1
- package/core/accessorSupport/tracking/SimpleTrackingTarget.js +1 -1
- package/geometry/support/buffer/BufferPool.js +1 -1
- package/geometry/support/coordsUtils.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/curves/mathUtils.js +1 -1
- package/interfaces.d.ts +18 -9
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +2 -2
- package/layers/AnnotationFeatureLayer.js +1 -1
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/CatalogLayer.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +2 -2
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/FeatureLayer.js +1 -1
- package/layers/SubtypeGroupLayer.d.ts +2 -2
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +9 -9
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
- package/layers/geospatialPDF/LGIDictMapFrame.js +1 -1
- package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
- package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/sources/GeoJSONSource.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/parquet/FileProvider.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/mixins/{FeatureLayerReload.d.ts → ReloadableLayer.d.ts} +5 -3
- package/layers/mixins/ReloadableLayer.js +2 -0
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/raster/datasets/BaseRaster.js +1 -1
- package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/datasets/ImageServerRaster.js +1 -1
- package/layers/raster/datasets/MRFRaster.js +1 -1
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/raster/datasets/WCSRaster.js +1 -1
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/TiffDecoder.js +1 -1
- package/layers/raster/formats/Zlib.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/package.json +2 -2
- package/popup/FeatureModel.js +1 -1
- package/popup/FeaturesModel.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/request/process.js +1 -1
- package/request/types.d.ts +7 -0
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
- package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
- package/views/3d/analysis/LineOfSight/{LineOfSightRootPlugin.js → LineOfSightPlacementRootPlugin.js} +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccluded.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
- package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
- package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/support/PluginContext.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/types.d.ts +5 -2
- package/webdoc/applicationProperties/SearchLayerField.d.ts +7 -1
- package/webdoc/applicationProperties/SearchLayerField.js +1 -1
- package/webdoc/applicationProperties/SearchTableField.d.ts +7 -1
- package/webdoc/applicationProperties/SearchTableField.js +1 -1
- package/webdoc/applicationProperties/searchMode.js +2 -0
- package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +10 -1
- package/widgets/Editor.d.ts +10 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/HistogramRangeSlider.d.ts +2 -2
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/Legend.d.ts +1 -0
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +2 -2
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.d.ts +5 -2
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/LayerSearchSource.d.ts +23 -1
- package/widgets/Search/LayerSearchSource.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/types.d.ts +7 -0
- package/widgets/ValuePicker/ValuePickerBaseComponent.d.ts +5 -1
- package/widgets/ValuePicker/ValuePickerCollection.d.ts +2 -0
- package/widgets/ValuePicker/ValuePickerCombobox.d.ts +7 -1
- package/widgets/ValuePicker/ValuePickerLabel.d.ts +7 -1
- package/widgets/ValuePicker/ValuePickerSlider.d.ts +2 -0
- package/widgets/ValuePicker/ValuePickerSliderVisibleElements.d.ts +5 -1
- package/widgets/ValuePicker/ValuePickerVisibleElements.d.ts +5 -1
- package/widgets/ValuePicker/types.d.ts +2 -0
- package/widgets/support/forms/formUtils.js +1 -1
- package/widgets/support/forms/types.d.ts +1 -1
- package/assets/esri/core/workers/chunks/03261b9451e293a0fac8.js +0 -1
- package/assets/esri/core/workers/chunks/03afeefb9d16b6f1d844.js +0 -1
- package/assets/esri/core/workers/chunks/09b9a886363bc1197785.js +0 -1
- package/assets/esri/core/workers/chunks/0ad0484ffcbe4ad21bd3.js +0 -1
- package/assets/esri/core/workers/chunks/19743dedaa40446259ec.js +0 -1
- package/assets/esri/core/workers/chunks/1c65ab9ed611c322ce27.js +0 -1
- package/assets/esri/core/workers/chunks/1f339247b68b061ab0a4.js +0 -1
- package/assets/esri/core/workers/chunks/251921cd10ecfbc89451.js +0 -1
- package/assets/esri/core/workers/chunks/3252b1fae363bb0129a0.js +0 -1
- package/assets/esri/core/workers/chunks/408e81c8f1eff8a7b379.js +0 -1
- package/assets/esri/core/workers/chunks/4fc337240e7cddd0e988.js +0 -1
- package/assets/esri/core/workers/chunks/50036a323c2e7f155311.js +0 -1
- package/assets/esri/core/workers/chunks/55dcbf296d8d0092e473.js +0 -1
- package/assets/esri/core/workers/chunks/5732fdf6d8b87739aeea.js +0 -1
- package/assets/esri/core/workers/chunks/5924ec3167a2941ebb1f.js +0 -1
- package/assets/esri/core/workers/chunks/59b216b60464611742d4.js +0 -1
- package/assets/esri/core/workers/chunks/5bfea0c55aca826de536.js +0 -1
- package/assets/esri/core/workers/chunks/5fa1ec357c3ad1f91bc7.js +0 -1
- package/assets/esri/core/workers/chunks/60d3056a31d982c9cad0.js +0 -1
- package/assets/esri/core/workers/chunks/6558488ea96620439f34.js +0 -1
- package/assets/esri/core/workers/chunks/6aebf7cfd294e88bf926.js +0 -1
- package/assets/esri/core/workers/chunks/6b43bb78f9839ed43135.js +0 -1
- package/assets/esri/core/workers/chunks/6c83398cf586ecea0eb1.js +0 -1
- package/assets/esri/core/workers/chunks/7267b17de212207142c9.js +0 -1
- package/assets/esri/core/workers/chunks/7d1fd2df579a4b535e0e.js +0 -1
- package/assets/esri/core/workers/chunks/7e0cf70c0eb5a2ddfcec.js +0 -1
- package/assets/esri/core/workers/chunks/879b2de825c1dfc8849d.js +0 -1
- package/assets/esri/core/workers/chunks/912080c90b5cc2e817cf.js +0 -1
- package/assets/esri/core/workers/chunks/917f53833b853898facc.js +0 -1
- package/assets/esri/core/workers/chunks/937824bc7948f7bc7845.js +0 -1
- package/assets/esri/core/workers/chunks/a97d85774f9a417202df.js +0 -1
- package/assets/esri/core/workers/chunks/aff32980d91dab07dfb7.js +0 -1
- package/assets/esri/core/workers/chunks/b132ffa7e8bb461b6786.js +0 -1
- package/assets/esri/core/workers/chunks/b1b4066e8d1c0c9656e5.js +0 -1
- package/assets/esri/core/workers/chunks/b6ba66a05030d3815dfd.js +0 -1
- package/assets/esri/core/workers/chunks/bbec9d2e3b75a5c59681.js +0 -1
- package/assets/esri/core/workers/chunks/bf69024804ac51c8f733.js +0 -1
- package/assets/esri/core/workers/chunks/d938987344bce83cc660.js +0 -1
- package/assets/esri/core/workers/chunks/db1ab9b9c8bf5c7635d3.js +0 -1
- package/assets/esri/core/workers/chunks/e01aeac34474540f61ee.js +0 -1
- package/assets/esri/core/workers/chunks/e15ba90af0faf873b42d.js +0 -1
- package/assets/esri/core/workers/chunks/fd9663952d5a94f3a83f.js +0 -1
- package/layers/mixins/FeatureLayerReload.js +0 -2
- /package/views/3d/analysis/LineOfSight/{lineOfSightPlacementUtils.js → placementUtils.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7074],{61294(e,t,r){r.d(t,{J:()=>i});var n=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=Error(),e.prototype.name="JpegError",e.constructor=e,e}(),i=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]),t=4017,r=799,i=3406,l=2276,o=1567,a=3784,s=5793,u=2896;function h(){this.decodeTransform=null,this.colorTransform=-1}function f(e,t){for(var r,n,i=0,l=[],o=16;o>0&&!e[o-1];)o--;l.push({children:[],index:0});var a,s=l[0];for(r=0;r<o;r++){for(n=0;n<e[r];n++){for((s=l.pop()).children[s.index]=t[i];s.index>0;)s=l.pop();for(s.index++,l.push(s);l.length<=r;)l.push(a={children:[],index:0}),s.children[s.index]=a.children,s=a;i++}r+1<o&&(l.push(a={children:[],index:0}),s.children[s.index]=a.children,s=a)}return l[0].children}function c(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function d(t,r,i,l,o,a,s,u,h){var f=i.mcusPerLine,d=i.progressive,p=r,m=0,y=0;function w(){if(y>0)return y--,m>>y&1;if(255===(m=t[r++])){var e=t[r++];if(e)throw new n("unexpected marker "+(m<<8|e).toString(16))}return y=7,m>>>7}function C(e){for(var t=e;;){if("number"==typeof(t=t[w()]))return t;if("object"!=typeof t)throw new n("invalid huffman sequence")}}function x(e){for(var t=0;e>0;)t=t<<1|w(),e--;return t}function b(e){if(1===e)return 1===w()?1:-1;var t=x(e);return t>=1<<e-1?t:t+(-1<<e)+1}var A,v=0,M=0;function k(e,t,r,n,i){var l=r%f;t(e,c(e,(r/f|0)*e.v+n,l*e.h+i))}function T(e,t,r){t(e,c(e,r/e.blocksPerLine|0,r%e.blocksPerLine))}for(var S,I,P,E,R,L,U,O,D=l.length,G=d?0===a?0===u?function(e,t){var r=C(e.huffmanTableDC),n=0===r?0:b(r)<<h;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=w()<<h}:0===u?function(t,r){if(v>0)v--;else for(var n=a,i=s;n<=i;){var l=C(t.huffmanTableAC),o=15&l,u=l>>4;if(0!==o){var f=e[n+=u];t.blockData[r+f]=b(o)*(1<<h),n++}else{if(u<15){v=x(u)+(1<<u)-1;break}n+=16}}}:function(t,r){for(var i,l,o=a,u=s,f=0;o<=u;){var c=e[o];switch(M){case 0:if(f=(l=C(t.huffmanTableAC))>>4,0==(i=15&l))f<15?(v=x(f)+(1<<f),M=4):(f=16,M=1);else{if(1!==i)throw new n("invalid ACn encoding");A=b(i),M=f?2:3}continue;case 1:case 2:t.blockData[r+c]?t.blockData[r+c]+=w()<<h:0===--f&&(M=2===M?3:0);break;case 3:t.blockData[r+c]?t.blockData[r+c]+=w()<<h:(t.blockData[r+c]=A<<h,M=0);break;case 4:t.blockData[r+c]&&(t.blockData[r+c]+=w()<<h)}o++}4===M&&0===--v&&(M=0)}:function(t,r){var n=C(t.huffmanTableDC),i=0===n?0:b(n);t.blockData[r]=t.pred+=i;for(var l=1;l<64;){var o=C(t.huffmanTableAC),a=15&o,s=o>>4;if(0!==a){var u=e[l+=s];t.blockData[r+u]=b(a),l++}else{if(s<15)break;l+=16}}},B=0,N=1===D?l[0].blocksPerLine*l[0].blocksPerColumn:f*i.mcusPerColumn;B<N;){var F=o?Math.min(N-B,o):N;for(I=0;I<D;I++)l[I].pred=0;if(v=0,1===D)for(S=l[0],R=0;R<F;R++)T(S,G,B),B++;else for(R=0;R<F;R++){for(I=0;I<D;I++)for(U=(S=l[I]).h,O=S.v,P=0;P<O;P++)for(E=0;E<U;E++)k(S,G,B,P,E);B++}y=0,(L=g(t,r))&&L.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+L.invalid),r=L.offset);var z=L&&L.marker;if(!z||z<=65280)throw new n("marker was not found");if(!(z>=65488&&z<=65495))break;r+=2}return(L=g(t,r))&&L.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+L.invalid),r=L.offset),r-p}function p(e,h,f){var c,d,p,m,g,y,w,C,x,b,A,v,M,k,T,S,I,P=e.quantizationTable,E=e.blockData;if(!P)throw new n("missing required Quantization Table.");for(var R=0;R<64;R+=8)x=E[h+R],b=E[h+R+1],A=E[h+R+2],v=E[h+R+3],M=E[h+R+4],k=E[h+R+5],T=E[h+R+6],S=E[h+R+7],x*=P[R],0!==(b|A|v|M|k|T|S)?(b*=P[R+1],A*=P[R+2],v*=P[R+3],M*=P[R+4],k*=P[R+5],T*=P[R+6],S*=P[R+7],d=(c=(c=s*x+128>>8)+(d=s*M+128>>8)+1>>1)-d,I=(p=A)*a+(m=T)*o+128>>8,p=p*o-m*a+128>>8,w=(g=(g=u*(b-S)+128>>8)+(w=k<<4)+1>>1)-w,y=(C=(C=u*(b+S)+128>>8)+(y=v<<4)+1>>1)-y,m=(c=c+(m=I)+1>>1)-m,p=(d=d+p+1>>1)-p,I=g*l+C*i+2048>>12,g=g*i-C*l+2048>>12,C=I,I=y*r+w*t+2048>>12,y=y*t-w*r+2048>>12,w=I,f[R]=c+C,f[R+7]=c-C,f[R+1]=d+w,f[R+6]=d-w,f[R+2]=p+y,f[R+5]=p-y,f[R+3]=m+g,f[R+4]=m-g):(I=s*x+512>>10,f[R]=I,f[R+1]=I,f[R+2]=I,f[R+3]=I,f[R+4]=I,f[R+5]=I,f[R+6]=I,f[R+7]=I);for(var L=0;L<8;++L)x=f[L],0!==((b=f[L+8])|(A=f[L+16])|(v=f[L+24])|(M=f[L+32])|(k=f[L+40])|(T=f[L+48])|(S=f[L+56]))?(d=(c=4112+((c=s*x+2048>>12)+(d=s*M+2048>>12)+1>>1))-d,I=(p=A)*a+(m=T)*o+2048>>12,p=p*o-m*a+2048>>12,m=I,w=(g=(g=u*(b-S)+2048>>12)+(w=k)+1>>1)-w,y=(C=(C=u*(b+S)+2048>>12)+(y=v)+1>>1)-y,I=g*l+C*i+2048>>12,g=g*i-C*l+2048>>12,C=I,I=y*r+w*t+2048>>12,y=y*t-w*r+2048>>12,x=(x=(c=c+m+1>>1)+C)<16?0:x>=4080?255:x>>4,b=(b=(d=d+p+1>>1)+(w=I))<16?0:b>=4080?255:b>>4,A=(A=(p=d-p)+y)<16?0:A>=4080?255:A>>4,v=(v=(m=c-m)+g)<16?0:v>=4080?255:v>>4,M=(M=m-g)<16?0:M>=4080?255:M>>4,k=(k=p-y)<16?0:k>=4080?255:k>>4,T=(T=d-w)<16?0:T>=4080?255:T>>4,S=(S=c-C)<16?0:S>=4080?255:S>>4,E[h+L]=x,E[h+L+8]=b,E[h+L+16]=A,E[h+L+24]=v,E[h+L+32]=M,E[h+L+40]=k,E[h+L+48]=T,E[h+L+56]=S):(I=(I=s*x+8192>>14)<-2040?0:I>=2024?255:I+2056>>4,E[h+L]=I,E[h+L+8]=I,E[h+L+16]=I,E[h+L+24]=I,E[h+L+32]=I,E[h+L+40]=I,E[h+L+48]=I,E[h+L+56]=I)}function m(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,i=new Int16Array(64),l=0;l<n;l++)for(var o=0;o<r;o++)p(t,c(t,l,o),i);return t.blockData}function g(e,t,r){function n(t){return e[t]<<8|e[t+1]}var i=e.length-1,l=r<t?r:t;if(t>=i)return null;var o=n(t);if(o>=65472&&o<=65534)return{invalid:null,marker:o,offset:t};for(var a=n(l);!(a>=65472&&a<=65534);){if(++l>=i)return null;a=n(l)}return{invalid:o.toString(16),marker:a,offset:l}}return h.prototype={parse:function(t){function r(){var e=t[s]<<8|t[s+1];return s+=2,e}function i(){var e=r(),n=s+e-2,i=g(t,n,s);i&&i.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+i.invalid),n=i.offset);var l=t.subarray(s,n);return s+=l.length,l}function l(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){N=e.components[n];var i=Math.ceil(Math.ceil(e.samplesPerLine/8)*N.h/e.maxH),l=Math.ceil(Math.ceil(e.scanLines/8)*N.v/e.maxV),o=t*N.h,a=r*N.v*64*(o+1);N.blockData=new Int16Array(a),N.blocksPerLine=i,N.blocksPerColumn=l}e.mcusPerLine=t,e.mcusPerColumn=r}var o,a,s=0,u=null,h=null,c=[],p=[],y=[],w=r();if(65496!==w)throw new n("SOI not found");for(w=r();65497!==w;){var C,x,b;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 A=i();65504===w&&74===A[0]&&70===A[1]&&73===A[2]&&70===A[3]&&0===A[4]&&(u={version:{major:A[5],minor:A[6]},densityUnits:A[7],xDensity:A[8]<<8|A[9],yDensity:A[10]<<8|A[11],thumbWidth:A[12],thumbHeight:A[13],thumbData:A.subarray(14,14+3*A[12]*A[13])}),65518===w&&65===A[0]&&100===A[1]&&111===A[2]&&98===A[3]&&101===A[4]&&(h={version:A[5]<<8|A[6],flags0:A[7]<<8|A[8],flags1:A[9]<<8|A[10],transformCode:A[11]});break;case 65499:for(var v=r()+s-2;s<v;){var M=t[s++],k=new Uint16Array(64);if(M>>4){if(M>>4!=1)throw new n("DQT - invalid table spec");for(x=0;x<64;x++)k[e[x]]=r()}else for(x=0;x<64;x++)k[e[x]]=t[s++];c[15&M]=k}break;case 65472:case 65473:case 65474:if(o)throw new n("Only single frame JPEGs supported");r(),(o={}).extended=65473===w,o.progressive=65474===w,o.precision=t[s++],o.scanLines=r(),o.samplesPerLine=r(),o.components=[],o.componentIds={};var T,S=t[s++],I=0,P=0;for(C=0;C<S;C++){T=t[s];var E=t[s+1]>>4,R=15&t[s+1];I<E&&(I=E),P<R&&(P=R);var L=t[s+2];b=o.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),o.componentIds[T]=b-1,s+=3}o.maxH=I,o.maxV=P,l(o);break;case 65476:var U=r();for(C=2;C<U;){var O=t[s++],D=new Uint8Array(16),G=0;for(x=0;x<16;x++,s++)G+=D[x]=t[s];var B=new Uint8Array(G);for(x=0;x<G;x++,s++)B[x]=t[s];C+=17+G,(O>>4?p:y)[15&O]=f(D,B)}break;case 65501:r(),a=r();break;case 65498:r();var N,F=t[s++],z=[];for(C=0;C<F;C++){var V=o.componentIds[t[s++]];N=o.components[V];var _=t[s++];N.huffmanTableDC=y[_>>4],N.huffmanTableAC=p[15&_],z.push(N)}var j=t[s++],Z=t[s++],W=t[s++],q=d(t,s,o,z,a,j,Z,W>>4,15&W);s+=q;break;case 65535:255!==t[s]&&s--;break;default:if(255===t[s-3]&&t[s-2]>=192&&t[s-2]<=254){s-=3;break}throw new n("unknown marker "+w.toString(16))}w=r()}for(this.width=o.samplesPerLine,this.height=o.scanLines,this.jfif=u,this.eof=s,this.adobe=h,this.components=[],C=0;C<o.components.length;C++){var H=c[(N=o.components[C]).quantizationId];H&&(N.quantizationTable=H),this.components.push({output:m(0,N),scaleX:N.h/o.maxH,scaleY:N.v/o.maxV,blocksPerLine:N.blocksPerLine,blocksPerColumn:N.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,t){var r,n,i,l,o,a,s,u,h,f,c,d=this.width/e,p=this.height/t,m=0,g=this.components.length,y=e*t*g,w=new Uint8ClampedArray(y),C=new Uint32Array(e),x=4294967288;for(s=0;s<g;s++){for(n=(r=this.components[s]).scaleX*d,i=r.scaleY*p,m=s,c=r.output,l=r.blocksPerLine+1<<3,o=0;o<e;o++)u=0|o*n,C[o]=(u&x)<<3|7&u;for(a=0;a<t;a++)for(f=l*((u=0|a*i)&x)|(7&u)<<3,o=0;o<e;o++)w[m]=c[f+C[o]],m+=g}var b=this.decodeTransform;if(b)for(s=0;s<y;)for(u=0,h=0;u<g;u++,s++,h+=2)w[s]=(w[s]*b[h]>>8)+b[h+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,n,i=0,l=e.length;i<l;i+=3)t=e[i],r=e[i+1],n=e[i+2],e[i]=t-179.456+1.402*n,e[i+1]=t+135.459-.344*r-.714*n,e[i+2]=t-226.816+1.772*r;return e},_convertYcckToRgb:function(e){for(var t,r,n,i,l=0,o=0,a=e.length;o<a;o+=4)t=e[o],r=e[o+1],n=e[o+2],i=e[o+3],e[l++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*i-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*i+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776),e[l++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*i-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*i-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665),e[l++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*i+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*i-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var t,r,n,i=0,l=e.length;i<l;i+=4)t=e[i],r=e[i+1],n=e[i+2],e[i]=434.456-t-1.402*n,e[i+1]=119.541-t+.344*r+.714*n,e[i+2]=481.816-t-1.772*r;return e},_convertCmykToRgb:function(e){for(var t,r,n,i,l=0,o=1/255,a=0,s=e.length;a<s;a+=4)t=e[a]*o,r=e[a+1]*o,n=e[a+2]*o,i=e[a+3]*o,e[l++]=255+t*(-4.387332384609988*t+54.48615194189176*r+18.82290502165302*n+212.25662451639585*i-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*n-17.873870861415444*i-5.497006427196366)+n*(-2.5217340131683033*n-21.248923337353073*i+17.5119270841813)-i*(21.86122147463605*i+189.48180835922747),e[l++]=255+t*(8.841041422036149*t+60.118027045597366*r+6.871425592049007*n+31.159100130055922*i-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*n+131.35250912493976*i-190.9453302588951)+n*(4.444339102852739*n+9.8632861493405*i-24.86741582555878)-i*(20.737325471181034*i+187.80453709719578),e[l++]=255+t*(.8842522430003296*t+8.078677503112928*r+30.89978309703729*n-.23883238689178934*i-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*n+50.606957656360734*i-112.23884253719248)+n*(.03296041114873217*n+115.60384449646641*i-193.58209356861505)-i*(22.33816807309886*i+180.12613974708367);return e},getData:function(e,t,r){if(this.numComponents>4)throw new n("Unsupported color mode");var i=this._getLinearizedBlockData(e,t);if(1===this.numComponents&&r){for(var l=i.length,o=new Uint8ClampedArray(3*l),a=0,s=0;s<l;s++){var u=i[s];o[a++]=u,o[a++]=u,o[a++]=u}return o}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(i);if(4===this.numComponents){if(this._isColorConversionNeeded())return r?this._convertYcckToRgb(i):this._convertYcckToCmyk(i);if(r)return this._convertCmykToRgb(i)}return i}},h}()},85334(e,t,r){r.d(t,{$:()=>w,IB:()=>a,Iy:()=>M,KV:()=>A,N2:()=>C,RH:()=>b,ZD:()=>x,sn:()=>v});var n=r(68197),i=r(4576),l=r(4718),o=r(34727);function a(e){return"r"in e&&"g"in e&&"b"in e}function s(e){return"h"in e&&"s"in e&&"v"in e}function u(e){return"l"in e&&"a"in e&&"b"in e}function h(e){return"l"in e&&"c"in e&&"h"in e}r(78955),r(91829);const f=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],c=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function d(e,t){let r,n,i=[];if(e[0].length!==t.length)throw Error("dimensions do not match");let l=e.length,o=e[0].length,a=0;for(r=0;r<l;r++){for(a=0,n=0;n<o;n++)a+=e[r][n]*t[n];i.push(a)}return i}function p(e){let t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),r=d(f,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function m(e){let t=d(c,[e.x/100,e.y/100,e.z/100]).map(e=>{let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function g(e){let t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function y(e){let t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function w(e){return a(e)?e:h(e)?function(e){return m(y(function(e){let t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):u(e)?function(e){return m(y(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?m(e):s(e)?function(e){let t,r=(e.h+360)%360/60,n=e.s/100,i=e.v/100*255,l=i*n,o=l*(1-Math.abs(r%2-1));switch(Math.floor(r)){case 0:t={r:l,g:o,b:0};break;case 1:t={r:o,g:l,b:0};break;case 2:t={r:0,g:l,b:o};break;case 3:t={r:0,g:o,b:l};break;case 4:t={r:o,g:0,b:l};break;case 5:case 6:t={r:l,g:0,b:o};break;default:t={r:0,g:0,b:0}}return t.r=Math.round(t.r+i-l),t.g=Math.round(t.g+i-l),t.b=Math.round(t.b+i-l),t}(e):e}function C(e){return s(e)?e:function(e){let{r:t,g:r,b:n}=e,i=Math.max(t,r,n),l=i-Math.min(t,r,n),o=i,a=0===l?0:i===t?(r-n)/l%6:i===r?(n-t)/l+2:(t-r)/l+4,s=0===l?0:l/o;return a<0&&(a+=6),a*=60,s*=100,o*=100/255,{h:a,s,v:o}}(w(e))}function x(e){return u(e)?e:function(e){return g(p(e))}(w(e))}function b(e){return h(e)?e:function(e){return function(e){let t=e.l,r=e.a,n=e.b,i=Math.sqrt(r*r+n*n),l=Math.atan2(n,r);return l=l>0?l:l+2*Math.PI,{l:t,c:i,h:l}}(g(p(e)))}(w(e))}function A(e){return e[0]??=0,e[1]??=0,e[2]??=0,e}function v(e){return e.length=4,A(e),e[3]??=1,(0,o.qE)(e[3],0,1),e}function M(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map(e=>"string"==typeof e?new n.A(e):e)).length||1===t){let r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,i.k4)((0,l.o8)(e),r.seed)),e.length>=t){let r=[],n=(e.length-1)/(t-1);for(let i=0;i<t;i++){let t=Math.round(i*n);r.push(e[t].clone())}return r}return function(e,t,r={}){let n=[],l=e.length-1,o=Math.ceil((t-e.length)/l);e:for(let i=0;i<l;i++){let l=e[i],a=e[i+1];for(let i=1;i<=o;i++){let s=i/(o+1);if(n.push(T(l,a,s,r)),n.length+e.length===t)break e}}return[...e.map(e=>e.clone()),...(0,i.k4)(n,r.seed??1)]}(e,t,r)}const k=(e,t)=>{let r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function T(e,t,r,l={}){let o=e.r,a=e.g,s=e.b,u=t.r,h=t.g,f=t.b,c=Math.round(o+(u-o)*r),d=Math.round(a+(h-a)*r),p=Math.round(s+(f-s)*r);if(!l.offset)return new n.A([c,d,p]);let m=(0,i.Mo)(l.seed);return new n.A([k(c,m),k(d,m),k(p,m)])}},91829(e,t,r){function n(){return[0,0,0,0]}function i(e,t,r,n){return[e,t,r,n]}function l(){return i(1,1,1,1)}function o(){return i(1,0,0,0)}function a(){return i(0,1,0,0)}function s(){return i(0,0,1,0)}function u(){return i(0,0,0,1)}r.d(t,{_Y:()=>u,fA:()=>i,vt:()=>n});const h=[0,0,0,0],f=l(),c=o(),d=a(),p=s(),m=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_W:m,UNIT_X:c,UNIT_Y:d,UNIT_Z:p,ZEROS:h,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:n,freeze:function(e,t,r,n){return[e,t,r,n]},fromArray:function(e,t=[0,0,0,0]){let r=Math.min(4,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},fromValues:i,ones:l,unitW:u,unitX:o,unitY:a,unitZ:s,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,f,"uY",0,h])},78955(e,t,r){r.d(t,{Bw:()=>g,C:()=>i,Cc:()=>x,LI:()=>c,Om:()=>C,S8:()=>w,T9:()=>f,WQ:()=>o,Z0:()=>b,aI:()=>v,hG:()=>m,hZ:()=>l,hs:()=>d,jk:()=>h,m3:()=>y,t2:()=>A});var n=r(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function l(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function o(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function a(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function s(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function h(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function f(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function c(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function d(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function p(e,t){let r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],l=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+l*l)}function m(e,t){let r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],l=t[3]-e[3];return r*r+n*n+i*i+l*l}function g(e){let t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}function y(e){let t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}function w(e,t){let r=t[0],n=t[1],i=t[2],l=t[3],o=r*r+n*n+i*i+l*l;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=l*o),e}function C(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,r,n){let i=t[0],l=t[1],o=t[2],a=t[3];return e[0]=i+n*(r[0]-i),e[1]=l+n*(r[1]-l),e[2]=o+n*(r[2]-o),e[3]=a+n*(r[3]-a),e}function b(e,t,r){let n=t[0],i=t[1],l=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*l+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*l+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*l+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*l+r[15]*o,e}function A(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function v(e,t){let r=e[0],i=e[1],l=e[2],o=e[3],a=t[0],s=t[1],u=t[2],h=t[3],f=(0,n.FD)();return Math.abs(r-a)<=f*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=f*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(l-u)<=f*Math.max(1,Math.abs(l),Math.abs(u))&&Math.abs(o-h)<=f*Math.max(1,Math.abs(o),Math.abs(h))}const M=a,k=s,T=u,S=p,I=m,P=g,E=y;Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:i,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:S,distance:p,div:T,divide:u,dot:C,equals:v,exactEquals:A,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:P,length:g,lerp:x,max:f,min:h,mul:k,multiply:s,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:w,random:function(e,t=1){let r,i,l,o,a,s,u=n.Ov;do{r=2*u()-1,i=2*u()-1,a=r*r+i*i}while(a>=1);do{l=2*u()-1,o=2*u()-1,s=l*l+o*o}while(s>=1);let h=Math.sqrt((1-a)/s);return e[0]=t*r,e[1]=t*i,e[2]=t*l*h,e[3]=t*o*h,e},round:c,scale:d,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},set:l,sqrDist:I,sqrLen:E,squaredDistance:m,squaredLength:y,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:M,subtract:a,transformMat4:b,transformQuat:function(e,t,r){let n=t[0],i=t[1],l=t[2],o=r[0],a=r[1],s=r[2],u=r[3],h=u*n+a*l-s*i,f=u*i+s*n-o*l,c=u*l+o*i-a*n,d=-o*n-a*i-s*l;return e[0]=h*u+d*-o+f*-s-c*-a,e[1]=f*u+d*-a+c*-o-h*-s,e[2]=c*u+d*-s+h*-a-f*-o,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},9334(e,t,r){function n(e,t){let r=0,n="",i=0,l=0,o=e.length;for(;r<o;)l=e[r++],i=l>>4,i<8?i=1:15===i?(i=4,l=(7&l)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++]):14===i?(i=3,l=(15&l)<<12|(63&e[r++])<<6|63&e[r++]):(i=2,l=(31&l)<<6|63&e[r++]),(0!==l||t)&&(n+=String.fromCharCode(l));return n}r.d(t,{w:()=>n})},53593(e,t,r){r.d(t,{D:()=>o,E:()=>d});var n=r(49186),i=r(17676),l=r(8003);async function o(e,t,r){if(!e||e.byteLength<10)throw new n.A("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:l,height:o,format:h}=t,{applyJpegMask:d}=t;if(d&&(!l||!o))throw new n.A("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");let p=null;"jpg"===h&&d&&l&&o&&(p=await c(e,{width:l,height:o}));try{let n=new Blob([new Uint8Array(e)],{type:f(h)}),l=await createImageBitmap(n);(0,i.Te)(r);let{useTiledDecoding:o,tileIndex:c,tileSize:d}=t;if(o&&null==c)return s(l,p,d);if(null!=c&&null!=d)return u(l,c,d);try{return a(l,p)}catch(e){if((0,i.QP)(e),l.width>4096||l.height>4096)return s(l,p);throw e}}catch(e){throw(0,i.QP)(e),new n.A("imagecanvasdecoder: decode","cannot load image")}}function a(e,t){let{width:r,height:i}=e,l=new OffscreenCanvas(r,i),o=l.getContext("2d");if(!o)throw new n.A("imagecanvasdecoder: decode","cannot create canvas context");o.drawImage(e,0,0,r,i);let a=h(o.getImageData(0,0,r,i),r,i,t);return l.width=0,l.height=0,a}function s(e,t,r=[2048,2048]){let[i,l]=r,o=new OffscreenCanvas(i,l),a=o.getContext("2d",{willReadFrequently:!0});if(!a)throw new n.A("imagecanvasdecoder: decode","cannot create canvas context");let{width:s,height:u}=e,h=s*u,f=new Uint8Array(h),c=new Uint8Array(h),d=new Uint8Array(h),p=null==t;t||=new Uint8Array(h);for(let r=0;r<u;r+=l){let n=Math.min(l,u-r);for(let l=0;l<s;l+=i){let o=Math.min(i,s-l);a.clearRect(0,0,o,n),a.drawImage(e,l,r,o,n,0,0,o,n);let{data:u}=a.getImageData(0,0,o,n);for(let e=0;e<n;e++){let n=e*o*4,i=(r+e)*s+l;for(let e=0;e<o;e++,n+=4,i++)f[i]=u[n],c[i]=u[n+1],d[i]=u[n+2],p&&(t[i]=u[n+3])}}}let m={width:s,height:u,pixels:[f,c,d],mask:t,pixelType:"u8"};return o.width=0,o.height=0,console.log(`decodeFullImageTiled: ${s}x${u} using tile ${i}x${l}`,m),m}function u(e,t,r){let[i,l,o]=t,[a,s]=r,u=Math.ceil(e.width/2**i),f=Math.ceil(e.height/2**i),c=Math.ceil(f/s),d=Math.ceil(u/a);if(l>=c||o>=d)return null;let p=new OffscreenCanvas(u,f),m=p.getContext("2d");if(!m)throw new n.A("imagecanvasdecoder: decode","cannot create canvas context");m.drawImage(e,0,0,u,f);let g=o*a,y=l*s,w=Math.min(a,u-g),C=Math.min(s,f-y),x=h(m.getImageData(g,y,w,C),a,s);return p.width=0,p.height=0,x}function h(e,t,r,n){let i=t*r,l=new Uint8Array(i),o=new Uint8Array(i),a=new Uint8Array(i),s=null==n;n||=new Uint8Array(i);let u={width:t,height:r,pixels:[l,o,a],mask:n,pixelType:"u8"},{width:h,height:f,data:c}=e;if(h===t&&f===r){for(let e=0,t=0;e<i;e++,t+=4)l[e]=c[t],o[e]=c[t+1],a[e]=c[t+2],s&&(n[e]=c[t+3]);return u}for(let e=0;e<f;e++){let r=e*h*4;for(let i=0;i<h;i++){let u=e*t+i;l[u]=c[r+4*i],o[u]=c[r+4*i+1],a[u]=c[r+4*i+2],s&&(n[u]=c[r+4*i+3])}}return u}function f(e){return`image/${"jpg"===e?"jpeg":e}`}async function c(e,t){try{let r=new Uint8Array(e),n=Math.ceil(r.length/2),i=r.length-2;for(;n<i&&(255!==r[n]||217!==r[n+1]);n++);n+=2;let l=null;return n<r.length-1&&(l=await d(r.subarray(n,-4),t.width*t.height)),l}catch{return null}}async function d(e,t,r){try{let n=await(0,l.U)(e,void 0,r),i=new Uint8Array(t);for(let e=0,t=0;e<n.length;e++)for(let r=7;r>=0;r--)i[t++]=n[e]>>r&1;return i}catch{return null}}},85951(e,t,r){r.d(t,{D:()=>o,R:()=>l});var n=r(53593),i=r(61294);function l(e){let t=new Uint8Array(e),r=t.length;if(255!==t[0]||216!==t[1])return null;let n=2;for(;n<r&&255===t[n++];){for(;255===t[n];)n++;if(n>=r)break;let e=t[n++];if(217===e||218===e)break;if(e>=208&&e<=215||1===e)continue;let i=t[n]<<8|t[n+1];if(e>=192&&e<=207&&196!==e&&200!==e&&204!==e&&i>=8){let e=n+2,r=t[e+1]<<8|t[e+2];return{width:t[e+3]<<8|t[e+4],height:r,planes:t[e+5]}}n+=i}return null}async function o(e,t={}){let r=new Uint8Array(e),l=new i.J;l.parse(r);let{width:o,height:a,numComponents:s,eof:u}=l,h=t.decodeJpegAsRgb??1!==s,f=l.getData(o,a,h),c=o*a,d=null,{applyJpegMask:p=!1}=t;p&&u<r.length-1&&(d=await(0,n.E)(r.subarray(u,-4),c));let m,g=h?3:s;if(1===g&&f.length===o*a){let e=new Uint8Array(f.buffer);m=[e,e,e]}else{m=[];for(let e=0;e<g;e++)m.push(new Uint8Array(c));for(let e=0,t=0;e<c;e++)for(let r=0;r<g;r++)m[r][e]=f[t++]}return{width:o,height:a,pixels:m,mask:d}}},96381(e,t,r){r.d(t,{D:()=>Y,g:()=>J});var n=r(49186),i=r(97768),l=r(17676),o=r(53593),a=r(85951),s=r(2741);const u=[{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:[-34028234663852886e22,34028234663852886e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let h=null;function f(){return h||(h=r.e(382).then(()=>r(30382)).then(({default:e})=>e({locateFile:e=>(0,s.s)(`esri/layers/raster/formats/${e}`)})).then(e=>{!function(e){let t,{_malloc:r,_free:n,memory:i,_lerc_getBlobInfo:l,_lerc_getDataRanges:o,_lerc_decode_4D:a}=e,s=e=>{let n=e.map(e=>function(e){return 16+(e>>3<<3)}(e)),l=n.reduce((e,t)=>e+t),o=r(l);t=new Uint8Array(i.buffer);let a=n[0];n[0]=o;for(let e=1;e<n.length;e++){let t=n[e];n[e]=n[e-1]+a,a=t}return n};c.getBlobInfo=e=>{let r=new Uint8Array(48),a=new Uint8Array(24),[u,h,f]=s([e.length,r.length,a.length]);t.set(e,u),t.set(r,h),t.set(a,f);let c=l(u,e.length,h,f,12,3);if(c)throw n(u),Error(`lerc-getBlobInfo: error code is ${c}`);t=new Uint8Array(i.buffer),d(t,h,r),d(t,f,a);let p=new Uint32Array(r.buffer),m=new Float64Array(a.buffer),[g,y,,w,C,x,b,A,v,M,k]=p,T=0===b,S={version:g,depthCount:M,width:w,height:C,validPixelCount:b,bandCount:x,blobSize:A,maskCount:v,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:k};if(k&&M>1)return n(u),S;if(1===M&&1===x){n(u);let e=T?0:m[0],t=T?0:m[1];return S.statistics.push({minValue:e,maxValue:t}),S}let I=M*x*8,P=new Uint8Array(I),E=new Uint8Array(I),R=u,L=0,U=0,O=!1;if(t.byteLength<u+2*I?(n(u),O=!0,[R,L,U]=s([e.length,I,I]),t.set(e,R)):[L,U]=s([I,I]),t.set(P,L),t.set(E,U),c=o(R,e.length,M,x,L,U),c)throw n(R),O||n(L),Error(`lerc-getDataRanges: error code is ${c}`);t=new Uint8Array(i.buffer),d(t,L,P),d(t,U,E);let D=new Float64Array(P.buffer),G=new Float64Array(E.buffer),B=S.statistics;for(let e=0;e<x;e++)if(M>1){let t=D.slice(e*M,(e+1)*M),r=G.slice(e*M,(e+1)*M),n=T?0:Math.min.apply(null,t),i=T?0:Math.max.apply(null,r);B.push({minValue:n,maxValue:i,depthStats:{minValues:t,maxValues:r}})}else B.push({minValue:T?0:D[e],maxValue:T?0:G[e]});return n(R),O||n(L),S},c.decode=(e,r)=>{let{maskCount:l,depthCount:o,bandCount:h,width:f,height:c,dataType:p,bandCountWithNoData:m,validPixelCount:g}=r,y=u[p],w=f*c,C=new Uint8Array(w*h),x=w*o*h*y.size,b=new Uint8Array(x),A=new Uint8Array(h),v=new Uint8Array(8*h);if(0===g)return{data:b,maskData:C,noDataValues:null};let[M,k,T,S,I]=s([e.length,C.length,b.length,A.length,v.length]);t.set(e,M),t.set(C,k),t.set(b,T),t.set(A,S),t.set(v,I);let P=a(M,e.length,l,k,o,f,c,h,p,T,S,I);if(P)throw n(M),Error(`lerc-decode: error code is ${P}`);t=new Uint8Array(i.buffer),d(t,T,b),d(t,k,C);let E=null;if(m){d(t,S,A),d(t,I,v),E=[];let e=new Float64Array(v.buffer);for(let t=0;t<A.length;t++)E.push(A[t]?e[t]:null)}return n(M),{data:b,maskData:C,noDataValues:E}}}(e)}),h)}const c={getBlobInfo:null,decode:null};function d(e,t,r){r.set(e.slice(t,t+r.length))}function p(e,t,r,n,i){if(r<2)return e;let l=new n(t*r);for(let n=0,i=0;n<t;n++)for(let o=0,a=n;o<r;o++,a+=t)l[a]=e[i++];return l}function m(e,t={}){let r=t.inputOffset??0,n=e instanceof Uint8Array?e.subarray(r):new Uint8Array(e,r),i=c.getBlobInfo(n),{data:l,maskData:o,noDataValues:a}=c.decode(n,i),{width:s,height:h,bandCount:f,depthCount:d,dataType:m,maskCount:g,statistics:y}=i,w=u[m],C=new w.ctor(l.buffer),x=[],b=[],A=s*h,v=A*d,M=u.find(e=>e.pixelType===t.outputPixelType)??w,k=M.pixelType!==w.pixelType;for(let e=0;e<f;e++){let r=e*v,n=r+v,i=C.subarray(r,n),l=k?new M.ctor(i):i;if(t.returnInterleaved)x.push(l);else{let e=p(l,A,d,M.ctor);x.push(e)}b.push(o.subarray(r,n))}let T=0===g?null:1===g?b[0]:new Uint8Array(A);if(g>1){T.set(b[0]);for(let e=1;e<b.length;e++){let t=b[e];for(let e=0;e<A;e++)T[e]=T[e]&t[e]}}let{noDataValue:S}=t,I=null!=S&&M.range[0]<=S&&M.range[1]>=S,{validPixelCount:P}=i;if(g>0&&I)for(let e=0;e<f;e++){let t=x[e];if(0===P)t.fill(S);else{let r=b[e]||T;for(let e=0;e<A;e++)0===r[e]&&(t[e]=S)}}let E=g===f&&f>1?b:null;return{width:s,height:h,bandCount:f,pixelType:M.pixelType,depthCount:d,statistics:y,pixels:x,mask:T,validPixelCount:P,bandMasks:E,noDataValues:a}}function g(){let e=[];for(let t=0;t<=257;t++)e[t]=[t];return e}function y(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}const w=new Set;function C(e,t,r,n=!0){let i=function(e,t,r,n=!0){if(t%4!=0||r%4!=0){let i=new ArrayBuffer(4*Math.ceil(r/4)),l=new Uint8Array(i),o=new Uint8Array(e,t,r);if(n)for(let e=0;e<l.length;e+=4)l[e]=o[e+3],l[e+1]=o[e+2],l[e+2]=o[e+1],l[e+3]=o[e];else l.set(o);return new Uint32Array(l.buffer)}if(n){let n=new Uint8Array(e,t,r),i=new Uint8Array(n.length);for(let e=0;e<i.length;e+=4)i[e]=n[e+3],i[e+1]=n[e+2],i[e+2]=n[e+1],i[e+3]=n[e];return new Uint32Array(i.buffer)}return new Uint32Array(e,t,r/4)}(e,t,r,n),l=9,o=g(),a=32,s=o.length,u=[],h=1,f=i[0],c=0,d=i.length,p=8*(4*d-r),m=[];for(;null!=f;){if(a>=l)a-=l,c=f>>>32-l,f<<=l;else{c=f>>>32-a,f=i[h++];let e=l-a;a=32-e,c=(c<<e)+(f>>>a),f<<=e}if(257===c)break;if(256===c){l=9,o=g(),s=o.length,u=[];continue}let e=o[c];if(null==e){if(c>o.length)throw Error("data integrity issue: code does not exist on code page");u.push(u[0]),o[s++]=u.slice(),y(m,u)}else y(m,e),u.push(e[0]),u.length>1&&(o[s++]=u.slice()),u=e.slice();if(w.has(s)&&l++,0===a&&(f=i[h++],a=32),h>d||h===d&&a<=p)break}return new Uint8Array(m)}w.add(511),w.add(1023),w.add(2047),w.add(4095),w.add(8191);var x=r(94778);const b=new Set(["uint8","int8","uint16","int16","uint32","int32","int64","uint64"]),A=new Map([["uint8",{byteCount:1,pixelType:"u8",ctor:Uint8Array}],["int8",{byteCount:1,pixelType:"s8",ctor:Int8Array}],["uint16",{byteCount:2,pixelType:"u16",ctor:Uint16Array}],["int16",{byteCount:2,pixelType:"s16",ctor:Int16Array}],["uint32",{byteCount:4,pixelType:"u32",ctor:Uint32Array}],["int32",{byteCount:4,pixelType:"s32",ctor:Int32Array}],["uint64",{byteCount:8,pixelType:"f64",ctor:BigUint64Array}],["int64",{byteCount:8,pixelType:"f64",ctor:BigInt64Array}]]);let v;const M={getBlobInfo:null,decode:null};function k(e){if(!A.has(e))throw Error("Unsupported data type: "+e);return A.get(e)}const T=(e,t)=>{let r=t.width*t.height,n=t.pixelType;return Math.floor(e.byteLength/(r*S(n)))},S=e=>{let t=1;switch(e){case Uint8Array:case Int8Array:t=1;break;case Uint16Array:case Int16Array:t=2;break;case Uint32Array:case Int32Array:case Float32Array:t=4;break;case Float64Array:t=8}return t};r(44208);var I=r(61294),P=r(44094),E=r(10713),R=r(8003);function L(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}function U(e){let t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f64":t=Float64Array;break;default:t=Float32Array}return t}function O(e,t){if(t%8==0)return e;let r=t>16?32:t>8?16:8;r>8&&(e=G(e,32===r?4:2));let n=32===r?Uint32Array:16===r?Uint16Array:Uint8Array,i=new n(e),l=Math.floor(8*e.byteLength/t+1e-6),o=new n(l),a=(1<<t)-1,s=0,u=0,h=0;for(let e=0;e<l;e++)if(0===u&&(h=i[s++],u=r),u>=t)o[e]=h>>>u-t&a,u-=t;else{let n=t-u,l=(h&a)<<n&a;h=i[s++],u=r-n,l+=h>>>u,o[e]=l}return o.buffer}function D(e,t,r){let n=new I.J;n.parse(e),n.colorTransform=6===r?-1:0;let i=n.getData(n.width,n.height,1!==t&&4!==t);return new Uint8Array(i.buffer)}function G(e,t){let r=new Uint8Array(e),n=new Uint8Array(r.length);if(2===t)for(let e=0;e<r.length;e+=2)n[e]=r[e+1],n[e+1]=r[e];else if(4===t)for(let e=0;e<r.length;e+=4)n[e]=r[e+3],n[e+1]=r[e+2],n[e+2]=r[e+1],n[e+3]=r[e];else for(let e=0;e<r.length;e+=8)n[e]=r[e+7],n[e+1]=r[e+6],n[e+2]=r[e+5],n[e+3]=r[e+4],n[e+4]=r[e+3],n[e+5]=r[e+2],n[e+6]=r[e+1],n[e+7]=r[e];return n.buffer}async function B(e,t){let{input:r,isTiffLittleEndian:i,ifd:l,offset:o,size:a}=e,s=E.Z===i,u=(0,P.LZ)(l,"BITSPERSAMPLE"),h=(0,P.LZ)(l,"SAMPLESPERPIXEL")??1,c=(0,P.LZ)(l,"PHOTOMETRICINTERPRETATION"),d=(0,P.LZ)(l,"SAMPLEFORMAT")??1,p=L(d,u),g=(0,P.ni)(l);if(34887===g)return await async function(e,t){return await f(),m(e,{inputOffset:t}).pixels[0]}(r,o);let y,w,x,b=U(p);switch(g){case 1:y=r.slice(o,o+a),w=new Uint8Array(y);break;case 8:case 32946:w=await(0,R.U)(new Uint8Array(r,o,a),void 0,t),y=w.buffer;break;case 6:w=D(new Uint8Array(r,o,a),h,c),y=w.buffer;break;case 7:{let e=l.get("JPEGTABLES").values,t=e.length-2,n=new Uint8Array(t+a-2);for(let r=0;r<t;r++)n[r]=e[r];let i=new Uint8Array(r,o+2,a-2);for(let e=0;e<i.length;e++)n[t+e]=i[e];w=D(n,h,c),y=w.buffer}break;case 5:w=C(r,o,a,i),y=w.buffer;break;default:throw new n.A("tiff-reader:decode-data","unsupported compression "+g)}if(y=O(y,u),s||u<=8)x=new b(y);else{let e=u>32?8:u>16?4:2;x=new b(G(w.buffer,e))}let A=(0,P.LZ)(l,"PREDICTOR")??1,v=(0,P.LZ)(l,"TILEWIDTH"),M=(0,P.LZ)(l,"TILELENGTH");if(A>1&&(5===g||8===g||32946===g)&&v&&M){let e=(0,P.XO)(l),t=new b(x.length);t.set(x),x=function(e,t,r,n,i){let l=n?4:1,o=r*l*i;n&&(e=new Uint8Array(e.buffer));for(let r=0;r<t;r++){let t=r*o;for(let r=i;r<o;r++)e[t+r]+=e[t+r-i]}if(!n)return e;let a=new Uint8Array(e.length),s=r*i;for(let r=0;r<t;r++){let t=r*o;for(let r=0;r<s;r++)for(let n=0;n<l;n++)a[t+r*l+n]=e[t+r+(l-n-1)*s]}return new Float32Array(a.buffer)}(t,M,v,3===d&&3===A,e?1:h)}return x}var N=r(14140),F=r(4151);async function z(e,t){if(!E.Z)throw new n.A("rasterCoded:decode","lerc decoder is not supported on big endian platform");await f();let{width:r,height:i,pixelType:l,statistics:o,depthCount:a,noDataValues:s,bandMasks:u,pixels:h,mask:c,validPixelCount:d}=m(e,{inputOffset:t.offset,returnInterleaved:t.returnInterleaved});return new N.A({width:r,height:i,pixelType:l.toLowerCase(),pixels:h,mask:c,validPixelCount:d,statistics:o.map(({minValue:e,maxValue:t})=>new F.A(e,t)),bandMasks:u,depthCount:a,noDataValues:s})}async function V(e,t){await(v??=r.e(6154).then(()=>r(56154)).then(({default:e})=>e({locateFile:e=>(0,s.s)(`esri/layers/raster/formats/${e}`)})).then(e=>{!function(e){let{_GetInfo:t,_decode:r,_malloc:n,_free:i,writeArrayToMemory:l,UTF8ToString:o}=e;M.getBlobInfo=e=>{e.length>1e3&&(e=e.slice(0,1e3));let r=n(e.length);l(e,r);let a=t(r,e.length);if(i(r),!a)return null;let s=o(a);i(a);try{let e=JSON.parse(s);return{width:e.xsize,height:e.ysize,bandCount:e.nbands,dataType:e.dtype,mode:e.mode,bandMap:e.bandmap}}catch{return null}},M.decode=(t,n)=>{let{dataType:i,width:l,height:o,bandCount:a}=n;if(!b.has(i))throw Error("Unsupported data type: "+i);let{_malloc:s,_free:u}=e,h=s(t.length);e.writeArrayToMemory(t,h);let{ctor:f,byteCount:c}=k(i),d=l*o*a*c,p=s(d),m=s(1024);if(0===r(h,t.length,p,m))throw u(h),u(p),u(m),Error("Decoding failed: "+e.UTF8ToString(m));let g=new f(e.HEAPU8.slice(p,p+d).buffer);if(u(h),u(p),u(m),g instanceof BigInt64Array||g instanceof BigUint64Array){let e=new Float64Array(g.length);for(let t=0;t<g.length;t++)e[t]=Number(g[t]);return e}return g}}(e)}),v);let i=function(e){let t=new Uint8Array(e),r=M.getBlobInfo(t);if(!r)return null;let n=M.decode(t,r);if(!n)return null;let{width:i,height:l,bandCount:o,dataType:a}=r,{ctor:s,pixelType:u}=k(a),h=s===BigInt64Array||s===BigUint64Array?Float64Array:s,f=Array.from({length:o},()=>new h(i*l));for(let e=0,t=0;e<i*l;e++)for(let r=0;r<o;r++)f[r][e]=n[t++];return{width:i,height:l,pixelType:u,pixels:f}}(e);if(!i)throw new n.A("rasterCodec:decode","failed to decode the input data.");let{width:l,height:o,pixels:a,pixelType:u}=i;return new N.A({width:l,height:o,pixelType:u,pixels:a})}async function _(e,t,r){let l=await async function(e,t={},r){let i=t.pyramidLevel||0,l=t.headerInfo||(0,P.RW)(e),{ifds:o,noData:a}=l;if(0===o.length)throw new n.A("tiff-reader:decode","no valid image file directory");let s=(0,P._J)(l);if(s)throw new n.A("tiff-reader:decode",s);let u=-1===i?o[o.length-1]:o[i],h=a??t.noDataValue,f=l.tileWidth?await async function(e,t,r,n){let i=(0,P.wc)(r,"TILEOFFSETS"),l=(0,P.wc)(r,"TILEBYTECOUNTS");if(null==i||null==l)return null;let{width:o,height:a,pixelType:s,tileWidth:u,tileHeight:h}=(0,P.uc)([r]),f=(0,P.XO)(r,t),c=(0,P.LZ)(r,"SAMPLESPERPIXEL")||t.planes,d=o*a,p=(0,P.LZ)(r,"BITSPERSAMPLE"),m=34887===(0,P.ni)(r),g=U(s),y=[];for(let e=0;e<c;e++)y.push(new g(d));let w=Math.ceil(o/u),C=new Uint8Array(d).fill(255),x=null,b=!1;if(p%8==0)if(m&&f&&c>1){let s=Math.round(i.length/c);for(let f=0;f<s;f++){let s=Math.floor(f/w)*h,d=f%w*u,p=s*o+d;for(let m=0;m<c;m++){let g=f*c+m;0===l[g]?(x=null,b=!0):x=await B({input:e,isTiffLittleEndian:t.littleEndian,ifd:r,offset:i[g],size:l[g]},n);let w=Math.min(u,o-d),A=Math.min(h,a-s),v=y[m];for(let e=0;e<A;e++){let t=p+e*o,r=e*u;for(let e=0;e<w;e++,t++,r++)x?v[t]=x[r]:C[t]=0}}}}else for(let s=0;s<i.length;s++){let d=Math.floor(s/w)*h,p=s%w*u,g=d*o+p;0===l[s]?(x=null,b=!0):x=await B({input:e,isTiffLittleEndian:t.littleEndian,ifd:r,offset:i[s],size:l[s]},n);let A=Math.min(u,o-p),v=Math.min(h,a-d);for(let e=0;e<c;e++){let t=y[e];if(f||m)for(let r=0;r<v;r++){let n=g+r*o,i=u*h*e+r*u;for(let e=0;e<A;e++,n++,i++)x?t[n]=x[i]:C[n]=0}else for(let r=0;r<v;r++){let n=g+r*o,i=r*u*c+e;for(let e=0;e<A;e++,n++,i+=c)x?t[n]=x[i]:C[n]=0}}}return{width:o,height:a,pixelType:s,pixels:y,mask:b?C:void 0}}(e,l,u,r):await async function(e,t,r,n){let i=E.Z===t.littleEndian,l=(0,P.wc)(r,"STRIPOFFSETS"),o=(0,P.wc)(r,"STRIPBYTECOUNTS");if(null==l||null==o)return null;let a,s,u,h,{width:f,height:c,pixelType:d}=(0,P.uc)([r]),p=(0,P.LZ)(r,"SAMPLESPERPIXEL")||t.planes,m=(0,P.LZ)(r,"PHOTOMETRICINTERPRETATION"),g=f*c,y=(0,P.LZ)(r,"BITSPERSAMPLE"),w=U(d),x=new w(g*p),b=(0,P.LZ)(r,"ROWSPERSTRIP"),A=(0,P.ni)(r);if(y%8==0)for(let r=0;r<l.length;r++){let c=b*f*r*p;if("u8"===d||"s8"===d||i)8===A||32946===A?(u=new Uint8Array(e,l[r],o[r]),u=await(0,R.U)(u,void 0,n),s=u.buffer):6===A?(u=new Uint8Array(e,l[r],o[r]),u=D(u,p,m),s=u.buffer):5===A?(u=C(e,l[r],o[r],t.littleEndian),s=u.buffer):s=e.slice(l[r],l[r]+o[r]),s=O(s,y),a=new w(s);else{switch(6===A||8===A||32946===A?(u=new Uint8Array(e,l[r],o[r]),h=await(0,R.U)(u,void 0,n),s=h.buffer):(s=new ArrayBuffer(o[r]),u=new Uint8Array(e,l[r],o[r]),h=new Uint8Array(s)),d){case"u16":case"s16":for(let e=0;e<u.length;e+=2)h[e]=u[e+1],h[e+1]=u[e];break;case"u32":case"s32":case"f32":for(let e=0;e<u.length;e+=4)h[e]=u[e+3],h[e+1]=u[e+2],h[e+2]=u[e+1],h[e+3]=u[e]}s=O(s,y),a=new w(s)}x.set(a,c)}let v=[];if(1===p)v.push(x);else for(let e=0;e<p;e++){let t=new w(g);for(let r=0;r<g;r++)t[r]=x[r*p+e];v.push(t)}return{width:f,height:c,pixelType:d,pixels:v}}(e,l,u,r);if(!f)return f;if(null!=h){let e=null==a&&t?.matchAllNoData;(0,x.Sp)(f,h,{matchAllNoData:e})}return f}(e,{...t,noDataValue:t.tiffNoDataValue,matchAllNoData:t.matchAllNoData},r);return(0,i.Lw)(l),new N.A({width:l.width,height:l.height,pixels:l.pixels,pixelType:l.pixelType.toLowerCase(),mask:l.mask,bandMasks:l.bandMasks})}function j(e,t){let r=t.pixelType||"u8",n=N.A.getPixelArrayConstructor(r),i="u8"===r?e:new n(e.buffer),l=[],o=t.planes||1;if(1===o)l.push(i);else for(let r=0;r<o;r++){let a=(t.width||1)*(t.height||e.length),s=new n(a);for(let e=0;e<a;e++)s[e]=i[e*o+r];l.push(s)}return new N.A({width:t.width||1,height:t.height||e.length,pixels:l,pixelType:r})}async function Z(e,t,r){return j(await(0,R.U)(new Uint8Array(e),void 0,r),t)}function W(e,t){return j(C(e,t.offset,t.eof,!t.isInputBigEndian),t)}function q(e,t){let r=t.format,{pixelTypeCtor:n}=function(e){let t=null,r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,t=Uint8Array;break;case"u16":r||=65535,t=Uint16Array;break;case"u32":r||=2**32-1,t=Uint32Array;break;case"s8":r||=-128,t=Int8Array;break;case"s16":r||=-32768,t=Int16Array;break;case"s32":r||=0-2**31,t=Int32Array;break;default:t=Float32Array}return{pixelTypeCtor:t,noDataValue:r}}(t.pixelType),i=function(e,t){let r=t.pixelType,n=[],i=t.width*t.height,l=T(e,t),{bandIds:o,format:a}=t,s=o?.length||T(e,t),u=e.byteLength-e.byteLength%(i*S(r)),h=new r(e,0,i*l);if("bip"===a)for(let e=0;e<s;e++){let t=new r(i),a=o?o[e]:e;for(let e=0;e<i;e++)t[e]=h[e*l+a];n.push(t)}else if("bsq"===a)for(let e=0;e<s;e++){let t=o?o[e]:e;n.push(h.subarray(t*i,(t+1)*i))}let f=null;return u<e.byteLength-1&&(f=((e,t)=>{if(8*e.byteLength<t)return null;let r=new Uint8Array(e,0,Math.ceil(t/8)),n=new Uint8Array(t),i=0,l=0;for(let e=0;e<r.length-1;e++){l=r[e];for(let e=7;e>=0;e--)n[i++]=l>>e&1}let o=7;for(;i<t-1;)l=r[r.length-1],n[i++]=l>>o&1,o--;return n})(e.slice(u),i)),{pixels:n,mask:f}}(e,{width:t.width,height:t.height,pixelType:n,format:r});return new N.A({width:t.width,height:t.height,pixels:i.pixels,pixelType:t.pixelType,mask:i.mask})}async function H(e,t,r){let n=await(0,o.D)(e,t,r);return new N.A(n)}async function K(e,t,r){let i=t.format||J(e),o={...t,format:i},{canvasUsage:s}=t;if("no-canvas"!==s||"png"===i)try{return await H(e,o,r)}catch(e){if((0,l.zf)(e))throw e;if("canvas-only"===s)throw new n.A("rasterCodec:decode",`failed to decode the input data with canvas for format ${i}`)}return await async function(e,t){let r=await(0,a.D)(e,t);return new N.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:"u8",mask:r.mask})}(e,o)}function J(e){if(!e)return;let t,r=new Uint8Array(e,0,10);return 255===r[0]&&216===r[1]?t="jpg":137===r[0]&&80===r[1]&&78===r[2]&&71===r[3]?t="png":67===r[0]&&110===r[1]&&116===r[2]&&90===r[3]&&73===r[4]&&109===r[5]&&97===r[6]&&103===r[7]&&101===r[8]&&32===r[9]||76===r[0]&&101===r[1]&&114===r[2]&&99===r[3]&&50===r[4]&&32===r[5]?t="lerc":73===r[0]&&73===r[1]&&42===r[2]&&0===r[3]||77===r[0]&&77===r[1]&&0===r[2]&&42===r[3]||73===r[0]&&73===r[1]&&43===r[2]&&0===r[3]||77===r[0]&&77===r[1]&&0===r[2]&&43===r[3]?t="tiff":71===r[0]&&73===r[1]&&70===r[2]?t="gif":66===r[0]&&77===r[1]?t="bmp":81===r[0]&&66===r[1]&&51===r[2]&&(t="qb3"),t}async function Y(e,t={},r){if(null==e)throw new n.A("rasterCodec:decode","missing encodeddata parameter.");let i=t.format?.toLowerCase();if(!("bsq"!==i&&"bip"!==i||null!=t.width&&null!=t.height))throw new n.A("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===i&&t.customOptions)return async function(e,t,r){let n=await async function(e,t,r){let{headerInfo:n,ifd:i,offsets:l,sizes:o}=t,a=[];for(let t=0;t<l.length;t++){o[t];let s=await B({input:e,isTiffLittleEndian:n.littleEndian,ifd:i,offset:l[t],size:o[t]||e.byteLength},r);a.push(s)}let s,u=(0,P.XO)(i,n),h=(0,P.LZ)(i,"BITSPERSAMPLE"),f=L((0,P.LZ)(i,"SAMPLEFORMAT")??1,h),c=(0,P.LZ)(i,"SAMPLESPERPIXEL")||n.planes,d=U(f),p=(0,P.LZ)(i,"TILEWIDTH"),m=(0,P.LZ)(i,"TILELENGTH"),g=34887===(0,P.ni)(i),y=p*m,w=[],C=a[0];for(let e=0;e<c;e++){if(s=new d(y),a.length===c)C=a[e],C.length===y&&(s=C);else if(C.length)if(u||g)s=C.length===y?C:C.slice(y*e,y*(e+1));else for(let t=0;t<y;t++)s[t]=C[t*c+e];w.push(s)}let b=n.noData?n.noData[0]:t.noDataValue,A=n.metadata?n.metadata.statistics:null,v=A?A.map(e=>e.min):null,M=A?A.map(e=>e.max):null,k={pixelType:f,width:p,height:m,pixels:w,noDataValue:b};return null==b?v&&M&&t.applyMinMaxConstraint&&(k.mask=function(e,t,r){if(!(e&&e.length>0&&t&&r))return null;let n,i,l,o=e[0].length,a=e.length,s=new Uint8Array(o);for(let u=0;u<a;u++)if(n=e[u],i=t[u],l=r[u],0===u)for(let e=0;e<o;e++)s[e]=n[e]<i||n[e]>l?0:1;else for(let e=0;e<o;e++)s[e]&&(s[e]=n[e]<i||n[e]>l?0:1);return s}(w,v,M)):(0,x.Sp)(k,b,{matchAllNoData:t?.matchAllNoData}),k}(e,t.customOptions,r),i=new N.A({width:n.width,height:n.height,pixels:n.pixels,pixelType:n.pixelType.toLowerCase(),mask:n.mask});return t.skipStatistics||i.updateStatistics(),i}(e,t,r);if(!i||"bsq"!==i&&"bip"!==i&&"deflate"!==i&&"lzw"!==i){if(i=J(e),!i)throw String.fromCharCode.apply(null,[...new Uint8Array(e,0,10)]).toLowerCase().includes("error")?new n.A("rasterCodec:decode","input data contains error"):new n.A("rasterCodec:decode","unsupported raster format");t={...t,format:i}}let o=function(e){let t=null;switch(e){case"lerc":t=z;break;case"jpg":case"png":t=K;break;case"bmp":case"gif":t=H;break;case"bsq":case"bip":t=q;break;case"tiff":t=_;break;case"deflate":t=Z;break;case"lzw":t=W;break;case"qb3":t=V;break;default:t=()=>{throw new n.A("rasterCodec:decode",`unsupported raster format ${e}`)}}return t}(i);t.isPoint&&(null!=(t={...t}).width&&t.width++,null!=t.height&&t.height++);let a,{offsets:s}=t;if(s&&s.length>1){let n=s.map((n,i)=>o(e.slice(n,s[i+1]),t,r)),i=await Promise.all(n);a=i[0],a.pixels=i.map(e=>e.pixels[0]);let l=i.map(e=>e.mask);l.some(e=>null!=e)&&(l.forEach((e,t)=>{l[t]??=new Uint8Array(a.width*a.height).fill(255)}),a.bandMasks=l,a.mask=N.A.combineBandMasks(l))}else a=await o(e,{...t,offset:s?.[0]??t.offset},r);return(0,l.Te)(r),"jpg"!==i&&null!=t.noDataValue&&1===a.depthCount&&(0,x.Sp)(a,t.noDataValue,{customFloatTolerance:t.tolerance}),t.isPoint&&function(e,t="bilinear"){if(!e)return;let{pixels:r,width:n,height:i,mask:l}=e;if(!r||0===r.length)return;let o=n-1,a=i-1,s=[],u=null,h=N.A.getPixelArrayConstructor(e.pixelType);if("nearest"===t){for(let e of r){let t=new h(o*a);for(let r=0;r<a;r++){let i=r*n;for(let n=0;n<o;n++)t[r*o+n]=e[i+n]}s.push(t)}if(null!=l){u=new Uint8Array(o*a);for(let e=0;e<a;e++){let t=e*n;for(let r=0;r<o;r++)u[e*o+r]=l[t+r]}}}else{for(let e of r){let t=new h(o*a);for(let r=0;r<a;r++){let i=r*n;for(let l=0;l<o;l++)t[r*o+l]=(e[i+l]+e[i+l+1]+e[i+n+l]+e[i+n+l+1])/4}s.push(t)}if(l){u=new Uint8Array(o*a);for(let e=0;e<a;e++){let t=e*n;for(let r=0;r<o;r++)u[e*o+r]=Math.min.apply(null,[l[t+r],l[t+r+1],l[t+n+r],l[t+n+r+1]])}}}e.width=o,e.height=a,e.mask=u,e.pixels=s}(a),!a.statistics?.length&&!t.skipStatistics&&a.updateStatistics(),a}},8003(e,t,r){async function n(e,t,r){t??=function(e){return(t=e).length>=2&&31===t[0]&&139===t[1]?"gzip":function(e){if(e.length<2)return!1;let[t,r]=e.subarray(0,2);return!(8!=(15&t)||t>>4>7)&&(65535&(t<<8|r))%31==0}(e)?"deflate":null;var t}(e)??"deflate-raw";let n=new Response(e).body,i={signal:r?.signal??void 0},l=n.pipeThrough(new DecompressionStream(t),i),o=await new Response(l).arrayBuffer();return new Uint8Array(o)}r.d(t,{U:()=>n})},94778(e,t,r){r.d(t,{$p:()=>s,Sp:()=>u,X1:()=>l,hP:()=>i,yM:()=>a,zw:()=>o});const n={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 i(e){return n[e]??[-34028234663852886e22,34028234663852886e22]}function l(e,t){return null==e||null==t?"s32":e<0?e>=-128&&t<128?"s8":e>=-32768&&t<32768?"s16":"s32":t<256?"u8":t<65536?"u16":"u32"}function o(e){return(e?.startsWith("s")||e?.startsWith("u"))??!1}function a(e,t,r,n){let[l,a]=i(r),s=o(r);return s&&(l-=1e-5,a+=1e-5),s?r.startsWith("u")?function(e,t,r,n){let[i,l]=n;for(let n=0;n<t.length;n++)if(t[n]){let o=e[n];o<i||o>l?t[n]=0:r[n]=o+.5|0}}(e,t,n,[l,a]):function(e,t,r,n){let[i,l]=n;for(let n=0;n<t.length;n++)if(t[n]){let o=e[n];o<i||o>l?t[n]=0:r[n]=o+(o>0?.5:-.5)|0}}(e,t,n,[l,a]):function(e,t,r,n){let[i,l]=n;for(let n=0;n<t.length;n++)if(t[n]){let o=e[n];o<i||o>l?t[n]=0:r[n]=o}}(e,t,n,[l,a])}function s(e,t){for(let r=0;r<t.length;r++)t[r]&&isNaN(e[r])&&(t[r]=0,e[r]=0)}function u(e,t,r){if(e.depthCount&&e.depthCount>1)return;let{pixels:n,statistics:l,pixelType:o}=e,a=n[0].length,s=e.bandMasks??[],u=e.mask??new Uint8Array(a).fill(255),h="f32"===o||"f64"===o,f=i(o),c=!1;for(let e=0;e<n.length;e++){let i="number"==typeof t?t:t[e];if(null==i)continue;let a=l?.[e]?.minValue??f[0],d=l?.[e]?.maxValue??f[1];if(a>i+2**-52||d<i-2**-52)continue;let p=s[e]||u.slice(),m=n[e],g=r?.customFloatTolerance;if(h&&0!==g){let e=g;e||=Math.abs(i)>=9999999e31?2e-7*Math.abs(i):"f32"===o?2**-23:2**-52;for(let t=0;t<m.length;t++)p[t]&&Math.abs(m[t]-i)<e&&(m[t]=0,p[t]=0,u[t]=0,c=!0)}else for(let e=0;e<m.length;e++)p[e]&&m[e]===i&&(m[e]=0,p[e]=0,u[e]=0,c=!0);s[e]=p}if(c){let t=e.bandMasks||e.pixels.length>1?s:null;r?.matchAllNoData?e.mask=t&&t.length>1?function(e){if(e.length<2)return e[0];let t=e[0].length,r=new Uint8Array(t).fill(0);for(let n=0;n<e.length;n++){let i=e[n];for(let e=0;e<t;e++)i[e]&&(r[e]=255)}return r}(t):u:(e.bandMasks=t,e.mask=u)}c&&"updateStatistics"in e&&e.updateStatistics()}},44094(e,t,r){r.d(t,{Cr:()=>w,JM:()=>I,LZ:()=>d,RW:()=>E,XO:()=>A,_J:()=>b,ni:()=>v,r9:()=>S,uT:()=>P,uc:()=>k,wc:()=>f,zS:()=>T});var n=r(49186),i=r(9334),l=r(94213);const o=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],a=4294967296,s=new Map([[1,(e,t)=>e.getUint8(t)],[2,(e,t)=>e.getUint8(t)],[3,(e,t,r)=>e.getUint16(t,r)],[4,(e,t,r)=>e.getUint32(t,r)],[5,(e,t,r)=>e.getUint32(t,r)/e.getUint32(t+4,r)],[6,(e,t)=>e.getInt8(t)],[7,(e,t)=>e.getUint8(t)],[8,(e,t,r)=>e.getInt16(t,r)],[9,(e,t,r)=>e.getInt32(t,r)],[10,(e,t,r)=>e.getInt32(t,r)/e.getInt32(t+4,r)],[11,(e,t,r)=>e.getFloat32(t,r)],[12,(e,t,r)=>e.getFloat64(t,r)],[13,(e,t,r)=>e.getUint32(t,r)],[16,(e,t,r)=>u(e,t,r)],[17,(e,t,r)=>function(e,t,r){let n=r?e.getInt32(t,r):e.getUint32(t,r),i=r?e.getUint32(t+4,r):e.getInt32(t+4,r),l=(r?n:i)>=0?1:-1;return r?n*=l:i*=l,l*(r?i*a+n:n*a+i)}(e,t,r)],[18,(e,t,r)=>u(e,t,r)]]);function u(e,t,r){let n=e.getUint32(t,r),i=e.getUint32(t+4,r);return r?i*a+n:n*a+i}function h(e,t){return{x:t[0]*e.x+t[1]*e.y+t[2],y:t[3]*e.x+t[4]*e.y+t[5]}}function f(e,t){return e.get(t)?.values}function c(e,t){return e.get(t)?.values?.[0]}function d(e,t){return e.get(t)?.values?.[0]}function p(e,t,r,n){return n?u(e,t,r):e.getUint32(t,r)}function m(e,t,r,n=0,i=l.NB,o=4){let a=8===o,s=a?u(new DataView(e,r,8),0,t):new DataView(e,r,2).getUint16(0,t),h=4+2*o,f=a?8:2,c=f+s*h;if(r+c>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:c};let d=8===o?8:4,m=r+c+d<=e.byteLength?p(new DataView(e,r+c,d),0,t,8===o):null,g=r+f,y=new Map;for(let r=0;r<s;r++){let a=new DataView(e,g+h*r,h),s=a.getUint16(0,t),u=a.getUint16(2,t),f=(0,l.kq)(s,i),c=[],d=0,m=0;2===o?(d=a.getUint16(4,t),m=a.getUint16(6,t)):4===o?(d=a.getUint32(4,t),m=a.getUint32(8,t)):8===o&&(d=p(a,4,t,!0),m=p(a,12,t,!0),c.push(a.getUint32(12,t)),c.push(a.getUint32(16,t)));let C={id:s,type:u,valueCount:d,valueOffset:m,valueOffsets:c,values:null};w(e,t,C,n,!1,o),y.set(f,C)}return{success:!0,ifd:y,nextIFD:m,requiredBufferSize:c}}function g(e,t,r,n){let{type:i,valueCount:l}=t,a=o[i];if(null==a||a<=0)return[];let u=l*a,h=u/a,f=new DataView(e,r,u),c=[],d=s.get(i);if(!d)return[];for(let e=0,t=0;e<h;e++,t+=a)c.push(d(f,t,n));return c}function y(e,t,r=4){let{type:n,valueCount:i,valueOffsets:l}=e,s=8*o[n],u=i*o[n]*8,{valueOffset:h}=e,f=8===r?64:32;if(!t)if(f<=32)h>>>=32-u;else{let e=l?.length?l[0]:h>>>0,t=l?.length?l[1]:Math.round((h-e)/a);u<=32?(h=e>>>32-u,l[0]=h):(h=e*2**(32-u)+(t>>>32-u),l[0]=e,l[1]=t>>>32-u)}if(1===i&&s===f)return[h];let c=[];if(64===f){let e=l?.length?l[0]:h>>>0,t=l?.length?l[1]:Math.round((h-e)/a),r=e,n=32;for(let e=1;e<=i;e++){let i=32-s*e%32;if(n<s){let e=r<<i>>>32-n,l=t<<32-n>>>32-n;r=t,c.push(e+l*2**(s-n)),n-=32-(s-n)}else c.push(r<<i>>>32-s),n-=s;0===n&&(n=32,r=t)}return c}for(let e=1;e<=i;e++){let t=32-s*e;c.push(h<<t>>>32-s)}return c}function w(e,t,r,n=0,l=!1,a=4){if(r.values)return!0;let{type:s,valueCount:u}=r,h=r.valueOffset,f=u*o[s],c=u*o[s]*8,d=8===a?64:32;if(c>d&&f>(l?e.byteLength:e?e.byteLength-h+n:0))return r.offlineOffsetSize=[h,f],r.values=null,!1;let p=[];return c<=d?p=y(r,t,a):(h-=n,l&&(h=0),p=g(e,r,h,t)),r.values=2===s?[p.length?(0,i.w)(p instanceof Uint8Array?p:new Uint8Array(p)):""]:p,!0}function C(e){let t=d(e,"PHOTOMETRICINTERPRETATION"),r=f(e,"COLORMAP");if(null!=t&&t<=3&&r?.length&&r.length%3==0){let e=[],t=r.length/3;for(let n=0;n<t;n++)e.push([n,r[n]>>>8,r[n+t]>>>8,r[n+2*t]>>>8]);return e}}function x(e){let t,r=f(e,"GEOTIEPOINTS"),n=f(e,"GEOPIXELSCALE"),i=f(e,"GEOTRANSMATRIX"),l=e.get("GEOKEYDIRECTORY")?.data,o=!!l&&2===d(l,"GTRasterTypeGeoKey"),{spatialReference:a,isPseudoGeographic:s}=function(e){let t=c(e,"GEOASCIIPARAMS"),r=null;if(t){let e=t.split("|").find(e=>e.includes("ESRI PE String = ")),n=e?e.replace("ESRI PE String = ",""):"";r=n.startsWith("COMPD_CS")||n.startsWith("PROJCS")||n.startsWith("GEOGCS")?{wkid:null,wkt:n}:null}let n=!1,i=e.get("GEOKEYDIRECTORY")?.data;if(i){let e=d(i,"GTModelTypeGeoKey");if(2===e){let e=d(i,"GeographicTypeGeoKey");e>=1024&&e<=32766&&(r={wkid:e}),!r&&32767===e&&(n=!0,r={wkid:4326})}else if(1===e){let e=d(i,"ProjectedCSTypeGeoKey");e>=1024&&e<=32766&&(r={wkid:e})}}return{spatialReference:r,isPseudoGeographic:n}}(e);n&&r&&r.length>=6?(t=[n[0],0,r[3]-r[0]*n[0],0,-Math.abs(n[1]),r[4]-r[1]*n[1]],o&&(t[2]-=.5*t[0]+.5*t[1],t[5]-=.5*t[3]+.5*t[4])):16===i?.length&&(t=o?[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]]);let u,p=d(e,"IMAGEWIDTH"),m=d(e,"IMAGELENGTH");if(t){let e,r=[{x:0,y:m},{x:0,y:0},{x:p,y:m},{x:p,y:0}],n=1/0,i=1/0,l=-1/0,o=-1/0;for(let a=0;a<r.length;a++)e=h(r[a],t),n=e.x>n?n:e.x,l=e.x<l?l:e.x,i=e.y>i?i:e.y,o=e.y<o?o:e.y;u={xmin:n,xmax:l,ymin:i,ymax:o,spatialReference:a}}else u={xmin:-.5,ymin:.5-m,xmax:p-.5,ymax:.5,spatialReference:a};return s&&(u.xmax-u.xmin>400||Math.max(Math.abs(u.xmin),Math.abs(u.xmax))>361)&&(u.spatialReference=null),{extent:u,isPseudoGeographic:s,affine:n?void 0:t}}function b(e){let{width:t,height:r,tileHeight:n,tileWidth:i}=e,l=e.planes,o=i?i*n:t*r,a=d(e.ifds[0],"BITSPERSAMPLE"),s="";return o*l>2**30/(a>8?a/8:1)&&(s=i?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),s}function A(e,t){let r=d(e,"PLANARCONFIGURATION");return null==r?!!t&&t.isBSQ:2===r}function v(e){return d(e,"COMPRESSION")??1}function M(e){let t,r=v(e),n=!1;switch(r){case 1:t="NONE",n=!0;break;case 2:case 3:case 4:case 32771:t="CCITT";break;case 5:t="LZW",n=!0;break;case 6:case 7:t="JPEG",n=!0;break;case 32773:t="PACKBITS";break;case 8:case 32946:t="DEFLATE",n=!0;break;case 34712:t="JPEG2000";break;case 34887:t="LERC",n=!0;break;default:t=String(r)}return{compression:t,supported:n}}function k(e){let t=e[0],r=d(t,"TILEWIDTH"),n=d(t,"TILELENGTH"),i=d(t,"IMAGEWIDTH"),l=d(t,"IMAGELENGTH"),o=d(t,"BITSPERSAMPLE"),a=d(t,"SAMPLESPERPIXEL"),s=d(t,"SAMPLEFORMAT")??1,u=function(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}(s,o),h=A(t),f=function(e){return e.get("GDAL_NODATA")?.values}(t),p=null;f?.length&&(p=f.map(e=>parseFloat(e)),p.some(e=>isNaN(e))&&(p=null));let m=!0,g="",{compression:y,supported:w}=M(t);w||(m=!1,g+="unsupported tag compression "+y),s>3&&(m=!1,g+="unsupported tag sampleFormat "+s),o>32&&64!==o&&(m=!1,g+="unsupported tag bitsPerSample "+o);let v,k,I,P,E,{extent:R,isPseudoGeographic:L,affine:U}=x(t),O=T(e);if(O.length>0){I=Math.round(Math.log(i/d(O[0],"IMAGEWIDTH"))/Math.LN2);let e=O[O.length-1];P=O.length,v=d(e,"TILEWIDTH"),k=d(e,"TILELENGTH")}v=null!=P&&P>0?v||r:null,k=null!=P&&P>0?k||n:null,r&&(E=[{maxCol:Math.ceil(i/r)-1,maxRow:Math.ceil(l/n)-1,minRow:0,minCol:0}],O.forEach(e=>{E.push({maxCol:Math.ceil(d(e,"IMAGEWIDTH")/d(e,"TILEWIDTH"))-1,maxRow:Math.ceil(d(e,"IMAGELENGTH")/d(e,"TILELENGTH"))-1,minRow:0,minCol:0})}));let D=function(e){if(!e)return null;let t=e.match(/<Item(.*?)Item>/gi);if(!t||0===t.length)return null;let r=new Map;for(let e=0;e<t.length;e++){let n=t[e],i=n.indexOf("sample="),l=i>-1?n.slice(i+8,n.indexOf('"',i+8)):null;i=n.indexOf("name=");let o=i>-1?n.slice(i+6,n.indexOf('"',i+6)):n.slice(6,n.indexOf(">"));if(o){let e=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim();null==l?r.set(o,e):r.has(o)?r.get(o)[l]=e:r.set(o,[e])}}let n=r.get("STATISTICS_MINIMUM"),i=r.get("STATISTICS_MAXIMUM"),l=r.get("STATISTICS_MEAN"),o=r.get("STATISTICS_STDDEV"),a=null;if(n&&i){a=[];for(let e=0;e<n.length;e++)a.push({min:parseFloat(n[e]),max:parseFloat(i[e]),avg:l&&parseFloat(l[e]),stddev:o&&parseFloat(o[e])})}let s=r.get("BandName"),u=r.get("WavelengthMin"),h=r.get("WavelengthMax"),f=null;if(s){f=[];for(let e=0;e<s.length;e++)f.push({BandName:s[e],WavelengthMin:u&&parseFloat(u[e]),WavelengthMax:h&&parseFloat(h[e])})}return{statistics:a,bandProperties:f,dataType:r.get("DataType"),rawMetadata:r}}(c(e[0],"GDAL_METADATA"));g+=" "+b({width:i,height:l,tileWidth:r,tileHeight:n,planes:a,ifds:e});let G=S(e).length===O.length+1,B=O?.length?O.map(e=>({x:i/d(e,"IMAGEWIDTH"),y:l/d(e,"IMAGELENGTH")})):void 0,N=C(t);return{width:i,height:l,tileWidth:r,tileHeight:n,planes:a,isBSQ:h,pixelType:u,compression:y,noData:p,hasMaskBand:G,isSupported:m,pyramidResolutions:B,message:g,extent:R,isPseudoGeographic:L,affine:U,firstPyramidLevel:I,maximumPyramidLevel:P,pyramidBlockWidth:v,pyramidBlockHeight:k,tileBoundary:E,metadata:D,colormap:N}}function T(e){return e.filter(e=>1===d(e,"NEWSUBFILETYPE"))}function S(e){return e.filter(e=>{let t=!(4&~(d(e,"NEWSUBFILETYPE")??0)),r=4===d(e,"PHOTOMETRICINTERPRETATION");return t&&r})}function I(e,t,r,n=0,o=l.NB,a=4){let s,u=m(e,t,r,n,o,a),h=u.ifd;if(h){if(l.RR.forEach((r,i)=>{h.has(i)&&(s=h.get(i),s.data=m(e,t,s.valueOffset-n,n,r).ifd)}),h.has("GEOKEYDIRECTORY")){s=h.get("GEOKEYDIRECTORY");let r=s.values;if(r&&r.length>4){let i=r[0]+"."+r[1]+"."+r[2];s.data=m(e,t,s.valueOffset+6-n,n,l.YC,2).ifd,s.data&&s.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[i]})}}if(h.has("XMP")){s=h.get("XMP");let e=s.values;"number"==typeof e[0]&&7===s.type&&(s.values=[(0,i.w)(new Uint8Array(e))])}}return u}function P(e){let t=new DataView(e,0,16),r=t.getUint16(0,!1),i=null;if(18761===r)i=!0;else{if(19789!==r)throw new n.A("tiff-reader:parse-signature","unexpected endianness byte");i=!1}let l=t.getUint16(2,i);if(42!==l&&43!==l)throw new n.A("tiff-reader:parse-signature","unexpected tiff identifier");let o=4,a=43===l;if(a){let e=t.getUint16(o,i);if(o+=2,8!==e||0!==t.getUint16(o,i))throw new n.A("tiff-reader:parse-signature","unsupported bigtiff version");o+=2}return{littleEndian:i,isBigTiff:a,firstIFDPos:p(t,o,i,a)}}function E(e){let{littleEndian:t,isBigTiff:r,firstIFDPos:n}=P(e),i=n,o=[];do{let n=I(e,t,i,0,l.NB,r?8:4);if(!n.success)break;o.push(n.ifd),i=n.nextIFD}while(i>0);return{...k(o),littleEndian:t,isBigTiff:r,ifds:o,pyramidIFDs:T(o),maskIFDs:S(o)}}},94213(e,t,r){const n=(()=>{let e=[];return e[254]="NEWSUBFILETYPE",e[255]="SUBFILETYPE",e[256]="IMAGEWIDTH",e[257]="IMAGELENGTH",e[258]="BITSPERSAMPLE",e[259]="COMPRESSION",e[262]="PHOTOMETRICINTERPRETATION",e[263]="THRESHHOLDING",e[264]="CELLWIDTH",e[265]="CELLLENGTH",e[266]="FILLORDER",e[269]="DOCUMENTNAME",e[270]="IMAGEDESCRIPTION",e[271]="MAKE",e[272]="MODEL",e[273]="STRIPOFFSETS",e[274]="ORIENTATION",e[277]="SAMPLESPERPIXEL",e[278]="ROWSPERSTRIP",e[279]="STRIPBYTECOUNTS",e[280]="MINSAMPLEVALUE",e[281]="MAXSAMPLEVALUE",e[282]="XRESOLUTION",e[283]="YRESOLUTION",e[284]="PLANARCONFIGURATION",e[285]="PAGENAME",e[286]="XPOSITION",e[287]="YPOSITION",e[288]="FREEOFFSETS",e[289]="FREEBYTECOUNTS",e[290]="GRAYRESPONSEUNIT",e[291]="GRAYRESPONSECURVE",e[292]="T4OPTIONS",e[293]="T6OPTIONS",e[296]="RESOLUTIONUNIT",e[297]="PAGENUMBER",e[300]="COLORRESPONSEUNIT",e[301]="TRANSFERFUNCTION",e[305]="SOFTWARE",e[306]="DATETIME",e[315]="ARTIST",e[316]="HOSTCOMPUTER",e[317]="PREDICTOR",e[318]="WHITEPOINT",e[319]="PRIMARYCHROMATICITIES",e[320]="COLORMAP",e[321]="HALFTONEHINTS",e[322]="TILEWIDTH",e[323]="TILELENGTH",e[324]="TILEOFFSETS",e[325]="TILEBYTECOUNTS",e[326]="BADFAXLINES",e[327]="CLEANFAXDATA",e[328]="CONSECUTIVEBADFAXLINES",e[330]="SUBIFD",e[332]="INKSET",e[333]="INKNAMES",e[334]="NUMBEROFINKS",e[336]="DOTRANGE",e[337]="TARGETPRINTER",e[338]="EXTRASAMPLES",e[339]="SAMPLEFORMAT",e[340]="SMINSAMPLEVALUE",e[341]="SMAXSAMPLEVALUE",e[342]="TRANSFERRANGE",e[347]="JPEGTABLES",e[512]="JPEGPROC",e[513]="JPEGIFOFFSET",e[514]="JPEGIFBYTECOUNT",e[515]="JPEGRESTARTINTERVAL",e[517]="JPEGLOSSLESSPREDICTORS",e[518]="JPEGPOINTTRANSFORM",e[519]="JPEGQTABLES",e[520]="JPEGDCTABLES",e[521]="JPEGACTABLES",e[529]="YCBCRCOEFFICIENTS",e[530]="YCBCRSUBSAMPLING",e[531]="YCBCRPOSITIONING",e[532]="REFERENCEBLACKWHITE",e[700]="XMP",e[33550]="GEOPIXELSCALE",e[33922]="GEOTIEPOINTS",e[33432]="COPYRIGHT",e[42112]="GDAL_METADATA",e[42113]="GDAL_NODATA",e[50844]="RPCCOEFFICIENT",e[34264]="GEOTRANSMATRIX",e[34735]="GEOKEYDIRECTORY",e[34736]="GEODOUBLEPARAMS",e[34737]="GEOASCIIPARAMS",e[34665]="EXIFIFD",e[34853]="GPSIFD",e[40965]="INTEROPERABILITYIFD",e})(),i=(()=>{let e=n.slice();return e[36864]="ExifVersion",e[40960]="FlashpixVersion",e[40961]="ColorSpace",e[42240]="Gamma",e[37121]="ComponentsConfiguration",e[37122]="CompressedBitsPerPixel",e[40962]="PixelXDimension",e[40963]="PixelYDimension",e[37500]="MakerNote",e[37510]="UserComment",e[40964]="RelatedSoundFile",e[36867]="DateTimeOriginal",e[36868]="DateTimeDigitized",e[36880]="OffsetTime",e[36881]="OffsetTimeOriginal",e[36882]="OffsetTimeDigitized",e[37520]="SubSecTime",e[37521]="SubSecTimeOriginal",e[37522]="SubSecTimeDigitized",e[37888]="Temperature",e[37889]="Humidity",e[37890]="Pressure",e[37891]="WaterDepth",e[37892]="Acceleration",e[37893]="CameraElevationAngle",e[42016]="ImageUniqueID",e[42032]="CameraOwnerName",e[42033]="BodySerialNumber",e[42034]="LensSpecification",e[42035]="LensMake",e[42036]="LensModel",e[42037]="LensSerialNumber",e[33434]="ExposureTime",e[33437]="FNumber",e[34850]="ExposureProgram",e[34852]="SpectralSensitivity",e[34855]="PhotographicSensitivity",e[34856]="OECF",e[34864]="SensitivityType",e[34865]="StandardOutputSensitivity",e[34866]="RecommendedExposureIndex",e[34867]="ISOSpeed",e[34868]="ISOSpeedLatitudeyyy",e[34869]="ISOSpeedLatitudezzz",e[37377]="ShutterSpeedValue",e[37378]="ApertureValue",e[37379]="BrightnessValue",e[37380]="ExposureBiasValue",e[37381]="MaxApertureValue",e[37382]="SubjectDistance",e[37383]="MeteringMode",e[37384]="LightSource",e[37385]="Flash",e[37386]="FocalLength",e[37396]="SubjectArea",e[41483]="FlashEnergy",e[41484]="SpatialFrequencyResponse",e[41486]="FocalPlaneXResolution",e[41487]="FocalPlaneYResolution",e[41488]="FocalPlaneResolutionUnit",e[41492]="SubjectLocation",e[41493]="ExposureIndex",e[41495]="SensingMethod",e[41728]="FileSource",e[41729]="SceneType",e[41730]="CFAPattern",e[41985]="CustomRendered",e[41986]="ExposureMode",e[41987]="WhiteBalance",e[41988]="DigitalZoomRatio",e[41989]="FocalLengthIn35mmFilm",e[41990]="SceneCaptureType",e[41991]="GainControl",e[41992]="Contrast",e[41993]="Saturation",e[41994]="Sharpness",e[41995]="DeviceSettingDescription",e[41996]="SubjectDistanceRange",e})(),l="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".split("."),o=(()=>{let e=[];return e[1024]="GTModelTypeGeoKey",e[1025]="GTRasterTypeGeoKey",e[1026]="GTCitationGeoKey",e[2048]="GeographicTypeGeoKey",e[2049]="GeogCitationGeoKey",e[2050]="GeogGeodeticDatumGeoKey",e[2051]="GeogPrimeMeridianGeoKey",e[2052]="GeogLinearUnitsGeoKey",e[2053]="GeogLinearUnitSizeGeoKey",e[2054]="GeogAngularUnitsGeoKey",e[2055]="GeogAngularUnitSizeGeoKey",e[2056]="GeogEllipsoidGeoKey",e[2057]="GeogSemiMajorAxisGeoKey",e[2058]="GeogSemiMinorAxisGeoKey",e[2059]="GeogInvFlatteningGeoKey",e[2061]="GeogPrimeMeridianLongGeoKey",e[2060]="GeogAzimuthUnitsGeoKey",e[3072]="ProjectedCSTypeGeoKey",e[3073]="PCSCitationGeoKey",e[3074]="ProjectionGeoKey",e[3075]="ProjCoordTransGeoKey",e[3076]="ProjLinearUnitsGeoKey",e[3077]="ProjLinearUnitSizeGeoKey",e[3078]="ProjStdParallel1GeoKey",e[3079]="ProjStdParallel2GeoKey",e[3080]="ProjNatOriginLongGeoKey",e[3081]="ProjNatOriginLatGeoKey",e[3082]="ProjFalseEastingGeoKey",e[3083]="ProjFalseNorthingGeoKey",e[3084]="ProjFalseOriginLongGeoKey",e[3085]="ProjFalseOriginLatGeoKey",e[3086]="ProjFalseOriginEastingGeoKey",e[3087]="ProjFalseOriginNorthingGeoKey",e[3088]="ProjCenterLongGeoKey",e[3090]="ProjCenterEastingGeoKey",e[3091]="ProjCenterNorthingGeoKey",e[3092]="ProjScaleAtNatOriginGeoKey",e[3093]="ProjScaleAtCenterGeoKey",e[3094]="ProjAzimuthAngleGeoKey",e[3095]="ProjStraightVertPoleLongGeoKey",e[4096]="VerticalCSTypeGeoKey",e[4097]="VerticalCitationGeoKey",e[4098]="VerticalDatumGeoKey",e[4099]="VerticalUnitsGeoKey",e})(),a=new Map([["EXIFIFD",i],["GPSIFD",l]]);r.d(t,["NB",0,n,"RR",0,a,"YC",0,o,"kq",0,(e,t)=>{let r=(t||n)[e];return void 0===r&&(r="unknown"+String(e)),r}])},10713(e,t,r){const n=(()=>{let e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]})();r.d(t,["Z",0,n])},47520(e,t,r){r.d(t,{$Q:()=>U,$i:()=>F,AB:()=>a,Ew:()=>w,Hx:()=>g,J$:()=>G,L:()=>z,LY:()=>k,QF:()=>N,UK:()=>c,Wt:()=>M,Wy:()=>s,XU:()=>v,YD:()=>b,_F:()=>m,bL:()=>y,dK:()=>A,eH:()=>f,lD:()=>D,qL:()=>h,z$:()=>I,z7:()=>S,zg:()=>u});var n=r(34727),i=r(94778),l=r(14140);const o="PixelID";function a(e){return null!=e&&e.pixels?.length>0}function s(e){if(!e?.length||e.some(e=>!a(e)))return null;if(1===e.length)return e[0]?.clone()??null;let t=e,{width:r,height:n,pixelType:i}=t[0];if(t.some(e=>e.width!==r||e.height!==n))return null;let o=t.map(({mask:e})=>e).filter(e=>null!=e),s=null;o.length&&(s=new Uint8Array(r*n),s.set(o[0]),o.length>1&&b(o.slice(1),s));let u=[];t.forEach(({pixels:e})=>u.push(...e));let h=null!=s&&u.length===t.length?t.map(({width:e,height:t,mask:r})=>r??new Uint8Array(e*t).fill(255)):null,f=t.map(({statistics:e})=>e).filter(e=>e?.length),c=[];return f.forEach(e=>c.push(...e)),new l.A({pixelType:i,width:r,height:n,mask:s,bandMasks:h,pixels:u,statistics:c.length?c:null})}function u(e){if(!e)return;let t=e.colormap;if(!t||0===t.length)return;let r=t.sort((e,t)=>e[0]-t[0]),n=r[0][0]<0?r[0][0]:0,i=Math.max(256,r[r.length-1][0]-n+1),l=new Uint8Array(4*i),o=[],a=5===r[0].length;if(i>65536)return r.forEach(e=>{o[e[0]-n]=a?e.slice(1):e.slice(1).concat([255])}),{indexed2DColormap:o,offset:n,alphaSpecified:a};if(e.fillUnspecified){let e=r[0];for(let t=e[0]-n,o=0;t<i;t++)l[4*t]=e[1],l[4*t+1]=e[2],l[4*t+2]=e[3],l[4*t+3]=a?e[4]:255,t===e[0]-n&&(e=o===r.length-1?e:r[++o])}else for(let e=0;e<r.length;e++){let t=r[e],i=4*(t[0]-n);l[i]=t[1],l[i+1]=t[2],l[i+2]=t[3],l[i+3]=a?t[4]:255}return{indexedColormap:l,offset:n,alphaSpecified:a}}function h(e,t){if(!a(e)||!t||!t.indexedColormap&&!t.indexed2DColormap)return e;let r=e.clone(),n=r.pixels,i=r.mask,l=r.width*r.height;if(1!==n.length)return e;let o,{indexedColormap:s,indexed2DColormap:u,offset:h,alphaSpecified:f}=t,c=n[0],d=new Uint8Array(c.length),p=new Uint8Array(c.length),m=new Uint8Array(c.length),g=0;if(s){let e=s.length-1;if(null!=i)for(let t=0;t<l;t++)i[t]&&(g=4*(c[t]-h),g<h||g>e?i[t]=0:(d[t]=s[g],p[t]=s[g+1],m[t]=s[g+2],i[t]=s[g+3]));else{i=new Uint8Array(l);for(let t=0;t<l;t++)g=4*(c[t]-h),g<h||g>e?i[t]=0:(d[t]=s[g],p[t]=s[g+1],m[t]=s[g+2],i[t]=s[g+3]);r.mask=i}}else if(u)if(null!=i)for(let e=0;e<l;e++)i[e]&&(o=u[c[e]],d[e]=o[0],p[e]=o[1],m[e]=o[2],i[e]=o[3]);else{i=new Uint8Array(l);for(let e=0;e<l;e++)o=u[c[e]],d[e]=o[0],p[e]=o[1],m[e]=o[2],i[e]=o[3];r.mask=i}return r.pixels=[d,p,m],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=f,r}function f(e,t){if(!a(e))return null;let{pixels:r,mask:n}=e,i=r.length,o=t.lut,{offset:s}=t;o&&1===o[0].length&&(o=r.map(()=>o));let u=[],h=t.outputPixelType||"u8";for(let e=0;e<i;e++){let t=c(r[e],n,o[e],s||0,h);u.push(t)}let f=new l.A({width:e.width,height:e.height,pixels:u,mask:n,pixelType:h});return f.updateStatistics(),f}function c(e,t,r,n,i){let o=e.length,a=l.A.createEmptyBand(i,o);if(t)for(let i=0;i<o;i++)t[i]&&(a[i]=r[e[i]-n]);else for(let t=0;t<o;t++)a[t]=r[e[t]-n];return a}function d(e,t,r,n){let{width:i,height:l,pixels:o,mask:a}=e,s=i*l,{bandId:u,ranges:h}=r,f=o[u];if(!f)return;let c=1===h.length,[d,p]=h[0];for(let e=0;e<s;e++)if(!a||a[e]){let r=f[e];if(c)r>=d&&r<=p&&(t[e]=n);else for(let i=0;i<h.length;i++){let[l,o]=h[i];if(r>=l&&r<=o){t[e]=n;break}}}}function p(e,t,r,n){let{width:i,height:l,xyMask:o,xBandId:a,yBandId:s,xBandRange:u,yBandRange:h}=r,{pixels:f,mask:c}=e,d=f[a],p=f[s],[m,g]=u,[y,w]=h,C=(g-m)/i,x=(w-y)/l;for(let e=0;e<d.length;e++)if(!c||c[e]){let r=d[e],a=p[e];if(r<m||r>g||a<y||a>w)continue;o?(r=(r-m)*C,r=r>i-1?i-1:r<0?0:255&r,a=(w-a)*x,a=a>l-1?l-1:a<0?0:255&a,o[a*i+r]&&(t[e]=n)):t[e]=n}}function m(e){let{pixelBlock:t,renderedPixelBlock:r,highlightOptions:n}=e;if(!a(t))return;let{width:i,height:l}=t,o=i*l,s=new Uint8Array(o);for(let e=1;e<=n.length;e++){let r=n[e-1];"bandId"in r?d(t,s,r,e):p(t,s,r,e)}let{pixels:u}=r;1===u.length&&(u[1]=u[0].slice(),u[2]=u[0].slice());let h=n.map(e=>e.color),[f,c,m]=u;if(r.mask){let e=r.mask;for(let t=0;t<o;t++)if(e[t]){e[t]=255;let r=s[t];if(r){let n=h[r-1];f[t]=n[0],c[t]=n[1],m[t]=n[2],e[t]=n[3]}}}else{let e=new Uint8Array(o).fill(255);for(let t=0;t<o;t++){let r=s[t];if(r){let n=h[r-1];f[t]=n[0],c[t]=n[1],m[t]=n[2],e[t]=n[3]}}r.mask=e}r.maskIsAlpha=!0}function g(e,t){if(!a(e))return null;let r=e.clone(),{pixels:n}=r,i=r.width*r.height,l=t.length,o=Math.floor(l/2),s=t[Math.floor(o)],u=n[0],h=new Uint8Array(i),f=new Uint8Array(i),c=new Uint8Array(i),d=r.mask,p=4===t[0].mappedColor.length;d||(d=new Uint8Array(i),d.fill(p?255:1),r.mask=d);for(let e=0;e<i;e++)if(d[e]){let r=u[e],n=!1,i=o,a=s,p=0,m=l-1;for(;m-p>1;){if(r===a.value){n=!0;break}r>a.value?p=i:m=i,i=Math.floor((p+m)/2),a=t[Math.floor(i)]}n||(r===t[p].value?(a=t[p],n=!0):r===t[m].value?(a=t[m],n=!0):r<t[p].value?n=!1:r>t[p].value&&(r<t[m].value?(a=t[p],n=!0):m===l-1?n=!1:(a=t[m],n=!0))),n?(h[e]=a.mappedColor[0],f[e]=a.mappedColor[1],c[e]=a.mappedColor[2],d[e]=a.mappedColor[3]):h[e]=f[e]=c[e]=d[e]=0}return r.pixels=[h,f,c],r.mask=d,r.pixelType="u8",r.maskIsAlpha=p,r}function y(e,t,r=!1){let i=1e-5,l=new Float32Array(27),o=t.length;for(let a=0;a<9;a++)l[3*a]=e[2*a]??n.pq-1,l[3*a+1]=e[2*a+1]??n.pq,l[3*a+2]=t[a]??0,a<o&&(a>0&&(l[3*a]-=i),e[2*a+1]!==e[2*a]&&(a<o-1||!r)&&(l[3*a+1]-=i));return l}function w(e,t){if(!a(e))return null;let{width:r,height:n}=e,{inputRanges:o,outputValues:s,outputPixelType:u,noDataRanges:h,allowUnmatched:f,replacementValue:c,isLastInputRangeInclusive:d}=t,p=e.pixels[0],m=l.A.createEmptyBand(u,p.length),g=e.mask,y=new Uint8Array(r*n);g?y.set(g):y.fill(255);let w=e.pixelType.startsWith("f")?1e-6:0,C=o.map(e=>e-w);C[0]=o[0],C[C.length-1]=o[o.length-1]+(d?1e-6:0);let x=o.length/2,[b,A]=(0,i.hP)(u);for(let e=0;e<n;e++)for(let t=0;t<r;t++){let n=e*r+t;if(y[n]){let e=p[n],t=!1;for(let r=x-1;r>=0;r--)if(e===o[2*r]||e>C[2*r]&&e<C[2*r+1]){m[n]=s[r],t=!0;break}t||(f?m[n]=e>A?A:e<b?b:c??e:y[n]=0)}}let v=h?.length;if(v)for(let e=0;e<n;e++)for(let t=0;t<r;t++){let n=e*r+t;if(!g||g[n]){let e=p[n];for(let t=0;t<v;t+=2)if(e>=h[t]&&e<=h[t+1]){m[n]=0,y[n]=0;break}}}return new l.A({width:r,height:n,pixelType:u,pixels:[m],mask:y})}function C(e,t,r,n){let i=null!=r&&r.length>=2?new Set(r):null,l=1===r?.length?r[0]:null,o=!!t?.length;for(let r=0;r<e.length;r++)if(n[r]){let a=e[r];if(o){let e=!1;for(let r=0;r<t.length;r+=2)if(a>=t[r]&&a<=t[r+1]){e=!0;break}e||(n[r]=0)}n[r]&&(a===l||i?.has(a))&&(n[r]=0)}}function x(e,t){let r=e[0].length;t??=new Uint8Array(r).fill(255);for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(e[t][n]){r=!0;break}r||(t[n]=0)}return t}function b(e,t){let r=e[0].length;t??=new Uint8Array(r).fill(255);for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(0===e[t][n]){r=!0;break}r&&(t[n]=0)}return t}function A(e,t){if(!a(e))return null;let{width:r,height:n,pixels:i}=e,o=r*n,s=new Uint8Array(o);e.mask?s.set(e.mask):s.fill(255);let u=i.length,{includedRanges:h,noDataValues:f,outputPixelType:d,matchAll:p,lookups:m}=t;if(m){let e=[];for(let t=0;t<u;t++){let r=m[t],n=c(i[t],s,r.lut,r.offset||0,"u8");e.push(n)}1===e.length?s.set(e[0]):p?x(e,s):b(e,s)}else if(p){let e=[];for(let t=0;t<u;t++){let r=new Uint8Array(o);r.set(s),C(i[t],h?.slice(2*t,2*t+2),f?.[t],r),e.push(r)}1===e.length?s.set(e[0]):x(e,s)}else for(let e=0;e<u;e++)C(i[e],h?.slice(2*e,2*e+2),f?.[e],s);return new l.A({width:r,height:n,pixelType:d,pixels:i,mask:s})}function v(e){let{srcPixelType:t,inputRanges:r,outputValues:n,allowUnmatched:o,noDataRanges:a,isLastInputRangeInclusive:s,outputPixelType:u}=e;if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;let h=t.includes("16")?65536:256,f=t.includes("s")?-h/2:0,c=l.A.createEmptyBand(u,h),d=new Uint8Array(h);o&&d.fill(255);let[p,m]=(0,i.hP)(u);if(r?.length&&n?.length){let e=r.map(e=>e-1e-6);e[0]=r[0],s&&(e[e.length-1]=r[r.length-1]);for(let t=0;t<e.length;t++){let i=n[t]>m?m:n[t]<p?p:n[t],l=Math.ceil(e[2*t]-f),o=r[2*t+1]===r[2*t]?l:Math.floor(e[2*t+1]-f);for(let e=l;e<=o;e++)c[e]=i,d[e]=255}}if(a?.length)for(let e=0;e<a.length;e++){let t=Math.ceil(a[2*e]-f),r=Math.floor(a[2*e+1]-f);for(let e=t;e<=r;e++)d[e]=0}return{lut:c,offset:f,mask:d}}function M(e,t,r){if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;let n=e.includes("16")?65536:256,i=e.includes("s")?-n/2:0,l=new Uint8Array(n);if(t)for(let e=0;e<t.length;e++){let r=Math.ceil(t[2*e]-i),n=Math.floor(t[2*e+1]-i);for(let e=r;e<=n;e++)l[e]=255}else l.fill(255);if(r)for(let e=0;e<r.length;e++)l[r[e]-i]=0;return{lut:l,offset:i}}function k(e,t){if(!e||0===e.length)return null;let r=e.find(e=>e.pixelBlock);if(null==r?.pixelBlock)return null;let n=(r.extent.xmax-r.extent.xmin)/r.pixelBlock.width,i=(r.extent.ymax-r.extent.ymin)/r.pixelBlock.height,l=.01*Math.min(n,i),o=e.sort((e,t)=>Math.abs(e.extent.ymax-t.extent.ymax)>l?t.extent.ymax-e.extent.ymax:Math.abs(e.extent.xmin-t.extent.xmin)>l?e.extent.xmin-t.extent.xmin:0),a=Math.min.apply(null,o.map(e=>e.extent.xmin)),s=Math.min.apply(null,o.map(e=>e.extent.ymin)),u=Math.max.apply(null,o.map(e=>e.extent.xmax)),h=Math.max.apply(null,o.map(e=>e.extent.ymax)),f={x:Math.round((t.xmin-a)/n),y:Math.round((h-t.ymax)/i)},c={width:Math.round((u-a)/n),height:Math.round((h-s)/i)},d={width:Math.round((t.xmax-t.xmin)/n),height:Math.round((t.ymax-t.ymin)/i)};return Math.round(c.width/r.pixelBlock.width)*Math.round(c.height/r.pixelBlock.height)!==o.length||f.x<0||f.y<0||c.width<d.width||c.height<d.height?null:{extent:t,pixelBlock:S(o.map(e=>e.pixelBlock),c,{clipOffset:f,clipSize:d})}}function T(e,t,r,n,i,l){let{width:o,height:a}=r.block,{x:s,y:u}=r.offset,{width:h,height:f}=r.mosaic,c=function(e,t,r,n,i,l,o,a){return{xmin:i<=r*e?0:i<r*e+e?i-r*e:e,ymin:l<=n*t?0:l<n*t+t?l-n*t:t,xmax:i+o<=r*e?0:i+o<r*e+e?i+o-r*e:e,ymax:l+a<=n*t?0:l+a<n*t+t?l+a-n*t:t}}(o,a,n,i,s,u,h,f),d=0,p=0;if(l){let e=l.hasGCSSShiftTransform?360:l.halfWorldWidth??0,t=o*l.resolutionX,r=l.startX+n*t;r<e&&r+t>e?p=l.rightPadding:r>=e&&(d=l.leftMargin-l.rightPadding,p=0)}if(c.xmax-=p,"number"!=typeof t)for(let r=c.ymin;r<c.ymax;r++){let l=(i*a+r-u)*h+(n*o-s)+d,f=r*o;for(let r=c.xmin;r<c.xmax;r++)e[l+r]=t[f+r]}else for(let r=c.ymin;r<c.ymax;r++){let l=(i*a+r-u)*h+(n*o-s)+d;for(let r=c.xmin;r<c.xmax;r++)e[l+r]=t}}function S(e,t,r={}){let{clipOffset:n,clipSize:i,alignmentInfo:o,blockWidths:s}=r;if(s)return function(e,t,r){let n=e.find(e=>null!=e);if(null==n)return null;let i=e.some(e=>null==e||!!e.mask),{width:o,height:s}=t,u=i?new Uint8Array(o*s):null,{blockWidths:h}=r,f=[],c=n.getPlaneCount(),d=l.A.getPixelArrayConstructor(n.pixelType);if(i)for(let t=0,r=0;t<e.length;r+=h[t],t++){let n=e[t];if(!a(n))continue;let i=n.mask;for(let e=0;e<s;e++)for(let l=0;l<h[t];l++)u[e*o+l+r]=null==i?255:i[e*n.width+l]}let p=e.some(e=>e?.bandMasks&&e.bandMasks.length>1),m=p?[]:void 0,g=o*s;for(let t=0;t<c;t++){let r=new d(g),n=p?new Uint8Array(g):void 0;for(let i=0,l=0;i<e.length;l+=h[i],i++){let u=e[i];if(!a(u))continue;let f=u.pixels[t];if(null!=f){for(let e=0;e<s;e++)for(let t=0;t<h[i];t++)r[e*o+t+l]=f[e*u.width+t];if(n){let e=u.bandMasks?.[t]??u.mask;for(let t=0;t<s;t++)for(let r=0;r<h[i];r++)n[t*o+r+l]=e?e[t*u.width+r]:255}}}f.push(r),m&&n&&m.push(n)}let y=new l.A({width:o,height:s,mask:u,bandMasks:m,pixels:f,pixelType:n.pixelType});return y.updateStatistics(),y}(e,t,{blockWidths:s});let u=e.find(e=>a(e));if(null==u)return null;let h,f,c=i?i.width:t.width,d=i?i.height:t.height,p=u.width,m=u.height,g=t.width/p,y=t.height/m,w={offset:n||{x:0,y:0},mosaic:i||t,block:{width:p,height:m}},C=u.pixelType,x=l.A.getPixelArrayConstructor(C),b=u.pixels.length,A=[];for(let t=0;t<b;t++){f=new x(c*d);for(let r=0;r<y;r++)for(let n=0;n<g;n++){let i=e[r*g+n];a(i)&&(h=i.pixels[t],T(f,h,w,n,r,o))}A.push(f)}let v=e.some(e=>null==e||null!=e.mask&&e.mask.length>0),M=e.some(e=>e?.bandMasks&&e.bandMasks.length>1),k=v?new Uint8Array(c*d):void 0,S=M?[]:void 0;if(k){for(let t=0;t<y;t++)for(let r=0;r<g;r++){let n=e[t*g+r];T(k,(null==n?null:n.mask)??(n?255:0),w,r,t,o)}if(S)for(let t=0;t<b;t++){let r=new Uint8Array(c*d);for(let n=0;n<y;n++)for(let i=0;i<g;i++){let l=e[n*g+i];T(r,l?.bandMasks?.[t]??l?.mask??(l?255:0),w,i,n,o)}S.push(r)}}let I=new l.A({width:c,height:d,pixels:A,pixelType:C,bandMasks:S,mask:k});return I.updateStatistics(),I}function I(e,t,r){if(!a(e))return null;let{width:n,height:i}=e,l=t.x,o=t.y,s=r.width+l,u=r.height+o;if(l<0||o<0||s>n||u>i||0===l&&0===o&&s===n&&u===i)return e;e.mask||=new Uint8Array(n*i);let h=e.mask;for(let e=0;e<i;e++){let t=e*n;for(let r=0;r<n;r++)h[t+r]=e<o||e>=u||r<l||r>=s?0:1}return e.updateStatistics(),e}function P(e){if(!a(e))return null;let t=e.clone(),{width:r,height:n,pixels:i}=e,l=i[0],o=t.pixels[0],s=e.mask;for(let e=2;e<n-1;e++){let t=new Map;for(let n=e-2;n<e+2;n++)for(let e=0;e<4;e++){let i=n*r+e;L(t,l[i],s?s[i]:1)}o[e*r]=E(t),o[e*r+1]=o[e*r+2]=o[e*r];let n=3;for(;n<r-1;n++){let i=(e-2)*r+n+1;L(t,l[i],s?s[i]:1),i=(e-1)*r+n+1,L(t,l[i],s?s[i]:1),i=e*r+n+1,L(t,l[i],s?s[i]:1),i=(e+1)*r+n+1,L(t,l[i],s?s[i]:1),i=(e-2)*r+n-3,R(t,l[i],s?s[i]:1),i=(e-1)*r+n-3,R(t,l[i],s?s[i]:1),i=e*r+n-3,R(t,l[i],s?s[i]:1),i=(e+1)*r+n-3,R(t,l[i],s?s[i]:1),o[e*r+n]=E(t)}o[e*r+n+1]=o[e*r+n]}for(let e=0;e<r;e++)o[e]=o[r+e]=o[2*r+e],o[(n-1)*r+e]=o[(n-2)*r+e];return t.updateStatistics(),t}function E(e){if(0===e.size)return 0;let t=0,r=-1,n=0,i=e.keys(),l=i.next();for(;!l.done;)n=e.get(l.value),n>t&&(r=l.value,t=n),l=i.next();return r}function R(e,t,r){if(0===r)return;let n=e.get(t);1===n?e.delete(t):e.set(t,n-1)}function L(e,t,r){0!==r&&e.set(t,e.has(t)?e.get(t)+1:1)}function U(e,t,r){let{x:n,y:i}=t,{width:o,height:s}=r;if(0===n&&0===i&&s===e.height&&o===e.width)return e;let{width:u,height:h}=e,f=Math.max(0,i),c=Math.max(0,n),d=Math.min(n+o,u),p=Math.min(i+s,h);if(d<0||p<0||!a(e))return null;n=Math.max(0,-n),i=Math.max(0,-i);let{pixels:m}=e,g=o*s,y=m.length,w=[];for(let t=0;t<y;t++){let r=m[t],a=l.A.createEmptyBand(e.pixelType,g);for(let e=f;e<p;e++){let t=e*u,l=(e+i-f)*o+n;for(let e=c;e<d;e++)a[l++]=r[t+e]}w.push(a)}let C=new Uint8Array(g),x=e.mask;for(let e=f;e<p;e++){let t=e*u,r=(e+i-f)*o+n;for(let e=c;e<d;e++)C[r++]=x?x[t+e]:1}let b=new l.A({width:r.width,height:r.height,pixelType:e.pixelType,pixels:w,mask:C});return b.updateStatistics(),b}function O(e,t=!0){if(!a(e))return null;let{pixels:r,width:n,height:i,mask:o,pixelType:s}=e,u=[],h=Math.round(n/2),f=Math.round(i/2),c=i-1,d=n-1;for(let e=0;e<r.length;e++){let o=r[e],a=l.A.createEmptyBand(s,h*f),p=0;for(let e=0;e<i;e+=2)for(let r=0;r<n;r+=2){let i=o[e*n+r];if(t){let t=r===d?i:o[e*n+r+1],l=e===c?i:o[e*n+r+n],s=r===d?l:e===c?t:o[e*n+r+n+1];a[p++]=(i+t+l+s)/4}else a[p++]=i}u.push(a)}let p=null;if(null!=o){p=new Uint8Array(h*f);let e=0;for(let r=0;r<i;r+=2)for(let i=0;i<n;i+=2){let l=o[r*n+i];if(t){let t=i===d?l:o[r*n+i+1],a=r===c?l:o[r*n+i+n],s=i===d?a:r===c?t:o[r*n+i+n+1];p[e++]=l*t*a*s?1:0}else p[e++]=l}}return new l.A({width:h,height:f,pixelType:s,pixels:u,mask:p})}function D(e,t,r=0,n=!0){if(!a(e))return null;let{width:i,height:l}=t,{width:o,height:s}=e,u=new Map,h={x:0,y:0},f=1+r,c=e;for(let e=0;e<f;e++){let r=Math.ceil(o/i),a=Math.ceil(s/l);for(let n=0;n<a;n++){h.y=n*l;for(let l=0;l<r;l++){h.x=l*i;let r=U(c,h,t);u.set(`${e}/${n}/${l}`,r)}}e<f-1&&(c=O(c,n)),o=Math.round(o/2),s=Math.round(s/2)}return u}function G(e){let{pixelBlock:t,tileSize:r,level:n,row:i,col:l,useBilinear:o}=e;if(!a(t))return null;let{width:s,height:u}=r,h=2**n,f=h*s,c=h*u,d=U(t,{y:i*c,x:l*f},{width:f,height:c});if(!d)return null;for(let e=n;e>0;e--)d=O(d,o);return d}function B(e,t,r,n,i=0){let l,o,a,s,u,h,f,c,d,{width:p,height:m}=e,{width:g,height:y}=t,w=n.cols,C=n.rows,x=Math.ceil(g/w-.1/w),b=Math.ceil(y/C-.1/C),A=x*w,v=A*b*C,M=new Float32Array(v),k=new Float32Array(v),T=new Uint32Array(v),S=new Uint32Array(v),I=0;for(let e=0;e<b;e++)for(let t=0;t<x;t++){l=12*(e*x+t),o=r[l],a=r[l+1],s=r[l+2],u=r[l+3],h=r[l+4],f=r[l+5];for(let r=0;r<C;r++){I=(e*C+r)*A+t*w,d=(r+.5)/C;for(let e=0;e<r;e++)c=(e+.5)/w,M[I+e]=(o*c+a*d+s)*p+i,k[I+e]=(u*c+h*d+f)*m+i,T[I+e]=Math.floor(M[I+e]),S[I+e]=Math.floor(k[I+e])}l+=6,o=r[l],a=r[l+1],s=r[l+2],u=r[l+3],h=r[l+4],f=r[l+5];for(let r=0;r<C;r++){I=(e*C+r)*A+t*w,d=(r+.5)/C;for(let e=r;e<w;e++)c=(e+.5)/w,M[I+e]=(o*c+a*d+s)*p+i,k[I+e]=(u*c+h*d+f)*m+i,T[I+e]=Math.floor(M[I+e]),S[I+e]=Math.floor(k[I+e])}}return{offsets_x:M,offsets_y:k,offsets_xi:T,offsets_yi:S,gridWidth:A}}function N(e,t){let{coefficients:r,spacing:n}=t,{offsets_x:i,offsets_y:l,gridWidth:o}=B(e,e,r,{rows:n[0],cols:n[1]}),{width:a,height:s}=e,u=new Float32Array(a*s),h=180/Math.PI;for(let e=0;e<s;e++)for(let t=0;t<a;t++){let r=e*o+t,n=0===e?r:r-o,f=e===s-1?r:r+o,c=i[n]-i[f],d=l[f]-l[n];if(isNaN(c)||isNaN(d))u[e*a+t]=90;else{let r=Math.atan2(d,c)*h;r=(360+r)%360,u[e*a+t]=r}}return u}function F(e,t,r,n,i="nearest"){if(!a(e))return null;"majority"===i&&(e=P(e));let{pixels:o,mask:s,bandMasks:u,pixelType:h}=e,f=e.width,c=e.height,d=l.A.getPixelArrayConstructor(h),p=o.length,{width:m,height:g}=t,y=!1;for(let e=0;e<r.length;e+=3)-1===r[e]&&-1===r[e+1]&&-1===r[e+2]&&(y=!0);let w,C,{offsets_x:x,offsets_y:b,offsets_xi:A,offsets_yi:v,gridWidth:M}=B({width:f,height:c},t,r,n,"majority"===i?.5:0),k=(e,t,r,n)=>{let i=e instanceof Float32Array||e instanceof Float64Array?0:.5;for(let l=0;l<g;l++){w=l*M;for(let o=0;o<m;o++){if(x[w]<0||b[w]<0)e[l*m+o]=0;else if(n)e[l*m+o]=t[A[w]+v[w]*f];else{let n=Math.floor(x[w]),a=Math.floor(b[w]),s=Math.ceil(x[w]),u=Math.ceil(b[w]),h=x[w]-n,c=b[w]-a;if(!r||r[n+a*f]&&r[s+a*f]&&r[n+u*f]&&r[s+u*f]){let r=(1-h)*t[n+a*f]+h*t[s+a*f],d=(1-h)*t[n+u*f]+h*t[s+u*f];e[l*m+o]=(1-c)*r+c*d+i}else e[l*m+o]=t[A[w]+v[w]*f]}w++}}},T=[],S=u?.length===p,I=[];for(let e=0;e<p;e++){if(S){let t=new Uint8Array(m*g);k(t,u[e],u[e],!0),I.push(t)}C=new d(m*g),k(C,o[e],S?u[e]:s,"nearest"===i||"majority"===i),T.push(C)}let E=new l.A({width:m,height:g,pixelType:h,pixels:T,bandMasks:S?I: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 e=0;e<m*g;e++)E.mask[e]=x[e]<0||b[e]<0?0:1}return E.updateStatistics(),E}function z(e){let{pixelBlock:t,extent:r,fieldNames:n,skipFactor:i,skipSpatialReference:l=!1,pixelIdOffset:a=0}=e,s=[],{width:u,height:h,pixels:f,mask:c}=t,d=e.imageRowSize??u,p=r.width/u,m=r.height/h,g=f.length,y=Math.floor(i/2),{xmin:w,ymax:C}=r,x=l?void 0:r.spatialReference.toJSON();for(let e=y;e<h;e+=i)for(let t=y;t<u;t+=i){let r=e*u+t;if(!c||c[r]){let i={x:w+(t+.5)*p,y:C-(e+.5)*m,spatialReference:x},l={[o]:a+e*d+t};for(let e=0;e<g;e++)l[n[e+1]]=f[e][r];s.push({geometry:i,attributes:l})}}return s}},51927(e,t,r){r.d(t,{DP:()=>C,Nh:()=>x,Pg:()=>w,RP:()=>h,WF:()=>u,_N:()=>b,eH:()=>g,f4:()=>y,fP:()=>c,zj:()=>f,zt:()=>s});var n=r(97768),i=r(94778),l=r(14140),o=r(70274);const a=[.299,.587,.114];function s(e){if(null==e)return!1;let{max:t,min:r,size:n}=e;return(t-r)/n===1&&r>=-.5&&.5===Math.abs(r%1)&&t<=255.5}function u(e,t=256){t=Math.min(t,256);let{size:r,counts:n}=e,i=new Float64Array(r);i[0]=n[0]/t;for(let e=1;e<r;e++)i[e]=i[e-1]+n[e]/t;let l=new Uint8Array(t),o=t/i[i.length-1];if(r<=t){let n=s(e)?Math.max(0,Math.round(e.min+.5)):0;for(let e=n;e<t;e++)l[e]=e>=r+n?255:Math.min(255,Math.trunc(i[e-n]*o))}else{let e=i.map(e=>Math.min(255,Math.trunc(e*o)));for(let n=0;n<t;n++)l[n]=e[Math.round(r/t)];l[t-1]=255}return l}function h(e){let{minCutOff:t,maxCutOff:r,gamma:n,pixelType:i,rounding:l}=e;if(!["u8","u16","s8","s16"].includes(i))return null;let o=t.length,a="s8"===i?-127:"s16"===i?-32767:0,s=["u16","s16"].includes(i)?65536:256,u=[],h=[],{minOutput:c=0,maxOutput:d=255}=e,p=d-c;for(let e=0;e<o;e++)h[e]=r[e]-t[e],u[e]=0===h[e]?0:p/h[e];let m=[];if(n&&n.length>=o){let e=x(o,n);for(let i=0;i<o;i++){let o=[];for(let u=0;u<s;u++){if(0===h[i]){o[u]=c;continue}let s=u+a,f=(s-t[i])/h[i],m=1;if(n[i]>1&&(m-=(1/p)**(f*e[i])),s<r[i]&&s>t[i]){let e=m*p*f**(1/n[i])+c;o[u]="floor"===l?Math.floor(e):"round"===l?Math.round(e):e}else s>=r[i]?o[u]=d:o[u]=c}m[i]=o}}else for(let e=0;e<o;e++){let n=[];for(let i=0;i<s;i++){let o=i+a;if(o<=t[e])n[i]=c;else if(o>=r[e])n[i]=d;else{let r=(o-t[e])*u[e]+c;n[i]="floor"===l?Math.floor(r):"round"===l?Math.round(r):r}}m[e]=n}if(null!=e.contrastOffset){let t=f(e.contrastOffset,e.brightnessOffset);for(let e=0;e<o;e++){let r=m[e];for(let e=0;e<s;e++)r[e]=t[r[e]]}}return{lut:m,offset:a}}function f(e,t){let r=Math.min(Math.max(e,-100),100),n=Math.min(Math.max(t??0,-100),100),i=new Uint8Array(256);for(let e=0;e<256;e++){let t=0;r>0&&r<100?t=(200*e-25500+510*n)/(2*(100-r))+128:r<=0&&r>-100?t=(200*e-25500+510*n)*(100+r)/2e4+128:100===r?(t=200*e-25500+256*(100-r)+510*n,t=t>0?255:0):-100===r&&(t=128),i[e]=t>255?255:t<0?0:t}return i}function c(e,t,r){let n=[];for(let i=0;i<t.length;i++){let l=0,o=0,s=0;"min"in t[i]?({min:l,max:o,avg:s}=t[i]):[l,o,s]=t[i];let u=s??0;"u8"!==e&&(u=255*(u-l)/(o-l)),r&&(u*=a[i]),n.push(d(u))}return n}function d(e){if(e<=0||e>=255)return 1;let t=e+(150===e?0:e<150?45*Math.cos(.01047*e):17*Math.sin(.021*e)),r=Math.log(e/255),n=Math.log(t/255);if(0===n)return 1;let i=r/n;return isNaN(i)?1:Math.min(9.9,Math.max(.01,i))}function p(e,t,r){let{min:n,max:i,count:l,avg:o,mode:a,median:s}=function(e,t,r=!1,n=!1){let i=1/0,l=-1/0,o=0,a=0,s=0,u=0,h=e.length,f=new Map;for(let r=0;r<h;r++){let n=e[r];if(!t||t[r]){let e=(f.get(n)??0)+1;f.set(n,e),e>u&&(u=e,s=n),i=n<i?n:i,l=n>l?n:l,o+=n,a++}}let c=a>0?o/a:0,d=i===l?i:void 0,p=i===l?i:void 0,m=i===l?i:void 0;if(r&&a>0&&a<2**24){let r=e.slice();if(t){let n=0;for(let i=0;i<h;i++){let l=e[i];t[i]&&(r[n++]=l)}}r=r.slice(0,a),r.sort((e,t)=>e-t);let i=a>>>1;d=a%2?r[Math.floor(i)]:(r[i-1]+r[i])/2,n&&(p=r[Math.floor(.25*a)],m=r[Math.floor(.75*a)])}return{min:i,max:l,count:a,avg:c,mode:s,median:d,quartile1:p,quartile3:m}}(e,t,!0);if(0===l)return{statistics:{min:0,max:0,avg:0,stddev:0,count:l,mode:0,median:0},histogram:null};let u={min:n,max:i,avg:o,mode:a,count:l,median:s},h=function(e,t,r,n=!1,i=!1){let l=0,o=0,a=0,s=0;for(let i=0;i<e.length;i++)if(!t||t[i]){let t=e[i]-r,u=t*t;if(l+=u,!n){let e=u*t;o+=e,a+=e*t}s++}if(s<2)return null;l/=s-1;let u=Math.sqrt(l);return n?{stddev:u}:(a/=s,{stddev:u,skewness:i?o*(s/((s-1)*(s-2)))/l**1.5:o/s/l**1.5,kurtosis:a/(l*l)})}(e,t,o,!r.includeSkewnessKurtosis);h&&(u.stddev=h.stddev,r.includeSkewnessKurtosis&&(u.skewness=h.skewness,u.kurtosis=h.kurtosis));let f=r?.histogramSize??256,c=!!r?.pixelType&&["u8","s8","u4","u2","u1"].includes(r.pixelType),d=!r?.skipHistograms;if(null==s){let r=m({band:e,mask:t,min:n,max:i,size:1e4,use8BitHistogram:c});if(s=function(e,t,r,n=50){let{counts:i,min:l,max:o,size:a}=r,s=i.reduce((e,t)=>e+t),u=s*(n/=100),h=0,f=0;for(;f<i.length&&(h+=i[f],!(h>=u+1));f++);let c=(o-l)/a,d=l+c*f,p=l+c*(f+1);if(1===c&&.5===Math.abs(l%1))return d+.5;let m=e.slice(0,i[f]).fill(0);for(let r=0,n=0;r<e.length;r++)if(!t||t[r]){let t=e[r];t>=d&&t<p&&(m[n++]=t)}m.sort((e,t)=>e-t);let g=h-Math.floor(u)-1;return m[Math.max(0,m.length-1-g)]}(e,t,r,50),d&&c&&256===f)return{statistics:u,histogram:r}}return d?{statistics:u,histogram:m({band:e,mask:t,min:n,max:i,size:f,use8BitHistogram:c&&256===f})}:{statistics:u,histogram:null}}function m(e){let{band:t,mask:r,min:n,max:i,use8BitHistogram:l}=e;if(l){let e=i-n+1,l=new Uint32Array(e);for(let e=0;e<t.length;e++)(!r||r[e])&&l[t[e]-n]++;return{min:n-.5,max:i+.5,size:e,counts:l}}let o=e.size??256,a=new Uint32Array(o),s=(i-n)/o;if(0===s){let e=r?r.reduce((e,t)=>e+ +!!t,0):t.length;return{min:n,max:i,size:1,counts:new Uint32Array(1).fill(e)}}let u=new Uint32Array(o+1),h=1/s;for(let e=0;e<t.length;e++)(!r||r[e])&&u[Math.floor((t[e]-n)*h)]++;for(let e=0;e<o-1;e++)a[e]=u[e];return a[o-1]=u[o-1]+u[o],{min:n,max:i,size:o,counts:a}}function g(e,t){let{pixels:r,mask:n,pixelType:i,bandMasks:l}=e,o=r.map((e,r)=>p(e,l?.[r]??n,{pixelType:i,...t}));return{statistics:o.map(({statistics:e})=>e),histograms:o.map(({histogram:e})=>e)}}function y(e){if(!e?.pixels?.length)return null;let t,r,{pixels:n,mask:i,bandMasks:l,pixelType:o}=e,a=e.width*e.height,s=n.length,u=[],h=[];for(let f=0;f<s;f++){let s=new Uint32Array(256),c=n[f],d=l?.[f]??i;if("u8"===o){if(t=255,r=0,d){for(let e=0;e<a;e++)if(d[e]){let n=c[e];t=n<t?n:t,r=n>r?n:r,s[n]++}}else for(let e=0;e<a;e++){let n=c[e];t=n<t?n:t,r=n>r?n:r,s[n]++}s=s.slice(t,r+1)}else{let n=!1;e.statistics||(e.updateStatistics(),n=!0);let i=e.statistics;t=i[f].minValue,r=i[f].maxValue;let l=(r-t)/256;if(0===l){i&&!e.validPixelCount&&!n&&e.updateStatistics();let t=(e.validPixelCount||e.width*e.height)/256;for(let e=0;e<256;e++)s[e]=Math.round(t*(e+1))-Math.round(t*e)}else{let e=new Uint32Array(257);for(let r=0;r<a;r++)(!d||d[r])&&e[Math.floor((c[r]-t)/l)]++;for(let t=0;t<255;t++)s[t]=e[t];s[255]=e[255]+e[256]}}let p="u8"===o?t-.5:t,m="u8"===o?r+.5:r;u.push({min:p,max:m,size:s.length,counts:s});let g=0,y=0,w=0;for(let e=0;e<s.length;e++)g+=s[e],y+=e*s[e];let C=y/g;for(let e=0;e<s.length;e++)w+=s[e]*(e-C)**2;let x=Math.sqrt(w/(g-1)),b=(m-p)/s.length,A=(C+("u8"===o?0:.5))*b+t,v=x*b;h.push({min:t,max:r,avg:A,stddev:v})}return{statistics:h,histograms:u}}function w(e){let t=[];for(let r=0;r<e.length;r++){let{min:n,max:i,size:l,counts:o}=e[r],a=0,s=0;for(let e=0;e<l;e++)a+=o[e],s+=e*o[e];let u=s/a,h=0;for(let e=0;e<l;e++)h+=o[e]*(e-u)**2;let f=(i-n)/l,c=(u+.5)*f+n,d=Math.sqrt(h/(a-1))*f;t.push({min:n,max:i,avg:c,stddev:d})}return t}function C(e,t){let{pixelBlock:r,bandIds:l,returnHistogramLut:a,rasterInfo:s}=t,h=null,f=null,c=e.stretchType;if("number"==typeof c&&(c=o.x[c]),e.dra)if("minMax"===c&&r?.statistics)h=r.statistics.map(e=>[e.minValue,e.maxValue,0,0]);else{let e=y(r);h=null==e?null:e.statistics,f=null==e?null:e.histograms}else h=e.statistics?.length?e.statistics:s.statistics,f="histograms"in e?e.histograms:void 0,f||=s.histograms;("percentClip"===c||"histogramEqualization"===c)&&!f?.length&&(c="minMax");let d=h?.length||f?.length||s.bandCount,p=[],m=[];h&&!Array.isArray(h[0])&&(h=h.map(e=>[e.min,e.max,e.avg,e.stddev]));let g,w,C,[x,b]=(0,i.hP)(s.pixelType);if(!h?.length){h=[];for(let e=0;e<d;e++)h.push([x,b,1,1]);"standardDeviation"===c&&(c="minMax")}switch(c){case"none":for(let e=0;e<d;e++)p[e]=x,m[e]=b;break;case"minMax":for(let e=0;e<d;e++){let t=h[e];p[e]=t[0],m[e]=t[1]}break;case"standardDeviation":{let{numberOfStandardDeviations:t=2}=e;for(let e=0;e<d;e++){let r=h[e];p[e]=r[2]-t*r[3],m[e]=r[2]+t*r[3],p[e]<r[0]&&(p[e]=r[0]),m[e]>r[1]&&(m[e]=r[1])}}break;case"histogramEqualization":(0,n.Lw)(f);for(let e=0;e<d;e++)p[e]=f[e].min,m[e]=f[e].max;break;case"percentClip":(0,n.Lw)(f);for(let t=0;t<f.length;t++){let r=f[t],n=new Uint32Array(r.size),i=[...r.counts];i.length>=20&&(i[0]=i[1]=i[2]=i[i.length-1]=i[i.length-2]=0);let l=0,o=(r.max-r.min)/r.size,a=-.5===r.min&&1===o?.5:0;for(let e=0;e<r.size;e++)l+=i[e],n[e]=l;let s=(e.minPercent||0)*l/100;p[t]=r.min+a;for(let e=0;e<r.size;e++)if(n[e]>s){p[t]=r.min+o*(e+a);break}s=(1-(e.maxPercent||0)/100)*l,m[t]=r.max+a;for(let e=r.size-2;e>=0;e--)if(n[e]<s){m[t]=r.min+o*(e+2-a);break}if(m[t]<p[t]){let e=p[t];p[t]=m[t],m[t]=e}}break;default:for(let e=0;e<d;e++){let t=h[e];p[e]=t[0],m[e]=t[1]}}return"histogramEqualization"===c?((0,n.Lw)(f),w=f[0].size||256,g=0,a&&(C=f.map(e=>u(e)))):(w=e.max||255,g=e.min||0),function(e,t){if(null==t||0===t.length)return e;let r=Math.max.apply(null,t),{minCutOff:n,maxCutOff:i,minOutput:l,maxOutput:o,histogramLut:a}=e;return n.length===t.length||n.length<=r?e:{minCutOff:t.map(e=>n[e]),maxCutOff:t.map(e=>i[e]),histogramLut:a?t.map(e=>a[e]):null,minOutput:l,maxOutput:o}}({minCutOff:p,maxCutOff:m,maxOutput:w,minOutput:g,histogramLut:C},l)}function x(e,t){let r=new Float32Array(e);for(let n=0;n<e;n++)t[n]>1?t[n]>2?r[n]=6.5+(t[n]-2)**2.5:r[n]=6.5+100*(2-t[n])**4:r[n]=1;return r}function b(e,t){if(!e?.pixels?.length)return e;let{mask:r,bandMasks:n,width:i,height:o,pixels:a}=e,{minCutOff:s,maxCutOff:u,minOutput:h,maxOutput:f,gamma:c}=t,d=i*o,p=t.outputPixelType||"u8",m=e.pixels.map(()=>l.A.createEmptyBand(p,d)),g=m.length,y=f-h,w=[],C=[];for(let e=0;e<g;e++)C[e]=u[e]-s[e],w[e]=0===C[e]?0:y/C[e];let b=p.startsWith("u")||p.startsWith("s"),A=c&&c.length>=g,v=!!t.isRenderer;if(A){let e=x(g,c);for(let t=0;t<g;t++){let i=n?.[t]??r;for(let r=0;r<d;r++)if(null==i||i[r]){if(0===C[t]){m[t][r]=h;continue}let n=a[t][r],i=(n-s[t])/C[t],l=1;if(c[t]>1&&(l-=(1/y)**(i*e[t])),n<u[t]&&n>s[t]){let e=l*y*i**(1/c[t])+h;m[t][r]=v?Math.floor(e):b?Math.round(e):e}else n>=u[t]?m[t][r]=f:m[t][r]=h}}}else for(let e=0;e<g;e++){let t=n?.[e]??r;for(let r=0;r<d;r++)if(null==t||t[r]){let t=a[e][r];if(t<u[e]&&t>s[e]){let n=(t-s[e])*w[e]+h;m[e][r]=v?Math.floor(n):b?Math.round(n):n}else t>=u[e]?m[e][r]=f:m[e][r]=h}}let M=new l.A({width:i,height:o,mask:r,bandMasks:n,pixels:m,pixelType:p});return M.updateStatistics(),M}},51181(e,t,r){r.d(t,{E0:()=>p,PP:()=>m,SC:()=>f,di:()=>d,fw:()=>h,ng:()=>a,yy:()=>c});var n=r(47520),i=r(14140),l=r(4151);const o=1/111e3;function a(e){let{altitude:t,azimuth:r}=e,{hillshadeType:n,pixelSizePower:i=1,pixelSizeFactor:l=1,scalingType:a,isGCS:s,resolution:u}=e,h="multi-directional"===n?2*e.zFactor:e.zFactor,{x:f,y:c}=u,d=h/(8*f),p=h/(8*c);if(s&&h>.001&&(d/=o,p/=o),"adjusted"===a)if(s){let e=f*o,t=c*o;d=(h+e**i*l)/(8*e),p=(h+t**i*l)/(8*t)}else d=(h+f**i*l)/(8*f),p=(h+c**i*l)/(8*c);let m=(90-t)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),C=Math.sin(m)*Math.sin(y),x=[315,270,225,360,180,0],b=[60,60,60,60,60,90],A=new Float32Array([3,5,3,2,1,4]),v=A.reduce((e,t)=>e+t),M=A.map(e=>e/v),k="multi-directional"===n?x.length:1,T=new Float32Array(6),S=new Float32Array(6),I=new Float32Array(6);if("multi-directional"===n)for(let e=0;e<k;e++)t=b[e],r=x[e],m=(90-t)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),C=Math.sin(m)*Math.sin(y),T[e]=g,S[e]=w,I[e]=C;else T.fill(g),S.fill(w),I.fill(C);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:C,cosZ:g,sinZcosAs:[...S],sinZsinAs:[...I],cosZs:[...T],weights:[...M],hillshadeType:["traditional","multi-directional"].indexOf(n)}}function s(e,t){let r,{width:n,height:i}=e,l=n*i,o=new Uint8Array(l),a=null!=e.mask;if(a){r=new Uint8Array(e.mask);for(let e=0;e<r.length;e++)r[e]&&(o[e]=1,r[e]=1)}let s,u=e.pixels[0],h=new Float32Array(l),f=new Float32Array(l),c=0;if(t){let{resolution:e}=t,r=e?(e.x+e.y)/2:1;c=200*t.zFactor/(r*r),s=new Float32Array(l)}let d,p,m,g,y,w,C,x,b=t?.curvatureType;for(let e=1;e<i-1;e++){let t=e*n;for(let e=1;e<n-1;e++){let i=t+e;if(0!==r?.[i]){if(r){if(r[i-n-1]+r[i-n]+r[i-n+1]+r[i-1]+r[i+1]+r[i+n-1]+r[i+n]+r[i+n+1]<7){o[i]=0;continue}d=r[i-n-1]?u[i-n-1]:u[i],p=r[i-n]?u[i-n]:u[i],m=r[i-n+1]?u[i-n+1]:u[i],g=r[i-1]?u[i-1]:u[i],y=r[i+1]?u[i+1]:u[i],w=r[i+n-1]?u[i+n-1]:u[i],C=r[i+n]?u[i+n]:u[i],x=r[i+n+1]?u[i+n+1]:u[i]}else d=u[i-n-1],p=u[i-n],m=u[i-n+1],g=u[i-1],y=u[i+1],w=u[i+n-1],C=u[i+n],x=u[i+n+1];if(h[i]=m+y+y+x-(d+g+g+w),f[i]=w+C+C+x-(d+p+p+m),null!=s){let e=u[i],t=.5*(g+y)-e,r=.5*(p+C)-e;if("standard"===b)s[i]=-c*(t+r);else{let e=(-d+m+w-x)/4,n=(-g+y)/2,l=(p-C)/2,o=n*n,a=l*l,u=o+a;u&&(s[i]="profile"===b?c*(t*o+r*a+e*n*l)/u:-c*(t*a+r*o-e*n*l)/u)}}}}}return{outMask:a?o:null,dzxs:h,dzys:f,curvatures:s}}function u(e,t,r){for(let n=0;n<r;n++)e[n*t]=e[n*t+1],e[(n+1)*t-1]=e[(n+1)*t-2];for(let n=1;n<t-1;n++)e[n]=e[n+t],e[n+(r-1)*t]=e[n+(r-2)*t]}function h(e,t){if(!(0,n.AB)(e))return e;let{factor:r,sinZcosA:o,sinZsinA:h,cosZ:f,sinZcosAs:c,sinZsinAs:d,cosZs:p,weights:m}=a(t),[g,y]=r,w="traditional"===t.hillshadeType,{width:C,height:x}=e,b=new Uint8Array(C*x),{dzxs:A,dzys:v,outMask:M}=s(e);for(let e=1;e<x-1;e++){let t=e*C;for(let e=1;e<C-1;e++){let r=t+e;if(!M||M[r]){let e=A[r]*g,t=v[r]*y,n=Math.sqrt(1+e*e+t*t),i=0;if(w){let r=255*(f+h*t-o*e)/n;r<0&&(r=0),i=r}else{let r=d.length;for(let l=0;l<r;l++){let r=255*(p[l]+d[l]*t-c[l]*e)/n;r<0&&(r=0),i+=r*m[l]}}b[r]=255&i}}}return u(b,C,x),new i.A({width:C,height:x,pixels:[b],mask:M,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[new l.A(0,255)]})}function f(e,t,r,i){if(!(0,n.AB)(e)||!(0,n.AB)(t))return;let{min:l,max:o}=i,a=e.pixels[0],{pixels:s,mask:u}=t,h=s[0],f=255.00001/(o-l),c=new Uint8ClampedArray(h.length),d=new Uint8ClampedArray(h.length),p=new Uint8ClampedArray(h.length),m=r.length-1;for(let e=0;e<h.length;e++){if(0===u?.[e])continue;let t=Math.floor((h[e]-l)*f),[n,i]=r[t<0?0:t>m?m:t],o=a[e],s=o*i,g=s*(1-Math.abs(n%2-1)),y=o-s;switch(Math.floor(n)){case 0:c[e]=s+y,d[e]=g+y,p[e]=y;break;case 1:c[e]=g+y,d[e]=s+y,p[e]=y;break;case 2:c[e]=y,d[e]=s+y,p[e]=g+y;break;case 3:c[e]=y,d[e]=g+y,p[e]=s+y;break;case 4:c[e]=g+y,d[e]=y,p[e]=s+y;break;case 5:case 6:c[e]=s+y,d[e]=y,p[e]=g+y}}e.pixels=[c,d,p],e.updateStatistics()}function c(e,t){if(!(0,n.AB)(e))return e;let r=t.zFactor,l=t.pixelSizePower??1,a=t.pixelSizeFactor??1,h=t.slopeType,f=t.isGCS,{x:c,y:d}=t.resolution,p=r/(8*c),m=r/(8*d);f&&Math.abs(r-1)<1e-4&&(p/=o,m/=o),"adjusted"===h&&(p=(r+c**l*a)/(8*c),m=(r+d**l*a)/(8*d));let{dzxs:g,dzys:y,outMask:w}=s(e),{width:C,height:x}=e,b=new Float32Array(C*x);for(let e=1;e<x-1;e++){let t=e*C;for(let e=1;e<C-1;e++){let r=t+e;if(!w||w[r]){let n=g[r]*p,i=y[r]*m,l=Math.sqrt(n*n+i*i);b[t+e]="percent-rise"===h?100*l:57.2957795*Math.atan(l)}}}u(b,C,x);let A=new i.A({width:C,height:x,pixels:[b],mask:w,pixelType:"f32",validPixelCount:e.validPixelCount});return A.updateStatistics(),A}function d(e,t={}){if(!(0,n.AB)(e))return e;let{resolution:r}=t,o=r?1/r.x:1,a=r?1/r.y:1,{dzxs:h,dzys:f,outMask:c}=s(e),{width:d,height:p}=e,m=new Float32Array(d*p);for(let e=1;e<p-1;e++){let t=e*d;for(let e=1;e<d-1;e++){let r=t+e;if(!c||c[r]){let n=h[r]*o,i=f[r]*a,l=-1;(0!==n||0!==i)&&(l=90-57.29578*Math.atan2(i,-n),l<0&&(l+=360),360===l?l=0:l>360&&(l%=360)),m[t+e]=l}}}return u(m,d,p),new i.A({width:d,height:p,pixels:[m],mask:c,pixelType:"f32",validPixelCount:e.validPixelCount,statistics:[new l.A(-1,360)]})}function p(e,t){if(!(0,n.AB)(e))return e;let{curvatures:r,outMask:l}=s(e,t),{width:o,height:a}=e;u(r,o,a);let h=new i.A({width:o,height:a,pixels:[r],mask:l,pixelType:"f32",validPixelCount:e.validPixelCount});return h.updateStatistics(),h}function m(e,t,r){let{hillshadeType:n,altitude:i,azimuth:l,zFactor:o,pixelSizeFactor:a,pixelSizePower:s,slopeType:u}=e;return{hillshadeType:n,altitude:i,azimuth:l,zFactor:o,pixelSizePower:s,pixelSizeFactor:a,scalingType:"scaled"===u?"adjusted":"none",resolution:t,isGCS:r}}r.d(t,["rk",0,o])},34251(e,t,r){r.d(t,{FI:()=>p,KL:()=>u,Lu:()=>f,Rn:()=>m,Wu:()=>y,Y2:()=>d});var n=r(66552),i=r(47520),l=r(14140);const o=new Map;o.set("meter-per-second",1),o.set("kilometer-per-hour",.277778),o.set("knots",.514444),o.set("feet-per-second",.3048),o.set("mile-per-hour",.44704);const a=180/Math.PI,s=new n.J({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(e,t){return o.get(e)/o.get(t)||1}function h(e){return(450-e)%360}function f(e,t="geographic"){let[r,n]=e,i=Math.sqrt(r*r+n*n),l=Math.atan2(n,r)*a;return l=(360+l)%360,"geographic"===t&&(l=h(l)),[i,l]}function c(e,t="geographic"){let r=e[1];"geographic"===t&&(r=h(r)),r%=360;let n=e[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function d(e,t,r,n="geographic"){if(!(0,i.AB)(e)||null==r)return e;let l="vector-magdir"===t?e.clone():p(e,t),o=l.pixels[1];for(let e=0;e<o.length;e++)o[e]="geographic"===n?(o[e]+r[e]+270)%360:(o[e]+360-r[e])%360;return"vector-magdir"===t?l:p(l,"vector-magdir")}function p(e,t,r="geographic",n=1){if(!(0,i.AB)(e))return e;let{pixels:o,width:a,height:s}=e,u=a*s,h=o[0],d=o[1],p=e.pixelType.startsWith("f")?e.pixelType:"f32",m=l.A.createEmptyBand(p,u),g=l.A.createEmptyBand(p,u),y=0;for(let e=0;e<s;e++)for(let e=0;e<a;e++)"vector-uv"===t?([m[y],g[y]]=f([h[y],d[y]],r),m[y]*=n):([m[y],g[y]]=c([h[y],d[y]],r),m[y]*=n,g[y]*=n),y++;let w=new l.A({pixelType:p,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[m,g]});return w.updateStatistics(),w}function m(e,t,r=1){if(1===r||!(0,i.AB)(e))return e;let n=e.clone(),{pixels:l,width:o,height:a}=n,s=l[0],u=l[1],h=0;for(let e=0;e<a;e++)for(let e=0;e<o;e++)"vector-uv"===t?(s[h]*=r,u[h]*=r):s[h]*=r,h++;return n.updateStatistics(),n}function g(e,t,r,n=1){let i=Math.sqrt(e*e+t*t)/n,l=(2*Math.PI+Math.atan2(t,e))%(2*Math.PI);return[i,(2*Math.PI+l-r)%(2*Math.PI)]}function y(e,t,r,n=[0,0],i=.5){let{width:o,height:a,mask:s}=e,[u,h]=e.pixels,[d,p]=n,m=Math.round((o-d)/r),g=Math.round((a-p)/r),y=m*g,w=new Float32Array(y),C=new Float32Array(y),x=new Uint8Array(y),b="vector-uv"===t;for(let e=0;e<g;e++)for(let t=0;t<m;t++){let n=0,l=e*m+t,g=Math.max(0,e*r+p),y=Math.max(0,t*r+d),A=Math.min(a,g+r),v=Math.min(o,y+r);for(let e=g;e<A;e++)for(let t=y;t<v;t++){let r=e*o+t;if(!s||s[r]){n++;let e=b?[u[r],h[r]]:[u[r],(360+h[r])%360],[t,i]=b?e:c(e);w[l]+=t,C[l]+=i}}if(n>=(A-g)*(v-y)*(1-i)){x[l]=1;let[e,t]=f([w[l]/n,C[l]/n]);w[l]=e,C[l]=t}else x[l]=0,w[l]=0,C[l]=0}let A=new l.A({width:m,height:g,pixels:[w,C],mask:x});return A.updateStatistics(),A}!function(e=0,t=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));let i=n?-1:1,l=13*i,o=-7*i,a=-2*i,s=-16*i,u=21.75,[h,f]=g(0,t+l,r,u),[c,d]=g(e-5.5,t+o,r,u),[p,m]=g(e+5.5,t+o,r,u),[y,w]=g(e-1.5,t+a,r,u),[C,x]=g(e+1.5,t+a,r,u),[b,A]=g(e-1.5,t+s,r,u),[v,M]=g(e+1.5,t+s,r,u)}(0,0,0),r.d(t,["MD",0,s])},14140(e,t,r){r.d(t,{A:()=>c});var n,i=r(32198),l=r(49186),o=r(25482),a=r(4718),s=r(53966),u=r(91429),h=r(94778),f=r(4151);let c=class extends o.o{static{n=this}static createEmptyBand(e,t){return new(n.getPixelArrayConstructor(e))(t)}static combineBandMasks(e){if(e.length<2)return e[0];let t=e[0].length,r=new Uint8Array(t).fill(255);for(let n=0;n<e.length;n++){let i=e[n];for(let e=0;e<t;e++)i[e]||(r[e]=0)}return r}static getPixelArrayConstructor(e){let t;switch(e){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":t=Float32Array;break;case"f64":t=Float64Array}return t}constructor(e){super(e),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(e){if(!e)return"f32";let t=e.toLowerCase();return["u1","u2","u4"].includes(t)?t="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(t)||(t="f32"),t}getPlaneCount(){return this.pixels?.length}addData(e){if(!e.pixels||e.pixels.length!==this.width*this.height)throw new l.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.statistics||=[],this.pixels.push(e.pixels),this.statistics.push(e.statistics??new f.A)}getAsRGBA(){let e=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(e);break;default:this._fillFrom8Bit(e)}return new Uint8ClampedArray(e)}getAsRGBAFloat(){let e=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(e),e}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map(e=>function(e,t){let r,n=1/0,i=-1/0,l=e.length,o=0;if(null!=t)for(r=0;r<l;r++)t[r]&&(o=e[r],n=o<n?o:n,i=o>i?o:i);else for(r=0;r<l;r++)o=e[r],n=o<n?o:n,i=o>i?o:i;return new f.A(n,i)}(e,this.mask));let e=this.mask,t=0;if(null!=e)for(let r=0;r<e.length;r++)e[r]&&t++;else t=this.width*this.height;this.validPixelCount=t}clamp(e){if(!e||"f64"===e||"f32"===e||!this.pixels)return;let t,r,i,[l,o]=(0,h.hP)(e),a=this.pixels,s=this.width*this.height,u=a.length,f=[];for(let h=0;h<u;h++){i=n.createEmptyBand(e,s),t=a[h];for(let e=0;e<s;e++)r=t[e],i[e]=r>o?o:r<l?l:r;f.push(i)}this.pixels=f,this.pixelType=e}extractBands(e){let{pixels:t,statistics:r}=this;if(null==e||0===e.length||!t||0===t.length)return this;let i=t.length,l=e.some(e=>e>=t.length),o=i===e.length&&!e.some((e,t)=>e!==t);if(l||o)return this;let a=this.bandMasks?.length===i?e.map(e=>this.bandMasks[e]):void 0,{mask:s,validPixelCount:u}=this,{width:h,height:f}=this;return a?.length&&(s=n.combineBandMasks(a),u=s.filter(e=>!!e).length),new n({pixelType:this.pixelType,width:h,height:f,mask:s,bandMasks:a,validPixelCount:u,maskIsAlpha:this.maskIsAlpha,pixels:e.map(e=>t[e]),statistics:r&&e.map(e=>r[e])})}clone(){let e=new n({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount,premultiplyAlpha:this.premultiplyAlpha,depthCount:this.depthCount});null!=this.mask&&(e.mask=new Uint8Array(this.mask)),this.noDataValues&&(e.noDataValues=[...this.noDataValues]),this.bandMasks&&(e.bandMasks=this.bandMasks.map(e=>new Uint8Array(e)));let t,r=n.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){e.pixels=[];let n=!!this.pixels[0].slice;for(t=0;t<this.pixels.length;t++)e.pixels[t]=n?this.pixels[t].slice():new r(this.pixels[t])}if(this.statistics)for(e.statistics=[],t=0;t<this.statistics.length;t++)e.statistics[t]=(0,a.o8)(this.statistics[t]);return e}getTransferableObject(){let{pixels:e,bandMasks:t,mask:r}=this;this.pixels=[],this.bandMasks=void 0,this.mask=void 0;let n=this.toJSON();this.pixels=e,this.bandMasks=t,this.mask=r,n.pixels=e&&[...e],n.bandMasks=t&&[...t],n.mask=r;let i=[];return[...e??[],r,...t??[]].filter(e=>null!=e&&ArrayBuffer.isView(e)).forEach(e=>{e&&!i.includes(e.buffer)&&i.push(e.buffer)}),{pixelBlock:n,transferList:i}}_fillFrom8Bit(e){let t,r,n,i,{mask:l,maskIsAlpha:o,premultiplyAlpha:a,pixels:u}=this;if(!e||!u?.length)return void s.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");t=r=n=u[0],u.length>=3?(r=u[1],n=u[2]):2===u.length&&(r=u[1]);let h=new Uint32Array(e),f=this.width*this.height;if(t.length===f)if(null!=l&&l.length===f)if(o)for(i=0;i<f;i++){let e=l[i];if(e){let l=e/255;h[i]=a?e<<24|n[i]*l<<16|r[i]*l<<8|t[i]*l:e<<24|n[i]<<16|r[i]<<8|t[i]}}else for(i=0;i<f;i++)l[i]&&(h[i]=255<<24|n[i]<<16|r[i]<<8|t[i]);else for(i=0;i<f;i++)h[i]=255<<24|n[i]<<16|r[i]<<8|t[i];else s.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(e){let{pixels:t,mask:r,statistics:n}=this;if(!e||!t?.length)return void s.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i=this.pixelType,l=1,o=0,a=1;if(n&&n.length>0){for(let e of n)if(null!=e.minValue&&(o=Math.min(o,e.minValue)),null!=e.maxValue&&null!=e.minValue){let t=e.maxValue-e.minValue;a=Math.max(a,t)}l=255/a}else{let e=255;"s8"===i?(o=-128,e=127):"u16"===i?e=65535:"s16"===i?(o=-32768,e=32767):"u32"===i?e=4294967295:"s32"===i?(o=-2147483648,e=2147483647):"f32"===i?(o=-34e38,e=34e38):"f64"===i&&(o=-Number.MAX_VALUE,e=Number.MAX_VALUE),l=255/(e-o)}let u,h,f,c,d,p=new Uint32Array(e),m=this.width*this.height;if(u=h=f=t[0],u.length!==m)return s.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(t.length>=2)if(h=t[1],t.length>=3&&(f=t[2]),null!=r&&r.length===m)for(c=0;c<m;c++)r[c]&&(p[c]=255<<24|(f[c]-o)*l<<16|(h[c]-o)*l<<8|(u[c]-o)*l);else for(c=0;c<m;c++)p[c]=255<<24|(f[c]-o)*l<<16|(h[c]-o)*l<<8|(u[c]-o)*l;else if(null!=r&&r.length===m)for(c=0;c<m;c++)d=(u[c]-o)*l,r[c]&&(p[c]=255<<24|d<<16|d<<8|d);else for(c=0;c<m;c++)d=(u[c]-o)*l,p[c]=255<<24|d<<16|d<<8|d}_fillFrom32Bit(e){let t,r,n,i,{pixels:l,mask:o}=this;if(!e||!l?.length)return s.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");t=r=n=l[0],l.length>=3?(r=l[1],n=l[2]):2===l.length&&(r=l[1]);let a=this.width*this.height;if(t.length!==a)return s.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=o&&o.length===a)for(i=0;i<a;i++)e[u++]=t[i],e[u++]=r[i],e[u++]=n[i],e[u++]=1&o[i];else for(i=0;i<a;i++)e[u++]=t[i],e[u++]=r[i],e[u++]=n[i],e[u++]=1}};(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"width",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"height",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"pixelType",void 0),(0,i.Cg)([(0,u.wg)("pixelType")],c.prototype,"castPixelType",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"validPixelCount",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"mask",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"maskIsAlpha",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"pixels",void 0),(0,i.Cg)([(0,u.MZ)()],c.prototype,"premultiplyAlpha",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"statistics",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"depthCount",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"noDataValues",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],c.prototype,"bandMasks",void 0),c=n=(0,i.Cg)([(0,u.$K)("esri.layers.support.PixelBlock")],c)},87186(e,t,r){r.d(t,{A:()=>x});var n,i=r(32198),l=r(25482),o=r(4718),a=r(91429),s=r(5443),u=r(16930);function h(e){return e=Number(e),isNaN(e)?void 0:e}let f=class extends l.o{static{n=this}constructor(e){super(e),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,i.Cg)([(0,a.MZ)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:{source:["WavelengthMin","Wavelength","WAVELENGTH"],reader:(e,t)=>h(t.WavelengthMin??t.Wavelength??t.WAVELENGTH)},write:{target:"WavelengthMin"}}})],f.prototype,"minWavelength",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.RasterBandInfo")],f);var c,d=r(13868),p=r(36005),m=r(43937);function g(e){return e=Number(e),isNaN(e)?void 0:e}let y=class extends l.o{static{c=this}constructor(e){super(e),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(e){return new Date(e)}writeAcquisitionDate(e,t){t.AcquisitionDate=e.getTime()}clone(){return new c({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,i.Cg)([(0,a.MZ)({type:Date,json:{name:"AcquisitionDate",write:!0}})],y.prototype,"acquisitionDate",void 0),(0,i.Cg)([(0,p.w)("acquisitionDate")],y.prototype,"readAcquisitionDate",null),(0,i.Cg)([(0,m.K)("acquisitionDate")],y.prototype,"writeAcquisitionDate",null),(0,i.Cg)([(0,a.MZ)({json:{name:"CloudCover",read:{reader:g},write:!0}})],y.prototype,"cloudCover",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"ProductName",write:!0}})],y.prototype,"productName",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SensorName",write:!0}})],y.prototype,"sensorName",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SensorAzimuth",read:{reader:g},write:!0}})],y.prototype,"sensorAzimuth",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SensorElevation",read:{reader:g},write:!0}})],y.prototype,"sensorElevation",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SunAzimuth",read:{reader:g},write:!0}})],y.prototype,"sunAzimuth",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"SunElevation",read:{reader:g},write:!0}})],y.prototype,"sunElevation",void 0),y=c=(0,i.Cg)([(0,a.$K)("esri.layers.support.RasterSensorInfo")],y);var w,C=r(20223);let x=class extends l.o{static{w=this}constructor(e){super(e),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(){let e=this.keyProperties.BandProperties,{bandCount:t}=this;if(!e?.length||e.length<t){let e=[];for(let r=1;r<=t;r++)e.push(new f({name:"band_"+r}));return e}let r=e.map(e=>f.fromJSON(e));for(let e=0;e<r.length;e++)r[e].name=r[e].name||"band_"+(e+1);return r}get dataType(){let e=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===e?"standard-time":e}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(e){e&&this._set("nativeExtent",e)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;let e=this.nativeExtent;return{x:e.width/this.width,y:e.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return y.fromJSON(this.keyProperties)}clone(){return new w({attributeTable:(0,o.o8)(this.attributeTable),bandCount:this.bandCount,colormap:(0,o.o8)(this.colormap),extent:(0,o.o8)(this.extent),format:this.format,height:this.height,width:this.width,histograms:(0,o.o8)(this.histograms),keyProperties:(0,o.o8)(this.keyProperties),multidimensionalInfo:(0,o.o8)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,o.o8)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,o.o8)(this.spatialReference),statistics:(0,o.o8)(this.statistics),storageInfo:(0,o.o8)(this.storageInfo),transform:(0,o.o8)(this.transform)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"bandInfos",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,i.Cg)([(0,a.MZ)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,i.Cg)([(0,a.MZ)({type:s.A,json:{write:!0}})],x.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)({type:s.A,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"format",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"height",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"width",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,i.Cg)([(0,a.MZ)({type:d.e8.apiValues,json:{write:!0}})],x.prototype,"pixelType",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isPseudoSpatialReference",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,i.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,i.Cg)([(0,a.MZ)({type:C.A,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"transform",void 0),x=w=(0,i.Cg)([(0,a.$K)("esri.layers.support.RasterInfo")],x)},20223(e,t,r){r.d(t,{A:()=>u});var n,i=r(32198),l=r(25482),o=r(4718),a=r(91429),s=r(86738);let u=class extends l.o{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}static{n=this}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,o.o8)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,o.o8)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isBsqTile:this.isBsqTile,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,o.o8)(this.tileInfo),transposeInfo:(0,o.o8)(this.transposeInfo),blockBoundary:(0,o.o8)(this.blockBoundary)})}};(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"blockWidth",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"blockHeight",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"compression",void 0),(0,i.Cg)([(0,a.MZ)({type:s.A,json:{write:!0}})],u.prototype,"origin",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"firstPyramidLevel",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"maximumPyramidLevel",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"pyramidResolutions",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"pyramidScalingFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"pyramidBlockWidth",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],u.prototype,"pyramidBlockHeight",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"isBsqTile",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],u.prototype,"isVirtualTileInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"tileInfo",void 0),(0,i.Cg)([(0,a.MZ)()],u.prototype,"transposeInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"blockBoundary",void 0),u=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.RasterStorageInfo")],u)},4151(e,t,r){r.d(t,{A:()=>n});class n{constructor(e=null,t=null,r=null){this.minValue=e,this.maxValue=t,this.noDataValue=r}}},13868(e,t,r){var n=r(66552);const i=(0,n.O)()({RSP_NearestNeighbor:"nearest",RSP_BilinearInterpolation:"bilinear",RSP_CubicConvolution:"cubic",RSP_Majority:"majority"}),l=(0,n.O)()({esriNoDataMatchAny:"any",esriNoDataMatchAll:"all"}),o=(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"});r.d(t,["SZ",0,i,"e8",0,o,"hm",0,l])},85676(e,t,r){r.d(t,{A:()=>p});var n=r(32198),i=r(25482),l=r(53966),o=r(91429),a=r(94778),s=r(47520),u=r(51927),h=r(51181),f=r(87186),c=r(67369),d=r(88178);let p=class extends i.o{constructor(e){super(e),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){let e,{rendererJSON:t}=this;if(!t)return{success:!1};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(e){let t=e?.pixelBlock;if(!m(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands(e.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{let n=e.extent,i=n.spatialReference.isGeographic,l={x:(n.xmax-n.xmin)/t.width,y:(n.ymax-n.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:i,resolution:l});break}}return r}catch(e){return l.A.getLogger(this).error("symbolize",e.message),t}}simpleStretch(e,t){if(!m(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),(0,u._N)(e,{...t,isRenderer:!0})}catch(t){return l.A.getLogger(this).error("symbolize",t.message),e}}generateWebGLParameters(e){let{rendererJSON:t}=this;switch(t.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===t.type);case"rasterStretch":return this._generateStretchWebGLParams(e.pixelBlock,t,e.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(t,e.isGCS,e.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(t);default:return null}}_isLUTChanged(e){let t=this.lookup.rendererJSON;if(!t)return!0;let{rendererJSON:r}=this;if("colorRamp"in r&&r.colorRamp){let n=r.colorRamp;if(e)return JSON.stringify(n)!==JSON.stringify(t.colorRamp)}return JSON.stringify(r)!==JSON.stringify(t)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:(0,s.qL)(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){let{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?e:t?(0,s.qL)(e,this.lookup.colormapLut):(0,s.Hx)(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){if(!e)return null;let r,{rasterInfo:n,lookup:i}=this,{pixelType:l,bandCount:o}=n,a=this.rendererJSON,h=["u8","u16","s8","s16"].includes(l),{dra:f}=a,{gamma:c}=i;if(f&&(t=null),"histogramEqualization"===a.stretchType){let l=f?null:i.histogramLut,o=(0,u.DP)(a,{rasterInfo:n,pixelBlock:e,bandIds:t,returnHistogramLut:!l}),h="u8"===n.pixelType&&!f&&(0,u.zt)(n.histograms?.[0])?e:(0,u._N)(e,{...o,gamma:c,isRenderer:!0});r=(0,s.eH)(h,{lut:f?o.histogramLut:t?.length?t.map(e=>l[e]):l,offset:0})}else if(h){let h;if(f){let r=(0,u.DP)(a,{rasterInfo:n,pixelBlock:e,bandIds:t});h=(0,u.RP)({pixelType:l,...r,gamma:c,rounding:"floor"})}else{if(this._isLUTChanged()&&!this.bind().success)return e;h=i.stretchLut}if(!h)return e;o>1&&null!=t&&t.length===e?.pixels.length&&h.lut.length===o&&(h={lut:t.map(e=>h.lut[e]),offset:h.offset}),r=(0,s.eH)(e,h)}else{let i=(0,u.DP)(a,{rasterInfo:n,pixelBlock:e,bandIds:t});r=(0,u._N)(e,{...i,gamma:c,isRenderer:!0})}if(a.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;r=(0,s.qL)(r,i.colormapLut)}return r}_symbolizeShadedRelief(e,t){let r=this.rendererJSON,n={...r,...t},i=(0,h.fw)(e,n);if(!r.colorRamp||this._isLUTChanged(!0)&&!this.bind().success)return i;let{hsvMap:l}=this.lookup;if(!l)return i;let o=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,h.SC)(i,e,l,o),i}_isVectorFieldData(){let{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_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(e){let{bandCount:t,attributeTable:r,pixelType:n}=this.rasterInfo,i=e.field1;if(!i)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};let l=e.defaultSymbol,o=1===t&&["u8","s8"].includes(n);if(!(0,d.hu)(this.rasterInfo,i)&&!o)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};let a=[];if(null!=r){let t=r.fields.find(e=>"value"===e.name.toLowerCase());if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(r=>{let n=(e.uniqueValueInfos?.find(e=>String(e.value)===String(r.attributes[i])))?.symbol?.color;n?a.push([r.attributes[t.name]].concat(n)):l&&a.push([r.attributes[t.name]].concat(l.color))})}else{if("value"!==i.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};e.uniqueValueInfos?.forEach(e=>{let t=e?.symbol?.color;t?a.push([parseInt(""+e.value,10)].concat(t)):l&&a.push([parseInt(""+e.value,10)].concat(l?.color))})}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};let u=(0,s.zg)({colormap:a});return this.lookup={rendererJSON:e,colormapLut:u},this.canRenderInWebGL=(0,d.WN)(u?.indexedColormap),{success:!0}}_updateColormapRenderer(e){if(!(0,d.FA)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};let t=e.colormapInfos.map(e=>[e.value].concat(e.color)).sort((e,t)=>e[0]-t[0]);if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};let r=(0,s.zg)({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=(0,d.WN)(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(e){if(!(0,d.iL)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){let t=(0,c.R8)(e.colorRamp,{interpolateAlpha:!0}),r=(0,s.zg)({colormap:t}),n=(0,c.S2)(r.indexedColormap);this.lookup={rendererJSON:e,colormapLut:r,hsvMap:n}}else this.lookup={rendererJSON:e};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){let{attributeTable:t,pixelType:r}=this.rasterInfo,n=t?.fields.find(e=>"value"===e.name.toLowerCase()),i=t?.fields.find(t=>t.name.toLowerCase()===e.field.toLowerCase()),l=null!=n&&null!==i;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||l,tableValueField:n,tableBreakField:i}}_updateClassBreaksRenderer(e){let{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:n,tableBreakField:i}=this._analyzeClassBreaks(e),l=e.classBreakInfos;if(!l?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};let o=l.sort((e,t)=>e.classMaxValue-t.classMaxValue),u=o[o.length-1],h=e.minValue;if(!r){let t=[];for(let e=0;e<o.length;e++)t.push({value:o[e].classMinValue??h,mappedColor:o[e].symbol.color}),h=o[e].classMaxValue;return t.push({value:u.classMaxValue,mappedColor:u.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}let f=[];if(null!=t&&null!=n&&null!==i&&n!==i){let r=n.name,l=i.name,a=o[o.length-1],{classMaxValue:s}=a;h=e.minValue;for(let e of t.features){let t=e.attributes[r],n=e.attributes[l],i=n===s?a:n<h?null:o.find(({classMaxValue:e})=>e>n);i&&f.push([t].concat(i.symbol.color))}}else{let[t,r]=(0,a.hP)(this.rasterInfo.pixelType);h=Math.max(t,Math.floor(e.minValue));for(let e=0;e<o.length;e++){let t=o[e],n=Math.min(r,Math.ceil(t.classMaxValue));for(let e=h;e<n;e++)f.push([e].concat(t.symbol.color));h=n}(u.classMaxValue===h||h===r)&&f.push([h].concat(u.symbol.color))}let c=(0,s.zg)({colormap:f,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:c},this.canRenderInWebGL=(0,d.WN)(c?.indexedColormap),{success:!0}}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||function(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.customStatistics is required when dynamic range adjustment is not used."};let n=e.histograms||this.rasterInfo.histograms;(function(e){return"percentClip"===e||"histogramEqualization"===e})(e.stretchType)&&!n?.length&&!r&&(t="minMax");let{computeGamma:i,useGamma:l,colorRamp:o}=e,{gamma:a}=e;if(l&&i&&!a?.length){let t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;a=(0,u.fP)(this.rasterInfo.pixelType,t)}let h=this.rasterInfo.pixelType,f=!r&&["u8","u16","s8","s16"].includes(h);if("histogramEqualization"===t){let t=n.map(e=>(0,u.WF)(e));this.lookup={rendererJSON:e,histogramLut:t}}else if(f){let t=(0,u.DP)(e,{rasterInfo:this.rasterInfo}),r=(0,u.RP)({pixelType:h,...t,gamma:l?a:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}else this.lookup={rendererJSON:e};if(o&&!function(e){return"algorithmic"===e.type&&["0,0,0,255","0,0,0"].includes(e.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(e.toColor.join(","))}(o)){let t=(0,c.R8)(o,{interpolateAlpha:!0});this.lookup.colormapLut=(0,s.zg)({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=l&&a?.length?a:null,this.canRenderInWebGL="histogramEqualization"!==t,{success:!0}}_generateColormapWebGLParams(e){let{indexedColormap:t,offset:r}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:r,isClassBreaks:e,type:"lut"}}_generateStretchWebGLParams(e,t,r){let{colormapLut:n}=this.lookup,i=t.colorRamp?n?.indexedColormap:null,l=t.colorRamp?n?.offset:null;"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});let{gamma:o}=this.lookup,a=!(!t.useGamma||!o?.some(e=>1!==e)),s=0;null!=e&&(s=e.getPlaneCount(),2===s&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));let{bandCount:h}=this.rasterInfo,f=Math.min(3,r?.length||s||h,h),c=i||a?1:255,d=new Float32Array(f);if(a&&o)for(let e=0;e<f;e++)o[e]>1?o[e]>2?d[e]=6.5+(o[e]-2)**2.5:d[e]=6.5+100*(2-o[e])**4:d[e]=1;let p=a&&o?[o[0],o[1]??o[0],o[2]??o[0]]:[1,1,1],m=a?[d[0],d[1]??d[0],d[2]??d[0]]:[1,1,1];if(t.dra&&null==e&&("minMax"===t.stretchType||"standardDeviation"===t.stretchType))return{bandCount:f,minOutput:(t.min??0)/c,maxOutput:(t.max??255)/c,minCutOff:[0,0,0],maxCutOff:[1,1,1],factor:[1,1,1],useGamma:a,gamma:p,gammaCorrection:m,colormap:i,colormapOffset:l,stretchType:t.stretchType,dynamicRangeAdjustment:t.dra,numberOfStandardDeviations:t.numberOfStandardDeviations??2,type:"stretch"};let{minCutOff:g,maxCutOff:y,minOutput:w,maxOutput:C}=(0,u.DP)(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});1===g.length&&(g[2]=g[1]=g[0]),1===y.length&&(y[2]=y[1]=y[0]);let x=y.map((e,t)=>y[t]===g[t]?0:(C-w)/(y[t]-g[t])/c);return{bandCount:f,minOutput:w/c,maxOutput:C/c,minCutOff:g,maxCutOff:y,factor:x,useGamma:a,gamma:p,gammaCorrection:m,colormap:i,colormapOffset:l,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){let{colormapLut:n}=this.lookup,i=e.colorRamp?n?.indexedColormap:null,l=e.colorRamp?n?.offset:null,o={...e,isGCS:t,resolution:r},a=(0,h.ng)(o),s=this.rasterInfo.statistics?.[0];return{...a,minValue:s?.min??0,maxValue:s?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:i,colormapOffset:l}}_generateVectorFieldWebGLParams(e){let{style:t,inputUnit:r,outputUnit:n,visualVariables:i,symbolTileSize:l,flowRepresentation:o}=e,a=this.rasterInfo.statistics?.[0].min??0,s=this.rasterInfo.statistics?.[0].max??50,u=i?.find(e=>"sizeInfo"===e.type)??{maxDataValue:s,maxSize:.8*l,minDataValue:a,minSize:.2*l},h=u.minDataValue??a,f=u.maxDataValue??s,c=null!=u.maxSize&&null!=u.minSize?[u.minSize/l,u.maxSize/l]:[.2,.8];"wind_speed"===t&&(c[0]=c[1]=(c[0]+c[1])/2);let d=null!=h&&null!=f?[h,f]:null,p=null;if("classified_arrow"===t)if(null!=h&&null!=f&&null!=u){p=[];let e=(u.maxDataValue-u.minDataValue)/5;for(let t=0;t<6;t++)p.push(u.minDataValue+e*t)}else p=[0,1e-6,3.5,7,10.5,14];let m="flow_to"===o==("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,g=i?.find(e=>"rotationInfo"===e.type);return{breakValues:p,dataRange:d,inputUnit:r,outputUnit:n,symbolTileSize:l,symbolPercentRange:c,style:t||"single_arrow",rotation:m,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||e.rotationType,type:"vectorField"}}};function m(e){return(0,s.AB)(e)&&0!==e.validPixelCount}(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"rendererJSON",void 0),(0,n.Cg)([(0,o.MZ)({type:f.A,json:{write:!0}})],p.prototype,"rasterInfo",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"lookup",void 0),(0,n.Cg)([(0,o.MZ)()],p.prototype,"canRenderInWebGL",void 0),p=(0,n.Cg)([(0,o.$K)("esri.renderers.support.RasterSymbolizer")],p)},67369(e,t,r){r.d(t,{M5:()=>c,R8:()=>g,S2:()=>y,hf:()=>x,hs:()=>f,iv:()=>m,vL:()=>b});var n=r(85334),i=r(66552),l=r(12195);const o=[{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]}],a=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 s(e,t){if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]>t[r]+2||e[r]<t[r]-2)return!1;return!0}function u(e){let t=e.clone();return t.fromColor=e.toColor,t.toColor=e.fromColor,t}function h(e,t){let r=t??o;if("algorithmic"===e.type){let t=e.fromColor.toRgb(),n=e.toColor.toRgb();return r.find(e=>s(t,e.fromColor)&&s(n,e.toColor))?.id}if(e.weights?.length)return;let n=e.colorRamps?.map(e=>({fromColor:e.fromColor.toRgb(),toColor:e.toColor.toRgb()}));return r.find(e=>{let t=e.colorRamps;return!(!n||n.length!==t?.length)&&t.every((e,t)=>s(n[t].fromColor,e.fromColor)&&s(n[t].toColor,e.toColor))})?.id}function f(e,t=!1){let r="string"==typeof e?e:function(e,t,r=!1){if(!e)return;let n=!1,i=h(e,t);return null==i&&!r&&(n=!0,e=function(e){if("multipart"===e.type){let t=e.clone();return t.colorRamps?.length&&(t.colorRamps=t.colorRamps.reverse().map(e=>u(e))),t}return u(e)}(e),i=h(e,t)),i?{id:i,inverted:n}:void 0}(e,void 0,t)?.id;return r?a.toJSON(r):null}function c(e,t="esriCIELabAlgorithm"){let r=o.find(({id:t})=>t===e);return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map(e=>({type:"algorithmic",algorithm:t,fromColor:[...e.fromColor],toColor:[...e.toColor]}))}:{type:"algorithmic",algorithm:t,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function d(e){e??={};let t=e.numColors||256,r=e.distanceOffset||0,n=null==e.isCustomInterval?null!==e.distanceInterval&&e.distanceInterval!==1/(t-1):e.isCustomInterval,i=e.distanceInterval||1/(t-1);return{...e,numColors:t,distanceOffset:r,interpolateAlpha:!!e.interpolateAlpha,distanceInterval:i,isCustomInterval:n,weights:e.weights}}function p(e,t){let{fromColor:r,toColor:i}=e,l=3===r.length?[...r,255]:[...r],o=3===i.length?[...i,255]:[...i],a=e.algorithm||"esriCIELabAlgorithm",s=d(t),{numColors:u,distanceOffset:h,isCustomInterval:f,interpolateAlpha:c}=s;if(1===u&&0===h)return[l];if(2===u&&0===h&&!f)return[l,o];let p={r:l[0],g:l[1],b:l[2]},m={r:o[0],g:o[1],b:o[2]},g="esriCIELabAlgorithm"===a?function(e,t,r){let{numColors:n,distanceOffset:i,distanceInterval:l,isCustomInterval:o}=r,{l:a,a:s,b:u}=e,h=(t.l-a)*l,f=(t.a-s)*l,c=(t.b-u)*l,d=[];if(i){let e=i/l;a+=e*h,s+=e*f,u+=e*c}for(let e=0;e<n-1;e++)d.push({l:a,a:s,b:u}),a+=h,s+=f,u+=c;return d.push(o?{l:a,a:s,b:u}:t),d}((0,n.ZD)(p),(0,n.ZD)(m),s):"esriHSVAlgorithm"===a?function(e,t,r){let{numColors:n,distanceOffset:i,distanceInterval:l,isCustomInterval:o}=r,a=0===e.s,s=0===t.s,u=e.h,h=t.h;a&&!s?u=h:s&&!a&&(t={...t,h:u},h=u);let f=Math.abs(h-u),c=0;f<180?c=(h-u)*l:(f=360-f,c=u>h?f*l:-f*l);let d=(t.s-e.s)*l,p=(t.v-e.v)*l,{s:m,v:g}=e,y=u;if(i){let e=i/l;y=(y+e*c+360)%360,m+=e*d,g+=e*p}let w=[];for(let e=0;e<n-1;e++)w.push({h:y,s:m,v:g}),y=(y+c+360)%360,m+=d,g+=p;return w.push(o?{h:y,s:m,v:g}:t),w}((0,n.N2)(p),(0,n.N2)(m),s):function(e,t,r){let{numColors:n,distanceOffset:i,distanceInterval:l,isCustomInterval:o}=r,a=e.h,s=t.h,u=2*Math.PI,h=0;if(a<=s){let e=s-a,t=s-a-u;h=Math.abs(t)<Math.abs(e)?t:e}else{let e=s+u-a,t=s-a;h=Math.abs(t)<Math.abs(e)?t:e}let f=h*l,c=(t.l-e.l)*l,d=(t.c-e.c)*l,{l:p,c:m,h:g}=e;if(i){let e=i/l;p+=e*c,m+=e*d,g=(g+e*f+u)%u}let y=[];for(let e=0;e<n-1;e++)y.push({l:p,c:m,h:g}),p+=c,m+=d,g=(g+f+u)%u;return y.push(o?{l:p,c:m,h:g}:t),y}((0,n.RH)(p),(0,n.RH)(m),s),y=[],w=l[3]??255,C=((o[3]??255)-w)/(u-1);for(let e=0;e<u;e++){let{r:t,g:r,b:i}=(0,n.$)(g[e]),l=c?Math.round(w+C*e):255;y.push([t,r,i,l])}return y}function m(e,t){let r=(0,l.W)(e)?e.toJSON():e;return"multipart"===r.type?function(e,t){let{numColors:r,interpolateAlpha:n}=d(t),i=function(e,t){let{colorRamps:r}=e;if(t??=r.map(({start:e,stop:t})=>null==e||null==t?-1:t-e),t.length!==r.length||t.some(e=>e<0))return Array.from({length:r.length},()=>1/r.length);let n=t.reduce((e,t)=>e+t);return t.map(e=>e/n)}(e,t?.weights),{colorRamps:l}=e,o=[],a=1/(r-1),s=0,u=!1;for(let e=0;e<l.length;e++){let t=o.length,h=u?0:t*a-s;s+=i[e];let f=e===l.length-1?r-1-t:(i[e]-h)/a;if(u=Math.ceil(f)===f,f=Math.ceil(f),0===f)continue;let c=p(l[e],{numColors:f,interpolateAlpha:n,distanceOffset:h/i[e],distanceInterval:a/i[e]});o.push(...c)}let h=[...l[l.length-1].toColor];return 3===h.length&&h.push(255),o.push(h),o}(r,t):p(r,t)}function g(e,t){let r=m(e,t),n=t?.interpolateAlpha;return r.forEach((e,t)=>{e.unshift(t),n||e.pop()}),r}function y(e){let t=[];for(let r=0;r<e.length;r+=4){let i=(0,n.N2)({r:e[r],g:e[r+1],b:e[r+2]});t.push([i.h/60,i.s/100,255*i.v/100])}return t}function w(e){let t=(0,n.N2)(e);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function C(e){return{Algorithm:e.toJSON()?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:w(e.fromColor),ToColor:w(e.toColor)}}function x(e){let t=f(e);if(!t)return null;if("algorithmic"===e.type)return{...C(e),Name:t};if(e.colorRamps){let r=e.colorRamps.map(C);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:t}}return null}function b(e){let t=[...e].reverse().map(e=>{let t=e.toString(16);return t.length<2?"0"+t:t});return 4294967295&Number.parseInt(t.join(""),16)}r.d(t,["L7",0,["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],"kH",0,a,"vj",0,o])},88178(e,t,r){function n(e,t){let{attributeTable:r,bandCount:n}=e;return!(null!=r||(i=e,!["u8","s8"].includes(i.pixelType)||null==i.statistics?.[0]?.min||null==i.statistics[0]?.max||1!==i.bandCount))||!(null==r||n>1||t&&null==r.fields.find(e=>e.name.toLowerCase()===t.toLowerCase()));var i}function i(e){let{bandCount:t,dataType:r,pixelType:n}=e;return"elevation"===r||"generic"===r&&1===t&&("s16"===n||"s32"===n||"f32"===n||"f64"===n)}function l(e,t=!1){let{bandCount:r,colormap:n,pixelType:i}=e;return 1===r&&(!!n?.length||!t&&"u8"===i)}function o(e,t=!1){let{attributeTable:r,bandCount:n}=e;return 1===n&&(!t||null!=r||null!=e.histograms)}function a(e){let{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function s(e){let{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function u(e){return!!e?.length&&e.length<=16384}r.d(t,{FA:()=>l,QJ:()=>s,WN:()=>u,hu:()=>n,iL:()=>i,rd:()=>a,xX:()=>o})},70274(e,t,r){const n=new(r(66552).J)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"});r.d(t,["u",0,n,"x",0,{0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}])},491(e,t,r){r.d(t,{CW:()=>c});var n=r(44208),i=r(53966),l=r(17676);function o(e){let t=new Float32Array(a(e));return a(e,t),t}function a(e,t){let r=0;t&&(t[r]=e.length),r++;for(let n of e){t&&(t[r]=n.stage),r++,t&&(t[r]=n.vertices.length),r++;for(let e of n.vertices)t&&(t[r]=e.x,t[r+1]=e.y,t[r+2]=e.time,t[r+3]=e.speed),r+=4}return r}const s=[1,2],u=[1,2,3,4];var h=r(97441);const f=()=>i.A.getLogger("esri.views.2d.engine.flow.dataUtils");async function c(e,t,r,i,a){let c=performance.now();(0,h.dF)(r);let d=function(e,t){let{perturb:r}=t;if(r){let{rotation:t}=r;null!=t&&(e=function(e,t){let r=Math.cos(t),n=Math.sin(t);return(t,i)=>{let[l,o]=e(t,i);return[r*l+n*o,-n*l+r*o]}}(e,t));let{scale:n}=r;null!=n&&(e=function(e,t){return(r,n)=>{let[i,l]=e(r,n);return[i*t,l*t]}}(e,n))}return e}((0,h.DE)(t,r),t),p=performance.now(),m=(0,h.S1)(t,d,r.width,r.height,i),g=performance.now(),y=function(e){let t=e.reduce((e,t)=>e+t.vertices.length,0),r=new Float32Array(4*t),n=Array(e.length),i=0,l=0;for(let{vertices:t}of e){let e=i;for(let e of t)r[4*i]=e.x,r[4*i+1]=e.y,r[4*i+2]=e.time,r[4*i+3]=e.speed,i++;n[l++]={startVertex:e,numberOfVertices:t.length,firstTime:t[0].time,lastTime:t[t.length-1].time}}return{lineVertices:r,lineDescriptors:n}}(m),w=performance.now(),C="Streamlines"===e?function(e,t,r){let{lineVertices:n,lineDescriptors:i}=e,l=0,a=0;for(let e of i)l+=2*e.numberOfVertices,a+=6*(e.numberOfVertices-1);let s=new Float32Array(9*l),u=new Uint32Array(a),h=0,f=0;function c(){u[f++]=h-2,u[f++]=h,u[f++]=h-1,u[f++]=h,u[f++]=h+1,u[f++]=h-1}function d(e,t,r,n,i,l,o,a){let u=9*h,f=0;s[u+f++]=e,s[u+f++]=t,s[u+f++]=1,s[u+f++]=r,s[u+f++]=l,s[u+f++]=o,s[u+f++]=n/2,s[u+f++]=i/2,s[u+f++]=a,h++,s[u+f++]=e,s[u+f++]=t,s[u+f++]=-1,s[u+f++]=r,s[u+f++]=l,s[u+f++]=o,s[u+f++]=-n/2,s[u+f++]=-i/2,s[u+f++]=a,h++}for(let e of i){let{firstTime:t,lastTime:r}=e,i=null,l=null,o=null,a=null,s=null,u=null;for(let h=0;h<e.numberOfVertices;h++){let f=n[4*(e.startVertex+h)],p=n[4*(e.startVertex+h)+1],m=n[4*(e.startVertex+h)+2],g=n[4*(e.startVertex+h)+3],y=null,w=null,C=null,x=null;if(h>0){y=f-i,w=p-l;let e=Math.sqrt(y*y+w*w);if(y/=e,w/=e,h>1){let e=y+s,t=w+u,r=Math.sqrt(e*e+t*t);e/=r,t/=r;let n=Math.min(1/(e*y+t*w),10);e*=n,t*=n,C=-t,x=e}else C=-w,x=y;null!==C&&null!==x&&(d(i,l,o,C,x,t,r,g),c())}i=f,l=p,o=m,s=y,u=w,a=g}d(i,l,o,-u,s,t,r,a)}return{vertexData:s,indexData:u,pathData:o(r)}}(y,0,m):function(e,t){let{lineVertices:r,lineDescriptors:n}=e,i=0,l=0;for(let e of n){let t=e.numberOfVertices-1;i+=4*t*2,l+=6*t*2}let a,h,f,c,d,p,m,g,y,w,C,x,b,A,v=new Float32Array(16*i),M=new Uint32Array(l),k=0,T=0;function S(e,t,r,n,i,l,o,a,h,f,c,d,p,m){let g=16*k,y=0;for(let w of s)for(let s of u)v[g+y++]=e,v[g+y++]=t,v[g+y++]=r,v[g+y++]=n,v[g+y++]=o,v[g+y++]=a,v[g+y++]=h,v[g+y++]=f,v[g+y++]=w,v[g+y++]=s,v[g+y++]=p,v[g+y++]=m,v[g+y++]=i/2,v[g+y++]=l/2,v[g+y++]=c/2,v[g+y++]=d/2,k++}function I(e,t){let r=y+C,n=w+x,i=Math.sqrt(r*r+n*n);r/=i,n/=i;let l=y*r+w*n;r/=l,n/=l;let o=C+b,s=x+A,u=Math.sqrt(o*o+s*s);o/=u,s/=u;let v=C*o+x*s;o/=v,s/=v,S(a,h,f,c,-n,r,d,p,m,g,-s,o,e,t),M[T++]=k-8,M[T++]=k-7,M[T++]=k-6,M[T++]=k-7,M[T++]=k-5,M[T++]=k-6,M[T++]=k-4,M[T++]=k-3,M[T++]=k-2,M[T++]=k-3,M[T++]=k-1,M[T++]=k-2}function P(e,t,r,n,i,l){if(y=C,w=x,C=b,x=A,null==y&&null==w&&(y=C,w=x),null!=d&&null!=p){b=e-d,A=t-p;let r=Math.sqrt(b*b+A*A);b/=r,A/=r}null!=y&&null!=w&&I(i,l),a=d,h=p,f=m,c=g,d=e,p=t,m=r,g=n}function E(e,t){y=C,w=x,C=b,x=A,null==y&&null==w&&(y=C,w=x),null!=y&&null!=w&&I(e,t)}for(let e of n){a=null,h=null,f=null,c=null,d=null,p=null,m=null,g=null,y=null,w=null,C=null,x=null,b=null,A=null;let{firstTime:t,lastTime:n}=e;for(let i=0;i<e.numberOfVertices;i++)P(r[4*(e.startVertex+i)],r[4*(e.startVertex+i)+1],r[4*(e.startVertex+i)+2],r[4*(e.startVertex+i)+3],t,n);E(t,n)}return{vertexData:v,indexData:M,pathData:o(t)}}(y,m),x=performance.now();return(0,n.A)("esri-2d-profiler")&&(f().info("I.1","_createFlowFieldFromData (ms)",Math.round(p-c)),f().info("I.2","_getStreamlines (ms)",Math.round(g-p)),f().info("I.3","createAnimatedLinesData (ms)",Math.round(w-g)),f().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(x-w)),f().info("I.5","createFlowMesh (ms)",Math.round(x-c)),f().info("I.6","Mesh size (bytes)",C.vertexData.buffer.byteLength+C.indexData.buffer.byteLength)),await Promise.resolve(),(0,l.Te)(a),C}},97441(e,t,r){r.d(t,{DE:()=>s,S1:()=>o,dF:()=>a}),r(44208),r(53966);var n=r(34727),i=r(87811),l=r(78659);function o(e,t,r,n,l){if(e.density<=0)return[];let{positions:o}=l,a=[],s=new i.A,f=1/Math.max(e.lineCollisionWidth,1),c=Math.round(r*f),d=Math.round(n*f),p=new Int32Array(c*d);for(let e=0;e<p.length;e++)p[e]=-1;let m={raster:p,width:c,height:d,resolutionFactor:f},g={},y=e.lineSpacing/Math.sqrt(e.density),w=Math.floor(n/y),C=Math.floor(r/y);for(let e=0;e<w;e++){let t=e*y;for(let r=0;r<C;r++){let n=r*y;g[`${r}-${e}`]={x:n,y:t,positions:[]}}}for(let{x:e,y:t}of o){let r=g[`${Math.floor(e/y)}-${Math.floor(t/y)}`];r&&r.positions.push([e,t])}let x=[];for(let e in g){let t=g[e];if(0===t.positions.length)x.push({x:t.x+y/2,y:t.y+y/2,sort:.66+.33*s.getFloat(),stage:0});else{let[e]=t.positions.splice(0,1);x.push({x:e[0],y:e[1],sort:.33*s.getFloat(),stage:1});for(let[e,r]of t.positions)x.push({x:e,y:r,sort:.33+.33*s.getFloat(),stage:2})}}x.sort((e,t)=>e.sort-t.sort);for(let{x:i,y:l,stage:o}of x){if(a.length>=e.maxNumberOfStreamlines)break;let f=e.onlyForwardTracing?u(1,e,t,i,l,[r,n],a.length,m):h(e,t,i,l,[r,n],a.length,s,m);f.length<2||a.push({stage:o,vertices:f})}return a}function a(e){for(let t=0;t<e.mask.length;t++)0===e.mask[t]&&(e.data[2*t]=0,e.data[2*t+1]=0)}function s(e,t){let r=function(e,t,r,n){if(0===n)return e;let i=Math.round(3*n),l=Array(2*i+1),o=0;for(let e=-i;e<=i;e++){let t=Math.exp(-e*e/(n*n));l[e+i]=t,o+=t}for(let e=-i;e<=i;e++)l[e+i]/=o;let a=new Float32Array(e.length);for(let n=0;n<r;n++)for(let r=0;r<t;r++){let o=0,s=0;for(let a=-i;a<=i;a++){if(r+a<0||r+a>=t)continue;let u=l[a+i];o+=u*e[2*(n*t+(r+a))],s+=u*e[2*(n*t+(r+a))+1]}a[2*(n*t+r)]=o,a[2*(n*t+r)+1]=s}let s=new Float32Array(e.length);for(let e=0;e<t;e++)for(let n=0;n<r;n++){let o=0,u=0;for(let s=-i;s<=i;s++){if(n+s<0||n+s>=r)continue;let h=l[s+i];o+=h*a[2*((n+s)*t+e)],u+=h*a[2*((n+s)*t+e)+1]}s[2*(n*t+e)]=o,s[2*(n*t+e)+1]=u}return s}(t.data,t.width,t.height,e.smoothing);return e.interpolate?(e,n)=>{let i=Math.floor(e),l=Math.floor(n);if(i<0||i>=t.width||l<0||l>=t.height)return[0,0];let o=e-i,a=n-l,s=i,u=l,h=i<t.width-1?i+1:i,f=l<t.height-1?l+1:l,c=r[2*(u*t.width+s)],d=r[2*(u*t.width+h)],p=r[2*(f*t.width+s)],m=r[2*(f*t.width+h)],g=r[2*(u*t.width+s)+1],y=r[2*(u*t.width+h)+1];return[(c*(1-a)+p*a)*(1-o)+(d*(1-a)+m*a)*o,(g*(1-a)+r[2*(f*t.width+s)+1]*a)*(1-o)+(y*(1-a)+r[2*(f*t.width+h)+1]*a)*o]}:(e,n)=>{let i=Math.round(e),l=Math.round(n);return i<0||i>=t.width||l<0||l>=t.height?[0,0]:[r[2*(l*t.width+i)],r[2*(l*t.width+i)+1]]}}function u(e,t,r,i,o,a,s,u){let h=[],{raster:f,width:c,height:d,resolutionFactor:p}=u,m=i,g=o,y=(0,l.Kp)(0),[w,C]=r(m,g);w*=t.velocityScale,C*=t.velocityScale;let x,b,A=Math.sqrt(w*w+C*C);h.push({x:m,y:g,time:y,speed:A});for(let i=0;i<t.verticesPerLine;i++){let[i,o]=r(m,g);i*=t.velocityScale,o*=t.velocityScale;let u=Math.sqrt(i*i+o*o);if(u<t.minSpeedThreshold)return h;let w=e*i/u,C=e*o/u;m+=w*t.segmentLength,g+=C*t.segmentLength,t.wrapAround&&(m=(0,n.OS)(m,a[0]));let A=e*t.segmentLength/u;if(y=(0,l.Kp)(y+A),Math.acos(w*x+C*b)>t.maxTurnAngle)return h;if(t.collisions){let e=Math.round(m*p),r=Math.round(g*p);if(t.wrapAround&&(e=(0,n.OS)(e,c)),e<0||e>c-1||r<0||r>d-1)return h;let i=f[r*c+e];if(-1!==i&&i!==s)return h;f[r*c+e]=s}h.push({x:m,y:g,time:y,speed:u}),x=w,b=C}return h}function h(e,t,r,n,i,l,o,a){let s=Math.round((.2+.6*o.getFloat())*e.verticesPerLine),h=e.verticesPerLine-s,f=u(-1,{...e,verticesPerLine:h},t,r,n,i,l,a),c=u(1,{...e,verticesPerLine:s},t,r,n,i,l,a),d=f.reverse();return d.splice(-1,1),d.concat(c)}r(5443),r(21325)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4708],{69052(e,t,n){n.d(t,{hr:()=>i});var r=n(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return s(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+o(this.range,e-t,n)}minimalMonotonic(e,t,n){return s(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);let n=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(r)?n:r}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function s(e,t,n,r,i=0,s=!1){return(r-=i)<t?r+=o(e,t-r):r>n&&(r-=o(e,r-n)),s&&r===n&&(r=t),r+i}function o(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const a=new i(0,2*Math.PI),l=(new i(-Math.PI,Math.PI),new i(0,360));n.d(t,["ie",0,l,"uC",0,a])},18370(e,t,n){n.d(t,{z:()=>i});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new r(e)}},52039(e,t,n){n.d(t,{O7:()=>f,el:()=>c});var r=n(69052),i=(n(49186),n(18370)),s=n(17676),o=(n(5443),n(39829)),a=(n(82799),n(16930)),l=(n(80754),n(21325));async function c(e,t,n){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(n=t);let r=null;for(let t of e)r??=t?.spatialReference;if(!r)return e;let i=(0,l.Vp)(r);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new o.A(t)]}let[a,c]=i.valid,f=!1;for(let t of e){if(!t)continue;if("point"===t.type){f||=t.x>=c,f||=t.x<=a;continue}let{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=c,f||=e.xmin<=a,f||=e.xmax>=c,f||=e.xmax<=a}if(!f)return e;let[{foldInto360Range:d},g]=await(0,s.qr)(Promise.all([u.getImportPromise(),h.getImportPromise()]),n),m=g.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=g.fromGeometry(e),n=g.toGeometry(d(t,m),r);return"extent"===e.type&&1===n?.rings.length?n.extent:n})}const u=(0,i.z)(()=>n.e(4144).then(()=>n(4144)).then(e=>e.load().then(()=>e))),h=(0,i.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(1550)]).then(()=>n(78125)));function f(e,t,n){let r=(0,l.Vp)(n);if(null==r)return e;let[i,s]=r.valid,o=2*s,a=0,c=0;t>s?a=Math.ceil(Math.abs(t-s)/o):t<i&&(a=-Math.ceil(Math.abs(t-i)/o)),e>s?c=Math.ceil(Math.abs(e-s)/o):e<i&&(c=-Math.ceil(Math.abs(e-i)/o));let u=e+(a-c)*o,h=u-t;return h>s?u-=o:h<i&&(u+=o),u}function d(e){let t=(0,l.Vp)(e);if(null==t)return null;let[n,i]=t.valid;return new r.hr(n,i)}const g=d(a.A.WGS84);d(a.A.WebMercator),n.d(t,["Y_",0,g])},80754(e,t,n){n.d(t,{kS:()=>c,kd:()=>l});var r=n(82799),i=n(16930),s=n(60408),o=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,o.Ed)(e))for(let n of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of n){if((0,o.aO)(e)){let[n,r]=e.c;n[0]+=t,r[0]+=t;continue}if((0,o.FG)(e)){let[n,r]=e.a;n[0]+=t,r[0]+=t;continue}if((0,o.n1)(e)){let[n,r,i]=e.b;n[0]+=t,r[0]+=t,i[0]+=t;continue}e[0]+=t}for(let n of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of n)e[0]+=t;return e}n.d(t,["j7",0,a])},31464(e,t,n){n.d(t,{Cv:()=>d,Nk:()=>f,lK:()=>m});var r=n(4576),i=n(99917),s=n(60408),o=n(21325),a=n(28735);const l=[0,0];function c(e,t){let n=(0,o.K8)(e)?a.je:a.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=n(t.x,t.y,l),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=n(t.xmin,t.ymin,l),[e.xmax,e.ymax]=n(t.xmax,t.ymax,l),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,s.Bi)(t))return{rings:u(t.rings,n),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:u(t.paths,n),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:h(t.points,n),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function u(e,t){let n=[];for(let r of e)n.push(h(r,t));return n}function h(e,t){let n=[];for(let r of e){let e=t(r[0],r[1],[0,0]);n.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return n}async function f(e,t){if(!e||!t)return;let n=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(r.Ru):[e];await(0,i.initializeProjection)(n.map(e=>({source:e,dest:t})))}function d(e,t,n,r){if(!e)return null;if(n||(n=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(n)||(0,o.aI)(t,n))return e;if((0,a.y7)(t,n)){let t=c(n,e);return t.spatialReference=n,t}return(0,i.projectMany)([e],t,n,r)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,r){if(!e?.length||!t||!n||(0,o.aI)(t,n))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:n,options:r,resolve:Promise.withResolvers()};return this._jobs.push(i),this._timer??=setTimeout(this._process,10),i.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:n,inSpatialReference:r,outSpatialReference:s,resolve:o,options:l}=e,u=n.filter(e=>null!=e);t=(0,a.y7)(r,s)&&null==l?.extendedParams?u.map(e=>c(s,e)):(0,i.projectMany)(u,r,s,l);let h=0,f=n.map(e=>null==e?null:t[h++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,n,r){return g.push(e,t,n,r)}},60986(e,t,n){n.r(t),n.d(t,{createConnection:()=>C});var r=n(56507),i=n(49186),s=n(31464),o=n(9916),a=n(32198),l=n(65529),c=n(91429);let u=class extends l.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,a.Cg)([(0,c.MZ)({readOnly:!0})],u.prototype,"connectionError",null),u=(0,a.Cg)([(0,c.$K)("esri.layers.support.StreamConnection")],u);class h extends u{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{let e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&=(clearInterval(this._pollTimer),null)}sendMessageToSocket(e){throw new i.A("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new i.A("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new i.A("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await(0,s.Nk)(this._config.sourceSpatialReference,this._outSpatialReference);try{let e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new i.A("kusto:connection","Failed to query KQL database")}}async _queryInitial(){let{trackIdField:e}=this._config,t=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${(0,o.xw)(e)}`));if(!t)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(t),table:t}}async _queryChanges(e=null){let t=e??"1970-01-01T00:00:00Z",n=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${(0,o.iD)(t)}') | order by IngestedAt asc`));if(!n)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(n),table:n}}async _executeQuery(e){let t=this._config.database,n=t.properties.queryServiceUri,{data:i}=await(0,r.A)(`${n}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:t.displayName,csl:e})});return i}_handleResult(e){this._lastIngestedAt=e.ingestedAt;let t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(let e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;let{xField:t,yField:n}=this._config.geometryEncoding,r=e.Columns.findIndex(e=>e.ColumnName===t),i=e.Columns.findIndex(e=>e.ColumnName===n);return e.Rows.map(t=>this._createFeature(e.Columns,r,i,t))}_createFeature(e,t,n,r){let{xField:i,yField:o}=this._config.geometryEncoding,a={};for(let t=0;t<e.length;t++){let n=e[t],s=r[t]??null;n.ColumnName!==o&&n.ColumnName!==i&&(a[n.ColumnName]=s)}let l=null,c=r[t],u=r[n];return null!=u&&null!=c&&(l=(0,s.Cv)({x:c,y:u},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:l}}}function f(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function d(e){let t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let n=null;for(let r of e.Rows){let e=r[t];"string"==typeof e&&(null==n||e>n)&&(n=e)}return n}var g=n(53966),m=n(84952),p=n(16930),y=n(65864),_=n(17676),w=n(62815);function b(e,t){if(null==e&&null==t)return null;let n={};return null!=t&&(n.geometry=t),null!=e&&(n.where=e),n}let S=class extends u{constructor(e,t){super({}),this._outSpatialReference=t,this._outstandingMessages=[],this.errorString=null;let{geometryType:n,sourceSpatialReference:r}=e;this._config=e,this._featureZScaler=(0,w.N)(n,r,this._outSpatialReference),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.url.path,t=1e3,n=0){try{if(this.destroyed)return;let t=(0,m.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(r){let s=t/1e3;return this._config.maxReconnectionAttempts&&n>=this._config.maxReconnectionAttempts?(g.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(g.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,r)),await(0,_.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),n+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{let t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void g.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,n)=>{let r=new WebSocket(e);r.onopen=()=>{if(r.onopen=null,this.destroyed)return r.onclose=null,void r.close();r.onclose=e=>this._onClose(e),r.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(r),t(r)},r.onclose=e=>{r.onopen=r.onclose=null,n(e)}})}async _handshake(e=1e4){let t=this._websocket;if(null==t)return;let n=Promise.withResolvers(),r=t.onmessage,s=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:o}=this._config,a=setTimeout(()=>n.reject(),e),l=()=>{clearTimeout(a),n.reject()};return t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch{}(!c||"object"!=typeof c)&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),l(),this.destroy()),c.spatialReference?.wkid!==this._outSpatialReference?.wkid&&(g.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${this._outSpatialReference.wkid}`,e.data)),l(),this.destroy()),"json"!==c.format&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),l(),this.destroy()),s&&c.filter!==s&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),o&&c.outFields!==o&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=r;for(let e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],clearTimeout(a),n.resolve()},t.send(JSON.stringify({filter:s,outFields:o,format:"json",spatialReference:{wkid:this._outSpatialReference.wkid}})),n.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){let t="Encountered an error over WebSocket connection";this._set("errorString",t),g.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&g.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,a.Cg)([(0,c.MZ)()],S.prototype,"connectionStatus",null),(0,a.Cg)([(0,c.MZ)()],S.prototype,"errorString",void 0),S=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],S);var k=n(80893),A=n(97552);const x={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends S{constructor(e,t){super({...x,...e},t),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){let e=await this._fetchServiceDefinition(this._config.url);e.timeInfo.trackIdField||g.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");let t=this._fetchWebSocketUrl(e.streamUrls,this._outSpatialReference);this._buddyServicesQuery||=this._queryBuddyServices(),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);let n=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:r}=this._config;this.destroyed||this._setFilter(n,r)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){let t={f:"json",...this._config.customParameters},n=(await(0,r.A)(e.path,{query:t,responseType:"json"})).data;return this._serviceDefinition=n,n}_fetchWebSocketUrl(e,t){let{urls:n,token:r}=e[0],i=this._inferWebSocketBaseUrl(n);return(0,m.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:r})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(let t of e)if(t.includes("wss"))return t;return g.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){let n=this._websocket;if(null==n||null==e&&null==t)return;let r=JSON.stringify({filter:this._serializeFilter(e,t)}),s=!1,o=Promise.withResolvers();return n.onmessage=e=>{let t=JSON.parse(e.data);t.filter&&(t.error&&(g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),o.reject(t.error)),this._setWebSocketJSONParseHandler(n),s=!0,o.resolve())},n.send(r),setTimeout(()=>{s||(!this.destroyed&&this._websocket===n&&g.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),o.reject())},1e4),o.promise}_serializeFilter(e,t){let n={};if(null==e&&null==t)return n;if(e?.geometry)try{let t=(0,y.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);n.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(n.where=e.where),null!=t&&(n.outFields=t.join(",")),n}_enrich(e){if(!this._relatedFeatures)return e;let t=this._serviceDefinition.relatedFeatures.joinField,n=e.attributes[t],r=this._relatedFeatures.get(n);if(!r)return g.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;let{attributes:s,geometry:o}=r;for(let t in s)e.attributes[t]=s[t];return o&&(e.geometry=o),!e.geometry&&!e.centroid&&g.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{let{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,n=this._queryRelatedFeatures(e),r=this._queryArchive(t);await n;let i=await r;if(!i)return;for(let e of i.features)this.onFeature(this._enrich(e))}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;let t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){let t=new((await Promise.all([n.e(6361),n.e(8278),n.e(7865),n.e(6554),n.e(2869),n.e(9953),n.e(3910),n.e(5566),n.e(1214),n.e(2889),n.e(1017),n.e(9789),n.e(4674),n.e(7283),n.e(8589),n.e(812),n.e(5879),n.e(9279)]).then(()=>n(18589))).default)({url:e}),{capabilities:r}=await t.load(),i=r.query.supportsMaxRecordCountFactor,s=r.query.supportsPagination,o=r.query.supportsCentroid,a=this._config.maxRecordCountFactor,l=t.capabilities.query.maxRecordCount,c=i?l*a:l,u=new A.A;if(u.outFields=this._config.outFields??["*"],u.where=this._config.definitionExpression??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=p.A.fromJSON(this._outSpatialReference),o&&(u.returnCentroid=!0),i&&(u.maxRecordCountFactor=a),s)return u.num=c,t.destroy(),this._queryPages(e,u);let h=await(0,k.eW)(e,u,this._config.sourceSpatialReference);return t.destroy(),h}async _queryPages(e,t,n=[],r=0){t.start=null==t.num?null:r*t.num;let i=await(0,k.eW)(e,t,this._config.sourceSpatialReference);return i.exceededTransferLimit&&r<(this._config.maxQueryDepth??0)?(i.features.forEach(e=>n.push(e)),this._queryPages(e,t,n,r+1)):(n.forEach(e=>i.features.push(e)),i)}_addRelatedFeatures(e){let t=new Map,n=e.features,r=this._serviceDefinition.relatedFeatures.joinField;for(let e of n){let n=e.attributes[r];t.set(n,e)}this._relatedFeatures=t}};v=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);var R=n(64108);let M=class extends u{constructor(e,t){super({}),this.connectionStatus="connected",this.errorString=null;let{geometryType:n,sourceSpatialReference:r}=e;this._featureZScaler=(0,w.N)(n,r,t)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){let n=t.toJSON();switch(e.type){case"client":return new M(e,n);case"custom":return new S(e,n);case"geoevent":return new v(e,n);case"kusto":return new h(e,n)}}(0,a.Cg)([(0,c.MZ)()],M.prototype,"connectionStatus",void 0),(0,a.Cg)([(0,c.MZ)()],M.prototype,"errorString",void 0),M=(0,a.Cg)([(0,R.$)("esri.layers.support.ClientSideConnection")],M)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4708],{69052(e,t,n){n.d(t,{hr:()=>i});var r=n(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return s(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+o(this.range,e-t,n)}minimalMonotonic(e,t,n){return s(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);let n=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(r)?n:r}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function s(e,t,n,r,i=0,s=!1){return(r-=i)<t?r+=o(e,t-r):r>n&&(r-=o(e,r-n)),s&&r===n&&(r=t),r+i}function o(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const a=new i(0,2*Math.PI),l=(new i(-Math.PI,Math.PI),new i(0,360));n.d(t,["ie",0,l,"uC",0,a])},18370(e,t,n){n.d(t,{z:()=>i});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new r(e)}},52039(e,t,n){n.d(t,{O7:()=>f,el:()=>c});var r=n(69052),i=(n(49186),n(18370)),s=n(17676),o=(n(5443),n(39829)),a=(n(82799),n(16930)),l=(n(80754),n(21325));async function c(e,t,n){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(n=t);let r=null;for(let t of e)r??=t?.spatialReference;if(!r)return e;let i=(0,l.Vp)(r);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new o.A(t)]}let[a,c]=i.valid,f=!1;for(let t of e){if(!t)continue;if("point"===t.type){f||=t.x>=c,f||=t.x<=a;continue}let{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=c,f||=e.xmin<=a,f||=e.xmax>=c,f||=e.xmax<=a}if(!f)return e;let[{foldInto360Range:d},g]=await(0,s.qr)(Promise.all([u.getImportPromise(),h.getImportPromise()]),n),m=g.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=g.fromGeometry(e),n=g.toGeometry(d(t,m),r);return"extent"===e.type&&1===n?.rings.length?n.extent:n})}const u=(0,i.z)(()=>n.e(4144).then(()=>n(4144)).then(e=>e.load().then(()=>e))),h=(0,i.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(1550)]).then(()=>n(78125)));function f(e,t,n){let r=(0,l.Vp)(n);if(null==r)return e;let[i,s]=r.valid,o=2*s,a=0,c=0;t>s?a=Math.ceil(Math.abs(t-s)/o):t<i&&(a=-Math.ceil(Math.abs(t-i)/o)),e>s?c=Math.ceil(Math.abs(e-s)/o):e<i&&(c=-Math.ceil(Math.abs(e-i)/o));let u=e+(a-c)*o,h=u-t;return h>s?u-=o:h<i&&(u+=o),u}function d(e){let t=(0,l.Vp)(e);if(null==t)return null;let[n,i]=t.valid;return new r.hr(n,i)}const g=d(a.A.WGS84);d(a.A.WebMercator),n.d(t,["Y_",0,g])},80754(e,t,n){n.d(t,{kS:()=>c,kd:()=>l});var r=n(82799),i=n(16930),s=n(60408),o=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,o.Ed)(e))for(let n of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of n){if((0,o.aO)(e)){let[n,r]=e.c;n[0]+=t,r[0]+=t;continue}if((0,o.FG)(e)){let[n,r]=e.a;n[0]+=t,r[0]+=t;continue}if((0,o.n1)(e)){let[n,r,i]=e.b;n[0]+=t,r[0]+=t,i[0]+=t;continue}e[0]+=t}for(let n of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of n)e[0]+=t;return e}n.d(t,["j7",0,a])},31464(e,t,n){n.d(t,{Cv:()=>d,Nk:()=>f,lK:()=>m});var r=n(4576),i=n(99917),s=n(60408),o=n(21325),a=n(28735);const l=[0,0];function c(e,t){let n=(0,o.K8)(e)?a.je:a.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=n(t.x,t.y,l),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=n(t.xmin,t.ymin,l),[e.xmax,e.ymax]=n(t.xmax,t.ymax,l),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,s.Bi)(t))return{rings:u(t.rings,n),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:u(t.paths,n),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:h(t.points,n),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function u(e,t){let n=[];for(let r of e)n.push(h(r,t));return n}function h(e,t){let n=[];for(let r of e){let e=t(r[0],r[1],[0,0]);n.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return n}async function f(e,t){if(!e||!t)return;let n=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(r.Ru):[e];await(0,i.initializeProjection)(n.map(e=>({source:e,dest:t})))}function d(e,t,n,r){if(!e)return null;if(n||(n=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(n)||(0,o.aI)(t,n))return e;if((0,a.y7)(t,n)){let t=c(n,e);return t.spatialReference=n,t}return(0,i.projectMany)([e],t,n,r)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,r){if(!e?.length||!t||!n||(0,o.aI)(t,n))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:n,options:r,resolve:Promise.withResolvers()};return this._jobs.push(i),this._timer??=setTimeout(this._process,10),i.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:n,inSpatialReference:r,outSpatialReference:s,resolve:o,options:l}=e,u=n.filter(e=>null!=e);t=(0,a.y7)(r,s)&&null==l?.extendedParams?u.map(e=>c(s,e)):(0,i.projectMany)(u,r,s,l);let h=0,f=n.map(e=>null==e?null:t[h++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,n,r){return g.push(e,t,n,r)}},60986(e,t,n){n.r(t),n.d(t,{createConnection:()=>C});var r=n(56507),i=n(49186),s=n(31464),o=n(9916),a=n(32198),l=n(65529),c=n(91429);let u=class extends l.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,a.Cg)([(0,c.MZ)({readOnly:!0})],u.prototype,"connectionError",null),u=(0,a.Cg)([(0,c.$K)("esri.layers.support.StreamConnection")],u);class h extends u{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{let e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&=(clearInterval(this._pollTimer),null)}sendMessageToSocket(e){throw new i.A("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new i.A("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new i.A("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await(0,s.Nk)(this._config.sourceSpatialReference,this._outSpatialReference);try{let e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new i.A("kusto:connection","Failed to query KQL database")}}async _queryInitial(){let{trackIdField:e}=this._config,t=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${(0,o.xw)(e)}`));if(!t)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(t),table:t}}async _queryChanges(e=null){let t=e??"1970-01-01T00:00:00Z",n=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${(0,o.iD)(t)}') | order by IngestedAt asc`));if(!n)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(n),table:n}}async _executeQuery(e){let t=this._config.database,n=t.properties.queryServiceUri,{data:i}=await(0,r.A)(`${n}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:t.displayName,csl:e})});return i}_handleResult(e){this._lastIngestedAt=e.ingestedAt;let t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(let e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;let{xField:t,yField:n}=this._config.geometryEncoding,r=e.Columns.findIndex(e=>e.ColumnName===t),i=e.Columns.findIndex(e=>e.ColumnName===n);return e.Rows.map(t=>this._createFeature(e.Columns,r,i,t))}_createFeature(e,t,n,r){let{xField:i,yField:o}=this._config.geometryEncoding,a={};for(let t=0;t<e.length;t++){let n=e[t],s=r[t]??null;n.ColumnName!==o&&n.ColumnName!==i&&(a[n.ColumnName]=s)}let l=null,c=r[t],u=r[n];return null!=u&&null!=c&&(l=(0,s.Cv)({x:c,y:u},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:l}}}function f(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function d(e){let t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let n=null;for(let r of e.Rows){let e=r[t];"string"==typeof e&&(null==n||e>n)&&(n=e)}return n}var g=n(53966),m=n(84952),p=n(16930),y=n(65864),_=n(17676),w=n(62815);function b(e,t){if(null==e&&null==t)return null;let n={};return null!=t&&(n.geometry=t),null!=e&&(n.where=e),n}let S=class extends u{constructor(e,t){super({}),this._outSpatialReference=t,this._outstandingMessages=[],this.errorString=null;let{geometryType:n,sourceSpatialReference:r}=e;this._config=e,this._featureZScaler=(0,w.N)(n,r,this._outSpatialReference),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.url.path,t=1e3,n=0){try{if(this.destroyed)return;let t=(0,m.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(r){let s=t/1e3;return this._config.maxReconnectionAttempts&&n>=this._config.maxReconnectionAttempts?(g.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(g.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,r)),await(0,_.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),n+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{let t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void g.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,n)=>{let r=new WebSocket(e);r.onopen=()=>{if(r.onopen=null,this.destroyed)return r.onclose=null,void r.close();r.onclose=e=>this._onClose(e),r.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(r),t(r)},r.onclose=e=>{r.onopen=r.onclose=null,n(e)}})}async _handshake(e=1e4){let t=this._websocket;if(null==t)return;let n=Promise.withResolvers(),r=t.onmessage,s=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:o}=this._config,a=setTimeout(()=>n.reject(),e),l=()=>{clearTimeout(a),n.reject()};return t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch{}(!c||"object"!=typeof c)&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),l(),this.destroy()),c.spatialReference?.wkid!==this._outSpatialReference?.wkid&&(g.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${this._outSpatialReference.wkid}`,e.data)),l(),this.destroy()),"json"!==c.format&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),l(),this.destroy()),s&&c.filter!==s&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),o&&c.outFields!==o&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=r;for(let e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],clearTimeout(a),n.resolve()},t.send(JSON.stringify({filter:s,outFields:o,format:"json",spatialReference:{wkid:this._outSpatialReference.wkid}})),n.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){let t="Encountered an error over WebSocket connection";this._set("errorString",t),g.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&g.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,a.Cg)([(0,c.MZ)()],S.prototype,"connectionStatus",null),(0,a.Cg)([(0,c.MZ)()],S.prototype,"errorString",void 0),S=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],S);var k=n(80893),A=n(97552);const x={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends S{constructor(e,t){super({...x,...e},t),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){let e=await this._fetchServiceDefinition(this._config.url);e.timeInfo.trackIdField||g.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");let t=this._fetchWebSocketUrl(e.streamUrls,this._outSpatialReference);this._buddyServicesQuery||=this._queryBuddyServices(),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);let n=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:r}=this._config;this.destroyed||this._setFilter(n,r)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){let t={f:"json",...this._config.customParameters},n=(await(0,r.A)(e.path,{query:t,responseType:"json"})).data;return this._serviceDefinition=n,n}_fetchWebSocketUrl(e,t){let{urls:n,token:r}=e[0],i=this._inferWebSocketBaseUrl(n);return(0,m.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:r})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(let t of e)if(t.includes("wss"))return t;return g.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){let n=this._websocket;if(null==n||null==e&&null==t)return;let r=JSON.stringify({filter:this._serializeFilter(e,t)}),s=!1,o=Promise.withResolvers();return n.onmessage=e=>{let t=JSON.parse(e.data);t.filter&&(t.error&&(g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),o.reject(t.error)),this._setWebSocketJSONParseHandler(n),s=!0,o.resolve())},n.send(r),setTimeout(()=>{s||(!this.destroyed&&this._websocket===n&&g.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),o.reject())},1e4),o.promise}_serializeFilter(e,t){let n={};if(null==e&&null==t)return n;if(e?.geometry)try{let t=(0,y.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);n.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(n.where=e.where),null!=t&&(n.outFields=t.join(",")),n}_enrich(e){if(!this._relatedFeatures)return e;let t=this._serviceDefinition.relatedFeatures.joinField,n=e.attributes[t],r=this._relatedFeatures.get(n);if(!r)return g.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;let{attributes:s,geometry:o}=r;for(let t in s)e.attributes[t]=s[t];return o&&(e.geometry=o),!e.geometry&&!e.centroid&&g.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{let{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,n=this._queryRelatedFeatures(e),r=this._queryArchive(t);await n;let i=await r;if(!i)return;for(let e of i.features)this.onFeature(this._enrich(e))}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;let t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){let t=new((await Promise.all([n.e(6361),n.e(8278),n.e(7865),n.e(6554),n.e(2869),n.e(9953),n.e(3910),n.e(5566),n.e(1214),n.e(2889),n.e(1017),n.e(9789),n.e(4674),n.e(5087),n.e(8589),n.e(812),n.e(5879),n.e(9279)]).then(()=>n(18589))).default)({url:e}),{capabilities:r}=await t.load(),i=r.query.supportsMaxRecordCountFactor,s=r.query.supportsPagination,o=r.query.supportsCentroid,a=this._config.maxRecordCountFactor,l=t.capabilities.query.maxRecordCount,c=i?l*a:l,u=new A.A;if(u.outFields=this._config.outFields??["*"],u.where=this._config.definitionExpression??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=p.A.fromJSON(this._outSpatialReference),o&&(u.returnCentroid=!0),i&&(u.maxRecordCountFactor=a),s)return u.num=c,t.destroy(),this._queryPages(e,u);let h=await(0,k.eW)(e,u,this._config.sourceSpatialReference);return t.destroy(),h}async _queryPages(e,t,n=[],r=0){t.start=null==t.num?null:r*t.num;let i=await(0,k.eW)(e,t,this._config.sourceSpatialReference);return i.exceededTransferLimit&&r<(this._config.maxQueryDepth??0)?(i.features.forEach(e=>n.push(e)),this._queryPages(e,t,n,r+1)):(n.forEach(e=>i.features.push(e)),i)}_addRelatedFeatures(e){let t=new Map,n=e.features,r=this._serviceDefinition.relatedFeatures.joinField;for(let e of n){let n=e.attributes[r];t.set(n,e)}this._relatedFeatures=t}};v=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);var R=n(64108);let M=class extends u{constructor(e,t){super({}),this.connectionStatus="connected",this.errorString=null;let{geometryType:n,sourceSpatialReference:r}=e;this._featureZScaler=(0,w.N)(n,r,t)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){let n=t.toJSON();switch(e.type){case"client":return new M(e,n);case"custom":return new S(e,n);case"geoevent":return new v(e,n);case"kusto":return new h(e,n)}}(0,a.Cg)([(0,c.MZ)()],M.prototype,"connectionStatus",void 0),(0,a.Cg)([(0,c.MZ)()],M.prototype,"errorString",void 0),M=(0,a.Cg)([(0,R.$)("esri.layers.support.ClientSideConnection")],M)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[506,1550,1666,1948,7992,8125],{61691(e,t,r){r.d(t,{G:()=>s});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,r){r.d(t,{S:()=>n});var s=r(61691);class n extends s.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){let e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},69397(e,t,r){r.d(t,{Qf:()=>o,Qh:()=>i,lM:()=>n});var s=r(34275);function n(e){if(!e)return 0;let t=h;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return o(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let s=0;s<t;s++)r+=a(e[s]);return r}(e);let t=h;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?i(e):h;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+f:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const h=32,u=16,f=145},87992(e,t,r){r.d(t,{JR:()=>Z,ME:()=>M,MY:()=>O,NO:()=>C,Nh:()=>P,V2:()=>w,_s:()=>I,e6:()=>F,gh:()=>E,jm:()=>V,tr:()=>X,uX:()=>p});var s=r(32198),n=r(16930),i=r(19419),a=r(60408),o=r(21325),l=r(513),h=r(50954),u=r(79567),f=r(52006),g=r(49663),m=r(46068),c=r(92722);class p{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:l,segmentFlags:h,segmentIndices:u,segmentParams:f,segmentCountArc:g,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=l,this.segmentFlags=h,this.segmentIndices=u,this.segmentParams=f,this.segmentCountArc=g,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){let{type:e,vertexCount:t,partCount:r,hasZ:s,hasM:n,segmentCountArc:i,segmentCountBezier:a}=this,o=w(e,t,r,s,n,this.hasCurves(),i,a);o.spatialReference=this.spatialReference;let{vertexXY:l,vertexZ:h,vertexM:u}=this;if(o.vertexXY.set(l.subarray(0,2*t),0),o.vertexZ?.set(h.subarray(0,t),0),o.vertexM?.set(u.subarray(0,t),0),this.isMultipart()){let{partOffsets:e,partFlags:t}=this;o.partFlags.set(t.subarray(0,r+1)),o.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){let{segmentFlags:e,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(e.subarray(0,t),0),o.segmentIndices.set(r.subarray(0,t),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,o.aI)(this.spatialReference,e.spatialReference)||this.vertexCount!==e.vertexCount||this.partCount!==e.partCount||this.hasZ!==e.hasZ||this.hasM!==e.hasM||this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;let r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new x(this):[][Symbol.iterator]()}}class x{constructor(e){this.geometry=e,this.value=new d(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(e){this.geometry=e,this.index=-1,this._readVertex=_(e),this._segments=new y(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class y{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this.value=new v(e.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class v{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=_(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;let t=this.geometry.segmentParams,r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){let e=t[r++],s=t[r++],n=t[r++],i=t[r++];return{b:[this.end,[e,s],[n,i]]}}let s=t[r++],n=t[r++],i=t[r++],a=t[r++],o=t[r++],l=t[r++];r++,r++;let h=t[r++],u=t[r++];if(!(4&s)&&1===i)return{c:[this.end,[h,u]]};let f=2&s?0:1,g=1&s?0:1;return{a:[this.end,[o,l],f,g,a,n,i]}}}function C(e,t){let r={stack:[],error:void 0,hasError:!1};try{return t??=(0,i.Ie)(),(0,s.mS)(r,new A(e,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(t,function(e){let t,{vertexCount:r,vertexXY:n,vertexZ:a,vertexM:o}=e,l=R(e);if(e.hasCurves()){let r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,new A(e,["vertexZ","vertexM"]),!1);let n=(0,i.Ie)();for(let t of e.parts){let e=t.startVertex;for(let{curve:r}of t.segments)(0,u.e)(n,e,r),e=(0,f.yP)(r)}let[a,o,h,g]=n;t={xmin:a,ymin:o,xmax:h,ymax:g,spatialReference:l}}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}else{let e,s,i,a;e=s=1/0,i=a=-1/0;for(let t=0;t<r;++t){let r=n[2*t],o=n[2*t+1];e=Math.min(e,r),i=Math.max(i,r),s=Math.min(s,o),a=Math.max(a,o)}t={xmin:e,ymin:s,xmax:i,ymax:a,spatialReference:l}}if(a){let e=1/0,r=-1/0;for(let t of a)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(o){let e=1/0,r=-1/0;for(let t of o)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}function M(e){let t,r,s;if((0,a.fT)(e)){s="point";let{x:n,y:i,z:a,m:o}=e,l=[n,i];null!=a&&l.push(a),null!=o&&l.push(o),r=[[l]],t=1}else(0,a.U9)(e)?(s="multipoint",r=[e.points],t=e.points.length):(0,a.Rg)(e)?(s="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(s="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,S(t[0],(0,f.yP)(t.at(-1)))&&--e),e),0));let n=w(s,t,s.includes("point")?0:r.length,(0,a.Pv)(e),(0,a.W0)(e),(0,f.Ed)(e)),{hasZ:i,hasM:o,vertexXY:l,vertexZ:h,vertexM:u}=n;function g(e){l[2*c]=e[0],l[2*c+1]=e[1],i&&(h[c]=e[2]),o&&(u[c]=e[m]),++c}n.spatialReference=e.spatialReference??void 0;let m=n.hasZ?3:2,c=0;if(!n.isMultipart()){if(!i&&!o){for(let[e,t]of r[0])l[2*c]=e,l[2*c+1]=t,++c;return n}for(let e of r[0])g(e);return n}let p="polygon"===s,{partOffsets:x}=n,d=0;if(!(0,f.Ed)(e)){for(let e of r){if(x[d++]=c,0===e.length)continue;let t=e.length;if(p&&S(e[0],e.at(-1))&&--t,i||o)for(let r=0;r<t;++r)g(e[r]);else for(let r=0;r<t;++r){let[t,s]=e[r];l[2*c]=t,l[2*c+1]=s,++c}}return x[d]=c,n}function y(e){let t=v+e;if(t<=(n.segmentParams?.length??0))return;let r=t*G;r=20*Math.ceil(r/20);let s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let v=0;for(let e of r){if(n.partOffsets[d++]=c,0===e.length)continue;let t=e[0],r=t;for(let t=1;t<e.length;++t){let s=e[t];g(r);let i=c-1;(0,f.wY)(s)?(y(10),++n.segmentCountArc,v=I(r,s,n,i,v),r=s.a[0]):(0,f.DA)(s)?(y(10),++n.segmentCountArc,v=Y(r,s,n,i,v),r=s.a[0]):(0,f.aO)(s)?(y(10),++n.segmentCountArc,v=F(r,s,n,i,v),r=s.c[0]):(0,f.n1)(s)?(y(4),++n.segmentCountBezier,v=X(0,s,n,i,v),r=s.b[0]):r=s}p&&S(t,r)||g(r)}return n.partOffsets[d]=c,n}function E(e){let t=_(e),{vertexCount:r,partCount:s,hasZ:n,hasM:i}=e,a=R(e),o=0;if(!e.isMultipart()){if("point"===e.type){let[t,r]=e.vertexXY;return{x:t,y:r,z:e.vertexZ?.[0],m:e.vertexM?.[0],spatialReference:a}}let s=[];for(;o<r;)s.push(t(o++));return{points:s,spatialReference:a,hasZ:n,hasM:i}}if(!e.hasCurves()){let r=[];for(let n=0;n<s;++n){let s=!!(1&e.partFlags[n]),i=e.partOffsets[n+1],a=[];for(;o<i;)a.push(t(o++));s&&a.length>0&&a.push([...a[0]]),r.push(a)}return"polygon"===e.type?{rings:r,hasZ:n,hasM:i,spatialReference:a}:{paths:r,hasZ:n,hasM:i,spatialReference:a}}let l=[];for(let{segments:t,startVertex:r}of e.parts){let e=[r];for(let{curve:r}of t)e.push(r);l.push(e)}return"polygon"===e.type?{rings:[],curveRings:l,hasZ:n,hasM:i,spatialReference:a}:{paths:[],curvePaths:l,hasZ:n,hasM:i,spatialReference:a}}function P(e,{lengths:t,coords:r,hasZ:s,hasM:n},i){let a=e.includes("point")?0:t.length,o="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(o?a:0);s??=!1,n??=!1;let h=w(e,l,a,s,n,!1,0,0);if(h.spatialReference=i??void 0,!h.isMultipart()){for(let e=0,t=0;e<l;++e)h.vertexXY[2*e]=r[t++],h.vertexXY[2*e+1]=r[t++],s&&(h.vertexZ[e]=r[t++]),n&&(h.vertexM[e]=r[t++]);return h}let u=2+Number(s)+Number(n),f=0,g=0;h.partOffsets[0]=0;for(let e of t){let t=h.partOffsets[g],i=t+e-Number(o);h.partOffsets[++g]=i;for(let e=t;e<i;++e)h.vertexXY[2*e]=r[f++],h.vertexXY[2*e+1]=r[f++],s&&(h.vertexZ[e]=r[f++]),n&&(h.vertexM[e]=r[f++]);o&&(f+=u)}return h}function Z({type:e,vertexCount:t,vertexXY:r,vertexZ:s,vertexM:n,partCount:i,partOffsets:a,partFlags:o,hasZ:l,hasM:h}){let u=new c.A([],[],l,h);i=Math.max(i,1);let f=0;for(let e=0;e<i;++e){let i=a?.[e+1]??t,g=u.coords.length;for(let e=f;e<i;++e)u.coords.push(r[2*e],r[2*e+1]),l&&u.coords.push(s[e]),h&&u.coords.push(n[e]);if(o&&1&o[e]){let e=f;u.coords.push(r[2*e],r[2*e+1]),l&&u.coords.push(s[e]),h&&u.coords.push(n[e])}u.lengths.push((u.coords.length-g)/u.stride),f=i}return"point"===e&&(u.lengths.length=0),u}function V(...e){let t=new Set;for(let r of e){if(!r)continue;let e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(let r of e){let e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function O(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;let t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let s=e.getLatestID();(s<=0||s===r)&&(s=void 0);let n=e.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:t};let i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:t};let a=e.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:t,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}(e.getSpatialReference()),e=e.getGeometry()),new p({...e.toFlatGeometry(),spatialReference:t})}class A{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(let r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof n.A?e.toJSON():e}function _({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?s=>[e[2*s],e[2*s+1],t[s],r[s]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function S(e,t){return e.every((e,r)=>e===t[r])}function w(e,t,r,s,n,i,a,o){a??=0,o??=0;let l=new p({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o}),h=2*Float64Array.BYTES_PER_ELEMENT*t;s&&(h+=Float64Array.BYTES_PER_ELEMENT*t),n&&(h+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(h+=(r+1)*Int32Array.BYTES_PER_ELEMENT,h+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(h+=t*Int8Array.BYTES_PER_ELEMENT,h+=t*Int32Array.BYTES_PER_ELEMENT,h+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let u=new ArrayBuffer(h),f=0;return l.vertexXY=new Float64Array(u,f,2*t),f+=l.vertexXY.byteLength,s&&(l.vertexZ=new Float64Array(u,f,t),f+=l.vertexZ.byteLength),n&&(l.vertexM=new Float64Array(u,f,t),f+=l.vertexM.byteLength),i&&(l.segmentParams=new Float64Array(u,f,l.segmentParamCount),f+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(u,f,t),l.segmentIndices.fill(N),f+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(u,f,r+1),f+=l.partOffsets.byteLength,l.partFlags=new Int8Array(u,f,r+1),f+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,r).fill(1)),i&&(l.segmentFlags=new Int8Array(u,f,t),l.segmentFlags.fill(1),f+=l.segmentFlags.byteLength),l}function I(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;let[o,[l,h],u,f,g,c,p]=t.a,x=4;f||(x|=1),u||(x|=2);let d=(0,m.SW)(e,t),[y,v]=(0,m.Uk)(d,.5);return n[a++]=x,n[a++]=c,n[a++]=p,n[a++]=g,n[a++]=l,n[a++]=h,n[a++]=d.u2-d.u1,n[a++]=d.u1,n[a++]=y,n[a++]=v,a}function Y(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;let o=(0,g.io)(e,t);return b(o,4,...(0,l.mq)(o,.5),n,a)}function F(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){return r[i]=4,s[i]=a,b((0,h.pM)(e,t),0,...t.c[1],n,a)}function b(e,t,r,s,n,i){let{cx:a,cy:o,thetaStart:l,thetaEnd:h,radius:u}=e;return l>h||(t|=1),Math.abs(h-l)<=Math.PI||(t|=2),n[i++]=t,n[i++]=u,n[i++]=1,n[i++]=0,n[i++]=a,n[i++]=o,n[i++]=h-l,n[i++]=l,n[i++]=r,n[i++]=s,i}function X(e,{b:[t,[r,s],[n,i]]},{segmentFlags:a,segmentIndices:o,segmentParams:l},h,u){return a[h]=2,o[h]=u,l[u++]=r,l[u++]=s,l[u++]=n,l[u++]=i,u}const G=1.61803,N=-1},78125(e,t,r){r.r(t),r.d(t,{fromExtent:()=>x,fromGeometry:()=>p,fromMultipoint:()=>d,fromPoint:()=>y,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>M,fromSpatialReference:()=>E,getSpatialReference:()=>c,toExtent:()=>Z,toGeometry:()=>P,toMultipoint:()=>V,toPoint:()=>O,toPolygon:()=>A,toPolyline:()=>R});var s=r(83661),n=r(55537),i=r(95213),a=r(88885),o=r(5443),l=r(48526),h=r(86738),u=r(39829),f=r(82799),g=(r(90293),r(83299));const m="_gxVersion";function c(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function p(e){switch(e.type){case"point":return y(e);case"multipoint":return d(e);case"polyline":return C(e);case"polygon":return v(e);case"extent":return x(e);default:throw Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(m)){let t=new i.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(m,t)}return e.getCacheValue(m)}function d(e){if(!e.getCacheValue(m)){let t=new a.M,r=new i.P,s=e.points,n=e.hasM,o=e.hasZ,l=o?3:2;for(let e=0,i=s.length;e<i;e++){let i=s[e];r.setXYCoords(i[0],i[1]),o&&r.setZ(i[2]??0),n&&r.setM(i[l]??NaN),t.add(r)}e.setCacheValue(m,t)}return e.getCacheValue(m)}function y(e){if(!e.getCacheValue(m)){let t=new i.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(m,t)}return e.getCacheValue(m)}function v(e){if(!e.getCacheValue(m)){let{curveRings:t,hasM:r,hasZ:s,rings:n}=e,i=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:r,hasZ:s,rings:n});e.setCacheValue(m,i)}return e.getCacheValue(m)}function C(e){if(!e.getCacheValue(m)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,i=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(m,i)}return e.getCacheValue(m)}function M(e){if(!e.getCacheValue(m)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,i=(0,g.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(m,i)}return e.getCacheValue(m)}function E(e){return e.cache?(e.cache[m]??=(0,g.fromSpatialReference)(e),e.cache[m]):(0,g.fromSpatialReference)(e)}function P(e,t){if(e)switch(e.getGeometryType()){case n.G.enumPoint:return O(e,t);case n.G.enumEnvelope:return Z(e,t);case n.G.enumMultiPoint:return V(e,t);case n.G.enumPolyline:return R(e,t);case n.G.enumPolygon:return A(e,t)}return null}function Z(e,t){if(e.isEmpty())return null;let r=new o.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),s=e.getDescription();if(s.hasM()){let t=e.queryInterval(2,0);r.mmin=t.vmin,r.mmax=t.vmax}if(s.hasZ()){let t=e.queryInterval(1,0);r.zmin=t.vmin,r.zmax=t.vmax}return r.setCacheValue(m,e),r}function V(e,t){if(e.isEmpty())return null;let r=e.getDescription(),s=r.hasM(),n=r.hasZ(),a=[],o=new i.P;for(let t=0,r=e.getPointCount();t<r;t++){e.getPointByVal(t,o);let r=[o.getX(),o.getY()];n&&r.push(o.getZ()),s&&r.push(o.getM()),a.push(r)}let h=new l.A({hasM:s,hasZ:n,points:a,spatialReference:t});return h.setCacheValue(m,e),h}function O(e,t){if(e instanceof s.P)return new h.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;let r=new h.A({x:e.getX(),y:e.getY(),spatialReference:t}),n=e.getDescription();return n.hasM()&&(r.m=e.getM()),n.hasZ()&&(r.z=e.getZ()),r.setCacheValue(m,e),r}function A(e,t){if(e.isEmpty())return null;let r=u.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}function R(e,t){if(e.isEmpty())return null;let r=f.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}},92722(e,t,r){r.d(t,{A:()=>n});var s=r(69397);class n{constructor(e=[],t=[],r=!1,s=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:s}){return new n(e,t,r||!1,s||!1)}static fromRect([e,t,r,s]){let i=r-e,a=s-t;return new n([5],[e,t,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:s}=this,n=this.coords[s*t],i=this.coords[s*t+1];for(let a=1;a<r;a+=1){let r=s*(t+a),o=this.coords[r],l=this.coords[r+1];e+=-.5*(o-n)*(l+i),n=o,i=l}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let s of this.lengths){for(let n=0;n<s;n++){let s=r*(t+n);e(this.coords[s],this.coords[s+1])}t+=s}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,s=0,{stride:n}=this;for(let e of r){for(let r=1;r<e;r++){let e=n*(s+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}s+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:s}=this,i=this.coords.slice(0,s*r);return e?(e.set(i),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(i),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,s=0;t<r.length;t+=e)r[s++]=this.coords[t],r[s++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}}}]);
|