@arcgis/core 5.1.0-next.57 → 5.1.0-next.59
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/Components/SelectionOperation.d.ts +2 -2
- package/applications/Components/SelectionOperation.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +1 -0
- package/assets/esri/core/workers/chunks/{278eecd729bed2832702.js → 0622e238693c257abacb.js} +1 -1
- package/assets/esri/core/workers/chunks/{05bc675c029ed311427f.js → 155c741a9839d24f04a2.js} +1 -1
- package/assets/esri/core/workers/chunks/1ae4e43a399e1974f106.js +1 -0
- package/assets/esri/core/workers/chunks/1f8e22df08c2f5fbb8c8.js +1 -0
- package/assets/esri/core/workers/chunks/{2327b368673a974dee8b.js → 2339465190c9d5ede25f.js} +1 -1
- package/assets/esri/core/workers/chunks/23f6d24bf850bc3280ec.js +1 -0
- package/assets/esri/core/workers/chunks/2541ac6e0ed1184edc9b.js +1 -0
- package/assets/esri/core/workers/chunks/34207774bc371e95ba3c.js +1 -0
- package/assets/esri/core/workers/chunks/{01777e91cd4e0bf04fd0.js → 35217befc8f9882d139e.js} +1 -1
- package/assets/esri/core/workers/chunks/{40bcfc4f8efe7de7ec9d.js → 3de17e89973160b42923.js} +1 -1
- package/assets/esri/core/workers/chunks/{992e74570b76f3f9e52e.js → 48d289db3145ce6c02bb.js} +1 -1
- package/assets/esri/core/workers/chunks/4c73c2f4331351e2a50c.js +1 -0
- package/assets/esri/core/workers/chunks/{2757cf54656b5d318b11.js → 55a0b69cf034ac32fc25.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d54beab8ae5ff31e7b0.js → 5a9f5a49dc68b42762bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{7cec3252e3ee56424b9e.js → 5c6e5f22450dd0583074.js} +1 -1
- package/assets/esri/core/workers/chunks/{b39b4db86a1049f0b901.js → 6be9d00839002f24fafd.js} +1 -1
- package/assets/esri/core/workers/chunks/6c886f19875291d02407.js +1 -0
- package/assets/esri/core/workers/chunks/75e28458e08b0738b35a.js +2 -0
- package/assets/esri/core/workers/chunks/{c460ca93ed8e20d8b53a.js → 86a6dd19903fa5023cc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{4afddb66242438b38df0.js → 8ccf2f65d8ed3c48ffff.js} +1 -1
- package/assets/esri/core/workers/chunks/{fcfaaced184f8da3e28d.js → 9b53aa2429573f1b977f.js} +1 -1
- package/assets/esri/core/workers/chunks/9d580b5bcd59857a5702.js +1405 -0
- package/assets/esri/core/workers/chunks/a37697ef360e2425768a.js +1 -0
- package/assets/esri/core/workers/chunks/{a787fe09d3df9d4254ba.js → ab3183f2327ff26e2b45.js} +1 -1
- package/assets/esri/core/workers/chunks/b0f2ce61d3cad413898e.js +1 -0
- package/assets/esri/core/workers/chunks/{53c149bca42595b7dd1e.js → bbdf27bc34fadbe8e6fe.js} +1 -1
- package/assets/esri/core/workers/chunks/be42fe0b7ba0e27030b2.js +1 -0
- package/assets/esri/core/workers/chunks/d0c3ab70f390cd579fed.js +1 -0
- package/assets/esri/core/workers/chunks/{5a573fa1012092328b88.js → d816d1a4220d827faf63.js} +1 -1
- package/assets/esri/core/workers/chunks/e26894655823849947f4.js +1 -0
- package/assets/esri/core/workers/chunks/e59f5dc8c85bcea66e98.js +1 -0
- package/assets/esri/core/workers/chunks/{ccf845ac0ac354507a25.js → ec1b2eb05410848081c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{851dd71d28681d4eccfd.js → f7af90c5f9d371eb7009.js} +1 -1
- package/assets/esri/core/workers/chunks/fa6e1ad099b43a6f5501.js +1 -0
- package/assets/esri/core/workers/chunks/{4a6186001323b47c23a4.js → fee1d873127dca02459f.js} +1 -1
- package/chunks/GlobalIllumination.glsl.js +101 -0
- package/chunks/GlobalIlluminationBlur.glsl.js +68 -0
- package/chunks/ScreenSpaceShadowHighlight.glsl.js +6 -0
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +15 -8
- package/config.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/polygonUtils.js +1 -1
- package/geometry/support/{triangulationUtils.js → triangulationUtilsDeprecated.js} +1 -1
- package/kernel.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/networks/support/jsonTypes.d.ts +6 -0
- package/package.json +2 -2
- package/renderers/ClassBreaksRenderer.js +1 -1
- package/renderers/DictionaryRenderer.js +1 -1
- package/renderers/DotDensityRenderer.js +1 -1
- package/renderers/HeatmapRenderer.js +1 -1
- package/renderers/PieChartRenderer.js +1 -1
- package/renderers/Renderer.js +1 -1
- package/renderers/SimpleRenderer.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/renderers/support/AttributeColorInfo.js +1 -1
- package/renderers/support/ClassBreakInfo.d.ts +6 -0
- package/renderers/support/ClassBreakInfo.js +1 -1
- package/renderers/support/UniqueValueClass.d.ts +12 -0
- package/renderers/support/UniqueValueClass.js +1 -1
- package/renderers/support/UniqueValueInfo.d.ts +12 -0
- package/renderers/support/UniqueValueInfo.js +1 -1
- package/renderers/visualVariables/ColorVariable.js +1 -1
- package/renderers/visualVariables/OpacityVariable.js +1 -1
- package/renderers/visualVariables/SizeVariable.js +1 -1
- package/renderers/visualVariables/VisualVariable.js +1 -1
- package/rest/networks/support/FunctionResult.d.ts +6 -0
- package/rest/networks/support/FunctionResult.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphSource.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
- package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
- package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/extrudeUtils.js +1 -1
- package/views/3d/layers/graphics/extrudeUtilsDeprecated.js +2 -0
- package/views/3d/layers/graphics/tessellationUtils.js +2 -0
- package/views/3d/layers/i3s/PointCloudHighlights.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/i3s/PointCloudRendererNode.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/support/renderInfoUtils/line.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/support/renderInfoUtils/polygonDeprecated.js +2 -0
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +6 -5
- package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js +4 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EncodingColor.glsl.js +7 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +93 -72
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +46 -22
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +20 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +18 -13
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +23 -9
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/emissive/emissions.js +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/highlight/ScreenSpaceShadowHighlight.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/highlight/ScreenSpaceShadowHighlightRenderNode.js +2 -0
- package/views/3d/webgl-engine/effects/highlight/ScreenSpaceShadowHighlightTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ReprojectionUniforms.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GlobalIllumination.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/GlobalIlluminationBlur.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ReceiveShadowsConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/selection/SelectionOperation.d.ts +190 -0
- package/views/selection/SelectionOperation.js +2 -0
- package/views/selection/types.d.ts +146 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/009db7b459b18f6a668b.js +0 -1
- package/assets/esri/core/workers/chunks/0fc60b4c44c4e865b699.js +0 -2
- package/assets/esri/core/workers/chunks/34484afe767d60f85982.js +0 -1
- package/assets/esri/core/workers/chunks/55bb5b7817c2963c8bfa.js +0 -1
- package/assets/esri/core/workers/chunks/572fcd33ae3648ed4f9c.js +0 -1
- package/assets/esri/core/workers/chunks/66a4d764937918a2779f.js +0 -1
- package/assets/esri/core/workers/chunks/6b56c8ba978ec6edd6b8.js +0 -1
- package/assets/esri/core/workers/chunks/9806cc96414065ae0afe.js +0 -1
- package/assets/esri/core/workers/chunks/9b365a6242b0287f8727.js +0 -1
- package/assets/esri/core/workers/chunks/a029db48079af4b5cccd.js +0 -1
- package/assets/esri/core/workers/chunks/ea068f75397c3b3337ec.js +0 -1034
- package/assets/esri/core/workers/chunks/ec91d5081f423755cb07.js +0 -1
- package/assets/esri/core/workers/chunks/f9fe89ced41b49608667.js +0 -1
- package/assets/esri/core/workers/chunks/fce30184f354fb7d11af.js +0 -1
- package/widgets/support/Selector2D/SelectionOperation.js +0 -2
- /package/assets/esri/core/workers/chunks/{0fc60b4c44c4e865b699.js.LICENSE.txt → 75e28458e08b0738b35a.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3636,9397],{69052(t,e,r){r.d(e,{hr:()=>n,ie:()=>u,uC:()=>o});var s=r(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,r=!1){return i(this.range,this.min,this.max,t,e,r)}clamp(t,e=0){return(0,s.qE)(t-e,this.min,this.max)+e}monotonic(t,e,r){return t<e?e:e+a(this.range,t-e,r)}minimalMonotonic(t,e,r){return i(this.range,t,t+this.range,e,r)}center(t,e,r){return e=this.monotonic(t,e,r),this.normalize((t+e)/2,r)}diff(t,e,r){return this.monotonic(t,e,r)-t}shortestSignedDiff(t,e){t=this.normalize(t);const r=(e=this.normalize(e))-t,s=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(r)<Math.abs(s)?r:s}contains(t,e,r){return e=this.minimalMonotonic(t,e),(r=this.minimalMonotonic(t,r))>t&&r<e}}function i(t,e,r,s,n=0,i=!1){return(s-=n)<e?s+=a(t,e-s):s>r&&(s-=a(t,s-r)),i&&s===r&&(s=e),s+n}function a(t,e,r=0){return Math.ceil((e-r)/t)*t+r}const o=new n(0,2*Math.PI),u=(new n(-Math.PI,Math.PI),new n(0,360))},82534(t,e,r){function s(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:n,create:s,fromValues:function(t,e,r,s){return[t,e,r,s]}},Symbol.toStringTag,{value:"Module"}))},67026(t,e,r){r.d(e,{A6:()=>f,Xd:()=>c,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>R,x8:()=>l});var s=r(29242),n=r(82534),i=r(51850),a=r(34304),o=r(35522),u=r(78955);function l(t,e,r){r*=.5;const s=Math.sin(r);return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=Math.cos(r),t}function c(t,e){const r=2*Math.acos(e[3]),s=Math.sin(r/2);return s>(0,a.FD)()?(t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s):(t[0]=1,t[1]=0,t[2]=0),r}function p(t,e,r){const s=e[0],n=e[1],i=e[2],a=e[3],o=r[0],u=r[1],l=r[2],c=r[3];return t[0]=s*c+a*o+n*l-i*u,t[1]=n*c+a*u+i*o-s*l,t[2]=i*c+a*l+s*u-n*o,t[3]=a*c-s*o-n*u-i*l,t}function h(t,e,r,s){const n=e[0],i=e[1],o=e[2],u=e[3];let l,c,p,h,d,y=r[0],f=r[1],m=r[2],g=r[3];return c=n*y+i*f+o*m+u*g,c<0&&(c=-c,y=-y,f=-f,m=-m,g=-g),1-c>(0,a.FD)()?(l=Math.acos(c),p=Math.sin(l),h=Math.sin((1-s)*l)/p,d=Math.sin(s*l)/p):(h=1-s,d=s),t[0]=h*n+d*y,t[1]=h*i+d*f,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const r=e[0]+e[4]+e[8];let s;if(r>0)s=Math.sqrt(r+1),t[3]=.5*s,s=.5/s,t[0]=(e[5]-e[7])*s,t[1]=(e[6]-e[2])*s,t[2]=(e[1]-e[3])*s;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const n=(r+1)%3,i=(r+2)%3;s=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*i+i]+1),t[r]=.5*s,s=.5/s,t[3]=(e[3*n+i]-e[3*i+n])*s,t[n]=(e[3*n+r]+e[3*r+n])*s,t[i]=(e[3*i+r]+e[3*r+i])*s}return t}function f(t,e,r,s){const n=.5*Math.PI/180;e*=n,r*=n,s*=n;const i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),c=Math.cos(s);return t[0]=i*u*c-a*o*l,t[1]=a*o*c+i*u*l,t[2]=a*u*l-i*o*c,t[3]=a*u*c+i*o*l,t}const m=u.C,g=u.hZ,A=u.WQ,b=p,S=u.hs,v=u.Om,x=u.Cc,_=u.Bw,w=_,M=u.m3,q=M,F=u.S8,R=u.t2,I=u.aI,O=(0,i.vt)(),C=(0,i.fA)(1,0,0),T=(0,i.fA)(0,1,0),P=(0,n.vt)(),N=(0,n.vt)(),E=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:A,calculateW:function(t,e){const r=e[0],s=e[1],n=e[2];return t[0]=r,t[1]=s,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-s*s-n*n)),t},conjugate:d,copy:m,dot:v,equals:I,exactEquals:R,fromEuler:f,fromMat3:y,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],s=e[1],n=e[2],i=e[3],a=r*r+s*s+n*n+i*i,o=a?1/a:0;return t[0]=-r*o,t[1]=-s*o,t[2]=-n*o,t[3]=i*o,t},len:w,length:_,lerp:x,mul:b,multiply:p,normalize:F,random:function(t){const e=a.Ov,r=e(),s=e(),n=e(),i=Math.sqrt(1-r),o=Math.sqrt(r);return t[0]=i*Math.sin(2*Math.PI*s),t[1]=i*Math.cos(2*Math.PI*s),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+a*o,t[1]=n*u+i*o,t[2]=i*u-n*o,t[3]=a*u-s*o,t},rotateY:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u-i*o,t[1]=n*u+a*o,t[2]=i*u+s*o,t[3]=a*u-n*o,t},rotateZ:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+n*o,t[1]=n*u-s*o,t[2]=i*u+a*o,t[3]=a*u-i*o,t},rotationTo:function(t,e,r){const s=(0,o.Om)(e,r);return s<-.999999?((0,o.$A)(O,C,e),(0,o.Il)(O)<1e-6&&(0,o.$A)(O,T,e),(0,o.S8)(O,O),l(t,O,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(O,e,r),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+s,F(t,t))},scale:S,set:g,setAxes:function(t,e,r,s){const n=E;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=s[0],n[4]=s[1],n[7]=s[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],F(t,y(t,n))},setAxisAngle:l,slerp:h,sqlerp:function(t,e,r,s,n,i){return h(P,e,n,i),h(N,r,s,i),h(t,P,N,2*i*(1-i)),t},sqrLen:q,squaredLength:M,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},69397(t,e,r){r.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>d,i5:()=>h,lM:()=>i,qK:()=>c});var s=r(34275);const n=16;function i(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return l(t,8);let r=p;for(let s=0;s<e;s++)r+=o(t[s]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+h:Array.isArray(e)?l(e,n):0:0),0)}function l(t,e){return p+t.length*e}const c=32,p=16,h=145,d=64},95696(t,e,r){r.d(e,{A:()=>l});var s,n=r(5482),i=r(69540),a=r(25482),o=r(91429),u=r(93223);let l=class extends((0,i.OU)(a.o)){static{s=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=s=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},18251(t,e,r){r.r(e),r.d(e,{default:()=>l});var s=r(5482),n=r(69540),i=r(25482),a=r(91429),o=r(51850),u=r(93223);let l=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,s.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,s.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},73836(t,e,r){r.d(e,{A:()=>d});var s=r(5482),n=r(69540),i=r(25482),a=r(91429),o=r(58083),u=r(9093),l=r(67026),c=r(82534),p=r(51850),h=r(24770);let d=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,l.x8)(y,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,y,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.t2)(this.localMatrix,t.localMatrix)}};(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s.Cg)([(0,a.MZ)()],d.prototype,"rotation",null),(0,s.Cg)([(0,a.MZ)()],d.prototype,"localMatrix",null),(0,s.Cg)([(0,a.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,s.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],d);const y=(0,c.vt)()},24770(t,e,r){r.d(e,{$I:()=>m,AU:()=>d,g7:()=>f,i4:()=>c,ui:()=>p,up:()=>A,vt:()=>l,yo:()=>y});var s=r(34727),n=r(58083),i=r(67026),a=r(82534),o=r(35522),u=r(51850);function l(t=A){return[t[0],t[1],t[2],t[3]]}function c(t,e,r=l()){return(0,o.C)(r,t),r[3]=e,r}function p(t,e=l()){const r=(0,n.l)(b,t);return g(e,(0,s.KJ)((0,i.Xd)(e,r))),e}function h(t,e,r=l()){return(0,i.x8)(b,t,m(t)),(0,i.x8)(S,e,m(e)),(0,i.lw)(b,S,b),g(r,(0,s.KJ)((0,i.Xd)(r,b)))}function d(t,e,r,s=l()){return c(u.Cw,t,v),c(u.JP,e,x),c(u.Cb,r,_),h(v,x,v),h(v,_,s),s}function y(t){return t}function f(t){return t[3]}function m(t){return(0,s.kU)(t[3])}function g(t,e){return t[3]=e,t}const A=[0,0,1,0],b=(0,a.vt)(),S=(0,a.vt)(),v=(l(),l()),x=l(),_=l()},63579(t,e,r){r.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>f,in:()=>y,yr:()=>l});var s=r(11254),n=r(4576),i=r(17676),a=r(20557);class o{constructor(t,e,r){this.assetName=t,this.assetMimeType=e,this.parts=r}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const r=await Promise.all(e.map(e=>e.toBlob(t)));return(0,i.Te)(t),new Blob(r)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(t),e}}function l(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:r}=t;return c.test(e)||p.test(r)}return c.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:r}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(r,e)}function y(t,e){if(t===e)return!0;const{source:r}=t,{source:s}=e;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...r.assets].sort(t),n=[...s.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function f(t,e){return t instanceof File?(0,a.rq)(t,e):(0,a.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},27615(t,e,r){r.d(e,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>c,yJ:()=>p});var s=r(35522),n=r(86738),i=r(95696),a=r(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function l(t,e){if(!o(t))return null;const[r,s,i]=t.origin;return new n.A({x:r,y:s,z:i,spatialReference:e})}function c(t,e){const{x:r,y:s,z:n,spatialReference:o}=t,u=[r,s,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new a.default({origin:u}):new i.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,s.t2)(t.origin,e.origin))}},17136(t,e,r){r.d(e,{Y_:()=>R,O7:()=>q,el:()=>M});var s=r(92602),n=r(69052),i=r(49186),a=r(53966),o=r(39829),u=r(82799),l=r(16930),c=r(80754),p=r(21325),h=r(28735),d=r(11254),y=r(60408),f=r(65864),m=r(2272),g=r(84952),A=r(92300);const b=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function S(t){return"polygon"===t[0].type}function v(t){return"polyline"===t[0].type}function x(t,e,r){if(e){const e=function(t,e){if(!(t instanceof u.A||t instanceof o.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw b().error(t),new i.A("internal:geometry",t)}const r=(0,c.r8)(t),s=[];for(const t of r){const r=[];s.push(r),r.push([t[0][0],t[0][1]]);for(let s=0;s<t.length-1;s++){const n=t[s][0],i=t[s][1],a=t[s+1][0],o=t[s+1][1],u=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),l=(o-i)/u,c=(a-n)/u,p=u/e;if(p>1){for(let t=1;t<=p-1;t++){const s=t*e,a=c*s+n,o=l*s+i;r.push([a,o])}const t=(u+Math.floor(p-1)*e)/2,s=c*t+n,a=l*t+i;r.push([s,a])}r.push([a,o])}}return function(t){return"polygon"===t.type}(t)?new o.A({rings:s,spatialReference:t.spatialReference}):new u.A({paths:s,spatialReference:t.spatialReference})}(t,1e6);t=(0,h.ci)(e,!0)}return r&&(t=(0,c.kS)(t,r)),t}function _(t,e,r){if(Array.isArray(t)){const s=t[0];if(s>e){const r=(0,c.kd)(s,e);t[0]=s+r*(-2*e)}else if(s<r){const e=(0,c.kd)(s,r);t[0]=s+e*(-2*r)}}else{const s=t.x;if(s>e){const r=(0,c.kd)(s,e);t=t.clone().offset(r*(-2*e),0)}else if(s<r){const e=(0,c.kd)(s,r);t=t.clone().offset(e*(-2*r),0)}}return t}function w(t,e){let r=-1;for(let s=0;s<e.cutIndexes.length;s++){const n=e.cutIndexes[s],i=e.geometries[s],a=(0,c.r8)(i);for(let t=0;t<a.length;t++){const e=a[t];e.some(r=>{if(r[0]<180)return!0;{let r=0;for(let t=0;t<e.length;t++){const s=e[t][0];r=s>r?s:r}r=Number(r.toFixed(9));const s=-360*(0,c.kd)(r,180);for(let r=0;r<e.length;r++){const e=i.getPoint(t,r);i.setPoint(t,r,e.clone().offset(s,0))}return!0}})}if(n===r){if(S(t))for(const e of(0,c.r8)(i))t[n]=t[n].addRing(e);else if(v(t))for(const e of(0,c.r8)(i))t[n]=t[n].addPath(e)}else r=n,t[n]=i}return t}async function M(t,e,r){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&b().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??s.A.geometryServiceUrl;let i,a,l,S,v,q,F,R,I=0;const O=[],C=[];for(const e of t)if(null!=e)if(i||(i=e.spatialReference,a=(0,p.Vp)(i),l=i.isWebMercator,q=l?102100:4326,S=c.j7[q].maxX,v=c.j7[q].minX,F=c.j7[q].plus180Line,R=c.j7[q].minus180Line),a)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(_(e.clone(),S,v));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>_(t,S,v)),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,a);C.push(t.rings?new o.A(t):t)}else if(e.extent){const t=e.extent,r=(0,c.kd)(t.xmin,v)*(2*S);let s=0===r?e.clone():(0,c.kS)(e.clone(),r);t.offset(r,0);let{xmin:n,xmax:i}=t;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),t.intersects(F)&&i!==S?(I=i>I?i:I,s=x(s,l),O.push(s),C.push("cut")):t.intersects(R)&&n!==v?(I=i*(2*S)>I?i*(2*S):I,s=x(s,l,360),O.push(s),C.push("cut")):C.push(s)}else C.push(e.clone());else C.push(e);else C.push(e);let T=(0,c.kd)(I,S),P=-90;const N=T,E=new u.A;for(;T>0;){const t=360*T-180;E.addPath([[t,P],[t,-1*P]]),P*=-1,T--}if(O.length>0&&N>0){const e=w(O,await async function(t,e,r,s){const n=(0,m.Dl)(t),i=e[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,y.$B)(e[0]),geometries:e}),cutter:JSON.stringify(r)}},o=await(0,d.A)(n.path+"/cut",a),{cutIndexes:u,geometries:l=[]}=o.data;return{cutIndexes:u,geometries:l.map(t=>{const e=(0,f.rS)(t);return e.spatialReference=i,e})}}(n,O,E,r)),s=[],i=[];for(let r=0;r<C.length;r++){const n=C[r];if("cut"!==n)i.push(n);else{const n=e.shift(),a=t[r];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),i.push("simplify")):i.push(l?(0,h.Gh)(n):n)}}if(!s.length)return i;const a=await async function(t,e,r){const s="string"==typeof t?(0,g.An)(t):t,n=e[0].spatialReference,i=(0,y.$B)(e[0]),a={...r,query:{...s.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,A.X)(e))}},{data:o}=await(0,d.A)(s.path+"/simplify",a);return(0,A.V)(o.geometries,i,n)}(n,s,r),o=[];for(let t=0;t<i.length;t++){const e=i[t];"simplify"!==e?o.push(e):o.push(l?(0,h.Gh)(a.shift()):a.shift())}return o}const D=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)D.push(e);else{const t=O.shift();D.push(!0===l?(0,h.Gh)(t):t)}}return D}function q(t,e,r){const s=(0,p.Vp)(r);if(null==s)return t;const[n,i]=s.valid,a=2*i;let o=0,u=0;e>i?o=Math.ceil(Math.abs(e-i)/a):e<n&&(o=-Math.ceil(Math.abs(e-n)/a)),t>i?u=Math.ceil(Math.abs(t-i)/a):t<n&&(u=-Math.ceil(Math.abs(t-n)/a));let l=t+(o-u)*a;const c=l-e;return c>i?l-=a:c<n&&(l+=a),l}function F(t){const e=(0,p.Vp)(t);if(null==e)return null;const[r,s]=e.valid;return new n.hr(r,s)}const R=F(l.A.WGS84);F(l.A.WebMercator)},80754(t,e,r){r.d(e,{j7:()=>a,kS:()=>u,kd:()=>o,r8:()=>l});var s=r(82799),n=r(16930),i=r(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(t,e){return Math.ceil((t-e)/(2*e))}function u(t,e){const r=l(t);for(const t of r)for(const r of t)r[0]+=e;return t}function l(t){return(0,i.Bi)(t)?t.rings:t.paths}},99352(t,e,r){r.d(e,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,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,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={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}}},65515(t,e,r){r.r(e),r.d(e,{default:()=>Y});var s=r(5482),n=r(92602),i=r(11254),a=r(4576),o=r(49186),u=r(44208),l=r(66552),c=r(92474),p=r(53966),h=r(93637),d=r(17676),y=r(36708),f=r(84952),m=r(13069),g=r(91429),A=r(5443),b=r(16930),S=r(95696),v=r(27615),x=r(63579),_=r(52106),w=r(86211);function M(t){return"object"==typeof t&&null!=t&&"objectId"in t&&!!t.objectId}function q(t){return"object"==typeof t&&null!=t&&"globalId"in t&&!!t.globalId}function F(t){return t.every(q)}var R=r(91218),I=r(65864),O=r(73836),C=r(21325);async function T(t,e,r){const{geometry:s}=e,n={...e.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:e}=r,{origin:i,spatialReference:a,vertexSpace:o}=s,u=s.transform??new O.A,l="local"===o.type,c=t.spatialReference,p=c.isGeographic,h=(0,C.aI)(c,a),d=(0,R.isEqualBaseGCS)(a,c)&&(0,R.canProjectWithoutEngine)(a,c);if(!(l&&p&&d||!l&&!p&&h))return null;const y=(0,R.projectWithoutEngine)(i,a,c);if(null==y)return null;if(n[e.originX]=y.x,n[e.originY]=y.y,n[e.originZ]=y.z??0,null!=u){const{translation:t,scale:r,rotation:s}=u,i=l?1:(0,w.KX)(a)/(0,w.KX)(c);n[e.translationX]=t[0]*i,n[e.translationY]=t[2]*i,n[e.translationZ]=-t[1]*i,n[e.scaleX]=r[0],n[e.scaleY]=r[2],n[e.scaleZ]=r[1],n[e.rotationX]=s[0],n[e.rotationY]=s[2],n[e.rotationZ]=-s[1],n[e.rotationDeg]=s[3]}return{attributes:n}}return null==s?{attributes:n}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:n}}async function P(t,e){const r=await Promise.all((e.addAttachments??[]).map(e=>N(t,e))),s=await Promise.all((e.updateAttachments??[]).map(e=>N(t,e))),n=e.deleteAttachments??[];return r.length||s.length||n.length?{adds:r,updates:s,deletes:[...n]}:null}async function N(t,e){const{feature:r,attachment:s}=e,{globalId:n,name:i,contentType:a,data:o,uploadId:u}=s,l={globalId:n};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[t.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const t=await(0,f._0)(o);t&&(l.contentType=t.mediaType,l.data=t.data),o instanceof File&&(l.name=o.name)}return i&&(l.name=i),a&&(l.contentType=a),l}function E(t,e,r){if(!e||0===e.length)return[];if(r&&F(e))return e.map(t=>t.globalId);if(function(t){return t.every(M)}(e))return e.map(t=>t.objectId);const s=r?t.globalIdField:t.objectIdField;return s?e.map(t=>t.getAttribute(s)):[]}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function Q(t,e){return new _.A({attributes:t.attributes,geometry:(0,I.rS)({...t.geometry,spatialReference:e})})}function j(t,e){return{adds:t?.adds?.map(t=>Q(t,e))||[],updates:t?.updates?.map(t=>({original:Q(t[0],e),current:Q(t[1],e)}))||[],deletes:t?.deletes?.map(t=>Q(t,e))||[],spatialReference:e}}var V=r(64714),J=r(64314),Z=r(60694),U=r(15426),k=r(20557),G=r(99199),X=r(96520),B=r(61956),z=r(79677),L=r(20816);const $=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends c.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,r=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([(0,y.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:r,spatialReference:s,fieldsIndex:n,uniqueIdFields:i}=this.layer,a="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==a,c=l&&t?.query.supportsFormatPBFWithCurves,p=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,d=e.path;return new J.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:r,infoFor3D:a,pbfSupported:l,pbfSupportedWithCurves:c,queryAttachmentsSupported:p,relativeTimeBinWindow:h,sourceSpatialReference:s,uniqueIdFields:i,url:d})}async addAttachment(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,a.query);try{return D((await(0,i.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async updateAttachment(t,e,r){await this.load();const{layer:s}=this;await(0,U.VA)(s,"editing");const n=t.attributes[s.objectIdField],a=s.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(r,o.query);try{return D((await(0,i.A)(a,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s="infoFor3D"in r?r.infoFor3D:null,n=null!=s,u=n||(e?.globalIdUsed??!1),l=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,c=t.addFeatures?.map(t=>T(this.layer,t,s))??[],p=(await Promise.all(c)).filter(a.Ru),h=t.updateFeatures?.map(t=>T(this.layer,t,s))??[],d=(await Promise.all(h)).filter(a.Ru),y=E(this.layer,t.deleteFeatures,u);(0,X.u)(p,d,r.spatialReference);const f=await P(this.layer,t),m=r.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||r.gdbVersion,A={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);const b=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(A.edits=JSON.stringify([{id:r.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),A.returnServiceEditsOption=$.toJSON(e?.returnServiceEditsOption),A.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(A.adds=p.length?JSON.stringify(p):null,A.updates=d.length?JSON.stringify(d):null,A.deletes=y.length?u?JSON.stringify(y):y.join(","):null,A.attachments=f&&JSON.stringify(f),A.assetMaps=null!=l?JSON.stringify(l):void 0);const S=this._getLayerRequestOptions({method:"post",query:A});b&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=L.TA);const v=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let x;try{x=m?await this._asyncApplyEdits(v+"/applyEdits",S):await(0,i.A)(v+"/applyEdits",S)}catch(t){if(!function(t){const e=t.details.raw,r=+e.code,s=+e.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(t))throw t;S.authMode="immediate",x=m?await this._asyncApplyEdits(v+"/applyEdits",S):await(0,i.A)(v+"/applyEdits",S)}return this._createEditsResult(x)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,i.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(s,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,i.A)(`${s}/${r}`,e),{id:a,extent:o,fullExtent:u,timeExtent:l}=n,c=o||u;return{id:a,fullExtent:c&&A.A.fromJSON(c),timeExtent:l&&z.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const r=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,r)}async queryFeatures(t,e){await this.load();const r=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&r.features.length){const e=new Map;if(r.features.forEach(r=>{const s=r.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const r=t.toLowerCase();r&&r in s&&t!==r&&(s[t]=s[r],delete s[r],e.set(r,t))}})}),null!=r.fields)for(const t of r.fields){const r=e.get(t.name.toLowerCase());null!=r&&(t.name=r)}}return r}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,Z.Wo)(this.layer.url))return"unavailable";const t=(0,f.fj)(this.layer.url,"status"),e=await(0,i.A)(t,{query:{f:"json"}});return W.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:s}=await r.e(1384).then(r.bind(r,31384));return s(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const r=e.url;null!=r&&("layerId"in e&&(0,f.fj)(r,e.layerId.toString()),this._getOrCreateEditInterceptor(r).before=e=>{const r=e.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=e.requestOptions.query??{};r._ts=t.getTime(),e.requestOptions.query=r}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,a.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const r=(await(0,i.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,i.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,i.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(H)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),e?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,i.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:e?.signal}));t=s}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const r=t.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,V.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:r}=await(0,i.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));r.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const s=t.addFeatures.filter(t=>t.geometry);if(e.length!==s.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,i=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:s}=e;if((0,v.Hq)(s))n.push(e);else{const s=e.origin,{convertMeshVertexSpace:a}=await Promise.all([r.e(6860),r.e(4496)]).then(r.bind(r,28846)),o=await a(e,new S.A({origin:[s.x,s.y,s.z??0]}));i.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of i)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:i}=t,a=i.getExternalSourcesOnService(s),o=n.getAttribute(r);if(0===a.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=a.find(x.dK)??a[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:r}=this.layer,s=[];let n=null;if(Array.isArray(e))for(const t of e)s.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===r&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const i=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}(n);if(s.length>0){i.editedFeatureResults=[];for(const t of s){const{editedFeatures:e}=t,r=e?.spatialReference?new b.A(e.spatialReference):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:j(e,r)})}}return i}_createAttachmentErrorResult(t,e){const r=e.details.messages?.[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:r,parsedUrl:s}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==r)return!1;const i=(0,k.JZ)(n);if(null==i)return!1;const o=(0,f.fj)(s.path,`../${i.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(e)}const l=u.map(t=>t.getAttribute(r)).filter(a.Ru);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=n,h=new B.A({where:`${c} IN (${l.map(t=>`'${t}'`)})`,outFields:[p,c],returnGeometry:!1}),d=await(0,G.s)(o,h),{features:y}=d;return 0!==y.length&&!u.some(t=>{const e=t.getAttribute(r);if(!e)return!0;const{metadata:n}=t.geometry,i=y.filter(t=>t.getAttribute(c)===e);if(0===i.length)return!0;const a=i.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(s).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>a.every(e=>t!==e))})}};(0,s.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,s.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(t,e,r){r.d(e,{A:()=>M});var s=r(5482),n=r(69622),i=r(49186),a=r(44208),o=r(17676),u=r(84952),l=r(91429),c=r(21325),p=r(20557),h=r(2272),d=r(65615),y=r(20615),f=r(74910),m=r(78286),g=r(99199),A=r(62815),b=r(63746);class S{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=S._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:r}of e)r&&(r.spatialReference=t)}feature(){this._attributesClass??=(0,b._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,r){this._previousX=this._previousY=0,this._lengths=r;let s,{hasZ:n,hasM:i}=this.featureSet;switch(n??=!1,i??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),i&&this._vertex.push(0),this._finishVertex=S._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},s=this._point,this._finishVertex=n?i?S._finishVertexPointXYZM:S._finishVertexPointXYZ:i?S._finishVertexPointXYM:S._finishVertexPointXY;break;case"esriGeometryMultipoint":s={points:[],hasZ:n,hasM:i},this._part=s.points,this._parts=[];break;case"esriGeometryPolyline":s={paths:[],hasZ:n,hasM:i},this._parts=s.paths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],hasZ:n,hasM:i},this._parts=s.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=s,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=s}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,r,s){let n,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:i,hasM:a},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:i,hasM:a},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,r,s){this._part.push({b:[this._transform(e),this._transformXY(r),this._transformXY(s)]})}circularArcSegment(t,e,r){this._part.push({c:[this._transform(e),this._transformXY(r)]})}ellipticArcSegment(t,e,r,s,n,i,a,o){this._part.push({a:[this._transform(e),this._transformXY(r),s,n,i,a,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:r,_lengths:s,_vertex:n}=t;e.push([...n]),e.length<s[r.length]||(t._previousX=t._previousY=0,t._part=[],r.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:r,transform:s}=this.featureSet,n=r?(0,A.d)(t,e):1;this._transformInPlace??=(0,b.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,b.Mv)({transform:s})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var v=r(80893),x=r(22671),_=r(61956);async function w(t,e,r,s){const n=(0,h.Dl)(t),i={...r},a=_.A.from(e),o=!a.quantizationParameters;return await(0,v.IJ)(n,a,new S({sourceSpatialReference:a.sourceSpatialReference,applyTransform:o}),i,s)}let M=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const r=await this.executeJSON(t,e);return this.featureSetFromJSON(t,r,e)}async executeJSON(t,e){const r=this._normalizeQuery(t),s=null!=t.outStatistics?.[0],n=(0,a.A)("featurelayer-pbf-statistics");let i;if(this.pbfSupported&&(!s||n)&&(!t.returnTrueCurves||this.pbfSupportedWithCurves))try{i=await w(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return i??=await(0,g.e)(this.url,r,e,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,s){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return x.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([r.e(6860),r.e(36),r.e(8366)]).then(r.bind(r,40050)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,y.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,f.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:s},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let i=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeRelationshipQueryForCount(t,e){const[{default:s},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let i=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:s,fetchAttachments:n,processAttachmentQueryResult:i}=await(0,o.qr)(r.e(9239).then(r.bind(r,9239)),e),a=(0,h.Dl)(this.url);return i(a,await(this.queryAttachmentsSupported?s(a,t,e):n(a,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:s}=await(0,o.qr)(r.e(3103).then(r.bind(r,33103)),e);return s(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(r.bind(r,80566)),e);return s(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(r.bind(r,11273)),e);return s(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(r.bind(r,21277)),e);return s(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(r.bind(r,8018)),e);return s(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(r.bind(r,10980)),e);return s(this.parsedUrl,t,e)}_normalizeQuery(t){let e=_.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this,s=this._queryGet3DObjectFormat(t);if(null!=r&&s){if(e=e===t?e.clone():e,e.formatOf3DObjects=s,e.outSpatialReference&&!(0,c.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new i.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:s,originY:n,originZ:i,translationX:a,translationY:o,translationZ:u,scaleX:l,scaleY:c,scaleZ:p,rotationX:h,rotationY:d,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;e.outFields.push(s,n,i,a,o,u,l,c,p,h,d,y,f)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:r}){return!0!==t||"xyFootprint"===e||r?null:(0,p.Hz)(this.infoFor3D)}};(0,s.Cg)([(0,l.MZ)({type:d.A})],M.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],M.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],M.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"pbfSupportedWithCurves",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"relativeTimeBinWindow",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],M.prototype,"url",void 0),M=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.support.QueryTask")],M)},64714(t,e,r){r.d(e,{F0:()=>o,Vx:()=>c,e2:()=>h,f:()=>d});var s=r(44208),n=r(4718),i=r(99352),a=r(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(t,e){if((0,s.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${p(e)} = null;`;for(const e in t)r+=`this${p(e)} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},92300(t,e,r){r.d(e,{V:()=>a,X:()=>i});var s=r(60408),n=r(65864);function i(t){return{geometryType:(0,s.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function a(t,e,r){const s=(0,n.xD)(e);return t.map(t=>{const e=s.fromJSON(t);return e.spatialReference=r,e})}},20615(t,e,r){r.d(e,{I:()=>a});var s=r(2272),n=r(80893),i=r(61956);function a(t,e,r,a){return(0,n.gW)((0,s.Dl)(t),i.A.from(e),r,a)}},74910(t,e,r){r.d(e,{L:()=>o});var s=r(5443),n=r(2272),i=r(80893),a=r(61956);async function o(t,e,r){const o=(0,n.Dl)(t),u=await(0,i.Jf)(o,a.A.from(e),{...r}),l=u.extent;return!l||isNaN(l.xmin)||isNaN(l.ymin)||isNaN(l.xmax)||isNaN(l.ymax)?{count:u.count,extent:null}:{count:u.count,extent:s.A.fromJSON(l)}}},78286(t,e,r){r.d(e,{V:()=>a});var s=r(2272),n=r(80893),i=r(61956);async function a(t,e,r,a){const o=(0,s.Dl)(t),u=await(0,n.Pk)(o,i.A.from(e),r,a);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},99199(t,e,r){r.d(e,{e:()=>u,s:()=>o});var s=r(2272),n=r(80893),i=r(22671),a=r(61956);async function o(t,e,r,s){const n=await u(t,e,r,s);return i.A.fromJSON(n)}function u(t,e,r,i){const o=(0,s.Dl)(t),u={...r},l=a.A.from(e);return(0,n.eW)(o,l,l.sourceSpatialReference,u,i)}},63746(t,e,r){function s(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:r,hasZ:s,hasM:n}=t;if(null==r)return s&&1!==e?t=>{t[2]*=e}:null;const[i,a]=function(t,e,r,s){let{scale:n,translate:i,originPosition:a}=t;return"upperLeft"===a&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*s:t),i=i.map((t,e)=>2===e?t*s:t)),!e&&r&&(n=n.filter((t,e)=>2!==e),i=i.filter((t,e)=>2!==e)),[n,i]}(r,s,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*i[e]+a[e]}}r.d(e,{Mv:()=>n,_7:()=>s}),r(53966)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3636,9397],{69052(t,e,r){r.d(e,{hr:()=>n,ie:()=>u,uC:()=>o});var s=r(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,r=!1){return i(this.range,this.min,this.max,t,e,r)}clamp(t,e=0){return(0,s.qE)(t-e,this.min,this.max)+e}monotonic(t,e,r){return t<e?e:e+a(this.range,t-e,r)}minimalMonotonic(t,e,r){return i(this.range,t,t+this.range,e,r)}center(t,e,r){return e=this.monotonic(t,e,r),this.normalize((t+e)/2,r)}diff(t,e,r){return this.monotonic(t,e,r)-t}shortestSignedDiff(t,e){t=this.normalize(t);const r=(e=this.normalize(e))-t,s=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(r)<Math.abs(s)?r:s}contains(t,e,r){return e=this.minimalMonotonic(t,e),(r=this.minimalMonotonic(t,r))>t&&r<e}}function i(t,e,r,s,n=0,i=!1){return(s-=n)<e?s+=a(t,e-s):s>r&&(s-=a(t,s-r)),i&&s===r&&(s=e),s+n}function a(t,e,r=0){return Math.ceil((e-r)/t)*t+r}const o=new n(0,2*Math.PI),u=(new n(-Math.PI,Math.PI),new n(0,360))},82534(t,e,r){function s(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:n,create:s,fromValues:function(t,e,r,s){return[t,e,r,s]}},Symbol.toStringTag,{value:"Module"}))},67026(t,e,r){r.d(e,{A6:()=>f,Xd:()=>c,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>R,x8:()=>l});var s=r(29242),n=r(82534),i=r(51850),a=r(34304),o=r(35522),u=r(78955);function l(t,e,r){r*=.5;const s=Math.sin(r);return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=Math.cos(r),t}function c(t,e){const r=2*Math.acos(e[3]),s=Math.sin(r/2);return s>(0,a.FD)()?(t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s):(t[0]=1,t[1]=0,t[2]=0),r}function p(t,e,r){const s=e[0],n=e[1],i=e[2],a=e[3],o=r[0],u=r[1],l=r[2],c=r[3];return t[0]=s*c+a*o+n*l-i*u,t[1]=n*c+a*u+i*o-s*l,t[2]=i*c+a*l+s*u-n*o,t[3]=a*c-s*o-n*u-i*l,t}function h(t,e,r,s){const n=e[0],i=e[1],o=e[2],u=e[3];let l,c,p,h,d,y=r[0],f=r[1],m=r[2],g=r[3];return c=n*y+i*f+o*m+u*g,c<0&&(c=-c,y=-y,f=-f,m=-m,g=-g),1-c>(0,a.FD)()?(l=Math.acos(c),p=Math.sin(l),h=Math.sin((1-s)*l)/p,d=Math.sin(s*l)/p):(h=1-s,d=s),t[0]=h*n+d*y,t[1]=h*i+d*f,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const r=e[0]+e[4]+e[8];let s;if(r>0)s=Math.sqrt(r+1),t[3]=.5*s,s=.5/s,t[0]=(e[5]-e[7])*s,t[1]=(e[6]-e[2])*s,t[2]=(e[1]-e[3])*s;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const n=(r+1)%3,i=(r+2)%3;s=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*i+i]+1),t[r]=.5*s,s=.5/s,t[3]=(e[3*n+i]-e[3*i+n])*s,t[n]=(e[3*n+r]+e[3*r+n])*s,t[i]=(e[3*i+r]+e[3*r+i])*s}return t}function f(t,e,r,s){const n=.5*Math.PI/180;e*=n,r*=n,s*=n;const i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),c=Math.cos(s);return t[0]=i*u*c-a*o*l,t[1]=a*o*c+i*u*l,t[2]=a*u*l-i*o*c,t[3]=a*u*c+i*o*l,t}const m=u.C,g=u.hZ,A=u.WQ,b=p,S=u.hs,v=u.Om,x=u.Cc,_=u.Bw,w=_,M=u.m3,q=M,F=u.S8,R=u.t2,I=u.aI,O=(0,i.vt)(),C=(0,i.fA)(1,0,0),T=(0,i.fA)(0,1,0),P=(0,n.vt)(),N=(0,n.vt)(),E=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:A,calculateW:function(t,e){const r=e[0],s=e[1],n=e[2];return t[0]=r,t[1]=s,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-s*s-n*n)),t},conjugate:d,copy:m,dot:v,equals:I,exactEquals:R,fromEuler:f,fromMat3:y,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],s=e[1],n=e[2],i=e[3],a=r*r+s*s+n*n+i*i,o=a?1/a:0;return t[0]=-r*o,t[1]=-s*o,t[2]=-n*o,t[3]=i*o,t},len:w,length:_,lerp:x,mul:b,multiply:p,normalize:F,random:function(t){const e=a.Ov,r=e(),s=e(),n=e(),i=Math.sqrt(1-r),o=Math.sqrt(r);return t[0]=i*Math.sin(2*Math.PI*s),t[1]=i*Math.cos(2*Math.PI*s),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+a*o,t[1]=n*u+i*o,t[2]=i*u-n*o,t[3]=a*u-s*o,t},rotateY:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u-i*o,t[1]=n*u+a*o,t[2]=i*u+s*o,t[3]=a*u-n*o,t},rotateZ:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+n*o,t[1]=n*u-s*o,t[2]=i*u+a*o,t[3]=a*u-i*o,t},rotationTo:function(t,e,r){const s=(0,o.Om)(e,r);return s<-.999999?((0,o.$A)(O,C,e),(0,o.Il)(O)<1e-6&&(0,o.$A)(O,T,e),(0,o.S8)(O,O),l(t,O,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(O,e,r),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+s,F(t,t))},scale:S,set:g,setAxes:function(t,e,r,s){const n=E;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=s[0],n[4]=s[1],n[7]=s[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],F(t,y(t,n))},setAxisAngle:l,slerp:h,sqlerp:function(t,e,r,s,n,i){return h(P,e,n,i),h(N,r,s,i),h(t,P,N,2*i*(1-i)),t},sqrLen:q,squaredLength:M,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},69397(t,e,r){r.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>d,i5:()=>h,lM:()=>i,qK:()=>c});var s=r(34275);const n=16;function i(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return l(t,8);let r=p;for(let s=0;s<e;s++)r+=o(t[s]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+h:Array.isArray(e)?l(e,n):0:0),0)}function l(t,e){return p+t.length*e}const c=32,p=16,h=145,d=64},95696(t,e,r){r.d(e,{A:()=>l});var s,n=r(5482),i=r(69540),a=r(25482),o=r(91429),u=r(93223);let l=class extends((0,i.OU)(a.o)){static{s=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=s=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},18251(t,e,r){r.r(e),r.d(e,{default:()=>l});var s=r(5482),n=r(69540),i=r(25482),a=r(91429),o=r(51850),u=r(93223);let l=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,s.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,s.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},73836(t,e,r){r.d(e,{A:()=>d});var s=r(5482),n=r(69540),i=r(25482),a=r(91429),o=r(58083),u=r(9093),l=r(67026),c=r(82534),p=r(51850),h=r(24770);let d=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,l.x8)(y,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,y,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.t2)(this.localMatrix,t.localMatrix)}};(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s.Cg)([(0,a.MZ)()],d.prototype,"rotation",null),(0,s.Cg)([(0,a.MZ)()],d.prototype,"localMatrix",null),(0,s.Cg)([(0,a.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,s.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],d);const y=(0,c.vt)()},24770(t,e,r){r.d(e,{$I:()=>m,AU:()=>d,g7:()=>f,i4:()=>c,ui:()=>p,up:()=>A,vt:()=>l,yo:()=>y});var s=r(34727),n=r(58083),i=r(67026),a=r(82534),o=r(35522),u=r(51850);function l(t=A){return[t[0],t[1],t[2],t[3]]}function c(t,e,r=l()){return(0,o.C)(r,t),r[3]=e,r}function p(t,e=l()){const r=(0,n.l)(b,t);return g(e,(0,s.KJ)((0,i.Xd)(e,r))),e}function h(t,e,r=l()){return(0,i.x8)(b,t,m(t)),(0,i.x8)(S,e,m(e)),(0,i.lw)(b,S,b),g(r,(0,s.KJ)((0,i.Xd)(r,b)))}function d(t,e,r,s=l()){return c(u.Cw,t,v),c(u.JP,e,x),c(u.Cb,r,_),h(v,x,v),h(v,_,s),s}function y(t){return t}function f(t){return t[3]}function m(t){return(0,s.kU)(t[3])}function g(t,e){return t[3]=e,t}const A=[0,0,1,0],b=(0,a.vt)(),S=(0,a.vt)(),v=(l(),l()),x=l(),_=l()},63579(t,e,r){r.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>f,in:()=>y,yr:()=>l});var s=r(11254),n=r(4576),i=r(17676),a=r(20557);class o{constructor(t,e,r){this.assetName=t,this.assetMimeType=e,this.parts=r}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const r=await Promise.all(e.map(e=>e.toBlob(t)));return(0,i.Te)(t),new Blob(r)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(t),e}}function l(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:r}=t;return c.test(e)||p.test(r)}return c.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:r}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(r,e)}function y(t,e){if(t===e)return!0;const{source:r}=t,{source:s}=e;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...r.assets].sort(t),n=[...s.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function f(t,e){return t instanceof File?(0,a.rq)(t,e):(0,a.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},27615(t,e,r){r.d(e,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>c,yJ:()=>p});var s=r(35522),n=r(86738),i=r(95696),a=r(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function l(t,e){if(!o(t))return null;const[r,s,i]=t.origin;return new n.A({x:r,y:s,z:i,spatialReference:e})}function c(t,e){const{x:r,y:s,z:n,spatialReference:o}=t,u=[r,s,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new a.default({origin:u}):new i.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,s.t2)(t.origin,e.origin))}},17136(t,e,r){r.d(e,{Y_:()=>R,O7:()=>q,el:()=>M});var s=r(92602),n=r(69052),i=r(49186),a=r(53966),o=r(39829),u=r(82799),l=r(16930),c=r(80754),p=r(21325),h=r(28735),d=r(11254),y=r(60408),f=r(65864),m=r(2272),g=r(84952),A=r(92300);const b=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function S(t){return"polygon"===t[0].type}function v(t){return"polyline"===t[0].type}function x(t,e,r){if(e){const e=function(t,e){if(!(t instanceof u.A||t instanceof o.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw b().error(t),new i.A("internal:geometry",t)}const r=(0,c.r8)(t),s=[];for(const t of r){const r=[];s.push(r),r.push([t[0][0],t[0][1]]);for(let s=0;s<t.length-1;s++){const n=t[s][0],i=t[s][1],a=t[s+1][0],o=t[s+1][1],u=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),l=(o-i)/u,c=(a-n)/u,p=u/e;if(p>1){for(let t=1;t<=p-1;t++){const s=t*e,a=c*s+n,o=l*s+i;r.push([a,o])}const t=(u+Math.floor(p-1)*e)/2,s=c*t+n,a=l*t+i;r.push([s,a])}r.push([a,o])}}return function(t){return"polygon"===t.type}(t)?new o.A({rings:s,spatialReference:t.spatialReference}):new u.A({paths:s,spatialReference:t.spatialReference})}(t,1e6);t=(0,h.ci)(e,!0)}return r&&(t=(0,c.kS)(t,r)),t}function _(t,e,r){if(Array.isArray(t)){const s=t[0];if(s>e){const r=(0,c.kd)(s,e);t[0]=s+r*(-2*e)}else if(s<r){const e=(0,c.kd)(s,r);t[0]=s+e*(-2*r)}}else{const s=t.x;if(s>e){const r=(0,c.kd)(s,e);t=t.clone().offset(r*(-2*e),0)}else if(s<r){const e=(0,c.kd)(s,r);t=t.clone().offset(e*(-2*r),0)}}return t}function w(t,e){let r=-1;for(let s=0;s<e.cutIndexes.length;s++){const n=e.cutIndexes[s],i=e.geometries[s],a=(0,c.r8)(i);for(let t=0;t<a.length;t++){const e=a[t];e.some(r=>{if(r[0]<180)return!0;{let r=0;for(let t=0;t<e.length;t++){const s=e[t][0];r=s>r?s:r}r=Number(r.toFixed(9));const s=-360*(0,c.kd)(r,180);for(let r=0;r<e.length;r++){const e=i.getPoint(t,r);i.setPoint(t,r,e.clone().offset(s,0))}return!0}})}if(n===r){if(S(t))for(const e of(0,c.r8)(i))t[n]=t[n].addRing(e);else if(v(t))for(const e of(0,c.r8)(i))t[n]=t[n].addPath(e)}else r=n,t[n]=i}return t}async function M(t,e,r){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&b().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??s.A.geometryServiceUrl;let i,a,l,S,v,q,F,R,I=0;const O=[],C=[];for(const e of t)if(null!=e)if(i||(i=e.spatialReference,a=(0,p.Vp)(i),l=i.isWebMercator,q=l?102100:4326,S=c.j7[q].maxX,v=c.j7[q].minX,F=c.j7[q].plus180Line,R=c.j7[q].minus180Line),a)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(_(e.clone(),S,v));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>_(t,S,v)),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,a);C.push(t.rings?new o.A(t):t)}else if(e.extent){const t=e.extent,r=(0,c.kd)(t.xmin,v)*(2*S);let s=0===r?e.clone():(0,c.kS)(e.clone(),r);t.offset(r,0);let{xmin:n,xmax:i}=t;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),t.intersects(F)&&i!==S?(I=i>I?i:I,s=x(s,l),O.push(s),C.push("cut")):t.intersects(R)&&n!==v?(I=i*(2*S)>I?i*(2*S):I,s=x(s,l,360),O.push(s),C.push("cut")):C.push(s)}else C.push(e.clone());else C.push(e);else C.push(e);let T=(0,c.kd)(I,S),P=-90;const N=T,E=new u.A;for(;T>0;){const t=360*T-180;E.addPath([[t,P],[t,-1*P]]),P*=-1,T--}if(O.length>0&&N>0){const e=w(O,await async function(t,e,r,s){const n=(0,m.Dl)(t),i=e[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,y.$B)(e[0]),geometries:e}),cutter:JSON.stringify(r)}},o=await(0,d.A)(n.path+"/cut",a),{cutIndexes:u,geometries:l=[]}=o.data;return{cutIndexes:u,geometries:l.map(t=>{const e=(0,f.rS)(t);return e.spatialReference=i,e})}}(n,O,E,r)),s=[],i=[];for(let r=0;r<C.length;r++){const n=C[r];if("cut"!==n)i.push(n);else{const n=e.shift(),a=t[r];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),i.push("simplify")):i.push(l?(0,h.Gh)(n):n)}}if(!s.length)return i;const a=await async function(t,e,r){const s="string"==typeof t?(0,g.An)(t):t,n=e[0].spatialReference,i=(0,y.$B)(e[0]),a={...r,query:{...s.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,A.X)(e))}},{data:o}=await(0,d.A)(s.path+"/simplify",a);return(0,A.V)(o.geometries,i,n)}(n,s,r),o=[];for(let t=0;t<i.length;t++){const e=i[t];"simplify"!==e?o.push(e):o.push(l?(0,h.Gh)(a.shift()):a.shift())}return o}const D=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)D.push(e);else{const t=O.shift();D.push(!0===l?(0,h.Gh)(t):t)}}return D}function q(t,e,r){const s=(0,p.Vp)(r);if(null==s)return t;const[n,i]=s.valid,a=2*i;let o=0,u=0;e>i?o=Math.ceil(Math.abs(e-i)/a):e<n&&(o=-Math.ceil(Math.abs(e-n)/a)),t>i?u=Math.ceil(Math.abs(t-i)/a):t<n&&(u=-Math.ceil(Math.abs(t-n)/a));let l=t+(o-u)*a;const c=l-e;return c>i?l-=a:c<n&&(l+=a),l}function F(t){const e=(0,p.Vp)(t);if(null==e)return null;const[r,s]=e.valid;return new n.hr(r,s)}const R=F(l.A.WGS84);F(l.A.WebMercator)},80754(t,e,r){r.d(e,{j7:()=>a,kS:()=>u,kd:()=>o,r8:()=>l});var s=r(82799),n=r(16930),i=r(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(t,e){return Math.ceil((t-e)/(2*e))}function u(t,e){const r=l(t);for(const t of r)for(const r of t)r[0]+=e;return t}function l(t){return(0,i.Bi)(t)?t.rings:t.paths}},99352(t,e,r){r.d(e,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,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,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={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}}},65515(t,e,r){r.r(e),r.d(e,{default:()=>Y});var s=r(5482),n=r(92602),i=r(11254),a=r(4576),o=r(49186),u=r(44208),l=r(66552),c=r(92474),p=r(53966),h=r(93637),d=r(17676),y=r(36708),f=r(84952),m=r(13069),g=r(91429),A=r(5443),b=r(16930),S=r(95696),v=r(27615),x=r(63579),_=r(52106),w=r(86211);function M(t){return"object"==typeof t&&null!=t&&"objectId"in t&&!!t.objectId}function q(t){return"object"==typeof t&&null!=t&&"globalId"in t&&!!t.globalId}function F(t){return t.every(q)}var R=r(91218),I=r(65864),O=r(73836),C=r(21325);async function T(t,e,r){const{geometry:s}=e,n={...e.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:e}=r,{origin:i,spatialReference:a,vertexSpace:o}=s,u=s.transform??new O.A,l="local"===o.type,c=t.spatialReference,p=c.isGeographic,h=(0,C.aI)(c,a),d=(0,R.isEqualBaseGCS)(a,c)&&(0,R.canProjectWithoutEngine)(a,c);if(!(l&&p&&d||!l&&!p&&h))return null;const y=(0,R.projectWithoutEngine)(i,a,c);if(null==y)return null;if(n[e.originX]=y.x,n[e.originY]=y.y,n[e.originZ]=y.z??0,null!=u){const{translation:t,scale:r,rotation:s}=u,i=l?1:(0,w.KX)(a)/(0,w.KX)(c);n[e.translationX]=t[0]*i,n[e.translationY]=t[2]*i,n[e.translationZ]=-t[1]*i,n[e.scaleX]=r[0],n[e.scaleY]=r[2],n[e.scaleZ]=r[1],n[e.rotationX]=s[0],n[e.rotationY]=s[2],n[e.rotationZ]=-s[1],n[e.rotationDeg]=s[3]}return{attributes:n}}return null==s?{attributes:n}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:n}}async function P(t,e){const r=await Promise.all((e.addAttachments??[]).map(e=>N(t,e))),s=await Promise.all((e.updateAttachments??[]).map(e=>N(t,e))),n=e.deleteAttachments??[];return r.length||s.length||n.length?{adds:r,updates:s,deletes:[...n]}:null}async function N(t,e){const{feature:r,attachment:s}=e,{globalId:n,name:i,contentType:a,data:o,uploadId:u}=s,l={globalId:n};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[t.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const t=await(0,f._0)(o);t&&(l.contentType=t.mediaType,l.data=t.data),o instanceof File&&(l.name=o.name)}return i&&(l.name=i),a&&(l.contentType=a),l}function E(t,e,r){if(!e||0===e.length)return[];if(r&&F(e))return e.map(t=>t.globalId);if(function(t){return t.every(M)}(e))return e.map(t=>t.objectId);const s=r?t.globalIdField:t.objectIdField;return s?e.map(t=>t.getAttribute(s)):[]}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function Q(t,e){return new _.A({attributes:t.attributes,geometry:(0,I.rS)({...t.geometry,spatialReference:e})})}function j(t,e){return{adds:t?.adds?.map(t=>Q(t,e))||[],updates:t?.updates?.map(t=>({original:Q(t[0],e),current:Q(t[1],e)}))||[],deletes:t?.deletes?.map(t=>Q(t,e))||[],spatialReference:e}}var V=r(64714),J=r(64314),Z=r(60694),U=r(15426),k=r(20557),G=r(99199),X=r(96520),B=r(61956),z=r(79677),L=r(20816);const $=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends c.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,r=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([(0,y.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:r,spatialReference:s,fieldsIndex:n,uniqueIdFields:i}=this.layer,a="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==a,c=l&&t?.query.supportsFormatPBFWithCurves,p=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,d=e.path;return new J.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:r,infoFor3D:a,pbfSupported:l,pbfSupportedWithCurves:c,queryAttachmentsSupported:p,relativeTimeBinWindow:h,sourceSpatialReference:s,uniqueIdFields:i,url:d})}async addAttachment(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,a.query);try{return D((await(0,i.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async updateAttachment(t,e,r){await this.load();const{layer:s}=this;await(0,U.VA)(s,"editing");const n=t.attributes[s.objectIdField],a=s.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(r,o.query);try{return D((await(0,i.A)(a,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s="infoFor3D"in r?r.infoFor3D:null,n=null!=s,u=n||(e?.globalIdUsed??!1),l=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,c=t.addFeatures?.map(t=>T(this.layer,t,s))??[],p=(await Promise.all(c)).filter(a.Ru),h=t.updateFeatures?.map(t=>T(this.layer,t,s))??[],d=(await Promise.all(h)).filter(a.Ru),y=E(this.layer,t.deleteFeatures,u);(0,X.u)(p,d,r.spatialReference);const f=await P(this.layer,t),m=r.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||r.gdbVersion,A={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);const b=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(A.edits=JSON.stringify([{id:r.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),A.returnServiceEditsOption=$.toJSON(e?.returnServiceEditsOption),A.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(A.adds=p.length?JSON.stringify(p):null,A.updates=d.length?JSON.stringify(d):null,A.deletes=y.length?u?JSON.stringify(y):y.join(","):null,A.attachments=f&&JSON.stringify(f),A.assetMaps=null!=l?JSON.stringify(l):void 0);const S=this._getLayerRequestOptions({method:"post",query:A});b&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=L.TA);const v=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let x;try{x=m?await this._asyncApplyEdits(v+"/applyEdits",S):await(0,i.A)(v+"/applyEdits",S)}catch(t){if(!function(t){const e=t.details.raw,r=+e.code,s=+e.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(t))throw t;S.authMode="immediate",x=m?await this._asyncApplyEdits(v+"/applyEdits",S):await(0,i.A)(v+"/applyEdits",S)}return this._createEditsResult(x)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,i.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(s,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,i.A)(`${s}/${r}`,e),{id:a,extent:o,fullExtent:u,timeExtent:l}=n,c=o||u;return{id:a,fullExtent:c&&A.A.fromJSON(c),timeExtent:l&&z.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const r=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,r)}async queryFeatures(t,e){await this.load();const r=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&r.features.length){const e=new Map;if(r.features.forEach(r=>{const s=r.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const r=t.toLowerCase();r&&r in s&&t!==r&&(s[t]=s[r],delete s[r],e.set(r,t))}})}),null!=r.fields)for(const t of r.fields){const r=e.get(t.name.toLowerCase());null!=r&&(t.name=r)}}return r}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,Z.Wo)(this.layer.url))return"unavailable";const t=(0,f.fj)(this.layer.url,"status"),e=await(0,i.A)(t,{query:{f:"json"}});return W.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:s}=await r.e(1384).then(r.bind(r,31384));return s(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const r=e.url;null!=r&&("layerId"in e&&(0,f.fj)(r,e.layerId.toString()),this._getOrCreateEditInterceptor(r).before=e=>{const r=e.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=e.requestOptions.query??{};r._ts=t.getTime(),e.requestOptions.query=r}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,a.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const r=(await(0,i.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,i.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,i.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(H)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),e?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,i.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:e?.signal}));t=s}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const r=t.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,V.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:r}=await(0,i.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));r.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const s=t.addFeatures.filter(t=>t.geometry);if(e.length!==s.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,i=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:s}=e;if((0,v.Hq)(s))n.push(e);else{const s=e.origin,{convertMeshVertexSpace:a}=await Promise.all([r.e(6860),r.e(4496)]).then(r.bind(r,28846)),o=await a(e,new S.A({origin:[s.x,s.y,s.z??0]}));i.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of i)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:i}=t,a=i.getExternalSourcesOnService(s),o=n.getAttribute(r);if(0===a.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=a.find(x.dK)??a[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:r}=this.layer,s=[];let n=null;if(Array.isArray(e))for(const t of e)s.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===r&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const i=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}(n);if(s.length>0){i.editedFeatureResults=[];for(const t of s){const{editedFeatures:e}=t,r=e?.spatialReference?new b.A(e.spatialReference):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:j(e,r)})}}return i}_createAttachmentErrorResult(t,e){const r=e.details.messages?.[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:r,parsedUrl:s}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==r)return!1;const i=(0,k.JZ)(n);if(null==i)return!1;const o=(0,f.fj)(s.path,`../${i.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(e)}const l=u.map(t=>t.getAttribute(r)).filter(a.Ru);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=n,h=new B.A({where:`${c} IN (${l.map(t=>`'${t}'`)})`,outFields:[p,c],returnGeometry:!1}),d=await(0,G.s)(o,h),{features:y}=d;return 0!==y.length&&!u.some(t=>{const e=t.getAttribute(r);if(!e)return!0;const{metadata:n}=t.geometry,i=y.filter(t=>t.getAttribute(c)===e);if(0===i.length)return!0;const a=i.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(s).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>a.every(e=>t!==e))})}};(0,s.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,s.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(t,e,r){r.d(e,{A:()=>M});var s=r(5482),n=r(69622),i=r(49186),a=r(44208),o=r(17676),u=r(84952),l=r(91429),c=r(21325),p=r(20557),h=r(2272),d=r(65615),y=r(20615),f=r(74910),m=r(78286),g=r(99199),A=r(62815),b=r(63746);class S{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=S._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:r}of e)r&&(r.spatialReference=t)}feature(){this._attributesClass??=(0,b._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,r){this._previousX=this._previousY=0,this._lengths=r;let s,{hasZ:n,hasM:i}=this.featureSet;switch(n??=!1,i??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),i&&this._vertex.push(0),this._finishVertex=S._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},s=this._point,this._finishVertex=n?i?S._finishVertexPointXYZM:S._finishVertexPointXYZ:i?S._finishVertexPointXYM:S._finishVertexPointXY;break;case"esriGeometryMultipoint":s={points:[],hasZ:n,hasM:i},this._part=s.points,this._parts=[];break;case"esriGeometryPolyline":s={paths:[],hasZ:n,hasM:i},this._parts=s.paths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],hasZ:n,hasM:i},this._parts=s.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=s,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=s}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,r,s){let n,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:i,hasM:a},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:i,hasM:a},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,r,s){this._part.push({b:[this._transform(e),this._transformXY(r),this._transformXY(s)]})}circularArcSegment(t,e,r){this._part.push({c:[this._transform(e),this._transformXY(r)]})}ellipticArcSegment(t,e,r,s,n,i,a,o){this._part.push({a:[this._transform(e),this._transformXY(r),s,n,i,a,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:r,_lengths:s,_vertex:n}=t;e.push([...n]),e.length<s[r.length]||(t._previousX=t._previousY=0,t._part=[],r.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:r,transform:s}=this.featureSet,n=r?(0,A.d)(t,e):1;this._transformInPlace??=(0,b.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,b.Mv)({transform:s})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var v=r(80893),x=r(22671),_=r(61956);async function w(t,e,r,s){const n=(0,h.Dl)(t),i={...r},a=_.A.from(e),o=!a.quantizationParameters;return await(0,v.IJ)(n,a,new S({sourceSpatialReference:a.sourceSpatialReference,applyTransform:o}),i,s)}let M=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const r=await this.executeJSON(t,e);return this.featureSetFromJSON(t,r,e)}async executeJSON(t,e){const r=this._normalizeQuery(t),s=null!=t.outStatistics?.[0],n=(0,a.A)("featurelayer-pbf-statistics");let i;if(this.pbfSupported&&(!s||n)&&(!t.returnTrueCurves||this.pbfSupportedWithCurves))try{i=await w(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return i??=await(0,g.e)(this.url,r,e,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,s){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return x.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([r.e(6860),r.e(6439),r.e(8366)]).then(r.bind(r,40050)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,y.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,f.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:s},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let i=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeRelationshipQueryForCount(t,e){const[{default:s},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let i=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:s,fetchAttachments:n,processAttachmentQueryResult:i}=await(0,o.qr)(r.e(9239).then(r.bind(r,9239)),e),a=(0,h.Dl)(this.url);return i(a,await(this.queryAttachmentsSupported?s(a,t,e):n(a,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:s}=await(0,o.qr)(r.e(3103).then(r.bind(r,33103)),e);return s(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(r.bind(r,80566)),e);return s(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(r.bind(r,11273)),e);return s(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(r.bind(r,21277)),e);return s(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(r.bind(r,8018)),e);return s(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(r.bind(r,10980)),e);return s(this.parsedUrl,t,e)}_normalizeQuery(t){let e=_.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this,s=this._queryGet3DObjectFormat(t);if(null!=r&&s){if(e=e===t?e.clone():e,e.formatOf3DObjects=s,e.outSpatialReference&&!(0,c.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new i.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:s,originY:n,originZ:i,translationX:a,translationY:o,translationZ:u,scaleX:l,scaleY:c,scaleZ:p,rotationX:h,rotationY:d,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;e.outFields.push(s,n,i,a,o,u,l,c,p,h,d,y,f)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:r}){return!0!==t||"xyFootprint"===e||r?null:(0,p.Hz)(this.infoFor3D)}};(0,s.Cg)([(0,l.MZ)({type:d.A})],M.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],M.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],M.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"pbfSupportedWithCurves",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"relativeTimeBinWindow",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],M.prototype,"url",void 0),M=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.support.QueryTask")],M)},64714(t,e,r){r.d(e,{F0:()=>o,Vx:()=>c,e2:()=>h,f:()=>d});var s=r(44208),n=r(4718),i=r(99352),a=r(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(t,e){if((0,s.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${p(e)} = null;`;for(const e in t)r+=`this${p(e)} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},92300(t,e,r){r.d(e,{V:()=>a,X:()=>i});var s=r(60408),n=r(65864);function i(t){return{geometryType:(0,s.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function a(t,e,r){const s=(0,n.xD)(e);return t.map(t=>{const e=s.fromJSON(t);return e.spatialReference=r,e})}},20615(t,e,r){r.d(e,{I:()=>a});var s=r(2272),n=r(80893),i=r(61956);function a(t,e,r,a){return(0,n.gW)((0,s.Dl)(t),i.A.from(e),r,a)}},74910(t,e,r){r.d(e,{L:()=>o});var s=r(5443),n=r(2272),i=r(80893),a=r(61956);async function o(t,e,r){const o=(0,n.Dl)(t),u=await(0,i.Jf)(o,a.A.from(e),{...r}),l=u.extent;return!l||isNaN(l.xmin)||isNaN(l.ymin)||isNaN(l.xmax)||isNaN(l.ymax)?{count:u.count,extent:null}:{count:u.count,extent:s.A.fromJSON(l)}}},78286(t,e,r){r.d(e,{V:()=>a});var s=r(2272),n=r(80893),i=r(61956);async function a(t,e,r,a){const o=(0,s.Dl)(t),u=await(0,n.Pk)(o,i.A.from(e),r,a);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},99199(t,e,r){r.d(e,{e:()=>u,s:()=>o});var s=r(2272),n=r(80893),i=r(22671),a=r(61956);async function o(t,e,r,s){const n=await u(t,e,r,s);return i.A.fromJSON(n)}function u(t,e,r,i){const o=(0,s.Dl)(t),u={...r},l=a.A.from(e);return(0,n.eW)(o,l,l.sourceSpatialReference,u,i)}},63746(t,e,r){function s(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:r,hasZ:s,hasM:n}=t;if(null==r)return s&&1!==e?t=>{t[2]*=e}:null;const[i,a]=function(t,e,r,s){let{scale:n,translate:i,originPosition:a}=t;return"upperLeft"===a&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*s:t),i=i.map((t,e)=>2===e?t*s:t)),!e&&r&&(n=n.filter((t,e)=>2!==e),i=i.filter((t,e)=>2!==e)),[n,i]}(r,s,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*i[e]+a[e]}}r.d(e,{Mv:()=>n,_7:()=>s}),r(53966)}}]);
|