@arcgis/core 4.34.0-next.52 → 4.34.0-next.54

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 (139) hide show
  1. package/applications/Components/formatUtils.d.ts +3 -0
  2. package/applications/Components/formatUtils.js +5 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{35fc8a64674005b1d1d7.js → 0a4357af5b8c0532b439.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{e58336aafe8c95bb6831.js → 0eb728cee6e40cb30c01.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{b87ed14fde381f79bc9f.js → 17776d9d3558d45ea7b5.js} +1 -1
  7. package/assets/esri/core/workers/chunks/23f54b49742098def8ae.js +1 -0
  8. package/assets/esri/core/workers/chunks/2efa4d8fe5454f8b2a05.js +1 -0
  9. package/assets/esri/core/workers/chunks/{a69e885336eb5d2729fd.js → 3505988ce3839cdbbc98.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{46ab551bd19e52e73649.js → 3800764932a1c32cb29f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +1 -0
  12. package/assets/esri/core/workers/chunks/435169b455fd2846799b.js +1 -0
  13. package/assets/esri/core/workers/chunks/{77493aa2118d462612a0.js → 43bd338bb0de375b9bb7.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{5a016dcd3192d42d363e.js → 5fc414fc2cfc68828c5b.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{ecd673eccf89643df07a.js → 659f7e99b2d524ef53fb.js} +2 -2
  16. package/assets/esri/core/workers/chunks/69e6000044bfb03776ac.js +1 -0
  17. package/assets/esri/core/workers/chunks/{037bc400257bc13b3ec8.js → 772e81e9162e2240a7a6.js} +1 -1
  18. package/assets/esri/core/workers/chunks/813efde41e90e652b7db.js +1 -0
  19. package/assets/esri/core/workers/chunks/82404ff7c298493ff6f4.js +1 -0
  20. package/assets/esri/core/workers/chunks/{f1de768b0a6d345f7e39.js → 8f6ff09e7d2f01b79faf.js} +1 -1
  21. package/assets/esri/core/workers/chunks/9639a6f6fab52a501bf7.js +1 -0
  22. package/assets/esri/core/workers/chunks/{cfa8b17cf1349f6ed355.js → 9e9be7f6ea32957f1088.js} +1 -1
  23. package/assets/esri/core/workers/chunks/9fef330b241f958b55df.js +1 -0
  24. package/assets/esri/core/workers/chunks/aab349d4624b78ef429f.js +1 -0
  25. package/assets/esri/core/workers/chunks/b9f5672093727c6f92c9.js +1 -0
  26. package/assets/esri/core/workers/chunks/bcc233a86e01ff1eac16.js +1 -0
  27. package/assets/esri/core/workers/chunks/cac060a187f3a27a19ba.js +1 -0
  28. package/assets/esri/core/workers/chunks/cda27c0fafd687dfa72e.js +1 -0
  29. package/assets/esri/core/workers/chunks/{82a390be9500b629f6bc.js → d0bf1fc6e3c198bc565d.js} +1 -1
  30. package/assets/esri/core/workers/chunks/dd120d562b63618e71c0.js +1 -0
  31. package/assets/esri/core/workers/chunks/dd2b5f115d156b5b212e.js +1 -0
  32. package/assets/esri/core/workers/chunks/e28d3ed65c3a76a044c8.js +1 -0
  33. package/assets/esri/core/workers/chunks/{fb4950995f6780f6c22a.js → ee0286b5f5475f2d853f.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{c5b2a261d8c216ca4a10.js → f8505bf69795f5293a79.js} +1 -1
  35. package/assets/esri/core/workers/chunks/fae6030a81cb91a91b69.js +1 -0
  36. package/assets/esri/core/workers/chunks/ff7962063d132c1ec814.js +1 -0
  37. package/assets/esri/themes/base/widgets/_FloorFilter.scss +23 -19
  38. package/assets/esri/themes/dark/main.css +1 -1
  39. package/assets/esri/themes/light/main.css +1 -1
  40. package/assets/esri/themes/light/view.css +1 -1
  41. package/config.js +1 -1
  42. package/geometry/operators/json/graphicBufferOperator.js +5 -0
  43. package/geometry/support/coordinateSystem.js +1 -1
  44. package/interfaces.d.ts +93 -185
  45. package/kernel.js +1 -1
  46. package/layers/KMLLayer.js +1 -1
  47. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  48. package/layers/graphics/data/QueryEngine.js +1 -1
  49. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  50. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  51. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  52. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  53. package/layers/support/ElevationQuery.js +1 -1
  54. package/layers/support/ExportImageParameters.js +1 -1
  55. package/networks/UtilityNetwork.js +1 -1
  56. package/networks/support/typeUtils.js +1 -1
  57. package/package.json +3 -3
  58. package/portal/Portal.js +1 -1
  59. package/renderers/support/rasterRendererHelper.js +1 -1
  60. package/renderers/support/utils.js +1 -1
  61. package/rest/featureService/FeatureService.js +1 -1
  62. package/rest/networks/support/Circuit.js +5 -0
  63. package/rest/networks/support/CircuitSection.js +1 -1
  64. package/rest/networks/support/Subcircuit.js +1 -1
  65. package/rest/print.js +1 -1
  66. package/support/revision.js +1 -1
  67. package/symbols/cim/CIMEffects.js +1 -1
  68. package/symbols/cim/effects/EffectOffset.js +1 -1
  69. package/views/2d/analysisViewModuleImportUtils.js +5 -0
  70. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  71. package/views/2d/input/MapViewInputManager.js +1 -1
  72. package/views/2d/layers/LayerView2D.js +1 -1
  73. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  74. package/views/3d/analysis/ElevationProfile/HoveredPointsVisualization.js +1 -1
  75. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  76. package/views/3d/analysis/Viewshed/FieldOfViewManipulation.js +1 -1
  77. package/views/3d/analysisViewModuleImportUtils.js +5 -0
  78. package/views/3d/input/SceneInputManager.js +1 -1
  79. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  80. package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
  81. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  82. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  83. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  84. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  85. package/views/3d/terrain/TerrainSurface.js +1 -1
  86. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  87. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  88. package/views/SceneView.js +1 -1
  89. package/views/ToolViewManager.js +1 -1
  90. package/views/View.js +1 -1
  91. package/views/View2D.js +1 -1
  92. package/views/draw/Draw.js +1 -1
  93. package/views/draw/DrawGraphicTool.js +1 -1
  94. package/views/draw/DrawOperation.js +1 -1
  95. package/views/draw/LegacyDrawManipulator.js +1 -1
  96. package/views/draw/support/Box.js +1 -1
  97. package/views/draw/support/GraphicMover.js +1 -1
  98. package/views/draw/support/Reshape.js +1 -1
  99. package/views/input/InputManager.js +1 -1
  100. package/views/input/handlers/LatestPointer.js +1 -1
  101. package/views/interactive/InteractiveToolBase.js +1 -1
  102. package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
  103. package/views/interactive/Tooltip.js +1 -1
  104. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  105. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  106. package/views/layers/support/popupUtils.js +1 -1
  107. package/views/support/AnalysisViewManager.js +5 -0
  108. package/views/support/PromiseQueue.js +5 -0
  109. package/views/support/Scheduler.js +1 -1
  110. package/widgets/Feature/FeatureViewModel.js +1 -1
  111. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  112. package/widgets/FloorFilter/css.js +1 -1
  113. package/widgets/FloorFilter.js +1 -1
  114. package/widgets/HistogramRangeSlider.js +1 -1
  115. package/widgets/Sketch/SketchViewModel.js +1 -1
  116. package/widgets/support/ItemList.js +1 -1
  117. package/assets/esri/core/workers/chunks/0874b88d5ae7c2b78b3b.js +0 -1
  118. package/assets/esri/core/workers/chunks/0c129b78e5cfe96795e1.js +0 -1
  119. package/assets/esri/core/workers/chunks/1a3a4c2c642899be37a0.js +0 -1
  120. package/assets/esri/core/workers/chunks/2b75212c31145cc07d16.js +0 -1
  121. package/assets/esri/core/workers/chunks/37a97e690786814bf0b3.js +0 -1
  122. package/assets/esri/core/workers/chunks/48e64f99720907017778.js +0 -1
  123. package/assets/esri/core/workers/chunks/4c6862ad3af947c704f7.js +0 -1
  124. package/assets/esri/core/workers/chunks/4d544e3e19ce07c2c195.js +0 -1
  125. package/assets/esri/core/workers/chunks/781b59ba0cabe78bc122.js +0 -1
  126. package/assets/esri/core/workers/chunks/8c1bd9bcfc59497de3b5.js +0 -1
  127. package/assets/esri/core/workers/chunks/8cc700da2ac58849a708.js +0 -1
  128. package/assets/esri/core/workers/chunks/9b7fee0adffeee8d45ae.js +0 -1
  129. package/assets/esri/core/workers/chunks/9d30fed26e0d84ef893b.js +0 -1
  130. package/assets/esri/core/workers/chunks/b29f0b32787edb4e75cf.js +0 -1
  131. package/assets/esri/core/workers/chunks/b877142a275188a16e17.js +0 -1
  132. package/assets/esri/core/workers/chunks/c87bb42f825c39f9cce3.js +0 -1
  133. package/assets/esri/core/workers/chunks/cc0cb4906e4419f7c4a9.js +0 -1
  134. package/assets/esri/core/workers/chunks/f667096ea325f690c4a6.js +0 -1
  135. package/assets/esri/core/workers/chunks/f9f94b5efa9a64cdb407.js +0 -1
  136. package/layers/graphics/data/executeQueryForSnapping.js +0 -5
  137. package/layers/support/PromiseQueue.js +0 -5
  138. package/views/3d/analysis/AnalysisViewManager3D.js +0 -5
  139. /package/assets/esri/core/workers/chunks/{ecd673eccf89643df07a.js.LICENSE.txt → 659f7e99b2d524ef53fb.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1253],{1364:(e,t,s)=>{s.d(t,{c:()=>i});var n=s(55537);function i(e,t){const s=e.getGeometryType();return s===n.G.enumPoint?e:(0,n.h)(s)?function(e){if(function(e){for(let t=0,s=e.getPathCount();t<s;t++){const s=e.getPathSize(t);if(0===s)return!1;if(1===s){if(0===e.getSegmentCountPath(t))return!1;if(e.getSegmentType(e.getPathStart(t))===n.G.enumLine)return!1;if(!e.isClosedPath(t))return!1}}return!0}(e))return e;const t=e.createInstance();for(let s=0,i=e.getPathCount();s<i;s++){const i=e.getPathSize(s);if(0!==i){if(1===i){if(0===e.getSegmentCountPath(s))continue;if(e.getSegmentType(e.getPathStart(s))===n.G.enumLine)continue;if(!e.isClosedPath(s))continue}t.addPath(e,s,!0)}}return t}(e):s===n.G.enumMultiPoint||s===n.G.enumEnvelope?e:s===n.G.enumMultipatch?((0,n.t)("not implemented for multipatch"),e):e}},41253:(e,t,s)=>{s.d(t,{g7:()=>E,yv:()=>M,fz:()=>G});var n,i,r=s(76061),m=s(55537),o=s(39117),a=s(79187),h=s(31635),l=s(95213),c=s(83661),u=s(88885),_=s(11878),f=s(1364),g=s(98783),d=s(64523);function p(e,t,s,n,i,r){return{m_from:e.clone(),m_to:t.clone(),m_center:s.clone(),m_next:i,m_type:n}}function P(e,t,s,n,i){return{m_from:e.clone(),m_to:t.clone(),m_next:s,m_type:4,m_center:new c.P}}(i=n||(n={}))[i.enumDummy=256]="enumDummy",i[i.enumLine=1]="enumLine",i[i.enumArc=2]="enumArc",i[i.enumMiter=8]="enumMiter",i[i.enumBevel=16]="enumBevel",i[i.enumJoinMask=26]="enumJoinMask",i[i.enumConnectionMask=27]="enumConnectionMask";class y extends r.G{constructor(e,t,s,n,i,r,m,o,a,h){super(),this.m_index=0,this.m_bufferedPolygon=null,this.m_x=0,this.m_y=0,this.m_progressTracker=h,this.m_parent=e,this.m_mp=t,this.m_distance=s,this.m_spatialReference=n,this.m_densifyDist=o,this.m_maxVertexInCompleteCircle=a,this.m_joins=i,this.m_caps=r,this.m_miterLimit=m}next(){const e=new l.P;for(;;){if(this.m_index===this.m_mp.getPointCount())return null;if(1===this.m_caps)return this.m_index=this.m_mp.getPointCount(),new u.a({vd:this.m_mp.getDescription()});if(this.m_mp.getPointByVal(this.m_index,e),this.m_index++,!e.isEmpty())break}let t,s=!1;if(null===this.m_bufferedPolygon&&(this.m_x=e.getX(),this.m_y=e.getY(),this.m_bufferedPolygon=this.m_parent.buffer(e,this.m_distance,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_densifyDist,this.m_maxVertexInCompleteCircle),s=!0),t=this.m_index<this.m_mp.getPointCount()?this.m_bufferedPolygon.clone():this.m_bufferedPolygon,!s){const s=new _.T,n=e.getX()-this.m_x,i=e.getY()-this.m_y;s.setShiftCoords(n,i),t.applyTransformation(s)}return(0,l.s)(t,0),t}getGeometryID(){return 0}getRank(){return 1}tock(){return!0}}class b extends r.G{constructor(e){super(),this.m_currentPathIndex=0,this.m_polyline=e}next(){if(!this.m_polyline)return null;const e=this.m_polyline.getImpl(),t=e.getPathCount();if(this.m_currentPathIndex<t){const t=this.m_currentPathIndex;if(this.m_currentPathIndex++,!e.isClosedPathInXYPlane(t)){let s=e.getXY(e.getPathEnd(t)-1);for(;this.m_currentPathIndex<e.getPathCount();){const t=e.getXY(e.getPathStart(this.m_currentPathIndex));if(e.isClosedPathInXYPlane(this.m_currentPathIndex))break;if(!t.equals(s))break;s=e.getXY(e.getPathEnd(this.m_currentPathIndex)-1),this.m_currentPathIndex++}}if(0===t&&this.m_currentPathIndex===this.m_polyline.getPathCount()){const e=this.m_polyline;return this.m_polyline=null,e}const s=new u.P({vd:this.m_polyline.getDescription()});s.addPath(this.m_polyline,t,!0);for(let n=t+1;n<this.m_currentPathIndex;n++)s.addSegmentsFromPath(this.m_polyline,n,0,e.getSegmentCountPath(n),!1);return this.m_currentPathIndex===this.m_polyline.getPathCount()&&(this.m_polyline=null),s}return null}getGeometryID(){return 0}getRank(){return 1}tock(){return!0}}class x extends r.G{constructor(e,t,s){super(),this.m_geometry=null,this.m_index=0,this.m_bufferer=e,this.m_geoms=t,this.m_index=0,this.m_bFilter=s}next(){if(null===this.m_geometry&&(this.m_index=0,this.m_geometry=this.m_geoms.next(),!this.m_geometry))return null;const e=this.m_geometry.getImpl();if(this.m_index<e.getPathCount()){const e=this.m_index;return this.m_index++,this.m_bufferer.bufferPolylinePath(this.m_geometry,e,this.m_bFilter)}return this.m_geometry=null,this.next()}getGeometryID(){return 0}getRank(){return 1}tock(){return!0}}class C extends r.G{constructor(e){super(),this.m_index=0,this.m_bufferer=e}next(){const e=this.m_bufferer.m_geometry;if(this.m_index<e.getPathCount()){const t=this.m_index,s=e.calculateRingArea2D(this.m_index);for((0,m.g)(s>0),this.m_index++;this.m_index<e.getPathCount()&&!(e.calculateRingArea2D(this.m_index)>0);)this.m_index++;let n;return n=0===t&&this.m_index===e.getPathCount()?this.m_bufferer.bufferPolygonImpl(e,0,e.getPathCount()):this.m_bufferer.bufferPolygonImpl(e,t,this.m_index),n}return null}getGeometryID(){return 0}getRank(){return 1}tock(){return!0}}class D{constructor(e){this.m_geometry=null,this.m_bufferCommands=[],this.m_originalGeomType=m.G.enumUnknown,this.m_maxVertexInCompleteCircle=-1,this.m_circleTemplateSize=-1,this.m_oldCircleTemplateSize=0,this.m_spatialReference=null,this.m_tolerance=new l.C(0,0),this.m_smallTolerance=new l.C(0,0),this.m_filterTolerance=0,this.m_densifyDist=-1,this.m_distance=Number.NaN,this.m_absDistance=0,this.m_absDistanceReversed=0,this.m_dA=-1,this.m_miterLimit=4,this.m_joins=0,this.m_caps=0,this.m_bRoundBuffer=!0,this.m_bOutputLoops=!0,this.m_bFilter=!0,this.m_circleTemplate=[],this.m_leftStack=[],this.m_middleStack=[],this.m_helperLine1=new u.L,this.m_helperLine2=new u.L,this.m_helperArray=[],this.m_progressCounter=0,this.m_densificator=u.D.constructDefault(e),this.m_progressTracker=e}buffer(e,t,s,n,i,r,o,h){if(e||(0,m.a)("Geometry.Bufferer.Impl.Buffer"),o<0&&(0,m.a)("Geometry.Bufferer.Impl.Buffer"),(0,m.j)(e.getGeometryType())&&(0,m.t)("Unsupported geometry type."),e.isEmpty())return new u.a({vd:e.getDescription()});if(this.m_joins=n,this.m_caps=i,this.m_bRoundBuffer=!1,this.m_miterLimit=r,this.m_originalGeomType=e.getGeometryType(),(0,m.k)(this.m_originalGeomType)?this.m_bRoundBuffer=0===this.m_joins:(0,m.e)(this.m_originalGeomType)?this.m_bRoundBuffer=0===this.m_caps:(0,m.l)(this.m_originalGeomType)&&(this.m_bRoundBuffer=0===this.m_joins&&0===this.m_caps),this.m_bFilter=this.m_bRoundBuffer,this.m_geometry=(0,f.c)(e),this.m_geometry.isEmpty())return new u.a({vd:e.getDescription()});const _=new a.Envelope2D;this.m_geometry.queryLooseEnvelope(_),t>0&&_.inflateCoords(t,t),this.m_tolerance=(0,l.c)(s,_,!0),this.m_smallTolerance=(0,l.c)(null,_,!0),h<=0&&(h=96),this.m_spatialReference=s,this.m_distance=t,this.m_absDistance=Math.abs(this.m_distance),this.m_absDistanceReversed=0!==this.m_absDistance?1/this.m_absDistance:0,Number.isNaN(o)||0===o?o=1e-5*this.m_absDistance:o>.5*this.m_absDistance&&(o=.5*this.m_absDistance),h<12&&(h=12);const g=Math.abs(t)*(1-Math.cos(Math.PI/h));if(g>o)o=g;else if(0!==t){const e=Math.PI/Math.acos(1-o/Math.abs(t));e<h-1&&(h=Math.trunc(e))<12&&(h=12,o=Math.abs(t)*(1-Math.cos(Math.PI/h)))}this.m_densifyDist=o,this.m_maxVertexInCompleteCircle=h,this.m_filterTolerance=this.m_bRoundBuffer?Math.min(this.m_smallTolerance.total(),.25*this.m_densifyDist):0,this.m_circleTemplateSize=this.calcN(),this.m_circleTemplateSize!==this.m_oldCircleTemplateSize&&(this.m_circleTemplate.length=0,this.m_oldCircleTemplateSize=this.m_circleTemplateSize),this.m_densifyDist>0&&(0,m.m)(this.m_geometry)&&(this.m_geometry=this.m_densificator.densifyEx(this.m_geometry,0,this.m_densifyDist,0,0!==this.m_joins,(0,c.i)()));const d=this.bufferImpl();return this.m_geometry=null,d}generateCircleTemplate(){if(this.m_circleTemplate.length)return;const e=this.m_circleTemplateSize,t=Math.trunc((e+3)/4),s=.5*Math.PI/t;this.m_dA=s,this.m_circleTemplate=(0,c.m)(c.P,4*t);const n=Math.cos(s),i=Math.sin(s),r=c.P.construct(0,1);for(let e=0;e<t;e++)this.m_circleTemplate[e+0*t].setCoords(r.y,-r.x),this.m_circleTemplate[e+1*t].setCoords(-r.x,-r.y),this.m_circleTemplate[e+2*t].setCoords(-r.y,r.x),this.m_circleTemplate[e+3*t].setCoords(r.x,r.y),r.rotateReverse(n,i)}bufferImpl(){const e=this.m_geometry.getGeometryType();if((0,m.f)(e)){const e=new u.P({vd:this.m_geometry.getDescription()});return e.addSegment(this.m_geometry,!0),this.m_geometry=e,this.bufferImpl()}if(this.m_distance<=this.m_tolerance.total()){if(!(0,m.k)(e))return new u.a({vd:this.m_geometry.getDescription()});if(this.m_distance<0){const e=new a.Envelope2D;if(this.m_geometry.queryEnvelope(e),e.width()<=2*this.m_absDistance||e.height()<=2*this.m_absDistance)return new u.a({vd:this.m_geometry.getDescription()})}}switch(this.m_geometry.getGeometryType()){case m.G.enumPoint:return this.bufferPoint();case m.G.enumMultiPoint:return this.bufferMultiPoint();case m.G.enumPolyline:return this.bufferPolyline();case m.G.enumPolygon:return this.bufferPolygon();case m.G.enumEnvelope:return this.bufferEnvelope();default:(0,m.d)("")}}bufferPolyline(){if(this.isDegenerateGeometry(this.m_geometry)){const e=new l.P;this.m_geometry.getPointByVal(0,e);const t=new a.Envelope2D;return this.m_geometry.queryEnvelope(t),e.setXY(t.getCenter()),this.bufferDegeneratePath(e,!0)}const e=this.m_geometry,t=this.m_geometry.getDescription();this.m_geometry=null;const s=new b(e);let n,i;n=0===this.m_joins?(new d.O).executeMany(s,.25*this.m_densifyDist,!1,this.m_progressTracker):s,i=this.m_bRoundBuffer?(new g.O).executeMany(n,null,!0,this.m_progressTracker):n;const r=new x(this,i,this.m_bFilter),m=(new o.W).executeMany(r,this.m_spatialReference,this.m_progressTracker,2),h=(new o.L).executeMany(m,this.m_spatialReference,!1,this.m_progressTracker).next();return null!==h?h:new u.a({vd:t})}bufferPolygon(){if(0===this.m_distance)return this.m_geometry;this.generateCircleTemplate();const e=(new o.L).execute(this.m_geometry,null,!1,this.m_progressTracker);if(this.m_distance<0){if(this.m_geometry=e,this.m_geometry.isEmpty())return this.m_geometry;const t=this.m_geometry,s=this.bufferPolygonImpl(t,0,t.getPathCount());return(new o.L).execute(s,this.m_spatialReference,!1,this.m_progressTracker)}{if(this.m_geometry=e,this.isDegenerateGeometry(this.m_geometry)){const e=new l.P;this.m_geometry.getPointByVal(0,e);const t=new a.Envelope2D;return this.m_geometry.queryEnvelope(t),e.setXY(t.getCenter()),this.bufferDegeneratePath(e,!0)}const t=new C(this),s=(new o.W).executeMany(t,this.m_spatialReference,this.m_progressTracker,2),n=(new o.L).executeMany(s,this.m_spatialReference,!1,this.m_progressTracker).next();return null!==n?n:new u.a({vd:this.m_geometry.getDescription()})}}bufferPolygonImpl(e,t,s){const n=e,i=n.getImpl();let r=new u.a({vd:e.getDescription()});for(let m=t;m<s;m++){if(i.getPathSize(m)<1)continue;const t=i.calculateRingArea2D(m),s=new a.Envelope2D;if(i.queryPathEnvelope(m,s),this.m_distance>0)if(t>0)if(this.isDegeneratePath(i,m)){const e=new l.P;i.getPointByVal(i.getPathStart(m),e),e.setXY(s.getCenter()),r.add(this.bufferDegeneratePath(e,!0),!1)}else{const t=new u.P({vd:e.getDescription()}),s=t.getImpl();if((0,u.i)(this.m_geometry,m)){const e=this.bufferConvexPath(n,m);r.add(e,!1)}else{this.bufferClosedPath(this.m_geometry,m,s,this.m_bRoundBuffer,1);const e=this.bufferCleanup(t);r.add(e,!1)}}else{if(s.width()+this.m_tolerance.total()<=2*this.m_absDistance||s.height()+this.m_tolerance.total()<=2*this.m_absDistance)continue;const t=new u.P({vd:e.getDescription()}),n=t.getImpl();if(this.bufferClosedPath(this.m_geometry,m,n,this.m_bRoundBuffer,1),!t.isEmpty()){const e=s,i=Math.max(1,this.m_absDistance),m=e.clone();m.inflateCoords(i,i),n.addEnvelope(m,!1);const o=this.bufferCleanup(t);r.reserve(r.getPointCount()+o.getPointCount()-4),k(o,r,m,!0)}}else if(t>0){if(s.width()+this.m_tolerance.total()<=2*this.m_absDistance||s.height()+this.m_tolerance.total()<=2*this.m_absDistance)continue;const t=new u.P({vd:e.getDescription()}),n=t.getImpl();if(this.bufferClosedPath(this.m_geometry,m,n,this.m_bRoundBuffer,-1),!t.isEmpty()){const e=new a.Envelope2D;n.queryLooseEnvelope(e);const s=Math.max(1,this.m_absDistance),i=e.clone();i.inflateCoords(s,s),n.addEnvelope(i,!1),k(this.bufferCleanup(t),r,i,!0)}}else{const t=new u.P({vd:e.getDescription()}),s=t.getImpl();this.bufferClosedPath(this.m_geometry,m,s,this.m_bRoundBuffer,-1);const n=this.bufferCleanup(t);for(let e=0,t=n.getPathCount();e<t;e++)r.addPath(n,e,!0)}}if(this.m_distance>0)return r.getPathCount()>1?this.bufferCleanup(r):w(r);{const e=new a.Envelope2D;if(r.queryLooseEnvelope(e),r.isEmpty())return w(r);{const t=Math.max(1,this.m_absDistance),s=e.clone();s.inflateCoords(t,t),r.addEnvelope(s,!1);const n=this.bufferCleanup(r);r=new u.a;const i=new u.a({vd:n.getDescription()});return k(n,i,s,!1),w(i)}}}bufferPoint(){return this.bufferPointImpl(this.m_geometry)}bufferPointImpl(e){const t=new u.a({vd:e.getDescription()});return 0===this.m_caps?(this.addCircle(t.getImpl(),e),this.setStrongSimple(t)):2===this.m_caps?(this.addSquare(t.getImpl(),e),this.setStrongSimple(t)):t}bufferDegeneratePath(e,t){const s=new u.a({vd:e.getDescription()});return t&&0===this.m_joins||!t&&0===this.m_caps?(this.addCircle(s.getImpl(),e),this.setStrongSimple(s)):t||2!==this.m_caps?s:(this.addSquare(s.getImpl(),e),this.setStrongSimple(s))}bufferMultiPoint(){const e=new y(this,this.m_geometry,this.m_distance,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_densifyDist,this.m_maxVertexInCompleteCircle,this.m_progressTracker);return(new o.W).executeMany(e,this.m_spatialReference,this.m_progressTracker,2).next()}bufferEnvelope(){let e=new u.a({vd:this.m_geometry.getDescription()});if(this.m_distance<=0){if(0===this.m_distance)e.addEnvelope(this.m_geometry,!1),v(this.m_geometry,this.m_tolerance.total())&&(e=this.setStrongSimple(e));else{const t=new l.E;this.m_geometry.queryEnvelope(t),t.inflateCoords(this.m_distance,this.m_distance),e.addEnvelope(t,!1),v(t,this.m_tolerance.total())&&(e=this.setStrongSimple(e))}return e}if(1===this.m_joins){const t=new l.E({copy:this.m_geometry});return t.inflateCoords(this.m_absDistance,this.m_absDistance),e.addEnvelope(t,!1),e}const t=this.m_geometry.clone();if(0===t.width()||0===t.height()){if(0===t.width()&&0===t.height()){const e=new l.P({vd:this.m_geometry.getDescription()});return t.queryCornerByVal(0,e),this.m_geometry=e,this.bufferImpl()}const e=new u.P({vd:this.m_geometry.getDescription()}),s=new l.P;return t.queryCornerByVal(0,s),e.startPathPoint(s),t.queryCornerByVal(2,s),e.lineToPoint(s),this.m_geometry=e,this.bufferImpl()}return e.addEnvelope(this.m_geometry,!1),this.m_geometry=e,this.bufferConvexPath(e,0)}bufferConvexPath(e,t){this.generateCircleTemplate();const s=e.hasAttribute(10),i=new u.a({vd:e.getDescription()}),r=i.getImpl();i.reserve((this.m_circleTemplate.length/10+4)*e.getPathSize(t));const o=new c.P,a=new c.P,h=new c.P,l=new c.P(0,0),_=new c.P,f=new c.P,g=e.getImpl(),d=e.getPathSize(t),p=e.getPathStart(t);for(let i=0,c=e.getPathSize(t);i<c;i++){const e=g.getXY(p+i),t=g.getXY(p+(i+1)%d),c=g.getXY(p+(i+2)%d);_.setSub(t,e),0===_.length()&&(0,m.d)("");const u=s&&!!(1&g.getAttributeAsInt(10,(i+1)%d,0));_.normalize();const P=_.clone();_.leftPerpendicularThis(),_.scale(this.m_absDistance),o.setAdd(_,e),a.setAdd(_,t),0===i?r.startPath(o):r.lineTo(o),r.lineTo(a),f.setSub(c,t),0===f.length()&&(0,m.d)(""),f.normalize();const y=f.clone();f.leftPerpendicularThis(),f.scale(this.m_absDistance),h.setAdd(f,t);let b=n.enumArc;const x=u?0:this.m_joins;if(2===x)b=n.enumBevel;else if(1===x){const e=-P.crossProduct(y);l.setSub(P,y),l.scale(this.m_absDistance/e),l.length()<this.m_miterLimit*this.m_absDistance?(l.addThis(t),b=n.enumMiter):b=n.enumBevel}else l.assign(t);this.addJoin(b,r,l,a,h,!1,!1)}return w(i)}bufferPolylinePath(e,t,s){this.generateCircleTemplate();const n=e,i=n.getImpl();if(i.getPathSize(t)<1)return null;let r;if(r=this.m_bRoundBuffer?i.isClosedPathInXYPlane(t):i.isClosedPath(t),this.isDegeneratePath(i,t)&&this.m_distance>0){const e=new l.P;i.getPointByVal(i.getPathStart(t),e);const s=new a.Envelope2D;return i.queryPathEnvelope(t,s),e.setXY(s.getCenter()),this.bufferDegeneratePath(e,r)}const m=new u.P({vd:e.getDescription()});m.reserve((Math.trunc(this.m_circleTemplate.length/10)+4)*i.getPathSize(t));const o=m.getImpl();return r?2!==this.bufferClosedPath(n,t,o,s,1)&&this.bufferClosedPath(n,t,o,s,-1):this.bufferOpenPath(n,t,o,s),this.bufferCleanup(m)}progress_(){}bufferCleanup(e,t=!1){const s=t?this.m_tolerance:this.m_smallTolerance;return(0,o.a3)(e,s,!0,!t,-1,this.m_progressTracker,0,!1)}calcN(){if(0===this.m_densifyDist)return this.m_maxVertexInCompleteCircle;const e=1-this.m_densifyDist*Math.abs(this.m_absDistanceReversed);let t=4;return t=e<-1?4:2*Math.PI/Math.acos(e)+.5,t<4?t=4:t>this.m_maxVertexInCompleteCircle&&(t=this.m_maxVertexInCompleteCircle),Math.trunc(t)}addJoin(e,t,s,i,r,m,o){if(this.generateCircleTemplate(),m&&(t.startPath(i),m=!1),e===n.enumBevel)return void(o&&t.lineTo(r));if(e===n.enumMiter){const e=s.clone();return t.lineTo(e),void(o&&t.lineTo(r))}const a=new c.P;a.setSub(i,s),a.scale(this.m_absDistanceReversed);const h=new c.P;h.setSub(r,s),h.scale(this.m_absDistanceReversed);let l=Math.atan2(a.y,a.x)/this.m_dA;l<0&&(l=this.m_circleTemplate.length+l),l=this.m_circleTemplate.length-l;let u=Math.atan2(h.y,h.x)/this.m_dA;u<0&&(u=this.m_circleTemplate.length+u),u=this.m_circleTemplate.length-u,u<l&&(u+=this.m_circleTemplate.length);let _=Math.trunc(u),f=Math.ceil(l),g=this.m_circleTemplate[f%this.m_circleTemplate.length].clone();g.scaleAddThis(this.m_absDistance,s);const d=10*this.m_tolerance.total();g.sub(i).length()<d&&(f+=1),g=this.m_circleTemplate[_%this.m_circleTemplate.length].clone(),g.scaleAddThis(this.m_absDistance,s),g.sub(r).length()<d&&(_-=1);let p=_-f;p++;for(let e=0,n=f%this.m_circleTemplate.length;e<p;e++,n=(n+1)%this.m_circleTemplate.length)g=this.m_circleTemplate[n].clone(),g.scaleAddThis(this.m_absDistance,s),t.lineTo(g),this.progress_();o&&t.lineTo(r)}bufferClosedPath(e,t,s,n,i){const r=new u.E,m=r.addPathFromMultiPath(e,t,!0);return this.bufferClosedPathImpl(r,m,s,n,i)}bufferClosedPathImpl(e,t,s,i,r){const o=e.getFirstVertex(e.getFirstPath(t)),a=new l.P;if(e.queryPoint(o,a),e.filterClosePoints(this.m_filterTolerance,!1,!1,!1,-1),e.getPointCount(t)<2)return r<0?0:(this.m_bRoundBuffer&&this.addCircle(s,a),2);(0,m.g)(e.getFirstPath(t)!==u.n),(0,m.g)(e.getFirstVertex(e.getFirstPath(t))!==u.n);const f=e.getXY(e.getFirstVertex(e.getFirstPath(t))),g=new _.T;if(g.setShift(f.negate()),e.applyTransformation(g),i){const n=function(e,t,s,n,i,r,m){return function(e,t,s,n,i,r,m){const o={stack:[],error:void 0,hasError:!1};try{const n=e.getFirstPath(t),a=e.createUserIndex();(0,h.mS)(o,(0,c.h)(()=>{e.removeUserIndex(a)},!1),!1),function(e,t,s,n){let i=-1;const r=new c.P,m=new c.P,o=new c.P;for(let s=0,a=e.getPathSize(n),h=e.getFirstVertex(n);s<a;++s){-1===i&&(e.queryXY(h,m),i=e.getPrevVertex(h),-1!==i&&(e.queryXY(i,r),o.setSub(m,r),o.normalize()));const s=e.getNextVertex(h);if(-1===s)break;const n=e.getXY(s),a=n.sub(m);a.normalize(),-1!==i&&a.dotProduct(o)<-.99&&Math.abs(a.crossProduct(o))<1e-7&&e.setUserIndex(h,t,1),i=h,h=s,r.assign(m),m.assign(n),o.assign(a)}}(e,a,0,n);for(let t=0;t<100;++t){if(0===e.getPathSize(n))return 1;let t=e.getFirstVertex(n),r=e.getPathSize(n);if(r<3)return 1;e.isClosedPath(n)||(r-=1);const o=64;let h=0,l=!1;for(let n=0;n<r&&t!==u.n;n++){let c=0,u=t;for(let h=1,l=Math.min(o,r-n);h<l;h++)if(u=e.getNextVertexEx(u,s),h>1){const n=T(e,a,t,u,s,i,m,o);if(-1===n)break;c+=n,r-=n}if(h+=c,l=c>0,l){const n=e.getPrevVertexEx(t,s);if(-1!==n){t=n,r++;continue}}t=e.getNextVertexEx(t,s)}if(0===h)break}return e.filterClosePoints(r,!1,!1,!1,-1),1}catch(e){o.error=e,o.hasError=!0}finally{(0,h.hk)(o)}}(e,t,s,0,i,r,m)}(e,t,r,0,this.m_absDistance,this.m_filterTolerance,this.m_densifyDist);if((0,m.g)(1===n),e.getPointCount(t)<2)return r<0?0:(this.addCircle(s,a),2)}const d=0!==this.m_joins&&e.getVertexDescription().hasAttribute(10);this.m_bufferCommands.length=0;const y=e.getFirstPath(t);let b=e.getFirstVertex(y),x=1===r?e.getPrevVertex(b):e.getNextVertex(b),C=1===r?e.getNextVertex(b):e.getPrevVertex(b),D=!0;const w=new c.P,v=new c.P,k=new c.P,S=new c.P,I=new c.P,E=new c.P,M=new c.P,G=new c.P,R=this.m_absDistance,V=e.getPathSize(y),X=new c.P(0,0);for(let t=0;t<V;t++){v.assign(e.getXY(C)),D&&(w.assign(e.getXY(b)),k.assign(e.getXY(x)),E.setSub(w,k),E.normalize(),G.leftPerpendicularOther(E),G.scale(R),S.setAdd(G,w));const t=d&&!!(1&e.getAttributeAsDbl(10,b,0));I.setSub(v,w),I.normalize(),M.leftPerpendicularOther(I),M.scale(R);const s=new c.P;s.setAdd(w,M);const i=E.crossProduct(I),m=E.dotProduct(I);if(i<0||m<0&&i<Math.abs(m)*Number.EPSILON*8){let e=!1;const r=t?0:this.m_joins;if(1===r){const t=-i;X.setSub(E,I),X.scale(this.m_absDistance/t),X.length()<this.m_miterLimit*this.m_absDistance&&(X.addThis(w),e=!0),this.m_bufferCommands.push(p(S,s,X,e?n.enumMiter:n.enumBevel,this.m_bufferCommands.length+1))}else this.m_bufferCommands.push(p(S,s,w,0===r?n.enumArc:n.enumBevel,this.m_bufferCommands.length+1))}else S.equals(s)||(this.m_bufferCommands.push(P(S,w,this.m_bufferCommands.length+1)),this.m_bufferCommands.push(P(w,s,this.m_bufferCommands.length+1)));const o=new c.P;o.setAdd(v,M),this.m_bufferCommands.push(p(s,o,w,n.enumLine,this.m_bufferCommands.length+1)),S.setCoordsPoint2D(o),G.setCoordsPoint2D(M),k.setCoordsPoint2D(w),w.setCoordsPoint2D(v),E.setCoordsPoint2D(I),x=b,b=C,D=!1,C=1===r?e.getNextVertex(b):e.getPrevVertex(b)}return this.m_bufferCommands.at(-1).m_next=0,this.processBufferCommands(s),g.setShift(f),s.applyTransformationToPath(g,s.getPathCount()-1),1}bufferOpenPath(e,t,s,i){if(this.m_bRoundBuffer){const n=new u.P({vd:e.getDescription()});return n.addPath(e,t,!1),n.addSegmentsFromPath(e,t,0,e.getSegmentCountPath(t),!1),this.bufferClosedPath(n,0,s,i,1)}let r=0;const o=new u.P({vd:e.getDescription()}),a=new c.P(0,0);{const n=new u.E,i=n.addPathFromMultiPath(e,t,!1),m=n.getFirstVertex(n.getFirstPath(i)),h=new l.P;if(n.queryPoint(m,h),a.assign(h.getXY()),n.filterClosePoints(0,!1,!1,!1,-1),n.getPointCount(i)<2)return this.m_bRoundBuffer&&this.addCircle(s,h),2;const c=n.getGeometry(n.getFirstGeometry());o.addPath(c,0,!1),r=o.getPointCount()-1,o.addSegmentsFromPath(c,0,0,c.getSegmentCountPath(0)-1,!1)}const h=new u.E,f=h.addPathFromMultiPath(o,0,!0);(0,m.g)(h.getFirstPath(f)!==u.n),(0,m.g)(h.getFirstVertex(h.getFirstPath(f))!==u.n);const g=new _.T;g.setShift(a.negate()),h.applyTransformation(g),this.m_bufferCommands.length=0;const d=h.getFirstPath(f),y=0!==this.m_joins&&h.getVertexDescription().hasAttribute(10);let b=h.getFirstVertex(d),x=h.getPrevVertex(b),C=h.getNextVertex(b),D=!0;const w=new c.P,v=new c.P,T=new c.P,k=new c.P,S=new c.P,I=new c.P,E=new c.P,M=new c.P,G=this.m_absDistance,R=h.getPathSize(d),V=new c.P(0,0);for(let e=0;e<R;e++){let t=!1;0!==e&&e!==r||(t=!0),v.assign(h.getXY(C)),D&&(w.assign(h.getXY(b)),T.assign(h.getXY(x)),I.setSub(w,T),I.normalize(),M.leftPerpendicularOther(I),M.scale(G),k.setAdd(M,w));const s=y&&!!(1&h.getAttributeAsDbl(10,b,0));S.setSub(v,w),S.normalize(),E.leftPerpendicularOther(S),E.scale(G);const i=new c.P;i.setAdd(w,E);const m=I.crossProduct(S),o=I.dotProduct(S);if(m<0||o<0&&m<Math.abs(o)*Number.EPSILON*8)if(t)if(0===this.m_caps)this.m_bufferCommands.push(p(k,i,w,n.enumArc,this.m_bufferCommands.length+1));else if(1===this.m_caps)this.m_bufferCommands.push(p(k,i,w,n.enumLine,this.m_bufferCommands.length+1));else{const e=S.mul(this.m_absDistance).negate(),t=e.clone();e.addThis(k),t.addThis(i),this.m_bufferCommands.push(p(k,e,w,n.enumLine,this.m_bufferCommands.length+1)),this.m_bufferCommands.push(p(e,t,w,n.enumLine,this.m_bufferCommands.length+1)),this.m_bufferCommands.push(p(t,i,w,n.enumLine,this.m_bufferCommands.length+1))}else{let e=!1;const t=s?0:this.m_joins;if(1===t){const t=-m;V.setSub(I,S),V.scale(this.m_absDistance/t),V.length()<this.m_miterLimit*this.m_absDistance&&(V.addThis(w),e=!0),this.m_bufferCommands.push(p(k,i,V,e?n.enumMiter:n.enumBevel,this.m_bufferCommands.length+1))}else this.m_bufferCommands.push(p(k,i,w,0===t?n.enumArc:n.enumBevel,this.m_bufferCommands.length+1))}else k.equals(i)||(this.m_bufferCommands.push(P(k,w,this.m_bufferCommands.length+1)),this.m_bufferCommands.push(P(w,i,this.m_bufferCommands.length+1)));const a=new c.P;a.setAdd(v,E),this.m_bufferCommands.push(p(i,a,w,n.enumLine,this.m_bufferCommands.length+1)),k.setCoordsPoint2D(a),M.setCoordsPoint2D(E),T.setCoordsPoint2D(w),w.setCoordsPoint2D(v),I.setCoordsPoint2D(S),x=b,b=C,D=!1,C=h.getNextVertex(b)}return this.m_bufferCommands.at(-1).m_next=0,this.processBufferCommands(s),g.setShift(a),s.applyTransformationToPath(g,s.getPathCount()-1),1}processBufferCommands(e){const t=this.cleanupBufferCommands();let s=!0,i=t+1;for(let r=t;i!==t;r=i){const t=this.m_bufferCommands[r];i=-1!==t.m_next?t.m_next:(r+1)%this.m_bufferCommands.length,t.m_type&&(s&&(e.startPath(t.m_from),s=!1),t.m_type&n.enumJoinMask?this.addJoin(t.m_type,e,t.m_center,t.m_from,t.m_to,!1,!0):e.lineTo(t.m_to))}}cleanupBufferCommands(){this.m_helperArray=(0,c.m)(c.P,9);let e=0;for(let t=0,s=this.m_bufferCommands.length;t<s;){const s=this.m_bufferCommands[t];if(s.m_type&n.enumConnectionMask){e=t;break}t=s.m_next}let t=e+1;for(let s=e;t!==e;s=t){const e=this.m_bufferCommands[s];t=e.m_next;let i=1,r=null;for(;t!==s&&(r=this.m_bufferCommands[t],!(r.m_type&n.enumConnectionMask));)t=r.m_next,i++;1!==i&&(e.m_type&r.m_type)===n.enumLine&&(this.m_helperLine1.setStartXY(e.m_from),this.m_helperLine1.setEndXY(e.m_to),this.m_helperLine2.setStartXY(r.m_from),this.m_helperLine2.setEndXY(r.m_to),1===this.m_helperLine1.intersect(this.m_helperLine2,this.m_helperArray,null,null,this.m_smallTolerance.total())&&(e.m_to.assign(this.m_helperArray[0]),r.m_from.assign(this.m_helperArray[0]),e.m_next=t))}return e}isDegeneratePath(e,t){if(1===e.getPathSize(t))return!0;if(0===this.m_joins&&0===this.m_caps){const s=new a.Envelope2D;if(e.queryPathEnvelope(t,s),Math.max(s.width(),s.height())<.5*this.m_densifyDist)return!0}return!1}isDegenerateGeometry(e){if(0===this.m_joins&&0===this.m_caps){const t=new a.Envelope2D;if(e.queryEnvelope(t),Math.max(t.width(),t.height())<.5*this.m_densifyDist)return!0}return!1}addCircle(e,t){const s=t.getXY();if(0!==this.m_circleTemplate.length){let t=this.m_circleTemplate[0].clone();t.scaleAddThis(this.m_absDistance,s),e.startPath(t);for(let n=1,i=this.m_circleTemplate.length;n<i;n++)t=this.m_circleTemplate[n].clone(),t.scaleAddThis(this.m_absDistance,s),e.lineTo(t);return}const n=this.m_circleTemplateSize,i=Math.trunc((n+3)/4),r=.5*Math.PI/i;e.reserve(4*i);const m=Math.cos(r),o=Math.sin(r);for(let t=3;t>=0;t--){const n=c.P.construct(0,this.m_absDistance);switch(t){case 0:for(let t=0;t<i;t++)e.lineToCoords(n.x+s.x,n.y+s.y),n.rotateReverse(m,o);break;case 1:for(let t=0;t<i;t++)e.lineToCoords(-n.y+s.x,n.x+s.y),n.rotateReverse(m,o);break;case 2:for(let t=0;t<i;t++)e.lineToCoords(-n.x+s.x,-n.y+s.y),n.rotateReverse(m,o);break;default:e.startPathCoords(n.y+s.x,-n.x+s.y);for(let t=1;t<i;t++)n.rotateReverse(m,o),e.lineToCoords(n.y+s.x,-n.x+s.y)}this.progress_()}}addSquare(e,t){const s=new l.E({vd:t.getDescription()});s.setCoords(t.getX(),t.getY(),t.getX(),t.getY()),s.inflateCoords(this.m_absDistance,this.m_absDistance),e.addEnvelope(s,!1)}setStrongSimple(e){return e.getImpl().setIsSimple(4,this.m_tolerance.total()),e.getImpl().updateOGCFlagsProtected(),e}}function w(e){return(0,l.s)(e,0),e}function v(e,t){return!!e.isEmpty()||Math.min(e.width(),e.height())>t}function T(e,t,s,n,i,r,o,a){const h=e.getXY(s),l=e.getXY(n);if(h.equals(l))return-1;const u=.25*o,_=.25*o,f=new c.P;f.setSub(l,h);const g=f.length(),d=g*g*.25,p=r*r-d;if(p<=d)return-1;const P=Math.sqrt(p);f.normalize();const y=f.clone();y.rightPerpendicularThis();const b=d/P,x=b<=_,C=c.P.lerp(l,h,.5),D=y.clone(),w=b-u;D.scaleAddThis(Math.max(0,w),C),y.negate().scaleAddThis(P,C);const v=3.61*(0,c.a)(r-_),T=D.sub(h),k=D.sub(l);let S=!1,I=0;const E=(0,c.d)(64,0);(0,m.g)(a===E.length);{for(let r=e.getPrevVertexEx(n,i);r!==s;){if(1===e.getUserIndex(r,t))return-1;if(e.getXY(r).equals(l)){const t=e.getPrevVertexEx(r,i);e.removeVertex(r,!1),r=t;continue}break}const r=new c.P,o=h.clone();E[I++]=1;for(let m=e.getNextVertexEx(s,i);m!==n;){if(1===e.getUserIndex(m,t))return-1;const s=e.getXY(m);if(s.equals(o)){const t=e.getNextVertexEx(m,i);e.removeVertex(m,!1),m=t;continue}E[I++]=0;const n=new c.P;if(n.setSub(s,h),n.dotProduct(y)<0)return 0;(c.P.sqrDistance(s,h)>v||c.P.sqrDistance(s,l)>v)&&(S=!0);let a=0;if(s.sub(h).crossProduct(T)>=0&&(a=1),s.sub(l).crossProduct(k)<=0&&(a|=2),0===a)return 0;E[I-1]=a,r.assign(o),o.assign(s),m=e.getNextVertexEx(m,i)}if(1===I)return 0;(0,m.g)(I<E.length),E[I++]=2}let M=!0;for(let e=1,t=0;e<I;e++)if(E[e]!==E[e-1]&&(t++,M=t<3&&(1===t&&3===E[e]||2===t&&2===E[e]),!M))return 0;if(I>2&&M&&(3===I||!S)){let t=0,r=e.getNextVertexEx(s,i);for(x||(e.setXY(r,D),r=e.getNextVertexEx(r,i));r!==n;){const s=e.getNextVertexEx(r,i);e.removeVertex(r,!1),r=s,++t}return t}if((0,m.g)(3!==I),S&&I>3)return 0;const G=h.clone();let R=s;const V=h.clone();let X=1,Y=-1,A=R,B=0;for(I=1;A!==n;){A=e.getNextVertexEx(A,i);const t=E[I++];if(0===t){if(A===n)break;continue}const s=e.getXY(A);if(-1!==Y){if(Y&X&t&3){e.removeVertex(R,!0),B++,R=A,V.setCoordsPoint2D(s),X=t;continue}if(3===X&&0!==Y&&0!==t){if(V.setCoordsPoint2D(D),x||V.equals(G)){e.removeVertex(R,!0),B++,R=A,V.setCoordsPoint2D(s),X=t;continue}e.setXY(R,V)}}Y=X,G.setCoordsPoint2D(V),R=A,X=t,V.setCoordsPoint2D(s)}return B}function k(e,t,s,n){for(let i=0,r=e.getPathCount();i<r;i++){const r=e.getXY(e.getPathStart(i));r.x!==s.xmin&&r.x!==s.xmax&&t.addPath(e,i,n)}}class S extends r.G{constructor(e,t,s,n,i,r,m){super(),this.m_currentUnionEnvelope2D=new a.Envelope2D,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=m,this.m_bufferer=new D(m),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=s,this.m_maxDeviation=n,this.m_maxVerticesInFullCircle=i}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return(0,m.c)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const I=new class{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,n,i){return this.executeManyEx(e,t,s,Number.NaN,96,n,i)}execute(e,t,s,n){Number.isFinite(s)||(0,m.a)("Invalid distance for buffer operation");const i=new r.S([e]),o=[s],a=this.executeMany(i,t,o,!1,n).next();return a||(0,m.d)("null buffer output"),a}executeManyEx(e,t,s,n,i,r,a){if(void 0!==s.find(e=>!Number.isFinite(e))&&(0,m.a)("Invalid distance for buffer operation"),r){const r=new S(e,t,s,n,i,!1,a);return(new o.W).executeMany(r,t,a,2)}return new S(e,t,s,n,i,!1,a)}};function E(e,t,s){return I.execute(e,t,s,null)}function M(e,t,s,n,i,m){const o=I.executeManyEx(new r.S(e),t,s,n,i,m,null);return Array.from(o)}function G(){return I.supportsCurves()}},64523:(e,t,s)=>{s.d(t,{O:()=>l});var n=s(31635),i=s(76061),r=s(55537),m=s(88885),o=s(95213),a=s(83661),h=s(5247);class l{getOperatorType(){return 10204}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,n){return new c(e,t,s,n)}execute(e,t,s,n){return e||(0,r.a)("null param is not allowed."),new c(null,t,s,n).generalize(e)}}class c extends i.G{constructor(e,t,s,n){super(),this.m_pline=null,this.m_point=new o.P,this.m_stack=[],this.m_resultstack=[],this.m_callCount=0,this.m_progressTracker=n,this.m_geoms=e,this.m_maxDeviation=t,this.m_bRemoveDegenerateParts=s}tock(){return!0}getRank(){return 1}next(){const e=this.m_geoms.next();return null===e?null:((0,r.c)(e),this.generalize(e))}getGeometryID(){return this.m_geoms.getGeometryID()}generalize(e){const t=e.getGeometryType();if((0,r.e)(t))return e;if(t===r.G.enumEnvelope){const t=new m.a({vd:e.getDescription()});return t.addEnvelope(e,!1),this.generalize(t)}if((0,r.f)(t)){const t=new m.P({vd:e.getDescription()});return t.addSegment(e,!0),this.generalize(t)}if((0,r.h)(t)||(0,r.t)(""),e.isEmpty()||this.m_maxDeviation<=0)return e;const s=(new h.O).execute(e,0,.05*this.m_maxDeviation,0,this.m_progressTracker);e.hasNonLinearSegments()&&(this.m_maxDeviation*=.95);const i=s,o=e.createInstance();o.getGeometryType()===r.G.enumPolygon&&o.setFillRule(e.getFillRule()),this.m_xy=i.getAttributeStreamRef(0);{const e={stack:[],error:void 0,hasError:!1};try{const t=new m.L;this.m_pline=t,(0,n.mS)(e,(0,a.h)(()=>{this.m_pline=null},!1),!1);for(let e=0,t=i.getPathCount();e<t;e++)this.generalizePath(i.getImpl(),e,o.getImpl())}catch(t){e.error=t,e.hasError=!0}finally{(0,n.hk)(e)}}return this.m_resultstack.length=0,this.m_stack.length=0,o}generalizePath(e,t,s){if(e.getPathSize(t)<2)return;this.m_resultstack.length=0,this.m_stack.length=0;const n=e.getPathStart(t),i=e.getPathEnd(t)-1,r=e.isClosedPath(t),m=e.isClosedPathInXYPlane(t);let o=0,h=-1;this.m_stack.push(r?n:i),this.m_stack.push(n);let l=!1,c=!1;for(!this.m_bRemoveDegenerateParts&&m&&(l=!0,c=!0);this.m_stack.length>1;){const t=this.m_stack.at(-1);this.m_stack.pop();const s=this.m_stack.at(-1);let n=e.getXY(t);this.m_pline.setStartXY(n),n=e.getXY(s),this.m_pline.setEndXY(n);const r=[Number.NaN];let m=this.findGreatestDistance(t,s,i,r);m>=0&&(l?l=!1:(c&&r[0]>o&&(o=r[0],h=m),r[0]<=this.m_maxDeviation&&(m=-1))),m>=0?(this.m_stack.push(m),this.m_stack.push(t)):this.m_resultstack.push(t)}r||this.m_resultstack.push(this.m_stack[0]);const u=this.m_resultstack.length;if(u===e.getPathSize(t)&&u===this.m_stack.length)s.addPath(e,t,!0);else if(this.m_resultstack.length>0){if(this.m_bRemoveDegenerateParts&&this.m_resultstack.length<=2){if(r||1===this.m_resultstack.length)return;if(a.P.distance(e.getXY(this.m_resultstack[0]),e.getXY(this.m_resultstack[1]))<=this.m_maxDeviation)return}if(c&&h>=0&&o<=this.m_maxDeviation){const e=this.m_resultstack.at(-1)>h;this.m_resultstack.push(h),e&&(this.m_resultstack[this.m_resultstack.length-2]=(0,a.c)(this.m_resultstack[this.m_resultstack.length-1],this.m_resultstack[this.m_resultstack.length-1]=this.m_resultstack[this.m_resultstack.length-2]))}for(let t=0,n=this.m_resultstack.length;t<n;t++)e.getPointByVal(this.m_resultstack[t],this.m_point),0===t?s.startPathPoint(this.m_point):s.lineToPoint(this.m_point);if(r){for(let e=this.m_resultstack.length;e<3;e++)s.lineToPoint(this.m_point);s.closePathWithLine()}}}findGreatestDistance(e,t,s,n){let i=t-1;t<=e&&(i=s);let r=-1,m=0;const o=new a.P;for(let t=e+1;t<=i;t++){this.m_xy.queryPoint2D(2*t,o);const e=o.x,s=o.y,n=this.m_pline.getClosestCoordinate(o,!1);o.assign(this.m_pline.getCoord2D(n)),o.x-=e,o.y-=s;const i=o.length();i>m&&(r=t,m=i),this.m_callCount++}return n[0]=m,r}}},98783:(e,t,s)=>{s.d(t,{O:()=>m});var n=s(76061),i=s(55537),r=s(39117);class m{getOperatorType(){return 10104}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}isSimple(e,t,s,n,i){return 5===(0,r.X)(e,t,s,n,i)}executeMany(e,t,s,n){return new o(e,t,s,n)}execute(e,t,s,r){const m=new n.S([e]),o=this.executeMany(m,t,s,r).next();return o||(0,i.d)("null output"),o}}class o extends n.G{constructor(e,t,s,n){super(),e||(0,i.a)(""),this.m_progressTracker=n,this.m_bForceSimplify=s,this.m_index=-1,this.m_inputGeometryCursor=e,this.m_spatialReference=t}next(){const e=this.m_inputGeometryCursor.next();return e?((0,i.c)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.simplify(e)):null}getGeometryID(){return this.m_index}tock(){return!1}getRank(){return 1}simplify(e){return e||(0,i.a)(""),(0,r.Y)(e,this.m_spatialReference,this.m_bForceSimplify,this.m_progressTracker)}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5245,7136],{4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,xm:()=>a});var s=i(34275),n=i(9093);function r(e,t=!1){return e<=s.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function a(e){return((0,s.iu)(e)?e.byteLength/8:e.length)<=s.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,n.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},5834:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function h(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new n(e.getPointX(t),e.getPointY(t),i),r=e.hasZ(t),a=e.hasM(t);return r&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new r(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),n=e.hasM(t),r=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);r.zmin=i.vmin,r.zmax=i.vmax}if(n){const i=e.getMExtent(t);r.mmin=i.vmin,r.mmax=i.vmax}return r}};class n{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class r{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,n){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=n,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,i)=>{i.d(t,{G:()=>R});var s=i(4718),n=i(12359),r=i(90634),a=i(62577),o=i(21325),l=i(29441),u=i(51441),c=i(30524),h=i(87445),d=i(1873),p=i(43668);class f{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,l.Wq)(t),n=this.fieldsIndex.get(s),r=n?null:(0,l.j4)(s,i),a=n?n.name:(0,l.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){const s=i?i.name:t;let n=null;return this._fieldDataCache.has(s)?n=this._fieldDataCache.get(s)?.clause:i||(n=(0,l.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:n})),i?this.featureAdapter.getAttribute(e,s):n?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,n=t.normalizationTotal,r=this.fieldsIndex.get(t.field),a=(0,c.zD)(r)||(0,c.Ah)(r),o=(0,c.OH)(r);return e.map(e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,d.gJ)(r)}${t.fieldDelimiter}${(0,d.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,d.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof r&&i&&(a?r=r?new Date(r).getTime():null:o&&(r=r?(0,h.rb)(r):null)),s&&Number.isFinite(r)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,d.zS)(r,s,i,n)}return r})}async getExpressionValues(e,t,i,s,n){const{arcadeUtils:r}=await(0,p.l)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const o=r.createFunction(t),l=r.getViewInfo(i),c={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:c,geometry:a?{...(0,u.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},h=r.createExecContext(t,l,n);return r.executeFunction(o,h)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.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,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:n}=this._fieldDataCache.get(s);i[t]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let n=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++n),n>1?null:e}}var m=i(31464),y=i(58727);function g(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function x(e,t,i,s,n,r=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:n,draped:r}}var F=i(5834),v=i(59977),w=i(57231),_=i(11440),S=i(60909),I=i(98623),T=i(96285);const M="bin";class R{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,n=t?.length;if(!n)return 1;const r=new Map,a=new Map,o=new Set;for(const n of s){const{statisticType:s}=n,l="exceedslimit"!==s?n.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:n}=u[t],r=s.join(",");i&&!e.validateItems(n,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...(0,m.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,n=A(this.hasZ,this.hasM),{point:r,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,d=this._getPointCreator(a,t,this.spatialReference,i),p=new C(null,0),f=new C(null,0),m={x:0,y:0,z:0};for(const t of this.items){const i=s.getGeometry(t);if(null==i)continue;const{coords:a}=i,y=i.isPoint?z:i.lengths;if(p.coords=a,f.coords=a,e.returnEdge){let e=0;for(let i=0;i<y.length;i++){const a=y[i],h=e;for(let i=0;i<a;i++,e+=n){if(!c&&i===a-1)continue;const y=p;y.coordsIndex=e;const g=f;g.coordsIndex=i===a-1?h:e+n;const F=m;if(!b(m,r,y,g))continue;const v=(r.x-F.x)/o,w=(r.y-F.y)/l,_=v*v+w*w;_<=1&&u.candidates.push(x(s.getObjectId(t),d(F),Math.sqrt(_),d(y),d(g)))}}}if("all"===e.vertexMode){let e=0;for(let i=0;i<y.length;i++){const a=y[i],h=e,m=f;m.coordsIndex=h;for(let i=0;i<a;i++,e+=n){const n=p;if(n.coordsIndex=e,c&&i===a-1&&n.x===m.x&&n.y===m.y)continue;const h=(r.x-n.x)/o,f=(r.y-n.y)/l,y=h*h+f*f;y<=1&&u.candidates.push(g(s.getObjectId(t),d(n),Math.sqrt(y)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const i=[];for(let t=0;t<y.length;t++){i.push(e);const s=y[t];e+=s*n,!c&&s>1&&i.push(e-n)}for(const e of i){const i=p;i.coordsIndex=e;const n=(r.x-i.x)/o,a=(r.y-i.y)/l,c=n*n+a*a;c<=1&&u.candidates.push(g(s.getObjectId(t),d(i),Math.sqrt(c)))}}}return u.candidates.sort((e,t)=>e.distance-t.distance),u}_getPointCreator(e,t,i,s){const n=null==s||(0,o.aI)(i,s)?e=>e:e=>(0,m.Cv)(e,i,s),{hasZ:r}=this;return"3d"===e?r&&t?({x:e,y:t,z:i})=>n({x:e,y:t,z:i}):({x:e,y:t})=>n({x:e,y:t,z:0}):({x:e,y:t})=>n({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:h}=e,p=this.fieldsIndex.get(t),f=(0,c.vE)(p)||(0,c.zD)(p)||(0,c.Ah)(p),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:l,timeZone:u},this.items),y=(0,d.Vb)({normalizationType:n,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:p?.type},x=(0,c.yM)(p)?(0,d.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:h}):(0,d.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!n,supportsNullCount:y,percentileParams:g,outStatisticTypes:h});return(0,d.oZ)(x,h,f)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:n,scale:r,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a},this.items,!1),l=(0,d.b3)(o);return(0,d.lv)(l,s,n,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:h,timeZone:p},this.items),m=(0,d.Rw)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,d.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:h,timeZone:p},this.items);return(0,d.$y)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),n=t[0],r=this.fieldsIndex.get(n),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,d.FM)(r?.type,a);e.sort((e,t)=>{const s=i(e,n,r),a=i(t,n,r);return o(s,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:n,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:c,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:f,returnM:m}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&m,hasZ:n&&f,objectIdFieldName:r,spatialReference:(0,u.ag)(c||o),transform:h&&(0,a.VV)(h)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:n}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=n&&m,x=s&&y;let F=[],v=0;const w=[...t];if(this._sortFeatures(w,r,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||c)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!c)for(const s of w){const n=this.featureAdapter.getGeometry(s),r={attributes:i.getAttributes(s),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,n,h,e,g,x),metadata:this.featureAdapter.getMetadata?.(s)};t&&n&&!r.geometry&&(r.centroid=(0,u.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),F[v++]=r}else if(!l&&c)for(const t of w)F[v++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of w)F[v++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,x),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of w){const t=i.getAttributes(e);t&&(F[v++]={attributes:t})}const _=d||0;if(null!=p){const e=_+p;F=F.slice(_,Math.min(F.length,e))}return F}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=A(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],n=new Map,r=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:h,having:d,orderByFields:p,resultRecordCount:m}=e,y=h?.length,g=!!y,x=g?h[0]:null,F=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,f=e,m="exceedslimit"!==p?e.onStatisticField:void 0,v="percentile_disc"===p||"percentile_cont"===p,w="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,_=g&&1===y&&(m===x||F)&&"count"===p;if(g){if(!a.has(m)){const e=[];for(const i of h){const s=this._getAttributeValues(l,i,t,n);e.push(s)}a.set(m,this._calculateUniqueValues(e,t,!w&&l.returnDistinctValues))}const e=a.get(m);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:r,items:a,itemPositions:c}=e[s],p=r.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(w){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(f,a);e.aggregateGeometries[i]=t}else{let s=null;if(_)s=i;else{const e=this._getAttributeValues(l,m,t,n),i=c.map(t=>e[t]);s=v&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;h.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=r[i]),o.set(p,e)}}}else if(w){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(f,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,m,t,n);i.attributes[u]=v&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,r,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,c.yM)(this.fieldsIndex.get(m))&&!this._isAnyDateField(m)?null:this.fieldsIndex.get(m)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const v=g?Array.from(o.values()):[i];return this._sortFeatures(v,p,(e,t)=>e.attributes[t]),m&&(v.length=Math.min(m,v.length)),{fields:s,features:v}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,c.vE)(t)||(0,c.zD)(t)||(0,c.Ah)(t)||(0,c.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:a}=await Promise.all([i.e(9930),i.e(9940)]).then(i.bind(i,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:c,spatialReference:h,geometryType:d,hasZ:p,hasM:f}=this,m=t.map(e=>(0,u.pL)(d,p,f,c.getGeometry(e))),y=s(h,m,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,r.v)(y):(0,r.HA)(a(h,m));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,r.HA)(a(h,m)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,i,s){const{onStatisticField:n,statisticType:r}=e;let a=null;return a=i?.has(n)?i.get(n):(0,c.yM)(this.fieldsIndex.get(n))||this._isAnyDateField(n)?(0,d.z9)({values:t,returnDistinct:s}):(0,d.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(n,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:n}=e,{value:r,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,d.qg)(t,{value:r,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===n})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const n=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,n));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},n=t.length;for(let r=0;r<n;r++){const n=t[r],a=[];for(const t of e)a.push(t[r]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[n],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(n),s[o].itemPositions.push(r))}return s}async _getDataValues(e,t,i=!0){const n=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:a,timeZone:o}=e;return r?n.getExpressionValues(t,r,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):n.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,n=t.min??0,r=t.max??0,a=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=n&&o<=r){const e=(0,d.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:n}=t,r=[],a=[{name:s??i,alias:s??i,type:n??"esriFieldTypeString"},{name:M,alias:M,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:n}=h[t],o=await this._createBinsResponse(e,n);if(r.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(F.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(v.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(_.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:n,numBins:r,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,d.sU)(c,{field:s,normalizationField:n,normalizationType:a,normalizationTotal:o,numBins:r,minValue:(0,y.dO)(l,!1),maxValue:(0,y.dO)(u,!1)}),p=this._calculateHistogramBins(c,h,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:n,start:r,end:a,snapToData:o,returnFullIntervalBin:l}=e,u=n.unit,h=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,c.OH)(this.fieldsIndex.get(s)),p=w.g.toJSON(u),f=h.filter(Boolean).sort((e,t)=>e-t),m=null!=r?(0,y.dO)(r,d):f[0],g=null!=a?(0,y.dO)(a,d):f[f.length-1],x={zone:t.outTimeReference?.ianaTimeZone??I.n$},F=T.c9.fromMillis(m,x),v=T.c9.fromMillis(g,x),_=[];if("last"===o){let e=v;for(;e>F;){const t=e.minus({[p]:n.value});if(t<F){_.unshift([l?t.toMillis():F.toMillis(),e.toMillis()]);break}_.unshift([t.toMillis(),e.toMillis()]),e=t}}else{let e="first"===o?F:F.startOf(p);for(;e<=v;){const t=e.plus({[p]:n.value});if(t>v){_.push([e.toMillis(),l?t.toMillis():v.toMillis()]);break}_.push([e.toMillis(),t.toMillis()]),e=t}}const S=this._calculateHistogramBins(h,{intervals:_,min:m,max:g},i);return this._createFeaturesFromHistogramBins(S,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,n=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),r=(0,c.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map(e=>(0,y.dO)(e,r)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(n,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:n,start:r,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=(0,c.OH)(this.fieldsIndex.get(s)),u=(0,d.sU)(o,{field:s,classificationMethod:"defined-interval",definedInterval:n,minValue:(0,y.dO)(r,l),maxValue:(0,y.dO)(a,l)},!0),h=this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(h,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,n=s||"lowerBoundary",r=i||"upperBoundary",a=[],o=[{name:n,alias:n,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:M,alias:M,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const h="dateBin"===t.bin.type,d=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:s,items:p}=i,f={attributes:{}};let m;if(f.attributes[n]=h&&d&&null!=e?T.c9.fromMillis(e,{zone:d}).toISO():e,f.attributes[r]=h&&d&&null!=s?T.c9.fromMillis(s,{zone:d}).toISO():s,l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},p),f.attributes[M]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(f))):(t.bin?.splitBy&&(f.attributes[M]=++c),m=await this._createStatisticsQueryResponse(t,p,f),a.push(f)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function b(e,t,i,s){const n=s.x-i.x,r=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=n*n+r*r;if(0===l)return!1;const u=a*n+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+n*c,e.y=i.y+r*c,!0}function A(e,t){return e?t?4:3:t?3:2}class C{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 z=[1]},9093:(e,t,i)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>n,vt:()=>s,zK:()=>r});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:n,create:s,fromValues:function(e,t,i,s,n,r,a,o,l,u,c,h,d,p,f,m){return[e,t,i,s,n,r,a,o,l,u,c,h,d,p,f,m]}},Symbol.toStringTag,{value:"Module"}))},11006:(e,t,i)=>{function s(e,t,i,s,r){n(e,t,i||0,s||e.length-1,r||a)}function n(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);n(e,t,Math.max(i,Math.floor(t-l*c/o+h)),Math.min(s,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=i,f=s;for(r(e,i,t),a(e[s],d)>0&&r(e,i,s);p<f;){for(r(e,p,f),p++,f--;a(e[p],d)<0;)p++;for(;a(e[f],d)>0;)f--}0===a(e[i],d)?r(e,i,f):r(e,++f,s),f<=t&&(i=f+1),t<=f&&(s=f-1)}}function r(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},11440:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,n.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s.Cg)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c),c.from=(0,a.dp)(c)},17136:(e,t,i)=>{i.d(t,{O7:()=>S,el:()=>_});var s=i(92602),n=i(49186),r=i(53966),a=i(39829),o=i(82799),l=i(80754),u=i(21325),c=i(28735),h=i(78888),d=i(65864),p=i(2272),f=i(84952),m=i(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function x(e){return"polyline"===e[0].type}function F(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A("internal:geometry",e)}const i=(0,l.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],r=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-n)*(a-n)+(o-r)*(o-r)),u=(o-r)/l,c=(a-n)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,a=c*s+n,o=u*s+r;i.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,s=c*e+n,a=u*e+r;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new o.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function v(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],r=t.geometries[s],a=(0,l.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(s,0))}return!0}})}if(n===i){if(g(e))for(const t of(0,l.r8)(r))e[n]=e[n].addRing(t);else if(x(e))for(const t of(0,l.r8)(r))e[n]=e[n].addPath(t)}else i=n,e[n]=r}return e}async function _(e,t,i){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let r,g,x,S,I,T,M,R,b=0;const A=[],C=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,u.Vp)(r),x=r.isWebMercator,T=x?102100:4326,S=l.j7[T].maxX,I=l.j7[T].minX,M=l.j7[T].plus180Line,R=l.j7[T].minus180Line),g)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(v(t.clone(),S,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>v(e,S,I)),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);C.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,I)*(2*S);let s=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(M)&&r!==S?(b=r>b?r:b,s=F(s,x),A.push(s),C.push("cut")):e.intersects(R)&&n!==I?(b=r*(2*S)>b?r*(2*S):b,s=F(s,x,360),A.push(s),C.push("cut")):C.push(s)}else C.push(t.clone());else C.push(t);else C.push(t);let z=(0,l.kd)(b,S),B=-90;const N=z,E=new o.A;for(;z>0;){const e=360*z-180;E.addPath([[e,B],[e,-1*B]]),B*=-1,z--}if(A.length>0&&N>0){const t=w(A,await async function(e,t,i,s){const n=(0,p.Dl)(e),r=t[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(r),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.A)(n.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,d.rS)(e);return t.spatialReference=r,t})}}(n,A,E,i)),s=[],r=[];for(let i=0;i<C.length;i++){const n=C[i];if("cut"!==n)r.push(n);else{const n=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),r.push("simplify")):r.push(x?(0,c.Gh)(n):n)}}if(!s.length)return r;const a=await async function(e,t,i){const s="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,d.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:o}=await(0,h.A)(s.path+"/simplify",a);return(0,m.V)(o.geometries,r,n)}(n,s,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(x?(0,c.Gh)(a.shift()):a.shift())}return o}const q=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)q.push(t);else{const e=A.shift();q.push(!0===x?(0,c.Gh)(e):e)}}return q}function S(e,t,i){const s=(0,u.Vp)(i);if(null==s)return e;const[n,r]=s.valid,a=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/a):t<n&&(o=-Math.ceil(Math.abs(t-n)/a)),e>r?l=Math.ceil(Math.abs(e-r)/a):e<n&&(l=-Math.ceil(Math.abs(e-n)/a));let c=e+(o-l)*a;const h=c-t;return h>r?c-=a:h<n&&(c+=a),c}},29441:(e,t,i)=>{i.d(t,{MG:()=>x,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>f,j4:()=>m,vl:()=>u});var s=i(49186),n=i(44123),r=i(98453);const a=new n.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),h=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function d(e,t,i={}){const n=m(t,e);if(!n){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const r=i.expressionName||"expression";if(i.validateStandardized&&!n.isStandardized)throw new s.A(o,`${r} is not standard`,{expression:t});if(i.validateAggregate&&!n.isAggregate)throw new s.A(o,`${r} does not contain a valid aggregate function`,{expression:t});return n.fieldNames}function p(e,t,i,s){if(!i)return!0;const n="where clause";return x(e,t,d(e,i,{validateStandardized:!0,expressionName:n}),{expressionName:n,query:s}),!0}function f(e,t,i,n,r){if(!i)return!0;const a="having clause",l=d(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:r});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:s}=t,r=e.get(s)?.name;return n.some(t=>{const{onStatisticField:s,statisticType:n}=t,a=e.get(s)?.name;return a===r&&n.toLowerCase().trim()===i})});if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,n={}){const r=new Map;if(function(e,t,i,s,n){const r=n.includes("*")?[...i,...n.filter(e=>"*"!==e)]:n;for(const n of r)if(t.get(n))F(e,t,i,s,n);else try{const r=d(t,y(n),{validateStandardized:!0});for(const n of r)F(e,t,i,s,n)}catch(t){e.set(n,{type:"expression-error",expression:n,error:t})}}(r,e,t,n.allowedFieldTypes??h,i),r.size){const e=n.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(r.values()),query:n.query})}}function F(e,t,i,s,n){const a=t.get(n);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(n,{type:"invalid-type",fieldName:a.name,fieldType:r.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,e=>r.m.fromJSON(e))}):e.set(n,{type:"missing-field",fieldName:a.name}):e.set(n,{type:"invalid-field",fieldName:n})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>x});var s=i(4576),n=i(74887),r=i(98988),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const i=[];for(const s of e)i.push(d(s,t));return i}function d(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,r.initializeProjection)(i.map(e=>({source:e,dest:t})))}const f=c.bind(null,l.je),m=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?f(e):m(e);return t.spatialReference=i,t}return(0,r.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,n.Tw)()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:n,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?n(t.map(f)):n(t.map(m)):n((0,r.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function x(e,t,i,s){return g.push(e,t,i,s)}},41266:(e,t,i)=>{i.d(t,{A:()=>y});var s=i(31635),n=i(69540),r=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);const h=new r.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,n.O)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,s.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,s.Cg)([(0,l.e)(h)],d.prototype,"valueType",void 0),d=(0,s.Cg)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,c.dp)(d);const f=new r.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),m=new r.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends((0,n.O)(a.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,s.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,s.Cg)([(0,l.e)(f,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,s.Cg)([(0,l.e)(m)],y.prototype,"transformation",void 0),y=(0,s.Cg)([(0,u.$)("esri.rest.support.BinParametersBase")],y)},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>u});var s=i(31635),n=i(66552),r=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{const t=e;let 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");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&r.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,o.e)(u,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,s.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},44123:(e,t,i)=>{i.r(t),i.d(t,{WhereClauseCache:()=>r});var s=i(66344),n=i(88368);class r{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=n.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),n=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var s=i(90708),n=i(92722);const r=new n.A,a=new n.A,o=new n.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,n=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&n,l=e.hasM&&r;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,n,r);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,n,u,c,h=t,d=i){const p=t&&h,f=i&&d,m=null!=n?"coords"in n?n:n.geometry:null;if(null==m)return null;if(u){let n=(0,s.kz)(a,m,t,i,e,u,h,d);return c&&(n=(0,s.Nl)(o,n,p,f,e,c)),l[e]?.(n,p,f)??null}if(c){const n=(0,s.Nl)(o,m,t,i,e,c,h,d);return l[e]?.(n,p,f)??null}return(0,s.Q4)(r,m,t,i,h,d),l[e]?.(r,p,f)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},54339:(e,t,i)=>{function s(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const s of t.fieldNames)i.push(e.attributes[s]??null);return JSON.stringify(i)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>s,r:()=>n})},57231:(e,t,i)=>{i.d(t,{g:()=>s});const s=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>F,iJ:()=>m,v8:()=>p});var s=i(49186),n=i(66552),r=i(83047),a=i(98988),o=i(90634),l=i(65864),u=i(17136),c=i(21325),h=i(31464);const d=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),f="frequency";async function m(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:f}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:n,groupByFieldsForStatistics:r,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();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].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,n){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let f=await async function(e){const{distance:t,units:n}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=n?d.fromJSON(n):(0,r.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,h.Nk)(o,c.KK).then(()=>(0,h.Cv)(a,c.KK)),f=await i.e(9159).then(i.bind(i,49159));await f.load();const m=f.execute(p,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;f=(0,o.HA)(f),f.spatialReference=t}if(f){await(0,h.Nk)(f.spatialReference,n),f=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(f,n);const t=(await(0,u.el)((0,l.rS)(f)))[0];if(null==t)throw p;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&x(f,n)?{densificationStep:8*i}:void 0,r=t.toJSON(),a=(0,h.Cv)(r,r.spatialReference,n,s);if(!a)throw p;a.spatialReference=n,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function F(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>g});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(69540),h=i(25482),d=i(57231);let p=class extends((0,c.O)(h.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,s.Cg)([(0,o.e)(d.g)],p.prototype,"unit",void 0),p=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],p);const f=p;function m(e,t,i){(0,n.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function y(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let g=class extends u.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,s.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>y(t,"end")},write:{writer:m}}})],g.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({type:f,json:{name:"parameters",write:!0}})],g.prototype,"interval",void 0),(0,s.Cg)([(0,r.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],g.prototype,"offset",void 0),(0,s.Cg)([(0,r.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],g.prototype,"returnFullIntervalBin",void 0),(0,s.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>y(t,"start")},write:{writer:m}}})],g.prototype,"start",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],g.prototype,"snapToData",void 0),(0,s.Cg)([(0,o.e)({dateBin:"date"},{readOnly:!0})],g.prototype,"type",void 0),g=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinParameters")],g),g.from=(0,a.dp)(g)},60909:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function h(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},62660:(e,t,i)=>{i.d(t,{tC:()=>w,c0:()=>v,xt:()=>F});var s=i(49186),n=i(94078),r=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,n,r){const a=l(n,r),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,n=0;s<u.length;s++,n+=a)if(!c(e,t,i,o[n],o[n+1]))return!1;return!0}function c(e,t,i,s,n){if(!e)return!1;const r=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,r,c,e,s,n),c+=e*r;return u}function h(e,t,i,s,n,r,a){let o=e,l=s;for(let e=s,u=s+n*i;e<u;e+=i){l=e+i,l===u&&(l=s);const n=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&n+(a-c)/(d-c)*(h-n)<r&&(o=!o)}return o}var d=i(90708),p=i(92722),f=i(51441),m=i(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},x={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function F(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,n.qz)(t,(0,f.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,n.rL)(t,(0,f.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?r.xB:(0,r.xK)(l);return n=>e(t,(0,f.pL)(i,s,o,n))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=x[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,f.pL)(i,s,o,e))}async function v(e,t,i){const{spatialRel:n,geometry:r}=e;if(r){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(n))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(r.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(r))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m.Nk)(e.geometry?.spatialReference,e.outSR)}}}function w(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62798:(e,t,i)=>{i.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var s=i(49186),n=i(29441),r=i(31464),a=i(62660),o=i(43668);const l="unsupported-query";async function u(e,t){const 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 s.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:i,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new s.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,i){const{outStatistics:r,groupByFieldsForStatistics:a,having:o}=i,u=a?.length,c=r?.length;if(o){if(!u||!c)throw new s.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,n.eD)(e,t,o,r,i)}if(c){if(null==(h=r)||!h.every(e=>"exceedslimit"!==e.statisticType))return;const o=r.map(e=>e.onStatisticField).filter(Boolean);(0,n.MG)(e,t,o,{expressionName:"onStatisticFields",query:i}),u&&(0,n.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:i});for(const a of r){const{onStatisticField:r,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(r)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,n.MG)(e,t,[r],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:i});else{const{statisticParameters:e}=a;if(!e)throw new s.A(l,"statisticParameters should be set for percentile type",{definition:a,query:i})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,i,o),(0,r.Nk)(o,e.outSR)]).then(()=>e)}function h(e,t,i){const{returnDistinctValues:r,outStatistics:a}=i,o=a?a.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const s=" asc",r=" desc",a=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(r)?t.split(r)[0]:e}).filter(e=>!o.includes(e));(0,n.MG)(e,t,a,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,n.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(r)throw new s.A(l,"outFields should be specified for returnDistinctValues",{query:i});(0,n.SN)(e,t,i.where,i)}const d=new Set([...n.vl,...n.VW]);async function p(e,t,{fieldsIndex:i,geometryType:n,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new s.A(l,"Unsupported query options",{query:e});return h(i,u,e),Promise.all([f(i,u,t,e),(0,a.c0)(e,n,o),(0,r.Nk)(o,e.outSR)]).then(()=>e)}async function f(e,t,i,r){let a=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,o.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 s.A(l,"field or valueExpression is required",{params:i});(0,n.MG)(e,t,a,{expressionName:"statistics",query:r})}},70328:(e,t,i)=>{i.d(t,{BI:()=>F,DC:()=>h,Ej:()=>p,Ie:()=>g,Jt:()=>x,Ne:()=>f,RF:()=>c,aI:()=>w,fA:()=>a,gE:()=>l,hZ:()=>y,iT:()=>d,is:()=>v,qv:()=>_,vI:()=>m,vY:()=>o,v_:()=>S,vt:()=>r,w1:()=>u});var s=i(5443),n=(i(19419),i(4197));function r(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,s,n,a,o=r()){return o[0]=e,o[1]=t,o[2]=i,o[3]=s,o[4]=n,o[5]=a,o}function o(e,t=r()){return function(e,t,i,s=r()){return y(s,_),function(e,t,i=0,s=t.length/3){let n=e[0],r=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)n=Math.min(n,t[i+3*e]),r=Math.min(r,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=n,e[1]=r,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(s,e,t,i),s}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[i,s,r,a,o,l]=e;return t[0]=i,t[1]=s,t[2]=r,t[3]=i,t[4]=s,t[5]=l,t[6]=i,t[7]=o,t[8]=r,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=s,t[14]=r,t[15]=a,t[16]=s,t[17]=l,t[18]=a,t[19]=o,t[20]=r,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new s.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?y(e,_):r(_)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function F(e,t,i,s,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function v(e){return 6===e.length}function w(e,t,i){if(null==e||null==t)return e===t;if(!v(e)||!v(t))return!1;if(i){for(let s=0;s<e.length;s++)if(!i(e[s],t[s]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];r()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),n=i(16930),r=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>r,W:()=>n});var s=i(21818);async function n(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:n,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(n&&r)await t.forEach(e=>{const t=i.getAttribute((0,s.zI)(e),n),l=i.getAttribute((0,s.zI)(e),r);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=n||r;await t.forEach(t=>{const n=i.getAttribute((0,s.zI)(t),e);null==n||isNaN(n)||(a=Math.min(a,n),o=Math.max(o,n))})}return{start:a,end:o}}function r(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:n}=e;if(!s&&!n)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&n?function(e,t,i,s,n){return null!=s&&null!=n?r=>{const a=e(r,t),o=e(r,i);return(null==a||a<=n)&&(null==o||o>=s)}:null!=s?t=>{const n=e(t,i);return null==n||n>=s}:null!=n?i=>{const s=e(i,t);return null==s||s<=n}:void 0}(o,s,n,r,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?n=>{const r=e(n,t);return null!=r&&r>=i&&r<=s}:null!=i?s=>{const n=e(s,t);return null!=n&&n>=i}:null!=s?i=>{const n=e(i,t);return null!=n&&n<=s}:void 0}(o,s||n,r,a)}},92300:(e,t,i)=>{i.d(t,{V:()=>r,X:()=>n});var s=i(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function r(e,t,i){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},95422:(e,t,i)=>{i.d(t,{do:()=>D,ux:()=>P,Wc:()=>Z});var s=i(4576),n=i(21818),r=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(83047),c=i(12195),h=i(98988),d=i(70328),p=i(19419),f=i(537),m=i(65864),y=i(21325),g=i(90708),x=i(29441),F=i(51441),v=i(31464);class w{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.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 S(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let _=0;class S{constructor(e){this.items=e,this.time=performance.now(),this.id=_++}}var I=i(99352),T=i(8384),M=i(58727),R=i(62798),b=i(62660),A=i(86420),C=i(95466),z=(i(53966),i(36708),i(44794),i(78659));Symbol("Yield");var B=i(31635),N=i(65008),E=i(10107),q=(i(87811),i(40608));let G=class extends N.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,B.Cg)([(0,E.MZ)()],G.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,B.Cg)([(0,E.MZ)()],G.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),G=(0,B.Cg)([(0,q.$)("esri.views.support.debugFlags")],G),new G;new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["Graphics3D filter visibility",4],["Graphics3D scale visibility",4],["Graphics3D frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["snapping",0],["shadow accumulator",30],["flow generator",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,z.l5)(6.5),(0,z.l5)(1),(0,z.l5)(30),(0,z.l5)(1e3/30),(0,z.l5)(100);const O=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}};O.enabled=!1,new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(O))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const s=e(O);for(;;){const e=s.next(O),n=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}if(n.done)return n.value}}rescheduleGenerator(e,t,i){return this.rescheduleGenerator(e,t,i)}};class D{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 w,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:C.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{},i);return await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return new T.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},i)).createQueryResponseForCount()}catch(e){if(e!==M.v8)throw e;return 0}}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t),s=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),n=t.size;return n?{count:n,extent:await this._getBounds(t.items,t.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===M.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then(e=>Array.from(e))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),s=t.items,n=new Set;return await this.reschedule(()=>{for(const e of s)n.add(t.featureAdapter.getObjectId(e))},i),n}catch(e){if(e===M.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},i);return await this.reschedule(()=>this._filterLatest(t),i),await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return new T.G([],e,this).createQueryResponse()}}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._executeQuery(e,{},i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);let s;e=(0,a.o8)(e);try{e=await this.schedule(()=>(0,M.iJ)(e,this.definitionExpression,this.spatialReference),i),e=await this.reschedule(()=>(0,R.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),i);const t=await this.reschedule(()=>this._executeSceneFilterQuery(e,i),i);s=await this.reschedule(()=>this._executeGeometryQuery(e,t,i),i),await this.reschedule(()=>this._executeAggregateIdsQuery(s),i),await this.reschedule(()=>this.executeObjectIdsQuery(s),i),await this.reschedule(()=>this.executeTimeQuery(s),i),await this.reschedule(()=>this.executeAttributesQuery(s),i)}catch(t){if(t!==M.v8)throw t;s=new T.G([],e,this)}return s.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i),{field:n,normalizationField:r,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:n,normalizationField:r,valueExpression:a},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i),{field:n,field2:r,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:n,field2:r,field3:a,valueExpression:o},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i),{field:n,normalizationField:r,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:n,normalizationField:r,valueExpression:a},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i),{field:n,normalizationField:r,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:n,normalizationField:r,valueExpression:a},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,A.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}async _getBounds(e,t,i){const s=(0,d.hZ)((0,d.vt)(),d.qv);return await this.featureStore.forEachBounds(e,e=>(0,d.RF)(s,e)),Z(s,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 schedule(e,t){return this._frameTask?.schedule(e,t)??e(O)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(O)}async _getAllFeaturesQueryEngineResult(e){return new T.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,n.zI)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,i){e=(0,a.o8)(e),e=await this.schedule(()=>(0,M.GC)(e,this.definitionExpression,this.spatialReference),i),e=await this.reschedule(()=>(0,R.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),i),e={...e,...t};const s=await this.reschedule(()=>this._executeSceneFilterQuery(e,i),i),n=await this.reschedule(()=>this._executeGeometryQuery(e,s,i),i);return await this.reschedule(()=>this._executeAggregateIdsQuery(n),i),await this.reschedule(()=>this.executeObjectIdsQuery(n),i),await this.reschedule(()=>this.executeTimeQuery(n),i),await this.reschedule(()=>this.executeAttributesQuery(n),i),n}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:n}=e,r=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==r||(0,y.aI)(r,a.spatialReference)?a:(0,v.Cv)(a,r);if(!o)return null;const l=s||n,u=(0,y.fn)(i)&&!(0,y.aI)(this.spatialReference,i)&&l?async e=>this._project(e,i):e=>e,c=this.featureAdapter,h=await this.reschedule(()=>this.searchFeatures(P(o)),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=await this.reschedule(()=>this._getAllFeatures(),t),n=await this.reschedule(async()=>{const n=await(0,b.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),r=await this.runSpatialFilter(s,e=>!i.has(c.getObjectId(e))||n(c.getGeometry(e)),t);return new T.G(r,e,this)},t);return u(n)}if(!h.length)return new T.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new T.G(h,e,this));const d=await(0,b.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,e=>d(c.getGeometry(e)),t);return u(new T.G(p,e,this))}async _executeGeometryQuery(e,t,i){if(null!=t&&0===t.items.length)return t;const{geometry:n,outSR:r,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new T.G(u,e,this);const c=(0,y.fn)(r)&&!(0,y.aI)(this.spatialReference,r),h=a||o,d=async e=>(c&&h&&await this._project(e,r),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,f=!n||null==p||(0,y.aI)(p,n.spatialReference)?n:(0,v.Cv)(n,p);if(!f)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const m=this.featureAdapter;let g=await this.reschedule(()=>this.searchFeatures(P(n)),i);const x=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const s=new Set;for(const e of g)s.add(m.getObjectId(e));const n=null!=t?t.items:await this.reschedule(()=>this._getAllFeatures(),i),r=await this.reschedule(async()=>{const t=await(0,b.xt)(x,f,this.geometryType,this.hasZ,this.hasM),r=await this.runSpatialFilter(n,e=>!s.has(m.getObjectId(e))||t(m.getGeometry(e)),i);return new T.G(r,e,this)},i);return d(r)}if(null!=t){const e=new s.vW;g=g.filter(i=>(0,s.qh)(t.items,i,t.items.length,e)>=0)}if(!g.length){const t=new T.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(f,e))return d(new T.G(g,e,this));const F=await(0,b.xt)(x,f,this.geometryType,this.hasZ,this.hasM),w=await this.runSpatialFilter(g,e=>F(m.getGeometry(e)),i);return d(new T.G(w,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const 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;const 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;const t=(0,A.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,x.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async runSpatialFilter(e,t,i){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let s=0;const n=new Array,r=async a=>{for(;s<e.length;){const o=e[s++];t(o)&&(n.push(o),a.madeProgress()),a.done&&await this.reschedule(e=>r(e),i)}};return this.reschedule(e=>r(e),i).then(()=>n)}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,n=s||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,n),o=r.get(e);(!o||s>a(o,n))&&r.set(e,i)}e.items=Array.from(r.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:n,outSR:r,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||n;return(0,y.fn)(r)&&!(0,y.aI)(this.spatialReference,r)&&l?JSON.stringify([t,i,r]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,b.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,y.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const r=await(0,v.lK)(e.items.map(e=>(0,F.pL)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e))),this.spatialReference,t,s);return e.items=(0,n.zI)(r.map((t,s)=>i.cloneWithGeometry(e.items[s],(0,g.Ux)(t,this.hasZ,this.hasM)))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async _executeQueryForStatistics(e,t,i){e=(0,a.o8)(e);try{e=await this.schedule(()=>(0,M.GC)(e,this.definitionExpression,this.spatialReference),i),e=await this.reschedule(()=>(0,R.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),i);const s=await this.reschedule(()=>this._executeSceneFilterQuery(e,i),i),n=await this.reschedule(()=>this._executeGeometryQuery(e,s,i),i);return await this.reschedule(()=>this._executeAggregateIdsQuery(n),i),await this.reschedule(()=>this.executeObjectIdsQuery(n),i),await this.reschedule(()=>this.executeTimeQuery(n),i),await this.reschedule(()=>this.executeAttributesQuery(n),i),n}catch(t){if(t!==M.v8)throw t;return new T.G([],e,this)}}get test(){}}function P(e){if((0,b.tC)(e)){if((0,m.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,f.Rg)((0,p.vt)(),e)]}function Z(e,t,i,s,n){const r={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,F.ag)(s)};n&&isFinite(e[2])&&isFinite(e[5])&&(r.zmin=e[2],r.zmax=e[5],r.hasZ=!0);const a=(0,v.Cv)(r,t,i);if(a.spatialReference=(0,F.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(n&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},95466:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(49186),n=i(53966),r=i(91869),a=i(3330),o=i(12195),l=i(30524),u=i(98623),c=i(56400),h=i(96285);const d=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],g(e))}static fromLayerJSON(e){return new p(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,s=m(t);if(t&&s){const n=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(s,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new s.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?h.mQ.utcInstance:(0,r.tE)(d,t,()=>h.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,o.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:n}=e,r=(s?"startField"in s?s.startField:s.startTimeField:"")??"",a=(s?"endField"in s?s.endField:s.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??o:n.dateFieldsTimeReference?(0,c.ZS)(n.dateFieldsTimeReference):o??u.n$:null,h=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.timeReference?(0,c.ZS)(s.timeReference):o:null,d=new Map([[f(n?.creationDateField??""),l],[f(n?.editDateField??""),l],[f(r),h],[f(a),h]]);for(const{name:s,type:n}of e.fields)if(y.has(n))t.set(s,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(s,null);else if(i)t.set(s,u.L5);else{const e=d.get(f(s??""))??o;t.set(s,e)}return t}},99352:(e,t,i)=>{i.d(t,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);