@arcgis/core 4.33.0-next.20250326 → 4.33.0-next.20250327

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 (146) hide show
  1. package/applications/Components/viewUtils.d.ts +3 -0
  2. package/applications/Components/viewUtils.js +5 -0
  3. package/arcade/arcadeAsyncRuntime.js +1 -1
  4. package/arcade/arcadeCompiler.js +1 -1
  5. package/arcade/arcadeRuntime.js +1 -1
  6. package/arcade/functions/date.js +1 -1
  7. package/arcade/functions/feature.js +1 -1
  8. package/arcade/functions/featuresetbase.js +1 -1
  9. package/arcade/functions/featuresetgeom.js +1 -1
  10. package/arcade/functions/featuresetstats.js +1 -1
  11. package/arcade/functions/featuresetstring.js +1 -1
  12. package/arcade/functions/geomasync.js +1 -1
  13. package/arcade/functions/geometry.js +1 -1
  14. package/arcade/functions/geomsync.js +1 -1
  15. package/arcade/functions/knowledgegraph.js +1 -1
  16. package/arcade/functions/maths.js +1 -1
  17. package/arcade/functions/stats.js +1 -1
  18. package/arcade/functions/string.js +1 -1
  19. package/arcade/geometry/functions.js +1 -1
  20. package/arcade/languageUtils.js +1 -1
  21. package/assets/esri/core/workers/RemoteClient.js +1 -1
  22. package/assets/esri/core/workers/chunks/0f37b3a797d8a55439a4.js +1 -0
  23. package/assets/esri/core/workers/chunks/{6ff981ec0c725efe5525.js → 470cf066294b053c2732.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{ba47e43ef039fe4b8c5c.js → 605eddec7aac891ed141.js} +1 -1
  25. package/assets/esri/core/workers/chunks/75a04b073231da70c18d.js +1 -0
  26. package/assets/esri/core/workers/chunks/{fa3eeb40e2d732c184d8.js → 7f8c7e3e41e51ab4d612.js} +1 -1
  27. package/assets/esri/core/workers/chunks/80aaf31c8eec3cff2add.js +1 -0
  28. package/assets/esri/core/workers/chunks/82692bff98b4ec781544.js +319 -0
  29. package/assets/esri/core/workers/chunks/86ee278919038260696e.js +39 -0
  30. package/assets/esri/core/workers/chunks/{4496ef270c700078df0c.js → 8752f807c05d1ec215e8.js} +1 -1
  31. package/assets/esri/core/workers/chunks/9c59fc2df8081e65a128.js +1 -0
  32. package/assets/esri/core/workers/chunks/{d5d2a4e8e19898d86c6d.js → a2377969f76640f1d6fe.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{e0ac90b4ad8c36fb7d70.js → b2666b89755323a84fcb.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{726e3f413824f02fe689.js → bd2dcc55ac3418421ee5.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{b8a4352f83502449ff95.js → cbbbaccc0d3683e1c0fe.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{e4290719c8afc2a4ee8c.js → cc441051a52bfbda9caf.js} +1 -1
  37. package/assets/esri/core/workers/chunks/d3912886ac2910290f43.js +1 -0
  38. package/assets/esri/core/workers/chunks/e08bff9f8247909776a4.js +1 -0
  39. package/assets/esri/core/workers/chunks/{042771b4e56355924140.js → e9993d4f2bfdc434fbcc.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{4dc1e7d7ac2a4b0144c4.js → f128d3431da86e484117.js} +28 -29
  41. package/chunks/ComponentShader.glsl.js +25 -25
  42. package/chunks/HUDMaterial.glsl.js +2 -2
  43. package/chunks/LineMarker.glsl.js +26 -26
  44. package/chunks/Point2D.js +1 -1
  45. package/chunks/ProjectionTransformation.js +1 -1
  46. package/chunks/QuadraticBezier.js +1 -1
  47. package/chunks/RibbonLine.glsl.js +35 -33
  48. package/chunks/Terrain.glsl.js +33 -33
  49. package/chunks/aiServices.js +1 -1
  50. package/chunks/array.js +1 -1
  51. package/chunks/languageUtils.js +1 -1
  52. package/geometry/operators/projectOperator.js +1 -1
  53. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  54. package/interfaces.d.ts +246 -7
  55. package/layers/LinkChartLayer.js +1 -1
  56. package/layers/MapImageLayer.js +1 -1
  57. package/layers/TileLayer.js +1 -1
  58. package/package.json +1 -1
  59. package/support/revision.js +1 -1
  60. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  61. package/views/2d/layers/TileLayerView2D.js +1 -1
  62. package/views/2d/layers/support/util.js +1 -1
  63. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  64. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  65. package/views/3d/layers/DrapedSubView3D.js +1 -1
  66. package/views/3d/layers/GraphicsView3D.js +1 -1
  67. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  68. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  69. package/views/3d/layers/MediaLayerView3D.js +1 -1
  70. package/views/3d/layers/TileLayerView3D.js +1 -1
  71. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  72. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  73. package/views/3d/layers/support/ImageHighlightHelper3D.js +5 -0
  74. package/views/3d/layers/support/SublayerPopupHighlightHelper3D.js +5 -0
  75. package/views/3d/terrain/Overlay.js +1 -1
  76. package/views/3d/terrain/OverlayRenderer.js +1 -1
  77. package/views/3d/terrain/RasterTile.js +1 -1
  78. package/views/3d/terrain/TerrainRenderer.js +1 -1
  79. package/views/3d/terrain/TerrainSurface.js +1 -1
  80. package/views/3d/terrain/TileCompositor.js +1 -1
  81. package/views/3d/terrain/TileRenderer.js +1 -1
  82. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  83. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  84. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  85. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +9 -10
  86. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js +11 -0
  87. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +3 -3
  88. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +3 -6
  89. package/views/3d/webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js +1 -1
  90. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +1 -1
  91. package/views/3d/webgl-engine/lib/Material.js +1 -1
  92. package/views/3d/webgl-engine/lib/Program.js +1 -1
  93. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  94. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  95. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  96. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  97. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  98. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  99. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  100. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  101. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  102. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  103. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  104. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  105. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  106. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  107. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  108. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  109. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  110. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  111. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  112. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  113. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  114. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  115. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  116. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  117. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  118. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  119. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  120. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  121. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
  122. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  123. package/views/3d/webgl-engine/shaders/PointRendererTechniqueConfiguration.js +1 -1
  124. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  125. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  126. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
  127. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  128. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  129. package/views/SceneView.js +1 -1
  130. package/views/VideoView.d.ts +4 -0
  131. package/views/VideoView.js +1 -1
  132. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  133. package/views/layers/support/highlightUtils.js +5 -0
  134. package/views/support/TextureCompressionHandle.js +5 -0
  135. package/views/webgl/ShaderBuilder.js +1 -1
  136. package/views/webgl/Texture.js +1 -1
  137. package/views/webgl/TextureDescriptor.js +1 -1
  138. package/widgets/Features/FeaturesViewModel.js +1 -1
  139. package/assets/esri/core/workers/chunks/0059295780fa4a090f30.js +0 -319
  140. package/assets/esri/core/workers/chunks/3fc18638f8799b85001d.js +0 -1
  141. package/assets/esri/core/workers/chunks/81bf362ec0d23ffdc90c.js +0 -39
  142. package/assets/esri/core/workers/chunks/a59ad50d932da1e28c8f.js +0 -1
  143. package/assets/esri/core/workers/chunks/afe94e351b4a50d7bc53.js +0 -1
  144. package/assets/esri/core/workers/chunks/b8416f2560710258c239.js +0 -1
  145. package/assets/esri/core/workers/chunks/e088edb9ffbaa1ed12eb.js +0 -1
  146. package/assets/esri/core/workers/chunks/f454e773505c0eef2f9d.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{load as e,supportsCurves as t,execute as r,executeMany as n,isLoaded as o}from"./gx/operatorShapePreservingProject.js";let a,i,s,c,m,p,f,u,h,g,x,l;function T(){return!!i&&o()}async function j(){if(!T()){const[r,n,o,T]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformation:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:t})=>({create:e,createFromWKT:t}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({create:e,createEx:t,createFromAoi:r})=>({create:e,createEx:t,createFromAoi:r}))),e()]);a=r.fromExtent,i=r.fromGeometry,s=r.fromSpatialReference,c=r.getSpatialReference,m=r.toGeometry,p=n,f=o.create,u=o.createFromWKT,h=T.createEx,g=T.createFromAoi,x=T.create,l=t()}}function I(e,t,n={}){const o=E(c(e),t,n),a=n?.maxDeviationInSrTo??0,s=n?.minSegmentLengthInDegrees??0;return m(r(i(e),o,s,a),t)}function v(e,t,r={}){const o=e.map(i),a=E(c(e),t,r),s=r?.maxDeviationInSrTo??0;return n(o,a,r?.minSegmentLengthInDegrees??0,s).map((e=>m(e,t)))}function E(e,t,r={}){let n;const o=s(e),i=s(t);if(r?.geographicTransformation){const e=r.geographicTransformation.steps.map((e=>e.wkid?f(e.wkid,e.isInverse):u(e.wkt,e.isInverse)));n=new p(e,null,o,i)}else if(r?.areaOfInterestExtent)return g(o,i,a(r.areaOfInterestExtent).asEnvelope2D());return n?h(o,i,n):x(o,i)}export{I as execute,v as executeMany,T as isLoaded,j as load,l as supportsCurves};
5
+ import{load as e,supportsCurves as t,execute as r,executeMany as n,isLoaded as o}from"./gx/operatorShapePreservingProject.js";let a,i,s,c,m,p,f,u,h,g,l,x;function T(){return!!i&&o()}async function I(){if(!T()){const[r,n,o,T]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformationEditor:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:t})=>({create:e,createFromWKT:t}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({create:e,createEx:t,createFromAoi:r})=>({create:e,createEx:t,createFromAoi:r}))),e()]);a=r.fromExtent,i=r.fromGeometry,s=r.fromSpatialReference,c=r.getSpatialReference,m=r.toGeometry,p=n,f=o.create,u=o.createFromWKT,h=T.createEx,g=T.createFromAoi,l=T.create,x=t()}}function j(e,t,n={}){const o=d(c(e),t,n),a=n?.maxDeviationInSrTo??0,s=n?.minSegmentLengthInDegrees??0;return m(r(i(e),o,s,a),t)}function S(e,t,r={}){const o=e.map(i),a=d(c(e),t,r),s=r?.maxDeviationInSrTo??0;return n(o,a,r?.minSegmentLengthInDegrees??0,s).map((e=>m(e,t)))}function d(e,t,r={}){let n;const o=s(e),i=s(t);if(r?.geographicTransformation){const e=new p;e.setInputSpatialReference(o),e.setOutputSpatialReference(i);for(const t of r.geographicTransformation.steps){let r;r=t.wkid?f(t.wkid,t.isInverse):u(t.wkt,t.isInverse),e.add(r)}n=e.create()}else if(r?.areaOfInterestExtent)return g(o,i,a(r.areaOfInterestExtent).asEnvelope2D());return n?h(o,i,n):l(o,i)}export{j as execute,S as executeMany,T as isLoaded,I as load,x as supportsCurves};
package/interfaces.d.ts CHANGED
@@ -1466,6 +1466,24 @@ declare namespace __esri {
1466
1466
 
1467
1467
  export const svgUtils: svgUtils;
1468
1468
 
1469
+ /**
1470
+ * Note: reserved for internal use only, this is not part of the stable public API.
1471
+ *
1472
+ * View utils for components.
1473
+ */
1474
+ interface viewUtils {
1475
+ /**
1476
+ * Note: reserved for internal use only, this is not part of the stable public API.
1477
+ *
1478
+ * Waits until the specified view is not updating anymore.
1479
+ *
1480
+ * @param view
1481
+ */
1482
+ waitUpdated(view: any): Promise<void>;
1483
+ }
1484
+
1485
+ export const viewUtils: viewUtils;
1486
+
1469
1487
  /**
1470
1488
  * Note: reserved for internal use only, this is not part of the stable public API.
1471
1489
  *
@@ -1503,7 +1521,7 @@ declare namespace __esri {
1503
1521
  *
1504
1522
  * @param properties The properties for the VideoView constructor.
1505
1523
  */
1506
- createVideoView(properties: VideoViewParams): VideoView;
1524
+ createVideoView(properties: VideoViewParams): videoViewUtilsVideoView;
1507
1525
  }
1508
1526
 
1509
1527
  export const videoViewUtils: videoViewUtils;
@@ -1513,7 +1531,7 @@ declare namespace __esri {
1513
1531
  *
1514
1532
  * VideoView.
1515
1533
  */
1516
- export interface VideoView {
1534
+ export interface videoViewUtilsVideoView {
1517
1535
  container: HTMLDivElement | nullish;
1518
1536
  focused: boolean;
1519
1537
  height: number;
@@ -2876,6 +2894,14 @@ declare namespace __esri {
2876
2894
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#clone Read more...}
2877
2895
  */
2878
2896
  clone(): Color;
2897
+ /**
2898
+ * Checks equality of the Color instance with another Color instance.
2899
+ *
2900
+ * @param other Another color, or null or undefined.
2901
+ *
2902
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#equals Read more...}
2903
+ */
2904
+ equals(other: Color | nullish): boolean;
2879
2905
  /**
2880
2906
  * Takes an array of rgb(a) values, named string, hex string or an hsl(a) string,
2881
2907
  * an object with `r`, `g`, `b`, and `a` properties, or a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html Color} object
@@ -47955,12 +47981,12 @@ declare namespace __esri {
47955
47981
  /**
47956
47982
  * Whenever the network is edited or modified, the network and its features become out of date in the [network topology](https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/about-network-topology.htm).
47957
47983
  *
47958
- * @param parameters The parameters that are used to validate the network topology.
47984
+ * @param props The parameters that are used to validate the network topology.
47959
47985
  * @param options The request options specified by the user in the data request. See {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions RequestOptions} for available properties.
47960
47986
  *
47961
47987
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-Network.html#submitTopologyValidationJob Read more...}
47962
47988
  */
47963
- submitTopologyValidationJob(parameters: ValidateTopologyProps, options?: RequestOptions | null): Promise<TopologyValidationJobInfo | nullish>;
47989
+ submitTopologyValidationJob(props: ValidateTopologyProps, options?: RequestOptions | null): Promise<TopologyValidationJobInfo | nullish>;
47964
47990
  /**
47965
47991
  * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
47966
47992
  *
@@ -47970,12 +47996,12 @@ declare namespace __esri {
47970
47996
  /**
47971
47997
  * Whenever the network is edited or modified, the network and its features become out of date in the [network topology]( https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/about-network-topology.htm).
47972
47998
  *
47973
- * @param parameters The parameters that are used to validate the network topology.
47999
+ * @param props The parameters that are used to validate the network topology.
47974
48000
  * @param options The request options specified by the user in the data request. See {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions RequestOptions} for available properties.
47975
48001
  *
47976
48002
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-Network.html#validateTopology Read more...}
47977
48003
  */
47978
- validateTopology(parameters: ValidateTopologyProps, options?: RequestOptions | null): Promise<ValidateNetworkTopologyResult>;
48004
+ validateTopology(props: ValidateTopologyProps, options?: RequestOptions | null): Promise<ValidateNetworkTopologyResult>;
47979
48005
  /**
47980
48006
  * `when()` may be leveraged once an instance of the class is created.
47981
48007
  *
@@ -96328,7 +96354,7 @@ declare namespace __esri {
96328
96354
  *
96329
96355
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-ImageryLayerView.html#highlight Read more...}
96330
96356
  */
96331
- highlight(target: Graphic | Graphic[], options?: ImageryLayerViewHighlightOptions): Handle;
96357
+ highlight(target: Graphic | Graphic[] | Collection<Graphic>, options?: ImageryLayerViewHighlightOptions): Handle;
96332
96358
  }
96333
96359
 
96334
96360
  interface ImageryLayerViewProperties extends LayerViewProperties {
@@ -99423,6 +99449,207 @@ declare namespace __esri {
99423
99449
  | "top-trailing"
99424
99450
  | "manual";
99425
99451
 
99452
+ export interface VideoView extends Accessor, corePromise, Evented, DOMContainer {
99453
+ }
99454
+
99455
+ export class VideoView {
99456
+ /**
99457
+ * Indicates if the browser focus is on the view.
99458
+ *
99459
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#focused Read more...}
99460
+ */
99461
+ declare readonly focused: DOMContainer["focused"];
99462
+ /**
99463
+ * The height of the view in pixels read from the view container element.
99464
+ *
99465
+ * @default 0
99466
+ *
99467
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#height Read more...}
99468
+ */
99469
+ declare readonly height: DOMContainer["height"];
99470
+ /**
99471
+ * The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html VideoLayer} to display in the view.
99472
+ *
99473
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#layer Read more...}
99474
+ */
99475
+ layer: VideoLayer | nullish;
99476
+ /**
99477
+ * When `true`, this property indicates whether the view successfully satisfied all dependencies,
99478
+ * signaling that the following conditions are met.
99479
+ *
99480
+ * @default false
99481
+ *
99482
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#ready Read more...}
99483
+ */
99484
+ readonly ready: boolean;
99485
+ /**
99486
+ * Indicates if the view is being resized.
99487
+ *
99488
+ * @default false
99489
+ *
99490
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#resizing Read more...}
99491
+ */
99492
+ declare readonly resizing: DOMContainer["resizing"];
99493
+ /**
99494
+ * Scale is the ratio between the size of the video in pixels and the size of the view in pixels.
99495
+ *
99496
+ * @default 0
99497
+ *
99498
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#scale Read more...}
99499
+ */
99500
+ scale: number;
99501
+ /**
99502
+ * An array containing the width and height of the view in pixels, e.g.
99503
+ *
99504
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#size Read more...}
99505
+ */
99506
+ declare readonly size: DOMContainer["size"];
99507
+ /**
99508
+ * Indicates if the view is visible on the page.
99509
+ *
99510
+ * @default true
99511
+ *
99512
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#suspended Read more...}
99513
+ */
99514
+ declare readonly suspended: DOMContainer["suspended"];
99515
+ /**
99516
+ * An array containing the width and height of the video in pixels, e.g.
99517
+ *
99518
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#videoSize Read more...}
99519
+ */
99520
+ readonly videoSize: number[];
99521
+ /**
99522
+ * The width of the view in pixels read from the view container element.
99523
+ *
99524
+ * @default 0
99525
+ *
99526
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#width Read more...}
99527
+ */
99528
+ declare readonly width: DOMContainer["width"];
99529
+ /**
99530
+ * The VideoView class provides a view for displaying video feeds from a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html VideoLayer}.
99531
+ *
99532
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html Read more...}
99533
+ */
99534
+ constructor(properties?: VideoViewProperties);
99535
+ /**
99536
+ * The `id` or node representing the DOM element containing the view.
99537
+ *
99538
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#container Read more...}
99539
+ */
99540
+ get container(): HTMLDivElement | nullish;
99541
+ set container(value: HTMLDivElement | nullish | string);
99542
+ /**
99543
+ * Options to configure the navigation behavior of the View.
99544
+ *
99545
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#navigation Read more...}
99546
+ */
99547
+ get navigation(): Navigation;
99548
+ set navigation(value: NavigationProperties);
99549
+ /**
99550
+ * Exposes the default widgets available in the view and allows you to toggle them on
99551
+ * and off.
99552
+ *
99553
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#ui Read more...}
99554
+ */
99555
+ get ui(): DefaultUI;
99556
+ set ui(value: DefaultUIProperties);
99557
+ /**
99558
+ * Emits an event on the instance.
99559
+ *
99560
+ * @param type The name of the event.
99561
+ * @param event The event payload.
99562
+ *
99563
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#emit Read more...}
99564
+ */
99565
+ emit(type: string, event?: any): boolean;
99566
+ /**
99567
+ * Sets the focus on the view.
99568
+ *
99569
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#focus Read more...}
99570
+ */
99571
+ focus(): void;
99572
+ /**
99573
+ * Indicates whether there is an event listener on the instance that matches
99574
+ * the provided event name.
99575
+ *
99576
+ * @param type The name of the event.
99577
+ *
99578
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#hasEventListener Read more...}
99579
+ */
99580
+ hasEventListener(type: string): boolean;
99581
+ /**
99582
+ * `isFulfilled()` may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).
99583
+ *
99584
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#isFulfilled Read more...}
99585
+ */
99586
+ isFulfilled(): boolean;
99587
+ /**
99588
+ * `isRejected()` may be used to verify if creating an instance of the class is rejected.
99589
+ *
99590
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#isRejected Read more...}
99591
+ */
99592
+ isRejected(): boolean;
99593
+ /**
99594
+ * `isResolved()` may be used to verify if creating an instance of the class is resolved.
99595
+ *
99596
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#isResolved Read more...}
99597
+ */
99598
+ isResolved(): boolean;
99599
+ /**
99600
+ * Registers an event handler on the instance.
99601
+ *
99602
+ * @param type An {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#events-summary event} or an array of events to listen for.
99603
+ * @param listener The function to call when the event fires.
99604
+ *
99605
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#on Read more...}
99606
+ */
99607
+ on(type: string | string[], listener: EventHandler): IHandle;
99608
+ /**
99609
+ * `when()` may be leveraged once an instance of the class is created.
99610
+ *
99611
+ * @param callback The function to call when the promise resolves.
99612
+ * @param errback The function to execute when the promise fails.
99613
+ *
99614
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#when Read more...}
99615
+ */
99616
+ when(callback?: Function, errback?: Function): Promise<any>;
99617
+ }
99618
+
99619
+ interface VideoViewProperties extends DOMContainerProperties {
99620
+ /**
99621
+ * The `id` or node representing the DOM element containing the view.
99622
+ *
99623
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#container Read more...}
99624
+ */
99625
+ container?: HTMLDivElement | nullish | string;
99626
+ /**
99627
+ * The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html VideoLayer} to display in the view.
99628
+ *
99629
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#layer Read more...}
99630
+ */
99631
+ layer?: VideoLayer | nullish;
99632
+ /**
99633
+ * Options to configure the navigation behavior of the View.
99634
+ *
99635
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#navigation Read more...}
99636
+ */
99637
+ navigation?: NavigationProperties;
99638
+ /**
99639
+ * Scale is the ratio between the size of the video in pixels and the size of the view in pixels.
99640
+ *
99641
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#scale Read more...}
99642
+ */
99643
+ scale?: number;
99644
+ /**
99645
+ * Exposes the default widgets available in the view and allows you to toggle them on
99646
+ * and off.
99647
+ *
99648
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#ui Read more...}
99649
+ */
99650
+ ui?: DefaultUIProperties;
99651
+ }
99652
+
99426
99653
  export interface View extends Accessor, corePromise, Evented {
99427
99654
  }
99428
99655
 
@@ -130681,6 +130908,12 @@ declare namespace __esri {
130681
130908
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GridControls-GridControlsViewModel.html#numericSpacingInputShouldBeVisible Read more...}
130682
130909
  */
130683
130910
  readonly numericSpacingInputShouldBeVisible: boolean;
130911
+ /**
130912
+ * If true, interactive placement tools should be disabled.
130913
+ *
130914
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GridControls-GridControlsViewModel.html#placementDisabled Read more...}
130915
+ */
130916
+ placementDisabled: boolean;
130684
130917
  /**
130685
130918
  * Determines the behavior of the grid when the map's viewpoint is rotated.
130686
130919
  *
@@ -130778,6 +131011,12 @@ declare namespace __esri {
130778
131011
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GridControls-GridControlsViewModel.html#majorLineInterval Read more...}
130779
131012
  */
130780
131013
  majorLineInterval?: number;
131014
+ /**
131015
+ * If true, interactive placement tools should be disabled.
131016
+ *
131017
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GridControls-GridControlsViewModel.html#placementDisabled Read more...}
131018
+ */
131019
+ placementDisabled?: boolean;
130781
131020
  /**
130782
131021
  * Determines the behavior of the grid when the map's viewpoint is rotated.
130783
131022
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{serializationUtilsModuleWrapper as t}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import a from"../core/Collection.js";import i from"../core/Error.js";import n from"../core/Logger.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as s,isAbortError as l,createAbortError as h}from"../core/promiseUtils.js";import{watch as d,sync as p}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as y,idToName as g}from"../core/accessorSupport/PropertyOrigin.js";import m from"../geometry/Extent.js";import f from"../geometry/Point.js";import L from"../geometry/Polyline.js";import b from"./Layer.js";import{convertFromGeometry as w}from"./graphics/featureConversionUtils.js";import{systemOidFieldName as M,systemOriginIdFieldName as k,systemDestinationIdFieldName as C,systemLayoutGeometryFieldName as T,systemAggregationCountFieldName as N}from"./knowledgeGraph/constants.js";import{IdealEdgeLengthTypeOptions as v}from"./knowledgeGraph/IdealEdgeLengthTypeOptions.js";import{KnowledgeGraphLayerDataManager as D}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import x from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{initializeLayersFromClientData as I}from"./knowledgeGraph/layerUtils.js";import E from"./knowledgeGraph/SessionMemoryStorage.js";import{convertLayoutTypeToWebSupportedFormat as S,getRelationshipEndNodeIds as _}from"./knowledgeGraph/supportUtils.js";import{BlendLayer as R}from"./mixins/BlendLayer.js";import{OperationalLayer as A}from"./mixins/OperationalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{url as G}from"./support/commonProperties.js";import{LCChronologicalLayout as z,LCSimpleLayout as P,LCSmartTreeLayout as O,LCRadialTreeLayout as F,LCHierarchicalLayout as U,LCCommunityLayout as B,LCForceDirectedLayout as Q,NodeFlag as W,load as $,CallStatus as H,LinkType as K}from"../libs/linkchartlayout/LinkChartLayout.js";import{fetchKnowledgeGraph as V}from"../rest/knowledgeGraphService.js";let q=class extends(A(R(j(r(b))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(a.ofType(x)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new m({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(a.ofType(x)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new i("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles(d((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],o=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new i("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],o=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,r)=>{const s=this._graphTypeLookup.get(r);if(!s)return n.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);"relationship"===s.type?t.has(r)||(t.add(r),o.push(s)):"entity"===s.type?t.has(r)||(t.add(r),a.push(s)):(n.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(r))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],o=e.knowledgeGraph.dataModel.relationshipTypes??[]);const r=new D({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=o,this.dataManager=r}load(e){const a=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await I(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((i=>{V(this.url).then((async n=>{n.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),n.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const r=this.linkChart?.linkChartProperties;if(r?.originIdOf("entitiesUrl")===y.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await t.fetchAndConvertSerializedLinkChart({entitiesUrl:r?.entitiesUrl,relationshipsUrl:r?.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(n.dataModel),this.initializationLinkChartConfig={layoutSettings:r?.layoutSettings??void 0,layoutMode:S(r.layoutType)}),this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=E.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);if(a){o(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}}await a()}else{const t="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{s(e),await a()})))}i(null)}))}))),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):n.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await _(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const r of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(r.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(r.typeName)?.members?.has(r.id))&&n.push(r);if(t){const e=new Set,t=[];for(const a of n)if(this.dataManager.nodeConnectionsLookup.has(a.id))for(const t of this.dataManager.nodeConnectionsLookup.get(a.id))e.add(t);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const r of n)this.sublayerIdsCache.get(r.typeName)?.delete(r.id),this.dataManager.relationshipTypeNames.has(r.typeName)?this.relationshipLinkChartDiagramLookup.delete(r.id):this.entityLinkChartDiagramLookup.delete(r.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings}),n.length>0&&(this.membershipModified=!0);const o=[];return this.layers.forEach((e=>{o.push(e.refreshCachedQueryEngine())})),await Promise.all(o),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),s(t?.signal)}catch(i){throw l(i)&&a.length>0&&this.removeRecords(a,{overrideMembershipCheck:!0}),i}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===y.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===y.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=o(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:w(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="organic-standard",t){const a=[],r=[],l=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{r.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const d=new Map,p=new Map,c=new Map,u=new Map,y=new Uint8Array(a.length),g=new Float64Array(a.length),b=new Float64Array(a.length),v=new Float64Array(a.length),D=new Float64Array(a.length),x=new Uint32Array(r.length),I=new Uint32Array(r.length),E=new Float64Array(r.length),S=new Float64Array(r.length),_=[],R="organic-standard",A=new m({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let j,G="organic-standard",V=0,q=0;const J=z.apply;switch(G="geographic-organic-standard"===e?R:e,G){case"organic-standard":j=Q.apply;break;case"organic-community":j=B.apply;break;case"hierarchical-bottom-to-top":j=U.apply;break;case"radial-root-centric":j=F.apply;break;case"tree-left-to-right":j=O.apply;break;default:j=P.apply}let X=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[M])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?y[V]=W.IsGeographic:y[V]=W.None;const n=t.lockedNodeLocations.get(i.attributes[M]);g[V]=n.x,b[V]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){y[V]=W.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":g[V]=t?.x,b[V]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(g[V]=e.x,b[V]=e.y):y[V]=W.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(g[V]=e.x,b[V]=e.y):y[V]=W.IsMovable;break;default:y[V]=W.IsMovable}(null==g[V]||null==b[V]||Number.isNaN(g[V])||Number.isNaN(b[V]))&&(y[V]=W.IsMovable,g[V]=0,b[V]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!X&&t?.lockedNodeLocations?.has(i.attributes[M])&&(X=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,o=n&&e?.startField?i.attributes[n]:null;v[V]=o?new Date(o).getTime():NaN;const r=e?.endField,s=r&&e?.endField?i.attributes[r]:null;D[V]=s?new Date(s).getTime():NaN,g[V]=0,b[V]=0,y[V]=W.IsMovable}else y[V]=W.IsMovable,g[V]=0,b[V]=0;u.set(i.attributes[M],V),_[V]={feature:i,typeName:a},V++})),X&&n.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let Y=!1;const Z=new Map;r.forEach((a=>{const i=a.feature.attributes[k],n=a.feature.attributes[C],o=u.get(i),r=u.get(n),s=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?s?.startField:null,d=h?a.feature.attributes[h]:null,p=s?.endField,c=p?a.feature.attributes[p]:null;if(void 0!==o&&void 0!==r){let t=i+"-"+n;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+c);const s=Z.get(t),h=s?.has(a.typeName);h||(x[q]=o,I[q]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(E[q]=d?new Date(d).getTime():NaN,S[q]=c?new Date(c).getTime():NaN),void 0===s?Z.set(t,new Map([[a.typeName,q]])):s.set(a.typeName,q),q++),l.push(a)}else Y=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),Y&&n.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const ee=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),te=this._convertValidatedOrganicSettingsToCalculationSettings(ee);await $();let ae=H.Error,ie=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:ae,links:ie,graphics:a}=J((()=>t?.signal?.aborted??!1),y,g,b,v,D,x.subarray(0,q),I.subarray(0,q),E.subarray(0,q),S.subarray(0,q),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),ae===H.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:ae,links:ie}=j((()=>t?.signal?.aborted??!1),y,g,b,x.subarray(0,q),I.subarray(0,q),te.computationBudgetTime,te.idealEdgeLengthMultiplier,te.repulsionRadiusMultiplier));if(s(t?.signal),ae===H.Error)throw new i("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(ae===H.Canceled)throw h();for(let i=0;i<_.length;i++){if(b[i]>84.9999?b[i]=84.9999:b[i]<-84.9999&&(b[i]=-84.9999),g[i]>179.9999?g[i]=179.9999:g[i]<-179.9999&&(g[i]=-179.9999),_[i].feature.attributes[T]=new f(g[i],b[i]),d.has(_[i].typeName)){const e=d.get(_[i].typeName);e?.set(_[i].feature.attributes[M],_[i].feature)}else{const e=new Map;e.set(_[i].feature.attributes[M],_[i].feature),d.set(_[i].typeName,e)}c.set(_[i].feature.attributes[M],_[i].feature);const e=w(_[i].feature.attributes[T]);this.entityLinkChartDiagramLookup.set(_[i].feature.attributes[M],_[i].feature.attributes[T]?e:null);const t=o(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,_[i].typeName,(()=>({useAllData:!1,members:new Map})));o(t.members,_[i].feature.attributes[M],(()=>({id:_[i].feature.attributes[M],linkChartLocation:void 0}))).linkChartLocation=_[i].feature.attributes[T],_[i].feature.attributes[T].x<A.xmin&&(A.xmin=_[i].feature.attributes[T].x),_[i].feature.attributes[T].x>A.xmax&&(A.xmax=_[i].feature.attributes[T].x),_[i].feature.attributes[T].y<A.ymin&&(A.ymin=_[i].feature.attributes[T].y),_[i].feature.attributes[T].y>A.ymax&&(A.ymax=_[i].feature.attributes[T].y)}if(this.linkChartExtent.xmin=A.xmin,this.linkChartExtent.xmax=A.xmax,this.linkChartExtent.ymin=A.ymin,this.linkChartExtent.ymax=A.ymax,!ie)throw new i("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const ne=new Map,oe=new Map,re=new Map,se=new Set;for(let i=0;i<l.length;i++){const a=[],r=l[i],s=r.feature.attributes[k],h=r.feature.attributes[C];let d=s+"-"+h;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(r.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?r.feature.attributes[a]:null,n=e?.endField;d+="-"+i+"-"+(n?r.feature.attributes[n]:null)}const y=Z.get(d).get(r.typeName),g=0===y?0:ie?.vertexEndIndex[y-1];if(!se.has(y)){if(se.add(y),ie.types[y]===K.Recursive){const e=[ie.vertices[2*g],ie.vertices[2*g+1]],t=[ie.vertices[2*(g+1)],ie.vertices[2*(g+1)+1]],i=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[i[0]-e[0],i[1]-e[1]],o=[i[0]+n[1],i[1]-n[0]],r=[i[0]-n[1],i[1]+n[0]];a.push(e),a.push(o),a.push(t),a.push(r),a.push(e)}else{if(ie.types[y]!==K.Regular){n.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<ie.vertexEndIndex[y];e++)a.push([ie.vertices[2*e],ie.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=_[u.get(s)]?.feature.attributes[T],t=_[u.get(h)]?.feature.attributes[T];a[0][0]===e.x&&a[0][1]===e.y||(a[0]=[e.x,e.y]),a[a.length-1][0]===t.x&&a[a.length-1][1]===t.y||(a[a.length-1]=[t.x,t.y])}for(let e=1;e<a.length-1;e++)a[e][1]>85.5?a[e][1]=85.5:a[e][1]<-85.5&&(a[e][1]=-85.5),a[e][0]>179.9999?a[e][0]=179.9999:a[e][0]<-179.9999&&(a[e][0]=-179.9999);ne.has(d)?ne.get(d).push(a):ne.set(d,[a])}const m=ne.get(d);oe.has(d)||(oe.set(d,new Map),re.set(d,new Map));const f=oe.get(d),b=re.get(d);f.has(r.typeName)||(f.set(r.typeName,m.shift()),b.set(r.typeName,0));const N=f.get(r.typeName);b.set(r.typeName,b.get(r.typeName)+1);const v=new L({paths:[N]});if(r.feature.attributes[T]=v,p.has(r.typeName)){const e=p.get(r.typeName);e?.set(r.feature.attributes[M],r.feature)}else{const e=new Map;e.set(r.feature.attributes[M],r.feature),p.set(r.typeName,e)}c.set(r.feature.attributes[M],r.feature);const D=w(r.feature.attributes[T]);this.relationshipLinkChartDiagramLookup.set(r.feature.attributes[M],r.feature.attributes[T]?D:null);const x=o(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,r.typeName,(()=>({useAllData:!1,members:new Map})));o(x.members,r.feature.attributes[M],(()=>({id:r.feature.attributes[M],linkChartLocation:void 0}))).linkChartLocation=D}for(const i of l)i.feature.attributes[N]=re.get(i.feature.attributes[k]+"-"+i.feature.attributes[C])?.get(i.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:d,links:p,idMap:c}}async applyNewLinkChartLayout(e="organic-standard",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new f({x:i.x,y:i.y})))}));return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),s(t)}catch(i){throw l(i)&&this.removeRecords(a),i}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),s(t)}catch(i){throw l(i)&&this.removeRecords(a),i}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const a=[];this.dataManager.addToLayer(e);for(const n of e)this.sublayerIdsCache.has(n.typeName)||(this.sublayerIdsCache.set(n.typeName,new Set),a.push(n.typeName)),this.sublayerIdsCache.get(n.typeName).add(n.id);for(const n of a){const e=this._graphTypeLookup.get(n);if(e){const t=this._createSublayer(e);"entity"===e.type?this.dataManager.entityTypeNames.add(n):this.dataManager.relationshipTypeNames.add(n),t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.set(n,new Map)}}await I(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const i={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:new Map};for(const[n,o]of this.entityLinkChartDiagramLookup.entries())o&&i.lockedNodeLocations.set(n,new f(o.coords[0],o.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,i)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=y.PORTAL_ITEM&&e<y.USER}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const o=w(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[k]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[C]);if(t&&a){const i=w(new L({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[M],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[M],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig||{}}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),i=e=>a(e)&&e>=1,o=e=>a(e)&&e>=1,r=e=>Object.values(v).includes(e),s=e=>a(e)&&e>=0,l={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return l;const{computationBudgetTime:h,autoRepulsionRadius:d,repulsionRadiusMultiplier:p,absoluteIdealEdgeLength:c,multiplicativeIdealEdgeLength:u,idealEdgeLengthType:y}=t;return o(h)?l.computationBudgetTime=h:h&&n.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),l.autoRepulsionRadius=d,!d&&i(p)?l.repulsionRadiusMultiplier=p:d||(l.autoRepulsionRadius=!0,n.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&(r(y)?l.idealEdgeLengthType=y:void 0!==y&&n.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===y&&s(c)?l.absoluteIdealEdgeLength=c:"absolute-value"===y&&void 0!==c?n.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===y&&s(u)?l.multiplicativeIdealEdgeLength=u:"multiplier"===y&&void 0!==u&&n.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),l}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===v.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===v.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new x({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),i=new Set((e.entityTypes??[]).map((e=>e.name))),o=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const a of this.layers)!a.graphType&&t.has(a.graphTypeName)&&(a.graphType=i.has(a.graphTypeName)?"entity":"relationship");const e=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?i.has(e.graphTypeName):o.has(e.graphTypeName))));this.setAtOrigin("layers",e,g(this.originIdOf("layers")))}else this.layers=new a;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const n of a)e.has(n)||this._originalInclusionList.namedTypeDefinitions.set(n,{useAllData:!1,members:new Map});const i=[];for(const o of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(o)||(n.getLogger(this).warn(`A named type, ${o}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(o));for(const n of i)this._originalInclusionList.namedTypeDefinitions.delete(n)}}};e([c(G)],q.prototype,"url",void 0),e([c()],q.prototype,"dataPreloadedInLocalCache",void 0),e([c()],q.prototype,"initializationLinkChartConfig",void 0),e([c()],q.prototype,"membershipModified",void 0),e([c()],q.prototype,"dataManager",void 0),e([c()],q.prototype,"initializationInclusionModeDefinition",null),e([c()],q.prototype,"knowledgeGraph",void 0),e([c({type:a.ofType(x),json:{write:{ignoreOrigin:!0}}})],q.prototype,"layers",void 0),e([c({readOnly:!0})],q.prototype,"linkChart",null),e([c()],q.prototype,"entityLinkChartDiagramLookup",void 0),e([c()],q.prototype,"relationshipLinkChartDiagramLookup",void 0),e([c()],q.prototype,"linkChartExtent",void 0),e([c()],q.prototype,"memberEntityTypes",void 0),e([c()],q.prototype,"memberRelationshipTypes",void 0),e([c({type:["LinkChartLayer"]})],q.prototype,"operationalLayerType",void 0),e([c()],q.prototype,"sublayerIdsCache",void 0),e([c({type:a.ofType(x),json:{write:{ignoreOrigin:!0}}})],q.prototype,"tables",void 0),e([c({json:{read:!1}})],q.prototype,"type",void 0),e([c({json:{read:!1}})],q.prototype,"chronologicalAuxiliaryGraphics",void 0),q=e([u("esri.layers.LinkChartLayer")],q);const J=q;export{J as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{serializationUtilsModuleWrapper as t}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import a from"../core/Collection.js";import i from"../core/Error.js";import n from"../core/Logger.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as s,isAbortError as l,createAbortError as h}from"../core/promiseUtils.js";import{watch as d,sync as p}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as y,idToName as g}from"../core/accessorSupport/PropertyOrigin.js";import m from"../geometry/Extent.js";import f from"../geometry/Point.js";import L from"../geometry/Polyline.js";import w from"./Layer.js";import{convertFromGeometry as b}from"./graphics/featureConversionUtils.js";import{systemOidFieldName as M,systemOriginIdFieldName as k,systemDestinationIdFieldName as C,systemLayoutGeometryFieldName as T,systemAggregationCountFieldName as N}from"./knowledgeGraph/constants.js";import{IdealEdgeLengthTypeOptions as v}from"./knowledgeGraph/IdealEdgeLengthTypeOptions.js";import{KnowledgeGraphLayerDataManager as D}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import x from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{initializeLayersFromClientData as I}from"./knowledgeGraph/layerUtils.js";import E from"./knowledgeGraph/SessionMemoryStorage.js";import{convertLayoutTypeToWebSupportedFormat as S,getRelationshipEndNodeIds as _}from"./knowledgeGraph/supportUtils.js";import{BlendLayer as R}from"./mixins/BlendLayer.js";import{OperationalLayer as A}from"./mixins/OperationalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{url as G}from"./support/commonProperties.js";import{LCChronologicalLayout as z,LCSimpleLayout as P,LCSmartTreeLayout as O,LCRadialTreeLayout as F,LCHierarchicalLayout as U,LCCommunityLayout as B,LCForceDirectedLayout as Q,NodeFlag as W,load as $,CallStatus as H,LinkType as K}from"../libs/linkchartlayout/LinkChartLayout.js";import{fetchKnowledgeGraph as V}from"../rest/knowledgeGraphService.js";let q=class extends(A(R(j(r(w))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(a.ofType(x)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new m({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(a.ofType(x)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new i("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles(d((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],o=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new i("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],o=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,r)=>{const s=this._graphTypeLookup.get(r);if(!s)return n.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);"relationship"===s.type?t.has(r)||(t.add(r),o.push(s)):"entity"===s.type?t.has(r)||(t.add(r),a.push(s)):(n.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(r))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],o=e.knowledgeGraph.dataModel.relationshipTypes??[]);const r=new D({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=o,this.dataManager=r}load(e){const a=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await I(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((i=>{V(this.url).then((async n=>{n.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),n.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const r=this.linkChart?.linkChartProperties;if(r?.originIdOf("entitiesUrl")===y.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await t.fetchAndConvertSerializedLinkChart({entitiesUrl:r?.entitiesUrl,relationshipsUrl:r?.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(n.dataModel),this.initializationLinkChartConfig={layoutSettings:r?.layoutSettings??void 0,layoutMode:S(r.layoutType)}),this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=E.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);if(a){o(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}}await a()}else{const t="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{s(e),await a()})))}i(null)}))}))),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):n.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await _(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const r of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(r.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(r.typeName)?.members?.has(r.id))&&n.push(r);if(t){const e=new Set,t=[];for(const a of n)if(this.dataManager.nodeConnectionsLookup.has(a.id))for(const t of this.dataManager.nodeConnectionsLookup.get(a.id))e.add(t);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const r of n)this.sublayerIdsCache.get(r.typeName)?.delete(r.id),this.dataManager.relationshipTypeNames.has(r.typeName)?this.relationshipLinkChartDiagramLookup.delete(r.id):this.entityLinkChartDiagramLookup.delete(r.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings}),n.length>0&&(this.membershipModified=!0);const o=[];return this.layers.forEach((e=>{o.push(e.refreshCachedQueryEngine())})),await Promise.all(o),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),s(t?.signal)}catch(i){throw l(i)&&a.length>0&&this.removeRecords(a,{overrideMembershipCheck:!0}),i}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===y.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===y.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=o(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:b(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="organic-standard",t){const a=[],r=[],l=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{r.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const d=new Map,p=new Map,c=new Map,u=new Map,y=new Uint8Array(a.length),g=new Float64Array(a.length),w=new Float64Array(a.length),v=new Float64Array(a.length),D=new Float64Array(a.length),x=new Uint32Array(r.length),I=new Uint32Array(r.length),E=new Float64Array(r.length),S=new Float64Array(r.length),_=[],R="organic-standard";let A=!1;const j=new m({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let G,V="organic-standard",q=0,J=0;const X=z.apply;switch(V="geographic-organic-standard"===e?R:e,V){case"organic-standard":G=Q.apply;break;case"organic-community":G=B.apply;break;case"hierarchical-bottom-to-top":G=U.apply;break;case"radial-root-centric":G=F.apply;break;case"tree-left-to-right":G=O.apply;break;default:G=P.apply}let Y=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[M])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?y[q]=W.IsGeographic:y[q]=W.None;const n=t.lockedNodeLocations.get(i.attributes[M]);g[q]=n.x,w[q]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){y[q]=W.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":g[q]=t?.x,w[q]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(g[q]=e.x,w[q]=e.y):y[q]=W.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(g[q]=e.x,w[q]=e.y):y[q]=W.IsMovable;break;default:y[q]=W.IsMovable}(null==g[q]||null==w[q]||Number.isNaN(g[q])||Number.isNaN(w[q]))&&(y[q]=W.IsMovable,g[q]=0,w[q]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!Y&&t?.lockedNodeLocations?.has(i.attributes[M])&&(Y=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,o=n&&e?.startField?i.attributes[n]:null;v[q]=o?new Date(o).getTime():NaN;const r=e?.endField,s=r&&e?.endField?i.attributes[r]:null;D[q]=s?new Date(s).getTime():NaN,g[q]=0,w[q]=0,y[q]=W.IsMovable}else y[q]=W.IsMovable,g[q]=0,w[q]=0;u.set(i.attributes[M],q),_[q]={feature:i,typeName:a},q++})),Y&&n.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let Z=!1;const ee=new Map;r.forEach((a=>{const i=a.feature.attributes[k],n=a.feature.attributes[C],o=u.get(i),r=u.get(n),s=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?s?.startField:null,d=h?a.feature.attributes[h]:null,p=s?.endField,c=p?a.feature.attributes[p]:null;if(void 0!==o&&void 0!==r){let t=i+"-"+n;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+c);const s=ee.get(t),h=s?.has(a.typeName);h||(x[J]=o,I[J]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(E[J]=d?new Date(d).getTime():NaN,S[J]=c?new Date(c).getTime():NaN),void 0===s?ee.set(t,new Map([[a.typeName,J]])):s.set(a.typeName,J),J++),l.push(a)}else Z=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),Z&&n.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const te=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),ae=this._convertValidatedOrganicSettingsToCalculationSettings(te);await $();let ie=H.Error,ne=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:ie,links:ne,graphics:a}=X((()=>t?.signal?.aborted??!1),y,g,w,v,D,x.subarray(0,J),I.subarray(0,J),E.subarray(0,J),S.subarray(0,J),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),ie===H.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:ie,links:ne}=G((()=>t?.signal?.aborted??!1),y,g,w,x.subarray(0,J),I.subarray(0,J),ae.computationBudgetTime,ae.idealEdgeLengthMultiplier,ae.repulsionRadiusMultiplier));if(s(t?.signal),ie===H.Error)throw new i("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(ie===H.Canceled)throw h();for(let i=0;i<_.length;i++){if(w[i]>84.9999?w[i]=84.9999:w[i]<-84.9999&&(w[i]=-84.9999),g[i]>179.9999?g[i]=179.9999:g[i]<-179.9999&&(g[i]=-179.9999),_[i].feature.attributes[T]=new f(g[i],w[i]),d.has(_[i].typeName)){const e=d.get(_[i].typeName);e?.set(_[i].feature.attributes[M],_[i].feature)}else{const e=new Map;e.set(_[i].feature.attributes[M],_[i].feature),d.set(_[i].typeName,e)}c.set(_[i].feature.attributes[M],_[i].feature);const e=b(_[i].feature.attributes[T]);this.entityLinkChartDiagramLookup.set(_[i].feature.attributes[M],_[i].feature.attributes[T]?e:null);const t=o(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,_[i].typeName,(()=>({useAllData:!1,members:new Map})));o(t.members,_[i].feature.attributes[M],(()=>({id:_[i].feature.attributes[M],linkChartLocation:void 0}))).linkChartLocation=_[i].feature.attributes[T];const{x:a,y:n}=_[i].feature.attributes[T];if(A)j.xmin=Math.min(j.xmin,a),j.xmax=Math.max(j.xmax,a),j.ymin=Math.min(j.ymin,n),j.ymax=Math.max(j.ymax,n);else{const e=1e-7;j.xmin=a-e,j.xmax=a+e,j.ymin=n-e,j.ymax=n+e,A=!0}}if(this.linkChartExtent.xmin=j.xmin,this.linkChartExtent.xmax=j.xmax,this.linkChartExtent.ymin=j.ymin,this.linkChartExtent.ymax=j.ymax,!ne)throw new i("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const oe=new Map,re=new Map,se=new Map,le=new Set;for(let i=0;i<l.length;i++){const a=[],r=l[i],s=r.feature.attributes[k],h=r.feature.attributes[C];let d=s+"-"+h;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(r.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?r.feature.attributes[a]:null,n=e?.endField;d+="-"+i+"-"+(n?r.feature.attributes[n]:null)}const y=ee.get(d).get(r.typeName),g=0===y?0:ne?.vertexEndIndex[y-1];if(!le.has(y)){if(le.add(y),ne.types[y]===K.Recursive){const e=[ne.vertices[2*g],ne.vertices[2*g+1]],t=[ne.vertices[2*(g+1)],ne.vertices[2*(g+1)+1]],i=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[i[0]-e[0],i[1]-e[1]],o=[i[0]+n[1],i[1]-n[0]],r=[i[0]-n[1],i[1]+n[0]];a.push(e),a.push(o),a.push(t),a.push(r),a.push(e)}else{if(ne.types[y]!==K.Regular){n.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<ne.vertexEndIndex[y];e++)a.push([ne.vertices[2*e],ne.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=_[u.get(s)]?.feature.attributes[T],t=_[u.get(h)]?.feature.attributes[T];a[0][0]===e.x&&a[0][1]===e.y||(a[0]=[e.x,e.y]),a[a.length-1][0]===t.x&&a[a.length-1][1]===t.y||(a[a.length-1]=[t.x,t.y])}for(let e=1;e<a.length-1;e++)a[e][1]>85.5?a[e][1]=85.5:a[e][1]<-85.5&&(a[e][1]=-85.5),a[e][0]>179.9999?a[e][0]=179.9999:a[e][0]<-179.9999&&(a[e][0]=-179.9999);oe.has(d)?oe.get(d).push(a):oe.set(d,[a])}const m=oe.get(d);re.has(d)||(re.set(d,new Map),se.set(d,new Map));const f=re.get(d),w=se.get(d);f.has(r.typeName)||(f.set(r.typeName,m.shift()),w.set(r.typeName,0));const N=f.get(r.typeName);w.set(r.typeName,w.get(r.typeName)+1);const v=new L({paths:[N]});if(r.feature.attributes[T]=v,p.has(r.typeName)){const e=p.get(r.typeName);e?.set(r.feature.attributes[M],r.feature)}else{const e=new Map;e.set(r.feature.attributes[M],r.feature),p.set(r.typeName,e)}c.set(r.feature.attributes[M],r.feature);const D=b(r.feature.attributes[T]);this.relationshipLinkChartDiagramLookup.set(r.feature.attributes[M],r.feature.attributes[T]?D:null);const x=o(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,r.typeName,(()=>({useAllData:!1,members:new Map})));o(x.members,r.feature.attributes[M],(()=>({id:r.feature.attributes[M],linkChartLocation:void 0}))).linkChartLocation=D}for(const i of l)i.feature.attributes[N]=se.get(i.feature.attributes[k]+"-"+i.feature.attributes[C])?.get(i.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:d,links:p,idMap:c}}async applyNewLinkChartLayout(e="organic-standard",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new f({x:i.x,y:i.y})))}));return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),s(t)}catch(i){throw l(i)&&this.removeRecords(a),i}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),s(t)}catch(i){throw l(i)&&this.removeRecords(a),i}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const a=[];this.dataManager.addToLayer(e);for(const n of e)this.sublayerIdsCache.has(n.typeName)||(this.sublayerIdsCache.set(n.typeName,new Set),a.push(n.typeName)),this.sublayerIdsCache.get(n.typeName).add(n.id);for(const n of a){const e=this._graphTypeLookup.get(n);if(e){const t=this._createSublayer(e);"entity"===e.type?this.dataManager.entityTypeNames.add(n):this.dataManager.relationshipTypeNames.add(n),t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.set(n,new Map)}}await I(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const i={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:new Map};for(const[n,o]of this.entityLinkChartDiagramLookup.entries())o&&i.lockedNodeLocations.set(n,new f(o.coords[0],o.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,i)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=y.PORTAL_ITEM&&e<y.USER}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const o=b(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[k]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[C]);if(t&&a){const i=b(new L({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[M],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[M],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig||{}}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),i=e=>a(e)&&e>=1,o=e=>a(e)&&e>=1,r=e=>Object.values(v).includes(e),s=e=>a(e)&&e>=0,l={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return l;const{computationBudgetTime:h,autoRepulsionRadius:d,repulsionRadiusMultiplier:p,absoluteIdealEdgeLength:c,multiplicativeIdealEdgeLength:u,idealEdgeLengthType:y}=t;return o(h)?l.computationBudgetTime=h:h&&n.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),l.autoRepulsionRadius=d,!d&&i(p)?l.repulsionRadiusMultiplier=p:d||(l.autoRepulsionRadius=!0,n.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&(r(y)?l.idealEdgeLengthType=y:void 0!==y&&n.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===y&&s(c)?l.absoluteIdealEdgeLength=c:"absolute-value"===y&&void 0!==c?n.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===y&&s(u)?l.multiplicativeIdealEdgeLength=u:"multiplier"===y&&void 0!==u&&n.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),l}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===v.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===v.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new x({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),i=new Set((e.entityTypes??[]).map((e=>e.name))),o=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const a of this.layers)!a.graphType&&t.has(a.graphTypeName)&&(a.graphType=i.has(a.graphTypeName)?"entity":"relationship");const e=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?i.has(e.graphTypeName):o.has(e.graphTypeName))));this.setAtOrigin("layers",e,g(this.originIdOf("layers")))}else this.layers=new a;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const n of a)e.has(n)||this._originalInclusionList.namedTypeDefinitions.set(n,{useAllData:!1,members:new Map});const i=[];for(const o of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(o)||(n.getLogger(this).warn(`A named type, ${o}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(o));for(const n of i)this._originalInclusionList.namedTypeDefinitions.delete(n)}}};e([c(G)],q.prototype,"url",void 0),e([c()],q.prototype,"dataPreloadedInLocalCache",void 0),e([c()],q.prototype,"initializationLinkChartConfig",void 0),e([c()],q.prototype,"membershipModified",void 0),e([c()],q.prototype,"dataManager",void 0),e([c()],q.prototype,"initializationInclusionModeDefinition",null),e([c()],q.prototype,"knowledgeGraph",void 0),e([c({type:a.ofType(x),json:{write:{ignoreOrigin:!0}}})],q.prototype,"layers",void 0),e([c({readOnly:!0})],q.prototype,"linkChart",null),e([c()],q.prototype,"entityLinkChartDiagramLookup",void 0),e([c()],q.prototype,"relationshipLinkChartDiagramLookup",void 0),e([c()],q.prototype,"linkChartExtent",void 0),e([c()],q.prototype,"memberEntityTypes",void 0),e([c()],q.prototype,"memberRelationshipTypes",void 0),e([c({type:["LinkChartLayer"]})],q.prototype,"operationalLayerType",void 0),e([c()],q.prototype,"sublayerIdsCache",void 0),e([c({type:a.ofType(x),json:{write:{ignoreOrigin:!0}}})],q.prototype,"tables",void 0),e([c({json:{read:!1}})],q.prototype,"type",void 0),e([c({json:{read:!1}})],q.prototype,"chronologicalAuxiliaryGraphics",void 0),q=e([u("esri.layers.LinkChartLayer")],q);const J=q;export{J as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../core/Error.js";import{loadAll as i}from"../core/loadAll.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o,isAbortError as a}from"../core/promiseUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{Integer as n}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import{nameToId as u,OriginId as y}from"../core/accessorSupport/PropertyOrigin.js";import h from"../geometry/Extent.js";import{getScale as d}from"../geometry/support/scaleUtils.js";import{srToRESTValue as f}from"../geometry/support/spatialReferenceUtils.js";import g from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISMapService as x}from"./mixins/ArcGISMapService.js";import{ArcGISService as v}from"./mixins/ArcGISService.js";import{BlendLayer as j}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{RefreshableLayer as O}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as P}from"./mixins/SublayersOwner.js";import{TemporalLayer as T}from"./mixins/TemporalLayer.js";import{url as E}from"./support/commonProperties.js";import{ExportImageParameters as M}from"./support/ExportImageParameters.js";import{createBitmap as R}from"./support/imageBitmapUtils.js";import U from"./support/Sublayer.js";import{shouldWriteSublayerStructure as F}from"./support/sublayerUtils.js";import{serviceSupportsSpatialReference as _}from"./support/versionUtils.js";import A from"../time/TimeExtent.js";import{timeZoneProperty as N}from"../time/timeZoneUtils.js";let J=class extends(j(T(L(P(x(v(I(w(s(O(b(S(g))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new M({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(o).then((()=>this._fetchService(r)))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.includes("PNG32")?"png32":"png24"}writeSublayers(e,r,t,i){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let o=!1;const a=u(i.origin);if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers)if(a===y.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;o=F(s,e,y.SERVICE)}else if(a>y.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");o=F(s,e.sublayers,u(e.origin))}const p=[],n={writeSublayerStructure:o,...i};let m=o||this.hasVisibleLayersForOrigin(a);s.forEach((e=>{const r=e.write({},n);p.push(r),m=m||"user"===e.originOf("visible")}));p.some((e=>Object.keys(e).length>1))&&(r.layers=p),m&&(r.visibleLayers=s.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,r,t,i){const s=i?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=i?.floors??null,this._exportImageParameters.scale=d({extent:e,width:r})*s;const o=this._exportImageParameters.toJSON(),a=!i?.rotation||this.version<10.3?{}:{rotation:-i.rotation},p=e?.spatialReference,n=f(p);o.dpi*=s;const m={};if(i?.timeExtent){const{start:e,end:r}=i.timeExtent.toJSON();m.time=e&&r&&e===r?""+e:`${e??"null"},${r??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(m.time="null,null");return{bbox:e?e.xmin+","+e.ymin+","+e.xmax+","+e.ymax:void 0,bboxSR:n,imageSR:n,size:r+","+t,...o,...a,...m}}async fetchImage(e,r,t,i){const{data:s}=await this._fetchImage("image",e,r,t,i);return s}async fetchImageBitmap(e,r,t,i){const{data:s,url:o}=await this._fetchImage("blob",e,r,t,i);return R(s,o,i?.signal)}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:i}=await r(this.url,t),{extent:s,fullExtent:o,timeExtent:a}=i,p=s||o;return{fullExtent:p&&h.fromJSON(p),timeExtent:a&&A.fromJSON({start:a[0],end:a[1]})}}loadAll(){return i(this,(e=>{e(this.allSublayers),e(this.subtables)}))}serviceSupportsSpatialReference(e){return _(this,e)}async _fetchImage(e,i,s,o,p){const n={responseType:e,signal:p?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(i,s,o,p),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},m=this.parsedUrl.path+"/export";if(null!=n.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new t("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:n.query});try{const{data:e}=await r(m,n);return{data:e,url:m}}catch(l){if(a(l))throw l;throw new t("mapimagelayer:image-fetch-error",`Unable to load image: ${m}`,{error:l})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:i}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});i&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){return!(null==e||!this.sublayersSourceJSON[e]?.visibleLayers)}};e([p(N("dateFieldsTimeReference"))],J.prototype,"dateFieldsTimeZone",void 0),e([p({type:Boolean})],J.prototype,"datesInUnknownTimezone",void 0),e([p()],J.prototype,"dpi",void 0),e([p()],J.prototype,"gdbVersion",void 0),e([p()],J.prototype,"imageFormat",void 0),e([m("imageFormat",["supportedImageFormatTypes"])],J.prototype,"readImageFormat",null),e([p({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],J.prototype,"imageMaxHeight",void 0),e([p({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],J.prototype,"imageMaxWidth",void 0),e([p()],J.prototype,"imageTransparency",void 0),e([p({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],J.prototype,"isReference",void 0),e([p({json:{read:!1,write:!1}})],J.prototype,"labelsVisible",void 0),e([p({type:["ArcGISMapServiceLayer"]})],J.prototype,"operationalLayerType",void 0),e([p({json:{read:!1,write:!1}})],J.prototype,"popupEnabled",void 0),e([p(N("preferredTimeReference"))],J.prototype,"preferredTimeZone",void 0),e([p()],J.prototype,"sourceJSON",void 0),e([p({json:{write:{ignoreOrigin:!0}}})],J.prototype,"sublayers",void 0),e([c("sublayers",{layers:{type:[U]},visibleLayers:{type:[n]}})],J.prototype,"writeSublayers",null),e([p({type:["show","hide","hide-children"]})],J.prototype,"listMode",void 0),e([p({json:{read:!1},readOnly:!0,value:"map-image"})],J.prototype,"type",void 0),e([p(E)],J.prototype,"url",void 0),J=e([l("esri.layers.MapImageLayer")],J);const q=J;export{q as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../core/Error.js";import{loadAll as o}from"../core/loadAll.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s,isAbortError as a}from"../core/promiseUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{Integer as n}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import{nameToId as u,OriginId as y}from"../core/accessorSupport/PropertyOrigin.js";import h from"../geometry/Extent.js";import{getScale as d}from"../geometry/support/scaleUtils.js";import{srToRESTValue as f}from"../geometry/support/spatialReferenceUtils.js";import g from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISMapService as v}from"./mixins/ArcGISMapService.js";import{ArcGISService as x}from"./mixins/ArcGISService.js";import{BlendLayer as j}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{RefreshableLayer as O}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as P}from"./mixins/SublayersOwner.js";import{TemporalLayer as T}from"./mixins/TemporalLayer.js";import{url as E}from"./support/commonProperties.js";import{ExportImageParameters as M}from"./support/ExportImageParameters.js";import{createBitmap as R}from"./support/imageBitmapUtils.js";import U from"./support/Sublayer.js";import{shouldWriteSublayerStructure as F}from"./support/sublayerUtils.js";import{serviceSupportsSpatialReference as _}from"./support/versionUtils.js";import A from"../symbols/support/ElevationInfo.js";import N from"../time/TimeExtent.js";import{timeZoneProperty as J}from"../time/timeZoneUtils.js";let q=class extends(j(T(L(P(v(x(I(w(i(O(b(S(g))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new M({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.elevationInfo=new A({mode:"on-the-ground"}),this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(s).then((()=>this._fetchService(r)))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.includes("PNG32")?"png32":"png24"}writeSublayers(e,r,t,o){if(!this.loaded||!e)return;const i=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let s=!1;const a=u(o.origin);if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers)if(a===y.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;s=F(i,e,y.SERVICE)}else if(a>y.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");s=F(i,e.sublayers,u(e.origin))}const p=[],n={writeSublayerStructure:s,...o};let m=s||this.hasVisibleLayersForOrigin(a);i.forEach((e=>{const r=e.write({},n);p.push(r),m=m||"user"===e.originOf("visible")}));p.some((e=>Object.keys(e).length>1))&&(r.layers=p),m&&(r.visibleLayers=i.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,r,t,o){const i=o?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=o?.floors??null,this._exportImageParameters.scale=d({extent:e,width:r})*i;const s=this._exportImageParameters.toJSON(),a=!o?.rotation||this.version<10.3?{}:{rotation:-o.rotation},p=e?.spatialReference,n=f(p);s.dpi*=i;const m={};if(o?.timeExtent){const{start:e,end:r}=o.timeExtent.toJSON();m.time=e&&r&&e===r?""+e:`${e??"null"},${r??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(m.time="null,null");return{bbox:e?e.xmin+","+e.ymin+","+e.xmax+","+e.ymax:void 0,bboxSR:n,imageSR:n,size:r+","+t,...s,...a,...m}}async fetchImage(e,r,t,o){const{data:i}=await this._fetchImage("image",e,r,t,o);return i}async fetchImageBitmap(e,r,t,o){const{data:i,url:s}=await this._fetchImage("blob",e,r,t,o);return R(i,s,o?.signal)}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:o}=await r(this.url,t),{extent:i,fullExtent:s,timeExtent:a}=o,p=i||s;return{fullExtent:p&&h.fromJSON(p),timeExtent:a&&N.fromJSON({start:a[0],end:a[1]})}}loadAll(){return o(this,(e=>{e(this.allSublayers),e(this.subtables)}))}serviceSupportsSpatialReference(e){return _(this,e)}async _fetchImage(e,o,i,s,p){const n={responseType:e,signal:p?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(o,i,s,p),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},m=this.parsedUrl.path+"/export";if(null!=n.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new t("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:n.query});try{const{data:e}=await r(m,n);return{data:e,url:m}}catch(l){if(a(l))throw l;throw new t("mapimagelayer:image-fetch-error",`Unable to load image: ${m}`,{error:l})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:o}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});o&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){return!(null==e||!this.sublayersSourceJSON[e]?.visibleLayers)}};e([p(J("dateFieldsTimeReference"))],q.prototype,"dateFieldsTimeZone",void 0),e([p({type:Boolean})],q.prototype,"datesInUnknownTimezone",void 0),e([p()],q.prototype,"dpi",void 0),e([p()],q.prototype,"elevationInfo",void 0),e([p()],q.prototype,"gdbVersion",void 0),e([p()],q.prototype,"imageFormat",void 0),e([m("imageFormat",["supportedImageFormatTypes"])],q.prototype,"readImageFormat",null),e([p({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],q.prototype,"imageMaxHeight",void 0),e([p({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],q.prototype,"imageMaxWidth",void 0),e([p()],q.prototype,"imageTransparency",void 0),e([p({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],q.prototype,"isReference",void 0),e([p({json:{read:!1,write:!1}})],q.prototype,"labelsVisible",void 0),e([p({type:["ArcGISMapServiceLayer"]})],q.prototype,"operationalLayerType",void 0),e([p({json:{read:!1,write:!1}})],q.prototype,"popupEnabled",void 0),e([p(J("preferredTimeReference"))],q.prototype,"preferredTimeZone",void 0),e([p()],q.prototype,"sourceJSON",void 0),e([p({json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),e([c("sublayers",{layers:{type:[U]},visibleLayers:{type:[n]}})],q.prototype,"writeSublayers",null),e([p({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),e([p({json:{read:!1},readOnly:!0,value:"map-image"})],q.prototype,"type",void 0),e([p(E)],q.prototype,"url",void 0),q=e([l("esri.layers.MapImageLayer")],q);const k=q;export{k as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../core/Error.js";import{loadAll as s}from"../core/loadAll.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{urlToObject as a,objectToQuery as l,makeAbsolute as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{cast as c}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../core/accessorSupport/decorators/writer.js";import d from"../geometry/SpatialReference.js";import y from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISCachedService as v}from"./mixins/ArcGISCachedService.js";import{ArcGISMapService as g}from"./mixins/ArcGISMapService.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{BlendLayer as _}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as b}from"./mixins/PortalLayer.js";import{RefreshableLayer as w}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as L}from"./mixins/SublayersOwner.js";import{parse as R,isHostedAgolService as U,isArcGISUrl as P}from"./support/arcgisLayerUrl.js";import{url as x}from"./support/commonProperties.js";import{createTileBitmap as A}from"./support/imageBitmapUtils.js";import M from"./support/Sublayer.js";var W;const I=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"];let B=W=class extends(_(O(L(v(g(T(b(S(i(w(f(j(y))))))))))))){constructor(...e){super(...e),this.listMode="show",this.isReference=null,this.operationalLayerType="ArcGISTiledMapServiceLayer",this.resampling=!0,this.sourceJSON=null,this.spatialReference=null,this.path=null,this.sublayers=null,this.type="tile",this.url=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(o).then((()=>this._fetchService(r)))),Promise.resolve(this)}get attributionDataUrl(){const e=this.parsedUrl?.path.toLowerCase();return e?this._getDefaultAttribution(this._getMapName(e)):null}readSpatialReference(e,r){return(e=e||r.tileInfo?.spatialReference)&&d.fromJSON(e)}writeSublayers(e,r,t,s){if(!this.loaded||!e)return;const i=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray(),o=[],a={writeSublayerStructure:!1,...s};i.forEach((e=>{const r=e.write({},a);o.push(r)}));o.some((e=>Object.keys(e).length>1))&&(r.layers=o)}get tileServers(){return this._getDefaultTileServers(this.parsedUrl?.path)}castTileServers(e){return Array.isArray(e)?e.map((e=>a(e).path)):null}fetchTile(e,t,s,i={}){const{signal:o}=i,a=this.getTileUrl(e,t,s),l={responseType:"image",signal:o,query:{...this.refreshParameters}};return r(a,l).then((e=>e.data))}async fetchImageBitmapTile(e,t,s,i={}){const{signal:o}=i;if(this.fetchTile!==W.prototype.fetchTile){const r=await this.fetchTile(e,t,s,i);return A(r,e,t,s,o)}const a=this.getTileUrl(e,t,s),l={responseType:"blob",signal:o,query:{...this.refreshParameters}},{data:n}=await r(a,l);return A(n,e,t,s,o)}getTileUrl(e,r,t){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=l({...this.parsedUrl?.query,blankTile:!s&&null,...this.customParameters,token:this.apiKey}),o=this.tileServers;return`${o&&o.length?o[r%o.length]:this.parsedUrl?.path}/tile/${e}/${r}/${t}${i?"?"+i:""}`}loadAll(){return s(this,(e=>{e(this.allSublayers)}))}_fetchService(e){return new Promise(((s,i)=>{if(this.sourceJSON){if(null!=this.sourceJSON.bandCount&&null!=this.sourceJSON.pixelSizeX)throw new t("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");return void s({data:this.sourceJSON})}if(!this.parsedUrl)throw new t("tile-layer:undefined-url","layer's url is not defined");const o=R(this.parsedUrl.path);if(null!=o&&"ImageServer"===o.serverType)throw new t("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(s,i)})).then((r=>{let t=this.url;if(r.ssl&&(t=this.url=t.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl}),10.1===this.version&&!U(t))return this._fetchServerVersion(t,e).then((e=>{this.read({currentVersion:e})})).catch((()=>{}))}))}_fetchServerVersion(e,s){if(!P(e))return Promise.reject();const i=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return r(i,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:s}).then((e=>{if(e.data&&e.data.currentVersion)return e.data.currentVersion;throw new t("tile-layer:version-not-available")}))}_getMapName(e){const r=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/mapserver/i);return r?r[2]:void 0}_getDefaultAttribution(e){if(null==e)return null;let r;e=e.toLowerCase();for(let t=0,s=I.length;t<s;t++)if(r=I[t],r.toLowerCase().includes(e))return n("//static.arcgis.com/attribution/"+r);return null}_getDefaultTileServers(e){if(null==e)return[];const r=-1!==e.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),t=-1!==e.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return r||t?[e,e.replace(r?/server\.arcgisonline/i:/services\.arcgisonline/i,r?"services.arcgisonline":"server.arcgisonline")]:[]}get hasOverriddenFetchTile(){return!this.fetchTile[C]}};e([p({readOnly:!0})],B.prototype,"attributionDataUrl",null),e([p({type:["show","hide","hide-children"]})],B.prototype,"listMode",void 0),e([p({json:{read:!0,write:!0}})],B.prototype,"blendMode",void 0),e([p({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],B.prototype,"isReference",void 0),e([p({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],B.prototype,"operationalLayerType",void 0),e([p({type:Boolean})],B.prototype,"resampling",void 0),e([p()],B.prototype,"sourceJSON",void 0),e([p({type:d})],B.prototype,"spatialReference",void 0),e([u("spatialReference",["spatialReference","tileInfo"])],B.prototype,"readSpatialReference",null),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],B.prototype,"path",void 0),e([p({readOnly:!0})],B.prototype,"sublayers",void 0),e([h("sublayers",{layers:{type:[M]}})],B.prototype,"writeSublayers",null),e([p({json:{read:!1,write:!1}})],B.prototype,"popupEnabled",void 0),e([p()],B.prototype,"tileServers",null),e([c("tileServers")],B.prototype,"castTileServers",null),e([p({readOnly:!0,json:{read:!1}})],B.prototype,"type",void 0),e([p(x)],B.prototype,"url",void 0),B=W=e([m("esri.layers.TileLayer")],B);const C=Symbol("default-fetch-tile");B.prototype.fetchTile[C]=!0;const N=B;export{N as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../core/Error.js";import{loadAll as s}from"../core/loadAll.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{urlToObject as a,objectToQuery as l,makeAbsolute as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{cast as c}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../core/accessorSupport/decorators/writer.js";import d from"../geometry/SpatialReference.js";import y from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISCachedService as v}from"./mixins/ArcGISCachedService.js";import{ArcGISMapService as g}from"./mixins/ArcGISMapService.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{BlendLayer as _}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{RefreshableLayer as w}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as L}from"./mixins/SublayersOwner.js";import{parse as R,isHostedAgolService as U,isArcGISUrl as P}from"./support/arcgisLayerUrl.js";import{url as x}from"./support/commonProperties.js";import{createTileBitmap as A}from"./support/imageBitmapUtils.js";import I from"./support/Sublayer.js";import M from"../symbols/support/ElevationInfo.js";var W;const B=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"];let C=W=class extends(_(O(L(v(g(b(T(S(i(w(f(j(y))))))))))))){constructor(...e){super(...e),this.listMode="show",this.elevationInfo=new M({mode:"on-the-ground"}),this.isReference=null,this.operationalLayerType="ArcGISTiledMapServiceLayer",this.resampling=!0,this.sourceJSON=null,this.spatialReference=null,this.path=null,this.sublayers=null,this.type="tile",this.url=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(o).then((()=>this._fetchService(r)))),Promise.resolve(this)}get attributionDataUrl(){const e=this.parsedUrl?.path.toLowerCase();return e?this._getDefaultAttribution(this._getMapName(e)):null}readSpatialReference(e,r){return(e=e||r.tileInfo?.spatialReference)&&d.fromJSON(e)}writeSublayers(e,r,t,s){if(!this.loaded||!e)return;const i=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray(),o=[],a={writeSublayerStructure:!1,...s};i.forEach((e=>{const r=e.write({},a);o.push(r)}));o.some((e=>Object.keys(e).length>1))&&(r.layers=o)}get tileServers(){return this._getDefaultTileServers(this.parsedUrl?.path)}castTileServers(e){return Array.isArray(e)?e.map((e=>a(e).path)):null}fetchTile(e,t,s,i={}){const{signal:o}=i,a=this.getTileUrl(e,t,s),l={responseType:"image",signal:o,query:{...this.refreshParameters}};return r(a,l).then((e=>e.data))}async fetchImageBitmapTile(e,t,s,i={}){const{signal:o}=i;if(this.fetchTile!==W.prototype.fetchTile){const r=await this.fetchTile(e,t,s,i);return A(r,e,t,s,o)}const a=this.getTileUrl(e,t,s),l={responseType:"blob",signal:o,query:{...this.refreshParameters}},{data:n}=await r(a,l);return A(n,e,t,s,o)}getTileUrl(e,r,t){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=l({...this.parsedUrl?.query,blankTile:!s&&null,...this.customParameters,token:this.apiKey}),o=this.tileServers;return`${o&&o.length?o[r%o.length]:this.parsedUrl?.path}/tile/${e}/${r}/${t}${i?"?"+i:""}`}loadAll(){return s(this,(e=>{e(this.allSublayers)}))}_fetchService(e){return new Promise(((s,i)=>{if(this.sourceJSON){if(null!=this.sourceJSON.bandCount&&null!=this.sourceJSON.pixelSizeX)throw new t("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");return void s({data:this.sourceJSON})}if(!this.parsedUrl)throw new t("tile-layer:undefined-url","layer's url is not defined");const o=R(this.parsedUrl.path);if(null!=o&&"ImageServer"===o.serverType)throw new t("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(s,i)})).then((r=>{let t=this.url;if(r.ssl&&(t=this.url=t.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl}),10.1===this.version&&!U(t))return this._fetchServerVersion(t,e).then((e=>{this.read({currentVersion:e})})).catch((()=>{}))}))}_fetchServerVersion(e,s){if(!P(e))return Promise.reject();const i=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return r(i,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:s}).then((e=>{if(e.data&&e.data.currentVersion)return e.data.currentVersion;throw new t("tile-layer:version-not-available")}))}_getMapName(e){const r=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/mapserver/i);return r?r[2]:void 0}_getDefaultAttribution(e){if(null==e)return null;let r;e=e.toLowerCase();for(let t=0,s=B.length;t<s;t++)if(r=B[t],r.toLowerCase().includes(e))return n("//static.arcgis.com/attribution/"+r);return null}_getDefaultTileServers(e){if(null==e)return[];const r=-1!==e.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),t=-1!==e.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return r||t?[e,e.replace(r?/server\.arcgisonline/i:/services\.arcgisonline/i,r?"services.arcgisonline":"server.arcgisonline")]:[]}get hasOverriddenFetchTile(){return!this.fetchTile[N]}};e([p({readOnly:!0})],C.prototype,"attributionDataUrl",null),e([p({type:["show","hide","hide-children"]})],C.prototype,"listMode",void 0),e([p({json:{read:!0,write:!0}})],C.prototype,"blendMode",void 0),e([p()],C.prototype,"elevationInfo",void 0),e([p({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],C.prototype,"isReference",void 0),e([p({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],C.prototype,"operationalLayerType",void 0),e([p({type:Boolean})],C.prototype,"resampling",void 0),e([p()],C.prototype,"sourceJSON",void 0),e([p({type:d})],C.prototype,"spatialReference",void 0),e([u("spatialReference",["spatialReference","tileInfo"])],C.prototype,"readSpatialReference",null),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],C.prototype,"path",void 0),e([p({readOnly:!0})],C.prototype,"sublayers",void 0),e([h("sublayers",{layers:{type:[I]}})],C.prototype,"writeSublayers",null),e([p({json:{read:!1,write:!1}})],C.prototype,"popupEnabled",void 0),e([p()],C.prototype,"tileServers",null),e([c("tileServers")],C.prototype,"castTileServers",null),e([p({readOnly:!0,json:{read:!1}})],C.prototype,"type",void 0),e([p(x)],C.prototype,"url",void 0),C=W=e([m("esri.layers.TileLayer")],C);const N=Symbol("default-fetch-tile");C.prototype.fetchTile[N]=!0;const k=C;export{k as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.33.0-next.20250326",
3
+ "version": "4.33.0-next.20250327",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- const d="20250326",f="f5f629996fdbd6a95f7066d52608632efa73dd25";export{d as buildDate,f as commitHash};
5
+ const e="20250327",a="ee1832af1c00a261a8cf1069f1a99e043239e6d4";export{e as buildDate,a as commitHash};