@arcgis/core 5.1.0-next.58 → 5.1.0-next.59

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 (182) hide show
  1. package/applications/Components/SelectionOperation.d.ts +2 -2
  2. package/applications/Components/SelectionOperation.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +1 -0
  5. package/assets/esri/core/workers/chunks/{45b7266580f9ce4fab6c.js → 0622e238693c257abacb.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{05bc675c029ed311427f.js → 155c741a9839d24f04a2.js} +1 -1
  7. package/assets/esri/core/workers/chunks/1ae4e43a399e1974f106.js +1 -0
  8. package/assets/esri/core/workers/chunks/1f8e22df08c2f5fbb8c8.js +1 -0
  9. package/assets/esri/core/workers/chunks/{2327b368673a974dee8b.js → 2339465190c9d5ede25f.js} +1 -1
  10. package/assets/esri/core/workers/chunks/23f6d24bf850bc3280ec.js +1 -0
  11. package/assets/esri/core/workers/chunks/2541ac6e0ed1184edc9b.js +1 -0
  12. package/assets/esri/core/workers/chunks/34207774bc371e95ba3c.js +1 -0
  13. package/assets/esri/core/workers/chunks/{01777e91cd4e0bf04fd0.js → 35217befc8f9882d139e.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{40bcfc4f8efe7de7ec9d.js → 3de17e89973160b42923.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{666e1e79fcb309b0b9b1.js → 48d289db3145ce6c02bb.js} +1 -1
  16. package/assets/esri/core/workers/chunks/4c73c2f4331351e2a50c.js +1 -0
  17. package/assets/esri/core/workers/chunks/{2757cf54656b5d318b11.js → 55a0b69cf034ac32fc25.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{4d54beab8ae5ff31e7b0.js → 5a9f5a49dc68b42762bb.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{7cec3252e3ee56424b9e.js → 5c6e5f22450dd0583074.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{b39b4db86a1049f0b901.js → 6be9d00839002f24fafd.js} +1 -1
  21. package/assets/esri/core/workers/chunks/6c886f19875291d02407.js +1 -0
  22. package/assets/esri/core/workers/chunks/75e28458e08b0738b35a.js +2 -0
  23. package/assets/esri/core/workers/chunks/{c460ca93ed8e20d8b53a.js → 86a6dd19903fa5023cc7.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{6c571008bee8376ea50a.js → 8ccf2f65d8ed3c48ffff.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{fcfaaced184f8da3e28d.js → 9b53aa2429573f1b977f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/9d580b5bcd59857a5702.js +1405 -0
  27. package/assets/esri/core/workers/chunks/a37697ef360e2425768a.js +1 -0
  28. package/assets/esri/core/workers/chunks/{a787fe09d3df9d4254ba.js → ab3183f2327ff26e2b45.js} +1 -1
  29. package/assets/esri/core/workers/chunks/b0f2ce61d3cad413898e.js +1 -0
  30. package/assets/esri/core/workers/chunks/{53c149bca42595b7dd1e.js → bbdf27bc34fadbe8e6fe.js} +1 -1
  31. package/assets/esri/core/workers/chunks/be42fe0b7ba0e27030b2.js +1 -0
  32. package/assets/esri/core/workers/chunks/d0c3ab70f390cd579fed.js +1 -0
  33. package/assets/esri/core/workers/chunks/{5a573fa1012092328b88.js → d816d1a4220d827faf63.js} +1 -1
  34. package/assets/esri/core/workers/chunks/e26894655823849947f4.js +1 -0
  35. package/assets/esri/core/workers/chunks/e59f5dc8c85bcea66e98.js +1 -0
  36. package/assets/esri/core/workers/chunks/{ccf845ac0ac354507a25.js → ec1b2eb05410848081c9.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{851dd71d28681d4eccfd.js → f7af90c5f9d371eb7009.js} +1 -1
  38. package/assets/esri/core/workers/chunks/fa6e1ad099b43a6f5501.js +1 -0
  39. package/assets/esri/core/workers/chunks/{4a6186001323b47c23a4.js → fee1d873127dca02459f.js} +1 -1
  40. package/chunks/GlobalIllumination.glsl.js +101 -0
  41. package/chunks/GlobalIlluminationBlur.glsl.js +68 -0
  42. package/config.js +1 -1
  43. package/geometry/Mesh.js +1 -1
  44. package/geometry/support/polygonUtils.js +1 -1
  45. package/geometry/support/{triangulationUtils.js → triangulationUtilsDeprecated.js} +1 -1
  46. package/kernel.js +1 -1
  47. package/layers/support/SceneModification.js +1 -1
  48. package/package.json +2 -2
  49. package/renderers/ClassBreaksRenderer.js +1 -1
  50. package/renderers/DictionaryRenderer.js +1 -1
  51. package/renderers/DotDensityRenderer.js +1 -1
  52. package/renderers/HeatmapRenderer.js +1 -1
  53. package/renderers/PieChartRenderer.js +1 -1
  54. package/renderers/Renderer.js +1 -1
  55. package/renderers/SimpleRenderer.js +1 -1
  56. package/renderers/UniqueValueRenderer.js +1 -1
  57. package/renderers/support/AttributeColorInfo.js +1 -1
  58. package/renderers/support/ClassBreakInfo.d.ts +6 -0
  59. package/renderers/support/ClassBreakInfo.js +1 -1
  60. package/renderers/support/UniqueValueClass.d.ts +12 -0
  61. package/renderers/support/UniqueValueClass.js +1 -1
  62. package/renderers/support/UniqueValueInfo.d.ts +12 -0
  63. package/renderers/support/UniqueValueInfo.js +1 -1
  64. package/renderers/visualVariables/ColorVariable.js +1 -1
  65. package/renderers/visualVariables/OpacityVariable.js +1 -1
  66. package/renderers/visualVariables/SizeVariable.js +1 -1
  67. package/renderers/visualVariables/VisualVariable.js +1 -1
  68. package/support/revision.js +1 -1
  69. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  70. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  71. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  72. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  73. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  74. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  75. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  76. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  77. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  78. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  79. package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
  80. package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
  81. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  82. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  83. package/views/3d/FocusAreasView.js +1 -1
  84. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  85. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  86. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  87. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  88. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  89. package/views/3d/layers/Lyr3DWorker.js +1 -1
  90. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  91. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  92. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  93. package/views/3d/layers/graphics/extrudeUtils.js +1 -1
  94. package/views/3d/layers/graphics/extrudeUtilsDeprecated.js +2 -0
  95. package/views/3d/layers/graphics/tessellationUtils.js +2 -0
  96. package/views/3d/layers/i3s/PointCloudHighlights.js +1 -1
  97. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  98. package/views/3d/layers/i3s/PointCloudRendererNode.js +1 -1
  99. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  100. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  101. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  102. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  103. package/views/3d/support/renderInfoUtils/line.js +1 -1
  104. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  105. package/views/3d/support/renderInfoUtils/polygonDeprecated.js +2 -0
  106. package/views/3d/terrain/OverlayRenderer.js +1 -1
  107. package/views/3d/terrain/TerrainRenderer.js +1 -1
  108. package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
  109. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  110. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  111. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  112. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  113. package/views/3d/webgl-engine/collections/Component/RenderGeometry.js +1 -1
  114. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  115. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  116. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  117. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +6 -5
  118. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js +4 -0
  119. package/views/3d/webgl-engine/core/shaderLibrary/shading/EncodingColor.glsl.js +7 -0
  120. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +6 -6
  121. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +93 -50
  122. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +20 -0
  123. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +23 -9
  124. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
  125. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +1 -1
  126. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  127. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  128. package/views/3d/webgl-engine/effects/emissive/emissions.js +2 -0
  129. package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +2 -0
  130. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +2 -0
  131. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +2 -0
  132. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +2 -0
  133. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +2 -0
  134. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  135. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  136. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  137. package/views/3d/webgl-engine/lib/Material.js +1 -1
  138. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  139. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  140. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  141. package/views/3d/webgl-engine/lib/ReprojectionUniforms.js +1 -1
  142. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  143. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  144. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  145. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  146. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  147. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  148. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  149. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  150. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  151. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  152. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  153. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  154. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  155. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  156. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  157. package/views/3d/webgl-engine/shaders/GlobalIllumination.glsl.js +2 -0
  158. package/views/3d/webgl-engine/shaders/GlobalIlluminationBlur.glsl.js +2 -0
  159. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  160. package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
  161. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  162. package/{widgets/support/Selector2D → views/selection}/SelectionOperation.d.ts +10 -11
  163. package/views/selection/SelectionOperation.js +2 -0
  164. package/views/selection/types.d.ts +138 -2
  165. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  166. package/assets/esri/core/workers/chunks/009db7b459b18f6a668b.js +0 -1
  167. package/assets/esri/core/workers/chunks/0fc60b4c44c4e865b699.js +0 -2
  168. package/assets/esri/core/workers/chunks/34484afe767d60f85982.js +0 -1
  169. package/assets/esri/core/workers/chunks/55bb5b7817c2963c8bfa.js +0 -1
  170. package/assets/esri/core/workers/chunks/572fcd33ae3648ed4f9c.js +0 -1
  171. package/assets/esri/core/workers/chunks/66a4d764937918a2779f.js +0 -1
  172. package/assets/esri/core/workers/chunks/6b56c8ba978ec6edd6b8.js +0 -1
  173. package/assets/esri/core/workers/chunks/92fb6519b01d110ee947.js +0 -1041
  174. package/assets/esri/core/workers/chunks/9806cc96414065ae0afe.js +0 -1
  175. package/assets/esri/core/workers/chunks/9b365a6242b0287f8727.js +0 -1
  176. package/assets/esri/core/workers/chunks/a029db48079af4b5cccd.js +0 -1
  177. package/assets/esri/core/workers/chunks/ec91d5081f423755cb07.js +0 -1
  178. package/assets/esri/core/workers/chunks/f9fe89ced41b49608667.js +0 -1
  179. package/assets/esri/core/workers/chunks/fce30184f354fb7d11af.js +0 -1
  180. package/widgets/support/Selector2D/SelectionOperation.js +0 -2
  181. package/widgets/support/Selector2D/types.d.ts +0 -139
  182. /package/assets/esri/core/workers/chunks/{0fc60b4c44c4e865b699.js.LICENSE.txt → 75e28458e08b0738b35a.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[88,926],{69540(e,t,i){i.d(t,{OU:()=>h,Pw:()=>c});var s=i(5482),r=i(69622),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,r={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,n.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):r[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return r=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],r),r},c=h(r.A)},66344(e,t,i){i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,i,r,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return s||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new n(i,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const r=e.lifetime;i[r]=(i[r]||0)+e.size,this._clients.forEach(i=>{const{id:r,name:n}=i;if(s.startsWith(r)){const i=t[n]||0;t[n]=i+e.size}})});const s={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[i]||0;t[i]=r,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const r=Object.keys(t);r.sort((e,i)=>t[i]-t[e]),r.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const r=this._clients.get(e.split(o)[0])?.removeFunc,n=r?.(t,s,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!s||n.startsWith(s))){const s=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,a,s),i.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!s||r.startsWith(s)){const s=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,n,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new r(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>h,UT:()=>m,aD:()=>y,jJ:()=>u});var s=i(5482),r=i(69622),n=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function p(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function m(e,t){return new _(e,t)}let _=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,a.MZ)()],_.prototype,"value",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"error",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"finished",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"promise",void 0),(0,s.Cg)([(0,a.MZ)()],_.prototype,"_result",void 0),_=(0,s.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],_);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},75503(e,t,i){i.d(t,{wq:()=>a});var s=i(4576),r=i(21818),n=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),w.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(v(e,i))for(b.clear();i;){for(let r=0,n=i.children.length;r<n;r++){const n=i.children[r],o=i.leaf?s(n):n;v(e,o)&&(i.leaf?t(n):g(e,o)?l(n,t):b.push(n))}i=b.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!v(e,t))return!1;for(b.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],n=t.leaf?i(r):r;if(v(e,n)){if(t.leaf||g(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();i||C.length>0;){if(i||(i=C.pop(),n=C.data[C.length-1],o=S.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,r.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),C.push(i),this._condense(C),this;a||i.leaf||!g(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(C.push(i),S.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const r=i-t+1;let n=this._maxEntries;if(r<=n){const s=new F(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(s-1)));const o=new T([]);o.height=s;const a=Math.ceil(r/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,i,l,this._compareMinX);for(let r=t;r<=i;r+=l){const t=Math.min(r+l-1,i);x(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,r=i?e:s(e);C.clear();const n=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=_(e,o)-a;l<r?(r=l,s=a<s?a:s,i=o):l===r&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(r,this._data,t,C);for(n.children.push(e),c(n,r);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}(r,C,t)}_split(e,t){const i=e.data[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const n=this._chooseSplitIndex(i,r,s);if(!n)return;const o=i.children.splice(n,i.children.length-n),a=i.leaf?new F(o):new T(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,r,n;s=r=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=y(t,a),u=p(t)+p(a);l<s?(s=l,n=o,r=u<r?u:r):l===s&&u<r&&(r=u,n=o)}return n}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,r)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const r=this._toBBox,n=h(e,0,t,r),o=h(e,i-t,i,r);let a=m(n)+m(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(n,e.leaf?r(t):t),a+=m(n)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,s.qh)(n,i,n.length,r.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(w.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,r.z)(e));else w.pushArray(i.children);i=w.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,s,r){r||(r=new F([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],c(r,e.leaf?s(n):n);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,r){const n=[t,i];for(;n.length;){const t=n.pop(),i=n.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,r),n.push(i,a,a,t)}}const b=new n.A,w=new n.A,C=new n.A,S=new n.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class F extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>m,Vh:()=>_,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>u});var s=i(37955),r=i(36563),n=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function u(e,t,i={}){return h(e,t,i,p)}function h(e,t,i={},s){let r=null;const o=i.once?(e,i)=>{s(e)&&((0,n.xt)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,n.xt)(h),i(e)}const f=l(e,(e,i)=>{c(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{f.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.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,r.vE)([(0,o.u7)(i,()=>{l(),n((0,o.NK)())}),h(e,e=>{l(),s(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(80559);const m={sync:!0},_={initial:!0},y={sync:!0,initial:!0}},60408(e,t,i){function s(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":s(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>r,W0:()=>c,ZC:()=>s,fT:()=>n,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>h,xD:()=>d});var s=i(5443),r=i(91075),n=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function h(e){return null==e?null:e instanceof r.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?s.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:s.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},50498(e,t,i){i.d(t,{Ye:()=>c,gy:()=>h,iI:()=>f,yR:()=>d});var s=i(66552),r=i(5443),n=i(91075),o=i(48526),a=i(86738),l=i(39829),u=i(82799);const h=(0,s.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,s.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:n.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},f=new s.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0})},6518(e,t,i){i.d(t,{F:()=>a});var s=i(44208),r=i(75503),n=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,n.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},39357(e,t,i){i.d(t,{A:()=>a});var s,r=i(5482),n=i(25482),o=i(91429);let a=s=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},53177(e,t,i){i.d(t,{A:()=>h});var s,r=i(5482),n=i(4718),o=i(91429),a=i(39357),l=i(76357),u=i(93223);let h=class extends l.A{static{s=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some(e=>(String(e.code)===i&&(t=e.name),!!t))}return t}clone(){return new s({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,r.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},76357(e,t,i){i.d(t,{A:()=>u});var s=i(5482),r=i(66552),n=i(25482),o=i(91429),a=i(93223);const l=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,s.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},20437(e,t,i){i.d(t,{A:()=>p});var s,r=i(5482),n=i(66552),o=i(25482),a=i(91429),l=i(56507),u=i(8631),h=i(98453),c=i(36005),d=i(93223);const f=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let p=class extends o.o{static{s=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],p.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],p.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],p.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],p.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],p.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"nullable",void 0),(0,r.Cg)([(0,d.e)(h.m)],p.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],p.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],p.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],p.prototype,"visible",void 0),p=s=(0,r.Cg)([(0,a.$K)("esri.layers.support.Field")],p)},41628(e,t,i){i.d(t,{A:()=>l});var s,r=i(5482),n=i(91429),o=i(76357),a=i(93223);let l=class extends o.A{static{s=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new s({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,r.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=s=(0,r.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],l)},8631(e,t,i){i.d(t,{r:()=>d,g:()=>c});var s,r=i(53177),n=i(76357),o=i(5482),a=i(91429),l=i(93223);let u=class extends n.A{static{s=this}constructor(e){super(e),this.type="inherited"}clone(){return new s}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=s=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=i(41628);const c={key:"type",base:n.A,typeMap:{range:h.A,"coded-value":r.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453(e,t,i){i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},31756(e,t,i){i.d(t,{j:()=>n});var s=i(86211),r=i(79258);const n={unknown:1,inches:(0,s.oU)(1,"meters","inches"),feet:(0,s.oU)(1,"meters","feet"),"us-feet":(0,s.oU)(1,"meters","us-feet"),yards:(0,s.oU)(1,"meters","yards"),miles:(0,s.oU)(1,"meters","miles"),"nautical-miles":(0,s.oU)(1,"meters","nautical-miles"),millimeters:(0,s.oU)(1,"meters","millimeters"),centimeters:(0,s.oU)(1,"meters","centimeters"),decimeters:(0,s.oU)(1,"meters","decimeters"),meters:(0,s.oU)(1,"meters","meters"),kilometers:(0,s.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,s.vl)(1,"meters",r.$O.radius)}},63746(e,t,i){function s(e){return class{constructor(){for(const t of e)this[t]=null}}}function r(e,t=1){const{transform:i,hasZ:s,hasM:r}=e;if(null==i)return s&&1!==t?e=>{e[2]*=t}:null;const[n,o]=function(e,t,i,s){let{scale:r,translate:n,originPosition:o}=e;return"upperLeft"===o&&(r=r.map((e,t)=>1===t?-e:e)),t&&(r=r.map((e,t)=>2===t?e*s:e),n=n.map((e,t)=>2===t?e*s:e)),!t&&i&&(r=r.filter((e,t)=>2!==t),n=n.filter((e,t)=>2!==t)),[r,n]}(i,s,r,t),a=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==a||0!==e[t]);++t)e[t]=e[t]*n[t]+o[t]}}i.d(t,{Mv:()=>r,_7:()=>s}),i(53966)},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var s=i(92602),r=i(70333),n=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function h(e,t,i){const s={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))s[r]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(i?.[r]);s[r]=t?e:JSON.stringify(e)}else s[r]=t?n:JSON.stringify(n);else s[r]=n}return s}async function c(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&s.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(3713),i.e(148)]).then(i.bind(i,50148));const l=await r.id.getCredential(e,n);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>d,Jn:()=>f,Qc:()=>p,getApiKey:()=>h,getSessionToken:()=>c});var s=i(92602),r=i(11254),n=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function h(e){if(!p(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=s.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?s.A.apiKey:null}async function c(e){if(!s.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=h(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:n,duration:a=43200}=s.A.sessions.basemap,c=`${t}:${i}`,d=l.get(c);if(d&&(!n||d.endTime>Date.now()))return d.sessionToken;let f;u=(0,r.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(c,f)}finally{u=null}return f.sessionToken}function d(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function f(e,t){return t?p(e):null!=h(e)}function p(e){const t=(0,n.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},88625(e,t,i){i.d(t,{A:()=>g});var s,r=i(5482),n=i(69540),o=i(66552),a=i(25482),l=i(97768),u=i(91429),h=i(30524);let c=s=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,h.Dx)(e,t,null,this.expression)}clone(){return new s({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=s=(0,r.Cg)([(0,u.$K)("esri.symbols.support.FeatureExpressionInfo")],c);const d=c;var f=i(16271),p=i(36005),m=i(43937);const _=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,i,s){t[i]=e.write({},s),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r.Cg)([(0,u.MZ)({type:d,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,p.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,m.K)("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,r.Cg)([(0,u.MZ)({type:_.apiValues,nonNullable:!0,json:{type:_.jsonValues,read:_.read,write:{writer:_.write,isRequired:!0}}})],g.prototype,"mode",null),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:f.KQ,json:{type:String,read:y.read,write:y.write}})],g.prototype,"unit",null),g=(0,r.Cg)([(0,u.$K)("esri.symbols.support.ElevationInfo")],g)},16271(e,t,i){i.d(t,{Ao:()=>n,KQ:()=>o});var s=i(4576),r=i(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,s.TF)(e,"decimal-degrees"),e.sort(),e}()},20401(e,t,i){i.r(t),i.d(t,{default:()=>Pe});var s=i(5482),r=i(65529),n=i(17676),o=i(36708),a=i(91429),l=i(79897),u=i(16930),h=i(65864),c=i(4576),d=i(49186),f=i(53966),p=i(87992),m=i(70328),_=i(6518),y=i(50498),g=i(69397),v=i(27647);class x{constructor(e=null,t={},i,s,r=0){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=s,this.displayId=r}weakClone(){return new x(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId)}clone(){return new x(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId)}get usedMemory(){return 128+(0,g.lM)(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(e){return this.centroid??=(0,v.Q)(this.geometry&&(0,p.JR)(this.geometry)),this.centroid}}const b={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new x((0,p.Nh)(y.gy.fromJSON(i),t),e.attributes,null,e.objectId),getGeometry:e=>e.geometry&&(0,p.JR)(e.geometry),getGeometryWithCurves:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};var w=i(51441);const C=(0,m.vt)();class S{constructor(e,t,i){this.geometryType=e,this.hasZ=t,this.hasM=i,this._boundsStore=new _.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=b}get usedMemory(){return this._usedMemory}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){const e=this._featuresById.size;let t=0;return this._featuresById.forEach(({geometry:e})=>{t+=e?e.vertexCount:0}),{featureCount:e,vertexCount:t}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,r]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:r,spatialReference:(0,w.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(c.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,m.Jt)(C,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void f.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t)??void 0,this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):this.onFeatureAdd?.(e),!e.geometry)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);this._boundsStore.set(t,(0,p.NO)(e.geometry,s)),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return f.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,p.NO)(s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}var I=i(56390),M=i(87045),F=i(72802),T=i(61956),A=i(88625),z=i(66344),B=i(91869),P=i(86211),O=i(52006),E=i(16271);function R(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:i}=t;return new Z(e,i)}return new j}class j{async alignCandidates(e,t,i){return e}notifyElevationSourceChange(){}}class Z{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new z.q(1024),this._cacheVersion=0}async alignCandidates(e,t,i){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,i):(function(e,t,i){const{offset:s,unit:r}=i;if(null==s)return;const n=(0,P.G9)(t),o=s*((0,E.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o,t.curve&&((0,O.yP)(t.curve)[2]+=o);continue;case"vertex":t.target.z+=o;continue}}(e,t,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,i){const s=new Map;for(const t of e)(0,B.tE)(s,t.objectId,Y).push(t);const[r,o,a]=this._prepareQuery(s,t),l=await this._alignPointsInFeatures(r,i);if((0,n.Te)(i),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,i);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const i=[],s=[];for(const[t,r]of e){const e=[];for(const i of r)this._addToQueriesOrCachedResult(t,i.target,e,s),"edge"===i.type&&(this._addToQueriesOrCachedResult(t,i.start,e,s),this._addToQueriesOrCachedResult(t,i.end,e,s));0!==e.length&&i.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:i},s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,i,s){const r=q(e,t),n=this._alignmentsCache.get(r);null==n?i.push(t):s.push(new k(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:i,failedObjectIds:s},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(s.has(r)){n+=a.length;continue}const e=!i.has(r);for(const i of a){const s=q(r,i),a=t[n++];i.z=a,e&&o.put(s,a,1)}}}}class k{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function q(e,{x:t,y:i,z:s,spatialReference:r}){return`${e}-${t}-${i}-${s??0}}-wkid:${r?.wkid}`}function Y(){return[]}class X{filter(e,t){return t}notifyElevationSourceChange(){}}class N{filter(e,t){const{point:i,distance:s}=e,{z:r}=i;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(s),o=this._updateCandidatesTo3D(t,i,n).filter(V);return o.sort(J),o}_updateCandidatesTo3D(e,t,i){for(const s of e)switch(s.type){case"edge":L(s,t,i);continue;case"vertex":H(s,t,i);continue}return e}}function V(e){return e.distance<=1}function G(e=!1){return e?new N:new X}function L(e,t,{x:i,y:s,z:r}){const{start:n,end:o,target:a}=e;if(e.curve)throw new Error("Curves are not yet supported.");e.draped||function(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,o=s.z-i.z,a=r*r+n*n+o*o,l=(t.x-i.x)*r+(t.y-i.y)*n+o*(t.z-i.z),u=Math.min(1,Math.max(0,l/a)),h=i.x+r*u,c=i.y+n*u,d=i.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/i,u=(t.y-a.y)/s,h=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+h*h)}function H(e,t,{x:i,y:s,z:r}){const{target:n}=e,o=(t.x-n.x)/i,a=(t.y-n.y)/s,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function J(e,t){return e.distance-t.distance}var $=i(4718),U=i(799);function D(e=!1,t){return e?new W(t):new K}class K{async fetch(){return[]}notifySymbologyChange(){}}class W{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new z.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const i=[],s=[],r=this._candidatesCache;for(const t of e){const e=Q(t),n=r.get(e);if(n)for(const e of n)s.push((0,$.o8)(e));else i.push(t),r.put(e,[],1)}if(0===i.length)return s;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(i,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],s=Q(i[l[e]]),n=r.get(s);n.push(t),r.put(s,n,n.length),u.push((0,$.o8)(t))}return s.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function Q(e){switch(e.type){case"vertex":{const{objectId:t,target:i}=e,s=`${t}-vertex-${i.x}-${i.y}-${i.z??0}`;return(0,U.Wm)(s).toString()}case"edge":{const{objectId:t,start:i,end:s}=e,r=`${t}-edge-${i.x}-${i.y}-${i.z??0}-to-${s.x}-${s.y}-${s.z??0}`;return(0,U.Wm)(r).toString()}default:return""}}var ee=i(69622),te=i(60999),ie=i(3483),se=i(13069),re=i(5443),ne=i(19419),oe=i(92722),ae=i(54339);class le{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new le;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}var ue=i(60694),he=i(62815),ce=i(63746);class de{constructor(e){this._options=e,this.featureSet=new le,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=de._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=(0,ae.W)(e,this._idInfo);const{spatialReference:e,features:t}=this.featureSet;if(e)for(const{geometry:i}of t)i&&(i.spatialReference=e);this.featureSet.transform=null}feature(){this._attributesClass??=(0,ce._7)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push(new x(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(e){const{hasZ:t,hasM:i}=this.featureSet;this.featureSet.features.at(-1).centroid=new oe.A([],e,t,i)}geometry(e,t,i){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:s,hasM:r}=this.featureSet;s??=!1,r??=!1,this._vertex=[0,0],s&&this._vertex.push(0),r&&this._vertex.push(0);const n=y.gy.fromJSON(t);this._isPolygon="polygon"===n;const o=Number(this._isPolygon),a="point"===n?1:i.reduce((e,t)=>e+t-o,0),l="point"===n?0:i.length;if(this._geometry=(0,p.V2)(n,a,l,s,r,!1),this._push=s?r?de._pushXYZM:de._pushXYZ:r?de._pushXYM:de._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let e=0;e<l;++e)this._geometry.partOffsets[e+1]=this._geometry.partOffsets[e]+i[e]-o}this._ringEndsAt=o?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=this._geometry}coord(e){const t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(t),this._push(this)))}curvedGeometry(e,t,i,s){let{hasZ:r,hasM:n}=this.featureSet;r??=!1,n??=!1,this._i=this._iVertex=this._iPart=0;const o=y.gy.fromJSON(e);this._isPolygon="polygon"===o;const a=Number(!this._isPolygon),l=t.length;let u=0,h=0,c=a*l;for(let e=0;e<i.length;++e)switch(c+=s[e],i[e]){case 1:case 3:u+=s[e];continue;case 2:h+=s[e]}this._geometry=(0,p.V2)(o,c,l,r,n,!0,u,h);const{partOffsets:d}=this._geometry;d[0]=0;for(let e=0,i=0;e<l;++e){d[e+1]=d[e]+a;for(let r=0;r<t[e];++r)d[e+1]+=s[i++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(e){}finishCurvedPart(e){this._isPolygon||(this._transform(e,this._vertex),this._push(this)),++this._iPart}lineSegment(e,t){this._transform(e,this._vertex),this._push(this)}bezierSegment(e,t,i,s){this._transform(e,this._vertex),this._push(this),this._transformXY(t,me.b[0]),this._transformXY(i,me.b[1]),this._transformXY(s,me.b[2]),this._i=(0,p.tr)(this._vertex,me,this._geometry,this._iVertex-1,this._i)}circularArcSegment(e,t,i){this._transform(e,this._vertex),this._push(this),this._transformXY(t,fe.c[0]),this._transformXY(i,fe.c[1]),this._i=(0,p.e6)(this._vertex,fe,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(e,t,i,s,r,n,o,a){this._transform(e,this._vertex),this._push(this),this._transformXY(t,pe.a[0]),this._transformXY(i,pe.a[1]),pe.a[2]=s,pe.a[3]=r,pe.a[4]=n,pe.a[5]=o,pe.a[6]=a,this._i=(0,p._s)(this._vertex,pe,this._geometry,this._iVertex-1,this._i)}static _pushXY(e){const t=e._iVertex++,{vertexXY:i}=e._geometry;[i[2*t],i[2*t+1]]=e._vertex}static _pushXYZ(e){const t=e._iVertex++,{vertexXY:i,vertexZ:s}=e._geometry;[i[2*t],i[2*t+1],s[t]]=e._vertex}static _pushXYM(e){const t=e._iVertex++,{vertexXY:i,vertexM:s}=e._geometry;[i[2*t],i[2*t+1],s[t]]=e._vertex}static _pushXYZM(e){const t=e._iVertex++,{vertexXY:i,vertexM:s,vertexZ:r}=e._geometry;[i[2*t],i[2*t+1],r[t],s[t]]=e._vertex}_setVertexTransformer(){const{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:i,transform:s}=this.featureSet,r=i?(0,he.d)(e,t):1;this._transformInPlace??=(0,ce.Mv)(this.featureSet,r),this._transformInPlaceXY??=(0,ce.Mv)({transform:s})}_transform(e,t){for(let i=0;i<e.length;++i)t[i]=e[i];this._transformInPlace?.(t)}_transformXY(e,t){t[0]=e[0],t[1]=e[1],this._transformInPlaceXY?.(t)}}const fe={c:[[0,0],[0,0]]},pe={a:[[0,0],[0,0],0,0,0,0,0]},me={b:[[0,0],[0,0],[0,0]]};var _e=i(80893);class ye{constructor(e,t){this.key=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{key:this.key,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,te.UT)(async e=>{const i=await(0,te.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,i.ok?i.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,te.UT)(async i=>{const s=await(0,te.DZ)(t.fetchFeatures(this,e.featureCount,i));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,s.ok?s.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}}let ge=class extends ee.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=(0,ie.KC)(e,this._mandatoryOutFields);(0,ie.aI)(i,t)||(this._set("outFields",i),(0,ie.Yy)(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,c.aI)(e,t,({id:e},{id:t})=>e===t)}),this.addHandles((0,o.z7)(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=(0,te.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),f.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,ue.Wo)(this.url))return;const e=(0,te.UT)(async e=>{try{const t=await(0,_e.Jf)(this.url,new T.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=re.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),f.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.consumePromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.consumePromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<be}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(we/(i*i))<Ce}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.consumePromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new ye(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:xe,signal:t})}async _fetchFeatures(e,t,i){let s=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,i);l&&(s+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!h||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const r=e?(0,se.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,se.AG)(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}async _queryFeatures(e,t){return 0===e.num?new le:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this;return await(0,_e.IJ)(this.url,e,new de({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:xe,signal:t})}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this;return function({exceededTransferLimit:e,features:t,fields:i,geometryType:s,hasM:r,hasZ:n,spatialReference:o,transform:a},l){const u=new le;u.exceededTransferLimit=e??!1;for(const e of t??[]){let t,i;s&&(t=e.geometry&&(0,p.ME)(e.geometry),i=e.centroid&&new oe.A([],[e.centroid.x,e.centroid.y]));const r=(0,ae.W)(e,l);u.features.push(new x(t,e.attributes,i,r))}return u.fields=i??u.fields,u.geometryType=s??null,u.hasM=r??!1,u.hasZ=n??!1,u.spatialReference=o??null,u.transform=a??null,u}(await(0,_e.eW)(this.url,e,i,{query:this._configuration.customParameters,timeout:xe,signal:t}),{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,s=(0,ie.KC)((0,ie.iv)(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,this.capabilities.data.supportsTrueCurve&&(!this.capabilities.query.supportsFormatPBF||this.capabilities.query.supportsFormatPBFWithCurves)&&(t.returnTrueCurves=!0),null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new T.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,ne.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?T.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||ve);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"url",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"currentVersion",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"objectIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"globalIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"capabilities",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"spatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"store",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_minimumVerticesPerFeature",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"_mandatoryOutFields",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"outFields",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"suspended",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"_historicMoment",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"filter",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"customParameters",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_configuration",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tileInfo",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tileSize",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tilesOfInterest",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"availability",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"hasZ",null),ge=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ge);const ve=2e3,xe=6e5,be=1e6,we=25,Ce=1;i(44208);class Se{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const i=this._priorities.get(e);if(null==i||i<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[i,s]of this._store)if(!t.has(i)&&e(s,i))return!0;for(const[i]of t){const t=this._store.get(i);if(t&&e(t,i))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let Ie=class extends ee.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new _.F,this._tiles=new Se,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,ne.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const i=this.featureStore.upsertMany(t),s=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,ie.E$)(e,t),new Set(Object.keys(i[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),s),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:i}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<i||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const i of e.objectIds)if(1===this._refCounts.get(i)){const e=this.featureStore.getFeature(i);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){const i=this._tiles.get(e);if(i)return!i.objectIds.size||(0,ie.Yy)(t,i.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){const s=e.id;this._tiles.set(s,new Me(e,t,i)),this._tileBounds.set(s,e.extent),this._tileFeatureCounts.set(s,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const i=e.key.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){if(!e.length)return;const{features:s}=await t(e,i);for(const e of s){if(this._tmpBoundingRect.fill(0),null==e.geometry||0===e.geometry.vertexCount)continue;(0,ne.Ie)(this._tmpBoundingRect);const t=(0,p.NO)(e.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(t,t=>{const i=this._tiles.get(t);this.featureStore.add(e);const s=e.objectId;i.objectIds.has(s)||(i.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(i.key.id,i.objectIds.size))})}}process(e,t=()=>!0,i){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,ne.HY)((0,ne.VY)(this.extent,this._tmpBoundingRect),e.extent))return new Te(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new Te(e);if(this._hasAttributesForTile(e.id,i))return new Te(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo,i)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,i,s){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await(0,_e.gW)(t,i,s),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const i=new Fe(e.level,e.row,e.col);return t.updateTileInfo(i,1),this._tileBounds.forEachInBounds(e.extent,s=>{const r=this._tiles.get(s)?.key;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,r=i?t:e,n=1<<r.level-s.level;return Math.floor(r.row/n)===s.row&&Math.floor(r.col/n)===s.col}(e,r)&&this._populateChildren(i,r,t,this._tileFeatureCounts.get(r.id)||0)}),i}_populateChildren(e,t,i,s){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,i,s);else{const r=new Fe(e.level+1,n,o);i.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,i,s)}}_simplify(e,t,i,s,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=i&&(i.children[s]=null),n);const o=r/2,a=o*o;let l=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];l+=null!=s?this._simplify(s,t,e,i,o):a}return 0===l?this._mergeChildren(e):1-l/n<ze&&(this._purge(e),null!=i&&(i.children[s]=null),l=n),l}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const s=this._tiles.get(e.id);if(s){i=i?(0,ie.E$)(i,s.attributeKeys):new Set(s.attributeKeys);for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const i of e.children)null!=i&&(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i,s){const r=new Ae(i,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,s),r.info}_collectMissingTilesRecurse(e,t,i,s){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,s);if(r&&t.addMissing(e.level,e.row,e.col,i),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,i));const n=i/2;for(let i=0;i<e.children.length;i++){const r=e.children[i];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),n):this._collectMissingTilesRecurse(r,t,n,s)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],Ie.prototype,"featureStore",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"tileInfo",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"extent",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"maximumByteSize",void 0),Ie=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Ie);class Me{constructor(e,t,i){this.key=e,this.objectIds=t,this.attributeKeys=i}}class Fe extends F.U{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class Te{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,ne.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class Ae{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new Te(t),null!=i&&(this._extent=(0,ne.VY)(i))}addMissing(e,t,i,s){const r=new F.U(e,t,i);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||(0,ne.HY)(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:s}),this.info.coveredArea-=(0,ne.Wc)(r.extent))}}const ze=.18751;let Be=class extends r.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=Promise.withResolvers(),this._elevationAligner=R(),this._elevationFilter=G(),this._symbologyCandidatesFetcher=D(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return(0,n.Te)(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return(0,n.Te)(t),s}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:i,timeInfo:s,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=u.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new S(t,n,!1),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new I.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i},timeInfo:s}),this._featureFetcher=new ge({store:new Ie({featureStore:this._featureStore}),url:e.serviceInfo.url,currentVersion:e.serviceInfo.currentVersion,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:u.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=R(l,{elevationInfo:null!=e.elevationInfo?A.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=G(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Oe}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Oe}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Oe}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const i=function(e,t){const i=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:i}};const{distance:s,units:r,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,h.rS)(e.filter.geometry):void 0,distance:s,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:i,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),s=t?.signal,r=await this._queryEngine.executeQueryForSnapping(i,s);(0,n.Te)(s);const o=await this._elevationAligner.alignCandidates(r.candidates,u.A.fromJSON(e.point.spatialReference)??u.A.WGS84,s);(0,n.Te)(s);const a=await this._symbologyCandidatesFetcher.fetch(o,s);(0,n.Te)(s);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>F.U.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?M.A.fromJSON(e.tileInfo):null,Oe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Oe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),Oe}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Oe}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Oe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Oe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Oe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=D(e,this._getSymbologyCandidates),Oe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?T.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,s.Cg)([(0,a.MZ)({readOnly:!0})],Be.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)()],Be.prototype,"_isInitializing",void 0),Be=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Be);const Pe=Be,Oe={result:{}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1086],{80200(e,t,r){r.d(t,{T:()=>i,d:()=>p});const i={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,r,i,n,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,o)),n),r)}function o(e,t,r,i,s,o,a){return n(t&r|~t&i,e,t,s,o,a)}function a(e,t,r,i,s,o,a){return n(t&i|r&~i,e,t,s,o,a)}function l(e,t,r,i,s,o,a){return n(t^r^i,e,t,s,o,a)}function d(e,t,r,i,s,o,a){return n(r^(t|~i),e,t,s,o,a)}function u(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,u=271733878;for(let t=0;t<e.length;t+=16){const p=r,c=i,h=n,y=u;r=o(r,i,n,u,e[t],7,-680876936),u=o(u,r,i,n,e[t+1],12,-389564586),n=o(n,u,r,i,e[t+2],17,606105819),i=o(i,n,u,r,e[t+3],22,-1044525330),r=o(r,i,n,u,e[t+4],7,-176418897),u=o(u,r,i,n,e[t+5],12,1200080426),n=o(n,u,r,i,e[t+6],17,-1473231341),i=o(i,n,u,r,e[t+7],22,-45705983),r=o(r,i,n,u,e[t+8],7,1770035416),u=o(u,r,i,n,e[t+9],12,-1958414417),n=o(n,u,r,i,e[t+10],17,-42063),i=o(i,n,u,r,e[t+11],22,-1990404162),r=o(r,i,n,u,e[t+12],7,1804603682),u=o(u,r,i,n,e[t+13],12,-40341101),n=o(n,u,r,i,e[t+14],17,-1502002290),i=o(i,n,u,r,e[t+15],22,1236535329),r=a(r,i,n,u,e[t+1],5,-165796510),u=a(u,r,i,n,e[t+6],9,-1069501632),n=a(n,u,r,i,e[t+11],14,643717713),i=a(i,n,u,r,e[t],20,-373897302),r=a(r,i,n,u,e[t+5],5,-701558691),u=a(u,r,i,n,e[t+10],9,38016083),n=a(n,u,r,i,e[t+15],14,-660478335),i=a(i,n,u,r,e[t+4],20,-405537848),r=a(r,i,n,u,e[t+9],5,568446438),u=a(u,r,i,n,e[t+14],9,-1019803690),n=a(n,u,r,i,e[t+3],14,-187363961),i=a(i,n,u,r,e[t+8],20,1163531501),r=a(r,i,n,u,e[t+13],5,-1444681467),u=a(u,r,i,n,e[t+2],9,-51403784),n=a(n,u,r,i,e[t+7],14,1735328473),i=a(i,n,u,r,e[t+12],20,-1926607734),r=l(r,i,n,u,e[t+5],4,-378558),u=l(u,r,i,n,e[t+8],11,-2022574463),n=l(n,u,r,i,e[t+11],16,1839030562),i=l(i,n,u,r,e[t+14],23,-35309556),r=l(r,i,n,u,e[t+1],4,-1530992060),u=l(u,r,i,n,e[t+4],11,1272893353),n=l(n,u,r,i,e[t+7],16,-155497632),i=l(i,n,u,r,e[t+10],23,-1094730640),r=l(r,i,n,u,e[t+13],4,681279174),u=l(u,r,i,n,e[t],11,-358537222),n=l(n,u,r,i,e[t+3],16,-722521979),i=l(i,n,u,r,e[t+6],23,76029189),r=l(r,i,n,u,e[t+9],4,-640364487),u=l(u,r,i,n,e[t+12],11,-421815835),n=l(n,u,r,i,e[t+15],16,530742520),i=l(i,n,u,r,e[t+2],23,-995338651),r=d(r,i,n,u,e[t],6,-198630844),u=d(u,r,i,n,e[t+7],10,1126891415),n=d(n,u,r,i,e[t+14],15,-1416354905),i=d(i,n,u,r,e[t+5],21,-57434055),r=d(r,i,n,u,e[t+12],6,1700485571),u=d(u,r,i,n,e[t+3],10,-1894986606),n=d(n,u,r,i,e[t+10],15,-1051523),i=d(i,n,u,r,e[t+1],21,-2054922799),r=d(r,i,n,u,e[t+8],6,1873313359),u=d(u,r,i,n,e[t+15],10,-30611744),n=d(n,u,r,i,e[t+6],15,-1560198380),i=d(i,n,u,r,e[t+13],21,1309151649),r=d(r,i,n,u,e[t+4],6,-145523070),u=d(u,r,i,n,e[t+11],10,-1120210379),n=d(n,u,r,i,e[t+2],15,718787259),i=d(i,n,u,r,e[t+9],21,-343485551),r=s(r,p),i=s(i,c),n=s(n,h),u=s(u,y)}return[r,i,n,u]}function p(e,t=i.Hex){const r=t||i.Base64,s=u(function(e){const t=[];for(let r=0,i=8*e.length;r<i;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<r%32;return t}(e),8*e.length);switch(r){case i.Raw:return s;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(s);case i.String:return function(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=8)t.push(String.fromCharCode(e[r>>5]>>>r%32&255));return t.join("")}(s);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(s)}}},87024(e,t,r){r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),o=r(84952),a=r(13069),l=r(96156),d=r(35666),u=r(10107),p=r(85648),c=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,c.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,c.t)(t,l)):void(s[a]=t.write({},l));const u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,c.t)(u,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),m=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,d.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?m&&e?.contentAddressed?y(v):m?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=f(s,r,t),u=(0,p.n)(d),c=(0,o.Zo)(l.path),h=i?.compress??!1;u===c?(t.resources&&g({...e,resource:l,content:d,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,c.i)(h)||(0,o.w8)(h)||m)?y(v):s[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=c.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,u.rM)(r,e,i);for(const e in s)t[e]=s[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:d,targetPropertyName:u}=e;if(!l.portalItem)return;const h=(0,c.p)(t),y=f(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const m=r?.contentAddressed&&"json"===y.type?(0,s.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,m),w=`${v}.${(0,p.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find(({resource:e})=>e.path===w)??l.resources.toAdd.find(({resource:e})=>e.path===w);if(e)return void(d[u]=e.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(w);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then(e=>{b.path=`${v}.${(0,p.n)({type:"blob",blob:e})}`,d[u]=b.itemRelativeUrl}).catch(()=>{}));const I=r?.compress??!1;l.resources&&g({...e,resource:b,content:y,compress:I,updates:l.resources.toAdd}),d[u]=b.itemRelativeUrl}function g({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function f(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},54239(e,t,r){r.d(t,{A:()=>f});var i,s=r(5482),n=r(4576),o=r(66552),a=r(25482),l=r(86211),d=r(67076),u=r(91429),p=r(43937),c=r(36005);const h=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=h.jsonValues.slice();(0,n.Xy)(y,"orthometric");const g=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r?.messages&&r.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(m(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(m(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function m(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],f.prototype,"heightModel",void 0),(0,s.Cg)([(0,p.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s.Cg)([(0,c.w)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],f.prototype,"heightUnit",void 0),(0,s.Cg)([(0,c.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s.Cg)([(0,c.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s.Cg)([(0,c.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,s.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],f)},73836(e,t,r){r.d(t,{A:()=>h});var i=r(5482),s=r(69540),n=r(25482),o=r(91429),a=r(58083),l=r(9093),d=r(67026),u=r(82534),p=r(51850),c=r(24770);let h=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(c.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,c.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,p.o8)((0,c.yo)(e)),this.rotationAngle=(0,c.g7)(e)}get localMatrix(){const e=(0,l.vt)();return(0,d.x8)(y,(0,c.yo)(this.rotation),(0,c.$I)(this.rotation)),(0,a.o1)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,a.B8)((0,l.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,a.t2)(this.localMatrix,e.localMatrix)}};(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"translation",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAxis",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAngle",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"scale",void 0),(0,i.Cg)([(0,o.MZ)()],h.prototype,"rotation",null),(0,i.Cg)([(0,o.MZ)()],h.prototype,"localMatrix",null),(0,i.Cg)([(0,o.MZ)()],h.prototype,"localMatrixInverse",null),h=(0,i.Cg)([(0,o.$K)("esri.geometry.support.MeshTransform")],h);const y=(0,u.vt)()},24770(e,t,r){r.d(t,{$I:()=>f,AU:()=>h,g7:()=>g,i4:()=>u,ui:()=>p,up:()=>v,vt:()=>d,yo:()=>y});var i=r(34727),s=r(58083),n=r(67026),o=r(82534),a=r(35522),l=r(51850);function d(e=v){return[e[0],e[1],e[2],e[3]]}function u(e,t,r=d()){return(0,a.C)(r,e),r[3]=t,r}function p(e,t=d()){const r=(0,s.l)(w,e);return m(t,(0,i.KJ)((0,n.Xd)(t,r))),t}function c(e,t,r=d()){return(0,n.x8)(w,e,f(e)),(0,n.x8)(b,t,f(t)),(0,n.lw)(w,b,w),m(r,(0,i.KJ)((0,n.Xd)(r,w)))}function h(e,t,r,i=d()){return u(l.Cw,e,I),u(l.JP,t,A),u(l.Cb,r,S),c(I,A,I),c(I,S,i),i}function y(e){return e}function g(e){return e[3]}function f(e){return(0,i.kU)(e[3])}function m(e,t){return e[3]=t,e}const v=[0,0,1,0],w=(0,o.vt)(),b=(0,o.vt)(),I=(d(),d()),A=d(),S=d()},2e4(e,t,r){r.r(t),r.d(t,{default:()=>Ze});var i=r(5482),s=r(52106),n=r(37838),o=r(69540),a=r(7762),l=r(49186),d=r(36563),u=r(53966),p=r(97768),c=r(25728),h=r(17676),y=r(36708),g=r(91429),f=r(88620),m=r(86738),v=r(91218),w=r(55156),b=r(60950),I=r(89808),A=r(99959);const S=Symbol("isSceneGraphicOrigin");var C;class F extends A.A{get[(C=S,b.ym)](){return this.layer}get[w.e](){return this.layer}get[I.Q](){return this.layer}constructor(e){super(),this[C]=!0,this.type="scene",this.layer=e}get id(){return this.layer.id}}var M=r(4146),x=r(55726),L=r(52136),E=r(18768),j=r(69208),T=r(47685),O=r(16131),_=r(8303),P=r(25036),Z=r(58947),R=r(82935),U=r(60694),N=r(92009),D=r(4071),$=r(10873),q=r(15426),k=r(67202),H=r(17036),G=r(95466),K=r(30524),V=r(50805),Q=r(20557),J=r(46499),B=r(39383),z=r(37352),W=r(4513),Y=r(86390),X=r(25482);let ee=class extends X.o{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],ee.prototype,"name",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],ee.prototype,"field",void 0),(0,i.Cg)([(0,g.MZ)({type:[Number],json:{read:!0,write:!0}})],ee.prototype,"currentRangeExtent",void 0),(0,i.Cg)([(0,g.MZ)({type:[Number],json:{read:!0,write:!0}})],ee.prototype,"fullRangeExtent",void 0),(0,i.Cg)([(0,g.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],ee.prototype,"type",void 0),ee=(0,i.Cg)([(0,g.$K)("esri.layers.support.RangeInfo")],ee);var te,re=r(11254),ie=r(4718),se=r(87024),ne=r(67076),oe=r(39829);let ae=te=class extends((0,X.T)(a.A.ofType(oe.A))){constructor(e){super(e)}clone(){return new te(this.items.map(e=>e.clone()))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map(r=>{if(!t.equals(r.spatialReference)){if(!(0,v.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages?.push(new ne.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new oe.A;(0,v.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i}).filter(e=>null!=e):this.toArray().map(t=>t.toJSON(e))}static fromJSON(e,t){const r=new te;return e.forEach(e=>r.add(oe.A.fromJSON(e,t))),r}};ae=te=(0,i.Cg)([(0,g.$K)("esri.layers.support.PolygonCollection")],ae);const le=ae;var de,ue=r(97159),pe=r(36005);let ce=de=class extends X.o{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new le,this._geometriesSource=null}initialize(){this.addHandles((0,y.on)(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,y.OH))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=le.fromJSON(e,r):"web-scene"!==r.origin&&"portal-item"!==r.origin||(this._geometriesSource={url:(0,ue.f)(e,r),context:r})}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,re.A)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map(e=>({...e,spatialReference:n}));this.geometries=le.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new de({geometries:(0,ie.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i.Cg)([(0,g.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],ce.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,g.MZ)({type:le,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,se.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],ce.prototype,"geometries",void 0),(0,i.Cg)([(0,pe.w)(["web-scene","portal-item","service"],"geometries")],ce.prototype,"readGeometries",null),ce=de=(0,i.Cg)([(0,g.$K)("esri.layers.support.SceneFilter")],ce);const he=ce;function ye({associatedLayer:e,serviceUpdateTimeStamp:t}){const r=e?.editingInfo?.lastEditDate,i=e?.serverGens,s=null!=r,n=null!=t,o=s&&n&&t.lastUpdate!==r.getTime();return s&&(o||!n&&i?.minServerGen!==i?.serverGen)}var ge=r(84952);let fe=class extends X.o{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,i.Cg)([(0,g.MZ)({type:String})],fe.prototype,"endTimeField",void 0),(0,i.Cg)([(0,g.MZ)({type:String})],fe.prototype,"startTimeField",void 0),fe=(0,i.Cg)([(0,g.$K)("esri.layers.support.SceneServiceTimeInfo")],fe);var me=r(96184),ve=r(8947),we=r(41214),be=r(61956),Ie=r(24212),Ae=r(30291);async function Se(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(Ce(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function Ce(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(3709),r.e(9588)]).then(r.bind(r,9588)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach(e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s;n.push(e.getData(t).then(t=>new File([t],e.filename)))}),Promise.all(n)}var Fe=r(79677),Me=r(10184),xe=r(5682),Le=r(45671),Ee=r(78553);const je=new Set(["3DObject","Point"]),Te=(0,H.p)();let Oe=class extends((0,T.w6)((0,Z.w6)((0,E.b)((0,O.q)((0,_.A)((0,P.j)((0,c.M)((0,j.d)((0,L.p)((0,o.OU)(M.A))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new F(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=(0,p.pR)(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?(0,q.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new G.A(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:V.W4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,q.C$)(this.associatedLayer)}get geometryType(){return Pe[this.profile]||"mesh"}set renderer(e){(0,K.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:D.P;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:y,supportsDelete:g,supportsQuery:f,supportsQueryAttachments:m,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:f,supportsQueryAttachments:m,supportsEditing:c&&w,supportsAdd:b&&h&&w,supportsDelete:b&&g&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&_e[r]?_e[r]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,K.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,K.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(h.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,ve.L)(this,{origin:"service"},t),(0,K.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new be.A;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,K.hL)(this.fieldsIndex,await(0,Le.TO)(this,(0,Le.D8)(this)));return(0,xe.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new l.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.A;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,Ae.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new l.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(7557).then(r.bind(r,69938));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,d=s?.globalIdUsed??!0;if(a&&null==o)throw new l.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!d)throw new l.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,U.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,q.GA)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const i=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||i(new l.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const s=await this.extractAndFilterFiles(e);(0,h.Te)(t);const n=s.reduce((e,t)=>(0,Q.oF)(this.infoFor3D,t)?e+1:e,0);0===n&&i(new x.VP),n>1&&i(new x.XQ);const o=this.spatialReference,a=t.origin,d=await(0,v.projectAsync)(a??t.defaultOrigin??new m.A({x:0,y:0,z:0,spatialReference:o}),o,t),p=o.isGeographic?"local":"georeferenced",{default:c}=await Promise.all([r.e(6860),r.e(6439),r.e(3354)]).then(r.bind(r,6439));(0,h.Te)(t);const y=c.createWithExternalSource(d,{type:"client",files:s},{vertexSpace:p,transform:(0,Y.Z)(o),unitConversionDisabled:!0}),[g]=await this.uploadAssets([y],{...t,useAssetOrigin:!a});return g}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await Se(e)).filter(e=>(0,Q.fu)(t,e)):e}validateLayer(e){if(e.layerType&&!je.has(e.layerType))throw new l.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new l.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new l.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new l.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new l.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new l.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=(0,f.oY)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(2===n||3===n)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,U.Wo)(this.associatedLayer?.url)&&ye(this)&&(0,f.oY)(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,N.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await W.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,h.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles((0,d.rE)(e));try{await(0,y.C_)(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(e){return void(0,h.jH)(e)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,Ie.XF)(u.A.getLogger(this),(0,Ie.$7)("Mesh scene layers","relative-to-scene",e)),(0,Ie.XF)(u.A.getLogger(this),(0,Ie.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:r,fieldsIndex:i,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics are not available for this layer");const d=i.get(e);if(null==d)throw new l.A(`${r}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find(e=>e.name===d.name);if(null==u)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,ge.fj)(s,u.href),{data:c}=await(0,re.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(ye({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=i,l=t===r?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(r),s(i)]);if(null!=r&&null==n||null!=i&&null==o)return;const a=new Fe.A({start:n,end:o});this.setAtOrigin("timeInfo",new me.A({endField:i,startField:r,fullTimeExtent:a}),"service")}};(0,i.Cg)([(0,g.MZ)({types:{key:"type",base:null,typeMap:{selection:k.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Oe.prototype,"featureReduction",void 0),(0,i.Cg)([(0,g.MZ)({type:[ee],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Oe.prototype,"rangeInfos",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1}})],Oe.prototype,"associatedLayer",void 0),(0,i.Cg)([(0,g.MZ)({type:["show","hide"]})],Oe.prototype,"listMode",void 0),(0,i.Cg)([(0,g.MZ)({type:["ArcGISSceneServiceLayer"]})],Oe.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1},readOnly:!0})],Oe.prototype,"type",void 0),(0,i.Cg)([(0,g.MZ)({...Te.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"fields",void 0),(0,i.Cg)([(0,g.MZ)()],Oe.prototype,"types",null),(0,i.Cg)([(0,g.MZ)()],Oe.prototype,"typeIdField",null),(0,i.Cg)([(0,g.MZ)()],Oe.prototype,"templates",null),(0,i.Cg)([(0,g.MZ)()],Oe.prototype,"formTemplate",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Oe.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,clonable:!1})],Oe.prototype,"fieldsIndex",null),(0,i.Cg)([(0,g.MZ)({type:z.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Oe.prototype,"floorInfo",void 0),(0,i.Cg)([(0,g.MZ)(Te.outFields)],Oe.prototype,"outFields",void 0),(0,i.Cg)([(0,g.MZ)({type:V.W4,readOnly:!0,json:{read:!1},clonable:!1})],Oe.prototype,"nodePages",void 0),(0,i.Cg)([(0,pe.w)("service","nodePages",["nodePages","pointNodePages"])],Oe.prototype,"readNodePages",null),(0,i.Cg)([(0,g.MZ)({type:[V.uV],readOnly:!0,clonable:!1})],Oe.prototype,"materialDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({type:[V.Ot],readOnly:!0,clonable:!1})],Oe.prototype,"textureSetDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({type:[V.L0],readOnly:!0,clonable:!1})],Oe.prototype,"geometryDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Oe.prototype,"serviceUpdateTimeStamp",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Oe.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Oe.prototype,"statisticsInfo",void 0),(0,i.Cg)([(0,g.MZ)({type:a.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Oe.prototype,"excludeObjectIds",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Oe.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,g.MZ)({type:he,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Oe.prototype,"filter",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Oe.prototype,"path",void 0),(0,i.Cg)([(0,g.MZ)($.Yj)],Oe.prototype,"elevationInfo",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],Oe.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],Oe.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,g.MZ)({type:String})],Oe.prototype,"geometryType",null),(0,i.Cg)([(0,g.MZ)($.kF)],Oe.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,g.MZ)({type:[J.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:B.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:B.w},write:!0}})],Oe.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,g.MZ)($.fV)],Oe.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,Ee.D)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Oe.prototype,"opacity",void 0),(0,i.Cg)([(0,g.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"priority",void 0),(0,i.Cg)([(0,g.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"semantic",void 0),(0,i.Cg)([(0,g.MZ)({types:we.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Oe.prototype,"renderer",null),(0,i.Cg)([(0,g.MZ)({json:{read:!1}})],Oe.prototype,"cachedDrawingInfo",void 0),(0,i.Cg)([(0,pe.w)("service","cachedDrawingInfo")],Oe.prototype,"readCachedDrawingInfo",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],Oe.prototype,"capabilities",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,json:{read:!1}})],Oe.prototype,"editingEnabled",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Oe.prototype,"infoFor3D",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Oe.prototype,"relationships",null),(0,i.Cg)([(0,g.MZ)($.M6)],Oe.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],Oe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],Oe.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,g.MZ)($.zQ)],Oe.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],Oe.prototype,"objectIdField",void 0),(0,i.Cg)([(0,pe.w)("service","objectIdField",["objectIdField","fields"])],Oe.prototype,"readObjectIdField",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],Oe.prototype,"globalIdField",void 0),(0,i.Cg)([(0,pe.w)("service","globalIdField",["globalIdField","fields"])],Oe.prototype,"readGlobalIdField",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String,json:{read:!1}})],Oe.prototype,"displayField",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{read:!1}})],Oe.prototype,"profile",void 0),(0,i.Cg)([(0,pe.w)("service","profile",["store.profile"])],Oe.prototype,"readProfile",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Oe.prototype,"normalReferenceFrame",void 0),(0,i.Cg)([(0,g.MZ)($.PY)],Oe.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"serviceItemId",void 0),(0,i.Cg)([(0,g.MZ)(R.B)],Oe.prototype,"useViewTime",null),(0,i.Cg)([(0,g.MZ)({type:me.A,json:{read:!1,write:!1}})],Oe.prototype,"timeInfo",null),(0,i.Cg)([(0,g.MZ)({type:Fe.A,json:{read:!1,write:!1}})],Oe.prototype,"timeExtent",null),(0,i.Cg)([(0,g.MZ)({type:Me.A,json:{read:!1,write:!1}})],Oe.prototype,"timeOffset",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Oe.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,g.MZ)({type:fe,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],Oe.prototype,"serviceTimeInfo",void 0),Oe=(0,i.Cg)([(0,g.$K)("esri.layers.SceneLayer")],Oe);const _e={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Pe={"mesh-pyramids":"mesh",points:"point"},Ze=Oe},55726(e,t,r){r.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>g,WF:()=>u,Wt:()=>o,XQ:()=>f,hK:()=>c,nS:()=>p,uh:()=>a,xY:()=>l});var i=r(49186);const s="upload-assets",n=()=>new Error;class o extends i.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends i.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends i.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends i.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends i.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends i.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends i.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class g extends i.A{constructor(){super("invalid-input:no-model","No supported model found")}}class f extends i.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},18768(e,t,r){r.d(t,{b:()=>a});var i=r(5482),s=r(53966),n=r(91429),o=r(60694);const a=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}},69208(e,t,r){r.d(t,{d:()=>n});var i=r(5482),s=r(91429);const n=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}},47685(e,t,r){r.d(t,{Mk:()=>h,Zk:()=>p,w6:()=>f});var i=r(5482),s=r(65529),n=r(4718),o=r(91429),a=r(20816);const l=new s.bk;function d(e){return l.on("apply-edits",new WeakRef(e))}function u(e){return l.on("update-moment",new WeakRef(e))}function p(e,t,r=null,i=!1){const s=Promise.withResolvers();return i=null==t||i,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const c=Symbol();function h(e){return null!=e&&"object"==typeof e&&c in e}function y(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function g(e,t,r){const i=new URL(e).host,s=a.Z3.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const f=e=>{var t;const r=e;let s=class extends r{static{t=c}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,d=y(this),u=y(this)&&g(t,i,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;const p=o.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){const{adds:t,updates:i,deletes:s}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=y(this),o=y(this)&&g(t,r,this.gdbVersion),a=y(this)&&!g(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(d(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(u(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,a.w5)(e,t)}};return(0,i.Cg)([(0,o.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.EditBusLayer")],s),s}},8303(e,t,r){r.d(t,{A:()=>I});var i=r(5482),s=r(92602),n=r(70333),o=r(11254),a=r(60999),l=r(49186),d=r(53966),u=r(97768),p=r(17676),c=r(84952),h=r(91429),y=r(77548),g=r(20655),f=r(80812),m=r(41318),v=r(10407),w=r(36005),b=r(43937);const I=e=>{const t=e;let I=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new f.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,y.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,c.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:d},content:{updateItem:u}};try{if(s?await r.reload():(r=new f.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:u}}}_getUserPrivileges(e,t){const r=(0,v.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=g.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?m.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,h.MZ)({type:f.default})],I.prototype,"portalItem",null),(0,i.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,i.Cg)([(0,b.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,i.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],I),I},A={credential:null,user:null}},25036(e,t,r){r.d(t,{j:()=>n});var i=r(5482),s=r(91429);const n=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}},82935(e,t,r){r.d(t,{B:()=>c,e:()=>h});var i=r(5482),s=r(91429),n=r(89317),o=r(30524),a=r(96184),l=r(73133),d=r(79677),u=r(10184),p=r(36005);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:n.K}}},h=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=l.j.fromJSON(r.timeOffsetUnits);return i&&s?new u.A({value:i,unit:s}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,s.MZ)({type:d.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,s.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,s.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,s.MZ)(c)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.TemporalLayer")],r),r}},67202(e,t,r){r.d(t,{A:()=>a});var i,s=r(5482),n=r(25482),o=r(91429);let a=i=class extends n.o{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s.Cg)([(0,o.MZ)({type:["selection"],readOnly:!0,json:{write:!0}})],a.prototype,"type",void 0),a=i=(0,s.Cg)([(0,o.$K)("esri.layers.support.FeatureReductionSelection")],a)},96184(e,t,r){r.d(t,{A:()=>h});var i=r(5482),s=r(69540),n=r(25482),o=r(91429),a=r(79677),l=r(10184),d=r(56400),u=r(36005),p=r(43937);function c(e,t){return l.A.fromJSON({value:e,unit:t})}let h=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?a.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?c(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?c(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,u.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,p.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i.Cg)([(0,u.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i.Cg)([(0,p.K)("interval")],h.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,d.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i.Cg)([(0,o.$K)("esri.layers.support.TimeInfo")],h)},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},20557(e,t,r){r.d(t,{Fm:()=>l,Hz:()=>h,JQ:()=>c,JZ:()=>b,ND:()=>g,R_:()=>o,U9:()=>p,fu:()=>s,nr:()=>y,oF:()=>n,rq:()=>d,z$:()=>u});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=m(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=d(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return v(function(e,t){const r=e.toLowerCase();return f(t).find(e=>w(e)===r)}(e,t))}function a(e,t){return v(m(e,t))}function l(e,t){return w(function(e,t){return f(t).find(t=>v(t)===e)}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e,t,r){return o(e,r)??a(t,r)}function p({supportedFormats:e}){return u("model/gltf-binary","glb",e)}function c(e){const t=p(e);return null!=t&&e.editFormats.includes(t)}function h(e){if(!e)return null;const t=p(e),r=function({supportedFormats:e}){return u("model/gltf+json","gltf",e)}(e);let i=null;for(const s of e.queryFormats){if(s===t)return s;s===r&&(i=s)}return i}function y({supportedFormats:e}){return u("application/esri3do-SR_world","wld",e)}function g({supportedFormats:e}){return u("application/esri3do-SR_prj","prj",e)}function f(e){return[...i,...e]}function m(e,t){const r=e.toLowerCase();return f(t).find(e=>function(e){return e?.[2].split(",").map(e=>e.toLowerCase())??[]}(e).some(e=>r.endsWith(e)))}function v(e){return e?.[0]}function w(e){return e?.[1].toLowerCase()}function b(e){return e.tables?.find(e=>"assetMaps"===e.role)}},86390(e,t,r){r.d(t,{Z:()=>n});var i=r(86211),s=r(73836);function n(e){const t=1/(0,i.GA)(e,1);return 1!==t?new s.A({scale:[t,t,t]}):void 0}},73179(e,t,r){r.d(t,{b:()=>l,h:()=>d});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);const r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function d(e,t){const{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null!=e.dynamicDataSource?i.path=(0,n.fj)(i.path,"dynamicLayer"):null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString()))),i}},10407(e,t,r){r.d(t,{It:()=>h,LG:()=>o,OM:()=>d,Sm:()=>u,Y:()=>a,bK:()=>l,mm:()=>c,sQ:()=>p});var i=r(91218),s=r(16930),n=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,c.HOSTED_SERVICE)}function d(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function u(e,t,r){r?o(e,t):d(e,t)}async function p(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const c={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),o=!!r&&!!s?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}},85648(e,t,r){r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},8947(e,t,r){r.d(t,{L:()=>o});var i=r(60999),s=r(17676),n=r(67076);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.Ke)(o.populateFromStyle());if((0,s.Te)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},20816(e,t,r){r.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var i=r(11254);const s=(0,r(13069).vD)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(n,e,new i({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[692],{50692(n,t,e){e.r(t),e.d(t,{registerFunctions:()=>g});var a=e(66131),i=e(15695),r=e(85935),c=e(78878),u=e(334),s=e(55612),o=e(89696),f=e(92647),d=e(54218);async function l(n,t,e,a){if(1===e.length){if((0,d.cy)(e[0]))return(0,u.t)(n,e[0],(0,c.J)(e[1],-1));if((0,c.j)(e[0]))return(0,u.t)(n,e[0].toArray(),(0,c.J)(e[1],-1))}else if(2===e.length){if((0,d.cy)(e[0]))return(0,u.t)(n,e[0],(0,c.J)(e[1],-1));if((0,c.j)(e[0]))return(0,u.t)(n,e[0].toArray(),(0,c.J)(e[1],-1));if((0,c.m)(e[0])){const i=await e[0].load(),r=await y(o.A.create(e[1],{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC}),a,t);return m(t,await e[0].calculateStatistic(n,r,(0,c.J)(e[2],1e3),t.abortSignal))}}else if(3===e.length&&(0,c.m)(e[0])){const i=await e[0].load(),r=await y(o.A.create(e[1],{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC}),a,t);return m(t,await e[0].calculateStatistic(n,r,(0,c.J)(e[2],1e3),t.abortSignal))}return(0,u.t)(n,e,-1)}function m(n,t){return s.g.isTimestampOffset(t)?a.lY.fromReaderAsTimeStampOffset(t.toStorageFormat()):(0,d.$P)(t)?a.lY.dateJSAndZoneToArcadeDate(t,(0,c.K)(n)):f.c9.isDateTime(t)?a.lY.dateTimeToArcadeDate(t):t}async function y(n,t,e){const a=n.getVariables();if(a.length>0){const i={};for(const n of a)i[n]=t.evaluateIdentifier(e,{name:n});n.parameters=i}return n}function g(n){"async"===n.mode&&(n.functions.stdev=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("stdev",t,i,n))},n.functions.variance=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("variance",t,i,n))},n.functions.average=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("mean",t,i,n))},n.functions.mean=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("mean",t,i,n))},n.functions.sum=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("sum",t,i,n))},n.functions.min=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("min",t,i,n))},n.functions.max=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("max",t,i,n))},n.functions.count=function(t,e){return n.standardFunctionAsync(t,e,async(n,a,i)=>{if((0,c.B)(i,1,1,t,e),null==i[0])return 0;if((0,c.m)(i[0]))return i[0].count(n.abortSignal);if((0,d.cy)(i[0])||(0,d.Kg)(i[0]))return i[0].length;if((0,c.j)(i[0]))return i[0].length();if((0,c.n)(i[0]))return i[0].entryCount();throw new r.D$(t,"InvalidParameter",e)})},n.functions.isempty=function(t,e){return n.standardFunctionAsync(t,e,async(n,t,e)=>{if((0,c.B)(e,1,2,n,t),e.length>=2&&!(0,d.Lm)(e[1]))throw new r.D$(n,"InvalidParameter",t);return(0,c.J)(e[1],!1)?(0,c.m)(e[0])?await e[0].isEmpty(n.abortSignal):(0,i.Im)(e[0]):(0,c.L)(e[0])})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3494],{67026(t,n,e){e.d(n,{A6:()=>M,Xd:()=>l,Xr:()=>d,hZ:()=>v,lw:()=>f,t2:()=>j,x8:()=>c});var r=e(29242),o=e(82534),i=e(51850),a=e(34304),s=e(35522),u=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 l(t,n){const e=2*Math.acos(n[3]),r=Math.sin(e/2);return r>(0,a.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 f(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=e[3];return t[0]=r*l+a*s+o*c-i*u,t[1]=o*l+a*u+i*s-r*c,t[2]=i*l+a*c+r*u-o*s,t[3]=a*l-r*s-o*u-i*c,t}function h(t,n,e,r){const o=n[0],i=n[1],s=n[2],u=n[3];let c,l,f,h,d,p=e[0],M=e[1],m=e[2],v=e[3];return l=o*p+i*M+s*m+u*v,l<0&&(l=-l,p=-p,M=-M,m=-m,v=-v),1-l>(0,a.FD)()?(c=Math.acos(l),f=Math.sin(c),h=Math.sin((1-r)*c)/f,d=Math.sin(r*c)/f):(h=1-r,d=r),t[0]=h*o+d*p,t[1]=h*i+d*M,t[2]=h*s+d*m,t[3]=h*u+d*v,t}function d(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function p(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 M(t,n,e,r){const o=.5*Math.PI/180;n*=o,e*=o,r*=o;const i=Math.sin(n),a=Math.cos(n),s=Math.sin(e),u=Math.cos(e),c=Math.sin(r),l=Math.cos(r);return t[0]=i*u*l-a*s*c,t[1]=a*s*l+i*u*c,t[2]=a*u*c-i*s*l,t[3]=a*u*l+i*s*c,t}const m=u.C,v=u.hZ,g=u.WQ,w=f,y=u.hs,b=u.Om,x=u.Cc,A=u.Bw,C=A,P=u.m3,I=P,z=u.S8,j=u.t2,q=u.aI,F=(0,i.vt)(),N=(0,i.fA)(1,0,0),R=(0,i.fA)(0,1,0),Z=(0,o.vt)(),S=(0,o.vt)(),k=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:g,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:d,copy:m,dot:b,equals:q,exactEquals:j,fromEuler:M,fromMat3:p,getAxisAngle:l,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],a=e*e+r*r+o*o+i*i,s=a?1/a:0;return t[0]=-e*s,t[1]=-r*s,t[2]=-o*s,t[3]=i*s,t},len:C,length:A,lerp:x,mul:w,multiply:f,normalize:z,random:function(t){const n=a.Ov,e=n(),r=n(),o=n(),i=Math.sqrt(1-e),s=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=s*Math.sin(2*Math.PI*o),t[3]=s*Math.cos(2*Math.PI*o),t},rotateX:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],a=n[3],s=Math.sin(e),u=Math.cos(e);return t[0]=r*u+a*s,t[1]=o*u+i*s,t[2]=i*u-o*s,t[3]=a*u-r*s,t},rotateY:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],a=n[3],s=Math.sin(e),u=Math.cos(e);return t[0]=r*u-i*s,t[1]=o*u+a*s,t[2]=i*u+r*s,t[3]=a*u-o*s,t},rotateZ:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],a=n[3],s=Math.sin(e),u=Math.cos(e);return t[0]=r*u+o*s,t[1]=o*u-r*s,t[2]=i*u+a*s,t[3]=a*u-i*s,t},rotationTo:function(t,n,e){const r=(0,s.Om)(n,e);return r<-.999999?((0,s.$A)(F,N,n),(0,s.Il)(F)<1e-6&&(0,s.$A)(F,R,n),(0,s.S8)(F,F),c(t,F,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,s.$A)(F,n,e),t[0]=F[0],t[1]=F[1],t[2]=F[2],t[3]=1+r,z(t,t))},scale:y,set:v,setAxes:function(t,n,e,r){const o=k;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],z(t,p(t,o))},setAxisAngle:c,slerp:h,sqlerp:function(t,n,e,r,o,i){return h(Z,n,o,i),h(S,e,r,i),h(t,Z,S,2*i*(1-i)),t},sqrLen:I,squaredLength:P,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},48353(t,n,e){e.d(n,{l:()=>c});var r=e(34727),o=e(58083),i=e(51850);function a(t,n,e){const r=Math.sin(t),o=Math.cos(t),i=Math.sin(n),a=Math.cos(n),s=e;return s[0]=-r,s[4]=-i*o,s[8]=a*o,s[12]=0,s[1]=o,s[5]=-i*r,s[9]=a*r,s[13]=0,s[2]=0,s[6]=a,s[10]=i,s[14]=0,s[3]=0,s[7]=0,s[11]=0,s[15]=1,s}var s=e(49208),u=e(21325);function c(t,n,e,r){const i=(0,s.Tp)(t,r);if(null==i)return!1;const c=i.source.spatialReferenceId,p=i.dest.spatialReferenceId;if(c===p&&!l(p)&&(0!==c||(0,u.aI)(t,r)))return(0,o.kN)(e,n),!0;if(l(p)){const t=s.w5[c][10],r=s.w5[10][p];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,d,0),a(f*h[0],f*h[1],e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}const M=l(c);if((3===p||11===p||2===p||5===p)&&(2===c||M||3===c||5===c)){const t=s.w5[c][10],r=s.w5[10][p];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,d,0),M?function(t,n,e){a(t,n,e),(0,o.mg)(e,e)}(f*h[0],f*h[1],e):(0,o.D_)(e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}return!1}function l(t){return 1===t||6===t||8===t||4===t}const f=(0,r.kU)(1),h=(0,i.vt)(),d=(0,i.vt)()},65806(t,n,e){e.d(n,{g:()=>a});var r=e(51850),o=e(91218),i=e(9762);function a(t,n,e,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,e))return s[0]=t.x,s[1]=t.y,s[2]=t.z??0,(0,i.projectBuffer)(s,t.spatialReference,0,n,e,0);const a=(0,o.tryProject)(t,e,r);return!!a&&(n[0]=a.x,n[1]=a.y,n[2]=a.z??0,!0)}const s=(0,r.vt)()},73836(t,n,e){e.d(n,{A:()=>d});var r=e(5482),o=e(69540),i=e(25482),a=e(91429),s=e(58083),u=e(9093),c=e(67026),l=e(82534),f=e(51850),h=e(24770);let d=class extends((0,o.OU)(i.o)){constructor(t){super(t),this.translation=(0,f.vt)(),this.rotationAxis=(0,f.ci)(h.up),this.rotationAngle=0,this.scale=(0,f.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,f.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,c.x8)(p,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,s.o1)(t,p,this.translation,this.scale),t}get localMatrixInverse(){return(0,s.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,s.t2)(this.localMatrix,t.localMatrix)}};(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,r.Cg)([(0,a.MZ)()],d.prototype,"rotation",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"localMatrix",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],d);const p=(0,l.vt)()},24770(t,n,e){e.d(n,{$I:()=>m,AU:()=>d,g7:()=>M,i4:()=>l,ui:()=>f,up:()=>g,vt:()=>c,yo:()=>p});var r=e(34727),o=e(58083),i=e(67026),a=e(82534),s=e(35522),u=e(51850);function c(t=g){return[t[0],t[1],t[2],t[3]]}function l(t,n,e=c()){return(0,s.C)(e,t),e[3]=n,e}function f(t,n=c()){const e=(0,o.l)(w,t);return v(n,(0,r.KJ)((0,i.Xd)(n,e))),n}function h(t,n,e=c()){return(0,i.x8)(w,t,m(t)),(0,i.x8)(y,n,m(n)),(0,i.lw)(w,y,w),v(e,(0,r.KJ)((0,i.Xd)(e,w)))}function d(t,n,e,r=c()){return l(u.Cw,t,b),l(u.JP,n,x),l(u.Cb,e,A),h(b,x,b),h(b,A,r),r}function p(t){return t}function M(t){return t[3]}function m(t){return(0,r.kU)(t[3])}function v(t,n){return t[3]=n,t}const g=[0,0,1,0],w=(0,a.vt)(),y=(0,a.vt)(),b=(c(),c()),x=c(),A=c()},20557(t,n,e){e.d(n,{Fm:()=>u,Hz:()=>d,JQ:()=>h,JZ:()=>y,ND:()=>M,R_:()=>a,U9:()=>f,fu:()=>o,nr:()=>p,oF:()=>i,rq:()=>c,z$:()=>l});const r=[["binary","application/octet-stream","bin",""]];function o(t,n){return null!=v(n.name,t?.supportedFormats??[])}function i(t,n){if(!t)return!1;const e=c(n,t.supportedFormats??[]);return null!=e&&t.editFormats.includes(e)}function a(t,n){return g(function(t,n){const e=t.toLowerCase();return m(n).find(t=>w(t)===e)}(t,n))}function s(t,n){return g(v(t,n))}function u(t,n){return w(function(t,n){return m(n).find(n=>g(n)===t)}(t,n))}function c(t,n){return s(t.name,n)??a(t.type,n)}function l(t,n,e){return a(t,e)??s(n,e)}function f({supportedFormats:t}){return l("model/gltf-binary","glb",t)}function h(t){const n=f(t);return null!=n&&t.editFormats.includes(n)}function d(t){if(!t)return null;const n=f(t),e=function({supportedFormats:t}){return l("model/gltf+json","gltf",t)}(t);let r=null;for(const o of t.queryFormats){if(o===n)return o;o===e&&(r=o)}return r}function p({supportedFormats:t}){return l("application/esri3do-SR_world","wld",t)}function M({supportedFormats:t}){return l("application/esri3do-SR_prj","prj",t)}function m(t){return[...r,...t]}function v(t,n){const e=t.toLowerCase();return m(n).find(t=>function(t){return t?.[2].split(",").map(t=>t.toLowerCase())??[]}(t).some(t=>e.endsWith(t)))}function g(t){return t?.[0]}function w(t){return t?.[1].toLowerCase()}function y(t){return t.tables?.find(t=>"assetMaps"===t.role)}},66655(t,n,e){async function r(t){const n=(await e.e(8457).then(e.bind(e,38457)).then(t=>t.default)).getInstance();return await n.load(t)}async function o(){return c(await Promise.resolve().then(e.bind(e,40036)))}async function i(){return c(await Promise.resolve().then(e.bind(e,16939)))}async function a(){return c(await Promise.resolve().then(e.bind(e,19211)))}async function s(){return c(await Promise.resolve().then(e.bind(e,35063)))}async function u(){return(await Promise.resolve().then(e.bind(e,1193))).default}function c(t){return t.default??t}async function l(){const[t,n,e,c,l,f]=await Promise.all([o(),i(),a(),s(),u(),r()]);return{Mesh:t,MeshComponent:n,MeshMaterial:e,MeshTexture:c,MeshVertexAttributes:l,panoramicMeshManager:f}}async function f(){return c(await e.e(5243).then(e.bind(e,95243)))}async function h(){return c(await Promise.all([e.e(7373),e.e(3500),e.e(1003)]).then(e.bind(e,1003)))}e.d(n,{DN:()=>f,Wn:()=>h,Zg:()=>l})},21060(t,n,e){e.d(n,{createImageSphere:()=>l,loadMeshes:()=>p,loadPyramid:()=>d,loadRaster:()=>f}),e(52106),e(11254),e(7762);var r=e(49186),o=(e(34727),e(17676)),i=e(40036),a=e(19211),s=e(35063),u=(e(27845),e(68548),e(28208)),c=e(66655);function l({data:t,center:n=u.ZH,size:e=u.vK,horizonPitch:r=0,horizonYaw:o=0,horizonRoll:c=0}){const l=n.clone();l.z=-e/2;const f=i.default.createSphere(l,{size:e,densificationFactor:2,vertexSpace:"georeferenced",material:new a.default({colorTexture:new s.default({data:t})})});if(f.components[0].trustSourceNormals=!0,f.vertexAttributes.uv){const t=f.vertexAttributes.uv.length??0;for(let n=0;n<t;n++)f.vertexAttributes.uv[2*n+0]=1-f.vertexAttributes.uv[2*n+0]}return f.rotate(r,c,o,{origin:f.extent.center}),f.centerAt(l),f}async function f(t,n){const e=await(0,c.Wn)(),r=await e.open({url:t,ioConfig:{skipExtensions:["jgw","aux.xml"],skipMapInfo:!0},...n});return(0,o.Te)(n),h(r,{url:t})}const h=(t,n)=>{if(!t)throw new r.A("panoramic-viewer:missing-raster","Raster data could not be loaded",n);return t};async function d(t,n,e){const r=await(0,c.DN)();return(0,o.Te)(e),new r({raster:t,horizonPitch:n.pitch,horizonYaw:n.yaw,horizonRoll:n.roll})}async function p(t,n){return t?.length?await Promise.all(t.map(t=>t.loadMesh(n))):[]}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3494],{67026(t,n,e){e.d(n,{A6:()=>M,Xd:()=>l,Xr:()=>d,hZ:()=>v,lw:()=>f,t2:()=>j,x8:()=>c});var r=e(29242),o=e(82534),i=e(51850),a=e(34304),s=e(35522),u=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 l(t,n){const e=2*Math.acos(n[3]),r=Math.sin(e/2);return r>(0,a.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 f(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3],s=e[0],u=e[1],c=e[2],l=e[3];return t[0]=r*l+a*s+o*c-i*u,t[1]=o*l+a*u+i*s-r*c,t[2]=i*l+a*c+r*u-o*s,t[3]=a*l-r*s-o*u-i*c,t}function h(t,n,e,r){const o=n[0],i=n[1],s=n[2],u=n[3];let c,l,f,h,d,p=e[0],M=e[1],m=e[2],v=e[3];return l=o*p+i*M+s*m+u*v,l<0&&(l=-l,p=-p,M=-M,m=-m,v=-v),1-l>(0,a.FD)()?(c=Math.acos(l),f=Math.sin(c),h=Math.sin((1-r)*c)/f,d=Math.sin(r*c)/f):(h=1-r,d=r),t[0]=h*o+d*p,t[1]=h*i+d*M,t[2]=h*s+d*m,t[3]=h*u+d*v,t}function d(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function p(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 M(t,n,e,r){const o=.5*Math.PI/180;n*=o,e*=o,r*=o;const i=Math.sin(n),a=Math.cos(n),s=Math.sin(e),u=Math.cos(e),c=Math.sin(r),l=Math.cos(r);return t[0]=i*u*l-a*s*c,t[1]=a*s*l+i*u*c,t[2]=a*u*c-i*s*l,t[3]=a*u*l+i*s*c,t}const m=u.C,v=u.hZ,g=u.WQ,w=f,y=u.hs,b=u.Om,x=u.Cc,A=u.Bw,C=A,P=u.m3,I=P,z=u.S8,j=u.t2,q=u.aI,F=(0,i.vt)(),N=(0,i.fA)(1,0,0),R=(0,i.fA)(0,1,0),Z=(0,o.vt)(),S=(0,o.vt)(),k=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:g,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:d,copy:m,dot:b,equals:q,exactEquals:j,fromEuler:M,fromMat3:p,getAxisAngle:l,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],a=e*e+r*r+o*o+i*i,s=a?1/a:0;return t[0]=-e*s,t[1]=-r*s,t[2]=-o*s,t[3]=i*s,t},len:C,length:A,lerp:x,mul:w,multiply:f,normalize:z,random:function(t){const n=a.Ov,e=n(),r=n(),o=n(),i=Math.sqrt(1-e),s=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=s*Math.sin(2*Math.PI*o),t[3]=s*Math.cos(2*Math.PI*o),t},rotateX:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],a=n[3],s=Math.sin(e),u=Math.cos(e);return t[0]=r*u+a*s,t[1]=o*u+i*s,t[2]=i*u-o*s,t[3]=a*u-r*s,t},rotateY:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],a=n[3],s=Math.sin(e),u=Math.cos(e);return t[0]=r*u-i*s,t[1]=o*u+a*s,t[2]=i*u+r*s,t[3]=a*u-o*s,t},rotateZ:function(t,n,e){e*=.5;const r=n[0],o=n[1],i=n[2],a=n[3],s=Math.sin(e),u=Math.cos(e);return t[0]=r*u+o*s,t[1]=o*u-r*s,t[2]=i*u+a*s,t[3]=a*u-i*s,t},rotationTo:function(t,n,e){const r=(0,s.Om)(n,e);return r<-.999999?((0,s.$A)(F,N,n),(0,s.Il)(F)<1e-6&&(0,s.$A)(F,R,n),(0,s.S8)(F,F),c(t,F,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,s.$A)(F,n,e),t[0]=F[0],t[1]=F[1],t[2]=F[2],t[3]=1+r,z(t,t))},scale:y,set:v,setAxes:function(t,n,e,r){const o=k;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],z(t,p(t,o))},setAxisAngle:c,slerp:h,sqlerp:function(t,n,e,r,o,i){return h(Z,n,o,i),h(S,e,r,i),h(t,Z,S,2*i*(1-i)),t},sqrLen:I,squaredLength:P,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},48353(t,n,e){e.d(n,{l:()=>c});var r=e(34727),o=e(58083),i=e(51850);function a(t,n,e){const r=Math.sin(t),o=Math.cos(t),i=Math.sin(n),a=Math.cos(n),s=e;return s[0]=-r,s[4]=-i*o,s[8]=a*o,s[12]=0,s[1]=o,s[5]=-i*r,s[9]=a*r,s[13]=0,s[2]=0,s[6]=a,s[10]=i,s[14]=0,s[3]=0,s[7]=0,s[11]=0,s[15]=1,s}var s=e(49208),u=e(21325);function c(t,n,e,r){const i=(0,s.Tp)(t,r);if(null==i)return!1;const c=i.source.spatialReferenceId,p=i.dest.spatialReferenceId;if(c===p&&!l(p)&&(0!==c||(0,u.aI)(t,r)))return(0,o.kN)(e,n),!0;if(l(p)){const t=s.w5[c][10],r=s.w5[10][p];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,d,0),a(f*h[0],f*h[1],e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}const M=l(c);if((3===p||11===p||2===p||5===p)&&(2===c||M||3===c||5===c)){const t=s.w5[c][10],r=s.w5[10][p];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,d,0),M?function(t,n,e){a(t,n,e),(0,o.mg)(e,e)}(f*h[0],f*h[1],e):(0,o.D_)(e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}return!1}function l(t){return 1===t||6===t||8===t||4===t}const f=(0,r.kU)(1),h=(0,i.vt)(),d=(0,i.vt)()},65806(t,n,e){e.d(n,{g:()=>a});var r=e(51850),o=e(91218),i=e(9762);function a(t,n,e,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,e))return s[0]=t.x,s[1]=t.y,s[2]=t.z??0,(0,i.projectBuffer)(s,t.spatialReference,0,n,e,0);const a=(0,o.tryProject)(t,e,r);return!!a&&(n[0]=a.x,n[1]=a.y,n[2]=a.z??0,!0)}const s=(0,r.vt)()},73836(t,n,e){e.d(n,{A:()=>d});var r=e(5482),o=e(69540),i=e(25482),a=e(91429),s=e(58083),u=e(9093),c=e(67026),l=e(82534),f=e(51850),h=e(24770);let d=class extends((0,o.OU)(i.o)){constructor(t){super(t),this.translation=(0,f.vt)(),this.rotationAxis=(0,f.ci)(h.up),this.rotationAngle=0,this.scale=(0,f.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,f.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,c.x8)(p,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,s.o1)(t,p,this.translation,this.scale),t}get localMatrixInverse(){return(0,s.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,s.t2)(this.localMatrix,t.localMatrix)}};(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,r.Cg)([(0,a.MZ)()],d.prototype,"rotation",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"localMatrix",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],d);const p=(0,l.vt)()},24770(t,n,e){e.d(n,{$I:()=>m,AU:()=>d,g7:()=>M,i4:()=>l,ui:()=>f,up:()=>g,vt:()=>c,yo:()=>p});var r=e(34727),o=e(58083),i=e(67026),a=e(82534),s=e(35522),u=e(51850);function c(t=g){return[t[0],t[1],t[2],t[3]]}function l(t,n,e=c()){return(0,s.C)(e,t),e[3]=n,e}function f(t,n=c()){const e=(0,o.l)(w,t);return v(n,(0,r.KJ)((0,i.Xd)(n,e))),n}function h(t,n,e=c()){return(0,i.x8)(w,t,m(t)),(0,i.x8)(y,n,m(n)),(0,i.lw)(w,y,w),v(e,(0,r.KJ)((0,i.Xd)(e,w)))}function d(t,n,e,r=c()){return l(u.Cw,t,b),l(u.JP,n,x),l(u.Cb,e,A),h(b,x,b),h(b,A,r),r}function p(t){return t}function M(t){return t[3]}function m(t){return(0,r.kU)(t[3])}function v(t,n){return t[3]=n,t}const g=[0,0,1,0],w=(0,a.vt)(),y=(0,a.vt)(),b=(c(),c()),x=c(),A=c()},20557(t,n,e){e.d(n,{Fm:()=>u,Hz:()=>d,JQ:()=>h,JZ:()=>y,ND:()=>M,R_:()=>a,U9:()=>f,fu:()=>o,nr:()=>p,oF:()=>i,rq:()=>c,z$:()=>l});const r=[["binary","application/octet-stream","bin",""]];function o(t,n){return null!=v(n.name,t?.supportedFormats??[])}function i(t,n){if(!t)return!1;const e=c(n,t.supportedFormats??[]);return null!=e&&t.editFormats.includes(e)}function a(t,n){return g(function(t,n){const e=t.toLowerCase();return m(n).find(t=>w(t)===e)}(t,n))}function s(t,n){return g(v(t,n))}function u(t,n){return w(function(t,n){return m(n).find(n=>g(n)===t)}(t,n))}function c(t,n){return s(t.name,n)??a(t.type,n)}function l(t,n,e){return a(t,e)??s(n,e)}function f({supportedFormats:t}){return l("model/gltf-binary","glb",t)}function h(t){const n=f(t);return null!=n&&t.editFormats.includes(n)}function d(t){if(!t)return null;const n=f(t),e=function({supportedFormats:t}){return l("model/gltf+json","gltf",t)}(t);let r=null;for(const o of t.queryFormats){if(o===n)return o;o===e&&(r=o)}return r}function p({supportedFormats:t}){return l("application/esri3do-SR_world","wld",t)}function M({supportedFormats:t}){return l("application/esri3do-SR_prj","prj",t)}function m(t){return[...r,...t]}function v(t,n){const e=t.toLowerCase();return m(n).find(t=>function(t){return t?.[2].split(",").map(t=>t.toLowerCase())??[]}(t).some(t=>e.endsWith(t)))}function g(t){return t?.[0]}function w(t){return t?.[1].toLowerCase()}function y(t){return t.tables?.find(t=>"assetMaps"===t.role)}},66655(t,n,e){async function r(t){const n=(await e.e(8457).then(e.bind(e,38457)).then(t=>t.default)).getInstance();return await n.load(t)}async function o(){return c(await Promise.resolve().then(e.bind(e,6439)))}async function i(){return c(await Promise.resolve().then(e.bind(e,16939)))}async function a(){return c(await Promise.resolve().then(e.bind(e,19211)))}async function s(){return c(await Promise.resolve().then(e.bind(e,35063)))}async function u(){return(await Promise.resolve().then(e.bind(e,1193))).default}function c(t){return t.default??t}async function l(){const[t,n,e,c,l,f]=await Promise.all([o(),i(),a(),s(),u(),r()]);return{Mesh:t,MeshComponent:n,MeshMaterial:e,MeshTexture:c,MeshVertexAttributes:l,panoramicMeshManager:f}}async function f(){return c(await e.e(5243).then(e.bind(e,95243)))}async function h(){return c(await Promise.all([e.e(7373),e.e(3500),e.e(1003)]).then(e.bind(e,1003)))}e.d(n,{DN:()=>f,Wn:()=>h,Zg:()=>l})},21060(t,n,e){e.d(n,{createImageSphere:()=>l,loadMeshes:()=>p,loadPyramid:()=>d,loadRaster:()=>f}),e(52106),e(11254),e(7762);var r=e(49186),o=(e(34727),e(17676)),i=e(6439),a=e(19211),s=e(35063),u=(e(27845),e(68548),e(28208)),c=e(66655);function l({data:t,center:n=u.ZH,size:e=u.vK,horizonPitch:r=0,horizonYaw:o=0,horizonRoll:c=0}){const l=n.clone();l.z=-e/2;const f=i.default.createSphere(l,{size:e,densificationFactor:2,vertexSpace:"georeferenced",material:new a.default({colorTexture:new s.default({data:t})})});if(f.components[0].trustSourceNormals=!0,f.vertexAttributes.uv){const t=f.vertexAttributes.uv.length??0;for(let n=0;n<t;n++)f.vertexAttributes.uv[2*n+0]=1-f.vertexAttributes.uv[2*n+0]}return f.rotate(r,c,o,{origin:f.extent.center}),f.centerAt(l),f}async function f(t,n){const e=await(0,c.Wn)(),r=await e.open({url:t,ioConfig:{skipExtensions:["jgw","aux.xml"],skipMapInfo:!0},...n});return(0,o.Te)(n),h(r,{url:t})}const h=(t,n)=>{if(!t)throw new r.A("panoramic-viewer:missing-raster","Raster data could not be loaded",n);return t};async function d(t,n,e){const r=await(0,c.DN)();return(0,o.Te)(e),new r({raster:t,horizonPitch:n.pitch,horizonYaw:n.yaw,horizonRoll:n.roll})}async function p(t,n){return t?.length?await Promise.all(t.map(t=>t.loadMesh(n))):[]}}}]);