@arcgis/core 4.33.0-next.20250331 → 4.33.0-next.20250402
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/applications/SceneViewer/sceneViewerUtils.d.ts +1 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0297e55a49ca0d1231ef.js +1 -0
- package/assets/esri/core/workers/chunks/{98da74243df03e0cc70d.js → 067dda58592fbf4fb812.js} +1 -1
- package/assets/esri/core/workers/chunks/0cd5f15b8558b23e5fcd.js +1 -0
- package/assets/esri/core/workers/chunks/0db4c0071282dd94f3b2.js +1 -0
- package/assets/esri/core/workers/chunks/1072b4f37eacbbfda2c8.js +1 -0
- package/assets/esri/core/workers/chunks/{4d95cc85f4b73e857b1f.js → 11badb73d43059374ad8.js} +1 -1
- package/assets/esri/core/workers/chunks/{dcb043986fb065de0366.js → 16607e71804eff64c0e1.js} +1 -1
- package/assets/esri/core/workers/chunks/18f8b41bd761e9ab60d0.js +1 -0
- package/assets/esri/core/workers/chunks/{ed831e51c2a03ee95879.js → 19e83b184d8b4d0b3007.js} +1 -1
- package/assets/esri/core/workers/chunks/{5de3aee547113bfd59df.js → 1b87fa15470cce26feea.js} +1 -1
- package/assets/esri/core/workers/chunks/{dde03a893f9cef8e0f45.js → 1d322685016263f86cf5.js} +1 -1
- package/assets/esri/core/workers/chunks/{e4b80c8f4c45fd78bde1.js → 23de8aeed5b82c682cbe.js} +1 -1
- package/assets/esri/core/workers/chunks/269531e770376ed9e4fd.js +1 -0
- package/assets/esri/core/workers/chunks/2791f1f2791087d0217f.js +1 -0
- package/assets/esri/core/workers/chunks/{48ad7beb48dcc2693cc3.js → 2ab7d36409e9af3ac3da.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7a1832274892e99c388.js → 30a047bd66f333bb7d2d.js} +1 -1
- package/assets/esri/core/workers/chunks/{94292c7afff18694d55e.js → 322cb1b1871d03b69f0a.js} +37 -37
- package/assets/esri/core/workers/chunks/37e49d1a1407c193dcd0.js +1 -0
- package/assets/esri/core/workers/chunks/3b7284516a0e34a9e85e.js +1 -0
- package/assets/esri/core/workers/chunks/{6cb5ce0a6bb85c624a21.js → 400f95295bbfced31076.js} +1 -1
- package/assets/esri/core/workers/chunks/401ff3c83789c72e9ac9.js +1 -0
- package/assets/esri/core/workers/chunks/{6339a24874c698594101.js → 40b33c9bd271cddbd837.js} +1 -1
- package/assets/esri/core/workers/chunks/48fbf887da6d19838bf0.js +1 -0
- package/assets/esri/core/workers/chunks/4ba34124054752b363c0.js +1 -0
- package/assets/esri/core/workers/chunks/4cc77769009901a112ec.js +39 -0
- package/assets/esri/core/workers/chunks/{ba4d91816f6a0bf0d812.js → 4dc135e0133d58a06d67.js} +1 -1
- package/assets/esri/core/workers/chunks/5aae4e127e888f69435a.js +1 -0
- package/assets/esri/core/workers/chunks/{0943695a1dcd21c45e83.js → 5b32c2a1b276352593dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{087a09b4c41abef6b516.js → 5c757e20c0543e6a49b3.js} +1 -1
- package/assets/esri/core/workers/chunks/6280e1fe944ea4a71b91.js +1 -0
- package/assets/esri/core/workers/chunks/{9c59fc2df8081e65a128.js → 628395830c78b95b46dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{edcc0fefd57323d2cb67.js → 6828e4936db0121a9638.js} +1 -1
- package/assets/esri/core/workers/chunks/{1cd9b5ef62582b25df9b.js → 69b5d0ef14fb521b0fd7.js} +1 -1
- package/assets/esri/core/workers/chunks/{b52a3a48d2d3ff22542d.js → 6a8cf1f51cc4adc268d3.js} +1 -1
- package/assets/esri/core/workers/chunks/6e679703b5d6fc1b91a5.js +1 -0
- package/assets/esri/core/workers/chunks/6f3731f19497cbc6ea74.js +1 -0
- package/assets/esri/core/workers/chunks/72d7e45e7eb28f2cc0b0.js +1 -0
- package/assets/esri/core/workers/chunks/7649d59b0b7d53818a29.js +1 -0
- package/assets/esri/core/workers/chunks/{fe3ed029b07bb1e4aef3.js → 77ae11dbd3e1eeacd7ee.js} +1 -1
- package/assets/esri/core/workers/chunks/7978b66cdfe078960ddd.js +1 -0
- package/assets/esri/core/workers/chunks/7b8f0b63b968ff40d00d.js +1 -0
- package/assets/esri/core/workers/chunks/7e00122014d0a55363a8.js +319 -0
- package/assets/esri/core/workers/chunks/{f452ca61842dbe8de9af.js → 7ea5bbb52e84be9a608e.js} +1 -1
- package/assets/esri/core/workers/chunks/{eb9d2bb8b44a93347274.js → 7ef9bcd58af499a14a08.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2f8702a9f54fff23ad9.js → 7f31dbe0ca8974a10be8.js} +1 -1
- package/assets/esri/core/workers/chunks/80427cd9f0c2e07f21c3.js +1 -0
- package/assets/esri/core/workers/chunks/{77199b4b39ee8b4303de.js → 82a58a405332d43a328f.js} +1 -1
- package/assets/esri/core/workers/chunks/{626db8488f9d931cf55c.js → 899f197556b6ced6eddf.js} +2 -2
- package/assets/esri/core/workers/chunks/8aae03e347ab18ae6ee2.js +1 -0
- package/assets/esri/core/workers/chunks/8d49c79e549e90371303.js +1 -0
- package/assets/esri/core/workers/chunks/{a9b6377f1fef5826f28d.js → 8f35416a5036897d6289.js} +1 -1
- package/assets/esri/core/workers/chunks/91439b59260b0fb04be9.js +1 -0
- package/assets/esri/core/workers/chunks/{bdeac9196f28aff93e68.js → 93d06a1a0b700ddb3807.js} +1 -1
- package/assets/esri/core/workers/chunks/{a01c86910fe4984eb788.js → 9574896c90b39fa7ecb4.js} +1 -1
- package/assets/esri/core/workers/chunks/96978d039f183565bffa.js +1 -0
- package/assets/esri/core/workers/chunks/9a641fb94819574e48f6.js +1 -0
- package/assets/esri/core/workers/chunks/{72c7126dbd27fa48fcdb.js → a3421383e48379012c9c.js} +1 -1
- package/assets/esri/core/workers/chunks/b28b699de6deb7e9fa53.js +1 -0
- package/assets/esri/core/workers/chunks/{1a5f96b1b892ecceb36a.js → b4a1f3f3a036226d6810.js} +1 -1
- package/assets/esri/core/workers/chunks/{f8d1c7df671733c3325c.js → b64f708f821dd2bb51cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{3e4204502f6e09483c60.js → b7a1185ac49480fc1410.js} +1 -1
- package/assets/esri/core/workers/chunks/{738e4f46feb3758456e0.js → baa9fd23414f03ef90bc.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa712f850fd129ca5ed8.js → bba6d7615d8f3862fe70.js} +1 -1
- package/assets/esri/core/workers/chunks/{1cf8a431e5da946c7d27.js → bd0dbad694ce5531deab.js} +1 -1
- package/assets/esri/core/workers/chunks/c1bd47cde53918f454ca.js +1 -0
- package/assets/esri/core/workers/chunks/{1d0473dd43c88ab5776d.js → c589d32f8efcca6bf712.js} +1 -1
- package/assets/esri/core/workers/chunks/{081699532b183db1e7c2.js → cda6ae4c5cb67e22b454.js} +1 -1
- package/assets/esri/core/workers/chunks/{e2029267cddb8e2effab.js → d58fae2fc9d148e015ae.js} +1 -1
- package/assets/esri/core/workers/chunks/{460afde071df9f35182d.js → e14449f07ed3386f4f2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0fbd4c6bffe0cb98d14.js → e592731ac12b9bc646ff.js} +1 -1
- package/assets/esri/core/workers/chunks/e5aff9b10877fb04d6de.js +1 -0
- package/assets/esri/core/workers/chunks/e6469173c65531d6524a.js +1 -0
- package/assets/esri/core/workers/chunks/e6544e966f14fb410157.js +1 -0
- package/assets/esri/core/workers/chunks/e8312c999b3f0c9ef09e.js +1 -0
- package/assets/esri/core/workers/chunks/{cb386923200272cf26a9.js → e9e517a2141e504eec64.js} +1 -1
- package/assets/esri/core/workers/chunks/eb011e8b14db37ddb110.js +1 -0
- package/assets/esri/core/workers/chunks/{f809cbfb744adb4fad29.js → efb0f3ec2344adcb24f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{999e8dbe6f4d0665b3ab.js → f5fcba6ca6f43bf1d65d.js} +1 -1
- package/assets/esri/core/workers/chunks/fa9ef9e8eae505371965.js +1 -0
- package/assets/esri/core/workers/chunks/fb5b852d0f72df014377.js +1 -0
- package/assets/esri/core/workers/chunks/ff62b813fff4a015a8a6.js +1 -0
- package/core/has.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
- package/geometry/asserts.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +96 -8
- package/layers/TileLayer.js +1 -1
- package/layers/graphics/applyEditsUtils.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/graphics/sources/GeoJSONSource.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/networks/support/UtilityNetworkLookupHelper.js +1 -1
- package/package.json +3 -3
- package/portal/support/geometryServiceUtils.js +1 -1
- package/renderers/support/DictionaryScriptEvaluator.js +1 -1
- package/rest/support/printTaskUtils.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/ElevationInfo.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/versionManagement/VersioningState.js +1 -1
- package/views/2d/engine/webgl/Mesh2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/ViewAnimation.js +1 -1
- package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
- package/views/layers/PointCloudLayerView.d.ts +1 -1
- package/views/layers/PointCloudLayerView.js +5 -0
- package/views/webgl/ShaderBuilder.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/textureUtils.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +5 -0
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +5 -0
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/support/relatedFeatureUtils.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/dataCaptureUtils.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel.js +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/028e2e0fa6971aaaaae8.js +0 -1
- package/assets/esri/core/workers/chunks/0e82365be7d9257e7cb2.js +0 -1
- package/assets/esri/core/workers/chunks/1322096a72e910f23167.js +0 -1
- package/assets/esri/core/workers/chunks/186387a561364a11e574.js +0 -1
- package/assets/esri/core/workers/chunks/3808f10747cecc8a1a9b.js +0 -1
- package/assets/esri/core/workers/chunks/3f7c57d5f3bdefa74d18.js +0 -1
- package/assets/esri/core/workers/chunks/424e2058228e5f6a183d.js +0 -1
- package/assets/esri/core/workers/chunks/4816cf647eca2f4cecc2.js +0 -1
- package/assets/esri/core/workers/chunks/4aa0a58ded4465ea28bd.js +0 -1
- package/assets/esri/core/workers/chunks/4bb65ef7b3a02ebe416e.js +0 -1
- package/assets/esri/core/workers/chunks/4d798da25a726f179089.js +0 -319
- package/assets/esri/core/workers/chunks/4ffdff269aae8c293cb4.js +0 -1
- package/assets/esri/core/workers/chunks/564cc81c232c97646833.js +0 -1
- package/assets/esri/core/workers/chunks/5820808c7659460969d4.js +0 -1
- package/assets/esri/core/workers/chunks/5d01f0b86566d08ba29d.js +0 -1
- package/assets/esri/core/workers/chunks/6c378e7a6ca29d530880.js +0 -1
- package/assets/esri/core/workers/chunks/7d1c39c2a80e20a0595f.js +0 -1
- package/assets/esri/core/workers/chunks/86ee278919038260696e.js +0 -39
- package/assets/esri/core/workers/chunks/8752f807c05d1ec215e8.js +0 -1
- package/assets/esri/core/workers/chunks/8ef5e6f1c606e5e41002.js +0 -1
- package/assets/esri/core/workers/chunks/921b41b101957cfc1cfd.js +0 -1
- package/assets/esri/core/workers/chunks/9ef509e0853ad41f7690.js +0 -1
- package/assets/esri/core/workers/chunks/9f18de17fbcad0e5c140.js +0 -1
- package/assets/esri/core/workers/chunks/a53e9f5092de715da025.js +0 -1
- package/assets/esri/core/workers/chunks/aa3a45e8228216c1739b.js +0 -1
- package/assets/esri/core/workers/chunks/ab0113d1269675dcd520.js +0 -1
- package/assets/esri/core/workers/chunks/b23d16745674486ddd6c.js +0 -1
- package/assets/esri/core/workers/chunks/b3c126e8a0a722c03efc.js +0 -1
- package/assets/esri/core/workers/chunks/c7aa4a8263e21f631004.js +0 -1
- package/assets/esri/core/workers/chunks/cc441051a52bfbda9caf.js +0 -1
- package/assets/esri/core/workers/chunks/ccc6f6f7052985bebdab.js +0 -1
- package/assets/esri/core/workers/chunks/d3912886ac2910290f43.js +0 -1
- package/assets/esri/core/workers/chunks/d8b903b4147b090576f2.js +0 -1
- package/assets/esri/core/workers/chunks/da8a002d18544def5383.js +0 -1
- package/assets/esri/core/workers/chunks/f28eaf1d3a7f12788bcf.js +0 -1
- package/assets/esri/core/workers/chunks/f9bedb421d4e115a888f.js +0 -1
- package/assets/esri/core/workers/chunks/faed301a25252c619cff.js +0 -1
- package/assets/esri/core/workers/chunks/fc9758006a7135c7d9c3.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4755,6928,7136],{13069:(e,t,n)=>{n.d(t,{AG:()=>l,lk:()=>o,vD:()=>i,yS:()=>s});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${o().toUpperCase()}}`}function i(){return`{${o()}}`}function l(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17136:(e,t,n)=>{n.d(t,{O7:()=>S,el:()=>M});var r=n(92602),o=n(49186),s=n(53966),i=n(39829),l=n(82799),a=n(80754),c=n(21325),u=n(28735),f=n(78888),p=n(65864),h=n(2272),y=n(84952),m=n(92300);const g=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function d(e){return"polygon"===e[0].type}function x(e){return"polyline"===e[0].type}function w(e,t,n){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new o.A(e)}const n=(0,a.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],i=e[r+1][0],l=e[r+1][1],a=Math.sqrt((i-o)*(i-o)+(l-s)*(l-s)),c=(l-s)/a,u=(i-o)/a,f=a/t;if(f>1){for(let e=1;e<=f-1;e++){const r=e*t,i=u*r+o,l=c*r+s;n.push([i,l])}const e=(a+Math.floor(f-1)*t)/2,r=u*e+o,i=c*e+s;n.push([r,i])}n.push([i,l])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:r,spatialReference:e.spatialReference}):new l.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return n&&(e=(0,a.kS)(e,n)),e}function R(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,a.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,a.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,a.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,a.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function A(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],i=(0,a.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,a.kd)(n,180);for(let n=0;n<t.length;n++){const t=s.getPoint(e,n);s.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(o===n){if(d(e))for(const t of(0,a.r8)(s))e[o]=e[o].addRing(t);else if(x(e))for(const t of(0,a.r8)(s))e[o]=e[o].addPath(t)}else n=o,e[o]=s}return e}async function M(e,t,n){if(!Array.isArray(e))return M([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let s,d,x,S,v,_,G,N,j=0;const z=[],T=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,d=(0,c.Vp)(s),x=s.isWebMercator,_=x?102100:4326,S=a.j7[_].maxX,v=a.j7[_].minX,G=a.j7[_].plus180Line,N=a.j7[_].minus180Line),d)if("mesh"===t.type)T.push(t);else if("point"===t.type)T.push(R(t.clone(),S,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>R(e,S,v))),T.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);T.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,n=(0,a.kd)(e.xmin,v)*(2*S);let r=0===n?t.clone():(0,a.kS)(t.clone(),n);e.offset(n,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(G)&&s!==S?(j=s>j?s:j,r=w(r,x),z.push(r),T.push("cut")):e.intersects(N)&&o!==v?(j=s*(2*S)>j?s*(2*S):j,r=w(r,x,360),z.push(r),T.push("cut")):T.push(r)}else T.push(t.clone());else T.push(t);else T.push(t);let b=(0,a.kd)(j,S),k=-90;const F=b,q=new l.A;for(;b>0;){const e=360*b-180;q.addPath([[e,k],[e,-1*k]]),k*=-1,b--}if(z.length>0&&F>0){const t=A(z,await async function(e,t,n,r){const o=(0,h.Dl)(e),s=t[0].spatialReference,i={...r,responseType:"json",query:{...o.query,f:"json",sr:(0,c.YX)(s),target:JSON.stringify({geometryType:(0,p.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},l=await(0,f.A)(o.path+"/cut",i),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,p.rS)(e);return t.spatialReference=s,t}))}}(o,z,q,n)),r=[],s=[];for(let n=0;n<T.length;n++){const o=T[n];if("cut"!==o)s.push(o);else{const o=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&o.rings.length>=i.rings.length?(r.push(o),s.push("simplify")):s.push(x?(0,u.Gh)(o):o)}}if(!r.length)return s;const i=await async function(e,t,n){const r="string"==typeof e?(0,y.An)(e):e,o=t[0].spatialReference,s=(0,p.$B)(t[0]),i={...n,query:{...r.query,f:"json",sr:(0,c.YX)(o),geometries:JSON.stringify((0,m.X)(t))}},{data:l}=await(0,f.A)(r.path+"/simplify",i);return(0,m.V)(l.geometries,s,o)}(o,r,n),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(x?(0,u.Gh)(i.shift()):i.shift())}return l}const J=[];for(let e=0;e<T.length;e++){const t=T[e];if("cut"!==t)J.push(t);else{const e=z.shift();J.push(!0===x?(0,u.Gh)(e):e)}}return J}function S(e,t,n){const r=(0,c.Vp)(n);if(null==r)return e;const[o,s]=r.valid,i=2*s;let l=0,a=0;t>s?l=Math.ceil(Math.abs(t-s)/i):t<o&&(l=-Math.ceil(Math.abs(t-o)/i)),e>s?a=Math.ceil(Math.abs(e-s)/i):e<o&&(a=-Math.ceil(Math.abs(e-o)/i));let u=e+(l-a)*i;const f=u-t;return f>s?u-=i:f<o&&(u+=i),u}},22671:(e,t,n)=>{n.d(t,{A:()=>w});var r,o=n(90237),s=n(52106),i=n(66552),l=n(25482),a=n(4718),c=n(10107),u=(n(44208),n(53966),n(36005)),f=n(40608),p=n(43937),h=n(16930),y=n(65864),m=n(50498),g=n(20437);const d=new i.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let x=r=class extends l.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,n,r){if(e)return void d.write(e,t,n,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void d.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,y.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=h.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,o]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/n)));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,o],scale:[s,i]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const c=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*i),l,a);for(const{geometry:e}of t)null!=e&&c&&c(e);return this.transform=null,this}readFeaturesWithClass(e,t,n){const r=h.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],i=n.fromJSON(s),l=s.geometry?.spatialReference;null==i.geometry||l||(i.geometry.spatialReference=r);const a=s.aggregateGeometries,c=i.aggregateGeometries;if(a&&null!=c)for(const e in c){const t=c[e],n=a[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}o.push(i)}return o}_quantizePoints(e,t,n){let r,o;const s=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=n(l[1]);e===r&&i===o||(s.push([e-r,i-o]),r=e,o=i)}else r=t(l[0]),o=n(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,y.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],i=this._quantizePoints(s,t,n);i&&o.push(i)}return o.length>0?((0,y.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,y.Bi)(e)?e.rings:e.paths;let i,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=n(l)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=o(n[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(i+=r[0],l+=r[1]):(i=r[0],l=r[1]),r[0]=t(i),r[1]=n(l)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,c.MZ)({type:String,json:{write:!0}})],x.prototype,"displayFieldName",void 0),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,c.MZ)({type:[s.A],json:{write:!0}})],x.prototype,"features",void 0),(0,o._)([(0,u.w)("features")],x.prototype,"readFeatures",null),(0,o._)([(0,c.MZ)({type:[g.A],json:{write:!0}})],x.prototype,"fields",void 0),(0,o._)([(0,c.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:d.read}}})],x.prototype,"geometryType",void 0),(0,o._)([(0,p.K)("geometryType")],x.prototype,"writeGeometryType",null),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasM",void 0),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasZ",void 0),(0,o._)([(0,c.MZ)({types:m.yR,json:{write:!0}})],x.prototype,"queryGeometry",void 0),(0,o._)([(0,u.w)("queryGeometry")],x.prototype,"readQueryGeometry",null),(0,o._)([(0,c.MZ)({type:h.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,o._)([(0,p.K)("spatialReference")],x.prototype,"writeSpatialReference",null),(0,o._)([(0,c.MZ)({json:{write:!0}})],x.prototype,"transform",void 0),x=r=(0,o._)([(0,f.$)("esri.rest.support.FeatureSet")],x),x.prototype.toJSON.isDefaultToJSON=!0;const w=x},80754:(e,t,n)=>{n.d(t,{j7:()=>i,kS:()=>a,kd:()=>l,r8:()=>c});var r=n(82799),o=n(16930),s=n(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,s.Bi)(e)?e.rings:e.paths}},92300:(e,t,n)=>{n.d(t,{V:()=>s,X:()=>o});var r=n(65864);function o(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,n){const o=(0,r.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=n,t}))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4755,7136],{17136:(e,t,n)=>{n.d(t,{O7:()=>M,el:()=>k});var s=n(92602),r=n(49186),o=n(53966),i=n(39829),c=n(82799),l=n(80754),f=n(21325),a=n(28735),u=n(78888),p=n(65864),h=n(2272),g=n(84952),m=n(92300);const y=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function d(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function x(e,t,n){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A(e)}const n=(0,l.r8)(e),s=[];for(const e of n){const n=[];s.push(n),n.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],o=e[s][1],i=e[s+1][0],c=e[s+1][1],l=Math.sqrt((i-r)*(i-r)+(c-o)*(c-o)),f=(c-o)/l,a=(i-r)/l,u=l/t;if(u>1){for(let e=1;e<=u-1;e++){const s=e*t,i=a*s+r,c=f*s+o;n.push([i,c])}const e=(l+Math.floor(u-1)*t)/2,s=a*e+r,i=f*e+o;n.push([s,i])}n.push([i,c])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:s,spatialReference:e.spatialReference}):new c.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,a.ci)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function w(e,t,n){if(Array.isArray(e)){const s=e[0];if(s>t){const n=(0,l.kd)(s,t);e[0]=s+n*(-2*t)}else if(s<n){const t=(0,l.kd)(s,n);e[0]=s+t*(-2*n)}}else{const s=e.x;if(s>t){const n=(0,l.kd)(s,t);e=e.clone().offset(n*(-2*t),0)}else if(s<n){const t=(0,l.kd)(s,n);e=e.clone().offset(t*(-2*n),0)}}return e}function R(e,t){let n=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],o=t.geometries[s],i=(0,l.r8)(o);for(let e=0;e<i.length;e++){const t=i[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const s=t[e][0];n=s>n?s:n}n=Number(n.toFixed(9));const s=-360*(0,l.kd)(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(s,0))}return!0}}))}if(r===n){if(d(e))for(const t of(0,l.r8)(o))e[r]=e[r].addRing(t);else if(A(e))for(const t of(0,l.r8)(o))e[r]=e[r].addPath(t)}else n=r,e[r]=o}return e}async function k(e,t,n){if(!Array.isArray(e))return k([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let o,d,A,M,b,S,X,j,L=0;const N=[],O=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,d=(0,f.Vp)(o),A=o.isWebMercator,S=A?102100:4326,M=l.j7[S].maxX,b=l.j7[S].minX,X=l.j7[S].plus180Line,j=l.j7[S].minus180Line),d)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(w(t.clone(),M,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,M,b))),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);O.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,n=(0,l.kd)(e.xmin,b)*(2*M);let s=0===n?t.clone():(0,l.kS)(t.clone(),n);e.offset(n,0);let{xmin:r,xmax:o}=e;r=Number(r.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(X)&&o!==M?(L=o>L?o:L,s=x(s,A),N.push(s),O.push("cut")):e.intersects(j)&&r!==b?(L=o*(2*M)>L?o*(2*M):L,s=x(s,A,360),N.push(s),O.push("cut")):O.push(s)}else O.push(t.clone());else O.push(t);else O.push(t);let q=(0,l.kd)(L,M),v=-90;const C=q,G=new c.A;for(;q>0;){const e=360*q-180;G.addPath([[e,v],[e,-1*v]]),v*=-1,q--}if(N.length>0&&C>0){const t=R(N,await async function(e,t,n,s){const r=(0,h.Dl)(e),o=t[0].spatialReference,i={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,f.YX)(o),target:JSON.stringify({geometryType:(0,p.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},c=await(0,u.A)(r.path+"/cut",i),{cutIndexes:l,geometries:a=[]}=c.data;return{cutIndexes:l,geometries:a.map((e=>{const t=(0,p.rS)(e);return t.spatialReference=o,t}))}}(r,N,G,n)),s=[],o=[];for(let n=0;n<O.length;n++){const r=O[n];if("cut"!==r)o.push(r);else{const r=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&r.rings.length>=i.rings.length?(s.push(r),o.push("simplify")):o.push(A?(0,a.Gh)(r):r)}}if(!s.length)return o;const i=await async function(e,t,n){const s="string"==typeof e?(0,g.An)(e):e,r=t[0].spatialReference,o=(0,p.$B)(t[0]),i={...n,query:{...s.query,f:"json",sr:(0,f.YX)(r),geometries:JSON.stringify((0,m.X)(t))}},{data:c}=await(0,u.A)(s.path+"/simplify",i);return(0,m.V)(c.geometries,o,r)}(r,s,n),c=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?c.push(t):c.push(A?(0,a.Gh)(i.shift()):i.shift())}return c}const J=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)J.push(t);else{const e=N.shift();J.push(!0===A?(0,a.Gh)(e):e)}}return J}function M(e,t,n){const s=(0,f.Vp)(n);if(null==s)return e;const[r,o]=s.valid,i=2*o;let c=0,l=0;t>o?c=Math.ceil(Math.abs(t-o)/i):t<r&&(c=-Math.ceil(Math.abs(t-r)/i)),e>o?l=Math.ceil(Math.abs(e-o)/i):e<r&&(l=-Math.ceil(Math.abs(e-r)/i));let a=e+(c-l)*i;const u=a-t;return u>o?a-=i:u<r&&(a+=i),a}},80754:(e,t,n)=>{n.d(t,{j7:()=>i,kS:()=>l,kd:()=>c,r8:()=>f});var s=n(82799),r=n(16930),o=n(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=f(e);for(const e of n)for(const n of e)n[0]+=t;return e}function f(e){return(0,o.Bi)(e)?e.rings:e.paths}},92300:(e,t,n)=>{n.d(t,{V:()=>o,X:()=>r});var s=n(65864);function r(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,n){const r=(0,s.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6064],{4341:(t,e,n)=>{n.d(e,{I:()=>o});var i=n(26390);class o{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*r);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,r));t++)this._items.push(this._allocator())}}const r=1024},11964:(t,e,n)=>{n.d(e,{Cr:()=>a,H6:()=>l,_I:()=>d,kb:()=>h,vt:()=>u});var i=n(34727),o=n(4341),r=n(38954),s=n(51850),c=n(32114);function u(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function a(t,e,n=u()){return(0,r.c)(n.origin,t),(0,r.d)(n.vector,e,t),n}function h(t,e){const n=(0,r.d)(c.rq.get(),e,t.origin),o=(0,r.f)(t.vector,n),s=(0,r.f)(t.vector,t.vector),u=(0,i.qE)(o/s,0,1),a=(0,r.d)(c.rq.get(),(0,r.h)(c.rq.get(),t.vector,u),n);return(0,r.f)(a,a)}function d(t,e,n){return l(t,e,0,1,n)}function l(t,e,n,o,s){const{vector:u,origin:a}=t,h=(0,r.d)(c.rq.get(),e,a),d=(0,r.f)(u,h)/(0,r.k)(u);return(0,r.h)(s,u,(0,i.qE)(d,n,o)),(0,r.g)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new o.I((()=>u()))},46064:(t,e,n)=>{n.r(e),n.d(e,{default:()=>f});var i=n(90237),o=n(74887),r=(n(53966),n(44208),n(87811),n(49186),n(40608)),s=n(38954),c=n(51850),u=n(11964),a=n(97937),h=n(78230),d=n(431);function l(t,e,n){const i=(0,a.c)(),o=(0,a.a)(i);return(0,s.b)(o,o,t,.5),(0,s.b)(o,o,e,.5),i[3]=(0,s.j)(o,t),(0,s.g)(o,o,n),i}let _=class{constructor(){this._idToComponent=new Map,this._components=new h.A((t=>t.bounds)),this._edges=new h.A((t=>t.bounds)),this._tmpLineSegment=(0,u.vt)(),this._tmpP1=(0,c.vt)(),this._tmpP2=(0,c.vt)(),this._tmpP3=(0,c.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,o.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:i}=t;n.push({id:e,uid:i})}return!0}),t.bounds),!n.length)return;const i={components:n},o=await this.remoteClient.invoke("fetchAllEdgeLocations",i,e??{});for(const t of o.components)this._setFetchEdgeLocations(t)}async add(t){const e=new m(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=d.HY.createView(t.locations),i=new Array(n.count),o=(0,c.vt)(),r=(0,c.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,o),n.position1.getVec(s,r);const c=l(o,r,t.origin),u=new g(e,s,c);i[s]=u}this._edges.add(i);const{objectIds:s,origin:u}=t;e.info={locations:n,objectIds:s,origin:u}}_addCandidates(t,e,n){const{info:i}=e.component,{origin:o,objectIds:r}=i,c=i.locations,u=c.position0.getVec(e.index,this._tmpP1),a=c.position1.getVec(e.index,this._tmpP2);(0,s.g)(u,u,o),(0,s.g)(a,a,o);const h=r[c.componentIndex.get(e.index)];this._addEdgeCandidate(t,h,u,a,n),T(t,h,u,n),T(t,h,a,n)}_addEdgeCandidate(t,e,n,i,o){if(!t.returnEdge)return;const r=(0,a.a)(t.bounds),h=(0,u.Cr)(n,i,this._tmpLineSegment),d=(0,u._I)(h,r,this._tmpP3);(0,a.o)(t.bounds,d)&&o.push({type:"edge",objectId:e,target:(0,c.o8)(d),distance:(0,s.j)(r,d),start:(0,c.o8)(n),end:(0,c.o8)(i)})}};_=(0,i._)([(0,r.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],_);const f=_;function T(t,e,n,i){if(!t.returnVertex||!(0,a.o)(t.bounds,n))return;const o=(0,a.a)(t.bounds);i.push({type:"vertex",objectId:e,target:(0,c.o8)(n),distance:(0,s.j)(o,n)})}class m{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++m.uid}static{this.uid=0}}class g{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},71351:(t,e,n)=>{n.d(e,{C:()=>d,Cr:()=>l,LV:()=>h,kb:()=>_,oC:()=>f,vt:()=>u}),n(4576);var i=n(4341),o=(n(77690),n(29242)),r=n(38954),s=n(51850),c=n(32114);function u(t){return t?a((0,s.o8)(t.origin),(0,s.o8)(t.direction)):a((0,s.vt)(),(0,s.vt)())}function a(t,e){return{origin:t,direction:e}}function h(t,e){const n=T.get();return n.origin=t,n.direction=e,n}function d(t,e=u()){return function(t,e,n=u()){return(0,r.c)(n.origin,t),(0,r.c)(n.direction,e),n}(t.origin,t.direction,e)}function l(t,e,n=u()){return(0,r.c)(n.origin,t),(0,r.d)(n.direction,e,t),n}function _(t,e){const n=(0,r.e)(c.rq.get(),(0,r.n)(c.rq.get(),t.direction),(0,r.d)(c.rq.get(),e,t.origin));return(0,r.f)(n,n)}function f(t,e,n){const i=(0,r.f)(t.direction,(0,r.d)(n,e,t.origin));return(0,r.g)(n,t.origin,(0,r.h)(n,t.direction,i)),n}const T=new i.I((()=>u()));(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,o.vt)()},78230:(t,e,n)=>{n.d(e,{A:()=>_});var i,o,r=n(93687),s=n(3694),c=n(38954),u=n(51850),a=n(82919),h=n(71351),d=n(97937),l=n(620);class _{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new f,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),f.clearPool(),x[0]=null,C.prune(),y.prune()}add(t,e=t.length){this._objectCount+=e,this._grow(t,e);const n=f.acquire();for(let i=0;i<e;i++){const e=t[i];this._isDegenerate(e)?this._degenerateObjects.add(e):(n.init(this._root),this._add(e,n))}f.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=f.acquire();for(const i of t){const t=e??(0,d.e)(this.objectToBoundingSphere(i),H);F(t[3])?(n.init(this._root),g(i,t,n)):this._degenerateObjects.delete(i)}f.release(n),this._shrink()}update(t,e){if(!F(e[3])&&this._isDegenerate(t))return;const n=function(t){return x[0]=t,x}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const i=(0,h.LV)(t,e);T(this._root,(t=>{if(!function(t,e){return b((0,d.a)(e.bounds),2*-e.halfSize,I),b((0,d.a)(e.bounds),2*e.halfSize,L),(0,l.O_)(t.origin,t.direction,I,L)}(i,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(i,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(i,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,i){const o=(0,h.LV)(t,e);T(this._root,(t=>{if(!function(t,e,n){return b((0,d.a)(e.bounds),2*-e.halfSize,I),b((0,d.a)(e.bounds),2*e.halfSize,L),n.applyToMinMax(I,L),(0,l.O_)(t.origin,t.direction,I,L)}(o,t,i))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(o,t,i)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(o,t,i)&&n(t)})),!0}))}forEach(t){T(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,i=()=>!0,o=1/0){let r=1/0,s=1/0,u=null;const h=v(t,e),l=c=>{if(--o,!i(c))return;const h=this.objectToBoundingSphere(c);if(!(0,a.m7)(n,h))return;const l=M(t,e,(0,d.a)(h)),_=l-h[3],f=l+h[3];_<r&&(r=_,s=f,u=c)};return m(this._root,(i=>{if(o<=0||!(0,a.m7)(n,i.bounds))return!1;if((0,c.h)(j,h,i.halfSize),(0,c.g)(j,j,(0,d.a)(i.bounds)),M(t,e,j)>s)return!1;const r=i.node;return r.terminals.forAll((t=>l(t))),null!==r.residents&&r.residents.forAll((t=>l(t))),!0}),t,e),u}forEachInDepthRange(t,e,n,i,o,r,s){let u=-1/0,h=1/0;const l={setRange:t=>{n===_.DepthOrder.FRONT_TO_BACK?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};l.setRange(i);const f=M(e,n,t),T=v(e,n),g=v(e,-n),O=t=>{if(!s(t))return;const i=this.objectToBoundingSphere(t),c=(0,d.a)(i),_=M(e,n,c)-f,T=_-i[3],m=_+i[3];T>h||m<u||!(0,a.m7)(r,i)||o(t,l)};m(this._root,(t=>{if(!(0,a.m7)(r,t.bounds))return!1;if((0,c.h)(j,T,t.halfSize),(0,c.g)(j,j,(0,d.a)(t.bounds)),M(e,n,j)-f>h)return!1;if((0,c.h)(j,g,t.halfSize),(0,c.g)(j,j,(0,d.a)(t.bounds)),M(e,n,j)-f<u)return!1;const i=t.node;return i.terminals.forAll((t=>O(t))),null!==i.residents&&i.residents.forAll((t=>O(t))),!0}),e,n)}forEachNode(t){T(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),i=(0,d.a)(e),o=e=>{const o=this.objectToBoundingSphere(e),r=(0,d.g)(o),s=n+r;return!((0,c.s)((0,d.a)(o),i)-s*s<=0)||t(e)};let r=!0;const s=t=>{r&&(r=o(t))};T(this._root,(t=>{const e=(0,d.g)(t.bounds),o=n+e;if((0,c.s)((0,d.a)(t.bounds),i)-o*o>0)return!1;const u=t.node;return u.terminals.forAll(s),r&&null!==u.residents&&u.residents.forAll(s),r})),r&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.i)(n,t)}_intersectsObjectWithOffset(t,e,n){const i=this.objectToBoundingSphere(e);return!(i[3]>0)||(0,d.i)(n.applyToBoundingSphere(i),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const i=f.acquire().init(t);this._add(e.at(n),i),f.release(i)}}_grow(t,e){if(0!==e&&(E(t,e,(t=>this.objectToBoundingSphere(t)),w),F(w[3])&&!this._fitsInsideTree(w)))if(A(this._root.node))(0,d.e)(w,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(w);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(w,t):this._growRootAsSubNode(t),f.release(t)}}_rebuildTree(t,e){(0,c.c)((0,d.a)(z),(0,d.a)(e.bounds)),z[3]=e.halfSize,E([t,z],2,(t=>t),G);const n=f.acquire().init(this._root);this._root.initFrom(null,G,G[3]),this._root.increaseHalfSize(1.25),T(n,(t=>(this.add(t.node.terminals.data,t.node.terminals.length),null!==t.node.residents&&this.add(t.node.residents.data,t.node.residents.length),!0))),f.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return T(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let i=-1/0;const o=this._root.bounds,r=this._root.halfSize;for(let t=0;t<3;t++){const s=o[t]-r-(n[t]-e),c=n[t]+e-(o[t]+r),u=Math.max(0,Math.ceil(s/(2*r))),a=Math.max(0,Math.ceil(c/(2*r)))+1,h=2**Math.ceil(Math.log(u+a)*Math.LOG2E);i=Math.max(i,h),q[t].min=u,q[t].max=a}for(let t=0;t<3;t++){let e=q[t].min,n=q[t].max;const s=(i-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const c=o[t]-r-e*r*2;B[t]=c+(n+e)*r}const s=i*r;return B[3]=s*P,f.acquire().initFrom(null,B,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,c.c)((0,d.a)(w),(0,d.a)(this._root.bounds)),w[3]=this._root.halfSize,this._root.init(t),t.advanceTo(w,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,i=0;for(;i<e.length&&null==t;)n=i++,t=e[n];for(;i<e.length;)if(e[i++])return-1;return n}_isDegenerate(t){return!F(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,i=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:i}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),i=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:i}}static fromJSON(t){const e=new _((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class f{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,i=this.depth){return this.node=null!=t?t:f.createEmptyNode(),e&&(0,d.e)(e,this.bounds),this.halfSize=n,this.depth=i,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*P}advance(t){let e=this.node.children[t];e||(e=f.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=S[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const i=this._childIndex(t);e&&e(this,i),this.advance(i)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new s.A({shrink:!0}),residents:new s.A({shrink:!0})}}static{this._pool=new r.A(f)}static acquire(){return f._pool.acquire()}static release(t){f._pool.release(t)}static clearPool(){f._pool.prune()}}function T(t,e){let n=f.acquire().init(t);const i=[n];for(;0!==i.length;){if(n=i.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&i.push(f.acquire().init(n).advance(t));f.release(n)}}function m(t,e,n,i=_.DepthOrder.FRONT_TO_BACK){let o=f.acquire().init(t);const r=[o];for(function(t,e,n){if(!y.length)for(let t=0;t<8;++t)y.push({index:0,distance:0});for(let n=0;n<8;++n){const i=S[n];y.data[n].index=n,y.data[n].distance=M(t,e,i)}y.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=y.data[t].index}(n,i,D);0!==r.length;){if(o=r.pop(),e(o)&&!o.isLeaf())for(let t=7;t>=0;--t){const e=D[t];o.node.children[e]&&r.push(f.acquire().init(o).advance(e))}f.release(o)}}function g(t,e,n){C.clear();const i=n.advanceTo(e,((t,e)=>{C.push(t.node),C.push(e)}))?n.node.terminals:n.node.residents;if(i.removeUnordered(t),0===i.length)for(let t=C.length-2;t>=0&&O(C.data[t],C.data[t+1]);t-=2);}function O(t,e){return e>=0&&(t.children[e]=null),!!A(t)&&(null===t.residents&&(t.residents=new s.A({shrink:!0})),!0)}function A(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function p(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function R(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function b(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function E(t,e,n,i){if(1===e){const e=n(t[0]);(0,d.e)(e,i)}else{I[0]=1/0,I[1]=1/0,I[2]=1/0,L[0]=-1/0,L[1]=-1/0,L[2]=-1/0;for(let i=0;i<e;i++){const e=n(t[i]);F(e[3])&&(p(I,e),R(L,e))}(0,c.m)((0,d.a)(i),I,L,.5),i[3]=Math.max(L[0]-I[0],L[1]-I[1],L[2]-I[2])/2}}function v(t,e){let n,i=1/0;for(let o=0;o<8;++o){const r=M(t,e,N[o]);r<i&&(i=r,n=N[o])}return n}function M(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function F(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}(o=(i=_).DepthOrder||(i.DepthOrder={}))[o.FRONT_TO_BACK=1]="FRONT_TO_BACK",o[o.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const S=[(0,u.fA)(-1,-1,-1),(0,u.fA)(1,-1,-1),(0,u.fA)(-1,1,-1),(0,u.fA)(1,1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(1,-1,1),(0,u.fA)(-1,1,1),(0,u.fA)(1,1,1)],N=[(0,u.fA)(-1,-1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(-1,1,-1),(0,u.fA)(-1,1,1),(0,u.fA)(1,-1,-1),(0,u.fA)(1,-1,1),(0,u.fA)(1,1,-1),(0,u.fA)(1,1,1)],P=Math.sqrt(3),x=[null],B=(0,d.c)(),j=(0,u.vt)(),I=(0,u.vt)(),L=(0,u.vt)(),C=new s.A,H=(0,d.c)(),w=(0,d.c)(),z=(0,d.c)(),G=(0,d.c)(),q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],y=new s.A,D=[0,0,0,0,0,0,0,0]},82919:(t,e,n)=>{n.d(e,{C:()=>g,vt:()=>m,ui:()=>O,m7:()=>A});var i=n(4341),o=n(58083),r=n(38954),s=n(51850),c=n(87317),u=n(91829),a=n(71351);function h(t){return t?{ray:(0,a.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,a.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I((()=>h()));var d,l,_,f=n(27921),T=n(32114);function m(t){return t?[(0,f.vt)(t[0]),(0,f.vt)(t[1]),(0,f.vt)(t[2]),(0,f.vt)(t[3]),(0,f.vt)(t[4]),(0,f.vt)(t[5])]:[(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)()]}function g(t,e){for(let n=0;n<p;n++)(0,f.C)(t[n],e[n]);return t}function O(t,e,n,i=E){const s=(0,o.lw)(T.Rc.get(),e,t);(0,o.B8)(s,s);for(let t=0;t<R;++t){const e=(0,c.t)(T.Km.get(),b[t],s);(0,r.i)(i[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}!function(t,e){(0,f.Cr)(e[l.FAR_BOTTOM_LEFT],e[l.NEAR_BOTTOM_LEFT],e[l.NEAR_TOP_LEFT],t[d.LEFT]),(0,f.Cr)(e[l.NEAR_BOTTOM_RIGHT],e[l.FAR_BOTTOM_RIGHT],e[l.FAR_TOP_RIGHT],t[d.RIGHT]),(0,f.Cr)(e[l.FAR_BOTTOM_LEFT],e[l.FAR_BOTTOM_RIGHT],e[l.NEAR_BOTTOM_RIGHT],t[d.BOTTOM]),(0,f.Cr)(e[l.NEAR_TOP_LEFT],e[l.NEAR_TOP_RIGHT],e[l.FAR_TOP_RIGHT],t[d.TOP]),(0,f.Cr)(e[l.NEAR_BOTTOM_LEFT],e[l.NEAR_BOTTOM_RIGHT],e[l.NEAR_TOP_RIGHT],t[d.NEAR]),(0,f.Cr)(e[l.FAR_BOTTOM_RIGHT],e[l.FAR_BOTTOM_LEFT],e[l.FAR_TOP_LEFT],t[d.FAR])}(n,i)}function A(t,e){for(let n=0;n<p;n++){const i=t[n];if(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]>=e[3])return!1}return!0}(_=d||(d={}))[_.LEFT=0]="LEFT",_[_.RIGHT=1]="RIGHT",_[_.BOTTOM=2]="BOTTOM",_[_.TOP=3]="TOP",_[_.NEAR=4]="NEAR",_[_.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(l||(l={})),l.FAR_BOTTOM_RIGHT,l.NEAR_BOTTOM_RIGHT,l.NEAR_BOTTOM_LEFT,l.FAR_BOTTOM_LEFT,l.NEAR_BOTTOM_LEFT,l.NEAR_BOTTOM_RIGHT,l.NEAR_TOP_RIGHT,l.NEAR_TOP_LEFT,l.FAR_BOTTOM_RIGHT,l.FAR_BOTTOM_LEFT,l.FAR_TOP_LEFT,l.FAR_TOP_RIGHT,l.NEAR_BOTTOM_RIGHT,l.FAR_BOTTOM_RIGHT,l.FAR_TOP_RIGHT,l.NEAR_TOP_RIGHT,l.FAR_BOTTOM_LEFT,l.NEAR_BOTTOM_LEFT,l.NEAR_TOP_LEFT,l.FAR_TOP_LEFT,l.FAR_TOP_LEFT,l.NEAR_TOP_LEFT,l.NEAR_TOP_RIGHT,l.FAR_TOP_RIGHT;const p=6,R=8,b=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],E=(new i.I(h),[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()])},88582:(t,e,n)=>{var i;n.d(e,{_:()=>i}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(i||(i={}))},97937:(t,e,n)=>{n.d(e,{a:()=>b,c:()=>m,e:()=>A,f:()=>E,g:()=>R,i:()=>N,o:()=>C,s:()=>z,w:()=>p}),n(44208),n(53966);var i=n(34727),o=n(58083),r=n(38954),s=n(51850),c=n(87317),u=n(91829),a=n(34304),h=n(88582),d=n(71351);function l(t,e){const n=(0,r.l)(t),o=(0,i.YN)(t[2]/n),s=Math.atan2(t[1]/n,t[0]/n);return(0,r.i)(e,n,o,s),e}var _=n(44280),f=n(32114);const T=m();function m(){return(0,u.vt)()}const g=c.e,O=c.e;function A(t,e){return(0,c.c)(e,t)}function p(t){return t}function R(t){return t[3]}function b(t){return t}function E(t,e,n,i){return(0,u.fA)(t,e,n,i)}function v(t,e,n){if(null==e)return!1;if(!F(t,e,M))return!1;let{t0:i,t1:o}=M;if((i<0||o<i&&o>0)&&(i=o),i<0)return!1;if(n){const{origin:t,direction:o}=e;n[0]=t[0]+o[0]*i,n[1]=t[1]+o[1]*i,n[2]=t[2]+o[2]*i}return!0}const M={t0:0,t1:0};function F(t,e,n){const{origin:i,direction:o}=e,r=S;r[0]=i[0]-t[0],r[1]=i[1]-t[1],r[2]=i[2]-t[2];const s=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===s)return!1;const c=2*(o[0]*r[0]+o[1]*r[1]+o[2]*r[2]),u=c*c-4*s*(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]-t[3]*t[3]);if(u<0)return!1;const a=Math.sqrt(u);return n.t0=(-c-a)/(2*s),n.t1=(-c+a)/(2*s),!0}const S=(0,s.vt)();function N(t,e){return v(t,e,null)}function P(t,e,n){const i=f.rq.get(),s=f.Rc.get();(0,r.e)(i,e.origin,e.direction);const c=R(t);(0,r.e)(n,i,e.origin),(0,r.h)(n,n,1/(0,r.l)(n)*c);const u=B(t,e.origin),a=(0,_.g7)(e.origin,n);return(0,o.$0)(s,a+u,i),(0,r.t)(n,n,s),n}function x(t,e,n){const i=(0,r.d)(f.rq.get(),e,t),o=(0,r.h)(f.rq.get(),i,t[3]/(0,r.l)(i));return(0,r.g)(n,o,t)}function B(t,e){const n=(0,r.d)(f.rq.get(),e,t),o=(0,r.l)(n),s=R(t),c=s+Math.abs(s-o);return(0,i.XM)(s/c)}const j=(0,s.vt)();function I(t,e,n,i){const o=(0,r.d)(j,e,t);switch(n){case h._.X:{const t=l(o,j)[2];return(0,r.i)(i,-Math.sin(t),Math.cos(t),0)}case h._.Y:{const t=l(o,j),e=t[1],n=t[2],s=Math.sin(e);return(0,r.i)(i,-s*Math.cos(n),-s*Math.sin(n),Math.cos(e))}case h._.Z:return(0,r.n)(i,o);default:return}}function L(t,e){const n=(0,r.d)(H,e,t);return(0,r.l)(n)-t[3]}function C(t,e){const n=(0,r.s)(t,e),i=R(t);return n<=i*i}const H=(0,s.vt)(),w=m(),z=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:T,altitudeAt:L,angleToSilhouette:B,axisAt:I,cameraFrustumCoverage:function(t,e,n,i){const o=R(t),r=o*o,s=e+.5*Math.PI,c=n*n+r-2*Math.cos(s)*n*o,u=Math.sqrt(c),a=c-r;if(a<=0)return.5;const h=Math.sqrt(a),d=Math.acos(h/u)-Math.asin(o/(u/Math.sin(s)));return Math.min(1,(d+.5*i)/i)},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return v(t,e,n)?n:((0,d.oC)(e,t,n),x(t,n,n))},closestPointOnSilhouette:P,containsPoint:C,copy:A,create:m,distanceToSilhouette:function(t,e){const n=(0,r.d)(f.rq.get(),e,t),i=(0,r.k)(n),o=t[3]*t[3];return Math.sqrt(Math.abs(i-o))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:O,exactEquals:g,fromCenterAndRadius:function(t,e){return(0,u.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:E,getCenter:b,getExtent:function(t,e){return e},getRadius:R,intersectLine:function(t,e,n){const i=(0,d.Cr)(e,n);if(!F(t,i,M))return[];const{origin:o,direction:c}=i,{t0:u,t1:h}=M,l=e=>{const n=(0,s.vt)();return(0,r.b)(n,o,c,e),x(t,n,n)};return Math.abs(u-h)<(0,a.FD)()?[l(u)]:[l(u),l(h)]},intersectRay:v,intersectRayClosestSilhouette:function(t,e,n){if(v(t,e,n))return n;const i=P(t,e,f.rq.get());return(0,r.g)(n,e.origin,(0,r.h)(f.rq.get(),e.direction,(0,r.j)(e.origin,i)/(0,r.l)(e.direction))),n},intersectsRay:N,projectPoint:x,setAltitudeAt:function(t,e,n,i){const o=L(t,e),s=I(t,e,h._.Z,H),c=(0,r.h)(H,s,n-o);return(0,r.g)(i,e,c)},setExtent:function(t,e,n){return t!==n&&A(t,n),n},tmpSphere:w,union:function(t,e,n=(0,u.vt)()){const i=(0,r.j)(t,e),o=t[3],s=e[3];return i+s<o?((0,c.c)(n,t),n):i+o<s?((0,c.c)(n,e),n):((0,r.m)(n,t,e,(i+s-o)/(2*i)),n[3]=(i+o+s)/2,n)},wrap:p},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2936,4755,7136],{17136:(e,t,r)=>{r.d(t,{O7:()=>S,el:()=>x});var n=r(92602),o=r(49186),i=r(53966),s=r(39829),l=r(82799),a=r(80754),p=r(21325),u=r(28735),y=r(78888),c=r(65864),f=r(2272),d=r(84952),m=r(92300);const h=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function _(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new o.A(e)}const r=(0,a.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const o=e[n][0],i=e[n][1],s=e[n+1][0],l=e[n+1][1],a=Math.sqrt((s-o)*(s-o)+(l-i)*(l-i)),p=(l-i)/a,u=(s-o)/a,y=a/t;if(y>1){for(let e=1;e<=y-1;e++){const n=e*t,s=u*n+o,l=p*n+i;r.push([s,l])}const e=(a+Math.floor(y-1)*t)/2,n=u*e+o,s=p*e+i;r.push([n,s])}r.push([s,l])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:n,spatialReference:e.spatialReference}):new l.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return r&&(e=(0,a.kS)(e,r)),e}function w(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,a.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,a.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,a.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,a.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function M(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const o=t.cutIndexes[n],i=t.geometries[n],s=(0,a.r8)(i);for(let e=0;e<s.length;e++){const t=s[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,a.kd)(r,180);for(let r=0;r<t.length;r++){const t=i.getPoint(e,r);i.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(o===r){if(g(e))for(const t of(0,a.r8)(i))e[o]=e[o].addRing(t);else if(b(e))for(const t of(0,a.r8)(i))e[o]=e[o].addPath(t)}else r=o,e[o]=i}return e}async function x(e,t,r){if(!Array.isArray(e))return x([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let i,g,b,S,v,T,O,A,N=0;const Z=[],I=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,g=(0,p.Vp)(i),b=i.isWebMercator,T=b?102100:4326,S=a.j7[T].maxX,v=a.j7[T].minX,O=a.j7[T].plus180Line,A=a.j7[T].minus180Line),g)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(w(t.clone(),S,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,S,v))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);I.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,a.kd)(e.xmin,v)*(2*S);let n=0===r?t.clone():(0,a.kS)(t.clone(),r);e.offset(r,0);let{xmin:o,xmax:i}=e;o=Number(o.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(O)&&i!==S?(N=i>N?i:N,n=_(n,b),Z.push(n),I.push("cut")):e.intersects(A)&&o!==v?(N=i*(2*S)>N?i*(2*S):N,n=_(n,b,360),Z.push(n),I.push("cut")):I.push(n)}else I.push(t.clone());else I.push(t);else I.push(t);let F=(0,a.kd)(N,S),L=-90;const R=F,j=new l.A;for(;F>0;){const e=360*F-180;j.addPath([[e,L],[e,-1*L]]),L*=-1,F--}if(Z.length>0&&R>0){const t=M(Z,await async function(e,t,r,n){const o=(0,f.Dl)(e),i=t[0].spatialReference,s={...n,responseType:"json",query:{...o.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},l=await(0,y.A)(o.path+"/cut",s),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=i,t}))}}(o,Z,j,r)),n=[],i=[];for(let r=0;r<I.length;r++){const o=I[r];if("cut"!==o)i.push(o);else{const o=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&o.rings.length>=s.rings.length?(n.push(o),i.push("simplify")):i.push(b?(0,u.Gh)(o):o)}}if(!n.length)return i;const s=await async function(e,t,r){const n="string"==typeof e?(0,d.An)(e):e,o=t[0].spatialReference,i=(0,c.$B)(t[0]),s={...r,query:{...n.query,f:"json",sr:(0,p.YX)(o),geometries:JSON.stringify((0,m.X)(t))}},{data:l}=await(0,y.A)(n.path+"/simplify",s);return(0,m.V)(l.geometries,i,o)}(o,n,r),l=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?l.push(t):l.push(b?(0,u.Gh)(s.shift()):s.shift())}return l}const J=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)J.push(t);else{const e=Z.shift();J.push(!0===b?(0,u.Gh)(e):e)}}return J}function S(e,t,r){const n=(0,p.Vp)(r);if(null==n)return e;const[o,i]=n.valid,s=2*i;let l=0,a=0;t>i?l=Math.ceil(Math.abs(t-i)/s):t<o&&(l=-Math.ceil(Math.abs(t-o)/s)),e>i?a=Math.ceil(Math.abs(e-i)/s):e<o&&(a=-Math.ceil(Math.abs(e-o)/s));let u=e+(l-a)*s;const y=u-t;return y>i?u-=s:y<o&&(u+=s),u}},17311:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(90237),o=r(69622),i=r(60999),s=r(5503),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),p=r(30524),u=r(43668);let y=class extends o.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,i.UT)((()=>(0,u.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new s.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){try{const{attributes:n}=t,o=r?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:i}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(r.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const r=this._createFormattedAttributes(e,t,o).global;return i({attributes:n,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:r,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const r=t.getObjectId();if(null==r)return t;if(!(0,p.Kl)(this.requiredFields,t)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[r];const n=await e.queryFeatures(t);if(1===n?.features.length)return n.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],o={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{o[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const i={...t.attributes,...o};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:i,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,l.MZ)({readOnly:!0})],y.prototype,"_arcadeTask",null),(0,n._)([(0,l.MZ)()],y.prototype,"_featureUtils",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],y.prototype,"featureUtilsPromise",null),(0,n._)([(0,l.MZ)({readOnly:!0})],y.prototype,"calculatedExpressions",null),(0,n._)([(0,l.MZ)()],y.prototype,"displayField",void 0),(0,n._)([(0,l.MZ)()],y.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,l.MZ)()],y.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,l.MZ)()],y.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)()],y.prototype,"fieldInfoMap",null),(0,n._)([(0,l.MZ)()],y.prototype,"fields",void 0),(0,n._)([(0,l.MZ)()],y.prototype,"objectIdField",void 0),(0,n._)([(0,l.MZ)()],y.prototype,"requiredFields",null),y=(0,n._)([(0,a.$)("esri.layers.support.TitleCreator")],y);const c=y},22671:(e,t,r)=>{r.d(t,{A:()=>_});var n,o=r(90237),i=r(52106),s=r(66552),l=r(25482),a=r(4718),p=r(10107),u=(r(44208),r(53966),r(36005)),y=r(40608),c=r(43937),f=r(16930),d=r(65864),m=r(50498),h=r(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=n=class extends l.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,i.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,d.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,i=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)s?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,o],scale:[i,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*i+n),(e=>o-e*s),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=f.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const i=e[t],s=r.fromJSON(i),l=i.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=n);const a=i.aggregateGeometries,p=s.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=n)}o.push(s)}return o}_quantizePoints(e,t,r){let n,o;const i=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===n&&s===o||(i.push([e-n,s-o]),n=e,o=s)}else n=t(l[0]),o=r(l[1]),i.push([n,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],s=this._quantizePoints(i,t,r);s&&o.push(s)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,d.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,n=i.length;e<n;e++){const n=i[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(s+=o[0],l+=o[1]):(s=o[0],l=o[1]),o[0]=t(s),o[1]=r(l)}}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let s,l;for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.MZ)({type:[i.A],json:{write:!0}})],b.prototype,"features",void 0),(0,o._)([(0,u.w)("features")],b.prototype,"readFeatures",null),(0,o._)([(0,p.MZ)({type:[h.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,o._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,o._)([(0,c.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,o._)([(0,p.MZ)({types:m.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,o._)([(0,u.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,o._)([(0,p.MZ)({type:f.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,o._)([(0,c.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,o._)([(0,p.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=n=(0,o._)([(0,y.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const _=b},33032:(e,t,r)=>{r.d(t,{H:()=>o,L:()=>n});const n=1;function o(e,t){let r=0;for(const n of t){const t=n.attributes?.[e];"number"==typeof t&&isFinite(t)&&(r=Math.max(r,t))}return r}},33143:(e,t,r)=>{r.d(t,{A:()=>f});var n=r(90237),o=r(69540),i=r(25482),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(80451),y=r(29005);let c=class extends(o.A.ClonableMixin(i.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,n._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,n._)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,n._)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,n._)([(0,s.MZ)({type:[y.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,n._)([(0,a.$)("esri.layers.support.FeatureType")],c);const f=c},41366:(e,t,r)=>{r.d(t,{K:()=>c,Q:()=>p});var n=r(90237),o=r(66552),i=r(53966),s=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const p=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",y="field",c=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&y||r&&u||null,t&&r&&i.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==y&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,l.e)(p,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},58501:(e,t,r)=>{r.d(t,{q:()=>o});var n=r(62815);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},80754:(e,t,r)=>{r.d(t,{j7:()=>s,kS:()=>a,kd:()=>l,r8:()=>p});var n=r(82799),o=r(16930),i=r(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=p(e);for(const e of r)for(const r of e)r[0]+=t;return e}function p(e){return(0,i.Bi)(e)?e.rings:e.paths}},92300:(e,t,r)=>{r.d(t,{V:()=>i,X:()=>o});var n=r(65864);function o(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,r){const o=(0,n.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}},92935:(e,t,r)=>{var n;r.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))},96953:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var n=r(90237),o=r(52106),i=r(5503),s=r(49186),l=r(4718),a=r(92071),p=r(93637),u=r(67076),y=r(10107),c=(r(44208),r(53966),r(36005)),f=r(40608),d=r(43937),m=r(5443),h=r(80586),g=r(16930),b=r(19419),_=r(17136),w=r(21325),M=r(13600),x=r(94194),S=r(4146),v=r(33032),T=r(63074),O=r(16131),A=r(8303),N=r(25036),Z=r(20437),I=r(94985),F=r(31593),L=r(53930),R=r(68249);function j(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!J(e)))}function J({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return G.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function z(){return new m.A({xmin:-180,ymin:-90,xmax:180,ymax:90})}const P=new Z.A({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),k=new Z.A({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let C=class extends x.A{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,h.projectOrLoad)(z(),e).geometry:(0,b.w1)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,b.Ie)();return this.graphics.forEach((r=>{const n=null!=r.geometry?(0,h.projectOrLoad)(r.geometry,e).geometry:null;null!=n&&(0,b.fT)(t,"point"===n.type?n:n.extent,t)})),(0,b.aI)(t,b.qv)?null:t}get sublayers(){return this.graphics}};(0,n._)([(0,y.MZ)({readOnly:!0})],C.prototype,"fullExtent",null),(0,n._)([(0,y.MZ)({readOnly:!0})],C.prototype,"fullBounds",null),(0,n._)([(0,y.MZ)({readOnly:!0})],C.prototype,"sublayers",null),(0,n._)([(0,y.MZ)()],C.prototype,"layer",void 0),(0,n._)([(0,y.MZ)()],C.prototype,"layerId",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],C.prototype,"visibilityMode",void 0),C=(0,n._)([(0,f.$)("esri.layers.MapNotesLayer.MapNotesSublayer")],C);const G=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new I.A).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new F.A).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new R.A).toJSON()}];let E=class extends((0,T.dM)((0,N.j)((0,O.q)((0,A.A)((0,a.P)(S.A)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=g.A.WGS84,this.sublayers=new i.A(G.map((e=>new C({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!j(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!j(t))return null;const n=t.layers.map((e=>{const t=new M.default;return t.read(e,r),t}));return new i.A({items:n})}readLegacyfeatureCollectionJSON(e,t){return j(t)?(0,l.o8)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,b.Ie)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,b.fT)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((r=>{const n=(0,h.projectOrLoad)(r.layerDefinition.extent,e).geometry;null!=n&&(0,b.fT)(t,n,t)})),(0,b.aI)(t,b.qv)?(0,h.projectOrLoad)(z(),e).geometry:(0,b.w1)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?g.A.fromJSON(t.layers[0].layerDefinition.spatialReference):g.A.WGS84}readSublayers(e,t,r){if(j(t))return null;const n=[];let s=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:r}=e,i=t.id??s++,l=J(e);if(null!=l){const e=new C({id:l.id,title:t.name,layerId:i,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:n})=>o.A.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:n})))});n.push(e)}}return new i.A(n)}writeSublayers(e,t,r,n){const{minScale:o,maxScale:i}=this;if(null==e)return;const l=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(l&&n?.messages?.push(new s.A("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const a=[];let u=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){u=e.geometry.spatialReference.toJSON();break e}for(const t of G){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(a,r,t,o,i,u,n)}(0,p.sM)("featureCollection.layers",a,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,l.o8)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const r of this.sublayers)for(const n of r.graphics)if(null!=n.geometry){const r=n.geometry;e?(0,w.aI)(r.spatialReference,e)||((0,h.canProjectWithoutEngine)(r.spatialReference,e)||(0,h.isLoaded)()||await(0,h.load)(),n.geometry=(0,h.project)(r,e)):e=r.spatialReference,t.push(n)}const r=await(0,_.el)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=r[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,r,n,o,i,s){const a=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(a,e,r.geometryType,s);this._normalizeObjectIds(a,P),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,l.o8)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:n,maxScale:o,objectIdField:"OBJECTID",fields:[P.toJSON(),k.toJSON()],spatialReference:i},featureSet:{features:a,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,n){if(null==t)return;const{geometry:o,symbol:i,popupTemplate:s}=t;if(null==o)return;if(o.type!==r)return void n?.messages?.push(new u.A("map-notes-layer:invalid-geometry-type",`Geometry "${o.type}" cannot be saved in "${r}" layer`,{graphic:t}));if(null==i)return void n?.messages?.push(new u.A("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const l={attributes:{...t.attributes},geometry:o.toJSON(),symbol:i.toJSON()};null!=s&&(l.popupInfo=s.toJSON()),e.push(l)}_normalizeObjectIds(e,t){const r=t.name;let n=(0,v.H)(r,e)+1;const o=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[r]||o.has(e[r]))&&(e[r]=n++),o.add(e[r])}}};(0,n._)([(0,y.MZ)({readOnly:!0})],E.prototype,"capabilities",void 0),(0,n._)([(0,c.w)(["portal-item","web-map"],"capabilities",["layers"])],E.prototype,"readCapabilities",null),(0,n._)([(0,y.MZ)({readOnly:!0})],E.prototype,"featureCollections",void 0),(0,n._)([(0,c.w)(["web-map","portal-item"],"featureCollections",["layers"])],E.prototype,"readFeatureCollections",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],E.prototype,"featureCollectionJSON",void 0),(0,n._)([(0,c.w)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],E.prototype,"readLegacyfeatureCollectionJSON",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],E.prototype,"featureCollectionType",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],E.prototype,"fullExtent",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],E.prototype,"legendEnabled",void 0),(0,n._)([(0,y.MZ)({type:["show","hide","hide-children"]})],E.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],E.prototype,"minScale",void 0),(0,n._)([(0,c.w)(["web-map","portal-item"],"minScale",["layers"])],E.prototype,"readMinScale",null),(0,n._)([(0,y.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],E.prototype,"maxScale",void 0),(0,n._)([(0,c.w)(["web-map","portal-item"],"maxScale",["layers"])],E.prototype,"readMaxScale",null),(0,n._)([(0,y.MZ)({readOnly:!0})],E.prototype,"multipointLayer",null),(0,n._)([(0,y.MZ)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],E.prototype,"operationalLayerType",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],E.prototype,"pointLayer",null),(0,n._)([(0,y.MZ)({readOnly:!0})],E.prototype,"polygonLayer",null),(0,n._)([(0,y.MZ)({readOnly:!0})],E.prototype,"polylineLayer",null),(0,n._)([(0,y.MZ)({type:g.A})],E.prototype,"spatialReference",void 0),(0,n._)([(0,c.w)(["web-map","portal-item"],"spatialReference",["layers"])],E.prototype,"readSpatialReference",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],E.prototype,"sublayers",void 0),(0,n._)([(0,c.w)("web-map","sublayers",["layers"])],E.prototype,"readSublayers",null),(0,n._)([(0,d.K)("web-map","sublayers")],E.prototype,"writeSublayers",null),(0,n._)([(0,y.MZ)({readOnly:!0})],E.prototype,"textLayer",null),(0,n._)([(0,y.MZ)()],E.prototype,"title",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],E.prototype,"type",void 0),E=(0,n._)([(0,f.$)("esri.layers.MapNotesLayer")],E);const q=E}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6285],{96285:(e,t,n)=>{n.d(t,{c9:()=>fr,mQ:()=>ie,oh:()=>U,bo:()=>Z});class r extends Error{}class s extends r{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends r{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class a extends r{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends r{}class u extends r{constructor(e){super(`Invalid unit ${e}`)}}class l extends r{}class c extends r{constructor(){super("Zone is an abstract class")}}const h="numeric",d="short",m="long",f={year:h,month:h,day:h},y={year:h,month:d,day:h},g={year:h,month:d,day:h,weekday:d},w={year:h,month:m,day:h},p={year:h,month:m,day:h,weekday:m},k={hour:h,minute:h},v={hour:h,minute:h,second:h},S={hour:h,minute:h,second:h,timeZoneName:d},T={hour:h,minute:h,second:h,timeZoneName:m},b={hour:h,minute:h,hourCycle:"h23"},O={hour:h,minute:h,second:h,hourCycle:"h23"},N={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:d},D={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:m},M={year:h,month:h,day:h,hour:h,minute:h},I={year:h,month:h,day:h,hour:h,minute:h,second:h},V={year:h,month:d,day:h,hour:h,minute:h},x={year:h,month:d,day:h,hour:h,minute:h,second:h},E={year:h,month:d,day:h,weekday:d,hour:h,minute:h},C={year:h,month:m,day:h,hour:h,minute:h,timeZoneName:d},F={year:h,month:m,day:h,hour:h,minute:h,second:h,timeZoneName:d},$={year:h,month:m,day:h,weekday:m,hour:h,minute:h,timeZoneName:m},W={year:h,month:m,day:h,weekday:m,hour:h,minute:h,second:h,timeZoneName:m};class Z{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let L=null;class z extends Z{static get instance(){return null===L&&(L=new z),L}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return st(e,t,n)}formatOffset(e,t){return ut(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let j={};const q={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let A={};class U extends Z{static create(e){return A[e]||(A[e]=new U(e)),A[e]}static resetCache(){A={},j={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=U.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return st(e,t,n,this.name)}formatOffset(e,t){return ut(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=(r=this.name,j[r]||(j[r]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),j[r]);var r;let[s,i,a,o,u,l,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const{type:t,value:s}=n[e],i=q[t];"era"===t?r[i]=s:Le(i)||(r[i]=parseInt(s,10))}return r}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,i,a,o,u,l,c]=r;return[a,s,i,o,u,l,c]}(n,t);"BC"===o&&(s=1-Math.abs(s));let h=+t;const d=h%1e3;return h-=d>=0?d:1e3+d,(et({year:s,month:i,day:a,hour:24===u?0:u,minute:l,second:c,millisecond:0})-h)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let _={},Y={};function R(e,t={}){const n=JSON.stringify([e,t]);let r=Y[n];return r||(r=new Intl.DateTimeFormat(e,t),Y[n]=r),r}let H={},P={},J=null,G={};function B(e){return G[e]||(G[e]=new Intl.DateTimeFormat(e).resolvedOptions()),G[e]}let Q={};function K(e,t,n,r){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):r(t)}class X{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:s,...i}=n;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=H[n];return r||(r=new Intl.NumberFormat(e,t),H[n]=r),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return He(this.floor?Math.floor(e):Be(e,3),this.padTo)}}class ee{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&U.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=R(t,s)}format(){return this.originalZone?this.formatToParts().map((({value:e})=>e)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class te{constructor(e,t,n){this.opts={style:"long",...n},!t&&qe()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,s=JSON.stringify([e,r]);let i=P[s];return i||(i=new Intl.RelativeTimeFormat(e,t),P[s]=i),i}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${s[e][0]}`;case-1:return n?"yesterday":`last ${s[e][0]}`;case 0:return n?"today":`this ${s[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),u=1===o,l=s[e],c=r?u?l[1]:l[2]||l[1]:u?s[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ne={firstDay:1,minimalDays:4,weekend:[6,7]};class re{static fromOpts(e){return re.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,s=!1){const i=e||Se.defaultLocale,a=i||(s?"en-US":J||(J=(new Intl.DateTimeFormat).resolvedOptions().locale,J)),o=t||Se.defaultNumberingSystem,u=n||Se.defaultOutputCalendar,l=Ye(r)||Se.defaultWeekSettings;return new re(a,o,u,l,i)}static resetCache(){J=null,Y={},H={},P={},G={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return re.create(e,t,n,r)}constructor(e,t,n,r,s){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=R(e).resolvedOptions(),r=e}catch(s){const i=e.substring(0,n);t=R(i).resolvedOptions(),r=i}const{numberingSystem:s,calendar:i}=t;return[r,s,i]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===B(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?re.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ye(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return K(this,e,mt,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=fr.utc(2009,n,1);t.push(e(r))}return t}((e=>this.extract(e,n,"month")))),this.monthsCache[r][e]}))}weekdays(e,t=!1){return K(this,e,wt,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=fr.utc(2016,11,13+n);t.push(e(r))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[r][e]}))}meridiems(){return K(this,void 0,(()=>pt),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[fr.utc(2016,11,13,9),fr.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return K(this,e,Tt,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[fr.utc(-40,1,1),fr.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return r?r.value:null}numberFormatter(e={}){return new X(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ee(e,this.intl,t)}relFormatter(e={}){return new te(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=_[n];return r||(r=new Intl.ListFormat(e,t),_[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||B(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ae()?function(e){let t=Q[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Q[e]=t}return t}(this.locale):ne}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let se=null;class ie extends Z{static get utcInstance(){return null===se&&(se=new ie(0)),se}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(it(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${ut(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${ut(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ut(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ae extends Z{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function oe(e,t){if(Le(e)||null===e)return t;if(e instanceof Z)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?z.instance:"utc"===n||"gmt"===n?ie.utcInstance:ie.parseSpecifier(n)||U.create(e)}return ze(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ae(e)}const ue={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},le={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ce=ue.hanidec.replace(/[\[|\]]/g,"").split("");let he={};function de({numberingSystem:e},t=""){const n=e||"latn";return he[n]||(he[n]={}),he[n][t]||(he[n][t]=new RegExp(`${ue[n]}${t}`)),he[n][t]}let me,fe=()=>Date.now(),ye="system",ge=null,we=null,pe=null,ke=60,ve=null;class Se{static get now(){return fe}static set now(e){fe=e}static set defaultZone(e){ye=e}static get defaultZone(){return oe(ye,z.instance)}static get defaultLocale(){return ge}static set defaultLocale(e){ge=e}static get defaultNumberingSystem(){return we}static set defaultNumberingSystem(e){we=e}static get defaultOutputCalendar(){return pe}static set defaultOutputCalendar(e){pe=e}static get defaultWeekSettings(){return ve}static set defaultWeekSettings(e){ve=Ye(e)}static get twoDigitCutoffYear(){return ke}static set twoDigitCutoffYear(e){ke=e%100}static get throwOnInvalid(){return me}static set throwOnInvalid(e){me=e}static resetCaches(){re.resetCache(),U.resetCache(),fr.resetCache(),he={}}}class Te{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const be=[0,31,59,90,120,151,181,212,243,273,304,334],Oe=[0,31,60,91,121,152,182,213,244,274,305,335];function Ne(e,t){return new Te("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function De(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return 0===s?7:s}function Me(e,t,n){return n+(Qe(e)?Oe:be)[t-1]}function Ie(e,t){const n=Qe(e)?Oe:be,r=n.findIndex((e=>e<t));return{month:r+1,day:t-n[r]}}function Ve(e,t){return(e-t+7)%7+1}function xe(e,t=4,n=1){const{year:r,month:s,day:i}=e,a=Me(r,s,i),o=Ve(De(r,s,i),n);let u,l=Math.floor((a-o+14-t)/7);return l<1?(u=r-1,l=nt(u,t,n)):l>nt(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:o,...lt(e)}}function Ee(e,t=4,n=1){const{weekYear:r,weekNumber:s,weekday:i}=e,a=Ve(De(r,1,t),n),o=Ke(r);let u,l=7*s+i-a-7+t;l<1?(u=r-1,l+=Ke(u)):l>o?(u=r+1,l-=Ke(r)):u=r;const{month:c,day:h}=Ie(u,l);return{year:u,month:c,day:h,...lt(e)}}function Ce(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Me(t,n,r),...lt(e)}}function Fe(e){const{year:t,ordinal:n}=e,{month:r,day:s}=Ie(t,n);return{year:t,month:r,day:s,...lt(e)}}function $e(e,t){if(!Le(e.localWeekday)||!Le(e.localWeekNumber)||!Le(e.localWeekYear)){if(!Le(e.weekday)||!Le(e.weekNumber)||!Le(e.weekYear))throw new o("Cannot mix locale-based week fields with ISO-based week fields");return Le(e.localWeekday)||(e.weekday=e.localWeekday),Le(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Le(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function We(e){const t=je(e.year),n=Re(e.month,1,12),r=Re(e.day,1,Xe(e.year,e.month));return t?n?!r&&Ne("day",e.day):Ne("month",e.month):Ne("year",e.year)}function Ze(e){const{hour:t,minute:n,second:r,millisecond:s}=e,i=Re(t,0,23)||24===t&&0===n&&0===r&&0===s,a=Re(n,0,59),o=Re(r,0,59),u=Re(s,0,999);return i?a?o?!u&&Ne("millisecond",s):Ne("second",r):Ne("minute",n):Ne("hour",t)}function Le(e){return void 0===e}function ze(e){return"number"==typeof e}function je(e){return"number"==typeof e&&e%1==0}function qe(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Ae(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(e,t,n){if(0!==e.length)return e.reduce(((e,r)=>{const s=[t(r),r];return e&&n(e[0],s[0])===e[0]?e:s}),null)[1]}function _e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ye(e){if(null==e)return null;if("object"!=typeof e)throw new l("Week settings must be an object");if(!Re(e.firstDay,1,7)||!Re(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!Re(e,1,7))))throw new l("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Re(e,t,n){return je(e)&&e>=t&&e<=n}function He(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Pe(e){return Le(e)||null===e||""===e?void 0:parseInt(e,10)}function Je(e){return Le(e)||null===e||""===e?void 0:parseFloat(e)}function Ge(e){if(!Le(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Be(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Qe(e){return e%4==0&&(e%100!=0||e%400==0)}function Ke(e){return Qe(e)?366:365}function Xe(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?Qe(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function et(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function tt(e,t,n){return-Ve(De(e,1,t),n)+t-1}function nt(e,t=4,n=1){const r=tt(e,t,n),s=tt(e+1,t,n);return(Ke(e)-r+s)/7}function rt(e){return e>99?e:e>Se.twoDigitCutoffYear?1900+e:2e3+e}function st(e,t,n,r=null){const s=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(s).find((e=>"timezonename"===e.type.toLowerCase()));return o?o.value:null}function it(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function at(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new l(`Invalid unit value ${e}`);return t}function ot(e,t){const n={};for(const r in e)if(_e(e,r)){const s=e[r];if(null==s)continue;n[t(r)]=at(s)}return n}function ut(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${He(n,2)}:${He(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${He(n,2)}${He(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function lt(e){return function(e){return["hour","minute","second","millisecond"].reduce(((t,n)=>(t[n]=e[n],t)),{})}(e)}const ct=["January","February","March","April","May","June","July","August","September","October","November","December"],ht=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dt=["J","F","M","A","M","J","J","A","S","O","N","D"];function mt(e){switch(e){case"narrow":return[...dt];case"short":return[...ht];case"long":return[...ct];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ft=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],yt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gt=["M","T","W","T","F","S","S"];function wt(e){switch(e){case"narrow":return[...gt];case"short":return[...yt];case"long":return[...ft];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const pt=["AM","PM"],kt=["Before Christ","Anno Domini"],vt=["BC","AD"],St=["B","A"];function Tt(e){switch(e){case"narrow":return[...St];case"short":return[...vt];case"long":return[...kt];default:return null}}function bt(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Ot={D:f,DD:y,DDD:w,DDDD:p,t:k,tt:v,ttt:S,tttt:T,T:b,TT:O,TTT:N,TTTT:D,f:M,ff:V,fff:C,ffff:$,F:I,FF:x,FFF:F,FFFF:W};class Nt{static create(e,t={}){return new Nt(e,t)}static parseFormat(e){let t=null,n="",r=!1;const s=[];for(let i=0;i<e.length;i++){const a=e.charAt(i);"'"===a?(n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return Ot[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return He(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=(t,r)=>n?function(e,t){return mt(t)[e.month-1]}(e,t):s(r?{month:t}:{month:t,day:"numeric"},"month"),o=(t,r)=>n?function(e,t){return wt(t)[e.weekday-1]}(e,t):s(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=Nt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},l=t=>n?function(e,t){return Tt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return bt(Nt.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return pt[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?s({day:"numeric"},"day"):this.num(e.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return o("short",!0);case"cccc":return o("long",!0);case"ccccc":return o("narrow",!0);case"EEE":return o("short",!1);case"EEEE":return o("long",!1);case"EEEEE":return o("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(e.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(e.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}}))}formatDurationFromString(e,t){const n=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=Nt.parseFormat(t),s=r.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]);return bt(r,(e=>t=>{const r=n(t);return r?this.num(e.get(r),t.length):t})(e.shiftTo(...s.map(n).filter((e=>e)))))}}const Dt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Mt(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function It(...e){return t=>e.reduce((([e,n,r],s)=>{const[i,a,o]=s(t,r);return[{...e,...i},a||n,o]}),[{},null,1]).slice(0,2)}function Vt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function xt(...e){return(t,n)=>{const r={};let s;for(s=0;s<e.length;s++)r[e[s]]=Pe(t[n+s]);return[r,null,n+s]}}const Et=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Ct=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ft=RegExp(`${Ct.source}(?:${Et.source}?(?:\\[(${Dt.source})\\])?)?`),$t=RegExp(`(?:T${Ft.source})?`),Wt=xt("weekYear","weekNumber","weekDay"),Zt=xt("year","ordinal"),Lt=RegExp(`${Ct.source} ?(?:${Et.source}|(${Dt.source}))?`),zt=RegExp(`(?: ${Lt.source})?`);function jt(e,t,n){const r=e[t];return Le(r)?n:Pe(r)}function qt(e,t){return[{hours:jt(e,t,0),minutes:jt(e,t+1,0),seconds:jt(e,t+2,0),milliseconds:Ge(e[t+3])},null,t+4]}function At(e,t){const n=!e[t]&&!e[t+1],r=it(e[t+1],e[t+2]);return[{},n?null:ie.instance(r),t+3]}function Ut(e,t){return[{},e[t]?U.create(e[t]):null,t+1]}const _t=RegExp(`^T?${Ct.source}$`),Yt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Rt(e){const[t,n,r,s,i,a,o,u,l]=e,c="-"===t[0],h=u&&"-"===u[0],d=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:d(Je(n)),months:d(Je(r)),weeks:d(Je(s)),days:d(Je(i)),hours:d(Je(a)),minutes:d(Je(o)),seconds:d(Je(u),"-0"===u),milliseconds:d(Ge(l),h)}]}const Ht={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pt(e,t,n,r,s,i,a){const o={year:2===t.length?rt(Pe(t)):Pe(t),month:ht.indexOf(n)+1,day:Pe(r),hour:Pe(s),minute:Pe(i)};return a&&(o.second=Pe(a)),e&&(o.weekday=e.length>3?ft.indexOf(e)+1:yt.indexOf(e)+1),o}const Jt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Gt(e){const[,t,n,r,s,i,a,o,u,l,c,h]=e,d=Pt(t,s,r,n,i,a,o);let m;return m=u?Ht[u]:l?0:it(c,h),[d,new ie(m)]}const Bt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Qt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Kt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Xt(e){const[,t,n,r,s,i,a,o]=e;return[Pt(t,s,r,n,i,a,o),ie.utcInstance]}function en(e){const[,t,n,r,s,i,a,o]=e;return[Pt(t,o,n,r,s,i,a),ie.utcInstance]}const tn=Mt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,$t),nn=Mt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,$t),rn=Mt(/(\d{4})-?(\d{3})/,$t),sn=Mt(Ft),an=It((function(e,t){return[{year:jt(e,t),month:jt(e,t+1,1),day:jt(e,t+2,1)},null,t+3]}),qt,At,Ut),on=It(Wt,qt,At,Ut),un=It(Zt,qt,At,Ut),ln=It(qt,At,Ut),cn=It(qt),hn=Mt(/(\d{4})-(\d\d)-(\d\d)/,zt),dn=Mt(Lt),mn=It(qt,At,Ut),fn="Invalid Duration",yn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},gn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...yn},wn={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...yn},pn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],kn=pn.slice(0).reverse();function vn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new bn(r)}function Sn(e,t){let n=t.milliseconds??0;for(const r of kn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Tn(e,t){const n=Sn(e,t)<0?-1:1;pn.reduceRight(((r,s)=>{if(Le(t[s]))return r;if(r){const i=t[r]*n,a=e[s][r],o=Math.floor(i/a);t[s]+=o*n,t[r]-=o*a*n}return s}),null),pn.reduce(((n,r)=>{if(Le(t[r]))return n;if(n){const s=t[n]%1;t[n]-=s,t[r]+=s*e[n][r]}return r}),null)}class bn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?wn:gn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||re.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return bn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new l("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new bn({values:ot(e,bn.normalizeUnit),loc:re.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(ze(e))return bn.fromMillis(e);if(bn.isDuration(e))return e;if("object"==typeof e)return bn.fromObject(e);throw new l(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Vt(e,[Yt,Rt])}(e);return n?bn.fromObject(n,t):bn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Vt(e,[_t,cn])}(e);return n?bn.fromObject(n,t):bn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Duration is invalid");const n=e instanceof Te?e:new Te(e,t);if(Se.throwOnInvalid)throw new a(n);return new bn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new u(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Nt.create(this.loc,n).formatDurationFromString(this,e):fn}toHuman(e={}){if(!this.isValid)return fn;const t=pn.map((t=>{const n=this.values[t];return Le(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Be(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},fr.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Sn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=bn.fromDurationLike(e),n={};for(const e of pn)(_e(t.values,e)||_e(this.values,e))&&(n[e]=t.get(e)+this.get(e));return vn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=bn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=at(e(this.values[n],n));return vn(this,{values:t},!0)}get(e){return this[bn.normalizeUnit(e)]}set(e){return this.isValid?vn(this,{values:{...this.values,...ot(e,bn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return vn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Tn(this.matrix,e),vn(this,{values:e},!0)}rescale(){return this.isValid?vn(this,{values:function(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>bn.normalizeUnit(e)));const t={},n={},r=this.toObject();let s;for(const i of pn)if(e.indexOf(i)>=0){s=i;let e=0;for(const t in n)e+=this.matrix[t][i]*n[t],n[t]=0;ze(r[i])&&(e+=r[i]);const a=Math.trunc(e);t[i]=a,n[i]=(1e3*e-1e3*a)/1e3}else ze(r[i])&&(n[i]=r[i]);for(const e in n)0!==n[e]&&(t[s]+=e===s?n[e]:n[e]/this.matrix[s][e]);return Tn(this.matrix,t),vn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return vn(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const r of pn)if(t=this.values[r],n=e.values[r],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const On="Invalid Interval";class Nn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Interval is invalid");const n=e instanceof Te?e:new Te(e,t);if(Se.throwOnInvalid)throw new i(n);return new Nn({invalid:n})}static fromDateTimes(e,t){const n=yr(e),r=yr(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Nn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Nn.invalid("missing or invalid end"):Nn.invalid("missing or invalid start")}(n,r);return null==s?new Nn({start:n,end:r}):s}static after(e,t){const n=bn.fromDurationLike(t),r=yr(e);return Nn.fromDateTimes(r,r.plus(n))}static before(e,t){const n=bn.fromDurationLike(t),r=yr(e);return Nn.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,s,i,a;try{e=fr.fromISO(n,t),s=e.isValid}catch(r){s=!1}try{i=fr.fromISO(r,t),a=i.isValid}catch(r){a=!1}if(s&&a)return Nn.fromDateTimes(e,i);if(s){const n=bn.fromISO(r,t);if(n.isValid)return Nn.after(e,n)}else if(a){const e=bn.fromISO(n,t);if(e.isValid)return Nn.before(i,e)}}return Nn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?Nn.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(yr).filter((e=>this.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),n=[];let{s:r}=this,s=0;for(;r<this.e;){const e=t[s]||this.e,i=+e>+this.e?this.e:e;n.push(Nn.fromDateTimes(r,i)),r=i,s+=1}return n}splitBy(e){const t=bn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,s=1;const i=[];for(;r<this.e;){const e=this.start.plus(t.mapUnits((e=>e*s)));n=+e>+this.e?this.e:e,i.push(Nn.fromDateTimes(r,n)),r=n,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Nn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Nn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n]),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],s=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),i=Array.prototype.concat(...s).sort(((e,t)=>e.time-t.time));for(const e of i)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!=+e.time&&r.push(Nn.fromDateTimes(t,e.time)),t=null);return Nn.merge(r)}difference(...e){return Nn.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:On}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?Nt.create(this.s.loc.clone(t),e).formatInterval(this):On}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:On}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:On}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:On}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:On}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):bn.invalid(this.invalidReason)}mapEndpoints(e){return Nn.fromDateTimes(e(this.s),e(this.e))}}class Dn{static hasDST(e=Se.defaultZone){const t=fr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return oe(e,Se.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||re.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||re.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||re.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||re.create(t,n,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||re.create(t,n,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||re.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||re.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return re.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return re.create(t,null,"gregory").eras(e)}static features(){return{relative:qe(),localeWeek:Ae()}}}function Mn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(bn.fromMillis(r).as("days"))}function In(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(-1!==e[n].search(ue.hanidec))t+=ce.indexOf(e[n]);else for(const e in le){const[n,s]=le[e];r>=n&&r<=s&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Vn=`[ ${String.fromCharCode(160)}]`,xn=new RegExp(Vn,"g");function En(e){return e.replace(/\./g,"\\.?").replace(xn,Vn)}function Cn(e){return e.replace(/\./g,"").replace(xn," ").toLowerCase()}function Fn(e,t){return null===e?null:{regex:RegExp(e.map(En).join("|")),deser:([n])=>e.findIndex((e=>Cn(n)===Cn(e)))+t}}function $n(e,t){return{regex:e,deser:([,e,t])=>it(e,t),groups:t}}function Wn(e){return{regex:e,deser:([e])=>e}}const Zn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Ln=null;function zn(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=An(Nt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}class jn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=zn(Nt.parseFormat(t),e),this.units=this.tokens.map((t=>function(e,t){const n=de(t),r=de(t,"{2}"),s=de(t,"{3}"),i=de(t,"{4}"),a=de(t,"{6}"),o=de(t,"{1,2}"),u=de(t,"{1,3}"),l=de(t,"{1,6}"),c=de(t,"{1,9}"),h=de(t,"{2,4}"),d=de(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return Fn(t.eras("short"),0);case"GG":return Fn(t.eras("long"),0);case"y":return In(l);case"yy":case"kk":return In(h,rt);case"yyyy":case"kkkk":return In(i);case"yyyyy":return In(d);case"yyyyyy":return In(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return In(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return In(r);case"MMM":return Fn(t.months("short",!0),1);case"MMMM":return Fn(t.months("long",!0),1);case"LLL":return Fn(t.months("short",!1),1);case"LLLL":return Fn(t.months("long",!1),1);case"o":case"S":return In(u);case"ooo":case"SSS":return In(s);case"u":return Wn(c);case"uu":return Wn(o);case"uuu":case"E":case"c":return In(n);case"a":return Fn(t.meridiems(),0);case"EEE":return Fn(t.weekdays("short",!1),1);case"EEEE":return Fn(t.weekdays("long",!1),1);case"ccc":return Fn(t.weekdays("short",!0),1);case"cccc":return Fn(t.weekdays("long",!0),1);case"Z":case"ZZ":return $n(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return $n(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Wn(/[a-z_+-/]{1,256}?/i);case" ":return Wn(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e))),this.disqualifyingUnit=this.units.find((e=>e.invalidReason)),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const s in n)if(_e(n,s)){const i=n[s],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,s,i]=n?function(e){let t,n=null;return Le(e.z)||(n=U.create(e.z)),Le(e.Z)||(n||(n=new ie(e.Z)),t=e.Z),Le(e.q)||(e.M=3*(e.q-1)+1),Le(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Le(e.u)||(e.S=Ge(e.u)),[Object.keys(e).reduce(((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t}),{}),n,t]}(n):[null,null,void 0];if(_e(n,"a")&&_e(n,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:s,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function qn(e,t,n){return new jn(e,n).explainFromTokens(t)}function An(e,t){if(!e)return null;const n=Nt.create(t,e).dtFormatter((Ln||(Ln=fr.fromMillis(1555555555555)),Ln)),r=n.formatToParts(),s=n.resolvedOptions();return r.map((t=>function(e,t,n){const{type:r,value:s}=e;if("literal"===r){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const i=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=Zn[a];if("object"==typeof o&&(o=o[i]),o)return{literal:!1,val:o}}(t,e,s)))}const Un="Invalid DateTime",_n=864e13;function Yn(e){return new Te("unsupported zone",`the zone "${e.name}" is not supported`)}function Rn(e){return null===e.weekData&&(e.weekData=xe(e.c)),e.weekData}function Hn(e){return null===e.localWeekData&&(e.localWeekData=xe(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Pn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new fr({...n,...t,old:n})}function Jn(e,t,n){let r=e-60*t*1e3;const s=n.offset(r);if(t===s)return[r,t];r-=60*(s-t)*1e3;const i=n.offset(r);return s===i?[r,s]:[e-60*Math.min(s,i)*1e3,Math.max(s,i)]}function Gn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Bn(e,t,n){return Jn(et(e),t,n)}function Qn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:r,month:s,day:Math.min(e.c.day,Xe(r,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=bn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=et(i);let[u,l]=Jn(o,n,e.zone);return 0!==a&&(u+=a,l=e.zone.offset(u)),{ts:u,o:l}}function Kn(e,t,n,r,s,i){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const r=t||o,s=fr.fromObject(e,{...n,zone:r,specificOffset:i});return a?s:s.setZone(o)}return fr.invalid(new Te("unparsable",`the input "${s}" can't be parsed as ${r}`))}function Xn(e,t,n=!0){return e.isValid?Nt.create(re.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=He(e.c.year,n?6:4),t?(r+="-",r+=He(e.c.month),r+="-",r+=He(e.c.day)):(r+=He(e.c.month),r+=He(e.c.day)),r}function tr(e,t,n,r,s,i){let a=He(e.c.hour);return t?(a+=":",a+=He(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(a+=":")):a+=He(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(a+=He(e.c.second),0===e.c.millisecond&&r||(a+=".",a+=He(e.c.millisecond,3))),s&&(e.isOffsetFixed&&0===e.offset&&!i?a+="Z":e.o<0?(a+="-",a+=He(Math.trunc(-e.o/60)),a+=":",a+=He(Math.trunc(-e.o%60))):(a+="+",a+=He(Math.trunc(e.o/60)),a+=":",a+=He(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const nr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},sr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ir=["year","month","day","hour","minute","second","millisecond"],ar=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],or=["year","ordinal","hour","minute","second","millisecond"];function ur(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new u(e);return t}(e)}}function lr(e,t){const n=oe(t.zone,Se.defaultZone);if(!n.isValid)return fr.invalid(Yn(n));const r=re.fromObject(t);let s,i;if(Le(e.year))s=Se.now();else{for(const t of ir)Le(e[t])&&(e[t]=nr[t]);const t=We(e)||Ze(e);if(t)return fr.invalid(t);const r=function(e){if(void 0===dr&&(dr=Se.now()),"iana"!==e.type)return e.offset(dr);const t=e.name;return mr[t]||(mr[t]=e.offset(dr)),mr[t]}(n);[s,i]=Bn(e,r,n)}return new fr({ts:s,zone:n,loc:r,o:i})}function cr(e,t,n){const r=!!Le(n.round)||n.round,s=(e,s)=>(e=Be(e,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,s)),i=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return s(i(n.unit),n.unit);for(const e of n.units){const t=i(e);if(Math.abs(t)>=1)return s(t,e)}return s(e>t?-0:0,n.units[n.units.length-1])}function hr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let dr,mr={};class fr{constructor(e){const t=e.zone||Se.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Te("invalid input"):null)||(t.isValid?null:Yn(t));this.ts=Le(e.ts)?Se.now():e.ts;let r=null,s=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,s]=[e.old.c,e.old.o];else{const i=ze(e.o)&&!e.old?e.o:t.offset(this.ts);r=Gn(this.ts,i),n=Number.isNaN(r.year)?new Te("invalid input"):null,r=n?null:r,s=n?null:i}this._zone=t,this.loc=e.loc||re.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new fr({})}static local(){const[e,t]=hr(arguments),[n,r,s,i,a,o,u]=t;return lr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:u},e)}static utc(){const[e,t]=hr(arguments),[n,r,s,i,a,o,u]=t;return e.zone=ie.utcInstance,lr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:u},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return fr.invalid("invalid input");const s=oe(t.zone,Se.defaultZone);return s.isValid?new fr({ts:n,zone:s,loc:re.fromObject(t)}):fr.invalid(Yn(s))}static fromMillis(e,t={}){if(ze(e))return e<-_n||e>_n?fr.invalid("Timestamp out of range"):new fr({ts:e,zone:oe(t.zone,Se.defaultZone),loc:re.fromObject(t)});throw new l(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ze(e))return new fr({ts:1e3*e,zone:oe(t.zone,Se.defaultZone),loc:re.fromObject(t)});throw new l("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=oe(t.zone,Se.defaultZone);if(!n.isValid)return fr.invalid(Yn(n));const r=re.fromObject(t),s=ot(e,ur),{minDaysInFirstWeek:i,startOfWeek:a}=$e(s,r),u=Se.now(),l=Le(t.specificOffset)?n.offset(u):t.specificOffset,c=!Le(s.ordinal),h=!Le(s.year),d=!Le(s.month)||!Le(s.day),m=h||d,f=s.weekYear||s.weekNumber;if((m||c)&&f)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new o("Can't mix ordinal dates with month/day");const y=f||s.weekday&&!m;let g,w,p=Gn(u,l);y?(g=ar,w=rr,p=xe(p,i,a)):c?(g=or,w=sr,p=Ce(p)):(g=ir,w=nr);let k=!1;for(const e of g)Le(s[e])?s[e]=k?w[e]:p[e]:k=!0;const v=y?function(e,t=4,n=1){const r=je(e.weekYear),s=Re(e.weekNumber,1,nt(e.weekYear,t,n)),i=Re(e.weekday,1,7);return r?s?!i&&Ne("weekday",e.weekday):Ne("week",e.weekNumber):Ne("weekYear",e.weekYear)}(s,i,a):c?function(e){const t=je(e.year),n=Re(e.ordinal,1,Ke(e.year));return t?!n&&Ne("ordinal",e.ordinal):Ne("year",e.year)}(s):We(s),S=v||Ze(s);if(S)return fr.invalid(S);const T=y?Ee(s,i,a):c?Fe(s):s,[b,O]=Bn(T,l,n),N=new fr({ts:b,zone:n,o:O,loc:r});return s.weekday&&m&&e.weekday!==N.weekday?fr.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${N.toISO()}`):N.isValid?N:fr.invalid(N.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Vt(e,[tn,an],[nn,on],[rn,un],[sn,ln])}(e);return Kn(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Vt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Jt,Gt])}(e);return Kn(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Vt(e,[Bt,Xt],[Qt,Xt],[Kt,en])}(e);return Kn(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Le(e)||Le(t))throw new l("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=n,i=re.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[a,o,u,c]=function(e,t,n){const{result:r,zone:s,specificOffset:i,invalidReason:a}=qn(e,t,n);return[r,s,i,a]}(i,e,t);return c?fr.invalid(c):Kn(a,o,n,`format ${t}`,e,u)}static fromString(e,t,n={}){return fr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Vt(e,[hn,an],[dn,mn])}(e);return Kn(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the DateTime is invalid");const n=e instanceof Te?e:new Te(e,t);if(Se.throwOnInvalid)throw new s(n);return new fr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=An(e,re.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return zn(Nt.parseFormat(e),re.fromObject(t)).map((e=>e.val)).join("")}static resetCache(){dr=void 0,mr={}}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Rn(this).weekYear:NaN}get weekNumber(){return this.isValid?Rn(this).weekNumber:NaN}get weekday(){return this.isValid?Rn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Hn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Hn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Hn(this).weekYear:NaN}get ordinal(){return this.isValid?Ce(this.c).ordinal:NaN}get monthShort(){return this.isValid?Dn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Dn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Dn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Dn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=et(this.c),r=this.zone.offset(n-e),s=this.zone.offset(n+e),i=this.zone.offset(n-r*t),a=this.zone.offset(n-s*t);if(i===a)return[this];const o=n-i*t,u=n-a*t,l=Gn(o,i),c=Gn(u,a);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[Pn(this,{ts:o}),Pn(this,{ts:u})]:[this]}get isInLeapYear(){return Qe(this.year)}get daysInMonth(){return Xe(this.year,this.month)}get daysInYear(){return this.isValid?Ke(this.year):NaN}get weeksInWeekYear(){return this.isValid?nt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?nt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Nt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(Se.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=oe(e,Se.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Bn(n,t,e)}return Pn(this,{ts:r,zone:e})}return fr.invalid(Yn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Pn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ot(e,ur),{minDaysInFirstWeek:n,startOfWeek:r}=$e(t,this.loc),s=!Le(t.weekYear)||!Le(t.weekNumber)||!Le(t.weekday),i=!Le(t.ordinal),a=!Le(t.year),u=!Le(t.month)||!Le(t.day),l=a||u,c=t.weekYear||t.weekNumber;if((l||i)&&c)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&i)throw new o("Can't mix ordinal dates with month/day");let h;s?h=Ee({...xe(this.c,n,r),...t},n,r):Le(t.ordinal)?(h={...this.toObject(),...t},Le(t.day)&&(h.day=Math.min(Xe(h.year,h.month),h.day))):h=Fe({...Ce(this.c),...t});const[d,m]=Bn(h,this.o,this.zone);return Pn(this,{ts:d,o:m})}plus(e){return this.isValid?Pn(this,Qn(this,bn.fromDurationLike(e))):this}minus(e){return this.isValid?Pn(this,Qn(this,bn.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=bn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Nt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Un}toLocaleString(e=f,t={}){return this.isValid?Nt.create(this.loc.clone(t),e).formatDateTime(this):Un}toLocaleParts(e={}){return this.isValid?Nt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const i="extended"===e;let a=er(this,i);return a+="T",a+=tr(this,i,t,n,r,s),a}toISODate({format:e="extended"}={}){return this.isValid?er(this,"extended"===e):null}toISOWeekDate(){return Xn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:s=!1,format:i="extended"}={}){return this.isValid?(r?"T":"")+tr(this,"extended"===i,t,e,n,s):null}toRFC2822(){return Xn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Xn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?er(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),Xn(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Un}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return bn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(o=t,Array.isArray(o)?o:[o]).map(bn.normalizeUnit),i=e.valueOf()>this.valueOf(),a=function(e,t,n,r){let[s,i,a,o]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Mn(e,t);return(n-n%7)/7}],["days",Mn]],s={},i=e;let a,o;for(const[u,l]of r)n.indexOf(u)>=0&&(a=u,s[u]=l(e,t),o=i.plus(s),o>t?(s[u]--,(e=i.plus(s))>t&&(o=e,s[u]--,e=i.plus(s))):e=o);return[e,s,o,a]}(e,t,n);const u=t-s,l=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===l.length&&(a<t&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const c=bn.fromObject(i,r);return l.length>0?bn.fromMillis(u,r).shiftTo(...l).plus(c):c}(i?this:e,i?e:this,s,r);var o;return i?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(fr.now(),e,t)}until(e){return this.isValid?Nn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,n)<=r&&r<=s.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||fr.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(r=e.unit,s=void 0),cr(t,this.plus(n),{...e,numeric:"always",units:r,unit:s})}toRelativeCalendar(e={}){return this.isValid?cr(e.base||fr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(fr.isDateTime))throw new l("min requires all arguments be DateTimes");return Ue(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(fr.isDateTime))throw new l("max requires all arguments be DateTimes");return Ue(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:s=null}=n;return qn(re.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return fr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,s=re.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new jn(s,e)}static fromFormatParser(e,t,n={}){if(Le(e)||Le(t))throw new l("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=n,i=re.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!i.equals(t.locale))throw new l(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:u,invalidReason:c}=t.explainFromTokens(e);return c?fr.invalid(c):Kn(a,o,n,`format ${t.format}`,e,u)}static get DATE_SHORT(){return f}static get DATE_MED(){return y}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return w}static get DATE_HUGE(){return p}static get TIME_SIMPLE(){return k}static get TIME_WITH_SECONDS(){return v}static get TIME_WITH_SHORT_OFFSET(){return S}static get TIME_WITH_LONG_OFFSET(){return T}static get TIME_24_SIMPLE(){return b}static get TIME_24_WITH_SECONDS(){return O}static get TIME_24_WITH_SHORT_OFFSET(){return N}static get TIME_24_WITH_LONG_OFFSET(){return D}static get DATETIME_SHORT(){return M}static get DATETIME_SHORT_WITH_SECONDS(){return I}static get DATETIME_MED(){return V}static get DATETIME_MED_WITH_SECONDS(){return x}static get DATETIME_MED_WITH_WEEKDAY(){return E}static get DATETIME_FULL(){return C}static get DATETIME_FULL_WITH_SECONDS(){return F}static get DATETIME_HUGE(){return $}static get DATETIME_HUGE_WITH_SECONDS(){return W}}function yr(e){if(fr.isDateTime(e))return e;if(e&&e.valueOf&&ze(e.valueOf()))return fr.fromJSDate(e);if(e&&"object"==typeof e)return fr.fromObject(e);throw new l(`Unknown datetime argument: ${e}, of type ${typeof e}`)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4123,4755,7136,7339],{5834:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},7320:(e,t,s)=>{s.d(t,{g:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,s)=>{s.d(t,{G:()=>F});var i=s(4718),r=s(88930),n=s(12359),a=s(90634),o=s(62577),l=s(21325),u=s(29441),c=s(51441),h=s(30524),d=s(87445),p=s(1873),m=s(43668);class f{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=(0,u.Wq)(t),r=this.fieldsIndex.get(i),n=r?null:(0,u.j4)(i,s),a=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,s=!0){const i=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,p.gJ)(n)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&s&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,d.rb)(n):null)),i&&Number.isFinite(n)){const s="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,p.zS)(n,i,s,r)}return n}))}async getExpressionValues(e,t,s,i,r){const{arcadeUtils:n}=await(0,m.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(s),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,c.pL)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.executeFunction(o,h)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var y=s(31464),g=s(58727);function _(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function x(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}var T=s(5834),I=s(59977),v=s(11440),S=s(60909);const R="bin";class F{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,this.items,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,l.fn)(this.query.outSR)&&!(0,l.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...(0,y.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=w(this.hasZ,this.hasM),{point:r,mode:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(n,this.spatialReference,t),d=new A(null,0),p=new A(null,0),m={x:0,y:0,z:0};for(const t of this.items){const n=s.getGeometry(t);if(null==n)continue;const{coords:f}=n,y=n.isPoint?b:n.lengths;if(d.coords=f,p.coords=f,e.returnEdge){let e=0;for(let n=0;n<y.length;n++){const c=y[n],f=e;for(let n=0;n<c;n++,e+=i){if(!u&&n===c-1)continue;const y=d;y.coordsIndex=e;const g=p;g.coordsIndex=n===c-1?f:e+i;const _=m;if(!E(m,r,y,g))continue;const T=(r.x-_.x)/a,I=(r.y-_.y)/o,v=T*T+I*I;v<=1&&l.candidates.push(x(s.getObjectId(t),h(_),Math.sqrt(v),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let n=0;n<y.length;n++){const c=y[n],m=e,f=p;f.coordsIndex=m;for(let n=0;n<c;n++,e+=i){const i=d;if(i.coordsIndex=e,u&&n===c-1&&i.x===f.x&&i.y===f.y)continue;const p=(r.x-i.x)/a,m=(r.y-i.y)/o,y=p*p+m*m;y<=1&&l.candidates.push(_(s.getObjectId(t),h(i),Math.sqrt(y)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const n=[];for(let t=0;t<y.length;t++){n.push(e);const s=y[t];e+=s*i,!u&&s>1&&n.push(e-i)}for(const e of n){const i=d;i.coordsIndex=e;const n=(r.x-i.x)/a,u=(r.y-i.y)/o,c=n*n+u*u;c<=1&&l.candidates.push(_(s.getObjectId(t),h(i),Math.sqrt(c)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||(0,l.aI)(t,s)?e=>e:e=>(0,y.Cv)(e,t,s),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:0}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),m=(0,h.vE)(d)||(0,h.zD)(d)||(0,h.Ah)(d),f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},_=(0,h.yM)(d)?(0,p.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,p.G_)({values:f,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.slice().reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:l,outSR:u,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:m,returnM:f}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:s,hasM:i&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,c.ag)(u||a),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const s=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=i&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,n,((e,t,i)=>s.getFieldValue(e,t,i))),this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const i of I){const r=this.featureAdapter.getGeometry(i),n={attributes:s.getAttributes(i),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_)};t&&r&&!n.geometry&&(n.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(i,this),e)),x[T++]=n}else if(!l&&u)for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,_)}}else for(const e of I){const t=s.getAttributes(e);t&&(x[T++]={attributes:t})}const v=d||0;if(null!=p){const e=v+p;x=x.slice(v,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,s=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,i=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>s)e=!0;else{const t=w(this.hasZ,this.hasM),s=this.featureAdapter;e=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/t>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,s={attributes:{}}){const i=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:m}=e,y=c?.length,g=!!y,_=g?c[0]:null,x=g&&!this.fieldsIndex.get(_);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,m=e,f="exceedslimit"!==p?e.onStatisticField:void 0,T="percentile_disc"===p||"percentile_cont"===p,I="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,v=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const s of c){const i=this._getAttributeValues(l,s,t,r);e.push(i)}a.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const s=Object.keys(e);for(const i of s){const{count:s,data:n,items:a,itemPositions:h}=e[i],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[s]=t}else{let i=null;if(v)i=s;else{const e=this._getAttributeValues(l,f,t,r),s=h.map((t=>e[t]));i=T&&"statisticParameters"in m?this._getPercentileValue(m,s):this._getStatisticValue(m,s,null,l.returnDistinctValues)}e.attributes[u]=i}let i=0;c.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++i]=n[s])),o.set(p,e)}}}else if(I){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(m,t);s.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,f,t,r);s.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;i.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[s];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:i,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,h.vE)(t)||(0,h.zD)(t)||(0,h.Ah)(t)||(0,h.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(9930),s.e(9940)]).then(s.bind(s,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:h,geometryType:d,hasZ:p,hasM:m}=this,f=t.map((e=>(0,c.pL)(d,p,m,u.getGeometry(e)))),y=i(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,a.v)(y):(0,a.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,a.HA)(r(h,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:i}):(0,p.G_)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,p.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s,i){if(i.has(t))return i.get(t);const r=this.fieldsIndex.get(t),n=s.map((s=>e.getFieldValue(s,t,r)));return i.set(t,n),n}_calculateUniqueValues(e,t,s){const i={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==i[o]?i[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s||i[o].count++,i[o].items.push(r),i[o].itemPositions.push(n))}return i}async _getDataValues(e,t,s=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,i.o8)(e),s)}async _calculateHistogramBins(e,t,s){if(null==t.min&&null==t.max)return[];const i=t.intervals,r=t.min??0,n=t.max??0,a=i.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=s[t];if(null!=o&&o>=r&&o<=n){const e=(0,p.Ak)(i,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:s,outAlias:i,valueType:r}=t,n=[],a=[{name:i??s,alias:i??s,type:r??"esriFieldTypeString"},{name:R,alias:R,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[s],((e,t,s)=>o.getFieldValue(e,t,s)));const c=this._getAttributeValues(o,s,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:r}=h[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map((e=>({...e,attributes:{...e.attributes,[i??s]:t}})))),o.fields)for(const e of o.fields)a.some((t=>t.name===e.name))||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const s=e.bin;switch(t=t??this.items,s.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(s),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(s),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(v.A.fromJSON(s),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(s),e,t)}}async _createAutoIntervalBinsResponse(e,t,s){const{field:i,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),h=(0,p.sU)(c,{field:i,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,g.dO)(l,!1),maxValue:(0,g.dO)(u,!1)}),d=await this._calculateHistogramBins(c,h,s);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,s){const{field:i,interval:n,start:a,end:o}=e,l=n.unit,u="quarters"===l?3*r.vf.months:r.vf[l],c=n.value*u/r.vf.milliseconds,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},s),m=(0,h.OH)(this.fieldsIndex.get(i)),f=(0,p.sU)(d,{field:i,classificationMethod:"defined-interval",definedInterval:c,minValue:(0,g.dO)(a,m),maxValue:(0,g.dO)(o,m)},!0),y=await this._calculateHistogramBins(d,f,s);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,s){const{field:i}=e,r=await this._getDataValues({field:i,timeZone:t.outTimeReference?.ianaTimeZone},s),n=(0,h.OH)(this.fieldsIndex.get(i)),a=e.boundaries.map((e=>(0,g.dO)(e,n))).sort(((e,t)=>e-t)),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=await this._calculateHistogramBins(r,l,s);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,s){const{field:i,interval:r,start:n,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),l=(0,h.OH)(this.fieldsIndex.get(i)),u=(0,p.sU)(o,{field:i,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,g.dO)(n,l),maxValue:(0,g.dO)(a,l)},!0),c=await this._calculateHistogramBins(o,u,s);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:s,lowerBoundaryAlias:i}=t,r=i||"lowerBoundary",n=s||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:R,alias:R,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const s of e){const{minValue:e,maxValue:i,items:h}=s,d={attributes:{}};let p;if(d.attributes[r]=e,d.attributes[n]=i,l?(p=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),d.attributes[R]=++c,"flat"===t.bin.jsonStyle?a.push(...p.features.map((({attributes:{EXPR_1:e,...t},...s})=>({...s,attributes:u??e?{...t,[u??e]:e,...d.attributes}:{...t,...d.attributes}})))):(d.stackedAttributes=p.features.map((({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t)),a.push(d))):(t.bin?.splitBy&&(d.attributes[R]=++c),p=await this._createStatisticsQueryResponse(t,h,d),a.push(d)),p.fields)for(const e of p.fields)o.some((t=>t.name===e.name))||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function E(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=t.x-s.x,o=t.y-s.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=s.x+r*c,e.y=s.y+n*c,!0}function w(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const b=[1]},11006:(e,t,s)=>{function i(e,t,s,i,n){r(e,t,s||0,i||e.length-1,n||a)}function r(e,t,s,i,a){for(;i>s;){if(i-s>600){var o=i-s+1,l=t-s+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(s,Math.floor(t-l*c/o+h)),Math.min(i,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=s,m=i;for(n(e,s,t),a(e[i],d)>0&&n(e,s,i);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[s],d)?n(e,s,m):n(e,++m,i),m<=t&&(s=m+1),t<=m&&(i=m-1)}}function n(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function a(e,t){return e<t?-1:e>t?1:0}s.d(t,{q:()=>i})},11440:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,i._)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,s){(0,r.sM)(s,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,i._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,i._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c);const h=c;c.from=(0,a.dp)(c)},17136:(e,t,s)=>{s.d(t,{O7:()=>S,el:()=>v});var i=s(92602),r=s(49186),n=s(53966),a=s(39829),o=s(82799),l=s(80754),u=s(21325),c=s(28735),h=s(78888),d=s(65864),p=s(2272),m=s(84952),f=s(92300);const y=()=>n.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A(e)}const s=(0,l.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const r=e[i][0],n=e[i][1],a=e[i+1][0],o=e[i+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,a=c*i+r,o=u*i+n;s.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,i=c*e+r,a=u*e+n;s.push([i,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new o.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return s&&(e=(0,l.kS)(e,s)),e}function T(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const r=t.cutIndexes[i],n=t.geometries[i],a=(0,l.r8)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.kd)(s,180);for(let s=0;s<t.length;s++){const t=n.getPoint(e,s);n.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(r===s){if(g(e))for(const t of(0,l.r8)(n))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,l.r8)(n))e[r]=e[r].addPath(t)}else s=r,e[r]=n}return e}async function v(e,t,s){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let n,g,_,S,R,F,E,w,A=0;const b=[],M=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,g=(0,u.Vp)(n),_=n.isWebMercator,F=_?102100:4326,S=l.j7[F].maxX,R=l.j7[F].minX,E=l.j7[F].plus180Line,w=l.j7[F].minus180Line),g)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(T(t.clone(),S,R));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,S,R))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);M.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,s=(0,l.kd)(e.xmin,R)*(2*S);let i=0===s?t.clone():(0,l.kS)(t.clone(),s);e.offset(s,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(E)&&n!==S?(A=n>A?n:A,i=x(i,_),b.push(i),M.push("cut")):e.intersects(w)&&r!==R?(A=n*(2*S)>A?n*(2*S):A,i=x(i,_,360),b.push(i),M.push("cut")):M.push(i)}else M.push(t.clone());else M.push(t);else M.push(t);let N=(0,l.kd)(A,S),C=-90;const O=N,P=new o.A;for(;N>0;){const e=360*N-180;P.addPath([[e,C],[e,-1*C]]),C*=-1,N--}if(b.length>0&&O>0){const t=I(b,await async function(e,t,s,i){const r=(0,p.Dl)(e),n=t[0].spatialReference,a={...i,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(n),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=n,t}))}}(r,b,P,s)),i=[],n=[];for(let s=0;s<M.length;s++){const r=M[s];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(i.push(r),n.push("simplify")):n.push(_?(0,c.Gh)(r):r)}}if(!i.length)return n;const a=await async function(e,t,s){const i="string"==typeof e?(0,m.An)(e):e,r=t[0].spatialReference,n=(0,d.$B)(t[0]),a={...s,query:{...i.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,f.X)(t))}},{data:o}=await(0,h.A)(i.path+"/simplify",a);return(0,f.V)(o.geometries,n,r)}(r,i,s),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const B=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)B.push(t);else{const e=b.shift();B.push(!0===_?(0,c.Gh)(e):e)}}return B}function S(e,t,s){const i=(0,u.Vp)(s);if(null==i)return e;const[r,n]=i.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let c=e+(o-l)*a;const h=c-t;return h>n?c-=a:h<r&&(c+=a),c}},19730:(e,t,s)=>{s.d(t,{do:()=>C,ux:()=>O});var i=s(4576),r=s(21818),n=s(49186),a=(s(44208),s(25482)),o=s(4718),l=s(97768),u=s(74887),c=s(83047),h=s(80586),d=s(70328),p=s(19419),m=s(537),f=s(65864),y=s(21325),g=s(90708),_=s(29441),x=s(51441),T=s(31464);class I{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[s,i]of this._storage){if(!(i.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(s)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new S(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let v=0;class S{constructor(e){this.items=e,this.time=performance.now(),this.id=v++}}var R=s(99352),F=s(8384),E=s(58727),w=s(62798),A=s(62660),b=s(86420),M=s(95466),N=s(63076);class C{constructor(e){this._changeHandle=null,this.capabilities={query:R.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new I,this.timeInfo=e.timeInfo,this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=a.A.isSerializable(e.fieldsIndex)?e.fieldsIndex:M.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,l.xt)(this._changeHandle),this._frameTask=(0,l.xt)(this._frameTask),this._clearCache(),(0,l.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{},s);return await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const s=(0,u.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},s)).createQueryResponseForCount()}catch(e){if(e!==E.v8)throw e;return 0}}async executeQueryForExtent(e,t){const s=(0,u.Mq)(t),i=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,i||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===E.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),i=t.items,r=new Set;return await this.reschedule((()=>{for(const e of i)r.add(t.featureAdapter.getObjectId(e))}),s),r}catch(e){if(e===E.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const s=(0,u.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},s);return await this.reschedule((()=>this._filterLatest(t)),s),await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const s=(0,u.Mq)(t);let i;e=(0,o.o8)(e);try{e=await this.schedule((()=>(0,E.iJ)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s);i=await this.reschedule((()=>this._executeGeometryQuery(e,t,s)),s),await this.reschedule((()=>this._executeAggregateIdsQuery(i)),s),await this.reschedule((()=>this.executeObjectIdsQuery(i)),s),await this.reschedule((()=>this.executeTimeQuery(i)),s),await this.reschedule((()=>this.executeAttributesQuery(i)),s)}catch(t){if(t!==E.v8)throw t;i=new F.G([],e,this)}return i.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const i=(0,u.Mq)(s),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,u.Mq)(e);this._timeExtentPromise||=(0,b.W)(this.timeInfo,this.featureStore);const[s,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,u.Te)(t),{fullExtent:s,timeExtent:i}}async _getBounds(e,t,s){const i=(0,d.hZ)((0,d.vt)(),d.qv);await this.featureStore.forEachBounds(e,(e=>(0,d.RF)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,x.ag)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5],r.hasZ=!0);const n=(0,T.Cv)(r,t,s);if(n.spatialReference=(0,x.ag)(s),n.xmax-n.xmin==0){const e=(0,c.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,c.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,c.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(N.Bb)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(N.Bb)}async _getAllFeaturesQueryEngineResult(e){return new F.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>(0,r.zI)(e)))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,o.o8)(e),e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,y.aI)(n,a.spatialReference)?a:(0,T.Cv)(a,n);if(!o)return null;const l=i||r,u=(0,y.fn)(s)&&!(0,y.aI)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this.reschedule((()=>this.searchFeatures(O(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await(0,A.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new F.G(n,e,this)}),t);return u(r)}if(!h.length)return new F.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new F.G(h,e,this));const d=await(0,A.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new F.G(p,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new F.G(u,e,this);const c=(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,m=!r||null==p||(0,y.aI)(p,r.spatialReference)?r:(0,T.Cv)(r,p);if(!m)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const f=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(O(r))),s);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of g)i.add(f.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),s),n=await this.reschedule((async()=>{const t=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,(e=>!i.has(f.getObjectId(e))||t(f.getGeometry(e))),s);return new F.G(n,e,this)}),s);return d(n)}if(null!=t){const e=new i.vW;g=g.filter((s=>(0,i.qh)(t.items,s,t.items.length,e)>=0))}if(!g.length){const t=new F.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new F.G(g,e,this));const x=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),I=await this.runSpatialFilter(g,(e=>x(f.getGeometry(e))),s);return d(new F.G(I,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=(0,b.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule((e=>n(e)),s)}};return this.reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),o=n.get(e);(!o||i>a(o,r))&&n.set(e,s)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:s,returnGeometry:i,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=i||r;return(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n)&&l?JSON.stringify([t,s,n]):JSON.stringify([t,s])}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,A.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||(0,y.aI)(this.spatialReference,t))return e;const s=this.featureAdapter;let i;try{const e=await this._getFullExtent();i=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,T.lK)(e.items.map((e=>(0,x.pL)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t,i);return e.items=(0,r.zI)(n.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,g.Ux)(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=(0,o.o8)(e);try{e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this)}}get test(){}}function O(e){if((0,A.tC)(e)){if((0,f.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,f.Bi)(e))return e.rings.map((e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,m.Rg)((0,p.vt)(),e)]}},29441:(e,t,s)=>{s.d(t,{MG:()=>_,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>m,j4:()=>f,vl:()=>u});var i=s(49186),r=s(44123),n=s(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),h=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function d(e,t,s={}){const r=f(t,e);if(!r){const s=a.getError(t,e);throw new i.A(o,"invalid SQL expression",{expression:t,error:s})}const n=s.expressionName||"expression";if(s.validateStandardized&&!r.isStandardized)throw new i.A(o,`${n} is not standard`,{expression:t});if(s.validateAggregate&&!r.isAggregate)throw new i.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function p(e,t,s,i){if(!s)return!0;const r="where clause";return _(e,t,d(e,s,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:i}),!0}function m(e,t,s,r,n){if(!s)return!0;const a="having clause",l=d(e,s,{validateAggregate:!0,expressionName:a});_(e,t,l,{expressionName:a,query:n});const u=f(s,e),c=u?.getExpressions().every((t=>{const{aggregateType:s,field:i}=t,n=e.get(i)?.name;return r.some((t=>{const{onStatisticField:i,statisticType:r}=t,a=e.get(i)?.name;return a===n&&r.toLowerCase().trim()===s}))}));if(!c)throw new i.A(o,"expressions in having clause should also exist in outStatistics",{having:s});return!0}function f(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function _(e,t,s,r={}){const n=new Map;if(function(e,t,s,i,r){const n=r.includes("*")?[...s,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))x(e,t,s,i,r);else try{const n=d(t,y(r),{validateStandardized:!0});for(const r of n)x(e,t,s,i,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??h,s),n.size){const e=r.expressionName??"expression";throw new i.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function x(e,t,s,i,r){const a=t.get(r);a?s.has(a.name)?"all"!==i&&!1===i?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(i,(e=>n.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},31464:(e,t,s)=>{s.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var i=s(4576),r=s(74887),n=s(80586),a=s(7320),o=s(21325),l=s(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,u),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,u),[s.xmax,s.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function p(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.Ru):[e];await(0,n.initializeProjection)(s.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,s,i){if(!e)return null;if(s||(s=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(s)||(0,o.aI)(t,s))return e;if((0,l.y7)(t,s)){const t=(0,o.K8)(s)?m(e):f(e);return t.spatialReference=s,t}return(0,n.projectMany)(a.g,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s,i){if(!e?.length||!t||!s||(0,o.aI)(t,s))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:s,geographicTransformation:i,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:r,geographicTransformation:u}=e;(0,l.y7)(s,i)?(0,o.K8)(i)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,s,i,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s,i){return g.push(e,t,s,i)}},41266:(e,t,s)=>{s.d(t,{A:()=>g});var i=s(90237),r=s(69540),n=s(66552),a=s(25482),o=s(10107),l=(s(44208),s(53966),s(87811),s(93223)),u=s(40608),c=s(56507);const h=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,i._)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,i._)([(0,l.e)(h)],d.prototype,"valueType",void 0),d=(0,i._)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,c.dp)(d);const m=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,i._)([(0,l.e)(m,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,i._)([(0,l.e)(f)],y.prototype,"transformation",void 0),y=(0,i._)([(0,u.$)("esri.rest.support.BinParametersBase")],y);const g=y},41366:(e,t,s)=>{s.d(t,{K:()=>d,Q:()=>u});var i=s(90237),r=s(66552),n=s(53966),a=s(10107),o=(s(44208),s(87811),s(93223)),l=s(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,s=null!=this.normalizationTotal;return t||s?(e=t&&h||s&&c||null,t&&s&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},44123:(e,t,s)=>{s.r(t),s.d(t,{WhereClauseCache:()=>n});var i=s(66344),r=s(88368);class n{constructor(e,t){this._cache=new i.q(e),this._invalidCache=new i.q(t)}get(e,t){const s=`${t?.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(null!=this._invalidCache.get(s))return null;try{const i=r.A.create(e,{fieldsIndex:t});return this._cache.put(s,i),i}catch(e){return this._invalidCache.put(s,e),null}}getError(e,t){const s=`${t?.uid}:${e}`;return this._invalidCache.get(s)??null}}},44794:(e,t,s)=>{s.d(t,{v:()=>o});var i=s(4718),r=s(62788),n=s(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.gh){return new a(e,t)}},51441:(e,t,s)=>{s.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var i=s(90708),r=s(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:i.DF,esriGeometryPolyline:i.BW,esriGeometryPolygon:i.z5,esriGeometryMultipoint:i.qK};function u(e,t,s,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(s){const u=(0,i.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",s,r,n);return(0,i.DF)(u,a,l)}return(0,i.DF)(t,a,l)}function c(e,t,s,r,u,c,h=t,d=s){const p=t&&h,m=s&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,i.kz)(a,f,t,s,e,u,h,d);return c&&(r=(0,i.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,i.Nl)(o,f,t,s,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,i.Q4)(n,f,t,s,h,d),l[e]?.(n,p,m)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},58727:(e,t,s)=>{s.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>x,iJ:()=>f,v8:()=>p});var i=s(49186),r=s(66552),n=s(83047),a=s(80586),o=s(90634),l=s(65864),u=s(17136),c=s(21325),h=s(31464);const d=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m="frequency";async function f(e,t,s){const i=e.bin;return i.onField&&(i.onField=i.onField.trim()),i.onExpression?.value&&(i.onExpression.value=i.onExpression.value.trim()),i.splitBy&&(i.splitBy.value&&(i.splitBy.value=i.splitBy.value.trim()),i.splitBy.outAlias&&(i.splitBy.outAlias=i.splitBy.outAlias.trim())),i.stackBy&&(i.stackBy.value&&(i.stackBy.value=i.stackBy.value.trim()),i.stackBy.outAlias&&(i.stackBy.outAlias=i.stackBy.outAlias.trim())),"normalizationField"in i.parameters&&i.parameters.normalizationField&&(i.parameters.normalizationField=i.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),y(e,t,s)}async function y(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,s)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?d.fromJSON(r):(0,n.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,h.Nk)(o,c.KK).then((()=>(0,h.Cv)(a,c.KK))),m=await s.e(9159).then(s.bind(s,49159));await m.load();const f=m.execute(p,t||1,{unit:u})??void 0;if(!f||!(0,l.Bi)(f)||0===f.rings.length)throw new i.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return f}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,h.Nk)(m.spatialReference,r),m=function(e,t){const s=e.spatialReference;return _(e,t)&&(0,l.ZC)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,u.el)((0,l.rS)(m)))[0];if(null==t)throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,i=s&&_(m,r)?{densificationStep:8*s}:void 0,n=t.toJSON(),a=(0,h.Cv)(n,n.spatialReference,r,i);if(!a)throw p;a.spatialReference=r,e.geometry=a}return e}function _(e,t){if(!e)return!1;const s=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(s,t)&&!(0,a.canProjectWithoutEngine)(s,t)}function x(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,s)=>{s.d(t,{A:()=>x});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(69540),h=s(66552),d=s(25482);const p=(0,h.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let m=class extends(c.A.ClonableMixin(d.A)){constructor(e){super(e),this.value=null,this.unit=null}};(0,i._)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,i._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,i._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,s){(0,r.sM)(s,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const s=e.parameters[t];return s?"string"==typeof s?s:new Date(s):null}m.from=(0,a.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=null,this.start=null,this.snapToData=null,this.type="date"}};(0,i._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>g(t,"end")},write:{writer:y}}})],_.prototype,"end",void 0),(0,i._)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,i._)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,i._)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],_.prototype,"returnFullIntervalBin",void 0),(0,i._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>g(t,"start")},write:{writer:y}}})],_.prototype,"start",void 0),(0,i._)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],_.prototype,"snapToData",void 0),(0,i._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,i._)([(0,l.$)("esri.rest.support.DateBinParameters")],_);const x=_;_.from=(0,a.dp)(_)},60909:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,i._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},62660:(e,t,s)=>{s.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var i=s(49186),r=s(94078),n=s(12176),a=s(65864),o=s(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(90708),p=s(92722),m=s(51441),f=s(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},_={esriSpatialRelIntersects:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(7360)]).then(s.bind(s,55284)),esriSpatialRelContains:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1867)]).then(s.bind(s,29127)),esriSpatialRelCrosses:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(9700)]).then(s.bind(s,85672)),esriSpatialRelDisjoint:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1598)]).then(s.bind(s,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1414)]).then(s.bind(s,46178)),esriSpatialRelTouches:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(2503)]).then(s.bind(s,83547)),esriSpatialRelWithin:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(9265)]).then(s.bind(s,85445)),esriSpatialRelRelation:null};async function x(e,t,s,i,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===s){const s=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(s,!1,!1,e,i,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(s,i,o,e));if("esriGeometryMultipoint"===s&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(s,i,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=s)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(s,i,o,r))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,m.pL)(s,i,o,e))}async function T(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new i.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(s)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new i.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new i.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}}function I(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62798:(e,t,s)=>{s.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var i=s(49186),r=s(29441),n=s(31464),a=s(62660),o=s(43668);const l="unsupported-query";async function u(e,t){const s=e.bin;if(!s.onField&&!s.onExpression?.value||"autoIntervalBin"===s.type&&null==s.parameters.numberOfBins||"dateBin"===s.type&&(null==s.parameters.number||null==s.parameters.unit)||"fixedBoundariesBin"===s.type&&null==s.parameters.boundaries||"fixedIntervalBin"===s.type&&null==s.parameters.interval)throw new i.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:s,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,s){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=s,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new i.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:s});(0,r.eD)(e,t,o,n,s)}if(c){if(null==(h=n)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:s}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:s});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:s});else{const{statisticParameters:e}=a;if(!e)throw new i.A(l,"statisticParameters should be set for percentile type",{definition:a,query:s})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,s,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,s){const{outFields:n,orderByFields:a,returnDistinctValues:o,outStatistics:u}=s,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const i=" asc",n=" desc",o=a.map((e=>{const t=e.toLowerCase();return t.includes(i)?t.split(i)[0]:t.includes(n)?t.split(n)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:s})}if(n&&n.length>0)(0,r.MG)(e,t,n,{expressionName:"outFields",query:s,allowedFieldTypes:"all"});else if(o)throw new i.A(l,"outFields should be specified for returnDistinctValues",{query:s});(0,r.SN)(e,t,s.where,s)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:s,geometryType:r,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.A(l,"Unsupported query options",{query:e});return h(s,u,e),Promise.all([m(s,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,s,n){let a=[];if(s.valueExpression){const{arcadeUtils:e}=await(0,o.l)();a=e.extractFieldNames(s.valueExpression)}if(s.field&&a.push(s.field),s.field2&&a.push(s.field2),s.field3&&a.push(s.field3),s.normalizationField&&a.push(s.normalizationField),!a.length&&!s.valueExpression)throw new i.A(l,"field or valueExpression is required",{params:s});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},63076:(e,t,s)=>{s.d(t,{W6:()=>v,Bb:()=>O});var i=s(71511),r=(s(44208),s(53966)),n=s(97768),a=s(61604),o=s(3694),l=s(74887),u=s(36708),c=s(44794),h=s(78659);const d=Symbol("Yield");class p{constructor(){this._tasks=new Array,this._runningTasks=(0,c.v)(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return d;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.push(new m(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}unshift(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.unshift(new m(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,l.G4)(t.signal);if(s&&!t.abortCallback)t.reject((0,l.NK)());else{const i=s?t.abortCallback?.((0,l.NK)()):t.callback(e);(0,l.$X)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,l.NK)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0}}class m{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var f=s(90237),y=s(69622),g=s(10107),_=(s(87811),s(40608));let x=class extends y.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,f._)([(0,g.MZ)()],x.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,f._)([(0,g.MZ)()],x.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),x=(0,f._)([(0,_.$)("esri.views.support.debugFlags")],x);const T=new x;var I,v,S;(S=I||(I={}))[S.ANIMATING=0]="ANIMATING",S[S.INTERACTING=1]="INTERACTING",S[S.IDLE=2]="IDLE",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(v||(v={}));const R=new Map([[v.RESOURCE_CONTROLLER_IMMEDIATE,0],[v.RESOURCE_CONTROLLER,4],[v.SLIDE,0],[v.STREAM_DATA_LOADER,0],[v.ELEVATION_QUERY,0],[v.TERRAIN_SURFACE,1],[v.SURFACE_GEOMETRY_UPDATES,1],[v.LOD_RENDERER,2],[v.GRAPHICS_CORE,2],[v.I3S_CONTROLLER,2],[v.POINT_CLOUD_LAYER,2],[v.FEATURE_TILE_FETCHER,2],[v.CLOUDS_GENERATOR,2],[v.OVERLAY,4],[v.STAGE,4],[v.GRAPHICS_DECONFLICTOR,4],[v.FILTER_VISIBILITY,4],[v.SCALE_VISIBILITY,4],[v.FRUSTUM_VISIBILITY,4],[v.POINT_OF_INTEREST_FREQUENT,6],[v.POINT_OF_INTEREST_INFREQUENT,30],[v.LABELER,8],[v.FEATURE_QUERY_ENGINE,8],[v.FEATURE_TILE_TREE,16],[v.FEATURE_TILE_TREE_ACTIVE,0],[v.ELEVATION_ALIGNMENT,12],[v.ELEVATION_ALIGNMENT_SCENE,14],[v.TEXT_TEXTURE_ATLAS,12],[v.TEXTURE_UNLOAD,12],[v.LINE_OF_SIGHT_TOOL,16],[v.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[v.SNAPPING,0],[v.SHADOW_ACCUMULATOR,30],[v.MAPVIEW_FETCH_QUEUE,0],[v.MAPVIEW_LAYERVIEW_UPDATE,2],[v.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function F(e){return R.has(e)?R.get(e):"number"==typeof e?e:1}const E=(0,h.l5)(6.5),w=(0,h.l5)(1),A=(0,h.l5)(30),b=(0,h.l5)(1e3/30),M=(0,h.l5)(100);var N,C;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,c.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new a.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=I.INTERACTING,this._tasks=new o.A,this._runQueue=new o.A,this._load=0,this._idleStateCallbacks=new o.A,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,u.wB)((()=>T.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),u.Vh);for(const e of Object.keys(v))this.performanceInfo.tasks.set(v[e],new a.A(v[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())})))}registerTask(e,s){const i=new t(this,e,s);return this._tasks.push(i),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new a.A(e)),i}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===I.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===I.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==I.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=E,s=e.frameDuration,i=w;switch(this.state){case I.IDLE:t=(0,h.l5)(0),s=(0,h.l5)(Math.max(M,e.frameDuration)),i=A;break;case I.INTERACTING:s=(0,h.l5)(Math.max(b,e.frameDuration));case I.ANIMATING:}return s=(0,h.l5)(s-e.elapsedFrameTime-t),this.state!==I.IDLE&&s<w&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,h.l5)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case I.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case I.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset((0,h.l5)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return C.SCHEDULED;let t=C.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=C.READY:t!==C.READY&&(t=C.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===d&&(t.blockFrame=this._frameNumber)}catch(e){r.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,v.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const s=this._budget.now()-e;if(t.runtime+=s,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+s),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(v))this._frameTaskTimes.set(v[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).push(e))),this.performanceInfo.total.push(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new p,this._handles=new i.A,this._basePriority=F(t),this.schedulePriority=this._basePriority,this._task=(0,c.v)(null!=s?s:this._queue),this._handles.add((0,u.z7)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(O),this._scheduler.removeTask(this),this.schedule=P.schedule,this.reschedule=P.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=F(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=I.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(N||(N={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(C||(C={}));const O=new N.Budget;O.enabled=!1;const P=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,l.G4)(t)){const e=(0,l.NK)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,l.z7)(e(O))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}}},80754:(e,t,s)=>{s.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var i=s(82799),r=s(16930),n=s(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},86420:(e,t,s)=>{s.d(t,{I:()=>n,W:()=>r});var i=s(21818);async function r(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach((e=>{const t=s.getAttribute((0,i.zI)(e),r),l=s.getAttribute((0,i.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||n;await t.forEach((t=>{const r=s.getAttribute((0,i.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))}))}return{start:a,end:o}}function n(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=s.getAttributeAsTimestamp?.bind(s)??s.getAttribute.bind(s);return i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e(n,t),o=e(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e(t,s);return null==r||r>=i}:null!=r?s=>{const i=e(s,t);return null==i||i<=r}:void 0}(o,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e(i,t)===s:null!=s&&null!=i?r=>{const n=e(r,t);return null!=n&&n>=s&&n<=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r>=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r<=i}:void 0}(o,i||r,n,a)}},92300:(e,t,s)=>{s.d(t,{V:()=>n,X:()=>r});var i=s(65864);function r(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function n(e,t,s){const r=(0,i.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=s,t}))}},99352:(e,t,s)=>{s.d(t,{F:()=>i,P:()=>r});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|