@arcgis/core 4.31.0-next.20240911 → 4.31.0-next.20240913

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 (218) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/052d38ba7c4979cc5732.js +1 -0
  3. package/assets/esri/core/workers/chunks/0e61bcda32cb9f181f85.js +1 -0
  4. package/assets/esri/core/workers/chunks/0f4e828cd0338695b069.js +1 -0
  5. package/assets/esri/core/workers/chunks/1114863f1b74c3007ba6.js +1 -0
  6. package/assets/esri/core/workers/chunks/17ca2a2af370b1a4ee60.js +1 -0
  7. package/assets/esri/core/workers/chunks/1bb74cf87e3edc189514.js +1 -0
  8. package/assets/esri/core/workers/chunks/1c6bef0f95717a1ccc2c.js +1 -0
  9. package/assets/esri/core/workers/chunks/23add47ceda39901edd9.js +1 -0
  10. package/assets/esri/core/workers/chunks/2586319a3e07c81f96d4.js +1 -0
  11. package/assets/esri/core/workers/chunks/2606f6a33ea45a124e91.js +1 -0
  12. package/assets/esri/core/workers/chunks/{9474ea4c251558fb2cd8.js → 2658205b1ab2502c0bc7.js} +1 -1
  13. package/assets/esri/core/workers/chunks/298f0277eb8ef396180e.js +1 -0
  14. package/assets/esri/core/workers/chunks/2a114025b5d05ab5990c.js +1 -0
  15. package/assets/esri/core/workers/chunks/2b4e8513972bf4f59dfd.js +1 -0
  16. package/assets/esri/core/workers/chunks/374ce09b4cc60b273978.js +1 -0
  17. package/assets/esri/core/workers/chunks/{e31a166956b64b7fe2b7.js → 384c2ef6c5924a51c3e6.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7d6607508cf8fec2ec1e.js → 38a5a11dbf6f57287977.js} +1 -1
  19. package/assets/esri/core/workers/chunks/390ae63e392b4bee8ee6.js +1 -0
  20. package/assets/esri/core/workers/chunks/3fa3e1e6595668ca0e18.js +1 -0
  21. package/assets/esri/core/workers/chunks/4c686b15703fbc070d20.js +1 -0
  22. package/assets/esri/core/workers/chunks/5307a9877bdbcabe92ed.js +1 -0
  23. package/assets/esri/core/workers/chunks/{63c08dfe371f5d9b242b.js → 54340db07446f70cf6dd.js} +1 -1
  24. package/assets/esri/core/workers/chunks/5dafc4adb942da5f803f.js +1 -0
  25. package/assets/esri/core/workers/chunks/{d2194973bf5b6dd154e3.js → 65b22b9f643ee79b0742.js} +33 -33
  26. package/assets/esri/core/workers/chunks/{275b7c277e328cbb1654.js → 65eb22760e37d427e8c8.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{b757c73d0b4ace361083.js → 660c4a3fd496672c717c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{535cf11233bf2f2da113.js → 681975f155355bb08532.js} +20 -20
  29. package/assets/esri/core/workers/chunks/{f1eedb03f405d5c888e1.js → 72daa8ab44fde82be86e.js} +1 -1
  30. package/assets/esri/core/workers/chunks/752c46fc21c390d5ed4a.js +1 -0
  31. package/assets/esri/core/workers/chunks/{b4a17f8afd6ae34dc99f.js → 7552973ce1e386197f90.js} +1 -1
  32. package/assets/esri/core/workers/chunks/79f9310179c938f18367.js +1 -0
  33. package/assets/esri/core/workers/chunks/{84d2359eb20c99e6b61e.js → 80f6788e7f6186c113a5.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{5180a93f12ab431cada3.js → 81552ffe60283bf06843.js} +1 -1
  35. package/assets/esri/core/workers/chunks/81654fc009f57262483a.js +1 -0
  36. package/assets/esri/core/workers/chunks/{efdffec6a59d986f79a7.js → 841cee09b778b94c8ccd.js} +1 -1
  37. package/assets/esri/core/workers/chunks/84f86a07c6e9abb42535.js +1 -0
  38. package/assets/esri/core/workers/chunks/89e53d63f19db719e3b6.js +1 -0
  39. package/assets/esri/core/workers/chunks/8b8f2cf998f3bb72b0a0.js +1 -0
  40. package/assets/esri/core/workers/chunks/944fa647cbc6f44c4371.js +1 -0
  41. package/assets/esri/core/workers/chunks/9573b72b94249a7174ec.js +1 -0
  42. package/assets/esri/core/workers/chunks/971f8de151351eb9f6c4.js +1 -0
  43. package/assets/esri/core/workers/chunks/99944b05d3142903511c.js +1 -0
  44. package/assets/esri/core/workers/chunks/9dba18c7eebeecb89c4e.js +1 -0
  45. package/assets/esri/core/workers/chunks/9f0088be279297e1e463.js +1 -0
  46. package/assets/esri/core/workers/chunks/9f0e3cb120acac86d2d5.js +1 -0
  47. package/assets/esri/core/workers/chunks/a852b129cde293ef52c8.js +1 -0
  48. package/assets/esri/core/workers/chunks/{d36ef30f2d8123e34242.js → b3427284ec33e39c5b72.js} +1 -1
  49. package/assets/esri/core/workers/chunks/b4f20d55dbd33fe62080.js +1 -0
  50. package/assets/esri/core/workers/chunks/b5c2b1d94c4d385a7ada.js +1 -0
  51. package/assets/esri/core/workers/chunks/b866668f5b7a9913529c.js +1 -0
  52. package/assets/esri/core/workers/chunks/{57d92aff58d6d301357c.js → bb335b4299fc3521dd9e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/c720ee3c6b92f1abea8d.js +1 -0
  54. package/assets/esri/core/workers/chunks/{72ee1b373915cf05a05f.js → e04c35cdcb1f97e16abf.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{ef938fc7efe04926cbf2.js → e5666fd1713227962263.js} +1 -1
  56. package/assets/esri/core/workers/chunks/e89be6ba440f6d71bb94.js +1 -0
  57. package/assets/esri/core/workers/chunks/ea51a7c32f716f4f1a34.js +1 -0
  58. package/assets/esri/core/workers/chunks/eec59c766afe9a270e42.js +1 -0
  59. package/assets/esri/core/workers/chunks/fac0177fc1bc48f351f6.js +1 -0
  60. package/assets/esri/core/workers/chunks/ff8d4d917755597dfc45.js +1 -0
  61. package/assets/esri/core/workers/chunks/fff09e0648a901a758cb.js +1 -0
  62. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  63. package/assets/esri/libs/parquet/pkg/arcgis_parquet_bg.wasm +0 -0
  64. package/assets/esri/themes/base/widgets/_BuildingExplorer.scss +1 -1
  65. package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +3 -3
  66. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +5 -0
  67. package/assets/esri/themes/base/widgets/_Legend.scss +1 -1
  68. package/assets/esri/themes/base/widgets/_ShadowCast.scss +1 -1
  69. package/assets/esri/themes/base/widgets/_TimezonePicker.scss +5 -0
  70. package/assets/esri/themes/dark/main.css +1 -1
  71. package/assets/esri/themes/light/main.css +1 -1
  72. package/assets/esri/themes/light/view.css +1 -1
  73. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  74. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  75. package/chunks/CloudsComposition.glsl.js +1 -1
  76. package/chunks/boundedPlane.js +1 -1
  77. package/chunks/pe-wasm.js +1 -1
  78. package/chunks/pe.js +1 -1
  79. package/copyright.txt +196 -0
  80. package/geometry/support/boundedPlane.js +1 -1
  81. package/interfaces.d.ts +377 -36
  82. package/layers/CatalogLayer.js +1 -1
  83. package/layers/FeatureLayer.js +1 -1
  84. package/layers/KnowledgeGraphLayer.js +1 -1
  85. package/layers/LinkChartLayer.js +1 -1
  86. package/layers/SceneLayer.js +1 -1
  87. package/layers/VectorTileLayer.js +1 -1
  88. package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
  89. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  90. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  91. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  92. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  93. package/layers/mixins/FeatureLayerBase.js +1 -1
  94. package/layers/support/capabilities.js +1 -1
  95. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  96. package/layers/video/VideoController.js +1 -1
  97. package/libs/parquet/parquet.js +1 -1
  98. package/package.json +1 -1
  99. package/portal/schemas/definitions.js +1 -1
  100. package/rest/featureService/FeatureService.js +1 -1
  101. package/support/revision.js +1 -1
  102. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  103. package/symbols/cim/cimAnalyzer.js +1 -1
  104. package/symbols/cim/utils.js +1 -1
  105. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  106. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  107. package/views/3d/analysis/Viewshed/ArrowManipulator.js +1 -1
  108. package/views/3d/environment/CloudsComposition.js +1 -1
  109. package/views/3d/environment/CloudsGenerator.js +1 -1
  110. package/views/3d/environment/EnvironmentManager.js +5 -0
  111. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  112. package/views/3d/environment/Fog.js +1 -1
  113. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  114. package/views/3d/environment/Precipitation.js +1 -1
  115. package/views/3d/input/SceneInputManager.js +1 -1
  116. package/views/3d/input/handlers/DragZoom.js +1 -1
  117. package/views/3d/input/handlers/MouseWheelZoom.js +1 -1
  118. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  119. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  120. package/views/3d/state/controllers/FovController.js +5 -0
  121. package/views/3d/terrain/OverlayRenderer.js +1 -1
  122. package/views/3d/terrain/TerrainRenderer.js +1 -1
  123. package/views/3d/terrain/TileCompositor.js +1 -1
  124. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  125. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +1 -1
  126. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +2 -2
  127. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  128. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  129. package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
  130. package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
  131. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  132. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  133. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  134. package/views/3d/webgl-engine/lib/Update.js +1 -1
  135. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  136. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  137. package/views/3d/webgl-engine/lighting/Lightsources.js +1 -1
  138. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  139. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  140. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  141. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  142. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  143. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  144. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  145. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  146. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  147. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  148. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  149. package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
  150. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  151. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  152. package/views/SceneView.js +1 -1
  153. package/views/input/InputManager.js +1 -1
  154. package/views/input/handlers/LatestPointer.js +1 -1
  155. package/views/input/handlers/PreventContextMenu.js +1 -1
  156. package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
  157. package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
  158. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  159. package/widgets/Editor/Upload.js +1 -1
  160. package/widgets/Editor/components/FooterActions.js +1 -1
  161. package/widgets/Editor/components/Notices.js +1 -1
  162. package/widgets/Editor/components/Prompt.js +1 -1
  163. package/widgets/Editor/modelUploadUtils.js +1 -1
  164. package/widgets/Editor/workflowUtils.js +1 -1
  165. package/widgets/Editor.js +1 -1
  166. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  167. package/widgets/Feature.js +1 -1
  168. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  169. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  170. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  171. package/widgets/Features.js +1 -1
  172. package/widgets/Home/HomeViewModel.js +1 -1
  173. package/widgets/Legend/LegendViewModel.js +1 -1
  174. package/widgets/support/iconUtils.js +5 -0
  175. package/assets/esri/core/workers/chunks/039d6402df795ffeb020.js +0 -1
  176. package/assets/esri/core/workers/chunks/046ae038fbe1ea9eb2a5.js +0 -1
  177. package/assets/esri/core/workers/chunks/08a755b05a98b4565e68.js +0 -1
  178. package/assets/esri/core/workers/chunks/0b0ef134a10e0fcb6bb8.js +0 -1
  179. package/assets/esri/core/workers/chunks/0b57eab76576c76b470a.js +0 -1
  180. package/assets/esri/core/workers/chunks/0ed20dc759d4678d78f4.js +0 -1
  181. package/assets/esri/core/workers/chunks/158863c8fb12e4f1ad72.js +0 -1
  182. package/assets/esri/core/workers/chunks/1bd6d276cb41bfc6c51e.js +0 -1
  183. package/assets/esri/core/workers/chunks/258fd8622be33f312d8c.js +0 -1
  184. package/assets/esri/core/workers/chunks/2c90d66b86ea6e05602d.js +0 -1
  185. package/assets/esri/core/workers/chunks/30c3674e45207b35c7db.js +0 -1
  186. package/assets/esri/core/workers/chunks/30d455fe06ba9b3f1570.js +0 -1
  187. package/assets/esri/core/workers/chunks/3ad82888bd5e72014ae2.js +0 -1
  188. package/assets/esri/core/workers/chunks/3c6573cdb8f270381da6.js +0 -1
  189. package/assets/esri/core/workers/chunks/3e01cd064ab0db8fb1ab.js +0 -1
  190. package/assets/esri/core/workers/chunks/3e3d3873190ac1103c1e.js +0 -1
  191. package/assets/esri/core/workers/chunks/3e99cedecdb5583dbaf1.js +0 -1
  192. package/assets/esri/core/workers/chunks/48908d577fe522a2f481.js +0 -1
  193. package/assets/esri/core/workers/chunks/51dc56b98b938222332f.js +0 -1
  194. package/assets/esri/core/workers/chunks/5379fe85190dc9df9009.js +0 -1
  195. package/assets/esri/core/workers/chunks/53937b8e220069ae6d39.js +0 -1
  196. package/assets/esri/core/workers/chunks/5da27757d1de991d6212.js +0 -1
  197. package/assets/esri/core/workers/chunks/69f4bf93a975dd089bc1.js +0 -1
  198. package/assets/esri/core/workers/chunks/7819a446d3c9749ff74f.js +0 -1
  199. package/assets/esri/core/workers/chunks/797c9965ec751730c215.js +0 -1
  200. package/assets/esri/core/workers/chunks/7f477bd3a44901a2121e.js +0 -1
  201. package/assets/esri/core/workers/chunks/a2cd24422fdaf76d2a1d.js +0 -1
  202. package/assets/esri/core/workers/chunks/a886cdf90031b214c992.js +0 -1
  203. package/assets/esri/core/workers/chunks/acb9fcb28bcd0b64a3c1.js +0 -1
  204. package/assets/esri/core/workers/chunks/bbeb973f4d31e32b2bea.js +0 -1
  205. package/assets/esri/core/workers/chunks/c39e0469bc9670340451.js +0 -1
  206. package/assets/esri/core/workers/chunks/c4dfb64f2cdeed60a361.js +0 -1
  207. package/assets/esri/core/workers/chunks/c6d3d8ac2f7d6d31f214.js +0 -1
  208. package/assets/esri/core/workers/chunks/cc34ffd9b755238558be.js +0 -1
  209. package/assets/esri/core/workers/chunks/ce82c39676e1cad61e8f.js +0 -1
  210. package/assets/esri/core/workers/chunks/d06b14e15f50e6196eed.js +0 -1
  211. package/assets/esri/core/workers/chunks/d426868f54210b7d2f5e.js +0 -1
  212. package/assets/esri/core/workers/chunks/d58de5dd03da44d5cc79.js +0 -1
  213. package/assets/esri/core/workers/chunks/d9481dacca38fb055ed9.js +0 -1
  214. package/assets/esri/core/workers/chunks/dbfe8e24ef2f97506d08.js +0 -1
  215. package/assets/esri/core/workers/chunks/fa7a3a523a1e004f4e78.js +0 -1
  216. package/views/3d/environment/SceneViewEnvironmentManager.js +0 -5
  217. package/widgets/Editor/icons.js +0 -5
  218. package/widgets/GridControls/GridControlsViewModel.d.ts +0 -4
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[630,4800],{66131:(e,t,s)=>{s.d(t,{lY:()=>h,mT:()=>d});var i,r=s(799),n=s(3330),a=s(96285);(i||(i={})).TimeZoneNotRecognized="TimeZoneNotRecognized";const o={[i.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."};class l extends Error{constructor(e,t){super((0,r.HC)(o[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,l)}}function u(e,t,s){return e<t?e-t:e>s?e-s:0}function c(e,t,s){return e<t?t:e>s?s:e}class h{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,s=1,i=0,r=0,n=0,o=0,l){if(isNaN(e)||isNaN(t)||isNaN(s)||isNaN(i)||isNaN(r)||isNaN(n)||isNaN(o))return null;const m=a.c9.local(e,t).daysInMonth;let f=a.c9.fromObject({day:c(s,1,m),year:e,month:c(t,1,12),hour:c(i,0,23),minute:c(r,0,59),second:c(n,0,59),millisecond:c(o,0,999)},{zone:d(l)});return f=f.plus({months:u(t,1,12),days:u(s,1,m),hours:u(i,0,23),minutes:u(r,0,59),seconds:u(n,0,59),milliseconds:u(o,0,999)}),new h(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){const s=d(t);return e.isUnknownTimeZone||s===n.GB.instance?h.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,s):new h(e._date.setZone(s))}static dateJSToArcadeDate(e){return new h(a.c9.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){const s=d(t);return new h(a.c9.fromJSDate(e,{zone:s}))}static unknownEpochToArcadeDate(e){return new h(a.c9.fromMillis(e,{zone:n.GB.instance}))}static unknownDateJSToArcadeDate(e){return new h(a.c9.fromMillis(e.getTime(),{zone:n.GB.instance}))}static epochToArcadeDate(e,t="system"){const s=d(t);return new h(a.c9.fromMillis(e,{zone:s}))}static dateTimeToArcadeDate(e){return new h(e)}clone(){return new h(this._date)}changeTimeZone(e){const t=d(e);return h.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){const s=d(t);return e.zone===n.GB.instance||s===n.GB.instance?h.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,s):new h(e.setZone(s))}static nowToArcadeDate(e){const t=d(e);return new h(a.c9.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new h(a.c9.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===h.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===n.GB.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";const e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new h(this._date.plus(e))}diff(e,t="milliseconds"){return this._date.diff(e._date,t)[t]}toISODate(){return this._date.toISODate()}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(e,t){return this._date.toISOTime({suppressMilliseconds:e,includeOffset:t&&!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new h(this._date.toUTC())}toLocal(){return new h(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;const t=a.c9.fromISO(e,{setZone:!0});return new h(t)}}function d(e,t=!0){if(e instanceof a.bo)return e;if("system"===e.toLowerCase())return"system";if("utc"===e.toLowerCase())return"UTC";if("unknown"===e.toLowerCase())return n.GB.instance;if(/^[+-]?[0-9]{1,2}([:][0-9]{2})?$/.test(e)){const t=a.mQ.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}const s=a.oh.create(e);if(!s.isValid){if(t)throw new l(i.TimeZoneNotRecognized);return null}return s}},78502:(e,t,s)=>{s.d(t,{Fq:()=>l,SQ:()=>a,Yc:()=>n,Yq:()=>o,uf:()=>r});var i=s(5443);function r(e){if(null==e)return null;if("number"==typeof e)return e;let t=e.toLowerCase();switch(t=t.replaceAll(/\s/g,""),t=t.replaceAll("-",""),t){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 109404;case"miles":case"mile":case"squaremile":case"squaremiles":return 109439;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 109414;case"acres":case"acre":case"ac":return 109402;case"hectares":case"hectare":case"ha":return 109401;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 109442;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 109405;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 109409}return null}function n(e){if(null==e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new i.A({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function a(e){if(null==e)return null;if("number"==typeof e)return e;let t=e.toLowerCase();switch(t=t.replaceAll(/\s/g,""),t=t.replaceAll("-",""),t){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 9001;case"miles":case"mile":case"squaremile":case"squaremiles":return 9093;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 9036;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 9096;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 9002;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 9030}return null}function o(e){if(null==e)return null;const t=e.clone();return void 0!==e.cache._geVersion&&(t.cache._geVersion=e.cache._geVersion),t}function l(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}},11006:(e,t,s)=>{function i(e,t,s,i,n){r(e,t,s||0,i||e.length-1,n||a)}function r(e,t,s,i,a){for(;i>s;){if(i-s>600){var o=i-s+1,l=t-s+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(s,Math.floor(t-l*c/o+h)),Math.min(i,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],m=s,f=i;for(n(e,s,t),a(e[i],d)>0&&n(e,s,i);m<f;){for(n(e,m,f),m++,f--;a(e[m],d)<0;)m++;for(;a(e[f],d)>0;)f--}0===a(e[s],d)?n(e,s,f):n(e,++f,i),f<=t&&(s=f+1),t<=f&&(i=f-1)}}function n(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function a(e,t){return e<t?-1:e>t?1:0}s.d(t,{q:()=>i})},44794:(e,t,s)=>{s.d(t,{v:()=>o});var i=s(4718),r=s(62788),n=s(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.gh){return new a(e,t)}},44729:(e,t,s)=>{s.d(t,{n:()=>o});var i=s(66131),r=s(73444),n=s(96285);function a(e){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="";const s=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const i of e.match(s)||[])switch(i){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=i;break;default:i.length>=2&&"["===i.slice(0,1)&&"]"===i.slice(-1)?t+=`'${i.slice(1,-1)}'`:t+=`'${i}'`}return t}class o{constructor(e,t,s){this._year=e,this._month=t,this._day=s,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return e instanceof o&&e.day===this.day&&e.month===this.month&&e.year===this.year}clone(){return new o(this._year,this._month,this._day)}toDateTime(e){return n.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,i.mT)(e)})}toDateTimeLuxon(e){return n.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,i.mT)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null,t=!0){if(null===e||""===e)return this.toString();if(t&&(e=a(e)),!e)return"";const s=this.toDateTime("unknown");return i.lY.dateTimeToArcadeDate(s).toFormat(e,{locale:(0,r.JK)(),numberingSystem:"latn"})}toArcadeDate(){const e=this.toDateTime("unknown");return i.lY.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(e,t){return o.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return n.c9.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){const t=n.c9.fromMillis(e,{zone:n.mQ.utcInstance});return t.isValid?o.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){const t=n.c9.fromSeconds(e,{zone:n.mQ.utcInstance});return t.isValid?o.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;const t=e.split("-");return 3!==t.length?null:new o(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}static fromParts(e,t,s){const i=new o(e,t,s);return!1===i.isValid?null:i}static fromDateJS(e){return o.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return o.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const s=[];if(t)(t=a(t))&&s.push(t);else if(null===t||""===t){const t=n.c9.fromISO(e,{setZone:!0});return t.isValid?o.fromParts(t.year,t.month,t.day):null}for(const i of s){const s=n.c9.fromFormat(e,t??i);if(s.isValid)return new o(s.year,s.month,s.day)}return null}static fromNow(e="system"){const t=n.c9.fromJSDate(new Date).setZone((0,i.mT)(e));return new o(t.year,t.month,t.day)}}},15032:(e,t,s)=>{s.d(t,{k:()=>o});var i=s(78502),r=s(73444),n=s(96285);function a(e){if(!e)return"";const t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g;let s="";for(const i of e.match(t)||[])switch(i){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":s+=i;break;case"A":case"a":s+="a";break;default:s+=`'${i}'`}return s}class o{constructor(e,t,s,i){this._hour=e,this._minute=t,this._second=s,this._millisecond=i,this.declaredRootClass="esri.core.sql.timeonly"}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return e instanceof o&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new o(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,i.Fq)(this.hour)&&(0,i.Fq)(this.minute)&&(0,i.Fq)(this.second)&&(0,i.Fq)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=a(e))?n.c9.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,r.JK)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,s,i){const r=new o(e,t,s,i);return r.isValid()?r:null}static fromReader(e){if(!e)return null;const t=e.split(":");return 3!==t.length?null:new o(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;const t=Math.floor(e/1e3%60),s=Math.floor(e/6e4%60),i=Math.floor(e/36e5%24),r=Math.floor(e%1e3);return new o(i,s,t,r)}static fromDateJS(e){return new o(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new o(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const s=[];t?(t=a(t))&&s.push(t):null!==t&&""!==t||(s.push("HH:mm:ss"),s.push("HH:mm:ss.SSS"),s.push("hh:mm:ss a"),s.push("hh:mm:ss.SSS a"),s.push("HH:mm"),s.push("hh:mm a"),s.push("H:mm"),s.push("h:mm a"),s.push("H:mm:ss"),s.push("h:mm:ss a"),s.push("H:mm:ss.SSS"),s.push("h:mm:ss.SSS a"));for(const t of s){const s=n.c9.fromFormat(e,t);if(s.isValid)return new o(s.hour,s.minute,s.second,s.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return o.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return n.c9.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}},3330:(e,t,s)=>{s.d(t,{GB:()=>r,Qo:()=>a,Y4:()=>n});var i=s(96285);class r{}function n(e){return e instanceof i.bo?e===r.instance:"unknown"===e?.toString().toLowerCase()}function a(e){return n(e)?r.instance:e}r.instance=new i.oh("Etc/UTC")},7320:(e,t,s)=>{s.d(t,{g:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},70328:(e,t,s)=>{s.d(t,{BI:()=>y,Ej:()=>c,Hq:()=>u,Ie:()=>f,Jt:()=>p,Ne:()=>h,RF:()=>o,aI:()=>_,fA:()=>n,hZ:()=>m,iT:()=>l,is:()=>g,qv:()=>T,vI:()=>d,v_:()=>I,vt:()=>r,w1:()=>a});var i=s(5443);function r(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,s,i,n,a,o=r()){return o[0]=e,o[1]=t,o[2]=s,o[3]=i,o[4]=n,o[5]=a,o}function a(e,t){const s=isFinite(e[2])||isFinite(e[5]);return new i.A(s?{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 o(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 l(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 u(e,t,s=0,i=t.length/3){let r=e[0],n=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)r=Math.min(r,t[s+3*e]),n=Math.min(n,t[s+3*e+1]),a=Math.min(a,t[s+3*e+2]),o=Math.max(o,t[s+3*e]),l=Math.max(l,t[s+3*e+1]),u=Math.max(u,t[s+3*e+2]);e[0]=r,e[1]=n,e[2]=a,e[3]=o,e[4]=l,e[5]=u}function c(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 h(e,t,s=e){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s!==e&&(s[3]=e[3],s[4]=e[4],s[5]=e[5]),s}function d(e,t,s=e){return s[3]=t[0],s[4]=t[1],s[5]=t[2],s!==e&&(s[0]=e[0],s[1]=e[1],s[2]=e[2]),e}function m(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 f(e){return e?m(e,T):r(T)}function p(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 y(e,t,s,i,r){return e[0]=t,e[1]=s,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function _(e,t,s){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(s){for(let i=0;i<e.length;i++)if(!s(e[i],t[i]))return!1}else for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}s(19419);const T=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];r()},27647:(e,t,s)=>{function i(e,t){return e?t?4:3:t?3:2}function r(e,t,s,r){if(!t?.lengths.length)return null;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const o=e.coords,l=[],u=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:c,coords:h}=t,d=i(s,r);let m=0;for(const e of c){const t=n(u,h,m,e,s,r);t&&l.push(t),m+=e*d}if(l.sort(((e,t)=>{let i=e[2]-t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),l.length){let e=6*l[0][2];o[0]=l[0][0]/e,o[1]=l[0][1]/e,s&&(e=6*l[0][4],o[2]=0!==e?l[0][3]/e:0),(o[0]<u[0]||o[0]>u[1]||o[1]<u[2]||o[1]>u[3]||s&&(o[2]<u[4]||o[2]>u[5]))&&(o.length=0)}if(!o.length){const e=t.lengths[0]?a(h,0,c[0],s,r):null;if(!e)return null;o[0]=e[0],o[1]=e[1],s&&e.length>2&&(o[2]=e[2])}return e}function n(e,t,s,r,n,a){const o=i(n,a);let l=s,u=s+o,c=0,h=0,d=0,m=0,f=0;for(let s=0,i=r-1;s<i;s++,l+=o,u+=o){const s=t[l],i=t[l+1],r=t[l+2],a=t[u],o=t[u+1],p=t[u+2];let y=s*o-a*i;m+=y,c+=(s+a)*y,h+=(i+o)*y,n&&(y=s*p-a*r,d+=(r+p)*y,f+=y),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(m>0&&(m*=-1),f>0&&(f*=-1),!m)return null;const p=[c,h,.5*m];return n&&(p[3]=d,p[4]=.5*f),p}function a(e,t,s,r,n){const a=i(r,n);let h=t,d=t+a,m=0,f=0,p=0,y=0;for(let t=0,i=s-1;t<i;t++,h+=a,d+=a){const t=e[h],s=e[h+1],i=e[h+2],n=e[d],a=e[d+1],g=e[d+2],_=r?l(t,s,i,n,a,g):o(t,s,n,a);if(_)if(m+=_,r){const e=c(t,s,i,n,a,g);f+=_*e[0],p+=_*e[1],y+=_*e[2]}else{const e=u(t,s,n,a);f+=_*e[0],p+=_*e[1]}}return m>0?r?[f/m,p/m,y/m]:[f/m,p/m]:s>0?r?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function l(e,t,s,i,r,n){const a=i-e,o=r-t,l=n-s;return Math.sqrt(a*a+o*o+l*l)}function u(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function c(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}s.d(t,{Q:()=>r})},17970:(e,t,s)=>{s.d(t,{d:()=>qe});var i=s(4576),r=s(49186),n=s(25482),a=s(4718),o=s(97768),l=s(57219),u=s(74887),c=s(83047),h=s(57251),d=s(70328),m=s(19419),f=s(537),p=s(65864),y=s(17136),g=s(21325),_=s(90708),T=s(55359),I=s(50835),S=s(98453);const x=new class{constructor(e,t){this._cache=new T.q(e),this._invalidCache=new T.q(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(null!=this._invalidCache.get(s))return null;try{const i=I.WhereClause.create(e,t);return this._cache.put(s,i),i}catch(e){return this._invalidCache.put(s,e),null}}getError(e,t){const s=`${t.uid}:${e}`;return this._invalidCache.get(s)??null}}(50,500),F="unsupported-query",w=" as ",E=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),R=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),A=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...E,...R]);function b(e,t,s={}){const i=v(t,e);if(!i){const s=x.getError(t,e);throw new r.A(F,"invalid SQL expression",{expression:t,error:s})}const n=s.expressionName||"expression";if(s.validateStandardized&&!i.isStandardized)throw new r.A(F,`${n} is not standard`,{expression:t});if(s.validateAggregate&&!i.isAggregate)throw new r.A(F,`${n} does not contain a valid aggregate function`,{expression:t});return i.fieldNames}function N(e,t,s,i,n){if(!s)return!0;const a="having clause",o=b(e,s,{validateAggregate:!0,expressionName:a});D(e,t,o,{expressionName:a,query:n});const l=v(s,e),u=l?.getExpressions().every((t=>{const{aggregateType:s,field:r}=t,n=e.get(r)?.name;return i.some((t=>{const{onStatisticField:i,statisticType:r}=t,a=e.get(i)?.name;return a===n&&r.toLowerCase().trim()===s}))}));if(!u)throw new r.A(F,"expressions in having clause should also exist in outStatistics",{having:s});return!0}function v(e,t){return e?x.get(e,t):null}function M(e){return/\((.*?)\)/.test(e)?e:e.split(w)[0]}function C(e){return e.split(w)[1]}function D(e,t,s,i={}){const n=new Map;if(function(e,t,s,i,r){const n=r.includes("*")?[...s,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))O(e,t,s,i,r);else try{const n=b(t,M(r),{validateStandardized:!0});for(const r of n)O(e,t,s,i,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,i.allowedFieldTypes??A,s),n.size){const e=i.expressionName??"expression";throw new r.A(F,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:i.query})}}function O(e,t,s,i,r){const n=t.get(r);n?s.has(n.name)?"all"!==i&&!1===i?.has(n.type)&&e.set(r,{type:"invalid-type",fieldName:n.name,fieldType:S.m.fromJSON(n.type),allowedFieldTypes:Array.from(i,(e=>S.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:n.name}):e.set(r,{type:"invalid-field",fieldName:r})}var P=s(51441),k=s(31464),L=s(99352),G=s(12359),q=s(90634),U=s(62577),V=s(30524),z=s(50201),Z=s(1873),Q=s(71386);class Y{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=M(t),r=this.fieldsIndex.get(i),n=r?null:v(i,s),a=r?r.name:C(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=v(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,s=!0){const i=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,V.zD)(n)||(0,V.Ah)(n),o=(0,V.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,Z.gJ)(n)}${t.fieldDelimiter}${(0,Z.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,Z.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&s&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,z.rb)(n):null)),i&&Number.isFinite(n)){const s="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,Z.zS)(n,i,s,r)}return n}))}async getExpressionValues(e,t,s,i,r){const{arcadeUtils:n}=await(0,Q.lw)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(s),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,P.pL)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},c=n.createExecContext(t,l,r);return n.executeFunction(o,c)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:v(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:v(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}function B(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function j(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}class H{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new Y(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,g.fn)(this.query.outSR)&&!(0,g.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,P.ag)({spatialReference:this.query.outSR,...(0,k.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,P.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=J(this.hasZ,this.hasM),{point:r,mode:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=this._getPointCreator(n,this.spatialReference,t),h=new W(null,0),d=new W(null,0),m={x:0,y:0,z:0};for(const t of this.items){const n=s.getGeometry(t);if(null==n)continue;const{coords:f,lengths:p}=n;if(h.coords=f,d.coords=f,e.returnEdge){let e=0;for(let n=0;n<p.length;n++){const u=p[n];for(let n=0;n<u;n++,e+=i){const f=h;if(f.coordsIndex=e,n!==u-1){const n=d;n.coordsIndex=e+i;const u=m;$(m,r,f,n);const h=(r.x-u.x)/a,p=(r.y-u.y)/o,y=h*h+p*p;y<=1&&l.candidates.push(j(s.getObjectId(t),c(u),Math.sqrt(y),c(f),c(n)))}}}}if("none"!==e.vertexMode){const n=u?f.length-i:f.length;if("all"===e.vertexMode)for(let e=0;e<n;e+=i){const i=h;i.coordsIndex=e;const n=(r.x-i.x)/a,u=(r.y-i.y)/o,d=n*n+u*u;d<=1&&l.candidates.push(B(s.getObjectId(t),c(i),Math.sqrt(d)))}else if("ends"===e.vertexMode){const e=[0];u||e.push(f.length-i);for(const i of e){const e=h;e.coordsIndex=i;const n=(r.x-e.x)/a,u=(r.y-e.y)/o,d=n*n+u*u;d<=1&&l.candidates.push(B(s.getObjectId(t),c(e),Math.sqrt(d)))}}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||(0,g.aI)(t,s)?e=>e:e=>(0,k.Cv)(e,t,s),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:0}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,h=this.fieldsIndex.get(t),d=(0,V.vE)(h)||(0,V.zD)(h)||(0,V.Ah)(h),m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u}),f=(0,Z.Vb)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),p={value:.5,fieldType:h?.type},y=(0,V.yM)(h)?(0,Z.z9)({values:m,supportsNullCount:f,percentileParams:p,outStatisticTypes:c}):(0,Z.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:f,percentileParams:p,outStatisticTypes:c});return(0,Z.oZ)(y,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n,timeZone:a},!1),l=(0,Z.b3)(o);return(0,Z.lv)(l,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d}),f=(0,Z.Rw)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,Z.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d});return(0,Z.$y)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,Z.FM)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:m}=e,f=null!=c&&t.length>(h||0)+c,p=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:f,features:this._createFeatures(e,t),fields:p,geometryType:s,hasM:i&&m,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,P.ag)(l||a),transform:u&&(0,U.VV)(u)||null}}_createFeatures(e,t){const s=new Y(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:m=!1}=e,f=r&&d,p=i&&m;let y=[],g=0;const _=[...t];if(this._sortFeatures(_,n,((e,t,i)=>s.getFieldValue(e,t,i))),this.geometryType&&(o||l)){const e=(0,U.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(o&&!l)for(const i of _){const r=this.featureAdapter.getGeometry(i),n={attributes:s.getAttributes(i),geometry:(0,P.pL)(this.geometryType,this.hasZ,this.hasM,r,u,e,f,p)};t&&r&&!n.geometry&&(n.centroid=(0,P.LQ)(this,this.featureAdapter.getCentroid(i,this),e)),y[g++]=n}else if(!o&&l)for(const t of _)y[g++]={attributes:s.getAttributes(t),centroid:(0,P.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of _)y[g++]={attributes:s.getAttributes(t),centroid:(0,P.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,P.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,f,p)}}else for(const e of _){const t=s.getAttributes(e);t&&(y[g++]={attributes:t})}const T=c||0;if(null!=h){const e=T+h;y=y.slice(T,Math.min(y.length,e))}return y}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics??[])if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=J(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new Y(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h,resultRecordCount:d}=e,m=u?.length,f=!!m,p=f?u[0]:null,y=f&&!this.fieldsIndex.get(p);for(const e of l??[]){const{outStatisticFieldName:l,statisticType:h}=e,d=e,g="exceedslimit"!==h?e.onStatisticField:void 0,_="percentile_disc"===h||"percentile_cont"===h,T="EnvelopeAggregate"===h||"CentroidAggregate"===h||"ConvexHullAggregate"===h,I=f&&1===m&&(g===p||y)&&"count"===h;if(f){if(!n.has(g)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(g,this._calculateUniqueValues(e,!T&&o.returnDistinctValues))}const e=n.get(g);if(!e)continue;const t=Object.keys(e);for(const s of t){const{count:t,data:r,items:n,itemPositions:h}=e[s],m=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(m)||{attributes:{}};if(T){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(d,n);e.aggregateGeometries[s]=t}else{let s=null;if(I)s=t;else{const e=this._getAttributeValues(o,g,i),t=h.map((t=>e[t]));s=_&&"statisticParameters"in d?this._getPercentileValue(d,t):this._getStatisticValue(d,t,null,o.returnDistinctValues)}e.attributes[l]=s}let s=0;u.forEach(((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=r[i])),a.set(m,e)}}}else if(T){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(d,this.items);t.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(o,g,i);t.attributes[l]=_&&"statisticParameters"in d?this._getPercentileValue(d,e):this._getStatisticValue(d,e,r,o.returnDistinctValues)}const S="min"!==h&&"max"!==h||!(0,V.yM)(this.fieldsIndex.get(g))&&!this._isAnyDateField(g)?null:this.fieldsIndex.get(g)?.type;s.push({name:l,alias:l,type:S||"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),d&&(g.length=Math.min(d,g.length)),{fields:s,features:g}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,V.vE)(t)||(0,V.zD)(t)||(0,V.Ah)(t)||(0,V.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(9930),s.e(3656)]).then(s.bind(s,47559)),{statisticType:n,outStatisticFieldName:a}=e,{featureAdapter:o,spatialReference:l,geometryType:u,hasZ:c,hasM:h}=this,d=t.map((e=>(0,P.pL)(u,c,h,o.getGeometry(e)))),m=i(l,d,!0)[0],f={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===n){const e=m?(0,q.v)(m):(0,q.HA)(r(l,d));f.aggregateGeometries={...e,spatialReference:l},f.outStatisticFieldName=a||"extent"}else if("CentroidAggregate"===n){const e=m?(0,G.l8)(m):(0,G.Z4)((0,q.HA)(r(l,d)));f.aggregateGeometries={x:e[0],y:e[1],spatialReference:l},f.outStatisticFieldName=a||"centroid"}else"ConvexHullAggregate"===n&&(f.aggregateGeometries=m,f.outStatisticFieldName=a||"convexHull");return f}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,V.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,Z.z9)({values:t,returnDistinct:i}):(0,Z.G_)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,Z.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(t||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t=!0){const s=new Y(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:i,scale:r,timeZone:n}=e;return i?s.getExpressionValues(this.items,i,{viewingMode:"map",scale:r,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},n):s.getDataValues(this.items,(0,a.o8)(e),t)}}function $(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=r*r+n*n,o=(t.x-s.x)*r+(t.y-s.y)*n,l=Math.min(1,Math.max(0,o/a));e.x=s.x+r*l,e.y=s.y+n*l}function J(e,t){return e?t?4:3:t?3:2}class W{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]}}var K=s(58727),X=s(62660);const ee="unsupported-query";async function te(e,{fieldsIndex:t,geometryType:s,spatialReference:i,availableFields:n}){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.A(ee,"Unsupported query options",{query:e});return se(t,n,e),function(e,t,s){const{outStatistics:i,groupByFieldsForStatistics:n,having:a}=s,o=n?.length,l=i?.length;if(a){if(!o||!l)throw new r.A(ee,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:s});N(e,t,a,i,s)}if(l){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(i))return;const a=i.map((e=>e.onStatisticField)).filter(Boolean);D(e,t,a,{expressionName:"onStatisticFields",query:s}),o&&D(e,t,n,{expressionName:"groupByFieldsForStatistics",query:s});for(const n of i){const{onStatisticField:i,statisticType:a}=n;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in n))e.get(i)&&"count"!==a&&"min"!==a&&"max"!==a&&D(e,t,[i],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:ie,query:s});else{const{statisticParameters:e}=n;if(!e)throw new r.A(ee,"statisticParameters should be set for percentile type",{definition:n,query:s})}}}}(t,n,e),Promise.all([(0,X.c0)(e,s,i),(0,k.Nk)(i,e.outSR)]).then((()=>e))}function se(e,t,s){const{outFields:i,orderByFields:n,returnDistinctValues:a,outStatistics:o}=s,l=o?o.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(n&&n.length>0){const i=" asc",r=" desc",a=n.map((e=>{const t=e.toLowerCase();return t.includes(i)?t.split(i)[0]:t.includes(r)?t.split(r)[0]:e})).filter((e=>!l.includes(e)));D(e,t,a,{expressionName:"orderByFields",query:s})}if(i&&i.length>0)D(e,t,i,{expressionName:"outFields",query:s,allowedFieldTypes:"all"});else if(a)throw new r.A(ee,"outFields should be specified for returnDistinctValues",{query:s});!function(e,t,s,i){if(!s)return!0;const r="where clause";D(e,t,b(e,s,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:i})}(e,t,s.where,s)}const ie=new Set([...E,...R]);async function re(e,t,s,i){let n=[];if(s.valueExpression){const{arcadeUtils:e}=await(0,Q.lw)();n=e.extractFieldNames(s.valueExpression)}if(s.field&&n.push(s.field),s.field2&&n.push(s.field2),s.field3&&n.push(s.field3),s.normalizationField&&n.push(s.normalizationField),!n.length&&!s.valueExpression)throw new r.A(ee,"field or valueExpression is required",{params:s});D(e,t,n,{expressionName:"statistics",query:i})}var ne=s(86420),ae=s(95466),oe=s(71511),le=(s(44208),s(53966)),ue=s(61604),ce=s(3694),he=s(36708),de=s(44794),me=s(78659);const fe=Symbol("Yield");class pe{constructor(){this._tasks=new Array,this._runningTasks=(0,de.v)(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return fe;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.push(new ye(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}unshift(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.unshift(new ye(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,u.G4)(t.signal);if(s&&!t.abortCallback)t.reject((0,u.NK)());else{const i=s?t.abortCallback?.((0,u.NK)()):t.callback(e);(0,u.$X)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,u.NK)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0}}class ye{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var ge=s(90237),_e=s(69622),Te=s(10107),Ie=(s(87811),s(40608));let Se=class extends _e.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,ge._)([(0,Te.M)()],Se.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,ge._)([(0,Te.M)()],Se.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),Se=(0,ge._)([(0,Ie.$)("esri.views.support.debugFlags")],Se);const xe=new Se;var Fe,we,Ee;(Ee=Fe||(Fe={}))[Ee.ANIMATING=0]="ANIMATING",Ee[Ee.INTERACTING=1]="INTERACTING",Ee[Ee.IDLE=2]="IDLE",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(we||(we={}));const Re=new Map([[we.RESOURCE_CONTROLLER_IMMEDIATE,0],[we.RESOURCE_CONTROLLER,4],[we.SLIDE,0],[we.STREAM_DATA_LOADER,0],[we.ELEVATION_QUERY,0],[we.TERRAIN_SURFACE,1],[we.SURFACE_GEOMETRY_UPDATES,1],[we.LOD_RENDERER,2],[we.GRAPHICS_CORE,2],[we.I3S_CONTROLLER,2],[we.POINT_CLOUD_LAYER,2],[we.FEATURE_TILE_FETCHER,2],[we.OVERLAY,4],[we.STAGE,4],[we.GRAPHICS_DECONFLICTOR,4],[we.FILTER_VISIBILITY,4],[we.SCALE_VISIBILITY,4],[we.FRUSTUM_VISIBILITY,4],[we.CLOUDS_GENERATOR,4],[we.POINT_OF_INTEREST_FREQUENT,6],[we.POINT_OF_INTEREST_INFREQUENT,30],[we.LABELER,8],[we.FEATURE_QUERY_ENGINE,8],[we.FEATURE_TILE_TREE,16],[we.FEATURE_TILE_TREE_ACTIVE,0],[we.ELEVATION_ALIGNMENT,12],[we.ELEVATION_ALIGNMENT_SCENE,14],[we.TEXT_TEXTURE_ATLAS,12],[we.TEXTURE_UNLOAD,12],[we.LINE_OF_SIGHT_TOOL,16],[we.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[we.SNAPPING,0],[we.SHADOW_ACCUMULATOR,30],[we.MAPVIEW_FETCH_QUEUE,0],[we.MAPVIEW_LAYERVIEW_UPDATE,2],[we.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function Ae(e){return Re.has(e)?Re.get(e):"number"==typeof e?e:1}const be=(0,me.l5)(6.5),Ne=(0,me.l5)(1),ve=(0,me.l5)(30),Me=(0,me.l5)(1e3/30),Ce=(0,me.l5)(100);var De,Oe;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,de.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new ue.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Fe.INTERACTING,this._tasks=new ce.A,this._runQueue=new ce.A,this._load=0,this._idleStateCallbacks=new ce.A,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,he.wB)((()=>xe.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),he.Vh);for(const e of Object.keys(we))this.performanceInfo.tasks.set(we[e],new ue.A(we[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,o.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=new t(this,e,s);return this._tasks.push(i),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new ue.A(e)),i}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Fe.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Fe.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Fe.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){++this._frameNumber;let t=be,s=e.frameDuration,i=Ne;switch(this.state){case Fe.IDLE:t=(0,me.l5)(0),s=(0,me.l5)(Math.max(Ce,e.frameDuration)),i=ve;break;case Fe.INTERACTING:s=(0,me.l5)(Math.max(Me,e.frameDuration));case Fe.ANIMATING:}return s=(0,me.l5)(s-e.elapsedFrameTime-t),this.state!==Fe.IDLE&&s<Ne&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,me.l5)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Fe.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Fe.INTERACTING:this._runInteracting();break;default:this._runAnimating()}}stopFrame(){this._budget.reset((0,me.l5)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return Oe.SCHEDULED;let t=Oe.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=Oe.READY:t!==Oe.READY&&(t=Oe.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===fe&&(s.blockFrame=this._frameNumber)}catch(e){le.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,we.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(we))this._frameTaskTimes.set(we[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new pe,this._handles=new oe.A,this._basePriority=Ae(t),this.schedulePriority=this._basePriority,this._task=(0,de.v)(null!=s?s:this._queue),this._handles.add((0,he.z7)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(Pe),this._scheduler.removeTask(this),this.schedule=ke.schedule,this.reschedule=ke.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=Ae(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Fe.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(De||(De={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(Oe||(Oe={}));const Pe=(()=>{const e=new De.Budget;return e.enabled=!1,e})(),ke=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,u.G4)(t)){const e=(0,u.NK)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,u.z7)(e(Pe))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Le=new l.F(2e6);let Ge=0;class qe{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:L.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new l.Mn(Ge+++"$$",Le)),this.fieldsIndex=(0,n.Wj)(e.fieldsIndex)?e.fieldsIndex:ae.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._frameTask=(0,o.xt)(this._frameTask),this.clearCache(),(0,o.pR)(this._geometryQueryCache),this._changeHandle=(0,o.xt)(this._changeHandle)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{},s);return await t.createQueryResponse()}catch(t){if(t!==K.v8)throw t;return new H([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const s=(0,u.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},s)).createQueryResponseForCount()}catch(e){if(e!==K.v8)throw e;return 0}}async executeQueryForExtent(e,t){const s=(0,u.Mq)(t),i=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,i||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===K.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),i=t.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(t.featureAdapter.getObjectId(e))}),s),r}catch(e){if(e===K.v8)return new Set;throw e}}async executeQueryForSnapping(e,t){const s=(0,u.Mq)(t),{point:i,distance:r,returnEdge:n,vertexMode:o}=e;if(!n&&"none"===o)return{candidates:[]};let l=(0,a.o8)(e.query);l=await this._schedule((()=>(0,K.T2)(l,this.definitionExpression,this.spatialReference)),s),l=await this._reschedule((()=>te(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const c=!(0,g.aI)(i.spatialReference,this.spatialReference);c&&await(0,k.Nk)(i.spatialReference,this.spatialReference);const h="number"==typeof r?r:r.x,d="number"==typeof r?r:r.y,m={xmin:i.x-h,xmax:i.x+h,ymin:i.y-d,ymax:i.y+d,spatialReference:i.spatialReference},f=c?(0,k.Cv)(m,this.spatialReference):m;if(!f)return{candidates:[]};const _=(await(0,y.el)((0,p.rS)(i),null,{signal:s}))[0],T=(await(0,y.el)((0,p.rS)(f),null,{signal:s}))[0];if(null==_||null==T)return{candidates:[]};const I=new H(await this._reschedule((()=>this._searchFeatures(Ue(T.toJSON()))),s),l,this);await this._reschedule((()=>this._executeObjectIdsQuery(I)),s),await this._reschedule((()=>this._executeTimeQuery(I)),s),await this._reschedule((()=>this._executeAttributesQuery(I)),s),await this._reschedule((()=>this._executeGeometryQueryForSnapping(I,s)),s);const S=_.toJSON(),x=c?(0,k.Cv)(S,this.spatialReference):S,F=c?Math.max(f.xmax-f.xmin,f.ymax-f.ymin)/2:r;return I.createSnappingResponse({...e,point:x,distance:F},i.spatialReference)}async executeQueryForLatestObservations(e,t){const s=(0,u.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,{},s);return await this._reschedule((()=>this._filterLatest(t)),s),await t.createQueryResponse()}catch(t){if(t!==K.v8)throw t;return new H([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const i=(0,u.Mq)(s),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,u.Mq)(e);this._timeExtentPromise||=(0,ne.W)(this.timeInfo,this.featureStore);const[s,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,u.Te)(t),{fullExtent:s,timeExtent:i}}async _getBounds(e,t,s){const i=(0,d.hZ)((0,d.vt)(),d.qv);await this.featureStore.forEachBounds(e,(e=>(0,d.RF)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,P.ag)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5],r.hasZ=!0);const n=(0,k.Cv)(r,t,s);if(n.spatialReference=(0,P.ag)(s),n.xmax-n.xmin==0){const e=(0,c.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,c.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,c.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(Pe)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(Pe)}async _getAllFeaturesQueryEngineResult(e){return new H(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((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,a.o8)(e),e=await this._schedule((()=>(0,K.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>te(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,g.aI)(n,a.spatialReference)?a:(0,k.Cv)(a,n);if(!o)return null;const l=i||r,u=(0,g.fn)(s)&&!(0,g.aI)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this._reschedule((()=>this._searchFeatures(Ue(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t),r=await this._reschedule((async()=>{const r=await(0,X.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new H(n,e,this)}),t);return u(r)}if(!h.length)return new H([],e,this);if(this._canExecuteSinglePass(o,e))return u(new H(h,e,this));const d=await(0,X.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),m=await this._runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new H(m,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;e=null!=t?t.query:e;const{geometry:r,outSR:n,spatialRel:a,returnGeometry:o,returnCentroid:l}=e,u=this.featureStore.featureSpatialReference,c=!r||null==u||(0,g.aI)(u,r.spatialReference)?r:(0,k.Cv)(r,u),h=o||l,d=(0,g.fn)(n)&&!(0,g.aI)(this.spatialReference,n),m=this._geometryQueryCache&&null==t?d&&h?JSON.stringify({originalFilterGeometry:r,spatialRelationship:a,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:a}):null,f=m?this._geometryQueryCache.get(m):null;if(null!=f)return new H(f,e,this);const p=async e=>(d&&h&&await this._project(e,n),m&&this._geometryQueryCache.put(m,e.items,e.items.length+1),e);if(!c)return p(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const y=this.featureAdapter;let _=await this._reschedule((()=>this._searchFeatures(Ue(r))),s);if("esriSpatialRelDisjoint"===a){if(!_.length)return p(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of _)i.add(y.getObjectId(e));const r=null!=t?t.items:await this._reschedule((()=>this._getAllFeatures()),s),n=await this._reschedule((async()=>{const t=await(0,X.xt)(a,c,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(y.getObjectId(e))||t(y.getGeometry(e))),s);return new H(n,e,this)}),s);return p(n)}if(null!=t){const e=new i.vW;_=_.filter((s=>(0,i.qh)(t.items,s,t.items.length,e)>=0))}if(!_.length){const t=new H([],e,this);return m&&this._geometryQueryCache.put(m,t.items,1),t}if(this._canExecuteSinglePass(c,e))return p(new H(_,e,this));const T=await(0,X.xt)(a,c,this.geometryType,this.hasZ,this.hasM),I=await this._runSpatialFilter(_,(e=>T(y.getGeometry(e))),s);return p(new H(I,e,this))}async _executeGeometryQueryForSnapping(e,t){const{query:s}=e,{spatialRel:i}=s;if(!e?.items?.length||!s.geometry||!i)return;const r=await(0,X.xt)(i,s.geometry,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(e.items,(e=>r(e.geometry)),t);e.items=n}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,ne.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=v(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),o=n.get(e);(!o||i>a(o,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,X.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||(0,g.aI)(this.spatialReference,t))return e;const s=this.featureAdapter;let i;try{const e=await this._getFullExtent();i=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const r=await(0,k.lK)(e.items.map((e=>(0,P.pL)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t,i);return e.items=r.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,_.Ux)(t,this.hasZ,this.hasM)))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=(0,a.o8)(e);try{e=await this._schedule((()=>(0,K.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>async function(e,t,{fieldsIndex:s,geometryType:i,spatialReference:n,availableFields:a}){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.A(ee,"Unsupported query options",{query:e});return se(s,a,e),Promise.all([re(s,a,t,e),(0,X.c0)(e,i,n),(0,k.Nk)(n,e.outSR)]).then((()=>e))}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),n=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(n)),s),await this._reschedule((()=>this._executeObjectIdsQuery(n)),s),await this._reschedule((()=>this._executeTimeQuery(n)),s),await this._reschedule((()=>this._executeAttributesQuery(n)),s),n}catch(t){if(t!==K.v8)throw t;return new H([],e,this)}}}function Ue(e){if((0,X.tC)(e)){if((0,p.ZC)(e))return[(0,m.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,p.Bi)(e))return e.rings.map((e=>(0,m.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,m.vt)(),e)]}},99352:(e,t,s)=>{s.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},51441:(e,t,s)=>{s.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var i=s(90708),r=s(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:i.DF,esriGeometryPolyline:i.BW,esriGeometryPolygon:i.z5,esriGeometryMultipoint:i.qK};function u(e,t,s,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(s){const u=(0,i.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",s,r,n);return(0,i.DF)(u,a,l)}return(0,i.DF)(t,a,l)}function c(e,t,s,r,u,c,h=t,d=s){const m=t&&h,f=s&&d,p=null!=r?"coords"in r?r:r.geometry:null;if(null==p)return null;if(u){let r=(0,i.kz)(a,p,t,s,e,u,h,d);return c&&(r=(0,i.Nl)(o,r,m,f,e,c)),l[e]?.(r,m,f)??null}if(c){const r=(0,i.Nl)(o,p,t,s,e,c,h,d);return l[e]?.(r,m,f)??null}return(0,i.Q4)(n,p,t,s,h,d),l[e]?.(n,m,f)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,m)):e}const d="_geVersion",m=(e,t)=>e!==d?t:void 0},31464:(e,t,s)=>{s.d(t,{Cv:()=>y,Nk:()=>m,lK:()=>_});var i=s(4576),r=s(74887),n=s(57251),a=s(7320),o=s(21325),l=s(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,u),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,u),[s.xmax,s.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function m(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.Ru):[e];await(0,n.initializeProjection)(s.map((e=>({source:e,dest:t}))))}const f=c.bind(null,l.je),p=c.bind(null,l.tD);function y(e,t,s,i){if(!e)return e;if(s||(s=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(s)||(0,o.aI)(t,s))return e;if((0,l.y7)(t,s)){const t=(0,o.K8)(s)?f(e):p(e);return t.spatialReference=s,t}return(0,n.projectMany)(a.g,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s,i){if(!e?.length||!t||!s||(0,o.aI)(t,s))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:s,geographicTransformation:i,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:r,geographicTransformation:u}=e;(0,l.y7)(s,i)?(0,o.K8)(i)?r(t.map(f)):r(t.map(p)):r((0,n.projectMany)(a.g,t,s,i,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s,i){return g.push(e,t,s,i)}},58727:(e,t,s)=>{s.d(t,{GC:()=>m,T2:()=>f,VY:()=>h,v8:()=>d});var i=s(66552),r=s(83047),n=s(57251),a=s(90634),o=s(65864),l=s(17136),u=s(21325),c=s(31464);const h=new i.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),d=Object.freeze({});async function m(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),f(e,t,s)}async function f(e,t,i){if(!e)return null;let{where:n}=e;if(e.where=n=n?.trim(),(!n||/^1 *= *1$/.test(n)||t&&t===n)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:i}=e,n=e.geometry;if(null==t||"vertexAttributes"in n)return n;const a=n.spatialReference,o=i?h.fromJSON(i):(0,r.Ij)(a),l=a&&((0,u.EA)(a)||(0,u.K8)(a))?n:await(0,c.Nk)(a,u.KK).then((()=>(0,c.Cv)(n,u.KK)));return(await async function(){return(await Promise.all([s.e(9930),s.e(3656)]).then(s.bind(s,47559))).geodesicBuffer}())(l.spatialReference,l,t,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,a.HA)(m),m.spatialReference=t}if(m){await(0,c.Nk)(m.spatialReference,i),m=function(e,t){const s=e.spatialReference;return p(e,t)&&(0,o.ZC)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,i);const t=(await(0,l.el)((0,o.rS)(m)))[0];if(null==t)throw d;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,r=s&&p(m,i)?{densificationStep:8*s}:void 0,n=t.toJSON(),a=(0,c.Cv)(n,n.spatialReference,i,r);if(!a)throw d;a.spatialReference=i,e.geometry=a}return e}function p(e,t){if(!e)return!1;const s=e.spatialReference;return((0,o.ZC)(e)||(0,o.Bi)(e)||(0,o.Rg)(e))&&!(0,u.aI)(s,t)&&!(0,n.canProjectWithoutEngine)(s,t)}},62660:(e,t,s)=>{s.d(t,{tC:()=>S,c0:()=>I,xt:()=>T});var i=s(49186),r=s(94078),n=s(12176),a=s(65864),o=s(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(90708),m=s(92722),f=s(51441),p=s(31464);const y="unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},_={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function T(e,t,i,o,l){if((0,a.Bi)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new m.A,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.Bi)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Ye)(new m.A,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.ZC)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.qz)(t,(0,f.pL)(i,o,l,e))));if((0,a.ZC)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.rL)(t,(0,f.pL)(i,o,l,e))));if((0,a.ZC)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(h=i)?n.xB:(0,n.xK)(h);return Promise.resolve((s=>e(t,(0,f.pL)(i,o,l,s))))}var h;return Promise.all([s.e(9930),s.e(3656)]).then(s.bind(s,47559)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.pL)(i,o,l,e))}))}async function I(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===_.spatialRelationship[e]}(r))throw new i.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(s)){if(!function(e){return null!=e&&!0===_.queryGeometry[(0,a.$B)(e)]}(n))throw new i.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===_.layerGeometry[e]}(t))throw new i.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p.Nk)(e.geometry?.spatialReference,e.outSR)}}}function S(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}},86420:(e,t,s)=>{async function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)await t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;await t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=s.getAttributeAsTimestamp?.bind(s)??s.getAttribute.bind(s);return i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e(n,t),o=e(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e(t,s);return null==r||r>=i}:null!=r?s=>{const i=e(s,t);return null==i||i<=r}:void 0}(o,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e(i,t)===s:null!=s&&null!=i?r=>{const n=e(r,t);return null!=n&&n>=s&&n<=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r>=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r<=i}:void 0}(o,i||r,n,a)}s.d(t,{I:()=>r,W:()=>i})},90708:(e,t,s)=>{s.d(t,{B2:()=>S,BW:()=>k,Ch:()=>ie,DF:()=>F,Di:()=>Z,E2:()=>z,IE:()=>I,Nl:()=>K,Q4:()=>re,Rk:()=>ae,Ux:()=>Y,Ye:()=>q,ZF:()=>H,eY:()=>J,jH:()=>W,jQ:()=>se,kz:()=>X,oN:()=>Q,q3:()=>$,qK:()=>O,qN:()=>D,z5:()=>G,zv:()=>B});var i=s(49186),r=s(53966),n=s(97768),a=s(70328),o=s(19419),l=s(65864),u=s(43334),c=s(58512),h=s(92722);function d(e,t){return e?t?4:3:t?3:2}const m=()=>r.A.getLogger("esri.layers.graphics.featureConversionUtils"),f={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},p=(e,t,s,i,r,n)=>{e[s]=r,e[s+1]=n},y=(e,t,s,i,r,n)=>{e[s]=r,e[s+1]=n,e[s+2]=t[i+2]},g=(e,t,s,i,r,n)=>{e[s]=r,e[s+1]=n,e[s+2]=t[i+3]},_=(e,t,s,i,r,n)=>{e[s]=r,e[s+1]=n,e[s+2]=t[i+2],e[s+3]=t[i+3]};function T(e,t,s,i){if(e){if(s)return t&&i?_:y;if(t&&i)return g}else if(t&&i)return y;return p}function I({scale:e,translate:t},s){return Math.round((s-t[0])/e[0])}function S({scale:e,translate:t},s){return Math.round((t[1]-s)/e[1])}function x({scale:e,translate:t},s,i){return s*e[i]+t[i]}function F(e,t,s){return e?t?s?v(e):R(e):s?b(e):w(e):null}function w(e){const t=e.coords;return{x:t[0],y:t[1]}}function E(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function R(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function A(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function b(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function N(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function v(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function M(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function C(e,t){return e&&t?M:e?A:t?N:E}function D(e,t,s=C(null!=t.z,null!=t.m)){return s(e,t)}function O(e,t,s){if(null==e)return null;const i=d(t,s),r=[];for(let t=0;t<e.coords.length;t+=i){const s=[];for(let r=0;r<i;r++)s.push(e.coords[t+r]);r.push(s)}return t?s?{points:r,hasZ:t,hasM:s}:{points:r,hasZ:t}:s?{points:r,hasM:s}:{points:r}}function P(e,t,s=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let r=0;for(const e of t.points)for(let t=0;t<s;t++)i[r++]=e[t];return e}function k(e,t,s){if(!e)return null;const i=d(t,s),{coords:r,lengths:n}=e,a=[];let o=0;for(const e of n){const t=[];for(let s=0;s<e;s++){const e=[];for(let t=0;t<i;t++)e.push(r[o++]);t.push(e)}a.push(t)}return t?s?{paths:a,hasZ:t,hasM:s}:{paths:a,hasZ:t}:s?{paths:a,hasM:s}:{paths:a}}function L(e,t,s=d(t.hasZ,t.hasM)){const{lengths:i,coords:r}=e;let n=0;for(const e of t.paths){for(const t of e)for(let e=0;e<s;e++)r[n++]=t[e];i.push(e.length)}return e}function G(e,t,s){if(!e)return null;const i=d(t,s),{coords:r,lengths:n}=e,a=[];let o=0;for(const e of n){const t=[];for(let s=0;s<e;s++){const e=[];for(let t=0;t<i;t++)e.push(r[o++]);t.push(e)}a.push(t)}return t?s?{rings:a,hasZ:t,hasM:s}:{rings:a,hasZ:t}:s?{rings:a,hasM:s}:{rings:a}}function q(e,t,s=t.hasZ,i=t.hasM){return function(e,t,s,i){const r=d(s,i),{lengths:n,coords:a}=e;let o=0;oe(e);for(const e of t){for(const t of e)for(let e=0;e<r;e++)a[o++]=t[e];n.push(e.length)}return e}(e,t.rings,s,i)}const U=[],V=[];function z(e,t,s,i,r){U[0]=e;const[n]=Z(V,U,t,s,i,r);return le(U),le(V),n}function Z(e,t,s,r,n,a){if(le(e),!s){for(const s of t){const t=a?s.attributes[a]:void 0;e.push(new u.Om(null,s.attributes,null,t))}return e}switch(s){case"esriGeometryPoint":return function(e,t,s,i,r){const n=C(s,i);for(const{geometry:s,attributes:i}of t){const t=null!=s?n(new h.A,s):null;e.push(new u.Om(t,i,null,r?i[r]:void 0))}return e}(e,t,r,n,a);case"esriGeometryMultipoint":return function(e,t,s,i,r){const n=d(s,i);for(const{geometry:s,attributes:i}of t){const t=null!=s?P(new h.A,s,n):null;e.push(new u.Om(t,i,null,r?i[r]:void 0))}return e}(e,t,r,n,a);case"esriGeometryPolyline":return function(e,t,s,i,r){const n=d(s,i);for(const{geometry:s,attributes:i,centroid:a}of t){const t=null!=s?L(new h.A,s,n):null,o=null!=a?D(new h.A,a):null;e.push(new u.Om(t,i,o,r?i[r]:void 0))}return e}(e,t,r,n,a);case"esriGeometryPolygon":return function(e,t,s,i,r){for(const{geometry:n,centroid:a,attributes:o}of t){const t=null!=n?q(new h.A,n,s,i):null,l=r?o[r]:void 0;null!=a?e.push(new u.Om(t,o,E(new h.A,a),l)):e.push(new u.Om(t,o,null,l))}return e}(e,t,r,n,a);default:m().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${s}'`)),le(e)}return e}function Q(e,t,s,i){V[0]=e,j(U,V,t,s,i);const r=U[0];return le(U),le(V),r}function Y(e,t,s){if(null==e)return null;const r=new h.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==s&&(s=e.hasM),(0,l.fT)(e)?C(null!=t?t:null!=e.z,null!=s?s:null!=e.m)(r,e):(0,l.Bi)(e)?q(r,e,t,s):(0,l.Rg)(e)?L(r,e,d(t,s)):(0,l.U9)(e)?P(r,e,d(t,s)):void m().error("convertFromGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${e}'`))}function B(e,t,s,r){const n=e&&("coords"in e?e:e.geometry);if(null==n)return null;switch(t){case"esriGeometryPoint":{let e=w;return s&&r?e=v:s?e=R:r&&(e=b),e(n)}case"esriGeometryMultipoint":return O(n,s,r);case"esriGeometryPolyline":return k(n,s,r);case"esriGeometryPolygon":return G(n,s,r);default:return m().error("convertToGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${t}'`)),null}}function j(e,t,s,r,n){if(le(e),null==s)return function(e,t){for(const s of t)e.push({attributes:s.attributes});return e}(e,t);switch(s){case"esriGeometryPoint":return function(e,t,s,i){let r=w;s&&i?r=v:s?r=R:i&&(r=b);for(const s of t){const{geometry:t,attributes:i}=s,n=null!=t?r(t):null;e.push({attributes:i,geometry:n})}return e}(e,t,r,n);case"esriGeometryMultipoint":return function(e,t,s,i){for(const{geometry:r,attributes:n}of t)e.push({attributes:n,geometry:null!=r?O(r,s,i):null});return e}(e,t,r,n);case"esriGeometryPolyline":return function(e,t,s,i){for(const{geometry:r,attributes:n}of t)e.push({attributes:n,geometry:null!=r?k(r,s,i):null});return e}(e,t,r,n);case"esriGeometryPolygon":return function(e,t,s,i){for(const{geometry:r,attributes:n,centroid:a}of t){const t=null!=r?G(r,s,i):null;if(null!=a){const s=w(a);e.push({attributes:n,centroid:s,geometry:t})}else e.push({attributes:n,geometry:t})}return e}(e,t,r,n);default:m().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${s}'`))}return e}function H(e){const{objectIdFieldName:t,spatialReference:s,transform:i,fields:r,hasM:n,hasZ:a,features:o,geometryType:l,exceededTransferLimit:u,uniqueIdField:c,queryGeometry:h,queryGeometryType:d}=e,m={features:j([],o,l,a,n),fields:r,geometryType:l,objectIdFieldName:t,spatialReference:s,uniqueIdField:c,queryGeometry:B(h,d,!1,!1)};return i&&(m.transform=i),u&&(m.exceededTransferLimit=u),n&&(m.hasM=n),a&&(m.hasZ=a),m}function $(e,t){const s=new c.A,{hasM:r,hasZ:n,features:a,objectIdFieldName:o,spatialReference:l,geometryType:u,exceededTransferLimit:h,transform:d,fields:f}=e;return f&&(s.fields=f),s.geometryType=u??null,s.objectIdFieldName=o??t??null,s.spatialReference=l??null,s.objectIdFieldName?(a&&Z(s.features,a,u,n,r,s.objectIdFieldName),h&&(s.exceededTransferLimit=h),r&&(s.hasM=r),n&&(s.hasZ=n),d&&(s.transform=d),s):(m().error(new i.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),s)}function J(e){const{transform:t,features:s,hasM:i,hasZ:r}=e;if(!t)return e;for(const e of s)null!=e.geometry&&ie(e.geometry,e.geometry,i,r,t),null!=e.centroid&&ie(e.centroid,e.centroid,i,r,t);return e.transform=null,e}function W(e,t){const{geometryType:s,features:i,hasM:r,hasZ:n}=t;if(!e)return t;for(let t=0;t<i.length;t++){const a=i[t],o=a.weakClone();o.geometry=new h.A,K(o.geometry,a.geometry,r,n,s,e),a.centroid&&(o.centroid=new h.A,K(o.centroid,a.centroid,r,n,"esriGeometryPoint",e)),i[t]=o}return t.transform=e,t}function K(e,t,s,i,r,n,a=s,o=i){if(oe(e),!t?.coords.length)return null;const l=f[r],{coords:u,lengths:c}=t,h=d(s,i),m=d(s&&a,i&&o),p=T(s,i,a,o);if(!c.length)return p(e.coords,u,0,0,I(n,u[0]),S(n,u[1])),oe(e,h,0),e;let y,g,_,x,F=0,w=0,E=w;for(const t of c){if(t<l)continue;let s=0;w=E,_=y=I(n,u[F]),x=g=S(n,u[F+1]),p(e.coords,u,w,F,_,x),s++,F+=h,w+=m;for(let i=1;i<t;i++,F+=h)_=I(n,u[F]),x=S(n,u[F+1]),_===y&&x===g||(p(e.coords,u,w,F,_-y,x-g),w+=m,s++,y=_,g=x);s>=l&&(e.lengths.push(s),E=w)}return le(e.coords,E),e.coords.length?e:null}function X(e,t,s,i,r,n,a=s,o=i){if(oe(e),!t?.coords.length)return null;const l=f[r],{coords:u,lengths:c}=t,h=d(s,i),m=d(s&&a,i&&o),p=T(s,i,a,o);if(!c.length)return p(e.coords,u,0,0,u[0],u[1]),oe(e,h,0),e;let y=0;const g=n*n;for(const t of c){if(t<l){y+=t*h;continue}const s=e.coords.length/m,i=y,r=y+(t-1)*h;p(e.coords,u,e.coords.length,i,u[i],u[i+1]),te(e.coords,u,h,g,p,i,r),p(e.coords,u,e.coords.length,r,u[r],u[r+1]);const n=e.coords.length/m-s;n>=l?e.lengths.push(n):le(e.coords,s*m),y+=t*h}return e.coords.length?e:null}function ee(e,t,s,i){const r=e[t],n=e[t+1],a=e[s],o=e[s+1],l=e[i],u=e[i+1];let c=a,h=o,d=l-c,m=u-h;if(0!==d||0!==m){const e=((r-c)*d+(n-h)*m)/(d*d+m*m);e>1?(c=l,h=u):e>0&&(c+=d*e,h+=m*e)}return d=r-c,m=n-h,d*d+m*m}function te(e,t,s,i,r,n,a){let o,l=i,u=0;for(let e=n+s;e<a;e+=s)o=ee(t,e,n,a),o>l&&(u=e,l=o);l>i&&(u-n>s&&te(e,t,s,i,r,n,u),r(e,t,e.length,u,t[u],t[u+1]),a-u>s&&te(e,t,s,i,r,u,a))}function se(e,t,s,i){if(!t?.coords?.length)return null;const r=d(s,i);let n=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=r){const s=e[t],i=e[t+1];n=Math.min(n,s),u=Math.max(u,s),l=Math.min(l,i),c=Math.max(c,i)}}return(0,a.is)(e)?(0,a.BI)(e,n,l,u,c):(0,o.fA)(n,l,u,c,e),e}function ie(e,t,s,i,r){const{coords:a,lengths:o}=t,l=d(s,i);if(!a.length)return e!==t&&oe(e),e;(0,n.Lw)(r);const{originPosition:u,scale:c,translate:h}=r,m=ue;m.originPosition=u;const f=m.scale;f[0]=c[0]??1,f[1]=-(c[1]??1),f[2]=c[2]??1,f[3]=c[3]??1;const p=m.translate;if(p[0]=h[0]??0,p[1]=h[1]??0,p[2]=h[2]??0,p[3]=h[3]??0,!o.length){for(let t=0;t<l;++t)e.coords[t]=x(m,a[t],t);return e!==t&&oe(e,l,0),e}let y=0;for(let t=0;t<o.length;t++){const s=o[t];e.lengths[t]=s;for(let t=0;t<l;++t)e.coords[y+t]=x(m,a[y+t],t);let i=e.coords[y],r=e.coords[y+1];y+=l;for(let t=1;t<s;t++,y+=l){i+=a[y]*f[0],r+=a[y+1]*f[1],e.coords[y]=i,e.coords[y+1]=r;for(let t=2;t<l;++t)e.coords[y+t]=x(m,a[y+t],t)}}return e!==t&&oe(e,a.length,o.length),e}function re(e,t,s,i,r,n){if(oe(e),e.lengths.push(...t.lengths),s===r&&i===n)for(let s=0;s<t.coords.length;s++)e.coords.push(t.coords[s]);else{const a=d(s,i),o=T(s,i,r,n),l=t.coords;for(let t=0;t<l.length;t+=a)o(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function ne(e,t,s,i){let r=0,n=e[i*t],a=e[i*(t+1)];for(let o=1;o<s;o++){const s=n+e[i*(t+o)],l=a+e[i*(t+o)+1],u=(s-n)*(l+a);n=s,a=l,r+=u}return.5*r}function ae(e,t){const{coords:s,lengths:i}=e;let r=0,n=0;for(let e=0;e<i.length;e++){const a=i[e];n+=ne(s,r,a,t),r+=a}return Math.abs(n)}function oe(e,t=0,s=0){le(e.lengths,s),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},95466:(e,t,s)=>{s.d(t,{A:()=>d});var i=s(49186),r=s(25482),n=s(53966),a=s(91869),o=s(3330),l=s(30524),u=s(56400),c=s(96285);const h=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],y(e))}static fromLayerJSON(e){return new d(e.fields??[],y(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 s=[];for(const e of this.fields){const t=e?.name,i=f(t);if(t&&i){const r=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(i,e),s.push(`${r}:${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)}}s.sort(),this.uid=s.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(m(e))??this._normalizedFieldsMap.get(f(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").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):p.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?c.mQ.utcInstance:(0,a.tE)(h,t,(()=>c.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,r.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const p=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function y(e){const t=new Map;if(!e.fields)return t;const s=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:r}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",a=(i?"endField"in i?i.endField:i.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=r?function(e){return"timeZone"in e}(r)?r.timeZone??o:r.dateFieldsTimeReference?(0,u.ZS)(r.dateFieldsTimeReference):o??u.n$:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??o:i.timeReference?(0,u.ZS)(i.timeReference):o:null,h=new Map([[m(r?.creationDateField??""),l],[m(r?.editDateField??""),l],[m(n),c],[m(a),c]]);for(const{name:i,type:r}of e.fields)if(p.has(r))t.set(i,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(i,null);else if(s)t.set(i,u.L5);else{const e=h.get(m(i??""))??o;t.set(i,e)}return t}},98453:(e,t,s)=>{s.d(t,{m:()=>i});const i=new(s(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9062],{96520:(e,t,n)=>{n.d(t,{u:()=>s});var o=n(83047),r=n(21325);function i(e,t,n){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=n)}function s(e,t,n){if(!e&&!t||!n)return;const r=(0,o.G9)(n);l(e,n,r),l(t,n,r)}function l(e,t,n){if(e)for(const o of e)a(o.geometry,t,n)}function a(e,t,n){if(!e?.spatialReference||(0,r.aI)(e.spatialReference,t))return;const s=(0,o.G9)(e.spatialReference)/n;if(1!==s)if("x"in e)null!=e.z&&(e.z*=s);else if("rings"in e)i(e,e.rings,s);else if("paths"in e)i(e,e.paths,s);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=s)}},58501:(e,t,n)=>{n.d(t,{q:()=>r});var o=n(62815);function r(e,t,n){if(!n?.features||!n.hasZ)return;const r=(0,o.N)(n.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of n.features)r(e.geometry)}},22671:(e,t,n)=>{n.d(t,{A:()=>R});var o,r=n(90237),i=n(59456),s=n(52106),l=n(66552),a=n(25482),f=n(4718),p=n(10107),u=(n(44208),n(53966),n(36005)),y=n(40608),c=n(43937),h=n(16930),m=n(65864),g=n(20437);const d=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let x=o=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=h.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const r=e[t],i=s.A.fromJSON(r),l=r.geometry?.spatialReference;null==i.geometry||l||(i.geometry.spatialReference=n);const a=r.aggregateGeometries,f=i.aggregateGeometries;if(a&&null!=f)for(const e in f){const t=f[e],o=a[e],r=o?.spatialReference;null==t||r||(t.spatialReference=n)}o.push(i)}return o}writeGeometryType(e,t,n,o){if(e)return void d.write(e,t,n,o);const{features:r}=this;if(r)for(const e of r)if(null!=e?.geometry)return void d.write(e.geometry.type,t,n,o)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,o=(0,m.rS)(e);return o&&!n&&t.spatialReference&&(o.spatialReference=h.A.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(this.cloneProperties())}cloneProperties(){return(0,f.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const o=t.features[n];if(o.geometry){const t=e?.[n];o.geometry=t?.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,n],translate:[o,r]}=e,i=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-o)/t)),(e=>Math.round((r-e)/n)));for(let e=0,t=i.length;e<t;e++)s?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[o,r],scale:[i,s]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const f=this._getHydrationFunction(e,(e=>e*i+o),(e=>r-e*s),l,a);for(const{geometry:e}of t)null!=e&&f&&f(e);return this.transform=null,this}_quantizePoints(e,t,n){let o,r;const i=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=n(l[1]);e===o&&s===r||(i.push([e-o,s-r]),o=e,r=s)}else o=t(l[0]),r=n(l[1]),i.push([o,r])}return i.length>0?i:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,m.Bi)(e)?e.rings:e.paths,r=[];for(let e=0,i=o.length;e<i;e++){const i=o[e],s=this._quantizePoints(i,t,n);s&&r.push(s)}return r.length>0?((0,m.Bi)(e)?e.rings=r:e.paths=r,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,n);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,o,r){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),o&&(e.z=o(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,m.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,o=i.length;e<o;e++){const o=i[e];for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(s+=r[0],l+=r[1]):(s=r[0],l=r[1]),r[0]=t(s),r[1]=n(l)}}if(o&&r)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2]),n[3]=r(n[3])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}else if(r)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),o&&null!=e.zmax&&null!=e.zmin&&(e.zmax=o(e.zmax),e.zmin=o(e.zmin)),r&&null!=e.mmax&&null!=e.mmin&&(e.mmax=r(e.mmax),e.mmin=r(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let s,l;for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(s+=o[0],l+=o[1]):(s=o[0],l=o[1]),o[0]=t(s),o[1]=n(l)}if(o&&r)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2]),t[3]=r(t[3])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}else if(r)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=r(t[2])}}:null}};(0,r._)([(0,p.M)({type:String,json:{write:!0}})],x.prototype,"displayFieldName",void 0),(0,r._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"exceededTransferLimit",void 0),(0,r._)([(0,p.M)({type:[s.A],json:{write:!0}})],x.prototype,"features",void 0),(0,r._)([(0,u.w)("features")],x.prototype,"readFeatures",null),(0,r._)([(0,p.M)({type:[g.A],json:{write:!0}})],x.prototype,"fields",void 0),(0,r._)([(0,p.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:d.read}}})],x.prototype,"geometryType",void 0),(0,r._)([(0,c.K)("geometryType")],x.prototype,"writeGeometryType",null),(0,r._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasM",void 0),(0,r._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasZ",void 0),(0,r._)([(0,p.M)({types:i.yR,json:{write:!0}})],x.prototype,"queryGeometry",void 0),(0,r._)([(0,u.w)("queryGeometry")],x.prototype,"readQueryGeometry",null),(0,r._)([(0,p.M)({type:h.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,r._)([(0,c.K)("spatialReference")],x.prototype,"writeSpatialReference",null),(0,r._)([(0,p.M)({json:{write:!0}})],x.prototype,"transform",void 0),x=o=(0,r._)([(0,y.$)("esri.rest.support.FeatureSet")],x),x.prototype.toJSON.isDefaultToJSON=!0;const R=x}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6107,9377,3069,9062],{32587:(e,t,r)=>{r.d(t,{A:()=>o});var i=r(62788),n=r(95488);class o{constructor(e){this._observable=new n.I,this._map=new Map(e)}get size(){return(0,i.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,i.gc)(this._observable),this._map.entries()}forEach(e,t){(0,i.gc)(this._observable),this._map.forEach(((r,i)=>e.call(t,r,i,this)),t)}get(e){return(0,i.gc)(this._observable),this._map.get(e)}has(e){return(0,i.gc)(this._observable),this._map.has(e)}keys(){return(0,i.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,i.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,i.gc)(this._observable),this._map[Symbol.iterator]()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(e,t,r)=>{r.d(t,{v:()=>l});var i=r(4718),n=r(62788),o=r(95488);class s{constructor(e,t){this._observable=new o.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 l(e,t=i.gh){return new s(e,t)}},39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,t)}function n(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>n})},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>s,Y4:()=>o});var i=r(96285);class n{}function o(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},13069:(e,t,r)=>{r.d(t,{lk:()=>n,vD:()=>s,yS:()=>o});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}},70328:(e,t,r)=>{r.d(t,{BI:()=>f,Ej:()=>u,Hq:()=>d,Ie:()=>h,Jt:()=>m,Ne:()=>p,RF:()=>l,aI:()=>_,fA:()=>o,hZ:()=>c,iT:()=>a,is:()=>g,qv:()=>v,vI:()=>y,v_:()=>w,vt:()=>n,w1:()=>s});var i=r(5443);function n(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,o,s,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=o,l[5]=s,l}function s(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{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 l(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 a(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 d(e,t,r=0,i=t.length/3){let n=e[0],o=e[1],s=e[2],l=e[3],a=e[4],d=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),d=Math.max(d,t[r+3*e+2]);e[0]=n,e[1]=o,e[2]=s,e[3]=l,e[4]=a,e[5]=d}function u(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 p(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(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 h(e){return e?c(e,v):n(v)}function m(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,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];n()},79003:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ye});var i=r(90237),n=r(78888),o=r(5503),s=r(49186),l=r(91869),a=r(92071),d=r(74887),u=r(84952),p=r(10107),y=(r(44208),r(53966),r(87811),r(40608)),c=r(4146),h=r(36563),m=r(55359),f=r(32587),g=r(36708),_=r(44794),v=r(56507),w=r(63074),b=r(25036),M=r(10873),F=r(91880),x=r(1873);let I=class extends((0,b.j)((0,w.dM)((0,a.P)(c.A)))){constructor(e){super(e),this._layerCache=new m.q(20,(e=>e.destroy())),this._oidToReference=new f.A,this._layerToReference=new Map,this.legendEnabled=!0,this.layers=new o.A,this.maximumVisibleSublayers=10,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.title="Layers in view",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles([this.layers.on("after-add",(({item:e})=>{e.parent=this})),this.layers.on("after-remove",(({item:e})=>{e.parent=null})),(0,g.wB)((()=>this._orderBy),(()=>{this._updateLayerSortValues(),this._sortAllLayers()}))])}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._layerCache.destroy(),this._oidToReference.clear(),this._layerToReference.clear()}get _orderBy(){return this.parent?this.parent.orderBy?.find((e=>!e.valueExpression&&e.field))??new F.A({field:this.parent.objectIdField}):null}get _referenceComparator(){const e=this._orderBy;if(!this.parent||!e)return()=>0;const t=this.parent.fieldsIndex.get(e.field),r=(0,x.FM)(t?.toJSON().type,"descending"===e.order),i=(0,x.FM)("esriFieldTypeOID","descending"===e.order);return(e,t)=>r(t.sortValue,e.sortValue)||i(t.objectId,e.objectId)}get fullExtent(){return this.parent?.fullExtent??null}get updating(){return(0,l.Bs)(this._oidToReference,(({pending:e})=>null!=e))}acquireLayer(e){if(this.destroyed)return(0,h.hA)();const t=this._getLayerReference(e);return t.count++,(0,h.hA)((()=>{t.count--,t.count||this._destroyLayerReference(t)}))}_getLayerReference(e){const t=e.getObjectId();return(0,l.tE)(this._oidToReference,t,(()=>{const t=e.getObjectId(),r=`${t}`,i=e.getAttribute(this.parent.itemSourceField),n=new S(e,t,i),o=this._layerCache.pop(r);return o?(this._addLayer(n,o),n):(n.pending=this.parent.createLayerFromFootprint(e).then((e=>{n.count?this._addLayer(n,e):(this.destroyed||this._layerCache.get(r)||this._layerCache.put(r,e),n.layer=null)})).catch((()=>{})).finally((()=>{n.pending=null})),n)}))}_destroyLayerReference(e){e.layer&&(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this.destroyed?e.layer.destroy():this._layerCache.put(`${e.objectId}`,e.layer),e.layer=null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,t.persistenceEnabled=!1,this._layerToReference.set(t,e),this._updateLayerSortValue(e),this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(const e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){this._orderBy&&(e.sortValue=e.footprint.getAttribute(this._orderBy.field))}_sortAllLayers(){this.layers.sort(((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t))))}};(0,i._)([(0,p.M)()],I.prototype,"_orderBy",null),(0,i._)([(0,p.M)({readOnly:!0})],I.prototype,"_referenceComparator",null),(0,i._)([(0,p.M)(M.fV)],I.prototype,"legendEnabled",void 0),(0,i._)([(0,p.M)({type:["show","hide","hide-children"],json:{write:!0}})],I.prototype,"listMode",void 0),(0,i._)([(0,p.M)({readOnly:!0})],I.prototype,"fullExtent",null),(0,i._)([(0,p.M)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],I.prototype,"id",void 0),(0,i._)([(0,p.M)({readOnly:!0})],I.prototype,"layers",void 0),(0,i._)([(0,p.M)({type:v.jz,range:{min:0,max:50},json:{write:!0,default:10}})],I.prototype,"maximumVisibleSublayers",void 0),(0,i._)([(0,p.M)(M.ke)],I.prototype,"opacity",void 0),(0,i._)([(0,p.M)({clonable:!1})],I.prototype,"parent",void 0),(0,i._)([(0,p.M)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],I.prototype,"title",void 0),(0,i._)([(0,p.M)({json:{read:!1}})],I.prototype,"type",void 0),(0,i._)([(0,p.M)({readOnly:!0})],I.prototype,"updating",null),(0,i._)([(0,p.M)({type:Boolean,json:{name:"visibility",write:!0}})],I.prototype,"visible",void 0),I=(0,i._)([(0,y.$)("esri.layers.catalog.CatalogDynamicGroupLayer")],I);const T=I;class S{constructor(e,t,r){this.footprint=e,this.objectId=t,this.itemSource=r,this.count=0,this.layer=null,this.sortValue=void 0,this._pending=(0,_.v)(null)}get pending(){return this._pending.value}set pending(e){this._pending.value=e}}var O=r(13874),E=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576)),j=(r(93618),r(65494),r(15036)),A=r(4718),R=r(35666),N=r(9582),L=r(87718),V=r(30524),D=r(81457),P=r(39383),B=r(30291),q=r(94985);let $=class extends((0,b.j)((0,L.F)((0,w.dM)((0,a.P)(c.A))))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),(0,V.yp)(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",(e=>this.emit("apply-edits",e))),this.parent.on("edits",(e=>this.emit("edits",e))),this.parent.on("refresh",(e=>this.emit("refresh",e)))])}get apiKey(){return this.parent?.apiKey}get capabilities(){return this.parent?.capabilities}get customParameters(){return this.parent?.customParameters}get dateFieldsTimeZone(){return this.parent?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this.parent?.datesInUnknownTimezone??!1}get definitionExpression(){return this.parent?.definitionExpression}get editingInfo(){return this.parent?.editingInfo}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get createQueryVersion(){return this.parent?.createQueryVersion}get defaultPopupTemplate(){return this.createPopupTemplate()}get displayField(){return this.parent?.displayField}get effectiveEditingEnabled(){return!1}get fields(){return this.parent?.fields}get fieldsIndex(){return this.parent?.fieldsIndex}get fullExtent(){return this.parent?.fullExtent}get geometryFieldsInfo(){return this.parent?.geometryFieldsInfo}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?.globalIdField}get hasM(){return this.parent?.hasM??!1}get hasZ(){return this.parent?.hasZ??!1}get objectIdField(){return this.parent?.objectIdField}get orderBy(){return this.parent?.orderBy??null}get outFields(){return this.parent?.outFields}get parsedUrl(){return this.parent?.parsedUrl??null}get preferredTimeZone(){return this.parent?.preferredTimeZone??null}set renderer(e){(0,V.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):function(){const e=new q.A({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new E.A({symbol:e})}()}get returnM(){return this.parent?.returnM}get returnZ(){return this.parent?.returnZ}get source(){return this.parent?.source}get timeExtent(){return this.parent?.timeExtent}get timeInfo(){return this.parent?.timeInfo}get timeOffset(){return this.parent?.timeOffset}get typeIdField(){return this.parent?.typeIdField}get types(){return this.parent?.types}get useViewTime(){return this.parent?.useViewTime??!0}get version(){return this.parent?.version}async applyEdits(e,t){return await this.load(),this.parent.applyEdits(e,t)}createPopupTemplate(e){const t={fields:this.fields,objectIdField:this.objectIdField,title:this.title};return(0,B.tn)(t,e)}createQuery(){return this.parent?.createQuery()}getField(e){return this.parent?.getField(e)}getFieldDomain(e,t){return this.parent?.getFieldDomain(e,t)}async queryExtent(e,t){return await this.load(),this.parent.queryExtent(e,t)}async queryFeatures(e,t){return await this.load(),this.parent.queryFeatures(e,t)}async queryFeatureCount(e,t){return await this.load(),this.parent.queryFeatureCount(e,t)}async queryObjectIds(e,t){return await this.load(),this.parent.queryObjectIds(e,t)}};(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"apiKey",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"capabilities",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"customParameters",null),(0,i._)([(0,p.M)()],$.prototype,"dateFieldsTimeZone",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"datesInUnknownTimezone",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"definitionExpression",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"editingInfo",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"effectiveCapabilities",null),(0,i._)([(0,p.M)({json:{origins:{"web-scene":{write:!1}},write:!0}})],$.prototype,"charts",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"createQueryVersion",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"defaultPopupTemplate",null),(0,i._)([(0,p.M)()],$.prototype,"displayField",null),(0,i._)([(0,p.M)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],$.prototype,"editingEnabled",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,p.M)((()=>{const e=(0,A.o8)(M.Yj);return e.json.origins["web-map"]={read:!1,write:!1},e})())],$.prototype,"elevationInfo",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"fields",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"fieldsIndex",null),(0,i._)([(0,p.M)({type:N.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],$.prototype,"formTemplate",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"fullExtent",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"geometryFieldsInfo",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"geometryType",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"globalIdField",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"hasM",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"hasZ",null),(0,i._)([(0,p.M)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],$.prototype,"id",void 0),(0,i._)([(0,p.M)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:P.w,write:!0}})],$.prototype,"labelingInfo",void 0),(0,i._)([(0,p.M)(M.kF)],$.prototype,"labelsVisible",void 0),(0,i._)([(0,p.M)(M.fV)],$.prototype,"legendEnabled",void 0),(0,i._)([(0,p.M)({type:["show","hide"],json:{write:!0}})],$.prototype,"listMode",void 0),(0,i._)([(0,p.M)((()=>{const e=(0,A.o8)(M.hG);return e.json.origins.service.read=!1,e})())],$.prototype,"maxScale",void 0),(0,i._)([(0,p.M)((()=>{const e=(0,A.o8)(M.hn);return e.json.origins.service.read=!1,e})())],$.prototype,"minScale",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"objectIdField",null),(0,i._)([(0,p.M)(M.ke)],$.prototype,"opacity",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"orderBy",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"outFields",null),(0,i._)([(0,p.M)({clonable:!1})],$.prototype,"parent",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"parsedUrl",null),(0,i._)([(0,p.M)(M.M6)],$.prototype,"popupEnabled",void 0),(0,i._)([(0,p.M)({type:O.A,json:{name:"popupInfo",write:!0}})],$.prototype,"popupTemplate",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"preferredTimeZone",null),(0,i._)([(0,p.M)({types:j.H,json:{origins:{"web-scene":{types:j.X}},name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(e,t){return{ignoreOrigin:this.originIdOf(t)<R.Gr.PORTAL_ITEM}}}}})],$.prototype,"renderer",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"returnM",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"returnZ",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"source",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"timeExtent",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"timeInfo",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"timeOffset",null),(0,i._)([(0,p.M)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],$.prototype,"title",void 0),(0,i._)([(0,p.M)({json:{read:!1}})],$.prototype,"type",void 0),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"typeIdField",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"types",null),(0,i._)([(0,p.M)({readOnly:!0})],$.prototype,"useViewTime",null),(0,i._)([(0,p.M)({type:Boolean,json:{name:"visibility",write:!0}})],$.prototype,"visible",void 0),$=(0,i._)([(0,y.$)("esri.layers.catalog.CatalogFootprintLayer")],$);const U=$;var C=r(72593),Z=r(52136),G=r(18768),J=r(69208),z=r(47685),k=r(87796),Q=r(16131),Y=r(32756),K=r(8303),H=r(54310),X=r(82935),W=r(15426),ee=r(33143),te=r(17036),re=r(4513),ie=r(91908),ne=r(20655),oe=r(80812),se=r(39131),le=r(61956);const ae=(0,te.p)();function de(e,t,r,i){const n=e.write({},i);(function(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]})(n)||(t[r]=n)}let ue=class extends((0,k.j)((0,z.w6)((0,w.dM)((0,Y.f)((0,X.e)((0,b.j)((0,H.J)((0,G.b)((0,Q.q)((0,K.A)((0,a.P)((0,J.d)((0,Z.p)(c.A)))))))))))))){constructor(e){super(e),this.legendEnabled=!0,this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new T({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new U({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new o.A([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new C.default({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d.QP).then((async()=>{const{url:e,source:r,portalItem:i}=this;if(!e)throw new s.A("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new s.A("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:n}=r;n&&(this.sourceJSON=n,this.read(n,{origin:"service",portalItem:i,portal:i?.portal,url:this.parsedUrl}))})).then((()=>{const e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter((e=>!this.fieldsIndex.has(e)));if(t.length)throw new s.A("catalog-layer:missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})})).then((()=>(0,W.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=(0,u.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,u.fj)(e.path,this.layerId.toString())),e}async applyEdits(e,t){return(0,W.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){const e=new le.A,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return(0,W.xd)(this.types,this.typeIdField,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return(0,W.jp)(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(le.A.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r.footprintLayer;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(le.A.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(le.A.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(le.A.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,ie.D)(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async _fetchFirstValidLayerId(e){const{data:t}=await(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(t?.layers))return t.layers.find((({type:e})=>this.supportedSourceTypes.has(e)))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField);if(!t)throw new s.A("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const r=JSON.parse(t);if(function(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}(r)){const{itemId:e,portalUrl:t}=r,i=(0,se.qG)(t),n=this.portalItem?.portal,o=ne.A.getDefault();let s,a=!0;n&&(0,u.ut)(t,n.url)?s=n:(0,u.ut)(t,o.url)?s=o:(s=(0,l.tE)(this._portals,i,(()=>new ne.A({url:i}))),a=!1);const d=await c.A.fromPortalItem(new oe.default({id:e,portal:s}));return a||await pe(d),d}return function(e){return"object"==typeof e&&null!=e&&"url"in e}(r)?c.A.fromArcGISServerUrl({url:r.url}):new(await re.S.UnsupportedLayer())}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const n=t.getAttribute(this.minScaleField);null!=n&&"minScale"in e&&(e.minScale=n)}};async function pe(e){if("portalItem"in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,"group"===e.type&&await Promise.allSettled([...e.layers.map((e=>pe(e))),...e.tables.map((e=>pe(e)))])}}(0,i._)([(0,p.M)(M.fV)],ue.prototype,"legendEnabled",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"createQueryVersion",null),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"drawOrderField",void 0),(0,i._)([(0,p.M)({type:T,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:de}}})],ue.prototype,"dynamicGroupLayer",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"editingEnabled",null),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,p.M)({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],ue.prototype,"elevationInfo",void 0),(0,i._)([(0,p.M)({...ae.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ue.prototype,"fields",void 0),(0,i._)([(0,p.M)(ae.fieldsIndex)],ue.prototype,"fieldsIndex",void 0),(0,i._)([(0,p.M)({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],ue.prototype,"floorInfo",void 0),(0,i._)([(0,p.M)({type:U,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:de}}})],ue.prototype,"footprintLayer",void 0),(0,i._)([(0,p.M)(M.id)],ue.prototype,"id",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"itemNameField",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"itemSourceField",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"itemTypeField",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"layers",void 0),(0,i._)([(0,p.M)({type:["show","hide","hide-children"]})],ue.prototype,"listMode",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"maxScaleField",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"minScaleField",void 0),(0,i._)([(0,p.M)({value:"CatalogLayer",type:["CatalogLayer"]})],ue.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.M)({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],ue.prototype,"orderBy",void 0),(0,i._)([(0,p.M)(ae.outFields)],ue.prototype,"outFields",void 0),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"parsedUrl",null),(0,i._)([(0,p.M)({readOnly:!0})],ue.prototype,"source",void 0),(0,i._)([(0,p.M)({json:{read:!1}})],ue.prototype,"type",void 0),(0,i._)([(0,p.M)({type:String})],ue.prototype,"typeIdField",void 0),(0,i._)([(0,p.M)({type:[ee.A]})],ue.prototype,"types",void 0),ue=(0,i._)([(0,y.$)("esri.layers.CatalogLayer")],ue);const ye=ue},87718:(e,t,r)=>{r.d(t,{F:()=>S,Y:()=>T});var i,n=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),l=r(49186),a=r(25482),d=r(93637),u=r(76369),p=r(59456),y=r(66552),c=r(4718),h=r(61956),m=r(79677);const f=new y.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=i=class extends a.oY{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new h.A({geometry:(0,c.o8)(r),objectIds:(0,c.o8)(o),spatialRelationship:i,timeExtent:(0,c.o8)(n),where:t,units:s,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new i({geometry:(0,c.o8)(t),objectIds:(0,c.o8)(o),spatialRelationship:r,timeExtent:(0,c.o8)(n),where:e,units:s,distance:l})}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],_.prototype,"where",void 0),(0,n._)([(0,o.M)({types:p.yR,json:{write:!0}})],_.prototype,"geometry",void 0),(0,n._)([(0,o.M)({type:f.apiValues,json:{name:"spatialRel",read:{reader:f.read},write:{allowNull:!1,writer:f.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],_.prototype,"spatialRelationship",void 0),(0,n._)([(0,o.M)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],_.prototype,"distance",void 0),(0,n._)([(0,o.M)({type:[Number],json:{write:!0}})],_.prototype,"objectIds",void 0),(0,n._)([(0,o.M)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],_.prototype,"units",void 0),(0,n._)([(0,o.M)({type:m.A,json:{write:!0}})],_.prototype,"timeExtent",void 0),_=i=(0,n._)([(0,s.$)("esri.layers.support.FeatureFilter")],_);const v=_;var w;const b={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},M={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},F={name:"showExcludedLabels",default:!0};let x=w=class extends a.oY{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new w({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,o.M)({type:v,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,d.sM)(r,n,t):(0,d.sM)(r,null,t)}}}})],x.prototype,"filter",void 0),(0,n._)([(0,o.M)({json:{read:u.LF,write:{writer:u.M9,allowNull:!0},origins:{"web-map":b,"portal-item":b}}})],x.prototype,"includedEffect",void 0),(0,n._)([(0,o.M)({json:{read:u.LF,write:{writer:u.M9,allowNull:!0},origins:{"web-map":M,"portal-item":M}}})],x.prototype,"excludedEffect",void 0),(0,n._)([(0,o.M)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":F,"portal-item":F}}})],x.prototype,"excludedLabelsVisible",void 0),x=w=(0,n._)([(0,s.$)("esri.layers.support.FeatureEffect")],x);const I={write:{allowNull:!0}},T={type:x,json:{origins:{"web-map":I,"portal-item":I}}},S=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,o.M)(T)],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,s.$)("esri.layers.mixins.FeatureEffectLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>d,n:()=>a});var i=r(90237),n=r(93637),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);const a={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new l.A;return n.read(i,r),[n]}},write:{writer:function(e,t,r,i){const o=e.find((e=>!!e.field));o&&(0,n.sM)(r,[o.toJSON()],t)}}}},d=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,o.M)(a)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.OrderedLayer")],t),t}},82935:(e,t,r)=>{r.d(t,{B:()=>c,e:()=>h});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),s=r(40608),l=r(89317),a=r(30524),d=r(96184),u=r(73133),p=r(79677),y=r(10184);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=u.j.fromJSON(r.timeOffsetUnits);return i&&n?new y.A({value:i,unit:n}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.M)({type:p.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.M)({type:y.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,o.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.M)({value:null,type:d.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.M)(c)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.TemporalLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),n=r(69540),o=r(25482),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),d=r(43937),u=r(72088),p=r(29005);let y=class extends((0,n.O)(o.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.M)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,s.M)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,s.M)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,l.w)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,d.K)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,s.M)({type:[p.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,a.$)("esri.layers.support.FeatureType")],y);const c=y},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,n=r(90237),o=r(66552),s=r(25482),l=r(10107),a=r(56507),d=(r(87811),r(44208),r(93223)),u=r(36005),p=r(40608),y=r(72088),c=r(98453);const h=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends s.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,l.M)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.M)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.M)()],m.prototype,"description",void 0),(0,n._)([(0,u.w)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.M)({types:y.gK,json:{read:{reader:y.rS},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.M)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.M)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.M)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.M)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,d.e)(c.m)],m.prototype,"type",void 0),(0,n._)([(0,l.M)()],m.prototype,"valueType",void 0),(0,n._)([(0,u.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.M)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,p.$)("esri.layers.support.Field")],m);const f=m},95466:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(49186),n=r(25482),o=r(53966),s=r(91869),l=r(3330),a=r(30524),d=r(56400),u=r(96285);const p=new Map;class y{static fromJSON(e){return new y(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new y(e.fields??[],f(e))}static fromLayerJSON(e){return new y(e.fields??[],f(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 r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=c(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.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(c(e))??this._normalizedFieldsMap.get(h(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?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):m.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?l.GB.instance:t===d.n$?u.mQ.utcInstance:(0,s.tE)(p,t,(()=>u.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.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,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function c(e){return e.trim().toLowerCase()}function h(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,d.ZS)(n.dateFieldsTimeReference):l??d.n$:null,u=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,d.ZS)(i.timeReference):l:null,p=new Map([[c(n?.creationDateField??""),a],[c(n?.editDateField??""),a],[c(o),u],[c(s),u]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,d.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,d.L5);else{const e=p.get(c(i??""))??l;t.set(i,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(90237),o=r(66552),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const d=new o.J({asc:"ascending",desc:"descending"});let u=i=class extends s.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,l.M)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n._)([(0,l.M)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n._)([(0,l.M)({type:d.apiValues,json:{type:d.jsonValues,read:d.read,write:d.write}})],u.prototype,"order",void 0),u=i=(0,n._)([(0,a.$)("esri.layers.support.OrderByInfo")],u);const p=u},96184:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(90237),n=r(69540),o=r(25482),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),d=r(43937),u=r(79677),p=r(10184),y=r(56400);function c(e,t){return p.A.fromJSON({value:e,unit:t})}let h=class extends((0,n.O)(o.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?u.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?c(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?c(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,s.M)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,s.M)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,s.M)({type:u.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,d.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,s.M)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,s.M)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,d.K)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,s.M)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,s.M)((0,y.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,s.M)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,s.M)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i._)([(0,s.M)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i._)([(0,a.$)("esri.layers.support.TimeInfo")],h);const m=h},72088:(e,t,r)=>{r.d(t,{rS:()=>x,gK:()=>F}),r(44208);var i,n=r(90237),o=r(4718),s=r(10107),l=(r(53966),r(93223)),a=r(40608),d=r(25482);r(87811);let u=i=class extends d.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.M)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,s.M)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,n._)([(0,a.$)("esri.layers.support.CodedValue")],u);const p=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends d.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.M)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,n._)([(0,l.e)(p)],y.prototype,"type",void 0),y=(0,n._)([(0,a.$)("esri.layers.support.Domain")],y);const c=y;var h;let m=h=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,s.M)({type:[u],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=h=(0,n._)([(0,a.$)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;r(49186);let _=g=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,l.e)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,n._)([(0,a.$)("esri.layers.support.InheritedDomain")],_);const v=_;var w;let b=w=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],b.prototype,"maxValue",void 0),(0,n._)([(0,s.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],b.prototype,"minValue",void 0),(0,n._)([(0,l.e)({range:"range"})],b.prototype,"type",void 0),b=w=(0,n._)([(0,a.$)("esri.layers.support.RangeDomain")],b);const M=b,F={key:"type",base:c,typeMap:{range:b,"coded-value":f,inherited:v}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},17036:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(44208),n=r(53966),o=r(20437),s=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>h,XJ:()=>m,lc:()=>c,mX:()=>_,rU:()=>g,tH:()=>F});var i=r(799);const n="__begin__",o="__end__",s=new RegExp(n,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+n,"i"),d=new RegExp(o+"$","i"),u='"',p=u+" + ",y=" + "+u;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):u+t,t=d.test(t)?t.replace(d,""):t+u,t=t.replaceAll(s,p).replaceAll(l,y)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,M=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=w.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=M.exec(e),t?t[2]:null)}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},96520:(e,t,r)=>{r.d(t,{u:()=>s});var i=r(83047),n=r(21325);function o(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function s(e,t,r){if(!e&&!t||!r)return;const n=(0,i.G9)(r);l(e,r,n),l(t,r,n)}function l(e,t,r){if(e)for(const i of e)a(i.geometry,t,r)}function a(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;const s=(0,i.G9)(e.spatialReference)/r;if(1!==s)if("x"in e)null!=e.z&&(e.z*=s);else if("rings"in e)o(e,e.rings,s);else if("paths"in e)o(e,e.paths,s);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=s)}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(90237),o=r(59456),s=r(52106),l=r(66552),a=r(25482),d=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),y=r(40608),c=r(43937),h=r(16930),m=r(65864),f=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.A.fromJSON(n),l=n.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=n.aggregateGeometries,d=o.aggregateGeometries;if(a&&null!=d)for(const e in d){const t=d[e],i=a[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,d.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const d=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),l,a);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(l[0]),n=r(l[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,m.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.M)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.M)({type:[s.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n._)([(0,p.w)("features")],_.prototype,"readFeatures",null),(0,n._)([(0,u.M)({type:[f.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n._)([(0,u.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n._)([(0,u.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n._)([(0,u.M)({types:o.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n._)([(0,p.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n._)([(0,u.M)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n._)([(0,u.M)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n._)([(0,y.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const v=_},10184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),o=r(25482),s=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),d=r(40608),u=r(73133);let p=class extends((0,n.O)(o.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,l.M)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,d.$)("esri.time.TimeInterval")],p);const y=p}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6245],{7320:(t,e,i)=>{i.d(e,{g:()=>n});const n={convertToGEGeometry:function(t,e){return null==e?null:t.convertJSONToGeometry(e)},exportPoint:function(t,e,i){const n=new r(t.getPointX(e),t.getPointY(e),i),s=t.hasZ(e),o=t.hasM(e);return s&&(n.z=t.getPointZ(e)),o&&(n.m=t.getPointM(e)),n},exportPolygon:function(t,e,i){return new s(t.exportPaths(e),i,t.hasZ(e),t.hasM(e))},exportPolyline:function(t,e,i){return new o(t.exportPaths(e),i,t.hasZ(e),t.hasM(e))},exportMultipoint:function(t,e,i){return new a(t.exportPoints(e),i,t.hasZ(e),t.hasM(e))},exportExtent:function(t,e,i){const n=t.hasZ(e),r=t.hasM(e),s=new l(t.getXMin(e),t.getYMin(e),t.getXMax(e),t.getYMax(e),i);if(n){const i=t.getZExtent(e);s.zmin=i.vmin,s.zmax=i.vmax}if(r){const i=t.getMExtent(e);s.mmin=i.vmin,s.mmax=i.vmax}return s}};class r{constructor(t,e,i){this.x=t,this.y=e,this.spatialReference=i,this.z=void 0,this.m=void 0}}class s{constructor(t,e,i,n){this.rings=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class o{constructor(t,e,i,n){this.paths=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class a{constructor(t,e,i,n){this.points=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class l{constructor(t,e,i,n,r){this.xmin=t,this.ymin=e,this.xmax=i,this.ymax=n,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},31464:(t,e,i)=>{i.d(e,{Cv:()=>f,Nk:()=>d,lK:()=>g});var n=i(4576),r=i(74887),s=i(57251),o=i(7320),a=i(21325),l=i(28735);const p=[0,0];function u(t,e){if(!e)return null;if("x"in e){const i={x:0,y:0};return[i.x,i.y]=t(e.x,e.y,p),null!=e.z&&(i.z=e.z),null!=e.m&&(i.m=e.m),i}if("xmin"in e){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=t(e.xmin,e.ymin,p),[i.xmax,i.ymax]=t(e.xmax,e.ymax,p),e.hasZ&&(i.zmin=e.zmin,i.zmax=e.zmax,i.hasZ=!0),e.hasM&&(i.mmin=e.mmin,i.mmax=e.mmax,i.hasM=!0),i}return"rings"in e?{rings:c(e.rings,t),hasM:e.hasM,hasZ:e.hasZ}:"paths"in e?{paths:c(e.paths,t),hasM:e.hasM,hasZ:e.hasZ}:"points"in e?{points:m(e.points,t),hasM:e.hasM,hasZ:e.hasZ}:null}function c(t,e){const i=[];for(const n of t)i.push(m(n,e));return i}function m(t,e){const i=[];for(const n of t){const t=e(n[0],n[1],[0,0]);i.push(t),n.length>2&&t.push(n[2]),n.length>3&&t.push(n[3])}return i}async function d(t,e){if(!t||!e)return;const i=Array.isArray(t)?t.map((t=>null!=t.geometry?t.geometry.spatialReference:null)).filter(n.Ru):[t];await(0,s.initializeProjection)(i.map((t=>({source:t,dest:e}))))}const y=u.bind(null,l.je),h=u.bind(null,l.tD);function f(t,e,i,n){if(!t)return t;if(i||(i=e,e=t.spatialReference),!(0,a.fn)(e)||!(0,a.fn)(i)||(0,a.aI)(e,i))return t;if((0,l.y7)(e,i)){const e=(0,a.K8)(i)?y(t):h(t);return e.spatialReference=i,e}return(0,s.projectMany)(o.g,[t],e,i,null,n)[0]}const v=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(t,e,i,n){if(!t?.length||!e||!i||(0,a.aI)(e,i))return t;const s={geometries:t,inSpatialReference:e,outSpatialReference:i,geographicTransformation:n,resolve:(0,r.Tw)()};return this._jobs.push(s),this._timer??=setTimeout(this._process,10),s.resolve.promise}_process(){this._timer=null;const t=this._jobs.shift();if(!t)return;const{geometries:e,inSpatialReference:i,outSpatialReference:n,resolve:r,geographicTransformation:p}=t;(0,l.y7)(i,n)?(0,a.K8)(n)?r(e.map(y)):r(e.map(h)):r((0,s.projectMany)(o.g,e,i,n,p,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(t,e,i,n){return v.push(t,e,i,n)}},58727:(t,e,i)=>{i.d(e,{GC:()=>d,T2:()=>y,VY:()=>c,v8:()=>m});var n=i(66552),r=i(83047),s=i(57251),o=i(90634),a=i(65864),l=i(17136),p=i(21325),u=i(31464);const c=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({});async function d(t,e,i){const{outFields:n,orderByFields:r,groupByFieldsForStatistics:s,outStatistics:o}=t;if(n)for(let t=0;t<n.length;t++)n[t]=n[t].trim();if(r)for(let t=0;t<r.length;t++)r[t]=r[t].trim();if(s)for(let t=0;t<s.length;t++)s[t]=s[t].trim();if(o)for(let t=0;t<o.length;t++)o[t].onStatisticField&&(o[t].onStatisticField=o[t].onStatisticField.trim());return t.geometry&&!t.outSR&&(t.outSR=t.geometry.spatialReference),y(t,e,i)}async function y(t,e,n){if(!t)return null;let{where:s}=t;if(t.where=s=s?.trim(),(!s||/^1 *= *1$/.test(s)||e&&e===s)&&(t.where=null),!t.geometry)return t;let d=await async function(t){const{distance:e,units:n}=t,s=t.geometry;if(null==e||"vertexAttributes"in s)return s;const o=s.spatialReference,a=n?c.fromJSON(n):(0,r.Ij)(o),l=o&&((0,p.EA)(o)||(0,p.K8)(o))?s:await(0,u.Nk)(o,p.KK).then((()=>(0,u.Cv)(s,p.KK)));return(await async function(){return(await Promise.all([i.e(9930),i.e(3656)]).then(i.bind(i,47559))).geodesicBuffer}())(l.spatialReference,l,e,a)}(t);if(t.distance=0,t.units=null,"esriSpatialRelEnvelopeIntersects"===t.spatialRel){const{spatialReference:e}=t.geometry;d=(0,o.HA)(d),d.spatialReference=e}if(d){await(0,u.Nk)(d.spatialReference,n),d=function(t,e){const i=t.spatialReference;return h(t,e)&&(0,a.ZC)(t)?{spatialReference:i,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:t}(d,n);const e=(await(0,l.el)((0,a.rS)(d)))[0];if(null==e)throw m;const i="quantizationParameters"in t&&t.quantizationParameters?.tolerance||"maxAllowableOffset"in t&&t.maxAllowableOffset||0,r=i&&h(d,n)?{densificationStep:8*i}:void 0,s=e.toJSON(),o=(0,u.Cv)(s,s.spatialReference,n,r);if(!o)throw m;o.spatialReference=n,t.geometry=o}return t}function h(t,e){if(!t)return!1;const i=t.spatialReference;return((0,a.ZC)(t)||(0,a.Bi)(t)||(0,a.Rg)(t))&&!(0,p.aI)(i,e)&&!(0,s.canProjectWithoutEngine)(i,e)}},76245:(t,e,i)=>{i.r(e),i.d(e,{default:()=>G});var n=i(90237),r=i(59456),s=i(69540),o=i(66552),a=i(25482),l=i(53966),p=i(10107),u=i(56507),c=(i(87811),i(44208),i(93223)),m=i(40608),d=i(65864),y=i(58727),h=i(93637);let f=class extends((0,s.O)(a.oY)){constructor(t){super(t),this.alias=null,this.expression=null,this.field=null,this.responseType=null}};(0,n._)([(0,p.M)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,p.M)({type:String,json:{write:!0}})],f.prototype,"expression",void 0),(0,n._)([(0,p.M)({type:String,json:{write:!0}})],f.prototype,"field",void 0),(0,n._)([(0,p.M)({type:String,json:{write:!0}})],f.prototype,"responseType",void 0),f=(0,n._)([(0,m.$)("esri.rest.support.BinParametersAttributes")],f);const v=f;f.from=(0,u.dp)(f);const g=new o.J({naturalLog:"natural-log",squareRoot:"square-root"});let w=class extends((0,s.O)(a.oY)){constructor(t){super(t),this.expression=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitByAttributes=null,this.stackByAttributes=null,this.transformation=null}};(0,n._)([(0,p.M)({type:String,json:{write:!0}})],w.prototype,"expression",void 0),(0,n._)([(0,p.M)({type:String,json:{name:"onField",write:!0}})],w.prototype,"field",void 0),(0,n._)([(0,p.M)({type:String,json:{write:!0}})],w.prototype,"firstDayOfWeek",void 0),(0,n._)([(0,p.M)({type:String,json:{write:!0}})],w.prototype,"hideUpperBound",void 0),(0,n._)([(0,p.M)({type:v,json:{write:{target:{splitBy:{type:String},splitByField:{type:String},splitByAlias:{type:String}},writer:(t,e)=>{null!=t.field&&(e.splitByField=t.field),null!=t.expression&&(e.splitBy=t.expression),null!=t.alias&&(e.splitByAlias=t.alias)}},read:{source:["splitBy","splitByField","splitByAlias"],reader:(t,e)=>new v({field:e.splitByField,expression:e.splitBy,alias:e.splitByAlias})}}})],w.prototype,"splitByAttributes",void 0),(0,n._)([(0,p.M)({type:v,json:{write:{target:{stackBy:{type:String},stackByField:{type:String},stackByAlias:{type:String},jsonStyle:{type:String}},writer:(t,e)=>{null!=t.field&&(e.stackByField=t.field),null!=t.expression&&(e.stackBy=t.expression),null!=t.alias&&(e.stackByAlias=t.alias),null!=t.responseType&&(e.jsonStyle=t.responseType)},overridePolicy(){return{enabled:null!=this.stackByAttributes?.field||null!=this.stackByAttributes?.expression}}},read:{source:["stackBy","stackByField","stackByAlias","jsonStyle"],reader:(t,e)=>new v({field:e.stackByField,expression:e.stackBy,alias:e.stackByAlias,responseType:e.jsonStyle})}}})],w.prototype,"stackByAttributes",void 0),(0,n._)([(0,c.e)(g)],w.prototype,"transformation",void 0),w=(0,n._)([(0,m.$)("esri.rest.support.BinParametersBase")],w);const x=w,M=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),_="percent-of-total",S="field",B=t=>{let e=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let t=this._get("normalizationType");const e=!!this.normalizationField,i=null!=this.normalizationTotal;return e||i?(t=e&&S||i&&_||null,e&&i&&l.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):t!==S&&t!==_||(t=null),t}set normalizationType(t){this._set("normalizationType",t)}};return(0,n._)([(0,p.M)({type:String,json:{name:"parameters.normalizationField",write:!0}})],e.prototype,"normalizationField",void 0),(0,n._)([(0,p.M)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],e.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,p.M)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],e.prototype,"normalizationMinValue",void 0),(0,n._)([(0,p.M)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],e.prototype,"normalizationTotal",void 0),(0,n._)([(0,c.e)(M,{name:"parameters.normalizationType"})],e.prototype,"normalizationType",null),e=(0,n._)([(0,m.$)("esri.rest.support.NormalizationBinParametersMixin")],e),e};function j(t,e,i){(0,h.sM)(i,t instanceof Date?t.getTime():t,e)}let b=class extends(B(x)){constructor(t){super(t),this.bins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,n._)([(0,p.M)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],b.prototype,"bins",void 0),(0,n._)([(0,p.M)({json:{name:"parameters.end",write:{writer:j}}})],b.prototype,"end",void 0),(0,n._)([(0,p.M)({json:{name:"parameters.start",write:{writer:j}}})],b.prototype,"start",void 0),(0,n._)([(0,c.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],b.prototype,"type",void 0),b=(0,n._)([(0,m.$)("esri.rest.support.AutoIntervalBinParameters")],b);const R=b;b.from=(0,u.dp)(b);const z=(0,o.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let T=class extends((0,s.O)(a.oY)){constructor(t){super(t),this.value=null,this.units=null}};(0,n._)([(0,p.M)({type:Number,json:{name:"number",write:!0}})],T.prototype,"value",void 0),(0,n._)([(0,c.e)(z,{name:"unit"})],T.prototype,"units",void 0),T=(0,n._)([(0,m.$)("esri.rest.support.DateBinTimeInterval")],T);const A=T;function P(t,e,i){(0,h.sM)(i,"string"==typeof t?t:t?.getTime(),e)}function k(t,e){const i=t.parameters[e];return i?"string"==typeof i?i:new Date(i):null}T.from=(0,u.dp)(T);let Z=class extends x{constructor(t){super(t),this.end=null,this.interval=null,this.offset=null,this.start=null,this.type="date"}};(0,n._)([(0,p.M)({type:Date,cast:t=>t?"string"==typeof t?t:new Date(t):null,json:{name:"parameters.end",read:{reader:(t,e)=>k(e,"end")},write:{writer:P}}})],Z.prototype,"end",void 0),(0,n._)([(0,p.M)({type:A,json:{name:"parameters",write:!0}})],Z.prototype,"interval",void 0),(0,n._)([(0,p.M)({type:A,json:{name:"parameters.offset",write:!0}})],Z.prototype,"offset",void 0),(0,n._)([(0,p.M)({type:Date,cast:t=>t?"string"==typeof t?t:new Date(t):null,json:{name:"parameters.start",read:{reader:(t,e)=>k(e,"start")},write:{writer:P}}})],Z.prototype,"start",void 0),(0,n._)([(0,c.e)({dateBin:"date"},{readOnly:!0})],Z.prototype,"type",void 0),Z=(0,n._)([(0,m.$)("esri.rest.support.DateBinParameters")],Z);const F=Z;Z.from=(0,u.dp)(Z);let O=class extends x{constructor(t){super(t),this.boundaries=null,this.type="fixed-boundaries"}};(0,n._)([(0,p.M)({json:{name:"parameters.boundaries",write:{writer:function(t,e,i){(0,h.sM)(i,t&&function(t){return t[0]instanceof Date}(t)?t.map((t=>t.getTime())):t,e)}}}})],O.prototype,"boundaries",void 0),(0,n._)([(0,c.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],O.prototype,"type",void 0),O=(0,n._)([(0,m.$)("esri.rest.support.FixedBoundariesBinParameters")],O);const N=O;function D(t,e,i){(0,h.sM)(i,t instanceof Date?t.getTime():t,e)}O.from=(0,u.dp)(O);let I=class extends(B(x)){constructor(t){super(t),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,n._)([(0,p.M)({json:{name:"parameters.end",write:{writer:D}}})],I.prototype,"end",void 0),(0,n._)([(0,p.M)({type:Number,json:{name:"parameters.interval",write:!0}})],I.prototype,"interval",void 0),(0,n._)([(0,p.M)({json:{name:"parameters.start",write:{writer:D}}})],I.prototype,"start",void 0),(0,n._)([(0,c.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],I.prototype,"type",void 0),I=(0,n._)([(0,m.$)("esri.rest.support.FixedIntervalBinParameters")],I);const V=I;I.from=(0,u.dp)(I);var $=i(27348),q=i(58174),C=i(7562),Y=i(56400),K=i(16930);const U=new o.J({asc:"ascending",desc:"descending"}),E={base:x,key:"type",typeMap:{"auto-interval":R,date:F,"fixed-boundaries":N,"fixed-interval":V}};let J=class extends((0,s.O)(a.oY)){constructor(t){super(t),this.binParameters=null,this.binOrder="ascending",this.cacheHint=void 0,this.datumTransformation=null,this.defaultSpatialReference=null,this.distance=void 0,this.geometry=null,this.lowerBoundaryAlias=null,this.outSpatialReference=null,this.outStatistics=null,this.quantizationParameters=null,this.returnDistinctValues=null,this.spatialRelationship="intersects",this.upperBoundaryAlias=null,this.units=null,this.where="1=1"}set outTimeZone(t){this._set("outTimeZone",t),t&&!(0,Y.wr)(t)&&l.A.getLogger(this).warn("#outTimeZone",`the parsed value '${t}' may not be a valid IANA time zone`)}};(0,n._)([(0,p.M)({types:E,json:{name:"bin",write:!0}})],J.prototype,"binParameters",void 0),(0,n._)([(0,c.e)(U)],J.prototype,"binOrder",void 0),(0,n._)([(0,p.M)({type:Boolean,json:{write:!0}})],J.prototype,"cacheHint",void 0),(0,n._)([(0,p.M)({json:{write:!0}})],J.prototype,"datumTransformation",void 0),(0,n._)([(0,p.M)({type:K.A,json:{name:"defaultSR",write:!0}})],J.prototype,"defaultSpatialReference",void 0),(0,n._)([(0,p.M)({type:Number,json:{write:{overridePolicy:t=>({enabled:t>0})}}})],J.prototype,"distance",void 0),(0,n._)([(0,p.M)({types:r.yR,json:{read:d.rS,write:!0}})],J.prototype,"geometry",void 0),(0,n._)([(0,p.M)({type:String,json:{write:!0}})],J.prototype,"lowerBoundaryAlias",void 0),(0,n._)([(0,p.M)({type:K.A,json:{name:"outSR",write:!0}})],J.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.M)({type:[C.A],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],J.prototype,"outStatistics",void 0),(0,n._)([(0,p.M)({value:null,json:{name:"outTimeReference",read:{reader:t=>t.ianaTimeZone},write:{writer:(t,e,i)=>{t&&(e[i]={ianaTimeZone:t})}}}})],J.prototype,"outTimeZone",null),(0,n._)([(0,p.M)({type:$.A,json:{write:!0}})],J.prototype,"quantizationParameters",void 0),(0,n._)([(0,p.M)({type:Boolean,json:{write:!0}})],J.prototype,"returnDistinctValues",void 0),(0,n._)([(0,c.e)(q.x,{name:"spatialRel"})],J.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.M)({type:String,json:{write:!0}})],J.prototype,"upperBoundaryAlias",void 0),(0,n._)([(0,p.M)({type:String,json:{read:y.VY.read,write:{writer:y.VY.write,overridePolicy(t){return{enabled:null!=t&&null!=this.distance&&this.distance>0}}}}})],J.prototype,"units",void 0),(0,n._)([(0,p.M)({type:String,json:{write:!0}})],J.prototype,"where",void 0),J=(0,n._)([(0,m.$)("esri.rest.support.BinsQuery")],J);const G=J;J.from=(0,u.dp)(J)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2830],{30624:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>R});var s=r(90237),o=(r(59456),r(78888)),n=r(49186),i=r(53966),c=r(74887),a=r(84952),u=(r(44208),r(87811),r(40608)),l=r(10107),h=r(62815),d=r(65529);let g=class extends d.A.EventedAccessor{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new n.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,s._)([(0,l.M)({readOnly:!0})],g.prototype,"connectionError",null),g=(0,s._)([(0,u.$)("esri.layers.support.StreamConnection")],g);const f=g;var y,_;(_=y||(y={}))[_.CONNECTING=0]="CONNECTING",_[_.OPEN=1]="OPEN",_[_.CLOSING=2]="CLOSING",_[_.CLOSED=3]="CLOSED";let p=class extends f{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._config=e,this._featureZScaler=(0,h.N)(t,s,r),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case y.CONNECTING:case y.OPEN:return"connected";case y.CLOSING:case y.CLOSED:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,a.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(s){const o=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(i.A.getLogger(this).error(new n.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(i.A.getLogger(this).error(new n.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${o}s`,s)),await(0,c.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void i.A.getLogger(this).error(new n.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise(((t,r)=>{const s=new WebSocket(e);s.onopen=()=>{if(s.onopen=null,this.destroyed)return s.onclose=null,void s.close();s.onclose=e=>this._onClose(e),s.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(s),t(s)},s.onclose=e=>{s.onopen=s.onclose=null,r(e)}}))}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,c.Tw)(),s=t.onmessage,{filter:o,outFields:a,spatialReference:u}=this._config;return r.timeout(e),t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch(e){}c&&"object"==typeof c||(i.A.getLogger(this).error(new n.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),c.spatialReference?.wkid!==u?.wkid&&(i.A.getLogger(this).error(new n.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${u.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==c.format&&(i.A.getLogger(this).error(new n.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),o&&c.filter!==o&&i.A.getLogger(this).error(new n.A("websocket-connection","Tried to set filter, but server doesn't support it")),a&&c.outFields!==a&&i.A.getLogger(this).error(new n.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=s;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:o,outFields:a,format:"json",spatialReference:{wkid:u.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),i.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&i.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,s._)([(0,l.M)()],p.prototype,"connectionStatus",null),(0,s._)([(0,l.M)()],p.prototype,"errorString",void 0),p=(0,s._)([(0,u.$)("esri.layers.graphics.sources.connections.WebSocketConnection")],p);var w=r(80893),m=r(61956),S=r(65864),b=r(16930);const k={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends p{constructor(e){super({...k,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||i.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:s}=this._config;this.destroyed||this._setFilter(r,s)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void i.A.getLogger(this).error(new n.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,o.A)(e.path,{query:t,responseType:"json"}),s=(await r).data;return this._serviceDefinition=s,s}_fetchWebSocketUrl(e,t){const r=e[0],{urls:s,token:o}=r,n=this._inferWebSocketBaseUrl(s);return(0,a.a6)(`${n}/subscribe`,{outSR:""+t.wkid,token:o})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return i.A.getLogger(this).error(new n.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const s=JSON.stringify({filter:this._serializeFilter(e,t)});let o=!1;const a=(0,c.Tw)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(i.A.getLogger(this).error(new n.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),a.reject(t.error)),this._setWebSocketJSONParseHandler(r),o=!0,a.resolve())},r.send(s),setTimeout((()=>{o||(this.destroyed||this._websocket!==r||i.A.getLogger(this).error(new n.A("geoevent-connection","Server timed out when setting filter")),a.reject())}),1e4),a.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(e?.geometry)try{const t=(0,S.rS)(e.geometry);if("extent"!==t.type)throw new n.A(`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){i.A.getLogger(this).error(new n.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],s=this._relatedFeatures.get(r);if(!s)return i.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:o,geometry:c}=s;for(const t in o)e.attributes[t]=o[t];return c&&(e.geometry=c),e.geometry||e.centroid||i.A.getLogger(this).error(new n.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),s=this._queryArchive(t);await r;const o=await s;if(!o)return;for(const e of o.features)this.onFeature(this._enrich(e))}catch(e){i.A.getLogger(this).error(new n.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(3161),r.e(145),r.e(3874),r.e(1147),r.e(1132),r.e(5494),r.e(4796),r.e(5894),r.e(4111),r.e(2780),r.e(3600),r.e(1967)]).then(r.bind(r,13600))).default)({url:e}),{capabilities:s}=await t.load(),o=s.query.supportsMaxRecordCountFactor,n=s.query.supportsPagination,i=s.query.supportsCentroid,c=this._config.maxRecordCountFactor,a=t.capabilities.query.maxRecordCount,u=o?a*c:a,l=new m.A;if(l.outFields=this._config.outFields??["*"],l.where=this._config.filter?.where??"1=1",l.returnGeometry=!0,l.returnExceededLimitFeatures=!0,l.outSpatialReference=b.A.fromJSON(this._config.spatialReference),i&&(l.returnCentroid=!0),o&&(l.maxRecordCountFactor=c),n)return l.num=u,t.destroy(),this._queryPages(e,l);const h=await(0,w.eW)(e,l,this._config.sourceSpatialReference);return t.destroy(),h.data}async _queryPages(e,t,r=[],s=0){t.start=null!=t.num?s*t.num:null;const{data:o}=await(0,w.eW)(e,t,this._config.sourceSpatialReference);return o.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(o.features.forEach((e=>r.push(e))),this._queryPages(e,t,r,s+1)):(r.forEach((e=>o.features.push(e))),o)}_addRelatedFeatures(e){const t=new Map,r=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[s];t.set(r,e)}this._relatedFeatures=t}};v=(0,s._)([(0,u.$)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);const A=v;let C=class extends f{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._featureZScaler=(0,h.N)(t,s,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function F(e,t){if(null==e&&null==t)return null;const r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}function R(e,t,r,s,o,n,i,c,a){const u={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:s,filter:F(o,n),maxReconnectionAttempts:i,maxReconnectionInterval:c,customParameters:a};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new p(u):new A(u):new C(u)}(0,s._)([(0,l.M)()],C.prototype,"connectionStatus",void 0),(0,s._)([(0,l.M)()],C.prototype,"errorString",void 0),C=(0,s._)([(0,u.$)("esri.layers.support.ClientSideConnection")],C)},58501:(e,t,r)=>{r.d(t,{q:()=>o});var s=r(62815);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}}}]);