@arcgis/core 6.0.0-next.5 → 6.0.0-next.7

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 (215) hide show
  1. package/analysis/AreaMeasurementAnalysis.d.ts +11 -1
  2. package/analysis/DirectLineMeasurementAnalysis.d.ts +11 -1
  3. package/analysis/DistanceMeasurementAnalysis.d.ts +8 -0
  4. package/arcade/functions/knowledgegraph.js +1 -1
  5. package/arcade/geometry/unitConversion.js +1 -1
  6. package/arcgisGlobal.d.ts +5 -5
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{f09c9d9a554c33a753b4.js → 02253bdffbd580af22d8.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{1ede8666d804c553803e.js → 0b6941781e35ce0f7274.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0ccab50877b24f862d6e.js +1 -0
  11. package/assets/esri/core/workers/chunks/{a0d459bdb91ee892d4b6.js → 116293b1ee788a89ce1e.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{8959a825f5e1ce6f38ac.js → 1c65ab9ed611c322ce27.js} +1 -1
  13. package/assets/esri/core/workers/chunks/257910cca66dc5df465e.js +1 -0
  14. package/assets/esri/core/workers/chunks/27da9ece2afaeec39f59.js +1 -0
  15. package/assets/esri/core/workers/chunks/{83589144eeeb08f45557.js → 2aeb5cc32284dd3e4d22.js} +1 -1
  16. package/assets/esri/core/workers/chunks/2c90f7a6432cd716db8b.js +1 -0
  17. package/assets/esri/core/workers/chunks/2e096537a3a5555a4a93.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b612de42ee86c0d95247.js → 3d9d7d3a40b51eb7ee3d.js} +1 -1
  19. package/assets/esri/core/workers/chunks/3ffda5bf0b91700dc308.js +1 -0
  20. package/assets/esri/core/workers/chunks/{1317ecdfd0cfa683a493.js → 42323093827adffe56d3.js} +1 -1
  21. package/assets/esri/core/workers/chunks/4d3f97a48046021713a6.js +1 -0
  22. package/assets/esri/core/workers/chunks/505227797bcf2a1d908d.js +1 -0
  23. package/assets/esri/core/workers/chunks/518e8883b6ed613bf451.js +1 -0
  24. package/assets/esri/core/workers/chunks/{67ac6b326bf80fc3d33d.js → 53be85d04cd2da4f391d.js} +1 -1
  25. package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +1 -0
  26. package/assets/esri/core/workers/chunks/557671c897ca5563be6c.js +1 -0
  27. package/assets/esri/core/workers/chunks/56a24061589f4a968818.js +1 -0
  28. package/assets/esri/core/workers/chunks/{3ac9dcbb0571a2580236.js → 62c8c9ad09e0166207fd.js} +1 -1
  29. package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +1 -0
  30. package/assets/esri/core/workers/chunks/{9232f57623e1fa3ccabc.js → 67e4b5651fd7ff7d8cf0.js} +1 -1
  31. package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +1 -0
  32. package/assets/esri/core/workers/chunks/{e521bb9ee2030245c3ce.js → 6f358116f79021ff9687.js} +1 -1
  33. package/assets/esri/core/workers/chunks/7038ead1fa1674416ab3.js +1 -0
  34. package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +1 -0
  35. package/assets/esri/core/workers/chunks/{8ba32d3a0df4a206ef1c.js → 7165d6f6a5078768bebb.js} +1 -1
  36. package/assets/esri/core/workers/chunks/76196c414e48834f7b92.js +1 -0
  37. package/assets/esri/core/workers/chunks/{cbe6c0f32608cb504695.js → 776ae25a34352d3468bc.js} +1 -1
  38. package/assets/esri/core/workers/chunks/801e9e66edb4961461eb.js +1 -0
  39. package/assets/esri/core/workers/chunks/{5078b66ba31b770b689f.js → 85908e6e9c50749cee60.js} +1 -1
  40. package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +1 -0
  41. package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +1 -0
  42. package/assets/esri/core/workers/chunks/aba42885c5d6b2b5fe7f.js +1 -0
  43. package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +1 -0
  44. package/assets/esri/core/workers/chunks/ae40eac1eadd1a537bf4.js +1 -0
  45. package/assets/esri/core/workers/chunks/bbf993dba74850bbf9d7.js +1 -0
  46. package/assets/esri/core/workers/chunks/bfd85e8d54062a590f0e.js +1 -0
  47. package/assets/esri/core/workers/chunks/{ff3a53c3f00335552317.js → c29c474c4b1049352d3e.js} +1 -1
  48. package/assets/esri/core/workers/chunks/d21257d2e2a37266c0f7.js +1 -0
  49. package/assets/esri/core/workers/chunks/d90a3bfd45b5ed4092e0.js +1 -0
  50. package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +1 -0
  51. package/assets/esri/core/workers/chunks/ecaac39dde7ec4213264.js +1 -0
  52. package/assets/esri/core/workers/chunks/f43a50d4bd9636e68ae5.js +1118 -0
  53. package/assets/esri/core/workers/chunks/fb444954be74c1962ced.js +1 -0
  54. package/assets/esri/core/workers/chunks/{fccbb902fe08448f91de.js → fd0a5c243f3426f2a0b5.js} +1 -1
  55. package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +1 -0
  56. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +1 -1
  57. package/assets/esri/themes/base/widgets/_Features.scss +1 -1
  58. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +5 -9
  59. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +2 -4
  60. package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -1
  61. package/assets/esri/themes/dark/main.css +1 -1
  62. package/assets/esri/themes/light/main.css +1 -1
  63. package/assets/esri/themes/light/view.css +1 -1
  64. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
  65. package/{basemaps/BasemapCollection.d.ts → basemapGallery/BasemapGalleryModel.d.ts} +8 -8
  66. package/{basemaps/BasemapCollection.js → basemapGallery/BasemapGalleryModel.js} +1 -1
  67. package/{basemaps → basemapGallery}/BasemapsSource.d.ts +1 -1
  68. package/{basemaps → basemapGallery}/BasemapsSource.js +1 -1
  69. package/{basemaps → basemapGallery}/LocalBasemapsSource.d.ts +2 -2
  70. package/{basemaps → basemapGallery}/LocalBasemapsSource.js +1 -1
  71. package/{basemaps → basemapGallery}/PortalBasemapsSource.d.ts +2 -2
  72. package/{basemaps → basemapGallery}/PortalBasemapsSource.js +1 -1
  73. package/{basemaps → basemapGallery}/support/BasemapItem.d.ts +2 -2
  74. package/{basemaps → basemapGallery}/support/BasemapItem.js +1 -1
  75. package/{basemaps → basemapGallery}/types.d.ts +2 -2
  76. package/chunks/GlobalIllumination.glsl.js +4 -2
  77. package/chunks/GlobalIlluminationBlur.glsl.js +3 -5
  78. package/chunks/GlobalIlluminationUpscale.glsl.js +1 -1
  79. package/config.js +1 -1
  80. package/core/colorUtils.js +1 -1
  81. package/core/has.js +1 -1
  82. package/core/units.js +1 -1
  83. package/core/workers/workerFactory.js +1 -1
  84. package/geometry/projectionUtils.js +1 -1
  85. package/geometry/support/wkt.js +2 -0
  86. package/kernel.js +1 -1
  87. package/layers/graphics/data/FeatureStore.js +1 -1
  88. package/layers/graphics/data/QueryEngineResult.js +1 -1
  89. package/layers/graphics/data/geometryUtils.js +1 -1
  90. package/layers/graphics/data/projectionSupport.js +1 -1
  91. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  92. package/layers/graphics/transferFeatures.js +1 -1
  93. package/layers/knowledgeGraph/layerUtils.js +1 -1
  94. package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
  95. package/layers/raster/datasets/TIFFRaster.js +1 -1
  96. package/package.json +2 -2
  97. package/symbols/cim/cimAnalyzer.js +1 -1
  98. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +4 -4
  99. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +4 -4
  100. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  101. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  102. package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
  103. package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
  104. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  105. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  106. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  107. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  108. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  109. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +3 -0
  110. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +2 -1
  111. package/views/3d/layers/support/FeatureMemory.js +1 -1
  112. package/views/3d/layers/support/FeatureTile.js +1 -1
  113. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  114. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  115. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  116. package/views/3d/support/PBFDecoder.js +1 -1
  117. package/views/3d/support/elevationUpdateUtils.js +1 -1
  118. package/views/3d/terrain/TerrainRenderer.js +1 -1
  119. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +16 -11
  120. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  121. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js +2 -2
  122. package/views/SceneView.d.ts +4 -10
  123. package/views/View.d.ts +4 -12
  124. package/views/draw/Draw.d.ts +1 -1
  125. package/views/draw/support/InteractiveHandle.js +1 -1
  126. package/views/interactive/options/SnappingOptions.d.ts +29 -12
  127. package/views/interactive/options/TooltipOptions.d.ts +9 -1
  128. package/views/interactive/options/ValueOptions.d.ts +9 -2
  129. package/views/interactive/options/ViewOptions.d.ts +82 -6
  130. package/views/interactive/support/Units.d.ts +1 -0
  131. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  132. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  133. package/views/support/projectionUtils.js +1 -1
  134. package/widgets/BasemapGallery/BasemapGalleryViewModel.d.ts +2 -2
  135. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  136. package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +3 -3
  137. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +2 -2
  138. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -2
  139. package/widgets/BasemapGallery/types.d.ts +3 -3
  140. package/widgets/BasemapLayerList.js +1 -1
  141. package/widgets/BatchAttributeForm.js +1 -1
  142. package/widgets/DirectionalPad.js +1 -1
  143. package/widgets/Editor/EditorViewModel.d.ts +13 -8
  144. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  145. package/widgets/Editor.d.ts +9 -9
  146. package/widgets/Expand.js +1 -1
  147. package/widgets/FeatureForm.js +1 -1
  148. package/widgets/FeatureTable/FieldColumn.js +1 -1
  149. package/widgets/FeatureTable.js +1 -1
  150. package/widgets/Features/FeaturesDrillIn.js +1 -1
  151. package/widgets/Features.js +1 -1
  152. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  153. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  154. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  155. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  156. package/widgets/PanoramicVideoViewer.js +1 -1
  157. package/widgets/Print.js +1 -1
  158. package/widgets/ScaleRangeSlider.js +1 -1
  159. package/widgets/Search/SearchResultRenderer.js +1 -1
  160. package/widgets/Sketch/SketchViewModel.d.ts +14 -9
  161. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  162. package/widgets/Sketch.d.ts +10 -10
  163. package/widgets/Track/TrackViewModel.d.ts +1 -1
  164. package/widgets/UtilityNetworkAssociations.js +1 -1
  165. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  166. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  167. package/widgets/UtilityNetworkTrace/types.d.ts +2 -2
  168. package/widgets/UtilityNetworkTrace.js +1 -1
  169. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  170. package/widgets/ValuePicker.js +1 -1
  171. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
  172. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  173. package/widgets/support/GridControls.js +1 -1
  174. package/widgets/support/PluginSettingsControls.js +1 -1
  175. package/widgets/support/SelectionToolbar.js +1 -1
  176. package/widgets/support/SnappingControls.js +1 -1
  177. package/widgets/support/componentsUtils.js +1 -1
  178. package/arcade/geometry/wkt.js +0 -2
  179. package/assets/esri/core/workers/chunks/02d4f91652a79d2b637e.js +0 -1
  180. package/assets/esri/core/workers/chunks/05d865b2736f452ad2aa.js +0 -1
  181. package/assets/esri/core/workers/chunks/107b025dc5b09465a78f.js +0 -1
  182. package/assets/esri/core/workers/chunks/1b551ef3d84d9c1e93f9.js +0 -1
  183. package/assets/esri/core/workers/chunks/1f43e06dcfe56229bb0f.js +0 -1
  184. package/assets/esri/core/workers/chunks/260dcb79dfd0f981949f.js +0 -1
  185. package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
  186. package/assets/esri/core/workers/chunks/303676d1b10676c9cab4.js +0 -1
  187. package/assets/esri/core/workers/chunks/33956f12505e72e60293.js +0 -1
  188. package/assets/esri/core/workers/chunks/3880d2c7fb14955d7f93.js +0 -1
  189. package/assets/esri/core/workers/chunks/512628db534605a2a93e.js +0 -1742
  190. package/assets/esri/core/workers/chunks/57970d43cdcc5cf57a30.js +0 -1
  191. package/assets/esri/core/workers/chunks/5e184fd47e76eb976fa9.js +0 -1
  192. package/assets/esri/core/workers/chunks/5f3ab77a79c408423fde.js +0 -1
  193. package/assets/esri/core/workers/chunks/5fd099ca1024707387b2.js +0 -1
  194. package/assets/esri/core/workers/chunks/65654e481cce9ae40e54.js +0 -1
  195. package/assets/esri/core/workers/chunks/68e24fa3f564c2a5c9fd.js +0 -1
  196. package/assets/esri/core/workers/chunks/6aebf7cfd294e88bf926.js +0 -1
  197. package/assets/esri/core/workers/chunks/71103472c45928bd730c.js +0 -1
  198. package/assets/esri/core/workers/chunks/73a87fb270818aa75fc5.js +0 -1
  199. package/assets/esri/core/workers/chunks/776565dd9741ba2ba151.js +0 -1
  200. package/assets/esri/core/workers/chunks/8b54589f173259c1ba55.js +0 -1
  201. package/assets/esri/core/workers/chunks/8e7a33cc1f83063043f2.js +0 -1
  202. package/assets/esri/core/workers/chunks/a23272a7a47a95f6ddea.js +0 -1
  203. package/assets/esri/core/workers/chunks/aa5b42e44d2959fdacd3.js +0 -1
  204. package/assets/esri/core/workers/chunks/bff767ec5bb4c0d6b324.js +0 -1
  205. package/assets/esri/core/workers/chunks/c906f984b2b6e7578c06.js +0 -1
  206. package/assets/esri/core/workers/chunks/cbdebdfa5f2cded29d0d.js +0 -1
  207. package/assets/esri/core/workers/chunks/d56780290e0218d3e9de.js +0 -1
  208. package/assets/esri/core/workers/chunks/d89fe41c71c9621c41ae.js +0 -1
  209. package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +0 -1
  210. package/assets/esri/core/workers/chunks/e22d45aeef293a5ffb78.js +0 -1
  211. package/assets/esri/core/workers/chunks/e5943f3a4bbc12c06c4d.js +0 -1
  212. package/assets/esri/core/workers/chunks/edf3be87a997f4f05b96.js +0 -1
  213. package/assets/esri/core/workers/chunks/f0aaa646b17ffdbdcefa.js +0 -1
  214. package/assets/esri/core/workers/chunks/f0c0c02730fe0d948fc1.js +0 -1
  215. /package/{basemaps → basemapGallery}/support/basemapCompatibilityUtils.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5752],{69052(e,t,i){i.d(t,{hr:()=>a});var r=i(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return n(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+s(this.range,e-t,i)}minimalMonotonic(e,t,i){return n(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);let i=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(r)?i:r}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function n(e,t,i,r,a=0,n=!1){return(r-=a)<t?r+=s(e,t-r):r>i&&(r-=s(e,r-i)),n&&r===i&&(r=t),r+a}function s(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const l=new a(0,2*Math.PI),o=(new a(-Math.PI,Math.PI),new a(0,360));i.d(t,["ie",0,o,"uC",0,l])},18370(e,t,i){i.d(t,{z:()=>a});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function a(e){return new r(e)}},44123(e,t,i){i.d(t,{WhereClauseCache:()=>n});var r=i(66344),a=i(89696);class n{constructor(e,t){this._cache=new r.q(e),this._invalidCache=new r.q(t)}get(e,t){let i=`${t?.uid}:${e}`,r=this._cache.get(i);if(r)return r;if(null!=this._invalidCache.get(i))return null;try{let r=a.A.create(e,{fieldsIndex:t});return this._cache.put(i,r),r}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){let i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},46329(e,t,i){i.d(t,{y:()=>c});var r=i(49186),a=i(4305),n=i(513),s=i(50954),l=i(52006),o=i(49663),u=i(46068),d=i(59803);function c(e,t,i){if((0,l.Xq)(t))return(0,d.T)(e,t,i);if((0,l.n1)(t)){let n=(0,a.m_)(e,t,i)[0];if(null==n)throw new r.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return n}if((0,l.aO)(t)){let r=(0,s.pM)(e,t);return(0,n.fM)(r,i)}if((0,l.DA)(t)){let r=(0,o.io)(e,t);return(0,n.fM)(r,i)}let c=(0,u.SW)(e,t);return(0,u.pb)(c,i)}},52039(e,t,i){i.d(t,{O7:()=>p,el:()=>u});var r=i(69052),a=(i(49186),i(18370)),n=i(17676),s=(i(5443),i(39829)),l=(i(82799),i(16930)),o=(i(80754),i(21325));async function u(e,t,i){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(i=t);let r=null;for(let t of e)r??=t?.spatialReference;if(!r)return e;let a=(0,o.Vp)(r);if(!a)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(a);return["xmin"in t?t:new s.A(t)]}let[l,u]=a.valid,p=!1;for(let t of e){if(!t)continue;if("point"===t.type){p||=t.x>=u,p||=t.x<=l;continue}let{extent:e}=t;if(null==e){p=!0;break}p||=e.xmin>=u,p||=e.xmin<=l,p||=e.xmax>=u,p||=e.xmax<=l}if(!p)return e;let[{foldInto360Range:f},h]=await(0,n.qr)(Promise.all([d.getImportPromise(),c.getImportPromise()]),i),m=h.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=h.fromGeometry(e),i=h.toGeometry(f(t,m),r);return"extent"===e.type&&1===i?.rings.length?i.extent:i})}const d=(0,a.z)(()=>i.e(4144).then(()=>i(4144)).then(e=>e.load().then(()=>e))),c=(0,a.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(1550)]).then(()=>i(78125)));function p(e,t,i){let r=(0,o.Vp)(i);if(null==r)return e;let[a,n]=r.valid,s=2*n,l=0,u=0;t>n?l=Math.ceil(Math.abs(t-n)/s):t<a&&(l=-Math.ceil(Math.abs(t-a)/s)),e>n?u=Math.ceil(Math.abs(e-n)/s):e<a&&(u=-Math.ceil(Math.abs(e-a)/s));let d=e+(l-u)*s,c=d-t;return c>n?d-=s:c<a&&(d+=s),d}function f(e){let t=(0,o.Vp)(e);if(null==t)return null;let[i,a]=t.valid;return new r.hr(i,a)}const h=f(l.A.WGS84);f(l.A.WebMercator),i.d(t,["Y_",0,h])},80754(e,t,i){i.d(t,{kS:()=>u,kd:()=>o});var r=i(82799),a=i(16930),n=i(60408),s=i(52006);const l={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let i of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of i)if((0,s.aO)(e)){let[i,r]=e.c;i[0]+=t,r[0]+=t}else if((0,s.FG)(e)){let[i,r]=e.a;i[0]+=t,r[0]+=t}else if((0,s.n1)(e)){let[i,r,a]=e.b;i[0]+=t,r[0]+=t,a[0]+=t}else e[0]+=t;for(let i of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of i)e[0]+=t;return e}i.d(t,["j7",0,l])},62577(e,t,i){function r(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null==e.extent?[0,0,0,0]:[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]}:null}function a(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;let{originPosition:t,scale:i,translate:r}=e,a=i[0]??1,n=i[1]??1;return{originPosition:"lowerLeft",scale:[a,"lowerLeft"===t?n:-n,i[2]??1,i[3]??1],translate:[r[0]??0,r[1]??0,r[2]??0,r[3]??0]}}function n({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}function s({scale:e,translate:t},i){return Math.round((i-t[1])/e[1])}function l({scale:e,translate:t},i){return i*e[0]+t[0]}function o({scale:e,translate:t},i){return i*e[1]+t[1]}function u({scale:e,translate:t},i){return(i??0)*e[2]+t[2]}function d({scale:e,translate:t},i){return i?i*e[3]+t[3]:0}function c(e,t){return e&&t?m:e&&!t?f:!e&&t?h:p}i.d(t,{$X:()=>v,B2:()=>s,Gy:()=>g,IE:()=>n,P5:()=>T,Q1:()=>a,SW:()=>x,Tr:()=>_,VV:()=>r});const p=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],a=l(e,r[0]),n=o(e,r[1]);i[0]=[a,n];let{scale:s,originPosition:u}=e,d=s[0],c="lowerLeft"===u?s[1]:-s[1];for(let e=1;e<t.length;e++){let[r,s]=t[e];a+=d*r,n+=c*s,i[e]=[a,n]}return i},f=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],a=l(e,r[0]),n=o(e,r[1]);i[0]=[a,n,u(e,r[2])];let{scale:s,originPosition:d}=e,c=s[0],p="lowerLeft"===d?s[1]:-s[1];for(let r=1;r<t.length;r++){let[s,l,o]=t[r];a+=c*s,n+=p*l,i[r]=[a,n,u(e,o)]}return i},h=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],a=l(e,r[0]),n=o(e,r[1]);i[0]=[a,n,d(e,r[2])];let{scale:s,originPosition:u}=e,c=s[0],p="lowerLeft"===u?s[1]:-s[1];for(let r=1;r<t.length;r++){let[s,l,o]=t[r];a+=c*s,n+=p*l,i[r]=[a,n,d(e,o)]}return i},m=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],a=l(e,r[0]),n=o(e,r[1]);i[0]=[a,n,u(e,r[2]),d(e,r[3])];let{scale:s,originPosition:c}=e,p=s[0],f="lowerLeft"===c?s[1]:-s[1];for(let r=1;r<t.length;r++){let[s,l,o,c]=t[r];a+=p*s,n+=f*l,i[r]=[a,n,u(e,o),d(e,c)]}return i};function y(e,t,i){let r=Array(i.length);for(let a=0;a<i.length;a++)r[a]=t(e,i[a]);return r}function g(e,t,i){let r=a(e);return t.x=n(r,i.x),t.y=s(r,i.y),null!=i.z&&(t.z=function({scale:e,translate:t},i){return Math.round(((i??0)-t[2])/e[2])}(r,i.z)),null!=i.m&&(t.m=function({scale:e,translate:t},i){return i?Math.round((i-t[3])/e[3]):0}(r,i.m)),t}function x(e,t,i,r=i?.hasZ??!1,n=i?.hasM??!1){if(null!=i){let s=a(e);t.points=c(r,n)(s,i.points),t.hasZ=r,t.hasM=n}return t}function _(e,t,i,r=null!=i?.z,n=null!=i?.m){if(null==i)return t;let s=a(e);return t.x=l(s,i.x),t.y=o(s,i.y),r&&(t.z=u(s,i.z)),n&&(t.m=d(s,i.m)),t}function v(e,t,i,r=i?.hasZ??!1,n=i?.hasM??!1){return null!=i&&(t.rings=y(a(e),c(r,n),i.rings),t.hasZ=r,t.hasM=n),t}function T(e,t,i,r=i?.hasZ??!1,n=i?.hasM??!1){return null!=i&&(t.paths=y(a(e),c(r,n),i.paths),t.hasZ=r,t.hasM=n),t}},75752(e,t,i){i.d(t,{do:()=>P,qo:()=>L,Wc:()=>q});var r=i(4576),a=i(21818),n=i(49186),s=(i(44208),i(4718)),l=i(97768),o=i(17676),u=i(86211),d=i(12195),c=i(99917),p=i(70328),f=i(19419),h=i(537),m=i(60408),y=i(65864),g=i(52039),x=i(21325),_=i(90708),v=i(29441),T=i(51441),S=i(31464);class F{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;let e=1e3*this._purgeInterval,t=performance.now()-e;for(let[i,r]of this._storage){if(!(r.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new R(t)),this._scheduleSweep()}get(e){let t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let E=0;class R{constructor(e){this.items=e,this.time=performance.now(),this.id=E++}}var I=i(99352),w=i(8384),A=i(58727),M=i(62660),b=i(43668);const C="unsupported-query";async function O(e,{fieldsIndex:t,geometryType:i,spatialReference:r,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new n.A(C,"Unsupported query options",{query:e});return V(t,a,e),function(e,t,i){let{outStatistics:r,groupByFieldsForStatistics:a,having:s}=i,l=a?.length,o=r?.length;if(s){if(!l||!o)throw new n.A(C,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,v.eD)(e,t,s,r,i)}if(o){if(!(0,v._d)(r))return;let s=(0,v.g9)(e,r,a);(0,v.MG)(e,t,s,{expressionName:"statistics",query:i});for(let a of r){let{onStatisticField:r,statisticType:s}=a;if("percentile_disc"!==s&&"percentile_cont"!==s||!("statisticParameters"in a))e.get(r)&&"count"!==s&&"min"!==s&&"max"!==s&&(0,v.MG)(e,t,[r],{expressionName:`outStatistics with '${s}' statistic type`,allowedFieldTypes:N,query:i});else{let{statisticParameters:e}=a;if(!e)throw new n.A(C,"statisticParameters should be set for percentile type",{definition:a,query:i})}}}}(t,a,e),Promise.all([(0,M.c0)(e,i,r),(0,S.Nk)(r,e.outSR)]).then(()=>e)}function V(e,t,i){let{returnDistinctValues:r,outStatistics:a}=i,s=a?a.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){let r=" asc",a=" desc",n=i.orderByFields.map(e=>{let t=e.toLowerCase();return t.includes(r)?t.split(r)[0]:t.includes(a)?t.split(a)[0]:e}).filter(e=>!s.includes(e));(0,v.MG)(e,t,n,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,v.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(r)throw new n.A(C,"outFields should be specified for returnDistinctValues",{query:i});(0,v.SN)(e,t,i.where,i)}const N=new Set([...v.vl,...v.VW]);async function z(e,t,i,r){let a=[];if(i.valueExpression){let{arcadeUtils:e}=await(0,b.l)();a=e.extractFieldNames(i.valueExpression)}if(i.field&&a.push(i.field),i.field2&&a.push(i.field2),i.field3&&a.push(i.field3),i.normalizationField&&a.push(i.normalizationField),!a.length&&!i.valueExpression)throw new n.A(C,"field or valueExpression is required",{params:i});(0,v.MG)(e,t,a,{expressionName:"statistics",query:r})}var D=i(86420),B=i(95466),G=i(92359);class P{constructor(e){this._changeHandle=null,this.capabilities={query:I.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new F,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,d.W)(e.fieldsIndex)?e.fieldsIndex:B.A.fromJSON(e.fieldsIndex),this.availableFields=!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?new Set(this.fieldsIndex.fields.map(e=>e.name)):new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),this._frameTask=e.scheduler&&e.priority?e.scheduler.registerTask(e.priority):G.nu}destroy(){this._changeHandle=(0,l.xt)(this._changeHandle),this._frameTask=(0,l.xt)(this._frameTask),this._clearCache(),(0,l.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){let i=(0,o.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){let i=(0,o.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){let i=(0,o.Mq)(t);return e=(0,s.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){let t=(0,o.Mq)(e);this._timeExtentPromise||=(0,D.W)(this.timeInfo,this.featureStore);let[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,o.Te)(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{let t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new w.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{let t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==A.v8)throw e;return 0}}async*_executeQueryForExtent(e){let t=e.outSR;try{let i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;let r=i.size;if(!r)return{count:0,extent:null};let a=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:a}}catch(e){if(e===A.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{let t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;let i=t.items,r=new Set;for(let e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(e){if(e===A.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{let t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new w.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,A.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){let i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new n.A(C,"Unsupported query options",{query:e});return O(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;let i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==A.v8)throw i;t=new w.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){let{field:i,normalizationField:r,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:a});return yield,await n.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){let{field:i,field2:r,field3:a,valueExpression:n}=t,s=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:a,valueExpression:n});return yield,await s.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){let{field:i,normalizationField:r,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:a});return yield,await n.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){let{field:i,normalizationField:r,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:a});return yield,await n.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){let{point:i,distance:r,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let l=(0,s.o8)(e.query);l=await(0,A.T2)(l,this.definitionExpression,this.spatialReference),yield,l=await O(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;let o=!(0,x.aI)(i.spatialReference,this.spatialReference);o&&(await(0,S.Nk)(i.spatialReference,this.spatialReference),yield);let u="number"==typeof r?r:r.x,d="number"==typeof r?r:r.y,c={xmin:i.x-u,xmax:i.x+u,ymin:i.y-d,ymax:i.y+d,spatialReference:i.spatialReference},p=o?(0,S.Cv)(c,this.spatialReference):c;if(!p)return{candidates:[]};let[f]=await(0,g.el)((0,y.rS)(i),{signal:t});yield;let[h]=await(0,g.el)((0,y.rS)(p),{signal:t});if(yield,null==f||null==h)return{candidates:[]};let m=await this._searchFeatures(L(h.toJSON()));yield;let _=new w.G(m,l,this);this._executeObjectIdsQuery(_),yield,this._executeTimeQuery(_),yield,this._executeAttributesQuery(_),yield,yield*this._executeGeometryQueryForSnapping(_),yield;let v=f.toJSON(),T=o?(0,S.Cv)(v,this.spatialReference):v,F=o?Math.max(p.xmax-p.xmin,p.ymax-p.ymin)/2:r;return _.createSnappingResponse({...e,point:T,distance:F},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){let r=(0,p.hZ)((0,p.vt)(),p.qv);return await this.featureStore.forEachBounds(e,e=>(0,p.RF)(r,e)),q(r,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new w.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){let e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,a.z)(e))}let e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,s.o8)(e),e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await O(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};let i=yield*this._executeSceneFilterQuery(e);yield;let r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;let{outSR:t,returnGeometry:i,returnCentroid:r}=e,a=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,s=null==a||(0,x.aI)(a,n.spatialReference)?n:(0,S.Cv)(n,a);if(!s)return null;let l=i||r,o=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;let u=this.featureAdapter,d=await this._searchFeatures(L(s));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!d.length)return null;let t=new Set;for(let e of d)t.add(u.getObjectId(e));let i=await this._getAllFeatures();yield;let r=await(0,M.xt)("esriSpatialRelDisjoint",s,this.geometryType);yield;let a=yield*this._runSpatialFilter(i,e=>!t.has(u.getObjectId(e))||r(u.getGeometry(e)));return yield,await o(new w.G(a,e,this))}if(!d.length)return new w.G([],e,this);if(this._canExecuteSinglePass(s,e))return await o(new w.G(d,e,this));let c=await(0,M.xt)("esriSpatialRelContains",s,this.geometryType);yield;let p=yield*this._runSpatialFilter(d,e=>c(u.getGeometry(e)));return yield,await o(new w.G(p,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;let{geometry:i,outSR:a,returnGeometry:n,returnCentroid:s}=e,l=t?null:this._getCacheKey(e),o=l?this._cache.get(l):null;if(o)return new w.G(o,e,this);let u=(0,x.fn)(a)&&!(0,x.aI)(this.spatialReference,a),d=n||s,c=async e=>(u&&d&&await this._project(e,a),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,f=!i||null==p||(0,x.aI)(p,i.spatialReference)?i:(0,S.Cv)(i,p);if(!f)return await c(t??await this._getAllFeaturesQueryEngineResult(e));yield;let h=this.featureAdapter,m=await this._searchFeatures(L(i));yield;let y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await c(t??await this._getAllFeaturesQueryEngineResult(e));let i,r=new Set;for(let e of m)r.add(h.getObjectId(e));null==t?(yield,i=await this._getAllFeatures(),yield):i=t.items;let a=await(0,M.xt)(y,f,this.geometryType);yield;let n=yield*this._runSpatialFilter(i,e=>!r.has(h.getObjectId(e))||a(h.getGeometry(e)));return yield,await c(new w.G(n,e,this))}if(null!=t){let e=new r.vW;m=m.filter(i=>(0,r.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){let t=new w.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(f,e))return await c(new w.G(m,e,this));let g=await(0,M.xt)(y,f,this.geometryType);yield;let _=yield*this._runSpatialFilter(m,e=>g(h.getGeometry(e)));return yield,await c(new w.G(_,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;let t=new Set;for(let i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));let i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;let t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;let t=(0,D.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;let t=(0,v.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){let{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;let r=await(0,M.xt)(i,t.geometry,this.geometryType);yield;let a=this.featureAdapter;e.items=yield*this._runSpatialFilter(e.items,e=>r(a.getGeometry(e)))}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield,r=[];for(let a of e)t(a)&&r.push(a),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){let{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,a=r||i,n=new Map,s=this.featureAdapter.getAttribute;for(let i of e.items){let e=s(i,t),r=s(i,a),l=n.get(e);(!l||r>s(l,a))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){let{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:a,outSR:n,resultType:s,cacheHint:l}=e;if("tile"!==s&&!l)return null;let o=r||a,u=(0,x.fn)(n)&&!(0,x.aI)(this.spatialReference,n);return JSON.stringify(u&&o?[t,i,n]:[t,i])}_canExecuteSinglePass(e,t){let{spatialRel:i}=t;return(0,M.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,x.aI)(this.spatialReference,t))return e;let i=this.featureAdapter,r=(0,c.isLoaded)()?await this._getFullExtent():void 0,n=await(0,S.lK)(e.items.map(e=>(0,T.pL)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:r});return e.items=(0,a.z)(n.map((t,r)=>i.cloneWithGeometry(e.items[r],(0,_.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){let t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));let i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,s.o8)(e);try{e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:r,spatialReference:a,availableFields:s}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new n.A(C,"Unsupported query options",{query:e});return V(i,s,e),Promise.all([z(i,s,t,e),(0,M.c0)(e,r,a),(0,S.Nk)(a,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;let i=yield*this._executeSceneFilterQuery(e);yield;let r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(t){if(t!==A.v8)throw t;return new w.G([],e,this)}}get test(){}}function L(e){if((0,M.tC)(e)){if((0,m.ZC)(e))return[(0,f.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,f.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,h.Rg)((0,f.vt)(),e)]}function q(e,t,i,r,a){let n={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:r};a&&isFinite(e[2])&&isFinite(e[5])&&(n.zmin=e[2],n.zmax=e[5],n.hasZ=!0);let s=(0,S.Cv)(n,t,i);if(s.spatialReference=i,s.xmax-s.xmin===0){let e=(0,u.GA)(s.spatialReference);s.xmin-=e,s.xmax+=e}if(s.ymax-s.ymin===0){let e=(0,u.GA)(s.spatialReference);s.ymin-=e,s.ymax+=e}if(a&&null!=s.zmin&&null!=s.zmax&&s.zmax-s.zmin===0){let e=(0,u.GA)(s.spatialReference);s.zmin-=e,s.zmax+=e}return s}},99352(e,t,i){i.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},8384(e,t,i){i.d(t,{G:()=>O});var r=i(4576),a=i(18370),n=i(4718),s=i(16930),l=i(12359),o=i(90634),u=i(62577),d=i(21325),c=i(46329),p=i(52006),f=i(88930),h=i(29441),m=i(51441),y=i(30524),g=i(1873),x=i(43668);class _{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;let r=e.outFields;if(r&&!r.includes("*")){this.outFields=r;let e=0;for(let t of r){let r=(0,h.Wq)(t),a=this.fieldsIndex.get(r),n=a?null:(0,h.j4)(r,i),s=a?a.name:(0,h.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:s,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){let t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);let r=t,a=null;return this._fieldDataCache.has(r)?a=this._fieldDataCache.get(r)?.clause:i||(a=(0,h.j4)(t,this.fieldsIndex),this._fieldDataCache.set(r,{alias:r,clause:a})),a?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){let r=t.normalizationType,a=t.normalizationTotal,n=this.fieldsIndex.get(t.field),s=(0,y.zD)(n)||(0,y.Ah)(n),l=(0,y.OH)(n);return e.map(e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,g.gJ)(n)}${t.fieldDelimiter}${(0,g.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,g.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(s?n=n?new Date(n).getTime():null:l&&(n=n?(0,f.rb)(n):null)),r&&Number.isFinite(n)){let i="field"===r&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,g.zS)(n,r,i,a)}return n})}async getExpressionValues(e,t,i,r,a){let{arcadeUtils:n}=await(0,x.l)(),s=n.hasGeometryOperations(t);s&&await n.enableGeometryOperations();let l=n.createFunction(t),o=n.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{let t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:s?{...(0,m.pL)(r.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i.spatialReference}:null},d=n.createExecContext(t,o,a);return n.executeFunction(l,d)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,h.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,h.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){let t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);let i={};for(let r of t){let{alias:t,clause:a}=this._fieldDataCache.get(r);i[t]=a?a.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;let t=this.outFields,i=[];if(t)for(let r of t){let{alias:t}=this._fieldDataCache.get(r);i.push(e[t])}else for(let t in e)i.push(e[t]);let r=`${(t||["*"]).join(",")}=${i.join(",")}`,a=this._returnDistinctMap.get(r)||0;return this._returnDistinctMap.set(r,++a),a>1?null:e}}var v=i(31464),T=i(58727);class S{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class F extends S{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class E extends S{constructor(e,t,i,r,a,n=!1,s=null){super(e,t,i),this.start=r,this.end=a,this.draped=n,this.curve=s,this.type="edge"}}var R=i(5834),I=i(59977),w=i(57231),A=i(11440),M=i(60909),b=(i(98623),i(34747));const C=(0,a.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(6491)]).then(()=>i(55666)));class O{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasZ=!!t.returnZ&&i.hasZ,this.hasM=!!t.returnM&&i.hasM,this.fieldsIndex=i.fieldsIndex,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter,this.featureIdInfo=i.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){let e=new _(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:i,outStatistics:r}=this.query;if(!t?.length)return 1;let a=new Map,n=new Map,s=new Set;for(let l of r){let{statisticType:r}=l,o="exceedslimit"===r?void 0:l.onStatisticField;if(!n.has(o)){let i=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,a);i.push(t)}n.set(o,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}let u=n.get(o);for(let t in u){let{data:r,items:a}=u[t],n=r.join(",");(!i||e.validateItems(a,i))&&s.add(n)}}return s.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){let t=this.query.geometry;(0,d.fn)(this.query.outSR)&&!(0,d.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,m.ag)({spatialReference:this.query.outSR,...(0,v.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,m.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){let r=this.featureAdapter,{point:a}=e,n="number"==typeof e.distance?e.distance:e.distance.x,s="number"==typeof e.distance?e.distance:e.distance.y;function l(e,t){let i=(e-a.x)/n,r=(t-a.y)/s;return i*i+r*r}let o={candidates:[]},u="esriGeometryPolygon"===this.geometryType,d="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,f=this._getPointCreator(t,this.spatialReference,i),h=new z(null,0),m=new z(null,0),y={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),i=r.getGeometryWithCurves?.(e);if(null!=i){x(i,t);continue}let a=r.getGeometry(e);null!=a&&g(a,t)}return o.candidates.sort((e,t)=>e.distance-t.distance),o;function g(t,i){let{coords:r,stride:n}=t,s=t.isPoint?D:t.lengths;if(h.coords=r,m.coords=r,e.returnEdge){let e=0;for(let t=0;t<s.length;t++){let r=s[t],d=e;for(let t=0;t<r;t++,e+=n){if(!u&&t===r-1||(h.coordsIndex=e,m.coordsIndex=t===r-1?d:e+n,!N(y,a,h,m)))continue;let s=l(y.x,y.y);s<=1&&o.candidates.push(new E(i,f(y),Math.sqrt(s),f(h),f(m)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<s.length;t++){let r=s[t],a=e,d=m;d.coordsIndex=a;for(let t=0;t<r;t++,e+=n){if(h.coordsIndex=e,u&&t===r-1&&h.x===d.x&&h.y===d.y)continue;let a=l(h.x,h.y);a<=1&&o.candidates.push(new F(i,f(h),Math.sqrt(a)))}}}else if(d&&"ends"===e.vertexMode){let e=0,t=[];for(let i=0;i<s.length;i++){t.push(e);let r=s[i];e+=r*n,r>1&&t.push(e-n)}for(let e of t){h.coordsIndex=e;let t=l(h.x,h.y);t<=1&&o.candidates.push(new F(i,f(h),Math.sqrt(t)))}}}function x(t,i){let{candidates:r}=o,n={x:0,y:0,z:0};if(e.returnEdge){let e=[a.x,a.y],s=new z(e,0),o=new z(e,0);for(let{segments:a}of t.parts)for(let{start:t,curve:u}of a){let{curvePoint:a}=(0,c.y)(t,u,e),d=l(...a);if(d>1)continue;[n.x,n.y]=a,s.coords=t,o.coords=(0,p.yP)(u);let h=(0,p.Xq)(u)?null:(0,p.tk)(u);r.push(new E(i,f(n),Math.sqrt(d),f(s),f(o),!1,h))}}function s(e){n.x=t.vertexXY[2*e],n.y=t.vertexXY[2*e+1];let a=l(n.x,n.y);a>1||(n.z=t.vertexZ?.[e]??0,r.push(new F(i,f(n),Math.sqrt(a))))}if("all"===e.vertexMode){let{vertexCount:e}=t;for(let t=0;t<e;++t)s(t)}else if("ends"===e.vertexMode)switch(t.type){case"point":s(0);break;case"polyline":for(let e=0;e<t.partCount;++e){let i=t.partOffsets[e],r=t.partOffsets[e+1]-1;s(i),r!==i&&s(r)}}}}_getPointCreator(e,t,i){let r=null==i||(0,d.aI)(t,i)?e=>e:e=>(0,v.Cv)(e,t,i),{hasZ:a}=this;return a&&e?({x:e,y:t,z:i})=>r({x:e,y:t,z:i}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:a,normalizationTotal:n,minValue:s,maxValue:l,scale:o,timeZone:u,outStatisticTypes:d}=e,c=this.fieldsIndex.get(t),p=(0,y.vE)(c)||(0,y.zD)(c)||(0,y.Ah)(c),f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:a,normalizationTotal:n,scale:o,timeZone:u},this.items),h=(0,g.Vb)({normalizationType:a,normalizationField:r,minValue:s,maxValue:l}),m={value:.5,fieldType:c?.type},x=(0,y.yM)(c)?(0,g.z9)({values:f,supportsNullCount:h,percentileParams:m,outStatisticTypes:d}):(0,g.G_)({values:f,minValue:s,maxValue:l,useSampleStdDev:!a,supportsNullCount:h,percentileParams:m,outStatisticTypes:d});return(0,g.oZ)(x,d,p)}async createUniqueValuesResponse(e){let{field:t,valueExpression:i,domains:r,returnAllCodedValues:a,scale:n,timeZone:s}=e,l=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:s},this.items,!1),o=(0,g.b3)(l);return(0,g.lv)(o,r,a,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:a,normalizationTotal:n,classificationMethod:s,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:d,scale:c,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:a,normalizationTotal:n,scale:c,timeZone:p},this.items),h=(0,g.Rw)(f,{field:t,normalizationField:r,normalizationType:a,normalizationTotal:n,classificationMethod:s,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:d});return(0,g.jM)(h,s)}async createHistogramResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:a,normalizationTotal:n,classificationMethod:s,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:d,scale:c,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:a,normalizationTotal:n,scale:c,timeZone:p},this.items);return(0,g.$y)(f,{field:t,normalizationField:r,normalizationType:a,normalizationTotal:n,classificationMethod:s,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:d})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:a,fieldInfo:n}=B(r,this.fieldsIndex);e.sort((e,r)=>t(i(e,a,n),i(r,a,n)))}}_topNFeatures(e,t,i,a){if(e.length>1&&t?.length){let n=t.map(e=>{let{compare:t,fieldOrExpression:i,fieldInfo:r}=B(e,this.fieldsIndex);return(e,n)=>t(a(e,i,r),a(n,i,r))}).reduceRight((e,t)=>(i,r)=>{let a=t(i,r);return 0===a||Number.isNaN(a)?e(i,r):a}),s=[];for(let t of e)(0,r.HX)(s,t,i,n);return s}return e.slice(0,i)}_createFeatureQueryResponse(e){let{items:t,geometryType:i,hasM:r,hasZ:a,featureIdInfo:n,spatialReference:s}=this,{outFields:l,outSR:o,quantizationParameters:d,resultRecordCount:c,resultOffset:p,returnZ:f,returnM:h}=e,y=null!=c&&t.length>(p||0)+c,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:r&&h,hasZ:a&&f,objectIdFieldName:"object-id"===n.type?n.fieldName:null,spatialReference:(0,m.ag)(o||s),transform:d&&(0,u.VV)(d)||null}}_createFeatures(e,t){let i,r=new _(e,this.featureAdapter,this.fieldsIndex),{hasM:a,hasZ:n}=this,{orderByFields:s,quantizationParameters:l,returnGeometry:o,returnCentroid:d,maxAllowableOffset:c,resultOffset:p,resultRecordCount:f,returnZ:h=!1,returnM:y=!1}=e,g=n&&h,x=a&&y,v=p||0,T=null==f?null:v+f;null!=T&&T<=5e3&&T<t.length?i=this._topNFeatures(t,s,T,(e,t,i)=>r.getFieldValue(e,t,i)):(i=[...t],this._sortFeatures(i,s,(e,t,i)=>r.getFieldValue(e,t,i))),(v>0||null!=T)&&(i=i.slice(v,T??void 0));let S=[],F=0;if(this.geometryType&&(o||d)){let e=(0,u.VV)(l)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(o&&!d)for(let a of i){let i=this.featureAdapter.getGeometry(a),n=this._addFeatureJSONMetadata(a,{attributes:r.getAttributes(a),geometry:(0,m.pL)(this.geometryType,i,c,e,g,x)});t&&i&&!n.geometry&&(n.centroid=(0,m.LQ)(this,this.featureAdapter.getCentroid(a,this),e)),S[F++]=n}else if(!o&&d)for(let t of i)S[F++]=this._addFeatureJSONMetadata(t,{attributes:r.getAttributes(t),centroid:(0,m.LQ)(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of i)S[F++]=this._addFeatureJSONMetadata(t,{attributes:r.getAttributes(t),centroid:(0,m.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,m.pL)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,g,x)})}else for(let e of i){let t=r.getAttributes(e);t&&(S[F++]=this._addFeatureJSONMetadata(e,{attributes:t}))}return S}_addFeatureJSONMetadata(e,t){let i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,i=1/0,r=1/0;for(let e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null==e.maxPointCount?1/0:e.maxPointCount,i=null==e.maxRecordCount?1/0:e.maxRecordCount,r=null==e.maxVertexCount?1/0:e.maxVertexCount;break}return e="esriGeometryPoint"===this.geometryType?this.items.length>t:this.items.length>i||this.items.reduce((e,t)=>e+(this.featureAdapter.getGeometry(t)?.size??0),0)>r,{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){let r=[],a=new Map,n=new Map,s=new Map,l=new Map,o=new _(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:d,having:c,orderByFields:p,resultRecordCount:f}=e,h=d?.length,m=!!h,g=m?d[0]:null,x=m&&!this.fieldsIndex.get(g);for(let p of u??[]){let{outStatisticFieldName:u,statisticType:f}=p,_=p,v="exceedslimit"===f?void 0:p.onStatisticField,T="percentile_disc"===f||"percentile_cont"===f,S="EnvelopeAggregate"===f||"CentroidAggregate"===f||"ConvexHullAggregate"===f,F=m&&1===h&&(v===g||x)&&"count"===f;if(m){if(!s.has(v)){let e=[];for(let i of d){let r=this._getAttributeValues(o,i,t,a);e.push(r)}s.set(v,this._calculateUniqueValues(e,t,!S&&o.returnDistinctValues))}let i=s.get(v);if(!i)continue;let r=Object.keys(i);for(let n of r){let{count:r,data:s,items:p,itemPositions:f}=i[n],h=s.join(",");if(!c||o.validateItems(p,c)){let i=l.get(h)||{attributes:{}};if(e.returnAggIds&&(i.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),S){i.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(_,p);i.aggregateGeometries[t]=e}else{let e=null;if(F)e=r;else{let i=this._getAttributeValues(o,v,t,a),r=f.map(e=>i[e]);e=T&&"statisticParameters"in _?this._getPercentileValue(_,r):this._getStatisticValue(_,r,null,o.returnDistinctValues)}i.attributes[u]=e}let n=0;d.forEach((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++n]=s[t]),l.set(h,i)}}}else if(S){i.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(_,t);i.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(o,v,t,a);i.attributes[u]=T&&"statisticParameters"in _?this._getPercentileValue(_,e):this._getStatisticValue(_,e,n,o.returnDistinctValues)}let E="min"!==f&&"max"!==f||!(0,y.yM)(this.fieldsIndex.get(v))&&!this._isAnyDateField(v)?null:this.fieldsIndex.get(v)?.type;r.push({name:u,alias:u,type:E||"esriFieldTypeDouble"})}let v=m?Array.from(l.values()):[i];return this._sortFeatures(v,p,(e,t)=>e.attributes[t]),f&&(v.length=Math.min(f,v.length)),{fields:r,features:v}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return(0,y.vE)(t)||(0,y.zD)(t)||(0,y.Ah)(t)||(0,y.OH)(t)}async _getAggregateGeometry(e,t){let{statisticType:i,outStatisticFieldName:r}=e,{featureAdapter:a,spatialReference:n,geometryType:s}=this,u=t.map(e=>(0,m.pL)(s,a.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:c}=await C.getImportPromise(),[p]=c(u,{merge:!0});if(p&&p.rings[0].length<=3&&(p=null),"EnvelopeAggregate"===i)d.aggregateGeometries={...p?(0,o.v)(p):V(u),spatialReference:n},d.outStatisticFieldName=r||"extent";else if("CentroidAggregate"===i){let[e,t]=p?(0,l.l8)(p):(0,l.Z4)(V(u));d.aggregateGeometries={x:e,y:t,spatialReference:n},d.outStatisticFieldName=r||"centroid"}else"ConvexHullAggregate"===i&&(d.aggregateGeometries=p&&{...p,spatialReference:n},d.outStatisticFieldName=r||"convexHull");return d}_getStatisticValue(e,t,i,r){let{onStatisticField:a,statisticType:n}=e,s=null;return s=i?.has(a)?i.get(a):(0,y.yM)(this.fieldsIndex.get(a))||this._isAnyDateField(a)?(0,g.z9)({values:t,returnDistinct:r}):(0,g.G_)({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(a,s),s["var"===n?"variance":n]}_getPercentileValue(e,t){let{onStatisticField:i,statisticParameters:r,statisticType:a}=e,{value:n,orderBy:s}=r,l={value:n,orderBy:s,fieldType:this.fieldsIndex.get(i)?.type,isDiscrete:"percentile_disc"===a};return(0,g.qg)(t,l)}_getAttributeValues(e,t,i,r){if(r.has(t))return r.get(t);let a=this.fieldsIndex.get(t),n=i.map(i=>e.getFieldValue(i,t,a));return r.set(t,n),n}_calculateUniqueValues(e,t,i){let r={},a=t.length;for(let n=0;n<a;n++){let a=t[n],s=[];for(let t of e)s.push(t[n]);let l=s.join(",");null==r[l]?r[l]={count:1,data:s,items:[a],itemPositions:[n]}:(i||r[l].count++,r[l].items.push(a),r[l].itemPositions.push(n))}return r}async _getDataValues(e,t,i=!0){let r=new _(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:a,scale:l,timeZone:o}=e,u=s.A.fromJSON(this.query.outSR||this.spatialReference);return a?r.getExpressionValues(t,a,{viewingMode:"map",scale:l,spatialReference:u},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,n.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];let r=t.intervals,a=t.min??0,n=t.max??0,s=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let l=e[t],o=i[t];if(null!=l&&l>=a&&l<=n){let e=(0,g.Ak)(r,l);e>-1&&(s[e].count++,s[e].items.push(o))}}return s}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:i,outAlias:r,valueType:a}=t,n=[],s=[{name:r??i,alias:r??i,type:a??"esriFieldTypeString"},{name:"bin",alias:"bin",type:"esriFieldTypeInteger"}],l=new _(e,this.featureAdapter,this.fieldsIndex),o=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>l.getFieldValue(e,t,i));let d=this._getAttributeValues(l,i,u,o),c=this._calculateUniqueValues([d],u,l.returnDistinctValues);for(let t in c){let{items:a}=c[t],l=await this._createBinsResponse(e,a);if(n.push(...l.features.map(e=>({...e,attributes:{...e.attributes,[r??i]:t}}))),l.fields)for(let e of l.fields)s.some(t=>t.name===e.name)||s.push(e)}return{fields:s,features:n}}async _createBinsResponse(e,t){let i=e.bin;switch(t??=this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(R.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(A.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(M.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){let{field:r,normalizationField:a,numBins:n,normalizationType:s,normalizationTotal:l,start:o,end:u}=e,d=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),c=(0,g.sU)(d,{field:r,normalizationField:a,normalizationType:s,normalizationTotal:l,numBins:n,minValue:(0,T.dO)(s?e.normalizationMinValue:o,!1),maxValue:(0,T.dO)(s?e.normalizationMaxValue:u,!1)}),p=this._calculateHistogramBins(d,c,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){let{field:r,interval:a,start:n,end:s,snapToData:l,returnFullIntervalBin:o,offset:u,firstDayOfWeek:d}=e,c=a.unit,p=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),f=(0,y.OH)(this.fieldsIndex.get(r)),h=w.g.toJSON(c),m=p.filter(Boolean).sort((e,t)=>e-t),g=null==n?m[0]:(0,T.dO)(n,f),x=null==s?m[m.length-1]:(0,T.dO)(s,f),_=[];if(null!=g&&null!=x){let e={zone:t.outTimeReference?.ianaTimeZone??"UTC"},i={[u?.unit?w.g.toJSON(u.unit):"milliseconds"]:u?.value||0},r=b.c9.fromMillis(g,e).minus(i),n=b.c9.fromMillis(x,e).minus(i),s="number"==typeof d&&d>=1&&d<=7?d:7,c=(e,t)=>{let i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")},p=(e,t)=>c(e,t).plus({days:7});if("last"===l){let e="week"===h?p(n,s):n;for(;e>r;){let t=e.minus({[h]:a.value});if(t<r){_.unshift([o?t.plus(i).toMillis():r.plus(i).toMillis(),e.plus(i).toMillis()]);break}_.unshift([t.plus(i).toMillis(),e.plus(i).toMillis()]),e=t}}else{let e="first"===l?r:"week"===h?c(r,s):r.startOf(h);for(;e<=n;){let t=e.plus({[h]:a.value});if(t>n){_.push([e.plus(i).toMillis(),o?t.plus(i).toMillis():n.plus(i).toMillis()]);break}_.push([e.plus(i).toMillis(),t.plus(i).toMillis()]),e=t}}}let v=this._calculateHistogramBins(p,{intervals:_,min:g,max:x},i);return this._createFeaturesFromHistogramBins(v,t)}async _createFixedBoundariesBinsResponse(e,t,i){let{field:r}=e,a=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),n=(0,y.OH)(this.fieldsIndex.get(r)),s=e.boundaries.map(e=>(0,T.dO)(e,n)).sort((e,t)=>e-t),l=[];for(let e=0;e<s.length-1;e++)l.push([s[e],s[e+1]]);let o={intervals:l,min:s.at(0),max:s.at(-1)},u=this._calculateHistogramBins(a,o,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){let{field:r,interval:a,normalizationType:n,start:s,end:l}=e,o=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:n,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,y.OH)(this.fieldsIndex.get(r)),d=(0,g.sU)(o,{field:r,classificationMethod:"defined-interval",definedInterval:a,minValue:(0,T.dO)(n?e.normalizationMinValue:s,u),maxValue:(0,T.dO)(n?e.normalizationMaxValue:l,u)},!0),c=this._calculateHistogramBins(o,d,i);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:i,lowerBoundaryAlias:r}=t,a=r||"lowerBoundary",n=i||"upperBoundary",s=[],l=[{name:a,alias:a,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],o=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;o&&l.push({name:"bin",alias:"bin",type:"esriFieldTypeInteger"},{name:u??o,alias:u??o,type:"esriFieldTypeString"});let d=0,c="dateBin"===t.bin.type,p=t.outTimeReference?.ianaTimeZone;for(let i of e){let e,{minValue:r,maxValue:f,items:h}=i,m={attributes:{}};if(m.attributes[a]=c&&p&&null!=r?b.c9.fromMillis(r,{zone:p}).toISO():r,t.bin.hideUpperBound||(m.attributes[n]=c&&p&&null!=f?b.c9.fromMillis(f,{zone:p}).toISO():f),t.returnAggIds&&(m.aggregateIds=h.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),o?(e=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[o],orderByFields:[o]},h),m.attributes.bin=++d,"flat"===t.bin.jsonStyle?s.push(...e.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=e.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),s.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++d),e=await this._createStatisticsQueryResponse(t,h,m),s.push(m)),e.fields)for(let t of e.fields)l.some(e=>e.name===t.name)||l.push(t)}return"desc"===t.binOrder&&s.reverse(),{fields:l,features:s}}}function V(e){let t=(0,o.HA)(e[0]);for(let i of e.slice(1))(0,o.JM)(t,(0,o.HA)(i));return t}function N(e,t,i,r){let a=r.x-i.x,n=r.y-i.y,s=t.x-i.x,l=t.y-i.y,o=a*a+n*n;if(0===o)return!1;let u=s*a+l*n,d=Math.min(1,Math.max(0,u/o));return e.x=i.x+a*d,e.y=i.y+n*d,!0}class z{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const D=[1];function B(e,t){let i=e.split(" "),r=i[0],a=t.get(r),n=!!i[1]&&"desc"===i[1].toLowerCase();return{compare:(0,g.FM)(a?.type,n,"case-insensitive"),fieldOrExpression:r,fieldInfo:a}}},29441(e,t,i){i.d(t,{MG:()=>_,SN:()=>f,SY:()=>g,Wq:()=>y,_d:()=>S,eD:()=>h,g9:()=>x,j4:()=>m});var r=i(49186),a=i(44123),n=i(98453);const s=new a.WhereClauseCache(50,500),l="unsupported-query",o=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),d=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),c=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...d]);function p(e,t,i={}){let a=m(t,e);if(!a){let i=s.getError(t,e);throw new r.A(l,"invalid SQL expression",{expression:t,error:i})}let n=i.expressionName||"expression";if(i.validateStandardized&&!a.isStandardized)throw new r.A(l,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!a.isAggregate)throw new r.A(l,`${n} does not contain a valid aggregate function`,{expression:t});return a.fieldNames}function f(e,t,i,r){if(!i)return!0;let a="where clause";return _(e,t,p(e,i,{validateStandardized:!0,expressionName:a}),{expressionName:a,query:r}),!0}function h(e,t,i,a,n){if(!i)return!0;let s="having clause";if(_(e,t,p(e,i,{validateAggregate:!0,expressionName:s}),{expressionName:s,query:n}),!m(i,e)?.getExpressions().every(t=>{let{aggregateType:i,field:r}=t,n=e.get(r)?.name;return a.some(t=>{let{onStatisticField:r,statisticType:a}=t;return e.get(r)?.name===n&&a.toLowerCase().trim()===i})}))throw new r.A(l,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?s.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(o)[0]}function g(e){return e.split(o)[1]}function x(e,t,i){if(!S(t))return[];let r=new Set,a=t=>{if(t&&"*"!==t)for(let i of v(e,t))r.add(i)};for(let e of t)a(e.onStatisticField);for(let e of i??[])a(e);return Array.from(r)}function _(e,t,i,a={}){let n=new Map;if(function(e,t,i,r,a){let n=a.includes("*")?[...i,...a.filter(e=>"*"!==e)]:a;for(let a of n)if(t.get(a))T(e,t,i,r,a);else try{for(let n of v(t,a))T(e,t,i,r,n)}catch(t){e.set(a,{type:"expression-error",expression:a,error:t})}}(n,e,t,a.allowedFieldTypes??c,i),n.size){let e=`${a.expressionName??"expression"} contains invalid or missing fields`;throw new r.A(l,e,{errors:Array.from(n.values()),query:a.query})}}function v(e,t){let i=e.get(t);return i?[i.name]:p(e,y(t),{validateStandardized:!0})}function T(e,t,i,r,a){let s=t.get(a);s?i.has(s.name)?"all"!==r&&!1===r?.has(s.type)&&e.set(a,{type:"invalid-type",fieldName:s.name,fieldType:n.m.fromJSON(s.type),allowedFieldTypes:Array.from(r,e=>n.m.fromJSON(e))}):e.set(a,{type:"missing-field",fieldName:s.name}):e.set(a,{type:"invalid-field",fieldName:a})}function S(e){return null!=e&&e.every(e=>"exceedslimit"!==e.statisticType)}i.d(t,["VW",0,d,"vl",0,u])},58727(e,t,i){i.d(t,{GC:()=>g,T2:()=>x,dO:()=>v,iJ:()=>y});var r=i(49186),a=i(66552),n=i(86211),s=i(39829),l=i(99917),o=i(90634),u=i(60408),d=i(65864),c=i(52039),p=i(21325),f=i(31464);const h=new a.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({});async function y(e,t,i){let r=e.bin;return r.onField&&=r.onField.trim(),r.onExpression?.value&&(r.onExpression.value=r.onExpression.value.trim()),r.splitBy&&(r.splitBy.value&&(r.splitBy.value=r.splitBy.value.trim()),r.splitBy.outAlias&&(r.splitBy.outAlias=r.splitBy.outAlias.trim())),r.stackBy&&(r.stackBy.value&&(r.stackBy.value=r.stackBy.value.trim()),r.stackBy.outAlias&&(r.stackBy.outAlias=r.stackBy.outAlias.trim())),"normalizationField"in r.parameters&&r.parameters.normalizationField&&(r.parameters.normalizationField=r.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:"frequency"}]),g(e,t,i)}async function g(e,t,i){let{outFields:r,orderByFields:a,groupByFieldsForStatistics:n,outStatistics:s}=e;if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e]=a[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(s)for(let e=0;e<s.length;e++)s[e].onStatisticField&&(s[e].onStatisticField=s[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),x(e,t,i)}async function x(e,t,i){if(!e)return null;let{where:r}=e;if(e.where=r=r?.trim(),(!r||/^1 *= *1$/.test(r)||t&&t===r)&&(e.where=null),!e.geometry)return e;let a=await _(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){let{spatialReference:t}=e.geometry;a=(0,o.HA)(a),a.spatialReference=t}if(!a)return e;await(0,f.Nk)(a.spatialReference,i);let[n]=await(0,c.el)((0,d.rS)(a));if(null==n)throw m;let h=!1;((0,u.ZC)(n)||(0,u.Bi)(n)||(0,u.Rg)(n))&&(h=!(0,p.aI)(n.spatialReference,i)&&!(0,l.canProjectWithoutEngine)(n.spatialReference,i)),h&&(0,u.ZC)(n)&&(n=s.A.fromExtent(n));let y="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,g=h&&y?{extendedParams:{densificationStep:8*y}}:void 0,x=n.toJSON(),v=(0,f.Cv)(x,x.spatialReference,i,g);if(!v)throw m;return v.spatialReference=i,e.geometry=v,e}async function _(e){let{distance:t,units:a}=e,s=e.geometry;if(!t||"vertexAttributes"in s)return s;let l=s.spatialReference,o=a?h.fromJSON(a):(0,n.Ij)(l),d=l&&((0,p.EA)(l)||(0,p.K8)(l))?s:await(0,f.Nk)(l,p.KK).then(()=>(0,f.Cv)(s,p.KK)),{geodesicBufferExecute:c,geodesicBufferLoad:m}=await i.e(9159).then(()=>i(49159));await m();let y=c(d,t||1,{unit:o})??void 0;if(!y||!(0,u.Bi)(y)||0===y.rings.length)throw new r.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return y}function v(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}i.d(t,["VY",0,h,"v8",0,m])},62660(e,t,i){i.d(t,{tC:()=>v,c0:()=>_,xt:()=>x});var r=i(49186),a=i(94078),n=i(12176),s=i(60408),l=i(21325);function o(e,t,i){if(!e)return!1;let{coords:r,lengths:a,stride:n}=e,s=!1,l=0;for(let e of a)s=u(s,r,n,l,e,t,i),l+=e*n;return s}function u(e,t,i,r,a,n,s){let l=e,o=r;for(let e=r,u=r+a*i;e<u;e+=i){o=e+i,o===u&&(o=r);let a=t[e],d=t[e+1],c=t[o],p=t[o+1];(d<s&&p>=s||p<s&&d>=s)&&a+(s-d)/(p-d)*(c-a)<n&&(l=!l)}return l}var d=i(90708),c=i(51441),p=i(31464);const f="unsupported-query",h={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},m={esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},y={esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1},g={esriSpatialRelIntersects:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(6033)]).then(()=>i(55284)).then(e=>e.intersectsExecute),esriSpatialRelContains:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(2990)]).then(()=>i(51508)).then(e=>e.containsExecute),esriSpatialRelCrosses:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(919)]).then(()=>i(87778)).then(e=>e.crossesExecute),esriSpatialRelDisjoint:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(9722)]).then(()=>i(3157)).then(e=>e.disjointExecute),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(8740)]).then(()=>i(83371)).then(e=>e.overlapsExecute),esriSpatialRelTouches:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(8307)]).then(()=>i(67658)).then(e=>e.touchesExecute),esriSpatialRelWithin:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(100)]).then(()=>i(65487)).then(e=>e.withinExecute),esriSpatialRelRelation:null};async function x(e,t,i){if((0,s.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){let e=(0,d.Ye)(t,!1,!1);return t=>function(e,t){return o(e,t.coords[0],t.coords[1])}(e,t)}if("esriGeometryMultipoint"===i){let i=(0,d.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>function(e,t){let{coords:i,lengths:r,stride:a}=t;if(!r)return!1;for(let t=0,n=0;t<r.length;t++,n+=a)if(!o(e,i[n],i[n+1]))return!1;return!0}(i,e)}}if((0,s.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,a.qz)(t,(0,c.pL)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,a.rL)(t,(0,c.pL)(i,e));if("esriSpatialRelIntersects"===e){let e="mesh"===(r=i)?n.xB:(0,n.xK)(r);return r=>e(t,(0,c.pL)(i,r))}}var r;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");let l=await function(e){let t=g[e];if(null==t)throw Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>l(t,(0,c.pL)(i,e))}async function _(e,t,i){let{spatialRel:a,geometry:n}=e;if(n){if(null==(o=a)||!0!==h[o])throw new r.A(f,"Unsupported query spatial relationship",{query:e});if((0,l.fn)(n.spatialReference)&&(0,l.fn)(i)){if(!function(e){return null!=e&&!0===m[(0,s.$B)(e)]}(n))throw new r.A(f,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y[e]}(t))throw new r.A(f,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p.Nk)(e.geometry?.spatialReference,e.outSR)}}var o}function v(e){if((0,s.ZC)(e))return!0;if((0,s.Bi)(e)){for(let t of e.rings)if(5!==t.length||t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1;return!0}return!1}},86420(e,t,i){i.d(t,{I:()=>n,W:()=>a});var r=i(21818);async function a(e,t){if(!e)return null;let i=t.featureAdapter,{startTimeField:a,endTimeField:n}=e,s=1/0,l=-1/0;if(a&&n)await t.forEach(e=>{let t=i.getAttribute((0,r.z)(e),a),o=i.getAttribute((0,r.z)(e),n);null!=t&&!isNaN(t)&&(s=Math.min(s,t)),null!=o&&!isNaN(o)&&(l=Math.max(l,o))});else{let e=a||n;await t.forEach(t=>{let a=i.getAttribute((0,r.z)(t),e);null!=a&&!isNaN(a)&&(s=Math.min(s,a),l=Math.max(l,a))})}return{start:s,end:l}}function n(e,t,i){if(!t||!e)return null;let{startTimeField:r,endTimeField:a}=e;if(!r&&!a)return null;let{start:n,end:s}=t;if(null===n&&null===s)return null;if(void 0===n&&void 0===s)return()=>!1;let l=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return r&&a?function(e,t,i,r,a){return null!=r&&null!=a?n=>{let s=e(n,t),l=e(n,i);return(null==s||s<=a)&&(null==l||l>=r)}:null!=r?t=>{let a=e(t,i);return null==a||a>=r}:null!=a?i=>{let r=e(i,t);return null==r||r<=a}:void 0}(l,r,a,n,s):function(e,t,i,r){return null!=i&&null!=r&&i===r?r=>e(r,t)===i:null!=i&&null!=r?a=>{let n=e(a,t);return null!=n&&n>=i&&n<=r}:null!=i?r=>{let a=e(r,t);return null!=a&&a>=i}:null!=r?i=>{let a=e(i,t);return null!=a&&a<=r}:void 0}(l,r||a,n,s)}},5834(e,t,i){i.d(t,{A:()=>c});var r=i(32198),a=i(93637),n=i(91429),s=i(78888),l=i(41266),o=i(41366),u=i(93223);function d(e,t,i){(0,a.sM)(i,e instanceof Date?e.getTime():e,t)}let c=class extends((0,o.K)(l.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],c.prototype,"numBins",void 0),(0,r.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:d}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:d}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,n.$K)("esri.rest.support.AutoIntervalBinParameters")],c),c.from=(0,s.dp)(c)},41266(e,t,i){i.d(t,{A:()=>m});var r=i(32198),a=i(69540),n=i(66552),s=i(25482),l=i(91429),o=i(78888),u=i(93223);const d=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let c=class extends((0,a.OU)(s.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,r.Cg)([(0,l.MZ)({type:String,json:{name:"outAlias",write:!0}})],c.prototype,"alias",void 0),(0,r.Cg)([(0,l.MZ)({type:String})],c.prototype,"responseType",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"type",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"value",void 0),(0,r.Cg)([(0,u.e)(d)],c.prototype,"valueType",void 0),c=(0,r.Cg)([(0,l.$K)("esri.rest.support.AttributeBinsGrouping")],c);const p=c;c.from=(0,o.dp)(c);const f=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),h=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,a.OU)(s.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,r.Cg)([(0,l.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,r.Cg)([(0,u.e)(f,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,r.Cg)([(0,l.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,r.Cg)([(0,l.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,r.Cg)([(0,u.e)(h)],m.prototype,"transformation",void 0),m=(0,r.Cg)([(0,l.$K)("esri.rest.support.BinParametersBase")],m)},9760(e,t,i){i.d(t,{A:()=>d});var r=i(32198),a=i(66552),n=i(25482),s=i(91429),l=i(93223);const o=new a.J({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new a.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let d=class extends n.o{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,r.Cg)([(0,l.e)({classBreaksDef:"class-breaks-definition"})],d.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"breakCount",void 0),(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"classificationField",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{read:o.read,write:o.write}})],d.prototype,"classificationMethod",void 0),(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"normalizationField",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"normalizationType",void 0),(0,r.Cg)([(0,s.MZ)({value:null,json:{write:!0}})],d.prototype,"standardDeviationInterval",null),(0,r.Cg)([(0,s.MZ)({value:null,json:{write:!0}})],d.prototype,"definedInterval",null),d=(0,r.Cg)([(0,s.$K)("esri.rest.support.ClassBreaksDefinition")],d)},59977(e,t,i){i.d(t,{A:()=>y});var r=i(32198),a=i(93637),n=i(91429),s=i(78888),l=i(41266),o=i(69540),u=i(25482),d=i(57231),c=i(93223);let p=class extends((0,o.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,r.Cg)([(0,c.e)(d.g)],p.prototype,"unit",void 0),p=(0,r.Cg)([(0,n.$K)("esri.rest.support.DateBinTimeInterval")],p);const f=p;function h(e,t,i){(0,a.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){let i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,s.dp)(p);let y=class extends l.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,r.Cg)([(0,n.MZ)({cast:e=>null==e?null:"string"==typeof e?e:new Date(e),json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:h}}})],y.prototype,"end",void 0),(0,r.Cg)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,r.Cg)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,r.Cg)([(0,n.MZ)({cast:e=>null==e?null:"string"==typeof e?e:new Date(e),json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:h}}})],y.prototype,"start",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,r.Cg)([(0,c.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,r.Cg)([(0,n.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,s.dp)(y)},57231(e,t,i){const r=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});i.d(t,["g",0,r])},11440(e,t,i){i.d(t,{A:()=>u});var r=i(32198),a=i(93637),n=i(91429),s=i(78888),l=i(41266),o=i(93223);let u=class extends l.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,r.Cg)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,a.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,r.Cg)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,r.Cg)([(0,n.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,s.dp)(u)},60909(e,t,i){i.d(t,{A:()=>c});var r=i(32198),a=i(93637),n=i(91429),s=i(78888),l=i(41266),o=i(41366),u=i(93223);function d(e,t,i){(0,a.sM)(i,e instanceof Date?e.getTime():e,t)}let c=class extends((0,o.K)(l.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,r.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:d}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],c.prototype,"interval",void 0),(0,r.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:d}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,n.$K)("esri.rest.support.FixedIntervalBinParameters")],c),c.from=(0,s.dp)(c)},41366(e,t,i){var r=i(32198),a=i(66552),n=i(53966),s=i(91429),l=i(93223);const o=(0,a.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",d="field";i.d(t,["K",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&d||i&&u||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===d||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,l.e)(o,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i},"Q",0,o])},84892(e,t,i){i.d(t,{t:()=>n});var r=i(53966);function a(e,t){return Number(e.toFixed(t))}function n(e,t){let{normalizationTotal:i}=e;return{classBreaks:s(e,t),normalizationTotal:i}}function s(e,t){let i=e.definition,{classificationMethod:r,normalizationType:n,definedInterval:s}=i,u=i.breakCount??1,d=[],c=e.values;if(0===c.length)return[];c=c.sort((e,t)=>e-t);let[p,f]=t??[c.at(0),c.at(-1)];if("equal-interval"===r)if(c.length>=u){let e=(f-p)/u,t=p;for(let i=1;i<u;i++){let r=a(p+i*e,6);d.push({minValue:t,maxValue:r,label:l(t,r,n)}),t=r}d.push({minValue:t,maxValue:f,label:l(t,f,n)})}else c.forEach(e=>{d.push({minValue:e,maxValue:e,label:l(e,e,n)})});else if("natural-breaks"===r){let t=function(e){let t=[],i=[],r=Number.MIN_VALUE,a=1,n=-1;for(let s=0;s<e.length;s++){let l=e[s];l===r?(a++,i[n]=a):null!==l&&(t.push(l),r=l,a=1,i.push(a),n++)}return{uniqueValues:t,valueFrequency:i}}(c),i=e.valueFrequency||t.valueFrequency,r=o(t.uniqueValues,i,u),s=p;for(let e=1;e<u;e++)if(t.uniqueValues.length>e){let i=a(t.uniqueValues[r[e]],6);d.push({minValue:s,maxValue:i,label:l(s,i,n)}),s=i}d.push({minValue:s,maxValue:f,label:l(s,f,n)})}else if("quantile"===r)if(c.length>=u&&p!==f){let e=p,t=Math.ceil(c.length/u),i=0;for(let r=1;r<u;r++){let a=t+i-1;a>c.length&&(a=c.length-1),a<0&&(a=0),d.push({minValue:e,maxValue:c[a],label:l(e,c[a],n)}),e=c[a],i+=t,t=Math.ceil((c.length-i)/(u-r))}d.push({minValue:e,maxValue:f,label:l(e,f,n)})}else{let e=-1;for(let t=0;t<c.length;t++){let i=c[t];i!==e&&(e=i,d.push({minValue:e,maxValue:i,label:l(e,i,n)}),e=i)}}else if("standard-deviation"===r){let e=function(e){let t=0;for(let i=0;i<e.length;i++)t+=e[i];return t/=e.length,t}(c),t=function(e,t){let i=0;for(let r=0;r<e.length;r++){let a=e[r];i+=(a-t)*(a-t)}return i/=e.length,Math.sqrt(i)}(c,e);if(0===t)d.push({minValue:c[0],maxValue:c[0],label:l(c[0],c[0],n)});else{let i=function(e,t,i,r,a){let n=Math.max(r-e,t-r)/a/i;return n=n>=1?1:n>=.5?.5:.25,n}(p,f,u,e,t)*t,r=0,s=p;for(let t=u;t>=1;t--){let o=a(e-(t-.5)*i,6);d.push({minValue:s,maxValue:o,label:l(s,o,n)}),s=o,r++}let o=a(e+.5*i,6);d.push({minValue:s,maxValue:o,label:l(s,o,n)}),s=o,r++;for(let t=1;t<=u;t++)o=r===2*u?f:a(e+(t+.5)*i,6),d.push({minValue:s,maxValue:o,label:l(s,o,n)}),s=o,r++}}else if("defined-interval"===r){if(!s)return d;let[e,i]=t??[c.at(0),c.at(-1)],r=Math.ceil((i-e)/s),o=e;for(let t=1;t<r;t++){let i=a(e+t*s,6);d.push({minValue:o,maxValue:i,label:l(o,i,n)}),o=i}d.push({minValue:o,maxValue:i,label:l(o,i,n)})}return d}function l(e,t,i){let r=null;return r=e===t?i&&"percent-of-total"===i?e+"%":e.toString():i&&"percent-of-total"===i?e+"% - "+t+"%":e+" - "+t,r}function o(e,t,i){let r=e.length,a=[];i>r&&(i=r);for(let e=0;e<i;e++)a.push(Math.round(e*r/i-1));a.push(r-1);let n=u(a,e,t,i);return function(e,t,i,r,a,n){let s=0,l=0,o=0,u=0,c=!0;for(let p=0;p<2&&c;p++){0===p&&(c=!1);for(let p=0;p<n-1;p++)for(;i[p+1]+1!==i[p+2];){i[p+1]=i[p+1]+1;let n=d(p,i,r,a);o=n.sbMean,s=n.sbSdcm;let f=d(p+1,i,r,a);if(u=f.sbMean,l=f.sbSdcm,!(s+l<t[p]+t[p+1])){i[p+1]=i[p+1]-1;break}t[p]=s,t[p+1]=l,e[p]=o,e[p+1]=u,c=!0}for(let p=n-1;p>0;p--)for(;i[p]!==i[p-1]+1;){i[p]=i[p]-1;let n=d(p-1,i,r,a);o=n.sbMean,s=n.sbSdcm;let f=d(p,i,r,a);if(u=f.sbMean,l=f.sbSdcm,!(s+l<t[p-1]+t[p])){i[p]=i[p]+1;break}t[p-1]=s,t[p]=l,e[p-1]=o,e[p]=u,c=!0}}return c}(n.mean,n.sdcm,a,e,t,i)&&(n=u(a,e,t,i)),a}function u(e,t,i,r){let a=[],n=[],s=[],l=0,o=[],u=[];for(let a=0;a<r;a++){let r=d(a,e,t,i);o.push(r.sbMean),u.push(r.sbSdcm),l+=u[a]}let c,p=l,f=!0;for(;f||l<p;){f=!1,a=[];for(let t=0;t<r;t++)a.push(e[t]);for(let i=0;i<r;i++)for(let a=e[i]+1;a<=e[i+1];a++)if(c=t[a],i>0&&a!==e[i+1]&&Math.abs(c-o[i])>Math.abs(c-o[i-1]))e[i]=a;else if(i<r-1&&e[i]!==a-1&&Math.abs(c-o[i])>Math.abs(c-o[i+1])){e[i+1]=a-1;break}p=l,l=0,n=[],s=[];for(let a=0;a<r;a++){n.push(o[a]),s.push(u[a]);let r=d(a,e,t,i);o[a]=r.sbMean,u[a]=r.sbSdcm,l+=u[a]}}if(l>p){for(let t=0;t<r;t++)e[t]=a[t],o[t]=n[t],u[t]=s[t];l=p}return{mean:o,sdcm:u}}function d(e,t,i,a){let n=0,s=0;for(let r=t[e]+1;r<=t[e+1];r++){let e=a[r];n+=i[r]*e,s+=e}s<=0&&r.A.getLogger("esri.rest.support.generateRendererUtils").warn("Exception in Natural Breaks calculation");let l=n/s,o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=a[r]*(i[r]-l)**2;return{sbMean:l,sbSdcm:o}}},1873(e,t,i){i.d(t,{$y:()=>N,Ak:()=>D,FM:()=>h,G_:()=>p,Rw:()=>O,Vb:()=>d,b3:()=>A,gJ:()=>u,jM:()=>V,lv:()=>b,oZ:()=>w,qg:()=>f,sU:()=>z,z9:()=>c,zS:()=>C});var r=i(9760),a=i(84892);const n=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,s=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),l=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),o=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function u(e){return null==e||"string"==typeof e&&!e?"<Null>":e}function d(e){let t=null!=e.normalizationField||null!=e.normalizationType,i=null!=e.minValue||null!=e.maxValue,r=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!i&&!r}function c(e){let{outStatisticTypes:t}=e,i=e.returnDistinct?[...new Set(e.values)]:e.values,r=i.filter(e=>null!=e).sort(),a=r.length,n={count:a,min:r[0],max:r[a-1]};return e.supportsNullCount&&(n.nullcount=i.length-a),e.percentileParams&&(!t?.include?.length||t.include.includes("median"))&&(!t?.exclude?.length||!t.exclude.includes("median"))&&(n.median=f(i,e.percentileParams)),n}function p(e){let{values:t,useSampleStdDev:i,supportsNullCount:r,outStatisticTypes:a}=e,n=1/0,s=-1/0,l=null,o=null,u=null,d=null,c=0,p=null==e.minValue?-1/0:e.minValue,h=null==e.maxValue?1/0:e.maxValue;for(let e of t)Number.isFinite(e)?e>=p&&e<=h&&(l=null===l?e:l+e,n=Math.min(n,e),s=Math.max(s,e),c++):"string"==typeof e&&c++;if(c&&null!=l){o=l/c;let e=0;for(let i of t)Number.isFinite(i)&&i>=p&&i<=h&&(e+=(i-o)**2);d=i?c>1?e/(c-1):0:c>0?e/c:0,u=Math.sqrt(d)}else n=null,s=null;let m={avg:o,count:c,max:s,min:n,stddev:u,sum:l,variance:d};return r&&(m.nullcount=t.length-c),e.percentileParams&&(!a?.include?.length||a.include.includes("median"))&&(!a?.exclude?.length||!a.exclude.includes("median"))&&(m.median=f(t,e.percentileParams)),m}function f(e,t){let{fieldType:i,value:r,orderBy:a,isDiscrete:n}=t,s=h(i,"desc"===a,"case-insensitive");if(e=[...e].filter(e=>null!=e).sort((e,t)=>s(e,t)),0===e.length)return null;if(r<=0)return e[0];if(r>=1)return e[e.length-1];let l=(e.length-1)*r,o=Math.floor(l),u=o+1,d=l%1,c=e[o],p=e[u];return u>=e.length||n||"string"==typeof c||"string"==typeof p?c:c*(1-d)+p*d}function h(e,t,i="case-sensitive"){if(e){if(s.has(e))return R(t);if(l.has(e))return S(t,!0);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?_:x}(t);let r=S(t,"case-sensitive"===i);if("esriFieldTypeString"===e)return r;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>r(I(e),I(t))}let r=t?1:-1,a=R(t),n=S(t,"case-sensitive"===i),o=g(t);return(e,t)=>"number"==typeof e&&"number"==typeof t?a(e,t):"string"==typeof e&&"string"==typeof t?n(e,t):o(e,t)??r}const m=(e,t)=>null==e?null==t?0:1:null==t?-1:null,y=(e,t)=>null==e?null==t?0:-1:null==t?1:null;function g(e){return e?m:y}const x=(e,t)=>y(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),_=(e,t)=>m(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),v=(e,t)=>y(e,t)??(e===t?0:e<t?-1:1),T=(e,t)=>m(e,t)??(e===t?0:e<t?1:-1);function S(e,t){if(t)return e?T:v;let i=g(e);return e?(e,t)=>i(e,t)??((e=e.toUpperCase())>(t=t.toUpperCase())?-1:+(e<t)):(e,t)=>i(e,t)??((e=e.toUpperCase())<(t=t.toUpperCase())?-1:+(e>t))}const F=(e,t)=>m(e,t)??t-e,E=(e,t)=>y(e,t)??e-t;function R(e){return e?F:E}function I(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function w(e,t,i){let r;for(r in e)t?.include?.length&&!t.include.includes(r)||t?.exclude?.length&&t.exclude.includes(r)?delete e[r]:o.includes(r)&&(Number.isFinite(e[r])||(e[r]=null));return i&&["avg","stddev","variance"].forEach(t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))}),e}function A(e){let t={};for(let i of e)(null==i||"string"==typeof i&&""===i.trim())&&(i=null),null==t[i]?t[i]={count:1,data:i}:t[i].count++;return{count:t}}function M(e){return"coded-value"===e?.type?e.codedValues.map(e=>e.code):[]}function b(e,t,i,r){let a=e.count,n=[];if(i&&t){let e=[],i=M(t[0]);for(let a of i)if(t[1]){let i=M(t[1]);for(let n of i)if(t[2]){let i=M(t[2]);for(let t of i)e.push(`${u(a)}${r}${u(n)}${r}${u(t)}`)}else e.push(`${u(a)}${r}${u(n)}`)}else e.push(a);for(let t of e)a.hasOwnProperty(t)||(a[t]={data:t,count:0})}for(let e in a){let t=a[e];n.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:n}}function C(e,t,i,r){let a=null;switch(t){case"log":0!==e&&(a=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(r)&&0!==r&&(a=e/r*100);break;case"field":Number.isFinite(i)&&0!==i&&(a=e/i);break;case"natural-log":e>0&&(a=Math.log(e));break;case"square-root":e>0&&(a=e**.5)}return a}function O(e,t,i){let n=function(e){let{breakCount:t,field:i,normalizationField:a,normalizationType:n}=e,s=e.classificationMethod||"equal-interval",l="standard-deviation"===s?e.standardDeviationInterval||1:void 0,o="defined-interval"===s?e.definedInterval:void 0;return new r.A({breakCount:t,classificationField:i,classificationMethod:s,normalizationField:"field"===n?a:void 0,normalizationType:n,standardDeviationInterval:l,definedInterval:o})}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||5});return e=function(e,t,i){let r=t??-1/0,a=i??1/0;return e.filter(e=>Number.isFinite(e)&&e>=r&&e<=a)}(e,t.minValue,t.maxValue),(0,a.t)({definition:n,values:e,normalizationTotal:t.normalizationTotal},i)}function V(e,t){let i=e.classBreaks,r=i.length,a=i[0]?.minValue,s=i[r-1]?.maxValue,l="standard-deviation"===t,o=n;return i=i.map(e=>{let t=e.label,i={minValue:e.minValue,maxValue:e.maxValue,label:t};if(l&&t){let e=t.match(o)?.map(e=>+e.trim())??[];2===e.length?(i.minStdDev=e[0],i.maxStdDev=e[1],e[0]<0&&e[1]>0&&(i.hasAvg=!0)):1===e.length&&(t.includes("<")?(i.minStdDev=null,i.maxStdDev=e[0]):t.includes(">")&&(i.minStdDev=e[0],i.maxStdDev=null))}return i}),{minValue:a,maxValue:s,classBreakInfos:i,normalizationTotal:e.normalizationTotal}}function N(e,t){let i=z(e,t);if(null==i.min&&null==i.max)return{bins:[],minValue:i.min,maxValue:i.max,normalizationTotal:t.normalizationTotal};let r=i.intervals,a=i.min??0,n=i.max??0,s=r.map((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0}));for(let t of e)if(null!=t&&t>=a&&t<=n){let e=D(r,t);e>-1&&s[e].count++}return{bins:s,minValue:a,maxValue:n,normalizationTotal:t.normalizationTotal}}function z(e,t,i=!1){let{field:r,classificationMethod:a,standardDeviationInterval:n,definedInterval:s,normalizationType:l,normalizationField:o,normalizationTotal:u,minValue:c,maxValue:f}=t,h=t.numBins||10,m=null,y=null,g=null;if(a&&"equal-interval"!==a||l){let{classBreaks:t}=O(e,{field:r,normalizationType:l,normalizationField:o,normalizationTotal:u,classificationMethod:a,standardDeviationInterval:n,definedInterval:s,minValue:c,maxValue:f,numClasses:h},null!=c&&null!=f?[c,f]:void 0);m=t[0]?.minValue,y=t[t.length-1]?.maxValue,g=t.map(e=>[e.minValue,e.maxValue])}else{if(null!=c&&null!=f)m=c,y=f;else{let t=p({values:e,minValue:c,maxValue:f,useSampleStdDev:!l,supportsNullCount:d({normalizationType:l,normalizationField:o,minValue:c,maxValue:f})});m=t.min??null,y=t.max??null}g=function(e,t,i){let r,a=(t-e)/i,n=[],s=e;for(let e=1;e<=i;e++)r=s+a,r=Number(r.toFixed(16)),n.push([s,e===i?t:r]),s=r;return n}(m??0,y??0,h)}if(i&&g.length){let e=g.at(-1)[1];g.push([e,e])}return{min:m,max:y,intervals:g}}function D(e,t){let i=-1;for(let r=e.length-1;r>=0;r--)if(t>=e[r][0]){i=r;break}return i}},92359(e,t,i){i.d(t,{nu:()=>p,W6:()=>u}),i(4576),i(71511),i(44208),i(53966);var r=i(17676),a=(i(36708),i(44794),i(78659)),n=i(32198),s=i(69622),l=i(91429);let o=class extends s.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,n.Cg)([(0,l.MZ)()],o.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,n.Cg)([(0,l.MZ)()],o.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),o=(0,n.Cg)([(0,l.$K)("esri.views.support.debugFlags")],o),new o,i(49186),Symbol("Yield");const u={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S:"I3S",LYR3D:"Lyr3D",TILES3D:"3DTiles",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",SCREEN_POLYGON_INTERSECTION:"screen polygon intersection",OCCLUSION_QUERY:"occlusion query",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",GAUSSIAN_SPLAT_SORTING:"gaussian splat sorting",GAUSSIAN_SPLAT_TEXTURE_ATLAS:"gaussian splat texture atlas",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1};new Map([[u.RESOURCE_CONTROLLER_IMMEDIATE,0],[u.RESOURCE_CONTROLLER,4],[u.SLIDE,0],[u.STREAM_DATA_LOADER,0],[u.ELEVATION_QUERY,0],[u.TERRAIN_SURFACE,1],[u.SURFACE_GEOMETRY_UPDATES,1],[u.LOD_RENDERER,2],[u.GRAPHICS_CORE,2],[u.I3S,2],[u.LYR3D,2],[u.TILES3D,3],[u.POINT_CLOUD_LAYER,2],[u.FEATURE_TILE_FETCHER,2],[u.STREAM_CONTROLLER,2],[u.SCREEN_POLYGON_INTERSECTION,0],[u.CLOUDS_GENERATOR,2],[u.OCCLUSION_QUERY,2],[u.OVERLAY,4],[u.OVERLAY_RENDERER,4],[u.STAGE,4],[u.GRAPHICS_DECONFLICTOR,4],[u.FILTER_VISIBILITY,4],[u.SCALE_VISIBILITY,4],[u.FRUSTUM_VISIBILITY,4],[u.POINT_OF_INTEREST_FREQUENT,6],[u.POINT_OF_INTEREST_INFREQUENT,30],[u.LABELER,8],[u.FEATURE_QUERY_ENGINE,8],[u.FEATURE_TILE_TREE,16],[u.FEATURE_TILE_TREE_ACTIVE,0],[u.ELEVATION_ALIGNMENT,12],[u.ELEVATION_ALIGNMENT_SCENE,14],[u.TEXT_TEXTURE_ATLAS,12],[u.TEXTURE_UNLOAD,12],[u.LINE_OF_SIGHT_TOOL,16],[u.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[u.VOLUME_MEASUREMENT,4],[u.SNAPPING,0],[u.SHADOW_ACCUMULATOR,30],[u.FLOW_GENERATOR,12],[u.GAUSSIAN_SPLAT_SORTING,2],[u.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[u.MAPVIEW_FETCH_QUEUE,0],[u.MAPVIEW_LAYERVIEW_UPDATE,2],[u.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]),(0,a.l5)(6.5),(0,a.l5)(1),(0,a.l5)(30),(0,a.l5)(1e3/30),(0,a.l5)(100),Symbol.dispose;const d=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};d.enabled=!1;class c{remove(){}[Symbol.dispose](){this.remove()}processQueue(){}schedule(e,t,i){try{if((0,r.G4)(t)){let e=(0,r.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,r.z7)(e(d))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,r.G4)(t)){let e=(0,r.NK)();if(i)return i(e);throw e}let a=e(d);for(;;){let e=a.next(d),n=(0,r.$X)(e)?await e:e;if((0,r.G4)(t)){let e=(0,r.NK)();if(i){let t=i(e),n=a.return(null);return(0,r.$X)(n)&&await(0,r.QZ)(n),t}let t=a.throw(e);throw(0,r.$X)(t)&&await(0,r.QZ)(t),e}if(n.done)return n.value}}}const p=new c}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933(e,t,l){l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(34711),l(71020),l(72722),l(96336),l(53466),l(54154),l(9169),l(12696),l(72233),l(18e3),l(98619),l(20598),l(22393),l(59469),l(56529),l(51406),l(89435),l(58614),l(20693),l(33079),l(31821),l(63761),l(27832),l(47630),l(14113);var s=l(57323)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1948,4809,7992],{32198(e,t,r){function n(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function s(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,s;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}r.d(t,{Cg:()=>n,hk:()=>i,mS:()=>s}),Object.create,Object.create;var o="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function i(e){function t(t){e.error=e.hasError?new o(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function s(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(s);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(s,function(e){return t(e),s()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},1123(e,t,r){r.r(t),r.d(t,{invokeGeometryOp:()=>i});var n=r(83299);function s(e,t){let r;return{loaded:!1,load:()=>r??=t().then(t=>{o[e]={loaded:!0,execute:t}})}}const o={disjoint:s("disjoint",async()=>{let{OperatorDisjoint:e}=await r.e(7029).then(()=>r(97029)),t=new e;return(e,r,s)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),null)}),intersects:s("intersects",async()=>{let{OperatorIntersects:e}=await r.e(31).then(()=>r(70031)),t=new e;return(e,r,s)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),null)}),touches:s("touches",async()=>{let{OperatorTouches:e}=await r.e(6810).then(()=>r(46810)),t=new e;return(e,r,s)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),null)}),crosses:s("crosses",async()=>{let{OperatorCrosses:e}=await r.e(9821).then(()=>r(29821)),t=new e;return(e,r,s)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),null)}),within:s("within",async()=>{let{OperatorWithin:e}=await r.e(2802).then(()=>r(22802)),t=new e;return(e,r,s)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),null)}),contains:s("contains",async()=>{let{OperatorContains:e}=await r.e(892).then(()=>r(70892)),t=new e;return(e,r,s)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),null)}),overlaps:s("overlaps",async()=>{let{OperatorOverlaps:e}=await r.e(5181).then(()=>r(85181)),t=new e;return(e,r,s)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),null)}),equals:s("equals",async()=>{let{OperatorEquals:e}=await r.e(468).then(()=>r(70468)),t=new e;return(e,r,s)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),null)}),relate:s("relate",async()=>{let{OperatorRelate:e}=await r.e(9672).then(()=>r(39672)),t=new e;return(e,r,s,o)=>t.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s),o,null)}),intersection:s("intersection",async()=>{let{execute:e}=await r.e(1327).then(()=>r(33708));return(t,r,s)=>(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s)),null)}),union:s("union",async()=>{let{executeMany:e}=await r.e(8298).then(()=>r(28298));return(t,r)=>(0,n.toGeometry)(e(t.map(e=>(0,n.fromGeometryToGXGeometry)(e)),(0,n.fromSpatialReference)(r)),null)}),difference:s("difference",async()=>{let{execute:e}=await r.e(9074).then(()=>r(49074));return(t,r,s)=>(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s)),null)}),symmetricDifference:s("symmetricDifference",async()=>{let{execute:e}=await r.e(994).then(()=>r(68613));return(t,r,s)=>(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s)),null)}),clip:s("clip",async()=>{let{execute:e}=await r.e(6027).then(()=>r(96027));return(t,r,s)=>(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromGeometryToGXGeometry)(r).asEnvelope2D(),(0,n.fromSpatialReference)(s)),null)}),cut:s("cut",async()=>{let{execute:e}=await r.e(756).then(()=>r(90756));return(t,r,s)=>e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(s)).map(e=>(0,n.toGeometry)(e,null)).filter(e=>null!=e)}),area:s("area",async()=>{let{convertFromSpatialReferenceUnit:e,toAreaUnit:t}=await r.e(547).then(()=>r(40547));return(r,s,o)=>{let i=(0,n.fromGeometryToGXGeometry)(r).calculateArea2D();return e(s,t(o),i)}}),geodeticArea:s("geodeticArea",async()=>{let{load:e,execute:t}=await r.e(6742).then(()=>r(86742)),{convert:s,squareMeters:o,toAreaUnit:i}=await r.e(547).then(()=>r(40547));return await e(),(e,r,a,l)=>{let u=t((0,n.fromGeometryToGXGeometry)(e),(0,n.fromSpatialReference)(r),l);return s(o,i(a),u)}}),length:s("length",async()=>{let{convertFromSpatialReferenceUnit:e,toLengthUnit:t}=await r.e(547).then(()=>r(40547));return(r,s,o)=>{let i=(0,n.fromGeometryToGXGeometry)(r).calculateLength2D();return e(s,t(o),i)}}),geodeticLength:s("geodeticLength",async()=>{let{load:e,execute:t}=await r.e(5223).then(()=>r(35223)),{convert:s,meters:o,toLengthUnit:i}=await r.e(547).then(()=>r(40547));return await e(),(e,r,a,l)=>{let u=t((0,n.fromGeometryToGXGeometry)(e),(0,n.fromSpatialReference)(r),l);return s(o,i(a),u)}}),distance:s("distance",async()=>{let{OperatorDistance:e}=await r.e(2994).then(()=>r(22994)),{convertFromSpatialReferenceUnit:t,toLengthUnit:s}=await r.e(547).then(()=>r(40547)),o=new e;return(e,r,i,a)=>{let l=o.execute((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),null);return t(i,s(a),l)}}),geodeticDistance:s("geodeticDistance",async()=>{let{load:e,execute:t}=await r.e(9716).then(()=>r(29716)),{convert:s,meters:o,toLengthUnit:i}=await r.e(547).then(()=>r(40547));return await e(),(e,r,a,l,u)=>{let m=t((0,n.fromGeometryToGXGeometry)(e),(0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(a),u);return s(o,i(l),m)}}),densify:s("densify",async()=>{let{execute:e}=await r.e(1735).then(()=>r(91735)),{convertToSpatialReferenceUnit:t,toLengthUnit:s}=await r.e(547).then(()=>r(40547));return(r,o,i,a)=>(i=t(s(a),o,i),(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(r),i,0,0),null))}),geodeticDensify:s("geodeticDensify",async()=>{let{load:e,execute:t}=await r.e(7085).then(()=>r(77085)),{convert:s,meters:o,toLengthUnit:i}=await r.e(547).then(()=>r(40547));return await e(),(e,r,a,l,u)=>(a=s(i(l),o,a),(0,n.toGeometry)(t((0,n.fromGeometryToGXGeometry)(e),a,(0,n.fromSpatialReference)(r),u),null))}),generalize:s("generalize",async()=>{let{execute:e}=await r.e(787).then(()=>r(70787)),{convertToSpatialReferenceUnit:t,toLengthUnit:s}=await r.e(547).then(()=>r(40547));return(r,o,i,a,l)=>(i=t(s(a),o,i),(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(r),i,l),null))}),buffer:s("buffer",async()=>{let{execute:e}=await Promise.all([r.e(6870),r.e(5227)]).then(()=>r(15227)),{convertToSpatialReferenceUnit:t,toLengthUnit:s}=await r.e(547).then(()=>r(40547));return(r,o,i,a)=>(i=t(s(a),o,i),(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(o),i),null))}),geodesicBuffer:s("geodesicBuffer",async()=>{let{load:e,execute:t}=await r.e(4988).then(()=>r(24988)),{convert:s,meters:o,toLengthUnit:i}=await r.e(547).then(()=>r(40547));return await e(),(e,r,a,l,u)=>(a=s(i(l),o,a),(0,n.toGeometry)(t((0,n.fromGeometryToGXGeometry)(e),(0,n.fromSpatialReference)(r),u,a,NaN),null))}),offset:s("offset",async()=>{let{execute:e}=await Promise.all([r.e(6870),r.e(6070)]).then(()=>r(66070)),{convertToSpatialReferenceUnit:t,toLengthUnit:s}=await r.e(547).then(()=>r(40547));return(r,o,i,a,l,u,m)=>(i=t(s(a),o,i),(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(r),(0,n.fromSpatialReference)(o),i,l,u,m),null))}),rotate:s("rotate",async()=>{let{executeRotate:e}=await r.e(4791).then(()=>r(64791));return(t,r,s,o)=>(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(t),r,s,o),null)}),centroid:s("centroid",async()=>{let{OperatorCentroid2D:e}=await r.e(9447).then(()=>r(9447)),t=new e;return e=>{let r=t.execute((0,n.fromGeometryToGXGeometry)(e),null);return r.isNAN()?null:{x:r.x,y:r.y}}}),labelPoint:s("labelPoint",async()=>{let{execute:e}=await r.e(4945).then(()=>r(54945));return t=>(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(t)),null)}),multiPartToSinglePart:s("multiPartToSinglePart",async()=>{let{executeMany:e}=await r.e(3193).then(()=>r(33193));return(t,r)=>e([(0,n.fromGeometryToGXGeometry)(t)],(0,n.fromSpatialReference)(r)).map(e=>(0,n.toGeometry)(e,null)).filter(e=>null!=e)}),isSelfIntersecting:s("isSelfIntersecting",async()=>{let{executeIsSelfIntersecting:e}=await r.e(3755).then(()=>r(83755));return(t,r)=>e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromSpatialReference)(r))}),isSimple:s("isSimple",async()=>{let{isSimpleAsFeature:e}=await r.e(1150).then(()=>r(81150));return(t,r)=>e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromSpatialReference)(r),!1)}),simplify:s("simplify",async()=>{let{execute:e}=await r.e(1150).then(()=>r(81150));return(t,r)=>(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromSpatialReference)(r),!1),null)}),convexHull:s("convexHull",async()=>{let{execute:e}=await r.e(1577).then(()=>r(91577));return t=>(0,n.toGeometry)(e((0,n.fromGeometryToGXGeometry)(t)),null)}),getNearestCoordinate:s("getNearestCoordinate",async()=>{let{executeNearestCoordinate:e}=await r.e(6556).then(()=>r(6556));return(t,r)=>{let s=e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromGeometryToGXGeometry)(r));return null==s?null:{...s,coordinate:(0,n.toGeometry)(s.coordinate,null)}}}),getNearestVertex:s("getNearestVertex",async()=>{let{executeNearestVertex:e}=await r.e(4064).then(()=>r(64064));return(t,r)=>{let s=e((0,n.fromGeometryToGXGeometry)(t),(0,n.fromGeometryToGXGeometry)(r));return null==s?null:{...s,coordinate:(0,n.toGeometry)(s.coordinate,null)}}})};function i(e,t){let r=o[e];return r.loaded?r.execute.apply(void 0,t):r.load().then(()=>i(e,t))}},61691(e,t,r){r.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,r){r.d(t,{S:()=>s});var n=r(61691);class s extends n.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){let e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},34304(e,t,r){r.d(t,{DF:()=>l,FD:()=>s,ct:()=>u});let n=1e-6;function s(){return n}const o=Math.random,i=Math.PI/180,a=180/Math.PI;function l(e){return e*i}function u(e){return e*a}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:o,equals:function(e,t){return Math.abs(e-t)<=n*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:s,setEpsilon:function(e){n=e},toDegree:u,toRadian:l},Symbol.toStringTag,{value:"Module"})),r.d(t,["Ov",0,o])},69397(e,t,r){r.d(t,{Qf:()=>a,Qh:()=>o,lM:()=>s});var n=r(34275);function s(e){if(!e)return 0;let t=u;for(let r in e)e.hasOwnProperty(r)&&(t+=i(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return a(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=m;for(let n=0;n<t;n++)r+=i(e[n]);return r}(e);let t=u;for(let r in e)e.hasOwnProperty(r)&&(t+=i(e[r]));return t}function i(e,t=!0){switch(typeof e){case"object":return t?o(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+h:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return m+e.length*t}const u=32,m=16,h=145},87992(e,t,r){r.d(t,{JR:()=>T,ME:()=>w,MY:()=>R,NO:()=>v,Nh:()=>M,V2:()=>P,_s:()=>A,e6:()=>F,gh:()=>S,jm:()=>C,tr:()=>I,uX:()=>g});var n=r(32198),s=r(16930),o=r(19419),i=r(60408),a=r(21325),l=r(513),u=r(50954),m=r(79567),h=r(52006),f=r(49663),c=r(46068),y=r(92722);class g{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:n,vertexZ:s,vertexM:o,partCount:i,partOffsets:a,partFlags:l,segmentFlags:u,segmentIndices:m,segmentParams:h,segmentCountArc:f,segmentCountBezier:c}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=n,this.vertexZ=s,this.vertexM=o,this.partCount=i,this.partOffsets=a,this.partFlags=l,this.segmentFlags=u,this.segmentIndices=m,this.segmentParams=h,this.segmentCountArc=f,this.segmentCountBezier=c}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){let{type:e,vertexCount:t,partCount:r,hasZ:n,hasM:s,segmentCountArc:o,segmentCountBezier:i}=this,a=P(e,t,r,n,s,this.hasCurves(),o,i);a.spatialReference=this.spatialReference;let{vertexXY:l,vertexZ:u,vertexM:m}=this;if(a.vertexXY.set(l.subarray(0,2*t),0),a.vertexZ?.set(u.subarray(0,t),0),a.vertexM?.set(m.subarray(0,t),0),this.isMultipart()){let{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,r+1)),a.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){let{segmentFlags:e,segmentIndices:r,segmentParams:n,segmentParamCount:s}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(r.subarray(0,t),0),a.segmentParams.set(n.subarray(0,s),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,a.aI)(this.spatialReference,e.spatialReference)||this.vertexCount!==e.vertexCount||this.partCount!==e.partCount||this.hasZ!==e.hasZ||this.hasM!==e.hasM||this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;let r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new p(this):[][Symbol.iterator]()}}class p{constructor(e){this.geometry=e,this.value=new d(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(e){this.geometry=e,this.index=-1,this._readVertex=O(e),this._segments=new x(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class x{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this.value=new G(e.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class G{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=O(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;let t=this.geometry.segmentParams,r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){let e=t[r++],n=t[r++],s=t[r++],o=t[r++];return{b:[this.end,[e,n],[s,o]]}}let n=t[r++],s=t[r++],o=t[r++],i=t[r++],a=t[r++],l=t[r++];r++,r++;let u=t[r++],m=t[r++];if(!(4&n)&&1===o)return{c:[this.end,[u,m]]};let h=2&n?0:1,f=1&n?0:1;return{a:[this.end,[a,l],h,f,i,s,o]}}}function v(e,t){let r={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,n.mS)(r,new X(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t,{vertexCount:r,vertexXY:s,vertexZ:i,vertexM:a}=e,l=E(e);if(e.hasCurves()){let r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,new X(e,["vertexZ","vertexM"]),!1);let s=(0,o.Ie)();for(let t of e.parts){let e=t.startVertex;for(let{curve:r}of t.segments)(0,m.e)(s,e,r),e=(0,h.yP)(r)}let[i,a,u,f]=s;t={xmin:i,ymin:a,xmax:u,ymax:f,spatialReference:l}}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}else{let e,n,o,i;e=n=1/0,o=i=-1/0;for(let t=0;t<r;++t){let r=s[2*t],a=s[2*t+1];e=Math.min(e,r),o=Math.max(o,r),n=Math.min(n,a),i=Math.max(i,a)}t={xmin:e,ymin:n,xmax:o,ymax:i,spatialReference:l}}if(i){let e=1/0,r=-1/0;for(let t of i)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(a){let e=1/0,r=-1/0;for(let t of a)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}function w(e){let t,r,n;if((0,i.fT)(e)){n="point";let{x:s,y:o,z:i,m:a}=e,l=[s,o];null!=i&&l.push(i),null!=a&&l.push(a),r=[[l]],t=1}else(0,i.U9)(e)?(n="multipoint",r=[e.points],t=e.points.length):(0,i.Rg)(e)?(n="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(n="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,b(t[0],(0,h.yP)(t.at(-1)))&&--e),e),0));let s=P(n,t,n.includes("point")?0:r.length,(0,i.Pv)(e),(0,i.W0)(e),(0,h.Ed)(e)),{hasZ:o,hasM:a,vertexXY:l,vertexZ:u,vertexM:m}=s;function f(e){l[2*y]=e[0],l[2*y+1]=e[1],o&&(u[y]=e[2]),a&&(m[y]=e[c]),++y}s.spatialReference=e.spatialReference??void 0;let c=s.hasZ?3:2,y=0;if(!s.isMultipart()){if(!o&&!a){for(let[e,t]of r[0])l[2*y]=e,l[2*y+1]=t,++y;return s}for(let e of r[0])f(e);return s}let g="polygon"===n,{partOffsets:p}=s,d=0;if(!(0,h.Ed)(e)){for(let e of r){if(p[d++]=y,0===e.length)continue;let t=e.length;if(g&&b(e[0],e.at(-1))&&--t,o||a)for(let r=0;r<t;++r)f(e[r]);else for(let r=0;r<t;++r){let[t,n]=e[r];l[2*y]=t,l[2*y+1]=n,++y}}return p[d]=y,s}function x(e){let t=G+e;if(t<=(s.segmentParams?.length??0))return;let r=t*V;r=20*Math.ceil(r/20);let n=s.segmentParams;s.segmentParams=new Float64Array(r),null!=n&&s.segmentParams.set(n)}let G=0;for(let e of r){if(s.partOffsets[d++]=y,0===e.length)continue;let t=e[0],r=t;for(let t=1;t<e.length;++t){let n=e[t];f(r);let o=y-1;(0,h.wY)(n)?(x(10),++s.segmentCountArc,G=A(r,n,s,o,G),r=n.a[0]):(0,h.DA)(n)?(x(10),++s.segmentCountArc,G=_(r,n,s,o,G),r=n.a[0]):(0,h.aO)(n)?(x(10),++s.segmentCountArc,G=F(r,n,s,o,G),r=n.c[0]):(0,h.n1)(n)?(x(4),++s.segmentCountBezier,G=I(0,n,s,o,G),r=n.b[0]):r=n}g&&b(t,r)||f(r)}return s.partOffsets[d]=y,s}function S(e){let t=O(e),{vertexCount:r,partCount:n,hasZ:s,hasM:o}=e,i=E(e),a=0;if(!e.isMultipart()){if("point"===e.type){let[t,r]=e.vertexXY;return{x:t,y:r,z:e.vertexZ?.[0],m:e.vertexM?.[0],spatialReference:i}}let n=[];for(;a<r;)n.push(t(a++));return{points:n,spatialReference:i,hasZ:s,hasM:o}}if(!e.hasCurves()){let r=[];for(let s=0;s<n;++s){let n=!!(1&e.partFlags[s]),o=e.partOffsets[s+1],i=[];for(;a<o;)i.push(t(a++));n&&i.length>0&&i.push([...i[0]]),r.push(i)}return"polygon"===e.type?{rings:r,hasZ:s,hasM:o,spatialReference:i}:{paths:r,hasZ:s,hasM:o,spatialReference:i}}let l=[];for(let{segments:t,startVertex:r}of e.parts){let e=[r];for(let{curve:r}of t)e.push(r);l.push(e)}return"polygon"===e.type?{rings:[],curveRings:l,hasZ:s,hasM:o,spatialReference:i}:{paths:[],curvePaths:l,hasZ:s,hasM:o,spatialReference:i}}function M(e,{lengths:t,coords:r,hasZ:n,hasM:s},o){let i=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?i:0);n??=!1,s??=!1;let u=P(e,l,i,n,s,!1,0,0);if(u.spatialReference=o??void 0,!u.isMultipart()){for(let e=0,t=0;e<l;++e)u.vertexXY[2*e]=r[t++],u.vertexXY[2*e+1]=r[t++],n&&(u.vertexZ[e]=r[t++]),s&&(u.vertexM[e]=r[t++]);return u}let m=2+Number(n)+Number(s),h=0,f=0;u.partOffsets[0]=0;for(let e of t){let t=u.partOffsets[f],o=t+e-Number(a);u.partOffsets[++f]=o;for(let e=t;e<o;++e)u.vertexXY[2*e]=r[h++],u.vertexXY[2*e+1]=r[h++],n&&(u.vertexZ[e]=r[h++]),s&&(u.vertexM[e]=r[h++]);a&&(h+=m)}return u}function T({type:e,vertexCount:t,vertexXY:r,vertexZ:n,vertexM:s,partCount:o,partOffsets:i,partFlags:a,hasZ:l,hasM:u}){let m=new y.A([],[],l,u);o=Math.max(o,1);let h=0;for(let e=0;e<o;++e){let o=i?.[e+1]??t,f=m.coords.length;for(let e=h;e<o;++e)m.coords.push(r[2*e],r[2*e+1]),l&&m.coords.push(n[e]),u&&m.coords.push(s[e]);if(a&&1&a[e]){let e=h;m.coords.push(r[2*e],r[2*e+1]),l&&m.coords.push(n[e]),u&&m.coords.push(s[e])}m.lengths.push((m.coords.length-f)/m.stride),h=o}return"point"===e&&(m.lengths.length=0),m}function C(...e){let t=new Set;for(let r of e){if(!r)continue;let e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(let r of e){let e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function R(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;let t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===r)&&(n=void 0);let s=e.getVCS();if(null==s)return{wkid:r,latestWkid:n,wkt:t};let o=s.isCustomWkid()?0:s.getOldID();if(o<=0)return{wkt:t};let i=e.getLatestVerticalID();return(i<=0||i===o)&&(i=void 0),{wkid:r,wkt:t,latestWkid:n,vcsWkid:o,latestVcsWkid:i}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class X{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(let r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function E({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function O({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?n=>[e[2*n],e[2*n+1],t[n],r[n]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function b(e,t){return e.every((e,r)=>e===t[r])}function P(e,t,r,n,s,o,i,a){i??=0,a??=0;let l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:i,segmentCountBezier:a}),u=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(u+=Float64Array.BYTES_PER_ELEMENT*t),s&&(u+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(u+=(r+1)*Int32Array.BYTES_PER_ELEMENT,u+=(r+1)*Int8Array.BYTES_PER_ELEMENT),o&&(u+=t*Int8Array.BYTES_PER_ELEMENT,u+=t*Int32Array.BYTES_PER_ELEMENT,u+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let m=new ArrayBuffer(u),h=0;return l.vertexXY=new Float64Array(m,h,2*t),h+=l.vertexXY.byteLength,n&&(l.vertexZ=new Float64Array(m,h,t),h+=l.vertexZ.byteLength),s&&(l.vertexM=new Float64Array(m,h,t),h+=l.vertexM.byteLength),o&&(l.segmentParams=new Float64Array(m,h,l.segmentParamCount),h+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(m,h,t),l.segmentIndices.fill(Y),h+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(m,h,r+1),h+=l.partOffsets.byteLength,l.partFlags=new Int8Array(m,h,r+1),h+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,r).fill(1)),o&&(l.segmentFlags=new Int8Array(m,h,t),l.segmentFlags.fill(1),h+=l.segmentFlags.byteLength),l}function A(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},o,i){r[o]=4,n[o]=i;let[a,[l,u],m,h,f,y,g]=t.a,p=4;h||(p|=1),m||(p|=2);let d=(0,c.SW)(e,t),[x,G]=(0,c.Uk)(d,.5);return s[i++]=p,s[i++]=y,s[i++]=g,s[i++]=f,s[i++]=l,s[i++]=u,s[i++]=d.u2-d.u1,s[i++]=d.u1,s[i++]=x,s[i++]=G,i}function _(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},o,i){r[o]=4,n[o]=i;let a=(0,f.io)(e,t);return Z(a,4,...(0,l.mq)(a,.5),s,i)}function F(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},o,i){return r[o]=4,n[o]=i,Z((0,u.pM)(e,t),0,...t.c[1],s,i)}function Z(e,t,r,n,s,o){let{cx:i,cy:a,thetaStart:l,thetaEnd:u,radius:m}=e;return l>u||(t|=1),Math.abs(u-l)<=Math.PI||(t|=2),s[o++]=t,s[o++]=m,s[o++]=1,s[o++]=0,s[o++]=i,s[o++]=a,s[o++]=u-l,s[o++]=l,s[o++]=r,s[o++]=n,o}function I(e,{b:[t,[r,n],[s,o]]},{segmentFlags:i,segmentIndices:a,segmentParams:l},u,m){return i[u]=2,a[u]=m,l[m++]=r,l[m++]=n,l[m++]=s,l[m++]=o,m}const V=1.61803,Y=-1},52006(e,t,r){function n(e){return"curveRings"in e&&!!e.curveRings?.length||"curvePaths"in e&&!!e.curvePaths?.length}function s(e){return"curveRings"in e?e.curveRings:e.curvePaths}function o(e){return"b"in e}function i(e){return"c"in e}function a(e){return Array.isArray(e)}function l(e){return"a"in e}function u(e){return"a"in e&&4===e.a.length}function m(e){return"a"in e&&7===e.a.length}function h(e,t){return s(e).flat().some(e=>function(e,t){return!(a(e)||(o(e)?t.has("cubic-bezier"):i(e)?t.has("circular-arc"):!u(e)&&!m(e)||t.has("elliptic-arc")))}(e,t))}function f(e){return a(e)?e:o(e)?e.b[0]:i(e)?e.c[0]:e.a[0]}function c(e){if(o(e)){let[t,r,n]=e.b;return{b:[[...t],[...r],[...n]]}}if(i(e)){let[t,r]=e.c;return{c:[[...t],[...r]]}}if(a(e))return[...e];if(u(e)){let[t,r,n,s]=e.a;return{a:[[...t],[...r],n,s]}}if(m(e)){let[t,r,n,s,o,i,a]=e.a;return{a:[[...t],[...r],n,s,o,i,a]}}return e}r.d(t,{DA:()=>u,Ed:()=>n,FD:()=>s,FG:()=>l,V8:()=>h,Xq:()=>a,aO:()=>i,n1:()=>o,tk:()=>c,wY:()=>m,yP:()=>f}),r(4576)},60408(e,t,r){function n(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function s(e){return void 0!==e.points}function o(e){return void 0!==e.x&&void 0!==e.y}function i(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?o(e)?"esriGeometryPoint":i(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":n(e)?"esriGeometryEnvelope":s(e)?"esriGeometryMultipoint":null:null}function m(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}r.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>m,Rg:()=>i,U9:()=>s,W0:()=>h,ZC:()=>n,fT:()=>o,uW:()=>l})},92722(e,t,r){r.d(t,{A:()=>s});var n=r(69397);class s{constructor(e=[],t=[],r=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:n}){return new s(e,t,r||!1,n||!1)}static fromRect([e,t,r,n]){let o=r-e,i=n-t;return new s([5],[e,t,o,0,0,i,-o,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:n}=this,s=this.coords[n*t],o=this.coords[n*t+1];for(let i=1;i<r;i+=1){let r=n*(t+i),a=this.coords[r],l=this.coords[r+1];e+=-.5*(a-s)*(l+o),s=a,o=l}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let n of this.lengths){for(let s=0;s<n;s++){let n=r*(t+s);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,n=0,{stride:s}=this;for(let e of r){for(let r=1;r<e;r++){let e=s*(n+r);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}n+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:n}=this,o=this.coords.slice(0,n*r);return e?(e.set(o),new s(t,e,this.hasZ,this.hasM)):new s(t,Array.from(o),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,n=0;t<r.length;t+=e)r[n++]=this.coords[t],r[n++]=this.coords[t+1];return new s(this.lengths,r,!1,!1)}}}}]);