@arcgis/core 5.1.0-next.80 → 5.1.0-next.81

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 (120) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{d5fd99ee40bba9b48a54.js → 1e2c0c6d724f7639d4c1.js} +27 -27
  3. package/assets/esri/core/workers/chunks/2bd69a7734d170e190ed.js +1 -0
  4. package/assets/esri/core/workers/chunks/{c1d4110aa494a1dba3c4.js → 455d08294e0f5c5509ff.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{5da2051f548c2942e01a.js → 4af39fa53bc0b79101ed.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{87d2021e91d025a2a142.js → 5c7ba4b8a9ec2e2e02b5.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{1f82a0f134ea912fc686.js → 66fe1634c6e8f72fc653.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{96b13b6042cdf5833d39.js → 67abbe81c16de26f61d8.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{8f6f5dad52747d252aac.js → 7cee7ffaf941a4fe23b0.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{fb9e3e7cd532ac4353f1.js → 84821dff3bcc51161802.js} +2 -2
  11. package/assets/esri/core/workers/chunks/{6a0352d20596ca3f4b64.js → 88eb1e4320c4ada01711.js} +1 -1
  12. package/assets/esri/core/workers/chunks/97719271a3e4c9f2b2c9.js +1 -0
  13. package/assets/esri/core/workers/chunks/9cac70164d8528c283af.js +1 -0
  14. package/assets/esri/core/workers/chunks/ac5999c88c27b49cd760.js +1 -0
  15. package/assets/esri/core/workers/chunks/b811d62284be95f4beb6.js +1 -0
  16. package/assets/esri/core/workers/chunks/{3b9100c59a8050f4834e.js → bbc27d9285162696d089.js} +1 -1
  17. package/assets/esri/core/workers/chunks/bd8cb64b6e08839398f3.js +1 -0
  18. package/assets/esri/core/workers/chunks/{d7324a00ed576e7a37b1.js → c758e16b57c96ce88294.js} +1 -1
  19. package/assets/esri/core/workers/chunks/c8ef80a7c46d7d2c5172.js +1 -0
  20. package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +1 -0
  21. package/assets/esri/core/workers/chunks/d9c3f14eee4db7a7137b.js +1 -0
  22. package/assets/esri/core/workers/chunks/{3f242f8d092f601c3abf.js → f77d23ee60c876b01e4b.js} +1 -1
  23. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  24. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  25. package/config.js +1 -1
  26. package/form/elements/inputs.js +1 -1
  27. package/geometry/SpatialReference.js +1 -1
  28. package/geometry/support/coordsUtils.js +1 -1
  29. package/kernel.js +1 -1
  30. package/layers/FeatureLayer.d.ts +2 -2
  31. package/layers/FeatureLayer.js +1 -1
  32. package/layers/graphics/data/QueryEngine.js +1 -1
  33. package/layers/graphics/data/QueryEngineResult.js +1 -1
  34. package/layers/graphics/sources/MemorySource.js +1 -1
  35. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  36. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  37. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  38. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  39. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  40. package/layers/mixins/FeatureLayerBase.js +1 -1
  41. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  42. package/package.json +1 -1
  43. package/support/revision.js +1 -1
  44. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  45. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  46. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  47. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  48. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  49. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  50. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  51. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  52. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  53. package/views/2d/input/MapViewInputManager.js +1 -1
  54. package/views/2d/layers/MediaLayerView2D.js +1 -1
  55. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  56. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  57. package/views/3d/input/SceneInputManager.js +1 -1
  58. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  59. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  60. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  61. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  62. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  63. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  64. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialInitParameters.js +2 -0
  65. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  66. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  67. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  68. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  69. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  70. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  71. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  72. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  73. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  74. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  75. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  76. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  77. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  78. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  79. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  80. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
  81. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  82. package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
  83. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  84. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  85. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  86. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  87. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  88. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  89. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  90. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  91. package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
  92. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  93. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  94. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +1 -1
  95. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +2 -0
  96. package/views/VideoView.js +1 -1
  97. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  98. package/views/draw/support/createUtils.js +1 -1
  99. package/views/input/BrowserEventSource.js +1 -1
  100. package/views/input/InputManager.js +1 -1
  101. package/views/input/handlers/LatestPen.js +2 -0
  102. package/views/input/handlers/LatestPointer.js +1 -1
  103. package/views/input/types.d.ts +1 -1
  104. package/views/interactive/Tooltip.js +1 -1
  105. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  106. package/views/support/unnormalizationUtils.js +2 -0
  107. package/views/webgl/RenderingContext.js +1 -1
  108. package/views/webgl/renderState.js +1 -1
  109. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  110. package/widgets/FeatureTable.js +1 -1
  111. package/assets/esri/core/workers/chunks/2da62687ff678b690839.js +0 -1
  112. package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +0 -1
  113. package/assets/esri/core/workers/chunks/4f9d027055f3a616173c.js +0 -1
  114. package/assets/esri/core/workers/chunks/63381d81adce0a0d2089.js +0 -1
  115. package/assets/esri/core/workers/chunks/6dbddf5ab1867ac2ac80.js +0 -1
  116. package/assets/esri/core/workers/chunks/99c189e1de2b1f14799b.js +0 -1
  117. package/assets/esri/core/workers/chunks/9aa6b32cb65fbaa93218.js +0 -1
  118. package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +0 -1
  119. package/assets/esri/core/workers/chunks/fb5a2205f05afc396119.js +0 -1
  120. package/views/interactive/editGeometry/unnormalizationHelper.js +0 -2
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8948],{67996(e,t,i){i.d(t,{cZ:()=>N,XW:()=>R,fe:()=>L});var n=i(11254),r=i(49186),s=i(91869),o=(i(90708),i(92722)),a=i(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new d}}class d{constructor(){this.objectIdFieldName="",this.uniqueIdField=new u,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new c,this.geometryType=null,this.spatialReference=new a.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new h,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class u{constructor(){this.name="",this.isSystemMaintained=!1}}class c{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class h{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new m}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class m{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class g{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class f{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const _=["ELEMENTUID","TYPENAME"];var w=i(49403),T=i(45724);const I={upperLeft:0,lowerLeft:1},M={sqlTypeBigInt:0,sqlTypeBinary:1,sqlTypeBit:2,sqlTypeChar:3,sqlTypeDate:4,sqlTypeDecimal:5,sqlTypeDouble:6,sqlTypeFloat:7,sqlTypeGeometry:8,sqlTypeGUID:9,sqlTypeInteger:10,sqlTypeLongNVarchar:11,sqlTypeLongVarbinary:12,sqlTypeLongVarchar:13,sqlTypeNChar:14,sqlTypeNVarChar:15,sqlTypeOther:16,sqlTypeReal:17,sqlTypeSmallInt:18,sqlTypeSqlXml:19,sqlTypeTime:20,sqlTypeTimestamp:21,sqlTypeTimestamp2:22,sqlTypeTinyInt:23,sqlTypeVarbinary:24,sqlTypeVarchar:25};var v=i(93637);function E(e){const t=new l;t.version=e.version;const i=e.get_query_result();if(0!==i.results_type.value)throw new Error("Got a non-feature collection type");const n=i.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=n.objectid_field_name,r.exceededTransferLimit=n.exceeded_transfer_limit,r.hasM=n.has_m,r.hasZ=n.has_z,r.geometryType=(0,v.i7)(w.bV,n.geometry_type.value),r.globalIdFieldName=n.globalid_field_name,r.geohashFieldName=n.geohash_field_name;const s=r.uniqueIdField,o=n.unique_id_field;s.name=o.name,s.isSystemMaintained=o.isSystemMaintained;const a=r.geometryProperties,p=n.geometry_properties;a.shapeAreaFieldName=p.shapeAreaFieldName,a.shapeLengthFieldName=p.shapeLengthFieldName,a.units=p.units;const d=r.spatialReference,u=n.spatial_reference;d.wkid=u.wkid,d.latestWkid=u.latestWkid,d.vcsWkid=u.vcsWkid,d.latestVcsWkid=u.latestVcsWkid,d.wkt=u.wkt,r.transform=S(n.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=n.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),i=A(t);c.push(i),h[i.name]=e,t.delete()}y.delete();const g=r.values,b=n.values_count();for(let e=0;e<b;e++)g.push(n.get_value_at(e));const T=r.features,I=n.features,M=I.size();if(M>0)for(const e of _)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<M;e++){const t=new f,i=I.get(e),n=t.attributes,r=i.attributes_count();for(let e=0;e<r;e++)n.push(i.get_attribute_at(e));const s=i.get_compressed_geometry();s&&(t.compressedGeometry=C(s),t.centroid=C(i.get_centroid()));const o=t.aggregateGeometries,a=i.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),i=C(t);o.push(i),t.delete()}a.delete(),T.push(t),i.delete()}I.delete();const E=r.geometryFields,N=n.geometry_fields,L=N.size();for(let e=0;e<L;e++){const t=N.get(e),i=x(t);E.push(i),t.delete()}return N.delete(),t}function C(e){const t=new b;t.geometryType=(0,v.i7)(w.bV,e.geometry_type.value);const i=[],n=[];for(let t=0;t<e.lengths.length;t++)i.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)n.push(e.coords[t]);return t.lengths=i,t.coords=n,t}function A(e){const t=new g;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,v.i7)(w.r5,e.field_type.value),t.sqlType=(0,v.i7)(M,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function x(e){const t=A(e);return t.geometryType=(0,v.i7)(w.bV,e.geometry_type.value),t}function S(e){const t=new h;t.quantizeOriginPosition=(0,v.i7)(I,e.quantizeOriginPosition.value);const i=t.scale,n=e.scale;i.xScale=n.xScale,i.yScale=n.yScale,i.mScale=n.mScale,i.zScale=n.zScale;const r=t.translate,s=e.translate;return r.xTranslate=s.xTranslate,r.yTranslate=s.yTranslate,r.mTranslate=s.mTranslate,r.zTranslate=s.zTranslate,t}async function N(e,t,i){t??=!1;const o={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const i=await(0,n.A)(e,{responseType:"array-buffer",signal:t?.signal}),s=await i.data;return async function(e){const t=new((await(0,T.I)()).MapOfObjectIdentifierSetsDecoder),i=t.decode(new Uint8Array(e)),n=new Map;if(0!==i.error_code)throw new r.A("knowledge-graph:layer-support-utils",i.error_message);const s=t.get_map_of_identifier_sets(),o=s.keys,a=o.size();for(let e=0;e<a;e++){const t=o.get(e),i=s.query_identifier_set(t),a=[];if(1===i.id_array_type.value){const e=i.get_globalid_array(),t=e.count();for(let i=0;i<t;i++)a.push(e.get_globalid_at(i))}else if(3===i.id_array_type.value){const e=i.get_identifier_array(),t=e.count();for(let i=0;i<t;i++)a.push(e.get_identifier_at(i).toString())}else if(2===i.id_array_type.value){const e=i.get_string_array(),t=e.count();for(let i=0;i<t;i++)a.push(e.get_string_at(i))}else{if(0!==i.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=i.get_oid_array(),t=e.count();for(let i=0;i<t;i++)a.push(e.get_objectid_at(i).toString())}}n.set(t,a)}return t.delete(),n}(new Uint8Array(s))}(e,i).then(e=>{!function(e,t){for(const[i,n]of e){const e=(0,s.tE)(t.namedTypeDefinitions,i,()=>({useAllData:!1,members:new Map}));for(const t of n)e.members.has(t)||e.members.set(t,{id:t})}}(e,o)}),o}async function L(e){const t=await(0,T.I)(),i=new t.MapOfObjectIdentifierSets;!function(e,t,i){for(const[n,r]of i.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const i=r.members.keys();let s=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,d=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of i)o&&(s=!isNaN(Number(e)),o=!1),s?a.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),d.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(p),u.set_identifier_array(d),a.delete(),l.delete(),p.delete(),d.delete(),e.put_identifier_set(n,u),u.delete()}}(i,t,e);const n=new t.MapOfObjectIdentifierSetsEncoder;try{n.set_map_of_identifier_sets(i),n.encode();const e=n.get_encoding_result();if(0!==e.error.error_code)throw new r.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return n.delete(),t}finally{i.delete()}}async function D(e,t){const i=await(0,n.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,T.I)()).FeatureCollectionDecoder),i=t.decode(new Uint8Array(e));if(0!==i.error_code)throw new r.A("knowledge-graph:layer-support-utils",i.error_message);const n=E(t.get_feature_collection());return t.delete(),n}(await i.data)}function k(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:i,hasM:n}=e.queryResult.featureResult,r=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const a of e.queryResult.featureResult.features){const e=a.attributes[r.TYPENAME],l=(0,s.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new o.A(e,a.compressedGeometry.coords,i,n)})}else l.members.set(p,{id:p})}return t}const R={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){const i=[],n={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&i.push(D(e.entitiesUrl,t).then(e=>{k(e,n)})),e.relationshipsUrl&&i.push(D(e.relationshipsUrl,t).then(e=>{k(e,n)})),await Promise.all(i),n}(e,t)}},75503(e,t,i){i.d(t,{wq:()=>a});var n=i(4576),r=i(21818),s=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,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(),T.prune(),I.prune(),M.prune(),v.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const n=this._toBBox;if(_(e,i))for(T.clear();i;){for(let r=0,s=i.children.length;r<s;r++){const s=i.children[r],o=i.leaf?n(s):s;_(e,o)&&(i.leaf?t(s):b(e,o)?l(s,t):T.push(s))}i=T.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!_(e,t))return!1;for(T.clear();t;){for(let n=0,r=t.children.length;n<r;n++){const r=t.children[n],s=t.leaf?i(r):r;if(_(e,s)){if(t.leaf||b(e,s))return!0;T.push(r)}}t=T.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 A([]),this}remove(e){if(!e)return this;let t,i=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(M.clear(),v.clear();i||M.length>0;){if(i||(i=M.pop(),s=M.data[M.length-1],o=v.pop()??0,a=!0),i.leaf&&(t=(0,n.qh)(i.children,(0,r.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),M.push(i),this._condense(M),this;a||i.leaf||!b(i,l)?s?(o++,i=s.children[o],a=!1):i=null:(M.push(i),v.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,n){const r=i-t+1;let s=this._maxEntries;if(r<=s){const n=new A(e.slice(t,i+1));return p(n,this._toBBox),n}n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(n-1)));const o=new x([]);o.height=n;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));w(e,t,i,l,this._compareMinX);for(let r=t;r<=i;r+=l){const t=Math.min(r+l-1,i);w(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,n-1))}}return p(o,this._toBBox),o}_insert(e,t,i){const n=this._toBBox,r=i?e:n(e);M.clear();const s=function(e,t,i,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==i;){let i,n=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=y(o),l=g(e,o)-a;l<r?(r=l,n=a<n?a:n,i=o):l===r&&a<n&&(n=a,i=o)}t=i||t.children[0]}return t}(r,this._data,t,M);for(s.children.push(e),u(s,r);t>=0&&M.data[t].children.length>this._maxEntries;)this._split(M,t),t--;!function(e,t,i){for(let n=i;n>=0;n--)u(t.data[n],e)}(r,M,t)}_split(e,t){const i=e.data[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);const s=this._chooseSplitIndex(i,r,n);if(!s)return;const o=i.children.splice(s,i.children.length-s),a=i.leaf?new A(o):new x(o);a.height=i.height,p(i,this._toBBox),p(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let n,r,s;n=r=1/0;for(let o=t;o<=i-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,i,this._toBBox),l=f(t,a),p=y(t)+y(a);l<n?(n=l,s=o,r=p<r?p:r):l===n&&p<r&&(r=p,s=o)}return s}_chooseSplitAxis(e,t,i){const n=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const r=this._toBBox,s=d(e,0,t,r),o=d(e,i-t,i,r);let a=m(s)+m(o);for(let n=t;n<i-t;n++){const t=e.children[n];u(s,e.leaf?r(t):t),a+=m(s)}for(let n=i-t-1;n>=t;n--){const t=e.children[n];u(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],s=r.children;s.splice((0,n.qh)(s,i,s.length,r.indexHint),1)}else this.clear();else p(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(I.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,r.z)(e));else I.pushArray(i.children);i=I.pop()??null}}function p(e,t){d(e,0,e.children.length,t,e)}function d(e,t,i,n,r){r||(r=new A([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<i;o++)s=e.children[o],u(r,e.leaf?n(s):s);return r}function u(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 c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(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 f(e,t){const i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,s-n)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,i,n,r){const s=[t,i];for(;s.length;){const t=s.pop(),i=s.pop();if(t-i<=n)continue;const a=i+Math.ceil((t-i)/n/2)*n;(0,o.q)(e,a,i,t,r),s.push(i,a,a,t)}}const T=new s.A,I=new s.A,M=new s.A,v=new s.A({deallocator:void 0});class E{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends E{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},6518(e,t,i){i.d(t,{F:()=>a});var n=i(44208),r=i(75503),s=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,n.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,n)=>{e[t++]=n}),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,s.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()))}}},83221(e,t,i){i.d(t,{A:()=>y});var n=i(4576),r=i(49186),s=i(65529),o=i(53966),a=i(70328),l=i(19419),p=i(90708),d=i(6518),u=i(51441),c=i(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,n,r]=this.fullBounds;return{xmin:t,ymin:i,xmax:n,ymax:r,spatialReference:(0,u.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(n.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,a.Jt)(h,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 o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let n;if(i?(e.displayId=i.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,p.jQ)(null!=n?n:(0,l.vt)(),e.geometry),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.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:n,attributes:s}=e;for(const e in s)i.attributes[e]=s[e];return n&&(i.geometry=n,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),n)??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}}},37730(e,t,i){i.d(t,{T:()=>r});var n=i(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new n.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>h});var n=i(44208),r=i(4718),s=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let i="";t&&(i+=`this${u(t)} = null;`);for(const t in e)i+=`this${u(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new n}catch(i){return()=>t?{[t]:null,...e}:{...e}}}function u(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},24137(e,t,i){i.d(t,{P:()=>I});var n=i(5482),r=i(69622),s=i(49186),o=i(53966),a=i(91869),l=i(17676),p=i(39516),d=i(91429),u=i(5443),c=i(39829),h=i(91218),y=i(21325),m=i(15375);const g=(e,t)=>{if("column-reference"===e.type)return e.column===t.systemOidFieldName?"ID(n)":`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&t.supportedSqlTypes.has(e.left.type)&&t.supportedSqlTypes.has(e.right.type)&&t.supportedSqlOperators.has(e.operator))return`${g(e.left,t)} ${e.operator} ${g(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let i="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)i+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";i+=`lower(n.${e.left.column})`}if(i+=" CONTAINS (","string"!==e.right.type)return t.unsupportedOperationFound=!0,"";{let t=e.right.value;t.startsWith("%")&&(t=t.slice(1)),t.endsWith("%")&&(t=t.slice(0,-1)),i+=`'${t.toLowerCase()}')`}return i}return t.unsupportedOperationFound=!0,""};var f=i(69860),b=i(30504),_=i(2555),w=i(42538),T=i(61956);let I=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(i=>{i.name&&(t.set(i.name,"entity"),this._processingCacheUpdatesLookup.set(i.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(i.name),i.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(i.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(i=>{i.name&&(t.set(i.name,"relationship"),this._processingCacheUpdatesLookup.set(i.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(i.name),i.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(i.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((i,n)=>{if("entity"===t.get(n))this.entityTypeNames.add(n);else{if("relationship"!==t.get(n))return o.A.getLogger(this).warn(`A named type, ${n}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(n);this.relationshipTypeNames.add(n)}const r=new Map;i.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(n)}),this.sublayerCaches.set(n,r)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const i=this.inclusionModeDefinition.namedTypeDefinitions.get(e);i.members||(i.members=new Map),i.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const i=new Map;i.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:i}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return f.A.getInstance().readFromStoreById(e)}async getData(e,t,i){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new T.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,i=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=n.outFields;r&&1===r.length&&r[0]===m.dr&&"1=1"===n.where||await Promise.all(i??[]);const s=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return s.forEach(i=>{if(this.relationshipTypeNames.has(t.objectType.name)){i.geometry=e.relationshipLinkChartDiagramLookup.get(i.attributes[t.objectIdField]);const n=this.memberIdTypeLookup.get(i.attributes[m.Cz]),r=this.memberIdTypeLookup.get(i.attributes[m.KQ]),s=this._isEndEntitySpatial(n,i,m.Cz),o=this._isEndEntitySpatial(r,i,m.KQ);i.attributes[m.BL]=Number(s&&o)}else{i.geometry=e.entityLinkChartDiagramLookup.get(i.attributes[t.objectIdField]);const n=this.geographicLookup.get(t.objectType.name);n&&i.attributes[n.name]?i.attributes[m.BL]=1:i.attributes[m.BL]=0}i.attributes[m.T1]=i.geometry,o.push(i)}),o}return this.retrieveDataFromService(n,t,i)}async getConnectedRecordIds(e,t,i){const n=[];let r="";const s=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const o={},a=[];for(const[e,i]of s){const n=`${e}_ids`;o[n]=i,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return n;const l=a.join(" UNION "),p=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:l,bindParameters:o}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const i=t[e];n.push({id:i[0],typeName:i[1]}),n.push({id:i[2],typeName:i[3]})}}return n}async getRelationshipsBetweenNodes(e,t,i){const n=this._getNamedTypeIdMapFromNodeIds(e);if(0===n.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(const[e,t]of n.entries()){const i=`${e}_ids`;r[i]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const o=s.join(" UNION "),a=[],l=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:o,bindParameters:r}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const i=t[e];a.push({id:i[0],typeName:i[1]})}}return a}async getRelationshipsFromNodes(e,t,i,n){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const s={relationshipExclusionIds:i,possibleConnectionEntityIds:t},o=[];for(const[e,t]of r.entries()){const i=`${e}_ids`;s[i]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=o.join(" UNION "),l=new Map,p=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:a,bindParameters:s}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const i=t[e];let n=l.get(i[1]);n||(n=new Set,l.set(i[1],n)),n.add(i[0])}}const d=[];for(const[e,t]of l)for(const i of t)d.push({id:i,typeName:e});return d}async refreshCacheContent(e,t,i,n=!0,r){const o=f.A.getInstance(),p=[],d=new Map,u=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach(e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}));for(const[e,l]of d){const d=new Set(l),c=new Promise((p,c)=>{(async()=>{const p=new Set,c=[];let h,y="",g=!1;if(t||u.get(e)?.properties?.forEach(e=>{e.name&&p.add(e.name)}),i&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&p.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);g=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new w.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const f=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:i}=await f.read();if(t)break;const r=[];for(let e=0;e<i.length;e++){const t=i[e];let n=0,s=0;const o={properties:{}};for(o.id=t[n],n++,s++,g&&(o.originId=t[n],n++,s++,o.destinationId=t[n],n++,s++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,()=>new Set).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,()=>new Set).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,()=>[o.originId,o.destinationId]));n<t.length;n++)o.properties[c[n-s]]=t[n];d.delete(o.id),r.push(o)}const s=o.writeToStore(r,m.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach(t=>{l?.set(t.attributes[m.dr],t),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[m.dr],()=>new Set).add(e))})}const b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(const e of d)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):c(e)})});p.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(p),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,i=new Set(e.map(e=>e.id));for(const i of e)t.add(i.typeName),1===this.memberIdTypeLookup.get(i.id)?.size?this.memberIdTypeLookup.delete(i.id):this.memberIdTypeLookup.get(i.id)?.delete(i.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===i.typeName&&e.members?.has(i.id)&&e.members.delete(i.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,n)=>{i.has(n)&&this.sublayerCaches.get(e)?.delete(n)})})}async retrieveDataFromService(e,t,i){const n=f.A.getInstance(),r=new Set,o=[];let a,l="",d=[];const T="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,M=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let v=!I&&M?Array.from(M).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(v=e.objectIds);else if(null!=e.objectIds&&v&&v.length>0){const t=e.objectIds;e.objectIds=v.filter(e=>t.includes(e))}else if(null!=e.objectIds)v=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=v}if(null!=e.outFields){const i=e.outFields;i.includes("*")?t.fields.forEach(e=>{r.add(e.name)}):i.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&r.add(e)})}if(null!=e.geometry){const i=e.geometry;let n;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=d?.spatialReference,g=d?.serviceCapabilities?.geometryCapabilities;let f=g?.geometryMaxBoundingRectangleSizeX,_=g?.geometryMaxBoundingRectangleSizeY;if("point"===i.type){let e=i;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,y.KK),e=(0,h.project)(e,y.KK)),n=new u.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else i?.extent?.spatialReference&&!i.spatialReference?.isWGS84?(await(0,h.initializeProjection)(i.extent.spatialReference,y.KK),n=(0,h.project)(i.extent,y.KK)):n=i.extent;if(f&&_&&m){if(4326!==m.wkid){const e=new u.A({spatialReference:m,xmax:f,ymax:_}),t=(0,h.project)(e,y.KK);f=t.xmax,_=t.ymax}if(n.xmax-n.xmin>f)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${f}° latitude, limit exceeded`);if(n.ymax-n.ymin>_)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${_}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const i=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&r.add(e.name)})}l=T?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{l+=`, n.${e}`,o.push(e)}),a=new w.A({openCypherQuery:l,bindParameters:{param_filter_geom:new c.A({rings:(0,b.Wq)(n)})}})}else{let i="";if(null!=e.where&&"1=1"!==e.where){const n=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&r.add(e.name)});const s={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};i=g(n.parseTree,s),s.unsupportedOperationFound&&(i="")}let n="";n=T?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;v&&(s=!0,n+=" WHERE ID(n) IN $ids"),i&&(n+=s?" AND":" WHERE",n+=` ${i}`),n+=" return ID(n)",T&&(n+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{n+=`, n.${e}`,o.push(e)}),a=new w.A(v?{openCypherQuery:n,bindParameters:{ids:v}}:{openCypherQuery:n})}const E=(await(0,_.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,i)).resultRowsStream.getReader();for(;;){const{done:e,value:i}=await E.read();if(e)break;const r=[];for(let e=0;e<i.length;e++){const t=i[e];let n=0,s=0;const a={properties:{}};for(a.id=t[n],n++,s++,T&&(a.originId=t[n],n++,s++,a.destinationId=t[n],n++,s++);n<t.length;n++)a.properties[o[n-s]]=t[n];r.push(a)}d=d.concat(n.writeToStore(r,m.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,i){for(const n of e??[])if(this.entityTypeNames.has(n)){const e=this.geographicLookup.get(n),r=e&&this.sublayerCaches.get(n)?.get(t.attributes[i]);if(e&&r?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const i of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(i))return;t.has(i)?t.get(i)?.push(e):t.set(i,[e])}}),t}};(0,n.Cg)([(0,d.MZ)()],I.prototype,"knowledgeGraph",void 0),(0,n.Cg)([(0,d.MZ)()],I.prototype,"inclusionModeDefinition",void 0),(0,n.Cg)([(0,d.MZ)()],I.prototype,"entityTypeNames",void 0),(0,n.Cg)([(0,d.MZ)()],I.prototype,"relationshipTypeNames",void 0),(0,n.Cg)([(0,d.MZ)()],I.prototype,"geographicLookup",void 0),(0,n.Cg)([(0,d.MZ)()],I.prototype,"sublayerCaches",void 0),(0,n.Cg)([(0,d.MZ)()],I.prototype,"nodeConnectionsLookup",void 0),(0,n.Cg)([(0,d.MZ)()],I.prototype,"relationshipConnectionsLookup",void 0),(0,n.Cg)([(0,d.MZ)()],I.prototype,"memberIdTypeLookup",void 0),I=(0,n.Cg)([(0,d.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],I)},62796(e,t,i){i.d(t,{A:()=>me});var n=i(5482),r=i(37838),s=i(49186),o=i(4718),a=i(53966),l=i(25728),p=i(91429),d=(i(29953),i(78247)),u=i(5443),c=i(86738),h=i(39829),y=i(82799),m=i(91218),g=i(16930),f=i(21325),b=i(50498),_=i(55156),w=i(60950),T=i(89808),I=i(99959);const M=Symbol("isKnowledgeGraphGraphicOriginSymbol");var v;class E extends I.A{get[(v=M,w.ym)](){return this.sublayer}get[_.e](){return this.sublayer}get[T.Q](){return this.sublayer}constructor(e,t){super(),this[v]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const C=Symbol("isLinkChartGraphicOriginSymbol");var A;class x extends I.A{get[(A=C,w.ym)](){return this.sublayer}get[_.e](){return this.sublayer}get[T.Q](){return this.sublayer}constructor(e,t){super(),this[A]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var S=i(4146),N=i(83221),L=i(75752),D=i(64714),k=i(15375);const R=(0,i(17036).p)(),F=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,n.Cg)([(0,p.MZ)(R.fields)],i.prototype,"fields",void 0),(0,n.Cg)([(0,p.MZ)(R.fieldsIndex)],i.prototype,"fieldsIndex",void 0),i=(0,n.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],i),i};var B=i(40736),O=i(63074),j=i(6455),G=i(87718),P=i(56658),Z=i(32756),$=i(54310),U=i(25036),q=i(82935),Q=i(10873),H=i(20569),Y=i(29005),z=i(20437),K=i(30524),W=i(46499),V=i(39383),X=i(96184),J=i(96576),ee=i(65494),te=i(41214),ie=i(2555),ne=i(22671),re=i(61956),se=i(30291),oe=i(88625),ae=i(37531),le=i(61322),pe=i(43937);function de(e){if(!e.json)return e;e.json.write=ue(e.json.write);const t=e.json.origins;if(!t)return e;let i;for(i in t){const e=t[i];e&&(e.write=ue(e.write))}return e}function ue(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:i,overridePolicy:n,...r}=e;return function(e,t){const i=he.call(this,e,t);return i.enabled?{...r,...i}:i}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:he}}function he(e,t){const i=!!this.geometryType;let n={enabled:i};return i&&(n={...n,...ye.call(this,e,t)}),n}function ye(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let me=class extends(F((0,j.FJ)((0,P.J)((0,G.F)((0,O.dM)((0,Z.fY)((0,q.e)((0,U.j)((0,$.J)((0,l.M)(S.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=k.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new le.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const i=re.A.fromJSON(e);return this.queryFeaturesJSON(i,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,B.hZ)(null)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}get editingEnabled(){return this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveCapabilities(){const e=(0,o.o8)(this.capabilities),{operations:t,editing:i}=e;return this.userHasUpdateItemPrivileges&&(t.supportsAdd=t.supportsDelete=t.supportsEditing=t.supportsQuery=t.supportsUpdate=i.supportsDeleteByOthers=i.supportsGeometryUpdate=i.supportsUpdateByOthers=!0),this.userHasFullEditingPrivileges&&t.supportsEditing&&(t.supportsAdd=t.supportsDelete=t.supportsUpdate=i.supportsGeometryUpdate=!0),e}get effectiveEditingEnabled(){return this.userHasUpdateItemPrivileges||this.editingEnabled}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[],t=new Map;for(const e of this.parent?.knowledgeGraph.dataModel.domains??[])t.set(e.name,e);return this.objectType?.properties?.forEach(i=>{const n="esriFieldTypeOID"===i.fieldType?"esriFieldTypeInteger":i.fieldType,r=z.A.fromJSON({name:i.name,type:n,alias:i.alias,defaultValue:i.defaultValue,editable:i.editable,nullable:i.nullable,domain:i.domain&&t.has(i.domain)?t.get(i.domain).toJSON():void 0});e.push(r)}),e.push(z.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),z.A.fromJSON({name:k.M1,type:"esriFieldTypeInteger",alias:k.M1,editable:!1}),z.A.fromJSON({name:k.BL,type:"esriFieldTypeInteger",alias:k.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,B.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?b.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return k.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new E(this.parent,this);case"link-chart":return new x(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,i=t?this.objectType?.properties?.[t]:null;return i?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,i=t?this.objectType?.properties?.[t]:null;return i?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?(0,B.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,B.iW)(this.graphType,this.graphTypeName,e):(0,B.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,K.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),i=(0,B.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new J.A({type:"simple",symbol:(0,B.UT)(i)});const e=(0,ee.r)((0,D.F0)(b.gy.toJSON("point")).renderer);return(0,ae.dt)(e.symbol,i),e}const n=(0,ee.r)((0,D.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,ae.dt)(n.symbol,i),n}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??g.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,B.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get dateFieldsTimeZone(){return this.parentCompositeLayer?.dateFieldsTimeZone}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}get userHasEditingPrivileges(){return!this.parent||this.parent.userHasEditingPrivileges}get userHasFullEditingPrivileges(){return!!this.parent&&this.parent.userHasFullEditingPrivileges}get userHasUpdateItemPrivileges(){return!!this.parent&&this.parent.userHasUpdateItemPrivileges}createPopupTemplate(e){return(0,se.tn)(this,e)}createQuery(){return new re.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return this.fields.find(t=>t.name===e)?.domain||null}async queryFeatures(e,t){await this.load();const{resolvedQuery:i,queryEngine:n}=await this._setupQueryObjects(e),r=this.graphicOrigin,s=ne.A.fromJSON(await n.executeQuery(i.toJSON(),t?.signal));return s.features.forEach(e=>{e.sourceLayer=this,e.origin=r}),s}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:i,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(i.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:i,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(i.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const i={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(i),s=await r.executeQueryForExtent(n.toJSON(),t?.signal);let o;return o=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new u.A(s.extent):new u.A,{count:s.count,extent:o}}async queryObjectIds(e,t){await this.load();const i=re.A.from(e);let n;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(i,this,t);n=this.loadQueryEngine(e)}return await n.executeQueryForIds(i.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new s.A("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=await(0,B.O9)(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const i=await(0,ie.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),n=(0,B.Gz)(i,this.graphTypeName),r={addedFeatures:n.addFeatureResults,updatedFeatures:n.updateFeatureResults,deletedFeatures:n.deleteFeatureResults,addedAttachments:n.addAttachmentResults,deletedAttachments:n.deleteAttachmentResults,updatedAttachments:n.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",r),this.emit("apply-edits",{result:Promise.resolve(r)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...r.addedFeatures.map(e=>e.globalId),...r.updatedFeatures.map(e=>e.globalId),...r.deletedFeatures.map(e=>e.globalId)]),n}loadQueryEngine(e){const t=new N.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),i=new L.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return i.featureStore.addMany(e),i}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new re.A({where:"1=1",outFields:[k.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,K.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const i=re.A.from(e),n=i.geometry;if(n&&!n.spatialReference?.isWGS84&&(await(0,m.initializeProjection)(n.spatialReference,f.KK),i.geometry=(0,m.project)(n instanceof h.A||n instanceof y.A||n instanceof c.A?n:n.extent,f.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:i,queryEngine:this._cachedQueryEngine};const r=await this.parentCompositeLayer.dataManager.getData(i,this,t);return{resolvedQuery:i,queryEngine:this.loadQueryEngine(r)}}};(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(O.sU)))],me.prototype,"blendMode",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"capabilities",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"isTable",null),(0,n.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],me.prototype,"charts",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"defaultPopupTemplate",null),(0,n.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],me.prototype,"definitionExpression",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(j.Dp)))],me.prototype,"displayFilterEnabled",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(j.KV)))],me.prototype,"displayFilterInfo",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"editingEnabled",null),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(O.LF)))],me.prototype,"effect",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"effectiveCapabilities",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"effectiveEditingEnabled",null),(0,n.Cg)([(0,p.MZ)({type:oe.A})],me.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(G.Y)))],me.prototype,"featureEffect",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(H.d)))],me.prototype,"featureReduction",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"fields",null),(0,n.Cg)([(0,p.MZ)({type:d.A})],me.prototype,"formTemplate",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"geometryType",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"geometryFieldName",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"graphicOrigin",null),(0,n.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphType",void 0),(0,n.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphTypeName",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"hasM",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"hasZ",null),(0,n.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],me.prototype,"id",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],me.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,p.MZ)({type:[W.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,i){const n=[["ESRI__AGGREGATION_COUNT",k.M1],["ESRI__ORIGIN_ID",k.Cz],["ESRI__DESTINATION_ID",k.KQ],["ESRI__LAYOUT_GEOMETRY",k.T1]];try{for(const t of e)for(const[e,i]of n)t.labelExpression=t.labelExpression?.replaceAll(e,i),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,i))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,V.w)(e,t,i)},write:ce()}})],me.prototype,"labelingInfo",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"layerType",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Q.fV)))],me.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Q.hG)))],me.prototype,"maxScale",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Q.hn)))],me.prototype,"minScale",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"objectIdField",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"objectType",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Q.ke)))],me.prototype,"opacity",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Z.ne)))],me.prototype,"orderBy",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],me.prototype,"parent",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"parentCompositeLayer",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Q.M6)))],me.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],me.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:ye}}})],me.prototype,"refreshInterval",void 0),(0,n.Cg)([(0,p.MZ)({types:te.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],me.prototype,"renderer",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"source",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"spatialReference",null),(0,n.Cg)([(0,p.MZ)({type:Y.A})],me.prototype,"templates",null),(0,n.Cg)([(0,p.MZ)({type:X.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:ye},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ye}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ye}}}}})],me.prototype,"timeInfo",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"dateFieldsTimeZone",null),(0,n.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"title",null),(0,n.Cg)([(0,pe.K)("title")],me.prototype,"writeTitle",null),(0,n.Cg)([(0,p.MZ)({json:{read:!1}})],me.prototype,"type",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(q.B)))],me.prototype,"useViewTime",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasEditingPrivileges",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasFullEditingPrivileges",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasUpdateItemPrivileges",null),(0,n.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],me.prototype,"visible",void 0),me=(0,n.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],me)},69860(e,t,i){i.d(t,{A:()=>a});var n=i(65864),r=i(90708),s=i(43334),o=i(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){const t=[];return e.forEach(e=>{const i=this.readFromStoreById(e);i&&t.push(i)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,i){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l=null;i&&e.properties[i]&&(l=(0,r.Ux)(e.properties[i])),"originId"in e&&"destinationId"in e&&(e.properties[o.Cz]=e.originId,e.properties[o.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){const t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};const e=i&&p[i];null!=e&&(p[i]=(0,n.rS)(e)),l=l??t.geometry}}const d=new s.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,d),a.push(d)}),a}}},15375(e,t,i){i.d(t,{BL:()=>l,Cz:()=>r,KQ:()=>s,M1:()=>a,T1:()=>o,dr:()=>n});const n="ESRI__ID",r="ESRI__OriginID",s="ESRI__DestID",o="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},40736(e,t,i){i.d(t,{Gz:()=>U,O9:()=>$,hZ:()=>Z,CP:()=>Q,dD:()=>q,UT:()=>F,MY:()=>B,Td:()=>R,iW:()=>O,e$:()=>j,$L:()=>H,N1:()=>G,qN:()=>D});var n=i(68197),r=i(92602),s=i(70333),o=(i(49186),i(91869)),a=i(17676),l=i(78247),p=i(11684),d=i(91218),u=i(16930),c=i(17136),h=i(99352),y=i(15375),m=i(29005),g=i(46499),f=i(73913),b=i(77548),_=i(80812),w=i(10407),T=i(2555),I=i(25927),M=i(5482),v=i(69622),E=i(91429);let C=class extends v.A{constructor(e){super(e),this.entityAdds=void 0,this.entityUpdates=void 0,this.entityDeletes=void 0,this.relationshipAdds=void 0,this.relationshipUpdates=void 0,this.relationshipDeletes=void 0,this.options=void 0}};(0,M.Cg)([(0,E.MZ)()],C.prototype,"entityAdds",void 0),(0,M.Cg)([(0,E.MZ)()],C.prototype,"entityUpdates",void 0),(0,M.Cg)([(0,E.MZ)()],C.prototype,"entityDeletes",void 0),(0,M.Cg)([(0,E.MZ)()],C.prototype,"relationshipAdds",void 0),(0,M.Cg)([(0,E.MZ)()],C.prototype,"relationshipUpdates",void 0),(0,M.Cg)([(0,E.MZ)()],C.prototype,"relationshipDeletes",void 0),(0,M.Cg)([(0,E.MZ)()],C.prototype,"options",void 0),C=(0,M.Cg)([(0,E.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],C);var A=i(23150),x=i(94128),S=i(40863),N=i(68249);const L=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function D(e,t,i){return(async(e,t,i)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const n=new Map;for(const i of t)n.set(i,L(e,i));const r=await(0,T.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(n.values()),{requestOptions:{signal:i?.signal}});for(const t of[...e.layers,...e.tables]){const i=t.objectType.name;if(null==i)continue;const n=r.get(L(e,i));if(n){const e=JSON.parse(n);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}})(e,t,i)}const k=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"];function R(e){return e<0||e>=k.length?new n.A("#8f8f82"):new n.A(k[e])}function F(e){const t=e.toArray();return new S.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function B(e){let t="ESRI__ID",i=4;for(const n of e)if(n.name){if("name"===n.name.toLowerCase()){t=n.name;break}n.name.toLowerCase().includes("name")?(t=n.name,i=2):"esriFieldTypeString"===n.fieldType&&i>3&&(t=n.name,i=3)}return t}function O(e,t,i){const n={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new g.A({labelExpressionInfo:new f.A({expression:"ESRI__ID"===i?`${t}`:`$feature.${i}`}),labelPlacement:"above-center",symbol:new N.A(n)}),s=new g.A({labelExpressionInfo:new f.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new N.A({...n,yoffset:"12px"})});return"entity"===e?[r]:[s]}function j(e,t,i){const n={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===i?`${e}`:`$feature.${i}`;return"point"===t?[new g.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"above-center",symbol:new N.A(n)})]:"polyline"===t?[new g.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new N.A(n)})]:"polygon"===t?[new g.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"always-horizontal",symbol:new N.A(n)})]:null}async function G(e,t,i){return(async(e,t,i)=>{let n=!0,o=!1,a=!1;if(!r.A.userPrivilegesApplied)return{edit:n,fullEdit:o,updateItem:a};const l=await(0,b.wI)(t,i);if(!l)return{edit:n,fullEdit:o,updateItem:a};const p=s.id?.getCredential(`${l}/sharing`,{...i,prompt:!1});if(!p)return{edit:n,fullEdit:o,updateItem:a};const d=new _.default({id:e,portal:{url:l}});return await d.load(i),({features:{edit:n,fullEdit:o},content:{updateItem:a}}=(0,w.It)(d)),{edit:n,fullEdit:o,updateItem:a}})(e,t,i).catch(e=>((0,a.QP)(e),{edit:!0,fullEdit:!1,updateItem:!1}))}const P={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function Z(e){const{capabilities:t,allowGeometryUpdates:i,serviceCapabilities:{geometryCapabilities:{supportsZValues:n,supportsMValues:r}}}=e?.serviceDefinition||P,s=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),o=new Set(s);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:r,supportsTrueCurve:!1,supportsZ:n},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:o.has("Create"),supportsDelete:o.has("Delete"),supportsEditing:o.has("Editing"),supportsChangeTracking:!1,supportsQuery:o.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:o.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:h.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:h.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&i,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:o.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:o.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function $(e,t){const i=new C,n=t.graphTypeName,r=t.graphType,s="knowledge-graph"===t.parentCompositeLayer.type?t.geometryFieldName:null,a=!!t.fieldsIndex.get(s)?.editable,l=e=>{const i={...e};for(const e of t.fields)e.editable||delete i[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete i[t];return i},p=async e=>{await(0,d.initializeProjection)(e.spatialReference,u.A.WGS84);const t=(0,d.project)(e,u.A.WGS84);return"point"===t.type?t.normalize():(await(0,c.el)(t))[0]};for(const t of e.addFeatures??[]){const e=l(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===r?(i.entityAdds||(i.entityAdds=[]),s&&t.geometry&&(e[s]=await p(t.geometry)),i.entityAdds.push(new I.A({properties:e,typeName:n}))):(i.relationshipAdds||(i.relationshipAdds=[]),i.relationshipAdds.push(new A.A({properties:e,typeName:n}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[y.dr],o=l(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===r?(i.entityUpdates||(i.entityUpdates=[]),s&&a&&t.geometry&&(o[s]=await p(t.geometry)),i.entityUpdates.push(new I.A({id:e,properties:o,typeName:n}))):(i.relationshipUpdates||(i.relationshipUpdates=[]),i.relationshipUpdates.push(new A.A({id:e,properties:o,typeName:n}))))}const h=new Map;for(const t of e.deleteFeatures??[])if((0,x.D)(t)){const e=t,i=(0,o.tE)(h,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===n&&i.ids.push(e.attributes[y.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,o.tE)(h,n,()=>({typeName:n,ids:[]})).ids.push(t.objectId);for(const e of h.values())e.ids.length>0&&("entity"===r?(i.entityDeletes||(i.entityDeletes=[]),i.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(i.relationshipDeletes||(i.relationshipDeletes=[]),i.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return i}function U(e,t){const i={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const n of e.editResults)if(n.typeName===t){for(const e of n.adds)i.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of n.updates)i.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of n.deletes)i.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return i}function q(e){if(!e.objectType)return null;const t=[];for(const i of e.fields)!i.name.includes("ESRI__")&&i.editable&&"geometry"!==i.type&&t.push(new p.A({fieldName:i.name}));return new l.A({elements:t})}function Q(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new m.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}const H=e=>{let t="";const i=e.split("/"),n=i.lastIndexOf("KnowledgeGraphServer");return n>0&&(t=i[n-1]),t}},30504(e,t,i){i.d(t,{k5:()=>p,aq:()=>l,Wq:()=>d}),i(52106);var n=i(49186),r=(i(86738),i(39829),i(82799),i(94194),i(69860),i(8460),i(66552));(0,r.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,r.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const s=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var o=i(2555),a=i(42538);async function l(e,t,i){const n=[],r=function(e,t){const i=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&i.set(e.name,[]);for(const t of e)i.has(t.typeName)&&i.get(t.typeName)?.push(t.id);return i}(e,t),s={},l=[];for(const[e,t]of r){if(t.length<1)continue;const i=`${e}_ids`;s[i]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${i} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const p=l.join(" UNION "),d=new a.A({openCypherQuery:p,bindParameters:s}),u=(await(0,o.executeQueryStreaming)(t,d,i?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(const e of t)n.push({id:e[0],typeName:e[1]}),n.push({id:e[2],typeName:e[3]})}return n}i(40863),i(94985),i(68249);const p=e=>s.get(e)??"radial-root-centric";function d(e){if(!e.spatialReference.isWGS84)throw new n.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}},8460(e,t,i){i.d(t,{$C:()=>y,Hh:()=>o,Tu:()=>c,Wg:()=>h,Xq:()=>g,i6:()=>f,pM:()=>u,vJ:()=>m});var n=i(2741);let r,s=null;function o(){return r||(r=i.e(3666).then(i.bind(i,3666)).then(({default:e})=>e({locateFile:e=>(0,n.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){s=e}(e)}),r)}const a={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON(),eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:a[t.timeDirection]??a.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function d(e,t,i,n,r,o){const a=i.length,l=r.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(u+2*p)+l*(2*d),h=s._malloc(c);try{const u=h+16-h%16,c=u+a*p,y=c+a*p,m=y+l*d,g=m+l*d,f=()=>[s.HEAPF64.subarray(u>>3,(u>>3)+a),s.HEAPF64.subarray(c>>3,(c>>3)+a),s.HEAPU32.subarray(y>>2,(y>>2)+l),s.HEAPU32.subarray(m>>2,(m>>2)+l),s.HEAPU8.subarray(g,g+a)],[b,_,w,T,I]=f();b.set(i),_.set(n),w.set(r),T.set(o),I.set(t);const M=e(a,g,u,c,l,y,m);let v=null,E=null;if(0===M.value){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),i=s.getLayoutLinksVertices(),n=s.countLayoutLinksVertices();!l||e&&t?n&&!i?M.value=1:(v={types:new Uint8Array(s.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(s.HEAPF64.subarray(i>>3,(i>>3)+2*n))},E=s.getAuxiliaryGraphicElements()):M.value=1}const[C,A,x,S,N]=f();return i.set(C),n.set(A),r.set(x),o.set(S),t.set(N),{status:M.value,links:v,graphics:E}}finally{s._free(h),s.cleanupLayout()}}var u,c,h,y,m,g,f,b;(b=u||(u={})).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},b.apply=function(e,t,i,n,r,o,a=2,l=1,p=-1){return d((t,i,n,r,o,d,u)=>s.applyForceDirectedLayout(e,t,i,n,r,o,d,u,a,l,p),t,i,n,r,o)},function(e){e.apply=function(e,t,i,n,r,o,a=2,l=1,p=-1){return d((t,i,n,r,o,d,u)=>s.applyCommunityLayout(e,t,i,n,r,o,d,u,a,l,p),t,i,n,r,o)}}(c||(c={})),function(e){e.apply=function(e,t,i,n,r,o){return d((t,i,n,r,o,a,l)=>s.applySimpleLayout(e,t,i,n,r,o,a,l),t,i,n,r,o)}}(h||(h={})),function(e){e.apply=function(e,t,i,n,r,o){return d((t,i,n,r,o,a,l)=>s.applyHierarchicalLayout(e,t,i,n,r,o,a,l),t,i,n,r,o)}}(y||(y={})),function(e){e.apply=function(e,t,i,n,r,o){return d((t,i,n,r,o,a,l)=>s.applyRadialTreeLayout(e,t,i,n,r,o,a,l),t,i,n,r,o)}}(m||(m={})),function(e){e.apply=function(e,t,i,n,r,o){return d((t,i,n,r,o,a,l)=>s.applySmartTreeLayout(e,t,i,n,r,o,a,l),t,i,n,r,o)}}(g||(g={})),function(e){e.apply=function(e,t,i,n,r,o,a,l,u,c,h,y){return d((t,i,n,a,l,d,m)=>{if(r.length!==t)return{value:1};if(o.length!==t)return{value:1};if(u.length!==l)return{value:1};if(c.length!==l)return{value:1};const g=Float64Array.BYTES_PER_ELEMENT,f=16,b=s._malloc(f+t*g),_=s._malloc(f+t*g),w=s._malloc(f+l*g),T=s._malloc(f+l*g),I=b+f-b%f,M=_+f-_%f,v=w+f-w%f,E=T+f-T%f;try{return s.HEAPF64.subarray(I>>3,(I>>3)+t).set(r),s.HEAPF64.subarray(M>>3,(M>>3)+t).set(o),s.HEAPF64.subarray(v>>3,(v>>3)+l).set(u),s.HEAPF64.subarray(E>>3,(E>>3)+l).set(c),s.applyChronologicalLayout(e,t,i,n,a,I,M,l,d,m,v,E,h,p(y))}finally{s._free(b),s._free(_),s._free(w),s._free(T)}},t,i,n,a,l)}}(f||(f={}))},10407(e,t,i){i.d(t,{It:()=>h,LG:()=>o,OM:()=>p,Sm:()=>d,Y:()=>a,bK:()=>l,mm:()=>c,sQ:()=>u});var n=i(91218),r=i(16930),s=i(28735);function o(e,t){if(!a(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,c.HOSTED_SERVICE)}function p(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function d(e,t,i){i?o(e,t):p(e,t)}async function u(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const i=r.A.WGS84;return await(0,n.initializeProjection)(t,i),(0,n.project)(e,i)}(i)}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:i,itemControl:n}=e,r=t.user?.privileges;let s=!r||r.includes("features:user:edit"),o=!!i&&!!r?.includes("features:user:fullEdit");const a="update"===n||"admin"===n;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}},25927(e,t,i){i.d(t,{A:()=>a});var n=i(5482),r=i(91429),s=i(86738),o=i(54238);let a=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Entity")],a)},54238(e,t,i){i.d(t,{A:()=>o});var n=i(5482),r=i(91429),s=i(77901);let o=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"typeName",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"id",void 0),o=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],o)},77901(e,t,i){i.d(t,{A:()=>o});var n=i(5482),r=i(25482),s=i(91429);let o=class extends r.o{constructor(e){super(e),this.properties={}}};(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],o.prototype,"properties",void 0),o=(0,n.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.GraphObject")],o)},42538(e,t,i){i.d(t,{A:()=>l});var n=i(5482),r=i(91429),s=i(16930),o=i(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n.Cg)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQuery")],a);let l=class extends a{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,n.Cg)([(0,r.MZ)()],l.prototype,"bindParameters",void 0),(0,n.Cg)([(0,r.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,n.Cg)([(0,r.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,n.Cg)([(0,r.MZ)({type:s.A})],l.prototype,"outputSpatialReference",void 0),(0,n.Cg)([(0,r.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},40662(e,t,i){i.d(t,{A:()=>o});var n=i(5482),r=i(91429),s=i(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.ObjectValue")],o)},42095(e,t,i){i.d(t,{A:()=>a});var n=i(5482),r=i(25482),s=i(91429),o=i(77901);let a=class extends r.o{constructor(e){super(e),this.path=[]}};(0,n.Cg)([(0,s.MZ)({type:[o.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,n.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.Path")],a)},23150(e,t,i){i.d(t,{A:()=>a});var n=i(5482),r=i(91429),s=i(82799),o=i(54238);let a=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,n.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Relationship")],a)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4674],{18768(t,e,r){r.d(e,{b:()=>u});var s=r(5482),i=r(53966),o=r(91429),n=r(60694);const u=t=>{const e=t;let r=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=(0,n.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,n.Jf)(t,i.A.getLogger(this)))}};return(0,s.Cg)([(0,o.MZ)()],r.prototype,"title",null),(0,s.Cg)([(0,o.MZ)({type:String})],r.prototype,"url",null),r=(0,s.Cg)([(0,o.$K)("esri.layers.mixins.ArcGISService")],r),r}},69208(t,e,r){r.d(e,{d:()=>o});var s=r(5482),i=r(91429);const o=t=>{const e=t;let r=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s.Cg)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,s.Cg)([(0,i.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}},8303(t,e,r){r.d(e,{A:()=>I});var s=r(5482),i=r(92602),o=r(70333),n=r(11254),u=r(60999),a=r(49186),p=r(53966),l=r(97768),c=r(17676),d=r(84952),y=r(91429),f=r(77548),m=r(20655),g=r(80812),h=r(41318),v=r(10407),C=r(36005),A=r(43937);const I=t=>{const e=t;let I=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,l.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new g.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,c.zf)(t)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,c.QP)(t),!0)))}async setUserPrivileges(t,e){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!o.id?.findCredential(this.url),i=t===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let n,u;if(i)n=r.portal.url;else try{n=await(0,f.wI)(this.url,e)}catch(t){(0,c.QP)(t)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;u=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.QP)(t)}const a=!0,p=!1,l=!1;if(!u)return{features:{edit:a,fullEdit:p},content:{updateItem:l}};try{if(i?await r.reload():(r=new g.default({id:t,portal:{url:n}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,c.QP)(t)}return{features:{edit:a,fullEdit:p},content:{updateItem:l}}}_getUserPrivileges(t,e){const r=(0,v.It)(t);return e&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const r=S.credential===e?S.user:await this._fetchEditingUser(t);return S.credential=e,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=m.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(s))return i.user;const a=`${s}/community/self`,p=null!=t?t.signal:null,l=await(0,u.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:p}));return l.ok?h.A.fromJSON(l.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return r&&s&&!(0,d.ut)(s.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.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(t,{...e,layer:this})}};return(0,s.Cg)([(0,y.MZ)({type:g.default})],I.prototype,"portalItem",null),(0,s.Cg)([(0,C.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,s.Cg)([(0,A.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,s.Cg)([(0,y.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,s.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],I),I},S={credential:null,user:null}},20557(t,e,r){r.d(e,{Fm:()=>a,Hz:()=>g,JQ:()=>m,JZ:()=>E,ND:()=>v,R_:()=>n,U9:()=>f,_h:()=>A,be:()=>c,fE:()=>y,fu:()=>i,nr:()=>h,oF:()=>o,qv:()=>P,rP:()=>d,rq:()=>p,z$:()=>l});const s=[["binary","application/octet-stream","bin",""]];function i(t,e){return null!=I(e.name,t?.supportedFormats??[])}function o(t,e){if(!t)return!1;const r=p(e,t.supportedFormats??[]);return null!=r&&t.editFormats.includes(r)}function n(t,e){return S(function(t,e){const r=t.toLowerCase();return C(e).find(t=>w(t)===r)}(t,e))}function u(t,e){return S(I(t,e))}function a(t,e){return w(A(t,e))}function p(t,e){return u(t.name,e)??n(t.type,e)}function l(t,e,r){return n(t,r)??u(e,r)}function c(t,e){if(!t||!A(t,e))return;const r=/^3d_(.+)$/iu.exec(t)?.[1]?.toLowerCase();return r||void 0}function d(t,e){return(t??[]).map(t=>c(t,e)).filter(t=>!!t)}function y(t,e){return S(e.find(r=>c(S(r),e)===t))}function f({supportedFormats:t}){return l("model/gltf-binary","glb",t)}function m(t){const e=f(t);return null!=e&&t.editFormats.includes(e)}function g(t){if(!t)return null;const e=f(t),r=function({supportedFormats:t}){return l("model/gltf+json","gltf",t)}(t);let s=null;for(const i of t.queryFormats){if(i===e)return i;i===r&&(s=i)}return s}function h({supportedFormats:t}){return l("application/esri3do-SR_world","wld",t)}function v({supportedFormats:t}){return l("application/esri3do-SR_prj","prj",t)}function C(t){return[...s,...t]}function A(t,e){return C(e).find(e=>S(e)===t)}function I(t,e){const r=t.toLowerCase();return C(e).find(t=>P(t).some(t=>r.endsWith(t)))}function S(t){return t?.[0]}function w(t){return t?.[1].toLowerCase()}function P(t){return t?.[2].split(",").map(t=>t.toLowerCase())??[]}function E(t){return t.tables?.find(t=>"assetMaps"===t.role)}},6666(t,e,r){r.d(e,{S$:()=>h,dw:()=>Q});var s=r(4576),i=r(44208),o=r(50498),n=r(60694),u=r(20557);function a(t,e,r){return!!l(t,e,r)}function p(t,e,r){return l(t,e,r)}function l(t,e,r){return t&&t.hasOwnProperty(e)?t[e]:r}r(39516),r(30524),new WeakMap;const c={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},d=["cubic-bezier","circular-arc","elliptic-arc"];function y(t){const e=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function f(t,e){const r=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!r?.includes(e.toLowerCase())}function m(t){const e=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!e?.includes("count"),sum:!!e?.includes("sum"),min:!!e?.includes("min"),max:!!e?.includes("max"),avg:!!e?.includes("avg"),var:!!e?.includes("var"),stddev:!!e?.includes("stddev"),percentileContinuous:!!e?.includes("percentile_cont"),percentileDiscrete:!!e?.includes("percentile_disc"),envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function g(t){const e=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!e?.includes("field"),log:!!e?.includes("log"),naturalLog:!!e?.includes("naturallog"),percentOfTotal:!!e?.includes("percentoftotal"),squareRoot:!!e?.includes("squareroot")}}function h(t,e){return{analytics:v(t),attachment:C(t),data:A(t),metadata:I(t),operations:S(t.capabilities,t,e),query:w(t,e),queryAttributeBins:T(t),queryRelated:P(t),queryTopFeatures:E(t),editing:R(t)}}function v(t){return{supportsCacheHint:f(t.advancedQueryCapabilities,"queryAnalytics")}}function C(t){const e=t.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:f(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:a(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:a(t,"supportsAttachmentsResizing",!1),supportsTypeWildcard:a(t.advancedQueryCapabilities,"supportsQueryAttachmentWithTypeWildcard",!1),supportsCountOnly:a(t.advancedQueryCapabilities,"supportsQueryAttachmentsCountOnly",!1)};return e&&Array.isArray(e)&&e.forEach(t=>{const e=c[t.name];e&&(r[e]=!!t.isEnabled)}),r}function A(t){const e=a(t.advancedQueryCapabilities,"supportsTrueCurve",!1),r=t.infoFor3D,s=r?.supportedFormats??[];return{isVersioned:a(t,"isDataVersioned",!1),isBranchVersioned:a(t,"isDataBranchVersioned",!1),queryFormats:r?(0,u.rP)(r.queryFormats,s):void 0,sourceFormats:r?(0,u.rP)(r.editFormats,s):void 0,supportsAttachment:a(t,"hasAttachments",!1),supportsM:a(t,"hasM",!1),supportsTrueCurve:e,supportedCurveTypes:F(t,e),supportsZ:a(t,"hasZ",!1)}}function I(t){return{supportsAdvancedFieldProperties:a(t,"supportsFieldDescriptionProperty",!1)}}function S(t,e,r){const s=(0,n.Wo)(r),i=t?.toLowerCase().split(",").map(t=>t.trim())??[],o=r?(0,n.qg)(r):null,u=i.includes("MapServer"===o?.serverType?"data":"query"),p=i.includes("editing")&&!e.datesInUnknownTimezone&&!(!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let l=p&&i.includes("create"),c=p&&i.includes("delete"),d=p&&i.includes("update");const y=i.includes("changetracking"),f=e.advancedQueryCapabilities;let m=a(e,"supportsExceedsLimitStatistics",!1);return s||a(f,"supportsUseEstimateForExceedsLimit",!1)||(m=!1),p&&!(l||c||d)&&(l=c=d=!0),{supportsCalculate:a(e,"supportsCalculate",!1),supportsTruncate:a(e,"supportsTruncate",!1),supportsValidateSql:a(e,"supportsValidateSql",!1),supportsAdd:l,supportsDelete:c,supportsEditing:p,supportsChangeTracking:y,supportsQuery:u,supportsQueryAnalytics:a(f,"supportsQueryAnalytic",!1),supportsQueryAttachments:a(f,"supportsQueryAttachments",!1),supportsQueryBins:a(f,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryPivot:a(f,"supportsQueryPivot",!1),supportsQueryTopFeatures:a(f,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:a(e,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:m,supportsAsyncConvert3D:a(e,"supportsAsyncConvert3D",!1)}}function w(t,e){const r=t.advancedQueryCapabilities,s=t.ownershipBasedAccessControlForFeatures,o=t.archivingInfo,l=t.currentVersion,c=function(t,e){if(!t||!(0,i.A)("featurelayer-relative-time-queries-enabled"))return 0;const r=(0,n.uV)(t);return(0,n.Wo)(t)||r?(e??0)>0||r?(0,i.A)("featurelayer-relative-time-queries-bin-window-public")??1:(0,i.A)("featurelayer-relative-time-queries-bin-window-private")??60:0}(e,t.cacheMaxAge),d=e?.includes("MapServer"),m=!d||l>=(0,i.A)("mapserver-pbf-version-support"),g=(0,n.Wo)(e),h=new Set((t.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim())),v=m&&function(t){return!!(0,i.A)("featurelayer-pbf-true-curves")&&(t.supportedTrueCurvePbfFeatureEncodings??[]).includes("esriDefault")}(t);return{maxRecordCount:p(t,"maxRecordCount",void 0),maxRecordCountFactor:p(t,"maxRecordCountFactor",void 0),maxUniqueIDCount:p(t,"maxUniqueIDCount",void 0),relativeTimeBinWindow:c,standardMaxRecordCount:p(t,"standardMaxRecordCount",void 0),standardMaxRecordCountNoGeometry:p(t,"standardMaxRecordCountNoGeometry",void 0),supportedSpatialAggregationStatistics:y(r),supportsCacheHint:a(r,"supportsQueryWithCacheHint",!1)||f(r,"query"),supportsCentroid:a(r,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:g||null==e,supportsCompactGeometry:g,supportsCurrentUser:a(r,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:a(r,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:a(r,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:a(r,"supportsDisjointSpatialRel",!1),supportsDistance:a(r,"supportsQueryWithDistance",!1),supportsDistinct:a(r,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:a(r,"supportsReturningQueryExtent",!1),supportsFormatPBF:m&&h.has("pbf"),supportsFormatPBFWithCurves:v,supportsFullTextSearch:a(r,"supportsFullTextSearch",!1),supportsGeometryProperties:a(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:a(r,"supportsHavingClause",!1),supportsHistoricMoment:a(o,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:a(r,"supportsMaxRecordCountFactor",!1),supportsOrderBy:a(r,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:a(r,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:a(r,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:a(r,"supportsPercentileStatistics",!1),supportsQuantization:a(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:a(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:a(s,"allowAnonymousToQuery",!0),supportsQueryByOthers:a(s,"allowOthersToQuery",!0),supportsQueryGeometry:a(t,"supportsReturningQueryGeometry",!1),supportsResultType:a(r,"supportsQueryWithResultType",!1),supportsReturnMesh:!!(0,u.Hz)(t.infoFor3D),supportsSpatialAggregationStatistics:a(r,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:a(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:a(t,"useStandardizedQueries",!1),supportsStatistics:a(r,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:a(r,"supportsTopFeaturesQuery",!1),supportsTrueCurve:a(r,"supportsTrueCurve",!1),tileMaxRecordCount:p(t,"tileMaxRecordCount",void 0)}}function P(t){const e=t.advancedQueryCapabilities,r=a(e,"supportsAdvancedQueryRelated",!1);return{supportsPagination:a(e,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:f(e,"queryRelated")}}function E(t){return{supportsCacheHint:f(t.advancedQueryCapabilities,"queryTopFilter")}}function T(t){const e=t?t.queryBinsCapabilities:void 0;return{supportsDate:a(e,"supportsDateBin",!1),supportsFixedInterval:a(e,"supportsFixedIntervalBin",!1),supportsAutoInterval:a(e,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:a(e,"supportsFixedBoundariesBin",!1),supportsStackBy:a(e,"supportsStackBy",!1),supportsSplitBy:a(e,"supportsSplitBy",!1),supportsSnapToData:a(e,"supportsSnapToData",!1),supportsReturnFullIntervalBin:a(e,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:a(e,"supportsFirstDayOfWeek",!1),supportsNormalization:a(e,"supportsNormalization",!1),supportedStatistics:m(e),supportedNormalizationTypes:g(e)}}function R(t){const e=t.ownershipBasedAccessControlForFeatures,r=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:a(t,"allowGeometryUpdates",!0),supportsGlobalId:a(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:a(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:a(t,"supportsRollbackOnFailureParameter",!1),supportsTrueCurveUpdate:a(t,"allowTrueCurvesUpdates",!0),supportsTrueCurveUpdateByTrueCurveClientsOnly:a(t,"onlyAllowTrueCurveUpdatesByTrueCurveClients",!0),supportsUpdateWithoutM:a(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:a(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:a(e,"allowAnonymousToDelete",!0),supportsDeleteByOthers:a(e,"allowOthersToDelete",!0),supportsUpdateByAnonymous:a(e,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:a(e,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:a(r,"supportsAsyncApplyEdits",!1),zDefault:p(t,"zDefault",void 0)}}function F(t,e){const r=t.supportedCurveTypes??t.advancedQueryCapabilities?.supportedCurveTypes;return Array.isArray(r)?r.map(t=>o.iI.fromJSON(t)).filter(s.Ru):e?d:[]}function Q(t){return{operations:{supportsAppend:a(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:a(t,"supportsExportClip",!1),supportsExportFrameset:a(t,"supportsExportFrameset",!1),supportsMensuration:a(t,"supportsMensuration",!1),supportsPreviews:a(t,"supportsPreviews",!1),supportsUpdate:a(t,"supportsUpdate",!1)}}}},10407(t,e,r){r.d(e,{It:()=>y,LG:()=>n,OM:()=>p,Sm:()=>l,Y:()=>u,bK:()=>a,mm:()=>d,sQ:()=>c});var s=r(91218),i=r(16930),o=r(28735);function n(t,e){if(!u(t,e)){const r=t.typeKeywords;r?r.push(e):t.typeKeywords=[e]}}function u(t,e){return!!t.typeKeywords?.includes(e)}function a(t){return u(t,d.HOSTED_SERVICE)}function p(t,e){const r=t.typeKeywords;if(r){const t=r.indexOf(e);t>-1&&r.splice(t,1)}}function l(t,e,r){r?n(t,e):p(t,e)}async function c(t){const e=t.clone().normalize();let r;if(e.length>1)for(const t of e)r?t.width>r.width&&(r=t):r=t;else r=e[0];return async function(t){const e=t.spatialReference;if(e.isWGS84)return t.clone();if(e.isWebMercator)return(0,o.ci)(t);const r=i.A.WGS84;return await(0,s.initializeProjection)(e,r),(0,s.project)(t,r)}(r)}const d={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 y(t){const{portal:e,isOrgItem:r,itemControl:s}=t,i=e.user?.privileges;let o=!i||i.includes("features:user:edit"),n=!!r&&!!i?.includes("features:user:fullEdit");const u="update"===s||"admin"===s;return u?n=o=!0:n&&(o=!0),{features:{edit:o,fullEdit:n},content:{updateItem:u}}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4674],{18768(t,e,r){r.d(e,{b:()=>u});var s=r(5482),i=r(53966),o=r(91429),n=r(60694);const u=t=>{const e=t;let r=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=(0,n.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,n.Jf)(t,i.A.getLogger(this)))}};return(0,s.Cg)([(0,o.MZ)()],r.prototype,"title",null),(0,s.Cg)([(0,o.MZ)({type:String})],r.prototype,"url",null),r=(0,s.Cg)([(0,o.$K)("esri.layers.mixins.ArcGISService")],r),r}},69208(t,e,r){r.d(e,{d:()=>o});var s=r(5482),i=r(91429);const o=t=>{const e=t;let r=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s.Cg)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,s.Cg)([(0,i.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}},8303(t,e,r){r.d(e,{A:()=>I});var s=r(5482),i=r(92602),o=r(70333),n=r(11254),u=r(60999),a=r(49186),p=r(53966),l=r(97768),c=r(17676),d=r(84952),y=r(91429),f=r(77548),m=r(20655),g=r(80812),h=r(41318),v=r(10407),C=r(36005),A=r(43937);const I=t=>{const e=t;let I=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,l.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new g.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,c.zf)(t)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,c.QP)(t),!0)))}async setUserPrivileges(t,e){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!o.id?.findCredential(this.url),i=t===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let n,u;if(i)n=r.portal.url;else try{n=await(0,f.wI)(this.url,e)}catch(t){(0,c.QP)(t)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;u=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.QP)(t)}const a=!0,p=!1,l=!1;if(!u)return{features:{edit:a,fullEdit:p},content:{updateItem:l}};try{if(i?await r.reload():(r=new g.default({id:t,portal:{url:n}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,c.QP)(t)}return{features:{edit:a,fullEdit:p},content:{updateItem:l}}}_getUserPrivileges(t,e){const r=(0,v.It)(t);return e&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const r=S.credential===e?S.user:await this._fetchEditingUser(t);return S.credential=e,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=m.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(s))return i.user;const a=`${s}/community/self`,p=null!=t?t.signal:null,l=await(0,u.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:p}));return l.ok?h.A.fromJSON(l.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return r&&s&&!(0,d.ut)(s.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.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(t,{...e,layer:this})}};return(0,s.Cg)([(0,y.MZ)({type:g.default})],I.prototype,"portalItem",null),(0,s.Cg)([(0,C.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,s.Cg)([(0,A.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,s.Cg)([(0,y.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,s.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],I),I},S={credential:null,user:null}},20557(t,e,r){r.d(e,{Fm:()=>a,Hz:()=>g,JQ:()=>m,JZ:()=>E,ND:()=>v,R_:()=>n,U9:()=>f,_h:()=>A,be:()=>c,fE:()=>y,fu:()=>i,nr:()=>h,oF:()=>o,qv:()=>P,rP:()=>d,rq:()=>p,z$:()=>l});const s=[["binary","application/octet-stream","bin",""]];function i(t,e){return null!=I(e.name,t?.supportedFormats??[])}function o(t,e){if(!t)return!1;const r=p(e,t.supportedFormats??[]);return null!=r&&t.editFormats.includes(r)}function n(t,e){return S(function(t,e){const r=t.toLowerCase();return C(e).find(t=>w(t)===r)}(t,e))}function u(t,e){return S(I(t,e))}function a(t,e){return w(A(t,e))}function p(t,e){return u(t.name,e)??n(t.type,e)}function l(t,e,r){return n(t,r)??u(e,r)}function c(t,e){if(!t||!A(t,e))return;const r=/^3d_(.+)$/iu.exec(t)?.[1]?.toLowerCase();return r||void 0}function d(t,e){return(t??[]).map(t=>c(t,e)).filter(t=>!!t)}function y(t,e){return S(e.find(r=>c(S(r),e)===t))}function f({supportedFormats:t}){return l("model/gltf-binary","glb",t)}function m(t){const e=f(t);return null!=e&&t.editFormats.includes(e)}function g(t){if(!t)return null;const e=f(t),r=function({supportedFormats:t}){return l("model/gltf+json","gltf",t)}(t);let s=null;for(const i of t.queryFormats){if(i===e)return i;i===r&&(s=i)}return s}function h({supportedFormats:t}){return l("application/esri3do-SR_world","wld",t)}function v({supportedFormats:t}){return l("application/esri3do-SR_prj","prj",t)}function C(t){return[...s,...t]}function A(t,e){return C(e).find(e=>S(e)===t)}function I(t,e){const r=t.toLowerCase();return C(e).find(t=>P(t).some(t=>r.endsWith(t)))}function S(t){return t?.[0]}function w(t){return t?.[1].toLowerCase()}function P(t){return t?.[2].split(",").map(t=>t.toLowerCase())??[]}function E(t){return t.tables?.find(t=>"assetMaps"===t.role)}},6666(t,e,r){r.d(e,{S$:()=>h,dw:()=>Q});var s=r(4576),i=r(44208),o=r(50498),n=r(60694),u=r(20557);function a(t,e,r){return!!l(t,e,r)}function p(t,e,r){return l(t,e,r)}function l(t,e,r){return t&&t.hasOwnProperty(e)?t[e]:r}r(39516),r(30524),new WeakMap;const c={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},d=["cubic-bezier","circular-arc","elliptic-arc"];function y(t){const e=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function f(t,e){const r=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!r?.includes(e.toLowerCase())}function m(t){const e=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!e?.includes("count"),sum:!!e?.includes("sum"),min:!!e?.includes("min"),max:!!e?.includes("max"),avg:!!e?.includes("avg"),var:!!e?.includes("var"),stddev:!!e?.includes("stddev"),percentileContinuous:!!e?.includes("percentile_cont"),percentileDiscrete:!!e?.includes("percentile_disc"),envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function g(t){const e=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!e?.includes("field"),log:!!e?.includes("log"),naturalLog:!!e?.includes("naturallog"),percentOfTotal:!!e?.includes("percentoftotal"),squareRoot:!!e?.includes("squareroot")}}function h(t,e){return{analytics:v(t),attachment:C(t),data:A(t),metadata:I(t),operations:S(t.capabilities,t,e),query:w(t,e),queryAttributeBins:T(t),queryRelated:P(t),queryTopFeatures:E(t),editing:R(t)}}function v(t){return{supportsCacheHint:f(t.advancedQueryCapabilities,"queryAnalytics")}}function C(t){const e=t.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:f(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:a(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:a(t,"supportsAttachmentsResizing",!1),supportsTypeWildcard:a(t.advancedQueryCapabilities,"supportsQueryAttachmentWithTypeWildcard",!1),supportsCountOnly:a(t.advancedQueryCapabilities,"supportsQueryAttachmentsCountOnly",!1)};return e&&Array.isArray(e)&&e.forEach(t=>{const e=c[t.name];e&&(r[e]=!!t.isEnabled)}),r}function A(t){const e=a(t.advancedQueryCapabilities,"supportsTrueCurve",!1),r=t.infoFor3D,s=r?.supportedFormats??[];return{isVersioned:a(t,"isDataVersioned",!1),isBranchVersioned:a(t,"isDataBranchVersioned",!1),queryFormats:r?(0,u.rP)(r.queryFormats,s):void 0,sourceFormats:r?(0,u.rP)(r.editFormats,s):void 0,supportsAttachment:a(t,"hasAttachments",!1),supportsM:a(t,"hasM",!1),supportsTrueCurve:e,supportedCurveTypes:F(t,e),supportsZ:a(t,"hasZ",!1)}}function I(t){return{supportsAdvancedFieldProperties:a(t,"supportsFieldDescriptionProperty",!1)}}function S(t,e,r){const s=(0,n.Wo)(r),i=t?.toLowerCase().split(",").map(t=>t.trim())??[],o=r?(0,n.qg)(r):null,u=i.includes("MapServer"===o?.serverType?"data":"query"),p=i.includes("editing")&&!e.datesInUnknownTimezone&&!(null!=r&&!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let l=p&&i.includes("create"),c=p&&i.includes("delete"),d=p&&i.includes("update");const y=i.includes("changetracking"),f=e.advancedQueryCapabilities;let m=a(e,"supportsExceedsLimitStatistics",!1);return s||a(f,"supportsUseEstimateForExceedsLimit",!1)||(m=!1),p&&!(l||c||d)&&(l=c=d=!0),{supportsCalculate:a(e,"supportsCalculate",!1),supportsTruncate:a(e,"supportsTruncate",!1),supportsValidateSql:a(e,"supportsValidateSql",!1),supportsAdd:l,supportsDelete:c,supportsEditing:p,supportsChangeTracking:y,supportsQuery:u,supportsQueryAnalytics:a(f,"supportsQueryAnalytic",!1),supportsQueryAttachments:a(f,"supportsQueryAttachments",!1),supportsQueryBins:a(f,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryPivot:a(f,"supportsQueryPivot",!1),supportsQueryTopFeatures:a(f,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:a(e,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:m,supportsAsyncConvert3D:a(e,"supportsAsyncConvert3D",!1)}}function w(t,e){const r=t.advancedQueryCapabilities,s=t.ownershipBasedAccessControlForFeatures,o=t.archivingInfo,l=t.currentVersion,c=function(t,e){if(!t||!(0,i.A)("featurelayer-relative-time-queries-enabled"))return 0;const r=(0,n.uV)(t);return(0,n.Wo)(t)||r?(e??0)>0||r?(0,i.A)("featurelayer-relative-time-queries-bin-window-public")??1:(0,i.A)("featurelayer-relative-time-queries-bin-window-private")??60:0}(e,t.cacheMaxAge),d=e?.includes("MapServer"),m=!d||l>=(0,i.A)("mapserver-pbf-version-support"),g=(0,n.Wo)(e),h=new Set((t.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim())),v=m&&function(t){return!!(0,i.A)("featurelayer-pbf-true-curves")&&(t.supportedTrueCurvePbfFeatureEncodings??[]).includes("esriDefault")}(t);return{maxRecordCount:p(t,"maxRecordCount",void 0),maxRecordCountFactor:p(t,"maxRecordCountFactor",void 0),maxUniqueIDCount:p(t,"maxUniqueIDCount",void 0),relativeTimeBinWindow:c,standardMaxRecordCount:p(t,"standardMaxRecordCount",void 0),standardMaxRecordCountNoGeometry:p(t,"standardMaxRecordCountNoGeometry",void 0),supportedSpatialAggregationStatistics:y(r),supportsCacheHint:a(r,"supportsQueryWithCacheHint",!1)||f(r,"query"),supportsCentroid:a(r,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:g||null==e,supportsCompactGeometry:g,supportsCurrentUser:a(r,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:a(r,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:a(r,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:a(r,"supportsDisjointSpatialRel",!1),supportsDistance:a(r,"supportsQueryWithDistance",!1),supportsDistinct:a(r,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:a(r,"supportsReturningQueryExtent",!1),supportsFormatPBF:m&&h.has("pbf"),supportsFormatPBFWithCurves:v,supportsFullTextSearch:a(r,"supportsFullTextSearch",!1),supportsGeometryProperties:a(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:a(r,"supportsHavingClause",!1),supportsHistoricMoment:a(o,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:a(r,"supportsMaxRecordCountFactor",!1),supportsOrderBy:a(r,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:a(r,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:a(r,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:a(r,"supportsPercentileStatistics",!1),supportsQuantization:a(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:a(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:a(s,"allowAnonymousToQuery",!0),supportsQueryByOthers:a(s,"allowOthersToQuery",!0),supportsQueryGeometry:a(t,"supportsReturningQueryGeometry",!1),supportsResultType:a(r,"supportsQueryWithResultType",!1),supportsReturnMesh:!!(0,u.Hz)(t.infoFor3D),supportsSpatialAggregationStatistics:a(r,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:a(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:a(t,"useStandardizedQueries",!1),supportsStatistics:a(r,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:a(r,"supportsTopFeaturesQuery",!1),supportsTrueCurve:a(r,"supportsTrueCurve",!1),tileMaxRecordCount:p(t,"tileMaxRecordCount",void 0)}}function P(t){const e=t.advancedQueryCapabilities,r=a(e,"supportsAdvancedQueryRelated",!1);return{supportsPagination:a(e,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:f(e,"queryRelated")}}function E(t){return{supportsCacheHint:f(t.advancedQueryCapabilities,"queryTopFilter")}}function T(t){const e=t?t.queryBinsCapabilities:void 0;return{supportsDate:a(e,"supportsDateBin",!1),supportsFixedInterval:a(e,"supportsFixedIntervalBin",!1),supportsAutoInterval:a(e,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:a(e,"supportsFixedBoundariesBin",!1),supportsStackBy:a(e,"supportsStackBy",!1),supportsSplitBy:a(e,"supportsSplitBy",!1),supportsSnapToData:a(e,"supportsSnapToData",!1),supportsReturnFullIntervalBin:a(e,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:a(e,"supportsFirstDayOfWeek",!1),supportsNormalization:a(e,"supportsNormalization",!1),supportedStatistics:m(e),supportedNormalizationTypes:g(e)}}function R(t){const e=t.ownershipBasedAccessControlForFeatures,r=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:a(t,"allowGeometryUpdates",!0),supportsGlobalId:a(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:a(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:a(t,"supportsRollbackOnFailureParameter",!1),supportsTrueCurveUpdate:a(t,"allowTrueCurvesUpdates",!0),supportsTrueCurveUpdateByTrueCurveClientsOnly:a(t,"onlyAllowTrueCurveUpdatesByTrueCurveClients",!0),supportsUpdateWithoutM:a(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:a(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:a(e,"allowAnonymousToDelete",!0),supportsDeleteByOthers:a(e,"allowOthersToDelete",!0),supportsUpdateByAnonymous:a(e,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:a(e,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:a(r,"supportsAsyncApplyEdits",!1),zDefault:p(t,"zDefault",void 0)}}function F(t,e){const r=t.supportedCurveTypes??t.advancedQueryCapabilities?.supportedCurveTypes;return Array.isArray(r)?r.map(t=>o.iI.fromJSON(t)).filter(s.Ru):e?d:[]}function Q(t){return{operations:{supportsAppend:a(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:a(t,"supportsExportClip",!1),supportsExportFrameset:a(t,"supportsExportFrameset",!1),supportsMensuration:a(t,"supportsMensuration",!1),supportsPreviews:a(t,"supportsPreviews",!1),supportsUpdate:a(t,"supportsUpdate",!1)}}}},10407(t,e,r){r.d(e,{It:()=>y,LG:()=>n,OM:()=>p,Sm:()=>l,Y:()=>u,bK:()=>a,mm:()=>d,sQ:()=>c});var s=r(91218),i=r(16930),o=r(28735);function n(t,e){if(!u(t,e)){const r=t.typeKeywords;r?r.push(e):t.typeKeywords=[e]}}function u(t,e){return!!t.typeKeywords?.includes(e)}function a(t){return u(t,d.HOSTED_SERVICE)}function p(t,e){const r=t.typeKeywords;if(r){const t=r.indexOf(e);t>-1&&r.splice(t,1)}}function l(t,e,r){r?n(t,e):p(t,e)}async function c(t){const e=t.clone().normalize();let r;if(e.length>1)for(const t of e)r?t.width>r.width&&(r=t):r=t;else r=e[0];return async function(t){const e=t.spatialReference;if(e.isWGS84)return t.clone();if(e.isWebMercator)return(0,o.ci)(t);const r=i.A.WGS84;return await(0,s.initializeProjection)(e,r),(0,s.project)(t,r)}(r)}const d={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 y(t){const{portal:e,isOrgItem:r,itemControl:s}=t,i=e.user?.privileges;let o=!i||i.includes("features:user:edit"),n=!!r&&!!i?.includes("features:user:fullEdit");const u="update"===s||"admin"===s;return u?n=o=!0:n&&(o=!0),{features:{edit:o,fullEdit:n},content:{updateItem:u}}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3636],{69052(t,e,s){s.d(e,{hr:()=>n,ie:()=>u,uC:()=>o});var r=s(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,s=!1){return i(this.range,this.min,this.max,t,e,s)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,s){return t<e?e:e+a(this.range,t-e,s)}minimalMonotonic(t,e,s){return i(this.range,t,t+this.range,e,s)}center(t,e,s){return e=this.monotonic(t,e,s),this.normalize((t+e)/2,s)}diff(t,e,s){return this.monotonic(t,e,s)-t}shortestSignedDiff(t,e){t=this.normalize(t);const s=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(s)<Math.abs(r)?s:r}contains(t,e,s){return e=this.minimalMonotonic(t,e),(s=this.minimalMonotonic(t,s))>t&&s<e}}function i(t,e,s,r,n=0,i=!1){return(r-=n)<e?r+=a(t,e-r):r>s&&(r-=a(t,r-s)),i&&r===s&&(r=e),r+n}function a(t,e,s=0){return Math.ceil((e-s)/t)*t+s}const o=new n(0,2*Math.PI),u=(new n(-Math.PI,Math.PI),new n(0,360))},82534(t,e,s){function r(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}s.d(e,{o8:()=>n,vt:()=>r,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:n,create:r,fromValues:function(t,e,s,r){return[t,e,s,r]}},Symbol.toStringTag,{value:"Module"}))},67026(t,e,s){s.d(e,{A6:()=>y,Xd:()=>l,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>F,x8:()=>c});var r=s(29242),n=s(82534),i=s(51850),a=s(34304),o=s(35522),u=s(78955);function c(t,e,s){s*=.5;const r=Math.sin(s);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(s),t}function l(t,e){const s=2*Math.acos(e[3]),r=Math.sin(s/2);return r>(0,a.FD)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),s}function p(t,e,s){const r=e[0],n=e[1],i=e[2],a=e[3],o=s[0],u=s[1],c=s[2],l=s[3];return t[0]=r*l+a*o+n*c-i*u,t[1]=n*l+a*u+i*o-r*c,t[2]=i*l+a*c+r*u-n*o,t[3]=a*l-r*o-n*u-i*c,t}function h(t,e,s,r){const n=e[0],i=e[1],o=e[2],u=e[3];let c,l,p,h,d,f=s[0],y=s[1],m=s[2],g=s[3];return l=n*f+i*y+o*m+u*g,l<0&&(l=-l,f=-f,y=-y,m=-m,g=-g),1-l>(0,a.FD)()?(c=Math.acos(l),p=Math.sin(c),h=Math.sin((1-r)*c)/p,d=Math.sin(r*c)/p):(h=1-r,d=r),t[0]=h*n+d*f,t[1]=h*i+d*y,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function f(t,e){const s=e[0]+e[4]+e[8];let r;if(s>0)r=Math.sqrt(s+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);const n=(s+1)%3,i=(s+2)%3;r=Math.sqrt(e[3*s+s]-e[3*n+n]-e[3*i+i]+1),t[s]=.5*r,r=.5/r,t[3]=(e[3*n+i]-e[3*i+n])*r,t[n]=(e[3*n+s]+e[3*s+n])*r,t[i]=(e[3*i+s]+e[3*s+i])*r}return t}function y(t,e,s,r){const n=.5*Math.PI/180;e*=n,s*=n,r*=n;const i=Math.sin(e),a=Math.cos(e),o=Math.sin(s),u=Math.cos(s),c=Math.sin(r),l=Math.cos(r);return t[0]=i*u*l-a*o*c,t[1]=a*o*l+i*u*c,t[2]=a*u*c-i*o*l,t[3]=a*u*l+i*o*c,t}const m=u.C,g=u.hZ,S=u.WQ,v=p,b=u.hs,A=u.Om,x=u.Cc,_=u.Bw,M=_,w=u.m3,R=w,q=u.S8,F=u.t2,I=u.aI,E=(0,i.vt)(),C=(0,i.fA)(1,0,0),O=(0,i.fA)(0,1,0),P=(0,n.vt)(),T=(0,n.vt)(),N=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:S,calculateW:function(t,e){const s=e[0],r=e[1],n=e[2];return t[0]=s,t[1]=r,t[2]=n,t[3]=Math.sqrt(Math.abs(1-s*s-r*r-n*n)),t},conjugate:d,copy:m,dot:A,equals:I,exactEquals:F,fromEuler:y,fromMat3:f,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const s=e[0],r=e[1],n=e[2],i=e[3],a=s*s+r*r+n*n+i*i,o=a?1/a:0;return t[0]=-s*o,t[1]=-r*o,t[2]=-n*o,t[3]=i*o,t},len:M,length:_,lerp:x,mul:v,multiply:p,normalize:q,random:function(t){const e=a.Ov,s=e(),r=e(),n=e(),i=Math.sqrt(1-s),o=Math.sqrt(s);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u+a*o,t[1]=n*u+i*o,t[2]=i*u-n*o,t[3]=a*u-r*o,t},rotateY:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u-i*o,t[1]=n*u+a*o,t[2]=i*u+r*o,t[3]=a*u-n*o,t},rotateZ:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u+n*o,t[1]=n*u-r*o,t[2]=i*u+a*o,t[3]=a*u-i*o,t},rotationTo:function(t,e,s){const r=(0,o.Om)(e,s);return r<-.999999?((0,o.$A)(E,C,e),(0,o.Il)(E)<1e-6&&(0,o.$A)(E,O,e),(0,o.S8)(E,E),c(t,E,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(E,e,s),t[0]=E[0],t[1]=E[1],t[2]=E[2],t[3]=1+r,q(t,t))},scale:b,set:g,setAxes:function(t,e,s,r){const n=N;return n[0]=s[0],n[3]=s[1],n[6]=s[2],n[1]=r[0],n[4]=r[1],n[7]=r[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],q(t,f(t,n))},setAxisAngle:c,slerp:h,sqlerp:function(t,e,s,r,n,i){return h(P,e,n,i),h(T,s,r,i),h(t,P,T,2*i*(1-i)),t},sqrLen:R,squaredLength:w,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},56512(t,e,s){function r(t){let e,s,r=[],n=!1;return function(...i){return n&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let s=0;s<t.length;++s)if(t[s]!==e[s])return!1;return!0}(i,r)||(s=t.apply(this,i),e=this,r=i,n=!0),s}}s.d(e,{B:()=>r})},69397(t,e,s){s.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>d,i5:()=>h,lM:()=>i,qK:()=>l});var r=s(34275);const n=16;function i(t){if(!t)return 0;let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return c(t,8);let s=p;for(let r=0;r<e;r++)s+=o(t[r]);return s}(t);let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+h:Array.isArray(e)?c(e,n):0:0),0)}function c(t,e){return p+t.length*e}const l=32,p=16,h=145,d=64},95696(t,e,s){s.d(e,{A:()=>c});var r,n=s(5482),i=s(69540),a=s(25482),o=s(91429),u=s(93223);let c=class extends((0,i.OU)(a.o)){static{r=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=r=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},18251(t,e,s){s.r(e),s.d(e,{default:()=>c});var r=s(5482),n=s(69540),i=s(25482),a=s(91429),o=s(51850),u=s(93223);let c=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,r.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],c)},73836(t,e,s){s.d(e,{A:()=>d});var r=s(5482),n=s(69540),i=s(25482),a=s(91429),o=s(58083),u=s(9093),c=s(67026),l=s(82534),p=s(51850),h=s(24770);let d=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,c.x8)(f,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,f,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.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 f=(0,l.vt)()},24770(t,e,s){s.d(e,{$I:()=>g,AU:()=>f,Cr:()=>p,g7:()=>m,i4:()=>l,ui:()=>h,up:()=>v,vt:()=>c,yo:()=>y});var r=s(34727),n=s(58083),i=s(67026),a=s(82534),o=s(35522),u=s(51850);function c(t=v){return[t[0],t[1],t[2],t[3]]}function l(t,e,s=c()){return(0,o.C)(s,t),s[3]=e,s}function p(t,e,s){return(0,o.$A)(s,t,e),(0,o.S8)(s,s),s[3]=-(0,o.g7)(t,e),s}function h(t,e=c()){const s=(0,n.l)(b,t);return S(e,(0,r.KJ)((0,i.Xd)(e,s))),e}function d(t,e,s=c()){return(0,i.x8)(b,t,g(t)),(0,i.x8)(A,e,g(e)),(0,i.lw)(b,A,b),S(s,(0,r.KJ)((0,i.Xd)(s,b)))}function f(t,e,s,r=c()){return l(u.Cw,t,x),l(u.JP,e,_),l(u.Cb,s,M),d(x,_,x),d(x,M,r),r}function y(t){return t}function m(t){return t[3]}function g(t){return(0,r.kU)(t[3])}function S(t,e){return t[3]=e,t}const v=[0,0,1,0],b=(0,a.vt)(),A=(0,a.vt)(),x=(c(),c()),_=c(),M=c()},31411(t,e,s){s.d(e,{GS:()=>M,gh:()=>R});var r=s(49186),n=s(56512),i=s(65864),a=s(4305),o=s(50954),u=s(52006),c=s(49663),l=s(46068),p=s(15507);const h=1e-6,d=[0,0];function f(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class y{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:s,maxSegmentsPerCurve:r,minSegmentsPerCurve:n}){const i=s*s,a=e*e,o=1/r,u=this.interpolate(0),c=this.interpolate(1);(0,p.kb)(this.curveStart,u)>h&&t.push(u),this.initialize(u,c);const l=1/n;for(let t=n-1;t>0;t--){const e=t*l;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===i||!isFinite(i)||(0,p.kb)(this.arcStart,this.arcEnd)<i)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,p.kb)(this.curveEnd,c)>h&&t.push([...this.curveEnd]),t}}class m extends y{constructor(t,e){const[s,r,n]=e.b;super(t,s),this._controlPointsStack=[],this._curveControlPoints=[r,n],this._arcControlPoints=[r,n],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:s,tStart:r,tEnd:n}=this,[i,a]=this._arcControlPoints,o=(t-r)/(n-r),u=(0,p.RS)([],e,i,o),c=(0,p.RS)(d,i,a,o),l=(0,p.RS)([],a,s,o),h=(0,p.RS)([],u,c,o),f=(0,p.RS)([],c,l,o),y=(0,p.RS)([],h,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,l]),this.tEndStack.push(t),this.arcEndStack.push(y),this._arcControlPoints[0]=u,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:s}=this,[r,n]=this._curveControlPoints;return(0,a.B4)(e,r,n,s,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[s,r]=this._arcControlPoints;return Math.max((0,p.yE)(s,t,e),(0,p.yE)(r,t,e))}}class g extends y{constructor(t,e){const[s]=e.a;super(t,s),this._derivedEllipse=(0,l.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,l.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,p.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function S(t,e,s,{cx:r,cy:n,radius:i,thetaStart:a,thetaEnd:o,isInvalid:u},{maxDeviation:c,maxSegmentLength:l,maxSegmentsPerCurve:d,minSegmentsPerCurve:f}){if(u)return t.push([...s]),t;const y=2*i,m=[r+i*Math.cos(a),n+i*Math.sin(a)],g=[r+i*Math.cos(o),n+i*Math.sin(o)];(0,p.kb)(e,m)>h&&t.push(m);const S=Math.abs(o-a),v=l>0&&l<y?2*Math.asin(l/y):S,b=c>0&&c<=i?2*Math.acos(1-c/i):S,A=Math.min(v,b),x=Math.min(d,Math.max(f,Math.ceil(Math.abs(S/A)))),_=1/x;for(let e=1;e<x;e++){const s=e*_,u=a*(1-s)+o*s;t.push([r+i*Math.cos(u),n+i*Math.sin(u)])}return t.push(g),(0,p.kb)(s,g)>h&&t.push([...s]),t}function v(t,e,s,r){return new m(e,s).densify(t,r)}function b(t,e,s,r){const n=(0,o.pM)(e,s),[i]=s.c;return S(t,e,i,n,r)}function A(t,e,s,r){const n=(0,c.io)(e,s),[i]=s.a;return S(t,e,i,n,r)}function x(t,e,s,r){const[n,i,a,o,u,c,l]=s.a;return 0===c||0===l?(t.push([...n]),t):new g(e,s).densify(t,r)}function _(t,e,s,r){return(0,u.Xq)(s)?(t.push([...s]),t):(0,u.n1)(s)?v(t,e,s,r):(0,u.aO)(s)?b(t,e,s,r):(0,u.DA)(s)?A(t,e,s,r):x(t,e,s,r)}function M(t,e={}){if(!(0,u.Ed)(t))return t;const s=f(e),r=(0,u.FD)(t),n=[];for(const t of r){const e=[];for(let r=0;r<t.length-1;r++){const n=r+1,i=[...(0,u.yP)(t[r])];0===r&&e.push(i),_(e,i,t[n],s)}n.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:n,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:n,spatialReference:t.spatialReference}}const w=(0,n.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function R(t,e,n){const a=new Set(e);return await async function(t,e,n){let i=null;for(const a of t)if(a&&(0,u.Ed)(a)&&null==a.spatialReference.xyTolerance&&(0,u.V8)(a,e)){const t=a.spatialReference;if(!t)throw new r.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=q(t);if(n.has(e))a.spatialReference=n.get(e);else{i||(i=await Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(6312)]).then(s.bind(s,78125)));const o=i.fromSpatialReference(t),u=o?.getTolerance();if(null==u)throw new r.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=a.spatialReference.clone();c.read({xyTolerance:u}),a.spatialReference=c,n.set(e,c)}}}(t,a,n),t.map(t=>{if(!t||!(0,u.Ed)(t))return t;const s=t.spatialReference.xyTolerance;if(null==s)return t;const r=w(s);return(0,i.rS)(function(t,e,s){if(!(0,u.Ed)(t))return t;const r=new Set(e),n=f(s),i=(0,u.FD)(t),a=[];let o=!1;for(const t of i){const e=[];for(let s=0;s<t.length-1;s++){const i=s+1,a=[...(0,u.yP)(t[s])];0===s&&e.push(a);const c=t[i];(0,u.Xq)(c)?e.push([...c]):(0,u.n1)(c)&&!r.has("cubic-bezier")?v(e,a,c,n):(0,u.aO)(c)&&!r.has("circular-arc")?b(e,a,c,n):(0,u.DA)(c)&&!r.has("elliptic-arc")?A(e,a,c,n):(0,u.wY)(c)&&!r.has("elliptic-arc")?x(e,a,c,n):(e.push((0,u.tk)(c)),o=!0)}a.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...o?{curvePaths:a}:{paths:a}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...o?{curveRings:a}:{rings:a}}}(t,e,r))})}function q(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},63579(t,e,s){s.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>y,in:()=>f,yr:()=>c});var r=s(11254),n=s(4576),i=s(17676),a=s(20557);class o{constructor(t,e,s){this.assetName=t,this.assetMimeType=e,this.parts=s}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const s=await Promise.all(e.map(e=>e.toBlob(t)));return(0,i.Te)(t),new Blob(s)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(t),e}}function c(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const l=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:s}=t;return l.test(e)||p.test(s)}return l.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:s}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(s,e)}function f(t,e){if(t===e)return!0;const{source:s}=t,{source:r}=e;if(s===r)return!0;if("service"===s.type&&"service"===r.type){if(s.assets.length!==r.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...s.assets].sort(t),n=[...r.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function y(t,e){return t instanceof File?(0,a.rq)(t,e):(0,a.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},27615(t,e,s){s.d(e,{CK:()=>u,Hq:()=>o,MW:()=>c,TE:()=>l,yJ:()=>p});var r=s(35522),n=s(86738),i=s(95696),a=s(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function c(t,e){if(!o(t))return null;const[s,r,i]=t.origin;return new n.A({x:s,y:r,z:i,spatialReference:e})}function l(t,e){const{x:s,y:r,z:n,spatialReference:o}=t,u=[s,r,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new a.default({origin:u}):new i.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,r.t2)(t.origin,e.origin))}},17136(t,e,s){s.d(e,{Y_:()=>E,O7:()=>F,el:()=>q});var r=s(92602),n=s(69052),i=s(49186),a=s(53966),o=s(39829),u=s(82799),c=s(16930),l=s(80754),p=s(21325),h=s(28735),d=s(52006),f=s(31411),y=s(11254),m=s(60408),g=s(65864),S=s(2272),v=s(84952),b=s(92300);const A=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function x(t){return"polygon"===t[0].type}function _(t){return"polyline"===t[0].type}function M(t,e,s){const r=1e6;if(e){const e=(0,d.Ed)(t)?(0,f.GS)(t,{maxSegmentLength:r}):function(t,e){if(!(t instanceof u.A||t instanceof o.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw A().error(t),new i.A("internal:geometry",t)}const s=(0,l.r8)(t),r=[];for(const t of s){const s=[];r.push(s),s.push([t[0][0],t[0][1]]);for(let r=0;r<t.length-1;r++){const n=t[r][0],i=t[r][1],a=t[r+1][0],o=t[r+1][1],u=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),c=(o-i)/u,l=(a-n)/u,p=u/e;if(p>1){for(let t=1;t<=p-1;t++){const r=t*e,a=l*r+n,o=c*r+i;s.push([a,o])}const t=(u+Math.floor(p-1)*e)/2,r=l*t+n,a=c*t+i;s.push([r,a])}s.push([a,o])}}return function(t){return"polygon"===t.type}(t)?new o.A({rings:r,spatialReference:t.spatialReference}):new u.A({paths:r,spatialReference:t.spatialReference})}(t,r);t=(0,h.ci)(e,!0)}return s&&(t=(0,l.kS)(t,s)),t}function w(t,e,s){if(Array.isArray(t)){const r=t[0];if(r>e){const s=(0,l.kd)(r,e);t[0]=r+s*(-2*e)}else if(r<s){const e=(0,l.kd)(r,s);t[0]=r+e*(-2*s)}}else{const r=t.x;if(r>e){const s=(0,l.kd)(r,e);t=t.clone().offset(s*(-2*e),0)}else if(r<s){const e=(0,l.kd)(r,s);t=t.clone().offset(e*(-2*s),0)}}return t}function R(t,e){let s=-1;for(let r=0;r<e.cutIndexes.length;r++){const n=e.cutIndexes[r],i=e.geometries[r],a=(0,l.r8)(i);for(let t=0;t<a.length;t++){const e=a[t];e.some(s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const r=e[t][0];s=r>s?r:s}s=Number(s.toFixed(9));const r=-360*(0,l.kd)(s,180);for(let s=0;s<e.length;s++){const e=i.getPoint(t,s);i.setPoint(t,s,e.clone().offset(r,0))}return!0}})}if(n===s){if(x(t))for(const e of(0,l.r8)(i))t[n]=t[n].addRing(e);else if(_(t))for(const e of(0,l.r8)(i))t[n]=t[n].addPath(e)}else s=n,t[n]=i}return t}async function q(t,e,s){if(!Array.isArray(t))return q([t],e);e&&"string"!=typeof e&&A().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??r.A.geometryServiceUrl;let i,a,c,d,f,x,_,F,I=0;const E=[],C=[];for(const e of t)if(null!=e)if(i||(i=e.spatialReference,a=(0,p.Vp)(i),c=i.isWebMercator,x=c?102100:4326,d=l.j7[x].maxX,f=l.j7[x].minX,_=l.j7[x].plus180Line,F=l.j7[x].minus180Line),a)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(w(e.clone(),d,f));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>w(t,d,f)),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,a);C.push(t.rings?new o.A(t):t)}else if(e.extent){const t=e.extent,s=(0,l.kd)(t.xmin,f)*(2*d);let r=0===s?e.clone():(0,l.kS)(e.clone(),s);t.offset(s,0);let{xmin:n,xmax:i}=t;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),t.intersects(_)&&i!==d?(I=i>I?i:I,r=M(r,c),E.push(r),C.push("cut")):t.intersects(F)&&n!==f?(I=i*(2*d)>I?i*(2*d):I,r=M(r,c,360),E.push(r),C.push("cut")):C.push(r)}else C.push(e.clone());else C.push(e);else C.push(e);let O=(0,l.kd)(I,d),P=-90;const T=O,N=new u.A;for(;O>0;){const t=360*O-180;N.addPath([[t,P],[t,-1*P]]),P*=-1,O--}if(E.length>0&&T>0){const e=R(E,await async function(t,e,s,r){const n=(0,S.Dl)(t),i=e[0].spatialReference,a={...r,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,m.$B)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},o=await(0,y.A)(n.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map(t=>{const e=(0,g.rS)(t);return e.spatialReference=i,e})}}(n,E,N,s)),r=[],i=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)i.push(n);else{const n=e.shift(),a=t[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(r.push(n),i.push("simplify")):i.push(c?(0,h.Gh)(n):n)}}if(!r.length)return i;const a=await async function(t,e,s){const r="string"==typeof t?(0,v.An)(t):t,n=e[0].spatialReference,i=(0,m.$B)(e[0]),a={...s,query:{...r.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,b.X)(e))}},{data:o}=await(0,y.A)(r.path+"/simplify",a);return(0,b.V)(o.geometries,i,n)}(n,r,s),o=[];for(let t=0;t<i.length;t++){const e=i[t];"simplify"!==e?o.push(e):o.push(c?(0,h.Gh)(a.shift()):a.shift())}return o}const D=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)D.push(e);else{const t=E.shift();D.push(!0===c?(0,h.Gh)(t):t)}}return D}function F(t,e,s){const r=(0,p.Vp)(s);if(null==r)return t;const[n,i]=r.valid,a=2*i;let o=0,u=0;e>i?o=Math.ceil(Math.abs(e-i)/a):e<n&&(o=-Math.ceil(Math.abs(e-n)/a)),t>i?u=Math.ceil(Math.abs(t-i)/a):t<n&&(u=-Math.ceil(Math.abs(t-n)/a));let c=t+(o-u)*a;const l=c-e;return l>i?c-=a:l<n&&(c+=a),c}function I(t){const e=(0,p.Vp)(t);if(null==e)return null;const[s,r]=e.valid;return new n.hr(s,r)}const E=I(c.A.WGS84);I(c.A.WebMercator)},80754(t,e,s){s.d(e,{j7:()=>o,kS:()=>c,kd:()=>u,r8:()=>l});var r=s(82799),n=s(16930),i=s(60408),a=s(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function u(t,e){return Math.ceil((t-e)/(2*e))}function c(t,e){if((0,a.Ed)(t))for(const s of function(t){return(0,i.Bi)(t)?t.curveRings:t.curvePaths}(t))for(const t of s){if((0,a.aO)(t)){const[s,r]=t.c;s[0]+=e,r[0]+=e;continue}if((0,a.FG)(t)){const[s,r]=t.a;s[0]+=e,r[0]+=e;continue}if((0,a.n1)(t)){const[s,r,n]=t.b;s[0]+=e,r[0]+=e,n[0]+=e;continue}t[0]+=e}for(const s of l(t))for(const t of s)t[0]+=e;return t}function l(t){return(0,i.Bi)(t)?t.rings:t.paths}},99352(t,e,s){s.d(e,{F:()=>r,P:()=>n});const r={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},65515(t,e,s){s.r(e),s.d(e,{default:()=>Y});var r=s(5482),n=s(92602),i=s(11254),a=s(4576),o=s(49186),u=s(44208),c=s(66552),l=s(92474),p=s(53966),h=s(93637),d=s(17676),f=s(36708),y=s(84952),m=s(13069),g=s(91429),S=s(5443),v=s(16930),b=s(95696),A=s(27615),x=s(63579),_=s(52106),M=s(86211);function w(t){return"object"==typeof t&&null!=t&&"objectId"in t&&!!t.objectId}function R(t){return"object"==typeof t&&null!=t&&"globalId"in t&&!!t.globalId}function q(t){return t.every(R)}var F=s(91218),I=s(65864),E=s(73836),C=s(21325);async function O(t,e,s){const{geometry:r}=e,n={...e.attributes};if(null!=s&&"mesh"===r?.type){const{transformFieldRoles:e}=s,{origin:i,spatialReference:a,vertexSpace:o}=r,u=r.transform??new E.A,c="local"===o.type,l=t.spatialReference,p=l.isGeographic,h=(0,C.aI)(l,a),d=(0,F.isEqualBaseGCS)(a,l)&&(0,F.canProjectWithoutEngine)(a,l);if(!(c&&p&&d||!c&&!p&&h))return null;const f=(0,F.projectWithoutEngine)(i,a,l);if(null==f)return null;if(n[e.originX]=f.x,n[e.originY]=f.y,n[e.originZ]=f.z??0,null!=u){const{translation:t,scale:s,rotation:r}=u,i=c?1:(0,M.KX)(a)/(0,M.KX)(l);n[e.translationX]=t[0]*i,n[e.translationY]=t[2]*i,n[e.translationZ]=-t[1]*i,n[e.scaleX]=s[0],n[e.scaleY]=s[2],n[e.scaleZ]=s[1],n[e.rotationX]=r[0],n[e.rotationY]=r[2],n[e.rotationZ]=-r[1],n[e.rotationDeg]=r[3]}return{attributes:n}}return null==r?{attributes:n}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:n}}async function P(t,e){const s=await Promise.all((e.addAttachments??[]).map(e=>T(t,e))),r=await Promise.all((e.updateAttachments??[]).map(e=>T(t,e))),n=e.deleteAttachments??[];return s.length||r.length||n.length?{adds:s,updates:r,deletes:[...n]}:null}async function T(t,e){const{feature:s,attachment:r}=e,{globalId:n,name:i,contentType:a,data:o,uploadId:u}=r,c={globalId:n};if(s&&("attributes"in s?c.parentGlobalId=s.attributes?.[t.globalIdField]:s.globalId&&(c.parentGlobalId=s.globalId)),u)c.uploadId=u;else if(o){const t=await(0,y._0)(o);t&&(c.contentType=t.mediaType,c.data=t.data),o instanceof File&&(c.name=o.name)}return i&&(c.name=i),a&&(c.contentType=a),c}function N(t,e,s){if(!e||0===e.length)return[];if(s&&q(e))return e.map(t=>t.globalId);if(function(t){return t.every(w)}(e))return e.map(t=>t.objectId);const r=s?t.globalIdField:t.objectIdField;return r?e.map(t=>t.getAttribute(r)):[]}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function k(t,e){return new _.A({attributes:t.attributes,geometry:(0,I.rS)({...t.geometry,spatialReference:e})})}function Z(t,e){return{adds:t?.adds?.map(t=>k(t,e))||[],updates:t?.updates?.map(t=>({original:k(t[0],e),current:k(t[1],e)}))||[],deletes:t?.deletes?.map(t=>k(t,e))||[],spatialReference:e}}var Q=s(64714),j=s(64314),J=s(60694),V=s(15426),U=s(20557),G=s(99199),B=s(96520),X=s(61956),z=s(79677),L=s(20816);const $=new c.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new c.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends l.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,s=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(s),Promise.resolve(this)}initialize(){this.addHandles([(0,f.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:s,spatialReference:r,fieldsIndex:n,uniqueIdFields:i}=this.layer,a="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,c=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==a,l=c&&t?.query.supportsFormatPBFWithCurves,p=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,d=e.path;return new j.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:s,infoFor3D:a,pbfSupported:c,pbfSupportedWithCurves:l,queryAttachmentsSupported:p,relativeTimeBinWindow:h,sourceSpatialReference:r,uniqueIdFields:i,url:d})}async addAttachment(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r=t.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,a.query);try{return D((await(0,i.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(r,t)}}async updateAttachment(t,e,s){await this.load();const{layer:r}=this;await(0,V.VA)(r,"editing");const n=t.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(s,o.query);try{return D((await(0,i.A)(a,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r="infoFor3D"in s?s.infoFor3D:null,n=null!=r,u=n||(e?.globalIdUsed??!1),c=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,l=t.addFeatures?.map(t=>O(this.layer,t,r))??[],p=(await Promise.all(l)).filter(a.Ru),h=t.updateFeatures?.map(t=>O(this.layer,t,r))??[],d=(await Promise.all(h)).filter(a.Ru),f=N(this.layer,t.deleteFeatures,u);(0,B.u)(p,d,s.spatialReference);const y=await P(this.layer,t),m=s.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||s.gdbVersion,S={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);const v=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(s.url,g,s.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(S.edits=JSON.stringify([{id:s.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:f.length?f:null,attachments:y,assetMaps:c}]),S.returnServiceEditsOption=$.toJSON(e?.returnServiceEditsOption),S.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(S.adds=p.length?JSON.stringify(p):null,S.updates=d.length?JSON.stringify(d):null,S.deletes=f.length?u?JSON.stringify(f):f.join(","):null,S.attachments=y&&JSON.stringify(y),S.assetMaps=null!=c?JSON.stringify(c):void 0);const b=this._getLayerRequestOptions({method:"post",query:S});v&&(b.authMode="immediate",b.query.returnEditMoment=!0,b.query.sessionId=L.TA);const A=e?.returnServiceEditsOption?s.url:s.parsedUrl.path;let x;try{x=m?await this._asyncApplyEdits(A+"/applyEdits",b):await(0,i.A)(A+"/applyEdits",b)}catch(t){if(!function(t){const e=t.details.raw,s=+e.code,r=+e.extendedCode;return 500===s&&(-2147217144===r||-2147467261===r)}(t))throw t;b.authMode="immediate",x=m?await this._asyncApplyEdits(A+"/applyEdits",b):await(0,i.A)(A+"/applyEdits",b)}return this._createEditsResult(x)}async deleteAttachments(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r=t.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,i.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(r,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:s,url:r}=this.layer,{data:n}=await(0,i.A)(`${r}/${s}`,e),{id:a,extent:o,fullExtent:u,timeExtent:c}=n,l=o||u;return{id:a,fullExtent:l&&S.A.fromJSON(l),timeExtent:c&&z.A.fromJSON({start:c[0],end:c[1]})}})}async queryAttachments(t,e={}){await this.load();const s=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,s)}async queryFeatures(t,e){await this.load();const s=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&s.features.length){const e=new Map;if(s.features.forEach(s=>{const r=s.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const s=t.toLowerCase();s&&s in r&&t!==s&&(r[t]=r[s],delete r[s],e.set(s,t))}})}),null!=s.fields)for(const t of s.fields){const s=e.get(t.name.toLowerCase());null!=s&&(t.name=s)}}return s}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,J.Wo)(this.layer.url))return"unavailable";const t=(0,y.fj)(this.layer.url,"status"),e=await(0,i.A)(t,{query:{f:"json"}});return W.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:r}=await s.e(1384).then(s.bind(s,31384));return r(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const s=e.url;null!=s&&("layerId"in e&&(0,y.fj)(s,e.layerId.toString()),this._getOrCreateEditInterceptor(s).before=e=>{const s=e.requestOptions.method??"auto";if("auto"===s||"head"===s){const s=e.requestOptions.query??{};s._ts=t.getTime(),e.requestOptions.query=s}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,a.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const s=(await(0,i.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,i.A)(s,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,i.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(H)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const s={};(0,u.A)("featurelayer-advanced-symbols")&&(s.returnAdvancedSymbols=!0),e?.cacheBust&&(s._ts=Date.now());const{data:r}=await(0,i.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:s,signal:e?.signal}));t=r}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const s=t.type;if(!this.supportedSourceTypes.has(s))throw new o.A("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,Q.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:s}=await(0,i.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));s.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:s.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const r=t.addFeatures.filter(t=>t.geometry);if(e.length!==r.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,i=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:r}=e;if((0,A.Hq)(r))n.push(e);else{const r=e.origin,{convertMeshVertexSpace:a}=await Promise.all([s.e(6860),s.e(4496)]).then(s.bind(s,28846)),o=await a(e,new b.A({origin:[r.x,r.y,r.z??0]}));i.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of i)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,s=this.layer.globalIdField,r=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:i}=t,a=i.getExternalSourcesOnService(r),o=n.getAttribute(s);if(0===a.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=a.find(x.dK)??a[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:s}=this.layer,r=[];let n=null;if(Array.isArray(e))for(const t of e)r.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===s&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const i=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const s=t?.attachments,r={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:s?.addResults?s.addResults.map(D):[],updateAttachmentResults:s?.updateResults?s.updateResults.map(D):[],deleteAttachmentResults:s?.deleteResults?s.deleteResults.map(D):[]};return t?.editMoment&&(r.editMoment=t.editMoment),r}(n);if(r.length>0){i.editedFeatureResults=[];for(const t of r){const{editedFeatures:e}=t,s=e?.spatialReference?new v.A(e.spatialReference):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:Z(e,s)})}}return i}_createAttachmentErrorResult(t,e){const s=e.details.messages?.[0]||e.message,r=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",s,{code:r})}}_getFormDataForAttachment(t,e){const s=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(s)for(const t in e){const r=e[t];null!=r&&(s.set?s.set(t,r):s.append(t,r))}return s}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:s,gdbVersion:r}}=this;return{...t,query:{gdbVersion:r,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...s.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:s,parsedUrl:r}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==s)return!1;const i=(0,U.JZ)(n);if(null==i)return!1;const o=(0,y.fj)(r.path,`../${i.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(r).length>0))return!1;u.push(e)}const c=u.map(t=>t.getAttribute(s)).filter(a.Ru);if(0===c.length)return!1;const{assetMapFieldRoles:{parentGlobalId:l,assetHash:p}}=n,h=new X.A({where:`${l} IN (${c.map(t=>`'${t}'`)})`,outFields:[p,l],returnGeometry:!1}),d=await(0,G.s)(o,h),{features:f}=d;return 0!==f.length&&!u.some(t=>{const e=t.getAttribute(s);if(!e)return!0;const{metadata:n}=t.geometry,i=f.filter(t=>t.getAttribute(l)===e);if(0===i.length)return!0;const a=i.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(r).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>a.every(e=>t!==e))})}};(0,r.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,r.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,r.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,r.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,r.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(t,e,s){s.d(e,{A:()=>w});var r=s(5482),n=s(69622),i=s(49186),a=s(44208),o=s(17676),u=s(84952),c=s(91429),l=s(21325),p=s(20557),h=s(2272),d=s(65615),f=s(20615),y=s(74910),m=s(78286),g=s(99199),S=s(62815),v=s(63746);class b{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=b._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t)}feature(){this._attributesClass??=(0,v._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,s){this._previousX=this._previousY=0,this._lengths=s;let r,{hasZ:n,hasM:i}=this.featureSet;switch(n??=!1,i??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),i&&this._vertex.push(0),this._finishVertex=b._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},r=this._point,this._finishVertex=n?i?b._finishVertexPointXYZM:b._finishVertexPointXYZ:i?b._finishVertexPointXYM:b._finishVertexPointXY;break;case"esriGeometryMultipoint":r={points:[],hasZ:n,hasM:i},this._part=r.points,this._parts=[];break;case"esriGeometryPolyline":r={paths:[],hasZ:n,hasM:i},this._parts=r.paths,this._part=[];break;case"esriGeometryPolygon":r={rings:[],hasZ:n,hasM:i},this._parts=r.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=r,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=r}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,s,r){let n,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:i,hasM:a},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:i,hasM:a},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,s,r){this._part.push({b:[this._transform(e),this._transformXY(s),this._transformXY(r)]})}circularArcSegment(t,e,s){this._part.push({c:[this._transform(e),this._transformXY(s)]})}ellipticArcSegment(t,e,s,r,n,i,a,o){this._part.push({a:[this._transform(e),this._transformXY(s),r,n,i,a,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:s,_lengths:r,_vertex:n}=t;e.push([...n]),e.length<r[s.length]||(t._previousX=t._previousY=0,t._part=[],s.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:s,transform:r}=this.featureSet,n=s?(0,S.d)(t,e):1;this._transformInPlace??=(0,v.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,v.Mv)({transform:r})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var A=s(80893),x=s(22671),_=s(61956);async function M(t,e,s,r){const n=(0,h.Dl)(t),i={...s},a=_.A.from(e),o=!a.quantizationParameters;return await(0,A.IJ)(n,a,new b({sourceSpatialReference:a.sourceSpatialReference,applyTransform:o}),i,r)}let w=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const s=await this.executeJSON(t,e);return this.featureSetFromJSON(t,s,e)}async executeJSON(t,e){const s=this._normalizeQuery(t),r=null!=t.outStatistics?.[0],n=(0,a.A)("featurelayer-pbf-statistics");let i;if(this.pbfSupported&&(!r||n)&&(!t.returnTrueCurves||this.pbfSupportedWithCurves))try{i=await M(this.url,s,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return i??=await(0,g.e)(this.url,s,e,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,r){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return x.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([s.e(6860),s.e(7005),s.e(6754),s.e(4934),s.e(7634),s.e(8883)]).then(s.bind(s,40050)),r);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,f.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,y.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:r},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(s.bind(s,26591)),s.e(1763).then(s.bind(s,71763))]),e);let i=r.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeRelationshipQueryForCount(t,e){const[{default:r},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(s.bind(s,26591)),s.e(1763).then(s.bind(s,71763))]),e);let i=r.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:r,fetchAttachments:n,processAttachmentQueryResult:i}=await(0,o.qr)(s.e(9239).then(s.bind(s,9239)),e),a=(0,h.Dl)(this.url);return i(a,await(this.queryAttachmentsSupported?r(a,t,e):n(a,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:r}=await(0,o.qr)(s.e(3103).then(s.bind(s,33103)),e);return r(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:r}=await(0,o.qr)(s.e(566).then(s.bind(s,80566)),e);return r(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:r}=await(0,o.qr)(s.e(1273).then(s.bind(s,11273)),e);return r(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:r}=await(0,o.qr)(s.e(1277).then(s.bind(s,21277)),e);return r(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:r}=await(0,o.qr)(s.e(8018).then(s.bind(s,8018)),e);return r(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:r}=await(0,o.qr)(s.e(980).then(s.bind(s,10980)),e);return r(this.parsedUrl,t,e)}_normalizeQuery(t){let e=_.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:s}=this,r=this._queryGet3DObjectFormat(t);if(null!=s&&r){if(e=e===t?e.clone():e,e.formatOf3DObjects=r,e.outSpatialReference&&!(0,l.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new i.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:r,originY:n,originZ:i,translationX:a,translationY:o,translationZ:u,scaleX:c,scaleY:l,scaleZ:p,rotationX:h,rotationY:d,rotationZ:f,rotationDeg:y}=s.transformFieldRoles;e.outFields.push(r,n,i,a,o,u,c,l,p,h,d,f,y)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:s}){return!0!==t||"xyFootprint"===e||s?null:(0,p.Hz)(this.infoFor3D)}};(0,r.Cg)([(0,c.MZ)({type:d.A})],w.prototype,"dynamicDataSource",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"gdbVersion",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"infoFor3D",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,r.Cg)([(0,c.MZ)()],w.prototype,"pbfSupported",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"pbfSupportedWithCurves",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"queryAttachmentsSupported",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"relativeTimeBinWindow",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"sourceSpatialReference",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"uniqueIdFields",void 0),(0,r.Cg)([(0,c.MZ)({type:String})],w.prototype,"url",void 0),w=(0,r.Cg)([(0,c.$K)("esri.layers.graphics.sources.support.QueryTask")],w)},64714(t,e,s){s.d(e,{F0:()=>o,Vx:()=>l,e2:()=>h,f:()=>d});var r=s(44208),n=s(4718),i=s(99352),a=s(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let c=1;function l(t,e){if((0,r.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let s=`this${p(e)} = null;`;for(const e in t)s+=`this${p(e)} = ${JSON.stringify(t[e])};`;const r=new Function(`\n return class AttributesClass$${c++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new r}catch(s){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},92300(t,e,s){s.d(e,{V:()=>a,X:()=>i});var r=s(60408),n=s(65864);function i(t){return{geometryType:(0,r.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function a(t,e,s){const r=(0,n.xD)(e);return t.map(t=>{const e=r.fromJSON(t);return e.spatialReference=s,e})}},20615(t,e,s){s.d(e,{I:()=>a});var r=s(2272),n=s(80893),i=s(61956);function a(t,e,s,a){return(0,n.gW)((0,r.Dl)(t),i.A.from(e),s,a)}},74910(t,e,s){s.d(e,{L:()=>o});var r=s(5443),n=s(2272),i=s(80893),a=s(61956);async function o(t,e,s){const o=(0,n.Dl)(t),u=await(0,i.Jf)(o,a.A.from(e),{...s}),c=u.extent;return!c||isNaN(c.xmin)||isNaN(c.ymin)||isNaN(c.xmax)||isNaN(c.ymax)?{count:u.count,extent:null}:{count:u.count,extent:r.A.fromJSON(c)}}},78286(t,e,s){s.d(e,{V:()=>a});var r=s(2272),n=s(80893),i=s(61956);async function a(t,e,s,a){const o=(0,r.Dl)(t),u=await(0,n.Pk)(o,i.A.from(e),s,a);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},99199(t,e,s){s.d(e,{e:()=>u,s:()=>o});var r=s(2272),n=s(80893),i=s(22671),a=s(61956);async function o(t,e,s,r){const n=await u(t,e,s,r);return i.A.fromJSON(n)}function u(t,e,s,i){const o=(0,r.Dl)(t),u={...s},c=a.A.from(e);return(0,n.eW)(o,c,c.sourceSpatialReference,u,i)}},63746(t,e,s){function r(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:s,hasZ:r,hasM:n}=t;if(null==s)return r&&1!==e?t=>{t[2]*=e}:null;const[i,a]=function(t,e,s,r){let{scale:n,translate:i,originPosition:a}=t;return"upperLeft"===a&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*r:t),i=i.map((t,e)=>2===e?t*r:t)),!e&&s&&(n=n.filter((t,e)=>2!==e),i=i.filter((t,e)=>2!==e)),[n,i]}(s,r,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*i[e]+a[e]}}s.d(e,{Mv:()=>n,_7:()=>r}),s(53966)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3636],{69052(t,e,s){s.d(e,{hr:()=>n,ie:()=>u,uC:()=>o});var r=s(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,s=!1){return i(this.range,this.min,this.max,t,e,s)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,s){return t<e?e:e+a(this.range,t-e,s)}minimalMonotonic(t,e,s){return i(this.range,t,t+this.range,e,s)}center(t,e,s){return e=this.monotonic(t,e,s),this.normalize((t+e)/2,s)}diff(t,e,s){return this.monotonic(t,e,s)-t}shortestSignedDiff(t,e){t=this.normalize(t);const s=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(s)<Math.abs(r)?s:r}contains(t,e,s){return e=this.minimalMonotonic(t,e),(s=this.minimalMonotonic(t,s))>t&&s<e}}function i(t,e,s,r,n=0,i=!1){return(r-=n)<e?r+=a(t,e-r):r>s&&(r-=a(t,r-s)),i&&r===s&&(r=e),r+n}function a(t,e,s=0){return Math.ceil((e-s)/t)*t+s}const o=new n(0,2*Math.PI),u=(new n(-Math.PI,Math.PI),new n(0,360))},82534(t,e,s){function r(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}s.d(e,{o8:()=>n,vt:()=>r,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:n,create:r,fromValues:function(t,e,s,r){return[t,e,s,r]}},Symbol.toStringTag,{value:"Module"}))},67026(t,e,s){s.d(e,{A6:()=>y,Xd:()=>l,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>F,x8:()=>c});var r=s(29242),n=s(82534),i=s(51850),a=s(34304),o=s(35522),u=s(78955);function c(t,e,s){s*=.5;const r=Math.sin(s);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(s),t}function l(t,e){const s=2*Math.acos(e[3]),r=Math.sin(s/2);return r>(0,a.FD)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),s}function p(t,e,s){const r=e[0],n=e[1],i=e[2],a=e[3],o=s[0],u=s[1],c=s[2],l=s[3];return t[0]=r*l+a*o+n*c-i*u,t[1]=n*l+a*u+i*o-r*c,t[2]=i*l+a*c+r*u-n*o,t[3]=a*l-r*o-n*u-i*c,t}function h(t,e,s,r){const n=e[0],i=e[1],o=e[2],u=e[3];let c,l,p,h,d,f=s[0],y=s[1],m=s[2],g=s[3];return l=n*f+i*y+o*m+u*g,l<0&&(l=-l,f=-f,y=-y,m=-m,g=-g),1-l>(0,a.FD)()?(c=Math.acos(l),p=Math.sin(c),h=Math.sin((1-r)*c)/p,d=Math.sin(r*c)/p):(h=1-r,d=r),t[0]=h*n+d*f,t[1]=h*i+d*y,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function f(t,e){const s=e[0]+e[4]+e[8];let r;if(s>0)r=Math.sqrt(s+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);const n=(s+1)%3,i=(s+2)%3;r=Math.sqrt(e[3*s+s]-e[3*n+n]-e[3*i+i]+1),t[s]=.5*r,r=.5/r,t[3]=(e[3*n+i]-e[3*i+n])*r,t[n]=(e[3*n+s]+e[3*s+n])*r,t[i]=(e[3*i+s]+e[3*s+i])*r}return t}function y(t,e,s,r){const n=.5*Math.PI/180;e*=n,s*=n,r*=n;const i=Math.sin(e),a=Math.cos(e),o=Math.sin(s),u=Math.cos(s),c=Math.sin(r),l=Math.cos(r);return t[0]=i*u*l-a*o*c,t[1]=a*o*l+i*u*c,t[2]=a*u*c-i*o*l,t[3]=a*u*l+i*o*c,t}const m=u.C,g=u.hZ,S=u.WQ,v=p,b=u.hs,A=u.Om,x=u.Cc,_=u.Bw,M=_,w=u.m3,R=w,q=u.S8,F=u.t2,I=u.aI,E=(0,i.vt)(),C=(0,i.fA)(1,0,0),O=(0,i.fA)(0,1,0),P=(0,n.vt)(),T=(0,n.vt)(),N=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:S,calculateW:function(t,e){const s=e[0],r=e[1],n=e[2];return t[0]=s,t[1]=r,t[2]=n,t[3]=Math.sqrt(Math.abs(1-s*s-r*r-n*n)),t},conjugate:d,copy:m,dot:A,equals:I,exactEquals:F,fromEuler:y,fromMat3:f,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const s=e[0],r=e[1],n=e[2],i=e[3],a=s*s+r*r+n*n+i*i,o=a?1/a:0;return t[0]=-s*o,t[1]=-r*o,t[2]=-n*o,t[3]=i*o,t},len:M,length:_,lerp:x,mul:v,multiply:p,normalize:q,random:function(t){const e=a.Ov,s=e(),r=e(),n=e(),i=Math.sqrt(1-s),o=Math.sqrt(s);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u+a*o,t[1]=n*u+i*o,t[2]=i*u-n*o,t[3]=a*u-r*o,t},rotateY:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u-i*o,t[1]=n*u+a*o,t[2]=i*u+r*o,t[3]=a*u-n*o,t},rotateZ:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u+n*o,t[1]=n*u-r*o,t[2]=i*u+a*o,t[3]=a*u-i*o,t},rotationTo:function(t,e,s){const r=(0,o.Om)(e,s);return r<-.999999?((0,o.$A)(E,C,e),(0,o.Il)(E)<1e-6&&(0,o.$A)(E,O,e),(0,o.S8)(E,E),c(t,E,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(E,e,s),t[0]=E[0],t[1]=E[1],t[2]=E[2],t[3]=1+r,q(t,t))},scale:b,set:g,setAxes:function(t,e,s,r){const n=N;return n[0]=s[0],n[3]=s[1],n[6]=s[2],n[1]=r[0],n[4]=r[1],n[7]=r[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],q(t,f(t,n))},setAxisAngle:c,slerp:h,sqlerp:function(t,e,s,r,n,i){return h(P,e,n,i),h(T,s,r,i),h(t,P,T,2*i*(1-i)),t},sqrLen:R,squaredLength:w,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},56512(t,e,s){function r(t){let e,s,r=[],n=!1;return function(...i){return n&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let s=0;s<t.length;++s)if(t[s]!==e[s])return!1;return!0}(i,r)||(s=t.apply(this,i),e=this,r=i,n=!0),s}}s.d(e,{B:()=>r})},69397(t,e,s){s.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>d,i5:()=>h,lM:()=>i,qK:()=>l});var r=s(34275);const n=16;function i(t){if(!t)return 0;let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return c(t,8);let s=p;for(let r=0;r<e;r++)s+=o(t[r]);return s}(t);let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+h:Array.isArray(e)?c(e,n):0:0),0)}function c(t,e){return p+t.length*e}const l=32,p=16,h=145,d=64},95696(t,e,s){s.d(e,{A:()=>c});var r,n=s(5482),i=s(69540),a=s(25482),o=s(91429),u=s(93223);let c=class extends((0,i.OU)(a.o)){static{r=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=r=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},18251(t,e,s){s.r(e),s.d(e,{default:()=>c});var r=s(5482),n=s(69540),i=s(25482),a=s(91429),o=s(51850),u=s(93223);let c=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,r.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],c)},73836(t,e,s){s.d(e,{A:()=>d});var r=s(5482),n=s(69540),i=s(25482),a=s(91429),o=s(58083),u=s(9093),c=s(67026),l=s(82534),p=s(51850),h=s(24770);let d=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,c.x8)(f,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,f,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.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 f=(0,l.vt)()},24770(t,e,s){s.d(e,{$I:()=>g,AU:()=>f,Cr:()=>p,g7:()=>m,i4:()=>l,ui:()=>h,up:()=>v,vt:()=>c,yo:()=>y});var r=s(34727),n=s(58083),i=s(67026),a=s(82534),o=s(35522),u=s(51850);function c(t=v){return[t[0],t[1],t[2],t[3]]}function l(t,e,s=c()){return(0,o.C)(s,t),s[3]=e,s}function p(t,e,s){return(0,o.$A)(s,t,e),(0,o.S8)(s,s),s[3]=-(0,o.g7)(t,e),s}function h(t,e=c()){const s=(0,n.l)(b,t);return S(e,(0,r.KJ)((0,i.Xd)(e,s))),e}function d(t,e,s=c()){return(0,i.x8)(b,t,g(t)),(0,i.x8)(A,e,g(e)),(0,i.lw)(b,A,b),S(s,(0,r.KJ)((0,i.Xd)(s,b)))}function f(t,e,s,r=c()){return l(u.Cw,t,x),l(u.JP,e,_),l(u.Cb,s,M),d(x,_,x),d(x,M,r),r}function y(t){return t}function m(t){return t[3]}function g(t){return(0,r.kU)(t[3])}function S(t,e){return t[3]=e,t}const v=[0,0,1,0],b=(0,a.vt)(),A=(0,a.vt)(),x=(c(),c()),_=c(),M=c()},31411(t,e,s){s.d(e,{GS:()=>M,gh:()=>R});var r=s(49186),n=s(56512),i=s(65864),a=s(4305),o=s(50954),u=s(52006),c=s(49663),l=s(46068),p=s(15507);const h=1e-6,d=[0,0];function f(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class y{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:s,maxSegmentsPerCurve:r,minSegmentsPerCurve:n}){const i=s*s,a=e*e,o=1/r,u=this.interpolate(0),c=this.interpolate(1);(0,p.kb)(this.curveStart,u)>h&&t.push(u),this.initialize(u,c);const l=1/n;for(let t=n-1;t>0;t--){const e=t*l;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===i||!isFinite(i)||(0,p.kb)(this.arcStart,this.arcEnd)<i)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,p.kb)(this.curveEnd,c)>h&&t.push([...this.curveEnd]),t}}class m extends y{constructor(t,e){const[s,r,n]=e.b;super(t,s),this._controlPointsStack=[],this._curveControlPoints=[r,n],this._arcControlPoints=[r,n],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:s,tStart:r,tEnd:n}=this,[i,a]=this._arcControlPoints,o=(t-r)/(n-r),u=(0,p.RS)([],e,i,o),c=(0,p.RS)(d,i,a,o),l=(0,p.RS)([],a,s,o),h=(0,p.RS)([],u,c,o),f=(0,p.RS)([],c,l,o),y=(0,p.RS)([],h,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,l]),this.tEndStack.push(t),this.arcEndStack.push(y),this._arcControlPoints[0]=u,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:s}=this,[r,n]=this._curveControlPoints;return(0,a.B4)(e,r,n,s,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[s,r]=this._arcControlPoints;return Math.max((0,p.yE)(s,t,e),(0,p.yE)(r,t,e))}}class g extends y{constructor(t,e){const[s]=e.a;super(t,s),this._derivedEllipse=(0,l.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,l.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,p.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function S(t,e,s,{cx:r,cy:n,radius:i,thetaStart:a,thetaEnd:o,isInvalid:u},{maxDeviation:c,maxSegmentLength:l,maxSegmentsPerCurve:d,minSegmentsPerCurve:f}){if(u)return t.push([...s]),t;const y=2*i,m=[r+i*Math.cos(a),n+i*Math.sin(a)],g=[r+i*Math.cos(o),n+i*Math.sin(o)];(0,p.kb)(e,m)>h&&t.push(m);const S=Math.abs(o-a),v=l>0&&l<y?2*Math.asin(l/y):S,b=c>0&&c<=i?2*Math.acos(1-c/i):S,A=Math.min(v,b),x=Math.min(d,Math.max(f,Math.ceil(Math.abs(S/A)))),_=1/x;for(let e=1;e<x;e++){const s=e*_,u=a*(1-s)+o*s;t.push([r+i*Math.cos(u),n+i*Math.sin(u)])}return t.push(g),(0,p.kb)(s,g)>h&&t.push([...s]),t}function v(t,e,s,r){return new m(e,s).densify(t,r)}function b(t,e,s,r){const n=(0,o.pM)(e,s),[i]=s.c;return S(t,e,i,n,r)}function A(t,e,s,r){const n=(0,c.io)(e,s),[i]=s.a;return S(t,e,i,n,r)}function x(t,e,s,r){const[n,i,a,o,u,c,l]=s.a;return 0===c||0===l?(t.push([...n]),t):new g(e,s).densify(t,r)}function _(t,e,s,r){return(0,u.Xq)(s)?(t.push([...s]),t):(0,u.n1)(s)?v(t,e,s,r):(0,u.aO)(s)?b(t,e,s,r):(0,u.DA)(s)?A(t,e,s,r):x(t,e,s,r)}function M(t,e={}){if(!(0,u.Ed)(t))return t;const s=f(e),r=(0,u.FD)(t),n=[];for(const t of r){const e=[];for(let r=0;r<t.length-1;r++){const n=r+1,i=[...(0,u.yP)(t[r])];0===r&&e.push(i),_(e,i,t[n],s)}n.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:n,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:n,spatialReference:t.spatialReference}}const w=(0,n.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function R(t,e,n){const a=new Set(e);return await async function(t,e,n){let i=null;for(const a of t)if(a&&(0,u.Ed)(a)&&null==a.spatialReference.xyTolerance&&(0,u.V8)(a,e)){const t=a.spatialReference;if(!t)throw new r.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=q(t);if(n.has(e))a.spatialReference=n.get(e);else{i||(i=await Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(6312)]).then(s.bind(s,78125)));const o=i.fromSpatialReference(t),u=o?.getTolerance();if(null==u)throw new r.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=a.spatialReference.clone();c.read({xyTolerance:u}),a.spatialReference=c,n.set(e,c)}}}(t,a,n),t.map(t=>{if(!t||!(0,u.Ed)(t))return t;const s=t.spatialReference.xyTolerance;if(null==s)return t;const r=w(s);return(0,i.rS)(function(t,e,s){if(!(0,u.Ed)(t))return t;const r=new Set(e),n=f(s),i=(0,u.FD)(t),a=[];let o=!1;for(const t of i){const e=[];for(let s=0;s<t.length-1;s++){const i=s+1,a=[...(0,u.yP)(t[s])];0===s&&e.push(a);const c=t[i];(0,u.Xq)(c)?e.push([...c]):(0,u.n1)(c)&&!r.has("cubic-bezier")?v(e,a,c,n):(0,u.aO)(c)&&!r.has("circular-arc")?b(e,a,c,n):(0,u.DA)(c)&&!r.has("elliptic-arc")?A(e,a,c,n):(0,u.wY)(c)&&!r.has("elliptic-arc")?x(e,a,c,n):(e.push((0,u.tk)(c)),o=!0)}a.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...o?{curvePaths:a}:{paths:a}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...o?{curveRings:a}:{rings:a}}}(t,e,r))})}function q(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},63579(t,e,s){s.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>y,in:()=>f,yr:()=>c});var r=s(11254),n=s(4576),i=s(17676),a=s(20557);class o{constructor(t,e,s){this.assetName=t,this.assetMimeType=e,this.parts=s}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const s=await Promise.all(e.map(e=>e.toBlob(t)));return(0,i.Te)(t),new Blob(s)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(t),e}}function c(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const l=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:s}=t;return l.test(e)||p.test(s)}return l.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:s}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(s,e)}function f(t,e){if(t===e)return!0;const{source:s}=t,{source:r}=e;if(s===r)return!0;if("service"===s.type&&"service"===r.type){if(s.assets.length!==r.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...s.assets].sort(t),n=[...r.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function y(t,e){return t instanceof File?(0,a.rq)(t,e):(0,a.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},27615(t,e,s){s.d(e,{CK:()=>u,Hq:()=>o,MW:()=>c,TE:()=>l,yJ:()=>p});var r=s(35522),n=s(86738),i=s(95696),a=s(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function c(t,e){if(!o(t))return null;const[s,r,i]=t.origin;return new n.A({x:s,y:r,z:i,spatialReference:e})}function l(t,e){const{x:s,y:r,z:n,spatialReference:o}=t,u=[s,r,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new a.default({origin:u}):new i.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,r.t2)(t.origin,e.origin))}},17136(t,e,s){s.d(e,{Y_:()=>E,O7:()=>F,el:()=>q});var r=s(92602),n=s(69052),i=s(49186),a=s(53966),o=s(39829),u=s(82799),c=s(16930),l=s(80754),p=s(21325),h=s(28735),d=s(52006),f=s(31411),y=s(11254),m=s(60408),g=s(65864),S=s(2272),v=s(84952),b=s(92300);const A=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function x(t){return"polygon"===t[0].type}function _(t){return"polyline"===t[0].type}function M(t,e,s){const r=1e6;if(e){const e=(0,d.Ed)(t)?(0,f.GS)(t,{maxSegmentLength:r}):function(t,e){if(!(t instanceof u.A||t instanceof o.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw A().error(t),new i.A("internal:geometry",t)}const s=(0,l.r8)(t),r=[];for(const t of s){const s=[];r.push(s),s.push([t[0][0],t[0][1]]);for(let r=0;r<t.length-1;r++){const n=t[r][0],i=t[r][1],a=t[r+1][0],o=t[r+1][1],u=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),c=(o-i)/u,l=(a-n)/u,p=u/e;if(p>1){for(let t=1;t<=p-1;t++){const r=t*e,a=l*r+n,o=c*r+i;s.push([a,o])}const t=(u+Math.floor(p-1)*e)/2,r=l*t+n,a=c*t+i;s.push([r,a])}s.push([a,o])}}return function(t){return"polygon"===t.type}(t)?new o.A({rings:r,spatialReference:t.spatialReference}):new u.A({paths:r,spatialReference:t.spatialReference})}(t,r);t=(0,h.ci)(e,!0)}return s&&(t=(0,l.kS)(t,s)),t}function w(t,e,s){if(Array.isArray(t)){const r=t[0];if(r>e){const s=(0,l.kd)(r,e);t[0]=r+s*(-2*e)}else if(r<s){const e=(0,l.kd)(r,s);t[0]=r+e*(-2*s)}}else{const r=t.x;if(r>e){const s=(0,l.kd)(r,e);t=t.clone().offset(s*(-2*e),0)}else if(r<s){const e=(0,l.kd)(r,s);t=t.clone().offset(e*(-2*s),0)}}return t}function R(t,e){let s=-1;for(let r=0;r<e.cutIndexes.length;r++){const n=e.cutIndexes[r],i=e.geometries[r],a=(0,l.r8)(i);for(let t=0;t<a.length;t++){const e=a[t];e.some(s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const r=e[t][0];s=r>s?r:s}s=Number(s.toFixed(9));const r=-360*(0,l.kd)(s,180);for(let s=0;s<e.length;s++){const e=i.getPoint(t,s);i.setPoint(t,s,e.clone().offset(r,0))}return!0}})}if(n===s){if(x(t))for(const e of(0,l.r8)(i))t[n]=t[n].addRing(e);else if(_(t))for(const e of(0,l.r8)(i))t[n]=t[n].addPath(e)}else s=n,t[n]=i}return t}async function q(t,e,s){if(!Array.isArray(t))return q([t],e);e&&"string"!=typeof e&&A().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??r.A.geometryServiceUrl;let i,a,c,d,f,x,_,F,I=0;const E=[],C=[];for(const e of t)if(null!=e)if(i||(i=e.spatialReference,a=(0,p.Vp)(i),c=i.isWebMercator,x=c?102100:4326,d=l.j7[x].maxX,f=l.j7[x].minX,_=l.j7[x].plus180Line,F=l.j7[x].minus180Line),a)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(w(e.clone(),d,f));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>w(t,d,f)),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,a);C.push(t.rings?new o.A(t):t)}else if(e.extent){const t=e.extent,s=(0,l.kd)(t.xmin,f)*(2*d);let r=0===s?e.clone():(0,l.kS)(e.clone(),s);t.offset(s,0);let{xmin:n,xmax:i}=t;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),t.intersects(_)&&i!==d?(I=i>I?i:I,r=M(r,c),E.push(r),C.push("cut")):t.intersects(F)&&n!==f?(I=i*(2*d)>I?i*(2*d):I,r=M(r,c,360),E.push(r),C.push("cut")):C.push(r)}else C.push(e.clone());else C.push(e);else C.push(e);let O=(0,l.kd)(I,d),P=-90;const T=O,N=new u.A;for(;O>0;){const t=360*O-180;N.addPath([[t,P],[t,-1*P]]),P*=-1,O--}if(E.length>0&&T>0){const e=R(E,await async function(t,e,s,r){const n=(0,S.Dl)(t),i=e[0].spatialReference,a={...r,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,m.$B)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},o=await(0,y.A)(n.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map(t=>{const e=(0,g.rS)(t);return e.spatialReference=i,e})}}(n,E,N,s)),r=[],i=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)i.push(n);else{const n=e.shift(),a=t[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(r.push(n),i.push("simplify")):i.push(c?(0,h.Gh)(n):n)}}if(!r.length)return i;const a=await async function(t,e,s){const r="string"==typeof t?(0,v.An)(t):t,n=e[0].spatialReference,i=(0,m.$B)(e[0]),a={...s,query:{...r.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,b.X)(e))}},{data:o}=await(0,y.A)(r.path+"/simplify",a);return(0,b.V)(o.geometries,i,n)}(n,r,s),o=[];for(let t=0;t<i.length;t++){const e=i[t];"simplify"!==e?o.push(e):o.push(c?(0,h.Gh)(a.shift()):a.shift())}return o}const D=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)D.push(e);else{const t=E.shift();D.push(!0===c?(0,h.Gh)(t):t)}}return D}function F(t,e,s){const r=(0,p.Vp)(s);if(null==r)return t;const[n,i]=r.valid,a=2*i;let o=0,u=0;e>i?o=Math.ceil(Math.abs(e-i)/a):e<n&&(o=-Math.ceil(Math.abs(e-n)/a)),t>i?u=Math.ceil(Math.abs(t-i)/a):t<n&&(u=-Math.ceil(Math.abs(t-n)/a));let c=t+(o-u)*a;const l=c-e;return l>i?c-=a:l<n&&(c+=a),c}function I(t){const e=(0,p.Vp)(t);if(null==e)return null;const[s,r]=e.valid;return new n.hr(s,r)}const E=I(c.A.WGS84);I(c.A.WebMercator)},80754(t,e,s){s.d(e,{j7:()=>o,kS:()=>c,kd:()=>u,r8:()=>l});var r=s(82799),n=s(16930),i=s(60408),a=s(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function u(t,e){return Math.ceil((t-e)/(2*e))}function c(t,e){if((0,a.Ed)(t))for(const s of function(t){return(0,i.Bi)(t)?t.curveRings:t.curvePaths}(t))for(const t of s){if((0,a.aO)(t)){const[s,r]=t.c;s[0]+=e,r[0]+=e;continue}if((0,a.FG)(t)){const[s,r]=t.a;s[0]+=e,r[0]+=e;continue}if((0,a.n1)(t)){const[s,r,n]=t.b;s[0]+=e,r[0]+=e,n[0]+=e;continue}t[0]+=e}for(const s of l(t))for(const t of s)t[0]+=e;return t}function l(t){return(0,i.Bi)(t)?t.rings:t.paths}},99352(t,e,s){s.d(e,{F:()=>r,P:()=>n});const r={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},65515(t,e,s){s.r(e),s.d(e,{default:()=>Y});var r=s(5482),n=s(92602),i=s(11254),a=s(4576),o=s(49186),u=s(44208),c=s(66552),l=s(92474),p=s(53966),h=s(93637),d=s(17676),f=s(36708),y=s(84952),m=s(13069),g=s(91429),S=s(5443),v=s(16930),b=s(95696),A=s(27615),x=s(63579),_=s(52106),M=s(86211);function w(t){return"object"==typeof t&&null!=t&&"objectId"in t&&!!t.objectId}function R(t){return"object"==typeof t&&null!=t&&"globalId"in t&&!!t.globalId}function q(t){return t.every(R)}var F=s(91218),I=s(65864),E=s(73836),C=s(21325);async function O(t,e,s){const{geometry:r}=e,n={...e.attributes};if(null!=s&&"mesh"===r?.type){const{transformFieldRoles:e}=s,{origin:i,spatialReference:a,vertexSpace:o}=r,u=r.transform??new E.A,c="local"===o.type,l=t.spatialReference,p=l.isGeographic,h=(0,C.aI)(l,a),d=(0,F.isEqualBaseGCS)(a,l)&&(0,F.canProjectWithoutEngine)(a,l);if(!(c&&p&&d||!c&&!p&&h))return null;const f=(0,F.projectWithoutEngine)(i,a,l);if(null==f)return null;if(n[e.originX]=f.x,n[e.originY]=f.y,n[e.originZ]=f.z??0,null!=u){const{translation:t,scale:s,rotation:r}=u,i=c?1:(0,M.KX)(a)/(0,M.KX)(l);n[e.translationX]=t[0]*i,n[e.translationY]=t[2]*i,n[e.translationZ]=-t[1]*i,n[e.scaleX]=s[0],n[e.scaleY]=s[2],n[e.scaleZ]=s[1],n[e.rotationX]=r[0],n[e.rotationY]=r[2],n[e.rotationZ]=-r[1],n[e.rotationDeg]=r[3]}return{attributes:n}}return null==r?{attributes:n}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:n}}async function P(t,e){const s=await Promise.all((e.addAttachments??[]).map(e=>T(t,e))),r=await Promise.all((e.updateAttachments??[]).map(e=>T(t,e))),n=e.deleteAttachments??[];return s.length||r.length||n.length?{adds:s,updates:r,deletes:[...n]}:null}async function T(t,e){const{feature:s,attachment:r}=e,{globalId:n,name:i,contentType:a,data:o,uploadId:u}=r,c={globalId:n};if(s&&("attributes"in s?c.parentGlobalId=s.attributes?.[t.globalIdField]:s.globalId&&(c.parentGlobalId=s.globalId)),u)c.uploadId=u;else if(o){const t=await(0,y._0)(o);t&&(c.contentType=t.mediaType,c.data=t.data),o instanceof File&&(c.name=o.name)}return i&&(c.name=i),a&&(c.contentType=a),c}function N(t,e,s){if(!e||0===e.length)return[];if(s&&q(e))return e.map(t=>t.globalId);if(function(t){return t.every(w)}(e))return e.map(t=>t.objectId);const r=s?t.globalIdField:t.objectIdField;return r?e.map(t=>t.getAttribute(r)):[]}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function k(t,e){return new _.A({attributes:t.attributes,geometry:(0,I.rS)({...t.geometry,spatialReference:e})})}function Z(t,e){return{adds:t?.adds?.map(t=>k(t,e))||[],updates:t?.updates?.map(t=>({original:k(t[0],e),current:k(t[1],e)}))||[],deletes:t?.deletes?.map(t=>k(t,e))||[],spatialReference:e}}var Q=s(64714),j=s(64314),J=s(60694),V=s(15426),U=s(20557),G=s(99199),B=s(96520),X=s(61956),z=s(79677),L=s(20816);const $=new c.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new c.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends l.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,s=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(s),Promise.resolve(this)}initialize(){this.addHandles([(0,f.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:s,spatialReference:r,fieldsIndex:n,uniqueIdFields:i}=this.layer,a="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,c=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==a,l=c&&t?.query.supportsFormatPBFWithCurves,p=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,d=e.path;return new j.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:s,infoFor3D:a,pbfSupported:c,pbfSupportedWithCurves:l,queryAttachmentsSupported:p,relativeTimeBinWindow:h,sourceSpatialReference:r,uniqueIdFields:i,url:d})}async addAttachment(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r=t.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,a.query);try{return D((await(0,i.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(r,t)}}async updateAttachment(t,e,s){await this.load();const{layer:r}=this;await(0,V.VA)(r,"editing");const n=t.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(s,o.query);try{return D((await(0,i.A)(a,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r="infoFor3D"in s?s.infoFor3D:null,n=null!=r,u=n||(e?.globalIdUsed??!1),c=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,l=t.addFeatures?.map(t=>O(this.layer,t,r))??[],p=(await Promise.all(l)).filter(a.Ru),h=t.updateFeatures?.map(t=>O(this.layer,t,r))??[],d=(await Promise.all(h)).filter(a.Ru),f=N(this.layer,t.deleteFeatures,u);(0,B.u)(p,d,s.spatialReference);const y=await P(this.layer,t),m=s.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||s.gdbVersion,S={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);const v=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(s.url,g,s.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(S.edits=JSON.stringify([{id:s.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:f.length?f:null,attachments:y,assetMaps:c}]),S.returnServiceEditsOption=$.toJSON(e?.returnServiceEditsOption),S.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(S.adds=p.length?JSON.stringify(p):null,S.updates=d.length?JSON.stringify(d):null,S.deletes=f.length?u?JSON.stringify(f):f.join(","):null,S.attachments=y&&JSON.stringify(y),S.assetMaps=null!=c?JSON.stringify(c):void 0);const b=this._getLayerRequestOptions({method:"post",query:S});v&&(b.authMode="immediate",b.query.returnEditMoment=!0,b.query.sessionId=L.TA);const A=e?.returnServiceEditsOption?s.url:s.parsedUrl.path;let x;try{x=m?await this._asyncApplyEdits(A+"/applyEdits",b):await(0,i.A)(A+"/applyEdits",b)}catch(t){if(!function(t){const e=t.details.raw,s=+e.code,r=+e.extendedCode;return 500===s&&(-2147217144===r||-2147467261===r)}(t))throw t;b.authMode="immediate",x=m?await this._asyncApplyEdits(A+"/applyEdits",b):await(0,i.A)(A+"/applyEdits",b)}return this._createEditsResult(x)}async deleteAttachments(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r=t.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,i.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(r,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:s,url:r}=this.layer,{data:n}=await(0,i.A)(`${r}/${s}`,e),{id:a,extent:o,fullExtent:u,timeExtent:c}=n,l=o||u;return{id:a,fullExtent:l&&S.A.fromJSON(l),timeExtent:c&&z.A.fromJSON({start:c[0],end:c[1]})}})}async queryAttachments(t,e={}){await this.load();const s=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,s)}async queryFeatures(t,e){await this.load();const s=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&s.features.length){const e=new Map;if(s.features.forEach(s=>{const r=s.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const s=t.toLowerCase();s&&s in r&&t!==s&&(r[t]=r[s],delete r[s],e.set(s,t))}})}),null!=s.fields)for(const t of s.fields){const s=e.get(t.name.toLowerCase());null!=s&&(t.name=s)}}return s}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,J.Wo)(this.layer.url))return"unavailable";const t=(0,y.fj)(this.layer.url,"status"),e=await(0,i.A)(t,{query:{f:"json"}});return W.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:r}=await s.e(1384).then(s.bind(s,31384));return r(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const s=e.url;null!=s&&("layerId"in e&&(0,y.fj)(s,e.layerId.toString()),this._getOrCreateEditInterceptor(s).before=e=>{const s=e.requestOptions.method??"auto";if("auto"===s||"head"===s){const s=e.requestOptions.query??{};s._ts=t.getTime(),e.requestOptions.query=s}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,a.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const s=(await(0,i.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,i.A)(s,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,i.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(H)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const s={};(0,u.A)("featurelayer-advanced-symbols")&&(s.returnAdvancedSymbols=!0),e?.cacheBust&&(s._ts=Date.now());const{data:r}=await(0,i.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:s,signal:e?.signal}));t=r}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const s=t.type;if(!this.supportedSourceTypes.has(s))throw new o.A("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,Q.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:s}=await(0,i.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));s.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:s.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const r=t.addFeatures.filter(t=>t.geometry);if(e.length!==r.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,i=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:r}=e;if((0,A.Hq)(r))n.push(e);else{const r=e.origin,{convertMeshVertexSpace:a}=await Promise.all([s.e(6860),s.e(4496)]).then(s.bind(s,28846)),o=await a(e,new b.A({origin:[r.x,r.y,r.z??0]}));i.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of i)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,s=this.layer.globalIdField,r=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:i}=t,a=i.getExternalSourcesOnService(r),o=n.getAttribute(s);if(0===a.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=a.find(x.dK)??a[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:s}=this.layer,r=[];let n=null;if(Array.isArray(e))for(const t of e)r.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===s&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const i=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const s=t?.attachments,r={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:s?.addResults?s.addResults.map(D):[],updateAttachmentResults:s?.updateResults?s.updateResults.map(D):[],deleteAttachmentResults:s?.deleteResults?s.deleteResults.map(D):[]};return t?.editMoment&&(r.editMoment=t.editMoment),r}(n);if(r.length>0){i.editedFeatureResults=[];for(const t of r){const{editedFeatures:e}=t,s=e?.spatialReference?new v.A(e.spatialReference):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:Z(e,s)})}}return i}_createAttachmentErrorResult(t,e){const s=e.details.messages?.[0]||e.message,r=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",s,{code:r})}}_getFormDataForAttachment(t,e){const s=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(s)for(const t in e){const r=e[t];null!=r&&(s.set?s.set(t,r):s.append(t,r))}return s}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:s,gdbVersion:r}}=this;return{...t,query:{gdbVersion:r,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...s.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:s,parsedUrl:r}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==s)return!1;const i=(0,U.JZ)(n);if(null==i)return!1;const o=(0,y.fj)(r.path,`../${i.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(r).length>0))return!1;u.push(e)}const c=u.map(t=>t.getAttribute(s)).filter(a.Ru);if(0===c.length)return!1;const{assetMapFieldRoles:{parentGlobalId:l,assetHash:p}}=n,h=new X.A({where:`${l} IN (${c.map(t=>`'${t}'`)})`,outFields:[p,l],returnGeometry:!1}),d=await(0,G.s)(o,h),{features:f}=d;return 0!==f.length&&!u.some(t=>{const e=t.getAttribute(s);if(!e)return!0;const{metadata:n}=t.geometry,i=f.filter(t=>t.getAttribute(l)===e);if(0===i.length)return!0;const a=i.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(r).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>a.every(e=>t!==e))})}};(0,r.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,r.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,r.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,r.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,r.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(t,e,s){s.d(e,{A:()=>w});var r=s(5482),n=s(69622),i=s(49186),a=s(44208),o=s(17676),u=s(84952),c=s(91429),l=s(21325),p=s(20557),h=s(2272),d=s(65615),f=s(20615),y=s(74910),m=s(78286),g=s(99199),S=s(62815),v=s(63746);class b{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=b._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t)}feature(){this._attributesClass??=(0,v._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,s){this._previousX=this._previousY=0,this._lengths=s;let r,{hasZ:n,hasM:i}=this.featureSet;switch(n??=!1,i??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),i&&this._vertex.push(0),this._finishVertex=b._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},r=this._point,this._finishVertex=n?i?b._finishVertexPointXYZM:b._finishVertexPointXYZ:i?b._finishVertexPointXYM:b._finishVertexPointXY;break;case"esriGeometryMultipoint":r={points:[],hasZ:n,hasM:i},this._part=r.points,this._parts=[];break;case"esriGeometryPolyline":r={paths:[],hasZ:n,hasM:i},this._parts=r.paths,this._part=[];break;case"esriGeometryPolygon":r={rings:[],hasZ:n,hasM:i},this._parts=r.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=r,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=r}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,s,r){let n,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:i,hasM:a},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:i,hasM:a},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,s,r){this._part.push({b:[this._transform(e),this._transformXY(s),this._transformXY(r)]})}circularArcSegment(t,e,s){this._part.push({c:[this._transform(e),this._transformXY(s)]})}ellipticArcSegment(t,e,s,r,n,i,a,o){this._part.push({a:[this._transform(e),this._transformXY(s),r,n,i,a,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:s,_lengths:r,_vertex:n}=t;e.push([...n]),e.length<r[s.length]||(t._previousX=t._previousY=0,t._part=[],s.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:s,transform:r}=this.featureSet,n=s?(0,S.d)(t,e):1;this._transformInPlace??=(0,v.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,v.Mv)({transform:r})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var A=s(80893),x=s(22671),_=s(61956);async function M(t,e,s,r){const n=(0,h.Dl)(t),i={...s},a=_.A.from(e),o=!a.quantizationParameters;return await(0,A.IJ)(n,a,new b({sourceSpatialReference:a.sourceSpatialReference,applyTransform:o}),i,r)}let w=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const s=await this.executeJSON(t,e);return this.featureSetFromJSON(t,s,e)}async executeJSON(t,e){const s=this._normalizeQuery(t),r=null!=t.outStatistics?.[0],n=(0,a.A)("featurelayer-pbf-statistics");let i;if(this.pbfSupported&&(!r||n)&&(!t.returnTrueCurves||this.pbfSupportedWithCurves))try{i=await M(this.url,s,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return i??=await(0,g.e)(this.url,s,e,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,r){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return x.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([s.e(6860),s.e(7005),s.e(6754),s.e(4934),s.e(7634),s.e(8883)]).then(s.bind(s,40050)),r);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,f.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,y.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:r},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(s.bind(s,26591)),s.e(1763).then(s.bind(s,71763))]),e);let i=r.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeRelationshipQueryForCount(t,e){const[{default:r},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(s.bind(s,26591)),s.e(1763).then(s.bind(s,71763))]),e);let i=r.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:r,fetchAttachments:n,processAttachmentQueryResult:i}=await(0,o.qr)(s.e(9239).then(s.bind(s,9239)),e),a=(0,h.Dl)(this.url);return i(a,await(this.queryAttachmentsSupported?r(a,t,e):n(a,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:r}=await(0,o.qr)(s.e(3103).then(s.bind(s,33103)),e);return r(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:r}=await(0,o.qr)(s.e(566).then(s.bind(s,80566)),e);return r(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:r}=await(0,o.qr)(s.e(1273).then(s.bind(s,11273)),e);return r(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:r}=await(0,o.qr)(s.e(1277).then(s.bind(s,21277)),e);return r(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:r}=await(0,o.qr)(s.e(8018).then(s.bind(s,8018)),e);return r(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:r}=await(0,o.qr)(s.e(980).then(s.bind(s,10980)),e);return r(this.parsedUrl,t,e)}_normalizeQuery(t){let e=_.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:s}=this,r=this._queryGet3DObjectFormat(t);if(null!=s&&r){if(e=e===t?e.clone():e,e.formatOf3DObjects=r,e.outSpatialReference&&!(0,l.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new i.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:r,originY:n,originZ:i,translationX:a,translationY:o,translationZ:u,scaleX:c,scaleY:l,scaleZ:p,rotationX:h,rotationY:d,rotationZ:f,rotationDeg:y}=s.transformFieldRoles;e.outFields.push(r,n,i,a,o,u,c,l,p,h,d,f,y)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:s}){return!0!==t||"xyFootprint"===e||s?null:(0,p.Hz)(this.infoFor3D)}};(0,r.Cg)([(0,c.MZ)({type:d.A})],w.prototype,"dynamicDataSource",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"gdbVersion",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"infoFor3D",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,r.Cg)([(0,c.MZ)()],w.prototype,"pbfSupported",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"pbfSupportedWithCurves",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"queryAttachmentsSupported",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"relativeTimeBinWindow",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"sourceSpatialReference",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"uniqueIdFields",void 0),(0,r.Cg)([(0,c.MZ)({type:String})],w.prototype,"url",void 0),w=(0,r.Cg)([(0,c.$K)("esri.layers.graphics.sources.support.QueryTask")],w)},64714(t,e,s){s.d(e,{F0:()=>o,Vx:()=>l,e2:()=>h,f:()=>d});var r=s(44208),n=s(4718),i=s(99352),a=s(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let c=1;function l(t,e){if((0,r.A)("esri-csp-restrictions"))return()=>e?{[e]:null,...t}:{...t};try{let s="";e&&(s+=`this${p(e)} = null;`);for(const e in t)s+=`this${p(e)} = ${JSON.stringify(t[e])};`;const r=new Function(`\n return class AttributesClass$${c++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new r}catch(s){return()=>e?{[e]:null,...t}:{...t}}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},92300(t,e,s){s.d(e,{V:()=>a,X:()=>i});var r=s(60408),n=s(65864);function i(t){return{geometryType:(0,r.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function a(t,e,s){const r=(0,n.xD)(e);return t.map(t=>{const e=r.fromJSON(t);return e.spatialReference=s,e})}},20615(t,e,s){s.d(e,{I:()=>a});var r=s(2272),n=s(80893),i=s(61956);function a(t,e,s,a){return(0,n.gW)((0,r.Dl)(t),i.A.from(e),s,a)}},74910(t,e,s){s.d(e,{L:()=>o});var r=s(5443),n=s(2272),i=s(80893),a=s(61956);async function o(t,e,s){const o=(0,n.Dl)(t),u=await(0,i.Jf)(o,a.A.from(e),{...s}),c=u.extent;return!c||isNaN(c.xmin)||isNaN(c.ymin)||isNaN(c.xmax)||isNaN(c.ymax)?{count:u.count,extent:null}:{count:u.count,extent:r.A.fromJSON(c)}}},78286(t,e,s){s.d(e,{V:()=>a});var r=s(2272),n=s(80893),i=s(61956);async function a(t,e,s,a){const o=(0,r.Dl)(t),u=await(0,n.Pk)(o,i.A.from(e),s,a);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},99199(t,e,s){s.d(e,{e:()=>u,s:()=>o});var r=s(2272),n=s(80893),i=s(22671),a=s(61956);async function o(t,e,s,r){const n=await u(t,e,s,r);return i.A.fromJSON(n)}function u(t,e,s,i){const o=(0,r.Dl)(t),u={...s},c=a.A.from(e);return(0,n.eW)(o,c,c.sourceSpatialReference,u,i)}},63746(t,e,s){function r(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:s,hasZ:r,hasM:n}=t;if(null==s)return r&&1!==e?t=>{t[2]*=e}:null;const[i,a]=function(t,e,s,r){let{scale:n,translate:i,originPosition:a}=t;return"upperLeft"===a&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*r:t),i=i.map((t,e)=>2===e?t*r:t)),!e&&s&&(n=n.filter((t,e)=>2!==e),i=i.filter((t,e)=>2!==e)),[n,i]}(s,r,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*i[e]+a[e]}}s.d(e,{Mv:()=>n,_7:()=>r}),s(53966)}}]);