@arcgis/core 4.28.0-next.20231003 → 4.28.0-rc.0

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 (211) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02120d192eafd7612475.js +1 -0
  3. package/assets/esri/core/workers/chunks/0beebbb0c6dad0e742d7.js +1 -0
  4. package/assets/esri/core/workers/chunks/112e89da628bdea5355c.js +1 -0
  5. package/assets/esri/core/workers/chunks/{5e9edd06e624f385fa4b.js → 121a9e148509f2fe2210.js} +1 -1
  6. package/assets/esri/core/workers/chunks/1856d16d738f44f58084.js +1 -0
  7. package/assets/esri/core/workers/chunks/{0526d623d0b4c12929bd.js → 18ab9cc85a1a7988fdfd.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{7c960a2694c4c3123acf.js → 1a36703ebe934749646e.js} +1 -1
  9. package/assets/esri/core/workers/chunks/24a0cf405195421c0d06.js +1 -0
  10. package/assets/esri/core/workers/chunks/24ff267cf253feac22de.js +1 -0
  11. package/assets/esri/core/workers/chunks/{3c8613596659801fd6ab.js → 29cab345819ec02ed60a.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{169a61c6e128b8a16021.js → 2c560a075d9ef2069ed1.js} +1 -1
  13. package/assets/esri/core/workers/chunks/2f8e71dac98135bbc3e6.js +1 -0
  14. package/assets/esri/core/workers/chunks/341fb51b2165522963b3.js +1 -0
  15. package/assets/esri/core/workers/chunks/{ad8e0f82cb1feafa9e2f.js → 36ab90fb34b9716a9983.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{2688213bbff536da7917.js → 3ea0b872436fce84b927.js} +1 -1
  17. package/assets/esri/core/workers/chunks/40633064c290dc2af9ea.js +1 -0
  18. package/assets/esri/core/workers/chunks/42ec4c80b0c2944cd65c.js +1 -0
  19. package/assets/esri/core/workers/chunks/44b870cb53ba68b17c32.js +1 -0
  20. package/assets/esri/core/workers/chunks/{8a7fa4e8b0d14da7c9eb.js → 4cc680fe4c9c39d2f853.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{6730c9f0890191a95fdb.js → 4d81aa50d90f5701a343.js} +1 -1
  22. package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +1 -0
  23. package/assets/esri/core/workers/chunks/4e6bf1efe3b0b474cbb4.js +1 -0
  24. package/assets/esri/core/workers/chunks/52cef7cd3aaaa4f45c94.js +1 -0
  25. package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +1 -0
  26. package/assets/esri/core/workers/chunks/66ba749ab0a631bbfdec.js +1 -0
  27. package/assets/esri/core/workers/chunks/6b14d89d689a21014aec.js +1 -0
  28. package/assets/esri/core/workers/chunks/6b1856303d1562f05100.js +1 -0
  29. package/assets/esri/core/workers/chunks/{576269fd1f9049876aa1.js → 6b7b5544ed1f9a84623f.js} +1 -1
  30. package/assets/esri/core/workers/chunks/710a6268de62003af825.js +1 -0
  31. package/assets/esri/core/workers/chunks/77923afde29ae1ff10ca.js +1 -0
  32. package/assets/esri/core/workers/chunks/784ffd52315a4d55d683.js +1 -0
  33. package/assets/esri/core/workers/chunks/7cf7f2b991a7cbdad2ce.js +1 -0
  34. package/assets/esri/core/workers/chunks/{70dffbf49b0633b1a5f1.js → 8f3680fee85a05839489.js} +1 -1
  35. package/assets/esri/core/workers/chunks/97aecf210938015cc7a3.js +1 -0
  36. package/assets/esri/core/workers/chunks/{c7ebd5d431fb996bfcee.js → 9f8207c82a17508a87a8.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{557305b91f77569ce664.js → a01ffe03b1465c21b9e6.js} +1 -1
  38. package/assets/esri/core/workers/chunks/a298c9031962951e55a9.js +1 -0
  39. package/assets/esri/core/workers/chunks/{329669a9beda89b028dd.js → a5a7bbdd8298016535bc.js} +1 -1
  40. package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +1 -0
  41. package/assets/esri/core/workers/chunks/ad38e456a7cee940a165.js +1 -0
  42. package/assets/esri/core/workers/chunks/adfbc168be8c49b51e1b.js +1 -0
  43. package/assets/esri/core/workers/chunks/b0526633a93ef69ec47b.js +1 -0
  44. package/assets/esri/core/workers/chunks/b99bc08a01e9250b0a31.js +1 -0
  45. package/assets/esri/core/workers/chunks/{36c4b4c3eca57417da2c.js → c260ad3434bb00ba64a7.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{39922ce232338de076ae.js → c459c8d8630eb4b955b1.js} +1 -1
  47. package/assets/esri/core/workers/chunks/c92e75b79aff7b505b31.js +1 -0
  48. package/assets/esri/core/workers/chunks/ca85e88dad30b5f2956b.js +1 -0
  49. package/assets/esri/core/workers/chunks/{8e56d40691b6bf75d7cc.js → ce409944221a784ddb61.js} +1 -1
  50. package/assets/esri/core/workers/chunks/d13f75f233cf313e5a1d.js +1 -0
  51. package/assets/esri/core/workers/chunks/d60d5f006375f7fcc88c.js +1 -0
  52. package/assets/esri/core/workers/chunks/{77958089748dc31757cf.js → d6ded127949160103f69.js} +1 -1
  53. package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +1 -0
  54. package/assets/esri/core/workers/chunks/{304c81f6297ecba3a324.js → d95eed98316e59f8f35d.js} +1 -1
  55. package/assets/esri/core/workers/chunks/df7267892b6e0493e1d7.js +1 -0
  56. package/assets/esri/core/workers/chunks/{52dca349e1a45555954d.js → e52d5a48e83d8df36f92.js} +1 -1
  57. package/assets/esri/core/workers/chunks/e8688b6cc3b3c1010b43.js +1 -0
  58. package/assets/esri/core/workers/chunks/e8c7cc974420c0b92d0e.js +1 -0
  59. package/assets/esri/core/workers/chunks/{b6847d68c35e7dbf6004.js → e93442c6d92229f3a4b0.js} +1 -1
  60. package/assets/esri/core/workers/chunks/f2718e260f594537f7fd.js +1 -0
  61. package/assets/esri/core/workers/chunks/f6b7036114b1d754fdd9.js +1 -0
  62. package/assets/esri/core/workers/chunks/{c4631241dc777ca77aaa.js → f6c0680c535c5a3c73ee.js} +1 -1
  63. package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +1 -0
  64. package/assets/esri/t9n/common.json +1 -1
  65. package/assets/esri/t9n/common_ar.json +1 -1
  66. package/assets/esri/t9n/common_bg.json +1 -1
  67. package/assets/esri/t9n/common_bs.json +1 -1
  68. package/assets/esri/t9n/common_ca.json +1 -1
  69. package/assets/esri/t9n/common_cs.json +1 -1
  70. package/assets/esri/t9n/common_da.json +1 -1
  71. package/assets/esri/t9n/common_de.json +1 -1
  72. package/assets/esri/t9n/common_el.json +1 -1
  73. package/assets/esri/t9n/common_en.json +1 -1
  74. package/assets/esri/t9n/common_es.json +1 -1
  75. package/assets/esri/t9n/common_et.json +1 -1
  76. package/assets/esri/t9n/common_fi.json +1 -1
  77. package/assets/esri/t9n/common_fr.json +1 -1
  78. package/assets/esri/t9n/common_he.json +1 -1
  79. package/assets/esri/t9n/common_hr.json +1 -1
  80. package/assets/esri/t9n/common_hu.json +1 -1
  81. package/assets/esri/t9n/common_id.json +1 -1
  82. package/assets/esri/t9n/common_it.json +1 -1
  83. package/assets/esri/t9n/common_ja.json +1 -1
  84. package/assets/esri/t9n/common_ko.json +1 -1
  85. package/assets/esri/t9n/common_lt.json +1 -1
  86. package/assets/esri/t9n/common_lv.json +1 -1
  87. package/assets/esri/t9n/common_nb.json +1 -1
  88. package/assets/esri/t9n/common_nl.json +1 -1
  89. package/assets/esri/t9n/common_pl.json +1 -1
  90. package/assets/esri/t9n/common_pt-BR.json +1 -1
  91. package/assets/esri/t9n/common_pt-PT.json +1 -1
  92. package/assets/esri/t9n/common_ro.json +1 -1
  93. package/assets/esri/t9n/common_ru.json +1 -1
  94. package/assets/esri/t9n/common_sk.json +1 -1
  95. package/assets/esri/t9n/common_sl.json +1 -1
  96. package/assets/esri/t9n/common_sr.json +1 -1
  97. package/assets/esri/t9n/common_sv.json +1 -1
  98. package/assets/esri/t9n/common_th.json +1 -1
  99. package/assets/esri/t9n/common_tr.json +1 -1
  100. package/assets/esri/t9n/common_uk.json +1 -1
  101. package/assets/esri/t9n/common_vi.json +1 -1
  102. package/assets/esri/t9n/common_zh-CN.json +1 -1
  103. package/assets/esri/t9n/common_zh-HK.json +1 -1
  104. package/assets/esri/t9n/common_zh-TW.json +1 -1
  105. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +2 -1
  106. package/assets/esri/themes/base/widgets/_FeatureForm.scss +0 -1
  107. package/assets/esri/themes/dark/main.css +1 -1
  108. package/assets/esri/themes/light/main.css +1 -1
  109. package/assets/esri/themes/light/view.css +1 -1
  110. package/config.js +1 -1
  111. package/core/pbf.js +1 -1
  112. package/interfaces.d.ts +0 -32
  113. package/kernel.js +1 -1
  114. package/layers/GroupLayer.js +1 -1
  115. package/layers/SceneLayer.js +1 -1
  116. package/layers/graphics/editingSupport.js +1 -1
  117. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  118. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  119. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  120. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  121. package/layers/mixins/OperationalLayer.js +1 -1
  122. package/layers/save/featureLayerUtils.js +1 -1
  123. package/layers/save/groupLayerUtils.js +5 -0
  124. package/layers/save/utils.js +1 -1
  125. package/layers/support/LayerLoadContext.js +5 -0
  126. package/layers/support/featureLayerUtils.js +1 -1
  127. package/layers/support/labelFormatUtils.js +1 -1
  128. package/layers/support/layersCreator.js +1 -1
  129. package/package.json +1 -1
  130. package/portal/schemas/definitions.js +1 -1
  131. package/portal/support/jsonContext.js +1 -1
  132. package/portal/support/layersLoader.js +1 -1
  133. package/portal/support/loadUtils.js +5 -0
  134. package/portal/support/portalItemUtils.js +1 -1
  135. package/portal/support/portalLayers.js +1 -1
  136. package/renderers/support/RasterSymbolizer.js +1 -1
  137. package/support/basemapUtils.js +1 -1
  138. package/support/revision.js +1 -1
  139. package/symbols/PolygonSymbol3D.js +1 -1
  140. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  141. package/views/2d/engine/imagery/colorizer/shadedrelief.js +1 -1
  142. package/views/2d/engine/imagery/colorizer/stretch.js +1 -1
  143. package/views/2d/input/handlers/KeyPan.js +1 -1
  144. package/views/2d/input/handlers/KeyRotate.js +1 -1
  145. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  146. package/views/2d/layers/features/support/FeatureSetReaderPBFIndirect.js +1 -1
  147. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  148. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  149. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  150. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  151. package/views/3d/layers/i3s/featureEditing.js +1 -1
  152. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  153. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  154. package/views/DOMContainer.js +1 -1
  155. package/views/input/VisibilityChange.js +5 -0
  156. package/webdoc/support/saveUtils.js +1 -1
  157. package/webdoc/webdocSaveUtils.js +1 -1
  158. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  159. package/widgets/DirectionalPad/constants.js +1 -1
  160. package/widgets/DirectionalPad.js +1 -1
  161. package/widgets/FeatureForm/FieldInput.js +1 -1
  162. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  163. package/widgets/FeatureForm.js +1 -1
  164. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  165. package/widgets/FeatureTable/FieldColumn.js +1 -1
  166. package/widgets/support/dateUtils.js +1 -1
  167. package/assets/esri/core/workers/chunks/027f8b57565c65fbccda.js +0 -1
  168. package/assets/esri/core/workers/chunks/048265fb5953350e3e33.js +0 -1
  169. package/assets/esri/core/workers/chunks/0b9cf14f8aafb76c578b.js +0 -1
  170. package/assets/esri/core/workers/chunks/10fd951bd296b2beeeba.js +0 -1
  171. package/assets/esri/core/workers/chunks/1224475f3eefdfd59c76.js +0 -1
  172. package/assets/esri/core/workers/chunks/162b0220e24e9ba72655.js +0 -1
  173. package/assets/esri/core/workers/chunks/1e611cad53b745ee146f.js +0 -1
  174. package/assets/esri/core/workers/chunks/29ed31fd4f9d5cf53686.js +0 -1
  175. package/assets/esri/core/workers/chunks/2b6d1c8e4ed759767827.js +0 -1
  176. package/assets/esri/core/workers/chunks/34b44b0fab88f838885c.js +0 -1
  177. package/assets/esri/core/workers/chunks/364f55294a1d7bf163d7.js +0 -1
  178. package/assets/esri/core/workers/chunks/3714ab435dd5ccf9e694.js +0 -1
  179. package/assets/esri/core/workers/chunks/3788009a5ece453011f3.js +0 -1
  180. package/assets/esri/core/workers/chunks/3aafe8160b3bfbaa6935.js +0 -1
  181. package/assets/esri/core/workers/chunks/3e6255ab48b561af131e.js +0 -1
  182. package/assets/esri/core/workers/chunks/41c002e4c42c581cda8d.js +0 -1
  183. package/assets/esri/core/workers/chunks/47be4c75dd6372b96fe4.js +0 -1
  184. package/assets/esri/core/workers/chunks/4e8d1e6051f6654a5e83.js +0 -1
  185. package/assets/esri/core/workers/chunks/53746e9976758630159b.js +0 -1
  186. package/assets/esri/core/workers/chunks/5449fdd69e12e5cbd12a.js +0 -1
  187. package/assets/esri/core/workers/chunks/57ce4ece0147afb0d43c.js +0 -1
  188. package/assets/esri/core/workers/chunks/5e83d21400a5dec05c81.js +0 -1
  189. package/assets/esri/core/workers/chunks/6047f4487dcd37cca98e.js +0 -1
  190. package/assets/esri/core/workers/chunks/6967d2b3721678b38774.js +0 -1
  191. package/assets/esri/core/workers/chunks/6ac5ca7de651e3d672a1.js +0 -1
  192. package/assets/esri/core/workers/chunks/6b7ee9164149428edb9e.js +0 -1
  193. package/assets/esri/core/workers/chunks/6c495077cc79e1898927.js +0 -1
  194. package/assets/esri/core/workers/chunks/6d43648d5326e01b4474.js +0 -1
  195. package/assets/esri/core/workers/chunks/74fb07de0f990d45af89.js +0 -1
  196. package/assets/esri/core/workers/chunks/8e9a52062ce059153a89.js +0 -1
  197. package/assets/esri/core/workers/chunks/919a57d372419785cd5e.js +0 -1
  198. package/assets/esri/core/workers/chunks/939f0a1a7d605e389e45.js +0 -1
  199. package/assets/esri/core/workers/chunks/9932f23ba6589df14a3d.js +0 -1
  200. package/assets/esri/core/workers/chunks/a25a38c9f338e0beffef.js +0 -1
  201. package/assets/esri/core/workers/chunks/a97581e584336b46ede7.js +0 -1
  202. package/assets/esri/core/workers/chunks/b04eb35e06b1c5759ad0.js +0 -1
  203. package/assets/esri/core/workers/chunks/b1cb932cfadc4dc3f1e4.js +0 -1
  204. package/assets/esri/core/workers/chunks/be3fb6113b0b27b94537.js +0 -1
  205. package/assets/esri/core/workers/chunks/c37119f5692e19aa1ce2.js +0 -1
  206. package/assets/esri/core/workers/chunks/c685f16435d9861bbbd0.js +0 -1
  207. package/assets/esri/core/workers/chunks/e6416a2684866d677b3e.js +0 -1
  208. package/assets/esri/core/workers/chunks/eb01f4cdb9b918cc61e7.js +0 -1
  209. package/assets/esri/core/workers/chunks/eb4aed4fdb44495a4fe6.js +0 -1
  210. package/assets/esri/core/workers/chunks/ec8258c9dc1491e97fc8.js +0 -1
  211. package/assets/esri/core/workers/chunks/eeac53da496de4cd4182.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8062],{71592:(e,t,a)=>{a.d(t,{w:()=>u});var r=a(40330),n=a(3172),l=a(20102),i=a(95330),s=a(66677),o=a(48522),c=a(15235);async function u(e,t){const a=(0,s.Qc)(e);if(!a)throw new l.Z("invalid-url","Invalid scene service url");const u={...t,sceneServerUrl:a.url.path,layerId:a.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const t=(await y(e)).serviceItemId;if(!t)return null;const a=new c.default({id:t,apiKey:e.apiKey}),l=await async function(e){const t=r.id?.findServerInfo(e.sceneServerUrl);if(t?.owningSystemUrl)return t.owningSystemUrl;const a=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const t=(await(0,n.Z)(a,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(t)return t}catch(e){(0,i.r9)(e)}return null}(e);null!=l&&(a.portal=new o.Z({url:l}));try{return a.load({signal:e.signal})}catch(e){return(0,i.r9)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:t}){if(!e)return null;try{const a=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:t})).find((e=>"Feature Service"===e.type))||null;if(!a)return null;const r=new c.default({portal:a.portal,id:a.id});return await r.load(),r}catch(e){return(0,i.r9)(e),null}}(u);if(!f?.url)throw new l.Z("related-service-not-found","Could not find feature service through portal item relationship");const p=await d(f.url,u);return p.portalItem=f,p}async function y(e){if(e.rootDocument)return e.rootDocument;const t={query:{f:"json",token:e.apiKey},responseType:"json",signal:e.signal};try{const a=await(0,n.Z)(e.sceneServerUrl,t);e.rootDocument=a.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,t){const a=(0,s.Qc)(e);if(!a)throw new l.Z("invalid-feature-service-url","Invalid feature service url");const r=a.url.path,i=t.layerId;if(null==i)return{serverUrl:r};const o=y(t),c=e=>{const a={query:{f:"json"},responseType:"json",authMode:e,signal:t.signal};return(0,n.Z)(r,a)},u=c("anonymous").catch((()=>c("no-prompt"))),[d,f]=await Promise.all([u,o]),p=f?.layers,m=d.data&&d.data.layers;if(!Array.isArray(m))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,m.length);e++)if(p[e].id===i)return{serverUrl:r,layerId:m[e].id}}else if(null!=i&&i<m.length)return{serverUrl:r,layerId:m[i].id};throw new Error("could not find matching associated sublayer")}},52104:(e,t,a)=>{a.d(t,{V:()=>n});var r=a(96187);async function n(e,t){const a=await(0,r.T)(e,t);a.layers=a.layers.filter(l);const n={serviceJSON:a};if((a.currentVersion??0)<10.5)return n;const i=await(0,r.T)(e+"/layers",t);return n.layersJSON={layers:i.layers.filter(l),tables:i.tables},n}function l(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},87344:(e,t,a)=>{a.d(t,{T:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(8153)]).then(a.bind(a,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(4680),a.e(9238),a.e(6170),a.e(3975),a.e(1161),a.e(3554)]).then(a.bind(a,30223))).default,CSVLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(4680),a.e(9238),a.e(3584)]).then(a.bind(a,45425))).default,DimensionLayer:async()=>(await Promise.all([a.e(163),a.e(6874),a.e(81)]).then(a.bind(a,40081))).default,ElevationLayer:async()=>(await Promise.all([a.e(163),a.e(6569),a.e(9016),a.e(2763)]).then(a.bind(a,65665))).default,FeatureLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(4680),a.e(9238),a.e(7520)]).then(a.bind(a,19238))).default,GeoJSONLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(9069)]).then(a.bind(a,23477))).default,GeoRSSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(9281)]).then(a.bind(a,3723))).default,GroupLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9059)]).then(a.bind(a,40504))).default,ImageryLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(4165),a.e(4599),a.e(6610),a.e(3663),a.e(4608)]).then(a.bind(a,60590))).default,ImageryTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(6610),a.e(4136),a.e(3663),a.e(5913)]).then(a.bind(a,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([a.e(163),a.e(3975),a.e(1537)]).then(a.bind(a,9310))).default,KMLLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(1423),a.e(6472)]).then(a.bind(a,42756))).default,LineOfSightLayer:async()=>(await Promise.all([a.e(163),a.e(6874),a.e(1786)]).then(a.bind(a,21786))).default,LinkChartLayer:async()=>(await Promise.all([a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(1423),a.e(4165),a.e(6404),a.e(8968),a.e(5286),a.e(801)]).then(a.bind(a,19087))).default,MapImageLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(1423),a.e(4165),a.e(3778),a.e(4599),a.e(2863),a.e(7374)]).then(a.bind(a,27374))).default,MapNotesLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(4680),a.e(9238),a.e(2575)]).then(a.bind(a,62128))).default,MediaLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(4828)]).then(a.bind(a,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(2341)]).then(a.bind(a,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971),a.e(6237)]).then(a.bind(a,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(4680),a.e(9238),a.e(3681)]).then(a.bind(a,44958))).default,PointCloudLayer:async()=>(await Promise.all([a.e(163),a.e(8775),a.e(3975),a.e(8643),a.e(7863)]).then(a.bind(a,10608))).default,RouteLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(1423),a.e(261)]).then(a.bind(a,40153))).default,SceneLayer:async()=>(await Promise.all([a.e(163),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(1423),a.e(4165),a.e(3778),a.e(6170),a.e(3975),a.e(1161),a.e(1174)]).then(a.bind(a,57476))).default,StreamLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(7132)]).then(a.bind(a,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(1423),a.e(4165),a.e(3778),a.e(4680),a.e(8324),a.e(2596)]).then(a.bind(a,20697))).default,TileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(1423),a.e(4165),a.e(3778),a.e(4599),a.e(9016),a.e(2863),a.e(8636)]).then(a.bind(a,98636))).default,UnknownLayer:async()=>(await a.e(4166).then(a.bind(a,44166))).default,UnsupportedLayer:async()=>(await a.e(9296).then(a.bind(a,39296))).default,VectorTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9016),a.e(4325),a.e(9805),a.e(5481)]).then(a.bind(a,94756))).default,VoxelLayer:async()=>(await Promise.all([a.e(163),a.e(8775),a.e(3975),a.e(9327)]).then(a.bind(a,28865))).default,WFSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(3928),a.e(4467),a.e(6569),a.e(1423),a.e(4165),a.e(3778),a.e(6404),a.e(6506)]).then(a.bind(a,12653))).default,WMSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8775),a.e(1574)]).then(a.bind(a,25906))).default,WMTSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971),a.e(2594)]).then(a.bind(a,72594))).default,WebTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971)]).then(a.bind(a,16199))).default}},33516:(e,t,a)=>{a.d(t,{Y:()=>i,h:()=>l});var r=a(17452),n=a(48522);function l(e){return{origin:"portal-item",url:(0,r.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function i(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,r.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}},18062:(e,t,a)=>{a.d(t,{$O:()=>g,CD:()=>p,Ld:()=>d,Ok:()=>L,Q4:()=>v,XX:()=>S,_Y:()=>I,load:()=>f});var r=a(20102),n=a(66677),l=a(71592),i=a(52104),s=a(87344),o=a(48522),c=a(33516),u=a(40555),y=a(96187);class d{constructor(){this._serviceMetadatas=new Map}async fetchServiceMetadata(e,t){const a=this._serviceMetadatas.get(e);if(a)return a;const r=await(0,y.T)(e,t);return this._serviceMetadatas.set(e,r),r}}async function f(e,t){const a=e.instance.portalItem;if(a?.id)return await a.load(t),function(e){const t=e.instance.portalItem;if(!t?.type||!e.supportedTypes.includes(t.type))throw new r.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:t?.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,t){const a=e.instance,n=a.portalItem;if(!n)return;const{url:l,title:s}=n,o=(0,c.h)(n);if("group"===a.type)return a.read({title:s},o),async function(e,t){let a;const{portalItem:n}=e;if(!n)return;const l=n.type,s=t.layerModuleTypeMap;switch(l){case"Feature Service":case"Feature Collection":a=s.FeatureLayer;break;case"Stream Service":a=s.StreamLayer;break;case"Scene Service":a=s.SceneLayer;break;default:throw new r.Z("portal:unsupported-item-type-as-group",`The item type '${l}' is not supported as a 'IGroupLayer'`)}const o=new d;let[c,u]=await Promise.all([a(),b(t,o)]),f=()=>c;if("Feature Service"===l){u=n.url?await g(u,n.url,o):{};const t=S(u),a=I(u),r=[];if(t.length||a?.length){t.length&&r.push("SubtypeGroupLayer"),a?.length&&r.push("OrientedImageryLayer");const e=[];for(const t of r){const a=s[t];e.push(a())}const n=await Promise.all(e),l=new Map;r.forEach(((e,t)=>{l.set(e,n[t])})),f=e=>e.layerType?l.get(e.layerType)??c:c}const l=await async function(e){const{layersJSON:t}=await(0,i.V)(e);if(!t)return null;const a=[...t.layers,...t.tables];return e=>a.find((t=>t.id===e.id))}(n.url);return await h(e,f,u,l)}return"Scene Service"===l&&n.url&&(u=await p(n,u,o)),v(u)>0?await h(e,f,u):await async function(e,t){const{portalItem:a}=e;if(!a?.url)return;const r=await(0,y.T)(a.url);r&&h(e,t,{layers:r.layers?.map(m),tables:r.tables?.map(m)})}(e,f)}(a,e);l&&a.read({url:l},o);const f=new d,w=await b(e,f,t);return w&&a.read(w,o),a.resourceReferences={portalItem:n,paths:o.readResourcePaths??[]},"subtype-group"!==a.type&&a.read({title:s},o),(0,u.y)(a,o)}(e,t)}async function p(e,t,a){if(!e?.url)return t??{};if(t??={},!t.layers){const r=await a.fetchServiceMetadata(e.url);t.layers=r.layers?.map(m)}const{serverUrl:r,portalItem:n}=await(0,l.w)(e.url,{sceneLayerItem:e}).catch((()=>({serverUrl:null,portalItem:null})));if(null==r)return t.tables=[],t;if(!t.tables&&n){const e=await n.fetchData();if(e?.tables)t.tables=e.tables.map(m);else{const e=await a.fetchServiceMetadata(r);t.tables=e?.tables?.map(m)}}if(t.tables)for(const e of t.tables)e.url=`${r}/${e.id}`;return t}function m(e){const t={id:e.id,name:e.name};return"Oriented Imagery Layer"===e.type&&(t.layerType="OrientedImageryLayer"),t}async function h(e,t,a,r){let n=a.layers||[];const l=a.tables||[];if("Feature Collection"===e.portalItem?.type?(n.forEach(((e,t)=>{e.id=t,"Table"===e?.layerDefinition?.type&&l.push(e)})),n=n.filter((e=>"Table"!==e?.layerDefinition?.type))):(n.reverse(),l.reverse()),n.forEach((n=>{const l=r?.(n);if(l||!r){const r=w(e,t(n),a,n,l);e.add(r)}})),l.length){const t=await s.T.FeatureLayer();l.forEach((n=>{const l=r?.(n);if(l||!r){const r=w(e,t,a,n,l);e.tables.add(r)}}))}}function w(e,t,a,r,n){const l=e.portalItem,i={portalItem:l.clone(),layerId:r.id};null!=r.url&&(i.url=r.url);const s=new t(i);if("sourceJSON"in s&&(s.sourceJSON=n),"subtype-group"!==s.type&&(s.sublayerTitleMode="service-name"),"Feature Collection"===l.type){const e={origin:"portal-item",portal:l.portal||o.Z.getDefault()};s.read(r,e);const t=a.showLegend;null!=t&&s.read({showLegend:t},e)}return s}async function b(e,t,a){if(!1===e.supportsData)return;const r=e.instance,l=r.portalItem;if(!l)return;let i=null;try{i=await l.fetchData("json",a)}catch(e){}if(function(e){return"stream"!==e.type&&"layerId"in e}(r)){let e=null;const a=await async function(e,t,a){if(t?.layers&&t?.tables)return v(t);const r=(0,n.Qc)(e.url);if(!r)return 1;const l=await a.fetchServiceMetadata(r.url.path).catch((()=>null));return(t?.layers?.length??l?.layers?.length??0)+(t?.tables?.length??l?.tables?.length??0)}(l,i,t);if((i?.layers||i?.tables)&&a>0){if(null==r.layerId){const e=S(i);r.layerId="subtype-group"===r.type?e?.[0]:L(i)}e=function(e,t){const{layerId:a}=t,r=e.layers?.find((e=>e.id===a))||e.tables?.find((e=>e.id===a));return r&&function(e,t){return!("feature"===t.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===t.type&&!("layerType"in e))}(r,t)?r:null}(i,r),e&&null!=i.showLegend&&(e.showLegend=i.showLegend)}return a>1&&"sublayerTitleMode"in r&&"service-name"!==r.sublayerTitleMode&&(r.sublayerTitleMode="item-title-and-service-name"),e}return i}async function g(e,t,a){if(null==e?.layers||null==e?.tables){const r=await a.fetchServiceMetadata(t);(e=e||{}).layers=e.layers||r?.layers?.map(m),e.tables=e.tables||r?.tables?.map(m)}return e}function L(e){const t=e.layers;if(t?.length)return t[0].id;const a=e.tables;return a?.length?a[0].id:null}function v(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function S(e){const t=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&t.push(e.id)})),t}function I(e){return e?.layers?.filter((({layerType:e})=>"OrientedImageryLayer"===e)).map((({id:e})=>e))}},40555:(e,t,a)=>{a.d(t,{y:()=>i});var r=a(66643),n=a(95330),l=a(20941);async function i(e,t,a){const i=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(i&&"unique-value"===i.type&&i.styleOrigin){const s=await(0,r.q6)(i.populateFromStyle());if((0,n.k_)(a),!1===s.ok){const a=s.error;t?.messages&&t.messages.push(new l.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${a.message}`,{error:a,context:t})),e.clear("renderer",t?.origin)}}}},96187:(e,t,a)=>{a.d(t,{T:()=>n});var r=a(3172);async function n(e,t){const{data:a}=await(0,r.Z)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}});return a}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5677,6030,661,5234],{22303:(e,t,r)=>{r.d(t,{Z:()=>p});var n,i,o=r(35270),s=r(22021),a=r(75215);function l(e){return(0,s.uZ)((0,a.vU)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function c(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}class h{static blendColors(e,t,r,n=new h){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),h.fromArray(r,t)}return h.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return h.fromArray((0,o.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new h){if("#"!==e[0]||isNaN(Number(`0x${e.substring(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.substring(1,2),16),n=parseInt(e.substring(2,3),16),i=parseInt(e.substring(3,4),16),o=5===e.length?15:parseInt(e.substring(4),16);return h.fromArray([r+16*r,n+16*n,i+16*i,(o+16*o)/255],t)}case 7:case 9:{const r=parseInt(e.substring(1,3),16),n=parseInt(e.substring(3,5),16),i=parseInt(e.substring(5,7),16),o=7===e.length?255:parseInt(e.substring(7),16);return h.fromArray([r,n,i,o/255],t)}default:return null}}static fromArray(e,t=new h){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.St)(e)?(0,o.h$)(e):null;return r&&h.fromArray(r,t)||h.fromRgb(e,t)||h.fromHex(e,t)}static fromJSON(e){return null!=e?new h([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?h.fromString(e,this):Array.isArray(e)?h.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,n=3===r||4===r,i=4===r||8===r,o=`#${c(this.r,n)}${c(this.g,n)}${c(this.b,n)}${i?c(Math.round(255*this.a),n):""}`;return t?o.toUpperCase():o}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=h.AlphaMode.ALWAYS){const t=l(this.r),r=l(this.g),n=l(this.b);return e===h.AlphaMode.ALWAYS||1!==this.a?[t,r,n,l(255*this.a)]:[t,r,n]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}h.prototype.declaredClass="esri.Color",n=h||(h={}),(i=n.AlphaMode||(n.AlphaMode={}))[i.ALWAYS=0]="ALWAYS",i[i.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const p=h},88669:(e,t,r)=>{function n(){return[0,0,0,0]}function i(e,t,r,n){return[e,t,r,n]}function o(e,t){return new Float64Array(e,t,4)}function s(){return i(1,1,1,1)}function a(){return i(1,0,0,0)}function l(){return i(0,1,0,0)}function u(){return i(0,0,1,0)}function c(){return i(0,0,0,1)}r.d(t,{a:()=>o,c:()=>n,f:()=>i});const h=s(),p=a(),d=l(),m=u(),y=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:y,UNIT_X:p,UNIT_Y:d,UNIT_Z:m,ZEROS:[0,0,0,0],clone:function(e){return[e[0],e[1],e[2],e[3]]},create:n,createView:o,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},fromValues:i,ones:s,unitW:c,unitX:a,unitY:l,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>l,St:()=>i,VL:()=>s,h$:()=>o,rW:()=>u});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i(e){return!!n[e]||!!n[e.toLowerCase()]}function o(e){return n[e]??n[e.toLowerCase()]}function s(e){return[...o(e)]}function a(e,t,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?e+(t-e)*n:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,n=1){const i=(e%360+360)%360/360,o=r<=.5?r*(t+1):r+t-r*t,s=2*r-o;return[Math.round(255*a(s,o,i+1/3)),Math.round(255*a(s,o,i)),Math.round(255*a(s,o,i-1/3)),n]}function u(e){const t=e.length>5,r=t?8:4,n=(1<<r)-1,i=t?1:17,o=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return o&&(l=s&n,s>>=r,a[3]=i*l/255),l=s&n,s>>=r,a[2]=i*l,l=s&n,s>>=r,a[1]=i*l,l=s&n,s>>=r,a[0]=i*l,a}},90578:(e,t,r)=>{r.d(t,{p:()=>l});var n=r(75215),i=r(7628);const o=Object.prototype.toString;function s(e){const t="__accessorMetadata__"in e?(0,n.se)(e):e;return function(...e){if(e.push(t),"number"==typeof e[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,e)}}function a(e,t,r,n){(0,i.Oe)(e,t).cast=n}function l(...e){if(3!==e.length||"string"!=typeof e[1])return 1===e.length&&"[object Function]"===o.call(e[0])?s(e[0]):1===e.length&&"string"==typeof e[0]?function(e){return(t,r)=>{(0,i.Oe)(t,e).cast=t[r]}}(e[0]):void 0}},36030:(e,t,r)=>{r.d(t,{J:()=>o});var n=r(35454),i=r(5600);function o(e,t={}){const r=e instanceof n.X?e:new n.X(e,t),o={type:t?.ignoreUnknown??1?r.apiValues:String,json:{type:r.jsonValues,read:!t?.readOnly&&{reader:r.read},write:{writer:r.write}}};return void 0!==t?.readOnly&&(o.readOnly=!!t.readOnly),void 0!==t?.default&&(o.json.default=t.default),void 0!==t?.name&&(o.json.name=t.name),void 0!==t?.nonNullable&&(o.nonNullable=t.nonNullable),(0,i.Cb)(o)}},71715:(e,t,r)=>{r.d(t,{r:()=>i});var n=r(5600);function i(e,t,r){let i,o;return void 0===t||Array.isArray(t)?(o=e,r=t,i=[void 0]):(o=t,i=Array.isArray(e)?e:[e]),(e,t)=>{const s=e.constructor.prototype;i.forEach((i=>{const a=(0,n.CJ)(e,i,o);a.read&&"object"==typeof a.read||(a.read={}),a.read.reader=s[t],r&&(a.read.source=(a.read.source||[]).concat(r))}))}}},10661:(e,t,r)=>{r.d(t,{s:()=>i});var n=r(42100);class i extends n.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},66577:(e,t,r)=>{r.d(t,{qM:()=>c});var n=r(75215),i=r(6570),o=r(9361),s=r(65091),a=r(94139),l=r(38913),u=r(58901);r(82971),r(86973),r(33955);const c={base:o.Z,key:"type",typeMap:{extent:i.Z,multipoint:s.Z,point:a.Z,polyline:u.Z,polygon:l.Z}};(0,n.N7)(c)},9361:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),i=r(96674),o=r(5600),s=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),l=r(82971);let u=class extends i.wq{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=l.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,t){if(e instanceof l.Z)return e;if(null!=e){const r=new l.Z;return r.read(e,t),r}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,t){this.cache[e]=t}};(0,n._)([(0,o.Cb)()],u.prototype,"type",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],u.prototype,"cache",null),(0,n._)([(0,o.Cb)({readOnly:!0})],u.prototype,"extent",null),(0,n._)([(0,o.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasM",void 0),(0,n._)([(0,o.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasZ",void 0),(0,n._)([(0,o.Cb)({type:l.Z,json:{write:!0},value:l.Z.WGS84})],u.prototype,"spatialReference",void 0),(0,n._)([(0,s.r)("spatialReference")],u.prototype,"readSpatialReference",null),u=(0,n._)([(0,a.j)("esri.geometry.Geometry")],u);const c=u},94139:(e,t,r)=>{r.d(t,{Z:()=>v});var n,i=r(43697),o=r(92604),s=r(5600),a=r(90578),l=(r(67676),r(80442),r(71715)),u=r(52011),c=r(30556),h=r(75215),p=r(9361),d=r(82971),m=r(8744),y=r(40488);const f=[0,0];function g(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}let b=n=class extends p.Z{static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const r=e._get("spatialReference");t._set("spatialReference",Object.isFrozen(r)?r:r.clone())}constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(e,t,r,n,i){let s;if(Array.isArray(e))s=e,i=t,e=s[0],t=s[1],r=s[2],n=s[3];else if(e&&"object"==typeof e){if(s=e,e=null!=s.x?s.x:s.longitude,t=null!=s.y?s.y:s.latitude,r=s.z,n=s.m,(i=s.spatialReference)&&"esri.geometry.SpatialReference"!==i.declaredClass&&(i=new d.Z(i)),null!=s.longitude||null!=s.latitude)if(null==s.longitude)o.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==s.latitude)o.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!s.declaredClass&&i&&i.isWebMercator){const r=(0,y.hG)(s.longitude,s.latitude,f);e=r[0],t=r[1]}}else g(r)?(i=r,r=null):g(n)&&(i=n,n=null);const a={x:e,y:t};return null==a.x&&null!=a.y?o.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&o.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=i&&(a.spatialReference=i),null!=r&&(a.z=r),null!=n&&(a.m=n),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(e){e!==(void 0!==this._get("m"))&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return void 0!==this.z}set hasZ(e){e!==(void 0!==this._get("z"))&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){const{spatialReference:e,x:t,y:r}=this;if(e){if(e.isWebMercator)return(0,y.R6)(t,r,f)[1];if(e.isGeographic)return r}return null}set latitude(e){const{spatialReference:t,x:r}=this;null!=e&&t&&(t.isWebMercator?this._set("y",(0,y.hG)(r,e,f)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){const{x:e,y:t,spatialReference:r}=this;if(r){if(r.isWebMercator)return(0,y.R6)(e,t,f)[0];if(r.isGeographic)return e}return null}set longitude(e){const{y:t,spatialReference:r}=this;null!=e&&r&&(r.isWebMercator?this._set("x",(0,y.hG)(e,t,f)[0]):r.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,r){t[r]=isNaN(e)?"NaN":e}readX(e){return"string"==typeof e?NaN:e}clone(){const e=new n;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return n.copy(e,this),this}equals(e){if(null==e)return!1;const{x:t,y:r,z:n,m:i,spatialReference:o}=this,{z:s,m:a}=e;let{x:l,y:u,spatialReference:c}=e;if(!o.equals(c))if(o.isWebMercator&&c.isWGS84)[l,u]=(0,y.hG)(l,u),c=o;else{if(!o.isWGS84||!c.isWebMercator)return!1;[l,u]=(0,y.R6)(l,u),c=o}return t===l&&r===u&&n===s&&i===a&&o.wkid===c.wkid}offset(e,t,r){return this.x+=e,this.y+=t,null!=r&&(this.z=(this.z??0)+r),this}normalize(){if(!this.spatialReference)return this;const e=(0,m.C5)(this.spatialReference);if(!e)return this;let t=this.x;const[r,n]=e.valid,i=2*n;let o;return t>n?(o=Math.ceil(Math.abs(t-n)/i),t-=o*i):t<r&&(o=Math.ceil(Math.abs(t-r)/i),t+=o*i),this._set("x",t),this}distance(e){return function(e,t){const r=e.x-t.x,n=e.y-t.y,i=e.hasZ&&t.hasZ?e.z-t.z:0;return Math.sqrt(r*r+n*n+i*i)}(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};(0,i._)([(0,s.Cb)({readOnly:!0})],b.prototype,"cache",null),(0,i._)([(0,s.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasM",null),(0,i._)([(0,s.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasZ",null),(0,i._)([(0,s.Cb)({type:Number})],b.prototype,"latitude",null),(0,i._)([(0,s.Cb)({type:Number})],b.prototype,"longitude",null),(0,i._)([(0,s.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,a.p)((e=>isNaN(e)?e:(0,h.q9)(e)))],b.prototype,"x",void 0),(0,i._)([(0,c.c)("x")],b.prototype,"writeX",null),(0,i._)([(0,l.r)("x")],b.prototype,"readX",null),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],b.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],b.prototype,"z",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],b.prototype,"m",void 0),b=n=(0,i._)([(0,u.j)("esri.geometry.Point")],b),b.prototype.toJSON.isDefaultToJSON=!0;const v=b},62155:(e,t,r)=>{var n;r.d(t,{R:()=>n}),function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(n||(n={}))},33955:(e,t,r)=>{r.d(t,{Ji:()=>y,YX:()=>u,aW:()=>c,im:()=>m,l9:()=>p,oU:()=>d,q9:()=>g,wp:()=>h});var n=r(6570),i=r(9361),o=r(65091),s=r(94139),a=r(38913),l=r(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function h(e){return void 0!==e.x&&void 0!==e.y}function p(e){return void 0!==e.paths}function d(e){return void 0!==e.rings}function m(e){return null==e?null:e instanceof i.Z?e:h(e)?s.Z.fromJSON(e):p(e)?l.Z.fromJSON(e):d(e)?a.Z.fromJSON(e):c(e)?o.Z.fromJSON(e):u(e)?n.Z.fromJSON(e):null}function y(e){return e?h(e)?"esriGeometryPoint":p(e)?"esriGeometryPolyline":d(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const f={esriGeometryPoint:s.Z,esriGeometryPolyline:l.Z,esriGeometryPolygon:a.Z,esriGeometryEnvelope:n.Z,esriGeometryMultipoint:o.Z};function g(e){return e&&f[e]||null}},86973:(e,t,r)=>{r.d(t,{M:()=>i,P:()=>o});var n=r(35454);const i=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),o=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},40488:(e,t,r)=>{r.d(t,{$:()=>v,Q8:()=>y,R6:()=>b,Sx:()=>w,hG:()=>g,iV:()=>f,mZ:()=>h});var n=r(22974),i=r(82971),o=r(68441),s=r(8744);const a=57.29577951308232,l=.017453292519943;function u(e){return e*a}function c(e){return e*l}function h(e){return Math.PI/2-2*Math.atan(Math.exp(-e/o.sv.radius))}function p(e){return null!=e.wkid||null!=e.wkt}const d=[0,0];function m(e,t,r,n,i){const o=e,s=i;if(s.spatialReference=r,"x"in o&&"x"in s)[s.x,s.y]=t(o.x,o.y,d,n);else if("xmin"in o&&"xmin"in s)[s.xmin,s.ymin]=t(o.xmin,o.ymin,d,n),[s.xmax,s.ymax]=t(o.xmax,o.ymax,d,n);else if("paths"in o&&"paths"in s||"rings"in o&&"rings"in s){const e="paths"in o?o.paths:o.rings,r=[];let i;for(let o=0;o<e.length;o++){const s=e[o];i=[],r.push(i);for(let e=0;e<s.length;e++)i.push(t(s[e][0],s[e][1],[0,0],n)),s[e].length>2&&i[e].push(s[e][2]),s[e].length>3&&i[e].push(s[e][3])}"paths"in s?s.paths=r:s.rings=r}else if("points"in o&&"points"in s){const e=o.points,r=[];for(let i=0;i<e.length;i++)r[i]=t(e[i][0],e[i][1],[0,0],n),e[i].length>2&&r[i].push(e[i][2]),e[i].length>3&&r[i].push(e[i][3]);s.points=r}return i}function y(e,t){const r=e&&(p(e)?e:e.spatialReference),n=t&&(p(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!r||!n)&&(!!(0,s.fS)(n,r)||(0,s.sS)(n)&&(0,s.oR)(r)||(0,s.sS)(r)&&(0,s.oR)(n))}function f(e,t){if(null==e)return null;const r=e.spatialReference,o=t&&(p(t)?t:t.spatialReference);return y(r,o)?(0,s.fS)(r,o)?(0,n.d9)(e):(0,s.sS)(o)?m(e,g,i.Z.WebMercator,!1,(0,n.d9)(e)):(0,s.oR)(o)?m(e,b,i.Z.WGS84,!1,(0,n.d9)(e)):null:null}function g(e,t,r=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const n=c(t);return r[0]=c(e)*o.sv.radius,r[1]=o.sv.halfSemiMajorAxis*Math.log((1+Math.sin(n))/(1-Math.sin(n))),r}function b(e,t,r=[0,0],n=!1){const i=u(e/o.sv.radius);return r[0]=n?i:i-360*Math.floor((i+180)/360),r[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/o.sv.radius))),r}function v(e,t=!1,r=(0,n.d9)(e)){return m(e,g,i.Z.WebMercator,t,r)}function w(e,t=!1,r=(0,n.d9)(e)){return m(e,b,i.Z.WGS84,t,r)}},61576:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f}),r(66577);var n=r(18571),i=r(5847),o=r(75993),s=r(55914),a=r(5154),l=r(73506),u=r(15612),c=r(80676),h=r(87521),p=r(72758),d=r(23808),m=r(6570),y=r(94139);class f{convertVectorFieldData(e){const t=i.Z.fromJSON(e.pixelBlock),r=(0,c.KC)(t,e.type);return Promise.resolve(null!=r?r.toJSON():null)}computeStatisticsHistograms(e){const t=i.Z.fromJSON(e.pixelBlock),r=(0,u.js)(t);return Promise.resolve(r)}async decode(e){const t=await(0,o.J)(e.data,e.options);return t&&t.toJSON()}symbolize(e){e.pixelBlock=i.Z.fromJSON(e.pixelBlock),e.extent=e.extent?m.Z.fromJSON(e.extent):null;const t=this.symbolizer.symbolize(e);return Promise.resolve(null!=t?t.toJSON():null)}async updateSymbolizer(e){this.symbolizer=p.Z.fromJSON(e.symbolizerJSON),e.histograms&&"rasterStretch"===this.symbolizer?.rendererJSON.type&&(this.symbolizer.rendererJSON.histograms=e.histograms)}async updateRasterFunction(e){this.rasterFunction=(0,a.Ue)(e.rasterFunctionJSON)}async process(e){const t=this.rasterFunction.process({extent:m.Z.fromJSON(e.extent),primaryPixelBlocks:e.primaryPixelBlocks.map((e=>null!=e?i.Z.fromJSON(e):null)),primaryPixelSizes:e.primaryPixelSizes?.map((e=>null!=e?y.Z.fromJSON(e):null)),primaryRasterIds:e.primaryRasterIds});return null!=t?t.toJSON():null}stretch(e){const t=this.symbolizer.simpleStretch(i.Z.fromJSON(e.srcPixelBlock),e.stretchParams);return Promise.resolve(t?.toJSON())}estimateStatisticsHistograms(e){const t=(0,u.Hv)(i.Z.fromJSON(e.srcPixelBlock));return Promise.resolve(t)}split(e){const t=(0,s.Vl)(i.Z.fromJSON(e.srcPixelBlock),e.tileSize,e.maximumPyramidLevel);return t&&t.forEach(((e,r)=>{t.set(r,e?.toJSON())})),Promise.resolve(t)}async mosaicAndTransform(e){const t=e.srcPixelBlocks.map((e=>e?new i.Z(e):null)),r=(0,s.us)(t,e.srcMosaicSize,{blockWidths:e.blockWidths,alignmentInfo:e.alignmentInfo,clipOffset:e.clipOffset,clipSize:e.clipSize});let n,o=r;return e.coefs&&(o=(0,s.Uk)(r,e.destDimension,e.coefs,e.sampleSpacing,e.interpolation)),e.projectDirections&&e.gcsGrid&&(n=(0,s.Qh)(e.destDimension,e.gcsGrid),o=(0,c.xQ)(o,e.isUV?"vector-uv":"vector-magdir",n)),{pixelBlock:o?.toJSON(),localNorthDirections:n}}async createFlowMesh(e,t){const r={data:new Float32Array(e.flowData.buffer),mask:new Uint8Array(e.flowData.maskBuffer),width:e.flowData.width,height:e.flowData.height},{vertexData:n,indexData:i}=await(0,d.GE)(e.meshType,e.simulationSettings,r,t.signal);return{result:{vertexBuffer:n.buffer,indexBuffer:i.buffer},transferList:[n.buffer,i.buffer]}}async getProjectionOffsetGrid(e){const t=m.Z.fromJSON(e.projectedExtent),r=m.Z.fromJSON(e.srcBufferExtent);let i=null;e.datumTransformationSteps&&(i=new n.Z({steps:e.datumTransformationSteps})),(e.includeGCSGrid||(0,l.Mk)(t.spatialReference,r.spatialReference,i))&&await(0,l.zD)();const o=e.rasterTransform?(0,h.c)(e.rasterTransform):null;return(0,l.Qp)({...e,projectedExtent:t,srcBufferExtent:r,datumTransformation:i,rasterTransform:o})}}},98046:(e,t,r)=>{r.d(t,{Z:()=>d});var n,i=r(43697),o=r(22303),s=r(22974),a=r(5600),l=r(75215),u=r(36030),c=r(52011),h=r(899);let p=n=class extends h.Z{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new n({fromColor:(0,s.d9)(this.fromColor),toColor:(0,s.d9)(this.toColor),algorithm:this.algorithm})}};(0,i._)([(0,u.J)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],p.prototype,"algorithm",void 0),(0,i._)([(0,a.Cb)({type:o.Z,json:{type:[l.z8],write:!0}})],p.prototype,"fromColor",void 0),(0,i._)([(0,a.Cb)({type:o.Z,json:{type:[l.z8],write:!0}})],p.prototype,"toColor",void 0),(0,i._)([(0,a.Cb)({type:["algorithmic"]})],p.prototype,"type",void 0),p=n=(0,i._)([(0,c.j)("esri.rest.support.AlgorithmicColorRamp")],p);const d=p},899:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(43697),i=r(96674),o=r(5600),s=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(e){super(e),this.type=null}};(0,n._)([(0,o.Cb)({readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,n._)([(0,s.j)("esri.rest.support.ColorRamp")],a);const l=a},1515:(e,t,r)=>{r.d(t,{Z:()=>h});var n,i=r(43697),o=r(22974),s=r(5600),a=(r(75215),r(52011)),l=r(98046),u=r(899);let c=n=class extends u.Z{constructor(e){super(e),this.colorRamps=null,this.type="multipart"}clone(){return new n({colorRamps:(0,o.d9)(this.colorRamps)})}};(0,i._)([(0,s.Cb)({type:[l.Z],json:{write:!0}})],c.prototype,"colorRamps",void 0),(0,i._)([(0,s.Cb)({type:["multipart"]})],c.prototype,"type",void 0),c=n=(0,i._)([(0,a.j)("esri.rest.support.MultipartColorRamp")],c);const h=c},94593:(e,t,r)=>{r.d(t,{V:()=>s,i:()=>a});var n=r(98046),i=r(899),o=r(1515);const s={key:"type",base:i.Z,typeMap:{algorithmic:n.Z,multipart:o.Z}};function a(e){return e?.type?"algorithmic"===e.type?n.Z.fromJSON(e):"multipart"===e.type?o.Z.fromJSON(e):null:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4697],{65845:(e,t,r)=>{r.d(t,{D:()=>i});var a=r(81153);function i(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},64697:(e,t,r)=>{r.d(t,{save:()=>c,saveAs:()=>d});var a=r(64383),i=r(14661);const n="Image Service",o="imagery-layer-save",l="imagery-layer-save-as",s="imagery-tile-layer-save",p="imagery-tile-layer-save-as";function u(e){if("imagery"===e.type)return{isValid:!0};const{raster:t}=e,r="Function"===t?.datasetFormat?t.primaryRasters?.rasters[0]:t;return{isValid:"RasterTileServer"===r?.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType),errorMessage:"imagery tile layer should be created from a tiled image service."}}function y(e){const t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function m(e,t){const{parsedUrl:r,title:a,fullExtent:n}=e;t.url=r.path,t.title||=a,t.extent=await(0,i.$o)(n),"imagery-tile"===e.type&&(0,i.qj)(t,i.Kz.TILED_IMAGERY)}async function c(e,t){const r="imagery"===e.type?o:s;return(0,a.a1)({layer:e,itemType:n,validateLayer:u,createItemData:y,errorNamePrefix:r},t)}async function d(e,t,r){const i="imagery"===e.type?l:p;return(0,a.po)({layer:e,itemType:n,validateLayer:u,createItemData:y,errorNamePrefix:i,newItem:t,setItemProperties:m},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>g,po:()=>v});var a=r(20102),i=r(65845),n=r(48522),o=r(15235),l=r(33516),s=r(14661),p=r(14769);async function u(e){const{layer:t,errorNamePrefix:r,validateLayer:i}=e;await t.load(),function(e,t,r){const i=r(e);if(!i.isValid)throw new a.Z(`${t}:invalid-parameters`,i.errorMessage,{layer:e})}(t,r,i)}function y(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function m(e,t,r,i){if(e.type!==r)throw new a.Z(`${t}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:e,layer:i})}function c(e,t,r){const{portalItem:i}=e;if(!i)throw new a.Z(`${t}:portal-item-not-set`,y(e,"requires the portalItem property to be set"));if(!i.loaded)throw new a.Z(`${t}:portal-item-not-loaded`,y(e,"cannot be saved to a portal item that does not exist or is inaccessible"));(0,p.w)(i),m(i,t,r,e)}function d(e,t,r,a){let i=o.default.from(e);return i.id&&(i=i.clone(),i.id=null),i.type??=r,i.portal??=n.Z.getDefault(),(0,p.w)(i),m(i,t,r,a),i}async function f(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const i=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),i}function w(e){(0,s.qj)(e,s.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t){const{layer:r,createItemData:a,errorNamePrefix:n,itemType:o}=e;await u(e),c(r,n,o);const s=r.portalItem,p=(0,l.Y)(s),y=await f(r,p,t),m=await a({layer:r,layerJSON:y},s);return w(s),await s.update({data:m}),(0,i.D)(p),s}async function v(e,t){const{layer:r,createItemData:a,setItemProperties:n,newItem:o,errorNamePrefix:s,itemType:p}=e;await u(e);const y=d(o,s,p,r),m=(0,l.Y)(y),c=await f(r,m,t),g=await a({layer:r,layerJSON:c},y);return await n(r,y),w(y),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(y,g,t),r.portalItem=y,(0,i.D)(m),y}},33516:(e,t,r)=>{r.d(t,{Y:()=>o,h:()=>n});var a=r(17452),i=r(48522);function n(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||i.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||i.Z.getDefault(),portalItem:e}}},14769:(e,t,r)=>{r.d(t,{w:()=>o});var a=r(68773),i=r(20102),n=r(71058);function o(e){if(a.default.apiKey&&(0,n.r)(e.portal.url))throw new i.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8767],{48853:(e,t,s)=>{s.d(t,{Qn:()=>d,iG:()=>u});var i,n=s(19153),r=s(1542),o=s(17126);(i||(i={})).TimeZoneNotRecognized="TimeZoneNotRecognized";const a={[i.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."};class h extends Error{constructor(e,t){super((0,n.gx)(a[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,h)}}function c(e,t,s){return e<t?e-t:e>s?e-s:0}function l(e,t,s){return e<t?t:e>s?s:e}class u{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,s=1,i=0,n=0,r=0,a=0,h){if(isNaN(e)||isNaN(t)||isNaN(s)||isNaN(i)||isNaN(n)||isNaN(r)||isNaN(a))return null;const m=o.ou.local(e,t).daysInMonth;let f=o.ou.fromObject({day:l(s,1,m),year:e,month:l(t,1,12),hour:l(i,0,23),minute:l(n,0,59),second:l(r,0,59),millisecond:l(a,0,999)},{zone:d(h)});return f=f.plus({months:c(t,1,12),days:c(s,1,m),hours:c(i,0,23),minutes:c(n,0,59),seconds:c(r,0,59),milliseconds:c(a,0,999)}),new u(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){const s=d(t);return e.isUnknownTimeZone||s===r.yV.instance?u.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,s):new u(e._date.setZone(s))}static dateJSToArcadeDate(e){return new u(o.ou.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){const s=d(t);return new u(o.ou.fromJSDate(e,{zone:s}))}static unknownEpochToArcadeDate(e){return new u(o.ou.fromMillis(e,{zone:r.yV.instance}))}static unknownDateJSToArcadeDate(e){return new u(o.ou.fromMillis(e.getTime(),{zone:r.yV.instance}))}static epochToArcadeDate(e,t="system"){const s=d(t);return new u(o.ou.fromMillis(e,{zone:s}))}static dateTimeToArcadeDate(e){return new u(e)}clone(){return new u(this._date)}changeTimeZone(e){const t=d(e);return u.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){const s=d(t);return e.zone===r.yV.instance||s===r.yV.instance?u.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,s):new u(e.setZone(s))}static nowToArcadeDate(e){const t=d(e);return new u(o.ou.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new u(o.ou.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===u.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===r.yV.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 u(this._date.plus(e))}diff(e,t="milliseconds"){return this._date.diff(e._date,t)[t]}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!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 u(this._date.toUTC())}toLocal(){return new u(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;const t=o.ou.fromISO(e,{setZone:!0});return new u(t)}}function d(e,t=!0){if(e instanceof o.ld)return e;if("system"===e.toLowerCase())return"system";if("utc"===e.toLowerCase())return"UTC";if("unknown"===e.toLowerCase())return r.yV.instance;if(/^[\+\-]?[0-9]{1,2}([:][0-9]{2})?$/.test(e)){const t=o.Qf.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}const s=o.vF.create(e);if(!s.isValid){if(t)throw new h(i.TimeZoneNotRecognized);return null}return s}},77286:(e,t,s)=>{s.d(t,{EI:()=>n,Lz:()=>o,SV:()=>r,U:()=>h,r1:()=>a});var i=s(6570);function n(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 r(e){if(null==e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new i.Z({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function o(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 a(e){if(null==e)return null;const t=e.clone();return void 0!==e.cache._geVersion&&(t.cache._geVersion=e.cache._geVersion),t}function h(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}},46791:(e,t,s)=>{s.d(t,{Z:()=>A});var i,n=s(43697),r=s(3894),o=s(32448),a=s(50758),h=s(22974),c=s(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var l,u=s(1654),d=s(75215),m=s(58971),f=s(5600),_=s(52421),g=s(52011),p=s(10661);class y{constructor(e,t,s,i,n){this.target=e,this.added=t,this.removed=s,this.start=i,this.deleteCount=n}}const b=new c.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function v(e){return e?e instanceof C?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function S(e){if(e?.length)return e[0]}function x(e,t,s,i){const n=Math.min(e.length-s,t.length-i);let r=0;for(;r<n&&e[s+r]===t[i+r];)r++;return r}function T(e,t,s,i){t&&t.forEach(((t,n,r)=>{e.push(t),T(e,s.call(i,t,n,r),s,i)}))}const w=new Set,I=new Set,M=new Set,E=new Map;let D=0,C=l=class extends o.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof l}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new p.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:D++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof l?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,m.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,a.kB)((()=>{s.removed=!0,e.splice(e.indexOf(s),1)}))}return this._emitter.on(e,t)}once(e,t){const s="deref"in t?()=>t.deref():()=>t,i=this.on(e,(e=>{s()?.call(null,e),i.remove()}));return i}add(e,t){if((0,m.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,m.it)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,v(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,m.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.map(h.d9)})}concat(...e){(0,m.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=this._splice(0,this.length),n=s.length;for(let i=0;i<n;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,m.it)(this._observable),this._items.every(e,t)}filter(e,t){let s;return(0,m.it)(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return(0,m.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,m.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,m.it)(this._observable);const s=[];return T(s,this,e,t),new l(s)}forEach(e,t){return(0,m.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,m.it)(this._observable),this._items[e]}getNextIndex(e){(0,m.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,m.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,m.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,m.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,m.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,m.it)(this._observable);const s=this._items.map(e,t);return new l({items:s})}reorder(e,t=this.length-1){(0,m.it)(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=S(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,m.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,m.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,m.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,m.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,m.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=S(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,m.it)(this._observable),!e?.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof l?e.toArray():e,s=this._items,n=[],r=t.length;for(let e=0;e<r;e++){const i=t[e],r=s.indexOf(i);if(r>-1){const i=1+x(t,s,e+1,r+1),o=this._splice(r,i);o&&o.length>0&&n.push.apply(n,o),e+=i-1}}return this._emitAfterChanges(i.REMOVE),n}reverse(){if((0,m.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=S(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,m.it)(this._observable),this._items.some(e,t)}sort(e){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...s){(0,m.it)(this._observable);const n=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(e,t,s)||[];return this._emitAfterChanges(n),r}toArray(){return(0,m.it)(this._observable),this._items.slice()}toJSON(){return(0,m.it)(this._observable),this.toArray()}toLocaleString(){return(0,m.it)(this._observable),this._items.toLocaleString()}toString(){return(0,m.it)(this._observable),this._items.toString()}unshift(...e){return(0,m.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(o=i.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let s=0,n=o.length;s<n;s++)r=o[s],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(s,1),i.splice(e,0,r),e+=1,s-=1,n-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let s=0;s<t;s++)e.reset(o[s]),this.emit("after-remove",e);b.release(e)}}if(s?.length){if(n){const e=[];for(const t of s){const s=n.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=e===this.length;if(t||r){const n=b.acquire();n.target=this,n.cancellable=!0;const a=b.acquire();a.target=this,a.cancellable=!1;for(const h of s)t?(n.reset(h),this.emit("before-add",n),n.defaultPrevented||(o?i.push(h):i.splice(e++,0,h),this._set("length",i.length),r&&(a.reset(h),this.emit("after-add",a)))):(o?i.push(h):i.splice(e++,0,h),this._set("length",i.length),a.reset(h),this.emit("after-add",a));b.release(a),b.release(n)}else{if(o)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}if((s?.length||o?.length)&&this._notifyChangeEvent(s,o),this.hasEventListener("after-splice")){const i=new y(this,s,o,e,t);this.emit("after-splice",i)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=b.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,b.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;w.clear(),I.clear(),M.clear();for(const{added:t,removed:s}of e){if(t)if(0===M.size&&0===I.size)for(const e of t)w.add(e);else for(const e of t)I.has(e)?(M.add(e),I.delete(e)):M.has(e)||w.add(e);if(s)if(0===M.size&&0===w.size)for(const e of s)I.add(e);else for(const e of s)w.has(e)?w.delete(e):(M.delete(e),I.add(e))}const s=r.Z.acquire();w.forEach((e=>{s.push(e)}));const i=r.Z.acquire();I.forEach((e=>{i.push(e)}));const n=this._items,o=t.items,a=r.Z.acquire();if(M.forEach((e=>{o.indexOf(e)!==n.indexOf(e)&&a.push(e)})),t.listeners&&(s.length||i.length||a.length)){const e={target:this,added:s,removed:i,moved:a},n=t.listeners.length;for(let s=0;s<n;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}r.Z.release(s),r.Z.release(i),r.Z.release(a)}w.clear(),I.clear(),M.clear()}};C.ofType=e=>{if(!e)return l;if(E.has(e))return E.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const s in e.typeMap){const i=e.typeMap[s].prototype.declaredClass;t?t+=` | ${i}`:t=i}let s=class extends l{};return(0,n._)([(0,_.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],s.prototype,"itemType",void 0),s=(0,n._)([(0,g.j)(`esri.core.Collection<${t}>`)],s),E.set(e,s),s},(0,n._)([(0,f.Cb)()],C.prototype,"length",void 0),(0,n._)([(0,f.Cb)()],C.prototype,"items",null),C=l=(0,n._)([(0,g.j)("esri.core.Collection")],C);const A=C},32448:(e,t,s)=>{s.d(t,{Z:()=>h});var i=s(43697),n=s(92036),r=s(50758),o=s(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){let s=this._listenersMap?.get(e);if(!s)return!1;const i=this._target||this;let n=!1;for(const e of s.slice()){const s="deref"in e?e.deref():e;s?s?.call(i,t):n=!0}return n&&(s=s.filter((e=>!("deref"in e)||null!=e.deref())),this._listenersMap.set(e,s)),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,r.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),(0,r.kB)((()=>{const s=this._listenersMap?.get(e),i=s?.indexOf(t)??-1;i>=0&&s.splice(i,1)}))}once(e,t){const s=this.on(e,(e=>{s.remove();const i="deref"in t?t.deref():t;i?.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap?.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,o.j)("esri.core.Evented")],s),s};let s=class extends n.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,o.j)("esri.core.Evented")],s),e.EventedAccessor=s}(a||(a={}));const h=a},13867:(e,t,s)=>{s.d(t,{z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=h+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return void console.warn(`Refusing to cache entry with size ${n} for key ${t}`);const a=1+Math.max(r,-3)- -3;this._db.set(t,{entry:s,size:n,lifetime:a,lives:a}),this._size+=n,e.size+=n,this._checkSizeLimits()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,s]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,s,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let h=0},52421:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{c:()=>i})},24133:(e,t,s)=>{s.d(t,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(e=9,t){this._compareMinX=l,this._compareMinY=u,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),v.prune(),S.prune(),x.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(p(e,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;p(e,o)&&(s.leaf?t(r):g(e,o)?this._all(r,t):b.push(r))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!p(e,t))return!1;for(b.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(p(e,r)){if(t.leaf||g(e,r))return!0;b.push(n)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),x.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=x.pop()??0,o=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),x.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(v.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else v.pushArray(s.children);s=v.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new I(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new M([]);o.height=i;const h=Math.ceil(n/r),c=h*Math.ceil(Math.sqrt(r));y(e,t,s,c,this._compareMinX);for(let n=t;n<=s;n+=c){const t=Math.min(n+c-1,s);y(e,n,t,h,this._compareMinY);for(let s=n;s<=t;s+=h){const n=Math.min(s+h-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),h=f(e,o)-a;h<n?(n=h,i=a<i?a:i,s=o):h===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=this._chooseSubtree(n,this._data,t,S);for(r.children.push(e),c(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;this._adjustParentBBoxes(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),h=s.leaf?new I(o):new M(o);h.height=s.height,a(s,this._toBBox),a(h,this._toBBox),t?e.data[t-1].children.push(h):this._splitRoot(s,h)}_splitRoot(e,t){this._data=new M([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),c=_(t,a),l=d(t)+d(a);c<i?(i=c,r=o,n=l<n?l:n):c===i&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:l,n=e.leaf?this._compareMinY:u;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=m(r)+m(o);for(let i=t;i<s-t;i++){const t=e.children[i];c(r,e.leaf?n(t):t),a+=m(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];c(o,e.leaf?n(t):t),a+=m(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)c(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],c(n,e.leaf?i(r):r);return n}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function l(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function p(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const b=new n.Z,v=new n.Z,S=new n.Z,x=new n.Z({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class w extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class I extends w{constructor(e){super(),this.children=e,this.leaf=!0}}class M extends w{constructor(e){super(),this.children=e,this.leaf=!1}}},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>h,Z_:()=>_,gx:()=>c,nn:()=>g,on:()=>u,tX:()=>p}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function h(e,t,s={}){return l(e,t,s,m)}function c(e,t,s={}){return l(e,t,s,f)}function l(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function u(e,t,s,o={}){let a=null,c=null,l=null;function u(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function d(e){o.once&&o.once&&(0,r.hw)(l),s(e)}const m=h(e,((e,s)=>{u(),(0,i.vT)(e)&&(a=e,c=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return l=(0,n.kB)((()=>{m.remove(),u()})),l}function d(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function h(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{h(),r((0,o.zE)())})),l(e,(e=>{h(),i(e)}),{sync:!1,once:!0},t??m)])}))}(e,f,t)}function m(e){return!0}function f(e){return!!e}s(87538);const _={sync:!0},g={initial:!0},p={sync:!0,initial:!0}},22641:(e,t,s)=>{s.d(t,{u:()=>a});var i=s(48853),n=s(70171),r=s(17126);function o(e){e=e.replaceAll(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let t="";const s=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|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 a{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 a&&e.day===this.day&&e.month===this.month&&e.year===this.year}clone(){return new a(this._year,this._month,this._day)}toDateTime(e){return r.ou.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,i.Qn)(e)})}toDateTimeLuxon(e){return r.ou.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,i.Qn)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null){if(null===e||""===e)return this.toString();if(!(e=o(e)))return"";const t=this.toDateTime("unknown");return i.iG.dateTimeToArcadeDate(t).toFormat(e,{locale:(0,n.Kd)(),numberingSystem:"latn"})}toArcadeDate(){const e=this.toDateTime("unknown");return i.iG.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd")}toSQLValue(){return this.toFormat("yyyy-LL-dd")}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd")+"'"}plus(e,t){return a.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return r.ou.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=r.ou.fromMillis(e,{zone:r.Qf.utcInstance});return t.isValid?a.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){const t=r.ou.fromSeconds(e,{zone:r.Qf.utcInstance});return t.isValid?a.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 a(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}static fromParts(e,t,s){const i=new a(e,t,s);return!1===i.isValid?null:i}static fromDateJS(e){return a.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return a.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=o(t))&&s.push(t);else if(null===t||""===t){const t=r.ou.fromISO(e,{setZone:!0});return t.isValid?a.fromParts(t.year,t.month,t.day):null}for(const i of s){const s=r.ou.fromFormat(e,t??i);if(s.isValid)return new a(s.year,s.month,s.day)}return null}static fromNow(e="system"){const t=r.ou.fromJSDate(new Date).setZone((0,i.Qn)(e));return new a(t.year,t.month,t.day)}}},53970:(e,t,s)=>{s.d(t,{n:()=>a});var i=s(77286),n=s(70171),r=s(17126);function o(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 a{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 a&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new a(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,i.U)(this.hour)&&(0,i.U)(this.minute)&&(0,i.U)(this.second)&&(0,i.U)(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=o(e))?r.ou.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,n.Kd)(),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 n=new a(e,t,s,i);return n.isValid()?n:null}static fromReader(e){if(!e)return null;const t=e.split(":");return 3!==t.length?null:new a(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),n=Math.floor(e%1e3);return new a(i,s,t,n)}static fromDateJS(e){return new a(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new a(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=o(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=r.ou.fromFormat(e,t);if(s.isValid)return new a(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 a.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return r.ou.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}}}},1542:(e,t,s)=>{s.d(t,{A4:()=>r,L9:()=>o,Rw:()=>a,yV:()=>n});var i=s(17126);class n{}function r(e){return e instanceof i.ld?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return r(e)?n.instance:e}function a(e,t){return i.ou.fromObject({day:e.day,year:e.year,month:e.month,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond},{zone:t})}n.instance=new i.vF("Etc/UTC")},16306:(e,t,s)=>{s.d(t,{aX:()=>x});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),h=s(73913),c=s(8744),l=s(40488),u=(s(66577),s(3172)),d=s(33955),m=s(11282),f=s(17452);async function _(e,t,s){const i="string"==typeof e?(0,f.mN)(e):e,n=t[0].spatialReference,r=(0,d.Ji)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,c.B9)(n),geometries:JSON.stringify((h=t,{geometryType:(0,d.Ji)(h[0]),geometries:h.map((e=>e.toJSON()))}))}},{data:a}=await(0,u.Z)(i.path+"/simplify",o);var h;return function(e,t,s){const i=(0,d.q9)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=s,t}))}(a.geometries,r,n)}const g=r.Z.getLogger("esri.geometry.support.normalizeUtils");function p(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function b(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g.error(e),new n.Z(e)}const s=(0,h.x3)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],h=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),c=(a-r)/h,l=(o-n)/h,u=h/t;if(u>1){for(let e=1;e<=u-1;e++){const i=e*t,o=l*i+n,a=c*i+r;s.push([o,a])}const e=(h+Math.floor(u-1)*t)/2,i=l*e+n,o=c*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:i,spatialReference:e.spatialReference}):new a.Z({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,l.Sx)(t,!0)}return s&&(e=(0,h.Sy)(e,s)),e}function v(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,h.XZ)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,h.XZ)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,h.XZ)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,h.XZ)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function S(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,h.x3)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,h.XZ)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(p(e))for(const t of(0,h.x3)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,h.x3)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function x(e,t,s){if(!Array.isArray(e))return x([e],t);t&&"string"!=typeof t&&g.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.default.geometryServiceUrl;let r,f,p,y,T,w,I,M,E=0;const D=[],C=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,f=(0,c.C5)(r),p=r.isWebMercator,w=p?102100:4326,y=h.UZ[w].maxX,T=h.UZ[w].minX,I=h.UZ[w].plus180Line,M=h.UZ[w].minus180Line),f)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(v(t.clone(),y,T));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>v(e,y,T))),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,f);C.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,s=(0,h.XZ)(e.xmin,T)*(2*y);let i=0===s?t.clone():(0,h.Sy)(t.clone(),s);e.offset(s,0),e.intersects(I)&&e.xmax!==y?(E=e.xmax>E?e.xmax:E,i=b(i,p),D.push(i),C.push("cut")):e.intersects(M)&&e.xmin!==T?(E=e.xmax*(2*y)>E?e.xmax*(2*y):E,i=b(i,p,360),D.push(i),C.push("cut")):C.push(i)}else C.push(t.clone());else C.push(t);else C.push(t);let A=(0,h.XZ)(E,y),z=-90;const B=A,L=new a.Z;for(;A>0;){const e=360*A-180;L.addPath([[e,z],[e,-1*z]]),z*=-1,A--}if(D.length>0&&B>0){const t=S(D,await async function(e,t,s,i){const n=(0,m.en)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,c.B9)(r),target:JSON.stringify({geometryType:(0,d.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,u.Z)(n.path+"/cut",o),{cutIndexes:h,geometries:l=[]}=a.data;return{cutIndexes:h,geometries:l.map((e=>{const t=(0,d.im)(e);return t.spatialReference=r,t}))}}(n,D,L,s)),i=[],r=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(p?(0,l.$)(n):n)}}if(!i.length)return r;const o=await _(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(p?(0,l.$)(o.shift()):o.shift())}return a}const Z=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)Z.push(t);else{const e=D.shift();Z.push(!0===p?(0,l.$)(e):e)}}return Z}},73913:(e,t,s)=>{s.d(t,{Sy:()=>h,UZ:()=>o,XZ:()=>a,x3:()=>c});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){const s=c(e);for(const e of s)for(const s of e)s[0]+=t;return e}function c(e){return(0,r.oU)(e)?e.rings:e.paths}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},28972:(e,t,s)=>{s.d(t,{Z:()=>w});var i=s(67676),n=s(20102),r=s(32448),o=s(92604),a=s(60437),h=s(24470),c=s(98732),l=s(37549);function u(e,t){return e?t?4:3:t?3:2}function d(e,t,s,i,n){if(!t?.lengths.length)return null;const r="upperLeft"===n?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const o=e.coords,a=[],h=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:l}=t,d=u(s,i);let _=0;for(const e of c){const t=m(h,l,_,e,s,i,r);t&&a.push(t),_+=e*d}if(a.sort(((e,t)=>{let i=r*e[2]-r*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),a.length){let e=6*a[0][2];o[0]=a[0][0]/e,o[1]=a[0][1]/e,s&&(e=6*a[0][4],o[2]=0!==e?a[0][3]/e:0),(o[0]<h[0]||o[0]>h[1]||o[1]<h[2]||o[1]>h[3]||s&&(o[2]<h[4]||o[2]>h[5]))&&(o.length=0)}if(!o.length){const e=t.lengths[0]?f(l,0,c[0],s,i):null;if(!e)return null;o[0]=e[0],o[1]=e[1],s&&e.length>2&&(o[2]=e[2])}return e}function m(e,t,s,i,n,r,o=1){const a=u(n,r);let h=s,c=s+a,l=0,d=0,m=0,f=0,_=0;for(let s=0,r=i-1;s<r;s++,h+=a,c+=a){const s=t[h],i=t[h+1],r=t[h+2],o=t[c],a=t[c+1],u=t[c+2];let g=s*a-o*i;f+=g,l+=(s+o)*g,d+=(i+a)*g,n&&(g=s*u-o*r,m+=(r+u)*g,_+=g),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(f*o>0&&(f*=-1),_*o>0&&(_*=-1),!f)return null;const g=[l,d,.5*f];return n&&(g[3]=m,g[4]=.5*_),g}function f(e,t,s,i,n){const r=u(i,n);let o=t,a=t+r,h=0,c=0,l=0,d=0;for(let t=0,n=s-1;t<n;t++,o+=r,a+=r){const t=e[o],s=e[o+1],n=e[o+2],r=e[a],u=e[a+1],m=e[a+2],f=i?g(t,s,n,r,u,m):_(t,s,r,u);if(f)if(h+=f,i){const e=y(t,s,n,r,u,m);c+=f*e[0],l+=f*e[1],d+=f*e[2]}else{const e=p(t,s,r,u);c+=f*e[0],l+=f*e[1]}}return h>0?i?[c/h,l/h,d/h]:[c/h,l/h]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function _(e,t,s,i){const n=s-e,r=i-t;return Math.sqrt(n*n+r*r)}function g(e,t,s,i,n,r){const o=i-e,a=n-t,h=r-s;return Math.sqrt(o*o+a*a+h*h)}function p(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function y(e,t,s,i,n,r){return[e+.5*(i-e),t+.5*(n-t),s+.5*(r-s)]}var b=s(70272),v=s(5428);const S={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new b.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=d(new v.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var x=s(11490);const T=(0,a.Ue)();class w{constructor(e){this.geometryInfo=e,this._boundsStore=new l.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.Z,this.featureAdapter=S}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,x.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.pC)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(T,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,c.$)(null!=i?i:(0,h.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,c.$)((0,h.Ue)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},3922:(e,t,s)=>{s.r(t),s.d(t,{FeatureStore:()=>n.Z,QueryEngine:()=>i.q});var i=s(11028),n=s(28972)},11282:(e,t,s)=>{s.d(t,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.mN)(e):(0,i.d9)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let e=0;e<r.length;e++)i[n][e]=a(r[e])}else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(71058)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5286],{88764:(e,t,i)=>{i.d(t,{q:()=>o});var s,n,r,a=i(5732),l={exports:{}};s=l,n=function(){function e(i,s,n,r,a){for(;r>n;){if(r-n>600){var l=r-n+1,o=s-n+1,u=Math.log(l),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(l-c)/l)*(o-l/2<0?-1:1);e(i,s,Math.max(n,Math.floor(s-o*c/l+h)),Math.min(r,Math.floor(s+(l-o)*c/l+h)),a)}var d=i[s],f=n,m=r;for(t(i,n,s),a(i[r],d)>0&&t(i,n,r);f<m;){for(t(i,f,m),f++,m--;a(i[f],d)<0;)f++;for(;a(i[m],d)>0;)m--}0===a(i[n],d)?t(i,n,m):t(i,++m,r),m<=s&&(n=m+1),s<=m&&(r=m-1)}}function t(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function i(e,t){return e<t?-1:e>t?1:0}return function(t,s,n,r,a){e(t,s,n||0,r||t.length-1,a||i)}},void 0!==(r=n())&&(s.exports=r);const o=(0,a.g)(l.exports)},95528:(e,t,i)=>{i.d(t,{t:()=>l});var s=i(22974),n=i(58971),r=i(10661);class a{constructor(e,t){this._observable=new r.s,this._value=e,this._equalityFunction=t}get value(){return(0,n.it)(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=s.y7){return new a(e,t)}},82397:(e,t,i)=>{i.d(t,{G6:()=>p,Ie:()=>m,J9:()=>d,RF:()=>h,U1:()=>f,vY:()=>a}),i(33955);const s=(e,t,i)=>[t,i],n=(e,t,i)=>[t,i,e[2]],r=(e,t,i)=>[t,i,e[2],e[3]];function a(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function l({scale:e,translate:t},i){return i*e[0]+t[0]}function o({scale:e,translate:t},i){return t[1]-i*e[1]}function u(e,t,i){const s=new Array(i.length);if(!i.length)return s;const[n,r]=e.scale;let a=l(e,i[0][0]),u=o(e,i[0][1]);s[0]=t(i[0],a,u);for(let e=1;e<i.length;e++){const l=i[e];a+=l[0]*n,u-=l[1]*r,s[e]=t(l,a,u)}return s}function c(e,t,i){const s=new Array(i.length);for(let n=0;n<i.length;n++)s[n]=u(e,t,i[n]);return s}function h(e,t,i,s,n){return t.x=function({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}(e,i.x),t.y=function({scale:e,translate:t},i){return Math.round((t[1]-i)/e[1])}(e,i.y),t!==i&&(s&&(t.z=i.z),n&&(t.m=i.m)),t}function d(e,t,i,a,l){return null!=i&&(t.points=function(e,t,i,a){return u(e,i?a?r:n:a?n:s,t)}(e,i.points,a,l)),t}function f(e,t,i,s,n){return null==i||(t.x=l(e,i.x),t.y=o(e,i.y),t!==i&&(s&&(t.z=i.z),n&&(t.m=i.m))),t}function m(e,t,i,a,l){return null!=i&&(t.rings=function(e,t,i,a){return c(e,i?a?r:n:a?n:s,t)}(e,i.rings,a,l)),t}function p(e,t,i,a,l){return null!=i&&(t.paths=function(e,t,i,a){return c(e,i?a?r:n:a?n:s,t)}(e,i.paths,a,l)),t}},11028:(e,t,i)=>{i.d(t,{q:()=>Me});var s=i(67676),n=i(20102),r=i(96674),a=i(22974),l=i(70586),o=i(69801),u=i(95330),c=i(67900),h=i(73615),d=i(60437),f=i(24470),m=i(20322),p=i(33955),g=i(16306),y=i(8744),_=i(98732),x=i(35454),T=i(13867),S=i(8968);const I=new class{constructor(e,t){this._cache=new T.z(e),this._invalidCache=new T.z(t)}get(e,t){const i=`${t.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(void 0!==this._invalidCache.get(i))return null;try{const s=S.WhereClause.create(e,t);return this._cache.put(i,s),s}catch{return this._invalidCache.put(i,null),null}}}(50,500),E="feature-store:unsupported-query",R=" as ",F=new x.X({esriFieldTypeString:"string"}),b=new x.X({esriFieldTypeOID:"oid",esriFieldTypeSmallInteger:"small-integer",esriFieldTypeBigInteger:"big-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long"}),w=new x.X({esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),v=new x.X({esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id"}),A=new Set([...b.jsonValues,...w.jsonValues,...F.jsonValues,...v.jsonValues]),N=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...b.apiValues,...w.apiValues,...F.apiValues,...v.apiValues]);function C(e,t,i={}){const s=k(e,t);if(!s)throw new n.Z(E,"invalid SQL expression",{expression:e});const r=i.expressionName||"expression";if(i.validateStandardized&&!s.isStandardized)throw new n.Z(E,`${r} is not standard`,{expression:e});if(i.validateAggregate&&!s.isAggregate)throw new n.Z(E,`${r} does not contain a valid aggregate function`,{expression:e});return s.fieldNames}function V(e,t,i,s){if(!t)return!0;const r="having",a=C(t,e,{validateAggregate:!0,expressionName:r});D(e,a,{expressionName:r,query:s}),P(e,a,{expressionName:r,query:s});const l=I.get(t,e),o=l?.getExpressions().every((t=>{const{aggregateType:s,field:n}=t,r=e.get(n)?.name;return i.some((t=>{const{onStatisticField:i,statisticType:n}=t,a=e.get(i)?.name;return a===r&&n.toLowerCase().trim()===s}))}));if(!o)throw new n.Z(E,"expressions in having should also exist in outStatistics",{having:t});return!0}function k(e,t){return e?I.get(e,t):null}function D(e,t,i={}){i.errorMessage||(i.errorMessage=i.expressionName?`${i.expressionName} contains invalid fields`:"Fields are invalid"),O(e,t,((e,t)=>t.has(e)),i)}function P(e,t,i={}){i.errorMessage||(i.errorMessage=i.expressionName?`${i.expressionName} only supports ${N} field types`:`Only ${N} field types are supported`),O(e,t,((e,t)=>!L(e,t)),i)}function O(e,t,i,s={}){const r=s.verifyExpression??!0,a=[];for(const n of t){const t=i(n,e);if("*"!==n&&!t)if(r){const t=M(n);try{O(e,C(t,e,{validateStandardized:!0}),i,s)}catch(e){const t=e?.details;if(t?.expression)throw e;t?.invalidFields?a.push(...t.invalidFields):a.push(n)}}else a.push(n)}if(a.length)throw new n.Z(E,s.errorMessage,{invalidFields:a,query:s.query})}function M(e){return/\((.*?)\)/.test(e)?e:e.split(R)[0]}function L(e,t,i=A){const s=t.get(e);return!!s&&!i.has(s.type)}var G=i(37427),z=i(61159),Q=i(35308),q=i(49600),U=i(82397),B=i(11490),Z=i(24452),j=i(59266);class Y{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=M(t),n=this.fieldsIndex.get(s),r=n?null:k(s,i),a=n?n.name:t.split(R)[1]||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){const s=i?i.name:t;let n=null;return this._fieldDataCache.has(s)?n=this._fieldDataCache.get(s)?.clause:i||(n=k(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:n})),i?this.featureAdapter.getAttribute(e,s):n?.calculateValue(e,this.featureAdapter)}getDataValues(e,t){const i=t.normalizationType,s=t.normalizationTotal,n=this.fieldsIndex.isDateField(t.field);return e.map((e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,Z.wk)(r)}${t.fieldDelimiter}${(0,Z.wk)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,Z.wk)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):n&&"string"==typeof r&&(r=r?new Date(r).getTime():null),i&&Number.isFinite(r)){const n="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,Z.fk)(r,i,n,s)}return r}))}async getExpressionValues(e,t,i,s,n){const{arcadeUtils:r}=await(0,j.LC)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const l=r.createFunction(t),o=r.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,B.Op)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},c=r.createExecContext(t,o,n);return r.executeFunction(l,c)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:k(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:k(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:n}=this._fieldDataCache.get(s);i[t]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let n=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++n),n>1?null:e}}function H(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function $(e,t,i,s,n,r=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:n,draped:r}}var W=i(35671);class X{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new Y(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,n=t?.length;if(!n)return 1;const r=new Map,a=new Map,l=new Set;for(const n of s){const{statisticType:s}=n,o="exceedslimit"!==s?n.onStatisticField:void 0;if(!a.has(o)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,r);i.push(t)}a.set(o,this._calculateUniqueValues(i,e.returnDistinctValues))}const u=a.get(o);for(const t in u){const{data:s,items:n}=u[t],r=s.join(",");i&&!e.validateItems(n,i)||l.add(r)}}return l.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,y.JY)(this.query.outSR)&&!(0,y.fS)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,B.S2)({spatialReference:this.query.outSR,...(0,G.iV)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,B.S2)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const i=this.featureAdapter,s=K(this.hasZ,this.hasM),{point:n,mode:r}=e,a="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,o={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=this._getPointCreator(r,this.spatialReference,t),h=new ee(null,0),d=new ee(null,0),f={x:0,y:0,z:0};for(const t of this.items){const r=i.getGeometry(t);if(null==r)continue;const{coords:m,lengths:p}=r;if(h.coords=m,d.coords=m,e.returnEdge){let e=0;for(let r=0;r<p.length;r++){const u=p[r];for(let r=0;r<u;r++,e+=s){const m=h;if(m.coordsIndex=e,r!==u-1){const r=d;r.coordsIndex=e+s;const u=f;J(f,n,m,r);const h=(n.x-u.x)/a,p=(n.y-u.y)/l,g=h*h+p*p;g<=1&&o.candidates.push($(i.getObjectId(t),c(u),Math.sqrt(g),c(m),c(r)))}}}}if("none"!==e.vertexMode){const r=u?m.length-s:m.length;if("all"===e.vertexMode)for(let e=0;e<r;e+=s){const s=h;s.coordsIndex=e;const r=(n.x-s.x)/a,u=(n.y-s.y)/l,d=r*r+u*u;d<=1&&o.candidates.push(H(i.getObjectId(t),c(s),Math.sqrt(d)))}else if("ends"===e.vertexMode){const e=[0];u||e.push(m.length-s);for(const s of e){const e=h;e.coordsIndex=s;const r=(n.x-e.x)/a,u=(n.y-e.y)/l,d=r*r+u*u;d<=1&&o.candidates.push(H(i.getObjectId(t),c(e),Math.sqrt(d)))}}}}return o.candidates.sort(((e,t)=>e.distance-t.distance)),o}_getPointCreator(e,t,i){const s=null==i||(0,y.fS)(t,i)?e=>e:e=>(0,G.iV)(e,t,i),{hasZ:n}=this;return"3d"===e?n?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,minValue:a,maxValue:l,scale:o,timeZone:u}=e,c=this.fieldsIndex.isDateField(t),h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:o,timeZone:u}),d=(0,Z.S5)({normalizationType:n,normalizationField:s,minValue:a,maxValue:l}),f=this.fieldsIndex.get(t),m={value:.5,fieldType:f?.type},p=(0,W.qN)(f)?(0,Z.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,Z.i5)({values:h,minValue:a,maxValue:l,useSampleStdDev:!n,supportsNullCount:d,percentileParams:m});return(0,Z.F_)(p,c)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:n,scale:r,timeZone:a}=e,l=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a}),o=(0,Z.eT)(l);return(0,Z.Qm)(o,s,n,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:h,timeZone:d}),m=(0,Z.G2)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:c});return(0,Z.DL)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:c,scale:h,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:h,timeZone:d});return(0,Z.oF)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.reverse()){const t=s.split(" "),n=t[0],r=this.fieldsIndex.get(n),a=!!t[1]&&"desc"===t[1].toLowerCase(),l=(0,Z.Lq)(r?.type,a);e.sort(((e,t)=>{const s=i(e,n,r),a=i(t,n,r);return l(s,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:i,hasM:s,hasZ:n,objectIdField:r,spatialReference:a}=this,{outFields:l,outSR:o,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,m=null!=c&&t.length>(h||0)+c,p=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:p,geometryType:i,hasM:s&&f,hasZ:n&&d,objectIdFieldName:r,spatialReference:(0,B.S2)(o||a),transform:u&&(0,U.vY)(u)||null}}_createFeatures(e,t){const i=new Y(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:n}=this,{orderByFields:r,quantizationParameters:a,returnGeometry:l,returnCentroid:o,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,m=n&&d,p=s&&f;let g=[],y=0;const _=[...t];if(this._sortFeatures(_,r,((e,t,s)=>i.getFieldValue(e,t,s))),l||o){const e=(0,U.vY)(a)??void 0;if(l&&!o)for(const t of _)g[y++]={attributes:i.getAttributes(t),geometry:(0,B.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)};else if(!l&&o)for(const t of _)g[y++]={attributes:i.getAttributes(t),centroid:(0,B.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of _)g[y++]={attributes:i.getAttributes(t),centroid:(0,B.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,B.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)}}else for(const e of _){const t=i.getAttributes(e);t&&(g[y++]={attributes:t})}const x=c||0;if(null!=h){const e=x+h;g=g.slice(x,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(const t of e.outStatistics??[])if("exceedslimit"===t.statisticType){i=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,s=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,n=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>i;else if(this.items.length>s)t=!0;else{const e=K(this.hasZ,this.hasM),i=this.featureAdapter;t=this.items.reduce(((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)}),0)/e>n}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:{}},i=[],s=new Map,n=new Map,r=new Map,a=new Map,l=new Y(e,this.featureAdapter,this.fieldsIndex),o=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u?.length,f=!!d,m=f?u[0]:null,p=f&&!this.fieldsIndex.get(m);for(const e of o??[]){const{outStatisticFieldName:o,statisticType:h}=e,g=e,y="exceedslimit"!==h?e.onStatisticField:void 0,_="percentile_disc"===h||"percentile_cont"===h,x="EnvelopeAggregate"===h||"CentroidAggregate"===h||"ConvexHullAggregate"===h,T=f&&1===d&&(y===m||p)&&"count"===h;if(f){if(!r.has(y)){const e=[];for(const t of u){const i=this._getAttributeValues(l,t,s);e.push(i)}r.set(y,this._calculateUniqueValues(e,!x&&l.returnDistinctValues))}const e=r.get(y);for(const t in e){const{count:i,data:n,items:r,itemPositions:h}=e[t],d=n.join(",");if(!c||l.validateItems(r,c)){const e=a.get(d)||{attributes:{}};if(x){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(g,r);e.aggregateGeometries[i]=t}else{let t=null;if(T)t=i;else{const e=this._getAttributeValues(l,y,s),i=h.map((t=>e[t]));t=_&&"statisticParameters"in g?this._getPercentileValue(g,i):this._getStatisticValue(g,i,null,l.returnDistinctValues)}e.attributes[o]=t}let t=0;u.forEach(((i,s)=>e.attributes[this.fieldsIndex.get(i)?i:"EXPR_"+ ++t]=n[s])),a.set(d,e)}}}else if(x){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(g,this.items);t.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,y,s);t.attributes[o]=_&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,n,l.returnDistinctValues)}i.push({name:o,alias:o,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:i,features:g}}async _getAggregateGeometry(e,t){const{convexHull:s,union:n}=await Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247)),{statisticType:r,outStatisticFieldName:a}=e,{featureAdapter:l,spatialReference:o,geometryType:u,hasZ:c,hasM:h}=this,d=t.map((e=>(0,B.Op)(u,c,h,l.getGeometry(e)))),f=s(o,d,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===r){const e=f?(0,q._w)(f):(0,q.aO)(n(o,d));m.aggregateGeometries={...e,spatialReference:o},m.outStatisticFieldName=a||"extent"}else if("CentroidAggregate"===r){const e=f?(0,Q.tO)(f):(0,Q.$G)((0,q.aO)(n(o,d)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:o},m.outStatisticFieldName=a||"centroid"}else"ConvexHullAggregate"===r&&(m.aggregateGeometries=f,m.outStatisticFieldName=a||"convexHull");return m}_getStatisticValue(e,t,i,s){const{onStatisticField:n,statisticType:r}=e;let a=null;return a=i?.has(n)?i.get(n):(0,W.qN)(this.fieldsIndex.get(n))?(0,Z.H0)({values:t,returnDistinct:s}):(0,Z.i5)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(n,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:n}=e,{value:r,orderBy:a}=s,l=this.fieldsIndex.get(i);return(0,Z.XL)(t,{value:r,orderBy:a,fieldType:l?.type,isDiscrete:"percentile_disc"===n})}_getAttributeValues(e,t,i){if(i.has(t))return i.get(t);const s=this.fieldsIndex.get(t),n=this.items.map((i=>e.getFieldValue(i,t,s)));return i.set(t,n),n}_calculateUniqueValues(e,t){const i={},s=this.items,n=s.length;for(let r=0;r<n;r++){const n=s[r],a=[];for(const t of e)a.push(t[r]);const l=a.join(",");null==i[l]?i[l]={count:1,data:a,items:[n],itemPositions:[r]}:(t||i[l].count++,i[l].items.push(n),i[l].itemPositions.push(r))}return i}async _getDataValues(e){const t=new Y(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:i,scale:s,timeZone:n}=e;return i?t.getExpressionValues(this.items,i,{viewingMode:"map",scale:s,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},n):t.getDataValues(this.items,{field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal})}}function J(e,t,i,s){const n=s.x-i.x,r=s.y-i.y,a=n*n+r*r,l=(t.x-i.x)*n+(t.y-i.y)*r,o=Math.min(1,Math.max(0,l/a));e.x=i.x+n*o,e.y=i.y+r*o}function K(e,t){return e?t?4:3:t?3:2}class ee{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 te=i(10402),ie=i(17590),se=i(99514),ne=i(61247),re=(i(80442),i(92604)),ae=i(54790),le=i(44553),oe=i(17445),ue=i(95528),ce=i(76882);class he{constructor(){this._tasks=new Array,this._running=(0,ue.t)(!1)}get length(){return this._tasks.length}get running(){return this._running.value}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,i){return this._running.value=!0,new Promise(((s,n)=>this._tasks.push(new de(s,n,e,t,i))))}unshift(e,t,i){return this._running.value=!0,new Promise(((s,n)=>this._tasks.unshift(new de(s,n,e,t,i))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const i=(0,u.Hc)(t.signal);if(i&&!t.abortCallback)t.reject((0,u.zE)());else{const s=i?t.abortCallback?.((0,u.zE)()):t.callback(e);(0,u.y8)(s)?s.then(t.resolve,t.reject):t.resolve(s)}}catch(e){t.reject(e)}return this._running.value=this._tasks.length>0,!0}cancelAll(){const e=(0,u.zE)();for(const t of this._tasks)if(t.abortCallback){const i=t.abortCallback(e);t.resolve(i)}else t.reject(e);this._tasks.length=0,this._running.value=!1}}class de{constructor(e,t,i,s=void 0,n=void 0){this.resolve=e,this.reject=t,this.callback=i,this.signal=s,this.abortCallback=n}}var fe=i(43697),me=i(92036),pe=i(5600),ge=(i(75215),i(52011));let ye=class extends me.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,fe._)([(0,pe.Cb)()],ye.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,fe._)([(0,pe.Cb)()],ye.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ye=(0,fe._)([(0,ge.j)("esri.views.support.DebugFlags")],ye);const _e=new ye;var xe,Te,Se,Ie=i(95720);(Se=xe||(xe={}))[Se.YIELD=1]="YIELD",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.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[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(Te||(Te={}));const Ee=new Map([[Te.RESOURCE_CONTROLLER_IMMEDIATE,0],[Te.RESOURCE_CONTROLLER,4],[Te.SLIDE,0],[Te.STREAM_DATA_LOADER,0],[Te.ELEVATION_QUERY,0],[Te.TERRAIN_SURFACE,1],[Te.SURFACE_GEOMETRY_UPDATES,1],[Te.LOD_RENDERER,2],[Te.GRAPHICS_CORE,2],[Te.I3S_CONTROLLER,2],[Te.POINT_CLOUD_LAYER,2],[Te.FEATURE_TILE_FETCHER,2],[Te.OVERLAY,4],[Te.STAGE,4],[Te.GRAPHICS_DECONFLICTOR,4],[Te.FILTER_VISIBILITY,4],[Te.SCALE_VISIBILITY,4],[Te.FRUSTUM_VISIBILITY,4],[Te.CLOUDS_GENERATOR,4],[Te.POINT_OF_INTEREST_FREQUENT,6],[Te.POINT_OF_INTEREST_INFREQUENT,30],[Te.LABELER,8],[Te.FEATURE_QUERY_ENGINE,8],[Te.FEATURE_TILE_TREE,16],[Te.FEATURE_TILE_TREE_ACTIVE,0],[Te.ELEVATION_ALIGNMENT,12],[Te.TEXT_TEXTURE_ATLAS,12],[Te.TEXTURE_UNLOAD,12],[Te.LINE_OF_SIGHT_TOOL,16],[Te.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[Te.SNAPPING,0],[Te.SHADOW_ACCUMULATOR,30]]);function Re(e){return Ee.has(e)?Ee.get(e):"number"==typeof e?e:1}const Fe=(0,ce.HA)(6.5),be=(0,ce.HA)(1),we=(0,ce.HA)(30),ve=(0,ce.HA)(1e3/30),Ae=(0,ce.HA)(100);var Ne,Ce;!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,ue.t)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new ae.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new i,this._state=Ie.n.INTERACTING,this._tasks=new le.Z,this._runQueue=new le.Z,this._load=0,this._idleStateCallbacks=new le.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,oe.YP)((()=>_e.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),oe.nn);for(const e of Object.keys(Te))this.performanceInfo.tasks.set(Te[e],new ae.Z(Te[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:Fe,INTERACTING_BUDGET:ve,IDLE_BUDGET:Ae,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,l.hw)(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,i){const s=Re(e),n=new t(this,e,i,s);return this._tasks.push(n),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new ae.Z(e)),n}registerIdleStateCallbacks(e,t){const i={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(i),this.state===Ie.n.IDLE&&this._idleUpdatesStartFired&&i.idleBegin();const s=this;return{remove:()=>this._removeIdleStateCallbacks(i),set idleBegin(e){s._idleUpdatesStartFired&&(i.idleEnd(),s._state===Ie.n.IDLE&&e()),i.idleBegin=e},set idleEnd(e){i.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Ie.n.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=Fe,i=e.frameDuration,s=be;switch(this.state){case Ie.n.IDLE:t=(0,ce.HA)(0),i=(0,ce.HA)(Math.max(Ae,e.frameDuration)),s=we;break;case Ie.n.INTERACTING:i=(0,ce.HA)(Math.max(ve,e.frameDuration));case Ie.n.ANIMATING:}return i=(0,ce.HA)(i-e.elapsedFrameTime-t),this.state!==Ie.n.IDLE&&i<be&&!this._forceTask?(this._forceTask=!0,!1):(i=(0,ce.HA)(Math.max(i,s)),this._budget.reset(i,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Ie.n.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Ie.n.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,ce.HA)(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 Ce.SCHEDULED;let t=Ce.IDLE;return this._tasks.forAll((i=>{i.name===e&&i.needsUpdate&&(i.schedulePriority<=1?t=Ce.READY:t!==Ce.READY&&(t=Ce.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((i=>{i.name===e&&(t+=i.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,i)=>{t+=e>1?` ${e}x ${i}`:` ${i}`})),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((i=>{i.needsUpdate&&0!==i.schedulePriority&&0!==i.basePriority&&i.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,i.basePriority),1===i.schedulePriority?(i.schedulePriority=0,this._runQueue.push(i)):--i.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(),i=this._runQueue.pop();this._budget.resetProgress();try{i.task.runTask(this._budget)===xe.YIELD&&(i.blockFrame=this._frameNumber)}catch(e){re.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${i.name}"`,e),i.blockFrame=this._frameNumber}!this._budget.hasProgressed&&i.blockFrame!==this._frameNumber&&i.needsUpdate&&(i.name,Te.I3S_CONTROLLER,i.blockFrame=this._frameNumber),i.schedulePriority=i.basePriority;const s=this._budget.now()-t;if(i.runtime+=s,this._frameTaskTimes.set(i.priority,this._frameTaskTimes.get(i.priority)+s),this._debug&&s>2*this._budget.budget&&console.log("Task",i.name,"used",s,"of max",this._budget.budget,"ms"),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(Te))this._frameTaskTimes.set(Te[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,i,s){this._scheduler=e,this.name=t,this._basePriority=s,this.blockFrame=0,this.runtime=0,this._queue=new he,this._handles=new ne.Z,this.schedulePriority=this._basePriority,this._task=(0,ue.t)(null!=i?i:this._queue),this._handles.add((0,oe.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(Ve),this._scheduler.removeTask(this),this.schedule=ke.schedule,this.reschedule=ke.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=Re(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,i){return this._queue.push(e,t,i)}reschedule(e,t,i){return this._queue.unshift(e,t,i)}processQueue(e){this._queue.runTask(e)}}class i{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Ie.n.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 performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=i}(Ne||(Ne={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(Ce||(Ce={}));const Ve=(()=>{const e=new Ne.Budget;return e.enabled=!1,e})(),ke=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,u.Hc)(t)){const e=(0,u.zE)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,u.gx)(e(Ve))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}},De="feature-store:unsupported-query",Pe=new o.WJ(2e6);let Oe=0;class Me{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:z.g},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 o.Xq(Oe+++"$$",Pe)),this.fieldsIndex=(0,r.AK)(e.fieldsIndex)?e.fieldsIndex:se.Z.fromJSON(e.fieldsIndex),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,l.hw)(this._frameTask),this.clearCache(),(0,l.SC)(this._geometryQueryCache),this._changeHandle=(0,l.hw)(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){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==B.Ti)throw t;return new X([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==B.Ti)throw e;return 0}}async executeQueryForExtent(e,t){const i=e.outSR;try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),n=s.size;return n?{count:n,extent:await this._getBounds(s.items,s.spatialReference,i||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===B.Ti)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){try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),s=i.items,n=new Set;return await this._reschedule((()=>{for(const e of s)n.add(i.featureAdapter.getObjectId(e))}),t),n}catch(e){if(e===B.Ti)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:n,vertexMode:r}=e;if(!n&&"none"===r)return{candidates:[]};let l=(0,a.d9)(e.query);l=await this._schedule((()=>(0,B.j6)(l,this.definitionExpression,this.spatialReference)),t),l=await this._reschedule((()=>this._checkQuerySupport(l)),t);const o=!(0,y.fS)(i.spatialReference,this.spatialReference);o&&await(0,G._W)(i.spatialReference,this.spatialReference);const u="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,h={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},d=o?(0,G.iV)(h,this.spatialReference):h;if(!d)return{candidates:[]};const f=(await(0,g.aX)((0,p.im)(i),null,{signal:t}))[0],m=(await(0,g.aX)((0,p.im)(d),null,{signal:t}))[0];if(null==f||null==m)return{candidates:[]};const _=new X(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(m.toJSON()))),t),l,this);await this._reschedule((()=>this._executeObjectIdsQuery(_)),t),await this._reschedule((()=>this._executeTimeQuery(_)),t),await this._reschedule((()=>this._executeAttributesQuery(_)),t),await this._reschedule((()=>this._executeGeometryQueryForSnapping(_,t)),t);const x=f.toJSON(),T=o?(0,G.iV)(x,this.spatialReference):x,S=o?Math.max(d.xmax-d.xmin,d.ymax-d.ymin)/2:s;return _.createSnappingResponse({...e,point:T,distance:S},i.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo?.trackIdField)throw new n.Z(De,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const i=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(i)),t),i.createQueryResponse()}catch(t){if(t!==B.Ti)throw t;return new X([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,i){const{field:s,normalizationField:n,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:n,valueExpression:r},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const{field:s,field2:n,field3:r,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:s,field2:n,field3:r,valueExpression:a},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const{field:s,normalizationField:n,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:n,valueExpression:r},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const{field:s,normalizationField:n,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:n,valueExpression:r},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){this._timeExtentPromise||=(0,ie.R)(this.timeInfo,this.featureStore);const[t,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,u.k_)(e),{fullExtent:t,timeExtent:i}}async _getBounds(e,t,i){const s=(0,d.t8)((0,d.Ue)(),d.G_);await this.featureStore.forEachBounds(e,(e=>(0,d.TC)(s,e)));const n={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:(0,B.S2)(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(n.zmin=s[2],n.zmax=s[5]);const r=(0,G.iV)(n,t,i);if(r.spatialReference=(0,B.S2)(i),r.xmax-r.xmin==0){const e=(0,c.c9)(r.spatialReference);r.xmin-=e,r.xmax+=e}if(r.ymax-r.ymin==0){const e=(0,c.c9)(r.spatialReference);r.ymin-=e,r.ymax+=e}if(this.hasZ&&null!=r.zmin&&null!=r.zmax&&r.zmax-r.zmin==0){const e=(0,c.c9)(r.spatialReference);r.zmin-=e,r.zmax+=e}return r}_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(Ve)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(Ve)}async _getAllFeaturesQueryEngineResult(e){return new X(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,i){e=(0,a.d9)(e),e=await this._schedule((()=>(0,B.Up)(e,this.definitionExpression,this.spatialReference)),i),e=await this._reschedule((()=>this._checkQuerySupport(e)),i),e={...e,...t};const s=await this._reschedule((()=>this._executeSceneFilterQuery(e,i)),i),n=await this._reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this._reschedule((()=>this._executeAggregateIdsQuery(n)),i),await this._reschedule((()=>this._executeObjectIdsQuery(n)),i),await this._reschedule((()=>this._executeTimeQuery(n)),i),await this._reschedule((()=>this._executeAttributesQuery(n)),i),n}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:n}=e,r=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,l=null==r||(0,y.fS)(r,a.spatialReference)?a:(0,G.iV)(a,r);if(!l)return null;const o=s||n,u=(0,y.JY)(i)&&!(0,y.fS)(this.spatialReference,i)&&o?async e=>this._project(e,i):e=>e,c=this.featureAdapter,h=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(l))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=await this._reschedule((()=>this._getAllFeatures()),t),n=await this._reschedule((async()=>{const n=await(0,te.cW)("esriSpatialRelDisjoint",l,this.geometryType,this.hasZ,this.hasM),r=await this._runSpatialFilter(s,(e=>!i.has(c.getObjectId(e))||n(c.getGeometry(e))),t);return new X(r,e,this)}),t);return u(n)}if(!h.length)return new X([],e,this);if(this._canExecuteSinglePass(l,e))return u(new X(h,e,this));const d=await(0,te.cW)("esriSpatialRelContains",l,this.geometryType,this.hasZ,this.hasM),f=await this._runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new X(f,e,this))}async _executeGeometryQuery(e,t,i){if(null!=t&&0===t.items.length)return t;e=null!=t?t.query:e;const{geometry:n,outSR:r,spatialRel:a,returnGeometry:l,returnCentroid:o}=e,u=this.featureStore.featureSpatialReference,c=!n||null==u||(0,y.fS)(u,n.spatialReference)?n:(0,G.iV)(n,u),h=l||o,d=(0,y.JY)(r)&&!(0,y.fS)(this.spatialReference,r),f=this._geometryQueryCache&&null==t?d&&h?JSON.stringify({originalFilterGeometry:n,spatialRelationship:a,outSpatialReference:r}):JSON.stringify({originalFilterGeometry:n,spatialRelationship:a}):null,m=f?this._geometryQueryCache.get(f):null;if(null!=m)return new X(m,e,this);const p=async e=>(d&&h&&await this._project(e,r),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!c)return p(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const g=this.featureAdapter;let _=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(n))),i);if("esriSpatialRelDisjoint"===a){if(!_.length)return p(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const s=new Set;for(const e of _)s.add(g.getObjectId(e));const n=null!=t?t.items:await this._reschedule((()=>this._getAllFeatures()),i),r=await this._reschedule((async()=>{const t=await(0,te.cW)(a,c,this.geometryType,this.hasZ,this.hasM),r=await this._runSpatialFilter(n,(e=>!s.has(g.getObjectId(e))||t(g.getGeometry(e))),i);return new X(r,e,this)}),i);return p(r)}if(null!=t){const e=new s.SO;_=_.filter((i=>(0,s.cq)(t.items,i,t.items.length,e)>=0))}if(!_.length){const t=new X([],e,this);return f&&this._geometryQueryCache.put(f,t.items,1),t}if(this._canExecuteSinglePass(c,e))return p(new X(_,e,this));const x=await(0,te.cW)(a,c,this.geometryType,this.hasZ,this.hasM),T=await this._runSpatialFilter(_,(e=>x(g.getGeometry(e))),i);return p(new X(T,e,this))}async _executeGeometryQueryForSnapping(e,t){const{query:i}=e,{spatialRel:s}=i;if(!e?.items?.length||!i.geometry||!s)return;const n=await(0,te.cW)(s,i.geometry,this.geometryType,this.hasZ,this.hasM),r=await this._runSpatialFilter(e.items,(e=>n(e.geometry)),t);e.items=r}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach((e=>t.add(e)));const i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,ie.y)(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=k(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,i){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let s=0;const n=new Array,r=async a=>{for(;s<e.length;){const l=e[s++];t(l)&&(n.push(l),a.madeProgress()),a.done&&await this._reschedule((e=>r(e)),i)}};return this._reschedule((e=>r(e)),i).then((()=>n))}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,n=s||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,n),l=r.get(e);(!l||s>a(l,n))&&r.set(e,i)}e.items=Array.from(r.values())}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,te.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,y.fS)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,G.oj)(e.items.map((e=>(0,B.Op)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e)))),this.spatialReference,t,s);return e.items=n.map(((t,s)=>i.cloneWithGeometry(e.items[s],(0,_.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,te.hN)(e)){if((0,p.YX)(e))return[(0,f.al)(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.oU)(e))return e.rings.map((e=>(0,f.al)(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,m.$P)((0,f.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const i=Array.from(t.values());return t.clear(),i}async _checkStatisticsSupport(e,t){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 n.Z(De,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t,e),(0,te.P0)(e,this.geometryType,this.spatialReference),(0,G._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e,t){let i=[];if(e.valueExpression){const{arcadeUtils:t}=await(0,j.LC)();i=t.extractFieldNames(e.valueExpression)}if(e.field&&i.push(e.field),e.field2&&i.push(e.field2),e.field3&&i.push(e.field3),e.normalizationField&&i.push(e.normalizationField),!i.length&&!e.valueExpression)throw new n.Z(De,"field or valueExpression is required",{params:e});D(this.fieldsIndex,i,{errorMessage:"Cannot calculate statistics for missing fields",query:t}),P(this.fieldsIndex,i,{expressionName:"statistics",query:t})}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new n.Z(De,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,te.P0)(e,this.geometryType,this.spatialReference),(0,G._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:i,returnDistinctValues:s,outStatistics:r}=e,a=r?r.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(i&&i.length>0){const t=" asc",s=" desc",n=i.map((e=>{const i=e.toLowerCase();return i.includes(t)?i.split(t)[0]:i.includes(s)?i.split(s)[0]:e})).filter((e=>!a.includes(e)));D(this.fieldsIndex,n,{expressionName:"orderByFields",query:e})}if(t&&t.length>0)D(this.fieldsIndex,t,{expressionName:"outFields",query:e});else if(s)throw new n.Z(De,"outFields should be specified for returnDistinctValues",{query:e});!function(e,t,i){if(!t)return!0;const s="where clause",n=C(t,e,{validateStandardized:!0,expressionName:s});D(e,n,{expressionName:s,query:i}),P(e,n,{expressionName:s,query:i})}(this.fieldsIndex,e.where,e)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:i,having:s}=e,r=i?.length,a=t?.length;if(s){if(!r||!a)throw new n.Z(De,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});V(this.fieldsIndex,s,t,e)}if(a){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const s=t.map((e=>e.onStatisticField)).filter(Boolean);D(this.fieldsIndex,s,{expressionName:"onStatisticFields",query:e}),r&&D(this.fieldsIndex,i,{expressionName:"groupByFieldsForStatistics",query:e});const a=new Set([...b.jsonValues,...w.jsonValues]),l=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...b.apiValues,...w.apiValues]);for(const i of t){const{onStatisticField:t,statisticType:s}=i;if("percentile_disc"!==s&&"percentile_cont"!==s||!("statisticParameters"in i)){if("count"!==s&&"min"!==s&&"max"!==s&&t&&L(t,this.fieldsIndex,a))throw new n.Z(De,`outStatistics with '${s}' statistic type, only supports ${l} field types`,{definition:i,query:e})}else{const{statisticParameters:t}=i;if(!t)throw new n.Z(De,"statisticParameters should be set for percentile type",{definition:i,query:e})}}}}async _getQueryEngineResultForStats(e,t,i){e=(0,a.d9)(e);try{e=await this._schedule((()=>(0,B.Up)(e,this.definitionExpression,this.spatialReference)),i),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),i);const s=await this._reschedule((()=>this._executeSceneFilterQuery(e,i)),i),n=await this._reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this._reschedule((()=>this._executeAggregateIdsQuery(n)),i),await this._reschedule((()=>this._executeObjectIdsQuery(n)),i),await this._reschedule((()=>this._executeTimeQuery(n)),i),await this._reschedule((()=>this._executeAttributesQuery(n)),i),n}catch(t){if(t!==B.Ti)throw t;return new X([],e,this)}}}},10402:(e,t,i)=>{i.d(t,{hN:()=>S,P0:()=>T,cW:()=>x});var s=i(20102),n=i(54102),r=i(87416),a=i(33955),l=i(8744);function o(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,n,r){const a=o(n,r),{coords:l,lengths:u}=s;if(!u)return!1;for(let s=0,n=0;s<u.length;s++,n+=a)if(!c(e,t,i,l[n],l[n+1]))return!1;return!0}function c(e,t,i,s,n){if(!e)return!1;const r=o(t,i),{coords:a,lengths:l}=e;let u=!1,c=0;for(const e of l)u=h(u,a,r,c,e,s,n),c+=e*r;return u}function h(e,t,i,s,n,r,a){let l=e,o=s;for(let e=s,u=s+n*i;e<u;e+=i){o=e+i,o===u&&(o=s);const n=t[e],c=t[e+1],h=t[o],d=t[o+1];(c<a&&d>=a||d<a&&c>=a)&&n+(a-c)/(d-c)*(h-n)<r&&(l=!l)}return l}var d=i(98732),f=i(5428),m=i(37427),p=i(11490);const g="feature-store:unsupported-query",y={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 x(e,t,s,l,o){if((0,a.oU)(t)&&"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===s){const i=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(i,!1,!1,e,l,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,n.aV)(t,(0,p.Op)(s,l,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===s&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,n.lQ)(t,(0,p.Op)(s,l,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(h=s)?r.h_:(0,r.IY)(h);return Promise.resolve((i=>e(t,(0,p.Op)(s,l,o,i))))}var h;return Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247)).then((i=>{const n=i[y[e]].bind(null,t.spatialReference,t);return e=>n((0,p.Op)(s,l,o,e))}))}async function T(e,t,i){const{spatialRel:n,geometry:r}=e;if(r){if(!function(e){return null!=e&&!0===_.spatialRelationship[e]}(n))throw new s.Z(g,"Unsupported query spatial relationship",{query:e});if((0,l.JY)(r.spatialReference)&&(0,l.JY)(i)){if(!function(e){return null!=e&&!0===_.queryGeometry[(0,a.Ji)(e)]}(r))throw new s.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===_.layerGeometry[e]}(t))throw new s.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m._W)(e.geometry?.spatialReference,e.outSR)}}}function S(e){if((0,a.YX)(e))return!0;if((0,a.oU)(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}},17590:(e,t,i)=>{async function s(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:s,endTimeField:n}=e;let r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(s&&n)await t.forEach((e=>{const t=i.getAttribute(e,s),l=i.getAttribute(e,n);null==t||isNaN(t)||(r=Math.min(r,t)),null==l||isNaN(l)||(a=Math.max(a,l))}));else{const e=s||n;await t.forEach((t=>{const s=i.getAttribute(t,e);null==s||isNaN(s)||(r=Math.min(r,s),a=Math.max(a,s))}))}return{start:r,end:a}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:n}=e;if(!s&&!n)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const l=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&n?function(e,t,i,s,n){return null!=s&&null!=n?r=>{const a=e(r,t),l=e(r,i);return(null==a||a<=n)&&(null==l||l>=s)}:null!=s?t=>{const n=e(t,i);return null==n||n>=s}:null!=n?i=>{const s=e(i,t);return null==s||s<=n}:void 0}(l,s,n,r,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?n=>{const r=e(n,t);return null!=r&&r>=i&&r<=s}:null!=i?s=>{const n=e(s,t);return null!=n&&n>=i}:null!=s?i=>{const n=e(i,t);return null!=n&&n<=s}:void 0}(l,s||n,r,a)}i.d(t,{R:()=>s,y:()=>n})},11490:(e,t,i)=>{i.d(t,{EG:()=>x,Op:()=>T,S2:()=>R,Ti:()=>m,Up:()=>S,j6:()=>I});var s=i(35454),n=i(67900),r=i(73615),a=i(49600),l=i(33955),o=i(16306),u=i(8744),c=i(98732),h=i(5428),d=i(37427);const f=new s.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({}),p=new h.Z,g=new h.Z,y=new h.Z,_={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function x(e,t,i,s=e.hasZ,n=e.hasM){if(null==t)return null;const r=e.hasZ&&s,a=e.hasM&&n;if(i){const l=(0,c.Nh)(y,t,e.hasZ,e.hasM,"esriGeometryPoint",i,s,n);return(0,c.fQ)(l,r,a)}return(0,c.fQ)(t,r,a)}function T(e,t,i,s,n,r,a=t,l=i){const o=t&&a,u=i&&l,h=null!=s?"coords"in s?s:s.geometry:null;if(null==h)return null;if(n){let s=(0,c.zj)(g,h,t,i,e,n,a,l);return r&&(s=(0,c.Nh)(y,s,o,u,e,r)),_[e]?.(s,o,u)??null}if(r){const s=(0,c.Nh)(y,h,t,i,e,r,a,l);return _[e]?.(s,o,u)??null}return(0,c.hY)(p,h,t,i,a,l),_[e]?.(p,o,u)??null}async function S(e,t,i){const{outFields:s,orderByFields:n,groupByFieldsForStatistics:r,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),I(e,t,i)}async function I(e,t,s){if(!e)return null;let{where:r}=e;if(e.where=r=r?.trim(),(!r||/^1 *= *1$/.test(r)||t&&t===r)&&(e.where=null),!e.geometry)return e;let c=await async function(e){const{distance:t,units:s}=e,r=e.geometry;if(null==t||"vertexAttributes"in r)return r;const a=r.spatialReference,l=s?f.fromJSON(s):(0,n.qE)(a),o=a&&((0,u.sT)(a)||(0,u.sS)(a))?r:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(r,u.Zn)));return(await async function(){return(await Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247))).geodesicBuffer}())(o.spatialReference,o,t,l)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;c=(0,a.aO)(c),c.spatialReference=t}if(c){await(0,d._W)(c.spatialReference,s),c=function(e,t){const i=e.spatialReference;return E(e,t)&&(0,l.YX)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(c,s);const t=(await(0,o.aX)((0,l.im)(c)))[0];if(null==t)throw m;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=i&&E(c,s)?{densificationStep:8*i}:void 0,r=t.toJSON(),a=(0,d.iV)(r,r.spatialReference,s,n);if(!a)throw m;a.spatialReference=s,e.geometry=a}return e}function E(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.YX)(e)||(0,l.oU)(e)||(0,l.l9)(e))&&!(0,u.fS)(i,t)&&!(0,r.canProjectWithoutEngine)(i,t)}function R(e){return e&&F in e?JSON.parse(JSON.stringify(e,b)):e}const F="_geVersion",b=(e,t)=>e!==F?t:void 0},10278:(e,t,i)=>{i.d(t,{Z:()=>d});var s=i(43697),n=i(35454),r=i(96674),a=i(5600),l=(i(75215),i(67676),i(80442),i(36030)),o=i(52011);const u=new n.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),c=new n.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let h=class extends r.wq{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,s._)([(0,l.J)({classBreaksDef:"class-breaks-definition"})],h.prototype,"type",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"breakCount",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"classificationField",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:u.read,write:u.write}})],h.prototype,"classificationMethod",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"normalizationField",void 0),(0,s._)([(0,a.Cb)({json:{read:c.read,write:c.write}})],h.prototype,"normalizationType",void 0),(0,s._)([(0,a.Cb)({value:null,json:{write:!0}})],h.prototype,"standardDeviationInterval",null),(0,s._)([(0,a.Cb)({value:null,json:{write:!0}})],h.prototype,"definedInterval",null),h=(0,s._)([(0,o.j)("esri.rest.support.ClassBreaksDefinition")],h);const d=h},622:(e,t,i)=>{i.d(t,{k:()=>r});const s=i(92604).Z.getLogger("esri.rest.support.generateRendererUtils");function n(e,t){return Number(e.toFixed(t))}function r(e){const{normalizationTotal:t}=e;return{classBreaks:a(e),normalizationTotal:t}}function a(e){const t=e.definition,{classificationMethod:i,normalizationType:s,definedInterval:r}=t,a=t.breakCount??1,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const h=c[0],d=c[c.length-1];if("equal-interval"===i)if(c.length>=a){const e=(d-h)/a;let t=h;for(let i=1;i<a;i++){const r=n(h+i*e,6);u.push({minValue:t,maxValue:r,label:l(t,r,s)}),t=r}u.push({minValue:t,maxValue:d,label:l(t,d,s)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:l(e,e,s)})}));else if("natural-breaks"===i){const t=function(e){const t=[],i=[];let s=Number.MIN_VALUE,n=1,r=-1;for(let a=0;a<e.length;a++){const l=e[a];l===s?(n++,i[r]=n):null!==l&&(t.push(l),s=l,n=1,i.push(n),r++)}return{uniqueValues:t,valueFrequency:i}}(c),i=e.valueFrequency||t.valueFrequency,r=o(t.uniqueValues,i,a);let f=h;for(let e=1;e<a;e++)if(t.uniqueValues.length>e){const i=n(t.uniqueValues[r[e]],6);u.push({minValue:f,maxValue:i,label:l(f,i,s)}),f=i}u.push({minValue:f,maxValue:d,label:l(f,d,s)})}else if("quantile"===i)if(c.length>=a&&h!==d){let e=h,t=Math.ceil(c.length/a),i=0;for(let n=1;n<a;n++){let r=t+i-1;r>c.length&&(r=c.length-1),r<0&&(r=0),u.push({minValue:e,maxValue:c[r],label:l(e,c[r],s)}),e=c[r],i+=t,t=Math.ceil((c.length-i)/(a-n))}u.push({minValue:e,maxValue:d,label:l(e,d,s)})}else{let e=-1;for(let t=0;t<c.length;t++){const i=c[t];i!==e&&(e=i,u.push({minValue:e,maxValue:i,label:l(e,i,s)}),e=i)}}else if("standard-deviation"===i){const e=function(e){let t=0;for(let i=0;i<e.length;i++)t+=e[i];return t/=e.length,t}(c),t=function(e,t){let i=0;for(let s=0;s<e.length;s++){const n=e[s];i+=(n-t)*(n-t)}return i/=e.length,Math.sqrt(i)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:l(c[0],c[0],s)});else{const i=function(e,t,i,s,n){let r=Math.max(s-e,t-s)/n/i;return r=r>=1?1:r>=.5?.5:.25,r}(h,d,a,e,t)*t;let r=0,o=h;for(let t=a;t>=1;t--){const a=n(e-(t-.5)*i,6);u.push({minValue:o,maxValue:a,label:l(o,a,s)}),o=a,r++}let c=n(e+.5*i,6);u.push({minValue:o,maxValue:c,label:l(o,c,s)}),o=c,r++;for(let t=1;t<=a;t++)c=r===2*a?d:n(e+(t+.5)*i,6),u.push({minValue:o,maxValue:c,label:l(o,c,s)}),o=c,r++}}else if("defined-interval"===i){if(!r)return u;const e=c[0],t=c[c.length-1],i=Math.ceil((t-e)/r);let a=e;for(let t=1;t<i;t++){const i=n(e+t*r,6);u.push({minValue:a,maxValue:i,label:l(a,i,s)}),a=i}u.push({minValue:a,maxValue:t,label:l(a,t,s)})}return u}function l(e,t,i){let s=null;return s=e===t?i&&"percent-of-total"===i?e+"%":e.toString():i&&"percent-of-total"===i?e+"% - "+t+"%":e+" - "+t,s}function o(e,t,i){const s=e.length,n=[];i>s&&(i=s);for(let e=0;e<i;e++)n.push(Math.round(e*s/i-1));n.push(s-1);let r=u(n,e,t,i);return function(e,t,i,s,n,r){let a=0,l=0,o=0,u=0,h=!0;for(let d=0;d<2&&h;d++){0===d&&(h=!1);for(let d=0;d<r-1;d++)for(;i[d+1]+1!==i[d+2];){i[d+1]=i[d+1]+1;const r=c(d,i,s,n);o=r.sbMean,a=r.sbSdcm;const f=c(d+1,i,s,n);if(u=f.sbMean,l=f.sbSdcm,!(a+l<t[d]+t[d+1])){i[d+1]=i[d+1]-1;break}t[d]=a,t[d+1]=l,e[d]=o,e[d+1]=u,h=!0}for(let d=r-1;d>0;d--)for(;i[d]!==i[d-1]+1;){i[d]=i[d]-1;const r=c(d-1,i,s,n);o=r.sbMean,a=r.sbSdcm;const f=c(d,i,s,n);if(u=f.sbMean,l=f.sbSdcm,!(a+l<t[d-1]+t[d])){i[d]=i[d]+1;break}t[d-1]=a,t[d]=l,e[d-1]=o,e[d]=u,h=!0}}return h}(r.mean,r.sdcm,n,e,t,i)&&(r=u(n,e,t,i)),n}function u(e,t,i,s){let n=[],r=[],a=[],l=0;const o=[],u=[];for(let n=0;n<s;n++){const s=c(n,e,t,i);o.push(s.sbMean),u.push(s.sbSdcm),l+=u[n]}let h,d=l,f=!0;for(;f||l<d;){f=!1,n=[];for(let t=0;t<s;t++)n.push(e[t]);for(let i=0;i<s;i++)for(let n=e[i]+1;n<=e[i+1];n++)if(h=t[n],i>0&&n!==e[i+1]&&Math.abs(h-o[i])>Math.abs(h-o[i-1]))e[i]=n;else if(i<s-1&&e[i]!==n-1&&Math.abs(h-o[i])>Math.abs(h-o[i+1])){e[i+1]=n-1;break}d=l,l=0,r=[],a=[];for(let n=0;n<s;n++){r.push(o[n]),a.push(u[n]);const s=c(n,e,t,i);o[n]=s.sbMean,u[n]=s.sbSdcm,l+=u[n]}}if(l>d){for(let t=0;t<s;t++)e[t]=n[t],o[t]=r[t],u[t]=a[t];l=d}return{mean:o,sdcm:u}}function c(e,t,i,n){let r=0,a=0;for(let s=t[e]+1;s<=t[e+1];s++){const e=n[s];r+=i[s]*e,a+=e}a<=0&&s.warn("Exception in Natural Breaks calculation");const l=r/a;let o=0;for(let s=t[e]+1;s<=t[e+1];s++)o+=n[s]*(i[s]-l)**2;return{sbMean:l,sbSdcm:o}}},24452:(e,t,i)=>{i.d(t,{DL:()=>A,F_:()=>I,G2:()=>w,H0:()=>p,Lq:()=>_,Qm:()=>F,S5:()=>m,XL:()=>y,eT:()=>E,fk:()=>b,i5:()=>g,oF:()=>N,wk:()=>f});var s=i(10278),n=i(622);const r="<Null>",a="equal-interval",l=1,o=5,u=10,c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,h=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function f(e){return null==e||"string"==typeof e&&!e?r:e}function m(e){const t=null!=e.normalizationField||null!=e.normalizationType,i=null!=e.minValue||null!=e.maxValue,s=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!i&&!s}function p(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,i=t.filter((e=>null!=e)).sort(),s=i.length,n={count:s,min:i[0],max:i[s-1]};return e.supportsNullCount&&(n.nullcount=t.length-s),e.percentileParams&&(n.median=y(t,e.percentileParams)),n}function g(e){const{values:t,useSampleStdDev:i,supportsNullCount:s}=e;let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=null,l=null,o=null,u=null,c=0;const h=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=d&&(a=null===a?e:a+e,n=Math.min(n,e),r=Math.max(r,e),c++):"string"==typeof e&&c++;if(c&&null!=a){l=a/c;let e=0;for(const i of t)Number.isFinite(i)&&i>=h&&i<=d&&(e+=(i-l)**2);u=i?c>1?e/(c-1):0:c>0?e/c:0,o=Math.sqrt(u)}else n=null,r=null;const f={avg:l,count:c,max:r,min:n,stddev:o,sum:a,variance:u};return s&&(f.nullcount=t.length-c),e.percentileParams&&(f.median=y(t,e.percentileParams)),f}function y(e,t){const{fieldType:i,value:s,orderBy:n,isDiscrete:r}=t,a=_(i,"desc"===n);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(s<=0)return e[0];if(s>=1)return e[e.length-1];const l=(e.length-1)*s,o=Math.floor(l),u=o+1,c=l%1,h=e[o],d=e[u];return u>=e.length||r||"string"==typeof h||"string"==typeof d?h:h*(1-c)+d*c}function _(e,t){const i=t?1:-1,s=function(e){return e?(e,t)=>{const i=x(e,t,!0);return null!=i?i:t-e}:(e,t)=>{const i=x(e,t,!1);return null!=i?i:e-t}}(t),n=T(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...h].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?s(e,t):"string"==typeof e&&"string"==typeof t?n(e,t):i;if("esriFieldTypeDate"===e)return(e,t)=>{const n=new Date(e).getTime(),r=new Date(t).getTime();return isNaN(n)||isNaN(r)?i:s(n,r)};if(h.has(e))return(e,t)=>s(e,t);if("esriFieldTypeString"===e)return(e,t)=>n(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=T(t);return(t,i)=>e(S(t),S(i))}return t?(e,t)=>1:(e,t)=>-1}function x(e,t,i){if(i){if(null==e)return null==t?0:1;if(null==t)return-1}else{if(null==e)return null==t?0:-1;if(null==t)return 1}return null}function T(e){return e?(e,t)=>{const i=x(e,t,!0);return null!=i?i:(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0}:(e,t)=>{const i=x(e,t,!1);return null!=i?i:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}}function S(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function I(e,t){let i;for(i in e)d.includes(i)&&(Number.isFinite(e[i])||(e[i]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))})),e):e}function E(e){const t={};for(let i of e)(null==i||"string"==typeof i&&""===i.trim())&&(i=null),null==t[i]?t[i]={count:1,data:i}:t[i].count++;return{count:t}}function R(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function F(e,t,i,s){const n=e.count,r=[];if(i&&t){const e=[],i=R(t[0]);for(const n of i)if(t[1]){const i=R(t[1]);for(const r of i)if(t[2]){const i=R(t[2]);for(const t of i)e.push(`${f(n)}${s}${f(r)}${s}${f(t)}`)}else e.push(`${f(n)}${s}${f(r)}`)}else e.push(n);for(const t of e)n.hasOwnProperty(t)||(n[t]={data:t,count:0})}for(const e in n){const t=n[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function b(e,t,i,s){let n=null;switch(t){case"log":0!==e&&(n=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(s)&&0!==s&&(n=e/s*100);break;case"field":Number.isFinite(i)&&0!==i&&(n=e/i);break;case"natural-log":e>0&&(n=Math.log(e));break;case"square-root":e>0&&(n=e**.5)}return n}function w(e,t){const i=v({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||o});return e=function(e,t,i){const s=t??-1/0,n=i??1/0;return e.filter((e=>Number.isFinite(e)&&e>=s&&e<=n))}(e,t.minValue,t.maxValue),(0,n.k)({definition:i,values:e,normalizationTotal:t.normalizationTotal})}function v(e){const{breakCount:t,field:i,normalizationField:n,normalizationType:r}=e,o=e.classificationMethod||a,u="standard-deviation"===o?e.standardDeviationInterval||l:void 0;return new s.Z({breakCount:t,classificationField:i,classificationMethod:o,normalizationField:"field"===r?n:void 0,normalizationType:r,standardDeviationInterval:u})}function A(e,t){let i=e.classBreaks;const s=i.length,n=i[0]?.minValue,r=i[s-1]?.maxValue,a="standard-deviation"===t,l=c;return i=i.map((e=>{const t=e.label,i={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(l),s=e?.map((e=>+e.trim()))??[];2===s.length?(i.minStdDev=s[0],i.maxStdDev=s[1],s[0]<0&&s[1]>0&&(i.hasAvg=!0)):1===s.length&&(t.includes("<")?(i.minStdDev=null,i.maxStdDev=s[0]):t.includes(">")&&(i.minStdDev=s[0],i.maxStdDev=null))}return i})),{minValue:n,maxValue:r,classBreakInfos:i,normalizationTotal:e.normalizationTotal}}function N(e,t){const i=C(e,t);if(null==i.min&&null==i.max)return{bins:[],minValue:i.min,maxValue:i.max,normalizationTotal:t.normalizationTotal};const s=i.intervals,n=i.min??0,r=i.max??0,a=s.map(((e,t)=>({minValue:s[t][0],maxValue:s[t][1],count:0})));for(const t of e)if(null!=t&&t>=n&&t<=r){const e=V(s,t);e>-1&&a[e].count++}return{bins:a,minValue:n,maxValue:r,normalizationTotal:t.normalizationTotal}}function C(e,t){const{field:i,classificationMethod:s,standardDeviationInterval:n,normalizationType:r,normalizationField:a,normalizationTotal:l,minValue:o,maxValue:c}=t,h=t.numBins||u;let d=null,f=null,p=null;if(s&&"equal-interval"!==s||r){const{classBreaks:t}=w(e,{field:i,normalizationType:r,normalizationField:a,normalizationTotal:l,classificationMethod:s,standardDeviationInterval:n,minValue:o,maxValue:c,numClasses:h});d=t[0].minValue,f=t[t.length-1].maxValue,p=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=o&&null!=c)d=o,f=c;else{const t=g({values:e,minValue:o,maxValue:c,useSampleStdDev:!r,supportsNullCount:m({normalizationType:r,normalizationField:a,minValue:o,maxValue:c})});d=t.min??null,f=t.max??null}p=function(e,t,i){const s=(t-e)/i,n=[];let r,a=e;for(let e=1;e<=i;e++)r=a+s,r=Number(r.toFixed(16)),n.push([a,e===i?t:r]),a=r;return n}(d??0,f??0,h)}return{min:d,max:f,intervals:p}}function V(e,t){let i=-1;for(let s=e.length-1;s>=0;s--)if(t>=e[s][0]){i=s;break}return i}},95720:(e,t,i)=>{var s;i.d(t,{n:()=>s}),function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(s||(s={}))}}]);