@arcgis/core 5.2.0-next.93 → 5.2.0-next.95

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 (190) hide show
  1. package/arcade/arcadeAsyncRuntime.js +1 -1
  2. package/arcade/arcadeCompiler.js +1 -1
  3. package/arcade/functions/portal.js +2 -0
  4. package/arcade/treeAnalysis.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{c4a0d3149947a1d2c484.js → 05662a663f761dd3dea5.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0be98adfef79fc5036f0.js +1 -0
  8. package/assets/esri/core/workers/chunks/0df9864ecebe6a2b973f.js +1 -0
  9. package/assets/esri/core/workers/chunks/10c13c36c42c5ac41d12.js +1 -0
  10. package/assets/esri/core/workers/chunks/{e50adcfb392adfb3f79c.js → 1b311ff39dede07865df.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{188c6ff5f4664827c254.js → 1c803eef9a8fdabc61e3.js} +2 -2
  12. package/assets/esri/core/workers/chunks/1d7f633f158062eb3f64.js +1 -0
  13. package/assets/esri/core/workers/chunks/1f047dd747e7c1916dc7.js +1684 -0
  14. package/assets/esri/core/workers/chunks/2524e2385f61a6898411.js +1 -0
  15. package/assets/esri/core/workers/chunks/26737d061c7cfbbab95c.js +1 -0
  16. package/assets/esri/core/workers/chunks/{91de343844ac578e7c93.js → 2b6d261fe79fe186fb22.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{8a87e1a89a0d8c6203a7.js → 2e51764c8aa31096cb2a.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{da8a314800944706511b.js → 36e35a8067b18f59cc05.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{d270b49c037085503016.js → 3a9435569ba460ff7e3d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{5d9c92c4e60a4696fdad.js → 471027e4280bd51167b0.js} +1 -1
  21. package/assets/esri/core/workers/chunks/4c088c26d5d546c95c90.js +1 -0
  22. package/assets/esri/core/workers/chunks/{e594b6db9caee1f7b9fc.js → 4d700cb028f6306b163e.js} +1 -1
  23. package/assets/esri/core/workers/chunks/5168bd8ab6233dc9c32a.js +1 -0
  24. package/assets/esri/core/workers/chunks/{cd02a6078443b8f63927.js → 5b8591486f33627f5389.js} +1 -1
  25. package/assets/esri/core/workers/chunks/5d6733dcee9c2ef00072.js +1 -0
  26. package/assets/esri/core/workers/chunks/{a89dbef8155d7c4354da.js → 5edf77618ca51819d7c4.js} +2 -2
  27. package/assets/esri/core/workers/chunks/6057a79c68c33ee4a193.js +1 -0
  28. package/assets/esri/core/workers/chunks/{48726010778d6004e347.js → 63127e3b22e7eac6003d.js} +2 -2
  29. package/assets/esri/core/workers/chunks/{ff83d0337ac489ab08de.js → 678585509706755c0434.js} +2 -2
  30. package/assets/esri/core/workers/chunks/{2754ba5cc094028a7a3c.js → 691e9cc541cfaebe1776.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{32f11b4aeae1ef00e466.js → 6baae3e856d904fef9b1.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{aed7b80145b22c246098.js → 6cbc30b31f0bb39c73ca.js} +1 -1
  33. package/assets/esri/core/workers/chunks/6cc03ef97d7731153b9a.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d44338bf5edafa3ca926.js → 6f01bd01b13662eb3bd7.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{76e7d3cde2da4bdd7820.js → 74cd9df85c4560bb8e52.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{97e41500fc2d24a88938.js → 7b70d6fdfa7a19ffffb0.js} +1 -1
  37. package/assets/esri/core/workers/chunks/7bb3411a86cdd736d555.js +1 -0
  38. package/assets/esri/core/workers/chunks/7ddb5800777fbecee3a8.js +1 -0
  39. package/assets/esri/core/workers/chunks/7eae9053065d3d38e54e.js +1 -0
  40. package/assets/esri/core/workers/chunks/7efc51324cfc8e08c756.js +1 -0
  41. package/assets/esri/core/workers/chunks/{e90076ac1cf88a83a7f9.js → 80f38ab2b7ae61e6f301.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{5aa23b0f4521ba9a07ad.js → 854f42f16fdb40000aae.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{24c44541046576fee7e0.js → 87094044458b0ea5cb0f.js} +2 -2
  44. package/assets/esri/core/workers/chunks/909ee7d2a0eec773037a.js +1 -0
  45. package/assets/esri/core/workers/chunks/92a6559a6999b26362d7.js +1 -0
  46. package/assets/esri/core/workers/chunks/{3a65693964e3976d8035.js → 9df38cadebf8e6fd746c.js} +1 -1
  47. package/assets/esri/core/workers/chunks/a0eb882a5a81d25b9153.js +1 -0
  48. package/assets/esri/core/workers/chunks/{20f6e681ccd8bf884b77.js → a72983c3621810d4b1af.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{9226205850e35b7fc610.js → a8aa8cb60b30f0983e7e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/a8e9aa5461c71c88e2e5.js +1 -0
  51. package/assets/esri/core/workers/chunks/{1ab8307ba9981124f669.js → af6b9fd77b1792fbb66e.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{19e93d4d37018e3ee849.js → b102ae764c14d8b32ace.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{1554feab934e8e1bcd28.js → b333de4dea14c5db0a4d.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{d7d5275d8b3c9430de1f.js → b7c0da9d255d5e48320d.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{6b9dbf43c0659e55c539.js → be0417df35a7d99af675.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{a46ac0be9aabc4cfedc7.js → cc3186dcbbf5edff8b9e.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{6fd0d9431b141f2a3252.js → cefb70d633c220cbedf9.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{69c9a12c97ead8963817.js → d1304d414b1fa725168a.js} +1 -1
  59. package/assets/esri/core/workers/chunks/d453627894e6e5b02023.js +1 -0
  60. package/assets/esri/core/workers/chunks/e4380706b629729f2212.js +1 -0
  61. package/assets/esri/core/workers/chunks/e5b6fa57cc4028fbd401.js +1 -0
  62. package/assets/esri/core/workers/chunks/e7fdad0c07beb3614b60.js +1 -0
  63. package/assets/esri/core/workers/chunks/ea1877ce00da3b585a30.js +1 -0
  64. package/assets/esri/core/workers/chunks/{0336f4f8498a22347720.js → ea5ee1b12b43594592a0.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{c4fef90cf08bbe4f0bb5.js → eafc591e1a98000d54ef.js} +1 -1
  66. package/assets/esri/core/workers/chunks/f331c24247d132589859.js +1 -0
  67. package/assets/esri/core/workers/chunks/f5867d8ba73c67ac27d2.js +1 -0
  68. package/assets/esri/core/workers/chunks/{b7ed5f130661e9ca00b9.js → f5a058a0ce006bce2a2a.js} +1 -1
  69. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  70. package/chunks/{GlowBlur.glsl.js → BlurEmission.glsl.js} +3 -3
  71. package/chunks/EmissionComposite.glsl.js +3 -3
  72. package/chunks/Fog.glsl.js +8 -6
  73. package/chunks/RibbonLine.glsl.js +52 -52
  74. package/chunks/bundle.js +1 -1
  75. package/chunks/portal.js +2 -0
  76. package/config.js +1 -1
  77. package/core/timeUtils.d.ts +62 -0
  78. package/core/timeUtils.js +1 -1
  79. package/kernel.js +1 -1
  80. package/layers/AnnotationFeatureLayer.d.ts +0 -1
  81. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  82. package/layers/support/AnnotationFeatureSublayer.js +1 -1
  83. package/libs/parquet/parquet.js +1 -1
  84. package/package.json +3 -3
  85. package/rest/imageService/fetchRasterInfo.js +1 -1
  86. package/support/revision.js +1 -1
  87. package/symbols/cim/types.d.ts +2 -1
  88. package/views/2d/engine/Stage.js +1 -1
  89. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  90. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  91. package/views/2d/engine/webgl/Painter.js +1 -1
  92. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  93. package/views/2d/engine/webgl/shaderGraph/techniques/Technique.js +1 -1
  94. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  95. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  96. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  97. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
  98. package/views/2d/layers/AnnotationFeatureLayerView2D.js +1 -1
  99. package/views/2d/layers/features/FeatureContainer.js +1 -1
  100. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  101. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  102. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  103. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  104. package/views/3d/environment/CloudyWeather.js +1 -1
  105. package/views/3d/environment/SunnyWeather.js +1 -1
  106. package/views/3d/layers/I3SMeshView3D.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  108. package/views/3d/state/ViewStateManager.js +1 -1
  109. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  110. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  111. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  112. package/views/3d/terrain/TileCompositor.js +1 -1
  113. package/views/3d/webgl/RenderCamera.js +1 -1
  114. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  115. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -5
  116. package/views/3d/webgl-engine/effects/clouds/CloudsParameters.js +1 -1
  117. package/views/3d/webgl-engine/effects/clouds/CloudsPresets.js +1 -1
  118. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  119. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  120. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  121. package/views/3d/webgl-engine/effects/fog/FogTechnique.js +1 -1
  122. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  123. package/views/3d/webgl-engine/effects/glow/{GlowBlur.glsl.js → BlurEmission.glsl.js} +1 -1
  124. package/views/3d/webgl-engine/effects/glow/BlurEmission.js +2 -0
  125. package/views/3d/webgl-engine/effects/glow/BlurEmissionTechnique.js +2 -0
  126. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +37 -0
  127. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +1 -1
  128. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  129. package/views/3d/webgl-engine/lib/BufferGeometry.js +2 -0
  130. package/views/3d/webgl-engine/lib/EmissionComposite.glsl.js +1 -1
  131. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  132. package/views/3d/webgl-engine/lib/EmissionCompositeTechnique.js +1 -1
  133. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  134. package/views/3d/webgl-engine/lib/GeometryBaseInstance.js +1 -1
  135. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  136. package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
  137. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  138. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  139. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  140. package/views/3d/webgl-engine/lib/rendererUtils.js +1 -1
  141. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  142. package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
  143. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  144. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  145. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  146. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  147. package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +1 -1
  148. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  149. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  150. package/views/3d/webgl-engine/shaders/floatBlendScale.glsl.js +1 -1
  151. package/views/SceneView.d.ts +1 -0
  152. package/views/SceneView.js +1 -1
  153. package/views/popupAdapter.js +1 -1
  154. package/assets/esri/core/workers/chunks/0846855843f85661e974.js +0 -1
  155. package/assets/esri/core/workers/chunks/15f4f7e34e14e3cf52e6.js +0 -1
  156. package/assets/esri/core/workers/chunks/19ab024f6f732fd6c69b.js +0 -1
  157. package/assets/esri/core/workers/chunks/22c94f9a69b2157f8dbd.js +0 -1
  158. package/assets/esri/core/workers/chunks/2ec44ebc48beeba11201.js +0 -1
  159. package/assets/esri/core/workers/chunks/30376f00cda1165a2504.js +0 -1
  160. package/assets/esri/core/workers/chunks/349b0c7febc46267441d.js +0 -1684
  161. package/assets/esri/core/workers/chunks/423c2692df662b3dddd4.js +0 -1
  162. package/assets/esri/core/workers/chunks/46f8c7ae7fb356c3410d.js +0 -1
  163. package/assets/esri/core/workers/chunks/4bf7c0c874d30b1c0760.js +0 -1
  164. package/assets/esri/core/workers/chunks/5bf2ce280ea35ea4c96b.js +0 -1
  165. package/assets/esri/core/workers/chunks/7253a439c98200e3e748.js +0 -1
  166. package/assets/esri/core/workers/chunks/75b90fb05e4a2d32b7bb.js +0 -1
  167. package/assets/esri/core/workers/chunks/7e41cee4a0ae75e1490d.js +0 -1
  168. package/assets/esri/core/workers/chunks/848a9f0e5373bbf289a5.js +0 -1
  169. package/assets/esri/core/workers/chunks/95a3f09751bff63f4fab.js +0 -1
  170. package/assets/esri/core/workers/chunks/98d614d6fc9de8ebaf94.js +0 -1
  171. package/assets/esri/core/workers/chunks/b2e2234fdf8e05bc3312.js +0 -1
  172. package/assets/esri/core/workers/chunks/bb23e670736bcace8b6f.js +0 -1
  173. package/assets/esri/core/workers/chunks/bdfffa5f88b559a4b42d.js +0 -1
  174. package/assets/esri/core/workers/chunks/c352696478b48a2090d5.js +0 -1
  175. package/assets/esri/core/workers/chunks/c91042f8bf886056a29c.js +0 -1
  176. package/assets/esri/core/workers/chunks/d58d6b55b2749a535eb3.js +0 -1
  177. package/assets/esri/core/workers/chunks/ec69dd546c312ba97110.js +0 -1
  178. package/assets/esri/core/workers/chunks/f247f3c5148fa0237a7c.js +0 -1
  179. package/assets/esri/core/workers/chunks/f4d351b4cd9d1aa10632.js +0 -1
  180. package/assets/esri/core/workers/chunks/fbc7576ed12964059da6.js +0 -1
  181. package/chunks/GlowComposite.glsl.js +0 -37
  182. package/views/3d/webgl-engine/effects/glow/Glow.js +0 -2
  183. package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +0 -2
  184. package/views/3d/webgl-engine/effects/glow/GlowComposite.glsl.js +0 -2
  185. package/views/3d/webgl-engine/effects/glow/GlowCompositeTechnique.js +0 -2
  186. /package/assets/esri/core/workers/chunks/{188c6ff5f4664827c254.js.LICENSE.txt → 1c803eef9a8fdabc61e3.js.LICENSE.txt} +0 -0
  187. /package/assets/esri/core/workers/chunks/{a89dbef8155d7c4354da.js.LICENSE.txt → 5edf77618ca51819d7c4.js.LICENSE.txt} +0 -0
  188. /package/assets/esri/core/workers/chunks/{48726010778d6004e347.js.LICENSE.txt → 63127e3b22e7eac6003d.js.LICENSE.txt} +0 -0
  189. /package/assets/esri/core/workers/chunks/{ff83d0337ac489ab08de.js.LICENSE.txt → 678585509706755c0434.js.LICENSE.txt} +0 -0
  190. /package/assets/esri/core/workers/chunks/{24c44541046576fee7e0.js.LICENSE.txt → 87094044458b0ea5cb0f.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3354,8366],{73354(t,n,e){e.d(n,{a:()=>l,b:()=>u,c:()=>o,d:()=>s,e:()=>h,f:()=>f,l:()=>c,n:()=>p,t:()=>i}),e(44208);var r=e(72727);function o(t,n,e){i(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function i(t,n,e,o=3,i=o){const s=(0,r.k)(t.length,o,3),u=(0,r.k)(n.length,i,3),a=Math.min(s,u),c=e[0],f=e[1],l=e[2],h=e[4],p=e[5],M=e[6],d=e[8],m=e[9],g=e[10],y=e[12],v=e[13],S=e[14];let _=0,w=0;for(let e=0;e<a;e++){const e=n[_],r=n[_+1],s=n[_+2];t[w]=c*e+h*r+d*s+y,t[w+1]=f*e+p*r+m*s+v,t[w+2]=l*e+M*r+g*s+S,_+=i,w+=o}return t}function s(t,n,e){u(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function u(t,n,e,o=3,i=o){const s=(0,r.k)(t.length,o,3),u=(0,r.k)(n.length,i,3),a=Math.min(s,u),c=e[0],f=e[1],l=e[2],h=e[3],p=e[4],M=e[5],d=e[6],m=e[7],g=e[8];let y=0,v=0;for(let e=0;e<a;e++){const e=n[y],r=n[y+1],s=n[y+2];t[v]=c*e+h*r+d*s,t[v+1]=f*e+p*r+m*s,t[v+2]=l*e+M*r+g*s,y+=i,v+=o}}function a(t,n,e,r=3,o=r){const i=Math.min(t.length/r,n.length/o);let s=0,u=0;for(let a=0;a<i;a++)t[u]=e*n[s],t[u+1]=e*n[s+1],t[u+2]=e*n[s+2],s+=o,u+=r;return t}function c(t,n,e,r){f(t.typedBuffer,n.typedBuffer,e,r,t.typedBufferStride,n.typedBufferStride)}function f(t,n,e,r,o=3,i=o){const s=Math.min(t.length/o,n.length/i);let u=0,a=0;const c=1/2.2;for(let f=0;f<s;f++)t[a]=r*(e*n[u])**c,t[a+1]=r*(e*n[u+1])**c,t[a+2]=r*(e*n[u+2])**c,u+=i,a+=o}function l(t,n,e,o=3,i=o){const s=(0,r.k)(t.length,o,3),u=(0,r.k)(n.length,i,3),a=Math.min(s,u);let c=0,f=0;for(let r=0;r<a;r++)t[f]=n[c]+e[0],t[f+1]=n[c+1]+e[1],t[f+2]=n[c+2]+e[2],c+=i,f+=o;return t}function h(t,n){p(t.typedBuffer,n.typedBuffer,t.typedBufferStride,n.typedBufferStride)}function p(t,n,e=3,r=e){const o=Math.min(t.length/e,n.length/r);let i=0,s=0;for(let u=0;u<o;u++){const o=n[i],u=n[i+1],a=n[i+2],c=o*o+u*u+a*a;if(c>0){const n=1/Math.sqrt(c);t[s]=n*o,t[s+1]=n*u,t[s+2]=n*a}i+=r,s+=e}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:f,linearToSRGBView:c,normalize:p,normalizeView:h,scale:a,scaleView:function(t,n,e){a(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)},shiftRight:function(t,n,e){const r=Math.min(t.count,n.count),o=t.typedBuffer,i=t.typedBufferStride,s=n.typedBuffer,u=n.typedBufferStride;let a=0,c=0;for(let t=0;t<r;t++)o[c]=s[a]>>e,o[c+1]=s[a+1]>>e,o[c+2]=s[a+2]>>e,a+=u,c+=i},transformMat3:u,transformMat3View:s,transformMat4:i,transformMat4View:o,translate:l},Symbol.toStringTag,{value:"Module"}))},82534(t,n,e){function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}e.d(n,{o8:()=>o,vt:()=>r});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(t,n,e,r){return[t,n,e,r]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,i])},48163(t,n,e){function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function s(){return i(1,1)}function u(){return i(-1,-1)}function a(){return i(1,0)}function c(){return i(0,1)}e.d(n,{fA:()=>i,o8:()=>o,vt:()=>r});const f=s(),l=u(),h=a(),p=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:l,ONES:f,UNIT_X:h,UNIT_Y:p,ZEROS:[0,0],clone:o,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,negativeOnes:u,ones:s,unitX:a,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["IA",0,l,"Un",0,f])},91829(t,n,e){function r(){return[0,0,0,0]}function o(t,n,e,r){return[t,n,e,r]}function i(){return o(1,1,1,1)}function s(){return o(1,0,0,0)}function u(){return o(0,1,0,0)}function a(){return o(0,0,1,0)}function c(){return o(0,0,0,1)}e.d(n,{_Y:()=>c,fA:()=>o,vt:()=>r});const f=[0,0,0,0],l=i(),h=s(),p=u(),M=a(),d=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_W:d,UNIT_X:h,UNIT_Y:p,UNIT_Z:M,ZEROS:f,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:function(t,n,e,r){return[t,n,e,r]},fromArray:function(t,n=[0,0,0,0]){const e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:o,ones:i,unitW:c,unitX:s,unitY:u,unitZ:a,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["Un",0,l,"uY",0,f])},67026(t,n,e){e.d(n,{A6:()=>d,Xd:()=>f,Xr:()=>p,lw:()=>l,x8:()=>c});var r=e(29242),o=e(82534),i=e(51850),s=e(34304),u=e(35522),a=e(78955);function c(t,n,e){e*=.5;const r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function f(t,n){const e=2*Math.acos(n[3]),r=Math.sin(e/2);return r>(0,s.FD)()?(t[0]=n[0]/r,t[1]=n[1]/r,t[2]=n[2]/r):(t[0]=1,t[1]=0,t[2]=0),e}function l(t,n,e){const r=n[0],o=n[1],i=n[2],s=n[3],u=e[0],a=e[1],c=e[2],f=e[3];return t[0]=r*f+s*u+o*c-i*a,t[1]=o*f+s*a+i*u-r*c,t[2]=i*f+s*c+r*a-o*u,t[3]=s*f-r*u-o*a-i*c,t}function h(t,n,e,r){const o=n[0],i=n[1],u=n[2],a=n[3];let c,f,l,h,p,M=e[0],d=e[1],m=e[2],g=e[3];return f=o*M+i*d+u*m+a*g,f<0&&(f=-f,M=-M,d=-d,m=-m,g=-g),1-f>(0,s.FD)()?(c=Math.acos(f),l=Math.sin(c),h=Math.sin((1-r)*c)/l,p=Math.sin(r*c)/l):(h=1-r,p=r),t[0]=h*o+p*M,t[1]=h*i+p*d,t[2]=h*u+p*m,t[3]=h*a+p*g,t}function p(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function M(t,n){const e=n[0]+n[4]+n[8];let r;if(e>0)r=Math.sqrt(e+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{let e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);const o=(e+1)%3,i=(e+2)%3;r=Math.sqrt(n[3*e+e]-n[3*o+o]-n[3*i+i]+1),t[e]=.5*r,r=.5/r,t[3]=(n[3*o+i]-n[3*i+o])*r,t[o]=(n[3*o+e]+n[3*e+o])*r,t[i]=(n[3*i+e]+n[3*e+i])*r}return t}function d(t,n,e,r){const o=.5*Math.PI/180;n*=o,e*=o,r*=o;const i=Math.sin(n),s=Math.cos(n),u=Math.sin(e),a=Math.cos(e),c=Math.sin(r),f=Math.cos(r);return t[0]=i*a*f-s*u*c,t[1]=s*u*f+i*a*c,t[2]=s*a*c-i*u*f,t[3]=s*a*f+i*u*c,t}const m=a.C,g=a.hZ,y=a.WQ,v=l,S=a.hs,_=a.Om,w=a.Cc,A=a.Bw,b=A,B=a.m3,O=B,x=a.S8,I=a.t2,N=a.aI,T=(0,i.vt)(),Z=(0,i.fA)(1,0,0),C=(0,i.fA)(0,1,0),X=(0,o.vt)(),q=(0,o.vt)(),P=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:y,calculateW:function(t,n){const e=n[0],r=n[1],o=n[2];return t[0]=e,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-o*o)),t},conjugate:p,copy:m,dot:_,equals:N,exactEquals:I,fromEuler:d,fromMat3:M,getAxisAngle:f,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],s=e*e+r*r+o*o+i*i,u=s?1/s:0;return t[0]=-e*u,t[1]=-r*u,t[2]=-o*u,t[3]=i*u,t},len:b,length:A,lerp:w,mul:v,multiply:l,normalize:x,random:function(t){const n=s.Ov,e=n(),r=n(),o=n(),i=Math.sqrt(1-e),u=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=u*Math.sin(2*Math.PI*o),t[3]=u*Math.cos(2*Math.PI*o),t},rotateX:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],s=n[3],u=Math.sin(e),a=Math.cos(e);return t[0]=r*a+s*u,t[1]=o*a+i*u,t[2]=i*a-o*u,t[3]=s*a-r*u,t},rotateY:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],s=n[3],u=Math.sin(e),a=Math.cos(e);return t[0]=r*a-i*u,t[1]=o*a+s*u,t[2]=i*a+r*u,t[3]=s*a-o*u,t},rotateZ:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],s=n[3],u=Math.sin(e),a=Math.cos(e);return t[0]=r*a+o*u,t[1]=o*a-r*u,t[2]=i*a+s*u,t[3]=s*a-i*u,t},rotationTo:function(t,n,e){const r=(0,u.Om)(n,e);return r<-.999999?((0,u.$A)(T,Z,n),(0,u.Il)(T)<1e-6&&(0,u.$A)(T,C,n),(0,u.S8)(T,T),c(t,T,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,u.$A)(T,n,e),t[0]=T[0],t[1]=T[1],t[2]=T[2],t[3]=1+r,x(t,t))},scale:S,set:g,setAxes:function(t,n,e,r){const o=P;return o[0]=e[0],o[3]=e[1],o[6]=e[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-n[0],o[5]=-n[1],o[8]=-n[2],x(t,M(t,o))},setAxisAngle:c,slerp:h,sqlerp:function(t,n,e,r,o,i){return h(X,n,o,i),h(q,e,r,i),h(t,X,q,2*i*(1-i)),t},sqrLen:O,squaredLength:B,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"})),e.d(n,["hZ",0,g,"t2",0,I])},48353(t,n,e){e.d(n,{l:()=>c});var r=e(34727),o=e(58083),i=e(51850);function s(t,n,e){const r=Math.sin(t),o=Math.cos(t),i=Math.sin(n),s=Math.cos(n),u=e;return u[0]=-r,u[4]=-i*o,u[8]=s*o,u[12]=0,u[1]=o,u[5]=-i*r,u[9]=s*r,u[13]=0,u[2]=0,u[6]=s,u[10]=i,u[14]=0,u[3]=0,u[7]=0,u[11]=0,u[15]=1,u}var u=e(49208),a=e(21325);function c(t,n,e,r){const i=(0,u.Tp)(t,r);if(null==i)return!1;const c=i.source.spatialReferenceId,M=i.dest.spatialReferenceId;if(c===M&&!f(M)&&(0!==c||(0,a.aI)(t,r)))return(0,o.kN)(e,n),!0;if(f(M)){const t=u.w5[c][10],r=u.w5[10][M];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,p,0),s(l*h[0],l*h[1],e),e[12]=p[0],e[13]=p[1],e[14]=p[2],!0)}const d=f(c);if((3===M||11===M||2===M||5===M)&&(2===c||d||3===c||5===c)){const t=u.w5[c][10],r=u.w5[10][M];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,p,0),d?function(t,n,e){s(t,n,e),(0,o.mg)(e,e)}(l*h[0],l*h[1],e):(0,o.D_)(e),e[12]=p[0],e[13]=p[1],e[14]=p[2],!0)}return!1}function f(t){return 1===t||6===t||8===t||4===t}const l=(0,r.kU)(1),h=(0,i.vt)(),p=(0,i.vt)()},65806(t,n,e){e.d(n,{g:()=>s});var r=e(51850),o=e(99917),i=e(9762);function s(t,n,e,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,e))return u[0]=t.x,u[1]=t.y,u[2]=t.z??0,(0,i.projectBuffer)(u,t.spatialReference,0,n,e,0);const s=(0,o.tryProject)(t,e,r);return!!s&&(n[0]=s.x,n[1]=s.y,n[2]=s.z??0,!0)}const u=(0,r.vt)()},73836(t,n,e){e.d(n,{A:()=>p});var r=e(32198),o=e(69540),i=e(25482),s=e(91429),u=e(58083),a=e(9093),c=e(67026),f=e(82534),l=e(51850),h=e(24770);let p=class extends((0,o.OU)(i.o)){constructor(t){super(t),this.translation=(0,l.vt)(),this.rotationAxis=(0,l.ci)(h.up),this.rotationAngle=0,this.scale=(0,l.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,l.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,a.vt)();return(0,c.x8)(M,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,u.o1)(t,M,this.translation,this.scale),t}get localMatrixInverse(){return(0,u.B8)((0,a.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,u.t2)(this.localMatrix,t.localMatrix)}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"translation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"rotationAxis",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],p.prototype,"rotationAngle",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"scale",void 0),(0,r.Cg)([(0,s.MZ)()],p.prototype,"rotation",null),(0,r.Cg)([(0,s.MZ)()],p.prototype,"localMatrix",null),(0,r.Cg)([(0,s.MZ)()],p.prototype,"localMatrixInverse",null),p=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTransform")],p);const M=(0,f.vt)()},24770(t,n,e){e.d(n,{$I:()=>m,AU:()=>p,g7:()=>d,i4:()=>f,ui:()=>l,vt:()=>c,yo:()=>M});var r=e(34727),o=e(58083),i=e(67026),s=e(82534),u=e(35522),a=e(51850);function c(t=y){return[t[0],t[1],t[2],t[3]]}function f(t,n,e=c()){return(0,u.C)(e,t),e[3]=n,e}function l(t,n=c()){const e=(0,o.l)(v,t);return g(n,(0,r.KJ)((0,i.Xd)(n,e))),n}function h(t,n,e=c()){return(0,i.x8)(v,t,m(t)),(0,i.x8)(S,n,m(n)),(0,i.lw)(v,S,v),g(e,(0,r.KJ)((0,i.Xd)(e,v)))}function p(t,n,e,r=c()){return f(a.Cw,t,_),f(a.JP,n,w),f(a.Cb,e,A),h(_,w,_),h(_,A,r),r}function M(t){return t}function d(t){return t[3]}function m(t){return(0,r.kU)(t[3])}function g(t,n){return t[3]=n,t}const y=[0,0,1,0],v=(0,s.vt)(),S=(0,s.vt)(),_=(c(),c()),w=c(),A=c();e.d(n,["up",0,y])},72727(t,n,e){function r(t,n,e){if(n<=0)return 0;const r=t-e;return r<0?0:Math.floor(r/n)+1}e.d(n,{k:()=>r}),e(53966)},27921(t,n,e){e.d(n,{$Q:()=>_,BX:()=>S,C:()=>u,Cr:()=>f,H:()=>A,O_:()=>c,Qj:()=>a,T7:()=>y,lU:()=>l,mN:()=>b,vE:()=>O,vt:()=>s,wE:()=>B});var r=e(34727),o=e(35522),i=e(51850);function s(t=x){return[t[0],t[1],t[2],t[3]]}function u(t,n){return function(t,n,e,r,o=s()){return o[0]=t,o[1]=n,o[2]=e,o[3]=r,o}(n[0],n[1],n[2],n[3],t)}function a(t){return t}function c(t,n,e){const r=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],o=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return e[0]=n[0]*o,e[1]=n[1]*o,e[2]=n[2]*o,e[3]=-(e[0]*t[0]+e[1]*t[1]+e[2]*t[2]),e}function f(t,n,e,r=s()){const o=e[0]-n[0],i=e[1]-n[1],u=e[2]-n[2],a=t[0]-n[0],c=t[1]-n[1],f=t[2]-n[2],l=i*f-u*c,h=u*a-o*f,p=o*c-i*a,M=l*l+h*h+p*p,d=Math.abs(M-1)>1e-5&&M>1e-12?1/Math.sqrt(M):1;return r[0]=l*d,r[1]=h*d,r[2]=p*d,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function l(t,n,e,r=0,i=Math.floor(e*(1/3)),s=Math.floor(e*(2/3))){if(e<3)return!1;n(p,r);let u=i,a=!1;for(;u<e-1&&!a;)n(M,u),u++,a=!(0,o.t2)(p,M);if(!a)return!1;for(u=Math.max(u,s),a=!1;u<e&&!a;)n(d,u),u++,(0,o.Re)(m,p,M),(0,o.S8)(m,m),(0,o.Re)(g,M,d),(0,o.S8)(g,g),a=!(0,o.t2)(p,d)&&!(0,o.t2)(M,d)&&Math.abs((0,o.Om)(m,g))<h;return a?(f(p,M,d,t),!0):(0!==r||1!==i||2!==s)&&l(t,n,e,0,1,2)}e(78955),e(44280),e(32114),e(32728);const h=.99619469809,p=(0,i.vt)(),M=(0,i.vt)(),d=(0,i.vt)(),m=(0,i.vt)(),g=(0,i.vt)();function y(t,n,e){return function(t){return 0===t||1===t}(O(t,n.origin,n.vector,0,e))}function v(t,n){return b(t,n)<=0}function S(t,n){return b(t,n)>=0}function _(t,n){return function(t,n,e,r,i,s,u){const a=(0,o.Om)(t,e),c=b(t,n);if(a>-1e-6&&a<1e-6)return w(c,i,s);const f=-c/a,l=w(a,i,!1);return!(u&&!l&&!w(c,i,s))&&(l?f>r.c0&&(r.c0=f):f<r.c1&&(r.c1=f),r.c0<=r.c1)}(t,n.ray.origin,n.ray.direction,n,!1,!1,!0)}function w(t,n,e){return e?n?t>=0:t<=0:n?t>0:t<0}function A(t,n,e,r=!1){let i=n.at(-1),s=b(t,i),u=r?s>0:s<=0;for(let a=0;a<n.length;a++){const c=n.at(a),f=b(t,c),l=r?f>0:f<=0;u!==l&&(0,o.Cc)(e(),i,c,s/(s-f)),l&&(0,o.C)(e(),c),i=c,s=f,u=l}}function b(t,n){return(0,o.Om)(t,n)+t[3]}function B(t,n,e){for(let r=0;r<e;++r)if(v(t,n[r]))return!1;return!0}function O(t,n,e,i,s){const u=(0,o.Om)(t,e),a=b(t,n);if(0===u)return a>=0?2:3;let c=-a/u;return 1&i&&(c=(0,r.qE)(c,0,1)),!(4&i)&&c<0||!(8&i)&&c>1?a>=0?2:3:((0,o.WQ)(s,n,(0,o.hs)(s,e,c)),a>=0?0:1)}const x=[0,0,1,0];(0,i.vt)()},44280(t,n,e){e.d(n,{g7:()=>u,gr:()=>s});var r=e(34727),o=e(35522),i=e(51850);function s(t,n){return(0,o.Om)(t,n)/(0,o.Bw)(t)}function u(t,n){const e=(0,o.Om)(t,n)/((0,o.Bw)(t)*(0,o.Bw)(n));return-(0,r.XM)(e)}(0,i.vt)(),(0,i.vt)()},32114(t,n,e){e.d(n,{Rc:()=>p,rq:()=>l,Km:()=>h}),e(44208);var r=e(26390),o=e(29242),i=e(9093),s=e(82534),u=e(48163),a=e(51850),c=e(91829);class f{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new f(u.vt)}static createVec3f64(){return new f(a.vt)}static createVec4f64(){return new f(c.vt)}static createMat3f64(){return new f(o.vt)}static createMat4f64(){return new f(i.vt)}static createQuatf64(){return new f(s.vt)}get test(){}}f.createVec2f64();const l=f.createVec3f64(),h=f.createVec4f64(),p=(f.createMat3f64(),f.createMat4f64());f.createQuatf64()},77793(t,n,e){e.d(n,{V:()=>i,f:()=>s});var r=e(86738),o=e(73836);function i(t,n,e=u){return new r.A({x:t[e.originX],y:t[e.originY],z:t[e.originZ],spatialReference:n})}function s(t,n=u){return new o.A({translation:[t[n.translationX],-t[n.translationZ],t[n.translationY]],rotationAxis:[t[n.rotationX],-t[n.rotationZ],t[n.rotationY]],rotationAngle:t[n.rotationDeg],scale:[t[n.scaleX],t[n.scaleZ],t[n.scaleY]]})}const u={originX:"originX",originY:"originY",originZ:"originZ",translationX:"translationX",translationY:"translationY",translationZ:"translationZ",scaleX:"scaleX",scaleY:"scaleY",scaleZ:"scaleZ",rotationX:"rotationX",rotationY:"rotationY",rotationZ:"rotationZ",rotationDeg:"rotationDeg"}},40050(t,n,e){e.r(n),e.d(n,{assetMapFromAssetMapsJSON:()=>m,extractMesh:()=>d,meshFeatureSetFromJSON:()=>M});var r=e(52106),o=e(53966),i=e(91869),s=e(5443),u=e(16930),a=e(40118),c=e(63579),f=e(20557),l=e(22671),h=e(77793);const p=()=>o.A.getLogger("esri.rest.support.meshFeatureSet");function M(t,n,e){const o=e.features;e.features=[],delete e.geometryType;const i=l.A.fromJSON(e);if(i.geometryType="mesh",!e.assetMaps)return i;const s=m(n,e.assetMaps),a=t.sourceSpatialReference??u.A.WGS84,c=e.globalIdFieldName,{outFields:f}=t,h=null!=f&&f.length>0?(p=f.includes("*")?null:new Set(f),({attributes:t})=>{if(!t)return{};if(!p)return t;for(const n in t)p.has(n)||delete t[n];return t}):()=>({});var p;for(const t of o){const e=d(t,c,a,n,s);i.features.push(new r.A({geometry:e,attributes:h(t)}))}return i}function d(t,n,e,r,o){const i=t.attributes[n],u=o.get(i);if(null==u||!t.geometry)return null;const f=(0,h.V)(t.attributes,e,r.transformFieldRoles),l=s.A.fromJSON(t.geometry);l.spatialReference=e;const p=(0,h.f)(t.attributes,r.transformFieldRoles),M=e.isGeographic?"local":"georeferenced",d=function(t){const n=Array.from(t.files.values()),e=new Array;for(const t of n){if(2!==t.status)return null;const n=new Array;for(const e of t.parts){if(!e)return null;n.push(new c.Bq(e.url,e.hash))}e.push(new c.Qp(t.name,t.mimeType,n))}return{type:"service",assets:e}}(u);return d?(0,a.createWithExternalSource)(f,d,{extent:l,transform:p,vertexSpace:M,unitConversionDisabled:!0}):(0,a.H5)(f,{transform:p,vertexSpace:M})}function m(t,n){const e=new Map;for(const r of n){const n=r.parentGlobalId;if(null==n)continue;const o=r.assetName,s=r.assetType,u=r.assetHash,a=r.assetURL,c=r.conversionStatus,l=r.seqNo,h=(0,f.Fm)(s,t.supportedFormats);if(!h){p().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${s}, but it does not list it as a supported type`);continue}const M=(0,i.tE)(e,n,()=>({files:new Map}));(0,i.tE)(M.files,o,()=>({name:o,type:s,mimeType:h,status:g(c),parts:[]})).parts[l]={hash:u,url:a}}return e}function g(t){switch(t){case"COMPLETED":case"SUBMITTED":return 2;case"INPROGRESS":return 1;default:return 0}}},32728(t,n,e){e.d(n,{YH:()=>s,nu:()=>u,wp:()=>i}),e(34727);var r=e(35522),o=e(51850);function i(t,n){const e=Math.sqrt(n[0]*n[0]+n[4]*n[4]+n[8]*n[8]),o=Math.sqrt(n[1]*n[1]+n[5]*n[5]+n[9]*n[9]),i=Math.sqrt(n[2]*n[2]+n[6]*n[6]+n[10]*n[10]);return(0,r.hZ)(t,e,o,i),t}function s(t,n,e){e=e||t;const o=(0,r.Om)(t,n);(0,r.hZ)(e,t[0]-o*n[0],t[1]-o*n[1],t[2]-o*n[2]),(0,r.S8)(e,e)}function u(t,n,e,i=(0,o.vt)()){const s=(0,r.Bw)(t),u=(0,r.Bw)(n),f=(0,r.Om)(t,n)/(s*u);if(f<.9999999999999999){const o=Math.acos(f),l=((1-e)*s+e*u)/Math.sin(o),h=l/s*Math.sin((1-e)*o),p=l/u*Math.sin(e*o);return(0,r.hs)(a,t,h),(0,r.hs)(c,n,p),(0,r.WQ)(i,a,c)}return(0,r.Cc)(i,t,n,e)}(0,o.vt)(),(0,o.vt)(),(0,o.vt)();const a=(0,o.vt)(),c=(0,o.vt)()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9530],{40523(e,t,r){r.d(t,{h:()=>h});const s=Symbol.for("controller");let o;const n=e=>o;let i,a=[];const l=e=>{const t=n().manager.X(e);if(void 0!==t)return t;if((e=>"object"==typeof e&&null!==e&&(s in e||"hostConnected"in e||"hostDisconnected"in e||"hostUpdate"in e||"hostUpdated"in e))(e))return e;const r=(()=>{const e=i;return i=void 0,e})();return void 0!==r?r:void 0};let h=!1;r.d(t,["a",0,e=>{if(void 0===e)return void(a=[]);const t=a.indexOf(e);a=-1===t?[...a,e]:a.slice(0,t+1),queueMicrotask(()=>a=[])},"b",0,()=>a,"c",0,e=>{h=!0;try{return e()}finally{h=!1}},"d",0,s,"f",0,e=>{i!==e&&(i=e,queueMicrotask(()=>i===e?i=void 0:0))},"i",0,e=>"function"==typeof e?.then,"j",0,async e=>{const t=l(e);return await t.ready,t},"k",0,l,"r",0,n,"s",0,e=>{o!==e&&(o=e,queueMicrotask(()=>o===e?o=void 0:0))},"u",0,async(e,t)=>{const r=l(e);if(void 0===r)return e;if(await r.ready,"function"==typeof t){const e=r.watchExports(r=>t(r,e))}return r.exports}])},90824(e,t,r){r.d(t,{C:()=>f});var s=r(71785),o=r(40523),n=r(58933),i=r(53666),a=r(44613);let l;const h=()=>{l?.forEach(({callbacks:e},t)=>{const r=Object.keys(t);e.forEach(e=>e(r))}),l=void 0},c=(e,t,r)=>{const o=e.manager;return o.V!==n.s6&&o.V!==r&&o.S(void 0,void 0),0===o.T.length&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=r,o.T.push((e,o)=>(0,s.UF)(t,void 0,r===o?e:void 0)),r},d=(e=[(0,o.r)(),...(0,o.b)()],t,r)=>{const n=Array.isArray(e)?e:[e];let i=n.length+1;const a=e=>{i-=1,void 0!==e&&(i=Math.min(i,0)),0===i&&t(e)};n.forEach(e=>((e,t,r)=>{const o=Object.keys(e),n=o.length;void 0===l&&queueMicrotask(h),l??=new Map;let i=l.get(e);return void 0===i&&(i={callbacks:[],keyCount:n},l.set(e,i)),i.keyCount!==n&&(i.callbacks.forEach(e=>e(o)),i.callbacks=[],i.keyCount=n),i.callbacks.push(o=>{const i=e=>(0,s.UF)(t,null,e),a=o[n];void 0===a?i(void 0):e[a]===r?i(a):i(void 0)}),r})(e,t=>a(void 0===t?void 0:{key:t,host:e,isReactive:!1}),r));for(const e of n)if("manager"in e&&e.manager.component===e){c(e,t=>a(void 0===t?void 0:{key:t,host:e,isReactive:!0}),r);break}return r},u=((e="",t={},r=(0,o.r)())=>{const s={emit:s=>{""===e&&h();const o=new CustomEvent(e,{detail:s,cancelable:!0,bubbles:!0,composed:!0,...t});return r.el.dispatchEvent(o),o}};return""===e&&d(void 0,t=>e=t.key,s),s}).bind(null,"");var p;p=o.d;class f{constructor(e){this.#e=[],this.#t=[],this.#r=[],this.#s=[],this.#o=[],this.#n=[],this.#i=[],this.#a=[],this.#l=[],this.#h=!1,this.P=new i.cY,this.connectedCalled=!1,this.loadedCalled=!1,this[p]=!0,this.#c=[];const t=this,r=e??(0,o.r)(new.target.name);t.#d=r,t.ready=t.P.promise,t.#u=m(t),t.component=r,t.#d.addController(t),void 0===t.#d.manager||((0,o.a)(t),queueMicrotask(()=>t.catchUpLifecycle()))}#e;#t;#r;#s;#o;#n;#i;#a;#l;#h;#d;catchUpLifecycle(){const{manager:e}=this.#d;!e.connectedCalled||this.connectedCalled||this.triggerConnected(),!e.#h||this.triggerLoad().then(()=>e.loadedCalled&&this.triggerLoaded()).catch((0,a.G3)(this.#d))}#u;get exports(){return this.#u}set exports(e){const t=this.#u;t!==e&&(this.#u=e,this.#c.forEach(s.UF),this.connectedCalled&&!1!==this.O&&this.#d.requestUpdate(this.O,t)),this.P.resolve(e)}setProvisionalExports(e,t=!0){this.#u=t?m(e):e,this.#c.forEach(s.UF)}#c;watchExports(e){const t=()=>e(this.#u);return this.#c.push(t),()=>{this.#c.splice(this.#c.indexOf(t),1)}}get use(){return(0,o.s)(this.#d),o.u}get useRef(){return(0,o.s)(this.#d),o.j}get useRefSync(){return(0,o.s)(this.#d),o.k}controllerRemoved(){this.#d.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(e){this.#e.push(e)}onDisconnected(e){this.#t.push(e)}onLoad(e){this.#r.push(e)}onLoaded(e){this.#s.push(e)}onUpdate(e){this.#o.push(e)}onUpdated(e){this.#n.push(e)}onDestroy(e){this.#i.push(e)}onLifecycle(e){this.#a.push(e),this.connectedCalled&&this.#d.el.isConnected&&this.#p(e)}triggerConnected(){const e=this;e.hostConnected&&(0,s.UF)(e.hostConnected,e),e.#e.forEach(s.UF),e.triggerLifecycle(),e.connectedCalled=!0}triggerDisconnected(){const e=this;e.hostDisconnected&&(0,s.UF)(e.hostDisconnected,e),e.#t.forEach(s.UF),e.#l.forEach(s.UF),e.#l=[]}async triggerLoad(){if(this.#h)return;this.#h=!0;const e=this;e.hostLoad&&await(0,s.ao)(e.hostLoad,e),this.#r.length>0&&await Promise.allSettled(this.#r.map(s.ao)),this.P.resolve(this.#u)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&(0,s.UF)(this.hostLoaded,this),this.#s.forEach(s.UF),this.loadedCalled=!0)}triggerUpdate(e){this.hostUpdate&&(0,s.UF)(this.hostUpdate,this,e),this.#o.forEach(g,e)}triggerUpdated(e){this.hostUpdated&&(0,s.UF)(this.hostUpdated,this,e),this.#n.forEach(g,e)}triggerDestroy(){this.hostDestroy&&(0,s.UF)(this.hostDestroy,this),this.#i.forEach(s.UF)}triggerLifecycle(){this.hostLifecycle&&this.#p(()=>this.hostLifecycle()),this.#a.forEach(this.#p,this)}#p(e){(0,o.s)(this.#d);const t=(0,s.UF)(e);(Array.isArray(t)?t:[t]).forEach(e=>{"function"==typeof e?this.#l.push(e):"object"==typeof e&&"function"==typeof e.remove&&this.#l.push(e.remove)})}}function g(e){(0,s.UF)(e,void 0,this)}const m=e=>{if("object"!=typeof e&&"function"!=typeof e||null===e)return e;const t=new Proxy(e,{get(e,r,s){if("exports"!==r&&"_exports"!==r||!(r in e)||e[r]!==t)return r in e||r in Promise.prototype||"symbol"==typeof r?"function"==typeof e?e[r]:Reflect.get(e,r,s):void 0}});return t},v=f;r.d(t,["G",0,v,"a",0,d,"b",0,u,"p",0,h])},47061(e,t,r){r.d(t,{WF:()=>b,le:()=>U,s6:()=>P,CP:()=>C,zl:()=>T,Bq:()=>R,pf:()=>O});var s=r(90824),o=(r(25856),r(66047),r(53666));const n=e=>{let t=e;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){const r=t;return r.manager?.loadedCalled||(r.J??r._offspring).push(e),(r.I??r._postLoad).promise}return!1},i={};function a(){}function l(e){for(const t of["Associated","Disabled","Reset","StateRestore"]){const r=`orm${t}Callback`;e.prototype["f"+r]=async function(...e){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${r}`,{detail:e}))}}}const h=Object.defineProperty,c=globalThis.HTMLElement??a;class d extends c{constructor(){super(),this.#f={},this.#g=[],this.I=new o.cY,this.H=new o.cY,this.J=[];const e=this,t=e.constructor;e._offspring=e.J,e._postLoad=e.I,t.C?.forEach(t=>{Object.hasOwn(e,t)&&(e.#f[t]=e[t],delete e[t])}),t.A?e.#m({a:t.A}):t.B.then(async r=>{await t.K.p,e.#m(await(r.default?.then(e=>"function"==typeof e?{a:e}:e)??r))}).catch(t=>{e.H.reject(t),setTimeout(()=>{throw t})})}static{this.lumina=!0}static F(){for(const e of this.C??[])h(this.prototype,e,{configurable:!0,enumerable:!0,get(){return this.#f[e]},set(t){this.#f[e]=t}});for(const e of this.E??[])h(this.prototype,e,{async value(...t){this.#v||await this.H.promise;const r=this.#v;return await r[e](...t)},configurable:!0});for(const e of this.D??[])h(this.prototype,e,{value(...t){return this.#v[e](...t)},configurable:!0})}static{l(this)}#v;#f;#g;get manager(){return this.#v?.manager}attributeChangedCallback(e,t,r){this.#v?.attributeChangedCallback(e,t,r),this.#v||this.#g.push(e)}connectedCallback(){this.#v?this.#v.connectedCallback?.():queueMicrotask(()=>this.G=n(this))}disconnectedCallback(){this.#v?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#m(e){const t=this.constructor,r=t.L,s=this.#f,o=Object.values(e).find(e=>e.L===r),n=`${r}--lazy`;let i=o;for(;i&&!Object.hasOwn(i,"lumina");)i=Object.getPrototypeOf(i);p(i),!t.A&&(t.A=o,customElements.define(n,o)),o.N=this;const a=document.createElement(n);o.N=void 0,this.#v=a,this.#f=a,this.#g.forEach(e=>a.attributeChangedCallback(e,null,this.getAttribute(e))),Object.entries(s).forEach(u,a);const l=this.isConnected;(l||this.G)&&(a.connectedCallback?.(),l||a.disconnectedCallback())}addController(){}requestUpdate(){this.#v?.requestUpdate()}}function u([e,t]){this[e]=t}const p=e=>{const t=e.prototype,r=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(e,t){r.setAttribute.call(this.el,e,t)},t.removeAttribute=function(e){r.removeAttribute.call(this.el,e)},t.hasAttribute=function(e){return r.hasAttribute.call(this.el,e)},h(t,"isConnected",{get(){return Reflect.get(r,"isConnected",this.el)}}))};var f=r(71785),g=r(60026),m=r(58933),v=r(40523);class y extends s.G{constructor(e){super(e),this.destroyed=!1,this.R=!1,this.V=m.s6,this.T=[],this.#y=new WeakMap,this.#d=e,this.exports=void 0,this.hasDestroy=w in e&&"function"==typeof e.destroy,m.WF.prototype.addController.call(e,{hostConnected:()=>{if(this.destroyed){const t=e.el.localName;throw e.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${w} prop.`)}void 0!==this.#_&&clearTimeout(this.#_),(0,s.p)();for(const t of e.M)"triggerConnected"in t?t.triggerConnected():(0,f.UF)(t.hostConnected,t)},hostDisconnected:()=>{for(const t of e.M)"triggerDisconnected"in t?t.triggerDisconnected():(0,f.UF)(t.hostDisconnected,t);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const t of e.M)"triggerUpdate"in t?t.triggerUpdate(this.Q):(0,f.UF)(t.hostUpdate,t,this.Q)},hostUpdated:()=>{for(const t of e.M)"triggerUpdated"in t?t.triggerUpdated(this.Q):(0,f.UF)(t.hostUpdated,t,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),(0,v.s)(e)}#_;#d;async destroy(){if(!this.destroyed){this.#d.el.isConnected&&(this.hasDestroy=!1,this.#d.el.remove()),this.#_=void 0,this.destroyed=!0;for(const e of this.#d.M)"triggerDestroy"in e?e.triggerDestroy():(0,f.UF)(e.hostDestroy,e);this.#d.M.splice(0)}}U(){if(void 0!==this.#_&&clearTimeout(this.#_),!this.#d.el.isConnected&&!this.#d.autoDestroyDisabled){const e=()=>{this.#d.destroy()};this.#_=(0,o.oK)(e,_)}}S(e,t){const r=this.T;this.V=m.s6,this.T=[],r.forEach(r=>r(e,t))}#y;W(e,t){("object"==typeof t&&null!==t||"function"==typeof t)&&this.#y.set(t,e)}X(e){return"object"==typeof e&&null!==e||"function"==typeof e?this.#y.get(e):void 0}}let _=1e3;const w="autoDestroyDisabled";var S=r(10845),k=r(84),A=r(66567),I=(r(98171),r(83435));class b extends m.WF{constructor(){super(),this.M=[],this.manager=new y(this);const e=this,t=e.constructor,r=t.N,s=t.K.o,n=b.prototype.shouldUpdate;e.#w=r?.H??new o.cY,e.I=r?.I??new o.cY,e.J=r?.J??[],e._offspring=e.J,e._postLoad=e.I,e.el=r??e,e.#S=e.enableUpdating,e.enableUpdating=a,e.shouldUpdate!==n&&(e.#k=e.shouldUpdate,e.shouldUpdate=n),s&&(e.#A=new Map,t.elementProperties.forEach((t,r)=>e.#A.set(r,s()))),m.S$&&e.el.setAttribute(t.K.hydratedAttribute,"")}static finalizeStyles(e){const t=super.finalizeStyles(e),r=this.shadowRootOptions===i;return void 0===this.K?.commonStyles||r?t:[this.K.commonStyles,...t]}static createProperty(e,t){const r="number"==typeof t?t:Array.isArray(t)?t[0]:0,s=Array.isArray(t)?t[1]:void 0,o=s?.hasChanged??m.Ec,n={attribute:!!(1&r&&"string"==typeof e)&&(0,g.j1)(e),reflect:!!(2&r),type:4&r?Boolean:8&r?Number:void 0,state:!!(16&r),readOnly:!!(32&r),noAccessor:!!(64&r),useDefault:!!(128&r),c:!1,...s,hasChanged(e,t){const r=o(e,t);return n.c=r,r}};super.createProperty(e,n)}static getPropertyDescriptor(e,t,r){const o=this.K,n=super.getPropertyDescriptor(e,t,r);return r.d=n,{...n,get(){return o.t?.(this.#A.get(e)),n.get?.call(this)},set(t){const o=this.manager;if(r.readOnly&&!v.h&&(o.R||o.connectedCalled))throw Error(`Cannot assign to read-only property "${e}" of ${this.el.localName}. Trying to assign "${t}"`);n.set.call(this,t??void 0),r.c&&this.#A?.get(e)?.notify(),o.T.length>0&&((0,s.p)(),o?.S(e,t))}}}static{this.lumina=!0}static{l(this)}#A;#k;#S;#w;#I;#b;get elementInternals(){return this.#b??=this.el.attachInternals(),this.#b}connectedCallback(){this.hasAttribute("defer-hydration")||this.#U(!0)}#U(e){const t=this.constructor.K.c?.(()=>this.requestUpdate());this.#I=t;const r=!this.manager.connectedCalled;e&&super.connectedCallback(),r?queueMicrotask(()=>this.#C().catch(e=>{this.#w.reject(e),setTimeout(()=>{throw e})})):t&&this.requestUpdate()}#T(e){try{this.#I.clear(),this.constructor.K.r(this.#I,()=>super.update(e))}catch(e){throw this.#I.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#I?.destroy(),this.#I=void 0}createRenderRoot(){const e=this.el.shadowRoot,t=this.constructor,r=t.shadowRootOptions,s=e??(r===i?this.el:this.el.attachShadow(r));if(e)return this.manager.connectedCalled||this.#U(!1),m.WF.prototype.createRenderRoot.call(this),e;if(this.isConnected){const e=s.getRootNode();e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t.elementStyles.map(e=>"styleSheet"in e?e.styleSheet:e)]}return s}async#C(){const e=this.el.G??n(this.el);e&&await e;const t=[];for(const e of this.M)"triggerLoad"in e?t.push(e.triggerLoad()):t.push((0,f.ao)(e.hostLoad,e));await Promise.all(t),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate(e=>e.has(w)&&this.manager.U()),this.#S(!0),this.performUpdate(),this.I.resolve(),await 0;const r=this.J.filter(e=>!e.manager?.loadedCalled);r.length&&await Promise.allSettled(r.map(async e=>await e.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const e of this.M)"triggerLoaded"in e?e.triggerLoaded():(0,f.UF)(e.hostLoaded,e);this.loaded?.(),this.#w.resolve()}shouldUpdate(e){return this.manager.Q=e,this.#k?.(e)??!0}update(e){this.#I?this.#T(e):super.update(e)}listen(e,t,r){const s=t?.bind(this)??t;this.manager.onLifecycle(()=>(this.el.addEventListener(e,s,r),()=>this.el.removeEventListener(e,s,r)))}listenOn(e,t,r,s){const o=r?.bind(this)??r;this.manager.onLifecycle(()=>(e.addEventListener(t,o,s),()=>e.removeEventListener(t,o,s)))}async componentOnReady(){return await this.#w.promise,this}addController(e){this.M.push(e),!(v.d in e)&&this.renderRoot&&this.el.isConnected&&e.hostConnected?.()}removeController(e){this.M.splice(this.M.indexOf(e),1),e.controllerRemoved?.()}}const U=e=>{let t;const r=e=>{t=new URL(e,globalThis.location?.href||void 0).href},s={...e,getAssetPath(e){const r=new URL(e,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:r,customElement(e,t){t.K=s,t.L=e,m.S$?function(){try{customElements.define(e,t)}catch{}}():customElements.get(e)||customElements.define(e,t)}};return r(e.defaultAssetPath),s},C=e=>"object"==typeof e&&null!=e?(0,S.H)(e):e,T=e=>"object"==typeof e&&null!=e?(0,k.W)(e):e;class x extends A.WL{#x;#P;constructor(e){super(e);const t=this;this.#P=function(e){return t.#x.call(this,e)}}render(e){return"function"==typeof e?(this.#x=e,(0,I.K)(this.#P)):(0,I.K)(e)}}(0,A.u$)(x);const P=m.s6;function R(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)}const O={toAttribute:e=>!0===e?"":!1===e?null:e}},39061(e,t,r){r.d(t,{u:()=>n});const s={},o=(e,t)=>{let r=e;for(;r;){const e=r.closest?.(t);if(e)return e;const s=r.getRootNode?.();if(s===globalThis.document)return;r=s?.host}};function n(e){const t=o(e,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return t?.classList.contains("calcite-mode-dark")||t?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}r.d(t,["g",0,(e,t,r)=>{const s=o(e,`[${t}]`);return s?.getAttribute(t)??r},"o",0,(e,t,r)=>(0,(e=>{const t=e.join(","),r=s[t];if(void 0!==r)return r;const o=new Set,n=new MutationObserver(e=>o.forEach(t=>t(e)));globalThis.document&&n.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});const i={subscribe:e=>(o.add(e),()=>{o.delete(e),0===o.size&&(n.disconnect(),s[t]=void 0)})};return s[t]=i,i})(t).subscribe)(t=>{const s=t.some(t=>((e,t)=>{let r=e;for(;r;){if(r===t)return!0;if(!r.parentNode)return!1;r=r.parentNode instanceof ShadowRoot?r.parentNode.host:r.parentNode}return!1})(e,t.target));s&&r()})])},71785(e,t,r){r.d(t,["UF",0,(e,t,...r)=>{try{return e?.call(t,...r)}catch(t){console.error(t,e)}},"ao",0,async(e,t,...r)=>{try{const s=e?.call(t,...r);return await s}catch(t){console.error(t,e)}}])},44613(e,t,r){const s=new Set;const o=e=>"string"==typeof e?e:"el"in e?e.el.localName:"localName"in e?e.localName:e.declaredClass;r.d(t,["G3",0,e=>{const t=`[${o(e)}] `;return e=>{const r=e instanceof Error&&e.message?e:new Error(String(e));r.message=`${t}${r.message}`,setTimeout(()=>{throw e})}},"Rm",0,(e,t,r,n)=>{const i=o(t);if(n?.once){const t=`${e}${i}${r}`;if(s.has(t))return;s.add(t)}let a;if(n?.detail){a={};for(const[e,t]of Object.entries(n.detail))if("object"!=typeof t&&"function"!=typeof t||null===t)a[e]=t;else{const r=new WeakRef(t);Object.defineProperty(a,e,{enumerable:!0,get:()=>r.deref()})}console[e](`[${i}]: ${r}`,a)}else console[e](`[${i}]: ${r}`)}])},53666(e,t,r){r.d(t,{cY:()=>s});class s{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}r.d(t,["oK",0,(e,t)=>{const r=t>4e3?2e3:t/4;let s=0;const o=setInterval(()=>{s+=r,s>=t&&(clearInterval(o),e())},r);return o}])},60026(e,t,r){const s=/[A-Z]+(?![a-z])|[A-Z]/gu,o=e=>e.charAt(0).toUpperCase()+e.slice(1);crypto,r.d(t,["TK",0,e=>e.split("-").map(o).join(""),"YF",0,e=>e.charAt(0).toLowerCase()+e.slice(1),"j1",0,e=>e.replace(s,(e,t)=>`${0===t?"":"-"}${e.toLowerCase()}`)])},36708(e,t,r){r.d(t,{C_:()=>u,on:()=>d,wB:()=>l,z7:()=>h});var s=r(37955),o=r(36563),n=r(97768),i=r(17676),a=r(14012);function l(e,t,r={}){return c(e,t,r,p)}function h(e,t,r={}){return c(e,t,r,f)}function c(e,t,r={},s){let o=null;const i=r.once?(e,r)=>{s(e)&&((0,n.xt)(o),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(o=(0,a.Cn)(e,i,r.sync,r.equals),r.initial){const t=e();i(t,t)}return o}function d(e,t,r,i={}){let a=null,h=null,c=null;function d(){a&&h&&(h.remove(),i.onListenerRemove?.(a),a=null,h=null)}function u(e){i.once&&i.once&&(0,n.xt)(c),r(e)}const p=l(e,(e,r)=>{d(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),i.onListenerAdd?.(e))},{sync:i.sync,initial:!0});return c=(0,o.hA)(()=>{p.remove(),d()}),c}function u(e,t){return function(e,t,r){if((0,i.G4)(r))return Promise.reject((0,i.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,o.vE)([(0,i.u7)(r,()=>{l(),n((0,i.NK)())}),c(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559),r.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},16494(e,t,r){var s=r(75620);const o=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),n=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],i=new s.I({whiteList:o,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(n.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);r.d(t,["Nd",0,a,"W5",0,i])},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>o,vD:()=>i,yS:()=>n});const s="randomUUID"in crypto;function o(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o().toUpperCase()}}`}function i(){return`{${o()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},50148(e,t,r){r.r(t),r.d(t,{default:()=>ht});var s=r(70333),o=r(92602),n=r(11254),i=r(49186),a=r(65529),l=r(37955),h=r(4718),c=r(93637),d=r(17676),u=r(84952),p=r(32198),f=r(91429),g=r(64108);let m=class extends a.nJ{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,o=r?.owningSystemUrl,n=o?t.findServerInfo(o):null;!1===e||o&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,h.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,p.Cg)([(0,f.MZ)()],m.prototype,"creationTime",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"expires",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"isAdmin",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"oAuthState",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"resources",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"scope",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"ssl",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"token",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"tokenRefreshBuffer",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"userId",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"validity",void 0),m=(0,p.Cg)([(0,g.$)("esri.identity.Credential")],m);const v=m;var y=r(79783),_=r(39061);function w(e){return function(){const e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,_.u)(e??document.body)}function S(e){return function(e){return`calcite-mode-${e}`}(w(e))}r(44208);var k=r(53966),A=r(97768),I=r(61893),b=r(36708),U=r(13069),C=r(62788),T=r(71429),x=r(16494);const P="http://www.w3.org/",R=`${P}2000/svg`,O=`${P}1999/xlink`;let D=[],L=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},M=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),E=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},N=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(M(e[s],t))return s;return-1},j=(e,t,r,s)=>{let o=e[t];if(""===o.vnodeSelector)return;let n=o.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(M(t,o))throw new Error(`${r.vnodeSelector} had a ${o.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},$=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},F=[],q=!1,Z=e=>{(e.children||[]).forEach(Z),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{q=!1,F.forEach(Z),F.length=0},z=e=>{F.push(e),q||(q=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},B=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),z(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),z(e))},H=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,o=Object.keys(t),n=o.length;for(let i=0;i<n;i++){let n=o[i],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)Y(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let o=0;o<s;o++){let s=t[o],n=a[s];n&&(E(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let o=typeof a;"function"===o?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===R?"href"===n?e.setAttributeNS(O,n,a):e.setAttribute(n,a):"string"===o&&"value"!==n?"innerHTML"===n?e[n]=x.W5.sanitize(a):W(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let J,G=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)K(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),H(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},K=(e,t,r,s)=>{let o,n=0,i=e.vnodeSelector,a=t.ownerDocument;if(""===i)o=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(o,r):t.appendChild(o);else{for(let l=0;l<=i.length;++l){let h=i.charAt(l);if(l===i.length||"."===h||"#"===h){let h=i.charAt(n-1),c=i.slice(n,l);"."===h?o.classList.add(c):"#"===h?o.id=c:("svg"===c&&(s=L(s,{namespace:R})),void 0!==s.namespace?o=e.domNode=a.createElementNS(s.namespace,c):(o=e.domNode=e.domNode||a.createElement(c),"input"===c&&e.properties&&void 0!==e.properties.type&&o.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(o,r):o.parentNode!==t&&t.appendChild(o)),n=l+1}}G(o,e,s)}},Y=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},Q=(e,t,r,s,o)=>{if(r===s)return!1;s=s||D;let n,i=(r=r||D).length,a=s.length,l=0,h=0,c=!1;for(;h<a;){let a=l<i?r[l]:void 0,d=s[h];if(void 0!==a&&M(a,d))c=J(a,d,o)||c,l++;else{let a=N(r,d,l+1);if(a>=0){for(n=l;n<a;n++)B(r[n]),j(r,n,e,"removed");c=J(r[a],d,o)||c,l=a+1}else K(d,t,l<i?r[l].domNode:void 0,o),$(d),j(s,h,e,"added")}h++}if(i>l)for(n=l;n<i;n++)B(r[n]),j(r,n,e,"removed");return c};J=(e,t,r)=>{let s=e.domNode,o=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,o=!0,o}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=L(r,{namespace:R})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=Q(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let o=!1,n=Object.keys(r),i=n.length;for(let a=0;a<i;a++){let i=n[a],l=r[i],h=t[i];if("class"===i)h!==l&&(Y(e,h,!1),Y(e,l,!0));else if("classes"===i){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(o=!0,n?t.add(s):t.remove(s))}}else if("styles"===i){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],i=l[r];i!==h[r]&&(o=!0,i?(E(i),s.styleApplyer(e,r,i)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==i||W(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===R?"href"===i?e.setAttributeNS(O,i,l):e.setAttribute(i,l):"string"===t?"innerHTML"===i?e[i]=x.W5.sanitize(l):"role"===i&&""===l?e.removeAttribute(i):W(e)&&i in e?e[i]=l:e.setAttribute(i,l):e[i]!==l&&(e[i]=l),o=!0)}}else{let t=e[i];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[i]=l,e["oninput-value"]=void 0),l!==h&&(o=!0)}}return o})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),o};let X=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,J(s,r,t)},domNode:e.domNode});const ee={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let te,re=e=>L(ee,e),se=(e,t,r)=>(r=re(r),K(t,e,void 0,r),X(t,r)),oe=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),X(t,r)),ne=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),X(t,r)),ie=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),e.parentNode.removeChild(e),X(t,r));te=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ae={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},le={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.startsWith("-")?e.style.setProperty(t,r):e.style[t]=r}},he=(e,t,r=!1)=>{let s=e;return t.forEach((e,o)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;r&&!n&&o!==t.length-1||(s=n)}),s};var ce=r(84210),de=r(2741);let ue;ue="components/assets";var pe=r(36563);const fe=Symbol("widget"),ge=Symbol("widget-test-data"),me=[],ve={},ye=new Map;function _e(e,t){const r=t.vnodeSelector;if(Ae(r)){const s=t.properties||ve,o=s.key||r,n=t.children?.length?t.children:me,i={key:o,afterCreate:we,afterUpdate:Se,afterRemoved:ke,parentWidget:e,widgetConstructor:r,widgetProperties:{...s,key:o,children:n}};return{vnodeSelector:r.vnodeSelector,properties:i,children:void 0,text:void 0,domNode:null}}const s=t.children;if(s?.length)for(let t=0;t<s.length;++t)s[t]=_e(e,s[t]);return t}function we(e,t,r,{parentWidget:s,widgetConstructor:o,widgetProperties:n}){const i=new o(n);i.container=e,ye.set(e,i),i.afterCreate?.(i,e),s.addHandles((0,pe.hA)(()=>ke(e))),queueMicrotask(()=>{i[ge].projector?.renderNow()})}function Se(e,t,r,{widgetProperties:s}){const o=ye.get(e);o&&(o.set(s),o.afterUpdate?.(o,e))}function ke(e){const t=ye.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),ye.delete(e))}function Ae(e){return"function"==typeof e&&e[fe]}const Ie=new Set;new Map;const be=new Map;function Ue(){be.clear()}function Ce(e){be.delete(e)}var Te=r(98291),xe=r(76030);function Pe(e){return e.matches(":focus-within")||document.activeElement===e}(()=>{const e=new Map;new ResizeObserver(t=>{Ue();for(const r of t)e.get(r.target)?.(r)})})();var Re=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Oe=function(e,t){for(var r=0,s=e.length;r<s;r++){var o=e[r];Array.isArray(o)?Oe(o,t):null!=o&&!1!==o&&(o.hasOwnProperty("vnodeSelector")||(o=Re(o)),t.push(o))}};const De=function(...e){const t=Te.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],o=typeof s;if("string"===o)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===o)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return Te.A.release(t),r},Le=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function Me(e,t,...r){return"function"!=typeof e||Ae(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var o=[];return Oe(r,o),{vnodeSelector:e,properties:t||void 0,children:o,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var Ee,Ne;let je=0;function $e(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?$e(e[s],t[s]):e[s]=t[s]);return e}const Fe=(e=>{let t;const r={...ae,...e},s=(n=r,{...le,...n}),o=s.performanceLogger;var n;let i,a=!0,l=!1;const h=[],c=[],d=(e,n,i)=>{let a;s.eventHandlerInterceptor=(e,s,n,i)=>function(e){let s;o("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),i=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&i){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=he(a.getLastRender(),r,!0)}else n.reverse(),s=he(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),o("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=i();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),c.push(i),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(i=void 0,a){a=!1,o("renderStart",void 0);for(let e=0;e<h.length;e++){const t=c[e]();o("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}o("patched",void 0)}o("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,c)),t={renderNow:u,scheduleRender:()=>{i||l||(i=requestAnimationFrame(u))},stop:()=>{i&&(cancelAnimationFrame(i),i=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{d(se,e,t)},insertBefore:(e,t)=>{d(oe,e,t)},merge:(e,t)=>{d(ne,e,t)},replace:(e,t)=>{d(ie,e,t)},detach:e=>{for(let t=0;t<c.length;t++)if(c[t]===e)return c.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,o,n)=>{const i=t?.(e,s,o,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in o)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>i?.call(o,e);o.addEventListener(t,r,a);const s=()=>o.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return i}},handleInterceptedEvent(e,t,r,s){const{eventPhase:o,type:n}=s,i=o===Event.CAPTURING_PHASE;let a=`on${n}${i?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${i?"Capture":""}`,l&&a in l))&&(Ue(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let qe=!1,Ze=class extends((0,I.g)(a.nJ)){static{this[Ee]=!0}constructor(e,t){super(e,t),this[Ne]=!0,this._attached=!1,this._projector=Fe,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=(0,d.sg)(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,y.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=$e((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&k.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,pe.hA)()),ce.qu||(0,ce.Qu)((0,u.s2)((0,de.s)("components/assets")));const r="esri-widget-uid-"+(0,U.lk)(),s=this.render.bind(this);this._trackingTarget=new T.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const o=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??{vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0},t=e.properties??={};t.key??=r,Ae(e.vnodeSelector)?t.visible=this.visible&&!1!==t.visible:(this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="");let o=0;return e.children?.forEach(e=>{Ae(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${o++}`)}),_e(this,e)};this.render=()=>{if(qe)return o();let e=(t=this,be.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),qe=!0;try{e=(0,C.a)(this._trackingTarget,o)}catch(t){throw k.A.getLogger(this).error(t),t}finally{qe=!1}return e&&function(e,t){be.set(e,t)}(this,e),e};const n=this.beforeFirstRender();n?this._resourcesFetch=n.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){Ie.add(e),e.finally(()=>Ie.delete(e)).catch(()=>{})}(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(d.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,A.pR)(this._trackingTarget),this.viewModel?.destroyed||this.viewModel?.destroying||(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,Ce(this))}get container(){return this._get("container")}set container(e){this._get("container")||this._set("container",function(e){return"string"==typeof e?document.getElementById(e):e??null}(e))}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+je++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(Ee=fe,Ne=fe,ge)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}removeContainer(){this._set("container",null)}scheduleRender(){this.destroyed||(Ce(this),this._projector.scheduleRender())}classes(...e){return De.apply(this,e)}renderNow(){this.destroyed||(Ce(this),this._projector.renderNow())}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,b.wB)(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,l.wb)(e)&&this.addHandles(this._delegatedEventNames.map(t=>(0,l.on)(e,t,e=>{this.emit(t,e)})),"delegated-events")},b.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(d.jH),this.scheduleRender()};this.addHandles([(0,y.oQ)(e),(0,b.wB)(()=>this.uiStrings,e)]),this.addHandles((0,b.z7)(()=>this.container,e=>{this.destroyed||(e.closest("[arcgis-widget-wrapped]")||(this.topLayerDisabled=!0,this.announceDeprecation?.()),this._attach(e))},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,f.MZ)({value:null})],Ze.prototype,"container",null),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"icon",null),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"id",null),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"label",null),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"renderable",null),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"uiStrings",void 0),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"viewModel",void 0),(0,p.Cg)([(0,f.MZ)({value:!0})],Ze.prototype,"visible",null),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"key",void 0),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"children",void 0),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"afterCreate",void 0),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"afterRemoved",void 0),(0,p.Cg)([(0,f.MZ)()],Ze.prototype,"topLayerDisabled",void 0),Ze=(0,p.Cg)([(0,f.$K)("esri.widgets.Widget")],Ze);const Ve=Ze,ze="esri-identity-modal",Be={base:ze,info:`${ze}__info`,notice:`${ze}__notice`};let He=class extends Ve{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(1257),r.e(4348),r.e(6641)]).then(r.bind(r,46641)),dialog:()=>Promise.all([r.e(1257),r.e(4348),r.e(9538),r.e(7843)]).then(r.bind(r,79538)),input:()=>Promise.all([r.e(1257),r.e(4348),r.e(9932),r.e(224)]).then(r.bind(r,29932)),label:()=>Promise.all([r.e(1257),r.e(8955)]).then(r.bind(r,68955)),notice:()=>Promise.all([r.e(1257),r.e(4348),r.e(6405)]).then(r.bind(r,1723))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:o,server:n,resource:i,error:a}=this,{info:l,oAuthInfo:h,lblItem:c,invalidUser:d,noAuthService:u,lblUser:p,lblPwd:f,lblCancel:g,lblSigning:m,lblOk:v}=r;return Me("div",{class:this.classes(Be.base,S(this.container))},Me("form",{bind:this,onsubmit:this._submit},Me("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",width:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Me("div",{class:Be.info},(0,y.V2)(o?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${i||c})`})),a?Me("calcite-notice",{class:Be.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Me("div",{slot:"message"},a.details?.httpStatus?d:u)):null,o?null:[Me("calcite-label",null,p,Me("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Me("calcite-label",null,f,Me("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Me("calcite-button",{appearance:"outline",bind:this,slot:"footer-end",type:"button",onclick:this._cancel},g),Me("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e,t){const r=(0,d.YL)(t,1e4),s=(0,d.Mq)(r);await(0,xe.$m)(s);const o=e();if(!o)return;const n=async()=>{"setFocus"in o&&"function"==typeof o.setFocus?await o.setFocus():o instanceof HTMLElement&&o.focus()};for(true;!Pe(o)&&!(0,d.G4)(r);)await(0,xe.$m)(s),await n()}(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,f.MZ)({readOnly:!0})],He.prototype,"container",void 0),(0,p.Cg)([(0,f.MZ)(),Le("esri/t9n/common")],He.prototype,"commonMessages",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"error",void 0),(0,p.Cg)([(0,f.MZ)(),Le("esri/identity/t9n/identity")],He.prototype,"messages",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"open",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"signingIn",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({readOnly:!0})],He.prototype,"title",null),(0,p.Cg)([(0,f.MZ)()],He.prototype,"resource",void 0),He=(0,p.Cg)([(0,f.$K)("esri.identity.IdentityModal")],He);const We=He,Je="esriJSAPIOAuth";class Ge{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,n.A)(e,{authMode:"anonymous",keepAlive:!0,method:"post",query:{f:"json",auth_token:this.refreshToken||this.token,client_id:t.appId,token_type_hint:this.refreshToken?"refresh_token":"access_token"}}).catch(()=>{})}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(Je);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}Ge.prototype.declaredClass="esri.identity.OAuthCredential";var Ke,Ye=r(25482);let Qe=class extends Ye.o{static{Ke=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Ke.fromJSON(this.toJSON())}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"appId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"authNamespace",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"expiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"flowType",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"forceLogin",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"forceUserId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"locale",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"minTimeUntilExpiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"popup",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"popupCallbackUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"popupWindowFeatures",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"portalUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"preserveUrlHash",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"userId",void 0),Qe=Ke=(0,p.Cg)([(0,f.$K)("esri.identity.OAuthInfo")],Qe);const Xe=Qe;let et=class extends Ye.o{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"currentVersion",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"hasPortal",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"hasServer",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"owningTenant",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"webTierAuth",void 0),et=(0,p.Cg)([(0,f.$K)("esri.identity.ServerInfo")],et);const tt=et;var rt=r(39131);const st={},ot=e=>{const t=new u.s0(e.owningSystemUrl).host,r=new u.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},nt=(e,t)=>!!(ot(e)&&t&&t.some(t=>t.test(e.server)));let it=null,at=null;try{it=window.localStorage,at=window.sessionStorage}catch{}class lt extends a.a${constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,u.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer|3DTilesServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,o=this.findServerInfo(t),n=!0;o||(o=new tt,o.server=this._getServerInstanceRoot(t),r?o.hasServer=!0:(o.tokenServiceUrl=this._getTokenSvcUrl(t),o.hasPortal=!0),this.registerServers([o])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new v({userId:e.userId,server:o.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,h.oy)({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new tt(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new Xe(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new v(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const o of this.credentials)if(this._hasSameServerInstance(o.server,e)&&t===o.userId&&o.scope===s){r=o;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,o=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,o=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,a=Promise.withResolvers();if(t.signal&&(0,d.u7)(t.signal,()=>{n.abort()}),(0,d.u7)(n,()=>{a.reject(new i.A("identity-manager:user-aborted","ABORTED"))}),(0,d.G4)(n))return a.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=s?this.findCredential(e):null;let c;if(h&&498===r?.details?.httpStatus)h.destroy();else if(h)return c=new i.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(c),a.promise;const p=this._findCredential(e,t);if(p)return a.resolve(p),a.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return c=new i.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(c),a.promise;f=new tt,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(o||(0,u.FX)(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===f.tokenServiceUrl))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,a,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),o=new u.s0(this._appOrigin),a=e.shortLivedTokenValidity;let l,h,c,d,p,f,g,m;t&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),r&&(l=r.isAdmin,h=r.serverUrl,c=r.token,f=r.signal,g=r.ssl,e.customParameters=r.customParameters),l?d=e.adminTokenServiceUrl:(d=e.tokenServiceUrl,p=new u.s0(d.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!g&&"http"===o.scheme&&((0,u.FX)(o.uri,d,!0)||"https"===p.scheme&&o.host===p.host&&"7080"===o.port&&"7443"===p.port)&&(d=d.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:c,expiration:m,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:f};return s||(v.withCredentials=!1),(0,n.A)(d,v).then(r=>{const s=r.data;if(!s?.token)return new i.A("identity-manager:authentication-failed","Unable to generate token");const o=e.server;return st[o]||(st[o]={}),t&&(st[o][t.username]=t.password),s.validity=m,s})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then(o=>{let a;const l={f:"json"};if("portal"===o.scope)if(t&&(this._doPortalSignIn(e)||r?.force))a=o.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!o.token)return{credential:o};a=o.server+"/sharing/rest"}else{if(!o.token)return{credential:o};a=o.server+"/rest/services"}return o.token&&(l.token=o.token),(0,n.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new i.A("identity-manager:not-authorized",`You are currently signed in as: '${o.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:o}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw o.destroy(),new i.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new i.A("identity-manager:invalid-request","Bad request");return{credential:o}})}).then(e=>({credential:e.credential,viewOnly:s}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=Promise.withResolvers(),o=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{o(),this._oAuthDfd=null,s.reject(new i.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,d.u7)(r.signal,()=>{n()});const a=new We({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",n),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(n=>{o();const i=new v({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(i)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=Promise.withResolvers();const o=this._oAuthDfd;let n;s?.signal&&(0,d.u7)(s.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&c()}),o.resUrl_=e,o.sinfo_=t,o.oinfo_=r;const a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,u.$1)(e),a.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=n=null)}else a.codeVerifier=null;let l,h;this._getCodeChallenge(n).then(o=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,o);const i=new We({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=i,this.emit("dialog-create"),l=i.on("cancel",c),h=i.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,o)})});const c=()=>{p(),this._oAuthDfd=null,o.reject(new i.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return o.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,o=s&&nt(t,this._legacyFed),n=t.webTierAuth,i=n&&this.normalizeWebTierAuth,a=st[e.server],l=a?.[e.userId];let h,c=e.resources&&e.resources[0],d=s?this.findServerInfo(r):null,u={username:e.userId,password:l};if(n&&!i)return;s&&!d&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(d=e),!!d));const p=d?this.findCredential(d.server,e.userId):null;if(!s||p){if(!o){if(s)h={serverUrl:c,token:p?.token,ssl:p?.ssl};else if(i)u=null,h={ssl:e.ssl};else{if(!l){let r;return c&&(c=this._sanitizeUrl(c),e._enqueued=1,r=this._enqueue(c,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(h={isAdmin:!0})}return this.generateToken(s?d:t,s?null:u,h).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(nt(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,l.on)(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=(0,u.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=(0,u.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=(0,u.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,o){return e=e.replace(/^http:/i,"https:"),(0,n.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&o?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:o}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,u.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new i.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,o,n,i=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",c=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===h);if(e=l||e,c.length)if(1===c.length){if(r=c[0],o=this.findServerInfo(r.server),s=o?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,i=this._getIdenticalSvcIdx(e,r),!a)return-1===i&&r.resources.push(e),this._addResource(e,n),r;-1!==i&&(r.resources.splice(i,1),this._removeResource(e,n))}else{let t,r;if(c.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,o=this.findServerInfo(t.server),s=o?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,i=r,!0))),a)t&&(t.resources.splice(i,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,u.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,u.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new u.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,rt.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,rt.qG)(e),t=(0,rt.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(o.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,u.S8)(e),(0,u.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),o=this._getSuffix(t).toLowerCase();if(r=s===o,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===o.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new u.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some(e=>e.regex.test(t.uri));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||o.A.portalUrl&&(s=(0,u.FX)(t,o.A.portalUrl,!0)),s||(s=this._portals.some(e=>this._hasSameServerInstance(e,t.uri))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((o,n)=>{-1===r&&o.regex.test(e)&&(r=n),-1===s&&o.regex.test(t)&&(s=n)});let o=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(o=!0):1===r?1!==s&&2!==s||(o=!0):2===r?2===s&&(o=!0):3===r&&3===s&&(o=!0)),!o){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&ot(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(o=!0)}return o}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const o=t.resources[s];if(this._isIdenticalService(e,o)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,n.A)(e=s+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new u.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const o=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),o).then(o=>{const n=new v({userId:o.username,server:r.server??void 0,token:o.access_token,expires:Date.now()+1e3*o.expires_in,ssl:o.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=o.persist?it:at,s.refreshToken=o.refresh_token,s.token=null,s.expires=o.refresh_token_expires_in?Date.now()+1e3*o.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const o=new v({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=o.userId,s.storage=e.persist?it:at,s.refreshToken=null,s.token=o.token,s.expires=o.expires,s.userId=o.userId,s.ssl=o.ssl,s.save(),Promise.resolve(o)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new i.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,n.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,n.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some(t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,n.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,u.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let o=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(n)&&(o=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!o)&&r(new i.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),o}_enqueue(e,t,r,s,o,n){return s||(s=Promise.withResolvers()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=o,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,o=e.refresh_;let n=!1;this.credentials.includes(t)||(o&&this.credentials.includes(o)?(o.userId=t.userId,o.token=t.token,o.expires=t.expires,o.validity=t.validity,o.ssl=t.ssl,o.creationTime=t.creationTime,n=!0,t=o):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const i=this._soReqs,a={};this._soReqs=[],i.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),i.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(o,n,a,h)=>{const c=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,f=c.hasPortal&&this._findOAuthInfo(e.resUrl_);let g,m;if(o)t(new v({userId:o,server:c.server??void 0,token:a??void 0,expires:null!=h?Number(h):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,l.on)(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new i.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new v(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new i.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(i.A.fromJSON(e.data.error))))});(0,d.u7)(e.options_?.signal,()=>{s.remove()})}else if(f){let o=f._oAuthCred;if(!o){const e=new Ge(f,it),t=new Ge(f,at);e.isValid()&&t.isValid()?e.expires>t.expires?(o=e,t.destroy()):(o=t,e.destroy()):o=e.isValid()?e:t,f._oAuthCred=o}if(o.isValid()){g=new v({userId:o.userId??void 0,server:c.server??void 0,token:o.token??void 0,expires:o.expires,ssl:o.ssl??void 0,_oAuthCred:o});const n=f.appId!==o.appId&&this._doPortalSignIn(e.resUrl_);n||o.refreshToken?(e._pendingDfd=o.refreshToken?this._getOAuthToken(c.server,o.refreshToken,o.appId).then(e=>(g.expires=Date.now()+1e3*e.expires_in,g.token=e.access_token,g)):Promise.resolve(g),e._pendingDfd.then(e=>n?this._exchangeToken(e.server,f.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(o.destroy(),s()):r(e)})):t(g)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(f.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===o.stateUID&&o.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,f,c).then(e=>{t(e)}).catch(r)}else{const s=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,c,f,e.options_).then(t,r):(m=new i.A("identity-manager:not-authenticated","User is not signed in."),r(m))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(c.server,f.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(g=new v({userId:e.username,server:c.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(g)):s()}).catch(s):s()}}else if(p){if(this._checkProtocol(e.resUrl_,c,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,c,s).then(t,r)}}else m=new i.A("identity-manager:not-authenticated","User is not signed in."),r(m)},o=()=>{const s=e.sinfo_,o=s.owningSystemUrl,n=e.options_;let i,a,l;if(n&&(i=n.token,a=n.prompt),l=this._findCredential(o,{resource:e.resUrl_}),!l)for(const e of this.credentials)if(this._isIdProvider(o,e.server)){l=e;break}if(l){const o=this.findCredential(e.resUrl_,l.userId);if(o)t(o);else if(nt(s,this._legacyFed)){const e=l.toJSON();e.server=s.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(l.server),null,{serverUrl:e.resUrl_,token:l.token,signal:e.options_.signal,ssl:l.ssl})).then(r=>{t(new v({userId:l?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,i&&(e.options_.token=null),(e._pendingDfd=this.getCredential(o.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,prompt:a})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,c.wc)("authInfo.tokenServicesUrl",t)||(0,c.wc)("authInfo.tokenServiceUrl",t)||(0,c.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,c.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?o():s()},()=>{e.sinfo_._restInfoPms=null;const t=new i.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&n?o():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,o,n,i;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,o=t.supportsOAuth,i=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=i),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&o&&i>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()}):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const o=e.customBaseUrl,i=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;const e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,n.A)(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Xe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,n.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:i,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&o?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+o:t.portalUrl=s,t.popup=window!==window.top||!((0,u.FX)(s,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(s)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,r,s){const o=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),o.stateUID&&(n.uid=o.stateUID);const a={client_id:r.appId,response_type:o.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!o.codeVerifier)};r.forceLogin&&(a.force_login=!0),r.forceUserId&&r.userId&&(a.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),o.codeVerifier&&(a.code_challenge=s||o.codeVerifier,a.code_challenge_method=s?"S256":"plain");const h=this._getAuthorizeUrl(r.portalUrl),c=h+"?"+(0,u.x0)(a);if(r.popup){const e=window.open(c,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new i.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=(0,l.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new i.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:h,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=c}_getAuthorizeUrl(e){let t=e.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize";const r=(0,rt.py)(t);if(r?.portalHostname){const{customBaseUrl:e,portalHostname:t,urlKey:s}=r}return t}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){const e=(0,u.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),(0,u.a6)(e.path,e.query)}return r}}lt.prototype.declaredClass="esri.identity.IdentityManagerBase";const ht=new lt;(0,s.Aq)(ht)},79783(e,t,r){r.d(t,{ud:()=>S,JK:()=>k,oQ:()=>A,V2:()=>b});var s=r(2741),o=r(97770),n=r(73444),i=r(10838),a=r(18047),l=r(53966),h=r(93637),c=r(799);const d=()=>l.A.getLogger("esri.intl.substitute");function u(e,t){switch(t.type){case"date":return(0,o.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return d().warn("missing format descriptor for key {key}"),f(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,o.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return d().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,o.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,o.Yq)(e):""}}var g=r(11254),m=r(49186);const v={"esri/t9n/basemaps":"esri/support/basemaps/t9n/basemaps","esri/t9n/common":"esri/common/t9n/common","esri/widgets/support/t9n/ColorPicker":"esri/widgets/support/ColorPicker/t9n/ColorPicker","esri/widgets/support/t9n/timezone":"esri/widgets/support/TimezonePicker/t9n/timezone","esri/widgets/support/t9n/uriUtils":"esri/widgets/support/uriUtils/t9n/uriUtils"};async function y(e){if(null!=w.fetchBundleAsset)return w.fetchBundleAsset(e);const t=await(0,g.A)(e,{responseType:"text"});return JSON.parse(t.data)}class _{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const o=v[r]??r,n=t.exec(o);if(!n)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const a=n[1]?`${n[1]}/`:"",l=n[2],h=(0,i.xO)(s),c=o.startsWith("esri/"),d=`${a}${l}.json`,u=h?`${a}${l}_${h}.json`:d,p=c?`${a}messages.en.json`:d,f=c?`${a}messages.${h??"en"}.json`:u,g=[...new Set(c?[f,u,p,d]:[f,p])];for(const[t,s]of g.entries())try{return await y(e(s))}catch(e){if(t===g.length-1)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`)}(this.getAssetUrl,this.matcher,e,t)}}const w={},S=i.ud,k=n.JK,A=n.oQ,I=i.ao,b=function(e,t,r={}){const{format:s={}}=r;return(0,c.HC)(e,e=>function(e,t,r){let s,o;const n=e.indexOf(":");if(-1===n?s=e.trim():(s=e.slice(0,n).trim(),o=e.slice(n+1).trim()),!s)return"";const i=(0,h.wc)(s,t);if(null==i)return"";const a=(o?r?.[o]:null)??r?.[s];return a?u(i,a):o?p(i,o):f(i)}(e,t,s))};var U;I((U={pattern:"esri/",location:s.s},new _(U)))},97770(e,t,r){r.d(t,{Ey:()=>O,F8:()=>R,J2:()=>C,Yq:()=>x,_m:()=>T,iS:()=>P,wj:()=>D});var s=r(66552),o=r(73444),n=r(98623),i=r(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},h={timeZone:"UTC"},c={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},f={hour:"numeric",minute:"numeric"},g={...f,second:"numeric"},m={hourCycle:"h23"},v={...f,...m},y={...g,...m},_={"short-date":c,"short-date-short-time":{...c,...f},"short-date-short-time-24":{...c,...v},"short-date-long-time":{...c,...g},"short-date-long-time-24":{...c,...y},"short-date-le":c,"short-date-le-short-time":{...c,...f},"short-date-le-short-time-24":{...c,...v},"short-date-le-long-time":{...c,...g},"short-date-le-long-time-24":{...c,...y},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...f},"long-month-day-year-short-time-24":{...d,...v},"long-month-day-year-long-time":{...d,...g},"long-month-day-year-long-time-24":{...d,...y},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...f},"day-short-month-year-short-time-24":{...u,...v},"day-short-month-year-long-time":{...u,...g},"day-short-month-year-long-time-24":{...u,...y},"long-date":p,"long-date-short-time":{...p,...f},"long-date-short-time-24":{...p,...v},"long-date-long-time":{...p,...g},"long-date-long-time-24":{...p,...y},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":f,"long-time":g},w=(0,s.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),S={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},k=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),A=k.find(({type:e})=>"month"===e)?.value.toLowerCase();function I(){const e=(0,o.lR)();return(e&&S[e])??(0,o.QC)()}"mart"!==A&&(S.bs="sr-Latn-CS");let b=new WeakMap;const U=_["short-date-short-time"];function C(e){return _[e]}function T(e){const{dateStyle:t,timeStyle:r,hour12:s,year:o,month:n}=e,i={};return t?i.dateStyle=t:o&&(i.year=o,i.month=n||void 0),r&&!i.year&&(i.timeStyle=r,i.hour12="auto"===s?void 0:"always"===s),i}function x(e,t=U){return function(e){let t=b.get(e);if(!t){const r=I(),s=D(e.timeZone??"system"),o={...e,timeZone:s};t=new Intl.DateTimeFormat(r,o),b.set(e,t)}return t}(t).format(e)}function P(e,t=U){return x(new Date(e),{...t,...h,...l})}function R(e,t=U){return x(new Date(`1970-01-01T${e}Z`),{...t,...h,...a})}function O(e,t=U){const r=i.c9.fromISO(e,{setZone:!0});if(!r.isValid)return e;if(t.timeZone)return x(r.toJSDate(),t);const s=0===r.offset?"UTC":t.timeZone,o={...t,timeZone:s};return r.toLocaleString(o,{locale:I()})}function D(e){switch(e){case"system":return n.N;case n.L:return"UTC";default:return e}}(0,o.Ml)(()=>{b=new WeakMap}),r.d(t,["_v",0,w])},10838(e,t,r){r.d(t,{ao:()=>d,ud:()=>u,xO:()=>p});var s=r(49186),o=r(36563),n=r(73444);const i={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,nn:"no",pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(e){if(function(e){return e in i}(e)){const t=i[e];return!0===t?e:t}return null}const l=[],h=new Map;function c(e){for(const t of h.keys())f(e.pattern,t)&&h.delete(t)}function d(e){return l.includes(e)||(c(e),l.unshift(e)),(0,o.hA)(()=>{const t=l.indexOf(e);t>-1&&(l.splice(t,1),c(e))})}async function u(e){const t=(0,n.JK)();h.has(e)||h.set(e,async function(e,t){const r=[];for(const s of l)if(f(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new s.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new s.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=h.get(e);return r&&await g.add(r),r}function p(e){const t=(0,n.lR)(e);return t?a(e)??a(t):null}function f(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,n.Ml)(()=>{h.clear()});const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then(()=>this._decrease(),()=>this._decrease()),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=Promise.withResolvers())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18047(e,t,r){r.d(t,{Up:()=>l,ZV:()=>h,yx:()=>a});var s=r(73444);const o={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let n=new WeakMap,i={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){const{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:s}=e;return{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:"auto"===s?"auto":"always"===s}}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||i;if(!n.has(t)){const r=(0,s.lR)(),i=r&&o[r]||(0,s.QC)();n.set(t,new Intl.NumberFormat(i,e))}return n.get(t)}(t).format(e)}(0,s.Ml)(()=>{n=new WeakMap,i={}}),new Map}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3543,7367],{93543(e,n,t){t.r(n),t.d(n,{executeScript:()=>me,extend:()=>we,prepareScript:()=>ye});var r=t(48938),a=t(99719),o=t(72888),i=t(17433),s=t(67862),c=t(11484),l=t(66395),u=t(85935),f=t(93833),d=t(92400),w=t(78878),p=t(19157),y=t(3367),m=t(63680),h=t(81113),g=t(32091),b=t(87367),v=t(21593),D=t(36770),R=t(47346),$=t(29304),x=t(4730),S=t(53966),I=t(16930),C=t(94128),F=t(54218);const A=()=>S.A.getLogger("esri.arcade.arcadeAsyncRuntime"),k=Symbol("debugInfo"),G=Symbol("uninitialized");function N(e){if(e===G)throw new u.D$("InvalidIdentifier",null)}function E(e){return N(e),e}function J(e,n){const t=(0,r.X)(n);if(null!==e.localScope){const n=e.localScope[t];if(void 0!==n)return{scope:e.localScope,id:t,var:n}}const a=e.globalScope[t];if(void 0!==a)return{scope:e.globalScope,id:t,var:a};throw new u.D$("InvalidIdentifier",n)}function P(e,n,t="InvalidIdentifier"){const a=(0,r.X)(n);if(null!==e.localScope){const n=e.localScope[a];if(void 0!==n)return N(n),n.value}const o=e.globalScope[a];if(void 0!==o)return N(o),o.value;throw new u.D$(t,n)}const O=function(){};async function L(e,n){const t=[];for(let r=0;r<n.arguments.length;r++)t.push(await q(e,n.arguments[r]));return t}async function M(e,n,t){return!0===n.preparsed?t(e,null,n.arguments):t(e,n,await L(e,n))}O.prototype=Object.freeze(Object.create(null));class H extends d.fF{constructor(e,n,t,r,a){super(),this.definition=e,this.context=n,this._params=t,this._locals=r,this._debugInfo=a}get debugName(){return this.definition.id.name}createFunction(e){return(...n)=>{const t=new O;t[k]=this._debugInfo;const r={spatialReference:this.context.spatialReference,console:this.context.console,lrucache:this.context.lrucache,timeZone:this.context.timeZone??null,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,services:this.context.services,abortSignal:this.context.abortSignal,localScope:t,depthCounter:{depth:e.depthCounter.depth+1},globalScope:this.context.globalScope,contextScopeDebugInfo:this.context.contextScopeDebugInfo,track:this.context.track};if(r.depthCounter.depth>64)throw new u.D$("MaximumCallDepth",null);return U(r,this.definition.body,this._params,this._locals,n,null)}}call(e,n){return B(e,n,(t,r,a)=>{const o=new O;o[k]=this._debugInfo;const i={spatialReference:e.spatialReference,services:e.services,console:e.console,libraryResolver:e.libraryResolver,exports:e.exports,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:o,abortSignal:e.abortSignal,globalScope:e.globalScope,contextScopeDebugInfo:e.contextScopeDebugInfo,depthCounter:{depth:e.depthCounter.depth+1},track:e.track};if(i.depthCounter.depth>64)throw new u.D$("MaximumCallDepth",n);return U(i,this.definition.body,this._params,this._locals,a,n)})}marshalledCall(e,n,t,r){return r(e,n,async(a,o,i)=>{const s=new O;s[k]=this._debugInfo;const c={spatialReference:e.spatialReference,services:e.services,globalScope:t.globalScope,contextScopeDebugInfo:t.contextScopeDebugInfo,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,console:e.console,abortSignal:e.abortSignal,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:s,track:e.track};return i=i.map(n=>!(0,w.i)(n)||n instanceof d.CU?n:(0,d.o6)(n,e,r)),(0,d.o6)(await U(c,this.definition.body,this._params,this._locals,i,n),t,r)})}}async function U(e,n,t,r,a,o){if(t.length!==a.length)throw new u.D$("WrongNumberOfParameters",o);if(null!=e.localScope){for(let n=0;n<t.length;n++)e.localScope[t[n]]={value:a[n]};for(const n of r)e.localScope[n]=G}const i=await K(e,n);if(i instanceof w.R)return i.value;if(i===w.C)throw new u.D$("UnexpectedToken",o);if(i===w.D)throw new u.D$("UnexpectedToken",o);return i instanceof w.I?i.value:i}class j extends a.x{constructor(e){super(),this.moduleGlobalContext=e}global(e){const n=(0,r.X)(e);if(!this.moduleGlobalContext.exports.has(n))throw new u.D$("ModuleExportNotFound",null);const t=this.moduleGlobalContext.globalScope[n];if(N(t),(0,w.i)(t.value)&&!(t.value instanceof d.CU)){const e=new d.CU;return e.fn=t.value,e.parameterEvaluator=M,e.context=this.moduleGlobalContext,this.moduleGlobalContext.globalScope[n]={value:e},e}return t.value}setGlobal(e,n){if((0,w.i)(n))throw new u.D$("AssignModuleFunction",null);const t=(0,r.X)(e);if(!this.moduleGlobalContext.exports.has(t))throw new u.D$("ModuleExportNotFound",null);this.moduleGlobalContext.globalScope[t]={value:n}}hasGlobal(e){return this.moduleGlobalContext.exports.has((0,r.X)(e))}static async load(e,n){const{globals:t,exports:a}=(0,i.aU)(n),s=new de;null!=e.contextScopeDebugInfo&&(s[k]={declaredNames:t});for(const e of t.keys())e in s||(s[e]=G);const c=e.spatialReference??I.A.WebMercator,l={lrucache:e.lrucache,interceptor:e.interceptor,services:e.services,console:e.console??pe,abortSignal:e.abortSignal??r._,timeZone:e.timeZone??null,spatialReference:c,track:null,depthCounter:{depth:1},libraryResolver:new o.a(e.libraryResolver._moduleSingletons,n.loadedModules),exports:a,localScope:null,globalScope:s,contextScopeDebugInfo:null!=e.contextScopeDebugInfo?{declaredNames:new Map}:null};return await Q(l,n),new j(l)}}async function B(e,n,t){return!0===n.preparsed?t(e,null,n.arguments):t(e,n,await L(e,n))}function _(e,n,t){const r=new Map;if(n)for(const[a,o]of n.declaredNames){const n=e[a];r.set(o,null==n||n===G?null:(0,c.R)(n.value,t))}else for(const n of Object.getOwnPropertyNames(e)){const a=e[n];r.set(n,a===G?null:(0,c.R)(a.value,t))}return r}function Z(e){return e instanceof H?`ƒ ${e.debugName}(${e.definition.params.map(e=>e.name).join(", ")})`:(0,c.h)(e)}function z(e,n){const t=e.services?.debugger;if(null==t)return;const r={renderFunction:Z,defaultTimeZone:e.timeZone??"system"};return t.pause(n,{profile:null!=e.contextScopeDebugInfo?_(e.globalScope,e.contextScopeDebugInfo,r):new Map,globals:_(e.globalScope,e.globalScope[k],r),locals:null==e.localScope?null:_(e.localScope,e.localScope[k],r)})}async function q(e,n){n.breakpoint&&await z(e,n.breakpoint);try{switch(n.type){case"UpdateExpression":return await async function(e,n){const t=n.argument;if("CallExpression"===t.type)throw new u.D$("NeverReach",n);if("MemberExpression"===t.type){const r=await q(e,t.object);let a,o;if(!0===t.computed)a=await q(e,t.property);else{if("Identifier"!==t.property.type)throw new u.D$("Unrecognized",n);a=t.property.name}if((0,F.cy)(r)){if(!(0,F.Et)(a))throw new u.D$("ArrayAccessMustBeNumber",n);if(a<0&&(a=r.length+a),a<0||a>=r.length)throw new u.D$("OutOfBounds",n);o=(0,w.v)(r[a]),r[a]="++"===n.operator?o+1:o-1}else if(r instanceof l.A){if(!1===(0,F.Kg)(a))throw new u.D$("KeyAccessorMustBeString",n);if(!0!==r.hasField(a))throw new u.D$("FieldNotFound",n,{key:a});o=(0,w.v)(r.field(a)),r.setField(a,"++"===n.operator?o+1:o-1)}else if(r instanceof j){if(!1===(0,F.Kg)(a))throw new u.D$("ModuleAccessorMustBeString",n);if(!0!==r.hasGlobal(a))throw new u.D$("ModuleExportNotFound",n);o=(0,w.v)(r.global(a)),r.setGlobal(a,"++"===n.operator?o+1:o-1)}else{if(!(0,w.h)(r))throw(0,w.g)(r)?new u.D$("Immutable",n):new u.D$("InvalidParameter",n);if(!1===(0,F.Kg)(a))throw new u.D$("KeyAccessorMustBeString",n);if(!0!==r.hasField(a))throw new u.D$("FieldNotFound",n,{key:a});o=(0,w.v)(r.field(a)),r.setField(a,"++"===n.operator?o+1:o-1)}return!1===n.prefix?o:"++"===n.operator?o+1:o-1}const r=J(e,t),a=(0,w.v)(E(r.var).value),o="++"===n.operator?a+1:a-1;return r.scope[r.id]={value:o},!1===n.prefix?a:"++"===n.operator?a+1:a-1}(e,n);case"AssignmentExpression":return await async function(e,n){const t=n.left;if("MemberExpression"===t.type){const r=await q(e,t.object);let a;if(!0===t.computed)a=await q(e,t.property);else{if("Identifier"!==t.property.type)throw new u.D$("InvalidIdentifier",n);a=t.property.name}const o=await q(e,n.right);if((0,F.cy)(r)){if(!(0,F.Et)(a))throw new u.D$("ArrayAccessMustBeNumber",n);if(a<0&&(a=r.length+a),a<0||a>r.length)throw new u.D$("OutOfBounds",n);if(a===r.length){if("="!==n.operator)throw new u.D$("OutOfBounds",n);r[a]=V(o,n.operator,r[a],n)}else r[a]=V(o,n.operator,r[a],n)}else if(r instanceof l.A){if(!1===(0,F.Kg)(a))throw new u.D$("KeyAccessorMustBeString",n);if(!0===r.hasField(a))r.setField(a,V(o,n.operator,r.field(a),n));else{if("="!==n.operator)throw new u.D$("FieldNotFound",n,{key:a});r.setField(a,V(o,n.operator,null,n))}}else if(r instanceof j){if(!1===(0,F.Kg)(a))throw new u.D$("KeyAccessorMustBeString",n);if(!0!==r.hasGlobal(a))throw new u.D$("ModuleExportNotFound",n);r.setGlobal(a,V(o,n.operator,r.global(a),n))}else{if(!(0,w.h)(r))throw(0,w.g)(r)?new u.D$("Immutable",n):new u.D$("InvalidParameter",n);if(!1===(0,F.Kg)(a))throw new u.D$("KeyAccessorMustBeString",n);if(!0===r.hasField(a))r.setField(a,V(o,n.operator,r.field(a),n));else{if("="!==n.operator)throw new u.D$("FieldNotFound",n,{key:a});r.setField(a,V(o,n.operator,null,n))}}return w.x}const r=J(e,t),a=await q(e,n.right);return r.scope[r.id]={value:V(a,n.operator,"="!==n.operator?E(r.var).value:null,n)},w.x}(e,n);case"TemplateLiteral":return await async function(e,n){let t="",r=0;for(const a of n.quasis)if(t+=a.value?a.value.cooked:"",!1===a.tail){if(n.expressions[r]){const a=await q(e,n.expressions[r]);if((0,w.i)(a))throw new u.D$("NoFunctionInTemplateLiteral",n);t+=(0,w.w)(a)}r++}return t}(e,n);case"Identifier":return ae(e,n);case"MemberExpression":return await async function(e,n){return ne(e,await q(e,n.object),n)}(e,n);case"Literal":return n.value;case"CallExpression":return await async function(e,n){let t;if("Identifier"===n.callee.type){const r=n.callee;r.breakpoint&&await z(e,r.breakpoint),t=P(e,n.callee,"FunctionNotFound")}else t=await q(e,n.callee);return oe(e,t,n)}(e,n);case"UnaryExpression":return await async function(e,n){const t=await q(e,n.argument);if((0,F.Lm)(t)){if("!"===n.operator)return!t;if("-"===n.operator)return-1*(0,w.v)(t);if("+"===n.operator)return 1*(0,w.v)(t);if("~"===n.operator)return~(0,w.v)(t);throw new u.D$("UnsupportUnaryOperator",n)}if("-"===n.operator)return-1*(0,w.v)(t);if("+"===n.operator)return 1*(0,w.v)(t);if("~"===n.operator)return~(0,w.v)(t);throw new u.D$("UnsupportUnaryOperator",n)}(e,n);case"BinaryExpression":return await async function(e,n){const t=await q(e,n.left),r=await q(e,n.right);switch(n.operator){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,w.A)((0,w.v)(t),(0,w.v)(r),n.operator);case"==":return(0,w.z)(t,r);case"!=":return!(0,w.z)(t,r);case"<":case">":case"<=":case">=":return(0,w.y)(t,r,n.operator);case"+":return(0,F.Kg)(t)||(0,F.Kg)(r)?(0,w.w)(t)+(0,w.w)(r):(0,w.v)(t)+(0,w.v)(r);case"-":return(0,w.v)(t)-(0,w.v)(r);case"*":return(0,w.v)(t)*(0,w.v)(r);case"/":return(0,w.v)(t)/(0,w.v)(r);case"%":return(0,w.v)(t)%(0,w.v)(r);default:throw n.operator,new u.D$("UnsupportedOperator",n)}}(e,n);case"LogicalExpression":return await async function(e,n){const t=await q(e,n.left);if(!(0,F.Lm)(t))throw new u.D$("LogicalExpressionOnlyBoolean",n);switch(n.operator){case"||":{if(!0===t)return t;const r=await q(e,n.right);if((0,F.Lm)(r))return r;throw new u.D$("LogicExpressionOrAnd",n)}case"&&":{if(!1===t)return t;const r=await q(e,n.right);if((0,F.Lm)(r))return r;throw new u.D$("LogicExpressionOrAnd",n)}default:throw n.operator,new u.D$("LogicExpressionOrAnd",n)}}(e,n);case"ArrayExpression":return await async function(e,n){const t=[];for(let r=0;r<n.elements.length;r++)t.push(await q(e,n.elements[r]));for(let e=0;e<t.length;e++){if((0,w.i)(t[e]))throw new u.D$("NoFunctionInArray",n);t[e]===w.x&&(t[e]=null)}return t}(e,n);case"ObjectExpression":return await async function(e,n){const t=[];for(let r=0;r<n.properties.length;r++){const a=n.properties[r],o=await q(e,a.value),i="Identifier"===a.key.type?a.key.name:await q(e,a.key);t[r]={key:i,value:o}}const r=Object.create(null),a=new Map;for(let e=0;e<t.length;e++){const o=t[e];if((0,w.i)(o.value))throw new u.D$("NoFunctionInDictionary",n);if(!1===(0,F.Kg)(o.key))throw new u.D$("KeyMustBeString",n);let i=o.key.toString();const s=i.toLowerCase();a.has(s)?i=a.get(s):a.set(s,i),o.value===w.x?r[i]=null:r[i]=o.value}const o=new l.A(r);return o.immutable=!1,o}(e,n);case"MemberAccessChainExpression":return await async function(e,n){const t=(0,i.YZ)(n);let r=await q(e,t.root);for(const n of t.sections){const t=await re(e,r,n.checked);if(null==t)return null;r=await te(e,t,n.unchecked)}return r}(e,n);case"SafeMemberExpression":throw A().error("SafeMemberExpression outside of MemberAccessChainExpression"),new u.D$("Unrecognized",n);default:throw new u.D$("Unrecognized",n)}}catch(e){throw(0,u.i2)(e,n)}}async function K(e,n){n.breakpoint&&await z(e,n.breakpoint);try{switch(n.type){case"ImportDeclaration":return await async function(e,n){const t=J(e,n.specifiers[0].local),r=e.libraryResolver;if(null==r)throw A().error("Internal error: module loader not initialized"),new u.D$("NeverReach",n);const a=r.loadLibrary(t.id);let o;return r._moduleSingletons?.has(a.uri)?o=r._moduleSingletons.get(a.uri):(o=await j.load(e,a.syntax),r._moduleSingletons?.set(a.uri,o)),t.scope[t.id]={value:o},w.x}(e,n);case"ExportNamedDeclaration":return await async function(e,n){return await K(e,n.declaration),w.x}(e,n);case"VariableDeclaration":return await async function(e,n){for(const t of n.declarations)await ee(e,t);return w.x}(e,n);case"BlockStatement":return await Q(e,n);case"FunctionDeclaration":return await async function(e,n){if(null!=e.localScope)throw A().error("Function declarations are only valid in global scope."),new u.D$("NeverReach",n);const t=(0,r.X)(n.id);if(!(t in e.globalScope))throw A().error(`Function "${t}" not declared.`),new u.D$("NeverReach",n);const a=(0,i.SV)(n),o=n.params.map(e=>(0,r.X)(e)),s=Array.from(a.keys()).filter(e=>!o.includes(e));let c=null;return null!=e.contextScopeDebugInfo&&(c={declaredNames:new Map([...n.params.map(e=>[(0,r.X)(e),e.name]),...a])}),e.globalScope[t]={value:new H(n,e,o,s,c)},w.x}(e,n);case"ReturnStatement":return await async function(e,n){if(null===n.argument)return new w.R(w.x);const t=await q(e,n.argument);return new w.R(t)}(e,n);case"IfStatement":return await async function(e,n){const t=await q(e,n.test);if(!0===t)return K(e,n.consequent);if(!1===t)return null!==n.alternate?K(e,n.alternate):w.x;throw new u.D$("BooleanConditionRequired",n)}(e,n);case"ExpressionStatement":return await async function(e,n){const t=await q(e,n.expression);return t===w.x?w.x:new w.I(t)}(e,n);case"ForStatement":return await async function(e,n){try{for(null!==n.init&&("VariableDeclaration"===n.init.type?await K(e,n.init):await q(e,n.init));;){if(null!==n.test){const t=await q(e,n.test);if(!0===e.abortSignal?.aborted)throw new u.D$("Cancelled",n);if(!1===t)break;if(!0!==t)throw new u.D$("BooleanConditionRequired",n)}const t=await K(e,n.body);if(t===w.C)break;if(t instanceof w.R)return t;null!==n.update&&await q(e,n.update)}return w.x}catch(e){throw e}}(e,n);case"WhileStatement":return await async function(e,n){let t=await q(e,n.test);if(!1===t)return w.x;if(!0!==t)throw new u.D$("BooleanConditionRequired",n);for(;!0===t;){const r=await K(e,n.body);if(r===w.C)break;if(r instanceof w.R)return r;if(t=await q(e,n.test),!0!==t&&!1!==t)throw new u.D$("BooleanConditionRequired",n)}return w.x}(e,n);case"ForInStatement":return await async function(e,n){const t=await q(e,n.right);"VariableDeclaration"===n.left.type&&await K(e,n.left);const r=J(e,"VariableDeclaration"===n.left.type?n.left.declarations[0].id:n.left);return(0,F.cy)(t)||(0,F.Kg)(t)?await X(e,n,t,r):(0,w.g)(t)?await T(e,n,t,r):t instanceof l.A||(0,w.B)(t)?await X(e,n,t.keys(),r,"k"):(0,w.k)(t)?await W(e,n,t,r):(0,w.d)(t)?await X(e,n,(0,s.T)(t),r,"k"):w.x}(e,n);case"ForOfStatement":return await async function(e,n){const t=await q(e,n.right);"VariableDeclaration"===n.left.type&&await K(e,n.left);const r=J(e,"VariableDeclaration"===n.left.type?n.left.declarations[0].id:n.left);return(0,F.cy)(t)||(0,F.Kg)(t)?await X(e,n,t,r,"k"):(0,w.g)(t)?await T(e,n,t,r,"k"):t instanceof l.A||(0,w.B)(t)?await async function(e,n,t,r){for(const a of t.keys()){const o=t.field(a);r.scope[r.id]={value:l.A.containerEntry(a,o)};const i=await K(e,n.body);if(i===w.C)break;if(i instanceof w.R)return i}return w.x}(e,n,t,r):(0,w.k)(t)?await W(e,n,t,r):(0,w.d)(t)?await async function(e,n,t,r){for(const a of(0,s.T)(t)){const o=(0,s.Ny)(t,a);r.scope[r.id]={value:l.A.containerEntry(a,o)};const i=await K(e,n.body);if(i===w.C)break;if(i instanceof w.R)return i}return w.x}(e,n,t,r):w.x}(e,n);case"BreakStatement":return w.C;case"EmptyStatement":return w.x;case"ContinueStatement":return w.D;default:throw new u.D$("Unrecognized",n)}}catch(e){throw(0,u.i2)(e,n)}}async function X(e,n,t,r,a="i"){const o=t.length;for(let i=0;i<o;i++){if("k"===a){if(i>=t.length)throw new u.D$("OutOfBounds",n);r.scope[r.id]={value:t[i]}}else r.scope[r.id]={value:i};const o=await K(e,n.body);if(o===w.C)break;if(o instanceof w.R)return o}return w.x}async function T(e,n,t,r,a="i"){const o=t.length();for(let i=0;i<o;i++){r.scope[r.id]="k"===a?{value:t.get(i)}:{value:i};const o=await K(e,n.body);if(o===w.C)break;if(o instanceof w.R)return o}return w.x}async function W(e,n,t,r){e:for await(const a of await t.queryAll(e.abortSignal))for(const o of a){r.scope[r.id]={value:f.Xj.createFromGraphicLikeObject(o.geometry,o.attributes,t,e.timeZone)};const a=await K(e,n.body);if(a===w.C)break e;if(a instanceof w.R)return a}return w.x}function V(e,n,t,r){switch(n){case"=":return e===w.x?null:e;case"/=":return(0,w.v)(t)/(0,w.v)(e);case"*=":return(0,w.v)(t)*(0,w.v)(e);case"-=":return(0,w.v)(t)-(0,w.v)(e);case"+=":return(0,F.Kg)(t)||(0,F.Kg)(e)?(0,w.w)(t)+(0,w.w)(e):(0,w.v)(t)+(0,w.v)(e);case"%=":return(0,w.v)(t)%(0,w.v)(e);default:throw new u.D$("UnsupportedOperator",r)}}async function Q(e,n){return Y(e,n,0)}async function Y(e,n,t){if(t>=n.body.length)return w.x;const r=await K(e,n.body[t]);return r instanceof w.R||r===w.C||r===w.D||t===n.body.length-1?r:Y(e,n,t+1)}async function ee(e,n){n.breakpoint&&await z(e,n.breakpoint);let t=null;t=null===n.init?null:await q(e,n.init),t===w.x&&(t=null);const r=J(e,n.id);r.scope[r.id]={value:t}}async function ne(e,n,t){const r=t.computed?await q(e,t.property):t.property.name;return(0,s.Xf)(n,r)}async function te(e,n,t){for(const r of t)switch(r.type){case"MemberExpression":n=await ne(e,n,r);break;case"CallExpression":n=await oe(e,n,r);break;default:throw new u.D$("Unrecognized",r)}return n}async function re(e,n,t){const r=t.computed?await q(e,t.property):t.property.name;return(0,s.c$)(n,r)}function ae(e,n){return P(e,n)}async function oe(e,n,t){if((0,w.i)(n))return n.call(e,t);throw new u.D$("CallNonFunction",t)}async function ie(e,n){(0,w.E)(null===n.arguments?[]:n.arguments,3,3,n);const t=await q(e,n.arguments[0]);if(!1===(0,F.Lm)(t))throw new u.D$("BooleanConditionRequired",n);return q(e,t?n.arguments[1]:n.arguments[2])}async function se(e,n){(0,w.E)(null===n.arguments?[]:n.arguments,2,3,n);const t=await q(e,n.arguments[0]);if(3===n.arguments.length){const r=await q(e,n.arguments[1]),a=(0,s.jd)(t,r);return null!=a&&""!==a?a:q(e,n.arguments[2])}return null==t||""===t?q(e,n.arguments[1]):t}async function ce(e,n){if(n.arguments.length<2)throw new u.D$("WrongNumberOfParameters",n);if(2===n.arguments.length)return q(e,n.arguments[1]);if((n.arguments.length-1)%2==0)throw new u.D$("WrongNumberOfParameters",n);return le(e,n,1,await q(e,n.arguments[0]))}async function le(e,n,t,r){const a=await q(e,n.arguments[t]);if((0,w.z)(a,r))return q(e,n.arguments[t+1]);const o=n.arguments.length-t;return 1===o?q(e,n.arguments[t]):2===o?null:3===o?q(e,n.arguments[t+2]):le(e,n,t+2,r)}async function ue(e,n){if(n.arguments.length<3)throw new u.D$("WrongNumberOfParameters",n);if(n.arguments.length%2==0)throw new u.D$("WrongNumberOfParameters",n);const t=await q(e,n.arguments[0]);if(!1===(0,F.Lm)(t))throw new u.D$("BooleanConditionRequired",n.arguments[0]);return fe(e,n,0,t)}async function fe(e,n,t,r){if(!0===r)return q(e,n.arguments[t+1]);if(3===n.arguments.length-t)return q(e,n.arguments[t+2]);const a=await q(e,n.arguments[t+2]);if(!1===(0,F.Lm)(a))throw new u.D$("ModuleExportNotFound",n.arguments[t+2]);return fe(e,n,t+2,a)}const de=function(){const e=Object.create(null);(0,h.d)(e,M),(0,$.d)(e,M),(0,g.d)(e,M,ae),(0,D.d)(e,M),(0,v.d)(e,M),(0,R.d)(e,M),(0,x.dW)(e,M),(0,b.registerFunctions)({functions:e,compiled:!1,signatures:null,evaluateIdentifier:null,mode:"async",standardFunction:M,standardFunctionAsync:B}),e.iif=ie,e.defaultvalue=se,e.decode=ce,e.when=ue;const n=function(){this.textformatting={value:l.A.textFormatting()}};(n.prototype=Object.create(null)).infinity=Object.freeze({value:Number.POSITIVE_INFINITY}),n.prototype.nan=Object.freeze({value:Number.NaN}),n.prototype.pi=Object.freeze({value:Math.PI});for(const[t,r]of Object.entries(e))n.prototype[t]=Object.freeze({value:new d.UQ(r,t)});return n}();function we(e){const n={mode:"async",compiled:!1,functions:Object.create(null),signatures:[],standardFunction:M,standardFunctionAsync:B,evaluateIdentifier:ae};for(let t=0;t<e.length;t++)e[t].registerFunctions(n);for(const[e,t]of Object.entries(n.functions))de.prototype[e]=Object.freeze({value:new d.UQ(t,e)});for(let e=0;e<n.signatures.length;e++)(0,p.WC)(n.signatures[e],"async")}function pe(e){console.log(e)}function ye(e,n){const t=new Set(Object.keys(n?.vars||{}).map(e=>(0,r.X)(e))),a=new Set(Object.keys(n?.customfunctions||{}).map(e=>(0,r.X)(e))),{globals:s,exports:c}=(0,i.aU)(e);let l=null;if(n?.breakpoints){for(const[t,r]of(0,i.ti)(n.breakpoints,e))t.breakpoint=r;l={declaredNames:new Map(Object.keys(n?.vars||{}).map(e=>[(0,r.X)(e),e]).filter(([e])=>!s.has(e)))}}return async n=>{const i=n.spatialReference??I.A.WebMercator;let p=null;e.usesModules&&(p=new o.a(new Map,e.loadedModules));const y=new de;null!=l&&(y[k]={declaredNames:s});for(const e of a)null!=n.customfunctions&&e in n.customfunctions?y[e]={value:new d.UQ(n.customfunctions[e],e)}:y[e]=G;for(const e of t){if(null==n.vars||!(e in n.vars)){e in y||(y[e]=G);continue}const t=n.vars[e]??null;(0,C.D)(t)?y[e]={value:f.Xj.createFromGraphic(t,n.timeZone??null)}:y[e]={value:t}}for(const e of s.keys())e in y||(y[e]=G);const m={lrucache:n.lrucache,interceptor:n.interceptor,services:n.services,console:n.console??pe,abortSignal:n.abortSignal??r._,timeZone:n.timeZone??null,spatialReference:i,track:n.track,depthCounter:{depth:1},libraryResolver:p,exports:c,localScope:null,globalScope:y,contextScopeDebugInfo:l},h=await Q(m,e);if(h instanceof w.R||h instanceof w.I){const e=h.value;if((0,w.u)(e))return null;if((0,w.i)(e))throw new u.D$("IllegalResult",null);return e}if((0,w.u)(h))return null;if(h===w.C)throw new u.D$("IllegalResult",null);if(h===w.D)throw new u.D$("IllegalResult",null);throw new u.D$("NeverReach",null)}}function me(e,n){return ye(e,n)(n)}we([m.A]),we([y.A])},87367(e,n,t){t.r(n),t.d(n,{registerFunctions:()=>b});var r=t(47609),a=t(67862),o=t(66395),i=t(85935),s=t(54639),c=t(78878),l=t(80672),u=t(38222),f=t(98919),d=t(71163),w=t(36983),p=t(70333),y=t(11254);async function m(e,n,t){const r=p.id?.findCredential(e.restUrl);if(!r)return null;if("loaded"===e.loadStatus&&""===n&&e.user?.sourceJSON&&!1===t)return e.user.sourceJSON;const a={responseType:"json",query:{f:"json"}};if(t&&(a.query.returnUserLicenseTypeExtensions=!0),""===n){const n=await(0,y.A)(e.restUrl+"/community/self",a);if(n.data){const e=n.data;if(e?.username)return e}return null}const o=await(0,y.A)(e.restUrl+"/community/users/"+n,a);if(o.data){const e=o.data;return e.error?null:e}return null}var h=t(54218);function g(e){if(null==e)return e;switch(typeof e){case"string":case"number":return e;default:throw new i.D$("InvalidParameter",null)}}function b(e){"async"===e.mode&&(e.functions.disjoint=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null===r[0]||null===r[1]||(0,d.C)("disjoint",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])))},e.functions.intersects=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("intersects",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])))},e.functions.touches=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("touches",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])))},e.functions.crosses=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("crosses",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])))},e.functions.within=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("within",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])))},e.functions.contains=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("contains",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])))},e.functions.overlaps=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null!==r[0]&&null!==r[1]&&(0,d.C)("overlaps",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])))},e.functions.equals=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>((0,c.E)(r,2,2,t),r[0]===r[1]||((0,c.d)(r[0])&&(0,c.d)(r[1])?(0,d.C)("equals",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)]):((0,c.f)(r[0])&&(0,c.f)(r[1])||!!((0,c.r)(r[0])&&(0,c.r)(r[1])||(0,c.q)(r[0])&&(0,c.q)(r[1])))&&r[0].equals(r[1]))))},e.functions.relate=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,3,3,t),(0,c.d)(r[0])&&(0,c.d)(r[1]))return(0,d.C)("relate",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference),(0,c.w)(r[2])]);if((0,c.d)(r[0])&&null===r[1])return!1;if((0,c.d)(r[1])&&null===r[0])return!1;if(null===r[0]&&null===r[1])return!1;throw new i.D$("InvalidParameter",t)})},e.functions.intersection=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null===r[0]||null===r[1]?null:(0,w.R)(await(0,d.C)("intersection",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.union=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(0===(r=(0,c.H)(r)).length)throw new i.D$("WrongNumberOfParameters",t);const a=[];if(1===r.length)if((0,h.cy)(r[0])){for(const e of(0,c.H)(r[0]))if(null!==e){if(!(0,c.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}}else{if(!(0,c.g)(r[0])){if((0,c.d)(r[0]))return r[0].clone();if(null===r[0])return null;throw new i.D$("InvalidParameter",t)}for(const e of(0,c.H)(r[0].toArray()))if(null!==e){if(!(0,c.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}}else for(const e of r)if(null!==e){if(!(0,c.d)(e))throw new i.D$("InvalidParameter",t);a.push(e)}if(0===a.length)return null;const o=a[0].spatialReference;return(0,w.R)(await(0,d.C)("union",[a.map(e=>e.asJsonGeometry()),(0,s.b)(o)]),o)})},e.functions.difference=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null===r[0]?null:null===r[1]?r[0].clone():(0,w.R)(await(0,d.C)("difference",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.symmetricdifference=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>(r=(0,c.H)(r),(0,f.ZL)(r,t),null===r[0]&&null===r[1]?null:null===r[0]?r[1]?.clone()??null:null===r[1]?r[0]?.clone()??null:(0,w.R)(await(0,d.C)("symmetricDifference",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)]),r[0].spatialReference)))},e.functions.clip=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,2,2,t),!(0,c.J)(r[1])&&null!==r[1])throw new i.D$("InvalidParameter",t);if(null===r[0])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);return null===r[1]?null:(0,w.R)(await(0,d.C)("clip",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)]),r[0].spatialReference)})},e.functions.cut=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,2,2,t),!(0,c.K)(r[1])&&null!==r[1])throw new i.D$("InvalidParameter",t);if(null===r[0])return[];if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);if(null===r[1])return[r[0].clone()];const a=r[0].spatialReference;return(await(0,d.C)("cut",[r[0].asJsonGeometry(),r[1].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])).map(e=>(0,w.R)(e,a)).filter(e=>null!=e)})},e.functions.area=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if((0,c.E)(a,1,2,t),a=(0,c.H)(a),(0,c.k)(a[0])){const e=await a[0].sumArea(g(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}let o=a[0];if(((0,h.cy)(o)||(0,c.g)(o))&&(o=(0,u.zt)(a[0],n.spatialReference)),null===o)return 0;if(!(0,c.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("area",[o.asJsonGeometry(),(0,s.b)(o.spatialReference),g(a[1])])})},e.functions.areageodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{(0,c.E)(a,1,3,t);let o=(a=(0,c.H)(a))[0];((0,h.cy)(o)||(0,c.g)(o))&&(o=(0,u.zt)(o,n.spatialReference));const l=g(a[1]),w=(0,f.qr)(a[2]);if((0,c.k)(o)){const e=await o.sumArea(l,w,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}if(null==o)return 0;if(!(0,c.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticArea",[o.asJsonGeometry(),(0,s.b)(o.spatialReference),l,w])})},e.functions.length=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if((0,c.E)(a,1,2,t),a=(0,c.H)(a),(0,c.k)(a[0])){const e=await a[0].sumLength(g(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}let o=a[0];if(((0,h.cy)(a[0])||(0,c.g)(a[0]))&&(o=(0,u.X1)(a[0],n.spatialReference)),null===o)return 0;if(!(0,c.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("length",[o.asJsonGeometry(),(0,s.b)(o.spatialReference),g(a[1])])})},e.functions.length3d=function(n,r){return e.standardFunctionAsync(n,r,async(e,a,o)=>{if((0,c.E)(o,1,2,r),null===(o=(0,c.H)(o))[0])return 0;let l=o[0];if(((0,h.cy)(o[0])||(0,c.g)(o[0]))&&(l=(0,u.X1)(o[0],n.spatialReference)),null===l)return 0;if(!(0,c.d)(l))throw new i.D$("InvalidParameter",r);if(!0===l.hasZ){const{convertFromSpatialReferenceUnit:e,toLengthUnit:n}=await Promise.resolve().then(t.bind(t,40547)),r=(0,f.UI)(l);return e(l.spatialReference,n(o[1]),r)}return(0,d.C)("length",[l.asJsonGeometry(),(0,s.b)(l.spatialReference),g(o[1])])})},e.functions.lengthgeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{(0,c.E)(a,1,3,t);let o=(a=(0,c.H)(a))[0];((0,h.cy)(a[0])||(0,c.g)(a[0]))&&(o=(0,u.X1)(a[0],n.spatialReference));const l=g(a[1]),w=(0,f.qr)(a[2]);if((0,c.k)(o)){const e=await o.sumLength(l,w,n.abortSignal);if(n.abortSignal.aborted)throw new i.D$("Cancelled",t);return e}if(null===o)return 0;if(!(0,c.d)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticLength",[o.asJsonGeometry(),(0,s.b)(o.spatialReference),l,w])})},e.functions.distance=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{a=(0,c.H)(a),(0,c.E)(a,2,3,t);let o=a[0];if(((0,h.cy)(a[0])||(0,c.g)(a[0]))&&(o=(0,u.yg)(a[0],n.spatialReference)),!(0,c.d)(o))throw new i.D$("InvalidParameter",t);let l=a[1];if(((0,h.cy)(a[1])||(0,c.g)(a[1]))&&(l=(0,u.yg)(a[1],n.spatialReference)),!(0,c.d)(l))throw new i.D$("InvalidParameter",t);return(0,d.C)("distance",[o.asJsonGeometry(),l.asJsonGeometry(),(0,s.b)(o.spatialReference),g(a[2])])})},e.functions.distancegeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,c.H)(r),(0,c.E)(r,2,4,t);const a=r[0];if(!(0,c.L)(a))throw new i.D$("InvalidParameter",t);const o=r[1];if(!(0,c.L)(o))throw new i.D$("InvalidParameter",t);return(0,d.C)("geodeticDistance",[a.asJsonGeometry(),o.asJsonGeometry(),(0,s.b)(a.spatialReference),g(r[2]),(0,f.qr)(r[3])])})},e.functions.densify=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,2,3,t),null===r[0])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);const a=(0,c.v)(r[1]);if(isNaN(a))throw new i.D$("InvalidParameter",t);if(a<=0)throw new i.D$("InvalidParameter",t);switch(r[0].type){case"polygon":case"polyline":case"extent":return(0,w.R)(await(0,d.C)("densify",[r[0].asJsonGeometry(),(0,s.b)(r[0].spatialReference),a,g(r[2])]),r[0].spatialReference);default:return r[0]}})},e.functions.densifygeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,c.H)(r),(0,c.E)(r,2,4,t);const a=r[0];if(null==a)return null;if(!(0,c.d)(a))throw new i.D$("InvalidParameter",t);const o=(0,c.v)(r[1]);if(isNaN(o))throw new i.D$("InvalidParameter",t);if(o<=0)throw new i.D$("InvalidParameter",t);const l=g(r[2]),u=(0,f.qr)(r[3]);switch(a.type){case"polygon":case"polyline":case"extent":return(0,w.R)(await(0,d.C)("geodeticDensify",[a.asJsonGeometry(),(0,s.b)(a.spatialReference),o,l,u]),a.spatialReference);default:return a}})},e.functions.generalize=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,2,4,t),null===r[0])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);const a=(0,c.v)(r[1]);if(isNaN(a))throw new i.D$("InvalidParameter",t);const o=(0,c.M)((0,c.N)(r[2],!0));return(0,w.R)(await(0,d.C)("generalize",[r[0].asJsonGeometry(),(0,s.b)(r[0].spatialReference),a,g(r[3]),o]),r[0].spatialReference)})},e.functions.buffer=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,2,3,t),null===r[0])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);const a=(0,c.v)(r[1]);if(isNaN(a))throw new i.D$("InvalidParameter",t);return 0===a?r[0].clone():(0,w.R)(await(0,d.C)("buffer",[r[0].asJsonGeometry(),(0,s.b)(r[0].spatialReference),a,g(r[2])]),r[0].spatialReference)})},e.functions.buffergeodetic=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,c.H)(r),(0,c.E)(r,2,4,t);const a=r[0];if(null==a)return null;if(!(0,c.d)(a))throw new i.D$("InvalidParameter",t);const o=(0,c.v)(r[1]);if(isNaN(o))throw new i.D$("InvalidParameter",t);if(0===o)return a.clone();const l=g(r[2]),u=(0,f.qr)(r[3]);return(0,w.R)(await(0,d.C)("geodesicBuffer",[a.asJsonGeometry(),(0,s.b)(a.spatialReference),o,l,u]),a.spatialReference)})},e.functions.offset=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,c.H)(r),(0,c.E)(r,2,6,t);const a=r[0];if(null===a)return null;if(!(0,c.d)(a)||"polygon"!==a.type&&"polyline"!==a.type)throw new i.D$("InvalidParameter",t);const o=(0,c.v)(r[1]);if(isNaN(o))throw new i.D$("InvalidParameter",t);const l=r[2],u=(0,f.ug)(r[3]),p=(0,c.v)((0,c.N)(r[4],10));if(isNaN(p))throw new i.D$("InvalidParameter",t);const y=(0,c.v)((0,c.N)(r[5],0));if(isNaN(y))throw new i.D$("InvalidParameter",t);return(0,w.R)(await(0,d.C)("offset",[a.asJsonGeometry(),(0,s.b)(a.spatialReference),o,g(l),u,p,y]),a.spatialReference)})},e.functions.rotate=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{r=(0,c.H)(r),(0,c.E)(r,2,3,t);const a=r[0];if(null===a)return null;if(!(0,c.d)(a))throw new i.D$("InvalidParameter",t);const o=(0,c.v)(r[1]);if(!Number.isFinite(o))throw new i.D$("InvalidParameter",t);const s=r[2];if(null!=s&&!(0,c.L)(s))throw new i.D$("InvalidParameter",t);const l=s?.asJsonLikeGeometry();return(0,w.R)(await(0,d.C)("rotate",[a.asJsonGeometry(),o,l?.x,l?.y]),a.spatialReference)})},e.functions.centroid=function(n,t){return e.standardFunctionAsync(n,t,async(e,r,a)=>{if(a=(0,c.H)(a),(0,c.E)(a,1,2,t),null===a[0])return null;const o=(0,f.Hz)(a[1]);let s=a[0];if(((0,h.cy)(a[0])||(0,c.g)(a[0]))&&(s="geometric"===o?(0,u.yg)(a[0],n.spatialReference):(0,u.zt)(a[0],n.spatialReference),null===s))return null;if(!(0,c.d)(s))throw new i.D$("InvalidParameter",t);return(0,w.p)("point","geometric"===o?await(0,d.C)("centroid",[s.asJsonGeometry()]):await(0,d.C)("labelPoint",[s.asJsonGeometry()]),s.spatialReference)})},e.functions.measuretocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.Cd)},e.functions.pointtocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.kr)},e.functions.distancetocoordinate=function(n,t){return e.standardFunctionAsync(n,t,f.Bn)},e.functions.multiparttosinglepart=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,1,1,t),null===r[0])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);const a=r[0].spatialReference;return(await(0,d.C)("multiPartToSinglePart",[r[0].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])).map(e=>(0,w.R)(e,a)).filter(e=>null!=e)})},e.functions.isselfintersecting=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,t)=>{(0,c.E)(t,1,1,n);let r=(t=(0,c.H)(t))[0];return((0,h.cy)(t[0])||(0,c.g)(t[0]))&&(r=(0,u.X1)(t[0],e.spatialReference)),!!(0,c.d)(r)&&await(0,d.C)("isSelfIntersecting",[r.asJsonGeometry(),(0,s.b)(r.spatialReference)])})},e.functions.issimple=function(n,t){return e.standardFunctionAsync(n,t,(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,1,1,t),null===r[0])return!0;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,d.C)("isSimple",[r[0].asJsonGeometry(),(0,s.b)(r[0].spatialReference)])})},e.functions.simplify=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,1,1,t),null===r[0])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,w.R)(await(0,d.C)("simplify",[r[0].asJsonGeometry(),(0,s.b)(r[0].spatialReference)]),r[0].spatialReference)})},e.functions.convexhull=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,1,1,t),null===r[0])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);return(0,w.R)(await(0,d.C)("convexHull",[r[0].asJsonGeometry()]),r[0].spatialReference)})},e.functions.getuser=function(n,t){return e.standardFunctionAsync(n,t,async(e,o,s)=>{(0,c.E)(s,0,2,t);let u=(0,c.N)(s[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,c.w)(u),0===s.length||s[0]instanceof r.A){const e=(0,l.RI)(n,s.length>0?s[0]:null),t=await m(e,u,f);return null!=t?(0,a.Tg)(JSON.parse(JSON.stringify(t))):null}let d=null;if((0,c.k)(s[0])&&(d=s[0]),d){if(f=!1,u)return null;await d.load();const e=await d.getOwningSystemUrl();if(!e){if(!u){const e=await d.getIdentityUser();return null!=e?(0,a.Tg)({username:e}):null}return null}const t=(0,l.RI)(n,new r.A(e)),o=await m(t,u,f);return null!=o?(0,a.Tg)(JSON.parse(JSON.stringify(o))):null}throw new i.D$("InvalidParameter",t)})},e.functions.nearestcoordinate=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,2,2,t),null==r[0]||null==r[1])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);if(!(0,c.L)(r[1]))throw new i.D$("InvalidParameter",t);const a=await(0,d.C)("getNearestCoordinate",[r[0].asJsonGeometry(),r[1].asJsonGeometry()]);return null==a?null:o.A.createMutable({__proto__:null,coordinate:(0,w.p)("point",a.coordinate,r[0].spatialReference),distance:a.distance,sideOfLine:a.sideOfLine})})},e.functions.nearestvertex=function(n,t){return e.standardFunctionAsync(n,t,async(e,n,r)=>{if(r=(0,c.H)(r),(0,c.E)(r,2,2,t),null==r[0]||null==r[1])return null;if(!(0,c.d)(r[0]))throw new i.D$("InvalidParameter",t);if(!(0,c.L)(r[1]))throw new i.D$("InvalidParameter",t);const a=await(0,d.C)("getNearestVertex",[r[0].asJsonGeometry(),r[1].asJsonGeometry()]);return null==a?null:o.A.createMutable({__proto__:null,coordinate:(0,w.p)("point",a.coordinate,r[0].spatialReference),distance:a.distance,sideOfLine:a.sideOfLine})})})}},71163(e,n,t){t.d(n,{C:()=>c});var r=t(29953);let a,o,i=!1;function s(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then(e=>{o=e,i=!0,a=void 0})}async function c(e,n){return i?o.apply("invokeGeometryOp",[e,n]):(await s(),c(e,n))}}}]);