@arcgis/core 4.28.0-next.20230713 → 4.28.0-next.20230715
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/Basemap.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{0b28b5eec6dc67be8ce9.js → 0121bfc81b794745e024.js} +1 -1
- package/assets/esri/core/workers/chunks/067d3d45caeaaba18d81.js +1 -0
- package/assets/esri/core/workers/chunks/080a13dc08a8db498ffa.js +1 -0
- package/assets/esri/core/workers/chunks/0dccbc6c2559fdc0c2ad.js +1 -0
- package/assets/esri/core/workers/chunks/{c912466351e37db68b6c.js → 14ab33573bb02d6c6b1a.js} +1 -1
- package/assets/esri/core/workers/chunks/{c4b066760e9aa85b7607.js → 1b948f8429d8f9b1bbfb.js} +1 -1
- package/assets/esri/core/workers/chunks/204ed2ebd2d3da659791.js +1 -0
- package/assets/esri/core/workers/chunks/{5d5d4a4fdf5ca8d7837f.js → 239d4176ff2d5142b7f1.js} +1 -1
- package/assets/esri/core/workers/chunks/23bb98aaa20b180ee680.js +1 -0
- package/assets/esri/core/workers/chunks/27cf3ef9566d5226b0df.js +1 -0
- package/assets/esri/core/workers/chunks/{1c86f80d73dee1a4d9b7.js → 2f1695e4807a534e1743.js} +1 -1
- package/assets/esri/core/workers/chunks/{60b422009f58d7bbb8c4.js → 3164b862a6b3f654fade.js} +1 -1
- package/assets/esri/core/workers/chunks/35f60625ada14eb801fd.js +1 -0
- package/assets/esri/core/workers/chunks/{4e4e62462deec25e82ce.js → 3a04bf1cdce263fe2191.js} +1 -1
- package/assets/esri/core/workers/chunks/41011207b6cc5eb6232f.js +1 -0
- package/assets/esri/core/workers/chunks/{8d50449c029c73136204.js → 432e3558db53574d21b4.js} +1 -1
- package/assets/esri/core/workers/chunks/4767f69b81d36dde9550.js +1 -0
- package/assets/esri/core/workers/chunks/{08ee2bd914867fd2cbd5.js → 490629c6f9fee501c9cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{044b15794b6403792f04.js → 4f079d0e69189c1d8bd9.js} +1 -1
- package/assets/esri/core/workers/chunks/4f1f4cc82fea0d1f79ec.js +1 -0
- package/assets/esri/core/workers/chunks/503a393327df755d8843.js +1 -0
- package/assets/esri/core/workers/chunks/50e05f479c7d414fc06b.js +1 -0
- package/assets/esri/core/workers/chunks/{3835a76c017431f19422.js → 51da3c5c50b153ce6bc7.js} +1 -1
- package/assets/esri/core/workers/chunks/54b97ca5f2164b941f5b.js +1 -0
- package/assets/esri/core/workers/chunks/5a3fb63dab89cf3418f7.js +1 -0
- package/assets/esri/core/workers/chunks/5ceaf1f05b219034a10c.js +1 -0
- package/assets/esri/core/workers/chunks/70aabffaaa0a1da8e609.js +1 -0
- package/assets/esri/core/workers/chunks/78cb95d1594a0cb0dd7a.js +1 -0
- package/assets/esri/core/workers/chunks/7f391ae5e0ea7812baca.js +1 -0
- package/assets/esri/core/workers/chunks/{1d2b8b937bbda91a6549.js → 82dfbc175b52c7a10475.js} +1 -1
- package/assets/esri/core/workers/chunks/{036cd65514eab1749363.js → 8467d05626a3a72462c9.js} +1 -1
- package/assets/esri/core/workers/chunks/9038b1317f1252e31f09.js +1 -0
- package/assets/esri/core/workers/chunks/929ddc4d9975ed893767.js +1 -0
- package/assets/esri/core/workers/chunks/{e86dcc239c6a57000afc.js → 94633cc9cfb089ef010e.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f5f398374ff77fb17f0.js → 975eef6d20c17a0ed07b.js} +1 -1
- package/assets/esri/core/workers/chunks/{8913bddc76b82cb24664.js → 98cf4e744e8f2c3fc536.js} +1 -1
- package/assets/esri/core/workers/chunks/a00414550fa21c5662f3.js +1 -0
- package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +1 -0
- package/assets/esri/core/workers/chunks/{4e2029c8cc8a5afe5759.js → a5348f117dacdcae99ee.js} +1 -1
- package/assets/esri/core/workers/chunks/b0f0a3178d88fa600a11.js +1 -0
- package/assets/esri/core/workers/chunks/b4446ce010bc4a5aa917.js +1 -0
- package/assets/esri/core/workers/chunks/b8a45b28a915a423d09d.js +1 -0
- package/assets/esri/core/workers/chunks/{fb97d39b25b0b009d2f0.js → bd9e6f38c9ec4195322a.js} +1 -1
- package/assets/esri/core/workers/chunks/{30deb5a8e9a82186991d.js → c15c4bd52d4472ed50bc.js} +1 -1
- package/assets/esri/core/workers/chunks/{55109f141c9f120833f6.js → c3d773c93efb41088c54.js} +1 -1
- package/assets/esri/core/workers/chunks/c518410b1214ffc58017.js +1 -0
- package/assets/esri/core/workers/chunks/d55faafe2ac914a3ebd1.js +1 -0
- package/assets/esri/core/workers/chunks/d5fd4780d57173f3e303.js +1 -0
- package/assets/esri/core/workers/chunks/da01e520a1ae0048e73e.js +1 -0
- package/assets/esri/core/workers/chunks/dd7603c9e5fd178c88f7.js +1 -0
- package/assets/esri/core/workers/chunks/ddcf58937924ab5a3d76.js +1 -0
- package/assets/esri/core/workers/chunks/e03a0f52d438f53a3057.js +1 -0
- package/assets/esri/core/workers/chunks/e433440fecd0114cb23d.js +1 -0
- package/assets/esri/core/workers/chunks/ea1560129e426980a4e2.js +1 -0
- package/assets/esri/core/workers/chunks/f73e2143f8d053aef092.js +1 -0
- package/assets/esri/core/workers/chunks/{0a0af540f4fe64c3d292.js → fa14238f1c308a74f843.js} +1 -1
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +3 -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/chunks/RibbonLine.glsl.js +57 -72
- package/chunks/ar.js +1 -1
- package/chunks/ar2.js +1 -1
- package/chunks/bg_BG.js +1 -1
- package/chunks/bg_BG2.js +1 -1
- package/chunks/bs_BA.js +1 -1
- package/chunks/bs_BA2.js +1 -1
- package/chunks/ca_ES.js +1 -1
- package/chunks/ca_ES2.js +1 -1
- package/chunks/chartUtilsAm5.js +1 -1
- package/chunks/cs_CZ.js +1 -1
- package/chunks/cs_CZ2.js +1 -1
- package/chunks/da_DK.js +1 -1
- package/chunks/da_DK2.js +1 -1
- package/chunks/de_CH.js +1 -1
- package/chunks/de_CH2.js +1 -1
- package/chunks/de_DE.js +1 -1
- package/chunks/de_DE2.js +1 -1
- package/chunks/el_GR.js +1 -1
- package/chunks/el_GR2.js +1 -1
- package/chunks/en_CA.js +1 -1
- package/chunks/en_CA2.js +1 -1
- package/chunks/en_US.js +1 -1
- package/chunks/en_US2.js +1 -1
- package/chunks/es_ES.js +1 -1
- package/chunks/es_ES2.js +1 -1
- package/chunks/et_EE.js +1 -1
- package/chunks/et_EE2.js +1 -1
- package/chunks/fi_FI.js +1 -1
- package/chunks/fi_FI2.js +1 -1
- package/chunks/fr_FR.js +1 -1
- package/chunks/fr_FR2.js +1 -1
- package/chunks/he_IL.js +1 -1
- package/chunks/he_IL2.js +1 -1
- package/chunks/hr_HR.js +1 -1
- package/chunks/hr_HR2.js +1 -1
- package/chunks/hu_HU.js +1 -1
- package/chunks/hu_HU2.js +1 -1
- package/chunks/id_ID.js +1 -1
- package/chunks/id_ID2.js +1 -1
- package/chunks/it_IT.js +1 -1
- package/chunks/it_IT2.js +1 -1
- package/chunks/ja_JP.js +1 -1
- package/chunks/ja_JP2.js +1 -1
- package/chunks/ko_KR.js +1 -1
- package/chunks/ko_KR2.js +1 -1
- package/chunks/lt_LT.js +1 -1
- package/chunks/lt_LT2.js +1 -1
- package/chunks/lv_LV.js +1 -1
- package/chunks/lv_LV2.js +1 -1
- package/chunks/nb_NO.js +1 -1
- package/chunks/nb_NO2.js +1 -1
- package/chunks/nl_NL.js +1 -1
- package/chunks/nl_NL2.js +1 -1
- package/chunks/pl_PL.js +1 -1
- package/chunks/pl_PL2.js +1 -1
- package/chunks/pt_BR.js +1 -1
- package/chunks/pt_BR2.js +1 -1
- package/chunks/pt_PT.js +1 -1
- package/chunks/pt_PT2.js +1 -1
- package/chunks/ro_RO.js +1 -1
- package/chunks/ro_RO2.js +1 -1
- package/chunks/ru_RU.js +1 -1
- package/chunks/ru_RU2.js +1 -1
- package/chunks/sk_SK.js +1 -1
- package/chunks/sk_SK2.js +1 -1
- package/chunks/sl_SL.js +1 -1
- package/chunks/sl_SL2.js +1 -1
- package/chunks/sr_RS.js +1 -1
- package/chunks/sr_RS2.js +1 -1
- package/chunks/sv_SE.js +1 -1
- package/chunks/sv_SE2.js +1 -1
- package/chunks/th_TH.js +1 -1
- package/chunks/th_TH2.js +1 -1
- package/chunks/tr_TR.js +1 -1
- package/chunks/tr_TR2.js +1 -1
- package/chunks/uk_UA.js +1 -1
- package/chunks/uk_UA2.js +1 -1
- package/chunks/vi_VN.js +1 -1
- package/chunks/vi_VN2.js +1 -1
- package/chunks/zh_Hans.js +1 -1
- package/chunks/zh_Hans2.js +1 -1
- package/chunks/zh_Hant.js +1 -1
- package/chunks/zh_Hant2.js +1 -1
- package/config.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/image/apng.js +1 -1
- package/core/image/gif.js +1 -1
- package/core/urlUtils.js +1 -1
- package/core/workers/WorkerOwner.js +1 -1
- package/core/workers/staticWorkerMessages.js +5 -0
- package/geometry/projection.js +1 -1
- package/interfaces.d.ts +42 -2
- package/kernel.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +1 -1
- package/portal/Portal.js +1 -1
- package/support/BasemapStyle.js +5 -0
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/views/2d/GoToManager.js +5 -0
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
- package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/support/engineHelpers.js +1 -1
- package/views/2d/support/screenshotUtils.js +5 -0
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionVisualization.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/settings.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightToolConfiguration.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
- package/views/3d/analysis/Slice/settings.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/lineGraphicVisualElementUtils.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/originGraphicVisualElementUtils.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/settings.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/TileTexture.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +12 -13
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
- package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/MapView.js +1 -1
- package/views/Theme.js +5 -0
- package/views/View.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/support/colorUtils.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/Feature/FeatureMedia/chartCommon.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/support/chartUtils.js +1 -1
- package/widgets/support/chartUtilsAm5.js +1 -1
- package/assets/esri/core/workers/chunks/05f3374114bce72d3560.js +0 -1
- package/assets/esri/core/workers/chunks/10028df973ef7f9531c8.js +0 -1
- package/assets/esri/core/workers/chunks/1cbb03eec9dc23ef043b.js +0 -1
- package/assets/esri/core/workers/chunks/289061552a2a64bebd76.js +0 -1
- package/assets/esri/core/workers/chunks/308eeeaec591b4eea1de.js +0 -1
- package/assets/esri/core/workers/chunks/3155c750fc5a4e04a785.js +0 -1
- package/assets/esri/core/workers/chunks/346f67995b327bca8ee0.js +0 -1
- package/assets/esri/core/workers/chunks/3736e17dd6461f74cfaf.js +0 -1
- package/assets/esri/core/workers/chunks/37e60f9ca86f9d4bf4ea.js +0 -1
- package/assets/esri/core/workers/chunks/3a0b45ecc48e23a3a5d5.js +0 -1
- package/assets/esri/core/workers/chunks/417377c8e76944f428a7.js +0 -1
- package/assets/esri/core/workers/chunks/498dca81073e1fb477b9.js +0 -1
- package/assets/esri/core/workers/chunks/536962375ce4f1394481.js +0 -1
- package/assets/esri/core/workers/chunks/64bb4093c019a02d5309.js +0 -1
- package/assets/esri/core/workers/chunks/69de4733173ee2dee6e1.js +0 -1
- package/assets/esri/core/workers/chunks/6dcffe6683a798a42c78.js +0 -1
- package/assets/esri/core/workers/chunks/7a898d167029ee11a680.js +0 -1
- package/assets/esri/core/workers/chunks/7a973d70e6bc42d804ee.js +0 -1
- package/assets/esri/core/workers/chunks/7d9d2629af373c84624f.js +0 -1
- package/assets/esri/core/workers/chunks/885cb0da78e6853b23a4.js +0 -1
- package/assets/esri/core/workers/chunks/8e28862296972e9e6f82.js +0 -1
- package/assets/esri/core/workers/chunks/928431e1c449c6054547.js +0 -1
- package/assets/esri/core/workers/chunks/afdf30439d71a7cc19ae.js +0 -1
- package/assets/esri/core/workers/chunks/b1fa1571fd98d3b8dffe.js +0 -1
- package/assets/esri/core/workers/chunks/b20167d9163d0ee74b65.js +0 -1
- package/assets/esri/core/workers/chunks/b2a0e3e1dfccda7ed12e.js +0 -1
- package/assets/esri/core/workers/chunks/c09db831248054600e16.js +0 -1
- package/assets/esri/core/workers/chunks/dcccc9760998271254b5.js +0 -1
- package/assets/esri/core/workers/chunks/ddea45acae89759e57fa.js +0 -1
- package/assets/esri/core/workers/chunks/e039108eb3a592f6d8e3.js +0 -1
- package/assets/esri/core/workers/chunks/e70314ac10cc1f8f9f86.js +0 -1
- package/assets/esri/core/workers/chunks/f2d399b394a1a9156214.js +0 -1
- package/assets/esri/core/workers/chunks/f74d4e1eecec06f84ee2.js +0 -1
- package/assets/esri/core/workers/chunks/fb7eff7f76386f81d57b.js +0 -1
- package/assets/esri/core/workers/chunks/fe277d33b5b8a11c76df.js +0 -1
- package/core/analysisThemeUtils.js +0 -5
- package/views/support/createScreenshotPlan.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7096,5732,9880],{99880:(t,e,s)=>{s.d(e,{V:()=>l});var i=s(68773),n=(s(3172),s(20102)),r=s(92604),o=s(17452);const a=r.Z.getLogger("esri.assets");function l(t){if(!i.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(i.default.assetsPath,t)}},5732:(t,e,s)=>{s.d(e,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},52138:(t,e,s)=>{s.d(e,{A:()=>p,a:()=>l,d:()=>m,e:()=>d,f:()=>f,g:()=>y,h:()=>x,i:()=>o,j:()=>v,k:()=>u,m:()=>h,s:()=>r,t:()=>a,w:()=>c,y:()=>S,z:()=>M});var i=s(65617),n=s(46851);function r(t,e,s,i,n,r,o,a,l,h,c,u,d,f,m,p,_){return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t[9]=c,t[10]=u,t[11]=d,t[12]=f,t[13]=m,t[14]=p,t[15]=_,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e){if(t===e){const s=e[1],i=e[2],n=e[3],r=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=s,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[11]=e[14],t[12]=n,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15],y=s*a-i*o,b=s*l-n*o,x=s*h-r*o,v=i*l-n*a,M=i*h-r*a,S=n*h-r*l,w=c*p-u*m,I=c*_-d*m,E=c*g-f*m,B=u*_-d*p,A=u*g-f*p,C=d*g-f*_;let z=y*C-b*A+x*B+v*E-M*I+S*w;return z?(z=1/z,t[0]=(a*C-l*A+h*B)*z,t[1]=(n*A-i*C-r*B)*z,t[2]=(p*S-_*M+g*v)*z,t[3]=(d*M-u*S-f*v)*z,t[4]=(l*E-o*C-h*I)*z,t[5]=(s*C-n*E+r*I)*z,t[6]=(_*x-m*S-g*b)*z,t[7]=(c*S-d*x+f*b)*z,t[8]=(o*A-a*E+h*w)*z,t[9]=(i*E-s*A-r*w)*z,t[10]=(m*M-p*x+g*y)*z,t[11]=(u*x-c*M-f*y)*z,t[12]=(a*I-o*B-l*w)*z,t[13]=(s*B-i*I+n*w)*z,t[14]=(p*b-m*v-_*y)*z,t[15]=(c*v-u*b+d*y)*z,t):null}function h(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=e[9],f=e[10],m=e[11],p=e[12],_=e[13],g=e[14],y=e[15];let b=s[0],x=s[1],v=s[2],M=s[3];return t[0]=b*i+x*a+v*u+M*p,t[1]=b*n+x*l+v*d+M*_,t[2]=b*r+x*h+v*f+M*g,t[3]=b*o+x*c+v*m+M*y,b=s[4],x=s[5],v=s[6],M=s[7],t[4]=b*i+x*a+v*u+M*p,t[5]=b*n+x*l+v*d+M*_,t[6]=b*r+x*h+v*f+M*g,t[7]=b*o+x*c+v*m+M*y,b=s[8],x=s[9],v=s[10],M=s[11],t[8]=b*i+x*a+v*u+M*p,t[9]=b*n+x*l+v*d+M*_,t[10]=b*r+x*h+v*f+M*g,t[11]=b*o+x*c+v*m+M*y,b=s[12],x=s[13],v=s[14],M=s[15],t[12]=b*i+x*a+v*u+M*p,t[13]=b*n+x*l+v*d+M*_,t[14]=b*r+x*h+v*f+M*g,t[15]=b*o+x*c+v*m+M*y,t}function c(t,e,s){const i=s[0],n=s[1],r=s[2];if(e===t)t[12]=e[0]*i+e[4]*n+e[8]*r+e[12],t[13]=e[1]*i+e[5]*n+e[9]*r+e[13],t[14]=e[2]*i+e[6]*n+e[10]*r+e[14],t[15]=e[3]*i+e[7]*n+e[11]*r+e[15];else{const s=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7],f=e[8],m=e[9],p=e[10],_=e[11];t[0]=s,t[1]=o,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=p,t[11]=_,t[12]=s*i+h*n+f*r+e[12],t[13]=o*i+c*n+m*r+e[13],t[14]=a*i+u*n+p*r+e[14],t[15]=l*i+d*n+_*r+e[15]}return t}function u(t,e,s){const i=s[0],n=s[1],r=s[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,s,i){let r,o,a,l,h,c,u,d,f,m,p,_,g,y,b,x,v,M,S,w,I,E,B,A,C=i[0],z=i[1],F=i[2],O=Math.sqrt(C*C+z*z+F*F);return O<(0,n.g)()?null:(O=1/O,C*=O,z*=O,F*=O,r=Math.sin(s),o=Math.cos(s),a=1-o,l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],f=e[5],m=e[6],p=e[7],_=e[8],g=e[9],y=e[10],b=e[11],x=C*C*a+o,v=z*C*a+F*r,M=F*C*a-z*r,S=C*z*a-F*r,w=z*z*a+o,I=F*z*a+C*r,E=C*F*a+z*r,B=z*F*a-C*r,A=F*F*a+o,t[0]=l*x+d*v+_*M,t[1]=h*x+f*v+g*M,t[2]=c*x+m*v+y*M,t[3]=u*x+p*v+b*M,t[4]=l*S+d*w+_*I,t[5]=h*S+f*w+g*I,t[6]=c*S+m*w+y*I,t[7]=u*S+p*w+b*I,t[8]=l*E+d*B+_*A,t[9]=h*E+f*B+g*A,t[10]=c*E+m*B+y*A,t[11]=u*E+p*B+b*A,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function m(t,e,s){if(0===e)return o(t);let i,r,a,l=s[0],h=s[1],c=s[2],u=Math.sqrt(l*l+h*h+c*c);return u<(0,n.g)()?null:(u=1/u,l*=u,h*=u,c*=u,i=Math.sin(e),r=Math.cos(e),a=1-r,t[0]=l*l*a+r,t[1]=h*l*a+c*i,t[2]=c*l*a-h*i,t[3]=0,t[4]=l*h*a-c*i,t[5]=h*h*a+r,t[6]=c*h*a+l*i,t[7]=0,t[8]=l*c*a+h*i,t[9]=h*c*a-l*i,t[10]=c*c*a+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function p(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=s,t[7]=0,t[8]=0,t[9]=-s,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=i+i,l=n+n,h=r+r,c=i*a,u=i*l,d=i*h,f=n*l,m=n*h,p=r*h,_=o*a,g=o*l,y=o*h;return t[0]=1-(f+p),t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-(c+p),t[6]=m+_,t[7]=0,t[8]=d+g,t[9]=m-_,t[10]=1-(c+f),t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}const g=(0,i.c)();function y(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=e[3],l=n+n,h=r+r,c=o+o,u=n*l,d=n*h,f=n*c,m=r*h,p=r*c,_=o*c,g=a*l,y=a*h,b=a*c,x=i[0],v=i[1],M=i[2];return t[0]=(1-(m+_))*x,t[1]=(d+b)*x,t[2]=(f-y)*x,t[3]=0,t[4]=(d-b)*v,t[5]=(1-(u+_))*v,t[6]=(p+g)*v,t[7]=0,t[8]=(f+y)*M,t[9]=(p-g)*M,t[10]=(1-(u+m))*M,t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}function b(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t[2]=e[2]-s[2],t[3]=e[3]-s[3],t[4]=e[4]-s[4],t[5]=e[5]-s[5],t[6]=e[6]-s[6],t[7]=e[7]-s[7],t[8]=e[8]-s[8],t[9]=e[9]-s[9],t[10]=e[10]-s[10],t[11]=e[11]-s[11],t[12]=e[12]-s[12],t[13]=e[13]-s[13],t[14]=e[14]-s[14],t[15]=e[15]-s[15],t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function v(t,e){if(t===e)return!0;const s=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=t[9],f=t[10],m=t[11],p=t[12],_=t[13],g=t[14],y=t[15],b=e[0],x=e[1],v=e[2],M=e[3],S=e[4],w=e[5],I=e[6],E=e[7],B=e[8],A=e[9],C=e[10],z=e[11],F=e[12],O=e[13],N=e[14],R=e[15],T=(0,n.g)();return Math.abs(s-b)<=T*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(i-x)<=T*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(r-v)<=T*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-M)<=T*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-S)<=T*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(l-w)<=T*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(h-I)<=T*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(c-E)<=T*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-B)<=T*Math.max(1,Math.abs(u),Math.abs(B))&&Math.abs(d-A)<=T*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(f-C)<=T*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(m-z)<=T*Math.max(1,Math.abs(m),Math.abs(z))&&Math.abs(p-F)<=T*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(_-O)<=T*Math.max(1,Math.abs(_),Math.abs(O))&&Math.abs(g-N)<=T*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(y-R)<=T*Math.max(1,Math.abs(y),Math.abs(R))}function M(t){const e=(0,n.g)(),s=t[0],i=t[1],r=t[2],o=t[4],a=t[5],l=t[6],h=t[8],c=t[9],u=t[10];return Math.abs(1-(s*s+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}function S(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const w=h,I=b;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t[2]=e[2]+s[2],t[3]=e[3]+s[3],t[4]=e[4]+s[4],t[5]=e[5]+s[5],t[6]=e[6]+s[6],t[7]=e[7]+s[7],t[8]=e[8]+s[8],t[9]=e[9]+s[9],t[10]=e[10]+s[10],t[11]=e[11]+s[11],t[12]=e[12]+s[12],t[13]=e[13]+s[13],t[14]=e[14]+s[14],t[15]=e[15]+s[15],t},adjoint:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15];return t[0]=a*(d*g-f*_)-u*(l*g-h*_)+p*(l*f-h*d),t[1]=-(i*(d*g-f*_)-u*(n*g-r*_)+p*(n*f-r*d)),t[2]=i*(l*g-h*_)-a*(n*g-r*_)+p*(n*h-r*l),t[3]=-(i*(l*f-h*d)-a*(n*f-r*d)+u*(n*h-r*l)),t[4]=-(o*(d*g-f*_)-c*(l*g-h*_)+m*(l*f-h*d)),t[5]=s*(d*g-f*_)-c*(n*g-r*_)+m*(n*f-r*d),t[6]=-(s*(l*g-h*_)-o*(n*g-r*_)+m*(n*h-r*l)),t[7]=s*(l*f-h*d)-o*(n*f-r*d)+c*(n*h-r*l),t[8]=o*(u*g-f*p)-c*(a*g-h*p)+m*(a*f-h*u),t[9]=-(s*(u*g-f*p)-c*(i*g-r*p)+m*(i*f-r*u)),t[10]=s*(a*g-h*p)-o*(i*g-r*p)+m*(i*h-r*a),t[11]=-(s*(a*f-h*u)-o*(i*f-r*u)+c*(i*h-r*a)),t[12]=-(o*(u*_-d*p)-c*(a*_-l*p)+m*(a*d-l*u)),t[13]=s*(u*_-d*p)-c*(i*_-n*p)+m*(i*d-n*u),t[14]=-(s*(a*_-l*p)-o*(i*_-n*p)+m*(i*l-n*a)),t[15]=s*(a*d-l*u)-o*(i*d-n*u)+c*(i*l-n*a),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],s=t[1],i=t[2],n=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8],c=t[9],u=t[10],d=t[11],f=t[12],m=t[13],p=t[14],_=t[15];return(e*o-s*r)*(u*_-d*p)-(e*a-i*r)*(c*_-d*m)+(e*l-n*r)*(c*p-u*m)+(s*a-i*o)*(h*_-d*f)-(s*l-n*o)*(h*p-u*f)+(i*l-n*a)*(h*m-c*f)},equals:v,exactEquals:x,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=s+s,a=i+i,l=n+n,h=s*o,c=i*o,u=i*a,d=n*o,f=n*a,m=n*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-m,t[1]=c+g,t[2]=d-_,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=f+p,t[7]=0,t[8]=d+_,t[9]=f-p,t[10]=1-h-u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const s=g,i=-e[0],n=-e[1],r=-e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=i*i+n*n+r*r+o*o;return u>0?(s[0]=2*(a*o+c*i+l*r-h*n)/u,s[1]=2*(l*o+c*n+h*i-a*r)/u,s[2]=2*(h*o+c*r+a*n-l*i)/u):(s[0]=2*(a*o+c*i+l*r-h*n),s[1]=2*(l*o+c*n+h*i-a*r),s[2]=2*(h*o+c*r+a*n-l*i)),_(t,e,s),t},fromRotation:m,fromRotationTranslation:_,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(t,e,s,i,n){const r=e[0],o=e[1],a=e[2],l=e[3],h=r+r,c=o+o,u=a+a,d=r*h,f=r*c,m=r*u,p=o*c,_=o*u,g=a*u,y=l*h,b=l*c,x=l*u,v=i[0],M=i[1],S=i[2],w=n[0],I=n[1],E=n[2],B=(1-(p+g))*v,A=(f+x)*v,C=(m-b)*v,z=(f-x)*M,F=(1-(d+g))*M,O=(_+y)*M,N=(m+b)*S,R=(_-y)*S,T=(1-(d+p))*S;return t[0]=B,t[1]=A,t[2]=C,t[3]=0,t[4]=z,t[5]=F,t[6]=O,t[7]=0,t[8]=N,t[9]=R,t[10]=T,t[11]=0,t[12]=s[0]+w-(B*w+z*I+N*E),t[13]=s[1]+I-(A*w+F*I+R*E),t[14]=s[2]+E-(C*w+O*I+T*E),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:f,fromXRotation:p,fromYRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=0,t[2]=-s,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=s,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=s,t[2]=0,t[3]=0,t[4]=-s,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,s,i,n,r,o){const a=1/(s-e),l=1/(n-i),h=1/(r-o);return t[0]=2*r*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*r*l,t[6]=0,t[7]=0,t[8]=(s+e)*a,t[9]=(n+i)*l,t[10]=(o+r)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*r*2*h,t[15]=0,t},getRotation:function(t,e){const s=e[0]+e[5]+e[10];let i=0;return s>0?(i=2*Math.sqrt(s+1),t[3]=.25*i,t[0]=(e[6]-e[9])/i,t[1]=(e[8]-e[2])/i,t[2]=(e[1]-e[4])/i):e[0]>e[5]&&e[0]>e[10]?(i=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/i,t[0]=.25*i,t[1]=(e[1]+e[4])/i,t[2]=(e[8]+e[2])/i):e[5]>e[10]?(i=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/i,t[0]=(e[1]+e[4])/i,t[1]=.25*i,t[2]=(e[6]+e[9])/i):(i=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/i,t[0]=(e[8]+e[2])/i,t[1]=(e[6]+e[9])/i,t[2]=.25*i),t},getScaling:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(s*s+i*i+n*n),t[1]=Math.sqrt(r*r+o*o+a*a),t[2]=Math.sqrt(l*l+h*h+c*c),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:S,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:M,lookAt:function(t,e,s,i){const r=e[0],a=e[1],l=e[2];let h=r-s[0],c=a-s[1],u=l-s[2];const d=(0,n.g)();if(Math.abs(h)<d&&Math.abs(c)<d&&Math.abs(u)<d)return void o(t);let f=1/Math.sqrt(h*h+c*c+u*u);h*=f,c*=f,u*=f;const m=i[0],p=i[1],_=i[2];let g=p*u-_*c,y=_*h-m*u,b=m*c-p*h;f=Math.sqrt(g*g+y*y+b*b),f?(f=1/f,g*=f,y*=f,b*=f):(g=0,y=0,b=0);let x=c*b-u*y,v=u*g-h*b,M=h*y-c*g;f=Math.sqrt(x*x+v*v+M*M),f?(f=1/f,x*=f,v*=f,M*=f):(x=0,v=0,M=0),t[0]=g,t[1]=x,t[2]=h,t[3]=0,t[4]=y,t[5]=v,t[6]=c,t[7]=0,t[8]=b,t[9]=M,t[10]=u,t[11]=0,t[12]=-(g*r+y*a+b*l),t[13]=-(x*r+v*a+M*l),t[14]=-(h*r+c*a+u*l),t[15]=1},mul:w,multiply:h,multiplyScalar:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12]*s,t[13]=e[13]*s,t[14]=e[14]*s,t[15]=e[15]*s,t},multiplyScalarAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t[2]=e[2]+s[2]*i,t[3]=e[3]+s[3]*i,t[4]=e[4]+s[4]*i,t[5]=e[5]+s[5]*i,t[6]=e[6]+s[6]*i,t[7]=e[7]+s[7]*i,t[8]=e[8]+s[8]*i,t[9]=e[9]+s[9]*i,t[10]=e[10]+s[10]*i,t[11]=e[11]+s[11]*i,t[12]=e[12]+s[12]*i,t[13]=e[13]+s[13]*i,t[14]=e[14]+s[14]*i,t[15]=e[15]+s[15]*i,t},ortho:function(t,e,s,i,n,r,o){const a=1/(e-s),l=1/(i-n),h=1/(r-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+s)*a,t[13]=(n+i)*l,t[14]=(o+r)*h,t[15]=1,t},perspective:function(t,e,s,i,n){const r=1/Math.tan(e/2);let o;return t[0]=r/s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(o=1/(i-n),t[10]=(n+i)*o,t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},perspectiveFromFieldOfView:function(t,e,s,i){const n=Math.tan(e.upDegrees*Math.PI/180),r=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+a),h=2/(n+r);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(o-a)*l*.5,t[9]=(n-r)*h*.5,t[10]=i/(s-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s/(s-i),t[15]=0,t},rotate:d,rotateX:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[4],o=e[5],a=e[6],l=e[7],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=r*n+h*i,t[5]=o*n+c*i,t[6]=a*n+u*i,t[7]=l*n+d*i,t[8]=h*n-r*i,t[9]=c*n-o*i,t[10]=u*n-a*i,t[11]=d*n-l*i,t},rotateY:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n-h*i,t[1]=o*n-c*i,t[2]=a*n-u*i,t[3]=l*n-d*i,t[8]=r*i+h*n,t[9]=o*i+c*n,t[10]=a*i+u*n,t[11]=l*i+d*n,t},rotateZ:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n+h*i,t[1]=o*n+c*i,t[2]=a*n+u*i,t[3]=l*n+d*i,t[4]=h*n-r*i,t[5]=c*n-o*i,t[6]=u*n-a*i,t[7]=d*n-l*i,t},scale:u,set:r,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:b,targetTo:function(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=i[0],l=i[1],h=i[2];let c=n-s[0],u=r-s[1],d=o-s[2],f=c*c+u*u+d*d;f>0&&(f=1/Math.sqrt(f),c*=f,u*=f,d*=f);let m=l*d-h*u,p=h*c-a*d,_=a*u-l*c;return f=m*m+p*p+_*_,f>0&&(f=1/Math.sqrt(f),m*=f,p*=f,_*=f),t[0]=m,t[1]=p,t[2]=_,t[3]=0,t[4]=u*_-d*p,t[5]=d*m-c*_,t[6]=c*p-u*m,t[7]=0,t[8]=c,t[9]=u,t[10]=d,t[11]=0,t[12]=n,t[13]=r,t[14]=o,t[15]=1,t},translate:c,transpose:a},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,s)=>{s.d(e,{Z:()=>z});var i,n=s(43697),r=s(3894),o=s(32448),a=s(50758),l=s(22974),h=s(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(i||(i={}));var c,u=s(1654),d=s(75215),f=s(58971),m=s(5600),p=s(52421),_=s(52011),g=s(10661);class y{constructor(t,e,s,i,n){this.target=t,this.added=e,this.removed=s,this.start=i,this.deleteCount=n}}const b=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1}));function x(t){return t?t instanceof C?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function v(t){if(t&&t.length)return t[0]}function M(t,e,s,i){const n=Math.min(t.length-s,e.length-i);let r=0;for(;r<n&&t[s+r]===e[i+r];)r++;return r}function S(t,e,s,i){e&&e.forEach(((e,n,r)=>{t.push(e),S(t,s.call(i,e,n,r),s,i)}))}const w=new Set,I=new Set,E=new Set,B=new Map;let A=0,C=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:A++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,x(t)),this._emitAfterChanges(i.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,s={removed:!1,callback:e};return t.push(s),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),(0,a.kB)((()=>{s.removed=!0,t.splice(t.indexOf(s),1)}))}return this._emitter.on(t,e)}once(t,e){return this.on(t,e)}add(t,e){if((0,f.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e??null);return this._splice(s,0,[t]),this._emitAfterChanges(i.ADD),this}addMany(t,e=this._items.length){if((0,f.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e);return this._splice(s,0,x(t)),this._emitAfterChanges(i.ADD),this}at(t){if((0,f.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(l.d9)})}concat(...t){(0,f.it)(this._observable);const e=t.map(x);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),n=s.length;for(let i=0;i<n;i++)t.call(e,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(t,e){return(0,f.it)(this._observable),this._items.every(t,e)}filter(t,e){let s;return(0,f.it)(this._observable),s=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:s})}find(t,e){return(0,f.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,f.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,f.it)(this._observable);const s=[];return S(s,this,t,e),new c(s)}forEach(t,e){return(0,f.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,f.it)(this._observable),this._items[t]}getNextIndex(t){(0,f.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,f.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,f.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,f.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,f.it)(this._observable);const s=this._items.map(t,e);return new c({items:s})}reorder(t,e=this.length-1){(0,f.it)(this._observable);const s=this.indexOf(t);if(-1!==s){if(e<0?e=0:e>=this.length&&(e=this.length-1),s!==e){if(this._emitBeforeChanges(i.MOVE))return t;this._splice(s,1),this._splice(e,0,[t]),this._emitAfterChanges(i.MOVE)}return t}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),t}push(...t){return(0,f.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(i.ADD)),this.length}reduce(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(t,e):s.reduce(t)}reduceRight(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(t,e):s.reduceRight(t)}remove(t){return(0,f.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,f.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(i.REMOVE))return;const e=v(this._splice(t,1));return this._emitAfterChanges(i.REMOVE),e}removeMany(t){if((0,f.it)(this._observable),!t||!t.length||this._emitBeforeChanges(i.REMOVE))return[];const e=t instanceof c?t.toArray():t,s=this._items,n=[],r=e.length;for(let t=0;t<r;t++){const i=e[t],r=s.indexOf(i);if(r>-1){const i=1+M(e,s,t+1,r+1),o=this._splice(r,i);o&&o.length>0&&n.push.apply(n,o),t+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),t}slice(t=0,e=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,f.it)(this._observable),this._items.some(t,e)}sort(t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(i.MOVE),this}splice(t,e,...s){(0,f.it)(this._observable);const n=(e?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(t,e,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...t){return(0,f.it)(this._observable),!t.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,t),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,s){const i=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),t<0&&(t+=this.length),e){if(o=i.splice(t,e),this.hasEventListener("before-remove")){const e=b.acquire();e.target=this,e.cancellable=!0;for(let s=0,n=o.length;s<n;s++)r=o[s],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(s,1),i.splice(t,0,r),t+=1,s-=1,n-=1);b.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=b.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let s=0;s<e;s++)t.reset(o[s]),this.emit("after-remove",t);b.release(t)}}if(s&&s.length){if(n){const t=[];for(const e of s){const s=n.ensureType(e);null==s&&null!=e||t.push(s)}s=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const n=b.acquire();n.target=this,n.cancellable=!0;const a=b.acquire();a.target=this,a.cancellable=!1;for(const l of s)e?(n.reset(l),this.emit("before-add",n),n.defaultPrevented||(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),a.reset(l),this.emit("after-add",a));b.release(a),b.release(n)}else{if(o)for(const t of s)i.push(t);else i.splice(t,0,...s);this._set("length",i.length)}}if((s&&s.length||o&&o.length)&&this._notifyChangeEvent(s,o),this.hasEventListener("after-splice")){const i=new y(this,s,o,t,e);this.emit("after-splice",i)}return o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=t,this.emit("before-changes",s),e=s.defaultPrevented,b.release(s)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=b.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),b.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;w.clear(),I.clear(),E.clear();for(const{added:e,removed:s}of t){if(e)if(0===E.size&&0===I.size)for(const t of e)w.add(t);else for(const t of e)I.has(t)?(E.add(t),I.delete(t)):E.has(t)||w.add(t);if(s)if(0===E.size&&0===w.size)for(const t of s)I.add(t);else for(const t of s)w.has(t)?w.delete(t):(E.delete(t),I.add(t))}const s=r.Z.acquire();w.forEach((t=>{s.push(t)}));const i=r.Z.acquire();I.forEach((t=>{i.push(t)}));const n=this._items,o=e.items,a=r.Z.acquire();if(E.forEach((t=>{o.indexOf(t)!==n.indexOf(t)&&a.push(t)})),e.listeners&&(s.length||i.length||a.length)){const t={target:this,added:s,removed:i,moved:a},n=e.listeners.length;for(let s=0;s<n;s++){const i=e.listeners[s];i.removed||i.callback.call(this,t)}}r.Z.release(s),r.Z.release(i),r.Z.release(a)}w.clear(),I.clear(),E.clear()}};C.ofType=t=>{if(!t)return c;if(B.has(t))return B.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const s in t.typeMap){const i=t.typeMap[s].prototype.declaredClass;e?e+=` | ${i}`:e=i}let s=class extends c{};return(0,n._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,_.j)(`esri.core.Collection<${e}>`)],s),B.set(t,s),s},(0,n._)([(0,m.Cb)()],C.prototype,"length",void 0),(0,n._)([(0,m.Cb)()],C.prototype,"items",null),C=c=(0,n._)([(0,_.j)("esri.core.Collection")],C);const z=C},32448:(t,e,s)=>{s.d(e,{Z:()=>l});var i=s(43697),n=s(92036),r=s(50758),o=s(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}}!function(t){class e{constructor(t=null){this._target=t,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(t,e){const s=this._listenersMap&&this._listenersMap.get(t);if(!s)return!1;const i=this._target||this;return[...s].forEach((t=>{t.call(i,e)})),s.length>0}on(t,e){if(Array.isArray(t)){const s=t.map((t=>this.on(t,e)));return(0,r.AL)(s)}if(t.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(t)||[];return s.push(e),this._listenersMap.set(t,s),(0,r.kB)((()=>{const s=this._listenersMap&&this._listenersMap.get(t)||[],i=s.indexOf(e);i>=0&&s.splice(i,1)}))}once(t,e){const s=this.on(t,(t=>{s.remove(),e.call(null,t)}));return s}hasEventListener(t){const e=this._listenersMap&&this._listenersMap.get(t);return null!=e&&e.length>0}}t.EventEmitter=e,t.EventedMixin=t=>{let s=class extends t{constructor(){super(...arguments),this._emitter=new e}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};return s=(0,i._)([(0,o.j)("esri.core.Evented")],s),s};let s=class extends n.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};s=(0,i._)([(0,o.j)("esri.core.Evented")],s),t.EventedAccessor=s}(a||(a={}));const l=a},13867:(t,e,s)=>{s.d(e,{z:()=>n});var i=s(69801);class n{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,s)=>{s.d(e,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(t,e,s){this.name=t,this._storage=e,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,s,i=0){this._storage.put(this,t,e,s,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,s){this._storage.updateSize(this,t,e,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,s,n,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==s&&this._notifyRemove(e,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(e,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return void console.warn("Refusing to cache entry with invalid size "+n);const a=1+Math.max(r,-3)- -3;this._db.set(e,{entry:s,size:n,lifetime:a,lives:a}),this._size+=n,t.size+=n,this._checkSizeLimits()}updateSize(t,e,s,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===s){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,s,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach(((t,i)=>{const n=t.lifetime;s[n]=(s[n]||0)+t.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=e[r]||0;e[r]=s+t.size}}))}));const i={};this._users.forAll((t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[s]||0;e[s]=n,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(e);n.sort(((t,s)=>e[s]-e[t])),n.forEach((s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]));for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s){let i;return this._removeFuncs.some((n=>{if(t.startsWith(n[0])){const t=n[1](e,s);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,s]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,s,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,s=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const n=this._notifyRemove(t,e.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let l=0},52421:(t,e,s)=>{function i(t){return(e,s)=>{e[s]=t}}s.d(e,{c:()=>i})},10661:(t,e,s)=>{s.d(e,{s:()=>n});var i=s(42100);class n extends i.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},66643:(t,e,s)=>{s.d(e,{Ed:()=>h,UI:()=>c,mt:()=>m,q6:()=>f,vr:()=>p});var i=s(43697),n=s(92036),r=s(70586),o=s(95330),a=s(5600),l=s(52011);function h(t,e,s){return(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))}async function c(t,e,s){return(await(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))).map((t=>t.value))}function u(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return u(await t)}catch(t){return d(t)}}async function m(t){try{return u(await t)}catch(t){return(0,o.r9)(t),d(t)}}function p(t,e){return new _(t,e)}let _=class extends n.Z{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=t(s),this.promise.then((t=>{this._result=u(t),this._cleanup()}),(t=>{this._result=d(t),this._cleanup()})),this._abortHandle=(0,o.fu)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],_.prototype,"value",null),(0,i._)([(0,a.Cb)()],_.prototype,"error",null),(0,i._)([(0,a.Cb)()],_.prototype,"finished",null),(0,i._)([(0,a.Cb)()],_.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],_.prototype,"_result",void 0),_=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],_)},24133:(t,e,s)=>{s.d(e,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=u,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),b.prune(),x.prune(),v.prune(),M.prune()}all(t){this._all(this._data,t)}search(t,e){let s=this._data;const i=this._toBBox;if(g(t,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;g(t,o)&&(s.leaf?e(r):_(t,o)?this._all(r,e):b.push(r))}s=b.pop()}}collides(t){let e=this._data;const s=this._toBBox;if(!g(t,e))return!1;for(b.clear();e;){for(let i=0,n=e.children.length;i<n;i++){const n=e.children[i],r=e.leaf?s(n):n;if(g(t,r)){if(e.leaf||_(t,r))return!0;b.push(n)}}e=b.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,s=t.length;e<s;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(t){if(!t)return this;let e,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(t);for(v.clear(),M.clear();s||v.length>0;){if(s||(s=v.pop(),n=v.data[v.length-1],r=M.pop()??0,o=!0),s.leaf&&(e=(0,i.cq)(s.children,t,s.children.length,s.indexHint),-1!==e))return s.children.splice(e,1),v.push(s),this._condense(v),this;o||s.leaf||!_(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(v.push(s),M.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let s=t;for(x.clear();s;){if(!0===s.leaf)for(const t of s.children)e(t);else x.pushArray(s.children);s=x.pop()??null}}_build(t,e,s,i){const n=s-e+1;let r=this._maxEntries;if(n<=r){const i=new I(t.slice(e,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new E([]);o.height=i;const l=Math.ceil(n/r),h=l*Math.ceil(Math.sqrt(r));y(t,e,s,h,this._compareMinX);for(let n=e;n<=s;n+=h){const e=Math.min(n+h-1,s);y(t,n,e,l,this._compareMinY);for(let s=n;s<=e;s+=l){const n=Math.min(s+l-1,e);o.children.push(this._build(t,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(t,e,s,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=d(o),l=m(t,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}e=s||e.children[0]}return e}_insert(t,e,s){const i=this._toBBox,n=s?t:i(t);v.clear();const r=this._chooseSubtree(n,this._data,e,v);for(r.children.push(t),h(r,n);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(n,v,e)}_split(t,e){const s=t.data[e],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new I(o):new E(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(s,l)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,s){let i,n,r;i=n=1/0;for(let o=e;o<=s-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,s,this._toBBox),h=p(e,a),c=d(e)+d(a);h<i?(i=h,r=o,n=c<n?c:n):h===i&&c<n&&(n=c,r=o)}return r}_chooseSplitAxis(t,e,s){const i=t.leaf?this._compareMinX:c,n=t.leaf?this._compareMinY:u;this._allDistMargin(t,e,s,i)<this._allDistMargin(t,e,s,n)&&t.children.sort(i)}_allDistMargin(t,e,s,i){t.children.sort(i);const n=this._toBBox,r=l(t,0,e,n),o=l(t,s-e,s,n);let a=f(r)+f(o);for(let i=e;i<s-e;i++){const e=t.children[i];h(r,t.leaf?n(e):e),a+=f(r)}for(let i=s-e-1;i>=e;i--){const e=t.children[i];h(o,t.leaf?n(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,s){for(let i=s;i>=0;i--)h(e.data[i],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const s=t.data[e];if(0===s.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<s;o++)r=t.children[o],h(n,t.leaf?i(r):r);return n}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){const s=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t,e,s,i,n){const o=[e,s];for(;o.length;){const e=o.pop(),s=o.pop();if(e-s<=i)continue;const a=s+Math.ceil((e-s)/i/2)*i;(0,r.q)(t,a,s,e,n),o.push(s,a,a,e)}}const b=new n.Z,x=new n.Z,v=new n.Z,M=new n.Z({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class w extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class I extends w{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends w{constructor(t){super(),this.children=t,this.leaf=!1}}},14808:(t,e,s)=>{s.d(e,{Qc:()=>c,WU:()=>a,lt:()=>h});var i=s(19153),n=s(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(t=(0,n.Kd)()){let e=(t=t.toLowerCase())in r;if(!e){const s=t.split("-");s.length>1&&s[0]in r&&(t=s[0],e=!0),e||(t="en")}const[s,i,o="#,##0.###"]=r[t];return{decimal:s,group:i,pattern:o}}function a(t,e){const s=o((e={...e}).locale);e.customs=s;const i=e.pattern||s.pattern;return isNaN(t)||Math.abs(t)===1/0?null:function(t,e,s){const i=(s=s||{}).customs.group,n=s.customs.decimal,r=e.split(";"),o=r[0];if((e=r[t<0?1:0]||"-"+o).includes("%"))t*=100;else if(e.includes("‰"))t*=1e3;else{if(e.includes("¤"))throw new Error("currency notation not supported");if(e.includes("E"))throw new Error("exponential notation not supported")}const a=l,h=o.match(a);if(!h)throw new Error("unable to find a number expression in pattern: "+e);return!1===s.fractional&&(s.places=0),e.replace(a,function(t,e,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const i=e.split("."),n="string"==typeof s.places&&s.places.indexOf(",");let r=s.places;n?r=s.places.substring(n+1):+r>=0||(r=(i[1]||[]).length),s.round<0||(t=Number(t.toFixed(Number(r))));const o=String(Math.abs(t)).split("."),a=o[1]||"";if(i[1]||s.places){n&&(s.places=s.places.substring(0,n));const t=void 0!==s.places?s.places:i[1]&&i[1].lastIndexOf("0")+1;+t>a.length&&(o[1]=a.padEnd(Number(t),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=i[0].replace(",","");let h=l.indexOf("0");-1!==h&&(h=l.length-h,h>o[0].length&&(o[0]=o[0].padStart(h,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-h)));let c,u,d=i[0].lastIndexOf(",");if(-1!==d){c=i[0].length-d-1;const t=i[0].substr(0,d);d=t.lastIndexOf(","),-1!==d&&(u=t.length-d-1)}const f=[];for(let t=o[0];t;){const e=t.length-c;f.push(e>0?t.substr(e):t),t=e>0?t.slice(0,e):"",u&&(c=u,u=void 0)}return o[0]=f.reverse().join(s.group||","),o.join(s.decimal||".")}(t,h[0],{decimal:n,group:i,places:s.places,round:s.round}))}(t,i,e)}const l=/[#0,]*[#0](?:\.0*#*)?/;function h(t){const e=o((t=t||{}).locale),s=t.pattern||e.pattern,n=e.group,r=e.decimal;let a=1;if(s.includes("%"))a/=100;else if(s.includes("‰"))a/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const h=s.split(";");1===h.length&&h.push("-"+h[0]);const c=d(h,(e=>(e="(?:"+(0,i.Qs)(e,".")+")").replace(l,(e=>{const s={signed:!1,separator:t.strict?n:[n,""],fractional:t.fractional,decimal:r,exponent:!1},i=e.split(".");let o=t.places;1===i.length&&1!==a&&(i[1]="###"),1===i.length||0===o?s.fractional=!1:(void 0===o&&(o=t.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==t.fractional&&(s.fractional=!0),!t.places&&+o<i[1].length&&(o+=","+i[1].length),s.places=o);const l=i[0].split(",");return l.length>1&&(s.groupSize=l.pop().length,l.length>1&&(s.groupSize2=l.pop().length)),"("+function(t){"places"in(t=t||{})||(t.places=1/0),"string"!=typeof t.decimal&&(t.decimal="."),"fractional"in t&&!/^0/.test(String(t.places))||(t.fractional=[!0,!1]),"exponent"in t||(t.exponent=[!0,!1]),"eSigned"in t||(t.eSigned=[!0,!1]);const e=u(t),s=d(t.fractional,(e=>{let s="";return e&&0!==t.places&&(s="\\"+t.decimal,t.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+t.places+"}"),s}),!0);let i=e+s;return s&&(i="(?:(?:"+i+")|(?:"+s+"))"),i+d(t.exponent,(e=>e?"([eE]"+u({signed:t.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function c(t,e){const s=h(e),i=new RegExp("^"+s.regexp+"$").exec(t);if(!i)return NaN;let n=i[1];if(!i[1]){if(!i[2])return NaN;n=i[2],s.factor*=-1}return n=n.replaceAll(new RegExp("["+s.group+"\\s\\xa0]","g"),"").replace(s.decimal,"."),Number(n)*s.factor}function u(t){return"signed"in(t=t||{})||(t.signed=[!0,!1]),"separator"in t?"groupSize"in t||(t.groupSize=3):t.separator="",d(t.signed,(t=>t?"[-+]":""),!0)+d(t.separator,(e=>{if(!e)return"(?:\\d+)";" "===(e=(0,i.Qs)(e))?e="\\s":" "===e&&(e="\\s\\xa0");const s=t.groupSize,n=t.groupSize2;if(n){const t="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+e+"]\\d{"+n+"})*["+e+"]\\d{"+s+"})";return s-n>0?"(?:"+t+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":t}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+e+"]\\d{"+s+"})*)"}),!0)}const d=(t,e,s)=>{if(!(t instanceof Array))return e(t);const i=[];for(let s=0;s<t.length;s++)i.push(e(t[s]));return f(i.join("|"),Boolean(s))},f=(t,e)=>"("+(e?"?:":"")+t+")"},17445:(t,e,s)=>{s.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(t,e,s={}){return c(t,e,s,f)}function h(t,e,s={}){return c(t,e,s,m)}function c(t,e,s={},i){let n=null;const o=s.once?(t,s)=>{i(t)&&((0,r.hw)(n),e(t,s))}:(t,s)=>{i(t)&&e(t,s)};if(n=(0,a.aQ)(t,o,s.sync,s.equals),s.initial){const e=t();o(e,e)}return n}function u(t,e,s,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),s(t)}const f=l(t,((t,s)=>{u(),(0,i.vT)(t)&&(a=t,h=(0,i.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,n.kB)((()=>{f.remove(),u()})),c}function d(t,e){return function(t,e,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??f)])}))}(t,m,e)}function f(t){return!0}function m(t){return!!t}s(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},16306:(t,e,s)=>{s.d(e,{aX:()=>M});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),l=s(73913),h=s(8744),c=s(40488),u=(s(66577),s(3172)),d=s(33955),f=s(11282),m=s(17452);async function p(t,e,s){const i="string"==typeof t?(0,m.mN)(t):t,n=e[0].spatialReference,r=(0,d.Ji)(e[0]),o={...s,query:{...i.query,f:"json",sr:n.wkid??JSON.stringify(n),geometries:JSON.stringify((l=e,{geometryType:(0,d.Ji)(l[0]),geometries:l.map((t=>t.toJSON()))}))}},{data:a}=await(0,u.default)(i.path+"/simplify",o);var l;return function(t,e,s){const i=(0,d.q9)(e);return t.map((t=>{const e=i.fromJSON(t);return e.spatialReference=s,e}))}(a.geometries,r,n)}const _=r.Z.getLogger("esri.geometry.support.normalizeUtils");function g(t){return"polygon"===t[0].type}function y(t){return"polyline"===t[0].type}function b(t,e,s){if(e){const e=function(t,e){if(!(t instanceof a.Z||t instanceof o.Z)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw _.error(t),new n.Z(t)}const s=(0,l.x3)(t),i=[];for(const t of s){const s=[];i.push(s),s.push([t[0][0],t[0][1]]);for(let i=0;i<t.length-1;i++){const n=t[i][0],r=t[i][1],o=t[i+1][0],a=t[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),h=(a-r)/l,c=(o-n)/l,u=l/e;if(u>1){for(let t=1;t<=u-1;t++){const i=t*e,o=c*i+n,a=h*i+r;s.push([o,a])}const t=(l+Math.floor(u-1)*e)/2,i=c*t+n,o=h*t+r;s.push([i,o])}s.push([o,a])}}return function(t){return"polygon"===t.type}(t)?new o.Z({rings:i,spatialReference:t.spatialReference}):new a.Z({paths:i,spatialReference:t.spatialReference})}(t,1e6);t=(0,c.Sx)(e,!0)}return s&&(t=(0,l.Sy)(t,s)),t}function x(t,e,s){if(Array.isArray(t)){const i=t[0];if(i>e){const s=(0,l.XZ)(i,e);t[0]=i+s*(-2*e)}else if(i<s){const e=(0,l.XZ)(i,s);t[0]=i+e*(-2*s)}}else{const i=t.x;if(i>e){const s=(0,l.XZ)(i,e);t=t.clone().offset(s*(-2*e),0)}else if(i<s){const e=(0,l.XZ)(i,s);t=t.clone().offset(e*(-2*s),0)}}return t}function v(t,e){let s=-1;for(let i=0;i<e.cutIndexes.length;i++){const n=e.cutIndexes[i],r=e.geometries[i],o=(0,l.x3)(r);for(let t=0;t<o.length;t++){const e=o[t];e.some((s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const i=e[t][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.XZ)(s,180);for(let s=0;s<e.length;s++){const e=r.getPoint(t,s);r.setPoint(t,s,e.clone().offset(i,0))}return!0}}))}if(n===s){if(g(t))for(const e of(0,l.x3)(r))t[n]=t[n].addRing(e);else if(y(t))for(const e of(0,l.x3)(r))t[n]=t[n].addPath(e)}else s=n,t[n]=r}return t}async function M(t,e,s){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&_.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??i.default.geometryServiceUrl;let r,m,g,y,S,w,I,E,B=0;const A=[],C=[];for(const e of t)if(null!=e)if(r||(r=e.spatialReference,m=(0,h.C5)(r),g=r.isWebMercator,w=g?102100:4326,y=l.UZ[w].maxX,S=l.UZ[w].minX,I=l.UZ[w].plus180Line,E=l.UZ[w].minus180Line),m)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(x(e.clone(),y,S));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map((t=>x(t,y,S))),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,m);C.push(t.rings?new o.Z(t):t)}else if(e.extent){const t=e.extent,s=(0,l.XZ)(t.xmin,S)*(2*y);let i=0===s?e.clone():(0,l.Sy)(e.clone(),s);t.offset(s,0),t.intersects(I)&&t.xmax!==y?(B=t.xmax>B?t.xmax:B,i=b(i,g),A.push(i),C.push("cut")):t.intersects(E)&&t.xmin!==S?(B=t.xmax*(2*y)>B?t.xmax*(2*y):B,i=b(i,g,360),A.push(i),C.push("cut")):C.push(i)}else C.push(e.clone());else C.push(e);else C.push(e);let z=(0,l.XZ)(B,y),F=-90;const O=z,N=new a.Z;for(;z>0;){const t=360*z-180;N.addPath([[t,F],[t,-1*F]]),F*=-1,z--}if(A.length>0&&O>0){const e=v(A,await async function(t,e,s,i){const n=(0,f.en)(t),r=e[0].spatialReference,o={...i,query:{...n.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,d.Ji)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},a=await(0,u.default)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((t=>{const e=(0,d.im)(t);return e.spatialReference=r,e}))}}(n,A,N,s)),i=[],r=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)r.push(n);else{const n=e.shift(),o=t[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(g?(0,c.$)(n):n)}}if(!i.length)return r;const o=await p(n,i,s),a=[];for(let t=0;t<r.length;t++){const e=r[t];"simplify"!==e?a.push(e):a.push(g?(0,c.$)(o.shift()):o.shift())}return a}const R=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)R.push(e);else{const t=A.shift();R.push(!0===g?(0,c.$)(t):t)}}return R}},73913:(t,e,s)=>{s.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const s=h(t);for(const t of s)for(const s of t)s[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},70171:(t,e,s)=>{s.d(e,{Kd:()=>a,Ze:()=>u,qe:()=>h});var i=s(50758);let n;const r=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return r??globalThis.navigator?.language??"en"}function a(){return void 0===n&&(n=o()),n}const l=[];function h(t){return l.push(t),(0,i.kB)((()=>l.splice(l.indexOf(t),1)))}const c=[];function u(t){return c.push(t),(0,i.kB)((()=>l.splice(c.indexOf(t),1)))}globalThis.addEventListener?.("languagechange",(function(){const t=o();n!==t&&(n=t,[...c].forEach((e=>{e.call(null,t)})),[...l].forEach((e=>{e.call(null,t)})))}))},37549:(t,e,s)=>{s.d(e,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((s,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,s){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,s)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(t,e,s)=>{s.d(e,{Z:()=>_});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),h=s(37549),c=s(29730),u=s(70272),d=s(5428);const f={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new u.u_(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,c.Y)(new d.Z,t.geometry,e.hasZ,e.hasM)),t.centroid)};var m=s(11490);const p=(0,o.Ue)();class _{constructor(t){this.geometryInfo=t,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,s,i,n]=this.fullBounds;return{xmin:e,ymin:s,xmax:i,ymax:n,spatialReference:(0,m.S2)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const s of t){const t=this._boundsStore.get(s.objectId);t&&e((0,o.JR)(p,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,s)=>{this._markedIds.has(s)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:t}));const s=this._featuresById.get(e);let n;if(this._markedIds.add(e),s?(t.displayId=s.displayId,n=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),null==t.geometry||!t.geometry.coords||!t.geometry.coords.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);n=(0,l.$)(null!=n?n:(0,a.Ue)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(e,n),this._featuresById.set(e,t)}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},27793:(t,e,s)=>{s.r(e),s.d(e,{default:()=>$}),s(66577);var i=s(3172),n=s(66643),r=s(20102),o=s(92604),a=s(95330),l=s(17452),h=s(44547),c=s(37455),u=s(8744),d=s(40488),f=s(70272),m=s(5428),p=s(57191),_=s(37427),g=s(64106),y=s(14808),b=s(35671);const x=/^\s*"([\S\s]*)"\s*$/,v=/""/g,M="\n",S=[","," ",";","|","\t"];function*w(t,e,s){let i=0;for(;i<=t.length;){const n=t.indexOf(e,i),r=t.substring(i,n>-1?n:void 0);i+=r.length+e.length,s&&!r.trim()||(yield r)}}function I(t){const e=t.includes("\r\n")?"\r\n":M;return w(t,e,!0)}function E(t,e){return w(t,e,!1)}function B(t,e,s){t=t.trim(),e=e?.trim();const i=[],n=Array.from(new Set([s?.delimiter,...S])).filter((t=>null!=t));for(const s of n){const n=z(t,s).length,r=z(e,s).length??n;n>1&&i.push({weight:Math.min(n,r),delimiter:s})}const r=i.sort((({weight:t},{weight:e})=>e-t)).map((({delimiter:t})=>t));for(const e of r){const i=O(C(t,e).names,s?.longitudeField,s?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:e,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*A(t,e,s,i=(()=>Object.create(null))){const n=I(t);n.next();let r="",o="",a=0,l=i(),h=0;t:for(const t of n){const n=E(t,s);for(const t of n)if(r+=o+t,o="",a+=F(t),a%2==0){if(a>0){const t=x.exec(r);if(!t){l=i(),h=0,r="",a=0;continue t}l[e[h]]=t[1].replaceAll(v,'"'),h++}else l[e[h]]=r,h++;r="",a=0}else o=s;0===a?(yield l,l=i(),h=0):o=M}}function C(t,e){const s=z(t,e).filter((t=>null!=t)),i=s.map((t=>(0,b.q6)(t)));for(let t=i.length-1;t>=0;t--)i[t]||(i.splice(t,1),s.splice(t,1));return{names:i,aliases:s}}function z(t,e){if(!t?.length)return[];const s=[];let i="",n="",r=0;const o=E(t,e);for(const t of o)if(i+=n+t,n="",r+=F(t),r%2==0){if(r>0){const t=x.exec(i);t&&s.push(t[1].replaceAll(v,'"'))}else s.push(i);i="",r=0}else n=e;return s}function F(t){let e=0,s=0;for(s=t.indexOf('"',s);s>=0;)e++,s=t.indexOf('"',s+1);return e}function O(t,e,s){e=(0,b.q6)(e)?.toLowerCase(),s=(0,b.q6)(s)?.toLowerCase();const i=t.map((t=>t.toLowerCase())),n=e?t[i.indexOf(e)]:null,r=s?t[i.indexOf(s)]:null;return{longitudeFieldName:n||t[i.indexOf(X.find((t=>i.includes(t))))],latitudeFieldName:r||t[i.indexOf(D.find((t=>i.includes(t))))]}}function N(t,e,s,i,n){const r=[],o=A(t,s,e),a=[];for(const t of o){if(10===a.length)break;a.push(t)}for(let t=0;t<s.length;t++){const e=s[t],o=i[t];if(e===n.longitudeFieldName||e===n.latitudeFieldName)r.push({name:e,type:"esriFieldTypeDouble",alias:o});else{let t,s;switch(R(a.map((t=>t[e])))){case"integer":t="esriFieldTypeInteger";break;case"double":t="esriFieldTypeDouble";break;case"date":t="esriFieldTypeDate",s=36;break;default:t="esriFieldTypeString",s=255}r.push({name:e,type:t,alias:o,length:s})}}return r}function R(t){if(!t.length)return"string";const e=/[^+-.,0-9]/;return t.map((t=>{let s=!1;if(""!==t){if(e.test(t))s=!0;else{let e=Z(t);if(!isNaN(e))return/[.,]/.test(t)||!Number.isInteger(e)||e>214783647||e<-214783648?"double":"integer";if(t.includes("E")){if(e=Number(t),!isNaN(e))return"double";if(t.includes(",")){if(t=t.replace(",","."),e=Number(t),!isNaN(e))return"double";s=!0}else s=!0}else s=!0}return s?/^[-]?\d*[.,]?\d*$/.test(t)?"string":T(new Date(t),t)?"date":"string":"string"}})).reduce(((t,e)=>void 0===t?e:void 0===e?t:t===e?e:"string"===t||"string"===e?"string":"double"===t||"double"===e?"double":void 0))}function T(t,e){if(!t||"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))return!1;let s=!0;if(!q&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,i=0;for(;!e&&i<=t.length;)e=!L.test(t[i]),i++;s=!e}}return s}const Z=function(){const t=(0,y.lt)(),e=new RegExp("^"+t.regexp+"$"),s=new RegExp("["+t.group+"\\s\\xa0]","g"),i=t.factor;return n=>{const r=e.exec(n);if(t.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],t.factor*=-1}return o=o.replace(s,"").replace(t.decimal,"."),+o*t.factor}}(),L=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,q=Number.isNaN(new Date("technology 10").getTime()),D=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],X=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var k=s(25278),j=s(99514),Y=s(82971);const P=(0,k.bU)("esriGeometryPoint"),V=["csv"],U=[0,0];class J{constructor(t,e){this.x=t,this.y=e}}class ${constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(t,e={}){this._loadOptions=t;const[s]=await Promise.all([this._fetch(e.signal),this._checkProjection(t?.parsingOptions?.spatialReference)]),i=function(t,e){const s=e.parsingOptions||{},i={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},n=i.layerDefinition={name:(0,l.vt)(e.url,V)||"csv",drawingInfo:P,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:s.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:s.spatialReference||{wkid:4326}}},o=I(t),a=o.next().value?.trim(),h=o.next().value?.trim();if(!a)throw new r.Z("csv-layer:empty-csv","CSV is empty",{csv:t});const{delimiter:c,locationInfo:u}=B(a,h,s);if(!c)throw new r.Z("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:h,parsingOptions:s});if(!u)throw new r.Z("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:h,parsingOptions:s});i.locationInfo=u,i.delimiter=c;const{names:d,aliases:f}=C(a,c),m=N(t,i.delimiter,d,f,i.locationInfo);if(s.fields?.length){const t=new j.Z(s.fields);for(const e of m){const s=t.get(e.name);s&&Object.assign(e,s)}}if(!m.some((t=>"esriFieldTypeOID"===t.type&&(n.objectIdField=t.name,!0)))){const t={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=t.name,m.unshift(t)}n.fields=m;const p=new j.Z(n.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=p.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=p.get(i.locationInfo.longitudeFieldName).name),n.timeInfo){const t=n.timeInfo;if(t.startTimeField){const e=p.get(t.startTimeField);e?(t.startTimeField=e.name,e.type="esriFieldTypeDate"):t.startTimeField=null}if(t.endTimeField){const e=p.get(t.endTimeField);e?(t.endTimeField=e.name,e.type="esriFieldTypeDate"):t.endTimeField=null}if(t.trackIdField){const e=p.get(t.trackIdField);t.trackIdField=e?e.name:null}t.startTimeField||t.endTimeField||(n.timeInfo=null)}return i}(s,t);this._locationInfo=i.locationInfo,this._delimiter=i.delimiter,this._queryEngine=this._createQueryEngine(i);const n=await this._createFeatures(s);this._queryEngine.featureStore.addMany(n);const{fullExtent:o,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=o,a){const{start:t,end:e}=a;i.layerDefinition.timeInfo.timeExtent=[t,e]}return i}async applyEdits(){throw new r.Z("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,n.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),t&&this._queryEngine.featureStore.addMany(t)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.D_)(t)||o.Z.getLogger("esri.layers.CSVLayer").error(new r.Z("csv-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:s}=this._loadOptions;if(!e)throw new r.Z("csv-layer:invalid-source","url not defined");const n=(0,l.mN)(e);return(await(0,i.default)(n.path,{query:{...n.query,...s},responseType:"text",signal:t})).data}_createQueryEngine(t){const{objectIdField:e,fields:s,extent:i,timeInfo:n}=t.layerDefinition,r=new p.Z({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new g.q({fields:s,geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:e,spatialReference:i.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(t){const{latitudeFieldName:e,longitudeFieldName:s}=this._locationInfo,{objectIdField:i,fieldsIndex:n,spatialReference:r}=this._queryEngine;let o=[];const a=[],l=n.fields.filter((t=>t.name!==i)).map((t=>t.name));let p=0;const _={};for(const t of n.fields)if("esriFieldTypeOID"!==t.type&&"esriFieldTypeGlobalID"!==t.type){const e=(0,b.os)(t);void 0!==e&&(_[t.name]=e)}const g=A(t,l,this._delimiter,(0,k.Dm)(_,i));for(const t of g){const r=this._parseCoordinateValue(t[e]),l=this._parseCoordinateValue(t[s]);if(null!=l&&null!=r&&!isNaN(r)&&!isNaN(l)){t[e]=r,t[s]=l;for(const i in t)if(i!==e&&i!==s)if(n.isDateField(i)){const e=new Date(t[i]);t[i]=T(e,t[i])?e.getTime():null}else if(n.isNumericField(i)){const e=Z(t[i]);isNaN(e)?t[i]=null:t[i]=e}t[i]=p,p++,o.push(new J(l,r)),a.push(t)}}if(!(0,u.fS)({wkid:4326},r))if((0,u.sS)(r))for(const t of o)[t.x,t.y]=(0,d.hG)(t.x,t.y,U);else o=(0,h.oj)(c.N,o,Y.Z.WGS84,r,null,null);const y=[];for(let t=0;t<o.length;t++){const{x:e,y:s}=o[t],n=a[t];n[i]=t+1,y.push(new f.u_(new m.Z([],[e,s]),n,null,n[i]))}return y}_parseCoordinateValue(t){if(null==t||""===t)return null;let e=Z(t);return(isNaN(e)||Math.abs(e)>181)&&(e=parseFloat(t)),e}async _checkProjection(t){try{await(0,_._W)(u.Zn,t)}catch{throw new r.Z("csv-layer:projection-not-supported","Projection not supported")}}}},25278:(t,e,s)=>{s.d(e,{Dm:()=>c,Hq:()=>u,MS:()=>d,bU:()=>a});var i=s(80442),n=s(22974),r=s(61159),o=s(58333);function a(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?o.I4:"esriGeometryPolyline"===t?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function c(t,e){if((0,i.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let s=`this.${e} = null;`;for(const e in t)s+=`this${l.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[e]:null,...t})}}function u(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},11282:(t,e,s)=>{s.d(e,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,n.mN)(t):(0,i.d9)(t)}function a(t,e,s){const i={};for(const n in t){if("declaredClass"===n)continue;const r=t[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let t=0;t<r.length;t++)i[n][t]=a(r[t])}else if("object"==typeof r)if(r.toJSON){const t=r.toJSON(s&&s[n]);i[n]=e?t:JSON.stringify(t)}else i[n]=e?r:JSON.stringify(r);else i[n]=r}return i}s(71058)},58333:(t,e,s)=>{s.d(e,{ET:()=>r,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>c,qP:()=>a,wW:()=>h});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7096,5732,9880],{99880:(t,e,s)=>{s.d(e,{V:()=>l});var i=s(68773),n=(s(3172),s(20102)),r=s(92604),o=s(17452);const a=r.Z.getLogger("esri.assets");function l(t){if(!i.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(i.default.assetsPath,t)}},5732:(t,e,s)=>{s.d(e,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},52138:(t,e,s)=>{s.d(e,{A:()=>p,a:()=>l,d:()=>m,e:()=>d,f:()=>f,g:()=>y,h:()=>x,i:()=>o,j:()=>v,k:()=>u,m:()=>h,s:()=>r,t:()=>a,w:()=>c,y:()=>S,z:()=>M});var i=s(65617),n=s(46851);function r(t,e,s,i,n,r,o,a,l,h,c,u,d,f,m,p,_){return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t[9]=c,t[10]=u,t[11]=d,t[12]=f,t[13]=m,t[14]=p,t[15]=_,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e){if(t===e){const s=e[1],i=e[2],n=e[3],r=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=s,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[11]=e[14],t[12]=n,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15],y=s*a-i*o,b=s*l-n*o,x=s*h-r*o,v=i*l-n*a,M=i*h-r*a,S=n*h-r*l,w=c*p-u*m,I=c*_-d*m,E=c*g-f*m,B=u*_-d*p,A=u*g-f*p,C=d*g-f*_;let z=y*C-b*A+x*B+v*E-M*I+S*w;return z?(z=1/z,t[0]=(a*C-l*A+h*B)*z,t[1]=(n*A-i*C-r*B)*z,t[2]=(p*S-_*M+g*v)*z,t[3]=(d*M-u*S-f*v)*z,t[4]=(l*E-o*C-h*I)*z,t[5]=(s*C-n*E+r*I)*z,t[6]=(_*x-m*S-g*b)*z,t[7]=(c*S-d*x+f*b)*z,t[8]=(o*A-a*E+h*w)*z,t[9]=(i*E-s*A-r*w)*z,t[10]=(m*M-p*x+g*y)*z,t[11]=(u*x-c*M-f*y)*z,t[12]=(a*I-o*B-l*w)*z,t[13]=(s*B-i*I+n*w)*z,t[14]=(p*b-m*v-_*y)*z,t[15]=(c*v-u*b+d*y)*z,t):null}function h(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=e[8],d=e[9],f=e[10],m=e[11],p=e[12],_=e[13],g=e[14],y=e[15];let b=s[0],x=s[1],v=s[2],M=s[3];return t[0]=b*i+x*a+v*u+M*p,t[1]=b*n+x*l+v*d+M*_,t[2]=b*r+x*h+v*f+M*g,t[3]=b*o+x*c+v*m+M*y,b=s[4],x=s[5],v=s[6],M=s[7],t[4]=b*i+x*a+v*u+M*p,t[5]=b*n+x*l+v*d+M*_,t[6]=b*r+x*h+v*f+M*g,t[7]=b*o+x*c+v*m+M*y,b=s[8],x=s[9],v=s[10],M=s[11],t[8]=b*i+x*a+v*u+M*p,t[9]=b*n+x*l+v*d+M*_,t[10]=b*r+x*h+v*f+M*g,t[11]=b*o+x*c+v*m+M*y,b=s[12],x=s[13],v=s[14],M=s[15],t[12]=b*i+x*a+v*u+M*p,t[13]=b*n+x*l+v*d+M*_,t[14]=b*r+x*h+v*f+M*g,t[15]=b*o+x*c+v*m+M*y,t}function c(t,e,s){const i=s[0],n=s[1],r=s[2];if(e===t)t[12]=e[0]*i+e[4]*n+e[8]*r+e[12],t[13]=e[1]*i+e[5]*n+e[9]*r+e[13],t[14]=e[2]*i+e[6]*n+e[10]*r+e[14],t[15]=e[3]*i+e[7]*n+e[11]*r+e[15];else{const s=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7],f=e[8],m=e[9],p=e[10],_=e[11];t[0]=s,t[1]=o,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=p,t[11]=_,t[12]=s*i+h*n+f*r+e[12],t[13]=o*i+c*n+m*r+e[13],t[14]=a*i+u*n+p*r+e[14],t[15]=l*i+d*n+_*r+e[15]}return t}function u(t,e,s){const i=s[0],n=s[1],r=s[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,s,i){let r,o,a,l,h,c,u,d,f,m,p,_,g,y,b,x,v,M,S,w,I,E,B,A,C=i[0],z=i[1],F=i[2],O=Math.sqrt(C*C+z*z+F*F);return O<(0,n.g)()?null:(O=1/O,C*=O,z*=O,F*=O,r=Math.sin(s),o=Math.cos(s),a=1-o,l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],f=e[5],m=e[6],p=e[7],_=e[8],g=e[9],y=e[10],b=e[11],x=C*C*a+o,v=z*C*a+F*r,M=F*C*a-z*r,S=C*z*a-F*r,w=z*z*a+o,I=F*z*a+C*r,E=C*F*a+z*r,B=z*F*a-C*r,A=F*F*a+o,t[0]=l*x+d*v+_*M,t[1]=h*x+f*v+g*M,t[2]=c*x+m*v+y*M,t[3]=u*x+p*v+b*M,t[4]=l*S+d*w+_*I,t[5]=h*S+f*w+g*I,t[6]=c*S+m*w+y*I,t[7]=u*S+p*w+b*I,t[8]=l*E+d*B+_*A,t[9]=h*E+f*B+g*A,t[10]=c*E+m*B+y*A,t[11]=u*E+p*B+b*A,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function m(t,e,s){if(0===e)return o(t);let i,r,a,l=s[0],h=s[1],c=s[2],u=Math.sqrt(l*l+h*h+c*c);return u<(0,n.g)()?null:(u=1/u,l*=u,h*=u,c*=u,i=Math.sin(e),r=Math.cos(e),a=1-r,t[0]=l*l*a+r,t[1]=h*l*a+c*i,t[2]=c*l*a-h*i,t[3]=0,t[4]=l*h*a-c*i,t[5]=h*h*a+r,t[6]=c*h*a+l*i,t[7]=0,t[8]=l*c*a+h*i,t[9]=h*c*a-l*i,t[10]=c*c*a+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function p(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=s,t[7]=0,t[8]=0,t[9]=-s,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=i+i,l=n+n,h=r+r,c=i*a,u=i*l,d=i*h,f=n*l,m=n*h,p=r*h,_=o*a,g=o*l,y=o*h;return t[0]=1-(f+p),t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-(c+p),t[6]=m+_,t[7]=0,t[8]=d+g,t[9]=m-_,t[10]=1-(c+f),t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}const g=(0,i.c)();function y(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=e[3],l=n+n,h=r+r,c=o+o,u=n*l,d=n*h,f=n*c,m=r*h,p=r*c,_=o*c,g=a*l,y=a*h,b=a*c,x=i[0],v=i[1],M=i[2];return t[0]=(1-(m+_))*x,t[1]=(d+b)*x,t[2]=(f-y)*x,t[3]=0,t[4]=(d-b)*v,t[5]=(1-(u+_))*v,t[6]=(p+g)*v,t[7]=0,t[8]=(f+y)*M,t[9]=(p-g)*M,t[10]=(1-(u+m))*M,t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}function b(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t[2]=e[2]-s[2],t[3]=e[3]-s[3],t[4]=e[4]-s[4],t[5]=e[5]-s[5],t[6]=e[6]-s[6],t[7]=e[7]-s[7],t[8]=e[8]-s[8],t[9]=e[9]-s[9],t[10]=e[10]-s[10],t[11]=e[11]-s[11],t[12]=e[12]-s[12],t[13]=e[13]-s[13],t[14]=e[14]-s[14],t[15]=e[15]-s[15],t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function v(t,e){if(t===e)return!0;const s=t[0],i=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],c=t[7],u=t[8],d=t[9],f=t[10],m=t[11],p=t[12],_=t[13],g=t[14],y=t[15],b=e[0],x=e[1],v=e[2],M=e[3],S=e[4],w=e[5],I=e[6],E=e[7],B=e[8],A=e[9],C=e[10],z=e[11],F=e[12],O=e[13],N=e[14],R=e[15],T=(0,n.g)();return Math.abs(s-b)<=T*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(i-x)<=T*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(r-v)<=T*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-M)<=T*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-S)<=T*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(l-w)<=T*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(h-I)<=T*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(c-E)<=T*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-B)<=T*Math.max(1,Math.abs(u),Math.abs(B))&&Math.abs(d-A)<=T*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(f-C)<=T*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(m-z)<=T*Math.max(1,Math.abs(m),Math.abs(z))&&Math.abs(p-F)<=T*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(_-O)<=T*Math.max(1,Math.abs(_),Math.abs(O))&&Math.abs(g-N)<=T*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(y-R)<=T*Math.max(1,Math.abs(y),Math.abs(R))}function M(t){const e=(0,n.g)(),s=t[0],i=t[1],r=t[2],o=t[4],a=t[5],l=t[6],h=t[8],c=t[9],u=t[10];return Math.abs(1-(s*s+o*o+h*h))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(r*r+l*l+u*u))<=e}function S(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const w=h,I=b;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t[2]=e[2]+s[2],t[3]=e[3]+s[3],t[4]=e[4]+s[4],t[5]=e[5]+s[5],t[6]=e[6]+s[6],t[7]=e[7]+s[7],t[8]=e[8]+s[8],t[9]=e[9]+s[9],t[10]=e[10]+s[10],t[11]=e[11]+s[11],t[12]=e[12]+s[12],t[13]=e[13]+s[13],t[14]=e[14]+s[14],t[15]=e[15]+s[15],t},adjoint:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],c=e[8],u=e[9],d=e[10],f=e[11],m=e[12],p=e[13],_=e[14],g=e[15];return t[0]=a*(d*g-f*_)-u*(l*g-h*_)+p*(l*f-h*d),t[1]=-(i*(d*g-f*_)-u*(n*g-r*_)+p*(n*f-r*d)),t[2]=i*(l*g-h*_)-a*(n*g-r*_)+p*(n*h-r*l),t[3]=-(i*(l*f-h*d)-a*(n*f-r*d)+u*(n*h-r*l)),t[4]=-(o*(d*g-f*_)-c*(l*g-h*_)+m*(l*f-h*d)),t[5]=s*(d*g-f*_)-c*(n*g-r*_)+m*(n*f-r*d),t[6]=-(s*(l*g-h*_)-o*(n*g-r*_)+m*(n*h-r*l)),t[7]=s*(l*f-h*d)-o*(n*f-r*d)+c*(n*h-r*l),t[8]=o*(u*g-f*p)-c*(a*g-h*p)+m*(a*f-h*u),t[9]=-(s*(u*g-f*p)-c*(i*g-r*p)+m*(i*f-r*u)),t[10]=s*(a*g-h*p)-o*(i*g-r*p)+m*(i*h-r*a),t[11]=-(s*(a*f-h*u)-o*(i*f-r*u)+c*(i*h-r*a)),t[12]=-(o*(u*_-d*p)-c*(a*_-l*p)+m*(a*d-l*u)),t[13]=s*(u*_-d*p)-c*(i*_-n*p)+m*(i*d-n*u),t[14]=-(s*(a*_-l*p)-o*(i*_-n*p)+m*(i*l-n*a)),t[15]=s*(a*d-l*u)-o*(i*d-n*u)+c*(i*l-n*a),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],s=t[1],i=t[2],n=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8],c=t[9],u=t[10],d=t[11],f=t[12],m=t[13],p=t[14],_=t[15];return(e*o-s*r)*(u*_-d*p)-(e*a-i*r)*(c*_-d*m)+(e*l-n*r)*(c*p-u*m)+(s*a-i*o)*(h*_-d*f)-(s*l-n*o)*(h*p-u*f)+(i*l-n*a)*(h*m-c*f)},equals:v,exactEquals:x,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=s+s,a=i+i,l=n+n,h=s*o,c=i*o,u=i*a,d=n*o,f=n*a,m=n*l,p=r*o,_=r*a,g=r*l;return t[0]=1-u-m,t[1]=c+g,t[2]=d-_,t[3]=0,t[4]=c-g,t[5]=1-h-m,t[6]=f+p,t[7]=0,t[8]=d+_,t[9]=f-p,t[10]=1-h-u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const s=g,i=-e[0],n=-e[1],r=-e[2],o=e[3],a=e[4],l=e[5],h=e[6],c=e[7],u=i*i+n*n+r*r+o*o;return u>0?(s[0]=2*(a*o+c*i+l*r-h*n)/u,s[1]=2*(l*o+c*n+h*i-a*r)/u,s[2]=2*(h*o+c*r+a*n-l*i)/u):(s[0]=2*(a*o+c*i+l*r-h*n),s[1]=2*(l*o+c*n+h*i-a*r),s[2]=2*(h*o+c*r+a*n-l*i)),_(t,e,s),t},fromRotation:m,fromRotationTranslation:_,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(t,e,s,i,n){const r=e[0],o=e[1],a=e[2],l=e[3],h=r+r,c=o+o,u=a+a,d=r*h,f=r*c,m=r*u,p=o*c,_=o*u,g=a*u,y=l*h,b=l*c,x=l*u,v=i[0],M=i[1],S=i[2],w=n[0],I=n[1],E=n[2],B=(1-(p+g))*v,A=(f+x)*v,C=(m-b)*v,z=(f-x)*M,F=(1-(d+g))*M,O=(_+y)*M,N=(m+b)*S,R=(_-y)*S,T=(1-(d+p))*S;return t[0]=B,t[1]=A,t[2]=C,t[3]=0,t[4]=z,t[5]=F,t[6]=O,t[7]=0,t[8]=N,t[9]=R,t[10]=T,t[11]=0,t[12]=s[0]+w-(B*w+z*I+N*E),t[13]=s[1]+I-(A*w+F*I+R*E),t[14]=s[2]+E-(C*w+O*I+T*E),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:f,fromXRotation:p,fromYRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=0,t[2]=-s,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=s,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=s,t[2]=0,t[3]=0,t[4]=-s,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,s,i,n,r,o){const a=1/(s-e),l=1/(n-i),h=1/(r-o);return t[0]=2*r*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*r*l,t[6]=0,t[7]=0,t[8]=(s+e)*a,t[9]=(n+i)*l,t[10]=(o+r)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*r*2*h,t[15]=0,t},getRotation:function(t,e){const s=e[0]+e[5]+e[10];let i=0;return s>0?(i=2*Math.sqrt(s+1),t[3]=.25*i,t[0]=(e[6]-e[9])/i,t[1]=(e[8]-e[2])/i,t[2]=(e[1]-e[4])/i):e[0]>e[5]&&e[0]>e[10]?(i=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/i,t[0]=.25*i,t[1]=(e[1]+e[4])/i,t[2]=(e[8]+e[2])/i):e[5]>e[10]?(i=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/i,t[0]=(e[1]+e[4])/i,t[1]=.25*i,t[2]=(e[6]+e[9])/i):(i=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/i,t[0]=(e[8]+e[2])/i,t[1]=(e[6]+e[9])/i,t[2]=.25*i),t},getScaling:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],c=e[10];return t[0]=Math.sqrt(s*s+i*i+n*n),t[1]=Math.sqrt(r*r+o*o+a*a),t[2]=Math.sqrt(l*l+h*h+c*c),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:S,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:M,lookAt:function(t,e,s,i){const r=e[0],a=e[1],l=e[2];let h=r-s[0],c=a-s[1],u=l-s[2];const d=(0,n.g)();if(Math.abs(h)<d&&Math.abs(c)<d&&Math.abs(u)<d)return void o(t);let f=1/Math.sqrt(h*h+c*c+u*u);h*=f,c*=f,u*=f;const m=i[0],p=i[1],_=i[2];let g=p*u-_*c,y=_*h-m*u,b=m*c-p*h;f=Math.sqrt(g*g+y*y+b*b),f?(f=1/f,g*=f,y*=f,b*=f):(g=0,y=0,b=0);let x=c*b-u*y,v=u*g-h*b,M=h*y-c*g;f=Math.sqrt(x*x+v*v+M*M),f?(f=1/f,x*=f,v*=f,M*=f):(x=0,v=0,M=0),t[0]=g,t[1]=x,t[2]=h,t[3]=0,t[4]=y,t[5]=v,t[6]=c,t[7]=0,t[8]=b,t[9]=M,t[10]=u,t[11]=0,t[12]=-(g*r+y*a+b*l),t[13]=-(x*r+v*a+M*l),t[14]=-(h*r+c*a+u*l),t[15]=1},mul:w,multiply:h,multiplyScalar:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12]*s,t[13]=e[13]*s,t[14]=e[14]*s,t[15]=e[15]*s,t},multiplyScalarAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t[2]=e[2]+s[2]*i,t[3]=e[3]+s[3]*i,t[4]=e[4]+s[4]*i,t[5]=e[5]+s[5]*i,t[6]=e[6]+s[6]*i,t[7]=e[7]+s[7]*i,t[8]=e[8]+s[8]*i,t[9]=e[9]+s[9]*i,t[10]=e[10]+s[10]*i,t[11]=e[11]+s[11]*i,t[12]=e[12]+s[12]*i,t[13]=e[13]+s[13]*i,t[14]=e[14]+s[14]*i,t[15]=e[15]+s[15]*i,t},ortho:function(t,e,s,i,n,r,o){const a=1/(e-s),l=1/(i-n),h=1/(r-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+s)*a,t[13]=(n+i)*l,t[14]=(o+r)*h,t[15]=1,t},perspective:function(t,e,s,i,n){const r=1/Math.tan(e/2);let o;return t[0]=r/s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(o=1/(i-n),t[10]=(n+i)*o,t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},perspectiveFromFieldOfView:function(t,e,s,i){const n=Math.tan(e.upDegrees*Math.PI/180),r=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+a),h=2/(n+r);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(o-a)*l*.5,t[9]=(n-r)*h*.5,t[10]=i/(s-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s/(s-i),t[15]=0,t},rotate:d,rotateX:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[4],o=e[5],a=e[6],l=e[7],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=r*n+h*i,t[5]=o*n+c*i,t[6]=a*n+u*i,t[7]=l*n+d*i,t[8]=h*n-r*i,t[9]=c*n-o*i,t[10]=u*n-a*i,t[11]=d*n-l*i,t},rotateY:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[8],c=e[9],u=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n-h*i,t[1]=o*n-c*i,t[2]=a*n-u*i,t[3]=l*n-d*i,t[8]=r*i+h*n,t[9]=o*i+c*n,t[10]=a*i+u*n,t[11]=l*i+d*n,t},rotateZ:function(t,e,s){const i=Math.sin(s),n=Math.cos(s),r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5],u=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*n+h*i,t[1]=o*n+c*i,t[2]=a*n+u*i,t[3]=l*n+d*i,t[4]=h*n-r*i,t[5]=c*n-o*i,t[6]=u*n-a*i,t[7]=d*n-l*i,t},scale:u,set:r,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:b,targetTo:function(t,e,s,i){const n=e[0],r=e[1],o=e[2],a=i[0],l=i[1],h=i[2];let c=n-s[0],u=r-s[1],d=o-s[2],f=c*c+u*u+d*d;f>0&&(f=1/Math.sqrt(f),c*=f,u*=f,d*=f);let m=l*d-h*u,p=h*c-a*d,_=a*u-l*c;return f=m*m+p*p+_*_,f>0&&(f=1/Math.sqrt(f),m*=f,p*=f,_*=f),t[0]=m,t[1]=p,t[2]=_,t[3]=0,t[4]=u*_-d*p,t[5]=d*m-c*_,t[6]=c*p-u*m,t[7]=0,t[8]=c,t[9]=u,t[10]=d,t[11]=0,t[12]=n,t[13]=r,t[14]=o,t[15]=1,t},translate:c,transpose:a},Symbol.toStringTag,{value:"Module"}))},46791:(t,e,s)=>{s.d(e,{Z:()=>z});var i,n=s(43697),r=s(3894),o=s(32448),a=s(50758),l=s(22974),h=s(71143);!function(t){t[t.ADD=1]="ADD",t[t.REMOVE=2]="REMOVE",t[t.MOVE=4]="MOVE"}(i||(i={}));var c,u=s(1654),d=s(75215),f=s(58971),m=s(5600),p=s(52421),_=s(52011),g=s(10661);class y{constructor(t,e,s,i,n){this.target=t,this.added=e,this.removed=s,this.start=i,this.deleteCount=n}}const b=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},void 0,(t=>{t.item=null,t.target=null,t.defaultPrevented=!1,t.cancellable=!1}));function x(t){return t?t instanceof C?t.toArray():t.length?Array.prototype.slice.apply(t):[]:[]}function v(t){if(t&&t.length)return t[0]}function M(t,e,s,i){const n=Math.min(t.length-s,e.length-i);let r=0;for(;r<n&&t[s+r]===e[i+r];)r++;return r}function S(t,e,s,i){e&&e.forEach(((e,n,r)=>{t.push(e),S(t,s.call(i,e,n,r),s,i)}))}const w=new Set,I=new Set,E=new Set,B=new Map;let A=0,C=c=class extends o.Z.EventedAccessor{static isCollection(t){return null!=t&&t instanceof c}constructor(t){super(t),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:A++})}normalizeCtorArgs(t){return t?Array.isArray(t)||t instanceof c?{items:t}:t:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(t){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,x(t)),this._emitAfterChanges(i.ADD))}hasEventListener(t){return"change"===t?this._chgListeners.length>0:this._emitter.hasEventListener(t)}on(t,e){if("change"===t){const t=this._chgListeners,s={removed:!1,callback:e};return t.push(s),this._notifications&&this._notifications.push({listeners:t.slice(),items:this._items.slice(),changes:[]}),(0,a.kB)((()=>{s.removed=!0,t.splice(t.indexOf(s),1)}))}return this._emitter.on(t,e)}once(t,e){return this.on(t,e)}add(t,e){if((0,f.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e??null);return this._splice(s,0,[t]),this._emitAfterChanges(i.ADD),this}addMany(t,e=this._items.length){if((0,f.it)(this._observable),!t||!t.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(e);return this._splice(s,0,x(t)),this._emitAfterChanges(i.ADD),this}at(t){if((0,f.it)(this._observable),(t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this._items[t]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const t=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),t}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(l.d9)})}concat(...t){(0,f.it)(this._observable);const e=t.map(x);return this._createNewInstance({items:this._items.concat(...e)})}drain(t,e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),n=s.length;for(let i=0;i<n;i++)t.call(e,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(t,e){return(0,f.it)(this._observable),this._items.every(t,e)}filter(t,e){let s;return(0,f.it)(this._observable),s=2===arguments.length?this._items.filter(t,e):this._items.filter(t),this._createNewInstance({items:s})}find(t,e){return(0,f.it)(this._observable),this._items.find(t,e)}findIndex(t,e){return(0,f.it)(this._observable),this._items.findIndex(t,e)}flatten(t,e){(0,f.it)(this._observable);const s=[];return S(s,this,t,e),new c(s)}forEach(t,e){return(0,f.it)(this._observable),this._items.forEach(t,e)}getItemAt(t){return(0,f.it)(this._observable),this._items[t]}getNextIndex(t){(0,f.it)(this._observable);const e=this.length;return(t=t??e)<0?t=0:t>e&&(t=e),t}includes(t,e=0){return(0,f.it)(this._observable),this._items.includes(t,e)}indexOf(t,e=0){return(0,f.it)(this._observable),this._items.indexOf(t,e)}join(t=","){return(0,f.it)(this._observable),this._items.join(t)}lastIndexOf(t,e=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(t,e)}map(t,e){(0,f.it)(this._observable);const s=this._items.map(t,e);return new c({items:s})}reorder(t,e=this.length-1){(0,f.it)(this._observable);const s=this.indexOf(t);if(-1!==s){if(e<0?e=0:e>=this.length&&(e=this.length-1),s!==e){if(this._emitBeforeChanges(i.MOVE))return t;this._splice(s,1),this._splice(e,0,[t]),this._emitAfterChanges(i.MOVE)}return t}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),t}push(...t){return(0,f.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,t),this._emitAfterChanges(i.ADD)),this.length}reduce(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(t,e):s.reduce(t)}reduceRight(t,e){(0,f.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(t,e):s.reduceRight(t)}remove(t){return(0,f.it)(this._observable),this.removeAt(this.indexOf(t))}removeAt(t){if((0,f.it)(this._observable),t<0||t>=this.length||this._emitBeforeChanges(i.REMOVE))return;const e=v(this._splice(t,1));return this._emitAfterChanges(i.REMOVE),e}removeMany(t){if((0,f.it)(this._observable),!t||!t.length||this._emitBeforeChanges(i.REMOVE))return[];const e=t instanceof c?t.toArray():t,s=this._items,n=[],r=e.length;for(let t=0;t<r;t++){const i=e[t],r=s.indexOf(i);if(r>-1){const i=1+M(e,s,t+1,r+1),o=this._splice(r,i);o&&o.length>0&&n.push.apply(n,o),t+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const t=this._splice(0,this.length);return t&&(t.reverse(),this._splice(0,0,t)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const t=v(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),t}slice(t=0,e=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(t,e)})}some(t,e){return(0,f.it)(this._observable),this._items.some(t,e)}sort(t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return arguments.length?e.sort(t):e.sort(),this._splice(0,0,e),this._emitAfterChanges(i.MOVE),this}splice(t,e,...s){(0,f.it)(this._observable);const n=(e?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(t,e,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...t){return(0,f.it)(this._observable),!t.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,t),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(t){return new this.constructor(t)}_splice(t,e,s){const i=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),t<0&&(t+=this.length),e){if(o=i.splice(t,e),this.hasEventListener("before-remove")){const e=b.acquire();e.target=this,e.cancellable=!0;for(let s=0,n=o.length;s<n;s++)r=o[s],e.reset(r),this.emit("before-remove",e),e.defaultPrevented&&(o.splice(s,1),i.splice(t,0,r),t+=1,s-=1,n-=1);b.release(e)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const t=b.acquire();t.target=this,t.cancellable=!1;const e=o.length;for(let s=0;s<e;s++)t.reset(o[s]),this.emit("after-remove",t);b.release(t)}}if(s&&s.length){if(n){const t=[];for(const e of s){const s=n.ensureType(e);null==s&&null!=e||t.push(s)}s=t}const e=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=t===this.length;if(e||r){const n=b.acquire();n.target=this,n.cancellable=!0;const a=b.acquire();a.target=this,a.cancellable=!1;for(const l of s)e?(n.reset(l),this.emit("before-add",n),n.defaultPrevented||(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),r&&(a.reset(l),this.emit("after-add",a)))):(o?i.push(l):i.splice(t++,0,l),this._set("length",i.length),a.reset(l),this.emit("after-add",a));b.release(a),b.release(n)}else{if(o)for(const t of s)i.push(t);else i.splice(t,0,...s);this._set("length",i.length)}}if((s&&s.length||o&&o.length)&&this._notifyChangeEvent(s,o),this.hasEventListener("after-splice")){const i=new y(this,s,o,t,e);this.emit("after-splice",i)}return o}_emitBeforeChanges(t){let e=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=t,this.emit("before-changes",s),e=s.defaultPrevented,b.release(s)}return e}_emitAfterChanges(t){if(this.hasEventListener("after-changes")){const e=b.acquire();e.target=this,e.cancellable=!1,e.type=t,this.emit("after-changes",e),b.release(e)}this._observable.notify()}_notifyChangeEvent(t,e){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:t,removed:e})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const t=this._notifications;this._notifications=null;for(const e of t){const t=e.changes;w.clear(),I.clear(),E.clear();for(const{added:e,removed:s}of t){if(e)if(0===E.size&&0===I.size)for(const t of e)w.add(t);else for(const t of e)I.has(t)?(E.add(t),I.delete(t)):E.has(t)||w.add(t);if(s)if(0===E.size&&0===w.size)for(const t of s)I.add(t);else for(const t of s)w.has(t)?w.delete(t):(E.delete(t),I.add(t))}const s=r.Z.acquire();w.forEach((t=>{s.push(t)}));const i=r.Z.acquire();I.forEach((t=>{i.push(t)}));const n=this._items,o=e.items,a=r.Z.acquire();if(E.forEach((t=>{o.indexOf(t)!==n.indexOf(t)&&a.push(t)})),e.listeners&&(s.length||i.length||a.length)){const t={target:this,added:s,removed:i,moved:a},n=e.listeners.length;for(let s=0;s<n;s++){const i=e.listeners[s];i.removed||i.callback.call(this,t)}}r.Z.release(s),r.Z.release(i),r.Z.release(a)}w.clear(),I.clear(),E.clear()}};C.ofType=t=>{if(!t)return c;if(B.has(t))return B.get(t);let e=null;if("function"==typeof t)e=t.prototype.declaredClass;else if(t.base)e=t.base.prototype.declaredClass;else for(const s in t.typeMap){const i=t.typeMap[s].prototype.declaredClass;e?e+=` | ${i}`:e=i}let s=class extends c{};return(0,n._)([(0,p.c)({Type:t,ensureType:"function"==typeof t?(0,d.se)(t):(0,d.N7)(t)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,_.j)(`esri.core.Collection<${e}>`)],s),B.set(t,s),s},(0,n._)([(0,m.Cb)()],C.prototype,"length",void 0),(0,n._)([(0,m.Cb)()],C.prototype,"items",null),C=c=(0,n._)([(0,_.j)("esri.core.Collection")],C);const z=C},32448:(t,e,s)=>{s.d(e,{Z:()=>l});var i=s(43697),n=s(92036),r=s(50758),o=s(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}}!function(t){class e{constructor(t=null){this._target=t,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(t,e){const s=this._listenersMap&&this._listenersMap.get(t);if(!s)return!1;const i=this._target||this;return[...s].forEach((t=>{t.call(i,e)})),s.length>0}on(t,e){if(Array.isArray(t)){const s=t.map((t=>this.on(t,e)));return(0,r.AL)(s)}if(t.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(t)||[];return s.push(e),this._listenersMap.set(t,s),(0,r.kB)((()=>{const s=this._listenersMap&&this._listenersMap.get(t)||[],i=s.indexOf(e);i>=0&&s.splice(i,1)}))}once(t,e){const s=this.on(t,(t=>{s.remove(),e.call(null,t)}));return s}hasEventListener(t){const e=this._listenersMap&&this._listenersMap.get(t);return null!=e&&e.length>0}}t.EventEmitter=e,t.EventedMixin=t=>{let s=class extends t{constructor(){super(...arguments),this._emitter=new e}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};return s=(0,i._)([(0,o.j)("esri.core.Evented")],s),s};let s=class extends n.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};s=(0,i._)([(0,o.j)("esri.core.Evented")],s),t.EventedAccessor=s}(a||(a={}));const l=a},13867:(t,e,s)=>{s.d(e,{z:()=>n});var i=s(69801);class n{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,s)=>{s.d(e,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(t,e,s){this.name=t,this._storage=e,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,s,i=0){this._storage.put(this,t,e,s,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,s){this._storage.updateSize(this,t,e,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,s,n,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==s&&this._notifyRemove(e,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(e,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return void console.warn("Refusing to cache entry with invalid size "+n);const a=1+Math.max(r,-3)- -3;this._db.set(e,{entry:s,size:n,lifetime:a,lives:a}),this._size+=n,t.size+=n,this._checkSizeLimits()}updateSize(t,e,s,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===s){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,s,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach(((t,i)=>{const n=t.lifetime;s[n]=(s[n]||0)+t.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=e[r]||0;e[r]=s+t.size}}))}));const i={};this._users.forAll((t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[s]||0;e[s]=n,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(e);n.sort(((t,s)=>e[s]-e[t])),n.forEach((s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]));for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s){let i;return this._removeFuncs.some((n=>{if(t.startsWith(n[0])){const t=n[1](e,s);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,s]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,s,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,s=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const n=this._notifyRemove(t,e.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let l=0},52421:(t,e,s)=>{function i(t){return(e,s)=>{e[s]=t}}s.d(e,{c:()=>i})},10661:(t,e,s)=>{s.d(e,{s:()=>n});var i=s(42100);class n extends i.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},66643:(t,e,s)=>{s.d(e,{Ed:()=>h,UI:()=>c,mt:()=>m,q6:()=>f,vr:()=>p});var i=s(43697),n=s(92036),r=s(70586),o=s(95330),a=s(5600),l=s(52011);function h(t,e,s){return(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))}async function c(t,e,s){return(await(0,o.as)(t.map(((t,i)=>e.apply(s,[t,i]))))).map((t=>t.value))}function u(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return u(await t)}catch(t){return d(t)}}async function m(t){try{return u(await t)}catch(t){return(0,o.r9)(t),d(t)}}function p(t,e){return new _(t,e)}let _=class extends n.Z{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=t(s),this.promise.then((t=>{this._result=u(t),this._cleanup()}),(t=>{this._result=d(t),this._cleanup()})),this._abortHandle=(0,o.fu)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],_.prototype,"value",null),(0,i._)([(0,a.Cb)()],_.prototype,"error",null),(0,i._)([(0,a.Cb)()],_.prototype,"finished",null),(0,i._)([(0,a.Cb)()],_.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],_.prototype,"_result",void 0),_=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],_)},24133:(t,e,s)=>{s.d(e,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=u,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),b.prune(),x.prune(),v.prune(),M.prune()}all(t){this._all(this._data,t)}search(t,e){let s=this._data;const i=this._toBBox;if(g(t,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;g(t,o)&&(s.leaf?e(r):_(t,o)?this._all(r,e):b.push(r))}s=b.pop()}}collides(t){let e=this._data;const s=this._toBBox;if(!g(t,e))return!1;for(b.clear();e;){for(let i=0,n=e.children.length;i<n;i++){const n=e.children[i],r=e.leaf?s(n):n;if(g(t,r)){if(e.leaf||_(t,r))return!0;b.push(n)}}e=b.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,s=t.length;e<s;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(t){if(!t)return this;let e,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(t);for(v.clear(),M.clear();s||v.length>0;){if(s||(s=v.pop(),n=v.data[v.length-1],r=M.pop()??0,o=!0),s.leaf&&(e=(0,i.cq)(s.children,t,s.children.length,s.indexHint),-1!==e))return s.children.splice(e,1),v.push(s),this._condense(v),this;o||s.leaf||!_(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(v.push(s),M.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let s=t;for(x.clear();s;){if(!0===s.leaf)for(const t of s.children)e(t);else x.pushArray(s.children);s=x.pop()??null}}_build(t,e,s,i){const n=s-e+1;let r=this._maxEntries;if(n<=r){const i=new I(t.slice(e,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new E([]);o.height=i;const l=Math.ceil(n/r),h=l*Math.ceil(Math.sqrt(r));y(t,e,s,h,this._compareMinX);for(let n=e;n<=s;n+=h){const e=Math.min(n+h-1,s);y(t,n,e,l,this._compareMinY);for(let s=n;s<=e;s+=l){const n=Math.min(s+l-1,e);o.children.push(this._build(t,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(t,e,s,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=d(o),l=m(t,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}e=s||e.children[0]}return e}_insert(t,e,s){const i=this._toBBox,n=s?t:i(t);v.clear();const r=this._chooseSubtree(n,this._data,e,v);for(r.children.push(t),h(r,n);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(n,v,e)}_split(t,e){const s=t.data[e],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new I(o):new E(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(s,l)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,s){let i,n,r;i=n=1/0;for(let o=e;o<=s-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,s,this._toBBox),h=p(e,a),c=d(e)+d(a);h<i?(i=h,r=o,n=c<n?c:n):h===i&&c<n&&(n=c,r=o)}return r}_chooseSplitAxis(t,e,s){const i=t.leaf?this._compareMinX:c,n=t.leaf?this._compareMinY:u;this._allDistMargin(t,e,s,i)<this._allDistMargin(t,e,s,n)&&t.children.sort(i)}_allDistMargin(t,e,s,i){t.children.sort(i);const n=this._toBBox,r=l(t,0,e,n),o=l(t,s-e,s,n);let a=f(r)+f(o);for(let i=e;i<s-e;i++){const e=t.children[i];h(r,t.leaf?n(e):e),a+=f(r)}for(let i=s-e-1;i>=e;i--){const e=t.children[i];h(o,t.leaf?n(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,s){for(let i=s;i>=0;i--)h(e.data[i],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const s=t.data[e];if(0===s.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<s;o++)r=t.children[o],h(n,t.leaf?i(r):r);return n}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){const s=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t,e,s,i,n){const o=[e,s];for(;o.length;){const e=o.pop(),s=o.pop();if(e-s<=i)continue;const a=s+Math.ceil((e-s)/i/2)*i;(0,r.q)(t,a,s,e,n),o.push(s,a,a,e)}}const b=new n.Z,x=new n.Z,v=new n.Z,M=new n.Z({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class w extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class I extends w{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends w{constructor(t){super(),this.children=t,this.leaf=!1}}},14808:(t,e,s)=>{s.d(e,{Qc:()=>c,WU:()=>a,lt:()=>h});var i=s(19153),n=s(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(t=(0,n.Kd)()){let e=(t=t.toLowerCase())in r;if(!e){const s=t.split("-");s.length>1&&s[0]in r&&(t=s[0],e=!0),e||(t="en")}const[s,i,o="#,##0.###"]=r[t];return{decimal:s,group:i,pattern:o}}function a(t,e){const s=o((e={...e}).locale);e.customs=s;const i=e.pattern||s.pattern;return isNaN(t)||Math.abs(t)===1/0?null:function(t,e,s){const i=(s=s||{}).customs.group,n=s.customs.decimal,r=e.split(";"),o=r[0];if((e=r[t<0?1:0]||"-"+o).includes("%"))t*=100;else if(e.includes("‰"))t*=1e3;else{if(e.includes("¤"))throw new Error("currency notation not supported");if(e.includes("E"))throw new Error("exponential notation not supported")}const a=l,h=o.match(a);if(!h)throw new Error("unable to find a number expression in pattern: "+e);return!1===s.fractional&&(s.places=0),e.replace(a,function(t,e,s){!0===(s=s||{}).places&&(s.places=0),s.places===1/0&&(s.places=6);const i=e.split("."),n="string"==typeof s.places&&s.places.indexOf(",");let r=s.places;n?r=s.places.substring(n+1):+r>=0||(r=(i[1]||[]).length),s.round<0||(t=Number(t.toFixed(Number(r))));const o=String(Math.abs(t)).split("."),a=o[1]||"";if(i[1]||s.places){n&&(s.places=s.places.substring(0,n));const t=void 0!==s.places?s.places:i[1]&&i[1].lastIndexOf("0")+1;+t>a.length&&(o[1]=a.padEnd(Number(t),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=i[0].replace(",","");let h=l.indexOf("0");-1!==h&&(h=l.length-h,h>o[0].length&&(o[0]=o[0].padStart(h,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-h)));let c,u,d=i[0].lastIndexOf(",");if(-1!==d){c=i[0].length-d-1;const t=i[0].substr(0,d);d=t.lastIndexOf(","),-1!==d&&(u=t.length-d-1)}const f=[];for(let t=o[0];t;){const e=t.length-c;f.push(e>0?t.substr(e):t),t=e>0?t.slice(0,e):"",u&&(c=u,u=void 0)}return o[0]=f.reverse().join(s.group||","),o.join(s.decimal||".")}(t,h[0],{decimal:n,group:i,places:s.places,round:s.round}))}(t,i,e)}const l=/[#0,]*[#0](?:\.0*#*)?/;function h(t){const e=o((t=t||{}).locale),s=t.pattern||e.pattern,n=e.group,r=e.decimal;let a=1;if(s.includes("%"))a/=100;else if(s.includes("‰"))a/=1e3;else if(s.includes("¤"))throw new Error("currency notation not supported");const h=s.split(";");1===h.length&&h.push("-"+h[0]);const c=d(h,(e=>(e="(?:"+(0,i.Qs)(e,".")+")").replace(l,(e=>{const s={signed:!1,separator:t.strict?n:[n,""],fractional:t.fractional,decimal:r,exponent:!1},i=e.split(".");let o=t.places;1===i.length&&1!==a&&(i[1]="###"),1===i.length||0===o?s.fractional=!1:(void 0===o&&(o=t.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==t.fractional&&(s.fractional=!0),!t.places&&+o<i[1].length&&(o+=","+i[1].length),s.places=o);const l=i[0].split(",");return l.length>1&&(s.groupSize=l.pop().length,l.length>1&&(s.groupSize2=l.pop().length)),"("+function(t){"places"in(t=t||{})||(t.places=1/0),"string"!=typeof t.decimal&&(t.decimal="."),"fractional"in t&&!/^0/.test(String(t.places))||(t.fractional=[!0,!1]),"exponent"in t||(t.exponent=[!0,!1]),"eSigned"in t||(t.eSigned=[!0,!1]);const e=u(t),s=d(t.fractional,(e=>{let s="";return e&&0!==t.places&&(s="\\"+t.decimal,t.places===1/0?s="(?:"+s+"\\d+)?":s+="\\d{"+t.places+"}"),s}),!0);let i=e+s;return s&&(i="(?:(?:"+i+")|(?:"+s+"))"),i+d(t.exponent,(e=>e?"([eE]"+u({signed:t.eSigned})+")":""))}(s)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function c(t,e){const s=h(e),i=new RegExp("^"+s.regexp+"$").exec(t);if(!i)return NaN;let n=i[1];if(!i[1]){if(!i[2])return NaN;n=i[2],s.factor*=-1}return n=n.replaceAll(new RegExp("["+s.group+"\\s\\xa0]","g"),"").replace(s.decimal,"."),Number(n)*s.factor}function u(t){return"signed"in(t=t||{})||(t.signed=[!0,!1]),"separator"in t?"groupSize"in t||(t.groupSize=3):t.separator="",d(t.signed,(t=>t?"[-+]":""),!0)+d(t.separator,(e=>{if(!e)return"(?:\\d+)";" "===(e=(0,i.Qs)(e))?e="\\s":" "===e&&(e="\\s\\xa0");const s=t.groupSize,n=t.groupSize2;if(n){const t="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+e+"]\\d{"+n+"})*["+e+"]\\d{"+s+"})";return s-n>0?"(?:"+t+"|(?:0|[1-9]\\d{0,"+(s-1)+"}))":t}return"(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+e+"]\\d{"+s+"})*)"}),!0)}const d=(t,e,s)=>{if(!(t instanceof Array))return e(t);const i=[];for(let s=0;s<t.length;s++)i.push(e(t[s]));return f(i.join("|"),Boolean(s))},f=(t,e)=>"("+(e?"?:":"")+t+")"},17445:(t,e,s)=>{s.d(e,{N1:()=>d,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>_,on:()=>u,tX:()=>g}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(t,e,s={}){return c(t,e,s,f)}function h(t,e,s={}){return c(t,e,s,m)}function c(t,e,s={},i){let n=null;const o=s.once?(t,s)=>{i(t)&&((0,r.hw)(n),e(t,s))}:(t,s)=>{i(t)&&e(t,s)};if(n=(0,a.aQ)(t,o,s.sync,s.equals),s.initial){const e=t();o(e,e)}return n}function u(t,e,s,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(c),s(t)}const f=l(t,((t,s)=>{u(),(0,i.vT)(t)&&(a=t,h=(0,i.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return c=(0,n.kB)((()=>{f.remove(),u()})),c}function d(t,e){return function(t,e,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),c(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??f)])}))}(t,m,e)}function f(t){return!0}function m(t){return!!t}s(87538);const p={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},16306:(t,e,s)=>{s.d(e,{aX:()=>M});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),l=s(73913),h=s(8744),c=s(40488),u=(s(66577),s(3172)),d=s(33955),f=s(11282),m=s(17452);async function p(t,e,s){const i="string"==typeof t?(0,m.mN)(t):t,n=e[0].spatialReference,r=(0,d.Ji)(e[0]),o={...s,query:{...i.query,f:"json",sr:n.wkid??JSON.stringify(n),geometries:JSON.stringify((l=e,{geometryType:(0,d.Ji)(l[0]),geometries:l.map((t=>t.toJSON()))}))}},{data:a}=await(0,u.default)(i.path+"/simplify",o);var l;return function(t,e,s){const i=(0,d.q9)(e);return t.map((t=>{const e=i.fromJSON(t);return e.spatialReference=s,e}))}(a.geometries,r,n)}const _=r.Z.getLogger("esri.geometry.support.normalizeUtils");function g(t){return"polygon"===t[0].type}function y(t){return"polyline"===t[0].type}function b(t,e,s){if(e){const e=function(t,e){if(!(t instanceof a.Z||t instanceof o.Z)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw _.error(t),new n.Z(t)}const s=(0,l.x3)(t),i=[];for(const t of s){const s=[];i.push(s),s.push([t[0][0],t[0][1]]);for(let i=0;i<t.length-1;i++){const n=t[i][0],r=t[i][1],o=t[i+1][0],a=t[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),h=(a-r)/l,c=(o-n)/l,u=l/e;if(u>1){for(let t=1;t<=u-1;t++){const i=t*e,o=c*i+n,a=h*i+r;s.push([o,a])}const t=(l+Math.floor(u-1)*e)/2,i=c*t+n,o=h*t+r;s.push([i,o])}s.push([o,a])}}return function(t){return"polygon"===t.type}(t)?new o.Z({rings:i,spatialReference:t.spatialReference}):new a.Z({paths:i,spatialReference:t.spatialReference})}(t,1e6);t=(0,c.Sx)(e,!0)}return s&&(t=(0,l.Sy)(t,s)),t}function x(t,e,s){if(Array.isArray(t)){const i=t[0];if(i>e){const s=(0,l.XZ)(i,e);t[0]=i+s*(-2*e)}else if(i<s){const e=(0,l.XZ)(i,s);t[0]=i+e*(-2*s)}}else{const i=t.x;if(i>e){const s=(0,l.XZ)(i,e);t=t.clone().offset(s*(-2*e),0)}else if(i<s){const e=(0,l.XZ)(i,s);t=t.clone().offset(e*(-2*s),0)}}return t}function v(t,e){let s=-1;for(let i=0;i<e.cutIndexes.length;i++){const n=e.cutIndexes[i],r=e.geometries[i],o=(0,l.x3)(r);for(let t=0;t<o.length;t++){const e=o[t];e.some((s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const i=e[t][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.XZ)(s,180);for(let s=0;s<e.length;s++){const e=r.getPoint(t,s);r.setPoint(t,s,e.clone().offset(i,0))}return!0}}))}if(n===s){if(g(t))for(const e of(0,l.x3)(r))t[n]=t[n].addRing(e);else if(y(t))for(const e of(0,l.x3)(r))t[n]=t[n].addPath(e)}else s=n,t[n]=r}return t}async function M(t,e,s){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&_.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??i.default.geometryServiceUrl;let r,m,g,y,S,w,I,E,B=0;const A=[],C=[];for(const e of t)if(null!=e)if(r||(r=e.spatialReference,m=(0,h.C5)(r),g=r.isWebMercator,w=g?102100:4326,y=l.UZ[w].maxX,S=l.UZ[w].minX,I=l.UZ[w].plus180Line,E=l.UZ[w].minus180Line),m)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(x(e.clone(),y,S));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map((t=>x(t,y,S))),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,m);C.push(t.rings?new o.Z(t):t)}else if(e.extent){const t=e.extent,s=(0,l.XZ)(t.xmin,S)*(2*y);let i=0===s?e.clone():(0,l.Sy)(e.clone(),s);t.offset(s,0),t.intersects(I)&&t.xmax!==y?(B=t.xmax>B?t.xmax:B,i=b(i,g),A.push(i),C.push("cut")):t.intersects(E)&&t.xmin!==S?(B=t.xmax*(2*y)>B?t.xmax*(2*y):B,i=b(i,g,360),A.push(i),C.push("cut")):C.push(i)}else C.push(e.clone());else C.push(e);else C.push(e);let z=(0,l.XZ)(B,y),F=-90;const O=z,N=new a.Z;for(;z>0;){const t=360*z-180;N.addPath([[t,F],[t,-1*F]]),F*=-1,z--}if(A.length>0&&O>0){const e=v(A,await async function(t,e,s,i){const n=(0,f.en)(t),r=e[0].spatialReference,o={...i,query:{...n.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,d.Ji)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},a=await(0,u.default)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((t=>{const e=(0,d.im)(t);return e.spatialReference=r,e}))}}(n,A,N,s)),i=[],r=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)r.push(n);else{const n=e.shift(),o=t[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(g?(0,c.$)(n):n)}}if(!i.length)return r;const o=await p(n,i,s),a=[];for(let t=0;t<r.length;t++){const e=r[t];"simplify"!==e?a.push(e):a.push(g?(0,c.$)(o.shift()):o.shift())}return a}const R=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)R.push(e);else{const t=A.shift();R.push(!0===g?(0,c.$)(t):t)}}return R}},73913:(t,e,s)=>{s.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const s=h(t);for(const t of s)for(const s of t)s[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},70171:(t,e,s)=>{s.d(e,{G3:()=>l,Kd:()=>a,Ze:()=>d,qe:()=>c});var i=s(50758);let n;const r=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return r??globalThis.navigator?.language??"en"}function a(){return void 0===n&&(n=o()),n}function l(t=a()){const e=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(t);return e?.[1].toLowerCase()}const h=[];function c(t){return h.push(t),(0,i.kB)((()=>h.splice(h.indexOf(t),1)))}const u=[];function d(t){return u.push(t),(0,i.kB)((()=>h.splice(u.indexOf(t),1)))}globalThis.addEventListener?.("languagechange",(function(){const t=o();n!==t&&(n=t,[...u].forEach((e=>{e.call(null,t)})),[...h].forEach((e=>{e.call(null,t)})))}))},37549:(t,e,s)=>{s.d(e,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((s,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,s){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,s)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(t,e,s)=>{s.d(e,{Z:()=>_});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),h=s(37549),c=s(29730),u=s(70272),d=s(5428);const f={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new u.u_(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,c.Y)(new d.Z,t.geometry,e.hasZ,e.hasM)),t.centroid)};var m=s(11490);const p=(0,o.Ue)();class _{constructor(t){this.geometryInfo=t,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,s,i,n]=this.fullBounds;return{xmin:e,ymin:s,xmax:i,ymax:n,spatialReference:(0,m.S2)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const s of t){const t=this._boundsStore.get(s.objectId);t&&e((0,o.JR)(p,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,s)=>{this._markedIds.has(s)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:t}));const s=this._featuresById.get(e);let n;if(this._markedIds.add(e),s?(t.displayId=s.displayId,n=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),null==t.geometry||!t.geometry.coords||!t.geometry.coords.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);n=(0,l.$)(null!=n?n:(0,a.Ue)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(e,n),this._featuresById.set(e,t)}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},27793:(t,e,s)=>{s.r(e),s.d(e,{default:()=>J}),s(66577);var i=s(3172),n=s(66643),r=s(20102),o=s(92604),a=s(95330),l=s(17452),h=s(44547),c=s(37455),u=s(8744),d=s(40488),f=s(70272),m=s(5428),p=s(57191),_=s(37427),g=s(64106),y=s(14808),b=s(35671);const x=/^\s*"([\S\s]*)"\s*$/,v=/""/g,M="\n",S=[","," ",";","|","\t"];function*w(t,e,s){let i=0;for(;i<=t.length;){const n=t.indexOf(e,i),r=t.substring(i,n>-1?n:void 0);i+=r.length+e.length,s&&!r.trim()||(yield r)}}function I(t){const e=t.includes("\r\n")?"\r\n":M;return w(t,e,!0)}function E(t,e){return w(t,e,!1)}function B(t,e,s){t=t.trim(),e=e?.trim();const i=[],n=Array.from(new Set([s?.delimiter,...S])).filter((t=>null!=t));for(const s of n){const n=z(t,s).length,r=z(e,s).length??n;n>1&&i.push({weight:Math.min(n,r),delimiter:s})}const r=i.sort((({weight:t},{weight:e})=>e-t)).map((({delimiter:t})=>t));for(const e of r){const i=O(C(t,e).names,s?.longitudeField,s?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:e,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*A(t,e,s,i=(()=>Object.create(null))){const n=I(t);n.next();let r="",o="",a=0,l=i(),h=0;t:for(const t of n){const n=E(t,s);for(const t of n)if(r+=o+t,o="",a+=F(t),a%2==0){if(a>0){const t=x.exec(r);if(!t){l=i(),h=0,r="",a=0;continue t}l[e[h]]=t[1].replaceAll(v,'"'),h++}else l[e[h]]=r,h++;r="",a=0}else o=s;0===a?(yield l,l=i(),h=0):o=M}}function C(t,e){const s=z(t,e).filter((t=>null!=t)),i=s.map((t=>(0,b.q6)(t)));for(let t=i.length-1;t>=0;t--)i[t]||(i.splice(t,1),s.splice(t,1));return{names:i,aliases:s}}function z(t,e){if(!t?.length)return[];const s=[];let i="",n="",r=0;const o=E(t,e);for(const t of o)if(i+=n+t,n="",r+=F(t),r%2==0){if(r>0){const t=x.exec(i);t&&s.push(t[1].replaceAll(v,'"'))}else s.push(i);i="",r=0}else n=e;return s}function F(t){let e=0,s=0;for(s=t.indexOf('"',s);s>=0;)e++,s=t.indexOf('"',s+1);return e}function O(t,e,s){e=(0,b.q6)(e)?.toLowerCase(),s=(0,b.q6)(s)?.toLowerCase();const i=t.map((t=>t.toLowerCase())),n=e?t[i.indexOf(e)]:null,r=s?t[i.indexOf(s)]:null;return{longitudeFieldName:n||t[i.indexOf(X.find((t=>i.includes(t))))],latitudeFieldName:r||t[i.indexOf(D.find((t=>i.includes(t))))]}}function N(t,e,s,i,n){const r=[],o=A(t,s,e),a=[];for(const t of o){if(10===a.length)break;a.push(t)}for(let t=0;t<s.length;t++){const e=s[t],o=i[t];if(e===n.longitudeFieldName||e===n.latitudeFieldName)r.push({name:e,type:"esriFieldTypeDouble",alias:o});else{let t,s;switch(R(a.map((t=>t[e])))){case"integer":t="esriFieldTypeInteger";break;case"double":t="esriFieldTypeDouble";break;case"date":t="esriFieldTypeDate",s=36;break;default:t="esriFieldTypeString",s=255}r.push({name:e,type:t,alias:o,length:s})}}return r}function R(t){if(!t.length)return"string";const e=/[^+-.,0-9]/;return t.map((t=>{let s=!1;if(""!==t){if(e.test(t))s=!0;else{let e=Z(t);if(!isNaN(e))return/[.,]/.test(t)||!Number.isInteger(e)||e>214783647||e<-214783648?"double":"integer";if(t.includes("E")){if(e=Number(t),!isNaN(e))return"double";if(t.includes(",")){if(t=t.replace(",","."),e=Number(t),!isNaN(e))return"double";s=!0}else s=!0}else s=!0}return s?/^[-]?\d*[.,]?\d*$/.test(t)?"string":T(new Date(t),t)?"date":"string":"string"}})).reduce(((t,e)=>void 0===t?e:void 0===e?t:t===e?e:"string"===t||"string"===e?"string":"double"===t||"double"===e?"double":void 0))}function T(t,e){if(!t||"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))return!1;let s=!0;if(!q&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,i=0;for(;!e&&i<=t.length;)e=!L.test(t[i]),i++;s=!e}}return s}const Z=function(){const t=(0,y.lt)(),e=new RegExp("^"+t.regexp+"$"),s=new RegExp("["+t.group+"\\s\\xa0]","g"),i=t.factor;return n=>{const r=e.exec(n);if(t.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],t.factor*=-1}return o=o.replace(s,"").replace(t.decimal,"."),+o*t.factor}}(),L=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,q=Number.isNaN(new Date("technology 10").getTime()),D=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],X=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var k=s(25278),j=s(99514),Y=s(82971);const P=(0,k.bU)("esriGeometryPoint"),V=["csv"],U=[0,0];class ${constructor(t,e){this.x=t,this.y=e}}class J{constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(t,e={}){this._loadOptions=t;const[s]=await Promise.all([this._fetch(e.signal),this._checkProjection(t?.parsingOptions?.spatialReference)]),i=function(t,e){const s=e.parsingOptions||{},i={delimiter:s.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:s.latitudeField,longitudeFieldName:s.longitudeField}},n=i.layerDefinition={name:(0,l.vt)(e.url,V)||"csv",drawingInfo:P,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:s.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:s.spatialReference||{wkid:4326}}},o=I(t),a=o.next().value?.trim(),h=o.next().value?.trim();if(!a)throw new r.Z("csv-layer:empty-csv","CSV is empty",{csv:t});const{delimiter:c,locationInfo:u}=B(a,h,s);if(!c)throw new r.Z("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:h,parsingOptions:s});if(!u)throw new r.Z("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:h,parsingOptions:s});i.locationInfo=u,i.delimiter=c;const{names:d,aliases:f}=C(a,c),m=N(t,i.delimiter,d,f,i.locationInfo);if(s.fields?.length){const t=new j.Z(s.fields);for(const e of m){const s=t.get(e.name);s&&Object.assign(e,s)}}if(!m.some((t=>"esriFieldTypeOID"===t.type&&(n.objectIdField=t.name,!0)))){const t={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=t.name,m.unshift(t)}n.fields=m;const p=new j.Z(n.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=p.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=p.get(i.locationInfo.longitudeFieldName).name),n.timeInfo){const t=n.timeInfo;if(t.startTimeField){const e=p.get(t.startTimeField);e?(t.startTimeField=e.name,e.type="esriFieldTypeDate"):t.startTimeField=null}if(t.endTimeField){const e=p.get(t.endTimeField);e?(t.endTimeField=e.name,e.type="esriFieldTypeDate"):t.endTimeField=null}if(t.trackIdField){const e=p.get(t.trackIdField);t.trackIdField=e?e.name:null}t.startTimeField||t.endTimeField||(n.timeInfo=null)}return i}(s,t);this._locationInfo=i.locationInfo,this._delimiter=i.delimiter,this._queryEngine=this._createQueryEngine(i);const n=await this._createFeatures(s);this._queryEngine.featureStore.addMany(n);const{fullExtent:o,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=o,a){const{start:t,end:e}=a;i.layerDefinition.timeInfo.timeExtent=[t,e]}return i}async applyEdits(){throw new r.Z("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,n.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),t&&this._queryEngine.featureStore.addMany(t)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.D_)(t)||o.Z.getLogger("esri.layers.CSVLayer").error(new r.Z("csv-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:s}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:s}=this._loadOptions;if(!e)throw new r.Z("csv-layer:invalid-source","url not defined");const n=(0,l.mN)(e);return(await(0,i.default)(n.path,{query:{...n.query,...s},responseType:"text",signal:t})).data}_createQueryEngine(t){const{objectIdField:e,fields:s,extent:i,timeInfo:n}=t.layerDefinition,r=new p.Z({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new g.q({fields:s,geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:e,spatialReference:i.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(t){const{latitudeFieldName:e,longitudeFieldName:s}=this._locationInfo,{objectIdField:i,fieldsIndex:n,spatialReference:r}=this._queryEngine;let o=[];const a=[],l=n.fields.filter((t=>t.name!==i)).map((t=>t.name));let p=0;const _={};for(const t of n.fields)if("esriFieldTypeOID"!==t.type&&"esriFieldTypeGlobalID"!==t.type){const e=(0,b.os)(t);void 0!==e&&(_[t.name]=e)}const g=A(t,l,this._delimiter,(0,k.Dm)(_,i));for(const t of g){const r=this._parseCoordinateValue(t[e]),l=this._parseCoordinateValue(t[s]);if(null!=l&&null!=r&&!isNaN(r)&&!isNaN(l)){t[e]=r,t[s]=l;for(const i in t)if(i!==e&&i!==s)if(n.isDateField(i)){const e=new Date(t[i]);t[i]=T(e,t[i])?e.getTime():null}else if(n.isNumericField(i)){const e=Z(t[i]);isNaN(e)?t[i]=null:t[i]=e}t[i]=p,p++,o.push(new $(l,r)),a.push(t)}}if(!(0,u.fS)({wkid:4326},r))if((0,u.sS)(r))for(const t of o)[t.x,t.y]=(0,d.hG)(t.x,t.y,U);else o=(0,h.oj)(c.N,o,Y.Z.WGS84,r,null,null);const y=[];for(let t=0;t<o.length;t++){const{x:e,y:s}=o[t],n=a[t];n[i]=t+1,y.push(new f.u_(new m.Z([],[e,s]),n,null,n[i]))}return y}_parseCoordinateValue(t){if(null==t||""===t)return null;let e=Z(t);return(isNaN(e)||Math.abs(e)>181)&&(e=parseFloat(t)),e}async _checkProjection(t){try{await(0,_._W)(u.Zn,t)}catch{throw new r.Z("csv-layer:projection-not-supported","Projection not supported")}}}},25278:(t,e,s)=>{s.d(e,{Dm:()=>c,Hq:()=>u,MS:()=>d,bU:()=>a});var i=s(80442),n=s(22974),r=s(61159),o=s(58333);function a(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?o.I4:"esriGeometryPolyline"===t?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function c(t,e){if((0,i.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let s=`this.${e} = null;`;for(const e in t)s+=`this${l.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[e]:null,...t})}}function u(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},11282:(t,e,s)=>{s.d(e,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,n.mN)(t):(0,i.d9)(t)}function a(t,e,s){const i={};for(const n in t){if("declaredClass"===n)continue;const r=t[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let t=0;t<r.length;t++)i[n][t]=a(r[t])}else if("object"==typeof r)if(r.toJSON){const t=r.toJSON(s&&s[n]);i[n]=e?t:JSON.stringify(t)}else i[n]=e?r:JSON.stringify(r);else i[n]=r}return i}s(71058)},58333:(t,e,s)=>{s.d(e,{ET:()=>r,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>c,qP:()=>a,wW:()=>h});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|