@arcgis/core 4.25.0-next.20220821 → 4.25.0-next.20220824

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.
Files changed (165) hide show
  1. package/analysis/DimensioningAnalysis.d.ts +4 -0
  2. package/analysis/LengthDimension.d.ts +4 -0
  3. package/arcade/featureset/support/shared.js +1 -1
  4. package/arcade/kernel.js +1 -1
  5. package/arcade.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/0455c2cc352743827b6f.js +1 -0
  8. package/assets/esri/core/workers/chunks/{da13db62d54cbca350c3.js → 2909c5e28c05ddb007a0.js} +1 -1
  9. package/assets/esri/core/workers/chunks/2a2cad4a163777419b88.js +1 -0
  10. package/assets/esri/core/workers/chunks/2c783124624070505cf9.js +1 -0
  11. package/assets/esri/core/workers/chunks/31eab53447f47774354e.js +1 -0
  12. package/assets/esri/core/workers/chunks/{9dbe94a70624a5592690.js → 3e108ee81b5684f81cea.js} +1 -1
  13. package/assets/esri/core/workers/chunks/40bb4e2acbe5c3323715.js +1 -0
  14. package/assets/esri/core/workers/chunks/45397532008f955faf6f.js +2 -0
  15. package/assets/esri/core/workers/chunks/45397532008f955faf6f.js.LICENSE.txt +20 -0
  16. package/assets/esri/core/workers/chunks/4e045b0b3f49fcdecce0.js +1 -0
  17. package/assets/esri/core/workers/chunks/616a20dfd38f25453765.js +1 -0
  18. package/assets/esri/core/workers/chunks/{94784576d519d2440184.js → 69b8fef9bd487b8fb7c9.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{32c7ea6e2068d5646988.js → 6e38ba64131c36edec43.js} +1 -1
  20. package/assets/esri/core/workers/chunks/6f99d0cdee66275cc68e.js +1 -0
  21. package/assets/esri/core/workers/chunks/{3485e2342f44e4d760a2.js → 70171492b13071b68db0.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{b81c0d35f169a7df25c0.js → 8543c2f0a0eb67b101d7.js} +1 -1
  23. package/assets/esri/core/workers/chunks/8ba83fee56dd4f306d87.js +1 -0
  24. package/assets/esri/core/workers/chunks/{0f1fae79b5311d55c0da.js → 92f10a6f8eae3ecf5ac2.js} +1 -1
  25. package/assets/esri/core/workers/chunks/96673467342935d3d99a.js +1 -0
  26. package/assets/esri/core/workers/chunks/9f9418e4b1c39fe4571d.js +1 -0
  27. package/assets/esri/core/workers/chunks/a507e85f388b0504bb6a.js +1 -0
  28. package/assets/esri/core/workers/chunks/{8c2c1909359d794ac8fa.js → b0afc51c778d752488c6.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{70dd8b67e69b084422a3.js → bfea5f112dc5bc08bb11.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{2407a32902f012997e6a.js → c12c6d10edb4953145fa.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{495dfd24894e8d5149c6.js → cfb3cfbc508840d2ea60.js} +1 -1
  32. package/assets/esri/core/workers/chunks/e8d0dbb6b6b241138fcf.js +1 -0
  33. package/assets/esri/core/workers/chunks/{a32c618ad62db6ecba67.js → e97ac86180a3381baf33.js} +1 -1
  34. package/assets/esri/core/workers/chunks/ef174d2fbcca4c3844d7.js +1 -0
  35. package/assets/esri/core/workers/chunks/f2cca221d9bea32f7594.js +1 -0
  36. package/assets/esri/core/workers/chunks/ff729a122ddffd95a6b5.js +1 -0
  37. package/chunks/Clouds.glsl.js +12 -12
  38. package/core/PerformanceSampler.js +1 -1
  39. package/core/imageUtils.js +5 -0
  40. package/geometry/support/MeshTexture.js +1 -1
  41. package/geometry/support/meshUtils/exporters/gltf/buffer.js +1 -1
  42. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  43. package/geometry/support/meshUtils/exporters/gltf/imageutils.js +1 -1
  44. package/geometry/support/meshUtils/exporters/gltf/index.js +1 -1
  45. package/geometry/support/meshUtils/loadExternal.js +1 -1
  46. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  47. package/geometry/support/meshUtils/merge.js +1 -1
  48. package/geometry/support/meshUtils/offset.js +1 -1
  49. package/geometry/support/meshUtils/rotate.js +1 -1
  50. package/geometry/support/meshUtils/scale.js +1 -1
  51. package/interfaces.d.ts +147 -4
  52. package/layers/RouteLayer.js +1 -1
  53. package/layers/graphics/data/projectionSupport.js +1 -1
  54. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  55. package/layers/graphics/data/utils.js +1 -1
  56. package/layers/graphics/featureConversionUtils.js +1 -1
  57. package/layers/ogc/crsUtils.js +1 -1
  58. package/layers/support/FieldsIndex.js +1 -1
  59. package/layers/support/PromiseQueue.js +1 -1
  60. package/layers/support/TileInfo.js +1 -1
  61. package/layers/support/infoFor3D.js +0 -1
  62. package/layers/support/mediaUtils.js +1 -1
  63. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  64. package/layers/support/rasterDatasets/pamParser.js +1 -1
  65. package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
  66. package/layers/support/rasterFunctions/AspectFunction.js +1 -1
  67. package/layers/support/rasterFunctions/BandArithmeticFunction.js +5 -0
  68. package/layers/support/rasterFunctions/BandArithmeticFunctionArguments.js +5 -0
  69. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  70. package/layers/support/rasterFunctions/ColormapFunction.js +1 -1
  71. package/layers/support/rasterFunctions/LocalFunction.js +5 -0
  72. package/layers/support/rasterFunctions/LocalFunctionArguments.js +5 -0
  73. package/layers/support/rasterFunctions/SlopeFunction.js +1 -1
  74. package/layers/support/rasterFunctions/StretchFunction.js +1 -1
  75. package/layers/support/rasterFunctions/bandIndexUtils.js +1 -1
  76. package/layers/support/rasterFunctions/customBandIndexUtils.js +5 -0
  77. package/layers/support/rasterFunctions/localUtils.js +1 -1
  78. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  79. package/layers/support/wmtsUtils.js +1 -1
  80. package/networks/Network.js +1 -1
  81. package/networks/UtilityNetwork.js +1 -1
  82. package/networks/support/NamedTraceConfiguration.js +1 -1
  83. package/package.json +3 -3
  84. package/portal/AssetMapFieldRole.js +5 -0
  85. package/renderers/DotDensityRenderer.js +1 -1
  86. package/renderers/support/utils.js +1 -1
  87. package/rest/networks/queryNamedTraceConfigurations.js +5 -0
  88. package/rest/networks/support/QueryNamedTraceConfigurationsParameters.js +5 -0
  89. package/rest/networks/support/QueryNamedTraceConfigurationsResult.js +5 -0
  90. package/rest/print.js +1 -1
  91. package/rest/support/GeneralizeParameters.js +1 -1
  92. package/rest/support/ImagePixelLocationParameters.js +1 -1
  93. package/rest/support/OffsetParameters.js +1 -1
  94. package/rest/support/PrintTemplate.js +1 -1
  95. package/rest/support/RelationParameters.js +1 -1
  96. package/rest/support/TopFeaturesQuery.js +1 -1
  97. package/rest/support/meshFeatureSet.js +1 -1
  98. package/support/revision.js +1 -1
  99. package/symbols/cim/GeometryWalker.js +1 -1
  100. package/symbols/cim/effects/EffectDashes.js +1 -1
  101. package/symbols/cim/effects/EffectWave.js +1 -1
  102. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  103. package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
  104. package/views/2d/constraints/ZoomConstraint.js +1 -1
  105. package/views/2d/engine/Stage.js +1 -1
  106. package/views/2d/engine/webgl/mesh/templates/WGLDynamicMarkerTemplate.js +1 -1
  107. package/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js +1 -1
  108. package/views/2d/tiling/TileCache.js +1 -1
  109. package/views/2d/tiling/TileInfoView.js +1 -1
  110. package/views/3d/analysis/Dimensioning/LengthDimensionComputation.js +1 -1
  111. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  112. package/views/3d/analysis/Dimensioning/settings.js +1 -1
  113. package/views/3d/environment/CloudsComposition.js +1 -1
  114. package/views/3d/environment/CloudsCompositionParameters.js +1 -1
  115. package/views/3d/environment/CloudsData.js +1 -1
  116. package/views/3d/environment/CloudsGenerator.js +1 -1
  117. package/views/3d/environment/CloudsTechnique.js +1 -1
  118. package/views/3d/environment/CloudsTechniqueConfiguration.js +1 -1
  119. package/views/3d/layers/I3SMeshView3D.js +1 -1
  120. package/views/3d/support/StreamDataLoader.js +1 -1
  121. package/views/3d/support/earthUtils.js +1 -1
  122. package/views/3d/terrain/PatchGeometry.js +1 -1
  123. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  124. package/views/3d/terrain/PatchGeometryLUT.js +1 -1
  125. package/views/3d/terrain/TerrainSurface.js +1 -1
  126. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
  127. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  128. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +22 -13
  129. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  130. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  131. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  132. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  133. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  134. package/views/LayerViewManager.js +1 -1
  135. package/views/ViewAnimation.js +1 -1
  136. package/views/interactive/editGeometry/operations/AppendVertex.js +1 -1
  137. package/views/interactive/editGeometry/operations/RemoveVertices.js +1 -1
  138. package/views/interactive/editGeometry/operations/SplitEdge.js +1 -1
  139. package/views/layers/MapImageLayerView.js +1 -1
  140. package/views/layers/support/Geometry.js +1 -1
  141. package/views/support/screenshotUtils.js +1 -1
  142. package/views/webgl/Measurement.js +1 -1
  143. package/views/webgl/TimerPool.js +5 -0
  144. package/views/webgl/capabilities/DisjointTimerQuery.js +1 -1
  145. package/widgets/Editor/EditorViewModel.js +1 -1
  146. package/widgets/Editor.js +1 -1
  147. package/widgets/FeatureForm/support/formTemplateUtils.js +1 -1
  148. package/assets/esri/core/workers/chunks/0c625803648e554f1fcf.js +0 -1
  149. package/assets/esri/core/workers/chunks/172c15e3dfa53554f591.js +0 -1
  150. package/assets/esri/core/workers/chunks/1e8e9967904da93c687e.js +0 -1
  151. package/assets/esri/core/workers/chunks/2efadbb06bf4a7f83f16.js +0 -1
  152. package/assets/esri/core/workers/chunks/30d7796ee6f7e4a6a3e1.js +0 -2
  153. package/assets/esri/core/workers/chunks/30d7796ee6f7e4a6a3e1.js.LICENSE.txt +0 -9
  154. package/assets/esri/core/workers/chunks/3281656a9bd3627e41ff.js +0 -1
  155. package/assets/esri/core/workers/chunks/3381b5454cd530cf940a.js +0 -1
  156. package/assets/esri/core/workers/chunks/4f4cb6d5b226ab5a38a1.js +0 -1
  157. package/assets/esri/core/workers/chunks/821a0754eae11421e56a.js +0 -1
  158. package/assets/esri/core/workers/chunks/8befbb2679e8285a8acd.js +0 -1
  159. package/assets/esri/core/workers/chunks/9e4c125d37ce66638b22.js +0 -1
  160. package/assets/esri/core/workers/chunks/a0750175b499a89fd07d.js +0 -1
  161. package/assets/esri/core/workers/chunks/c93d6bbe1af74d7bd7f9.js +0 -1
  162. package/assets/esri/core/workers/chunks/cc0a0782b8b9f6ec511e.js +0 -1
  163. package/assets/esri/core/workers/chunks/ef885b22ac8ec2695ad7.js +0 -1
  164. package/assets/esri/core/workers/chunks/f10379f663177a0150e9.js +0 -1
  165. package/assets/esri/core/workers/chunks/f351cccf879ba295acbc.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8899],{61159:(t,e,r)=>{r.d(e,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},38899:(t,e,r)=>{r.r(e),r.d(e,{default:()=>dt});var s=r(43697),n=(r(66577),r(38171)),o=r(3172),a=r(92835),i=r(20102),u=r(80442),d=r(35454),l=r(83379),c=r(70586),p=r(78286),h=r(95330),y=r(17452),f=r(5600),m=(r(67676),r(75215),r(52011)),g=r(6570),_=r(33955),b=r(25278),F=r(10158),R=r(4967),O=r(11282),S=r(74085),I=r(69285),q=r(98732);function C(t,e){return e}function x(t,e,r,s){switch(r){case 0:return T(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?T(t,e+s,1):function({translate:t,scale:e},r,s){return t[s]-r*e[s]}(t,e+s,1)}}function w(t,e,r,s){return 2===r?T(t,e,2):x(t,e,r,s)}function j(t,e,r,s){return 2===r?T(t,e,3):x(t,e,r,s)}function v(t,e,r,s){return 3===r?T(t,e,3):w(t,e,r,s)}function T({translate:t,scale:e},r,s){return t[s]+r*e[s]}class E{constructor(t){this._options=t,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=C,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=()=>{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=()=>{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=(0,I.k)(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(!(0,c.Wi)(e))for(const r of t.features)e(r.geometry)}createSpatialReference(){return{}}addField(t,e){t.fields.push(e);const r=t.fields.map((t=>t.name));this._attributesConstructor=function(){for(const t of r)this[t]=null}}addFeature(t,e){t.features.push(e)}prepareFeatures(t){switch(this._transform=t.transform,this._options.applyTransform&&t.transform&&(this._applyTransform=this._deriveApplyTransform(t)),this._vertexDimension=2,t.hasZ&&this._vertexDimension++,t.hasM&&this._vertexDimension++,t.geometryType){case"esriGeometryPoint":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"esriGeometryPolygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"esriGeometryPolyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"esriGeometryMultipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t);break;default:(0,S.Bg)(t.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(t,e,r){0===this._lengths.length&&(this._toAddInCurrentPath=e),this._lengths.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,n=(0,q.$g)(r.clone(),r,!1,!1,this._transform),o=(0,q.di)(n,s,!1,!1);t.queryGeometryType=s,t.queryGeometry={...o}}createPointGeometry(t){const e={x:0,y:0,spatialReference:t.spatialReference};return t.hasZ&&(e.z=0),t.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){switch(e=this._applyTransform(this._transform,e,r,0),r){case 0:t.x=e;break;case 1:t.y=e;break;case 2:"z"in t?t.z=e:t.m=e;break;case 3:t.m=e}}_transformPathLikeValue(t,e){let r=0;return e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t),this._applyTransform(this._transform,t,e,r)}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0==this._toAddInCurrentPath--&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),n=t[t.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),n.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?v:e?w:r?j:x}}var D=r(34599),A=r(74889),N=r(57444);var P=r(40330),G=r(76497),J=r(98326);function k(t){const e=t.toJSON();return e.attachmentTypes&&(e.attachmentTypes=e.attachmentTypes.join(",")),e.keywords&&(e.keywords=e.keywords.join(",")),e.globalIds&&(e.globalIds=e.globalIds.join(",")),e.objectIds&&(e.objectIds=e.objectIds.join(",")),e.size&&(e.size=e.size.join(",")),e}function Z(t,e){const r={};for(const s of t){const{parentObjectId:t,parentGlobalId:n,attachmentInfos:o}=s;for(const s of o){const{id:o}=s,a=(0,y.qg)((0,P.Dp)(`${e}/${t}/attachments/${o}`)),i=J.Z.fromJSON(s);i.set({url:a,parentObjectId:t,parentGlobalId:n}),r[t]?r[t].push(i):r[t]=[i]}}return r}var Q=r(56545);var M=r(41818),z=r(5396);function B(t,e){const r=t.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!e?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSpatialReference&&(r.outSR=r.outSR.wkid||JSON.stringify(r.outSR.toJSON()),delete r.outSpatialReference),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function U(t,e,r={},s){const n=(0,G.A)({...t.query,f:"json",...s,...B(e,s)});return(0,o.default)(t.path+"/queryRelatedRecords",{...r,query:{...r.query,...n}})}var V=r(75935);var L=r(82526),$=r(28694);const H="Layer does not support extent calculation.";function W(t,e){const r=t.geometry,s=t.toJSON(),n=s;if((0,c.pC)(r)&&(n.geometry=JSON.stringify(r),n.geometryType=(0,_.Ji)(r),n.inSR=r.spatialReference.wkid||JSON.stringify(r.spatialReference)),s.topFilter?.groupByFields&&(n.topFilter.groupByFields=s.topFilter.groupByFields.join(",")),s.topFilter?.orderByFields&&(n.topFilter.orderByFields=s.topFilter.orderByFields.join(",")),s.topFilter&&(n.topFilter=JSON.stringify(n.topFilter)),s.objectIds&&(n.objectIds=s.objectIds.join(",")),s.orderByFields&&(n.orderByFields=s.orderByFields.join(",")),s.outFields&&!(e?.returnCountOnly||e?.returnExtentOnly||e?.returnIdsOnly)?s.outFields.includes("*")?n.outFields="*":n.outFields=s.outFields.join(","):delete n.outFields,s.outSR?n.outSR=s.outSR.wkid||JSON.stringify(s.outSR):r&&s.returnGeometry&&(n.outSR=n.inSR),s.returnGeometry&&delete s.returnGeometry,s.timeExtent){const t=s.timeExtent,{start:e,end:r}=t;null==e&&null==r||(n.time=e===r?e:`${e??"null"},${r??"null"}`),delete s.timeExtent}return n}function X(t,e,r,s={},n={}){const a="string"==typeof t?(0,y.mN)(t):t,i=e.geometry?[e.geometry]:[];return s.responseType="pbf"===r?"array-buffer":"json",(0,L.aX)(i,null,s).then((t=>{const i=t&&t[0];(0,c.pC)(i)&&((e=e.clone()).geometry=i);const u=(0,G.A)({...a.query,f:r,...n,...W(e,n)});return(0,o.default)((0,y.v_)(a.path,"queryTopFeatures"),{...s,query:{...u,...s.query}})}))}var Y=r(28141);var K=r(15923);let tt=class extends K.Z{constructor(...t){super(...t),this.requestOptions=null,this.url=null}normalizeCtorArgs(t,e){return"string"!=typeof t?t:{url:t,...e}}get parsedUrl(){return this._parseUrl(this.url)}_parseUrl(t){return t?(0,y.mN)(t):null}_encode(t,e,r){const s={};for(const n in t){if("declaredClass"===n)continue;const o=t[n];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){s[n]=[];for(let t=0;t<o.length;t++)s[n][t]=this._encode(o[t])}else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r&&r[n]);s[n]=e?t:JSON.stringify(t)}else s[n]=e?o:JSON.stringify(o);else s[n]=o}return s}};(0,s._)([(0,f.Cb)({readOnly:!0})],tt.prototype,"parsedUrl",null),(0,s._)([(0,f.Cb)()],tt.prototype,"requestOptions",void 0),(0,s._)([(0,f.Cb)({type:String})],tt.prototype,"url",void 0),tt=(0,s._)([(0,m.j)("esri.tasks.Task")],tt);const et=tt;let rt=class extends et{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.format="json",this.gdbVersion=null,this.infoFor3D=null,this.sourceSpatialReference=null}execute(t,e){return this.executeJSON(t,e).then((r=>this.featureSetFromJSON(t,r,e)))}async executeJSON(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t),n=null!=t.outStatistics?.[0],o=(0,u.Z)("featurelayer-pbf-statistics"),a=!n||o;let i;if("pbf"===this.format&&a)try{i=await async function(t,e,r){const s=(0,O.en)(t),n={...r},o=N.Z.from(e),a=!o.quantizationParameters,{data:i}=await(0,D.executeQueryPBF)(s,o,new E({sourceSpatialReference:o.sourceSpatialReference,applyTransform:a}),n);return i}(this.url,s,r)}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.format="json"}return"json"!==this.format&&a||(i=await(0,R.F)(this.url,s,r)),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,s){if(!this._queryIs3DObjectFormat(t)||(0,c.Wi)(this.infoFor3D)||!e.features||!e.features.length)return A.default.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,h.Hl)(Promise.all([r.e(4547),r.e(6481),r.e(6459),r.e(8163)]).then(r.bind(r,38163)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return(0,M.P)(this.url,s,r)}executeForExtent(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return async function(t,e,r){const s=(0,O.en)(t);return(0,D.executeQueryForExtent)(s,N.Z.from(e),{...r}).then((t=>({count:t.data.count,extent:g.Z.fromJSON(t.data.extent)})))}(this.url,s,r)}executeForIds(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return(0,z.G)(this.url,s,r)}executeRelationshipQuery(t,e){t=V.Z.from(t);const r={...this.requestOptions,...e};return(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),async function(t,e,r){return e=V.Z.from(e),async function(t,e,r){const s=await U(t,e,r),n=s.data,o=n.geometryType,a=n.spatialReference,i={};for(const t of n.relatedRecordGroups){const e={fields:void 0,objectIdFieldName:void 0,geometryType:o,spatialReference:a,hasZ:!!n.hasZ,hasM:!!n.hasM,features:t.relatedRecords};if(null!=t.objectId)i[t.objectId]=e;else for(const r in t)t.hasOwnProperty(r)&&"relatedRecords"!==r&&(i[t[r]]=e)}return{...s,data:i}}((0,O.en)(t),e,r).then((t=>{const e=t.data,r={};return Object.keys(e).forEach((t=>r[t]=A.default.fromJSON(e[t]))),r}))}(this.url,t,r)}executeRelationshipQueryForCount(t,e){t=V.Z.from(t);const r={...this.requestOptions,...e};return(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),async function(t,e,r){return e=V.Z.from(e),async function(t,e,r){const s=await U(t,e,r,{returnCountOnly:!0}),n=s.data,o={};for(const t of n.relatedRecordGroups)null!=t.objectId&&(o[t.objectId]=t.count);return{...s,data:o}}((0,O.en)(t),e,{...r}).then((t=>t.data))}(this.url,t,r)}executeAttachmentQuery(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,O.en)(t);return function(t,e,r){let s={query:(0,G.A)({...t.query,f:"json",...k(e)})};return r&&(s={...r,...s,query:{...r.query,...s.query}}),(0,o.default)(t.path+"/queryAttachments",s)}(s,Q.Z.from(e),{...r}).then((t=>Z(t.data.attachmentGroups,s.path)))}(this.url,t,r)}executeTopFeaturesQuery(t,e){const r={...this.requestOptions,...e};return async function(t,e,r,s){const n=(0,O.en)(t),o={...s},{data:a}=await async function(t,e,r,s){const n=await X(t,e,"json",s);return(0,$.p)(e,r,n.data),n}(n,Y.Z.from(e),r,o);return A.default.fromJSON(a)}(this.parsedUrl,t,this.sourceSpatialReference,r)}executeForTopIds(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,O.en)(t);return(await async function(t,e,r){return(0,c.pC)(e.timeExtent)&&e.timeExtent.isEmpty?{data:{objectIds:[]}}:X(t,e,"json",r,{returnIdsOnly:!0})}(s,Y.Z.from(e),{...r})).data.objectIds}(this.parsedUrl,t,r)}executeForTopExtents(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,O.en)(t),n=await async function(t,e,r){return(0,c.pC)(e.timeExtent)&&e.timeExtent.isEmpty?{data:{count:0,extent:null}}:X(t,e,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((t=>{const e=t.data;if(e.hasOwnProperty("extent"))return t;if(e.features)throw new Error(H);if(e.hasOwnProperty("count"))throw new Error(H);return t}))}(s,Y.Z.from(e),{...r});return{count:n.data.count,extent:g.Z.fromJSON(n.data.extent)}}(this.parsedUrl,t,r)}executeForTopCount(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,O.en)(t);return(await(n=s,o=Y.Z.from(e),a={...r},(0,c.pC)(o.timeExtent)&&o.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):X(n,o,"json",a,{returnIdsOnly:!0,returnCountOnly:!0}))).data.count;var n,o,a}(this.parsedUrl,t,r)}_normalizeQuery(t){let e=N.Z.from(t);if(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?F.n.from(t.dynamicDataSource):this.dynamicDataSource),(0,c.pC)(this.infoFor3D)&&this._queryIs3DObjectFormat(t)){e=e===t?e.clone():e,e.formatOf3DObjects=null;for(const t of this.infoFor3D.queryFormats){if("3D_glb"===t.id){e.formatOf3DObjects=t.id;break}"3D_gltf"!==t.id||e.formatOf3DObjects||(e.formatOf3DObjects=t.id)}if(!e.formatOf3DObjects)throw new i.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if((0,c.Wi)(e.outFields)||!e.outFields.includes("*")){e=e===t?e.clone():e,(0,c.Wi)(e.outFields)&&(e.outFields=[]);const{originX:r,originY:s,originZ:n,translationX:o,translationY:a,translationZ:i,scaleX:u,scaleY:d,scaleZ:l,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=this.infoFor3D.transformFieldRoles;e.outFields.push(r,s,n,o,a,i,u,d,l,p,h,y,f)}}return e}_normalizeFields(t){if((0,c.pC)(this.fieldsIndex)&&(0,c.pC)(t))for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryIs3DObjectFormat(t){return(0,c.pC)(this.infoFor3D)&&t.returnGeometry&&"xyFootprint"!==t.multipatchOption&&!t.outStatistics}};(0,s._)([(0,f.Cb)({type:F.n})],rt.prototype,"dynamicDataSource",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"fieldsIndex",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"format",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"gdbVersion",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"infoFor3D",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"sourceSpatialReference",void 0),rt=(0,s._)([(0,m.j)("esri.tasks.QueryTask")],rt);const st=rt;var nt=r(59431),ot=r(82971);const at=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),it=new Set(["Feature Layer","Table"]);let ut=class extends l.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,h.Ds)((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}}))}load(t){const e=(0,c.pC)(t)?t.signal:null;return this.addResolvingPromise(this._fetchService(this.layer.sourceJSON,e)),Promise.resolve(this)}get queryTask(){const{capabilities:{query:{supportsFormatPBF:t}},parsedUrl:e,dynamicDataSource:r,infoFor3D:s,gdbVersion:n,spatialReference:o,fieldsIndex:a}=this.layer,i=(0,u.Z)("featurelayer-pbf")&&t&&(0,c.Wi)(s)?"pbf":"json";return new st({url:e.path,format:i,fieldsIndex:a,infoFor3D:s,dynamicDataSource:r,gdbVersion:n,sourceSpatialReference:o})}async addAttachment(t,e){await this.load();const r=t.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",n=this._getLayerRequestOptions(),a=this._getFormDataForAttachment(e,n.query);try{const t=await(0,o.default)(s,{body:a});return this._createFeatureEditResult(t.data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(r,t)}}async updateAttachment(t,e,r){await this.load();const s=t.attributes[this.layer.objectIdField],n=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",a=this._getLayerRequestOptions({query:{attachmentId:e}}),i=this._getFormDataForAttachment(r,a.query);try{const t=await(0,o.default)(n,{body:i});return this._createFeatureEditResult(t.data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async applyEdits(t,e){await this.load();const r=t.addFeatures.map(this._serializeFeature,this),s=t.updateFeatures.map(this._serializeFeature,this),n=this._getFeatureIds(t.deleteFeatures,e?.globalIdUsed);(0,nt.P)(r,s,this.layer.spatialReference);const a=[],i=[],u=[...t.deleteAttachments];for(const e of t.addAttachments)a.push(await this._serializeAttachment(e));for(const e of t.updateAttachments)i.push(await this._serializeAttachment(e));const d=a.length||i.length||u.length?{adds:a,updates:i,deletes:u}:null,l={gdbVersion:e?.gdbVersion||this.layer.gdbVersion,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:e?.globalIdUsed,returnEditMoment:e?.returnEditMoment,usePreviousEditMoment:e?.usePreviousEditMoment,sessionId:e?.sessionId};e?.returnServiceEditsOption?(l.edits=JSON.stringify([{id:this.layer.layerId,adds:r,updates:s,deletes:n,attachments:d}]),l.returnServiceEditsOption=at.toJSON(e?.returnServiceEditsOption),l.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(l.adds=r.length?JSON.stringify(r):null,l.updates=s.length?JSON.stringify(s):null,l.deletes=n.length?e?.globalIdUsed?JSON.stringify(n):n.join(","):null,l.attachments=d&&JSON.stringify(d));const c=this._getLayerRequestOptions({method:"post",query:l}),p=e?.returnServiceEditsOption?this.layer.url:this.layer.parsedUrl.path,h=await(0,o.default)(p+"/applyEdits",c);return this._createEditsResult(h)}async deleteAttachments(t,e){await this.load();const r=t.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,o.default)(s,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(t){throw this._createAttachmentErrorResult(r,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,o.default)(`${s}/${r}`,e),{id:i,extent:u,fullExtent:d,timeExtent:l}=n,c=u||d;return{id:i,fullExtent:c&&g.Z.fromJSON(c),timeExtent:l&&a.Z.fromJSON({start:l[0],end:l[1]})}}))}async queryAttachments(t,e={}){const{parsedUrl:r}=this.layer,s=r.path;await this.load();const n=this._getLayerRequestOptions(e);if(!this.layer.get("capabilities.operations.supportsQueryAttachments")){const{objectIds:e}=t,r=[];for(const t of e){const e=s+"/"+t+"/attachments";r.push((0,o.default)(e,n))}return Promise.all(r).then((t=>e.map(((e,r)=>({parentObjectId:e,attachmentInfos:t[r].data.attachmentInfos}))))).then((t=>Z(t,s)))}return this.queryTask.executeAttachmentQuery(t,n)}async queryFeatures(t,e){return await this.load(),this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)})}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 queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(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)})}_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{data:r}=await(0,o.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,u.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:e}));t=r}this.sourceJSON=this._patchServiceJSON(t);const r=t.type;if(!it.has(r))throw new i.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(t){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,b.bU)(t.geometryType).renderer;(0,p.RB)("drawingInfo.renderer",e,t)}return"esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),t}_serializeFeature(t){const{geometry:e,attributes:r}=t;return(0,c.Wi)(e)?{attributes:r}:"mesh"===e.type||"extent"===e.type?null:{geometry:e.toJSON(),attributes:r}}async _serializeAttachment(t){const{feature:e,attachment:r}=t,{globalId:s,name:n,contentType:o,data:a,uploadId:i}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(e&&(u.parentGlobalId="attributes"in e?e.attributes&&e.attributes[this.layer.globalIdField]:e.globalId),i)u.uploadId=i;else if(a){const t=await async function(t){return"string"==typeof t?(0,y.sJ)(t)||{data:t}:new Promise(((e,r)=>{const s=new FileReader;s.readAsDataURL(t),s.onload=()=>e((0,y.sJ)(s.result)),s.onerror=t=>r(t)}))}(a);u.contentType=t.mediaType,u.data=t.data,a instanceof File&&(u.name=a.name)}return n&&(u.name=n),o&&(u.contentType=o),u}_getFeatureIds(t,e){const r=t[0];return r?this._canUseGlobalIds(e,t)?this._getGlobalIdsFromFeatureIdentifier(t):"objectId"in r?this._getObjectIdsFromFeatureIdentifier(t):this._getIdsFromFeatures(t):[]}_getIdsFromFeatures(t){const e=this.layer.objectIdField;return t.map((t=>t.attributes&&t.attributes[e]))}_canUseGlobalIds(t,e){return t&&"globalId"in e[0]}_getObjectIdsFromFeatureIdentifier(t){return t.map((t=>t.objectId))}_getGlobalIdsFromFeatureIdentifier(t){return t.map((t=>t.globalId))}_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 o=n?.attachments,a={addFeatureResults:n.addResults?n.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:n.updateResults?n.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:n.deleteResults?n.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:o&&o.addResults?o.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:o&&o.updateResults?o.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:o&&o.deleteResults?o.deleteResults.map(this._createFeatureEditResult,this):[]};if(n.editMoment&&(a.editMoment=n.editMoment),s.length>0){a.editedFeatureResults=[];for(const t of s){const{adds:e,updates:r,deletes:s,spatialReference:n}=t.editedFeatures,o=n?new ot.Z(n):null;a.editedFeatureResults.push({layerId:t.id,editedFeatures:{adds:e?.map((t=>this._createEditedFeature(t,o)))||[],updates:r?.map((t=>({original:this._createEditedFeature(t[0],o),current:this._createEditedFeature(t[1],o)})))||[],deletes:s?.map((t=>this._createEditedFeature(t,o)))||[],spatialReference:o}})}}return a}_createEditedFeature(t,e){return new n.Z({attributes:t.attributes,geometry:(0,_.im)({...t.geometry,spatialReference:e})})}_createFeatureEditResult(t){const e=!0===t.success?null:t.error||{code:void 0,description:void 0};return{objectId:t.objectId,globalId:t.globalId,error:e?new i.Z("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}_createAttachmentErrorResult(t,e){const r=e.details.messages&&e.details.messages[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new i.Z("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{parsedUrl:e,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...t,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...e.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}};(0,s._)([(0,f.Cb)()],ut.prototype,"type",void 0),(0,s._)([(0,f.Cb)({constructOnly:!0})],ut.prototype,"layer",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],ut.prototype,"queryTask",null),ut=(0,s._)([(0,m.j)("esri.layers.graphics.sources.FeatureLayerSource")],ut);const dt=ut},25278:(t,e,r)=>{r.d(e,{Dm:()=>l,Hq:()=>c,MS:()=>p,bU:()=>i});var s=r(80442),n=r(22974),o=r(61159),a=r(58333);function i(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.I4:"esriGeometryPolyline"===t?a.ET:a.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function l(t,e){if((0,s.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this.${e} = null;`;for(const e in t)r+=`this${u.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function c(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(t)}}]}function p(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},41818:(t,e,r)=>{r.d(e,{P:()=>a});var s=r(11282),n=r(34599),o=r(57444);async function a(t,e,r){const a=(0,s.en)(t);return(0,n.executeQueryForCount)(a,o.Z.from(e),{...r}).then((t=>t.data.count))}},5396:(t,e,r)=>{r.d(e,{G:()=>a});var s=r(11282),n=r(34599),o=r(57444);async function a(t,e,r){const a=(0,s.en)(t);return(0,n.executeQueryForIds)(a,o.Z.from(e),{...r}).then((t=>t.data.objectIds))}},4967:(t,e,r)=>{r.d(e,{F:()=>u,e:()=>i});var s=r(11282),n=r(34599),o=r(74889),a=r(57444);async function i(t,e,r){const s=await u(t,e,r);return o.default.fromJSON(s)}async function u(t,e,r){const o=(0,s.en)(t),i={...r},u=a.Z.from(e),{data:d}=await(0,n.executeQuery)(o,u,u.sourceSpatialReference,i);return d}},98326:(t,e,r)=>{r.d(e,{Z:()=>c});var s,n=r(43697),o=r(96674),a=r(5600),i=(r(67676),r(80442),r(75215)),u=r(52011);const d={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let l=s=class extends o.wq{constructor(t){super(t),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:t}=this,e=function(t){const{exifInfo:e,exifName:r,tagName:s}=t;if(!e||!r||!s)return null;const n=e.find((t=>t.name===r));return n?function(t){const{tagName:e,tags:r}=t;if(!r||!e)return null;const s=r.find((t=>t.name===e));return s&&s.value||null}({tagName:s,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:t});return d[e]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,a.Cb)({type:String})],l.prototype,"contentType",void 0),(0,n._)([(0,a.Cb)()],l.prototype,"exifInfo",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],l.prototype,"orientationInfo",null),(0,n._)([(0,a.Cb)({type:i.z8})],l.prototype,"id",void 0),(0,n._)([(0,a.Cb)({type:String})],l.prototype,"globalId",void 0),(0,n._)([(0,a.Cb)({type:String})],l.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:String})],l.prototype,"name",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],l.prototype,"parentGlobalId",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],l.prototype,"parentObjectId",void 0),(0,n._)([(0,a.Cb)({type:i.z8})],l.prototype,"size",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],l.prototype,"url",void 0),l=s=(0,n._)([(0,u.j)("esri.layers.support.AttachmentInfo")],l);const c=l},11282:(t,e,r)=>{r.d(e,{cv:()=>i,en:()=>a,lA:()=>o});var s=r(22974),n=r(17452);function o(t,e){return e?{...e,query:{...t,...e.query}}:{query:t}}function a(t){return"string"==typeof t?(0,n.mN)(t):(0,s.d9)(t)}function i(t,e,r){const s={};for(const n in t){if("declaredClass"===n)continue;const o=t[n];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){s[n]=[];for(let t=0;t<o.length;t++)s[n][t]=i(o[t])}else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r&&r[n]);s[n]=e?t:JSON.stringify(t)}else s[n]=e?o:JSON.stringify(o);else s[n]=o}return s}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8899],{61159:(t,e,r)=>{r.d(e,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},38899:(t,e,r)=>{r.r(e),r.d(e,{default:()=>dt});var s=r(43697),n=(r(66577),r(38171)),o=r(3172),a=r(92835),i=r(20102),u=r(80442),d=r(35454),l=r(83379),c=r(70586),p=r(78286),h=r(95330),y=r(17452),f=r(5600),m=(r(67676),r(75215),r(52011)),g=r(6570),_=r(33955),b=r(25278),F=r(10158),R=r(4967),O=r(11282),S=r(74085),I=r(69285),q=r(98732);function C(t,e){return e}function x(t,e,r,s){switch(r){case 0:return T(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?T(t,e+s,1):function({translate:t,scale:e},r,s){return t[s]-r*e[s]}(t,e+s,1)}}function w(t,e,r,s){return 2===r?T(t,e,2):x(t,e,r,s)}function j(t,e,r,s){return 2===r?T(t,e,3):x(t,e,r,s)}function v(t,e,r,s){return 3===r?T(t,e,3):w(t,e,r,s)}function T({translate:t,scale:e},r,s){return t[s]+r*e[s]}class E{constructor(t){this._options=t,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=C,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=()=>{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=()=>{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=(0,I.k)(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(!(0,c.Wi)(e))for(const r of t.features)e(r.geometry)}createSpatialReference(){return{}}addField(t,e){t.fields.push(e);const r=t.fields.map((t=>t.name));this._attributesConstructor=function(){for(const t of r)this[t]=null}}addFeature(t,e){t.features.push(e)}prepareFeatures(t){switch(this._transform=t.transform,this._options.applyTransform&&t.transform&&(this._applyTransform=this._deriveApplyTransform(t)),this._vertexDimension=2,t.hasZ&&this._vertexDimension++,t.hasM&&this._vertexDimension++,t.geometryType){case"esriGeometryPoint":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"esriGeometryPolygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"esriGeometryPolyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"esriGeometryMultipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t);break;default:(0,S.Bg)(t.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(t,e,r){0===this._lengths.length&&(this._toAddInCurrentPath=e),this._lengths.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,n=(0,q.$g)(r.clone(),r,!1,!1,this._transform),o=(0,q.di)(n,s,!1,!1);t.queryGeometryType=s,t.queryGeometry={...o}}createPointGeometry(t){const e={x:0,y:0,spatialReference:t.spatialReference};return t.hasZ&&(e.z=0),t.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){switch(e=this._applyTransform(this._transform,e,r,0),r){case 0:t.x=e;break;case 1:t.y=e;break;case 2:"z"in t?t.z=e:t.m=e;break;case 3:t.m=e}}_transformPathLikeValue(t,e){let r=0;return e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t),this._applyTransform(this._transform,t,e,r)}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0==this._toAddInCurrentPath--&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),n=t[t.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),n.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?v:e?w:r?j:x}}var D=r(34599),A=r(74889),N=r(57444);var P=r(40330),G=r(76497),J=r(98326);function k(t){const e=t.toJSON();return e.attachmentTypes&&(e.attachmentTypes=e.attachmentTypes.join(",")),e.keywords&&(e.keywords=e.keywords.join(",")),e.globalIds&&(e.globalIds=e.globalIds.join(",")),e.objectIds&&(e.objectIds=e.objectIds.join(",")),e.size&&(e.size=e.size.join(",")),e}function Z(t,e){const r={};for(const s of t){const{parentObjectId:t,parentGlobalId:n,attachmentInfos:o}=s;for(const s of o){const{id:o}=s,a=(0,y.qg)((0,P.Dp)(`${e}/${t}/attachments/${o}`)),i=J.Z.fromJSON(s);i.set({url:a,parentObjectId:t,parentGlobalId:n}),r[t]?r[t].push(i):r[t]=[i]}}return r}var Q=r(56545);var M=r(41818),z=r(5396);function B(t,e){const r=t.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!e?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSpatialReference&&(r.outSR=r.outSR.wkid||JSON.stringify(r.outSR.toJSON()),delete r.outSpatialReference),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function U(t,e,r={},s){const n=(0,G.A)({...t.query,f:"json",...s,...B(e,s)});return(0,o.default)(t.path+"/queryRelatedRecords",{...r,query:{...r.query,...n}})}var V=r(75935);var L=r(82526),$=r(28694);const H="Layer does not support extent calculation.";function W(t,e){const r=t.geometry,s=t.toJSON(),n=s;if((0,c.pC)(r)&&(n.geometry=JSON.stringify(r),n.geometryType=(0,_.Ji)(r),n.inSR=r.spatialReference.wkid||JSON.stringify(r.spatialReference)),s.topFilter?.groupByFields&&(n.topFilter.groupByFields=s.topFilter.groupByFields.join(",")),s.topFilter?.orderByFields&&(n.topFilter.orderByFields=s.topFilter.orderByFields.join(",")),s.topFilter&&(n.topFilter=JSON.stringify(n.topFilter)),s.objectIds&&(n.objectIds=s.objectIds.join(",")),s.orderByFields&&(n.orderByFields=s.orderByFields.join(",")),s.outFields&&!(e?.returnCountOnly||e?.returnExtentOnly||e?.returnIdsOnly)?s.outFields.includes("*")?n.outFields="*":n.outFields=s.outFields.join(","):delete n.outFields,s.outSR?n.outSR=s.outSR.wkid||JSON.stringify(s.outSR):r&&s.returnGeometry&&(n.outSR=n.inSR),s.returnGeometry&&delete s.returnGeometry,s.timeExtent){const t=s.timeExtent,{start:e,end:r}=t;null==e&&null==r||(n.time=e===r?e:`${e??"null"},${r??"null"}`),delete s.timeExtent}return n}function X(t,e,r,s={},n={}){const a="string"==typeof t?(0,y.mN)(t):t,i=e.geometry?[e.geometry]:[];return s.responseType="pbf"===r?"array-buffer":"json",(0,L.aX)(i,null,s).then((t=>{const i=t&&t[0];(0,c.pC)(i)&&((e=e.clone()).geometry=i);const u=(0,G.A)({...a.query,f:r,...n,...W(e,n)});return(0,o.default)((0,y.v_)(a.path,"queryTopFeatures"),{...s,query:{...u,...s.query}})}))}var Y=r(28141);var K=r(15923);let tt=class extends K.Z{constructor(...t){super(...t),this.requestOptions=null,this.url=null}normalizeCtorArgs(t,e){return"string"!=typeof t?t:{url:t,...e}}get parsedUrl(){return this._parseUrl(this.url)}_parseUrl(t){return t?(0,y.mN)(t):null}_encode(t,e,r){const s={};for(const n in t){if("declaredClass"===n)continue;const o=t[n];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){s[n]=[];for(let t=0;t<o.length;t++)s[n][t]=this._encode(o[t])}else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r&&r[n]);s[n]=e?t:JSON.stringify(t)}else s[n]=e?o:JSON.stringify(o);else s[n]=o}return s}};(0,s._)([(0,f.Cb)({readOnly:!0})],tt.prototype,"parsedUrl",null),(0,s._)([(0,f.Cb)()],tt.prototype,"requestOptions",void 0),(0,s._)([(0,f.Cb)({type:String})],tt.prototype,"url",void 0),tt=(0,s._)([(0,m.j)("esri.tasks.Task")],tt);const et=tt;let rt=class extends et{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.format="json",this.gdbVersion=null,this.infoFor3D=null,this.sourceSpatialReference=null}execute(t,e){return this.executeJSON(t,e).then((r=>this.featureSetFromJSON(t,r,e)))}async executeJSON(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t),n=null!=t.outStatistics?.[0],o=(0,u.Z)("featurelayer-pbf-statistics"),a=!n||o;let i;if("pbf"===this.format&&a)try{i=await async function(t,e,r){const s=(0,O.en)(t),n={...r},o=N.Z.from(e),a=!o.quantizationParameters,{data:i}=await(0,D.executeQueryPBF)(s,o,new E({sourceSpatialReference:o.sourceSpatialReference,applyTransform:a}),n);return i}(this.url,s,r)}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.format="json"}return"json"!==this.format&&a||(i=await(0,R.F)(this.url,s,r)),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,s){if(!this._queryIs3DObjectFormat(t)||(0,c.Wi)(this.infoFor3D)||!e.features||!e.features.length)return A.default.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,h.Hl)(Promise.all([r.e(4547),r.e(6481),r.e(6459),r.e(6942)]).then(r.bind(r,36942)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return(0,M.P)(this.url,s,r)}executeForExtent(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return async function(t,e,r){const s=(0,O.en)(t);return(0,D.executeQueryForExtent)(s,N.Z.from(e),{...r}).then((t=>({count:t.data.count,extent:g.Z.fromJSON(t.data.extent)})))}(this.url,s,r)}executeForIds(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return(0,z.G)(this.url,s,r)}executeRelationshipQuery(t,e){t=V.Z.from(t);const r={...this.requestOptions,...e};return(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),async function(t,e,r){return e=V.Z.from(e),async function(t,e,r){const s=await U(t,e,r),n=s.data,o=n.geometryType,a=n.spatialReference,i={};for(const t of n.relatedRecordGroups){const e={fields:void 0,objectIdFieldName:void 0,geometryType:o,spatialReference:a,hasZ:!!n.hasZ,hasM:!!n.hasM,features:t.relatedRecords};if(null!=t.objectId)i[t.objectId]=e;else for(const r in t)t.hasOwnProperty(r)&&"relatedRecords"!==r&&(i[t[r]]=e)}return{...s,data:i}}((0,O.en)(t),e,r).then((t=>{const e=t.data,r={};return Object.keys(e).forEach((t=>r[t]=A.default.fromJSON(e[t]))),r}))}(this.url,t,r)}executeRelationshipQueryForCount(t,e){t=V.Z.from(t);const r={...this.requestOptions,...e};return(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),async function(t,e,r){return e=V.Z.from(e),async function(t,e,r){const s=await U(t,e,r,{returnCountOnly:!0}),n=s.data,o={};for(const t of n.relatedRecordGroups)null!=t.objectId&&(o[t.objectId]=t.count);return{...s,data:o}}((0,O.en)(t),e,{...r}).then((t=>t.data))}(this.url,t,r)}executeAttachmentQuery(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,O.en)(t);return function(t,e,r){let s={query:(0,G.A)({...t.query,f:"json",...k(e)})};return r&&(s={...r,...s,query:{...r.query,...s.query}}),(0,o.default)(t.path+"/queryAttachments",s)}(s,Q.Z.from(e),{...r}).then((t=>Z(t.data.attachmentGroups,s.path)))}(this.url,t,r)}executeTopFeaturesQuery(t,e){const r={...this.requestOptions,...e};return async function(t,e,r,s){const n=(0,O.en)(t),o={...s},{data:a}=await async function(t,e,r,s){const n=await X(t,e,"json",s);return(0,$.p)(e,r,n.data),n}(n,Y.Z.from(e),r,o);return A.default.fromJSON(a)}(this.parsedUrl,t,this.sourceSpatialReference,r)}executeForTopIds(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,O.en)(t);return(await async function(t,e,r){return(0,c.pC)(e.timeExtent)&&e.timeExtent.isEmpty?{data:{objectIds:[]}}:X(t,e,"json",r,{returnIdsOnly:!0})}(s,Y.Z.from(e),{...r})).data.objectIds}(this.parsedUrl,t,r)}executeForTopExtents(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,O.en)(t),n=await async function(t,e,r){return(0,c.pC)(e.timeExtent)&&e.timeExtent.isEmpty?{data:{count:0,extent:null}}:X(t,e,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((t=>{const e=t.data;if(e.hasOwnProperty("extent"))return t;if(e.features)throw new Error(H);if(e.hasOwnProperty("count"))throw new Error(H);return t}))}(s,Y.Z.from(e),{...r});return{count:n.data.count,extent:g.Z.fromJSON(n.data.extent)}}(this.parsedUrl,t,r)}executeForTopCount(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,O.en)(t);return(await(n=s,o=Y.Z.from(e),a={...r},(0,c.pC)(o.timeExtent)&&o.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):X(n,o,"json",a,{returnIdsOnly:!0,returnCountOnly:!0}))).data.count;var n,o,a}(this.parsedUrl,t,r)}_normalizeQuery(t){let e=N.Z.from(t);if(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?F.n.from(t.dynamicDataSource):this.dynamicDataSource),(0,c.pC)(this.infoFor3D)&&this._queryIs3DObjectFormat(t)){e=e===t?e.clone():e,e.formatOf3DObjects=null;for(const t of this.infoFor3D.queryFormats){if("3D_glb"===t.id){e.formatOf3DObjects=t.id;break}"3D_gltf"!==t.id||e.formatOf3DObjects||(e.formatOf3DObjects=t.id)}if(!e.formatOf3DObjects)throw new i.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if((0,c.Wi)(e.outFields)||!e.outFields.includes("*")){e=e===t?e.clone():e,(0,c.Wi)(e.outFields)&&(e.outFields=[]);const{originX:r,originY:s,originZ:n,translationX:o,translationY:a,translationZ:i,scaleX:u,scaleY:d,scaleZ:l,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=this.infoFor3D.transformFieldRoles;e.outFields.push(r,s,n,o,a,i,u,d,l,p,h,y,f)}}return e}_normalizeFields(t){if((0,c.pC)(this.fieldsIndex)&&(0,c.pC)(t))for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryIs3DObjectFormat(t){return(0,c.pC)(this.infoFor3D)&&t.returnGeometry&&"xyFootprint"!==t.multipatchOption&&!t.outStatistics}};(0,s._)([(0,f.Cb)({type:F.n})],rt.prototype,"dynamicDataSource",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"fieldsIndex",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"format",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"gdbVersion",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"infoFor3D",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"sourceSpatialReference",void 0),rt=(0,s._)([(0,m.j)("esri.tasks.QueryTask")],rt);const st=rt;var nt=r(59431),ot=r(82971);const at=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),it=new Set(["Feature Layer","Table"]);let ut=class extends l.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,h.Ds)((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}}))}load(t){const e=(0,c.pC)(t)?t.signal:null;return this.addResolvingPromise(this._fetchService(this.layer.sourceJSON,e)),Promise.resolve(this)}get queryTask(){const{capabilities:{query:{supportsFormatPBF:t}},parsedUrl:e,dynamicDataSource:r,infoFor3D:s,gdbVersion:n,spatialReference:o,fieldsIndex:a}=this.layer,i=(0,u.Z)("featurelayer-pbf")&&t&&(0,c.Wi)(s)?"pbf":"json";return new st({url:e.path,format:i,fieldsIndex:a,infoFor3D:s,dynamicDataSource:r,gdbVersion:n,sourceSpatialReference:o})}async addAttachment(t,e){await this.load();const r=t.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",n=this._getLayerRequestOptions(),a=this._getFormDataForAttachment(e,n.query);try{const t=await(0,o.default)(s,{body:a});return this._createFeatureEditResult(t.data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(r,t)}}async updateAttachment(t,e,r){await this.load();const s=t.attributes[this.layer.objectIdField],n=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",a=this._getLayerRequestOptions({query:{attachmentId:e}}),i=this._getFormDataForAttachment(r,a.query);try{const t=await(0,o.default)(n,{body:i});return this._createFeatureEditResult(t.data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async applyEdits(t,e){await this.load();const r=t.addFeatures.map(this._serializeFeature,this),s=t.updateFeatures.map(this._serializeFeature,this),n=this._getFeatureIds(t.deleteFeatures,e?.globalIdUsed);(0,nt.P)(r,s,this.layer.spatialReference);const a=[],i=[],u=[...t.deleteAttachments];for(const e of t.addAttachments)a.push(await this._serializeAttachment(e));for(const e of t.updateAttachments)i.push(await this._serializeAttachment(e));const d=a.length||i.length||u.length?{adds:a,updates:i,deletes:u}:null,l={gdbVersion:e?.gdbVersion||this.layer.gdbVersion,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:e?.globalIdUsed,returnEditMoment:e?.returnEditMoment,usePreviousEditMoment:e?.usePreviousEditMoment,sessionId:e?.sessionId};e?.returnServiceEditsOption?(l.edits=JSON.stringify([{id:this.layer.layerId,adds:r,updates:s,deletes:n,attachments:d}]),l.returnServiceEditsOption=at.toJSON(e?.returnServiceEditsOption),l.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(l.adds=r.length?JSON.stringify(r):null,l.updates=s.length?JSON.stringify(s):null,l.deletes=n.length?e?.globalIdUsed?JSON.stringify(n):n.join(","):null,l.attachments=d&&JSON.stringify(d));const c=this._getLayerRequestOptions({method:"post",query:l}),p=e?.returnServiceEditsOption?this.layer.url:this.layer.parsedUrl.path,h=await(0,o.default)(p+"/applyEdits",c);return this._createEditsResult(h)}async deleteAttachments(t,e){await this.load();const r=t.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,o.default)(s,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(t){throw this._createAttachmentErrorResult(r,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,o.default)(`${s}/${r}`,e),{id:i,extent:u,fullExtent:d,timeExtent:l}=n,c=u||d;return{id:i,fullExtent:c&&g.Z.fromJSON(c),timeExtent:l&&a.Z.fromJSON({start:l[0],end:l[1]})}}))}async queryAttachments(t,e={}){const{parsedUrl:r}=this.layer,s=r.path;await this.load();const n=this._getLayerRequestOptions(e);if(!this.layer.get("capabilities.operations.supportsQueryAttachments")){const{objectIds:e}=t,r=[];for(const t of e){const e=s+"/"+t+"/attachments";r.push((0,o.default)(e,n))}return Promise.all(r).then((t=>e.map(((e,r)=>({parentObjectId:e,attachmentInfos:t[r].data.attachmentInfos}))))).then((t=>Z(t,s)))}return this.queryTask.executeAttachmentQuery(t,n)}async queryFeatures(t,e){return await this.load(),this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)})}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 queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(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)})}_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{data:r}=await(0,o.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,u.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:e}));t=r}this.sourceJSON=this._patchServiceJSON(t);const r=t.type;if(!it.has(r))throw new i.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(t){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,b.bU)(t.geometryType).renderer;(0,p.RB)("drawingInfo.renderer",e,t)}return"esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),t}_serializeFeature(t){const{geometry:e,attributes:r}=t;return(0,c.Wi)(e)?{attributes:r}:"mesh"===e.type||"extent"===e.type?null:{geometry:e.toJSON(),attributes:r}}async _serializeAttachment(t){const{feature:e,attachment:r}=t,{globalId:s,name:n,contentType:o,data:a,uploadId:i}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(e&&(u.parentGlobalId="attributes"in e?e.attributes&&e.attributes[this.layer.globalIdField]:e.globalId),i)u.uploadId=i;else if(a){const t=await async function(t){return"string"==typeof t?(0,y.sJ)(t)||{data:t}:new Promise(((e,r)=>{const s=new FileReader;s.readAsDataURL(t),s.onload=()=>e((0,y.sJ)(s.result)),s.onerror=t=>r(t)}))}(a);u.contentType=t.mediaType,u.data=t.data,a instanceof File&&(u.name=a.name)}return n&&(u.name=n),o&&(u.contentType=o),u}_getFeatureIds(t,e){const r=t[0];return r?this._canUseGlobalIds(e,t)?this._getGlobalIdsFromFeatureIdentifier(t):"objectId"in r?this._getObjectIdsFromFeatureIdentifier(t):this._getIdsFromFeatures(t):[]}_getIdsFromFeatures(t){const e=this.layer.objectIdField;return t.map((t=>t.attributes&&t.attributes[e]))}_canUseGlobalIds(t,e){return t&&"globalId"in e[0]}_getObjectIdsFromFeatureIdentifier(t){return t.map((t=>t.objectId))}_getGlobalIdsFromFeatureIdentifier(t){return t.map((t=>t.globalId))}_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 o=n?.attachments,a={addFeatureResults:n.addResults?n.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:n.updateResults?n.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:n.deleteResults?n.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:o&&o.addResults?o.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:o&&o.updateResults?o.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:o&&o.deleteResults?o.deleteResults.map(this._createFeatureEditResult,this):[]};if(n.editMoment&&(a.editMoment=n.editMoment),s.length>0){a.editedFeatureResults=[];for(const t of s){const{adds:e,updates:r,deletes:s,spatialReference:n}=t.editedFeatures,o=n?new ot.Z(n):null;a.editedFeatureResults.push({layerId:t.id,editedFeatures:{adds:e?.map((t=>this._createEditedFeature(t,o)))||[],updates:r?.map((t=>({original:this._createEditedFeature(t[0],o),current:this._createEditedFeature(t[1],o)})))||[],deletes:s?.map((t=>this._createEditedFeature(t,o)))||[],spatialReference:o}})}}return a}_createEditedFeature(t,e){return new n.Z({attributes:t.attributes,geometry:(0,_.im)({...t.geometry,spatialReference:e})})}_createFeatureEditResult(t){const e=!0===t.success?null:t.error||{code:void 0,description:void 0};return{objectId:t.objectId,globalId:t.globalId,error:e?new i.Z("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}_createAttachmentErrorResult(t,e){const r=e.details.messages&&e.details.messages[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new i.Z("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{parsedUrl:e,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...t,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...e.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}};(0,s._)([(0,f.Cb)()],ut.prototype,"type",void 0),(0,s._)([(0,f.Cb)({constructOnly:!0})],ut.prototype,"layer",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],ut.prototype,"queryTask",null),ut=(0,s._)([(0,m.j)("esri.layers.graphics.sources.FeatureLayerSource")],ut);const dt=ut},25278:(t,e,r)=>{r.d(e,{Dm:()=>l,Hq:()=>c,MS:()=>p,bU:()=>i});var s=r(80442),n=r(22974),o=r(61159),a=r(58333);function i(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.I4:"esriGeometryPolyline"===t?a.ET:a.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function l(t,e){if((0,s.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this.${e} = null;`;for(const e in t)r+=`this${u.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function c(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(t)}}]}function p(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},41818:(t,e,r)=>{r.d(e,{P:()=>a});var s=r(11282),n=r(34599),o=r(57444);async function a(t,e,r){const a=(0,s.en)(t);return(0,n.executeQueryForCount)(a,o.Z.from(e),{...r}).then((t=>t.data.count))}},5396:(t,e,r)=>{r.d(e,{G:()=>a});var s=r(11282),n=r(34599),o=r(57444);async function a(t,e,r){const a=(0,s.en)(t);return(0,n.executeQueryForIds)(a,o.Z.from(e),{...r}).then((t=>t.data.objectIds))}},4967:(t,e,r)=>{r.d(e,{F:()=>u,e:()=>i});var s=r(11282),n=r(34599),o=r(74889),a=r(57444);async function i(t,e,r){const s=await u(t,e,r);return o.default.fromJSON(s)}async function u(t,e,r){const o=(0,s.en)(t),i={...r},u=a.Z.from(e),{data:d}=await(0,n.executeQuery)(o,u,u.sourceSpatialReference,i);return d}},98326:(t,e,r)=>{r.d(e,{Z:()=>c});var s,n=r(43697),o=r(96674),a=r(5600),i=(r(67676),r(80442),r(75215)),u=r(52011);const d={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let l=s=class extends o.wq{constructor(t){super(t),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:t}=this,e=function(t){const{exifInfo:e,exifName:r,tagName:s}=t;if(!e||!r||!s)return null;const n=e.find((t=>t.name===r));return n?function(t){const{tagName:e,tags:r}=t;if(!r||!e)return null;const s=r.find((t=>t.name===e));return s&&s.value||null}({tagName:s,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:t});return d[e]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,a.Cb)({type:String})],l.prototype,"contentType",void 0),(0,n._)([(0,a.Cb)()],l.prototype,"exifInfo",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],l.prototype,"orientationInfo",null),(0,n._)([(0,a.Cb)({type:i.z8})],l.prototype,"id",void 0),(0,n._)([(0,a.Cb)({type:String})],l.prototype,"globalId",void 0),(0,n._)([(0,a.Cb)({type:String})],l.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:String})],l.prototype,"name",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],l.prototype,"parentGlobalId",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],l.prototype,"parentObjectId",void 0),(0,n._)([(0,a.Cb)({type:i.z8})],l.prototype,"size",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],l.prototype,"url",void 0),l=s=(0,n._)([(0,u.j)("esri.layers.support.AttachmentInfo")],l);const c=l},11282:(t,e,r)=>{r.d(e,{cv:()=>i,en:()=>a,lA:()=>o});var s=r(22974),n=r(17452);function o(t,e){return e?{...e,query:{...t,...e.query}}:{query:t}}function a(t){return"string"==typeof t?(0,n.mN)(t):(0,s.d9)(t)}function i(t,e,r){const s={};for(const n in t){if("declaredClass"===n)continue;const o=t[n];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){s[n]=[];for(let t=0;t<o.length;t++)s[n][t]=i(o[t])}else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r&&r[n]);s[n]=e?t:JSON.stringify(t)}else s[n]=e?o:JSON.stringify(o);else s[n]=o}return s}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7277],{7277:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>z});var _,i=s(17452),n=s(95330),r=s(94139);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(_||(_={}));class E{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=E.HEADER_SIZE,this._length+=E.CHUNK_HEADER_SIZE;const s=this._textToArrayBuffer(e);if(this._length+=this._alignTo(s.byteLength,4),t&&(this._length+=E.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,_.JSON,32);t&&this._writeChunk(t,i,_.BIN)}_writeHeader(){this._outView.setUint32(0,E.MAGIC,!0),this._outView.setUint32(4,E.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,_=0){const i=this._alignTo(e.byteLength,4);for(this._outView.setUint32(t,i,!0),this._outView.setUint32(t+=4,s,!0),this._writeArrayBuffer(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)_&&this._outView.setUint8(t,_),t++;return t}_writeArrayBuffer(e,t,s,_,i){new Uint8Array(e,s,i).set(new Uint8Array(t,_,i),0)}_textToArrayBuffer(e){return(new TextEncoder).encode(e).buffer}_alignTo(e,t){return t*Math.ceil(e/t)}}E.HEADER_SIZE=12,E.CHUNK_HEADER_SIZE=8,E.MAGIC=1179937895,E.VERSION=2;var a,T,R,o,A,c,N,h=s(30175),f=s(70586),u=s(51305),S=s(94961),C=s(17896),O=s(65617),I=s(60746),l=s(66459);!function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(T||(T={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(R||(R={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(o||(o={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(c||(c={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(N||(N={}));var L=s(35371);class d{constructor(e,t,s,_,i){this._buffer=e,this._componentType=s,this._dataType=_,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:i};const n=this._getElementSize();n>=4&&i!==R.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=n),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,_=this._accessorMin[s];this._accessorMin[s]="number"!=typeof _?e:Math.min(_,e);const i=this._accessorMax[s];this._accessorMax[s]="number"!=typeof i?e:Math.max(i,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return e=this.dataSize,4*Math.ceil(e/4);var e}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case L.g.BYTE:return new Int8Array(e,t);case L.g.FLOAT:return new Float32Array(e,t);case L.g.SHORT:return new Int16Array(e,t);case L.g.UNSIGNED_BYTE:return new Uint8Array(e,t);case L.g.UNSIGNED_INT:return new Uint32Array(e,t);case L.g.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise})),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const _={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case L.g.UNSIGNED_BYTE:case L.g.UNSIGNED_SHORT:_.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,_}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise((e=>this._finalizedPromiseResolve=e))}finalize(){const e=this._bufferView;return new Promise((e=>{const t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),e((0,n.as)(t))})).then((()=>{this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}))}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case L.g.BYTE:case L.g.UNSIGNED_BYTE:return 1;case L.g.SHORT:case L.g.UNSIGNED_SHORT:return 2;case L.g.UNSIGNED_INT:case L.g.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case o.SCALAR:return 1;case o.VEC2:return 2;case o.VEC3:return 3;case o.VEC4:case o.MAT2:return 4;case o.MAT3:return 9;case o.MAT4:return 16}}}class M{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const _=new d(this,this._gltf,e,t,s);return this._bufferViews.push(_),_}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=new Promise((e=>{e((0,n.as)(this.getViewFinalizePromises()))})).then((()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e})),this._gltf.extras?.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function D(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&B(s,t)}function B(e,t){(0,f.Wi)(t.normal)&&(t.normal=new Float32Array(t.position.length));const s=e.faces,{position:_,normal:i}=t,n=s.length/3;for(let e=0;e<n;++e){const t=3*s[3*e+0],n=3*s[3*e+1],r=3*s[3*e+2],E=(0,C.s)(P,_[t+0],_[t+1],_[t+2]),a=(0,C.s)(U,_[n+0],_[n+1],_[n+2]),T=(0,C.s)(p,_[r+0],_[r+1],_[r+2]),R=(0,C.b)(a,a,E),o=(0,C.b)(T,T,E),A=(0,C.f)(R,R,o);i[t+0]+=A[0],i[t+1]+=A[1],i[t+2]+=A[2],i[n+0]+=A[0],i[n+1]+=A[1],i[n+2]+=A[2],i[r+0]+=A[0],i[r+1]+=A[1],i[r+2]+=A[2]}for(let e=0;e<i.length;e+=3)(0,C.s)(G,i[e],i[e+1],i[e+2]),(0,C.n)(G,G),i[e+0]=G[0],i[e+1]=G[1],i[e+2]=G[2]}const P=(0,O.c)(),U=(0,O.c)(),p=(0,O.c)(),G=(0,O.c)();s(80442);var g=s(20102);async function m(e){const t=F(e);if((0,f.Wi)(t))throw new g.Z("imageToArrayBuffer","Unsupported image type");const s=await async function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,i.HK)(t)){const e=(0,i.sJ)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),_=await new Promise((e=>t.toBlob(e,s)));if(!_)throw new g.Z("imageToArrayBuffer","Failed to encode image");return{data:await _.arrayBuffer(),type:s}}function F(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}class w{constructor(e,t,s){this.params={},this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.options.bufferOutputType===a.GLB||t.options.imageOutputType===T.GLB;s&&(t.binChunkBuffer=new M(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]);const s=this._addNode(e);t.nodes.push(s)})),this.gltf.scenes.push(t)}_addNode(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,C.k)(s,O.Z)||(t.translation=(0,O.a)(s));const _=e.rotation;(0,u.j)(_,S.I)||(t.rotation=(0,S.b)(_));const i=e.scale;(0,C.k)(i,O.O)||(t.scale=(0,O.a)(i)),e.mesh&&e.mesh.vertexAttributes.position?t.mesh=this._addMesh(e.mesh):e.forEachNode((e=>{t.children||(t.children=[]);const s=this._addNode(e);t.children.push(s)}));const n=this.gltf.nodes.length;return this.gltf.nodes.push(t),n}_addMesh(e){this.gltf.meshes||(this.gltf.meshes=[]);const t={primitives:[]},s=this.gltf.extras,_=s.options.bufferOutputType===a.GLB;let i;i=_?s.binChunkBuffer:new M(this.gltf),this.params.origin||(this.params.origin=function(e){if((0,f.pC)(e.transform))return e.transform.getOriginPoint(e.spatialReference);const t=e.extent.xmax-e.extent.width/2,s=e.extent.ymax-e.extent.height/2,_=e.extent.zmin;return new r.Z({x:t,y:s,z:_,spatialReference:e.extent.spatialReference})}(e));const n=(0,l.Yq)(e.vertexAttributes,e.transform,this.params.origin,{geographic:this.params.geographic,unit:"meters"});D(e,n),this._flipYZAxis(n);const E=i.addBufferView(L.g.FLOAT,o.VEC3,R.ARRAY_BUFFER);let T,A,c,N;n.normal&&(T=i.addBufferView(L.g.FLOAT,o.VEC3,R.ARRAY_BUFFER)),e.vertexAttributes.uv&&(A=i.addBufferView(L.g.FLOAT,o.VEC2,R.ARRAY_BUFFER)),n.tangent&&(c=i.addBufferView(L.g.FLOAT,o.VEC4,R.ARRAY_BUFFER)),e.vertexAttributes.color&&(N=i.addBufferView(L.g.UNSIGNED_BYTE,o.VEC4,R.ARRAY_BUFFER)),E.startAccessor("POSITION"),T&&T.startAccessor("NORMAL"),A&&A.startAccessor("TEXCOORD_0"),c&&c.startAccessor("TANGENT"),N&&N.startAccessor("COLOR_0");const h=n.position.length/3,{position:u,normal:S,tangent:C}=n,{color:O,uv:I}=e.vertexAttributes;for(let e=0;e<h;++e)E.push(u[3*e+0]),E.push(u[3*e+1]),E.push(u[3*e+2]),T&&(0,f.pC)(S)&&(T.push(S[3*e+0]),T.push(S[3*e+1]),T.push(S[3*e+2])),A&&(0,f.pC)(I)&&(A.push(I[2*e+0]),A.push(I[2*e+1])),c&&(0,f.pC)(C)&&(c.push(C[4*e+0]),c.push(C[4*e+1]),c.push(C[4*e+2]),c.push(C[4*e+3])),N&&(0,f.pC)(O)&&(N.push(O[4*e+0]),N.push(O[4*e+1]),N.push(O[4*e+2]),N.push(O[4*e+3]));const d=E.endAccessor(),B=this._addAccessor(E.index,d);let P,U,p,G,g;if(T){const e=T.endAccessor();P=this._addAccessor(T.index,e)}if(A){const e=A.endAccessor();U=this._addAccessor(A.index,e)}if(c){const e=c.endAccessor();p=this._addAccessor(c.index,e)}if(N){const e=N.endAccessor();G=this._addAccessor(N.index,e)}e.components&&e.components.length>0&&e.components[0].faces?(g=i.addBufferView(L.g.UNSIGNED_INT,o.SCALAR,R.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(g,e.components,t,B,P,U,p,G)):this._addMeshVertexNonIndexed(e.components,t,B,P,U,p,G),E.finalize(),T&&T.finalize(),A&&A.finalize(),c&&c.finalize(),g&&g.finalize(),N&&N.finalize(),_||i.finalize();const m=this.gltf.meshes.length;return this.gltf.meshes.push(t),m}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(e,t){if(!(0,f.Wi)(e))for(let s=1,_=2;s<e.length;s+=t,_+=t){const t=e[s],i=e[_];e[s]=i,e[_]=-t}}_addMaterial(e){if(null===e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=c.MASK;break;case"auto":case"blend":s.alphaMode=c.BLEND}.5!==e.alphaCutoff&&(s.alphaCutoff=e.alphaCutoff),e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const _=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=_(t[0]/255),t[1]=_(t[1]/255),t[2]=_(t[2]/255),t};if((0,f.pC)(e.color)&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),(0,f.pC)(e.colorTexture)&&(s.pbrMetallicRoughness.baseColorTexture={index:this._addTexture(e.colorTexture)}),(0,f.pC)(e.normalTexture)&&(s.normalTexture={index:this._addTexture(e.normalTexture)}),e instanceof I.Z){if((0,f.pC)(e.emissiveTexture)&&(s.emissiveTexture={index:this._addTexture(e.emissiveTexture)}),(0,f.pC)(e.emissiveColor)){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}(0,f.pC)(e.occlusionTexture)&&(s.occlusionTexture={index:this._addTexture(e.occlusionTexture)}),(0,f.pC)(e.metallicRoughnessTexture)&&(s.pbrMetallicRoughness.metallicRoughnessTexture={index:this._addTexture(e.metallicRoughnessTexture)}),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1;const n=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),n}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,h.s1)(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},_=t.length;return t.push(s),_}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const _=this.gltf.extras;switch(_.options.imageOutputType){case T.GLB:{const e=_.binChunkBuffer.addBufferView(L.g.UNSIGNED_BYTE,o.SCALAR),i=m(t).then((({data:e,type:t})=>(s.mimeType=t,e)));e.writeAsync(i).then((()=>{e.finalize()})),s.bufferView=e.index;break}case T.DataURI:s.uri=function(e){const t=F(e);return(0,f.pC)(t)?t.toDataURL():""}(t);break;default:_.promises.push(m(t).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const _=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,_),_}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=L.e8.REPEAT,s=L.e8.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=L.e8.CLAMP_TO_EDGE,s=L.e8.CLAMP_TO_EDGE;break;case"mirror":t=L.e8.MIRRORED_REPEAT,s=L.e8.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=L.e8.CLAMP_TO_EDGE;break;case"mirror":s=L.e8.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=L.e8.CLAMP_TO_EDGE;break;case"mirror":t=L.e8.MIRRORED_REPEAT}}const _={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(_)===JSON.stringify(this.gltf.samplers[e]))return e;const i=this.gltf.samplers.length;return this.gltf.samplers.push(_),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const _=this.gltf.accessors.length;return this.gltf.accessors.push(s),_}_addMeshVertexIndexed(e,t,s,_,i,n,r,E){for(const a of t){e.startAccessor("INDICES");for(let t=0;t<a.faces.length;++t)e.push(a.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:_},indices:this._addAccessor(e.index,t),material:this._addMaterial(a.material)};i&&"flat"!==a.shading&&(T.attributes.NORMAL=i),n&&(T.attributes.TEXCOORD_0=n),r&&"flat"!==a.shading&&(T.attributes.TANGENT=r),E&&(T.attributes.COLOR_0=E),s.primitives.push(T)}}_addMeshVertexNonIndexed(e,t,s,_,i,n,r){const E={attributes:{POSITION:s}};_&&(E.attributes.NORMAL=_),i&&(E.attributes.TEXCOORD_0=i),n&&(E.attributes.TANGENT=n),r&&(E.attributes.COLOR_0=r),e&&(E.material=this._addMaterial(e[0].material)),t.primitives.push(E)}}var b=s(67676);class y{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,b.Od)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class H{constructor(e){this.mesh=e,this.name="",this.translation=(0,O.c)(),this.rotation=(0,S.a)(),this.scale=(0,O.a)(O.O),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,u.k)(this.rotation,e[0],e[1],e[2])}}const x="model.glb";class V{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}class Y{constructor(e,t){this._file={type:"model/gltf-binary",data:e},this.origin=t}buffer(){return Promise.resolve(this._file)}download(e){(0,i.io)(new Blob([this._file.data],{type:this._file.type}),e)}}function z(e,t){const s=new y,_=new V;return s.addScene(_),_.addNode(new H(e)),function(e,t){return function(e,t,s){const _=new w(e,t=t||{},s);let i=_.params;i?i.origin||(i.origin=new r.Z({x:-1,y:-1,z:-1})):i={origin:new r.Z({x:-1,y:-1,z:-1})};const R=i.origin,o=_.gltf,A=o.extras?.promises??[];let c=1,N=1,h=null;return(0,n.as)(A).then((()=>{const e={origin:R};delete o.extras;const s="number"==typeof t.jsonSpacing?t.jsonSpacing:4,_=JSON.stringify(o,((s,_)=>{if("extras"!==s){if(_ instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(_))switch(t.imageOutputType){case T.DataURI:case T.GLB:break;case T.External:default:{const t=`img${N}.png`;return N++,e[t]=_,t}}switch(t.bufferOutputType){case a.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(_);case a.GLB:if(h)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(h=_);case a.External:default:{const t=`data${c}.bin`;return c++,e[t]=_,t}}}return _}}),s);return t.bufferOutputType===a.GLB||t.imageOutputType===T.GLB?e[x]=new E(_,h).buffer:e["model.gltf"]=_,e}))}(e,{bufferOutputType:a.GLB,imageOutputType:T.GLB,jsonSpacing:0},t)}(s,t).then((e=>new Y(e[x],e.origin)))}},35371:(e,t,s)=>{var _,i,n,r,E,a,T,R,o,A,c,N,h,f,u,S,C,O,I,l,L,d,M,D;s.d(t,{Br:()=>S,LR:()=>a,Lm:()=>L,Lu:()=>B,MX:()=>i,No:()=>h,OU:()=>d,Tg:()=>C,VI:()=>f,VY:()=>D,Wf:()=>T,_g:()=>M,cw:()=>c,db:()=>r,e8:()=>N,g:()=>R,l1:()=>O,lP:()=>u,q_:()=>P,qi:()=>l,w0:()=>E,wb:()=>o,xS:()=>A,zi:()=>n}),function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(_||(_={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(i||(i={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(n||(n={})),function(e){e[e.ADD=32774]="ADD",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(r||(r={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER"}(E||(E={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(T||(T={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT"}(R||(R={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(o||(o={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(A||(A={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(N||(N={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(h||(h={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(f||(f={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(u||(u={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(S||(S={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(C||(C={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(O||(O={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(I||(I={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(l||(l={})),function(e){e[e.TEXTURE=0]="TEXTURE",e[e.RENDER_BUFFER=1]="RENDER_BUFFER",e[e.CUBEMAP=2]="CUBEMAP"}(L||(L={})),function(e){e[e.NONE=0]="NONE",e[e.DEPTH_RENDER_BUFFER=1]="DEPTH_RENDER_BUFFER",e[e.STENCIL_RENDER_BUFFER=2]="STENCIL_RENDER_BUFFER",e[e.DEPTH_STENCIL_RENDER_BUFFER=3]="DEPTH_STENCIL_RENDER_BUFFER",e[e.DEPTH_STENCIL_TEXTURE=4]="DEPTH_STENCIL_TEXTURE"}(d||(d={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.Sync=7]="Sync",e[e.COUNT=8]="COUNT"}(M||(M={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(D||(D={}));const B=33306;var P,U,p,G,g,m,F;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(P||(P={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(U||(U={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(p||(p={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(G||(G={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(g||(g={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(m||(m={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(F||(F={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6920],{53073:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(75148),s=n(91136),a=n(90961),i=n(90658),l=n(8667);class o extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===i.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?i.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(null===e.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const t=(0,i.SV)(this._relationGeom),n=(0,i.SV)(e.geometry);return(0,l.kK)(t,n)}case"esriSpatialRelIntersects":return(0,l.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,l.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,l.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,l.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,l.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,l.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,l.LV)(this._relationGeom,e.geometry,this._relationString)}}async _fetchAndRefineFeatures(e,t,n){const r=new a.Z([],e,!1,null),s=Math.min(t,e.length);await this._parent._getFeatures(r,-1,s,n),this._checkCancelled(n);const l=[];for(let t=0;t<s;t++){const n=this._parent._featureFromCache(e[t]);l.push(await this.executeSpatialRelationTest(n))}for(let n=0;n<t;n++)!0===l[n]?this._idstates[e[n]]=i.dj.InFeatureSet:this._idstates[e[n]]=i.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,n,r,s){await this._ensureLoaded();const i=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,s);let l;return this._checkCancelled(s),l=null!==t?new a.Z(i._candidates.slice(0).concat(i._known.slice(0)),[],i._ordered,this._clonePageDefinition(i.pagesDefinition)):new a.Z(i._candidates.slice(0),i._known.slice(0),i._ordered,this._clonePageDefinition(i.pagesDefinition)),l}async _stat(e,t,n,r,s,a,i){if(""!==n)return{calculated:!1};const l=await this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i);return!1===l.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:l}async _canDoAggregates(e,t,n,r,s){return""===n&&null===r&&null!==this._parent&&this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(91136),s=n(90961),a=n(90658);class i extends r.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=a.Bj.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return a.dj.NotInFeatureSet}async _getFeature(){throw new Error("No Feature Found in EmptySet")}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new Error("Fetch and Refine should not be called in this featureset")}async _getFilteredSet(){return new s.Z([],[],!1,null)}_stat(e,t,n,r,s,a,i){return this._manualStat(e,t,a,i)}async _canDoAggregates(){return!1}}},91136:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(48039);class s{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise(((r,s)=>{this._parent._getSet(this._progress).then((a=>{let i=a._known.length-1;if("GETPAGES"===a._known[a._known.length-1]&&(i-=1),this._lastId+e>i&&a._known.length>0&&"GETPAGES"===a._known[a._known.length-1])this._parent._expandPagedSet(a,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}));else{if(i>=this._lastId+e||0===a._candidates.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=a._known.length)break;n[t]=a._known[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}this._parent._refineSetBlock(a,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise(((t,n)=>{this._parent._getSet(this._progress).then((r=>{this._lastId<r._known.length-1?"GETPAGES"===r._known[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,r._known[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(-1!==this._parent._totalCount)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if("GETPAGES"===e._known[e._candidates.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}var a=n(90961),i=n(90658),l=n(95002),o=n(95330),u=n(41534),c=n(8667),h=n(82971),d=n(99514);class _{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=i.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return!0===this._parent.loaded?(this._initialiseFeatureSet(),this):(await this._parent.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=i.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new d.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!==e&&e.aborted)throw new Error("Operation has been cancelled.")}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,s){return null!==this._parent&&this._parent._canDoAggregates(e,t,n,r,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i)}async _getAgregagtePhysicalPage(e,t,n){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===i.Bj.NotEvaluated){if(null!==r.Z.applicationCache){const e=r.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==r.Z.applicationCache&&r.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==r.Z.applicationCache&&r.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:i.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:i.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:i.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.testwhere))return t.thetype;return i.Bj.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new Error("Not Implemented")}isTable(){return this._parent.isTable()}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return i.dj.Unknown}_getSet(e){throw new Error("Not implemented in abstract class")}async _getFeature(e,t,n){if(this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);throw new Error("Feature Not Found")}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new a.Z([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,s){throw new Error("Not implemented in abstract class")}async _refineSetBlock(e,t,n){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let s=r-e._candidates.length;if(0===e._candidates.length)return e;if(s>=t)return e;if(await this._refineIfParentKnown(e,t-s,n),this._checkCancelled(n),this._refineKnowns(e,t-s),s=r-e._candidates.length,s<t&&e._candidates.length>0){const r=t-s,a=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(a,a.length>r?r:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-s),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const s=[];t=this._maxQueryRate();for(let a=0;a<e._candidates.length&&"GETPAGES"!==e._candidates[a];a++){let l=!1;const o=this._candidateIdTransform(e._candidates[a]);o!==e._candidates[a]&&(l=!0);const u=this._isInFeatureSet(o);if(u===i.dj.InFeatureSet)!0===l?e._known.includes(o)||(e._known.push(o),n+=1):(e._known.push(e._candidates[a]),n+=1),null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a});else if(u===i.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),n+=1;else if(u===i.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1)}_refineIfParentKnown(e,t,n){const r=new a.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}async _expandPagedSet(e,t,n,r,s){if(null===this._parent)throw new Error("Parent Paging not implemented");return this._parent._expandPagedSet(e,t,n,r,s)}async _expandPagedSetFeatureSet(e,t,n,r,s){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(r=1),0===r&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(r=2),0===r)return"finished";const a=await this._getPage(e,r,s);return n+a<t?this._expandPagedSet(e,t,n+a,0,s):"success"}async _getPage(e,t,n){const r=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){r.length=r.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&r.push("GETPAGES"),t}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let s=await this._stat(e,t,"",null,null,n,r);return!1===s.calculated&&(s=await this._manualStat(e,t,n,r)),s.result}async _manualStat(e,t,n,r){let s=null;switch(e.toLowerCase()){case"count":return s=await(0,l.QX)(this,r),{calculated:!0,result:s};case"distinct":return s=await(0,l.EB)(this,t,n),{calculated:!0,result:s};case"avg":case"mean":return s=await(0,l.J6)(this,t,r),{calculated:!0,result:s};case"stdev":return s=await(0,l.m)(this,t,r),{calculated:!0,result:s};case"variance":return s=await(0,l.CA)(this,t,r),{calculated:!0,result:s};case"sum":return s=await(0,l.Sm)(this,t,r),{calculated:!0,result:s};case"min":return s=await(0,l.VV)(this,t,r),{calculated:!0,result:s};case"max":return s=await(0,l.Fp)(this,t,r),{calculated:!0,result:s};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,s,a,i){const l=await this._parent._stat(e,t,n,r,s,a,i);return!1===l.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:l}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return new Promise(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((s=>{try{null!==s&&null!==s.geometry&&e.push(s.geometry),e.length>30||null===s&&e.length>1?(0,c.G0)(e).then((a=>{try{null===s?n(a):(e=[a],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===s?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new s(this,e)}intersection(e,t=!1){return _._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return _._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return _._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return _._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return _._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return _._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return _._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return _._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return _._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return _._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return _._featuresetFunctions.relate.bind(this)(e,t)}within(e){return _._featuresetFunctions.within.bind(this)(e)}touches(e){return _._featuresetFunctions.touches.bind(this)(e)}top(e){return _._featuresetFunctions.top.bind(this)(e)}crosses(e){return _._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return _._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return _._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return _._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return _._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return _._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise(((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)}))}_reduceImpl(e,t,n,r,s,a,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._reduceImpl(e,t,n,r,s,a,i)}));e.next().then((l=>{try{if(null===l)s(n);else{const u=t(n,l,r,this);(0,o.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,r+1,s,a,i)}),a):this._reduceImpl(e,t,u,r+1,s,a,i)}}catch(e){a(e)}}),a)}catch(e){a(e)}}removeField(e){return _._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return _._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,i.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.Y4)(n.geometry,r).then((t=>e+t)):(0,c.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,i.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.kQ)(n.geometry,r).then((t=>e+t)):(0,c.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}async distinct(e,t=1e3,n=null,r){await this.load();const s=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",u.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))}_defaultTracker(e){return e||{aborted:!1}}forEach(e,t){return new Promise(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,r,s,a){try{if(++a>1e3)return void setTimeout((()=>{a=0,this._forEachImpl(e,t,n,r,s,a)}),0);e.next().then((i=>{try{if(null===i)r(n);else{const l=t(i);null==l?this._forEachImpl(e,t,n,r,s,a):(0,o.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,r,s,a)}catch(e){s(e)}}),s):this._forEachImpl(e,t,n,r,s,a)}}catch(e){s(e)}}),s)}catch(e){s(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,i.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,i.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===i.q2[this.geometryType]?"":i.q2[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];await this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t);const n=this.schema();return n.features=e,n.spatialReference=this.spatialReference.toJSON(),JSON.stringify(n)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const n=[];await this.reduce(((e,r)=>{const s={geometry:r.geometry?!0===t?.keepGeometryType?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType&&delete s.geometry.spatialReference,n.push(s),1}),0,e);const r=this.schema();return r.features=n,r.spatialReference=!0===t?.keepGeometryType?this.spatialReference:this.spatialReference.toJSON(),r}}_._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._candidates=null,this._known=null,this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>u,DT:()=>f,TE:()=>b,XF:()=>l,bB:()=>o,fz:()=>h,hq:()=>y,oX:()=>d,vR:()=>_,y5:()=>w,zR:()=>i});var r=n(90658),s=n(41534),a=n(17126);function i(e,t){return c(e.parseTree,t,e.parameters)}function l(e,t,n){return c(e,t,n)}function o(e,t,n,a){return s.WhereClause.create(c(e.parseTree,r.Bj.Standardised,e.parameters,t,n),a)}function u(e,t,n="AND"){return s.WhereClause.create("(("+i(e,r.Bj.Standardised)+")"+n+"("+i(t,r.Bj.Standardised)+"))",e.fieldsIndex)}function c(e,t,n,r=null,s=null){let a,i,l,o;switch(e.type){case"interval":return b(c(e.value,t,n,r,s),e.qualifier,e.op);case"case-expression":{let a=" CASE ";"simple"===e.format&&(a+=c(e.operand,t,n,r,s));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+c(e.clauses[i].operand,t,n,r,s)+" THEN "+c(e.clauses[i].value,t,n,r,s);return null!==e.else&&(a+=" ELSE "+c(e.else,t,n,r,s)),a+=" END ",a}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return d(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replace(/'/g,"''")+"'"):r[n]instanceof Date?e.push(d(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expression-list":i=[];for(const a of e.value)i.push(c(a,t,n,r,s));return i;case"unary-expression":return" ( NOT "+c(e.expr,t,n,r,s)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+c(e.left,t,n,r,s)+" AND "+c(e.right,t,n,r,s)+") ";case"OR":return" ("+c(e.left,t,n,r,s)+" OR "+c(e.right,t,n,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NOT NULL )";case"IN":return a=[],"expression-list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" IN ("+a.join(",")+")) "):(o=c(e.right,t,n,r,s),o instanceof Array?" ("+c(e.left,t,n,r,s)+" IN ("+o.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" IN ("+o+")) ");case"NOT IN":return a=[],"expression-list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT IN ("+a.join(",")+")) "):(o=c(e.right,t,n,r,s),o instanceof Array?" ("+c(e.left,t,n,r,s)+" NOT IN ("+o.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" NOT IN ("+o+")) ");case"BETWEEN":return l=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+c(e.left,t,n,r,s)+" "+e.operator+" "+c(e.right,t,n,r,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return d(e.value,t);case"number":return e.value.toString();case"current-time":return _("date"===e.mode,t);case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"function":{const a=c(e.args,t,n,r,s);return h(e.name,a,t)}}throw new Error("Unsupported sql syntax "+e.type)}function h(e,t,n){switch(e.toLowerCase().trim()){case"abs":if(1!==t.length)throw new Error("Invalid Parameter for call to ABS");return"abs("+t[0]+")";case"ceiling":case"ceil":if(1!==t.length)throw new Error("Invalid Parameter for call to CEILING");switch(n){case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"floor":if(1!==t.length)throw new Error("Invalid Parameter for call to Floor");return"FLOOR("+t[0]+")";case"log":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG");return"LOG("+t[0]+")";case"log10":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG10");return"LOG10("+t[0]+")";case"power":if(2!==t.length)throw new Error("Invalid Parameter for call to POWER");return"POWER("+t[0]+","+t[1]+")";case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new Error("Invalid Parameter for call to ROUND");case"truncate":if(t.length<1||t.length>2)throw new Error("Invalid Parameter for TRUNCATE function");return n===r.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new Error("Invalid Parameter for CHAR_LENGTH function");switch(n){case r.Bj.SqlServer:return"LEN("+t[0]+")";case r.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"concat":if(t.length<1)throw new Error("Invalid Parameter for CONCAT function");{let e="CONCAT(";for(let n=0;n<t.length;n++)0!==n&&(e+=","),e+=t[n];return e+=")",e}case"lower":case"lcase":if(1!==t.length)throw new Error("Invalid Parameter for Lower function");return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new Error("Invalid Parameter for Upper function");return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case r.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case r.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replace(/\'/g,"")+" FROM "+t[1]+")"}throw new Error("Function Not Recognised")}function d(e,t){const n=e instanceof Date?a.ou.fromJSDate(e):a.ou.fromSQL(e),s=0===n.hour&&0===n.minute&&0===n.second&&0===n.millisecond;switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:return s?`date '${n.toFormat("yyyy-LL-dd")}'`:`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.Oracle:return s?`TO_DATE('${n.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${n.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case r.Bj.SqlServer:return`'${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.PGDB:return`#${n.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case r.Bj.Postgres:return`TIMESTAMP '${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function _(e,t){switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:case r.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case r.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case r.Bj.PGDB:case r.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function f(e,t,n={}){const r={},s={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",string:"string"};for(const e of t){const t=a[e.type];r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=a[n[e]];s[e.toLowerCase()]=void 0===t?"":t}switch(p(r,e.parseTree,e.parameters,s)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string"}return""}function p(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case-expression":{const s=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)s.push(p(e,t.clauses[a].value,n,r));null!==t.else&&s.push(p(e,t.else,n,r))}else{for(let a=0;a<t.clauses.length;a++)s.push(p(e,t.else,n,r));null!==t.else&&s.push(p(e,t.else,n,r))}return m(s)}case"parameter":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if(e instanceof Date)return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const s=[];for(const a of t.value)s.push(p(e,a,n,r));return s}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new Error("Unsupported RHS for IS");return"boolean";case"*":case"-":case"+":case"/":return m([p(e,t.left,n,r),p(e,t.right,n,r)]);default:throw new Error("Not Supported Operator "+t.operator)}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current-time":return"date";case"column-reference":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"position":case"extract":case"char_length":return"integer";case"round":return s=p(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s;case"sign":return s=p(e,t.args,n,r),s instanceof Array&&(s=m(s)),"integer"===s||"double"===s?s:"double";case"ceiling":case"floor":case"abs":{const s=p(e,t.args,n,r);return s instanceof Array?m(s):s}case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"power":case"truncate":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string"}return""}throw new Error("Unsupported sql syntax "+t.type)}const g={boolean:1,string:2,integer:3,double:4,date:5};function m(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||g[t]<g[n]?n:t);return t}return""}function y(e,t){return S(e.parseTree,t)}function w(e){return"column-reference"===e.parseTree.type}function S(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return S(e.operand,t)||S(e.value,t);case"case-expression":for(const n of e.clauses)if(S(n,t))return!0;return!("simple"!==e.format||!S(e.operand,t))||!(null===e.else||!S(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"string":case"number":return!1;case"expression-list":for(const n of e.value)if(S(n,t))return!0;return!1;case"unary-expression":return S(e.expr,t);case"binary-expression":return S(e.left,t)||S(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return S(e.args,t)}return!1}function I(e){let t="";return t+=e.period.toUpperCase(),t}function b(e,t,n){let r="";return r="interval-period"===t.type?I(t):I(t.start)+" TO "+I(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{CA:()=>f,EB:()=>w,Fp:()=>d,J6:()=>_,QX:()=>m,Sm:()=>g,VV:()=>h,g3:()=>u,m:()=>p,tj:()=>c});var r=n(90658),s=n(36515);function a(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function i(e){const t=a(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function l(e){const t=a(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function u(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function c(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],s={},a=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,r.hj)(t)||(0,r.HD)(t))void 0===s[t]&&(n.push(t),s[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,r.tt)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return a(t);case"min":return Math.min.apply(Math,t);case"sum":return o(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(i(t));case"var":case"variance":return i(t);case"count":return t.length}return 0}async function h(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.min.apply(Math,r)}async function d(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.max.apply(Math,r)}async function _(e,t,n){let r="";!1===(0,s.y5)(t)&&(r=(0,s.DT)(t,e.fields,null));const i=await y(e,t,n,!0);if(0===i.length)return null;const l=a(i);return null===l?l:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(l):l}async function f(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:l(r)}async function p(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.sqrt(l(r))}async function g(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:o(r)}async function m(e,t){return e.iterator(t).count()}async function y(e,t,n,r=!1){const s=e.iterator(n),a=[],i={ticker:0};let l=await s.next();for(;null!==l;){if(i.ticker++,n.aborted)throw new Error("Cancelled");i.ticker%100==0&&(i.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t.calculateValue(l);null===e?!1===r&&(a[a.length]=e):a[a.length]=e,l=await s.next()}return a}async function w(e,t,n=1e3,r=null){const s=e.iterator(r),a=[],i={},l={ticker:0};let o=await s.next();for(;null!==o;){if(l.ticker++,r.aborted)throw new Error("Cancelled");l.ticker%100==0&&(l.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t.calculateValue(o);if(null!=e&&void 0===i[e]&&(a.push(e),i[e]=1),a.length>=n&&-1!==n)return a;o=await s.next()}return a}},64830:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(70586);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,r.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,r.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},80903:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(50758),s=n(92604),a=n(95330),i=n(64830),l=n(25045);class o{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const i=e=>{(0,a.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const o=e[s];(0,a.y8)(o)?this._clientPromises[s]=o.then((e=>(this._clients[s]=new l.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),i(n),this._clients[s])),(()=>(i(r),null))):(this._clients[s]=new l.default(o,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[s]=Promise.resolve(this._clients[s]),i(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const a=this._clientPromises[s];r[s]=a.then((r=>r?.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.deferred.reject((0,a.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0}invoke(e,t,n){let r;Array.isArray(n)?(s.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n;const i=(0,a.dD)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,deferred:i});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return i.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{s&&(t[r]=s.openPort()),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},8667:(e,t,n)=>{n.d(t,{CJ:()=>L,Cz:()=>k,D$:()=>x,ED:()=>w,G0:()=>P,Gg:()=>b,LV:()=>I,Nm:()=>S,Sp:()=>E,TE:()=>f,U1:()=>R,W4:()=>m,Y4:()=>B,cv:()=>D,e5:()=>T,f3:()=>C,fS:()=>p,j2:()=>N,jU:()=>_,kK:()=>g,kQ:()=>G,og:()=>F,oq:()=>c,r3:()=>d,rd:()=>A,sz:()=>O,uh:()=>y,wf:()=>v,z7:()=>h}),n(66577);var r=n(78346),s=(n(94139),n(33955));function a(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function l(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let o;async function u(e,t){return(await async function(){return o||(o=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),o}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function c(e,t){return l(await u("clip",[a(e),e,t]))}async function h(e,t){return l(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function _(e,t){return u("crosses",[a(e),e,t])}function f(e,t,n){return u("distance",[a(e),e,t,n])}function p(e,t){return u("equals",[a(e),e,t])}function g(e,t){return u("intersects",[a(e),e,t])}function m(e,t){return u("touches",[a(e),e,t])}function y(e,t){return u("within",[a(e),e,t])}function w(e,t){return u("disjoint",[a(e),e,t])}function S(e,t){return u("overlaps",[a(e),e,t])}function I(e,t,n){return u("relate",[a(e),e,t,n])}function b(e){return u("isSimple",[a(e),e])}async function F(e){return l(await u("simplify",[a(e),e]))}async function T(e,t){return l(await u("difference",[a(e),e,t]))}async function E(e,t){return l(await u("symmetricDifference",[a(e),e,t]))}async function v(e,t){return l(await u("intersect",[a(e),e,t]))}async function P(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return l(await u("union",[a(n),n]))}async function D(e,t,n,r,s,i){return l(await u("offset",[a(e),e,t,n,r,s,i]))}async function C(e,t,n,r=!1){const s=[a(e),e,t,n,r];return l(await u("buffer",s))}async function A(e,t,n,r,s,i){const o=[a(e),e,t,n,r,s,i];return l(await u("geodesicBuffer",o))}async function R(e,t,n){if(null==e)throw new j;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new j;const s=e.constructor.fromJSON(await u("rotate",[r,e,t,n]));return s.spatialReference=r,s}async function x(e,t,n,r){return l(await u("generalize",[a(e),e,t,n,r]))}async function k(e,t,n){return l(await u("densify",[a(e),e,t,n]))}async function N(e,t,n,r=0){return l(await u("geodesicDensify",[a(e),e,t,n,r]))}function L(e,t){return u("planarArea",[a(e),e,t])}function O(e,t){return u("planarLength",[a(e),e,t])}function B(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function G(e,t,n){return u("geodesicLength",[a(e),e,t,n])}class j extends Error{constructor(){super("Illegal Argument Exception")}}},94443:(e,t,n)=>{n.d(t,{ME:()=>_,Su:()=>f,tz:()=>d});var r=n(20102),s=n(95330),a=n(70171);const i=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function o(e){return l[e]??!1}const u=[],c=new Map;function h(e){for(const t of c.keys())p(e.pattern,t)&&c.delete(t)}function d(e){return u.includes(e)||(h(e),u.unshift(e)),{remove(){const t=u.indexOf(e);t>-1&&(u.splice(t,1),h(e))}}}async function _(e){const t=(0,a.Kd)();c.has(e)||c.set(e,async function(e,t){const n=[];for(const r of u)if(p(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=c.get(e);return n&&await g.add(n),n}function f(e){if(!i.test(e))return null;const t=i.exec(e);if(null===t)return null;const[,n,r]=t,s=n+(r?"-"+r.toUpperCase():"");return o(s)?s:o(n)?n:null}function p(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,a.Ze)((()=>{c.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},99514:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(35671);function s(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function a(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class i{constructor(e){if(this.fields=e,this._fieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;const t=[];for(const i of e){const e=i&&i.name;if(e){const o=l(e);this._fieldsMap.set(e,i),this._fieldsMap.set(o,i),t.push(o),"date"===(n=i).type||"esriFieldTypeDate"===n.type?(this.dateFields.push(i),this._dateFieldsSet.add(i)):(0,r.H7)(i)&&(this._numericFieldsSet.add(i),this.numericFields.push(i)),s(i)||a(i)||(i.editable=null==i.editable||!!i.editable,i.nullable=null==i.nullable||!!i.nullable)}}var n;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)s(e)||a(e)||e.nullable||void 0!==(0,r.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){return null!=e?this._fieldsMap.get(e)||this._fieldsMap.get(l(e)):void 0}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name}}function l(e){return e.toLowerCase().trim()}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6920],{53073:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(75148),s=n(91136),a=n(90961),i=n(90658),l=n(8667);class o extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===i.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?i.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(null===e.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const t=(0,i.SV)(this._relationGeom),n=(0,i.SV)(e.geometry);return(0,l.kK)(t,n)}case"esriSpatialRelIntersects":return(0,l.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,l.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,l.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,l.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,l.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,l.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,l.LV)(this._relationGeom,e.geometry,this._relationString)}}async _fetchAndRefineFeatures(e,t,n){const r=new a.Z([],e,!1,null),s=Math.min(t,e.length);await this._parent._getFeatures(r,-1,s,n),this._checkCancelled(n);const l=[];for(let t=0;t<s;t++){const n=this._parent._featureFromCache(e[t]);l.push(await this.executeSpatialRelationTest(n))}for(let n=0;n<t;n++)!0===l[n]?this._idstates[e[n]]=i.dj.InFeatureSet:this._idstates[e[n]]=i.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,n,r,s){await this._ensureLoaded();const i=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,s);let l;return this._checkCancelled(s),l=null!==t?new a.Z(i._candidates.slice(0).concat(i._known.slice(0)),[],i._ordered,this._clonePageDefinition(i.pagesDefinition)):new a.Z(i._candidates.slice(0),i._known.slice(0),i._ordered,this._clonePageDefinition(i.pagesDefinition)),l}async _stat(e,t,n,r,s,a,i){if(""!==n)return{calculated:!1};const l=await this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i);return!1===l.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:l}async _canDoAggregates(e,t,n,r,s){return""===n&&null===r&&null!==this._parent&&this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(91136),s=n(90961),a=n(90658);class i extends r.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=a.Bj.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return a.dj.NotInFeatureSet}async _getFeature(){throw new Error("No Feature Found in EmptySet")}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new Error("Fetch and Refine should not be called in this featureset")}async _getFilteredSet(){return new s.Z([],[],!1,null)}_stat(e,t,n,r,s,a,i){return this._manualStat(e,t,a,i)}async _canDoAggregates(){return!1}}},91136:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(48039);class s{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise(((r,s)=>{this._parent._getSet(this._progress).then((a=>{let i=a._known.length-1;if("GETPAGES"===a._known[a._known.length-1]&&(i-=1),this._lastId+e>i&&a._known.length>0&&"GETPAGES"===a._known[a._known.length-1])this._parent._expandPagedSet(a,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}));else{if(i>=this._lastId+e||0===a._candidates.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=a._known.length)break;n[t]=a._known[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}this._parent._refineSetBlock(a,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise(((t,n)=>{this._parent._getSet(this._progress).then((r=>{this._lastId<r._known.length-1?"GETPAGES"===r._known[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,r._known[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(-1!==this._parent._totalCount)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if("GETPAGES"===e._known[e._candidates.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}var a=n(90961),i=n(90658),l=n(95002),o=n(95330),u=n(41534),c=n(8667),h=n(82971),d=n(99514);class _{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=i.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return!0===this._parent.loaded?(this._initialiseFeatureSet(),this):(await this._parent.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=i.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new d.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!==e&&e.aborted)throw new Error("Operation has been cancelled.")}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,s){return null!==this._parent&&this._parent._canDoAggregates(e,t,n,r,s)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i)}async _getAgregagtePhysicalPage(e,t,n){if(null===this._parent)throw new Error("Should never be called");return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===i.Bj.NotEvaluated){if(null!==r.Z.applicationCache){const e=r.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==r.Z.applicationCache&&r.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==r.Z.applicationCache&&r.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:i.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:i.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:i.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.testwhere))return t.thetype;return i.Bj.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new Error("Not Implemented")}isTable(){return this._parent.isTable()}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return i.dj.Unknown}_getSet(e){throw new Error("Not implemented in abstract class")}async _getFeature(e,t,n){if(this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);throw new Error("Feature Not Found")}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new a.Z([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,s){throw new Error("Not implemented in abstract class")}async _refineSetBlock(e,t,n){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let s=r-e._candidates.length;if(0===e._candidates.length)return e;if(s>=t)return e;if(await this._refineIfParentKnown(e,t-s,n),this._checkCancelled(n),this._refineKnowns(e,t-s),s=r-e._candidates.length,s<t&&e._candidates.length>0){const r=t-s,a=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(a,a.length>r?r:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-s),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const s=[];t=this._maxQueryRate();for(let a=0;a<e._candidates.length&&"GETPAGES"!==e._candidates[a];a++){let l=!1;const o=this._candidateIdTransform(e._candidates[a]);o!==e._candidates[a]&&(l=!0);const u=this._isInFeatureSet(o);if(u===i.dj.InFeatureSet)!0===l?e._known.includes(o)||(e._known.push(o),n+=1):(e._known.push(e._candidates[a]),n+=1),null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a});else if(u===i.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),n+=1;else if(u===i.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1)}_refineIfParentKnown(e,t,n){const r=new a.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}async _expandPagedSet(e,t,n,r,s){if(null===this._parent)throw new Error("Parent Paging not implemented");return this._parent._expandPagedSet(e,t,n,r,s)}async _expandPagedSetFeatureSet(e,t,n,r,s){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(r=1),0===r&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(r=2),0===r)return"finished";const a=await this._getPage(e,r,s);return n+a<t?this._expandPagedSet(e,t,n+a,0,s):"success"}async _getPage(e,t,n){const r=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){r.length=r.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&r.push("GETPAGES"),t}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let s=await this._stat(e,t,"",null,null,n,r);return!1===s.calculated&&(s=await this._manualStat(e,t,n,r)),s.result}async _manualStat(e,t,n,r){let s=null;switch(e.toLowerCase()){case"count":return s=await(0,l.QX)(this,r),{calculated:!0,result:s};case"distinct":return s=await(0,l.EB)(this,t,n),{calculated:!0,result:s};case"avg":case"mean":return s=await(0,l.J6)(this,t,r),{calculated:!0,result:s};case"stdev":return s=await(0,l.m)(this,t,r),{calculated:!0,result:s};case"variance":return s=await(0,l.CA)(this,t,r),{calculated:!0,result:s};case"sum":return s=await(0,l.Sm)(this,t,r),{calculated:!0,result:s};case"min":return s=await(0,l.VV)(this,t,r),{calculated:!0,result:s};case"max":return s=await(0,l.Fp)(this,t,r),{calculated:!0,result:s};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,s,a,i){const l=await this._parent._stat(e,t,n,r,s,a,i);return!1===l.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:l}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return new Promise(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((s=>{try{null!==s&&null!==s.geometry&&e.push(s.geometry),e.length>30||null===s&&e.length>1?(0,c.G0)(e).then((a=>{try{null===s?n(a):(e=[a],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===s?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new s(this,e)}intersection(e,t=!1){return _._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return _._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return _._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return _._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return _._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return _._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return _._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return _._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return _._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return _._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return _._featuresetFunctions.relate.bind(this)(e,t)}within(e){return _._featuresetFunctions.within.bind(this)(e)}touches(e){return _._featuresetFunctions.touches.bind(this)(e)}top(e){return _._featuresetFunctions.top.bind(this)(e)}crosses(e){return _._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return _._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return _._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return _._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return _._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return _._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise(((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)}))}_reduceImpl(e,t,n,r,s,a,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._reduceImpl(e,t,n,r,s,a,i)}));e.next().then((l=>{try{if(null===l)s(n);else{const u=t(n,l,r,this);(0,o.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,r+1,s,a,i)}),a):this._reduceImpl(e,t,u,r+1,s,a,i)}}catch(e){a(e)}}),a)}catch(e){a(e)}}removeField(e){return _._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return _._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,i.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.Y4)(n.geometry,r).then((t=>e+t)):(0,c.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,i.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.kQ)(n.geometry,r).then((t=>e+t)):(0,c.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}async distinct(e,t=1e3,n=null,r){await this.load();const s=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",u.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))}_defaultTracker(e){return e||{aborted:!1}}forEach(e,t){return new Promise(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,r,s,a){try{if(++a>1e3)return void setTimeout((()=>{a=0,this._forEachImpl(e,t,n,r,s,a)}),0);e.next().then((i=>{try{if(null===i)r(n);else{const l=t(i);null==l?this._forEachImpl(e,t,n,r,s,a):(0,o.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,r,s,a)}catch(e){s(e)}}),s):this._forEachImpl(e,t,n,r,s,a)}}catch(e){s(e)}}),s)}catch(e){s(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,i.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,i.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===i.q2[this.geometryType]?"":i.q2[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];await this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t);const n=this.schema();return n.features=e,n.spatialReference=this.spatialReference.toJSON(),JSON.stringify(n)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const n=[];await this.reduce(((e,r)=>{const s={geometry:r.geometry?!0===t?.keepGeometryType?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType&&delete s.geometry.spatialReference,n.push(s),1}),0,e);const r=this.schema();return r.features=n,r.spatialReference=!0===t?.keepGeometryType?this.spatialReference:this.spatialReference.toJSON(),r}}_._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._candidates=null,this._known=null,this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>u,DT:()=>f,TE:()=>b,XF:()=>l,bB:()=>o,fz:()=>h,hq:()=>y,oX:()=>d,vR:()=>_,y5:()=>w,zR:()=>i});var r=n(90658),s=n(41534),a=n(17126);function i(e,t){return c(e.parseTree,t,e.parameters)}function l(e,t,n){return c(e,t,n)}function o(e,t,n,a){return s.WhereClause.create(c(e.parseTree,r.Bj.Standardised,e.parameters,t,n),a)}function u(e,t,n="AND"){return s.WhereClause.create("(("+i(e,r.Bj.Standardised)+")"+n+"("+i(t,r.Bj.Standardised)+"))",e.fieldsIndex)}function c(e,t,n,r=null,s=null){let a,i,l,o;switch(e.type){case"interval":return b(c(e.value,t,n,r,s),e.qualifier,e.op);case"case-expression":{let a=" CASE ";"simple"===e.format&&(a+=c(e.operand,t,n,r,s));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+c(e.clauses[i].operand,t,n,r,s)+" THEN "+c(e.clauses[i].value,t,n,r,s);return null!==e.else&&(a+=" ELSE "+c(e.else,t,n,r,s)),a+=" END ",a}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return d(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replace(/'/g,"''")+"'"):r[n]instanceof Date?e.push(d(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expression-list":i=[];for(const a of e.value)i.push(c(a,t,n,r,s));return i;case"unary-expression":return" ( NOT "+c(e.expr,t,n,r,s)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+c(e.left,t,n,r,s)+" AND "+c(e.right,t,n,r,s)+") ";case"OR":return" ("+c(e.left,t,n,r,s)+" OR "+c(e.right,t,n,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NOT NULL )";case"IN":return a=[],"expression-list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" IN ("+a.join(",")+")) "):(o=c(e.right,t,n,r,s),o instanceof Array?" ("+c(e.left,t,n,r,s)+" IN ("+o.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" IN ("+o+")) ");case"NOT IN":return a=[],"expression-list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT IN ("+a.join(",")+")) "):(o=c(e.right,t,n,r,s),o instanceof Array?" ("+c(e.left,t,n,r,s)+" NOT IN ("+o.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" NOT IN ("+o+")) ");case"BETWEEN":return l=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+c(e.left,t,n,r,s)+" "+e.operator+" "+c(e.right,t,n,r,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return d(e.value,t);case"number":return e.value.toString();case"current-time":return _("date"===e.mode,t);case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"function":{const a=c(e.args,t,n,r,s);return h(e.name,a,t)}}throw new Error("Unsupported sql syntax "+e.type)}function h(e,t,n){switch(e.toLowerCase().trim()){case"abs":if(1!==t.length)throw new Error("Invalid Parameter for call to ABS");return"abs("+t[0]+")";case"ceiling":case"ceil":if(1!==t.length)throw new Error("Invalid Parameter for call to CEILING");switch(n){case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"floor":if(1!==t.length)throw new Error("Invalid Parameter for call to Floor");return"FLOOR("+t[0]+")";case"log":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG");return"LOG("+t[0]+")";case"log10":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG10");return"LOG10("+t[0]+")";case"power":if(2!==t.length)throw new Error("Invalid Parameter for call to POWER");return"POWER("+t[0]+","+t[1]+")";case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new Error("Invalid Parameter for call to ROUND");case"truncate":if(t.length<1||t.length>2)throw new Error("Invalid Parameter for TRUNCATE function");return n===r.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new Error("Invalid Parameter for CHAR_LENGTH function");switch(n){case r.Bj.SqlServer:return"LEN("+t[0]+")";case r.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"concat":if(t.length<1)throw new Error("Invalid Parameter for CONCAT function");{let e="CONCAT(";for(let n=0;n<t.length;n++)0!==n&&(e+=","),e+=t[n];return e+=")",e}case"lower":case"lcase":if(1!==t.length)throw new Error("Invalid Parameter for Lower function");return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new Error("Invalid Parameter for Upper function");return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case r.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case r.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replace(/\'/g,"")+" FROM "+t[1]+")"}throw new Error("Function Not Recognised")}function d(e,t){const n=e instanceof Date?a.ou.fromJSDate(e):a.ou.fromSQL(e),s=0===n.hour&&0===n.minute&&0===n.second&&0===n.millisecond;switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:return s?`date '${n.toFormat("yyyy-LL-dd")}'`:`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.Oracle:return s?`TO_DATE('${n.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${n.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case r.Bj.SqlServer:return`'${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.PGDB:return`#${n.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case r.Bj.Postgres:return`TIMESTAMP '${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function _(e,t){switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:case r.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case r.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case r.Bj.PGDB:case r.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function f(e,t,n={}){const r={},s={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",string:"string"};for(const e of t){const t=a[e.type];r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=a[n[e]];s[e.toLowerCase()]=void 0===t?"":t}switch(p(r,e.parseTree,e.parameters,s)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string"}return""}function p(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case-expression":{const s=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)s.push(p(e,t.clauses[a].value,n,r));null!==t.else&&s.push(p(e,t.else,n,r))}else{for(let a=0;a<t.clauses.length;a++)s.push(p(e,t.else,n,r));null!==t.else&&s.push(p(e,t.else,n,r))}return m(s)}case"parameter":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if(e instanceof Date)return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const s=[];for(const a of t.value)s.push(p(e,a,n,r));return s}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new Error("Unsupported RHS for IS");return"boolean";case"*":case"-":case"+":case"/":return m([p(e,t.left,n,r),p(e,t.right,n,r)]);default:throw new Error("Not Supported Operator "+t.operator)}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current-time":return"date";case"column-reference":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"position":case"extract":case"char_length":return"integer";case"round":return s=p(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s;case"sign":return s=p(e,t.args,n,r),s instanceof Array&&(s=m(s)),"integer"===s||"double"===s?s:"double";case"ceiling":case"floor":case"abs":{const s=p(e,t.args,n,r);return s instanceof Array?m(s):s}case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"power":case"truncate":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string"}return""}throw new Error("Unsupported sql syntax "+t.type)}const g={boolean:1,string:2,integer:3,double:4,date:5};function m(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||g[t]<g[n]?n:t);return t}return""}function y(e,t){return S(e.parseTree,t)}function w(e){return"column-reference"===e.parseTree.type}function S(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return S(e.operand,t)||S(e.value,t);case"case-expression":for(const n of e.clauses)if(S(n,t))return!0;return!("simple"!==e.format||!S(e.operand,t))||!(null===e.else||!S(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"string":case"number":return!1;case"expression-list":for(const n of e.value)if(S(n,t))return!0;return!1;case"unary-expression":return S(e.expr,t);case"binary-expression":return S(e.left,t)||S(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return S(e.args,t)}return!1}function I(e){let t="";return t+=e.period.toUpperCase(),t}function b(e,t,n){let r="";return r="interval-period"===t.type?I(t):I(t.start)+" TO "+I(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{CA:()=>f,EB:()=>w,Fp:()=>d,J6:()=>_,QX:()=>m,Sm:()=>g,VV:()=>h,g3:()=>u,m:()=>p,tj:()=>c});var r=n(90658),s=n(36515);function a(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function i(e){const t=a(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function l(e){const t=a(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function u(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function c(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],s={},a=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,r.hj)(t)||(0,r.HD)(t))void 0===s[t]&&(n.push(t),s[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,r.tt)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return a(t);case"min":return Math.min.apply(Math,t);case"sum":return o(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(i(t));case"var":case"variance":return i(t);case"count":return t.length}return 0}async function h(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.min.apply(Math,r)}async function d(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.max.apply(Math,r)}async function _(e,t,n){let r="";!1===(0,s.y5)(t)&&(r=(0,s.DT)(t,e.fields,null));const i=await y(e,t,n,!0);if(0===i.length)return null;const l=a(i);return null===l?l:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(l):l}async function f(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:l(r)}async function p(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:Math.sqrt(l(r))}async function g(e,t,n){const r=await y(e,t,n,!0);return 0===r.length?null:o(r)}async function m(e,t){return e.iterator(t).count()}async function y(e,t,n,r=!1){const s=e.iterator(n),a=[],i={ticker:0};let l=await s.next();for(;null!==l;){if(i.ticker++,n.aborted)throw new Error("Cancelled");i.ticker%100==0&&(i.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t.calculateValue(l);null===e?!1===r&&(a[a.length]=e):a[a.length]=e,l=await s.next()}return a}async function w(e,t,n=1e3,r=null){const s=e.iterator(r),a=[],i={},l={ticker:0};let o=await s.next();for(;null!==o;){if(l.ticker++,r.aborted)throw new Error("Cancelled");l.ticker%100==0&&(l.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t.calculateValue(o);if(null!=e&&void 0===i[e]&&(a.push(e),i[e]=1),a.length>=n&&-1!==n)return a;o=await s.next()}return a}},64830:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(70586);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,r.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,r.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},80903:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(50758),s=n(92604),a=n(95330),i=n(64830),l=n(25045);class o{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const i=e=>{(0,a.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const o=e[s];(0,a.y8)(o)?this._clientPromises[s]=o.then((e=>(this._clients[s]=new l.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),i(n),this._clients[s])),(()=>(i(r),null))):(this._clients[s]=new l.default(o,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[s]=Promise.resolve(this._clients[s]),i(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const a=this._clientPromises[s];r[s]=a.then((r=>r?.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.deferred.reject((0,a.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0}invoke(e,t,n){let r;Array.isArray(n)?(s.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n;const i=(0,a.dD)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,deferred:i});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return i.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{s&&(t[r]=s.openPort()),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},8667:(e,t,n)=>{n.d(t,{CJ:()=>L,Cz:()=>k,D$:()=>x,ED:()=>w,G0:()=>P,Gg:()=>b,LV:()=>I,Nm:()=>S,Sp:()=>E,TE:()=>f,U1:()=>R,W4:()=>m,Y4:()=>B,cv:()=>D,e5:()=>T,f3:()=>C,fS:()=>p,j2:()=>N,jU:()=>_,kK:()=>g,kQ:()=>G,og:()=>F,oq:()=>c,r3:()=>d,rd:()=>A,sz:()=>O,uh:()=>y,wf:()=>v,z7:()=>h}),n(66577);var r=n(78346),s=(n(94139),n(33955));function a(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function l(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let o;async function u(e,t){return(await async function(){return o||(o=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),o}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function c(e,t){return l(await u("clip",[a(e),e,t]))}async function h(e,t){return l(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function _(e,t){return u("crosses",[a(e),e,t])}function f(e,t,n){return u("distance",[a(e),e,t,n])}function p(e,t){return u("equals",[a(e),e,t])}function g(e,t){return u("intersects",[a(e),e,t])}function m(e,t){return u("touches",[a(e),e,t])}function y(e,t){return u("within",[a(e),e,t])}function w(e,t){return u("disjoint",[a(e),e,t])}function S(e,t){return u("overlaps",[a(e),e,t])}function I(e,t,n){return u("relate",[a(e),e,t,n])}function b(e){return u("isSimple",[a(e),e])}async function F(e){return l(await u("simplify",[a(e),e]))}async function T(e,t){return l(await u("difference",[a(e),e,t]))}async function E(e,t){return l(await u("symmetricDifference",[a(e),e,t]))}async function v(e,t){return l(await u("intersect",[a(e),e,t]))}async function P(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return l(await u("union",[a(n),n]))}async function D(e,t,n,r,s,i){return l(await u("offset",[a(e),e,t,n,r,s,i]))}async function C(e,t,n,r=!1){const s=[a(e),e,t,n,r];return l(await u("buffer",s))}async function A(e,t,n,r,s,i){const o=[a(e),e,t,n,r,s,i];return l(await u("geodesicBuffer",o))}async function R(e,t,n){if(null==e)throw new j;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new j;const s=e.constructor.fromJSON(await u("rotate",[r,e,t,n]));return s.spatialReference=r,s}async function x(e,t,n,r){return l(await u("generalize",[a(e),e,t,n,r]))}async function k(e,t,n){return l(await u("densify",[a(e),e,t,n]))}async function N(e,t,n,r=0){return l(await u("geodesicDensify",[a(e),e,t,n,r]))}function L(e,t){return u("planarArea",[a(e),e,t])}function O(e,t){return u("planarLength",[a(e),e,t])}function B(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function G(e,t,n){return u("geodesicLength",[a(e),e,t,n])}class j extends Error{constructor(){super("Illegal Argument Exception")}}},94443:(e,t,n)=>{n.d(t,{ME:()=>_,Su:()=>f,tz:()=>d});var r=n(20102),s=n(95330),a=n(70171);const i=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function o(e){return l[e]??!1}const u=[],c=new Map;function h(e){for(const t of c.keys())p(e.pattern,t)&&c.delete(t)}function d(e){return u.includes(e)||(h(e),u.unshift(e)),{remove(){const t=u.indexOf(e);t>-1&&(u.splice(t,1),h(e))}}}async function _(e){const t=(0,a.Kd)();c.has(e)||c.set(e,async function(e,t){const n=[];for(const r of u)if(p(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=c.get(e);return n&&await g.add(n),n}function f(e){if(!i.test(e))return null;const t=i.exec(e);if(null===t)return null;const[,n,r]=t,s=n+(r?"-"+r.toUpperCase():"");return o(s)?s:o(n)?n:null}function p(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,a.Ze)((()=>{c.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},99514:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(35671);function s(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function a(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class i{constructor(e){if(this.fields=e,this._fieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;const t=[];for(const i of e){const e=i&&i.name;if(e){const o=l(e);this._fieldsMap.set(e,i),this._fieldsMap.set(o,i),t.push(o),"date"===(n=i).type||"esriFieldTypeDate"===n.type?(this.dateFields.push(i),this._dateFieldsSet.add(i)):(0,r.H7)(i)&&(this._numericFieldsSet.add(i),this.numericFields.push(i)),s(i)||a(i)||(i.editable=null==i.editable||!!i.editable,i.nullable=null==i.nullable||!!i.nullable)}}var n;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)s(e)||a(e)||e.nullable||void 0!==(0,r.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){return null!=e?this._fieldsMap.get(e)||this._fieldsMap.get(l(e)):void 0}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name??void 0}}function l(e){return e.toLowerCase().trim()}}}]);