@arcgis/core 5.2.0-next.89 → 5.2.0-next.90

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 (140) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/05fbd1f373cfa3724f0c.js +1 -0
  3. package/assets/esri/core/workers/chunks/{f7f2102b16d201e5f531.js → 0d2e2d90a4e4a28e2c0c.js} +1 -1
  4. package/assets/esri/core/workers/chunks/1554feab934e8e1bcd28.js +1 -0
  5. package/assets/esri/core/workers/chunks/{823dd85b008ae4db6793.js → 188c6ff5f4664827c254.js} +2 -2
  6. package/assets/esri/core/workers/chunks/{d30a7fc8dab4ebb8893b.js → 1ab8307ba9981124f669.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{5ed89c862eee1345e3af.js → 20f7b5fe64a217cb3d3d.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{013a4ee14c44eb824c7c.js → 24c44541046576fee7e0.js} +2 -2
  9. package/assets/esri/core/workers/chunks/{f3716ce04d09af31cfb1.js → 2754ba5cc094028a7a3c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{e8b4f12dfbf568377cef.js → 3a65693964e3976d8035.js} +1 -1
  11. package/assets/esri/core/workers/chunks/423c2692df662b3dddd4.js +1 -0
  12. package/assets/esri/core/workers/chunks/{996211727ed1617162da.js → 48726010778d6004e347.js} +2 -2
  13. package/assets/esri/core/workers/chunks/{680557b8832fbdab7f46.js → 4bf7c0c874d30b1c0760.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{db180f8d25471cfa48af.js → 545bec045167c433af8f.js} +1 -1
  15. package/assets/esri/core/workers/chunks/5782c0362a1799ceef41.js +1 -0
  16. package/assets/esri/core/workers/chunks/{5bf65dbfd9c7a5ea187d.js → 5aa23b0f4521ba9a07ad.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{eda04911553cf99fb99b.js → 606ac9358f508bda94f2.js} +1 -1
  18. package/assets/esri/core/workers/chunks/625a692f00357629f609.js +1 -0
  19. package/assets/esri/core/workers/chunks/{bd2602195e265f8fdb15.js → 69c9a12c97ead8963817.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{2f3bbc1f7d4abbbeec2f.js → 6ab7bb3834841834f839.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{afa6b74d9ca9ed0154af.js → 6fd0d9431b141f2a3252.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{3f82410d9f701e7ad8eb.js → 76e7d3cde2da4bdd7820.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{ea75c23c44452f45a949.js → 7cf903db44f3647c8fd4.js} +1 -1
  24. package/assets/esri/core/workers/chunks/848a9f0e5373bbf289a5.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a88bf8ae93077e1b48cf.js → 8a87e1a89a0d8c6203a7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{a3b403f8acb90af19adb.js → 91ac9328afff8a51bd96.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{00181785a180e934bf7c.js → 91de343844ac578e7c93.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{d871572997600930e017.js → 95a3f09751bff63f4fab.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{ffe749d790320dddfa74.js → 97e41500fc2d24a88938.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{6fe7060235f601b180ea.js → 98d614d6fc9de8ebaf94.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{1e087fb13b7b0a5d6fec.js → 9d3cdfa08ef4d2805625.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{0460ea5a85e9c3c2e1b7.js → a89dbef8155d7c4354da.js} +2 -2
  33. package/assets/esri/core/workers/chunks/{e9f29019aa78f07ace66.js → aed7b80145b22c246098.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{4aefe6fd4d725a107758.js → b7ed5f130661e9ca00b9.js} +1 -1
  35. package/assets/esri/core/workers/chunks/c07d2fb9940b2c6eda9f.js +1 -0
  36. package/assets/esri/core/workers/chunks/{a8b878c12cb1a6ea012b.js → c4a0d3149947a1d2c484.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{31a0620a6028e94c7532.js → c6ec0e966106f66360d9.js} +2 -2
  38. package/assets/esri/core/workers/chunks/{5df0639839a354cb2751.js → c7f69d010f1cb32f5d37.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{23addf8b11938e0c96e9.js → cb983f65995e57fff7a1.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{f665fb4c5633e0a459d8.js → d24125a791247019e2ca.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{7b7d0e93689aab8da83d.js → d44338bf5edafa3ca926.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{2ceb07b125c84b51f02a.js → d7d5275d8b3c9430de1f.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{ce227146fcaabf088da1.js → da8a314800944706511b.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{705f459aab890fda134b.js → e018cbd97e6e0e4ca5c4.js} +1 -1
  45. package/assets/esri/core/workers/chunks/e55507e4114b34d1ef4e.js +1 -0
  46. package/assets/esri/core/workers/chunks/{6b06858bb9e976c1ef33.js → e594b6db9caee1f7b9fc.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{4057d97a4ec234978697.js → e90076ac1cf88a83a7f9.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{e40e08029325f43452d0.js → f4d351b4cd9d1aa10632.js} +1 -1
  49. package/assets/esri/core/workers/chunks/f5f5b54cab722abe88e0.js +1 -0
  50. package/assets/esri/core/workers/chunks/{d8e2d78fc4526612aad6.js → ff83d0337ac489ab08de.js} +2 -2
  51. package/config.js +1 -1
  52. package/core/EuclideanDistanceTransform.js +2 -0
  53. package/geometry/support/convexPolyhedron.js +1 -1
  54. package/geometry/support/frustumPlanes.js +2 -0
  55. package/kernel.js +1 -1
  56. package/layers/ParquetLayer.d.ts +3 -2
  57. package/layers/ParquetLayer.js +1 -1
  58. package/layers/support/dataSeriesUtils.js +1 -1
  59. package/package.json +3 -3
  60. package/popup/FeatureContentCollection.d.ts +6 -0
  61. package/popup/FeatureContentCollection.js +1 -1
  62. package/rest/support/AlgorithmicColorRamp.d.ts +2 -2
  63. package/rest/support/types.d.ts +2 -2
  64. package/smartMapping/raster/support/colorRamps.d.ts +4 -3
  65. package/support/revision.js +1 -1
  66. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  67. package/symbols/cim/CIMSymbolHelper.js +1 -1
  68. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  69. package/symbols/cim/Rasterizer.js +1 -1
  70. package/symbols/cim/cimAnalyzer.js +1 -1
  71. package/symbols/cim/rasterizingUtils.js +1 -1
  72. package/symbols/cim/utils.js +1 -1
  73. package/views/2d/engine/webgl/GlyphSDFCreator.js +1 -1
  74. package/views/2d/engine/webgl/SDFConverter.js +1 -1
  75. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  76. package/views/2d/engine/webgl/TextureManager.js +1 -1
  77. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  78. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  79. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  80. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  81. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  82. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  83. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  84. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  85. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  86. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  87. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  88. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
  89. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  90. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  91. package/views/2d/tiling/LODInfo.js +1 -1
  92. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  93. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  94. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  95. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  96. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  97. package/views/3d/state/Frustum.js +1 -1
  98. package/views/3d/state/controllers/RopePullController.js +1 -1
  99. package/views/3d/state/controllers/momentum/RopePullMomentumController.js +2 -0
  100. package/views/3d/support/SweptSphereVolume.js +2 -0
  101. package/views/3d/support/viewpointUtils.js +1 -1
  102. package/views/3d/terrain/PatchRenderData.js +1 -1
  103. package/views/3d/terrain/PatchRenderDataWaterproofness.js +1 -1
  104. package/views/3d/terrain/PlanarPatch.js +1 -1
  105. package/views/3d/terrain/SphericalPatch.js +1 -1
  106. package/views/3d/terrain/TerrainSurface.js +1 -1
  107. package/views/3d/terrain/Tile.js +1 -1
  108. package/views/3d/webgl/RenderCamera.js +1 -1
  109. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  110. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
  111. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  112. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  113. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  114. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  115. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  116. package/views/3d/webgl-engine/lib/screenPolygonIntersectionUtils.js +1 -1
  117. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  118. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  119. package/views/navigation/RopePullMomentumEstimator.js +2 -0
  120. package/views/support/LayerLayerViewInfo.js +1 -1
  121. package/views/support/LayerViewManager.js +1 -1
  122. package/widgets/Features/FeaturesViewModel.d.ts +6 -0
  123. package/widgets/Features/FeaturesViewModel.js +1 -1
  124. package/widgets/Features.js +1 -1
  125. package/assets/esri/core/workers/chunks/028bee58f7bc19e5e39e.js +0 -1
  126. package/assets/esri/core/workers/chunks/39b6a5222f45cb8dbc94.js +0 -1
  127. package/assets/esri/core/workers/chunks/51c9bd7c03d780fadebc.js +0 -1
  128. package/assets/esri/core/workers/chunks/71308dca3fd05687e7bd.js +0 -1
  129. package/assets/esri/core/workers/chunks/8d8708789843844eb9e1.js +0 -1
  130. package/assets/esri/core/workers/chunks/9246e2468528650bdc7c.js +0 -1
  131. package/assets/esri/core/workers/chunks/94453d075ce02eff4844.js +0 -1
  132. package/assets/esri/core/workers/chunks/a176727a1148ca4fb432.js +0 -1
  133. package/assets/esri/core/workers/chunks/f106cc7f559856f69b9f.js +0 -1
  134. package/geometry/support/frustum.js +0 -2
  135. package/views/3d/layers/i3s/SweptSphereVolume.js +0 -2
  136. /package/assets/esri/core/workers/chunks/{823dd85b008ae4db6793.js.LICENSE.txt → 188c6ff5f4664827c254.js.LICENSE.txt} +0 -0
  137. /package/assets/esri/core/workers/chunks/{013a4ee14c44eb824c7c.js.LICENSE.txt → 24c44541046576fee7e0.js.LICENSE.txt} +0 -0
  138. /package/assets/esri/core/workers/chunks/{996211727ed1617162da.js.LICENSE.txt → 48726010778d6004e347.js.LICENSE.txt} +0 -0
  139. /package/assets/esri/core/workers/chunks/{0460ea5a85e9c3c2e1b7.js.LICENSE.txt → a89dbef8155d7c4354da.js.LICENSE.txt} +0 -0
  140. /package/assets/esri/core/workers/chunks/{d8e2d78fc4526612aad6.js.LICENSE.txt → ff83d0337ac489ab08de.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4934,9397],{67996(e,t,n){n.d(t,{cZ:()=>k,XW:()=>F,fe:()=>L});var i=n(11254),r=n(49186),s=n(91869),o=(n(90708),n(92722)),a=n(16930);class l{constructor(){this.version="",this.queryResult=new u}}class u{constructor(){this.featureResult=new p}}class p{constructor(){this.objectIdFieldName="",this.uniqueIdField=new d,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 d{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 f{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class g{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var I=n(45724),M=n(93637),C=n(49403);const T={upperLeft:0,lowerLeft:1},_={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};function A(e){const t=new l;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const i=n.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=i.objectid_field_name,r.exceededTransferLimit=i.exceeded_transfer_limit,r.hasM=i.has_m,r.hasZ=i.has_z,r.geometryType=(0,M.i7)(C.bV,i.geometry_type.value),r.globalIdFieldName=i.globalid_field_name,r.geohashFieldName=i.geohash_field_name;const s=r.uniqueIdField,o=i.unique_id_field;s.name=o.name,s.isSystemMaintained=o.isSystemMaintained;const a=r.geometryProperties,u=i.geometry_properties;a.shapeAreaFieldName=u.shapeAreaFieldName,a.shapeLengthFieldName=u.shapeLengthFieldName,a.units=u.units;const p=r.spatialReference,d=i.spatial_reference;p.wkid=d.wkid,p.latestWkid=d.latestWkid,p.vcsWkid=d.vcsWkid,p.latestVcsWkid=d.latestVcsWkid,p.wkt=d.wkt,r.transform=x(i.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=i.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=E(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const f=r.values,b=i.values_count();for(let e=0;e<b;e++)f.push(i.get_value_at(e));const I=r.features,T=i.features,_=T.size();if(_>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<_;e++){const t=new g,n=T.get(e),i=t.attributes,r=n.attributes_count();for(let e=0;e<r;e++)i.push(n.get_attribute_at(e));const s=n.get_compressed_geometry();s&&(t.compressedGeometry=v(s),t.centroid=v(n.get_centroid()));const o=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=v(t);o.push(n),t.delete()}a.delete(),I.push(t),n.delete()}T.delete();const A=r.geometryFields,k=i.geometry_fields,L=k.size();for(let e=0;e<L;e++){const t=k.get(e),n=S(t);A.push(n),t.delete()}return k.delete(),t}function v(e){const t=new b;t.geometryType=(0,M.i7)(C.bV,e.geometry_type.value);const n=[],i=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=n,t.coords=i,t}function E(e){const t=new f;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,M.i7)(C.r5,e.field_type.value),t.sqlType=(0,M.i7)(_,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function S(e){const t=E(e);return t.geometryType=(0,M.i7)(C.bV,e.geometry_type.value),t}function x(e){const t=new h;t.quantizeOriginPosition=(0,M.i7)(T,e.quantizeOriginPosition.value);const n=t.scale,i=e.scale;n.xScale=i.xScale,n.yScale=i.yScale,n.mScale=i.mScale,n.zScale=i.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 k(e,t,n){t??=!1;const o={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal}),s=await n.data;return async function(e){const t=new((await(0,I.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),i=new Map;if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.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),n=s.query_identifier_set(t),a=[];if(1===n.id_array_type.value){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(3===n.id_array_type.value){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(2===n.id_array_type.value){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(0!==n.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}i.set(t,a)}return t.delete(),i}(new Uint8Array(s))}(e,n).then(e=>{!function(e,t){for(const[n,i]of e){const e=(0,s.tE)(t.namedTypeDefinitions,n,()=>({useAllData:!1,members:new Map}));for(const t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,o)}),o}async function L(e){const t=await(0,I.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[i,r]of n.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const n=r.members.keys();let s=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,u=new t.GlobalIdArray,p=new t.IdentifierArray,d=new t.ObjectIdentifierSet;for(const e of n)o&&(s=!isNaN(Number(e)),o=!1),s?a.add_objectid(Number(e)):(l.add_string(e),u.add_globalid(e)),p.add_identifier(e);d.set_oid_array(a),d.set_string_array(l),d.set_globalid_array(u),d.set_identifier_array(p),a.delete(),l.delete(),u.delete(),p.delete(),e.put_identifier_set(i,d),d.delete()}}(n,t,e);const i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(n),i.encode();const e=i.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 i.delete(),t}finally{n.delete()}}async function N(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,I.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const i=A(t.get_feature_collection());return t.delete(),i}(await n.data)}function R(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:n,hasM:i}=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})),u=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(u,{id:u,linkChartLocation:new o.A(e,a.compressedGeometry.coords,n,i)})}else l.members.set(u,{id:u})}return t}const F={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){const n=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&n.push(N(e.entitiesUrl,t).then(e=>{R(e,i)})),e.relationshipsUrl&&n.push(N(e.relationshipsUrl,t).then(e=>{R(e,i)})),await Promise.all(n),i}(e,t)}},75503(e,t,n){n.d(t,{wq:()=>a});var i=n(4576),r=n(21818),s=(n(44208),n(15142)),o=n(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(),M.prune(),C.prune(),T.prune(),_.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(M.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;w(e,o)&&(n.leaf?t(s):b(e,o)?l(s,t):M.push(s))}n=M.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(M.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(w(e,s)){if(t.leaf||b(e,s))return!0;M.push(r)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;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 E([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),_.clear();n||T.length>0;){if(n||(n=T.pop(),s=T.data[T.length-1],o=_.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.z)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),T.push(n),this._condense(T),this;a||n.leaf||!b(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(T.push(n),_.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new E(e.slice(t,n+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new S([]);o.height=i;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));I(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);I(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return u(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);T.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=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=f(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,T);for(s.children.push(e),d(s,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)d(t.data[i],e)}(r,T,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new E(o):new S(o);a.height=n.height,u(n,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=p(e,0,o,this._toBBox),a=p(e,o,n,this._toBBox),l=g(t,a),u=y(t)+y(a);l<i?(i=l,s=o,r=u<r?u:r):l===i&&u<r&&(r=u,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=p(e,0,t,r),o=p(e,n-t,n,r);let a=m(s)+m(o);for(let i=t;i<n-t;i++){const t=e.children[i];d(s,e.leaf?r(t):t),a+=m(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];d(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else u(n,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 n=e;for(C.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.z)(e));else C.pushArray(n.children);n=C.pop()??null}}function u(e,t){p(e,0,e.children.length,t,e)}function p(e,t,n,i,r){r||(r=new E([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],d(r,e.leaf?i(s):s);return r}function d(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 f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const n=Math.max(e.minX,t.minX),i=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-n)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function I(e,t,n,i,r){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,a,n,t,r),s.push(n,a,a,t)}}const M=new s.A,C=new s.A,T=new s.A,_=new s.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class E extends v{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends v{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,n){n.d(t,{Qf:()=>a,Qh:()=>s,lM:()=>r});var i=n(34275);function r(e){if(!e)return 0;let t=u;for(const n in e)e.hasOwnProperty(n)&&(t+=o(e[n],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return a(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let n=p;for(let i=0;i<t;i++)n+=o(e[i]);return n}(e);let t=u;for(const n in e)e.hasOwnProperty(n)&&(t+=o(e[n]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?s(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return p+e.length*t}const u=32,p=16,d=145},6518(e,t,n){n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(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,i.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((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,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,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(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,n){n.d(t,{A:()=>y});var i=n(4576),r=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),u=n(90708),p=n(6518),d=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new p.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,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:(0,d.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(i.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 n of e){const e=this._boundsStore.get(n.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 n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),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 n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:s}=e;for(const e in s)n.attributes[e]=s[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_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,n){var i=n(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,n)=>new i.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};n.d(t,["T",0,r])},64714(e,t,n){n.d(t,{F0:()=>a,Vx:()=>p,e2:()=>c,f:()=>h});var i=n(44208),r=n(4718),s=n(99352),o=n(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 u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let n="";t&&(n+=`this${d(t)} = null;`);for(const t in e)n+=`this${d(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>t?{[t]:null,...e}:{...e}}}function d(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,n){n.d(t,{P:()=>C});var i=n(32198),r=n(69622),s=n(49186),o=n(53966),a=n(91869),l=n(17676),u=n(39516),p=n(91429),d=n(5443),c=n(39829),h=n(99917),y=n(21325),m=n(15375);const f=(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`${f(e.left,t)} ${e.operator} ${f(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let n="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)n+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";n+=`lower(n.${e.left.column})`}if(n+=" 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)),n+=`'${t.toLowerCase()}')`}return n}return t.unsupportedOperationFound=!0,""};var g=n(69860),b=n(99916),w=n(53902),I=n(42538),M=n(97552);let C=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(n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,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 n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,n,i){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return{features:[],cypherTranslationApplied:!1};let r;if(r=e||new M.A({where:"1=1",outFields:["*"]}),"link-chart"===n.type){const e=n,i=this._processingCacheUpdatesLookup.get(t.objectType.name??""),s=r.outFields;s&&1===s.length&&s[0]===m.dr&&"1=1"===r.where||await Promise.all(i??[]);const o=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],a=[];return o.forEach(n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.memberIdTypeLookup.get(n.attributes[m.Cz]),r=this.memberIdTypeLookup.get(n.attributes[m.KQ]),s=this._isEndEntitySpatial(i,n,m.Cz),o=this._isEndEntitySpatial(r,n,m.KQ);n.attributes[m.BL]=Number(s&&o)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.geographicLookup.get(t.objectType.name);i&&n.attributes[i.name]?n.attributes[m.BL]=1:n.attributes[m.BL]=0}n.attributes[m.T1]=n.geometry,a.push(n)}),{features:a,cypherTranslationApplied:!1}}return this.retrieveDataFromService(r,t,n,i)}async getConnectedRecordIds(e,t,n){const i=[];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,n]of s){const i=`${e}_ids`;o[i]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} 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 $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return i;const l=a.join(" UNION "),u=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new I.A({openCypherQuery:l,bindParameters:o}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];i.push({id:n[0],typeName:n[1]}),i.push({id:n[2],typeName:n[3]})}}return i}async getRelationshipsBetweenNodes(e,t,n){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;r[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} 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,w.executeQueryStreaming)(this.knowledgeGraph,new I.A({openCypherQuery:o,bindParameters:r}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,i){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const s={relationshipExclusionIds:n,possibleConnectionEntityIds:t},o=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;s[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} 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,u=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new I.A({openCypherQuery:a,bindParameters:s}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let i=l.get(n[1]);i||(i=new Set,l.set(n[1],i)),i.add(n[0])}}const p=[];for(const[e,t]of l)for(const n of t)p.push({id:n,typeName:e});return p}async refreshCacheContent(e,t,n,i=!0,r){const o=g.A.getInstance(),u=[],p=new Map,d=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))p.has(t)?p.get(t)?.push(e):p.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?p.set(t,null):e.members&&e.members.forEach(e=>{p.has(t)&&null!==p.get(t)?p.get(t)?.push(e.id):p.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&p.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&p.set(e.name,null)}));for(const[e,l]of p){const p=new Set(l),c=new Promise((u,c)=>{(async()=>{const u=new Set,c=[];let h,y="",f=!1;if(t||d.get(e)?.properties?.forEach(e=>{e.name&&u.add(e.name)}),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&u.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,u.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?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,u.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new I.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await g.read();if(t)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const o={properties:{}};for(o.id=t[i],i++,s++,f&&(o.originId=t[i],i++,s++,o.destinationId=t[i],i++,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]));i<t.length;i++)o.properties[c[i-s]]=t[i];p.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),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!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),i&&!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 p)b.members?.delete(e)})().then(()=>{u(null)}).catch(e=>{"AbortError"===e.name?u(null):c(e)})});u.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(u),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map(e=>e.id));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,n,i){const r=g.A.getInstance(),a=new Set,l=[];let p,M="",C=[],T=!1;const _="relationship"===t.graphType,A=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,v=n.sublayerIdsCache.get(t.objectType.name);let E=!A&&v?Array.from(v).sort():null;const S={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(E=e.objectIds);else if(null!=e.objectIds&&E&&E.length>0){const t=e.objectIds;e.objectIds=E.filter(e=>t.includes(e))}else if(null!=e.objectIds)E=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=[],{features:[],cypherTranslationApplied:T};e.objectIds=E}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach(e=>{a.add(e.name)}):n.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&a.add(e)})}if(null!=e.geometry){const i=e.geometry;let r;const o=n.dataManager.knowledgeGraph.serviceDefinition,m=o?.spatialReference,f=o?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,w=f?.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)),r=new d.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),r=(0,h.project)(i.extent,y.KK)):r=i.extent;if(g&&w&&m){if(4326!==m.wkid){const e=new d.A({spatialReference:m,xmax:g,ymax:w}),t=(0,h.project)(e,y.KK);g=t.xmax,w=t.ymax}if(r.xmax-r.xmin>g)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(r.ymax-r.ymin>w)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,u.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&a.add(e.name)})}M=_?`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&&a.add(t.geometryFieldName),a.forEach(e=>{M+=`, n.${e}`,l.push(e)}),p=new I.A({openCypherQuery:M,bindParameters:{param_filter_geom:new c.A({rings:(0,b.Wq)(r)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,u.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&a.add(e.name)}),n=f(i.parseTree,S),S.unsupportedOperationFound&&(n="")}let i="";i=_?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let r=!1;E&&(r=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=r?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",_&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&a.add(t.geometryFieldName),a.forEach(e=>{i+=`, n.${e}`,l.push(e)}),S.unsupportedOperationFound||(i=((e,t)=>{let n=e;return t.orderByFields?.length&&(n=function(e,t){const n=e.trimEnd();if(/\border\s+by\b/i.test(n))return o.A.getLogger("cypherUtils").warn("Query already contains an ORDER BY clause. Skipping addition of new ORDER BY."),e;const i=t.map(e=>e.trim()).filter(e=>!!e).map(e=>{const[t,n]=e.split(/\s+/);return t?`${t===m.dr?"ID(n)":`n.${t}`} ${"DESC"===n?.toUpperCase()?"DESC":"ASC"}`:null}).filter(e=>!!e);return i.length?`${n} ORDER BY ${i.join(", ")}`:e}(n,t.orderByFields)),null!=t.start&&(n=function(e,t){const n=e.trimEnd();return/\bskip\s+(\$\w+|\d+)\b/i.test(n)?(o.A.getLogger("cypherUtils").warn("Query already contains a SKIP clause. Skipping addition of new SKIP."),e):`${n} SKIP ${t}`}(n,t.start)),null!=t.num&&(n=function(e,t){const n=e.trimEnd();return/\blimit\s+(\$\w+|\d+)\b/i.test(n)?(o.A.getLogger("cypherUtils").warn("Query already contains a LIMIT clause. Skipping addition of new LIMIT."),e):`${n} LIMIT ${t}`}(n,t.num)),n})(i,e),T=!0),p=new I.A(E?{openCypherQuery:i,bindParameters:{ids:E}}:{openCypherQuery:i})}const x=(await(0,w.executeQueryStreaming)(n.dataManager.knowledgeGraph,p,i)).resultRowsStream.getReader();for(;;){const{done:e,value:i}=await x.read();if(e)break;const s=[];for(let e=0;e<i.length;e++){const t=i[e];let n=0,r=0;const o={properties:{}};for(o.id=t[n],n++,r++,_&&(o.originId=t[n],n++,r++,o.destinationId=t[n],n++,r++);n<t.length;n++)o.properties[l[n-r]]=t[n];s.push(o)}C=C.concat(r.writeToStore(s,m.dr,n.dataManager.geographicLookup.get(t.objectType.name)?.name))}return{features:C,cypherTranslationApplied:T}}_isEndEntitySpatial(e,t,n){for(const i of e??[])if(this.entityTypeNames.has(i)){const e=this.geographicLookup.get(i),r=e&&this.sublayerCaches.get(i)?.get(t.attributes[n]);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 n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}}),t}};(0,i.Cg)([(0,p.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"memberIdTypeLookup",void 0),C=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],C)},62796(e,t,n){n.d(t,{A:()=>me});var i=n(32198),r=n(37838),s=n(49186),o=n(4718),a=n(53966),l=n(25728),u=n(91429),p=(n(29953),n(78247)),d=n(5443),c=n(86738),h=n(39829),y=n(82799),m=n(99917),f=n(16930),g=n(21325),b=n(50498),w=n(55156),I=n(60950),M=n(89808),C=n(99959);const T=Symbol("isKnowledgeGraphGraphicOriginSymbol");var _;class A extends C.A{get[(_=T,I.ym)](){return this.sublayer}get[w.e](){return this.sublayer}get[M.Q](){return this.sublayer}constructor(e,t){super(),this[_]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const v=Symbol("isLinkChartGraphicOriginSymbol");var E;class S extends C.A{get[(E=v,I.ym)](){return this.sublayer}get[w.e](){return this.sublayer}get[M.Q](){return this.sublayer}constructor(e,t){super(),this[E]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var x=n(4146),k=n(83221),L=n(56390),N=n(64714),R=n(15375);const F=(0,n(17036).p)(),O=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,u.MZ)(F.fields)],n.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)(F.fieldsIndex)],n.prototype,"fieldsIndex",void 0),n=(0,i.Cg)([(0,u.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],n),n};var D=n(40736),P=n(63074),j=n(6455),B=n(87718),G=n(56658),Z=n(32756),$=n(54310),U=n(25036),q=n(82935),Q=n(10873),z=n(20569),Y=n(29005),H=n(20437),K=n(30524),W=n(46499),X=n(39383),V=n(96184),J=n(96576),ee=n(65494),te=n(41214),ne=n(53902),ie=n(22671),re=n(97552),se=n(30291),oe=n(88625),ae=n(37531),le=n(61322),ue=n(43937);function pe(e){if(!e.json)return e;e.json.write=de(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=de(e.write))}return e}function de(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:i,...r}=e;return function(e,t){const n=he.call(this,e,t);return n.enabled?{...r,...n}:n}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:he}}function he(e,t){const n=!!this.geometryType;let i={enabled:n};return n&&(i={...i,...ye.call(this,e,t)}),i}function ye(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let me=class extends(O((0,j.FJ)((0,G.J)((0,B.F)((0,P.dM)((0,Z.fY)((0,q.e)((0,U.j)((0,$.J)((0,l.M)(x.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=R.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 n=re.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,D.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:n}=e;return this.userHasUpdateItemPrivileges&&(t.supportsAdd=t.supportsDelete=t.supportsEditing=t.supportsQuery=t.supportsUpdate=n.supportsDeleteByOthers=n.supportsGeometryUpdate=n.supportsUpdateByOthers=!0),this.userHasFullEditingPrivileges&&t.supportsEditing&&(t.supportsAdd=t.supportsDelete=t.supportsUpdate=n.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(n=>{const i="esriFieldTypeOID"===n.fieldType?"esriFieldTypeInteger":n.fieldType,r=H.A.fromJSON({name:n.name,type:i,alias:n.alias,defaultValue:n.defaultValue,editable:n.editable,nullable:n.nullable,domain:n.domain&&t.has(n.domain)?t.get(n.domain).toJSON():void 0});e.push(r)}),e.push(H.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),H.A.fromJSON({name:R.M1,type:"esriFieldTypeInteger",alias:R.M1,editable:!1}),H.A.fromJSON({name:R.BL,type:"esriFieldTypeInteger",alias:R.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,D.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 R.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 A(this.parent,this);case"link-chart":return new S(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,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.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,D.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,D.iW)(this.graphType,this.graphTypeName,e):(0,D.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),n=(0,D.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new J.A({type:"simple",symbol:(0,D.UT)(n)});const e=(0,ee.r)((0,N.F0)(b.gy.toJSON("point")).renderer);return(0,ae.dt)(e.symbol,n),e}const i=(0,ee.r)((0,N.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,ae.dt)(i.symbol,n),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??f.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,D.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:n,queryEngine:i,cypherTranslationApplied:r}=await this._setupQueryObjects(e),s=this.graphicOrigin,o=ie.A.fromJSON(await i.executeQuery(this._createQueryEngineQueryJSON(n,r),t?.signal));return o.features.forEach(e=>{e.sourceLayer=this,e.origin=s}),o}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:n,queryEngine:i,cypherTranslationApplied:r}=await this._setupQueryObjects(e);return await i.executeQuery(this._createQueryEngineQueryJSON(n,r),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:n,queryEngine:i,cypherTranslationApplied:r}=await this._setupQueryObjects(e);return i.executeQueryForCount(this._createQueryEngineQueryJSON(n,r),t?.signal)}async queryExtent(e={},t){await this.load();const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r,cypherTranslationApplied:s}=await this._setupQueryObjects(n),o=await r.executeQueryForExtent(this._createQueryEngineQueryJSON(i,s),t?.signal);let a;return a=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new d.A(o.extent):new d.A,{count:o.count,extent:a}}async queryObjectIds(e,t){await this.load();const n=re.A.from(e);let i;if(this.parentCompositeLayer){if("link-chart"!==this.parentCompositeLayer.type||!this._cachedQueryEngine){const{features:e,cypherTranslationApplied:r}=await this.parentCompositeLayer.dataManager.getData(n,this,this.parentCompositeLayer,t);return i=this.loadQueryEngine(e),await i.executeQueryForIds(this._createQueryEngineQueryJSON(n,r),t?.signal)}i=this._cachedQueryEngine}else a.A.getLogger(this).warn("Attempting to query for object IDs with no features failed because the parent composite layer is missing or not yet loaded."),i=this.loadQueryEngine([]);return await i.executeQueryForIds(this._createQueryEngineQueryJSON(n,!1),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,D.O9)(e,this,this.parentCompositeLayer);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const n=await(0,ne.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,D.Gz)(n,this.graphTypeName),r={addedFeatures:i.addFeatureResults,updatedFeatures:i.updateFeatureResults,deletedFeatures:i.deleteFeatureResults,addedAttachments:i.addAttachmentResults,deletedAttachments:i.deleteAttachmentResults,updatedAttachments:i.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)]),i}loadQueryEngine(e){const t=new k.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=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 n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){if(!this.parentCompositeLayer)return a.A.getLogger(this).warn("Attempting to refresh the cached query engine with no features failed because the parent composite layer is missing or not yet loaded."),void(this._cachedQueryEngine=this.loadQueryEngine([]));const{features:e}=await this.parentCompositeLayer.dataManager.getData(new re.A({where:"1=1",outFields:[R.dr]}),this,this.parentCompositeLayer);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)}_createQueryEngineQueryJSON(e,t){const n=e.toJSON();return t&&delete n.resultOffset,n}async _setupQueryObjects(e,t){const n=re.A.from(e),i=n.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,m.initializeProjection)(i.spatialReference,g.KK),n.geometry=(0,m.project)(i instanceof h.A||i instanceof y.A||i instanceof c.A?i:i.extent,g.KK)),!this.parentCompositeLayer)return a.A.getLogger(this).warn("Attempting to execute a query with no features failed because the parent composite layer is missing or not yet loaded."),{resolvedQuery:n,queryEngine:this.loadQueryEngine([]),cypherTranslationApplied:!1};if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine,cypherTranslationApplied:!1};const{features:r,cypherTranslationApplied:s}=await this.parentCompositeLayer.dataManager.getData(n,this,this.parentCompositeLayer,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(r),cypherTranslationApplied:s}}};(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(P.sU)))],me.prototype,"blendMode",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"capabilities",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"isTable",null),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],me.prototype,"charts",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],me.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(j.Dp)))],me.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(j.KV)))],me.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"editingEnabled",null),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(P.LF)))],me.prototype,"effect",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,u.MZ)({type:oe.A})],me.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(B.Y)))],me.prototype,"featureEffect",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(z.d)))],me.prototype,"featureReduction",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"fields",null),(0,i.Cg)([(0,u.MZ)({type:p.A})],me.prototype,"formTemplate",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"geometryType",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"geometryFieldName",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"graphicOrigin",null),(0,i.Cg)([(0,u.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphType",void 0),(0,i.Cg)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphTypeName",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"hasM",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"hasZ",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],me.prototype,"id",void 0),(0,i.Cg)([(0,u.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,i.Cg)([(0,u.MZ)({type:[W.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const i=[["ESRI__AGGREGATION_COUNT",R.M1],["ESRI__ORIGIN_ID",R.Cz],["ESRI__DESTINATION_ID",R.KQ],["ESRI__LAYOUT_GEOMETRY",R.T1]];try{for(const t of e)for(const[e,n]of i)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return X.w.call(this,e,t,n)},write:ce()}})],me.prototype,"labelingInfo",null),(0,i.Cg)([(0,u.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,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.fV)))],me.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.hG)))],me.prototype,"maxScale",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.hn)))],me.prototype,"minScale",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"objectIdField",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"objectType",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.ke)))],me.prototype,"opacity",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Z.ne)))],me.prototype,"orderBy",void 0),(0,i.Cg)([(0,u.MZ)({clonable:!1})],me.prototype,"parent",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.M6)))],me.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],me.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,json:{write:{overridePolicy:ye}}})],me.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,u.MZ)({types:te.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],me.prototype,"renderer",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"source",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"spatialReference",null),(0,i.Cg)([(0,u.MZ)({type:Y.A})],me.prototype,"templates",null),(0,i.Cg)([(0,u.MZ)({type:V.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,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"title",null),(0,i.Cg)([(0,ue.K)("title")],me.prototype,"writeTitle",null),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],me.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(q.B)))],me.prototype,"useViewTime",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"userHasEditingPrivileges",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"userHasFullEditingPrivileges",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],me.prototype,"visible",void 0),me=(0,i.Cg)([(0,u.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],me)},69860(e,t,n){n.d(t,{A:()=>a});var i=n(65864),r=n(90708),s=n(43334),o=n(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 n=this.readFromStoreById(e);n&&t.push(n)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l=null;n&&e.properties[n]&&(l=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[o.Cz]=e.originId,e.properties[o.KQ]=e.destinationId),e.properties[t]=e.id;let u=e.properties;if(e.id){const t=this._featureLookup.get(e.id);if(t?.attributes){u={...t.attributes,...u};const e=n&&u[n];null!=e&&(u[n]=(0,i.rS)(e)),l=l??t.geometry}}const p=new s.Om(l?.clone(),u,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,p),a.push(p)}),a}}},15375(e,t,n){n.d(t,["BL",0,"LC.ESRI__IsSpatial","Cz",0,"ESRI__OriginID","KQ",0,"ESRI__DestID","M1",0,"ESRI__AggregationCount","T1",0,"ESRI__LayoutGeometry","dr",0,"ESRI__ID"])},40736(e,t,n){n.d(t,{Gz:()=>U,O9:()=>$,hZ:()=>Z,CP:()=>Q,dD:()=>q,UT:()=>O,MY:()=>D,Td:()=>F,iW:()=>P,e$:()=>j,$L:()=>z,N1:()=>B,qN:()=>N});var i=n(68197),r=n(92602),s=n(70333),o=(n(49186),n(91869)),a=n(17676),l=n(78247),u=n(89909),p=n(99917),d=n(16930),c=n(52039),h=n(99352),y=n(15375),m=n(29005),f=n(46499),g=n(73913),b=n(77548),w=n(80812),I=n(10407),M=n(53902),C=n(25927),T=n(32198),_=n(69622),A=n(91429);let v=class extends _.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,T.Cg)([(0,A.MZ)()],v.prototype,"entityAdds",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"entityUpdates",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"entityDeletes",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"relationshipAdds",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"relationshipUpdates",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"relationshipDeletes",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"options",void 0),v=(0,T.Cg)([(0,A.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],v);var E=n(23150),S=n(94128),x=n(40863),k=n(68249);const L=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function N(e,t,n){return(async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,L(e,n));const r=await(0,M.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const i=r.get(L(e,n));if(i){const e=JSON.parse(i);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}})(e,t,n)}const R=["#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 F(e){return e<0||e>=R.length?new i.A("#8f8f82"):new i.A(R[e])}function O(e){const t=e.toArray();return new x.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 D(e){let t="ESRI__ID",n=4;for(const i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,n=2):"esriFieldTypeString"===i.fieldType&&n>3&&(t=i.name,n=3)}return t}function P(e,t,n){const i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new f.A({labelExpressionInfo:new g.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new k.A(i)}),s=new f.A({labelExpressionInfo:new g.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new k.A({...i,yoffset:"12px"})});return"entity"===e?[r]:[s]}function j(e,t,n){const i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new f.A({labelExpressionInfo:new g.A({expression:r}),labelPlacement:"above-center",symbol:new k.A(i)})]:"polyline"===t?[new f.A({labelExpressionInfo:new g.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new k.A(i)})]:"polygon"===t?[new f.A({labelExpressionInfo:new g.A({expression:r}),labelPlacement:"always-horizontal",symbol:new k.A(i)})]:null}async function B(e,t,n){return(async(e,t,n)=>{let i=!0,o=!1,a=!1;if(!r.A.userPrivilegesApplied)return{edit:i,fullEdit:o,updateItem:a};const l=await(0,b.wI)(t,n);if(!l)return{edit:i,fullEdit:o,updateItem:a};const u=s.id?.getCredential(`${l}/sharing`,{...n,prompt:!1});if(!u)return{edit:i,fullEdit:o,updateItem:a};const p=new w.default({id:e,portal:{url:l}});return await p.load(n),({features:{edit:i,fullEdit:o},content:{updateItem:a}}=(0,I.It)(p)),{edit:i,fullEdit:o,updateItem:a}})(e,t,n).catch(e=>((0,a.QP)(e),{edit:!0,fullEdit:!1,updateItem:!1}))}const G={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function Z(e){const{capabilities:t,allowGeometryUpdates:n,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:r}}}=e?.serviceDefinition||G,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:i},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&&n,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,n){const i=new v,r=t.graphTypeName,s=t.graphType,a="knowledge-graph"===n.type?t.geometryFieldName:null,l=!!t.fieldsIndex.get(a)?.editable,u=e=>{const n={...e};for(const e of t.fields)e.editable||delete n[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete n[t];return n},h=async e=>{await(0,p.initializeProjection)(e.spatialReference,d.A.WGS84);const t=(0,p.project)(e,d.A.WGS84);return"point"===t.type?t.normalize():(await(0,c.el)(t))[0]};for(const t of e.addFeatures??[]){const e=u(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===r&&("entity"===s?(i.entityAdds||(i.entityAdds=[]),a&&t.geometry&&(e[a]=await h(t.geometry)),i.entityAdds.push(new C.A({properties:e,typeName:r}))):(i.relationshipAdds||(i.relationshipAdds=[]),i.relationshipAdds.push(new E.A({properties:e,typeName:r}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[y.dr],n=u(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===r&&("entity"===s?(i.entityUpdates||(i.entityUpdates=[]),a&&l&&t.geometry&&(n[a]=await h(t.geometry)),i.entityUpdates.push(new C.A({id:e,properties:n,typeName:r}))):(i.relationshipUpdates||(i.relationshipUpdates=[]),i.relationshipUpdates.push(new E.A({id:e,properties:n,typeName:r}))))}const m=new Map;for(const t of e.deleteFeatures??[])if((0,S.D)(t)){const e=t,n=(0,o.tE)(m,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===r&&n.ids.push(e.attributes[y.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,o.tE)(m,r,()=>({typeName:r,ids:[]})).ids.push(t.objectId);for(const e of m.values())e.ids.length>0&&("entity"===s?(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 n={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const i of e.editResults)if(i.typeName===t){for(const e of i.adds)n.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.updates)n.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.deletes)n.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return n}function q(e){if(!e.objectType)return null;const t=[];for(const n of e.fields)!n.name.includes("ESRI__")&&n.editable&&"geometry"!==n.type&&t.push(new u.A({fieldName:n.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 z=e=>{let t="";const n=e.split("/"),i=n.lastIndexOf("KnowledgeGraphServer");return i>0&&(t=n[i-1]),t}},99916(e,t,n){n.d(t,{Wq:()=>l,aq:()=>a}),n(52106);var i=n(49186),r=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(69647)),s=n(53902),o=n(42538);async function a(e,t,n){const i=[],r=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),a={},l=[];for(const[e,t]of r){if(t.length<1)continue;const n=`${e}_ids`;a[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const u=l.join(" UNION "),p=new o.A({openCypherQuery:u,bindParameters:a}),d=(await(0,s.executeQueryStreaming)(t,p,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await d.read();if(e)break;for(const e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}function l(e){if(!e.spatialReference.isWGS84)throw new i.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]])}n(40863),n(94985),n(68249),n.d(t,["k5",0,e=>r.P_.get(e)??"radial-root-centric"])},82935(e,t,n){var i=n(32198),r=n(91429),s=n(89317),o=n(30524),a=n(96184),l=n(73133),u=n(79677),p=n(10184),d=n(36005);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:s.K}}};n.d(t,["B",0,c,"e",0,e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const n=t.timeInfo.exportOptions;if(!n)return null;const i=n.timeOffset,r=l.j.fromJSON(n.timeOffsetUnits);return i&&r?new p.A({value:i,unit:r}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,r.MZ)({type:u.A,json:{write:!1}})],n.prototype,"timeExtent",void 0),(0,i.Cg)([(0,r.MZ)({type:p.A})],n.prototype,"timeOffset",void 0),(0,i.Cg)([(0,d.w)("service","timeOffset",["timeInfo.exportOptions"])],n.prototype,"readOffset",null),(0,i.Cg)([(0,r.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"timeInfo",null),(0,i.Cg)([(0,r.MZ)(c)],n.prototype,"useViewTime",void 0),n=(0,i.Cg)([(0,r.$K)("esri.layers.mixins.TemporalLayer")],n),n}])},96184(e,t,n){n.d(t,{A:()=>h});var i=n(32198),r=n(69540),s=n(25482),o=n(91429),a=n(79677),l=n(10184),u=n(56400),p=n(36005),d=n(43937);function c(e,t){return l.A.fromJSON({value:e,unit:t})}let h=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?a.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?c(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?c(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,p.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,d.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i.Cg)([(0,p.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i.Cg)([(0,d.K)("interval")],h.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,u.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i.Cg)([(0,o.$K)("esri.layers.support.TimeInfo")],h)},17036(e,t,n){n.d(t,{p:()=>l});var i=n(44208),r=n(53966),s=n(20437),o=n(95466),a=n(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");r.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const n=this.fieldsIndex?.has(t);n||r.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},8460(e,t,n){n.d(t,{$C:()=>y,Hh:()=>o,Tu:()=>c,Wg:()=>h,Xq:()=>f,i6:()=>g,pM:()=>d,vJ:()=>m});var i=n(2741);let r,s=null;function o(){return r||(r=n.e(3666).then(n.bind(n,3666)).then(({default:e})=>e({locateFile:e=>(0,i.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 u(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 p(e,t,n,i,r,o){const a=n.length,l=r.length,u=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(d+2*u)+l*(2*p),h=s._malloc(c);try{const d=h+16-h%16,c=d+a*u,y=c+a*u,m=y+l*p,f=m+l*p,g=()=>[s.HEAPF64.subarray(d>>3,(d>>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(f,f+a)],[b,w,I,M,C]=g();b.set(n),w.set(i),I.set(r),M.set(o),C.set(t);const T=e(a,f,d,c,l,y,m);let _=null,A=null;if(0===T.value){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),n=s.getLayoutLinksVertices(),i=s.countLayoutLinksVertices();!l||e&&t?i&&!n?T.value=1:(_={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(n>>3,(n>>3)+2*i))},A=s.getAuxiliaryGraphicElements()):T.value=1}const[v,E,S,x,k]=g();return n.set(v),i.set(E),r.set(S),o.set(x),t.set(k),{status:T.value,links:_,graphics:A}}finally{s._free(h),s.cleanupLayout()}}var d,c,h,y,m,f,g,b;(b=d||(d={})).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},b.apply=function(e,t,n,i,r,o,a=2,l=1,u=-1){return p((t,n,i,r,o,p,d)=>s.applyForceDirectedLayout(e,t,n,i,r,o,p,d,a,l,u),t,n,i,r,o)},function(e){e.apply=function(e,t,n,i,r,o,a=2,l=1,u=-1){return p((t,n,i,r,o,p,d)=>s.applyCommunityLayout(e,t,n,i,r,o,p,d,a,l,u),t,n,i,r,o)}}(c||(c={})),function(e){e.apply=function(e,t,n,i,r,o){return p((t,n,i,r,o,a,l)=>s.applySimpleLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(h||(h={})),function(e){e.apply=function(e,t,n,i,r,o){return p((t,n,i,r,o,a,l)=>s.applyHierarchicalLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(y||(y={})),function(e){e.apply=function(e,t,n,i,r,o){return p((t,n,i,r,o,a,l)=>s.applyRadialTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(m||(m={})),function(e){e.apply=function(e,t,n,i,r,o){return p((t,n,i,r,o,a,l)=>s.applySmartTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(f||(f={})),function(e){e.apply=function(e,t,n,i,r,o,a,l,d,c,h,y){return p((t,n,i,a,l,p,m)=>{if(r.length!==t)return{value:1};if(o.length!==t)return{value:1};if(d.length!==l)return{value:1};if(c.length!==l)return{value:1};const f=Float64Array.BYTES_PER_ELEMENT,g=16,b=s._malloc(g+t*f),w=s._malloc(g+t*f),I=s._malloc(g+l*f),M=s._malloc(g+l*f),C=b+g-b%g,T=w+g-w%g,_=I+g-I%g,A=M+g-M%g;try{return s.HEAPF64.subarray(C>>3,(C>>3)+t).set(r),s.HEAPF64.subarray(T>>3,(T>>3)+t).set(o),s.HEAPF64.subarray(_>>3,(_>>3)+l).set(d),s.HEAPF64.subarray(A>>3,(A>>3)+l).set(c),s.applyChronologicalLayout(e,t,n,i,a,C,T,l,p,m,_,A,h,u(y))}finally{s._free(b),s._free(w),s._free(I),s._free(M)}},t,n,i,a,l)}}(g||(g={}))},69647(e,t,n){var i=n(66552);const r=(0,i.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),s=(0,i.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"}),o=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"]]);n.d(t,["P_",0,o,"SJ",0,r,"lg",0,s])},54628(e,t,n){n.d(t,{lV:()=>s,zI:()=>r});var i=n(11254);async function r(e,t,n){if(!e||!t||!e.includes("/resources"))return!1;const r=t+"/resources",s=e.includes("/resources/")?e.split("/resources/")[1]:e;if(!s)return!1;let o=1;for(;-1!==o;){const e=(await(0,i.A)(r,{query:{f:"json",start:o,num:100}})).data,t=e?.resources??[];for(const e of t)if(e.resource===s)return"number"==typeof n&&e.created===n;if(null==e.nextStart||!t.length)break;o=e.nextStart}return!1}async function s(e,t){if(!e.length||!t)return new Map;const n=t+"/resources";let r=1;const s=new Map;for(;-1!==r;){const e=(await(0,i.A)(n,{query:{f:"json",start:r,num:100}})).data,t=e?.resources??[];for(const e of t)"number"==typeof e.created&&s.set(e.resource,e.created);if(null==e.nextStart||!t.length)break;r=e.nextStart}const o=new Map;for(const t of e){const e=t.includes("/resources/")?t.split("/resources/")[1]:t,n=s.get(e);null!=n&&o.set(t,n)}return o}n(49186),n(53966),n(17676),n(86738),n(8460)},10407(e,t,n){n.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>p,Y:()=>a,bK:()=>l,sQ:()=>d});var i=n(99917),r=n(16930),s=n(28735);function o(e,t){if(!a(e,t)){const n=e.typeKeywords;n?n.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,c.HOSTED_SERVICE)}function u(e,t){const n=e.typeKeywords;if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}function p(e,t,n){n?o(e,t):u(e,t)}async function d(e){const t=e.clone().normalize();let n;if(t.length>1)for(const e of t)n?e.width>n.width&&(n=e):n=e;else n=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 n=r.A.WGS84;return await(0,i.initializeProjection)(t,n),(0,i.project)(e,n)}(n)}const c={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",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",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function h(e){const{portal:t,isOrgItem:n,itemControl:i}=e,r=t.user?.privileges;let s=!r||r.includes("features:user:edit"),o=!!n&&!!r?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}n.d(t,["mm",0,c])},25927(e,t,n){n.d(t,{A:()=>a});var i=n(32198),r=n(91429),s=n(86738),o=n(54238);let a=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Entity")],a)},54238(e,t,n){n.d(t,{A:()=>o});var i=n(32198),r=n(91429),s=n(77901);let o=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"typeName",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"id",void 0),o=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],o)},77901(e,t,n){n.d(t,{A:()=>o});var i=n(32198),r=n(25482),s=n(91429);let o=class extends r.o{constructor(e){super(e),this.properties={}}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],o.prototype,"properties",void 0),o=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.GraphObject")],o)},42538(e,t,n){n.d(t,{A:()=>l});var i=n(32198),r=n(91429),s=n(16930),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,i.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,i.Cg)([(0,r.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)({type:s.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},40662(e,t,n){n.d(t,{A:()=>o});var i=n(32198),r=n(91429),s=n(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.ObjectValue")],o)},42095(e,t,n){n.d(t,{A:()=>a});var i=n(32198),r=n(25482),s=n(91429),o=n(77901);let a=class extends r.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,s.MZ)({type:[o.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.Path")],a)},23150(e,t,n){n.d(t,{A:()=>a});var i=n(32198),r=n(91429),s=n(82799),o=n(54238);let a=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,i.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Relationship")],a)},2272(e,t,n){n.d(t,{Dl:()=>u,gf:()=>d,jV:()=>l,lF:()=>p});var i=n(92602),r=n(70333),s=n(4718),o=n(84952),a=n(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function p(e,t,n){const i={};for(const r in e){if("declaredClass"===r)continue;const s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[r]=s.map(e=>p(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?s:JSON.stringify(s);else i[r]=s}return i}async function d(e,t,s){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&i.A.request.useIdentity&&await Promise.all([n.e(5620),n.e(4372),n.e(5071)]).then(n.bind(n,50148));const l=await r.id.getCredential(e,s);return l?.token}},62046(e,t,n){n.d(t,{Fe:()=>y,KU:()=>b,Nk:()=>u,X5:()=>s});var i=n(68197),r=n(93397);function s(e,t,n){if(!e)return;const i=(0,r.lW)(e),s=function(e){const t=(0,r.lW)(e);if("CIMTextSymbol"===t?.type)return t.height??0;let n=0;if(t?.symbolLayers)for(const e of t.symbolLayers)(0,r.MM)(e)&&null!=e.size&&e.size>n?n=e.size:(0,r.mA)(e)&&null!=e.width&&e.width>n?n=e.width:(0,r.jn)(e);return n}(e);0!==s?o(i,t/s,!1,n):function(e,t){if(e)if("CIMTextSymbol"!==e.type){if(e.symbolLayers)for(const n of e.symbolLayers)switch(n.type){case"CIMPictureMarker":case"CIMVectorMarker":n.size=t;break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":n.width=t}}else e.height=t}(i,t)}function o(e,t,n,i){if(e)if("CIMTextSymbol"!==e.type){if(n&&e.effects)for(const n of e.effects)l(n,t);if(e.symbolLayers)for(const n of e.symbolLayers){switch(n.type){case"CIMPictureMarker":case"CIMVectorMarker":a(n,t,i);break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":!i?.preserveOutlineWidth&&n.width&&(n.width*=t);break;case"CIMPictureFill":n.height&&(n.height*=t),n.offsetX&&(n.offsetX*=t),n.offsetY&&(n.offsetY*=t);break;case"CIMHatchFill":o(n.lineSymbol,t,!0,{...i,preserveOutlineWidth:!1}),n.offsetX&&(n.offsetX*=t),n.offsetY&&(n.offsetY*=t),n.separation&&(n.separation*=t)}if(n.effects)for(const e of n.effects)l(e,t)}}else null!=e.height&&(e.height*=t)}function a(e,t,n){if(e&&(e.markerPlacement&&function(e,t){switch((0,r.zr)(e)&&e.offset&&(e.offset*=t),e.type){case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineSameSize":if(e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.placementTemplate&&e.placementTemplate.length){const n=e.placementTemplate.map(e=>e*t);e.placementTemplate=n}break;case"CIMMarkerPlacementAlongLineVariableSize":if(e.maxRandomOffset&&(e.maxRandomOffset*=t),e.placementTemplate&&e.placementTemplate.length){const n=e.placementTemplate.map(e=>e*t);e.placementTemplate=n}break;case"CIMMarkerPlacementOnLine":e.startPointOffset&&(e.startPointOffset*=t);break;case"CIMMarkerPlacementAtExtremities":e.offsetAlongLine&&(e.offsetAlongLine*=t);break;case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementOnVertices":break;case"CIMMarkerPlacementAtRatioPositions":e.beginPosition&&(e.beginPosition*=t),e.endPosition&&(e.endPosition*=t);break;case"CIMMarkerPlacementPolygonCenter":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMMarkerPlacementInsidePolygon":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.stepX&&(e.stepX*=t),e.stepY&&(e.stepY*=t)}}(e.markerPlacement,t),e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.anchorPoint&&"Absolute"===e.anchorPointUnits&&(e.anchorPoint={x:e.anchorPoint.x*t,y:e.anchorPoint.y*t}),e.size=null!=e.size?e.size*t:0,"CIMVectorMarker"===e.type&&e.markerGraphics))for(const i of e.markerGraphics)e.scaleSymbolsProportionally||o(i.symbol,t,!0,n)}function l(e,t){if(!(0,r.Kq)(e))switch(e.type){case"CIMGeometricEffectArrow":case"CIMGeometricEffectDonut":e.width&&(e.width*=t);break;case"CIMGeometricEffectBuffer":e.size&&(e.size*=t);break;case"CIMGeometricEffectCut":e.beginCut&&(e.beginCut*=t),e.endCut&&(e.endCut*=t),e.middleCut&&(e.middleCut*=t);break;case"CIMGeometricEffectDashes":if(e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.dashTemplate&&e.dashTemplate.length){const n=e.dashTemplate.map(e=>e*t);e.dashTemplate=n}break;case"CIMGeometricEffectExtension":case"CIMGeometricEffectJog":case"CIMGeometricEffectRadial":e.length&&(e.length*=t);break;case"CIMGeometricEffectMove":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":e.offset&&(e.offset*=t);break;case"CIMGeometricEffectRegularPolygon":e.radius&&(e.radius*=t);break;case"CIMGeometricEffectTaperedPolygon":e.fromWidth&&(e.fromWidth*=t),e.length&&(e.length*=t),e.toWidth&&(e.toWidth*=t);break;case"CIMGeometricEffectWave":e.amplitude&&(e.amplitude*=t),e.period&&(e.period*=t)}}function u(e){const t=[];return p((0,r.lW)(e),t),t.length?new i.A((0,r.e6)(t[0])):null}function p(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||i&&((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&d(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{p(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":d(t,e.color);break;case"CIMGradientFill":c(t,e);break;case"CIMHatchFill":p(e.lineSymbol,t)}}function d(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function c(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&h(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e,t.colorRamp)}}function h(e,t){t&&(t.fromColor&&d(e,t.fromColor),t.toColor&&d(e,t.toColor))}function y(e,t,n){t instanceof i.A||(t=new i.A(t));const s=(0,r.lW)(e);s&&m(s,t,n)}function m(e,t,n){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const s="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(const e of i.symbolLayers){if(e.colorLocked)continue;if(s)if(n){const{layersToColor:t}=n;if(((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))&&"fill"===t||(0,r.jn)(e)&&"outline"===t)continue}else if((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))continue;const i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{m(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":f(e,t);break;case"CIMHatchFill":m(e.lineSymbol,t,n)}}}function f(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&g(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":g(e.colorRamp,t)}}function g(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}function b(e,t,n=!1){const i=(0,r.lW)(e);if(n&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){const e=t-(i.angle||0);for(const t of i.symbolLayers)if((0,r.MM)(t)){let n=t.rotation||0;t.rotateClockwise?n-=e:n+=e,t.rotation=n}i.angle=t}}else i.angle=t}},37531(e,t,n){n.d(t,{dt:()=>c,GG:()=>g,UQ:()=>f,Sx:()=>p});var i=n(68197),r=n(60999),s=(n(90629),n(51850)),o=(n(76369),n(62046)),a=(n(2741),n(11254),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new i.A([128,128,128]);var l=n(28975),u=n(33910);function p(e,t){if(!e)return null;let n=null;return(0,u.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new i.A(n):null}(e):(0,u.$y)(e)&&(n="cim"===e.type?(0,o.Nk)(e):e.color?new i.A(e.color):null),n?d(n,t):null}function d(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new i.A(n)}function c(e,t,n){e&&(t||null!=n)&&(t&&(t=new i.A(t)),(0,u.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const s=(e,r=!1)=>{let s=t??e??null;return null!=n?.override&&(!s&&r&&(s=new i.A([255,255,255])),s&&(s.a=n.override)),d(s,n?.add)};r.forEach(e=>{if("water"===e.type)return void(e.color=d(e.color,n?.add));const t=null!=e.material?e.material.color:null,i=s(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.A({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=d(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=s(e.marker.color))})}(e,t,n):(0,u.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=d(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=d(e.outline.color,n?.add))}(e,t,n))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,n){for(let i=0;i<3;i++){const r=e[i];switch(r){case"symbol-value":{const e=n[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(null!=r&&t[i])return r/t[i]}}return null}function m(e,t,n,i){switch(e){case"proportional":return n*i;case"symbol-value":return null!=t?t:n;default:return e}}async function f(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,r.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=h(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=y(t,s.Un,[e.width,void 0,e.height]);null!=n&&(e.width=m(t[0],e.width,1,n),e.height=m(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:r}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),i=await t(e,10),{width:r,height:s,depth:o}=e,a=[r,o,s];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),s=y(t,i,r);null!=s&&(e.width=m(t[0],r[0],i[0],s),e.depth=m(t[1],r[1],i[1],s),e.height=m(t[2],r[2],i[2],s))}(e,t)}}(e,t))}(e,t):void((0,u.$y)(e)&&function(e,t){const n=h(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n;break;case"simple-fill":case"picture-fill":break;case"cim":(0,o.X5)(e,n,{preserveOutlineWidth:!1})}}(e,t))}function g(e,t,n){if(e&&null!=t)if((0,u.wk)(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,u.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,o.KU)(e,t,!0)}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4934,9397],{67996(e,t,n){n.d(t,{cZ:()=>k,XW:()=>F,fe:()=>L});var i=n(11254),r=n(49186),s=n(91869),o=(n(90708),n(92722)),a=n(16930);class l{constructor(){this.version="",this.queryResult=new u}}class u{constructor(){this.featureResult=new p}}class p{constructor(){this.objectIdFieldName="",this.uniqueIdField=new d,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 d{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 f{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class g{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var I=n(45724),M=n(93637),C=n(49403);const T={upperLeft:0,lowerLeft:1},_={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};function A(e){const t=new l;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const i=n.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=i.objectid_field_name,r.exceededTransferLimit=i.exceeded_transfer_limit,r.hasM=i.has_m,r.hasZ=i.has_z,r.geometryType=(0,M.i7)(C.bV,i.geometry_type.value),r.globalIdFieldName=i.globalid_field_name,r.geohashFieldName=i.geohash_field_name;const s=r.uniqueIdField,o=i.unique_id_field;s.name=o.name,s.isSystemMaintained=o.isSystemMaintained;const a=r.geometryProperties,u=i.geometry_properties;a.shapeAreaFieldName=u.shapeAreaFieldName,a.shapeLengthFieldName=u.shapeLengthFieldName,a.units=u.units;const p=r.spatialReference,d=i.spatial_reference;p.wkid=d.wkid,p.latestWkid=d.latestWkid,p.vcsWkid=d.vcsWkid,p.latestVcsWkid=d.latestVcsWkid,p.wkt=d.wkt,r.transform=x(i.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=i.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=E(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const f=r.values,b=i.values_count();for(let e=0;e<b;e++)f.push(i.get_value_at(e));const I=r.features,T=i.features,_=T.size();if(_>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<_;e++){const t=new g,n=T.get(e),i=t.attributes,r=n.attributes_count();for(let e=0;e<r;e++)i.push(n.get_attribute_at(e));const s=n.get_compressed_geometry();s&&(t.compressedGeometry=v(s),t.centroid=v(n.get_centroid()));const o=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=v(t);o.push(n),t.delete()}a.delete(),I.push(t),n.delete()}T.delete();const A=r.geometryFields,k=i.geometry_fields,L=k.size();for(let e=0;e<L;e++){const t=k.get(e),n=S(t);A.push(n),t.delete()}return k.delete(),t}function v(e){const t=new b;t.geometryType=(0,M.i7)(C.bV,e.geometry_type.value);const n=[],i=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=n,t.coords=i,t}function E(e){const t=new f;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,M.i7)(C.r5,e.field_type.value),t.sqlType=(0,M.i7)(_,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function S(e){const t=E(e);return t.geometryType=(0,M.i7)(C.bV,e.geometry_type.value),t}function x(e){const t=new h;t.quantizeOriginPosition=(0,M.i7)(T,e.quantizeOriginPosition.value);const n=t.scale,i=e.scale;n.xScale=i.xScale,n.yScale=i.yScale,n.mScale=i.mScale,n.zScale=i.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 k(e,t,n){t??=!1;const o={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal}),s=await n.data;return async function(e){const t=new((await(0,I.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),i=new Map;if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.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),n=s.query_identifier_set(t),a=[];if(1===n.id_array_type.value){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(3===n.id_array_type.value){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(2===n.id_array_type.value){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(0!==n.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}i.set(t,a)}return t.delete(),i}(new Uint8Array(s))}(e,n).then(e=>{!function(e,t){for(const[n,i]of e){const e=(0,s.tE)(t.namedTypeDefinitions,n,()=>({useAllData:!1,members:new Map}));for(const t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,o)}),o}async function L(e){const t=await(0,I.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[i,r]of n.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const n=r.members.keys();let s=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,u=new t.GlobalIdArray,p=new t.IdentifierArray,d=new t.ObjectIdentifierSet;for(const e of n)o&&(s=!isNaN(Number(e)),o=!1),s?a.add_objectid(Number(e)):(l.add_string(e),u.add_globalid(e)),p.add_identifier(e);d.set_oid_array(a),d.set_string_array(l),d.set_globalid_array(u),d.set_identifier_array(p),a.delete(),l.delete(),u.delete(),p.delete(),e.put_identifier_set(i,d),d.delete()}}(n,t,e);const i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(n),i.encode();const e=i.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 i.delete(),t}finally{n.delete()}}async function N(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,I.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const i=A(t.get_feature_collection());return t.delete(),i}(await n.data)}function R(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:n,hasM:i}=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})),u=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(u,{id:u,linkChartLocation:new o.A(e,a.compressedGeometry.coords,n,i)})}else l.members.set(u,{id:u})}return t}const F={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){const n=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&n.push(N(e.entitiesUrl,t).then(e=>{R(e,i)})),e.relationshipsUrl&&n.push(N(e.relationshipsUrl,t).then(e=>{R(e,i)})),await Promise.all(n),i}(e,t)}},75503(e,t,n){n.d(t,{wq:()=>a});var i=n(4576),r=n(21818),s=(n(44208),n(15142)),o=n(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(),M.prune(),C.prune(),T.prune(),_.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(M.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;w(e,o)&&(n.leaf?t(s):b(e,o)?l(s,t):M.push(s))}n=M.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(M.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(w(e,s)){if(t.leaf||b(e,s))return!0;M.push(r)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;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 E([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),_.clear();n||T.length>0;){if(n||(n=T.pop(),s=T.data[T.length-1],o=_.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.z)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),T.push(n),this._condense(T),this;a||n.leaf||!b(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(T.push(n),_.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new E(e.slice(t,n+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new S([]);o.height=i;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));I(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);I(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return u(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);T.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=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=f(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,T);for(s.children.push(e),d(s,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)d(t.data[i],e)}(r,T,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new E(o):new S(o);a.height=n.height,u(n,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=p(e,0,o,this._toBBox),a=p(e,o,n,this._toBBox),l=g(t,a),u=y(t)+y(a);l<i?(i=l,s=o,r=u<r?u:r):l===i&&u<r&&(r=u,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=p(e,0,t,r),o=p(e,n-t,n,r);let a=m(s)+m(o);for(let i=t;i<n-t;i++){const t=e.children[i];d(s,e.leaf?r(t):t),a+=m(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];d(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else u(n,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 n=e;for(C.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.z)(e));else C.pushArray(n.children);n=C.pop()??null}}function u(e,t){p(e,0,e.children.length,t,e)}function p(e,t,n,i,r){r||(r=new E([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],d(r,e.leaf?i(s):s);return r}function d(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 f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const n=Math.max(e.minX,t.minX),i=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-n)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function I(e,t,n,i,r){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,a,n,t,r),s.push(n,a,a,t)}}const M=new s.A,C=new s.A,T=new s.A,_=new s.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class E extends v{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends v{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,n){n.d(t,{Qf:()=>a,Qh:()=>s,lM:()=>r});var i=n(34275);function r(e){if(!e)return 0;let t=u;for(const n in e)e.hasOwnProperty(n)&&(t+=o(e[n],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return a(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let n=p;for(let i=0;i<t;i++)n+=o(e[i]);return n}(e);let t=u;for(const n in e)e.hasOwnProperty(n)&&(t+=o(e[n]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?s(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return p+e.length*t}const u=32,p=16,d=145},6518(e,t,n){n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(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,i.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((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,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,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(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,n){n.d(t,{A:()=>y});var i=n(4576),r=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),u=n(90708),p=n(6518),d=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new p.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,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:(0,d.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(i.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 n of e){const e=this._boundsStore.get(n.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 n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),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 n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:s}=e;for(const e in s)n.attributes[e]=s[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_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,n){var i=n(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,n)=>new i.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};n.d(t,["T",0,r])},64714(e,t,n){n.d(t,{F0:()=>a,Vx:()=>p,e2:()=>c,f:()=>h});var i=n(44208),r=n(4718),s=n(99352),o=n(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 u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let n="";t&&(n+=`this${d(t)} = null;`);for(const t in e)n+=`this${d(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>t?{[t]:null,...e}:{...e}}}function d(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,n){n.d(t,{P:()=>C});var i=n(32198),r=n(69622),s=n(49186),o=n(53966),a=n(91869),l=n(17676),u=n(39516),p=n(91429),d=n(5443),c=n(39829),h=n(99917),y=n(21325),m=n(15375);const f=(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`${f(e.left,t)} ${e.operator} ${f(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let n="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)n+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";n+=`lower(n.${e.left.column})`}if(n+=" 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)),n+=`'${t.toLowerCase()}')`}return n}return t.unsupportedOperationFound=!0,""};var g=n(69860),b=n(99916),w=n(53902),I=n(42538),M=n(97552);let C=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(n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,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 n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,n,i){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return{features:[],cypherTranslationApplied:!1};let r;if(r=e||new M.A({where:"1=1",outFields:["*"]}),"link-chart"===n.type){const e=n,i=this._processingCacheUpdatesLookup.get(t.objectType.name??""),s=r.outFields;s&&1===s.length&&s[0]===m.dr&&"1=1"===r.where||await Promise.all(i??[]);const o=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],a=[];return o.forEach(n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.memberIdTypeLookup.get(n.attributes[m.Cz]),r=this.memberIdTypeLookup.get(n.attributes[m.KQ]),s=this._isEndEntitySpatial(i,n,m.Cz),o=this._isEndEntitySpatial(r,n,m.KQ);n.attributes[m.BL]=Number(s&&o)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.geographicLookup.get(t.objectType.name);i&&n.attributes[i.name]?n.attributes[m.BL]=1:n.attributes[m.BL]=0}n.attributes[m.T1]=n.geometry,a.push(n)}),{features:a,cypherTranslationApplied:!1}}return this.retrieveDataFromService(r,t,n,i)}async getConnectedRecordIds(e,t,n){const i=[];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,n]of s){const i=`${e}_ids`;o[i]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} 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 $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return i;const l=a.join(" UNION "),u=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new I.A({openCypherQuery:l,bindParameters:o}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];i.push({id:n[0],typeName:n[1]}),i.push({id:n[2],typeName:n[3]})}}return i}async getRelationshipsBetweenNodes(e,t,n){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;r[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} 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,w.executeQueryStreaming)(this.knowledgeGraph,new I.A({openCypherQuery:o,bindParameters:r}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,i){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const s={relationshipExclusionIds:n,possibleConnectionEntityIds:t},o=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;s[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} 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,u=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new I.A({openCypherQuery:a,bindParameters:s}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let i=l.get(n[1]);i||(i=new Set,l.set(n[1],i)),i.add(n[0])}}const p=[];for(const[e,t]of l)for(const n of t)p.push({id:n,typeName:e});return p}async refreshCacheContent(e,t,n,i=!0,r){const o=g.A.getInstance(),u=[],p=new Map,d=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))p.has(t)?p.get(t)?.push(e):p.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?p.set(t,null):e.members&&e.members.forEach(e=>{p.has(t)&&null!==p.get(t)?p.get(t)?.push(e.id):p.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&p.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&p.set(e.name,null)}));for(const[e,l]of p){const p=new Set(l),c=new Promise((u,c)=>{(async()=>{const u=new Set,c=[];let h,y="",f=!1;if(t||d.get(e)?.properties?.forEach(e=>{e.name&&u.add(e.name)}),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&u.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,u.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?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,u.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new I.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await g.read();if(t)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const o={properties:{}};for(o.id=t[i],i++,s++,f&&(o.originId=t[i],i++,s++,o.destinationId=t[i],i++,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]));i<t.length;i++)o.properties[c[i-s]]=t[i];p.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),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!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),i&&!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 p)b.members?.delete(e)})().then(()=>{u(null)}).catch(e=>{"AbortError"===e.name?u(null):c(e)})});u.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(u),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map(e=>e.id));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,n,i){const r=g.A.getInstance(),a=new Set,l=[];let p,M="",C=[],T=!1;const _="relationship"===t.graphType,A=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,v=n.sublayerIdsCache.get(t.objectType.name);let E=!A&&v?Array.from(v).sort():null;const S={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(E=e.objectIds);else if(null!=e.objectIds&&E&&E.length>0){const t=e.objectIds;e.objectIds=E.filter(e=>t.includes(e))}else if(null!=e.objectIds)E=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=[],{features:[],cypherTranslationApplied:T};e.objectIds=E}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach(e=>{a.add(e.name)}):n.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&a.add(e)})}if(null!=e.geometry){const i=e.geometry;let r;const o=n.dataManager.knowledgeGraph.serviceDefinition,m=o?.spatialReference,f=o?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,w=f?.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)),r=new d.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),r=(0,h.project)(i.extent,y.KK)):r=i.extent;if(g&&w&&m){if(4326!==m.wkid){const e=new d.A({spatialReference:m,xmax:g,ymax:w}),t=(0,h.project)(e,y.KK);g=t.xmax,w=t.ymax}if(r.xmax-r.xmin>g)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(r.ymax-r.ymin>w)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,u.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&a.add(e.name)})}M=_?`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&&a.add(t.geometryFieldName),a.forEach(e=>{M+=`, n.${e}`,l.push(e)}),p=new I.A({openCypherQuery:M,bindParameters:{param_filter_geom:new c.A({rings:(0,b.Wq)(r)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,u.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&a.add(e.name)}),n=f(i.parseTree,S),S.unsupportedOperationFound&&(n="")}let i="";i=_?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let r=!1;E&&(r=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=r?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",_&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&a.add(t.geometryFieldName),a.forEach(e=>{i+=`, n.${e}`,l.push(e)}),S.unsupportedOperationFound||(i=((e,t)=>{let n=e;return t.orderByFields?.length&&(n=function(e,t){const n=e.trimEnd();if(/\border\s+by\b/i.test(n))return o.A.getLogger("cypherUtils").warn("Query already contains an ORDER BY clause. Skipping addition of new ORDER BY."),e;const i=t.map(e=>e.trim()).filter(e=>!!e).map(e=>{const[t,n]=e.split(/\s+/);return t?`${t===m.dr?"ID(n)":`n.${t}`} ${"DESC"===n?.toUpperCase()?"DESC":"ASC"}`:null}).filter(e=>!!e);return i.length?`${n} ORDER BY ${i.join(", ")}`:e}(n,t.orderByFields)),null!=t.start&&(n=function(e,t){const n=e.trimEnd();return/\bskip\s+(\$\w+|\d+)\b/i.test(n)?(o.A.getLogger("cypherUtils").warn("Query already contains a SKIP clause. Skipping addition of new SKIP."),e):`${n} SKIP ${t}`}(n,t.start)),null!=t.num&&(n=function(e,t){const n=e.trimEnd();return/\blimit\s+(\$\w+|\d+)\b/i.test(n)?(o.A.getLogger("cypherUtils").warn("Query already contains a LIMIT clause. Skipping addition of new LIMIT."),e):`${n} LIMIT ${t}`}(n,t.num)),n})(i,e),T=!0),p=new I.A(E?{openCypherQuery:i,bindParameters:{ids:E}}:{openCypherQuery:i})}const x=(await(0,w.executeQueryStreaming)(n.dataManager.knowledgeGraph,p,i)).resultRowsStream.getReader();for(;;){const{done:e,value:i}=await x.read();if(e)break;const s=[];for(let e=0;e<i.length;e++){const t=i[e];let n=0,r=0;const o={properties:{}};for(o.id=t[n],n++,r++,_&&(o.originId=t[n],n++,r++,o.destinationId=t[n],n++,r++);n<t.length;n++)o.properties[l[n-r]]=t[n];s.push(o)}C=C.concat(r.writeToStore(s,m.dr,n.dataManager.geographicLookup.get(t.objectType.name)?.name))}return{features:C,cypherTranslationApplied:T}}_isEndEntitySpatial(e,t,n){for(const i of e??[])if(this.entityTypeNames.has(i)){const e=this.geographicLookup.get(i),r=e&&this.sublayerCaches.get(i)?.get(t.attributes[n]);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 n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}}),t}};(0,i.Cg)([(0,p.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,p.MZ)()],C.prototype,"memberIdTypeLookup",void 0),C=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],C)},62796(e,t,n){n.d(t,{A:()=>me});var i=n(32198),r=n(37838),s=n(49186),o=n(4718),a=n(53966),l=n(25728),u=n(91429),p=(n(29953),n(78247)),d=n(5443),c=n(86738),h=n(39829),y=n(82799),m=n(99917),f=n(16930),g=n(21325),b=n(50498),w=n(55156),I=n(60950),M=n(89808),C=n(99959);const T=Symbol("isKnowledgeGraphGraphicOriginSymbol");var _;class A extends C.A{get[(_=T,I.ym)](){return this.sublayer}get[w.e](){return this.sublayer}get[M.Q](){return this.sublayer}constructor(e,t){super(),this[_]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const v=Symbol("isLinkChartGraphicOriginSymbol");var E;class S extends C.A{get[(E=v,I.ym)](){return this.sublayer}get[w.e](){return this.sublayer}get[M.Q](){return this.sublayer}constructor(e,t){super(),this[E]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var x=n(4146),k=n(83221),L=n(56390),N=n(64714),R=n(15375);const F=(0,n(17036).p)(),O=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,u.MZ)(F.fields)],n.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)(F.fieldsIndex)],n.prototype,"fieldsIndex",void 0),n=(0,i.Cg)([(0,u.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],n),n};var D=n(40736),P=n(63074),j=n(6455),B=n(87718),G=n(56658),Z=n(32756),$=n(54310),U=n(25036),q=n(82935),Q=n(10873),z=n(20569),Y=n(29005),H=n(20437),K=n(30524),W=n(46499),X=n(39383),V=n(96184),J=n(96576),ee=n(65494),te=n(41214),ne=n(53902),ie=n(22671),re=n(97552),se=n(30291),oe=n(88625),ae=n(37531),le=n(61322),ue=n(43937);function pe(e){if(!e.json)return e;e.json.write=de(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=de(e.write))}return e}function de(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:i,...r}=e;return function(e,t){const n=he.call(this,e,t);return n.enabled?{...r,...n}:n}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:he}}function he(e,t){const n=!!this.geometryType;let i={enabled:n};return n&&(i={...i,...ye.call(this,e,t)}),i}function ye(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let me=class extends(O((0,j.FJ)((0,G.J)((0,B.F)((0,P.dM)((0,Z.fY)((0,q.e)((0,U.j)((0,$.J)((0,l.M)(x.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=R.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 n=re.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,D.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:n}=e;return this.userHasUpdateItemPrivileges&&(t.supportsAdd=t.supportsDelete=t.supportsEditing=t.supportsQuery=t.supportsUpdate=n.supportsDeleteByOthers=n.supportsGeometryUpdate=n.supportsUpdateByOthers=!0),this.userHasFullEditingPrivileges&&t.supportsEditing&&(t.supportsAdd=t.supportsDelete=t.supportsUpdate=n.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(n=>{const i="esriFieldTypeOID"===n.fieldType?"esriFieldTypeInteger":n.fieldType,r=H.A.fromJSON({name:n.name,type:i,alias:n.alias,defaultValue:n.defaultValue,editable:n.editable,nullable:n.nullable,domain:n.domain&&t.has(n.domain)?t.get(n.domain).toJSON():void 0});e.push(r)}),e.push(H.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),H.A.fromJSON({name:R.M1,type:"esriFieldTypeInteger",alias:R.M1,editable:!1}),H.A.fromJSON({name:R.BL,type:"esriFieldTypeInteger",alias:R.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,D.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 R.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 A(this.parent,this);case"link-chart":return new S(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,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.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,D.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,D.iW)(this.graphType,this.graphTypeName,e):(0,D.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),n=(0,D.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new J.A({type:"simple",symbol:(0,D.UT)(n)});const e=(0,ee.r)((0,N.F0)(b.gy.toJSON("point")).renderer);return(0,ae.dt)(e.symbol,n),e}const i=(0,ee.r)((0,N.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,ae.dt)(i.symbol,n),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??f.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,D.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:n,queryEngine:i,cypherTranslationApplied:r}=await this._setupQueryObjects(e),s=this.graphicOrigin,o=ie.A.fromJSON(await i.executeQuery(this._createQueryEngineQueryJSON(n,r),t?.signal));return o.features.forEach(e=>{e.sourceLayer=this,e.origin=s}),o}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:n,queryEngine:i,cypherTranslationApplied:r}=await this._setupQueryObjects(e);return await i.executeQuery(this._createQueryEngineQueryJSON(n,r),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:n,queryEngine:i,cypherTranslationApplied:r}=await this._setupQueryObjects(e);return i.executeQueryForCount(this._createQueryEngineQueryJSON(n,r),t?.signal)}async queryExtent(e={},t){await this.load();const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r,cypherTranslationApplied:s}=await this._setupQueryObjects(n),o=await r.executeQueryForExtent(this._createQueryEngineQueryJSON(i,s),t?.signal);let a;return a=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new d.A(o.extent):new d.A,{count:o.count,extent:a}}async queryObjectIds(e,t){await this.load();const n=re.A.from(e);let i;if(this.parentCompositeLayer){if("link-chart"!==this.parentCompositeLayer.type||!this._cachedQueryEngine){const{features:e,cypherTranslationApplied:r}=await this.parentCompositeLayer.dataManager.getData(n,this,this.parentCompositeLayer,t);return i=this.loadQueryEngine(e),await i.executeQueryForIds(this._createQueryEngineQueryJSON(n,r),t?.signal)}i=this._cachedQueryEngine}else a.A.getLogger(this).warn("Attempting to query for object IDs with no features failed because the parent composite layer is missing or not yet loaded."),i=this.loadQueryEngine([]);return await i.executeQueryForIds(this._createQueryEngineQueryJSON(n,!1),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,D.O9)(e,this,this.parentCompositeLayer);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const n=await(0,ne.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,D.Gz)(n,this.graphTypeName),r={addedFeatures:i.addFeatureResults,updatedFeatures:i.updateFeatureResults,deletedFeatures:i.deleteFeatureResults,addedAttachments:i.addAttachmentResults,deletedAttachments:i.deleteAttachmentResults,updatedAttachments:i.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)]),i}loadQueryEngine(e){const t=new k.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=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 n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){if(!this.parentCompositeLayer)return a.A.getLogger(this).warn("Attempting to refresh the cached query engine with no features failed because the parent composite layer is missing or not yet loaded."),void(this._cachedQueryEngine=this.loadQueryEngine([]));const{features:e}=await this.parentCompositeLayer.dataManager.getData(new re.A({where:"1=1",outFields:[R.dr]}),this,this.parentCompositeLayer);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)}_createQueryEngineQueryJSON(e,t){const n=e.toJSON();return t&&delete n.resultOffset,n}async _setupQueryObjects(e,t){const n=re.A.from(e),i=n.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,m.initializeProjection)(i.spatialReference,g.KK),n.geometry=(0,m.project)(i instanceof h.A||i instanceof y.A||i instanceof c.A?i:i.extent,g.KK)),!this.parentCompositeLayer)return a.A.getLogger(this).warn("Attempting to execute a query with no features failed because the parent composite layer is missing or not yet loaded."),{resolvedQuery:n,queryEngine:this.loadQueryEngine([]),cypherTranslationApplied:!1};if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine,cypherTranslationApplied:!1};const{features:r,cypherTranslationApplied:s}=await this.parentCompositeLayer.dataManager.getData(n,this,this.parentCompositeLayer,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(r),cypherTranslationApplied:s}}};(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(P.sU)))],me.prototype,"blendMode",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"capabilities",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"isTable",null),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],me.prototype,"charts",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],me.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(j.Dp)))],me.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(j.KV)))],me.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"editingEnabled",null),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(P.LF)))],me.prototype,"effect",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,u.MZ)({type:oe.A})],me.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(B.Y)))],me.prototype,"featureEffect",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(z.d)))],me.prototype,"featureReduction",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"fields",null),(0,i.Cg)([(0,u.MZ)({type:p.A})],me.prototype,"formTemplate",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"geometryType",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"geometryFieldName",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"graphicOrigin",null),(0,i.Cg)([(0,u.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphType",void 0),(0,i.Cg)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphTypeName",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"hasM",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"hasZ",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],me.prototype,"id",void 0),(0,i.Cg)([(0,u.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,i.Cg)([(0,u.MZ)({type:[W.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const i=[["ESRI__AGGREGATION_COUNT",R.M1],["ESRI__ORIGIN_ID",R.Cz],["ESRI__DESTINATION_ID",R.KQ],["ESRI__LAYOUT_GEOMETRY",R.T1]];try{for(const t of e)for(const[e,n]of i)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return X.w.call(this,e,t,n)},write:ce()}})],me.prototype,"labelingInfo",null),(0,i.Cg)([(0,u.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,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.fV)))],me.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.hG)))],me.prototype,"maxScale",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.hn)))],me.prototype,"minScale",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"objectIdField",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"objectType",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.ke)))],me.prototype,"opacity",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Z.ne)))],me.prototype,"orderBy",void 0),(0,i.Cg)([(0,u.MZ)({clonable:!1})],me.prototype,"parent",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(Q.M6)))],me.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],me.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,json:{write:{overridePolicy:ye}}})],me.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,u.MZ)({types:te.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],me.prototype,"renderer",null),(0,i.Cg)([(0,u.MZ)()],me.prototype,"source",void 0),(0,i.Cg)([(0,u.MZ)()],me.prototype,"spatialReference",null),(0,i.Cg)([(0,u.MZ)({type:Y.A})],me.prototype,"templates",null),(0,i.Cg)([(0,u.MZ)({type:V.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,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"title",null),(0,i.Cg)([(0,ue.K)("title")],me.prototype,"writeTitle",null),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],me.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)(pe((0,o.o8)(q.B)))],me.prototype,"useViewTime",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"userHasEditingPrivileges",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"userHasFullEditingPrivileges",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],me.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],me.prototype,"visible",void 0),me=(0,i.Cg)([(0,u.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],me)},69860(e,t,n){n.d(t,{A:()=>a});var i=n(65864),r=n(90708),s=n(43334),o=n(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 n=this.readFromStoreById(e);n&&t.push(n)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l=null;n&&e.properties[n]&&(l=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[o.Cz]=e.originId,e.properties[o.KQ]=e.destinationId),e.properties[t]=e.id;let u=e.properties;if(e.id){const t=this._featureLookup.get(e.id);if(t?.attributes){u={...t.attributes,...u};const e=n&&u[n];null!=e&&(u[n]=(0,i.rS)(e)),l=l??t.geometry}}const p=new s.Om(l?.clone(),u,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,p),a.push(p)}),a}}},15375(e,t,n){n.d(t,["BL",0,"LC.ESRI__IsSpatial","Cz",0,"ESRI__OriginID","KQ",0,"ESRI__DestID","M1",0,"ESRI__AggregationCount","T1",0,"ESRI__LayoutGeometry","dr",0,"ESRI__ID"])},40736(e,t,n){n.d(t,{Gz:()=>U,O9:()=>$,hZ:()=>Z,CP:()=>Q,dD:()=>q,UT:()=>O,MY:()=>D,Td:()=>F,iW:()=>P,e$:()=>j,$L:()=>z,N1:()=>B,qN:()=>N});var i=n(68197),r=n(92602),s=n(70333),o=(n(49186),n(91869)),a=n(17676),l=n(78247),u=n(89909),p=n(99917),d=n(16930),c=n(52039),h=n(99352),y=n(15375),m=n(29005),f=n(46499),g=n(73913),b=n(77548),w=n(80812),I=n(10407),M=n(53902),C=n(25927),T=n(32198),_=n(69622),A=n(91429);let v=class extends _.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,T.Cg)([(0,A.MZ)()],v.prototype,"entityAdds",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"entityUpdates",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"entityDeletes",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"relationshipAdds",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"relationshipUpdates",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"relationshipDeletes",void 0),(0,T.Cg)([(0,A.MZ)()],v.prototype,"options",void 0),v=(0,T.Cg)([(0,A.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],v);var E=n(23150),S=n(94128),x=n(40863),k=n(68249);const L=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function N(e,t,n){return(async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,L(e,n));const r=await(0,M.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const i=r.get(L(e,n));if(i){const e=JSON.parse(i);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}})(e,t,n)}const R=["#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 F(e){return e<0||e>=R.length?new i.A("#8f8f82"):new i.A(R[e])}function O(e){const t=e.toArray();return new x.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 D(e){let t="ESRI__ID",n=4;for(const i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,n=2):"esriFieldTypeString"===i.fieldType&&n>3&&(t=i.name,n=3)}return t}function P(e,t,n){const i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new f.A({labelExpressionInfo:new g.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new k.A(i)}),s=new f.A({labelExpressionInfo:new g.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new k.A({...i,yoffset:"12px"})});return"entity"===e?[r]:[s]}function j(e,t,n){const i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new f.A({labelExpressionInfo:new g.A({expression:r}),labelPlacement:"above-center",symbol:new k.A(i)})]:"polyline"===t?[new f.A({labelExpressionInfo:new g.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new k.A(i)})]:"polygon"===t?[new f.A({labelExpressionInfo:new g.A({expression:r}),labelPlacement:"always-horizontal",symbol:new k.A(i)})]:null}async function B(e,t,n){return(async(e,t,n)=>{let i=!0,o=!1,a=!1;if(!r.A.userPrivilegesApplied)return{edit:i,fullEdit:o,updateItem:a};const l=await(0,b.wI)(t,n);if(!l)return{edit:i,fullEdit:o,updateItem:a};const u=s.id?.getCredential(`${l}/sharing`,{...n,prompt:!1});if(!u)return{edit:i,fullEdit:o,updateItem:a};const p=new w.default({id:e,portal:{url:l}});return await p.load(n),({features:{edit:i,fullEdit:o},content:{updateItem:a}}=(0,I.It)(p)),{edit:i,fullEdit:o,updateItem:a}})(e,t,n).catch(e=>((0,a.QP)(e),{edit:!0,fullEdit:!1,updateItem:!1}))}const G={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function Z(e){const{capabilities:t,allowGeometryUpdates:n,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:r}}}=e?.serviceDefinition||G,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:i},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&&n,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,n){const i=new v,r=t.graphTypeName,s=t.graphType,a="knowledge-graph"===n.type?t.geometryFieldName:null,l=!!t.fieldsIndex.get(a)?.editable,u=e=>{const n={...e};for(const e of t.fields)e.editable||delete n[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete n[t];return n},h=async e=>{await(0,p.initializeProjection)(e.spatialReference,d.A.WGS84);const t=(0,p.project)(e,d.A.WGS84);return"point"===t.type?t.normalize():(await(0,c.el)(t))[0]};for(const t of e.addFeatures??[]){const e=u(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===r&&("entity"===s?(i.entityAdds||(i.entityAdds=[]),a&&t.geometry&&(e[a]=await h(t.geometry)),i.entityAdds.push(new C.A({properties:e,typeName:r}))):(i.relationshipAdds||(i.relationshipAdds=[]),i.relationshipAdds.push(new E.A({properties:e,typeName:r}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[y.dr],n=u(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===r&&("entity"===s?(i.entityUpdates||(i.entityUpdates=[]),a&&l&&t.geometry&&(n[a]=await h(t.geometry)),i.entityUpdates.push(new C.A({id:e,properties:n,typeName:r}))):(i.relationshipUpdates||(i.relationshipUpdates=[]),i.relationshipUpdates.push(new E.A({id:e,properties:n,typeName:r}))))}const m=new Map;for(const t of e.deleteFeatures??[])if((0,S.D)(t)){const e=t,n=(0,o.tE)(m,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===r&&n.ids.push(e.attributes[y.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,o.tE)(m,r,()=>({typeName:r,ids:[]})).ids.push(t.objectId);for(const e of m.values())e.ids.length>0&&("entity"===s?(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 n={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const i of e.editResults)if(i.typeName===t){for(const e of i.adds)n.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.updates)n.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.deletes)n.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return n}function q(e){if(!e.objectType)return null;const t=[];for(const n of e.fields)!n.name.includes("ESRI__")&&n.editable&&"geometry"!==n.type&&t.push(new u.A({fieldName:n.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 z=e=>{let t="";const n=e.split("/"),i=n.lastIndexOf("KnowledgeGraphServer");return i>0&&(t=n[i-1]),t}},99916(e,t,n){n.d(t,{Wq:()=>l,aq:()=>a}),n(52106);var i=n(49186),r=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(69647)),s=n(53902),o=n(42538);async function a(e,t,n){const i=[],r=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),a={},l=[];for(const[e,t]of r){if(t.length<1)continue;const n=`${e}_ids`;a[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const u=l.join(" UNION "),p=new o.A({openCypherQuery:u,bindParameters:a}),d=(await(0,s.executeQueryStreaming)(t,p,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await d.read();if(e)break;for(const e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}function l(e){if(!e.spatialReference.isWGS84)throw new i.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]])}n(40863),n(94985),n(68249),n.d(t,["k5",0,e=>r.P_.get(e)??"radial-root-centric"])},82935(e,t,n){var i=n(32198),r=n(91429),s=n(89317),o=n(30524),a=n(96184),l=n(73133),u=n(79677),p=n(10184),d=n(36005);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:s.K}}};n.d(t,["B",0,c,"e",0,e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const n=t.timeInfo.exportOptions;if(!n)return null;const i=n.timeOffset,r=l.j.fromJSON(n.timeOffsetUnits);return i&&r?new p.A({value:i,unit:r}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,r.MZ)({type:u.A,json:{write:!1}})],n.prototype,"timeExtent",void 0),(0,i.Cg)([(0,r.MZ)({type:p.A})],n.prototype,"timeOffset",void 0),(0,i.Cg)([(0,d.w)("service","timeOffset",["timeInfo.exportOptions"])],n.prototype,"readOffset",null),(0,i.Cg)([(0,r.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"timeInfo",null),(0,i.Cg)([(0,r.MZ)(c)],n.prototype,"useViewTime",void 0),n=(0,i.Cg)([(0,r.$K)("esri.layers.mixins.TemporalLayer")],n),n}])},96184(e,t,n){n.d(t,{A:()=>h});var i=n(32198),r=n(69540),s=n(25482),o=n(91429),a=n(79677),l=n(10184),u=n(56400),p=n(36005),d=n(43937);function c(e,t){return l.A.fromJSON({value:e,unit:t})}let h=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?a.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?c(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?c(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,p.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,d.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i.Cg)([(0,p.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i.Cg)([(0,d.K)("interval")],h.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,u.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i.Cg)([(0,o.$K)("esri.layers.support.TimeInfo")],h)},17036(e,t,n){n.d(t,{p:()=>l});var i=n(44208),r=n(53966),s=n(20437),o=n(95466),a=n(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");r.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const n=this.fieldsIndex?.has(t);n||r.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},8460(e,t,n){n.d(t,{$C:()=>y,Hh:()=>o,Tu:()=>c,Wg:()=>h,Xq:()=>f,i6:()=>g,pM:()=>d,vJ:()=>m});var i=n(2741);let r,s=null;function o(){return r||(r=n.e(3666).then(n.bind(n,3666)).then(({default:e})=>e({locateFile:e=>(0,i.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 u(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 p(e,t,n,i,r,o){const a=n.length,l=r.length,u=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(d+2*u)+l*(2*p),h=s._malloc(c);try{const d=h+16-h%16,c=d+a*u,y=c+a*u,m=y+l*p,f=m+l*p,g=()=>[s.HEAPF64.subarray(d>>3,(d>>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(f,f+a)],[b,w,I,M,C]=g();b.set(n),w.set(i),I.set(r),M.set(o),C.set(t);const T=e(a,f,d,c,l,y,m);let _=null,A=null;if(0===T.value){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),n=s.getLayoutLinksVertices(),i=s.countLayoutLinksVertices();!l||e&&t?i&&!n?T.value=1:(_={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(n>>3,(n>>3)+2*i))},A=s.getAuxiliaryGraphicElements()):T.value=1}const[v,E,S,x,k]=g();return n.set(v),i.set(E),r.set(S),o.set(x),t.set(k),{status:T.value,links:_,graphics:A}}finally{s._free(h),s.cleanupLayout()}}var d,c,h,y,m,f,g,b;(b=d||(d={})).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},b.apply=function(e,t,n,i,r,o,a=2,l=1,u=-1){return p((t,n,i,r,o,p,d)=>s.applyForceDirectedLayout(e,t,n,i,r,o,p,d,a,l,u),t,n,i,r,o)},function(e){e.apply=function(e,t,n,i,r,o,a=2,l=1,u=-1){return p((t,n,i,r,o,p,d)=>s.applyCommunityLayout(e,t,n,i,r,o,p,d,a,l,u),t,n,i,r,o)}}(c||(c={})),function(e){e.apply=function(e,t,n,i,r,o){return p((t,n,i,r,o,a,l)=>s.applySimpleLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(h||(h={})),function(e){e.apply=function(e,t,n,i,r,o){return p((t,n,i,r,o,a,l)=>s.applyHierarchicalLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(y||(y={})),function(e){e.apply=function(e,t,n,i,r,o){return p((t,n,i,r,o,a,l)=>s.applyRadialTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(m||(m={})),function(e){e.apply=function(e,t,n,i,r,o){return p((t,n,i,r,o,a,l)=>s.applySmartTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(f||(f={})),function(e){e.apply=function(e,t,n,i,r,o,a,l,d,c,h,y){return p((t,n,i,a,l,p,m)=>{if(r.length!==t)return{value:1};if(o.length!==t)return{value:1};if(d.length!==l)return{value:1};if(c.length!==l)return{value:1};const f=Float64Array.BYTES_PER_ELEMENT,g=16,b=s._malloc(g+t*f),w=s._malloc(g+t*f),I=s._malloc(g+l*f),M=s._malloc(g+l*f),C=b+g-b%g,T=w+g-w%g,_=I+g-I%g,A=M+g-M%g;try{return s.HEAPF64.subarray(C>>3,(C>>3)+t).set(r),s.HEAPF64.subarray(T>>3,(T>>3)+t).set(o),s.HEAPF64.subarray(_>>3,(_>>3)+l).set(d),s.HEAPF64.subarray(A>>3,(A>>3)+l).set(c),s.applyChronologicalLayout(e,t,n,i,a,C,T,l,p,m,_,A,h,u(y))}finally{s._free(b),s._free(w),s._free(I),s._free(M)}},t,n,i,a,l)}}(g||(g={}))},69647(e,t,n){var i=n(66552);const r=(0,i.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),s=(0,i.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"}),o=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"]]);n.d(t,["P_",0,o,"SJ",0,r,"lg",0,s])},54628(e,t,n){n.d(t,{lV:()=>s,zI:()=>r});var i=n(11254);async function r(e,t,n){if(!e||!t||!e.includes("/resources"))return!1;const r=t+"/resources",s=e.includes("/resources/")?e.split("/resources/")[1]:e;if(!s)return!1;let o=1;for(;-1!==o;){const e=(await(0,i.A)(r,{query:{f:"json",start:o,num:100}})).data,t=e?.resources??[];for(const e of t)if(e.resource===s)return"number"==typeof n&&e.created===n;if(null==e.nextStart||!t.length)break;o=e.nextStart}return!1}async function s(e,t){if(!e.length||!t)return new Map;const n=t+"/resources";let r=1;const s=new Map;for(;-1!==r;){const e=(await(0,i.A)(n,{query:{f:"json",start:r,num:100}})).data,t=e?.resources??[];for(const e of t)"number"==typeof e.created&&s.set(e.resource,e.created);if(null==e.nextStart||!t.length)break;r=e.nextStart}const o=new Map;for(const t of e){const e=t.includes("/resources/")?t.split("/resources/")[1]:t,n=s.get(e);null!=n&&o.set(t,n)}return o}n(49186),n(53966),n(17676),n(86738),n(8460)},10407(e,t,n){n.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>p,Y:()=>a,bK:()=>l,sQ:()=>d});var i=n(99917),r=n(16930),s=n(28735);function o(e,t){if(!a(e,t)){const n=e.typeKeywords;n?n.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,c.HOSTED_SERVICE)}function u(e,t){const n=e.typeKeywords;if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}function p(e,t,n){n?o(e,t):u(e,t)}async function d(e){const t=e.clone().normalize();let n;if(t.length>1)for(const e of t)n?e.width>n.width&&(n=e):n=e;else n=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 n=r.A.WGS84;return await(0,i.initializeProjection)(t,n),(0,i.project)(e,n)}(n)}const c={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",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",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function h(e){const{portal:t,isOrgItem:n,itemControl:i}=e,r=t.user?.privileges;let s=!r||r.includes("features:user:edit"),o=!!n&&!!r?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}n.d(t,["mm",0,c])},25927(e,t,n){n.d(t,{A:()=>a});var i=n(32198),r=n(91429),s=n(86738),o=n(54238);let a=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Entity")],a)},54238(e,t,n){n.d(t,{A:()=>o});var i=n(32198),r=n(91429),s=n(77901);let o=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"typeName",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"id",void 0),o=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],o)},77901(e,t,n){n.d(t,{A:()=>o});var i=n(32198),r=n(25482),s=n(91429);let o=class extends r.o{constructor(e){super(e),this.properties={}}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],o.prototype,"properties",void 0),o=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.GraphObject")],o)},42538(e,t,n){n.d(t,{A:()=>l});var i=n(32198),r=n(91429),s=n(16930),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,i.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,i.Cg)([(0,r.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)({type:s.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},40662(e,t,n){n.d(t,{A:()=>o});var i=n(32198),r=n(91429),s=n(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.ObjectValue")],o)},42095(e,t,n){n.d(t,{A:()=>a});var i=n(32198),r=n(25482),s=n(91429),o=n(77901);let a=class extends r.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,s.MZ)({type:[o.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.Path")],a)},23150(e,t,n){n.d(t,{A:()=>a});var i=n(32198),r=n(91429),s=n(82799),o=n(54238);let a=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,i.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Relationship")],a)},2272(e,t,n){n.d(t,{Dl:()=>u,gf:()=>d,jV:()=>l,lF:()=>p});var i=n(92602),r=n(70333),s=n(4718),o=n(84952),a=n(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function p(e,t,n){const i={};for(const r in e){if("declaredClass"===r)continue;const s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[r]=s.map(e=>p(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?s:JSON.stringify(s);else i[r]=s}return i}async function d(e,t,s){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&i.A.request.useIdentity&&await Promise.all([n.e(5620),n.e(4372),n.e(9530)]).then(n.bind(n,50148));const l=await r.id.getCredential(e,s);return l?.token}},62046(e,t,n){n.d(t,{Fe:()=>y,KU:()=>b,Nk:()=>u,X5:()=>s});var i=n(68197),r=n(93397);function s(e,t,n){if(!e)return;const i=(0,r.lW)(e),s=function(e){const t=(0,r.lW)(e);if("CIMTextSymbol"===t?.type)return t.height??0;let n=0;if(t?.symbolLayers)for(const e of t.symbolLayers)(0,r.MM)(e)&&null!=e.size&&e.size>n?n=e.size:(0,r.mA)(e)&&null!=e.width&&e.width>n?n=e.width:(0,r.jn)(e);return n}(e);0!==s?o(i,t/s,!1,n):function(e,t){if(e)if("CIMTextSymbol"!==e.type){if(e.symbolLayers)for(const n of e.symbolLayers)switch(n.type){case"CIMPictureMarker":case"CIMVectorMarker":n.size=t;break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":n.width=t}}else e.height=t}(i,t)}function o(e,t,n,i){if(e)if("CIMTextSymbol"!==e.type){if(n&&e.effects)for(const n of e.effects)l(n,t);if(e.symbolLayers)for(const n of e.symbolLayers){switch(n.type){case"CIMPictureMarker":case"CIMVectorMarker":a(n,t,i);break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":!i?.preserveOutlineWidth&&n.width&&(n.width*=t);break;case"CIMPictureFill":n.height&&(n.height*=t),n.offsetX&&(n.offsetX*=t),n.offsetY&&(n.offsetY*=t);break;case"CIMHatchFill":o(n.lineSymbol,t,!0,{...i,preserveOutlineWidth:!1}),n.offsetX&&(n.offsetX*=t),n.offsetY&&(n.offsetY*=t),n.separation&&(n.separation*=t)}if(n.effects)for(const e of n.effects)l(e,t)}}else null!=e.height&&(e.height*=t)}function a(e,t,n){if(e&&(e.markerPlacement&&function(e,t){switch((0,r.zr)(e)&&e.offset&&(e.offset*=t),e.type){case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineSameSize":if(e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.placementTemplate&&e.placementTemplate.length){const n=e.placementTemplate.map(e=>e*t);e.placementTemplate=n}break;case"CIMMarkerPlacementAlongLineVariableSize":if(e.maxRandomOffset&&(e.maxRandomOffset*=t),e.placementTemplate&&e.placementTemplate.length){const n=e.placementTemplate.map(e=>e*t);e.placementTemplate=n}break;case"CIMMarkerPlacementOnLine":e.startPointOffset&&(e.startPointOffset*=t);break;case"CIMMarkerPlacementAtExtremities":e.offsetAlongLine&&(e.offsetAlongLine*=t);break;case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementOnVertices":break;case"CIMMarkerPlacementAtRatioPositions":e.beginPosition&&(e.beginPosition*=t),e.endPosition&&(e.endPosition*=t);break;case"CIMMarkerPlacementPolygonCenter":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMMarkerPlacementInsidePolygon":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.stepX&&(e.stepX*=t),e.stepY&&(e.stepY*=t)}}(e.markerPlacement,t),e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.anchorPoint&&"Absolute"===e.anchorPointUnits&&(e.anchorPoint={x:e.anchorPoint.x*t,y:e.anchorPoint.y*t}),e.size=null!=e.size?e.size*t:0,"CIMVectorMarker"===e.type&&e.markerGraphics))for(const i of e.markerGraphics)e.scaleSymbolsProportionally||o(i.symbol,t,!0,n)}function l(e,t){if(!(0,r.Kq)(e))switch(e.type){case"CIMGeometricEffectArrow":case"CIMGeometricEffectDonut":e.width&&(e.width*=t);break;case"CIMGeometricEffectBuffer":e.size&&(e.size*=t);break;case"CIMGeometricEffectCut":e.beginCut&&(e.beginCut*=t),e.endCut&&(e.endCut*=t),e.middleCut&&(e.middleCut*=t);break;case"CIMGeometricEffectDashes":if(e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.dashTemplate&&e.dashTemplate.length){const n=e.dashTemplate.map(e=>e*t);e.dashTemplate=n}break;case"CIMGeometricEffectExtension":case"CIMGeometricEffectJog":case"CIMGeometricEffectRadial":e.length&&(e.length*=t);break;case"CIMGeometricEffectMove":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":e.offset&&(e.offset*=t);break;case"CIMGeometricEffectRegularPolygon":e.radius&&(e.radius*=t);break;case"CIMGeometricEffectTaperedPolygon":e.fromWidth&&(e.fromWidth*=t),e.length&&(e.length*=t),e.toWidth&&(e.toWidth*=t);break;case"CIMGeometricEffectWave":e.amplitude&&(e.amplitude*=t),e.period&&(e.period*=t)}}function u(e){const t=[];return p((0,r.lW)(e),t),t.length?new i.A((0,r.e6)(t[0])):null}function p(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||i&&((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&d(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{p(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":d(t,e.color);break;case"CIMGradientFill":c(t,e);break;case"CIMHatchFill":p(e.lineSymbol,t)}}function d(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function c(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&h(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e,t.colorRamp)}}function h(e,t){t&&(t.fromColor&&d(e,t.fromColor),t.toColor&&d(e,t.toColor))}function y(e,t,n){t instanceof i.A||(t=new i.A(t));const s=(0,r.lW)(e);s&&m(s,t,n)}function m(e,t,n){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const s="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(const e of i.symbolLayers){if(e.colorLocked)continue;if(s)if(n){const{layersToColor:t}=n;if(((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))&&"fill"===t||(0,r.jn)(e)&&"outline"===t)continue}else if((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))continue;const i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{m(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":f(e,t);break;case"CIMHatchFill":m(e.lineSymbol,t,n)}}}function f(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&g(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":g(e.colorRamp,t)}}function g(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}function b(e,t,n=!1){const i=(0,r.lW)(e);if(n&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){const e=t-(i.angle||0);for(const t of i.symbolLayers)if((0,r.MM)(t)){let n=t.rotation||0;t.rotateClockwise?n-=e:n+=e,t.rotation=n}i.angle=t}}else i.angle=t}},37531(e,t,n){n.d(t,{dt:()=>c,GG:()=>g,UQ:()=>f,Sx:()=>p});var i=n(68197),r=n(60999),s=(n(90629),n(51850)),o=(n(76369),n(62046)),a=(n(2741),n(11254),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new i.A([128,128,128]);var l=n(28975),u=n(33910);function p(e,t){if(!e)return null;let n=null;return(0,u.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new i.A(n):null}(e):(0,u.$y)(e)&&(n="cim"===e.type?(0,o.Nk)(e):e.color?new i.A(e.color):null),n?d(n,t):null}function d(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new i.A(n)}function c(e,t,n){e&&(t||null!=n)&&(t&&(t=new i.A(t)),(0,u.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const s=(e,r=!1)=>{let s=t??e??null;return null!=n?.override&&(!s&&r&&(s=new i.A([255,255,255])),s&&(s.a=n.override)),d(s,n?.add)};r.forEach(e=>{if("water"===e.type)return void(e.color=d(e.color,n?.add));const t=null!=e.material?e.material.color:null,i=s(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.A({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=d(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=s(e.marker.color))})}(e,t,n):(0,u.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=d(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=d(e.outline.color,n?.add))}(e,t,n))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,n){for(let i=0;i<3;i++){const r=e[i];switch(r){case"symbol-value":{const e=n[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(null!=r&&t[i])return r/t[i]}}return null}function m(e,t,n,i){switch(e){case"proportional":return n*i;case"symbol-value":return null!=t?t:n;default:return e}}async function f(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,r.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=h(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=y(t,s.Un,[e.width,void 0,e.height]);null!=n&&(e.width=m(t[0],e.width,1,n),e.height=m(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:r}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),i=await t(e,10),{width:r,height:s,depth:o}=e,a=[r,o,s];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),s=y(t,i,r);null!=s&&(e.width=m(t[0],r[0],i[0],s),e.depth=m(t[1],r[1],i[1],s),e.height=m(t[2],r[2],i[2],s))}(e,t)}}(e,t))}(e,t):void((0,u.$y)(e)&&function(e,t){const n=h(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n;break;case"simple-fill":case"picture-fill":break;case"cim":(0,o.X5)(e,n,{preserveOutlineWidth:!1})}}(e,t))}function g(e,t,n){if(e&&null!=t)if((0,u.wk)(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,u.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,o.KU)(e,t,!0)}}}}]);