@arcgis/core 5.2.0-next.119 → 5.2.0-next.120

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 (114) hide show
  1. package/arcade/ArcadeDate.js +1 -1
  2. package/arcgisGlobal.d.ts +1 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/090c9c2dbf92f2cac0b8.js +1 -0
  5. package/assets/esri/core/workers/chunks/2cf571d968118b6bdde0.js +1 -0
  6. package/assets/esri/core/workers/chunks/{be4de7111bc21bc69de1.js → 2e999b05ce179dd9fa08.js} +1 -1
  7. package/assets/esri/core/workers/chunks/39985c51465b79ff0910.js +1 -0
  8. package/assets/esri/core/workers/chunks/4165eb86471ea3bbf364.js +1 -0
  9. package/assets/esri/core/workers/chunks/{731ec5de16753e10b963.js → 46388b86d1b10e6121bd.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{bdcca906fdfb8e179abb.js → 4efe5827a5c61db3b19d.js} +2 -2
  11. package/assets/esri/core/workers/chunks/50ae209237f104735a30.js +1 -0
  12. package/assets/esri/core/workers/chunks/519ed8e6edd0f0014686.js +1 -0
  13. package/assets/esri/core/workers/chunks/{3c3e5e952fd6740bb234.js → 54f9062526c2002b7fd7.js} +1 -1
  14. package/assets/esri/core/workers/chunks/56b7ac280bf0be938c14.js +1 -0
  15. package/assets/esri/core/workers/chunks/61bcbafd676804ce3e1d.js +1 -0
  16. package/assets/esri/core/workers/chunks/66ef6c034455abd61f39.js +1 -0
  17. package/assets/esri/core/workers/chunks/75410a4de76e67ed5da4.js +1 -0
  18. package/assets/esri/core/workers/chunks/85780f4fa4b5509f864e.js +1 -0
  19. package/assets/esri/core/workers/chunks/87aaed3dfa903bdf853c.js +1 -0
  20. package/assets/esri/core/workers/chunks/892dc038d569cffd26dc.js +1 -0
  21. package/assets/esri/core/workers/chunks/8ce14dd209462f88b163.js +1 -0
  22. package/assets/esri/core/workers/chunks/ab3d19c77e81fe3a099d.js +1 -0
  23. package/assets/esri/core/workers/chunks/bdf0b4653ee455e72f04.js +1 -0
  24. package/assets/esri/core/workers/chunks/c118b88a7c4359e68d9b.js +1 -0
  25. package/assets/esri/core/workers/chunks/cbeba973ef5593ffbba3.js +1 -0
  26. package/assets/esri/core/workers/chunks/ceda1e08c9ff26248db0.js +1 -0
  27. package/assets/esri/core/workers/chunks/{06e7411c5bed0a414031.js → d6130cd8a20d24dd9d3c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{49c6dc487714f9cd55c7.js → ddb5d29a8998d0a76fd4.js} +1 -1
  29. package/assets/esri/core/workers/chunks/e9f8325a4cf89ae816cc.js +1 -0
  30. package/assets/esri/core/workers/chunks/f2fca9a3a40170996ea2.js +1 -0
  31. package/assets/esri/core/workers/chunks/f5d06cd6d30a5f742f73.js +1 -0
  32. package/assets/esri/core/workers/chunks/f75e57d3e02f9828b049.js +1 -0
  33. package/chunks/ColorMaterial.glsl.js +8 -8
  34. package/chunks/GaussianSplat.glsl.js +13 -8
  35. package/chunks/GaussianSplatShadow.glsl.js +33 -4
  36. package/chunks/languageUtils.js +1 -1
  37. package/config.js +1 -1
  38. package/core/has.js +1 -1
  39. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  40. package/kernel.js +1 -1
  41. package/layers/support/NumericRange.d.ts +41 -0
  42. package/layers/support/fieldUtils.d.ts +9 -0
  43. package/linkChart/LinkChartProperties.js +1 -1
  44. package/package.json +4 -4
  45. package/support/revision.js +1 -1
  46. package/time/ianaZone.js +2 -0
  47. package/time/timeZoneUtils.js +1 -1
  48. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  49. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  50. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  51. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  52. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  53. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  54. package/views/3d/analysis/LineOfSight/types.d.ts +1 -0
  55. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementVisualization.js +1 -1
  56. package/views/3d/focusAreaUtils.js +1 -1
  57. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  58. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  59. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  60. package/views/3d/layers/graphics/extrudePolygon.js +2 -0
  61. package/views/3d/navigation/Navigation3D.js +1 -1
  62. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  63. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  64. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  65. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  66. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  67. package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
  68. package/views/3d/webgl-engine/lib/GaussianSplatPrepassDepthRenderer.js +2 -0
  69. package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +1 -1
  70. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  71. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  72. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  73. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  74. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  75. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  76. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +38 -27
  77. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  78. package/views/SceneView.d.ts +1 -1
  79. package/views/SceneView.js +1 -1
  80. package/views/draw/plugins/PolygonPlugin.js +1 -1
  81. package/webmap/utils.js +1 -1
  82. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  83. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +43 -2
  84. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  85. package/widgets/BatchAttributeForm/inputs/support/inputUtils.d.ts +11 -0
  86. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  87. package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -0
  88. package/widgets/OrientedImageryViewer.js +1 -1
  89. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  90. package/assets/esri/core/workers/chunks/2c21f4744e19b925a6ae.js +0 -1
  91. package/assets/esri/core/workers/chunks/2c9783e3b44986e86797.js +0 -1
  92. package/assets/esri/core/workers/chunks/45858d1c6487f4a98e40.js +0 -1
  93. package/assets/esri/core/workers/chunks/497c5a9c95e9a89ac217.js +0 -1
  94. package/assets/esri/core/workers/chunks/515fe302743c0b46f7e0.js +0 -1
  95. package/assets/esri/core/workers/chunks/54f3bc940cea15fce2c7.js +0 -1
  96. package/assets/esri/core/workers/chunks/5f79ba5639067f734791.js +0 -1
  97. package/assets/esri/core/workers/chunks/61ea3493b477ddc442e6.js +0 -1
  98. package/assets/esri/core/workers/chunks/6b9d29ca568590358478.js +0 -1
  99. package/assets/esri/core/workers/chunks/7243d5721bb6a7329055.js +0 -1
  100. package/assets/esri/core/workers/chunks/7adff63fd66fab505ae6.js +0 -1
  101. package/assets/esri/core/workers/chunks/84b89c523d3e16a5ee46.js +0 -1
  102. package/assets/esri/core/workers/chunks/85c876ee9e63d5732937.js +0 -1
  103. package/assets/esri/core/workers/chunks/8cc95d827f460909d442.js +0 -1
  104. package/assets/esri/core/workers/chunks/97fea852f8e93e1286e4.js +0 -1
  105. package/assets/esri/core/workers/chunks/a5466c864c3ead9aac5a.js +0 -1
  106. package/assets/esri/core/workers/chunks/a774006be107e449bc29.js +0 -1
  107. package/assets/esri/core/workers/chunks/bb56ab53c5a10c9518a6.js +0 -1
  108. package/assets/esri/core/workers/chunks/d5defba320f2e49a377f.js +0 -1
  109. package/assets/esri/core/workers/chunks/e5f0c47957a4e9663720.js +0 -1
  110. package/assets/esri/core/workers/chunks/ebe7ba2557b50e18e547.js +0 -1
  111. package/assets/esri/core/workers/chunks/edd36e98355f1655e5c8.js +0 -1
  112. package/assets/esri/core/workers/chunks/f66e597e524b26e61cd3.js +0 -1
  113. package/views/3d/layers/graphics/extrudeUtils.js +0 -2
  114. /package/assets/esri/core/workers/chunks/{bdcca906fdfb8e179abb.js.LICENSE.txt → 4efe5827a5c61db3b19d.js.LICENSE.txt} +0 -0
@@ -1,17 +1,22 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{EvaluateSceneLighting as e,addAmbientBoostFactor as a,addLightingGlobalFactor as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{ReadShadowMapPassFragment as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{RgbNormalizedDepthEncoding as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{Float3BindUniform as r}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as s,If as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatFirstHitAlpha as d}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{GaussianSplatPerspectivePass as c,GaussianSplatFading as g,gaussianSplatPerspectiveVertex as h}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{getGaussianSplatAlphaCutoffValue as p}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as m}from"../views/webgl/ShaderBuilder.js";function u(u){const{receiveShadows:f,spherical:v}=u,b=new m,{varyings:w,vertex:C,fragment:y,outputs:L}=b;w.add("vColor","vec4"),b.include(c,u),u.fadingEnabled&&C.include(g),C.uniforms.add(new r("cameraPosition",e=>e.camera.eye)),f?(y.uniforms.add(new r("cameraPosition",e=>e.camera.eye)),y.include(e,u)):C.include(e,u),C.include(n,u),a(f?y:C),i(f?y:C),f&&b.include(o,u),L.add("fragColor","vec4",0),L.add("fragDepthColor","vec4",1);const S=p(u.alphaCutoff),D=s`float groundLightAlignment = dot(upNormal, mainLightDirection);
2
+ import{EvaluateSceneLighting as e,addAmbientBoostFactor as a,addLightingGlobalFactor as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{ReadShadowMapPassFragment as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{RgbNormalizedDepthEncoding as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{Float3BindUniform as r}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as s,If as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatFirstHitAlpha as d}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{GaussianSplatPerspectivePass as c,GaussianSplatFading as h,gaussianSplatPerspectiveVertex as g}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{getGaussianSplatAlphaCutoffValue as p}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as m}from"../views/webgl/ShaderBuilder.js";function u(u){const{receiveShadows:v,spherical:f}=u,w=v&&u.preciseDepth,b=new m,{varyings:y,vertex:C,fragment:D,outputs:S}=b;y.add("vColor","vec4"),w&&y.add("shadowReceiverRay","vec3"),b.include(c,u),u.fadingEnabled&&C.include(h),C.uniforms.add(new r("cameraPosition",e=>e.camera.eye)),v?(D.uniforms.add(new r("cameraPosition",e=>e.camera.eye)),D.include(e,u)):C.include(e,u),C.include(n,u),a(v?D:C),i(v?D:C),v&&b.include(o,u),S.add("fragColor","vec4",0),S.add("fragDepthColor","vec4",1);const L=p(u.alphaCutoff),P=s`float groundLightAlignment = dot(upNormal, mainLightDirection);
3
3
  float additionalAmbientScale = additionalDirectedAmbientLight(groundLightAlignment);
4
- vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;`,P=s`
4
+ vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;`,R=s`
5
5
  vec3 viewDirection = normalize(fragmentPositionCameraRelative - cameraPosition);
6
6
  vec3 upNormal = getLocalUp(fragmentPositionCameraRelative, cameraPosition);
7
- ${D}
8
- float shadow = ${v?s`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:s`0.0`};
7
+ ${P}
8
+ float shadow = ${f?s`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:s`0.0`};
9
9
  vColor.rgb = evaluateSceneLighting(upNormal, vColor.rgb, shadow, 0.0, additionalLight, viewDirection, upNormal);
10
- `,j=s`
10
+ `,G=s`
11
11
  vec3 viewDirection = normalize(fragmentPositionCameraRelative - cameraPosition);
12
12
  vec3 upNormal = getLocalUp(fragmentPositionCameraRelative, cameraPosition);
13
- ${D}
14
- float shadow = readShadow(additionalAmbientScale, fragmentPositionCameraRelative);
13
+ ${P}
14
+ ${w?s`
15
+ float shadow = max(
16
+ lightingGlobalFactor * (1.0 - additionalAmbientScale),
17
+ readShadowMap(shadowReceiverRay * receiverDepth, receiverDepth)
18
+ );
19
+ `:s`float shadow = readShadow(additionalAmbientScale, fragmentPositionCameraRelative);`}
15
20
  shadedColor = evaluateSceneLighting(upNormal, vColor.rgb, shadow, 0.0, additionalLight, viewDirection, upNormal);
16
21
  `;return C.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n float opacity = vColor.a;\n\n // Apply per-page fading before the early alpha rejection.\n ${l(u.fadingEnabled,s`opacity = applyGaussianSplatFading(opacity, gaussianIndex);
17
- vColor.a = opacity;`)}\n\n ${h(u,S)}\n vColor.a = opacity;\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${l(f,"forwardLinearDepth(-viewPos.z);",P)}\n `),y.include(t),y.include(n,u),y.main.add(`\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, vColor.a * gaussianFalloff);\n\n vec3 shadedColor = vColor.rgb;\n ${l(f,j)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using the shared opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(${s.float(d)}, alpha);\n vec3 encodedDepth = vec3(0.0);\n if (depthHit > 0.0) {\n encodedDepth = encodeNormalizedDepthToRGB(gaussianSplatDepth());\n }\n fragDepthColor = vec4(encodedDepth, depthHit);\n `),b}const f=Object.freeze(Object.defineProperty({__proto__:null,build:u},Symbol.toStringTag,{value:"Module"}));export{f as G,u as b};
22
+ vColor.a = opacity;`)}\n\n ${g(u,L)}\n vColor.a = opacity;\n ${l(w,s`shadowReceiverRay = transpose(mat3(view)) * rayView;`)}\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${l(v,"forwardLinearDepth(-viewPos.z);",R)}\n `),D.include(t),D.include(n,u),D.main.add(`\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, vColor.a * gaussianFalloff);\n\n ${l(w,s`float receiverDepth = gaussianSplatRayDepth();`)}\n vec3 shadedColor = vColor.rgb;\n ${l(v,G)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using the shared opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(${s.float(d)}, alpha);\n vec3 encodedDepth = vec3(0.0);\n if (depthHit > 0.0) {\n encodedDepth = encodeNormalizedDepthToRGB(${w?"delinearizeDepth(-receiverDepth)":"gaussianSplatDepth()"});\n }\n fragDepthColor = vec4(encodedDepth, depthHit);\n `),b}const v=Object.freeze(Object.defineProperty({__proto__:null,build:u},Symbol.toStringTag,{value:"Module"}));export{v as G,u as b};
@@ -1,7 +1,31 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{FloatPassUniform as e}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatDepthPolicy as i}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{GaussianSplatPass as n,gaussianSplatUnpackScaleAndRotation as r,gaussianSplatComputeQuad as t,gaussianSplatCullAndTransformVertex as s,gaussianSplatComputeEllipse as o}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{GaussianSplatRenderParameters as l}from"../views/3d/webgl-engine/shaders/GaussianSplatPassParameters.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";class p extends l{constructor(){super(...arguments),this.alphaCutoff=i.direct.alphaCutoff,this.depthBias=i.direct.depthBias}}function d(i){const l=new c,{vertex:p}=l;return l.include(n,i),p.uniforms.add(new e("alphaCutoff",e=>e.alphaCutoff),new e("depthBias",e=>e.depthBias)),p.code.add(a`float safeClipW(float clipW) {
2
+ import{create as e}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{nearFar as a}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as n,If as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{gaussianSplatDepthPolicy as r}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{gaussianSplatRayDepth as s,GaussianSplatPass as c,gaussianSplatUnpackScaleAndRotation as p,gaussianSplatComputeQuad as l,gaussianSplatCullAndTransformVertex as d,gaussianSplatComputeEllipse as u}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{GaussianSplatRenderParameters as f}from"../views/3d/webgl-engine/shaders/GaussianSplatPassParameters.js";import{ShaderBuilder as h}from"../views/webgl/ShaderBuilder.js";class v extends f{constructor(){super(...arguments),this.inverseProjectionMatrix=e(),this.alphaCutoff=r.direct.alphaCutoff,this.depthBias=r.direct.depthBias}}function m(e){const r=new h,{vertex:f,fragment:v}=r,m=8===e.output;return e.preciseDepth&&(m?r.include(s):(r.varyings.add("shadowRayDepth","vec2"),f.code.add(n`vec2 gaussianSplatPrepareParallelRayDepth(
3
+ vec2 clipPosition,
4
+ vec3 viewPosition,
5
+ vec3 gaussianScale,
6
+ mat3 gaussianRotation,
7
+ mat4 inverseProjection,
8
+ mat3 viewRotation
9
+ ) {
10
+ vec4 homogeneousOrigin = inverseProjection * vec4(clipPosition, 0.0, 1.0);
11
+ mat3 viewToGaussian = gaussianRotation * transpose(viewRotation);
12
+ vec3 factorSpaceDirection = (viewToGaussian * vec3(0.0, 0.0, -1.0)) / gaussianScale;
13
+ vec3 homogeneousCenterOffset = vec3(viewPosition.xy * homogeneousOrigin.w - homogeneousOrigin.xy, 0.0);
14
+ vec3 factorSpaceOffset = (viewToGaussian * homogeneousCenterOffset) / gaussianScale;
15
+ float homogeneousPeakOffset = dot(factorSpaceDirection, factorSpaceOffset) / dot(factorSpaceDirection, factorSpaceDirection);
16
+ return vec2(-viewPosition.z * homogeneousOrigin.w + homogeneousPeakOffset, homogeneousOrigin.w);
17
+ }`)),f.uniforms.add(new t("inverseProjectionMatrix",e=>e.inverseProjectionMatrix)),v.uniforms.add(a,new i("depthBias",e=>e.depthBias)),v.main.add(n`
18
+ float rayDepth = ${m?"gaussianSplatRayDepth()":"shadowRayDepth.x / (shadowRayDepth.y == 0.0 ? 1.0 : shadowRayDepth.y)"};
19
+ float linearDepth = (rayDepth - nearFar.x) / (nearFar.y - nearFar.x);
20
+ float slopeBias = 2.0 * max(abs(dFdx(linearDepth)), abs(dFdy(linearDepth)));
21
+ ${o(!m,n`if (shadowRayDepth.y == 0.0) { discard; }`)}
22
+ if (rayDepth < nearFar.x || rayDepth > nearFar.y) {
23
+ discard;
24
+ }
25
+ gl_FragDepth = min(linearDepth + depthBias + slopeBias, 1.0);
26
+ `)),r.include(c,e),f.uniforms.add(new i("alphaCutoff",e=>e.alphaCutoff),new i("depthBias",e=>e.depthBias)),f.code.add(n`float safeClipW(float clipW) {
3
27
  return abs(clipW) < 1e-7 ? (clipW < 0.0 ? -1e-7 : 1e-7) : clipW;
4
- }`),p.code.add(a`vec3 computeProjectivePixelGradient(
28
+ }`),f.code.add(n`vec3 computeProjectivePixelGradient(
5
29
  vec3 clipGradient,
6
30
  vec3 clipWGradient,
7
31
  float clipValue,
@@ -10,6 +34,11 @@ float invWSquared,
10
34
  float halfScreenSize
11
35
  ) {
12
36
  return (clipGradient * safeW - clipValue * clipWGradient) * invWSquared * halfScreenSize;
13
- }`),p.code.add(a`float biasDepth(float linearDepth) {
37
+ }`),f.code.add(n`float biasDepth(float linearDepth) {
14
38
  return min(linearDepth + depthBias, 1.0);
15
- }`),p.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n\n float opacity = unpackOpacity(packedGaussian);\n\n ${s(i,"alphaCutoff")}\n\n ${r}\n\n vec4 projPos = proj * viewPos;\n float safeW = safeClipW(projPos.w);\n float invWSquared = 1.0 / (safeW * safeW);\n vec2 halfScreenSize = 0.5 / inverseScreenSize;\n float maxShadowSplatRadius = max(halfScreenSize.x, halfScreenSize.y);\n\n // Projection matrix columns are the clip-space derivatives with respect to view-space xyz.\n vec3 clipWGradient = vec3(proj[0][3], proj[1][3], proj[2][3]);\n vec3 pixelXGradient = computeProjectivePixelGradient(\n vec3(proj[0][0], proj[1][0], proj[2][0]),\n clipWGradient,\n projPos.x,\n safeW,\n invWSquared,\n halfScreenSize.x\n );\n vec3 pixelYGradient = computeProjectivePixelGradient(\n vec3(proj[0][1], proj[1][1], proj[2][1]),\n clipWGradient,\n projPos.y,\n safeW,\n invWSquared,\n halfScreenSize.y\n );\n vec3 covariance2D = computeProjectedGaussianCovariance2D(pixelXGradient, pixelYGradient, gaussianScale, gaussianRotation, view);\n float minimumRadiusOpacity = opacity;\n float opacityScale = regularizeGaussianCovariance(covariance2D);\n opacity *= opacityScale;\n if (opacity < alphaCutoff) {\n return;\n }\n\n ${o("log(alphaCutoff) - log(opacity)","minimumRadiusOpacity")}\n\n // Avoid invalid/extremely large footprints.\n if (maxRadius < 0.0 || maxRadius > maxShadowSplatRadius) {\n return;\n }\n\n vec3 ndcPos = projPos.xyz / safeW;\n ${t}\n float linearDepth = (-viewPos.z - nearFar.x) / (nearFar.y - nearFar.x);\n float biasedDepth = biasDepth(linearDepth);\n\n vec2 clipPos = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n gl_Position = vec4(clipPos, biasedDepth * 2.0 - 1.0, 1.0);\n `),l}const f=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatShadowPassParameters:p,build:d},Symbol.toStringTag,{value:"Module"}));export{p as G,f as a,d as b};
39
+ }`),f.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n\n float opacity = unpackOpacity(packedGaussian);\n\n ${d(e,"alphaCutoff")}\n\n ${p}\n\n vec4 projPos = proj * viewPos;\n float safeW = safeClipW(projPos.w);\n float invWSquared = 1.0 / (safeW * safeW);\n vec2 halfScreenSize = 0.5 / inverseScreenSize;\n float maxShadowSplatRadius = max(halfScreenSize.x, halfScreenSize.y);\n\n // Projection matrix columns are the clip-space derivatives with respect to view-space xyz.\n vec3 clipWGradient = vec3(proj[0][3], proj[1][3], proj[2][3]);\n vec3 pixelXGradient = computeProjectivePixelGradient(\n vec3(proj[0][0], proj[1][0], proj[2][0]),\n clipWGradient,\n projPos.x,\n safeW,\n invWSquared,\n halfScreenSize.x\n );\n vec3 pixelYGradient = computeProjectivePixelGradient(\n vec3(proj[0][1], proj[1][1], proj[2][1]),\n clipWGradient,\n projPos.y,\n safeW,\n invWSquared,\n halfScreenSize.y\n );\n vec3 covariance2D = computeProjectedGaussianCovariance2D(pixelXGradient, pixelYGradient, gaussianScale, gaussianRotation, view);\n float minimumRadiusOpacity = opacity;\n float opacityScale = regularizeGaussianCovariance(covariance2D);\n opacity *= opacityScale;\n if (opacity < alphaCutoff) {\n return;\n }\n\n ${u("log(alphaCutoff) - log(opacity)","minimumRadiusOpacity")}\n\n // Avoid invalid/extremely large footprints.\n if (maxRadius < 0.0 || maxRadius > maxShadowSplatRadius) {\n return;\n }\n\n vec3 ndcPos = projPos.xyz / safeW;\n ${l}\n float linearDepth = (-viewPos.z - nearFar.x) / (nearFar.y - nearFar.x);\n float biasedDepth = biasDepth(linearDepth);\n\n vec2 clipPos = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n ${o(e.preciseDepth,m?n`vec3 rayView = reconstructViewRay(clipPos, inverseProjectionMatrix);
40
+ rayGaussianFactor = computeGaussianRayFactor(
41
+ rayView, cameraRelativePosition, gaussianScale, gaussianRotation, mat3(view)
42
+ );`:n`shadowRayDepth = gaussianSplatPrepareParallelRayDepth(
43
+ clipPos, viewPos.xyz, gaussianScale, gaussianRotation, inverseProjectionMatrix, mat3(view)
44
+ );`)}\n gl_Position = vec4(clipPos, biasedDepth * 2.0 - 1.0, 1.0);\n `),r}const g=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatShadowPassParameters:v,build:m},Symbol.toStringTag,{value:"Module"}));export{v as G,g as a,m as b};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ArcadeDate as e,createDateTimeZone as r}from"../arcade/ArcadeDate.js";import{ArcadeModule as t}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as n}from"../arcade/executionError.js";import{ArcadeFunction as i}from"../arcade/FunctionWrapper.js";import u from"../arcade/ImmutableArray.js";import{esriFieldToJson as o,layerGeometryEsriRestConstants as a}from"../arcade/featureset/support/shared.js";import{parse as s,format as l}from"../core/number.js";import{DateOnly as f}from"../core/sql/DateOnly.js";import{TimeOnly as c}from"../core/sql/TimeOnly.js";import{getLocale as m}from"../intl/locale.js";import{isBoolean as d,isNumber as y,isString as p,isDate as b,isArray as g,isInteger as N}from"../support/guards.js";import{DateTime as S}from"luxon";import{isGraphic as h}from"../support/graphicInstanceUtils.js";class T{constructor(e){this.value=e}}class Z{constructor(e){this.value=e}}const k={type:"VOID"},D=Symbol("BREAK"),A=Symbol("CONTINUE");function F(e,r,t){return""===r||null==r||r===t||r===t?e:e=e.split(r).join(t)}function x(e){return e instanceof i}function O(e){return e instanceof t}function C(e){return!!p(e)||(!!y(e)||(!!B(e)||(!!K(e)||(!!Q(e)||(!!d(e)||(null===e||e===k))))))}function J(e,r){return void 0===e?r:e}function w(e){if(null==e)return"";if(g(e))return"Array";if($(e))return"Array";if(B(e))return"Date";if(Q(e))return"Time";if(K(e))return"DateOnly";if(p(e))return"String";if(d(e))return"Boolean";if(y(e))return"Number";if(q(e))return"Attachment";if(E(e))return"Portal";if(z(e))return"Dictionary";if(W(e))return"KnowledgeGraph";if(O(e))return"Module";if(I(e))return"Feature";if(L(e))switch(e.type){case"point":return"Point";case"polygon":return"Polygon";case"polyline":return"Polyline";case"multipoint":return"Multipoint";case"extent":return"Extent";default:return"Unrecognized Type"}return x(e)?"Function":_(e)?"FeatureSet":H(e)?"FeatureSetCollection":R(e)?"Voxel":V(e)?"Pixel":e===k?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function j(e){return e===k}function L(e){return"esri.arcade.Geometry"===e?.arcadeDeclaredClass}function M(e){return L(e)&&"point"===e.type}function Y(e){return L(e)&&"multipoint"===e.type}function G(e){return L(e)&&"polyline"===e.type}function P(e){return L(e)&&"polygon"===e.type}function v(e){return L(e)&&"extent"===e.type}function I(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function R(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function V(e){return"esri.arcade.Pixel"===e?.arcadeDeclaredClass}function _(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function z(e){return"esri.arcade.Dictionary"===e?.declaredClass}function E(e){return"esri.arcade.Portal"===e?.declaredClass}function q(e){return"esri.arcade.Attachment"===e?.declaredClass}function U(e){return z(e)||I(e)||R(e)||V(e)}function H(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function W(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function $(e){return e instanceof u}function B(r){return r instanceof e}function K(e){return e instanceof f}function Q(e){return e instanceof c}function X(e){return null!=e&&"object"==typeof e}function ee(e,r,t,i){if(e.length<r||e.length>t)throw new n("WrongNumberOfParameters",i)}function re(e){return null==e||j(e)||""===e}function te(e){return e<0?-Math.round(-e):Math.round(e)}function ne(e,r){return isNaN(e)||null==r||""===r?e.toString():(r=F(r,"‰",""),r=F(r,"¤",""),l(e,{pattern:r}))}function ie(e,r){return null==r||""===r?e.toISOString(!0):e.toFormat(ue(r),{locale:m(),numberingSystem:"latn"})}function ue(e,r=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="";const n=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(n)||[])switch(i){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"Z":t+="Z";break;case"ZZ":t+="ZZ";break;case"ZZZ":t+="ZZZ";break;case"ZZZZ":t+=r?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":t+=r?"[ZZZZZ]":"ZZZZZ";break;case"S":t+="'S'";break;case"SS":t+="'SS'";break;case"SSS":t+="u";break;case"A":case"a":t+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":t+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?t+=`'${i.slice(1,-1)}'`:t+=`'${i}'`}return t}function oe(e,r,t){switch(t){case">":return e>r;case"<":return e<r;case">=":return e>=r;case"<=":return e<=r}return!1}function ae(r,t,i){if(null===r){if(null===t||t===k)return oe(null,null,i);if(y(t))return oe(0,t,i);if(p(t))return oe(0,ye(t),i);if(d(t))return oe(0,ye(t),i);if(B(t))return oe(0,t.toNumber(),i);if(Q(t))return oe(r,t.toNumber(),i);if(K(t))return oe(r,t.toNumber(),i)}if(r===k){if(null===t||t===k)return oe(null,null,i);if(y(t))return oe(0,t,i);if(p(t))return oe(0,ye(t),i);if(d(t))return oe(0,ye(t),i);if(B(t))return oe(0,t.toNumber(),i);if(Q(t))return oe(r,t.toNumber(),i);if(K(t))return oe(r,t.toNumber(),i)}else if(y(r)){if(y(t))return oe(r,t,i);if(d(t))return oe(r,ye(t),i);if(null===t||t===k)return oe(r,0,i);if(p(t))return oe(r,ye(t),i);if(B(t))return oe(r,t.toNumber(),i);if(Q(t))return oe(r,t.toNumber(),i);if(K(t))return oe(r,t.toNumber(),i)}else if(p(r)){if(p(t))return oe(fe(r),fe(t),i);if(B(t))return oe(ye(r),t.toNumber(),i);if(Q(t))return oe(ye(r),t.toNumber(),i);if(K(t))return oe(ye(r),t.toNumber(),i);if(y(t))return oe(ye(r),t,i);if(null===t||t===k)return oe(ye(r),0,i);if(d(t))return oe(ye(r),ye(t),i)}else if(B(r)){if(B(t))return r.timeZone!==t.timeZone&&(r.isUnknownTimeZone?r=e.arcadeDateAndZoneToArcadeDate(r,t.timeZone):t.isUnknownTimeZone&&(t=e.arcadeDateAndZoneToArcadeDate(t,r.timeZone))),oe(r.toNumber(),t.toNumber(),i);if(null===t||t===k)return oe(r.toNumber(),0,i);if(y(t))return oe(r.toNumber(),t,i);if(d(t))return oe(r.toNumber(),ye(t),i);if(p(t))return oe(r.toNumber(),ye(t),i);if(Q(t))throw new n("CannotCompareDateAndTime",null);if(K(t))return oe(r.toNumber(),t.toNumber(),i)}else if(d(r)){if(d(t))return oe(r,t,i);if(y(t))return oe(ye(r),ye(t),i);if(B(t))return oe(ye(r),t.toNumber(),i);if(Q(t))return oe(ye(r),t.toNumber(),i);if(K(t))return oe(ye(r),t.toNumber(),i);if(null===t||t===k)return oe(ye(r),0,i);if(p(t))return oe(ye(r),ye(t),i)}else if(K(r)){if(B(t))return oe(r.toNumber(),t.toNumber(),i);if(null===t||t===k)return oe(r.toNumber(),0,i);if(y(t))return oe(r.toNumber(),t,i);if(d(t))return oe(r.toNumber(),ye(t),i);if(p(t))return oe(r.toNumber(),ye(t),i);if(Q(t))throw new n("CannotCompareDateAndTime",null);if(K(t))return oe(r.toNumber(),t.toNumber(),i)}else if(Q(r)){if(B(t))throw new n("CannotCompareDateAndTime",null);if(null===t||t===k)return oe(r.toNumber(),0,i);if(y(t))return oe(r.toNumber(),t,i);if(d(t))return oe(r.toNumber(),ye(t),i);if(p(t))return oe(r.toNumber(),ye(t),i);if(Q(t))return oe(r.toNumber(),t.toNumber(),i);if(K(t))throw new n("CannotCompareDateAndTime",null)}return!!se(r,t)&&("<="===i||">="===i)}function se(e,r){if(e===r)return!0;if(null===e&&r===k||null===r&&e===k)return!0;if(B(e)&&B(r))return e.equals(r);if(Q(e)&&Q(r))return e.equals(r);if(K(e)&&K(r))return e.equals(r);if($(e))return e.equalityTest(r);if(M(e)&&M(r)){const t=e.id,n=r.id;if(null!=t)return t===n}return!(!X(e)||!X(r)||e._underlyingGraphic!==r._underlyingGraphic||void 0===e._underlyingGraphic||null===e._underlyingGraphic)}function le(e,{useNumbersForDates:r}){let t="";for(const n in e){""!==t&&(t+=",");const i=e[n];null==i?t+=JSON.stringify(n)+":null":d(i)||y(i)||p(i)?t+=JSON.stringify(n)+":"+JSON.stringify(i):L(i)?t+=JSON.stringify(n)+":"+me(i):Q(i)||K(i)?t+=`${JSON.stringify(n)}:${JSON.stringify(i.toString())}`:$(i)||Array.isArray(i)?t+=JSON.stringify(n)+":"+me(i,null,r):B(i)?t+=r?JSON.stringify(n)+":"+JSON.stringify(i.getTime()):JSON.stringify(n)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(t+=JSON.stringify(n)+":"+i.castToText(r))}return"{"+t+"}"}function fe(e,r){if(p(e))return e;if(null===e)return"";if(y(e))return ne(e,r);if(d(e))return e.toString();if(B(e))return ie(e,r);if(Q(e))return e.toFormat(r);if(K(e))return e.toFormat(r);if(L(e))return me(e);if(g(e)){const r=[];for(let t=0;t<e.length;t++)r[t]=de(e[t]);return"["+r.join(",")+"]"}if($(e)){const r=[];for(let t=0;t<e.length();t++)r[t]=de(e.get(t));return"["+r.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():x(e)?"object, Function":e===k?"":O(e)?"object, Module":""}function ce(e){const r=[];if($(e)){for(let t=0;t<e.length();t++)r[t]=ye(e.get(t));return r}if(!g(e))return null;for(let t=0;t<e.length;t++)r[t]=ye(e[t]);return r}function me(e,r,t=!1){if(p(e))return e;if(null===e)return"";if(y(e))return ne(e,r);if(d(e))return e.toString();if(B(e))return ie(e,r);if(Q(e))return e.toFormat(r);if(K(e))return e.toFormat(r);if(L(e)){if("extent"===e.type){const{xmin:r,xmax:t,ymin:n,ymax:i,zmin:u,zmax:o,mmin:a,mmax:s}=e.asJsonLikeGeometry();return'{"xmin":'+r+',"ymin":'+n+","+(e.hasZ?'"zmin":'+u+",":"")+(e.hasM?'"mmin":'+a+",":"")+'"xmax":'+t+',"ymax":'+i+","+(e.hasZ?'"zmax":'+o+",":"")+(e.hasM?'"mmax":'+s+",":"")+'"spatialReference":'+Ze(e.spatialReference)+"}"}return Ze(e.castAsJson(),(e,r)=>e.key===r.key?0:"spatialReference"===e.key?1:"spatialReference"===r.key||e.key<r.key?-1:e.key>r.key?1:0)}if(g(e)){const r=[];for(let n=0;n<e.length;n++)r[n]=de(e[n],t);return"["+r.join(",")+"]"}if($(e)){const r=[];for(let n=0;n<e.length();n++)r[n]=de(e.get(n),t);return"["+r.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(t):x(e)?"object, Function":j(e)?"":O(e)?"object, Module":""}function de(e,r=!1){if(null===e)return"null";if(d(e)||p(e))return JSON.stringify(e);if(y(e))return e.toString();if(L(e))return me(e,null,r);if($(e))return me(e,null,r);if(g(e))return me(e,null,r);if(B(e))return r?JSON.stringify(e.getTime()):JSON.stringify(ie(e,""));if(Q(e))return JSON.stringify(e.toString());if(K(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(r)}else if(e===k)return"null";return"null"}function ye(e,r){return y(e)?e:null===e||""===e?0:B(e)||K(e)||Q(e)?NaN:d(e)?e?1:0:g(e)||""===e||void 0===e?NaN:void 0!==r&&p(e)?(r=F(r,"‰",""),r=F(r,"¤",""),s(e,{pattern:r})):e===k?0:Number(e)}function pe(r,t){if(B(r))return r;if(p(r)){const n=be(r,t);if(n)return e.dateTimeToArcadeDate(n)}return null}function be(e,t){const n=/ (\d\d)/,i=r(t);let u=S.fromISO(e,{zone:i});return u.isValid||n.test(e)&&(e=e.replace(n,"T$1"),u=S.fromISO(e,{zone:t}),u.isValid)?u:null}function ge(e){return d(e)?e:p(e)?"true"===(e=e.toLowerCase()):!!y(e)&&(0!==e&&!isNaN(e))}function Ne(e,r){if(!e)return r;if(!e.domain)return r;let t=null,n=null;if(B(r))t=r.toNumber();else if(K(r))t=r.toString();else if(Q(r))t=r.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)t=fe(r);else{if(null==r)return null;if(""===r)return r;t=ye(r)}for(let i=0;i<e.domain.codedValues.length;i++){const r=e.domain.codedValues[i];r.code===t&&(n=r)}return null===n?fe(r):n.name}function Se(e,r){if(!e)return r;if(!e.domain)return r;let t=null;const n=fe(r);for(let i=0;i<e.domain.codedValues.length;i++){const r=e.domain.codedValues[i];r.name===n&&(t=r)}return null===t?r:t.code}function he(e,r,t=null,i=null){if(!r)return null;if(!r.fields)return null;let u,o,a=null;for(let n=0;n<r.fields.length;n++){const t=r.fields[n];t.name.toLowerCase()===e.toString().toLowerCase()&&(a=t)}if(null===a)throw new n("FieldNotFound",null,{key:e});let s=r.typeIdField,l="id",f=r.types;if(r.subtypeField&&(s=r.subtypeField,l="code",f=r.subtypes??[]),null===i&&t&&s)i=t.hasField(s)?t.field(s):null;else if(s&&null!==i){let e=!1;for(const r of f||[])if(i===r[l]){e=!0;break}if(!e)for(const r of f||[])if(i===r.name){i=r[l],e=!0;break}e||(i=null,t&&s&&(i=t.hasField(s)?t.field(s):null))}return null!=i&&f.some(e=>e[l]===i&&(u=e.domains?.[a.name],u&&"inherited"===u.type&&(u=Te(a.name,r),o=!0),!0)),o||u||(u=Te(e,r)),{field:a,domain:u}}function Te(e,r){let t;return r.fields.some(r=>(r.name.toLowerCase()===e.toLowerCase()&&(t=r.domain),!!t)),t}function Ze(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});const t="boolean"==typeof r.cycles&&r.cycles,n=r.cmp&&(i=r.cmp,function(e){return function(r,t){const n={key:r,value:e[r]},u={key:t,value:e[t]};return i(n,u)}});var i;const u=[];return function e(r){if(r?.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0===r)return;if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);let i,o;if(Array.isArray(r)){for(o="[",i=0;i<r.length;i++)i&&(o+=","),o+=e(r[i])||"null";return o+"]"}if(null===r)return"null";if(u.includes(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const a=u.push(r)-1,s=Object.keys(r).sort(n?.(r));for(o="",i=0;i<s.length;i++){const t=s[i],n=e(r[t]);n&&(o&&(o+=","),o+=JSON.stringify(t)+":"+n)}return u.splice(a,1),"{"+o+"}"}(e)}function ke(e){const r=[];for(const t of e)I(t)?r.push(t.geometry()):r.push(t);return r}function De(e,r=!0){if(null==e)return[];if(g(e)){const t=[];for(const n of e){const e=fe(n);(r||""!==e)&&t.push(e)}return t}if($(e)){const t=[];for(let n=0;n<e.length();n++){const i=fe(e.get(n));(r||""!==i)&&t.push(i)}return t}if(C(e)){const t=fe(e);if(r||""!==t)return[t]}return[]}let Ae=0;function Fe(){return Ae++,Ae%100==0?(Ae=0,new Promise(e=>{setTimeout(()=>{e()},0)})):Promise.resolve()}function xe(e,r,t){switch(t){case"&":return e&r;case"|":return e|r;case"^":return e^r;case"<<":return e<<r;case">>":return e>>r;case">>>":return e>>>r}}function Oe(e){return null==e?null:d(e)||y(e)||p(e)?e:L(e)?e.castAsJson():$(e)?e.toArray().map(e=>Oe(e)):Array.isArray(e)?e.map(e=>Oe(e)):b(e)?e:B(e)?e.toJSDate():Q(e)?e.toString():K(e)?e.toJSDate():"castAsJson"in e?e.castAsJson():null}async function Ce(e,r=null){if($(e)&&(e=e.toArray()),null==e)return null;if(C(e)||L(e)||b(e)||B(e))return Oe(e);if(Array.isArray(e)){const t=[],n=[];for(const i of e)if(null===i||C(i)||L(i)||b(i)||B(i))n.push(Oe(i));else{const e=n.push(null)-1;t.push(Ce(i,r).then(r=>{n[e]=r}))}return t.length>0&&await Promise.all(t),n}return"castAsJsonAsync"in e?e.castAsJsonAsync(r):null}function Je(e){return we(e)?e.parent:e}function we(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function je(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Le(e,r,t){const n=Je(e.fullSchema());if(null===n)return null;if(!n.fields)return null;return he(r,n,e,t)}function Me(e){const r=Je(e.fullSchema());return null===r?null:r.fields?r.subtypeField?{subtypeField:r.subtypeField,subtypes:r.subtypes?r.subtypes.map(e=>({name:e.name,code:e.code})):[]}:r.typeIdField?{subtypeField:r.typeIdField,subtypes:r.types?r.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function Ye(e,r,t,n){const i=Je(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const u=he(r,i,e,n);if(void 0===t)try{t=e.field(r)}catch(o){return null}return Ne(u,t)}function Ge(e,r,t,n){const i=Je(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===t){try{t=e.field(r)}catch(u){return null}return t}return Se(he(r,i,e,n),t)}function Pe(e){return e?.timeZone??"system"}function ve(e){const r=Je(e.fullSchema());if(null===r)return null;if(!r.fields)return null;const t=[];for(const n of r.fields)t.push(o(n));return{objectIdField:r.objectIdField,globalIdField:r.globalIdField??"",geometryType:void 0===a[r.geometryType]?"":a[r.geometryType],fields:t}}const Ie="1.36",Re=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:Z,ReturnResult:T,absRound:te,arcadeVersion:Ie,autoCastFeatureToGeometry:ke,binaryOperator:xe,breakResult:D,castAsJson:Oe,castAsJsonAsync:Ce,castRecordToText:le,continueResult:A,defaultTimeZone:Pe,defaultUndefined:J,equalityTest:se,featureDomainCodeLookup:Ge,featureDomainValueLookup:Ye,featureFullDomain:Le,featureSchema:ve,featureSubtypes:Me,getDomain:he,getDomainCode:Se,getDomainValue:Ne,getType:w,greaterThanLessThan:ae,isArray:g,isAttachment:q,isBoolean:d,isDate:B,isDateOnly:K,isDictionary:z,isDictionaryLike:U,isEmpty:re,isExtent:v,isFeature:I,isFeatureSet:_,isFeatureSetCollection:H,isFunctionParameter:x,isGeometry:L,isGraphic:h,isImmutableArray:$,isInteger:N,isJsDate:b,isKnowledgeGraph:W,isModule:O,isMultipoint:Y,isNumber:y,isPixel:V,isPoint:M,isPolygon:P,isPolyline:G,isPortal:E,isSimpleType:C,isString:p,isSubtypeGrouplayer:je,isSubtypeSublayer:we,isTime:Q,isVoid:j,isVoxel:R,multiReplace:F,pcCheck:ee,standardiseDateFormat:ue,tick:Fe,toBoolean:ge,toDate:pe,toNumber:ye,toNumberArray:ce,toString:fe,toStringArray:De,toStringExplicit:me,voidOperation:k},Symbol.toStringTag,{value:"Module"}));export{P as $,xe as A,U as B,D as C,A as D,ee as E,V as F,R as G,ke as H,Z as I,v as J,G as K,M as L,ge as M,J as N,re as O,De as P,w as Q,T as R,Pe as S,pe as T,ue as U,te as V,Le as W,Ge as X,Ye as Y,ve as Z,Me as _,Oe as a,Y as a0,F as a1,Ie as a2,ce as a3,we as a4,Fe as a5,he as a6,Ne as a7,Se as a8,je as a9,C as b,le as c,L as d,Ce as e,B as f,$ as g,I as h,x as i,H as j,_ as k,z as l,q as m,E as n,W as o,O as p,K as q,Q as r,Re as s,me as t,j as u,ye as v,fe as w,k as x,ae as y,se as z};
2
+ import{ArcadeDate as e,createDateTimeZone as r}from"../arcade/ArcadeDate.js";import{ArcadeModule as t}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as n}from"../arcade/executionError.js";import{ArcadeFunction as i}from"../arcade/FunctionWrapper.js";import u from"../arcade/ImmutableArray.js";import{esriFieldToJson as o,layerGeometryEsriRestConstants as a}from"../arcade/featureset/support/shared.js";import{parse as s,format as l}from"../core/number.js";import{DateOnly as f}from"../core/sql/DateOnly.js";import{TimeOnly as c}from"../core/sql/TimeOnly.js";import{getLocale as m}from"../intl/locale.js";import{isBoolean as d,isNumber as y,isString as p,isDate as b,isArray as g,isInteger as N}from"../support/guards.js";import{DateTime as S}from"luxon";import{isGraphic as h}from"../support/graphicInstanceUtils.js";class T{constructor(e){this.value=e}}class Z{constructor(e){this.value=e}}const k={type:"VOID"},D=Symbol("BREAK"),A=Symbol("CONTINUE");function F(e,r,t){return""===r||null==r||r===t||r===t?e:e=e.split(r).join(t)}function x(e){return e instanceof i}function O(e){return e instanceof t}function C(e){return!!p(e)||(!!y(e)||(!!B(e)||(!!K(e)||(!!Q(e)||(!!d(e)||(null===e||e===k))))))}function J(e,r){return void 0===e?r:e}function w(e){if(null==e)return"";if(g(e))return"Array";if($(e))return"Array";if(B(e))return"Date";if(Q(e))return"Time";if(K(e))return"DateOnly";if(p(e))return"String";if(d(e))return"Boolean";if(y(e))return"Number";if(q(e))return"Attachment";if(E(e))return"Portal";if(z(e))return"Dictionary";if(W(e))return"KnowledgeGraph";if(O(e))return"Module";if(I(e))return"Feature";if(L(e))switch(e.type){case"point":return"Point";case"polygon":return"Polygon";case"polyline":return"Polyline";case"multipoint":return"Multipoint";case"extent":return"Extent";default:return"Unrecognized Type"}return x(e)?"Function":_(e)?"FeatureSet":H(e)?"FeatureSetCollection":R(e)?"Voxel":V(e)?"Pixel":e===k?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function j(e){return e===k}function L(e){return"esri.arcade.Geometry"===e?.arcadeDeclaredClass}function M(e){return L(e)&&"point"===e.type}function Y(e){return L(e)&&"multipoint"===e.type}function G(e){return L(e)&&"polyline"===e.type}function P(e){return L(e)&&"polygon"===e.type}function v(e){return L(e)&&"extent"===e.type}function I(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function R(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function V(e){return"esri.arcade.Pixel"===e?.arcadeDeclaredClass}function _(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function z(e){return"esri.arcade.Dictionary"===e?.declaredClass}function E(e){return"esri.arcade.Portal"===e?.declaredClass}function q(e){return"esri.arcade.Attachment"===e?.declaredClass}function U(e){return z(e)||I(e)||R(e)||V(e)}function H(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function W(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function $(e){return e instanceof u}function B(r){return r instanceof e}function K(e){return e instanceof f}function Q(e){return e instanceof c}function X(e){return null!=e&&"object"==typeof e}function ee(e,r,t,i){if(e.length<r||e.length>t)throw new n("WrongNumberOfParameters",i)}function re(e){return null==e||j(e)||""===e}function te(e){return e<0?-Math.round(-e):Math.round(e)}function ne(e,r){return isNaN(e)||null==r||""===r?e.toString():(r=F(r,"‰",""),r=F(r,"¤",""),l(e,{pattern:r}))}function ie(e,r){return null==r||""===r?e.toISOString(!0):e.toFormat(ue(r),{locale:m(),numberingSystem:"latn"})}function ue(e,r=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="";const n=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(n)||[])switch(i){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"Z":t+="Z";break;case"ZZ":t+="ZZ";break;case"ZZZ":t+="ZZZ";break;case"ZZZZ":t+=r?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":t+=r?"[ZZZZZ]":"ZZZZZ";break;case"S":t+="'S'";break;case"SS":t+="'SS'";break;case"SSS":t+="u";break;case"A":case"a":t+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":t+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?t+=`'${i.slice(1,-1)}'`:t+=`'${i}'`}return t}function oe(e,r,t){switch(t){case">":return e>r;case"<":return e<r;case">=":return e>=r;case"<=":return e<=r}return!1}function ae(r,t,i){if(null===r){if(null===t||t===k)return oe(null,null,i);if(y(t))return oe(0,t,i);if(p(t))return oe(0,ye(t),i);if(d(t))return oe(0,ye(t),i);if(B(t))return oe(0,t.toNumber(),i);if(Q(t))return oe(r,t.toNumber(),i);if(K(t))return oe(r,t.toNumber(),i)}if(r===k){if(null===t||t===k)return oe(null,null,i);if(y(t))return oe(0,t,i);if(p(t))return oe(0,ye(t),i);if(d(t))return oe(0,ye(t),i);if(B(t))return oe(0,t.toNumber(),i);if(Q(t))return oe(r,t.toNumber(),i);if(K(t))return oe(r,t.toNumber(),i)}else if(y(r)){if(y(t))return oe(r,t,i);if(d(t))return oe(r,ye(t),i);if(null===t||t===k)return oe(r,0,i);if(p(t))return oe(r,ye(t),i);if(B(t))return oe(r,t.toNumber(),i);if(Q(t))return oe(r,t.toNumber(),i);if(K(t))return oe(r,t.toNumber(),i)}else if(p(r)){if(p(t))return oe(fe(r),fe(t),i);if(B(t))return oe(ye(r),t.toNumber(),i);if(Q(t))return oe(ye(r),t.toNumber(),i);if(K(t))return oe(ye(r),t.toNumber(),i);if(y(t))return oe(ye(r),t,i);if(null===t||t===k)return oe(ye(r),0,i);if(d(t))return oe(ye(r),ye(t),i)}else if(B(r)){if(B(t))return r.timeZone!==t.timeZone&&(r.isUnknownTimeZone?r=e.arcadeDateAndZoneToArcadeDate(r,t.timeZone):t.isUnknownTimeZone&&(t=e.arcadeDateAndZoneToArcadeDate(t,r.timeZone))),oe(r.toNumber(),t.toNumber(),i);if(null===t||t===k)return oe(r.toNumber(),0,i);if(y(t))return oe(r.toNumber(),t,i);if(d(t))return oe(r.toNumber(),ye(t),i);if(p(t))return oe(r.toNumber(),ye(t),i);if(Q(t))throw new n("CannotCompareDateAndTime",null);if(K(t))return oe(r.toNumber(),t.toNumber(),i)}else if(d(r)){if(d(t))return oe(r,t,i);if(y(t))return oe(ye(r),ye(t),i);if(B(t))return oe(ye(r),t.toNumber(),i);if(Q(t))return oe(ye(r),t.toNumber(),i);if(K(t))return oe(ye(r),t.toNumber(),i);if(null===t||t===k)return oe(ye(r),0,i);if(p(t))return oe(ye(r),ye(t),i)}else if(K(r)){if(B(t))return oe(r.toNumber(),t.toNumber(),i);if(null===t||t===k)return oe(r.toNumber(),0,i);if(y(t))return oe(r.toNumber(),t,i);if(d(t))return oe(r.toNumber(),ye(t),i);if(p(t))return oe(r.toNumber(),ye(t),i);if(Q(t))throw new n("CannotCompareDateAndTime",null);if(K(t))return oe(r.toNumber(),t.toNumber(),i)}else if(Q(r)){if(B(t))throw new n("CannotCompareDateAndTime",null);if(null===t||t===k)return oe(r.toNumber(),0,i);if(y(t))return oe(r.toNumber(),t,i);if(d(t))return oe(r.toNumber(),ye(t),i);if(p(t))return oe(r.toNumber(),ye(t),i);if(Q(t))return oe(r.toNumber(),t.toNumber(),i);if(K(t))throw new n("CannotCompareDateAndTime",null)}return!!se(r,t)&&("<="===i||">="===i)}function se(e,r){if(e===r)return!0;if(null===e&&r===k||null===r&&e===k)return!0;if(B(e)&&B(r))return e.equals(r);if(Q(e)&&Q(r))return e.equals(r);if(K(e)&&K(r))return e.equals(r);if($(e))return e.equalityTest(r);if(M(e)&&M(r)){const t=e.id,n=r.id;if(null!=t)return t===n}return!(!X(e)||!X(r)||e._underlyingGraphic!==r._underlyingGraphic||void 0===e._underlyingGraphic||null===e._underlyingGraphic)}function le(e,{useNumbersForDates:r}){let t="";for(const n in e){""!==t&&(t+=",");const i=e[n];null==i?t+=JSON.stringify(n)+":null":d(i)||y(i)||p(i)?t+=JSON.stringify(n)+":"+JSON.stringify(i):L(i)?t+=JSON.stringify(n)+":"+me(i):Q(i)||K(i)?t+=`${JSON.stringify(n)}:${JSON.stringify(i.toString())}`:$(i)||Array.isArray(i)?t+=JSON.stringify(n)+":"+me(i,null,r):B(i)?t+=r?JSON.stringify(n)+":"+JSON.stringify(i.getTime()):JSON.stringify(n)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(t+=JSON.stringify(n)+":"+i.castToText(r))}return"{"+t+"}"}function fe(e,r){if(p(e))return e;if(null===e)return"";if(y(e))return ne(e,r);if(d(e))return e.toString();if(B(e))return ie(e,r);if(Q(e))return e.toFormat(r);if(K(e))return e.toFormat(r);if(L(e))return me(e);if(g(e)){const r=[];for(let t=0;t<e.length;t++)r[t]=de(e[t]);return"["+r.join(",")+"]"}if($(e)){const r=[];for(let t=0;t<e.length();t++)r[t]=de(e.get(t));return"["+r.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():x(e)?"object, Function":e===k?"":O(e)?"object, Module":""}function ce(e){const r=[];if($(e)){for(let t=0;t<e.length();t++)r[t]=ye(e.get(t));return r}if(!g(e))return null;for(let t=0;t<e.length;t++)r[t]=ye(e[t]);return r}function me(e,r,t=!1){if(p(e))return e;if(null===e)return"";if(y(e))return ne(e,r);if(d(e))return e.toString();if(B(e))return ie(e,r);if(Q(e))return e.toFormat(r);if(K(e))return e.toFormat(r);if(L(e)){if("extent"===e.type){const{xmin:r,xmax:t,ymin:n,ymax:i,zmin:u,zmax:o,mmin:a,mmax:s}=e.asJsonLikeGeometry();return'{"xmin":'+r+',"ymin":'+n+","+(e.hasZ?'"zmin":'+u+",":"")+(e.hasM?'"mmin":'+a+",":"")+'"xmax":'+t+',"ymax":'+i+","+(e.hasZ?'"zmax":'+o+",":"")+(e.hasM?'"mmax":'+s+",":"")+'"spatialReference":'+Ze(e.spatialReference)+"}"}return Ze(e.castAsJson(),(e,r)=>e.key===r.key?0:"spatialReference"===e.key?1:"spatialReference"===r.key||e.key<r.key?-1:e.key>r.key?1:0)}if(g(e)){const r=[];for(let n=0;n<e.length;n++)r[n]=de(e[n],t);return"["+r.join(",")+"]"}if($(e)){const r=[];for(let n=0;n<e.length();n++)r[n]=de(e.get(n),t);return"["+r.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(t):x(e)?"object, Function":j(e)?"":O(e)?"object, Module":""}function de(e,r=!1){if(null===e)return"null";if(d(e)||p(e))return JSON.stringify(e);if(y(e))return e.toString();if(L(e))return me(e,null,r);if($(e))return me(e,null,r);if(g(e))return me(e,null,r);if(B(e))return r?JSON.stringify(e.getTime()):JSON.stringify(ie(e,""));if(Q(e))return JSON.stringify(e.toString());if(K(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(r)}else if(e===k)return"null";return"null"}function ye(e,r){return y(e)?e:null===e||""===e?0:B(e)||K(e)||Q(e)?NaN:d(e)?e?1:0:g(e)||""===e||void 0===e?NaN:void 0!==r&&p(e)?(r=F(r,"‰",""),r=F(r,"¤",""),s(e,{pattern:r})):e===k?0:Number(e)}function pe(r,t){if(B(r))return r;if(p(r)){const n=be(r,t);if(n)return e.dateTimeToArcadeDate(n)}return null}function be(e,t){const n=/ (\d\d)/,i=r(t);let u=S.fromISO(e,{zone:i});return u.isValid||n.test(e)&&(e=e.replace(n,"T$1"),u=S.fromISO(e,{zone:i}),u.isValid)?u:null}function ge(e){return d(e)?e:p(e)?"true"===(e=e.toLowerCase()):!!y(e)&&(0!==e&&!isNaN(e))}function Ne(e,r){if(!e)return r;if(!e.domain)return r;let t=null,n=null;if(B(r))t=r.toNumber();else if(K(r))t=r.toString();else if(Q(r))t=r.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)t=fe(r);else{if(null==r)return null;if(""===r)return r;t=ye(r)}for(let i=0;i<e.domain.codedValues.length;i++){const r=e.domain.codedValues[i];r.code===t&&(n=r)}return null===n?fe(r):n.name}function Se(e,r){if(!e)return r;if(!e.domain)return r;let t=null;const n=fe(r);for(let i=0;i<e.domain.codedValues.length;i++){const r=e.domain.codedValues[i];r.name===n&&(t=r)}return null===t?r:t.code}function he(e,r,t=null,i=null){if(!r)return null;if(!r.fields)return null;let u,o,a=null;for(let n=0;n<r.fields.length;n++){const t=r.fields[n];t.name.toLowerCase()===e.toString().toLowerCase()&&(a=t)}if(null===a)throw new n("FieldNotFound",null,{key:e});let s=r.typeIdField,l="id",f=r.types;if(r.subtypeField&&(s=r.subtypeField,l="code",f=r.subtypes??[]),null===i&&t&&s)i=t.hasField(s)?t.field(s):null;else if(s&&null!==i){let e=!1;for(const r of f||[])if(i===r[l]){e=!0;break}if(!e)for(const r of f||[])if(i===r.name){i=r[l],e=!0;break}e||(i=null,t&&s&&(i=t.hasField(s)?t.field(s):null))}return null!=i&&f.some(e=>e[l]===i&&(u=e.domains?.[a.name],u&&"inherited"===u.type&&(u=Te(a.name,r),o=!0),!0)),o||u||(u=Te(e,r)),{field:a,domain:u}}function Te(e,r){let t;return r.fields.some(r=>(r.name.toLowerCase()===e.toLowerCase()&&(t=r.domain),!!t)),t}function Ze(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});const t="boolean"==typeof r.cycles&&r.cycles,n=r.cmp&&(i=r.cmp,function(e){return function(r,t){const n={key:r,value:e[r]},u={key:t,value:e[t]};return i(n,u)}});var i;const u=[];return function e(r){if(r?.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0===r)return;if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);let i,o;if(Array.isArray(r)){for(o="[",i=0;i<r.length;i++)i&&(o+=","),o+=e(r[i])||"null";return o+"]"}if(null===r)return"null";if(u.includes(r)){if(t)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const a=u.push(r)-1,s=Object.keys(r).sort(n?.(r));for(o="",i=0;i<s.length;i++){const t=s[i],n=e(r[t]);n&&(o&&(o+=","),o+=JSON.stringify(t)+":"+n)}return u.splice(a,1),"{"+o+"}"}(e)}function ke(e){const r=[];for(const t of e)I(t)?r.push(t.geometry()):r.push(t);return r}function De(e,r=!0){if(null==e)return[];if(g(e)){const t=[];for(const n of e){const e=fe(n);(r||""!==e)&&t.push(e)}return t}if($(e)){const t=[];for(let n=0;n<e.length();n++){const i=fe(e.get(n));(r||""!==i)&&t.push(i)}return t}if(C(e)){const t=fe(e);if(r||""!==t)return[t]}return[]}let Ae=0;function Fe(){return Ae++,Ae%100==0?(Ae=0,new Promise(e=>{setTimeout(()=>{e()},0)})):Promise.resolve()}function xe(e,r,t){switch(t){case"&":return e&r;case"|":return e|r;case"^":return e^r;case"<<":return e<<r;case">>":return e>>r;case">>>":return e>>>r}}function Oe(e){return null==e?null:d(e)||y(e)||p(e)?e:L(e)?e.castAsJson():$(e)?e.toArray().map(e=>Oe(e)):Array.isArray(e)?e.map(e=>Oe(e)):b(e)?e:B(e)?e.toJSDate():Q(e)?e.toString():K(e)?e.toJSDate():"castAsJson"in e?e.castAsJson():null}async function Ce(e,r=null){if($(e)&&(e=e.toArray()),null==e)return null;if(C(e)||L(e)||b(e)||B(e))return Oe(e);if(Array.isArray(e)){const t=[],n=[];for(const i of e)if(null===i||C(i)||L(i)||b(i)||B(i))n.push(Oe(i));else{const e=n.push(null)-1;t.push(Ce(i,r).then(r=>{n[e]=r}))}return t.length>0&&await Promise.all(t),n}return"castAsJsonAsync"in e?e.castAsJsonAsync(r):null}function Je(e){return we(e)?e.parent:e}function we(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function je(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Le(e,r,t){const n=Je(e.fullSchema());if(null===n)return null;if(!n.fields)return null;return he(r,n,e,t)}function Me(e){const r=Je(e.fullSchema());return null===r?null:r.fields?r.subtypeField?{subtypeField:r.subtypeField,subtypes:r.subtypes?r.subtypes.map(e=>({name:e.name,code:e.code})):[]}:r.typeIdField?{subtypeField:r.typeIdField,subtypes:r.types?r.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function Ye(e,r,t,n){const i=Je(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const u=he(r,i,e,n);if(void 0===t)try{t=e.field(r)}catch(o){return null}return Ne(u,t)}function Ge(e,r,t,n){const i=Je(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===t){try{t=e.field(r)}catch(u){return null}return t}return Se(he(r,i,e,n),t)}function Pe(e){return e?.timeZone??"system"}function ve(e){const r=Je(e.fullSchema());if(null===r)return null;if(!r.fields)return null;const t=[];for(const n of r.fields)t.push(o(n));return{objectIdField:r.objectIdField,globalIdField:r.globalIdField??"",geometryType:void 0===a[r.geometryType]?"":a[r.geometryType],fields:t}}const Ie="1.36",Re=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:Z,ReturnResult:T,absRound:te,arcadeVersion:Ie,autoCastFeatureToGeometry:ke,binaryOperator:xe,breakResult:D,castAsJson:Oe,castAsJsonAsync:Ce,castRecordToText:le,continueResult:A,defaultTimeZone:Pe,defaultUndefined:J,equalityTest:se,featureDomainCodeLookup:Ge,featureDomainValueLookup:Ye,featureFullDomain:Le,featureSchema:ve,featureSubtypes:Me,getDomain:he,getDomainCode:Se,getDomainValue:Ne,getType:w,greaterThanLessThan:ae,isArray:g,isAttachment:q,isBoolean:d,isDate:B,isDateOnly:K,isDictionary:z,isDictionaryLike:U,isEmpty:re,isExtent:v,isFeature:I,isFeatureSet:_,isFeatureSetCollection:H,isFunctionParameter:x,isGeometry:L,isGraphic:h,isImmutableArray:$,isInteger:N,isJsDate:b,isKnowledgeGraph:W,isModule:O,isMultipoint:Y,isNumber:y,isPixel:V,isPoint:M,isPolygon:P,isPolyline:G,isPortal:E,isSimpleType:C,isString:p,isSubtypeGrouplayer:je,isSubtypeSublayer:we,isTime:Q,isVoid:j,isVoxel:R,multiReplace:F,pcCheck:ee,standardiseDateFormat:ue,tick:Fe,toBoolean:ge,toDate:pe,toNumber:ye,toNumberArray:ce,toString:fe,toStringArray:De,toStringExplicit:me,voidOperation:k},Symbol.toStringTag,{value:"Module"}));export{P as $,xe as A,U as B,D as C,A as D,ee as E,V as F,R as G,ke as H,Z as I,v as J,G as K,M as L,ge as M,J as N,re as O,De as P,w as Q,T as R,Pe as S,pe as T,ue as U,te as V,Le as W,Ge as X,Ye as Y,ve as Z,Me as _,Oe as a,Y as a0,F as a1,Ie as a2,ce as a3,we as a4,Fe as a5,he as a6,Ne as a7,Se as a8,je as a9,C as b,le as c,L as d,Ce as e,B as f,$ as g,I as h,x as i,H as j,_ as k,z as l,q as m,E as n,W as o,O as p,K as q,Q as r,Re as s,me as t,j as u,ye as v,fe as w,k as x,ae as y,se as z};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.119";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.120";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
package/core/has.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("min-workers-pool-size",2),has.add("max-workers-pool-size",has("esri-mobile")?3:8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-hybrid-tile-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-allow-editable",!1),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-pixel-buffering-enabled",!0),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-max-page-size",8e3),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("featurelayer-pbf-true-curves",!0),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("featurelayer-relative-time-queries-enabled",!0),has.add("featurelayer-relative-time-queries-bin-window-public",1),has.add("featurelayer-relative-time-queries-bin-window-private",60),has.add("parquetlayer-full-query-feature-count",5e5),has.add("parquetlayer-persistence-enabled",!0),has.add("parquetlayer-cache-enabled",!0),has.add("parquetlayer-legacy-field-overrides-enabled",!1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",64),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",16),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:im-shading",!0),has.add("enable-feature:im-vertex-normals",!0),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
2
+ const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-temporal","Temporal"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("min-workers-pool-size",2),has.add("max-workers-pool-size",has("esri-mobile")?3:8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-hybrid-tile-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-allow-editable",!1),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-pixel-buffering-enabled",!0),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-max-page-size",8e3),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("featurelayer-pbf-true-curves",!0),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("featurelayer-relative-time-queries-enabled",!0),has.add("featurelayer-relative-time-queries-bin-window-public",1),has.add("featurelayer-relative-time-queries-bin-window-private",60),has.add("parquetlayer-full-query-feature-count",5e5),has.add("parquetlayer-persistence-enabled",!0),has.add("parquetlayer-cache-enabled",!0),has.add("parquetlayer-legacy-field-overrides-enabled",!1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",64),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",16),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:im-shading",!0),has.add("enable-feature:im-vertex-normals",!0),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{create as t}from"../factories/vec3f64.js";import{getEpsilon as n,RANDOM as r}from"./common.js";function a(t){const n=t[0],r=t[1],a=t[2];return Math.sqrt(n*n+r*r+a*a)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function s(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function i(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function M(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function h(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function l(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t}function d(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t}function b(t,n=0,r=1){return t[0]=Math.min(Math.max(t[0],n),r),t[1]=Math.min(Math.max(t[1],n),r),t[2]=Math.min(Math.max(t[2],n),r),t}function q(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function x(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}function g(t,n){return x(t,t,n/tt(t))}function p(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}function v(t,n){const r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}function j(t,n){const r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}function y(t){const n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}function z(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function _(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function A(t,n){const r=n[0],a=n[1],o=n[2];let u=r*r+a*a+o*o;return u>0&&(u=1/Math.sqrt(u),t[0]=n[0]*u,t[1]=n[1]*u,t[2]=n[2]*u),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function D(t,n,r){const a=n[0],o=n[1],u=n[2],e=r[0],c=r[1],s=r[2];return t[0]=o*s-u*c,t[1]=u*e-a*s,t[2]=a*c-o*e,t}function I(t,n,r){const a=n[0],o=n[1],u=n[2],e=r[0],c=r[1],s=r[2],i=o*s-u*c,M=u*e-a*s,h=a*c-o*e,f=Math.sqrt(i*i+M*M+h*h);return t[0]=i/f,t[1]=M/f,t[2]=h/f,t}function L(t,n,r,a){const o=n[0],u=n[1],e=n[2];return t[0]=o+a*(r[0]-o),t[1]=u+a*(r[1]-u),t[2]=e+a*(r[2]-e),t}function O(t,n,r,a,o,u){const e=u*u,c=e*(2*u-3)+1,s=e*(u-2)+u,i=e*(u-1),M=e*(3-2*u);return t[0]=n[0]*c+r[0]*s+a[0]*i+o[0]*M,t[1]=n[1]*c+r[1]*s+a[1]*i+o[1]*M,t[2]=n[2]*c+r[2]*s+a[2]*i+o[2]*M,t}function Q(t,n,r,a,o,u){const e=1-u,c=e*e,s=u*u,i=c*e,M=3*u*c,h=3*s*e,f=s*u;return t[0]=n[0]*i+r[0]*M+a[0]*h+o[0]*f,t[1]=n[1]*i+r[1]*M+a[1]*h+o[1]*f,t[2]=n[2]*i+r[2]*M+a[2]*h+o[2]*f,t}function S(t,n=1){const a=r,o=2*a()*Math.PI,u=2*a()-1,e=Math.sqrt(1-u*u)*n;return t[0]=Math.cos(o)*e,t[1]=Math.sin(o)*e,t[2]=u*n,t}function T(t,n,r){const a=n[0],o=n[1],u=n[2];return t[0]=r[0]*a+r[4]*o+r[8]*u+r[12],t[1]=r[1]*a+r[5]*o+r[9]*u+r[13],t[2]=r[2]*a+r[6]*o+r[10]*u+r[14],t}function Z(t,n){return n[2]*t[0]+n[6]*t[1]+n[10]*t[2]+n[14]}function E(t,n,r){const a=n[0],o=n[1],u=n[2];return t[0]=a*r[0]+o*r[3]+u*r[6],t[1]=a*r[1]+o*r[4]+u*r[7],t[2]=a*r[2]+o*r[5]+u*r[8],t}function N(t,n,r){return V(t,n,r[0],r[1],r[2],r[3])}function V(t,n,r,a,o,u){const e=n[0],c=n[1],s=n[2],i=a*s-o*c,M=o*e-r*s,h=r*c-a*e,f=a*h-o*M,m=o*i-r*h,l=r*M-a*i,d=2*u;return t[0]=e+i*d+2*f,t[1]=c+M*d+2*m,t[2]=s+h*d+2*l,t}function X(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[0],u[1]=o[1]*Math.cos(a)-o[2]*Math.sin(a),u[2]=o[1]*Math.sin(a)+o[2]*Math.cos(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function Y(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[2]*Math.sin(a)+o[0]*Math.cos(a),u[1]=o[1],u[2]=o[2]*Math.cos(a)-o[0]*Math.sin(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function k(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[0]*Math.cos(a)-o[1]*Math.sin(a),u[1]=o[0]*Math.sin(a)+o[1]*Math.cos(a),u[2]=o[2],t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function w(t,n){A(B,t),A(C,n);const r=P(B,C);return r>1?0:r<-1?Math.PI:Math.acos(r)}const B=t(),C=t();function F(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function H(t,r){if(t===r)return!0;const a=t[0],o=t[1],u=t[2],e=r[0],c=r[1],s=r[2],i=n();return Math.abs(a-e)<=i*Math.max(1,Math.abs(a),Math.abs(e))&&Math.abs(o-c)<=i*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(u-s)<=i*Math.max(1,Math.abs(u),Math.abs(s))}function J(t,n,r){const a=r[0]-n[0],o=r[1]-n[1],u=r[2]-n[2];let e=a*a+o*o+u*u;return e>0?(e=1/Math.sqrt(e),t[0]=a*e,t[1]=o*e,t[2]=u*e,t):(t[0]=0,t[1]=0,t[2]=0,t)}const K=c,R=s,U=i,W=v,$=j,tt=a,nt=y,rt=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:e,angle:w,bezier:Q,ceil:M,clamp:b,copy:o,cross:D,crossAndNormalize:I,direction:J,dist:W,distance:v,div:U,divide:i,dot:P,equals:H,exactEquals:G,floor:h,hermite:O,inverse:_,len:tt,length:a,lerp:L,max:d,min:l,mul:R,multiply:s,negate:z,normalize:A,random:S,rotateX:X,rotateY:Y,rotateZ:k,round:q,scale:x,scaleAndAdd:p,scaleTo:g,set:u,sign:m,sqrDist:$,sqrLen:nt,squaredDistance:j,squaredLength:y,str:F,sub:K,subtract:c,transformMat3:E,transformMat4:T,transformMat4Z:Z,transformQuat:N,transformQuatValues:V},Symbol.toStringTag,{value:"Module"}));export{f as abs,e as add,w as angle,Q as bezier,M as ceil,b as clamp,o as copy,D as cross,I as crossAndNormalize,J as direction,W as dist,v as distance,U as div,i as divide,P as dot,H as equals,G as exactEquals,h as floor,O as hermite,_ as inverse,tt as len,a as length,L as lerp,d as max,l as min,R as mul,s as multiply,z as negate,A as normalize,S as random,X as rotateX,Y as rotateY,k as rotateZ,q as round,x as scale,p as scaleAndAdd,g as scaleTo,u as set,m as sign,$ as sqrDist,nt as sqrLen,j as squaredDistance,y as squaredLength,F as str,K as sub,c as subtract,E as transformMat3,T as transformMat4,Z as transformMat4Z,N as transformQuat,V as transformQuatValues,rt as v};
2
+ import{create as t}from"../factories/vec3f64.js";import{getEpsilon as n,RANDOM as r}from"./common.js";function a(t){const n=t[0],r=t[1],a=t[2];return Math.sqrt(n*n+r*r+a*a)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function s(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function i(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function M(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function h(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function l(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t}function d(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t}function b(t,n=0,r=1){return t[0]=Math.min(Math.max(t[0],n),r),t[1]=Math.min(Math.max(t[1],n),r),t[2]=Math.min(Math.max(t[2],n),r),t}function q(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function x(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}function g(t,n){return x(t,t,n/tt(t))}function p(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}function v(t,n){const r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}function j(t,n){const r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}function y(t){const n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}function z(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function _(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function A(t,n=t){const r=n[0],a=n[1],o=n[2];let u=r*r+a*a+o*o;return u>0&&(u=1/Math.sqrt(u),t[0]=n[0]*u,t[1]=n[1]*u,t[2]=n[2]*u),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function D(t,n,r){const a=n[0],o=n[1],u=n[2],e=r[0],c=r[1],s=r[2];return t[0]=o*s-u*c,t[1]=u*e-a*s,t[2]=a*c-o*e,t}function I(t,n,r){const a=n[0],o=n[1],u=n[2],e=r[0],c=r[1],s=r[2],i=o*s-u*c,M=u*e-a*s,h=a*c-o*e,f=Math.sqrt(i*i+M*M+h*h);return t[0]=i/f,t[1]=M/f,t[2]=h/f,t}function L(t,n,r,a){const o=n[0],u=n[1],e=n[2];return t[0]=o+a*(r[0]-o),t[1]=u+a*(r[1]-u),t[2]=e+a*(r[2]-e),t}function O(t,n,r,a,o,u){const e=u*u,c=e*(2*u-3)+1,s=e*(u-2)+u,i=e*(u-1),M=e*(3-2*u);return t[0]=n[0]*c+r[0]*s+a[0]*i+o[0]*M,t[1]=n[1]*c+r[1]*s+a[1]*i+o[1]*M,t[2]=n[2]*c+r[2]*s+a[2]*i+o[2]*M,t}function Q(t,n,r,a,o,u){const e=1-u,c=e*e,s=u*u,i=c*e,M=3*u*c,h=3*s*e,f=s*u;return t[0]=n[0]*i+r[0]*M+a[0]*h+o[0]*f,t[1]=n[1]*i+r[1]*M+a[1]*h+o[1]*f,t[2]=n[2]*i+r[2]*M+a[2]*h+o[2]*f,t}function S(t,n=1){const a=r,o=2*a()*Math.PI,u=2*a()-1,e=Math.sqrt(1-u*u)*n;return t[0]=Math.cos(o)*e,t[1]=Math.sin(o)*e,t[2]=u*n,t}function T(t,n,r){const a=n[0],o=n[1],u=n[2];return t[0]=r[0]*a+r[4]*o+r[8]*u+r[12],t[1]=r[1]*a+r[5]*o+r[9]*u+r[13],t[2]=r[2]*a+r[6]*o+r[10]*u+r[14],t}function Z(t,n){return n[2]*t[0]+n[6]*t[1]+n[10]*t[2]+n[14]}function E(t,n,r){const a=n[0],o=n[1],u=n[2];return t[0]=a*r[0]+o*r[3]+u*r[6],t[1]=a*r[1]+o*r[4]+u*r[7],t[2]=a*r[2]+o*r[5]+u*r[8],t}function N(t,n,r){return V(t,n,r[0],r[1],r[2],r[3])}function V(t,n,r,a,o,u){const e=n[0],c=n[1],s=n[2],i=a*s-o*c,M=o*e-r*s,h=r*c-a*e,f=a*h-o*M,m=o*i-r*h,l=r*M-a*i,d=2*u;return t[0]=e+i*d+2*f,t[1]=c+M*d+2*m,t[2]=s+h*d+2*l,t}function X(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[0],u[1]=o[1]*Math.cos(a)-o[2]*Math.sin(a),u[2]=o[1]*Math.sin(a)+o[2]*Math.cos(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function Y(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[2]*Math.sin(a)+o[0]*Math.cos(a),u[1]=o[1],u[2]=o[2]*Math.cos(a)-o[0]*Math.sin(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function k(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[0]*Math.cos(a)-o[1]*Math.sin(a),u[1]=o[0]*Math.sin(a)+o[1]*Math.cos(a),u[2]=o[2],t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function w(t,n){A(B,t),A(C,n);const r=P(B,C);return r>1?0:r<-1?Math.PI:Math.acos(r)}const B=t(),C=t();function F(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function H(t,r){if(t===r)return!0;const a=t[0],o=t[1],u=t[2],e=r[0],c=r[1],s=r[2],i=n();return Math.abs(a-e)<=i*Math.max(1,Math.abs(a),Math.abs(e))&&Math.abs(o-c)<=i*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(u-s)<=i*Math.max(1,Math.abs(u),Math.abs(s))}function J(t,n,r){const a=r[0]-n[0],o=r[1]-n[1],u=r[2]-n[2];let e=a*a+o*o+u*u;return e>0?(e=1/Math.sqrt(e),t[0]=a*e,t[1]=o*e,t[2]=u*e,t):(t[0]=0,t[1]=0,t[2]=0,t)}const K=c,R=s,U=i,W=v,$=j,tt=a,nt=y,rt=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:e,angle:w,bezier:Q,ceil:M,clamp:b,copy:o,cross:D,crossAndNormalize:I,direction:J,dist:W,distance:v,div:U,divide:i,dot:P,equals:H,exactEquals:G,floor:h,hermite:O,inverse:_,len:tt,length:a,lerp:L,max:d,min:l,mul:R,multiply:s,negate:z,normalize:A,random:S,rotateX:X,rotateY:Y,rotateZ:k,round:q,scale:x,scaleAndAdd:p,scaleTo:g,set:u,sign:m,sqrDist:$,sqrLen:nt,squaredDistance:j,squaredLength:y,str:F,sub:K,subtract:c,transformMat3:E,transformMat4:T,transformMat4Z:Z,transformQuat:N,transformQuatValues:V},Symbol.toStringTag,{value:"Module"}));export{f as abs,e as add,w as angle,Q as bezier,M as ceil,b as clamp,o as copy,D as cross,I as crossAndNormalize,J as direction,W as dist,v as distance,U as div,i as divide,P as dot,H as equals,G as exactEquals,h as floor,O as hermite,_ as inverse,tt as len,a as length,L as lerp,d as max,l as min,R as mul,s as multiply,z as negate,A as normalize,S as random,X as rotateX,Y as rotateY,k as rotateZ,q as round,x as scale,p as scaleAndAdd,g as scaleTo,u as set,m as sign,$ as sqrDist,nt as sqrLen,j as squaredDistance,y as squaredLength,F as str,K as sub,c as subtract,E as transformMat3,T as transformMat4,Z as transformMat4Z,N as transformQuat,V as transformQuatValues,rt as v};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.119",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.120",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
@@ -0,0 +1,41 @@
1
+ import type { FieldValue } from "./fieldUtils.js";
2
+
3
+ /** @internal */
4
+ export interface NumericRange {
5
+ /**
6
+ * A metadata property indicating whether the range is for an integer field.
7
+ *
8
+ * @internal
9
+ */
10
+ isInteger?: boolean;
11
+ /**
12
+ * Numeric minimum value of the range. Same as
13
+ * `rawMin` unless `rawMin` is a
14
+ * string, in which case `min` will be `null`.
15
+ *
16
+ * @internal
17
+ */
18
+ min?: number | null;
19
+ /**
20
+ * Numeric maximum value of the range. Same as
21
+ * `rawMax` unless `rawMax` is a
22
+ * string, in which case `max` will be `null`.
23
+ *
24
+ * @internal
25
+ */
26
+ max?: number | null;
27
+ /**
28
+ * Minimum value as originally defined. In some cases this value may be a
29
+ * string, e.g. when used in a domain for a date-only or time-only field.
30
+ *
31
+ * @internal
32
+ */
33
+ rawMin?: FieldValue;
34
+ /**
35
+ * Maximum value as originally defined. In some cases this value may be a
36
+ * string, e.g. when used in a domain for a date-only or time-only field.
37
+ *
38
+ * @internal
39
+ */
40
+ rawMax?: FieldValue;
41
+ }
@@ -74,6 +74,15 @@ export function getFeatureGeometryFields(layer: FeatureLayer | SubtypeGroupLayer
74
74
  */
75
75
  export function getLabelingFields(layer: FeatureLayer | null | undefined): Promise<string[]>;
76
76
 
77
+ /**
78
+ * Indicates whether the specified field is an integer field.
79
+ *
80
+ * @param field - The field to check.
81
+ * @returns `true` if the field is an integer field.
82
+ * @internal
83
+ */
84
+ export function isIntegerField(field: Field | null | undefined): boolean;
85
+
77
86
  /** @internal */
78
87
  export type NumericRangeValidationError = "numeric-range-validation-error::out-of-range";
79
88
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{serializeInclusionDefinitionToEntitiesPbf as e,serializeInclusionDefinitionToRelationshipsPbf as r}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import{Clonable as i}from"../core/Clonable.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{isAbsolute as s,join as n}from"../core/urlUtils.js";import{generateUUID as a}from"../core/uuid.js";import{property as l,subclass as p}from"../core/accessorSupport/decorators.js";import{nameToId as u}from"../core/accessorSupport/PropertyOrigin.js";import{getRelationshipEndNodeMap as c}from"../layers/knowledgeGraph/supportUtils.js";import{layoutTypes as h}from"./enums.js";import d from"./LayoutSettings.js";import m from"./NonspatialDataDisplay.js";import{areResourcesSafe as y}from"./utils.js";import{f as U,t as g}from"../chunks/persistableUrlUtils.js";import{reader as f}from"../core/accessorSupport/decorators/reader.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";let j=class extends(o(i)){constructor(t){super(t),this.aggregatedEntitiesUrl=null,this.aggregatedRelationshipsUrl=null,this.autoCollapseRelationships=!0,this.centralityIsUpToDate=!0,this.entitiesUrl=null,this.layoutSettings=null,this.layoutType="organic-standard",this.nonspatialDataDisplay=null,this.relationshipsUrl=null,this._entitiesResourceCreationDate=null,this._relationshipsResourceCreationDate=null}readEntitiesUrl(t,e,r){return U(t,r)}writeEntitiesUrl(t,e,r,i){e[r]="<pending>",i?.resources?.pendingOperations.push(new Promise((o,s)=>{this._writeResourceUrl(t,e,r,i,o,s)}))}readRelationshipsUrl(t,e,r){return U(t,r)}writeRelationshipsUrl(t,e,r,i){e[r]="<pending>",i?.resources?.pendingOperations.push(new Promise((o,s)=>{this._writeResourceUrl(t,e,r,i,o,s)}))}setCreationDatesForResources(t){if(this.entitiesUrl){const e=t.get(this.entitiesUrl);"number"==typeof e&&(this._entitiesResourceCreationDate=e)}if(this.relationshipsUrl){const e=t.get(this.relationshipsUrl);"number"==typeof e&&(this._relationshipsResourceCreationDate=e)}}async _writeResourceUrl(t,e,r,i,o,n){try{const a=i?.portalItem,l=i?.resources,p=u(i?.origin),c=i?.webmap?.activeLinkChartLayer;if(!a||!l||null==p||!c)return t&&(e[r]=g(t,i)),void o();if(c.membershipModified||!a.id)return void this._saveUrlAsNewResource(e,r,l,a,c,o,n);const h="entitiesUrl"===r?this._entitiesResourceCreationDate:this._relationshipsResourceCreationDate;if(await y(t??"",a?.itemUrl??"","number"==typeof h?h:void 0)){if(t){const p=g(t,i);if(s(p))return void this._saveUrlAsNewResource(e,r,l,a,c,o,n);e[r]=p}return void o()}this._saveUrlAsNewResource(e,r,l,a,c,o,n)}catch(a){n(a)}}_saveUrlAsNewResource(t,e,r,i,o,s,n){const a=(o.knowledgeGraph.dataModel.relationshipTypes??[]).map(t=>t.name).reduce((t,e)=>{if(!e)return t;const{members:r}=o.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e)||{members:void 0};if(!r)return t;for(const[i]of r)t.push({id:i,typeName:e});return t},[]);c(a,o.knowledgeGraph).then(a=>{D(o.dataManager.inclusionModeDefinition,e,o.knowledgeGraph,a).then(o=>{const n=v(i,"entitiesUrl"===e?"entitiesUrl":"relationshipsUrl");t[e]=n.itemRelativeUrl,r.toAdd.push({resource:n,content:{type:"blob",blob:o},compress:!1,finish:t=>{"entitiesUrl"===e?this.entitiesUrl=t.url:this.relationshipsUrl=t.url}}),s()}).catch(t=>{n(t)})}).catch(t=>{n(t)})}};t([l({type:String,json:{write:!0}})],j.prototype,"aggregatedEntitiesUrl",void 0),t([l({type:String,json:{write:!0}})],j.prototype,"aggregatedRelationshipsUrl",void 0),t([l({type:Boolean,json:{write:!0}})],j.prototype,"autoCollapseRelationships",void 0),t([l({type:Boolean,json:{write:!0}})],j.prototype,"centralityIsUpToDate",void 0),t([l({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],j.prototype,"entitiesUrl",void 0),t([f("entitiesUrl")],j.prototype,"readEntitiesUrl",null),t([w("entitiesUrl")],j.prototype,"writeEntitiesUrl",null),t([l({type:d,json:{write:!0}})],j.prototype,"layoutSettings",void 0),t([l({type:h,json:{write:!0}})],j.prototype,"layoutType",void 0),t([l({type:m,json:{write:!0}})],j.prototype,"nonspatialDataDisplay",void 0),t([l({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],j.prototype,"relationshipsUrl",void 0),t([f("relationshipsUrl")],j.prototype,"readRelationshipsUrl",null),t([w("relationshipsUrl")],j.prototype,"writeRelationshipsUrl",null),j=t([p("esri.linkChart.LinkChartProperties")],j);const R=j;function v(t,e){const r=`${e}-${a()}.dat`,i=n("linkChart",r);return t.resourceFromPath(i)}async function D(t,i,o,s){let n;return n="entitiesUrl"===i?await e(t,o,s):await r(t,o,s),new Blob([n],{type:"application/x-protobuf"})}export{R as default};
2
+ import{__decorate as t}from"tslib";import{serializeInclusionDefinitionToEntitiesPbf as e,serializeInclusionDefinitionToRelationshipsPbf as r}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import{Clonable as i}from"../core/Clonable.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{isAbsolute as s,join as n}from"../core/urlUtils.js";import{generateUUID as a}from"../core/uuid.js";import{property as l,subclass as p}from"../core/accessorSupport/decorators.js";import{nameToId as u}from"../core/accessorSupport/PropertyOrigin.js";import{getRelationshipEndNodeMap as c}from"../layers/knowledgeGraph/supportUtils.js";import{layoutTypes as h}from"./enums.js";import d from"./LayoutSettings.js";import m from"./NonspatialDataDisplay.js";import{areResourcesSafe as y}from"./utils.js";import{f as U,t as g}from"../chunks/persistableUrlUtils.js";import{reader as f}from"../core/accessorSupport/decorators/reader.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";let j=class extends(o(i)){constructor(t){super(t),this.aggregatedEntitiesUrl=null,this.aggregatedRelationshipsUrl=null,this.autoCollapseRelationships=!0,this.centralityIsUpToDate=!0,this.entitiesUrl=null,this.layoutSettings=null,this.layoutType="organic-standard",this.nonspatialDataDisplay=null,this.relationshipsUrl=null,this._entitiesResourceCreationDate=null,this._relationshipsResourceCreationDate=null}readEntitiesUrl(t,e,r){return U(t,r)}writeEntitiesUrl(t,e,r,i){e[r]="<pending>",i?.resources?.pendingOperations.push(this._writeResourceUrl(t,e,r,i))}readRelationshipsUrl(t,e,r){return U(t,r)}writeRelationshipsUrl(t,e,r,i){e[r]="<pending>",i?.resources?.pendingOperations.push(this._writeResourceUrl(t,e,r,i))}setCreationDatesForResources(t){if(this.entitiesUrl){const e=t.get(this.entitiesUrl);"number"==typeof e&&(this._entitiesResourceCreationDate=e)}if(this.relationshipsUrl){const e=t.get(this.relationshipsUrl);"number"==typeof e&&(this._relationshipsResourceCreationDate=e)}}async _writeResourceUrl(t,e,r,i){const o=i?.portalItem,n=i?.resources,a=u(i?.origin),l=i?.webmap?.activeLinkChartLayer;if(!o||!n||null==a||!l)return void(t&&(e[r]=g(t,i)));if(l.membershipModified||!o.id)return this._saveUrlAsNewResource(e,r,n,o,l);const p="entitiesUrl"===r?this._entitiesResourceCreationDate:this._relationshipsResourceCreationDate;if(!await y(t??"",o?.itemUrl??"","number"==typeof p?p:void 0))return this._saveUrlAsNewResource(e,r,n,o,l);if(t){const a=g(t,i);if(s(a))return this._saveUrlAsNewResource(e,r,n,o,l);e[r]=a}}async _saveUrlAsNewResource(t,e,r,i,o){const s=(o.knowledgeGraph.dataModel.relationshipTypes??[]).map(t=>t.name).reduce((t,e)=>{if(!e)return t;const{members:r}=o.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e)||{members:void 0};if(!r)return t;for(const[i]of r)t.push({id:i,typeName:e});return t},[]),n=await c(s,o.knowledgeGraph),a=await D(o.dataManager.inclusionModeDefinition,e,o.knowledgeGraph,n),l=v(i,"entitiesUrl"===e?"entitiesUrl":"relationshipsUrl");t[e]=l.itemRelativeUrl,r.toAdd.push({resource:l,content:{type:"blob",blob:a},compress:!1,finish:t=>{"entitiesUrl"===e?this.entitiesUrl=t.url:this.relationshipsUrl=t.url}})}};t([l({type:String,json:{write:!0}})],j.prototype,"aggregatedEntitiesUrl",void 0),t([l({type:String,json:{write:!0}})],j.prototype,"aggregatedRelationshipsUrl",void 0),t([l({type:Boolean,json:{write:!0}})],j.prototype,"autoCollapseRelationships",void 0),t([l({type:Boolean,json:{write:!0}})],j.prototype,"centralityIsUpToDate",void 0),t([l({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],j.prototype,"entitiesUrl",void 0),t([f("entitiesUrl")],j.prototype,"readEntitiesUrl",null),t([w("entitiesUrl")],j.prototype,"writeEntitiesUrl",null),t([l({type:d,json:{write:!0}})],j.prototype,"layoutSettings",void 0),t([l({type:h,json:{write:!0}})],j.prototype,"layoutType",void 0),t([l({type:m,json:{write:!0}})],j.prototype,"nonspatialDataDisplay",void 0),t([l({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],j.prototype,"relationshipsUrl",void 0),t([f("relationshipsUrl")],j.prototype,"readRelationshipsUrl",null),t([w("relationshipsUrl")],j.prototype,"writeRelationshipsUrl",null),j=t([p("esri.linkChart.LinkChartProperties")],j);const R=j;function v(t,e){const r=`${e}-${a()}.dat`,i=n("linkChart",r);return t.resourceFromPath(i)}async function D(t,i,o,s){let n;return n="entitiesUrl"===i?await e(t,o,s):await r(t,o,s),new Blob([n],{type:"application/x-protobuf"})}export{R as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.119",
3
+ "version": "5.2.0-next.120",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -19,12 +19,12 @@
19
19
  "type": "module",
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
- "@amcharts/amcharts5": "~5.20.6",
23
- "@arcgis/toolkit": "5.2.0-next.119",
22
+ "@amcharts/amcharts5": "~5.20.7",
23
+ "@arcgis/toolkit": "5.2.0-next.120",
24
24
  "@esri/arcgis-html-sanitizer": "~4.1.0",
25
25
  "@esri/calcite-components": "^5.2.0-next.73",
26
26
  "@vaadin/grid": "~25.2.11",
27
- "@zip.js/zip.js": "~2.16.0",
27
+ "@zip.js/zip.js": "~2.17.0",
28
28
  "luxon": "~3.7.2",
29
29
  "marked": "~18.0.13",
30
30
  "tslib": "^2.8.1"
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const a="20260922",c="6c596a651220d9f1c2b8a49eae5ac848e6dd8ac9";export{a as buildDate,c as revision};
2
+ const e="20260923",a="adb214d4e09c3e8718171e3a6483ae0c2b937520";export{e as buildDate,a as revision};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import has from"../core/has.js";import{IANAZone as t}from"luxon";class e extends t{constructor(t){super(t),this._start=[],this._end=[],this._offset=[]}get type(){return"temporal"}equals(t){return"temporal"===t.type&&t.name===this.name}_findIndexOfLatestStartIncluding(t){let e=0,s=this._start.length;for(;e<s;){const n=e+s>>>1;this._start[n]>t?s=n:e=n+1}return e-1}offset(t){if(t<-864e13||864e13<t)return NaN;const e=this._findIndexOfLatestStartIncluding(t);if(e>=0&&t<this._end[e])return this._offset[e];const s=Temporal.Instant.fromEpochMilliseconds(t).toZonedDateTimeISO(this.name),n=s.offsetNanoseconds/6e10,o=s.add({nanoseconds:1}).getTimeZoneTransition("previous")?.epochMilliseconds??-1/0,i=s.getTimeZoneTransition("next")?.epochMilliseconds??1/0;return this._start.splice(e+1,0,o),this._end.splice(e+1,0,i),this._offset.splice(e+1,0,n),n}}const s=new Map;function n(n){if(has("esri-temporal")){let t=s.get(n);return void 0===t&&(t=new e(n),s.set(n,t)),t}return t.create(n)}export{n as createLuxonIanaTimeZone};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{getOrCreateMapValue as t}from"../core/MapUtils.js";import{UnknownTimeZone as e}from"../core/sql/UnknownTimeZone.js";import{system as n,unknown as o,utc as r}from"./constants.js";import{legacyTimeZoneMap as i}from"./legacyTimeZoneMap.js";import{FixedOffsetZone as s,IANAZone as c,DateTime as m}from"luxon";const u="shortOffset";function a(t){return"timeZoneIANA"in t}function f(t){return t.startsWith("UTC")}function l(t,e=!1,n=!0){return{json:{read:{source:t,reader:(e,n)=>n[t]?p(n[t]):null},write:!!e&&{allowNull:n,writer(e,n){n[t]=e?Z(e):null}}}}}function p(t,e=n){return t?a(t)?t.timeZoneIANA:w(t,e):e}function Z(t){return{timeZoneIANA:t}}function w(t,e=n){if(!t||!i.has(t.timeZone))return e;const o=i.get(t.timeZone);return f(t.timeZone)||t.respectsDaylightSaving?o:h(o)}function h(t){const e=m.local().setZone(t),n=Math.min(e.set({month:1,day:1}).offset,e.set({month:5}).offset);if(0===n)return"Etc/UTC";return`Etc/GMT${s.instance(-n).formatOffset(0,"narrow")}`}function d(t,e,n,i,s){if(e&&"date"===s)return{timeZone:r,timeZoneName:void 0};const c=i.hour,m=n===o;return{timeZone:m?"timestamp-offset"===s?void 0:t??r:n,timeZoneName:m&&c?u:void 0}}function g(t){const e=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map(t=>t.toLowerCase()));return t===n||t===o||e.has(t.toLowerCase())||r.has(t.toLowerCase())}const A=new Map;function C(n){return n===o?e.instance:n===r||"Etc/UTC"===n?s.utcInstance:t(A,n,()=>c.create(n))}export{w as convertLegacyTimeZone,p as fromTimeReference,C as getLuxonTimeZone,d as getTimeZoneFormattingOptions,g as isTimeZoneValid,u as shortTimeZoneName,l as timeZoneProperty,Z as toTimeReference};
2
+ import{UnknownTimeZone as t}from"../core/sql/UnknownTimeZone.js";import{system as e,unknown as n,utc as o}from"./constants.js";import{createLuxonIanaTimeZone as r}from"./ianaZone.js";import{legacyTimeZoneMap as i}from"./legacyTimeZoneMap.js";import{FixedOffsetZone as s,DateTime as m}from"luxon";const u="shortOffset";function a(t){return"timeZoneIANA"in t}function c(t){return t.startsWith("UTC")}function f(t,e=!1,n=!0){return{json:{read:{source:t,reader:(e,n)=>n[t]?l(n[t]):null},write:!!e&&{allowNull:n,writer(e,n){n[t]=e?Z(e):null}}}}}function l(t,n=e){return t?a(t)?t.timeZoneIANA:p(t,n):n}function Z(t){return{timeZoneIANA:t}}function p(t,n=e){if(!t||!i.has(t.timeZone))return n;const o=i.get(t.timeZone);return c(t.timeZone)||t.respectsDaylightSaving?o:h(o)}function h(t){const e=m.local().setZone(t),n=Math.min(e.set({month:1,day:1}).offset,e.set({month:5}).offset);if(0===n)return"Etc/UTC";return`Etc/GMT${s.instance(-n).formatOffset(0,"narrow")}`}function w(t,e,r,i,s){if(e&&"date"===s)return{timeZone:o,timeZoneName:void 0};const m=i.hour,a=r===n;return{timeZone:a?"timestamp-offset"===s?void 0:t??o:r,timeZoneName:a&&m?u:void 0}}function d(t){const o=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map(t=>t.toLowerCase()));return t===e||t===n||o.has(t.toLowerCase())||r.has(t.toLowerCase())}function g(e){return e===n?t.instance:e===o||"Etc/UTC"===e?s.utcInstance:r(e)}export{p as convertLegacyTimeZone,l as fromTimeReference,g as getLuxonTimeZone,w as getTimeZoneFormattingOptions,d as isTimeZoneValid,u as shortTimeZoneName,f as timeZoneProperty,Z as toTimeReference};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import n from"../../../../analysis/LineOfSightAnalysisObserver.js";import e from"../../../../analysis/LineOfSightAnalysisTarget.js";import{length as o,normalize as t,scaleAndAdd as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as l,create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as i,getConvertedElevation as s,getGraphicEffectiveElevationInfo as c}from"../../../../support/elevationInfoUtils.js";import f from"../../../../symbols/support/ElevationInfo.js";function a(n){return n?.clone()??null}function p(n){return n?.clone()??null}function m(e,o=null){return g(e,o,()=>new n)}function d(n,o=null){return g(n,o,()=>new e)}function g(n,e,o){if(null==n)return null;const t=e??o();return t.position=n.position?.clone()??null,t.elevationInfo=n.elevationInfo?.clone()??null,t.feature=n.feature??null,t}function v(n,e,o=null){const t=e.clone();return t.z=s(n,e,o??i,i),t}function h(n,e,o,t=null){const r=v(e,o,t);try{return n.getMapPointIntersection(r)}catch{return null}}function I(n,e,o,t,{elevationInfo:r=null,sourceElevationInfo:l=i,preservedIntersection:u=null,usesAuthoredAbsoluteHeight:s=!1}={}){const c=A(r,l,s),f=u??h(o,n,t,c);return null!=f&&(y(n,e,f,{snappedMapPoint:t,elevationInfo:r,sourceElevationInfo:l,usesAuthoredAbsoluteHeight:s}),!0)}function y(n,e,o,{snappedMapPoint:t=o.mapPoint,elevationInfo:r=null,sourceElevationInfo:l=i,usesAuthoredAbsoluteHeight:u=!1}={}){if(null==t)return e.position=null,e.elevationInfo=null,void(e.feature=null);const c=o.context,f=v(n,t,A(r,l,u)),a=b(o,r,u),p="graphic"===c?.type?c.graphic:null;e.elevationInfo=a,e.feature=p,"gaussian-splat"===c?.type?e.position=x(n,f,a,o.normal):(f.z=s(n,f,i,a),e.position=f)}function A(n,e,o){return o&&null==n?i:n??e}function b(n,e,o){if(null!=e)return e.clone();if(o)return null;const t=n.context;if("ground"===t?.type)return new f({mode:"on-the-ground"});if("graphic"!==t?.type)return null;const r=c(t.graphic);return"on-the-ground"===r.mode&&(r.mode="relative-to-ground",r.offset=0),new f(r)}function x(n,e,c,f){const a=e.clone(),p=l(e.x,e.y,e.z??0);if(!n.renderCoordsHelper.toRenderCoords(p,e.spatialReference,p)||0===o(f))return a.z=s(n,a,i,c),a;const m=4,d=n.state.camera.computeScreenPixelSizeAt(p)*m,g=t(u(),f);r(p,p,g,d);const v=n.renderCoordsHelper.fromRenderCoords(p,a);return null==v?(a.z=s(n,a,i,c),a):(v.z=s(n,v,i,c),v)}export{x as getGaussianSplatOffsetPosition,h as getLineOfSightMapPointIntersection,m as restoreLineOfSightObserverState,d as restoreLineOfSightTargetState,a as snapshotLineOfSightObserverState,p as snapshotLineOfSightTargetState,I as updateLineOfSightItemFromAuthoredPoint,y as updateLineOfSightItemFromIntersection};
2
+ import n from"../../../../analysis/LineOfSightAnalysisObserver.js";import e from"../../../../analysis/LineOfSightAnalysisTarget.js";import{length as o,normalize as t,scaleAndAdd as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as l,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getConvertedElevation as u,absoluteHeightElevationInfo as s}from"../../../../support/elevationInfoUtils.js";function c(n){return n?.clone()??null}function a(n){return n?.clone()??null}function f(e,o=null){return m(e,o,()=>new n)}function p(n,o=null){return m(n,o,()=>new e)}function m(n,e,o){if(null==n)return null;const t=e??o();return t.position=n.position?.clone()??null,t.elevationInfo=n.elevationInfo?.clone()??null,t.feature=n.feature??null,t}function v(n,e,o=null){const t=e.clone();return t.z=u(n,e,o??s,s),t}function d(n,e,o,t=null){const r=v(e,o,t);try{return n.getMapPointIntersection(r)}catch{return null}}function I(n,e,o,t,{elevationInfo:r=null,preservedIntersection:l=null}={}){const i=l??d(o,n,t,r);return null!=i&&(g(n,e,i,{snappedMapPoint:t,elevationInfo:r}),!0)}function g(n,e,o,{snappedMapPoint:t=o.mapPoint,elevationInfo:r=null}={}){if(null==t)return e.position=null,e.elevationInfo=null,void(e.feature=null);const l=o.context,i=r?.clone(),u="graphic"===l?.type?l.graphic:null;if(e.elevationInfo=i,e.feature=u,"gaussian-splat"===l?.type){const l=v(n,t,r);return void(e.position=y(n,l,i,o.normal))}e.position=t.clone()}function y(n,e,c,a){const f=e.clone(),p=l(e.x,e.y,e.z??0);if(!n.renderCoordsHelper.toRenderCoords(p,e.spatialReference,p)||0===o(a))return f.z=u(n,f,s,c),f;const m=4,v=n.state.camera.computeScreenPixelSizeAt(p)*m,d=t(i(),a);r(p,p,d,v);const I=n.renderCoordsHelper.fromRenderCoords(p,f);return null==I?(f.z=u(n,f,s,c),f):(I.z=u(n,I,s,c),I)}export{y as getGaussianSplatOffsetPosition,f as restoreLineOfSightObserverState,p as restoreLineOfSightTargetState,c as snapshotLineOfSightObserverState,a as snapshotLineOfSightTargetState,I as updateLineOfSightItemFromAuthoredPoint,g as updateLineOfSightItemFromIntersection};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{EventedAccessor as e}from"../../../../core/Evented.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as o,syncAndInitial as n}from"../../../../core/reactiveUtils.js";import{property as s,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{absoluteHeightElevationInfo as a}from"../../../../support/elevationInfoUtils.js";import{snapshotLineOfSightObserverState as l,snapshotLineOfSightTargetState as c,restoreLineOfSightObserverState as h,restoreLineOfSightTargetState as p,updateLineOfSightItemFromAuthoredPoint as m}from"./LineOfSightAuthoringUtils.js";import{EditGeometryOperations as d}from"../../../interactive/editGeometry/EditGeometryOperations.js";const u=Symbol("line-of-sight-item-operations");let y=class extends e{constructor(t){super(t),this._operations=null,this._dragIntersectionContext=null,this._syncSource=null}initialize(){this.addHandles([o(()=>{const{elevationInfo:t,feature:e,position:i}=this.item;return{elevationInfo:t,elevationMode:t?.mode,elevationOffset:t?.offset,elevationUnit:t?.unit,feature:e,position:i,positionCoordinates:i?.toArray(),spatialReference:i?.spatialReference}},()=>this._syncOperationsFromItem(),n),o(()=>{const{origin:t}=this;return{origin:t,originCoordinates:t?.toArray(),spatialReference:t?.spatialReference}},()=>this.emit("committed"),n)])}destroy(){this.removeHandles(u),this._operations=i(this._operations),this._dragIntersectionContext=null}get operations(){return this._operations}get elevationInfo(){return this.item.elevationInfo??a}get visible(){return this.analysisViewData.visible&&null!=this.origin}get isDraped(){return!1}get origin(){return"observer"===this.itemType?this.analysisViewData.elevationAlignedObserver:this.analysisViewData.computations.find(t=>t.target===this.item)?.elevationAlignedTargetLocation??null}get updating(){return!1}toMap(t){return this.intersector.getScreenPointIntersection(t)?.mapPoint}createUndoRecord(){let t=this._snapshotState(),e=null;return{undo:()=>{e=this._snapshotState(),this._restoreSnapshot(t)},redo:()=>{null!=e&&(t=this._snapshotState(),this._restoreSnapshot(e))}}}updateDragIntersection(t){"cancel"!==t.action?this._dragIntersectionContext={dragging:"end"!==t.action,intersection:this.intersector.getScreenPointIntersection(t.screenPoint)}:this._dragIntersectionContext=null}_snapshotState(){return"observer"===this.itemType?l(this.item):c(this.item)}_restoreSnapshot(t){"observer"===this.itemType?h(t,this.item):p(t,this.item),this.destroyed||(this._syncOperationsFromItem(),this.emit("committed"))}_replaceOperations(t){this.removeHandles(u),this._operations=i(this._operations),this._operations=t,null!=t&&this.addHandles(t.data.on("change",()=>this._operationsGeometryChanged()),u)}_syncOperationsFromItem(){const{position:t}=this.item,e=this._operations;if("operations"!==this._syncSource){this._syncSource="item";try{if(null==t){if(null==e)return;this._replaceOperations(null)}else e?.data.geometry?.equals(t)||e?.trySetGeometry(t)||this._replaceOperations(d.fromGeometry(t,this.view.state.viewingMode));this._emitModifiedExternally()}finally{this._syncSource=null}}}_operationsGeometryChanged(){const t=this._operations?.data.geometry;if("item"===this._syncSource||"point"!==t?.type)return;const e=this._dragIntersectionContext?.intersection??null;this._syncSource="operations";try{m(this.view,this.item,this.intersector,t,{elevationInfo:this.item.elevationInfo,preservedIntersection:e,sourceElevationInfo:this.elevationInfo})}finally{this._syncSource=null}null==this._dragIntersectionContext||this._dragIntersectionContext.dragging||(this._dragIntersectionContext=null),this.emit("committed")}_emitModifiedExternally(){this.emit("modified-externally"),this.emit("committed")}};t([s({constructOnly:!0})],y.prototype,"analysisViewData",void 0),t([s({constructOnly:!0})],y.prototype,"intersector",void 0),t([s({constructOnly:!0})],y.prototype,"item",void 0),t([s({constructOnly:!0})],y.prototype,"itemType",void 0),t([s({constructOnly:!0})],y.prototype,"view",void 0),t([s()],y.prototype,"_operations",void 0),y=t([r("esri.views.3d.analysis.LineOfSight.LineOfSightItemManipulatedObject3D")],y);export{y as LineOfSightItemManipulatedObject3D};
2
+ import{__decorate as t}from"tslib";import{EventedAccessor as e}from"../../../../core/Evented.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as o,syncAndInitial as n}from"../../../../core/reactiveUtils.js";import{property as s,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{absoluteHeightElevationInfo as a}from"../../../../support/elevationInfoUtils.js";import{snapshotLineOfSightObserverState as l,snapshotLineOfSightTargetState as c,restoreLineOfSightObserverState as h,restoreLineOfSightTargetState as p,updateLineOfSightItemFromAuthoredPoint as m}from"./LineOfSightAuthoringUtils.js";import{EditGeometryOperations as d}from"../../../interactive/editGeometry/EditGeometryOperations.js";const u=Symbol("line-of-sight-item-operations");let y=class extends e{constructor(t){super(t),this._operations=null,this._dragIntersectionContext=null,this._syncSource=null}initialize(){this.addHandles([o(()=>{const{elevationInfo:t,feature:e,position:i}=this.item;return{elevationInfo:t,elevationMode:t?.mode,elevationOffset:t?.offset,elevationUnit:t?.unit,feature:e,position:i,positionCoordinates:i?.toArray(),spatialReference:i?.spatialReference}},()=>this._syncOperationsFromItem(),n),o(()=>{const{origin:t}=this;return{origin:t,originCoordinates:t?.toArray(),spatialReference:t?.spatialReference}},()=>this.emit("committed"),n)])}destroy(){this.removeHandles(u),this._operations=i(this._operations),this._dragIntersectionContext=null}get operations(){return this._operations}get elevationInfo(){return this.item.elevationInfo??a}get visible(){return this.analysisViewData.visible&&null!=this.origin}get isDraped(){return!1}get origin(){return"observer"===this.itemType?this.analysisViewData.elevationAlignedObserver:this.analysisViewData.computations.find(t=>t.target===this.item)?.elevationAlignedTargetLocation??null}get updating(){return!1}toMap(t){return this.intersector.getScreenPointIntersection(t)?.mapPoint}createUndoRecord(){let t=this._snapshotState(),e=null;return{undo:()=>{e=this._snapshotState(),this._restoreSnapshot(t)},redo:()=>{null!=e&&(t=this._snapshotState(),this._restoreSnapshot(e))}}}updateDragIntersection(t){"cancel"!==t.action?this._dragIntersectionContext={dragging:"end"!==t.action,intersection:this.intersector.getScreenPointIntersection(t.screenPoint)}:this._dragIntersectionContext=null}_snapshotState(){return"observer"===this.itemType?l(this.item):c(this.item)}_restoreSnapshot(t){"observer"===this.itemType?h(t,this.item):p(t,this.item),this.destroyed||(this._syncOperationsFromItem(),this.emit("committed"))}_replaceOperations(t){this.removeHandles(u),this._operations=i(this._operations),this._operations=t,null!=t&&this.addHandles(t.data.on("change",()=>this._operationsGeometryChanged()),u)}_syncOperationsFromItem(){const{position:t}=this.item,e=this._operations;if("operations"!==this._syncSource){this._syncSource="item";try{if(null==t){if(null==e)return;this._replaceOperations(null)}else e?.data.geometry?.equals(t)||e?.trySetGeometry(t)||this._replaceOperations(d.fromGeometry(t,this.view.state.viewingMode));this._emitModifiedExternally()}finally{this._syncSource=null}}}_operationsGeometryChanged(){const t=this._operations?.data.geometry;if("item"===this._syncSource||"point"!==t?.type)return;const e=this._dragIntersectionContext;this._syncSource="operations";try{null==e?this.item.position=t:m(this.view,this.item,this.intersector,t,{elevationInfo:this.item.elevationInfo,preservedIntersection:e.intersection})}finally{this._syncSource=null}null==e||e.dragging||(this._dragIntersectionContext=null),this.emit("committed")}_emitModifiedExternally(){this.emit("modified-externally"),this.emit("committed")}};t([s({constructOnly:!0})],y.prototype,"analysisViewData",void 0),t([s({constructOnly:!0})],y.prototype,"intersector",void 0),t([s({constructOnly:!0})],y.prototype,"item",void 0),t([s({constructOnly:!0})],y.prototype,"itemType",void 0),t([s({constructOnly:!0})],y.prototype,"view",void 0),t([s()],y.prototype,"_operations",void 0),y=t([r("esri.views.3d.analysis.LineOfSight.LineOfSightItemManipulatedObject3D")],y);export{y as LineOfSightItemManipulatedObject3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as t,sync as i}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{lineOfSightPlacementLeafPluginMarker as r}from"./LineOfSightPlacementLeafPlugin.js";import{usesLineOfSightAuthoredAbsoluteHeight as s}from"./lineOfSightPlacementUtils.js";import{PluginBase as a}from"../../../draw/plugins/PluginBase.js";var p,l;const u=Symbol("line-of-sight-observer-vertex"),d=Symbol("line-of-sight-observer-plugin-marker");let c=class extends a{constructor(){super(...arguments),this[p]=!0,this[l]=!0,this.observer=null,this.defaultCaptureMode="capture-always",this.inputMapPosition=null,this.preservedIntersection=null,this._interactiveHandle=null}static{p=d,l=r}get usesAuthoredAbsoluteHeight(){return s(this._context,this._interactiveHandle)}start(e){super.start(e),this.preservedIntersection=null;const{session:o,positionOfLastUserInput:n}=e,r="grabbable-object"===this.defaultCaptureMode?this.inputMapPosition??this._interactiveHandle?.outputMapPosition??n:this.inputMapPosition??n;!r||"grabbable-object"!==this.defaultCaptureMode&&this._interactiveHandle||o.appendOrReplacePoint(u,r),this._interactiveHandle||(this._interactiveHandle=e.createInteractiveHandle({defaultCaptureMode:this.defaultCaptureMode,inputMapPosition:"grabbable-object"===this.defaultCaptureMode?r??void 0:void 0}),this.addHandles(t(()=>this._interactiveHandle?.outputMapPosition,e=>{e&&!this._isComplete&&this._session?.appendOrReplacePoint(u,e)},i),this._ownHandlesKey))}};function h(e){return!!e&&d in e}function v(e={}){return{uniqueId:Symbol("line-of-sight-observer-plugin"),kind:["vertex"],geometryType:"point",hidden:!0,localizationKey:"leaf-point-segment",icon:"point",create:()=>new c(e)}}e([o({constructOnly:!0})],c.prototype,"observer",void 0),e([o()],c.prototype,"defaultCaptureMode",void 0),e([o()],c.prototype,"inputMapPosition",void 0),e([o()],c.prototype,"preservedIntersection",void 0),e([o()],c.prototype,"_interactiveHandle",void 0),c=e([n("esri.views.3d.analysis.LineOfSight.LineOfSightObserverPlugin")],c);export{c as LineOfSightObserverPlugin,v as createLineOfSightObserverPluginConfiguration,h as isLineOfSightObserverPlugin,d as lineOfSightObserverPluginMarker};
2
+ import{__decorate as e}from"tslib";import{watch as t,sync as i}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{lineOfSightPlacementLeafPluginMarker as r}from"./LineOfSightPlacementLeafPlugin.js";import{PluginBase as s}from"../../../draw/plugins/PluginBase.js";var a,p;const l=Symbol("line-of-sight-observer-vertex"),u=Symbol("line-of-sight-observer-plugin-marker");let d=class extends s{constructor(){super(...arguments),this[a]=!0,this[p]=!0,this.observer=null,this.defaultCaptureMode="capture-always",this.inputMapPosition=null,this.preservedIntersection=null,this._interactiveHandle=null}static{a=u,p=r}start(e){super.start(e),this.preservedIntersection=null;const{session:o,positionOfLastUserInput:n}=e,r="grabbable-object"===this.defaultCaptureMode?this.inputMapPosition??this._interactiveHandle?.outputMapPosition??n:this.inputMapPosition??n;!r||"grabbable-object"!==this.defaultCaptureMode&&this._interactiveHandle||o.appendOrReplacePoint(l,r),this._interactiveHandle||(this._interactiveHandle=e.createInteractiveHandle({defaultCaptureMode:this.defaultCaptureMode,inputMapPosition:"grabbable-object"===this.defaultCaptureMode?r??void 0:void 0}),this.addHandles(t(()=>this._interactiveHandle?.outputMapPosition,e=>{e&&!this._isComplete&&this._session?.appendOrReplacePoint(l,e)},i),this._ownHandlesKey))}};function c(e){return!!e&&u in e}function h(e={}){return{uniqueId:Symbol("line-of-sight-observer-plugin"),kind:["vertex"],geometryType:"point",hidden:!0,localizationKey:"leaf-point-segment",icon:"point",create:()=>new d(e)}}e([o({constructOnly:!0})],d.prototype,"observer",void 0),e([o()],d.prototype,"defaultCaptureMode",void 0),e([o()],d.prototype,"inputMapPosition",void 0),e([o()],d.prototype,"preservedIntersection",void 0),e([o()],d.prototype,"_interactiveHandle",void 0),d=e([n("esri.views.3d.analysis.LineOfSight.LineOfSightObserverPlugin")],d);export{d as LineOfSightObserverPlugin,h as createLineOfSightObserverPluginConfiguration,c as isLineOfSightObserverPlugin,u as lineOfSightObserverPluginMarker};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../../analysis/LineOfSightAnalysisObserver.js";import i from"../../../../analysis/LineOfSightAnalysisTarget.js";import s from"../../../../core/Collection.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{property as n,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{isPoint as a,isMultipoint as l}from"../../../../geometry/support/typeUtils.js";import{updateLineOfSightItemFromAuthoredPoint as u}from"./LineOfSightAuthoringUtils.js";import{isLineOfSightObserverPlugin as h,createLineOfSightObserverPluginConfiguration as g}from"./LineOfSightObserverPlugin.js";import{isLineOfSightPlacementLeafPlugin as c}from"./LineOfSightPlacementLeafPlugin.js";import{LineOfSightRayIntersector as p}from"./LineOfSightRayIntersector.js";import{isLineOfSightTargetPlugin as m,createLineOfSightTargetPluginConfiguration as _}from"./LineOfSightTargetPlugin.js";import{PluginBase as y}from"../../../draw/plugins/PluginBase.js";let v=class extends y{constructor(){super(...arguments),this.observerElevationInfo=null,this.targetElevationInfo=null,this._intersector=null,this._downstreamPlugin=null,this._initialObserver=null,this._operationObserver=null,this._initialTargets=new s,this._operationTargets=new s}initialize(){this._intersector=new p({view:this.view})}destroy(){this._intersector=r(this._intersector)}start(t){super.start(t),this._initialObserver=this.analysis.observer,this._operationObserver=this._initialObserver,f(this._initialTargets,this.analysis.targets.toArray()),this._operationTargets.removeAll(),t.session.appendOrReplacePart(null,[]),this._syncAnalysisFromSession(),this._restartDownstreamPlugin()}beforeAttachPlugin(t){return{geometryType:"point",useStandaloneSession:!0}}beforeComplete(){return{downstreamPluginCompletionMode:"cancel"}}attachPlugin(t){this._downstreamPlugin=t}afterUndoRedo(){this._syncAnalysisFromSession(),this._restartDownstreamPlugin()}complete(){this._clearCursorTarget(),super.complete()}cancel(){this._clearCursorTarget()}detachPlugin(t,s){if(this._downstreamPlugin===t&&(this._downstreamPlugin=null),m(t)&&this._clearCursorTarget(),"complete"!==s)return void this._syncAnalysisFromSession();const r=this._context?.getSession(t)?.generatePreviewGeometry({includeAutomaticConnection:!1,geometryType:"point"});if(!r||!a(r))return this._syncAnalysisFromSession(),void this._restartDownstreamPlugin();this._truncateItemsToSession();const n=c(t)?t.preservedIntersection:null,o=!!c(t)&&t.usesAuthoredAbsoluteHeight;if(h(t)){const i=t.observer??this._operationObserver??new e;if(!this._intersector||!u(this.view,i,this._intersector,r,{elevationInfo:this.observerElevationInfo,preservedIntersection:n,usesAuthoredAbsoluteHeight:o}))return this._syncAnalysisFromSession(),void this._restartDownstreamPlugin();this._operationObserver=i}else if(m(t)){const e=t.target??new i;if(!this._intersector||!u(this.view,e,this._intersector,r,{elevationInfo:this.targetElevationInfo,preservedIntersection:n,usesAuthoredAbsoluteHeight:o}))return this._syncAnalysisFromSession(),void this._restartDownstreamPlugin();this._operationTargets.add(e)}this._appendCommittedPoint(r),this._syncAnalysisFromSession(),this._restartDownstreamPlugin(),this._clearCursorTarget()}_appendCommittedPoint(t){const e=this._session;e&&(e.appendOrReplacePoint(null,t),e.appendOrReplacePart(null,[]),e.automaticRestart=!1,e.groupGeometryChanges())}_clearCursorTarget(){this.analysisViewData.cursorTarget=r(this.analysisViewData.cursorTarget)}_truncateItemsToSession(){const t=this._getCommittedPointCount();null==this._initialObserver&&0===t&&(this._operationObserver=null),this._operationTargets.splice(this._getCommittedOperationTargetCount(t))}_restartDownstreamPlugin(){const t=null==this.analysis.observer,e=t?this._createObserverPluginConfiguration():this._createTargetPluginConfiguration();t&&h(this._downstreamPlugin)||!t&&m(this._downstreamPlugin)||this._context?.requestBeginDownstreamPlugin(e,{cancelExisting:!0})}_createObserverPluginConfiguration(t=null){return g({observer:t,defaultCaptureMode:t?"grabbable-object":"capture-always",inputMapPosition:t?.position??null})}_createTargetPluginConfiguration(t=null){return _({analysis:this.analysis,analysisViewData:this.analysisViewData,defaultCaptureMode:t?"grabbable-object":"capture-always",elevationInfo:this.targetElevationInfo,inputMapPosition:t?.position??null,target:t,view:this.view})}_syncAnalysisFromSession(){const t=this._getCommittedPointCount(),e=this._getCommittedOperationTargetCount(t);this.analysis.observer=this._getActiveObserver(t),f(this.analysis.targets,this._initialTargets.toArray().concat(this._operationTargets.toArray().slice(0,e)))}_getActiveObserver(t){return null!=this._initialObserver?this._operationObserver??null:t>0?this._operationObserver:null}_getCommittedOperationTargetCount(t){return Math.max(0,t-(null!=this._initialObserver?0:Math.min(t,1)))}_getCommittedPointCount(){const t=this._session?.generatePreviewGeometry({includeAutomaticConnection:!1,geometryType:"multipoint"});return t&&l(t)?t.points.length:0}};function d(t){return{uniqueId:Symbol("line-of-sight-root-plugin"),kind:["multipart"],geometryType:"multipoint",hidden:!0,localizationKey:"line-of-sight-root",icon:"point",create:()=>new v(t)}}function f(t,e){let i=-1;for(let s=0;s<Math.min(t.length,e.length);s++)if(t.getItemAt(s)!==e[s]){i=s;break}if(-1===i){if(t.length===e.length)return;i=Math.min(t.length,e.length)}t.splice(i,t.length-i,...e.slice(i))}t([n({constructOnly:!0})],v.prototype,"analysis",void 0),t([n({constructOnly:!0})],v.prototype,"analysisViewData",void 0),t([n({constructOnly:!0})],v.prototype,"view",void 0),t([n({constructOnly:!0})],v.prototype,"observerElevationInfo",void 0),t([n({constructOnly:!0})],v.prototype,"targetElevationInfo",void 0),t([n()],v.prototype,"_intersector",void 0),t([n()],v.prototype,"_downstreamPlugin",void 0),v=t([o("esri.views.3d.analysis.LineOfSight.LineOfSightRootPlugin")],v);export{v as LineOfSightRootPlugin,d as createLineOfSightRootPluginConfiguration};
2
+ import{__decorate as t}from"tslib";import e from"../../../../analysis/LineOfSightAnalysisObserver.js";import i from"../../../../analysis/LineOfSightAnalysisTarget.js";import s from"../../../../core/Collection.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{property as n,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{isPoint as a,isMultipoint as l}from"../../../../geometry/support/typeUtils.js";import{updateLineOfSightItemFromAuthoredPoint as u}from"./LineOfSightAuthoringUtils.js";import{isLineOfSightObserverPlugin as h,createLineOfSightObserverPluginConfiguration as g}from"./LineOfSightObserverPlugin.js";import{isLineOfSightPlacementLeafPlugin as c}from"./LineOfSightPlacementLeafPlugin.js";import{LineOfSightRayIntersector as p}from"./LineOfSightRayIntersector.js";import{isLineOfSightTargetPlugin as m,createLineOfSightTargetPluginConfiguration as _}from"./LineOfSightTargetPlugin.js";import{PluginBase as y}from"../../../draw/plugins/PluginBase.js";let v=class extends y{constructor(){super(...arguments),this.observerElevationInfo=null,this.targetElevationInfo=null,this._intersector=null,this._downstreamPlugin=null,this._initialObserver=null,this._operationObserver=null,this._initialTargets=new s,this._operationTargets=new s}initialize(){this._intersector=new p({view:this.view})}destroy(){this._intersector=r(this._intersector)}start(t){super.start(t),this._initialObserver=this.analysis.observer,this._operationObserver=this._initialObserver,f(this._initialTargets,this.analysis.targets.toArray()),this._operationTargets.removeAll(),t.session.appendOrReplacePart(null,[]),this._syncAnalysisFromSession(),this._restartDownstreamPlugin()}beforeAttachPlugin(t){return{geometryType:"point",useStandaloneSession:!0}}beforeComplete(){return{downstreamPluginCompletionMode:"cancel"}}attachPlugin(t){this._downstreamPlugin=t}afterUndoRedo(){this._syncAnalysisFromSession(),this._restartDownstreamPlugin()}complete(){this._clearCursorTarget(),super.complete()}cancel(){this._clearCursorTarget()}detachPlugin(t,s){if(this._downstreamPlugin===t&&(this._downstreamPlugin=null),m(t)&&this._clearCursorTarget(),"complete"!==s)return void this._syncAnalysisFromSession();const r=this._context?.getSession(t)?.generatePreviewGeometry({includeAutomaticConnection:!1,geometryType:"point"});if(!r||!a(r))return this._syncAnalysisFromSession(),void this._restartDownstreamPlugin();this._truncateItemsToSession();const n=c(t)?t.preservedIntersection:null;if(h(t)){const i=t.observer??this._operationObserver??new e;if(!this._intersector||!u(this.view,i,this._intersector,r,{elevationInfo:this.observerElevationInfo,preservedIntersection:n}))return this._syncAnalysisFromSession(),void this._restartDownstreamPlugin();this._operationObserver=i}else if(m(t)){const e=t.target??new i;if(!this._intersector||!u(this.view,e,this._intersector,r,{elevationInfo:this.targetElevationInfo,preservedIntersection:n}))return this._syncAnalysisFromSession(),void this._restartDownstreamPlugin();this._operationTargets.add(e)}this._appendCommittedPoint(r),this._syncAnalysisFromSession(),this._restartDownstreamPlugin(),this._clearCursorTarget()}_appendCommittedPoint(t){const e=this._session;e&&(e.appendOrReplacePoint(null,t),e.appendOrReplacePart(null,[]),e.automaticRestart=!1,e.groupGeometryChanges())}_clearCursorTarget(){this.analysisViewData.cursorTarget=r(this.analysisViewData.cursorTarget)}_truncateItemsToSession(){const t=this._getCommittedPointCount();null==this._initialObserver&&0===t&&(this._operationObserver=null),this._operationTargets.splice(this._getCommittedOperationTargetCount(t))}_restartDownstreamPlugin(){const t=null==this.analysis.observer,e=t?this._createObserverPluginConfiguration():this._createTargetPluginConfiguration();t&&h(this._downstreamPlugin)||!t&&m(this._downstreamPlugin)||this._context?.requestBeginDownstreamPlugin(e,{cancelExisting:!0})}_createObserverPluginConfiguration(t=null){return g({observer:t,defaultCaptureMode:t?"grabbable-object":"capture-always",inputMapPosition:t?.position??null})}_createTargetPluginConfiguration(t=null){return _({analysis:this.analysis,analysisViewData:this.analysisViewData,defaultCaptureMode:t?"grabbable-object":"capture-always",elevationInfo:this.targetElevationInfo,inputMapPosition:t?.position??null,target:t,view:this.view})}_syncAnalysisFromSession(){const t=this._getCommittedPointCount(),e=this._getCommittedOperationTargetCount(t);this.analysis.observer=this._getActiveObserver(t),f(this.analysis.targets,this._initialTargets.toArray().concat(this._operationTargets.toArray().slice(0,e)))}_getActiveObserver(t){return null!=this._initialObserver?this._operationObserver??null:t>0?this._operationObserver:null}_getCommittedOperationTargetCount(t){return Math.max(0,t-(null!=this._initialObserver?0:Math.min(t,1)))}_getCommittedPointCount(){const t=this._session?.generatePreviewGeometry({includeAutomaticConnection:!1,geometryType:"multipoint"});return t&&l(t)?t.points.length:0}};function d(t){return{uniqueId:Symbol("line-of-sight-root-plugin"),kind:["multipart"],geometryType:"multipoint",hidden:!0,localizationKey:"line-of-sight-root",icon:"point",create:()=>new v(t)}}function f(t,e){let i=-1;for(let s=0;s<Math.min(t.length,e.length);s++)if(t.getItemAt(s)!==e[s]){i=s;break}if(-1===i){if(t.length===e.length)return;i=Math.min(t.length,e.length)}t.splice(i,t.length-i,...e.slice(i))}t([n({constructOnly:!0})],v.prototype,"analysis",void 0),t([n({constructOnly:!0})],v.prototype,"analysisViewData",void 0),t([n({constructOnly:!0})],v.prototype,"view",void 0),t([n({constructOnly:!0})],v.prototype,"observerElevationInfo",void 0),t([n({constructOnly:!0})],v.prototype,"targetElevationInfo",void 0),t([n()],v.prototype,"_intersector",void 0),t([n()],v.prototype,"_downstreamPlugin",void 0),v=t([o("esri.views.3d.analysis.LineOfSight.LineOfSightRootPlugin")],v);export{v as LineOfSightRootPlugin,d as createLineOfSightRootPluginConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../../analysis/LineOfSightAnalysisTarget.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,sync as r}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{updateLineOfSightItemFromIntersection as a,updateLineOfSightItemFromAuthoredPoint as l}from"./LineOfSightAuthoringUtils.js";import{lineOfSightPlacementLeafPluginMarker as p}from"./LineOfSightPlacementLeafPlugin.js";import{usesLineOfSightAuthoredAbsoluteHeight as u}from"./lineOfSightPlacementUtils.js";import{LineOfSightRayIntersector as c}from"./LineOfSightRayIntersector.js";import{PluginBase as h}from"../../../draw/plugins/PluginBase.js";var d,v;const g=Symbol("line-of-sight-target-vertex"),y=Symbol("line-of-sight-target-plugin-marker");let f=class extends h{constructor(){super(...arguments),this[d]=!0,this[v]=!0,this.target=null,this.elevationInfo=null,this.defaultCaptureMode="capture-always",this.inputMapPosition=null,this.preservedIntersection=null,this._interactiveHandle=null,this._intersector=null}static{d=y,v=p}initialize(){this._intersector=new c({view:this.view})}destroy(){this._intersector=i(this._intersector)}get usesAuthoredAbsoluteHeight(){return u(this._context,this._interactiveHandle)}start(t){super.start(t),this.preservedIntersection=null;const{positionOfLastUserInput:o,session:n}=t,p="grabbable-object"===this.defaultCaptureMode?this.inputMapPosition??this._interactiveHandle?.outputMapPosition??o:this.inputMapPosition??o;!p||"grabbable-object"!==this.defaultCaptureMode&&this._interactiveHandle||n.appendOrReplacePoint(g,p);let u="capture-always"===this.defaultCaptureMode&&null!=p;this._interactiveHandle&&this._clearCursorTarget(),this._interactiveHandle||(this._interactiveHandle=t.createInteractiveHandle({defaultCaptureMode:this.defaultCaptureMode,inputMapPosition:"grabbable-object"===this.defaultCaptureMode?p??void 0:void 0}),this.addHandles(s(()=>this._interactiveHandle?.outputMapPosition,t=>{if(!t||this._isComplete)return;const s=this.analysisViewData.cursorTarget??new e,r={elevationInfo:this.elevationInfo,usesAuthoredAbsoluteHeight:this.usesAuthoredAbsoluteHeight},o=this._interactiveHandle?.screenPosition,n=o&&this._intersector?this._intersector.getScreenPointIntersection(o):null;return this._session?.appendOrReplacePoint(g,t),u?(u=!1,void this._clearCursorTarget()):null!=n?(this.analysisViewData.cursorTarget=s,void a(this.view,s,n,{...r,snappedMapPoint:t})):null!=o&&null!=this.preservedIntersection?(this.analysisViewData.cursorTarget=s,void a(this.view,s,this.preservedIntersection,{...r,snappedMapPoint:t})):void(null==o&&this._intersector&&l(this.view,s,this._intersector,t,{...r,preservedIntersection:this.preservedIntersection})?this.analysisViewData.cursorTarget=s:this.analysisViewData.cursorTarget=i(this.analysisViewData.cursorTarget))},r),this._ownHandlesKey))}complete(){this._clearCursorTarget(),super.complete()}cancel(){this._clearCursorTarget()}_clearCursorTarget(){this.analysisViewData.cursorTarget=i(this.analysisViewData.cursorTarget)}};function m(t){return!!t&&y in t}function _(t){return{uniqueId:Symbol("line-of-sight-target-plugin"),kind:["vertex"],geometryType:"point",hidden:!0,localizationKey:"leaf-point-segment",icon:"point",create:()=>new f(t)}}t([o({constructOnly:!0})],f.prototype,"analysis",void 0),t([o({constructOnly:!0})],f.prototype,"analysisViewData",void 0),t([o({constructOnly:!0})],f.prototype,"view",void 0),t([o({constructOnly:!0})],f.prototype,"target",void 0),t([o({constructOnly:!0})],f.prototype,"elevationInfo",void 0),t([o()],f.prototype,"defaultCaptureMode",void 0),t([o()],f.prototype,"inputMapPosition",void 0),t([o()],f.prototype,"preservedIntersection",void 0),t([o()],f.prototype,"_interactiveHandle",void 0),t([o()],f.prototype,"_intersector",void 0),f=t([n("esri.views.3d.analysis.LineOfSight.LineOfSightTargetPlugin")],f);export{f as LineOfSightTargetPlugin,_ as createLineOfSightTargetPluginConfiguration,m as isLineOfSightTargetPlugin,y as lineOfSightTargetPluginMarker};
2
+ import{__decorate as t}from"tslib";import e from"../../../../analysis/LineOfSightAnalysisTarget.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as r,sync as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{updateLineOfSightItemFromIntersection as a,updateLineOfSightItemFromAuthoredPoint as l}from"./LineOfSightAuthoringUtils.js";import{lineOfSightPlacementLeafPluginMarker as p}from"./LineOfSightPlacementLeafPlugin.js";import{LineOfSightRayIntersector as c}from"./LineOfSightRayIntersector.js";import{PluginBase as u}from"../../../draw/plugins/PluginBase.js";var d,h;const v=Symbol("line-of-sight-target-vertex"),g=Symbol("line-of-sight-target-plugin-marker");let y=class extends u{constructor(){super(...arguments),this[d]=!0,this[h]=!0,this.target=null,this.elevationInfo=null,this.defaultCaptureMode="capture-always",this.inputMapPosition=null,this.preservedIntersection=null,this._interactiveHandle=null,this._intersector=null}static{d=g,h=p}initialize(){this._intersector=new c({view:this.view})}destroy(){this._intersector=i(this._intersector)}start(t){super.start(t),this.preservedIntersection=null;const{positionOfLastUserInput:o,session:n}=t,p="grabbable-object"===this.defaultCaptureMode?this.inputMapPosition??this._interactiveHandle?.outputMapPosition??o:this.inputMapPosition??o;!p||"grabbable-object"!==this.defaultCaptureMode&&this._interactiveHandle||n.appendOrReplacePoint(v,p);let c="capture-always"===this.defaultCaptureMode&&null!=p;this._interactiveHandle&&this._clearCursorTarget(),this._interactiveHandle||(this._interactiveHandle=t.createInteractiveHandle({defaultCaptureMode:this.defaultCaptureMode,inputMapPosition:"grabbable-object"===this.defaultCaptureMode?p??void 0:void 0}),this.addHandles(r(()=>this._interactiveHandle?.outputMapPosition,t=>{if(!t||this._isComplete)return;const r=this.analysisViewData.cursorTarget??new e,s={elevationInfo:this.elevationInfo},o=this._interactiveHandle?.screenPosition,n=o&&this._intersector?this._intersector.getScreenPointIntersection(o):null;return this._session?.appendOrReplacePoint(v,t),c?(c=!1,void this._clearCursorTarget()):null!=n?(this.analysisViewData.cursorTarget=r,void a(this.view,r,n,{...s,snappedMapPoint:t})):null!=o&&null!=this.preservedIntersection?(this.analysisViewData.cursorTarget=r,void a(this.view,r,this.preservedIntersection,{...s,snappedMapPoint:t})):void(null==o&&this._intersector&&l(this.view,r,this._intersector,t,{...s,preservedIntersection:this.preservedIntersection})?this.analysisViewData.cursorTarget=r:this.analysisViewData.cursorTarget=i(this.analysisViewData.cursorTarget))},s),this._ownHandlesKey))}complete(){this._clearCursorTarget(),super.complete()}cancel(){this._clearCursorTarget()}_clearCursorTarget(){this.analysisViewData.cursorTarget=i(this.analysisViewData.cursorTarget)}};function f(t){return!!t&&g in t}function m(t){return{uniqueId:Symbol("line-of-sight-target-plugin"),kind:["vertex"],geometryType:"point",hidden:!0,localizationKey:"leaf-point-segment",icon:"point",create:()=>new y(t)}}t([o({constructOnly:!0})],y.prototype,"analysis",void 0),t([o({constructOnly:!0})],y.prototype,"analysisViewData",void 0),t([o({constructOnly:!0})],y.prototype,"view",void 0),t([o({constructOnly:!0})],y.prototype,"target",void 0),t([o({constructOnly:!0})],y.prototype,"elevationInfo",void 0),t([o()],y.prototype,"defaultCaptureMode",void 0),t([o()],y.prototype,"inputMapPosition",void 0),t([o()],y.prototype,"preservedIntersection",void 0),t([o()],y.prototype,"_interactiveHandle",void 0),t([o()],y.prototype,"_intersector",void 0),y=t([n("esri.views.3d.analysis.LineOfSight.LineOfSightTargetPlugin")],y);export{y as LineOfSightTargetPlugin,m as createLineOfSightTargetPluginConfiguration,f as isLineOfSightTargetPlugin,g as lineOfSightTargetPluginMarker};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as t}from"../../../../core/reactiveUtils.js";import{LineOfSightDrawToolRenderer as o}from"./LineOfSightDrawToolRenderer.js";import{isLineOfSightPlacementLeafPlugin as i}from"./LineOfSightPlacementLeafPlugin.js";import{LineOfSightRayIntersector as r}from"./LineOfSightRayIntersector.js";import{DrawTool as a}from"../../../draw/DrawTool.js";import s from"../../../interactive/options/InteractiveToolOptions.js";import{createScreenPointFromEvent as l}from"../../../support/screenUtils.js";function p(p){const{analysis:c,analysisViewData:f,snappingManager:u,view:m,getVisible:d,getSourceElevationInfo:v,getSnapToSceneEnabled:g,onCancel:w,onComplete:b,onManipulatorCountChange:h,shouldPreventVertexAdd:I}=p,S=v(),j=new o({analysis:c,analysisViewData:f,view:m}),y=new r({view:m}),D=new a({elevationInfo:S,enableVertexVisuals:!1,hasZ:!0,renderer:j,toolOptions:new s({tooltips:{enabled:!0}}),snappingManager:u,view:m});return j.elevationInfo=S,D.addHandles([e(j),e(y),D.on("cancel",()=>w(D)),D.on("complete",()=>b(D)),n(()=>[D.surfaceManager,g()],([e,n])=>{e&&(e.snapToSceneEnabled=n)},t),n(()=>[d(),f.visible,v()],([e,n,t])=>{D.visible=e&&n,j.analysisVisible=D.visible,D.elevationInfo=t,j.elevationInfo=t,j.refresh()},t),n(()=>D.manipulators.length,()=>h(D),t),D.on(["before-vertex-add","before-vertex-add-at-point"],e=>{const n=e.detail.originalEvent;if("immediate-click"!==n?.type)return;const t=l(n);if(I(t,n.pointerType))return void e.preventDefault();const o=y.getScreenPointIntersection(t);if(null==o?.mapPoint)e.preventDefault();else{const e=D.mostDownstreamPlugin;i(e)&&(e.preservedIntersection=o)}})]),{drawTool:D,renderer:j}}function c(e,n){if(null!=e?.elevationConstraint)return!0;const t=n?.inputMapPosition,o=n?.selectedSnappingResult;return null!=t&&null!=o&&!t.equals(o)}export{p as createDrawTool,c as usesLineOfSightAuthoredAbsoluteHeight};
2
+ import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{LineOfSightDrawToolRenderer as t}from"./LineOfSightDrawToolRenderer.js";import{isLineOfSightPlacementLeafPlugin as i}from"./LineOfSightPlacementLeafPlugin.js";import{LineOfSightRayIntersector as r}from"./LineOfSightRayIntersector.js";import{DrawTool as a}from"../../../draw/DrawTool.js";import s from"../../../interactive/options/InteractiveToolOptions.js";import{createScreenPointFromEvent as l}from"../../../support/screenUtils.js";function p(p){const{analysis:c,analysisViewData:f,snappingManager:m,view:d,getVisible:v,getSourceElevationInfo:g,getSnapToSceneEnabled:u,onCancel:w,onComplete:b,onManipulatorCountChange:h,shouldPreventVertexAdd:I}=p,j=g(),y=new t({analysis:c,analysisViewData:f,view:d}),S=new r({view:d}),D=new a({elevationInfo:j,enableVertexVisuals:!1,hasZ:!0,renderer:y,toolOptions:new s({tooltips:{enabled:!0}}),snappingManager:m,view:d});return y.elevationInfo=j,D.addHandles([e(y),e(S),D.on("cancel",()=>w(D)),D.on("complete",()=>b(D)),n(()=>[D.surfaceManager,u()],([e,n])=>{e&&(e.snapToSceneEnabled=n)},o),n(()=>[v(),f.visible,g()],([e,n,o])=>{D.visible=e&&n,y.analysisVisible=D.visible,D.elevationInfo=o,y.elevationInfo=o,y.refresh()},o),n(()=>D.manipulators.length,()=>h(D),o),D.on(["before-vertex-add","before-vertex-add-at-point"],e=>{const n=e.detail.originalEvent;if("immediate-click"!==n?.type)return;const o=l(n);if(I(o,n.pointerType))return void e.preventDefault();const t=S.getScreenPointIntersection(o);if(null==t?.mapPoint)e.preventDefault();else{const e=D.mostDownstreamPlugin;i(e)&&(e.preservedIntersection=t)}})]),{drawTool:D,renderer:y}}export{p as createDrawTool};