@arcgis/core 4.31.0-next.20240819 → 4.31.0-next.20240821

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 (150) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{d2fa4d2887692a1ec9b1.js → 0553357f4cdf4deb13d0.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{b21db356f243d097ab3e.js → 122f3f294b8f95619f27.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{dc03a639c97a6f99dbc9.js → 1ac47b7a77818c372e1a.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{23a6700a3278d2cfcd75.js → 203cf58345df86caf4ca.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{a2c40517266fe420017c.js → 25fa59544c13db8cee30.js} +1 -1
  7. package/assets/esri/core/workers/chunks/29545cd255b763d393d0.js +1 -0
  8. package/assets/esri/core/workers/chunks/3f75b7ed24b440b4508a.js +1 -0
  9. package/assets/esri/core/workers/chunks/40e4224f700206c67053.js +1 -0
  10. package/assets/esri/core/workers/chunks/48ab5ce08a97e5dac709.js +1 -0
  11. package/assets/esri/core/workers/chunks/{56bb7b589a0c040263ff.js → 4f1d44ce2f68e2ec2b60.js} +1 -1
  12. package/assets/esri/core/workers/chunks/5429c2e1d2f159f332f9.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d8f416440963b77595e3.js → 58c476c8f6c274d77c0c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/5c4173205f885cd21422.js +1 -0
  15. package/assets/esri/core/workers/chunks/5cb07fa227b7fd06499f.js +1 -0
  16. package/assets/esri/core/workers/chunks/6f7c2d02fbd29870f6ee.js +1 -0
  17. package/assets/esri/core/workers/chunks/75ac4dfa3c8feeb82de2.js +1 -0
  18. package/assets/esri/core/workers/chunks/7fda3d3b211b6da5b0e5.js +1 -0
  19. package/assets/esri/core/workers/chunks/{1e7ce327435e0f4a4bec.js → 8224351edd777843180d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/949cbb667531527e6918.js +1 -0
  21. package/assets/esri/core/workers/chunks/{6e966c885e2ac9dff46b.js → 991295637f51e8207efe.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{252ff37bf5e12dae0b18.js → 9acc02df376d5bdfac87.js} +1 -1
  23. package/assets/esri/core/workers/chunks/9bbf7129579fe04ab268.js +1 -0
  24. package/assets/esri/core/workers/chunks/{492137ecf03ad2b2c2e3.js → a0fdb0fa96680ac758c0.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{3ab02b7660e751cffe1c.js → a4b0e6084971989c526b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/a6834f66d8da628c3fb2.js +1 -0
  27. package/assets/esri/core/workers/chunks/{238936d241e76c4c0343.js → ace8b6351ed35b03499b.js} +1 -1
  28. package/assets/esri/core/workers/chunks/b08689e5b0d1449877f5.js +1 -0
  29. package/assets/esri/core/workers/chunks/b686d70586623f7bf9a6.js +1 -0
  30. package/assets/esri/core/workers/chunks/b6dffcacd8b02384d6e2.js +1 -0
  31. package/assets/esri/core/workers/chunks/{bf7253f7e5d6d63333c3.js → b765a72c9d4f092855f5.js} +1 -1
  32. package/assets/esri/core/workers/chunks/b9490d5cc65cce2f2948.js +1 -0
  33. package/assets/esri/core/workers/chunks/{4706798c58398447d79f.js → bbd5477944da39234c30.js} +1 -1
  34. package/assets/esri/core/workers/chunks/cd8d595d577b74817623.js +1 -0
  35. package/assets/esri/core/workers/chunks/{145592dc516b86fbda63.js → cfc93bbd35cc4bfde7c0.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{48aeb087a1b10a8f4c0b.js → d5d70b3ecc0aca2ac184.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{a784222a7f9dc40ed67c.js → e2a6f77c05d0818e3f74.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{1ee365125c9fb9d9cafe.js → e5474bcde5b8fa037b56.js} +11 -11
  39. package/assets/esri/core/workers/chunks/{f7ab24d3dfc0ba9bf760.js → ea561b2460e634a643fc.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{cf7be98af841fadacf50.js → fc5129c825bc3c78b112.js} +1 -1
  41. package/chunks/BloomComposition.glsl.js +45 -0
  42. package/chunks/Centroid-DZi-eb9F.js +5 -0
  43. package/chunks/OperatorGeodesicBuffer.js +1 -1
  44. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  45. package/chunks/OperatorGeodeticDistance.js +5 -0
  46. package/chunks/OperatorProximity.js +5 -0
  47. package/chunks/OperatorShapePreservingDensify.js +1 -1
  48. package/chunks/Polyline.js +1 -1
  49. package/core/mathUtils.js +1 -1
  50. package/geometry/Mesh.js +1 -1
  51. package/geometry/operators/gx/operatorAutoComplete.js +5 -0
  52. package/geometry/operators/gx/operatorClip.js +1 -1
  53. package/geometry/operators/gx/operatorCut.js +1 -1
  54. package/geometry/operators/gx/operatorDensify.js +1 -1
  55. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  56. package/geometry/operators/gx/operatorGeodeticDensifyByLength.js +1 -1
  57. package/geometry/operators/gx/operatorGeodeticDistance.js +5 -0
  58. package/geometry/operators/gx/operatorIntersection.js +1 -1
  59. package/geometry/operators/gx/operatorLabelPoint.js +5 -0
  60. package/geometry/operators/gx/operatorOffset.js +5 -0
  61. package/geometry/operators/gx/operatorShapePreservingDensify.js +1 -1
  62. package/geometry/operators/gx/operatorSimplify.js +1 -1
  63. package/geometry/operators/gx/operatorUnion.js +1 -1
  64. package/geometry/operators/operatorAutoComplete.js +5 -0
  65. package/geometry/operators/operatorCentroid.js +5 -0
  66. package/geometry/operators/operatorContains.js +1 -1
  67. package/geometry/operators/operatorCrosses.js +1 -1
  68. package/geometry/operators/operatorCut.js +1 -1
  69. package/geometry/operators/operatorDensify.js +1 -1
  70. package/geometry/operators/operatorDifference.js +1 -1
  71. package/geometry/operators/operatorDisjoint.js +1 -1
  72. package/geometry/operators/operatorEquals.js +1 -1
  73. package/geometry/operators/operatorGeodesicBuffer.js +1 -1
  74. package/geometry/operators/operatorGeodeticDensifyByLength.js +1 -1
  75. package/geometry/operators/operatorGeodeticDistance.js +5 -0
  76. package/geometry/operators/operatorIntersection.js +1 -1
  77. package/geometry/operators/operatorIntersects.js +1 -1
  78. package/geometry/operators/operatorLabelPoint.js +5 -0
  79. package/geometry/operators/operatorOffset.js +5 -0
  80. package/geometry/operators/operatorOverlaps.js +1 -1
  81. package/geometry/operators/operatorProximity.js +5 -0
  82. package/geometry/operators/operatorRelate.js +1 -1
  83. package/geometry/operators/operatorReshape.js +5 -0
  84. package/geometry/operators/operatorShapePreservingDensify.js +1 -1
  85. package/geometry/operators/operatorTouches.js +1 -1
  86. package/geometry/operators/operatorWithin.js +1 -1
  87. package/geometry/operators/support/converterAPI.js +1 -1
  88. package/geometry/support/spatialReferenceUtils.js +1 -1
  89. package/geometry/support/webMercatorUtils.js +1 -1
  90. package/interfaces.d.ts +34 -6
  91. package/layers/LinkChartLayer.js +1 -1
  92. package/layers/OrientedImageryLayer.js +1 -1
  93. package/layers/graphics/sources/geojson/geojson.js +1 -1
  94. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  95. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  96. package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
  97. package/layers/knowledgeGraph/layerUtils.js +1 -1
  98. package/layers/mixins/operationalLayers.js +1 -1
  99. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
  100. package/layers/orientedImagery/core/utils.js +1 -1
  101. package/layers/support/layersCreator.js +1 -1
  102. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  103. package/package.json +1 -1
  104. package/portal/PortalItem.js +1 -1
  105. package/portal/schemas/definitions.js +1 -1
  106. package/rest/versionManagement/gdbVersion/differences.js +5 -0
  107. package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +5 -0
  108. package/rest/versionManagement/gdbVersion/support/DifferencesResult.js +5 -0
  109. package/smartMapping/statistics/support/utils.js +1 -1
  110. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  111. package/support/revision.js +1 -1
  112. package/symbols/cim/cimAnalyzer.js +1 -1
  113. package/symbols/support/utils.js +1 -1
  114. package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
  115. package/views/2d/layers/features/Processor.js +1 -1
  116. package/views/2d/layers/features/RenderState.js +1 -1
  117. package/views/2d/support/highlightGroupUtils.js +1 -1
  118. package/views/2d/tiling/LODInfo.js +1 -1
  119. package/views/2d/tiling/TileKey.js +1 -1
  120. package/views/3d/state/ViewStateManager.js +1 -1
  121. package/views/3d/support/cameraUtils.js +1 -1
  122. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  123. package/views/3d/support/viewpointUtils.js +1 -1
  124. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
  125. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +5 -0
  126. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +5 -0
  127. package/views/3d/webgl-engine/effects/bloom/BloomTechnique.js +5 -0
  128. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  129. package/widgets/OrientedImageryViewer.js +1 -1
  130. package/assets/esri/core/workers/chunks/0c6411a08d8b40fc7f4c.js +0 -1
  131. package/assets/esri/core/workers/chunks/22128034bf3b5aa713fc.js +0 -1
  132. package/assets/esri/core/workers/chunks/2dddb8a989b9c96572fe.js +0 -1
  133. package/assets/esri/core/workers/chunks/31f931de94414f13bd13.js +0 -1
  134. package/assets/esri/core/workers/chunks/370dd36904acad113842.js +0 -1
  135. package/assets/esri/core/workers/chunks/5f93a59c92f464925f9c.js +0 -1
  136. package/assets/esri/core/workers/chunks/6a04b6c7a5ec2389a768.js +0 -1
  137. package/assets/esri/core/workers/chunks/6f1853ab502bebefd3c3.js +0 -1
  138. package/assets/esri/core/workers/chunks/8a37c5b110665c8ff5a7.js +0 -1
  139. package/assets/esri/core/workers/chunks/945a3cc2191606f3a917.js +0 -1
  140. package/assets/esri/core/workers/chunks/9661398ce832137461f6.js +0 -1
  141. package/assets/esri/core/workers/chunks/b09bc516b7a7bf5a44a8.js +0 -1
  142. package/assets/esri/core/workers/chunks/b370dae404d8ff733a54.js +0 -1
  143. package/assets/esri/core/workers/chunks/c2ba052733e8ccae82e1.js +0 -1
  144. package/assets/esri/core/workers/chunks/d7d2552ff3e2d44319c7.js +0 -1
  145. package/assets/esri/core/workers/chunks/f2c3b68f00f88700e698.js +0 -1
  146. package/assets/esri/core/workers/chunks/f4d9689194d8d2547bb1.js +0 -1
  147. package/assets/esri/core/workers/chunks/f91b811fa044a01b6bb3.js +0 -1
  148. package/chunks/SimpleGeometryCursor.js +0 -5
  149. package/geometry/operators/support/cursorUtils.js +0 -5
  150. package/views/2d/layers/features/support/tileUtils.js +0 -5
package/core/mathUtils.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{l as t,s as n}from"../chunks/vec32.js";const r=new Float32Array(1);function u(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function e(t,n,r){return Math.min(Math.max(t,n),r)}function i(t,n){return 0===n?0:Math.round(t/n)*n}function a(t){return!(t&t-1)}function o(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}function c(t){return 10**Math.ceil(Math.LOG10E*Math.log(t))}function f(t,n,r){return t+(n-t)*r}function s(t,n,r,u,e){return f(u,e,(t-n)/(r-n))}function h(t){return t*Math.PI/180}function M(t){return 180*t/Math.PI}function b(t,n=1e-6){return(t<0?-1:1)/Math.max(Math.abs(t),n)}function m(t){return Math.acos(e(t,-1,1))}function l(t){return Math.asin(e(t,-1,1))}function F(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;return(t>n?t-n:n-t)<=r}const N=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function g(t){return N.setFloat64(0,t),N.getBigInt64(0)}function E(t){return N.setBigInt64(0,t),N.getFloat64(0)}const B=BigInt("1000000"),I=w(1);function w(t){const n=g(t=Math.abs(t)),r=E(n<=B?B:n-B);return Math.abs(t-r)}function x(t,n,r=I){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=r){if(w(Math.min(Math.abs(t),Math.abs(n)))<r)return Math.abs(t-n)<=r}const u=g(t),e=g(n);if(u<0!=e<0)return!1;return!((u<e?e-u:u-e)>B)}function y(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;const u=Math.abs(t-n),e=Math.abs(t),i=Math.abs(n);if(0===t||0===n||e<1e-12&&i<1e-12){if(u>.01*r)return!1}else if(u/(e+i)>r)return!1;return!0}function A(t){return P(Math.max(-j,Math.min(t,j)))}function P(t){return r[0]=t,r[0]}function p(t,n,r){const u=e((r-t)/(n-t),0,1);return u*u*(3-2*u)}function L(r,u){const e=t(r),i=l(r[2]/e),a=Math.atan2(r[1]/e,r[0]/e);return n(u,e,i,a),u}function T(t,r){const u=t[0],e=t[1],i=t[2],a=Math.cos(e);n(r,u*a*Math.cos(i),u*a*Math.sin(i),u*Math.sin(e))}function _(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],u=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(F(n,1)&&F(r,1)&&F(u,1))}function d(t,n){return(t%n+n)%n}const j=P(34028234663852886e22);export{m as acosClamped,l as asinClamped,L as cartesianToSpherical,e as clamp,A as clampFloat32,h as deg2rad,F as floatEqualAbsolute,y as floatEqualRelative,x as floatEqualUlp,_ as hasScaling,a as isPowerOfTwo,f as lerp,d as moduloPositive,c as nextHighestPowerOfTen,u as nextHighestPowerOfTwo,o as nextPowerOfTwo,j as numberMaxFloat32,M as rad2deg,b as reciprocalClamped,i as roundToNearest,s as scale,p as smoothstep,T as sphericalToCartesian};
5
+ import{l as t,s as n}from"../chunks/vec32.js";const r=new Float32Array(1);function u(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function e(t,n,r){return Math.min(Math.max(t,n),r)}function i(t,n){return 0===n?0:Math.round(t/n)*n}function a(t){return!(t&t-1)}function o(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}function c(t){return 10**Math.ceil(Math.LOG10E*Math.log(t))}function f(t,n,r){return t+(n-t)*r}function s(t,n){const r=-t*t/(2*n);return 1/Math.sqrt(2*Math.PI*n)*Math.exp(r)}function h(t,n,r,u,e){return f(u,e,(t-n)/(r-n))}function M(t){return t*Math.PI/180}function b(t){return 180*t/Math.PI}function m(t,n=1e-6){return(t<0?-1:1)/Math.max(Math.abs(t),n)}function l(t){return Math.acos(e(t,-1,1))}function F(t){return Math.asin(e(t,-1,1))}function N(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;return(t>n?t-n:n-t)<=r}const g=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return g.setFloat64(0,t),g.getBigInt64(0)}function I(t){return g.setBigInt64(0,t),g.getFloat64(0)}const x=BigInt("1000000"),B=w(1);function w(t){const n=E(t=Math.abs(t)),r=I(n<=x?x:n-x);return Math.abs(t-r)}function P(t,n,r=B){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=r){if(w(Math.min(Math.abs(t),Math.abs(n)))<r)return Math.abs(t-n)<=r}const u=E(t),e=E(n);if(u<0!=e<0)return!1;return!((u<e?e-u:u-e)>x)}function p(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;const u=Math.abs(t-n),e=Math.abs(t),i=Math.abs(n);if(0===t||0===n||e<1e-12&&i<1e-12){if(u>.01*r)return!1}else if(u/(e+i)>r)return!1;return!0}function y(t){return A(Math.max(-k,Math.min(t,k)))}function A(t){return r[0]=t,r[0]}function L(t,n,r){const u=e((r-t)/(n-t),0,1);return u*u*(3-2*u)}function T(r,u){const e=t(r),i=F(r[2]/e),a=Math.atan2(r[1]/e,r[0]/e);return n(u,e,i,a),u}function _(t,r){const u=t[0],e=t[1],i=t[2],a=Math.cos(e);n(r,u*a*Math.cos(i),u*a*Math.sin(i),u*Math.sin(e))}function d(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],u=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(N(n,1)&&N(r,1)&&N(u,1))}function j(t,n){return(t%n+n)%n}const k=A(34028234663852886e22);export{l as acosClamped,F as asinClamped,T as cartesianToSpherical,e as clamp,y as clampFloat32,M as deg2rad,N as floatEqualAbsolute,p as floatEqualRelative,P as floatEqualUlp,s as gauss,d as hasScaling,a as isPowerOfTwo,f as lerp,j as moduloPositive,c as nextHighestPowerOfTen,u as nextHighestPowerOfTwo,o as nextPowerOfTwo,k as numberMaxFloat32,b as rad2deg,m as reciprocalClamped,i as roundToNearest,h as scale,L as smoothstep,_ as sphericalToCartesian};
package/geometry/Mesh.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedFunction as t}from"../core/deprecate.js";import r from"../core/Error.js";import o from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{throwIfAborted as i,whenOrAbort as a}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{fromValues as l}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"./Extent.js";import u from"./Geometry.js";import f from"./Point.js";import d from"./Polygon.js";import{composeAxes as x,create as y}from"./support/axisAngleDegrees.js";import v from"./support/MeshComponent.js";import{componentNotFoundMessage as g,meshNotLoadedMessage as j,invalidLocationMessage as w,invalidPolygonMessage as S,InvalidLocationError as b}from"./support/meshErrors.js";import A from"./support/MeshGeoreferencedVertexSpace.js";import M from"./support/MeshLocalVertexSpace.js";import L from"./support/MeshTransform.js";import{MeshVertexAttributes as F}from"./support/MeshVertexAttributes.js";import{isRelativeVertexSpace as R,vertexSpaceOriginToPoint as U,selectVertexSpace as _}from"./support/meshVertexSpaceUtils.js";import{triangulate as C}from"./support/triangulationUtils.js";import{getExtentFromBounds as E,getExtentFromPositions as P,getBoundsFromPositions as G}from"./support/meshUtils/bounds.js";import{centerAt as k}from"./support/meshUtils/centerAt.js";import{loadExternal as z}from"./support/meshUtils/loadExternal.js";import{Metadata as B}from"./support/meshUtils/Metadata.js";import{convertUnitGeometry as I,createUnitSizeBox as T,extractSingleFaceOfBox as V,createUnitSizeSphere as O,createUnitSizeCylinder as D,convertPlaneSizeParameter as N,createUnitSizePlane as W}from"./support/meshUtils/primitives.js";import{rotate as Z}from"./support/meshUtils/rotate.js";import{scale as q}from"./support/meshUtils/scale.js";var H;const K="esri.geometry.Mesh";function J(){return s.getLogger(K)}const Q={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A,local:M}};let X=H=class extends(o.LoadableMixin(n(u))){constructor(e){super(e),this.components=null,this.vertexSpace=new A,this.transform=null,this.metadata=new B,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new F,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles(c((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:o}=this,s=r.position;if(0===s.length||e&&0===e.length)return new h({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if(R(o)){const{_untransformedBounds:e,transform:r}=this;return E(e,r,o,t)}return P(s,t)}get _untransformedBounds(){return G(this.vertexAttributes.position)}get origin(){const e=U(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new f({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(v.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}J().error("removeComponent()",g)}}rotate(e,t,r,o){return x(e,t,r,Y),Z(this,Y,o),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:o,vertexAttributes:s}=this,n=s?.position;if(!n)return this;if(R(o)){const[s,n,i]=o.origin;o.origin=l(s+e,n+t,i+r)}else{for(let o=0;o<n.length;o+=3)n[o]+=e,n[o+1]+=t,n[o+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(q(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(k(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(z(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneAndModifyVertexAttributes(this.vertexAttributes.clone(),this.vertexSpace.clone())}cloneAndModifyVertexAttributes(e,t){let r=null;if(this.components){const e=new Map,t=new Map;r=this.components.map((r=>r.cloneWithDeduplication(e,t)))}const o={components:r,spatialReference:this.spatialReference,vertexAttributes:e,vertexSpace:t,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new H(o)}cloneShallow(){return new H({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([import("./support/meshUtils/exporters/gltf/gltfexport.js"),this.load(e)]);return i(e),await t(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(J().error(e,j),!1)}static createBox(e,t){if(!(e instanceof f))return J().error(".createBox()",w),null;const r=new H(I(T(),e,t));return t?.imageFace&&"all"!==t.imageFace?V(r,t.imageFace):r}static createSphere(e,t){return e instanceof f?new H(I(O(t?.densificationFactor||0),e,t)):(J().error(".createSphere()",w),null)}static createCylinder(e,t){return e instanceof f?new H(I(D(t?.densificationFactor||0),e,t)):(J().error(".createCylinder()",w),null)}static createPlane(e,t){if(!(e instanceof f))return J().error(".createPlane()",w),null;const r=t?.facing??"up",o=N(r,t?.size);return new H(I(W(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof d))return J().error(".createFromPolygon()",S),null;const r=C(e);return new H({vertexAttributes:new F({position:r.position}),components:[new v({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A})}static async createFromGLTF(e,t,r){if(!(e instanceof f)){const e=new b;throw J().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await a(import("./support/meshUtils/loadGLTFMesh.js"),r);return new H(await o(e,t,r))}static async createFromFiles(e,o,s){t(J(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"});const n=e=>J().error(".createFromFiles()",e.message);if(!(e instanceof f)){const e=new b;throw n(e),e}if(!s?.layer)throw new r("invalid:no-layer","SceneLayer required for file to mesh conversion.");return s.layer.convertMesh(o,{location:e,...s})}static createWithExternalSource(e,t,r){const o=r?.extent??null,{spatialReference:s}=e,n=r?.transform?.clone()??new L,i=_(e,r),a={source:t,extent:o},c=new B;return c.externalSources.push(a),new H({metadata:c,transform:n,vertexSpace:i,spatialReference:s})}static createIncomplete(e,t){const{spatialReference:o}=e,s=t?.transform?.clone()??new L,n=_(e,t),i=new H({transform:s,vertexSpace:n,spatialReference:o});return i.addResolvingPromise(Promise.reject(new r("mesh-incomplete","Mesh resources are not complete"))),i}};e([p({type:[v],json:{write:!0}})],X.prototype,"components",void 0),e([p({nonNullable:!0,types:Q,constructOnly:!0,json:{write:!0}})],X.prototype,"vertexSpace",void 0),e([p({type:L,json:{write:!0}})],X.prototype,"transform",void 0),e([p({constructOnly:!0})],X.prototype,"metadata",void 0),e([p()],X.prototype,"hasExtent",null),e([p()],X.prototype,"_transformedExtent",null),e([p()],X.prototype,"_untransformedBounds",null),e([p()],X.prototype,"origin",null),e([p({readOnly:!0,json:{read:!1}})],X.prototype,"extent",null),e([p({readOnly:!0,json:{read:!1,write:!0,default:!0}})],X.prototype,"hasZ",void 0),e([p({readOnly:!0,json:{read:!1,write:!0,default:!1}})],X.prototype,"hasM",void 0),e([p({type:F,nonNullable:!0,json:{write:!0}})],X.prototype,"vertexAttributes",void 0),X=H=e([m(K)],X);const Y=y(),$=X;export{$ as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedFunction as t}from"../core/deprecate.js";import r from"../core/Error.js";import o from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{throwIfAborted as i,whenOrAbort as a}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{fromValues as l}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"./Extent.js";import u from"./Geometry.js";import f from"./Point.js";import d from"./Polygon.js";import{composeAxes as x,create as y}from"./support/axisAngleDegrees.js";import v from"./support/MeshComponent.js";import{componentNotFoundMessage as g,meshNotLoadedMessage as j,invalidLocationMessage as w,invalidPolygonMessage as S,InvalidLocationError as b}from"./support/meshErrors.js";import A from"./support/MeshGeoreferencedVertexSpace.js";import M from"./support/MeshLocalVertexSpace.js";import L from"./support/MeshTransform.js";import{MeshVertexAttributes as F}from"./support/MeshVertexAttributes.js";import{isRelativeVertexSpace as R,vertexSpaceOriginToPoint as U,selectVertexSpace as _}from"./support/meshVertexSpaceUtils.js";import{triangulate as C}from"./support/triangulationUtils.js";import{getExtentFromBounds as E,getExtentFromPositions as P,getBoundsFromPositions as G}from"./support/meshUtils/bounds.js";import{centerAt as k}from"./support/meshUtils/centerAt.js";import{loadExternal as z}from"./support/meshUtils/loadExternal.js";import{Metadata as B}from"./support/meshUtils/Metadata.js";import{convertUnitGeometry as I,createUnitSizeBox as T,extractSingleFaceOfBox as V,createUnitSizeSphere as O,createUnitSizeCylinder as D,convertPlaneSizeParameter as N,createUnitSizePlane as W}from"./support/meshUtils/primitives.js";import{rotate as Z}from"./support/meshUtils/rotate.js";import{scale as q}from"./support/meshUtils/scale.js";var H;const K="esri.geometry.Mesh";function J(){return s.getLogger(K)}const Q={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A,local:M}};let X=H=class extends(o.LoadableMixin(n(u))){constructor(e){super(e),this.components=null,this.vertexSpace=new A,this.transform=null,this.metadata=new B,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new F,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles(c((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:o}=this,s=r.position;if(0===s.length||e&&0===e.length)return new h({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if(R(o)){const{_untransformedBounds:e,transform:r}=this;return E(e,r,o,t)}return P(s,t)}get _untransformedBounds(){return G(this.vertexAttributes.position)}get origin(){const e=U(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new f({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(v.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}J().error("removeComponent()",g)}}rotate(e,t,r,o){return x(e,t,r,Y),Z(this,Y,o),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:o,vertexAttributes:s}=this,n=s?.position;if(!n)return this;if(R(o)){const[s,n,i]=o.origin;o.origin=l(s+e,n+t,i+r)}else{for(let o=0;o<n.length;o+=3)n[o]+=e,n[o+1]+=t,n[o+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(q(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(k(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(z(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneAndModifyVertexAttributes(this.vertexAttributes.clone(),this.vertexSpace.clone(),{preserveMetadata:!0})}cloneAndModifyVertexAttributes(e,t,r){let o=null;if(this.components){const e=new Map,t=new Map;o=this.components.map((r=>r.cloneWithDeduplication(e,t)))}const s={components:o,spatialReference:this.spatialReference,vertexAttributes:e,vertexSpace:t,transform:this.transform?.clone()??null,metadata:r?.preserveMetadata?this.metadata.clone():new B};return new H(s)}cloneShallow(){return new H({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([import("./support/meshUtils/exporters/gltf/gltfexport.js"),this.load(e)]);return i(e),await t(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(J().error(e,j),!1)}static createBox(e,t){if(!(e instanceof f))return J().error(".createBox()",w),null;const r=new H(I(T(),e,t));return t?.imageFace&&"all"!==t.imageFace?V(r,t.imageFace):r}static createSphere(e,t){return e instanceof f?new H(I(O(t?.densificationFactor||0),e,t)):(J().error(".createSphere()",w),null)}static createCylinder(e,t){return e instanceof f?new H(I(D(t?.densificationFactor||0),e,t)):(J().error(".createCylinder()",w),null)}static createPlane(e,t){if(!(e instanceof f))return J().error(".createPlane()",w),null;const r=t?.facing??"up",o=N(r,t?.size);return new H(I(W(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof d))return J().error(".createFromPolygon()",S),null;const r=C(e);return new H({vertexAttributes:new F({position:r.position}),components:[new v({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A})}static async createFromGLTF(e,t,r){if(!(e instanceof f)){const e=new b;throw J().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await a(import("./support/meshUtils/loadGLTFMesh.js"),r);return new H(await o(e,t,r))}static async createFromFiles(e,o,s){t(J(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"});const n=e=>J().error(".createFromFiles()",e.message);if(!(e instanceof f)){const e=new b;throw n(e),e}if(!s?.layer)throw new r("invalid:no-layer","SceneLayer required for file to mesh conversion.");return s.layer.convertMesh(o,{location:e,...s})}static createWithExternalSource(e,t,r){const o=r?.extent??null,{spatialReference:s}=e,n=r?.transform?.clone()??new L,i=_(e,r),a={source:t,extent:o},c=new B;return c.externalSources.push(a),new H({metadata:c,transform:n,vertexSpace:i,spatialReference:s})}static createIncomplete(e,t){const{spatialReference:o}=e,s=t?.transform?.clone()??new L,n=_(e,t),i=new H({transform:s,vertexSpace:n,spatialReference:o});return i.addResolvingPromise(Promise.reject(new r("mesh-incomplete","Mesh resources are not complete"))),i}};e([p({type:[v],json:{write:!0}})],X.prototype,"components",void 0),e([p({nonNullable:!0,types:Q,constructOnly:!0,json:{write:!0}})],X.prototype,"vertexSpace",void 0),e([p({type:L,json:{write:!0}})],X.prototype,"transform",void 0),e([p({constructOnly:!0})],X.prototype,"metadata",void 0),e([p()],X.prototype,"hasExtent",null),e([p()],X.prototype,"_transformedExtent",null),e([p()],X.prototype,"_untransformedBounds",null),e([p()],X.prototype,"origin",null),e([p({readOnly:!0,json:{read:!1}})],X.prototype,"extent",null),e([p({readOnly:!0,json:{read:!1,write:!0,default:!0}})],X.prototype,"hasZ",void 0),e([p({readOnly:!0,json:{read:!1,write:!0,default:!1}})],X.prototype,"hasM",void 0),e([p({type:F,nonNullable:!0,json:{write:!0}})],X.prototype,"vertexAttributes",void 0),X=H=e([m(K)],X);const Y=y(),$=X;export{$ as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{v as e,w as t,o as r,a1 as s,G as n,aB as o,aC as l,D as u,aD as i,S as m}from"../../../chunks/Polyline.js";class a{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(t,r,s,n){const o=(new e).executeMany(t,s,n);return new y(o,r,s,n)}}class y extends t{constructor(e,t,r,s){super(),this.m_resultPolygons=null,this.m_polygons=e,this.m_polylines=t,this.m_sr=r,this.m_progressTracker=s,this.m_bFirst=!0}tock(){return!0}getRank(){return 1}next(){return this.m_bFirst&&(this.performOperation(),this.m_bFirst=!1),this.m_resultPolygons?this.m_resultPolygons.next():null}getGeometryID(){return null!=this.m_resultPolygons?this.m_resultPolygons.getGeometryID():-1}performOperation(){const e=new r,t=new s;let m,a=o;for(;m=this.m_polylines.next();){if(m.getGeometryType()!==n.enumPolyline||m.isEmpty())continue;a===o?a=t.addGeometry(m):t.appendGeometry(a,m);const s=new r;m.queryEnvelope(s),e.mergeEnvelope2D(s)}if(0===t.getTotalPointCount())return;for(;m=this.m_polygons.next();){if(!l(m.getGeometryType())||m.isEmpty())continue;const s=new r;m.queryEnvelope(s),e.mergeEnvelope2D(s),t.addGeometry(m)}const y=u(this.m_sr,e,!0);this.m_resultPolygons=i(t,a,y,this.m_progressTracker)}}const p=new a;function c(e,t,r){const s=p.execute(new m(e),new m(t),r,null);return Array.from(s)}function g(){return p.supportsCurves()}export{c as execute,g as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{O as n}from"../../../chunks/Polyline.js";import{arrayToCursor as r,cursorToArray as t}from"../support/cursorUtils.js";const u=new n;function o(n,r,t){return u.execute(n,r,t,null)}function e(n,o,e){const s=u.executeMany(r(n),o,e,null);return t(s)}function s(){return u.supportsCurves()}export{o as execute,e as executeMany,s as supportsCurves};
5
+ import{S as n,O as e}from"../../../chunks/Polyline.js";const r=new e;function t(n,e,t){return r.execute(n,e,t,null)}function u(e,t,u){const o=r.executeMany(new n(e),t,u,null);return Array.from(o)}function o(){return r.supportsCurves()}export{t as execute,u as executeMany,o as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{b as t,ag as e,x as s,G as n,ah as r,a as o,ai as u,V as i,aj as c,ak as m,al as a,am as l,an as h,ao as d,ap as y}from"../../../chunks/Polyline.js";import{cursorToArray as p}from"../support/cursorUtils.js";var _=y;function g(t,e){return{m_geometry:t,m_side:e}}function f(t,e,s,n,r,o){if(e.isEmpty()){const t=g(e,0);return void r.push(t)}if(s.isEmpty()){const t=g(e,0);return void r.push(t)}const u=[],h=new i;{const i=h.createGeometryUserIndex(),y=h.addGeometry(e),p=h.addGeometry(s),f=new d(o);let C=0,E=null;if(h.hasCurves()){E=new _;const t=h.getEnvelope2D(o);C=c(n.total());const e=m(n.total(),t);a(h,e,n.total(),12e3,E,null,o)}h.dbgVerifyCurves(),f.setEditShapeCrackAndCluster(h,n),f.cut(t,i,y,p,u);for(const t of u){null!==E&&E.stitchCurves(h,t,C,!1);const e=g(h.getGeometry(t),l(h.getGeometryUserIndex(t,i)));r.push(e)}null!==E&&E.clearStitcher(h)}}function C(t,e,s,n,r,u){if(e.isEmpty()){const t=g(e,0);return void r.push(t)}if(s.isEmpty()){const t=g(e,0);return void r.push(t)}const l=[],y=new i;{const t=y.createGeometryUserIndex(),p=y.addGeometry(e),f=y.addGeometry(s),C=new d(u);let E=0,G=null;if(y.hasCurves()){G=new _;const t=y.getEnvelope2D(u);E=c(n.total());const e=m(n.total(),t);a(y,e,n.total(),12e3,G,null,u)}y.dbgVerifyCurves(),C.setEditShapeCrackAndCluster(y,n),C.cut(!1,t,p,f,l),null!==G&&G.stitchCurves(y,h,E,!0);let v=y.getGeometry(p);const w=new o,x=new o,k=[];for(let e=0;e<l.length;e++){let s=null;{const r=new i,o=r.addGeometry(v),d=r.addGeometry(y.getGeometry(l[e]));if(r.hasCurves()){const t=r.getEnvelope2D(u);E=c(n.total());const e=m(n.total(),t);a(r,e,n.total(),12e3,G,null,u)}C.setEditShapeCrackAndCluster(r,n);const p=C.intersection(o,d);if(null!==G&&G.stitchCurves(r,h,E,!0),s=r.getGeometry(p),s.isEmpty())continue;const _=y.getGeometryUserIndex(l[e],t);2===_?w.add(s,!1):1===_?x.add(s,!1):k.push(s)}{const t=new i,s=t.addGeometry(v),r=t.addGeometry(y.getGeometry(l[e]));if(t.hasCurves()){const e=t.getEnvelope2D(u);E=c(n.total());const s=m(n.total(),e);a(t,s,n.total(),12e3,G,null,u)}C.setEditShapeCrackAndCluster(t,n);const o=C.difference(s,r);null!==G&&G.stitchCurves(t,h,E,!0);v=t.getGeometry(o)}}if(!v.isEmpty()&&l.length>0&&k.push(v),w.isEmpty()&&x.isEmpty())return;if(!w.isEmpty()){const t=g(w,1);r.push(t)}if(!x.isEmpty()){const t=g(x,2);r.push(t)}for(let e=0,s=k.length;e<s;++e){const t=g(k[e],3);r.push(t)}}}class E{getOperatorType(){return 10005}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}execute(t,e,s,n,r){return new G(t,e,s,n,r)}}class G{constructor(n,r,o,u,i){this.m_cutIndex=-1,this.m_cuts=[],this.m_progressTracker=i,this.m_cuttee=r.clone(),this.m_cutter=new t({copy:o}),this.m_bConsiderTouch=n;const c=e(r,o);this.m_tolerance=s(u,c,!0)}next(){return-1===this.m_cutIndex&&this.generateCuts(),++this.m_cutIndex<this.m_cuts.length?this.m_cuts[this.m_cutIndex]:null}getGeometryID(){return 0}tock(){return!0}getRank(){return 1}generateCuts(){switch(this.m_cuttee.getGeometryType()){case n.enumPolyline:this.generatePolylineCuts();break;case n.enumPolygon:this.generatePolygonCuts()}}generatePolylineCuts(){const e=new t,s=new t,n=new t;this.m_cuts.length=0,this.m_cuts.push(e),this.m_cuts.push(s);const o=[];f(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,o,this.m_progressTracker);for(let t=0;t<o.length;t++){const u=o[t];1===u.m_side?e.add(u.m_geometry,!1):2===u.m_side||4===u.m_side?s.add(u.m_geometry,!1):3===u.m_side?this.m_cuts.push(u.m_geometry):0===u.m_side?n.add(u.m_geometry,!1):r("")}n.isEmpty()||e.isEmpty()&&s.isEmpty()&&!(this.m_cuts.length>=3)||this.m_cuts.push(n),e.isEmpty()&&s.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}generatePolygonCuts(){const t=new o,e=new o,s=new o;this.m_cuts.length=0,this.m_cuts.push(t),this.m_cuts.push(e);const n=[];C(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,n,this.m_progressTracker);for(let o=0;o<n.length;o++){const u=n[o];1===u.m_side?t.add(u.m_geometry,!1):2===u.m_side?e.add(u.m_geometry,!1):3===u.m_side?this.m_cuts.push(u.m_geometry):0===u.m_side?s.add(u.m_geometry,!1):r("")}u(s.isEmpty()||1===n.length),t.isEmpty()&&e.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}}const v=new E;function w(t,e,s){const n=v.execute(!0,t,e,s,null);return p(n)}function x(){return v.supportsCurves()}export{w as execute,x as supportsCurves};
5
+ import{w as t,b as e,aG as s,D as n,G as r,t as o,a as u,s as c,a1 as i,aH as m,aI as a,aJ as l,aK as h,aL as d,aB as y,aM as p}from"../../../chunks/Polyline.js";var _=p;function g(t,e){return{m_geometry:t,m_side:e}}function f(t,e,s,n,r,o){if(e.isEmpty()){const t=g(e,0);return void r.push(t)}if(s.isEmpty()){const t=g(e,0);return void r.push(t)}const u=[],c=new i;{const i=c.createGeometryUserIndex(),y=c.addGeometry(e),p=c.addGeometry(s),f=new m(o);let C=0,E=null;if(c.hasCurves()){E=new _;const t=c.getEnvelope2D(o);C=a(n.total());const e=l(n.total(),t);h(c,e,n.total(),12e3,E,null,o)}c.dbgVerifyCurves(),f.setEditShapeCrackAndCluster(c,n),f.cut(t,i,y,p,u);for(const t of u){null!==E&&E.stitchCurves(c,t,C,!1);const e=g(c.getGeometry(t),d(c.getGeometryUserIndex(t,i)));r.push(e)}null!==E&&E.clearStitcher(c)}}function C(t,e,s,n,r,o){if(e.isEmpty()){const t=g(e,0);return void r.push(t)}if(s.isEmpty()){const t=g(e,0);return void r.push(t)}const c=[],d=new i;{const t=d.createGeometryUserIndex(),p=d.addGeometry(e),f=d.addGeometry(s),C=new m(o);let E=0,G=null;if(d.hasCurves()){G=new _;const t=d.getEnvelope2D(o);E=a(n.total());const e=l(n.total(),t);h(d,e,n.total(),12e3,G,null,o)}d.dbgVerifyCurves(),C.setEditShapeCrackAndCluster(d,n),C.cut(!1,t,p,f,c),null!==G&&G.stitchCurves(d,y,E,!0);let v=d.getGeometry(p);const w=new u,x=new u,k=[];for(let e=0;e<c.length;e++){let s=null;{const r=new i,u=r.addGeometry(v),m=r.addGeometry(d.getGeometry(c[e]));if(r.hasCurves()){const t=r.getEnvelope2D(o);E=a(n.total());const e=l(n.total(),t);h(r,e,n.total(),12e3,G,null,o)}C.setEditShapeCrackAndCluster(r,n);const p=C.intersection(u,m);if(null!==G&&G.stitchCurves(r,y,E,!0),s=r.getGeometry(p),s.isEmpty())continue;const _=d.getGeometryUserIndex(c[e],t);2===_?w.add(s,!1):1===_?x.add(s,!1):k.push(s)}{const t=new i,s=t.addGeometry(v),r=t.addGeometry(d.getGeometry(c[e]));if(t.hasCurves()){const e=t.getEnvelope2D(o);E=a(n.total());const s=l(n.total(),e);h(t,s,n.total(),12e3,G,null,o)}C.setEditShapeCrackAndCluster(t,n);const u=C.difference(s,r);null!==G&&G.stitchCurves(t,y,E,!0);v=t.getGeometry(u)}}if(!v.isEmpty()&&c.length>0&&k.push(v),w.isEmpty()&&x.isEmpty())return;if(!w.isEmpty()){const t=g(w,1);r.push(t)}if(!x.isEmpty()){const t=g(x,2);r.push(t)}for(let e=0,s=k.length;e<s;++e){const t=g(k[e],3);r.push(t)}}}class E{getOperatorType(){return 10005}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}execute(t,e,s,n,r){return new G(t,e,s,n,r)}}class G extends t{constructor(t,r,o,u,c){super(),this.m_cutIndex=-1,this.m_cuts=[],this.m_progressTracker=c,this.m_cuttee=r.clone(),this.m_cutter=new e({copy:o}),this.m_bConsiderTouch=t;const i=s(r,o);this.m_tolerance=n(u,i,!0)}next(){return-1===this.m_cutIndex&&this.generateCuts(),++this.m_cutIndex<this.m_cuts.length?this.m_cuts[this.m_cutIndex]:null}getGeometryID(){return 0}tock(){return!0}getRank(){return 1}generateCuts(){switch(this.m_cuttee.getGeometryType()){case r.enumPolyline:this.generatePolylineCuts();break;case r.enumPolygon:this.generatePolygonCuts()}}generatePolylineCuts(){const t=new e,s=new e,n=new e;this.m_cuts.length=0,this.m_cuts.push(t),this.m_cuts.push(s);const r=[];f(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,r,this.m_progressTracker);for(let e=0;e<r.length;e++){const u=r[e];1===u.m_side?t.add(u.m_geometry,!1):2===u.m_side||4===u.m_side?s.add(u.m_geometry,!1):3===u.m_side?this.m_cuts.push(u.m_geometry):0===u.m_side?n.add(u.m_geometry,!1):o("")}n.isEmpty()||t.isEmpty()&&s.isEmpty()&&!(this.m_cuts.length>=3)||this.m_cuts.push(n),t.isEmpty()&&s.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}generatePolygonCuts(){const t=new u,e=new u,s=new u;this.m_cuts.length=0,this.m_cuts.push(t),this.m_cuts.push(e);const n=[];C(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,n,this.m_progressTracker);for(let r=0;r<n.length;r++){const u=n[r];1===u.m_side?t.add(u.m_geometry,!1):2===u.m_side?e.add(u.m_geometry,!1):3===u.m_side?this.m_cuts.push(u.m_geometry):0===u.m_side?s.add(u.m_geometry,!1):o("")}c(s.isEmpty()||1===n.length),t.isEmpty()&&e.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}}const v=new E;function w(t,e,s){const n=v.execute(!0,t,e,s,null);return Array.from(n)}function x(){return v.supportsCurves()}export{w as execute,x as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{f as n}from"../../../chunks/Polyline.js";import{arrayToCursor as r,cursorToArray as t}from"../support/cursorUtils.js";const u=new n;function o(n,r,t,o){return u.execute(n,r,t,o,null)}function e(n,o,e,s){const c=u.executeMany(r(n),o,e,s,null);return t(c)}function s(){return u.supportsCurves()}export{o as execute,e as executeMany,s as supportsCurves};
5
+ import{S as n,g as e}from"../../../chunks/Polyline.js";const r=new e;function t(n,e,t,u){return r.execute(n,e,t,u,null)}function u(e,t,u,o){const s=r.executeMany(new n(e),t,u,o,null);return Array.from(s)}function o(){return r.supportsCurves()}export{t as execute,u as executeMany,o as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{j as r}from"../../../chunks/Polyline.js";import{l as e,i as n,p as t}from"../../../chunks/pe.js";import{arrayToCursor as o,cursorToArray as s}from"../support/cursorUtils.js";let u;function i(){return!!u&&n()}async function c(){if(!i()){const[n]=await Promise.all([import("../../../chunks/OperatorGeodesicBuffer.js"),e()]);u=new n.OperatorGeodesicBuffer,r(t)}}function f(r,e,n,t,o){return u.execute(r,e,n,t,o,!1,null)}function p(r,e,n,t,i,c){const f=u.executeMany(o(r),e,n,t,i,!1,c,null);return s(f)}function a(){return u.supportsCurves()}export{f as execute,p as executeMany,i as isLoaded,c as load,a as supportsCurves};
5
+ import{k as e,S as n}from"../../../chunks/Polyline.js";import{l as r,i as t,p as o}from"../../../chunks/pe.js";let s;function u(){return!!s&&t()}async function c(){if(!u()){const[n]=await Promise.all([import("../../../chunks/OperatorGeodesicBuffer.js"),r()]);s=new n.OperatorGeodesicBuffer,e(o)}}function i(e,n,r,t,o){return s.execute(e,n,r,t,o,!1,null)}function a(e,r,t,o,u,c){const i=s.executeMany(new n(e),r,t,o,u,!1,c,null);return Array.from(i)}function f(){return s.supportsCurves()}export{i as execute,a as executeMany,u as isLoaded,c as load,f as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{j as n}from"../../../chunks/Polyline.js";import{l as t,i as e,p as r}from"../../../chunks/pe.js";import{arrayToCursor as o,cursorToArray as s}from"../support/cursorUtils.js";let u;function i(){return!!u&&e()}async function c(){if(!i()){const[e]=await Promise.all([import("../../../chunks/OperatorGeodeticDensifyByLength.js"),t()]);u=new e.OperatorGeodeticDensifyByLength,n(r)}}function p(n,t,e,r){return u.execute(n,t,e,r,null)}function a(n,t,e,r){const i=u.executeMany(o(n),t,e,r,null);return s(i)}function f(){return u.supportsCurves()}export{p as execute,a as executeMany,i as isLoaded,c as load,f as supportsCurves};
5
+ import{k as n,S as e}from"../../../chunks/Polyline.js";import{l as t,i as r,p as o}from"../../../chunks/pe.js";let s;function u(){return!!s&&r()}async function i(){if(!u()){const[e]=await Promise.all([import("../../../chunks/OperatorGeodeticDensifyByLength.js"),t()]);s=new e.OperatorGeodeticDensifyByLength,n(o)}}function c(n,e,t,r){return s.execute(n,e,t,r,null)}function a(n,t,r,o){const u=s.executeMany(new e(n),t,r,o,null);return Array.from(u)}function f(){return s.supportsCurves()}export{c as execute,a as executeMany,u as isLoaded,i as load,f as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{k as t}from"../../../chunks/Polyline.js";import{l as e,i as n,p as r}from"../../../chunks/pe.js";let o;function s(){return!!o&&n()}async function i(){if(!s()){const[n]=await Promise.all([import("../../../chunks/OperatorGeodeticDistance.js"),e()]);o=new n.OperatorGeodeticDistance,t(r)}}function c(t,e,n,r){return o.execute(t,e,n,r,null)}function u(){return o.supportsCurves()}export{c as execute,s as isLoaded,i as load,u as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{k as n}from"../../../chunks/Polyline.js";import{arrayToCursor as r,cursorToArray as t}from"../support/cursorUtils.js";const u=new n;function o(n,r,t){return u.execute(n,r,t,null)}function e(n,o,e){const s=u.executeMany(r(n),r(o),e,null);return t(s)}function s(){return u.supportsCurves()}export{o as execute,e as executeMany,s as supportsCurves};
5
+ import{S as n,l as e}from"../../../chunks/Polyline.js";const r=new e;function t(n,e,t){return r.execute(n,e,t,null)}function u(e,t,u){const o=r.executeMany(new n(e),new n(t),u,null);return Array.from(o)}function o(){return r.supportsCurves()}export{t as execute,u as executeMany,o as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{s as e,w as t,y as n,m as r,G as o,P as s,R as a,a as i,aN as l,o as u,e as c,aO as m,q as N,aP as g,aQ as P,Y as h}from"../../../chunks/Polyline.js";import{a as y}from"../../../chunks/Centroid-DZi-eb9F.js";import{O as d}from"../../../chunks/OperatorProximity.js";class x{getOperatorType(){return 10203}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(t,n){return e(0),{}}execute(e,t){return new p(null,t).labelPoint(e)}}class p extends t{progress_(){}tock(){return e(0),!1}getRank(){return e(0),0}constructor(e,t){super(),this.m_index=-1,this.m_progressCounter=0,this.m_progressTracker=t,this.m_inputGeoms=e}next(){const e=this.m_inputGeoms.next();return e?(n(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.labelPoint(e)):null}getGeometryID(){return this.m_index}labelPoint(e){if(null===e&&r("null pointer is not allowed"),e.getGeometryType()===o.enumPoint)return e;if(e.isEmpty())return new s({vd:e.getDescription()});switch(e.getGeometryType()){case o.enumPolygon:return this.labelPointPolygon(e);case o.enumPolyline:return this.labelPointPolyline(e);case o.enumMultiPoint:return this.labelPointMultiPoint(e);case o.enumEnvelope:return this.labelPointEnvelope(e);default:r("geometry is not supported")}}labelPointPolygon(t){const n=a(null,t,!0).total();let r=null,o=t;if(t.hasNonLinearSegments()){const s=new i({copy:t}),a=l(s,.25*n,n,this.m_progressTracker);e(a!==t),r=a,o=r}let P=0,h=0;for(let e=0,s=o.getPathCount();e<s;++e){const t=Math.abs(o.calculateRingArea2D(e));t>h&&(h=t,P=e)}const x=new c;if(Math.abs(h)<=2*n*n?x.setNAN():x.assign(y(o,P)),Number.isNaN(x.x)){const e=new u;return o.queryPathEnvelope(P,e),new s({pt:e.getCenter()})}if(o.getPointCount()<4)return new s({x:x.x,y:x.y});const p=c.getNAN(),b=[p.clone(),p.clone(),p.clone(),p.clone()],f=[Number.NaN,Number.NaN,Number.NaN,Number.NaN],w=[Number.NaN,Number.NaN,Number.NaN,Number.NaN];let C=!1,_=(new d).getNearestCoordinate(o,x,!0,!1);0===_.m_distance&&(C=!0,b[0]=x,_=(new d).getNearestCoordinate(o,x,!1,!1)),f[0]=_.m_distance,w[0]=0;const D=new c;let A=!1,E=.25,k=-1;const q=new u;o.queryPathEnvelope(P,q);do{let e=Number.NaN;if(b[1]=this.calculateParacentroid_(o,m(q.xmin,q.xmax,E),n),b[1].isNAN()||(_=(new d).getNearestCoordinate(o,b[1],!1,!1),e=_.m_distance),e>n&&1===N(o,b[1],n))A=!0,f[1]=e,w[1]=c.sqrDistance(b[1],x);else if(e>k&&(k=e,D.setCoordsPoint2D(b[1])),E-=.01,E<.1){if(!(k>=0))break;A=!0,f[1]=k,b[1]=D,w[1]=c.sqrDistance(b[1],x)}}while(!A);A=!1,E=.5,k=-1;let M=.01,v=1;do{let e=Number.NaN;if(b[2]=this.calculateParacentroid_(o,m(q.xmin,q.xmax,E),n),b[2].isNAN()||(_=(new d).getNearestCoordinate(o,b[2],!1,!1),e=_.m_distance),e>n&&1===N(o,b[2],n))A=!0,f[2]=e,w[2]=c.sqrDistance(b[2],x);else if(e>k&&(k=e,D.setCoordsPoint2D(b[2])),E=.5+M*v,M+=.01,v*=-1,E<.3||E>.7){if(!(k>=0))break;A=!0,f[2]=k,b[2]=D,w[2]=c.sqrDistance(b[2],x)}}while(!A);A=!1,E=.75,k=-1;do{let e=Number.NaN;if(b[3]=this.calculateParacentroid_(o,m(q.xmin,q.xmax,E),n),b[3].isNAN()||(_=(new d).getNearestCoordinate(o,b[3],!1,!1),e=_.m_distance),e>n&&1===N(o,b[3],n))A=!0,f[3]=e,w[3]=c.sqrDistance(b[3],x);else if(e>k&&(k=e,D.setCoordsPoint2D(b[3])),E+=.01,E>.9){if(!(k>=0))break;A=!0,f[3]=k,b[3]=D,w[3]=c.sqrDistance(b[3],x)}}while(!A);const S=[0,1,2,3],G=C?0:1;for(let e=G;e<4;e++)for(let t=G;t<3;t++){const e=w[t],n=w[t+1];if(g(e,n)>0){const r=S[t];S[t]=S[t+1],S[t+1]=r,w[t]=n,w[t+1]=e}}let X=G,L=0,T=0;for(let e=G;e<4;e++){switch(e){case 0:T=2*f[S[e]];break;case 1:T=1.66666666*f[S[e]];break;case 2:T=1.33333333*f[S[e]];break;case 3:T=f[S[e]]}T>L&&(L=T,X=S[e])}return e(!b[X].isNAN()),new s({x:b[X].x,y:b[X].y})}labelPointPolyline(e){const t=new c;if(e.getPointCount()>2*e.getPathCount()){let n=-1,r=-Number.MAX_VALUE;for(let t=0,i=e.getPathCount();t<i;t++)if(e.getPathSize(t)>2){const o=e.calculatePathLength2D(t);o>r&&(r=o,n=t)}const o=e.getPathStart(n),s=e.getPathEnd(n),a=Math.trunc((o+s)/2);t.assign(e.getXY(a))}else{let n=-Number.MAX_VALUE;const r=e.querySegmentIterator();for(;r.nextPath();)if(r.hasNextSegment()){const e=r.nextSegment(),o=e.calculateLength2D();o>n&&(n=o,t.assign(e.getCoord2D(e.lengthToT(.5*o))))}}return new s({x:t.x,y:t.y})}labelPointMultiPoint(e){const t=new u;e.queryEnvelope(t);const n=t.getCenter(),r=(new d).getNearestCoordinate(e,n,!1,!1).m_coordinate;return new s({x:r.x,y:r.y})}labelPointEnvelope(e){const t=e.getCenterXY();return new s({x:t.x,y:t.y})}calculateParacentroid_(t,n,r){const o=new u;t.queryEnvelope(o);const s=new c(n,0);let a=Number.MAX_VALUE,i=Number.MAX_VALUE,l=!1,m=!1;const N=new P;N.setStartXYCoords(s.x,o.ymin-1),N.setEndXYCoords(s.x,o.ymax+1);const g=new u,y=new c,d=new c,x=h(c,2),p=t.querySegmentIterator();for(;p.nextPath();)for(;p.hasNextSegment();){const t=p.nextSegment();if(t.queryEnvelope(g),e(t.isMonotoneQuickAndDirty()),y.setCoordsPoint2D(N.getStartXY()),d.setCoordsPoint2D(N.getEndXY()),0===g.clipLine(y,d))continue;if(1!==N.intersect(t,x,null,null,r))continue;const n=x[0].y;a>i?n<a&&(a=n,l=!0):n<i&&(i=n,m=!0)}return l&&m?s.y=(a+i)/2:s.setNAN(),s}}const b=new x;function f(e){return b.execute(e,null)}function w(e){return e.map(f)}function C(){return b.supportsCurves()}export{f as execute,w as executeMany,C as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{s as t,w as s,x as e,y as i,R as n,m as o,G as h,r as m,b as r,a,n as f,aj as _,e as c,aa as d,aR as P,aS as u}from"../../../chunks/Polyline.js";function l(t,s,n,h,m,r){if(null==t&&o(""),t.getDimension()<1&&o(""),e(t),i(t),0===s||t.isEmpty())return t;const a=new A(r);return a.m_bUseZ=t.hasAttribute(1),a.m_bUseM=t.hasAttribute(2),a.m_inputGeometry=t,a.m_distance=s,a.m_tolerance=m,a.m_joins=n,a.m_miterLimit=h,a.m_progressCounter=0,a.constructOffset()}const y=1.4142135623730951,x=.017453292519943295,p=256,b=512,M=1024;class g{static construct(t,s,e){const i=new g;return i.x=t.x,i.y=t.y,i.m_next=-1,i.m_prev=-1,i.z=s,i.m=e,i.type=0,i}clone(){const t=new g;return t.x=this.x,t.y=this.y,t.m_next=this.m_next,t.m_prev=this.m_prev,t.z=this.z,t.m=this.m,t.type=this.type,t}asPoint2D(){return new c(this.x,this.y)}}function C(){return{pt:new g,bAtExistingPt:!1}}class A{constructor(t){this.m_distance=-1,this.m_tolerance=-1,this.m_miterLimit=10,this.m_joins=0,this.m_progressCounter=0,this.m_bUseZ=!1,this.m_bUseM=!1,this.m_srcPts=[],this.m_srcPtCount=0,this.m_offsetPts=[],this.m_offsetPtCount=0,this.m_a1=0,this.m_a2=0,this.m_progressTracker=t}constructOffset(){const t=this.m_inputGeometry.getGeometryType();if(t===h.enumLine)return this.offsetLine();if(t===h.enumEnvelope)return this.offsetEnvelope();if(m(t)){const t=new r;return t.addSegment(this.m_inputGeometry,!0),this.m_inputGeometry=t,this.constructOffset()}if(t===h.enumPolyline){const t=new r;return this.offsetMultiPath(t),t}if(t===h.enumPolygon){const t=new a;return this.offsetMultiPath(t),t}f("")}offsetLine(){const t=this.m_inputGeometry,s=t.getStartXY(),e=t.getEndXY(),i=new c;i.setSub(e,s),i.normalize(),i.leftPerpendicularThis(),i.scale(this.m_distance),s.addThis(i),e.addThis(i);const n=t.clone();return n.setStartXY(s),n.setEndXY(e),n}offsetEnvelope(){const t=this.m_inputGeometry;if(this.m_distance>0&&2!==this.m_joins){const s=new a;return s.addEnvelope(t,!1),this.m_inputGeometry=s,this.constructOffset()}const s=t.clone();return s.inflateCoords(this.m_distance,this.m_distance),s}progress(){}static buildPoint(t,s,e,i){i.x=t.x+s*Math.cos(e),i.y=t.y+s*Math.sin(e),i.type=t.type,i.z=t.z,i.m=t.m,i.m_next=-1,i.m_prev=-1}addPoint(t){this.m_offsetPts.push(t.clone()),this.m_offsetPtCount++}addPointEx(t,s){if(0===this.m_offsetPtCount)return void this.addPoint(t);const e=this.m_srcPtCount,i=this.m_srcPts[0===s?e-1:s-1],n=this.m_srcPts[s],o=A.dotSign(i,n,this.m_offsetPts[this.m_offsetPtCount-1],t);if(o>0)this.addPoint(t);else if(o<0)if(A.dotSign(i,n,n,this.m_offsetPts[this.m_offsetPtCount-1])>0){const n=new g;let o;o=0===s?e-2:1===s?e-1:s-2;const h=this.m_srcPts[o],m=Math.atan2(i.y-h.y,i.x-h.x);if(A.buildPoint(i,this.m_distance,m-_,n),this.m_offsetPts[this.m_offsetPtCount-1]=n,1===this.m_joins||2===this.m_joins){n.x=.5*(n.x+i.x),n.y=.5*(n.y+i.y),this.addPoint(n),A.buildPoint(i,this.m_distance,this.m_a1+_,n);const t=n.clone();t.x=.5*(t.x+i.x),t.y=.5*(t.y+i.y),t.type|=p,this.addPoint(t),this.addPoint(n)}else A.buildPoint(i,this.m_distance,this.m_a1+_,n),n.type|=p,this.addPoint(n);this.addPointEx(t,s)}else{const t=new g;if(A.buildPoint(n,this.m_distance,this.m_a1+_,t),this.addPoint(t),1===this.m_joins||2===this.m_joins){t.x=.5*(t.x+n.x),t.y=.5*(t.y+n.y),this.addPoint(t),A.buildPoint(n,this.m_distance,this.m_a2-_,t);const s=t.clone();s.x=.5*(s.x+n.x),s.y=.5*(s.y+n.y),s.type|=p,this.addPoint(s),this.addPoint(t)}else A.buildPoint(n,this.m_distance,this.m_a2-_,t),t.type|=p,this.addPoint(t)}}buildOffset(){const t=new g,s=this.m_srcPtCount;this.m_offsetPtCount=0;const e=.5*this.m_tolerance;let i=0,n=0;for(let o=0;o<s;o++){const h=this.m_srcPts[o],m=0===o?this.m_srcPts[s-1]:this.m_srcPts[o-1],r=o===s-1?this.m_srcPts[0]:this.m_srcPts[o+1];let a,f,P=0;{const t=m.x-h.x,s=m.y-h.y,e=r.x-h.x,_=r.y-h.y;a=Math.atan2(s,t),f=Math.atan2(_,e),this.m_a1=a,this.m_a2=f,0===o&&(i=a,n=f),P=c.orientationRobust(h.asPoint2D(),m.asPoint2D(),r.asPoint2D())}const u=f;if(f<a&&(f+=d),P*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){A.buildPoint(h,this.m_distance,a+_,t),this.addPoint(t);const s=.001;t.x=h.x+(t.x-h.x)*s,t.y=h.y+(t.y-h.y)*s,this.addPoint(t),A.buildPoint(h,this.m_distance,f-_,t);const e=t.clone();e.x=h.x+(e.x-h.x)*s,e.y=h.y+(e.y-h.y)*s,e.type|=p,this.addPoint(e),this.addPoint(t)}else{const s=.5*(f-a),e=0===s?this.m_distance:this.m_distance/Math.abs(Math.sin(s));A.buildPoint(h,e,.5*(a+f),t),this.addPointEx(t,o)}else if(h.type&b){const s=1-e/Math.abs(this.m_distance);let i=1,n=this.m_distance<0?-Math.PI:Math.PI;if(s>-1&&s<1){let t=2*Math.acos(s);t<x&&(t=x),i=Math.trunc(Math.PI/t+1.5),i>1&&(n/=i)}i<=1&&(i=2,n/=2);let m=a+_;A.buildPoint(h,this.m_distance,m,t),0===o&&(t.type|=M),this.addPointEx(t,o);const r=this.m_distance/Math.cos(n/2);for(m+=n/2,A.buildPoint(h,r,m,t),t.type|=M,this.addPoint(t);--i>0;)m+=n,A.buildPoint(h,r,m,t),t.type|=M,this.addPoint(t);A.buildPoint(h,this.m_distance,f-_,t),t.type|=M,this.addPoint(t)}else if(1!==this.m_joins)if(0!==this.m_joins)if(2!==this.m_joins){let s;if(f=u,this.m_distance>0?(f>a&&(f-=d),s=a-f<_):(f<a&&(f+=d),s=f-a<_),s){const s=this.m_distance*y;let e;e=s<0?a+.25*Math.PI:a+3*Math.PI*.25,A.buildPoint(h,s,e,t),this.addPointEx(t,o),e=s<0?f-.25*Math.PI:f-3*Math.PI*.25,A.buildPoint(h,s,e,t),this.addPoint(t)}else{const s=.5*(f-a),e=this.m_distance/Math.abs(Math.sin(s));f<a&&(f+=d),A.buildPoint(h,e,(a+f)/2,t),this.addPointEx(t,o)}}else{const s=m.x-h.x,e=m.y-h.y,i=r.x-h.x,n=r.y-h.y,_=(s*i+e*n)/Math.sqrt(s*s+e*e)/Math.sqrt(i*i+n*n);if(_>1-1e-8){A.buildPoint(h,y*this.m_distance,f-.25*Math.PI,t),this.addPointEx(t,o),A.buildPoint(h,y*this.m_distance,f+.25*Math.PI,t),this.addPoint(t);continue}const d=Math.abs(this.m_distance/Math.sin(.5*Math.acos(_))),P=Math.abs(this.m_miterLimit*this.m_distance);if(d>P){const s=.5*(f-a),e=this.m_distance/Math.abs(Math.sin(s));A.buildPoint(h,e,.5*(a+f),t);const i=c.construct(t.x,t.y),n=c.construct(h.x,h.y),m=new c;m.setSub(i,n);const r=new c;r.scaleAddOther(P/m.length(),m,n);const _=Math.sqrt(d*d-this.m_distance*this.m_distance),u=(d-P)*Math.abs(this.m_distance)/_;this.m_distance>0?m.leftPerpendicularThis():m.rightPerpendicularThis(),m.scale(u/m.length());const l=new c;l.setAdd(r,m);const y=new c;y.setSub(r,m),t.x=l.x,t.y=l.y,this.addPointEx(t,o),t.x=y.x,t.y=y.y,this.addPoint(t);continue}const u=.5*(f-a),l=this.m_distance/Math.abs(Math.sin(u));A.buildPoint(h,l,.5*(a+f),t),this.addPointEx(t,o)}else{const s=1-e/Math.abs(this.m_distance);let i=1,n=f-_-(a+_);if(s>-1&&s<1){let t=2*Math.acos(s);t<x&&(t=x),i=Math.trunc(Math.abs(n)/t+1.5),i>1&&(n/=i)}const m=this.m_distance/Math.cos(.5*n);let r=a+_+.5*n;for(A.buildPoint(h,m,r,t),this.addPointEx(t,o);--i>0;)r+=n,A.buildPoint(h,m,r,t),this.addPoint(t)}else A.buildPoint(h,this.m_distance,a+_,t),this.addPointEx(t,o),A.buildPoint(h,this.m_distance,f-_,t),this.addPoint(t)}return this.m_a1=i,this.m_a2=n,this.addPointEx(this.m_offsetPts[0],0),this.m_offsetPts[0]=this.m_offsetPts[this.m_offsetPtCount-1].clone(),this.removeBadSegsFast()}removeBadSegsFast(){let t=!1;for(let e=0;e<this.m_offsetPtCount;e++){const t=this.m_offsetPts[e];t.m_next=e+1,t.m_prev=e-1}this.m_offsetPts[0].m_prev=this.m_offsetPtCount-2,this.m_offsetPts[this.m_offsetPtCount-2].m_next=0;let s=0;for(let e=0;e<this.m_offsetPtCount;e++)if(this.m_offsetPts[s].type&p){const e=this.deleteClosedSeg(s);if(-1===e){t=!0;break}s=e}else s=this.m_offsetPts[s].m_next;return!t&&(this.compressOffsetArray(s),!0)}deleteClosedSeg(t){const s=this.m_offsetPtCount-1;let e,i,n=t;for(let o=1;o<=s-2;o++){n=this.m_offsetPts[n].m_next,e=n,i=t;for(let t=1;t<=o;t++){if(i=this.m_offsetPts[i].m_prev,!(this.m_offsetPts[i].type&p||this.m_offsetPts[e].type&p)){const t=this.handleClosedIntersection(i,e);if(-1!==t)return t}e=this.m_offsetPts[e].m_prev}}return-1}handleClosedIntersection(t,s){const e=this.m_offsetPts[this.m_offsetPts[t].m_prev],i=this.m_offsetPts[t],n=this.m_offsetPts[this.m_offsetPts[s].m_prev],o=this.m_offsetPts[s];if(!this.sectGraphicRect(e,i,n,o))return-1;const h=C();if(((i.x-e.x)*(o.y-n.y)-(i.y-e.y)*(o.x-n.x))*this.m_distance<0){if(this.findIntersection(e,i,n,o,h)&&!h.bAtExistingPt){const m=1e-8,r=Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)),a=(i.x-e.x)/r,f=(i.y-e.y)/r,_=Math.sqrt((o.x-n.x)*(o.x-n.x)+(o.y-n.y)*(o.y-n.y)),c=(o.x-n.x)/_,d=(o.y-n.y)/_;let P=!1;const u=h.pt.clone();u.x+=(a+c)*m,u.y+=(f+d)*m;let l=n,y=h.pt,x=this.m_offsetPts[t].m_prev;for(;y.y>u.y!=l.y>u.y&&u.x<(l.x-y.x)*(u.y-y.y)/(l.y-y.y)+y.x&&(P=!P),l=y,x=this.m_offsetPts[x].m_next,x!==s;)y=this.m_offsetPts[x];if(P)return-1;const p=this.m_offsetPts[t].m_prev;return h.pt.type=i.type,h.pt.m_next=s,h.pt.m_prev=p,this.m_offsetPts[t]=h.pt,this.m_offsetPts[s].m_prev=t,s}}return-1}sectGraphicRect(t,s,e,i){return Math.max(t.x,s.x)>=Math.min(e.x,i.x)&&Math.max(e.x,i.x)>=Math.min(t.x,s.x)&&Math.max(t.y,s.y)>=Math.min(e.y,i.y)&&Math.max(e.y,i.y)>=Math.min(t.y,s.y)}findIntersection(t,s,e,i,n){let o,h,m,r;return n.bAtExistingPt=!1,o=(s.y-t.y)*(i.x-e.x)-(s.x-t.x)*(i.y-e.y),h=(e.y-t.y)*(s.x-t.x)-(e.x-t.x)*(s.y-t.y),m=0===o?2:h/o,m>=0&&m<=1&&(r=m,o=(i.y-e.y)*(s.x-t.x)-(i.x-e.x)*(s.y-t.y),h=(t.y-e.y)*(i.x-e.x)-(t.x-e.x)*(i.y-e.y),m=0===o?2:h/o,m>=0&&m<=1)&&(n.pt.x=t.x+m*(s.x-t.x),n.pt.y=t.y+m*(s.y-t.y),this.m_bUseZ&&(n.pt.z=e.z+r*(i.z-e.z)),this.m_bUseM&&(n.pt.m=e.m+r*(i.m-e.m)),0!==r&&1!==r||0!==m&&1!==m||(n.bAtExistingPt=!0),!((0===r||1===r)&&m>0&&m<1||(0===m||1===m)&&r>0&&r<1))}compressOffsetArray(t){for(;this.m_offsetPts[t].m_prev<t;)t=this.m_offsetPts[t].m_prev;let s=0,e=t;do{const t=this.m_offsetPts[e].clone();this.m_offsetPts[s]=t,e=t.m_next,s++}while(e!==t);this.m_offsetPts[s]=this.m_offsetPts[0].clone(),this.m_offsetPtCount=s+1}addPart(t,s){if(!(s<2))for(let e=0;e<s;e++){const s=this.m_offsetPts[t+e];if(e?this.m_bUseZ?this.m_resultPath.lineTo3DCoords(s.x,s.y,s.z):this.m_resultPath.lineToCoords(s.x,s.y):this.m_bUseZ?this.m_resultPath.startPath3DCoords(s.x,s.y,s.z):this.m_resultPath.startPathCoords(s.x,s.y),this.m_bUseM){const t=this.m_resultPath.getPointCount()-1;this.m_resultPath.setAttribute(2,t,0,s.m)}}}offsetMultiPath(t){const s=this.m_inputGeometry,e=s.querySegmentIterator();e.resetToFirstPath();let i=-1;for(;e.nextPath();)i++,this.offsetPath(s,i,t)}offsetPath(t,s,e){let i=t.getPathStart(s),n=t.getPathEnd(s);if(this.m_resultPath=e,t.isClosedPath(s)){const s=t.getXY(i);for(;n>i&&t.getXY(n-1).equals(s);)n--;if(n-i>=2){this.m_srcPtCount=n-i,this.m_srcPts.length=this.m_srcPtCount;for(let s=i;s<n;s++)this.progress(),this.m_srcPts[s-i]=g.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0);this.buildOffset()&&this.addPart(0,this.m_offsetPtCount-1)}}else{const s=t.getXY(i);for(;i<n-1&&t.getXY(i+1).equals(s);)i++;const e=t.getXY(n-1);for(;i<n-1&&t.getXY(n-2).equals(e);)n--;if(n-i>=2){this.m_srcPtCount=2*(n-i)-2,this.m_srcPts.length=this.m_srcPtCount;let e=g.construct(s,this.m_bUseZ?t.getAttributeAsDbl(1,i,0):0,this.m_bUseM?t.getAttributeAsDbl(2,i,0):0);e.type|=b+M,this.m_srcPts[0]=e;let o=1,h=this.m_srcPtCount-1;for(let s=i+1;s<n-1;s++,o++,h--)this.progress(),e=g.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0),this.m_srcPts[o]=e.clone(),e.type|=M,this.m_srcPts[h]=e.clone();if(e=g.construct(t.getXY(n-1),this.m_bUseZ?t.getAttributeAsDbl(1,n-1,0):0,this.m_bUseM?t.getAttributeAsDbl(2,n-1,0):0),e.type|=b,this.m_srcPts[o]=e.clone(),this.buildOffset())if(this.m_offsetPts.length>=2){let t=-1,s=-1,e=!!(this.m_offsetPts[this.m_offsetPtCount-1].type&M);e||(t=0);for(let i=1;i<this.m_offsetPtCount;i++){this.progress();const n=!!(this.m_offsetPts[i].type&M);n?e||(s=i-1,s-t+1>1&&this.addPart(t,s-t+1)):e&&(t=i-1),e=n}e||(s=this.m_offsetPtCount-1,s-t+1>1&&this.addPart(t,s-t+1))}else{const t=0,s=this.m_offsetPtCount-1;s-t>=1&&this.addPart(t,s-t+1)}}}this.m_srcPts.length=0,this.m_srcPtCount=0,this.m_offsetPts.length=0,this.m_offsetPtCount=0}static dotSign(t,s,e,i){const n=s.x-t.x,o=s.y-t.y,h=i.x-e.x,m=i.y-e.y,r=P(n,o,h,m);return u(r)}}class E{getOperatorType(){return 10108}accelerateGeometry(t,s,e){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!1}executeMany(s,e,i,n,o,h,m){return t(0),{}}execute(t,s,e,i,n,o,h){return new v(null,s,e,i,n,o,h).offset(t)}}class v extends s{constructor(t,s,e,i,n,o,h){super(),this.m_progressTracker=h,this.m_index=-1,this.m_inputGeoms=t,this.m_spatialReference=s,this.m_distance=e,this.m_joins=i,this.m_miterLimit=n,this.m_flattenError=o}tock(){return!0}getRank(){return 1}next(){if(!this.m_inputGeoms)return null;let t;for(;t=this.m_inputGeoms.next();)return this.m_index=this.m_inputGeoms.getGeometryID(),this.offset(t);return null}getGeometryID(){return this.m_index}offset(t){let s;return e(t),i(t),s=this.m_flattenError<=0?n(this.m_spatialReference,t,!0).total():this.m_flattenError,l(t,this.m_distance,this.m_joins,this.m_miterLimit,s,this.m_progressTracker)}}const w=new E;function G(t,s,e,i,n,o){return w.execute(t,s,e,i,n,o,null)}function D(t,s,e,i,n,o){return t.map((t=>G(t,s,e,i,n,o)))}function U(){return w.supportsCurves()}export{G as execute,D as executeMany,U as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{j as r}from"../../../chunks/Polyline.js";import{l as n,i as e,p as s}from"../../../chunks/pe.js";import{arrayToCursor as t,cursorToArray as o}from"../support/cursorUtils.js";let u;function i(){return!!u&&e()}async function p(){if(!i()){const[e]=await Promise.all([import("../../../chunks/OperatorShapePreservingDensify.js"),n()]);u=new e.OperatorShapePreservingDensify,r(s)}}function c(r,n,e,s){return u.execute(r,n,e,s,0,null)}function a(r,n,e,s){const i=u.executeMany(t(r),n,e,s,0,null);return o(i)}function f(){return u.supportsCurves()}export{c as execute,a as executeMany,i as isLoaded,p as load,f as supportsCurves};
5
+ import{k as n,S as e}from"../../../chunks/Polyline.js";import{l as r,i as s,p as t}from"../../../chunks/pe.js";let o;function u(){return!!o&&s()}async function i(){if(!u()){const[e]=await Promise.all([import("../../../chunks/OperatorShapePreservingDensify.js"),r()]);o=new e.OperatorShapePreservingDensify,n(t)}}function a(n,e,r,s){return o.execute(n,e,r,s,0,null)}function c(n,r,s,t){const u=o.executeMany(new e(n),r,s,t,0,null);return Array.from(u)}function p(){return o.supportsCurves()}export{a as execute,c as executeMany,u as isLoaded,i as load,p as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{l as n}from"../../../chunks/Polyline.js";import{arrayToCursor as u,cursorToArray as r}from"../support/cursorUtils.js";const t=new n;function e(n,u,r){return t.execute(n,u,r,null)}function o(n,e,o){const s=t.executeMany(u(n),e,o,null);return r(s,!0)}function s(n,u,r){return t.isSimpleAsFeature(n,u,r,null,null)}function l(){return t.supportsCurves()}export{e as execute,o as executeMany,s as isSimpleAsFeature,l as supportsCurves};
5
+ import{S as n,u}from"../../../chunks/Polyline.js";const e=new u;function r(n,u,r){return e.execute(n,u,r,null)}function t(u,r,t){const o=e.executeMany(new n(u),r,t,null);return Array.from(o)}function o(n,u,r){return e.isSimpleAsFeature(n,u,r,null,null)}function l(){return e.supportsCurves()}export{r as execute,t as executeMany,o as isSimpleAsFeature,l as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{m as n}from"../../../chunks/Polyline.js";import{arrayToCursor as r}from"../support/cursorUtils.js";const t=new n;function u(n,r,u){return t.execute(n,r,u,null)}function e(n,u){return t.executeMany(r(n),u,null).next()}function o(){return t.supportsCurves()}export{u as execute,e as executeMany,o as supportsCurves};
5
+ import{S as n,v as e}from"../../../chunks/Polyline.js";const t=new e;function u(n,e,u){return t.execute(n,e,u,null)}function r(e,u){return t.executeMany(new n(e),u,null).next()}function o(){return t.supportsCurves()}export{u as execute,r as executeMany,o as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{isSome as r}from"../../core/arrayUtils.js";import{execute as o,supportsCurves as t}from"./gx/operatorAutoComplete.js";import{getSpatialReference as e,fromSpatialReference as p,fromPolyline as s,fromPolygon as m,toPolygon as u}from"./support/converterAPI.js";function a(t,a){const n=e(t);return o(t.map(m),a.map(s),p(n)).map((r=>u(r,n))).filter(r)}function n(){return t()}export{a as execute,n as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{c as e}from"../../chunks/Centroid-DZi-eb9F.js";import{fromGeometry as r,toPoint as t,getSpatialReference as n}from"./support/converterAPI.js";class u{getOperatorType(){return 10205}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(r,t){return e(r)}}const o=new u;function c(e){const u=o.execute(r(e),null);return t(u,n(e))}function s(){return o.supportsCurves()}export{c as execute,s as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{e}from"../../chunks/Polyline.js";import{fromGeometry as r,fromSpatialReference as n}from"./support/converterAPI.js";const t=new e;function o(e,o){return t.execute(r(e),r(o),n(e.spatialReference),null)}function s(){return t.supportsCurves()}export{o as execute,s as supportsCurves};
5
+ import{f as e}from"../../chunks/Polyline.js";import{fromGeometry as r,fromSpatialReference as n}from"./support/converterAPI.js";const t=new e;function o(e,o){return t.execute(r(e),r(o),n(e.spatialReference),null)}function s(){return t.supportsCurves()}export{o as execute,s as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{ae as e,af as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 6}execute(e,t,n,s){return r(e,t,n,16,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
5
+ import{aE as e,aF as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 6}execute(e,t,n,s){return r(e,t,n,16,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{execute as r,supportsCurves as t}from"./gx/operatorCut.js";import{getSpatialReference as o,fromSpatialReference as e,fromPolyline as p,fromGeometry as s,toGeometry as u}from"./support/converterAPI.js";function n(t,n){const c=o(t);return r(s(t),p(n),e(c)).map((r=>u(r,c)))}function c(){return t()}export{n as execute,c as supportsCurves};
5
+ import{isSome as r}from"../../core/arrayUtils.js";import{execute as t,supportsCurves as o}from"./gx/operatorCut.js";import{getSpatialReference as e,fromSpatialReference as s,fromPolyline as p,fromGeometry as u,toGeometry as n}from"./support/converterAPI.js";function i(o,i){const m=e(o);return t(u(o),p(i),s(m)).map((r=>n(r,m))).filter(r)}function m(){return o()}export{i as execute,m as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{execute as r,executeMany as t,supportsCurves as e}from"./gx/operatorDensify.js";import{getSpatialReference as o,toGeometry as n,fromGeometry as s}from"./support/converterAPI.js";function u(t,e,u=0,p=0){const c=o(t);return n(r(s(t),e,u,p),c)}function p(r,e,u=0,p=0){const c=r.map(s),a=o(r);return t(c,e,u,p).map((r=>n(r,a)))}function c(){return e()}export{u as execute,p as executeMany,c as supportsCurves};
5
+ import{isSome as r}from"../../core/arrayUtils.js";import{execute as t,executeMany as o,supportsCurves as e}from"./gx/operatorDensify.js";import{getSpatialReference as n,toGeometry as s,fromGeometry as p}from"./support/converterAPI.js";function u(r,o,e=0,u=0){const a=n(r);return s(t(p(r),o,e,u),a)}function a(t,e,u=0,a=0){const c=t.map(p),i=n(t);return o(c,e,u,a).map((r=>s(r,i))).filter(r)}function c(){return e()}export{u as execute,a as executeMany,c as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{g as r}from"../../chunks/Polyline.js";import{getSpatialReference as n,toGeometry as o,fromGeometry as t,fromSpatialReference as e}from"./support/converterAPI.js";const s=new r;function u(r,u){const c=n(r);return o(s.execute(t(r),t(u),e(c),null),c)}function c(){return s.supportsCurves()}export{u as execute,c as supportsCurves};
5
+ import{h as r}from"../../chunks/Polyline.js";import{getSpatialReference as n,toGeometry as o,fromGeometry as t,fromSpatialReference as e}from"./support/converterAPI.js";const s=new r;function u(r,u){const c=n(r);return o(s.execute(t(r),t(u),e(c),null),c)}function c(){return s.supportsCurves()}export{u as execute,c as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{h as e}from"../../chunks/Polyline.js";import{fromGeometry as r,fromSpatialReference as t}from"./support/converterAPI.js";const n=new e;function o(e,o){return n.execute(r(e),r(o),t(e.spatialReference))}function s(){return n.supportsCurves()}export{o as execute,s as supportsCurves};
5
+ import{j as e}from"../../chunks/Polyline.js";import{fromGeometry as r,fromSpatialReference as t}from"./support/converterAPI.js";const n=new e;function o(e,o){return n.execute(r(e),r(o),t(e.spatialReference))}function s(){return n.supportsCurves()}export{o as execute,s as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{ae as e,af as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 2}execute(e,t,n,s){return r(e,t,n,3,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
5
+ import{aE as e,aF as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 2}execute(e,t,n,s){return r(e,t,n,3,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{isLoaded as r,load as t,execute as e,executeMany as o,supportsCurves as n}from"./gx/operatorGeodesicBuffer.js";import{getSpatialReference as u,toGeometry as s,fromSpatialReference as a,fromGeometry as c}from"./support/converterAPI.js";function p(){return r()}function f(){return t()}function i(r,t,o,n){const p=u(r);return s(e(c(r),a(p),t,o,n),p)}function m(r,t,e,n,p){const f=r.map(c),i=u(r);return o(f,a(i),t,e,n,p).map((r=>s(r,i)))}function d(){return n()}export{i as execute,m as executeMany,p as isLoaded,f as load,d as supportsCurves};
5
+ import{isSome as r}from"../../core/arrayUtils.js";import{isLoaded as t,load as o,execute as e,executeMany as n,supportsCurves as s}from"./gx/operatorGeodesicBuffer.js";import{getSpatialReference as u,toGeometry as a,fromSpatialReference as c,fromGeometry as i}from"./support/converterAPI.js";function f(){return t()}function p(){return o()}function m(r,t,o,n){const s=u(r);return a(e(i(r),c(s),t,o,n),s)}function d(t,o,e,s,f){const p=t.map(i),m=u(t);return n(p,c(m),o,e,s,f).map((r=>a(r,m))).filter(r)}function x(){return s()}export{m as execute,d as executeMany,f as isLoaded,p as load,x as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{isLoaded as t,load as r,execute as e,executeMany as n,supportsCurves as o}from"./gx/operatorGeodeticDensifyByLength.js";import{getSpatialReference as s,toGeometry as u,fromSpatialReference as a,fromGeometry as c}from"./support/converterAPI.js";function i(){return t()}function p(){return r()}function f(t,r,n){const o=s(t);return u(e(c(t),r,a(o),n),o)}function m(t,r,e){const o=t.map(c),i=s(t);return n(o,r,a(i),e).map((t=>u(t,i)))}function d(){return o()}export{f as execute,m as executeMany,i as isLoaded,p as load,d as supportsCurves};
5
+ import{isSome as r}from"../../core/arrayUtils.js";import{isLoaded as t,load as e,execute as o,executeMany as n,supportsCurves as s}from"./gx/operatorGeodeticDensifyByLength.js";import{getSpatialReference as u,toGeometry as a,fromSpatialReference as i,fromGeometry as c}from"./support/converterAPI.js";function p(){return t()}function f(){return e()}function m(r,t,e){const n=u(r);return a(o(c(r),t,i(n),e),n)}function d(t,e,o){const s=t.map(c),p=u(t);return n(s,e,i(p),o).map((r=>a(r,p))).filter(r)}function x(){return s()}export{m as execute,d as executeMany,p as isLoaded,f as load,x as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{isLoaded as r,load as t,execute as o,supportsCurves as e}from"./gx/operatorGeodeticDistance.js";import{getSpatialReference as n,fromSpatialReference as s,fromGeometry as u}from"./support/converterAPI.js";function c(){return r()}function i(){return t()}function a(r,t,e){const c=n(r);return o(u(r),u(t),s(c),e)}function p(){return e()}export{a as execute,c as isLoaded,i as load,p as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{execute as r,executeMany as t,supportsCurves as e}from"./gx/operatorIntersection.js";import{getSpatialReference as o,toGeometry as n,fromSpatialReference as s,fromGeometry as u}from"./support/converterAPI.js";function p(t,e){const p=o(t);return n(r(u(t),u(e),s(p)),p)}function c(r,e){const p=r.map(u),c=o(r);return t(p,[u(e)],s(c)).map((r=>n(r,c)))}function a(){return e()}export{p as execute,c as executeMany,a as supportsCurves};
5
+ import{isSome as r}from"../../core/arrayUtils.js";import{execute as t,executeMany as o,supportsCurves as e}from"./gx/operatorIntersection.js";import{getSpatialReference as n,toGeometry as s,fromSpatialReference as p,fromGeometry as u}from"./support/converterAPI.js";function c(r,o){const e=n(r);return s(t(u(r),u(o),p(e)),e)}function a(t,e){const c=t.map(u),a=n(t);return o(c,[u(e)],p(a)).map((r=>s(r,a))).filter(r)}function i(){return e()}export{c as execute,a as executeMany,i as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{ae as e,af as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 4}execute(e,t,n,s){return!r(e,t,n,4,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
5
+ import{aE as e,aF as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 4}execute(e,t,n,s){return!r(e,t,n,4,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{execute as r,executeMany as t,supportsCurves as e}from"./gx/operatorLabelPoint.js";import{toPoint as o,getSpatialReference as n,fromGeometry as u}from"./support/converterAPI.js";function p(t){return o(r(u(t)),n(t))}function s(r){const e=r.map(u),p=n(r);return t(e).map((r=>o(r,p)))}function a(){return e()}export{p as execute,s as executeMany,a as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{isSome as r}from"../../core/arrayUtils.js";import{execute as t,executeMany as o,supportsCurves as e}from"./gx/operatorOffset.js";import{getSpatialReference as s,toGeometry as n,fromSpatialReference as p,fromGeometry as u}from"./support/converterAPI.js";function a(r,o,e,a,c){const f=s(r);return n(t(u(r),p(f),o,e,a,c),f)}function c(t,e,a,c,f){const i=t.map(u),m=s(t);return o(i,p(m),e,a,c,f).map((r=>n(r,m))).filter(r)}function f(){return e()}export{a as execute,c as executeMany,f as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{ae as e,af as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 9}execute(e,t,n,s){return r(e,t,n,32,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
5
+ import{aE as e,aF as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 9}execute(e,t,n,s){return r(e,t,n,32,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{O as t}from"../../chunks/OperatorProximity.js";import{fromGeometry as e,fromPoint as r,toPoint as n,getSpatialReference as o}from"./support/converterAPI.js";const i=new t;function s(t,n,o,s){return m(i.getNearestCoordinate(e(t),r(n).getXY(),o,s),t)}function u(t,n){return m(i.getNearestVertex(e(t),r(n).getXY()),t)}function c(t,n,o,s){return i.getNearestVertices(e(t),r(n).getXY(),o,s).map((e=>m(e,t)))}function p(){return i.supportsCurves()}function m(t,e){const r=e.type;return{coordinate:n(t.m_coordinate,o(e)),distance:t.m_distance,isEmpty:t.isEmpty(),rightSide:t.m_bRightSide,vertexIndex:"point"===r||"multipoint"===r?t.m_vertexIndex:void 0}}export{s as getNearestCoordinate,u as getNearestVertex,c as getNearestVertices,p as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{aq as r,ar as e,ai as t}from"../../chunks/Polyline.js";import{fromGeometry as n,fromSpatialReference as u}from"./support/converterAPI.js";class o{supportsCurves(){return!0}getOperatorType(){return 1}execute(e,t,n,u,o){return r(e,t,n,u,o)}isValidDE9IM(r){return 0===e(r)}accelerateGeometry(r,e,t){return s()}canAccelerateGeometry(r){return c()}}function s(r,e,n){return t(0),!1}function c(r){return t(0),!1}const a=new o;function i(r,e,t){return a.execute(n(r),n(e),u(r.spatialReference),t,null)}function p(r){return a.isValidDE9IM(r)}function l(){return a.supportsCurves()}export{i as execute,p as isValidDE9IM,l as supportsCurves};
5
+ import{aT as e,aU as r,s as t}from"../../chunks/Polyline.js";import{fromGeometry as n,fromSpatialReference as u}from"./support/converterAPI.js";class s{supportsCurves(){return!0}getOperatorType(){return 1}execute(r,t,n,u,s){return e(r,t,n,u,s)}isValidDE9IM(e){return 0===r(e)}accelerateGeometry(e,r,t){return o()}canAccelerateGeometry(e){return c()}}function o(e,r,n){return t(0),!1}function c(e){return t(0),!1}const a=new s;function i(e,r,t){return a.execute(n(e),n(r),u(e.spatialReference),t,null)}function p(e){return a.isValidDE9IM(e)}function l(){return a.supportsCurves()}export{i as execute,p as isValidDE9IM,l as supportsCurves};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{n as e,x as t,o as r,D as s,G as a,b as n,ap as m,P as i,a as o,u as h,t as l}from"../../chunks/Polyline.js";import{getSpatialReference as c,fromGeometry as u,fromPolyline as g,fromSpatialReference as _,toGeometry as d}from"./support/converterAPI.js";function x(m,i,o,h){if(i.getPathCount()>1&&e(""),m.isEmpty()||i.isEmpty())return null;t(m),t(i);let l=null;const c=new r;m.queryEnvelope(c);const u=new r;i.queryEnvelope(u);const g=new r;g.setCoords({env2D:c}),g.mergeEnvelope2D(u);const _=s(o,g,!1).total(),d=new A(h);let x=d.setIndicesAndScalars(m,i,_);if(x){const e=d.getTrimmedPolyline(m,i);if(e.isEmpty())return null;l=d.getReshapedMultiPath(m,e,o)}else{if(Number.isNaN(d.m_scalarB0)||m.getGeometryType()===a.enumPolyline)return null;const e=new n;if(e.add(i,!0),d.clearIndicesAndScalars(),x=d.setIndicesAndScalars(m,e,_),!x)return null;const t=d.getTrimmedPolyline(m,e);if(t.isEmpty())return null;l=d.getReshapedMultiPath(m,t,o)}return l}class A{constructor(e){this.m_progressTracker=e,this.clearIndicesAndScalars()}setIndicesAndScalars(e,t,s){const n=new r,m=new r;e.queryEnvelope(n),e.queryEnvelope(m),n.inflateCoords(s,s);if(!n.intersect(m))return!1;const i=e.getImpl().querySegmentIterator(),o=t.getImpl().querySegmentIterator(),h=[0,0],l=[0,0];let c=-1,u=-1,g=-1,_=-1,d=-1,x=-1,A=Number.NaN,p=Number.NaN,S=Number.NaN,y=Number.NaN;for(o.nextPath();o.hasNextSegment();){const e=o.nextSegment(),t=new r;for(e.queryEnvelope(t),t.inflateCoords(s,s),i.resetToFirstPath();i.nextPath();){for(;i.hasNextSegment();){const a=i.nextSegment(),n=new r;if(a.queryEnvelope(n),t.isIntersecting(n)){if(0!==e.intersect(a,null,l,h,s)&&(Number.isNaN(S)||l[0]<S)&&(c=i.getPathIndex(),g=i.getStartPointIndex(),d=o.getStartPointIndex(),A=h[0],S=l[0],0===S))break}}if(0===S)break}if(!Number.isNaN(S)&&1!==S)break}if(Number.isNaN(S))return!1;this.m_pathA0=c,this.m_vertexA0=g,this.m_vertexB0=d,this.m_scalarA0=A,this.m_scalarB0=S;const P=e.getGeometryType();for(o.resetToLastSegment();o.hasPreviousSegment();){const e=o.previousSegment(),t=new r;for(e.queryEnvelope(t),t.inflateCoords(s,s),P===a.enumPolygon?i.resetToPath(c):i.resetToFirstPath();i.nextPath();){for(;i.hasNextSegment();){const a=i.nextSegment(),n=new r;if(a.queryEnvelope(n),t.isIntersecting(n)){const t=e.intersect(a,null,l,h,s);if(0!==t&&(Number.isNaN(y)||l[t-1]>y)&&(o.getStartPointIndex()!==this.m_vertexB0||l[t-1]!==this.m_scalarB0)&&(u=i.getPathIndex(),_=i.getStartPointIndex(),x=o.getStartPointIndex(),p=h[t-1],y=l[t-1],1===y))break}}if(1===y)break;if(P===a.enumPolygon)break}if(!Number.isNaN(y))break}return!Number.isNaN(y)&&(this.m_pathA1=u,this.m_vertexA1=_,this.m_vertexB1=x,this.m_scalarA1=p,this.m_scalarB1=y,!0)}getTrimmedPolyline(e,t){const r=new m,s=t.createInstance();let a=!0;const n=t.getImpl().querySegmentIterator();if(n.resetToVertex(this.m_vertexB0,0),this.m_vertexB0>this.m_vertexB1)return s;if(this.m_vertexB0===this.m_vertexB1){n.nextSegment().queryCut(this.m_scalarB0,this.m_scalarB1,r,!1),s.addSegment(r.get(),!0)}else for(;;){const e=n.nextSegment(),t=n.getStartPointIndex();if(t===this.m_vertexB0)1!==this.m_scalarB0&&(e.queryCut(this.m_scalarB0,1,r,!1),s.addSegment(r.get(),a),a=!1);else{if(t===this.m_vertexB1){0!==this.m_scalarB1&&(e.queryCut(0,this.m_scalarB1,r),s.addSegment(r.get(),a),a=!1);break}s.addSegment(e,a)}}if(s.isEmpty())return s;if(e.getDescription().getAttributeCount()>1){const t=e.getImpl().querySegmentIterator(),r=new i,a=s.getPointCount();t.resetToVertex(this.m_vertexA0,this.m_pathA0);t.nextSegment().queryCoord(this.m_scalarA0,r),s.setPointByVal(0,r),t.resetToVertex(this.m_vertexA1,this.m_pathA1);t.nextSegment().queryCoord(this.m_scalarA1,r),s.setPointByVal(a-1,r),s.interpolateAttributesRange(0,0,0,a-1)}return s}getReshapedMultiPath(e,t,r){let s;return s=e.getGeometryType()===a.enumPolygon?this.getReshapedPolygon(e,t,r):this.getReshapedPolyline(e,t),s}getReshapedPolygon(e,t,r){const s=e.getImpl().querySegmentIterator();s.setCirculator(!0);const a=new m;new i;const n=new o({vd:e.getDescription()});if(n.addSegmentsFromPath(t,0,0,t.getSegmentCountPath(0),!0),s.resetToVertex(this.m_vertexA1,this.m_pathA0),this.m_vertexA1===this.m_vertexA0&&this.m_scalarA1<=this.m_scalarA0){s.nextSegment().queryCut(this.m_scalarA1,this.m_scalarA0,a),n.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA1&&(e.queryCut(this.m_scalarA1,1,a),n.addSegment(a.get(),!1))}for(;;){const e=s.nextSegment();if(s.getStartPointIndex()===this.m_vertexA0){0!==this.m_scalarA0&&(e.queryCut(0,this.m_scalarA0,a),n.addSegment(a.get(),!1));break}n.addSegment(e,!1)}}const l=new o({vd:e.getDescription()}),c=t.clone();if(c.reversePath(0),l.addSegmentsFromPath(c,0,0,c.getSegmentCountPath(0),!0),s.resetToVertex(this.m_vertexA0,this.m_pathA0),this.m_vertexA0===this.m_vertexA1&&this.m_scalarA0<this.m_scalarA1){s.nextSegment().queryCut(this.m_scalarA0,this.m_scalarA1,a),l.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA0&&(e.queryCut(this.m_scalarA0,1,a),l.addSegment(a.get(),!1))}for(;;){const e=s.nextSegment();if(s.getStartPointIndex()===this.m_vertexA1){0!==this.m_scalarA1&&(e.queryCut(0,this.m_scalarA1,a),l.addSegment(a.get(),!1));break}l.addSegment(e,!1)}}const u=Math.abs(n.calculateArea2D()),g=Math.abs(l.calculateArea2D());let _=e.createInstance();for(let m=0;m<e.getPathCount();m++)m===this.m_pathA0?u>=g?_.add(n,!1):_.add(l,!1):_.addPath(e,m,!0);return _=(new h).execute(_,r,!1,this.m_progressTracker),_}getReshapedPolyline(e,t){const r=e.getImpl().querySegmentIterator(),s=new n,a=new m;let i=!1,o=-1,h=Number.NaN;i=this.m_pathA0>this.m_pathA1||this.m_pathA0===this.m_pathA1&&(this.m_vertexA0>this.m_vertexA1||this.m_vertexA0===this.m_vertexA1&&this.m_scalarA0>this.m_scalarA1),i?(o=this.m_vertexA1,h=this.m_scalarA1,r.resetToPath(this.m_pathA1)):(o=this.m_vertexA0,h=this.m_scalarA0,r.resetToPath(this.m_pathA0));let c=!0;for(r.nextPath()||l("reshaper");;){const e=r.nextSegment();if(r.getStartPointIndex()===o){0!==h&&(e.queryCut(0,h,a),s.addSegment(a.get(),c),c=!1);break}s.addSegment(e,c),c=!1}if(i){const e=t.clone();e.reversePath(0),s.addSegmentsFromPath(e,0,0,e.getSegmentCount(),c)}else s.addSegmentsFromPath(t,0,0,t.getSegmentCount(),c);i?(h=this.m_scalarA0,r.resetToVertex(this.m_vertexA0,this.m_pathA0)):(h=this.m_scalarA1,r.resetToVertex(this.m_vertexA1,this.m_pathA1));{const e=r.nextSegment();1!==h&&(e.queryCut(h,1,a),s.addSegment(a.get(),!1))}for(;r.hasNextSegment();){const e=r.nextSegment();s.addSegment(e,!1)}const u=e.createInstance();let g=!1;for(let n=0;n<e.getPathCount();n++)n===this.m_pathA0||n===this.m_pathA1?g||(u.add(s,!1),g=!0):u.addPath(e,n,!0);return u}clearIndicesAndScalars(){this.m_pathA0=-1,this.m_pathA1=-1,this.m_vertexA0=-1,this.m_vertexA1=-1,this.m_vertexB0=-1,this.m_vertexB1=-1,this.m_scalarA0=Number.NaN,this.m_scalarA1=Number.NaN,this.m_scalarB0=Number.NaN,this.m_scalarB1=Number.NaN}}class p{getOperatorType(){return 10006}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!1}execute(e,t,r,s){return x(e,t,r,s)}}const S=new p;function y(e,t){const r=c(e),s=S.execute(u(e),g(t),_(r),null);return d(s,r)}function P(){return S.supportsCurves()}export{y as execute,P as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{isLoaded as r,load as e,execute as n,executeMany as t,supportsCurves as o}from"./gx/operatorShapePreservingDensify.js";import{getSpatialReference as s,toGeometry as u,fromSpatialReference as a,fromGeometry as p}from"./support/converterAPI.js";function c(){return r()}function i(){return e()}function f(r,e,t){const o=s(r);return u(n(p(r),a(o),e,t),o)}function m(r,e,n){const o=r.map(p),c=s(r);return t(o,a(c),e,n).map((r=>u(r,c)))}function x(){return o()}export{f as execute,m as executeMany,c as isLoaded,i as load,x as supportsCurves};
5
+ import{isSome as r}from"../../core/arrayUtils.js";import{isLoaded as t,load as e,execute as o,executeMany as n,supportsCurves as s}from"./gx/operatorShapePreservingDensify.js";import{getSpatialReference as u,toGeometry as a,fromSpatialReference as i,fromGeometry as p}from"./support/converterAPI.js";function c(){return t()}function f(){return e()}function m(r,t,e){const n=u(r);return a(o(p(r),i(n),t,e),n)}function x(t,e,o){const s=t.map(p),c=u(t);return n(s,i(c),e,o).map((r=>a(r,c))).filter(r)}function d(){return s()}export{m as execute,x as executeMany,c as isLoaded,f as load,d as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{ae as e,af as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 5}execute(e,t,n,s){return r(e,t,n,8,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
5
+ import{aE as e,aF as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 5}execute(e,t,n,s){return r(e,t,n,8,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{ae as e,af as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 7}execute(e,t,n,s){return r(e,t,n,2,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
5
+ import{aE as e,aF as r}from"../../chunks/Polyline.js";import{fromGeometry as t,fromSpatialReference as n}from"./support/converterAPI.js";class s extends e{getOperatorType(){return 7}execute(e,t,n,s){return r(e,t,n,2,s)}}const o=new s;function u(e,r){return o.execute(t(e),t(r),n(e.spatialReference),null)}function p(){return o.supportsCurves()}export{u as execute,p as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{i as e,E as t,M as n,P as s,a as r,b as a,c as o,d as i,G as u}from"../../../chunks/Polyline.js";import"../../../geometry.js";import{gradGcsIds as c,getMetersPerUnit as l,isProjectedWKT as h}from"../../../core/unitUtils.js";import{isGeographic as m}from"../../support/spatialReferenceUtils.js";import p from"../../Extent.js";import f from"../../Multipoint.js";import g from"../../Point.js";import y from"../../Polygon.js";import w from"../../Polyline.js";const C="_gxVersion",M=2,V=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function P(e){switch(e.type){case"point":return E(e);case"multipoint":return Z(e);case"polyline":return k(e);case"polygon":return j(e);case"extent":return d(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function d(e){if(!e.getCacheValue(C)){const n=new t;n.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&n.setInterval(M,0,e.mmin,e.mmax),e.hasZ&&n.setInterval(V,0,e.zmin,e.zmax),e.setCacheValue(C,n)}return e.getCacheValue(C)}function Z(e){if(!e.getCacheValue(C)){const t=new n,r=new s,a=e.points,o=e.hasM,i=e.hasZ,u=i?3:2;for(let e=0,n=a.length;e<n;e++){const n=a[e];r.setXYCoords(n[0],n[1]),i&&r.setZ(n[2]??0),o&&r.setM(n[u]??NaN),t.add(r)}e.setCacheValue(C,t)}return e.getCacheValue(C)}function E(e){if(!e.getCacheValue(C)){const t=new s;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(C,t)}return e.getCacheValue(C)}function j(e){if(!e.getCacheValue(C)){const t=new r;v(t,e),e.setCacheValue(C,t)}return e.getCacheValue(C)}function k(e){if(!e.getCacheValue(C)){const t=new a;v(t,e),e.setCacheValue(C,t)}return e.getCacheValue(C)}function v(e,t){const n=new s,r="polygon"===t.type?t.rings:t.paths,a=t.hasM,o=t.hasZ,i=o?3:2;for(let s=0,u=r.length;s<u;s++){const t=r[s];for(let s=0,r=t.length;s<r;s++){const r=t[s];n.setXYCoords(r[0],r[1]),o&&n.setZ(r[2]??0),a&&n.setM(r[i]??NaN),0===s?e.startPathPoint(n):e.lineToPoint(n)}}}function R(e){if(e.wkid)return o(e.wkid);const t=e.wkt2||e.wkt;return t?i(t):null}function X(e,t){if(e)switch(e.getGeometryType()){case u.enumPoint:return I(e,t);case u.enumEnvelope:return Y(e,t);case u.enumMultiPoint:return z(e,t);case u.enumPolyline:return D(e,t);case u.enumPolygon:return U(e,t)}return null}function Y(e,t){if(e.isEmpty())return null;const n=new p({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),s=e.getDescription();if(s.hasM()){const t=e.queryInterval(M,0);n.mmin=t.vmin,n.mmax=t.vmax}if(s.hasZ()){const t=e.queryInterval(V,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(C,e),n}function z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],i=new s;for(let s=0,c=e.getPointCount();s<c;s++){e.getPointByVal(s,i);const t=[i.getX(),i.getY()];a&&t.push(i.getZ()),r&&t.push(i.getM()),o.push(t)}const u=new f({hasM:r,hasZ:a,points:o,spatialReference:t});return u.setCacheValue(C,e),u}function I(e,t){if(e.isEmpty())return null;const n=new g({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(C,e),n}function U(e,t){if(e.isEmpty())return null;const n=new y({spatialReference:t});return N(n,e),n.setCacheValue(C,e),n}function D(e,t){if(e.isEmpty())return null;const n=new w({spatialReference:t});return N(n,e),n.setCacheValue(C,e),n}function N(e,t){const n=t.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],i=new s;for(let s=0,u=t.getPathCount();s<u;s++){o.push([]);for(let e=t.getPathStart(s),n=t.getPathEnd(s);e<n;e++){t.getPointByVal(e,i);const n=[i.getX(),i.getY()];a&&n.push(i.getZ()),r&&n.push(i.getM()),o[s].push(n)}}e.hasM=r,e.hasZ=a,"polygon"===e.type?e.rings=o:e.paths=o}e((e=>{let t,n;"number"==typeof e?t=e:n=e;const s={wkid:t,wkt:n};let r,a;if(n){r=h(n);const e=m(s);if(!r&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else r=!m(s);return a=t&&c.has(t)?Math.PI/200:r?l(s):Math.PI/180,{isPCS:r,metersOrRadiansPerUnit:a,semiMajor:0,wkidOrWkt:e}}));export{d as fromExtent,P as fromGeometry,Z as fromMultipoint,E as fromPoint,j as fromPolygon,k as fromPolyline,R as fromSpatialReference,x as getSpatialReference,Y as toExtent,X as toGeometry,z as toMultipoint,I as toPoint,U as toPolygon,D as toPolyline};
5
+ import{i as e,E as t,M as n,P as s,a as r,b as a,c as o,d as i,G as u,e as c}from"../../../chunks/Polyline.js";import"../../../geometry.js";import{gradGcsIds as l,getMetersPerUnit as h,isProjectedWKT as p}from"../../../core/unitUtils.js";import{isGeographic as m}from"../../support/spatialReferenceUtils.js";import f from"../../Extent.js";import g from"../../Multipoint.js";import y from"../../Point.js";import w from"../../Polygon.js";import C from"../../Polyline.js";const M="_gxVersion",x=2,V=1;function P(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function d(e){switch(e.type){case"point":return j(e);case"multipoint":return E(e);case"polyline":return k(e);case"polygon":return R(e);case"extent":return Z(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function Z(e){if(!e.getCacheValue(M)){const n=new t;n.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&n.setInterval(x,0,e.mmin,e.mmax),e.hasZ&&n.setInterval(V,0,e.zmin,e.zmax),e.setCacheValue(M,n)}return e.getCacheValue(M)}function E(e){if(!e.getCacheValue(M)){const t=new n,r=new s,a=e.points,o=e.hasM,i=e.hasZ,u=i?3:2;for(let e=0,n=a.length;e<n;e++){const n=a[e];r.setXYCoords(n[0],n[1]),i&&r.setZ(n[2]??0),o&&r.setM(n[u]??NaN),t.add(r)}e.setCacheValue(M,t)}return e.getCacheValue(M)}function j(e){if(!e.getCacheValue(M)){const t=new s;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(M,t)}return e.getCacheValue(M)}function R(e){if(!e.getCacheValue(M)){const t=new r;v(t,e),e.setCacheValue(M,t)}return e.getCacheValue(M)}function k(e){if(!e.getCacheValue(M)){const t=new a;v(t,e),e.setCacheValue(M,t)}return e.getCacheValue(M)}function v(e,t){const n=new s,r="polygon"===t.type?t.rings:t.paths,a=t.hasM,o=t.hasZ,i=o?3:2;for(let s=0,u=r.length;s<u;s++){const t=r[s];for(let s=0,r=t.length;s<r;s++){const r=t[s];n.setXYCoords(r[0],r[1]),o&&n.setZ(r[2]??0),a&&n.setM(r[i]??NaN),0===s?e.startPathPoint(n):e.lineToPoint(n)}}}function X(e){if(e.wkid)return o(e.wkid);const t=e.wkt2||e.wkt;return t?i(t):null}function Y(e,t){if(e)switch(e.getGeometryType()){case u.enumPoint:return U(e,t);case u.enumEnvelope:return z(e,t);case u.enumMultiPoint:return I(e,t);case u.enumPolyline:return N(e,t);case u.enumPolygon:return D(e,t)}return null}function z(e,t){if(e.isEmpty())return null;const n=new f({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),s=e.getDescription();if(s.hasM()){const t=e.queryInterval(x,0);n.mmin=t.vmin,n.mmax=t.vmax}if(s.hasZ()){const t=e.queryInterval(V,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(M,e),n}function I(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],i=new s;for(let s=0,c=e.getPointCount();s<c;s++){e.getPointByVal(s,i);const t=[i.getX(),i.getY()];a&&t.push(i.getZ()),r&&t.push(i.getM()),o.push(t)}const u=new g({hasM:r,hasZ:a,points:o,spatialReference:t});return u.setCacheValue(M,e),u}function U(e,t){if(e instanceof c)return new y({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new y({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(M,e),n}function D(e,t){if(e.isEmpty())return null;const n=new w({spatialReference:t});return T(n,e),n.setCacheValue(M,e),n}function N(e,t){if(e.isEmpty())return null;const n=new C({spatialReference:t});return T(n,e),n.setCacheValue(M,e),n}function T(e,t){const n=t.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],i=new s;for(let s=0,u=t.getPathCount();s<u;s++){o.push([]);for(let e=t.getPathStart(s),n=t.getPathEnd(s);e<n;e++){t.getPointByVal(e,i);const n=[i.getX(),i.getY()];a&&n.push(i.getZ()),r&&n.push(i.getM()),o[s].push(n)}}e.hasM=r,e.hasZ=a,"polygon"===e.type?e.rings=o:e.paths=o}e((e=>{let t,n;"number"==typeof e?t=e:n=e;const s={wkid:t,wkt:n};let r,a;if(n){r=p(n);const e=m(s);if(!r&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else r=!m(s);return a=t&&l.has(t)?Math.PI/200:r?h(s):Math.PI/180,{isPCS:r,metersOrRadiansPerUnit:a,semiMajor:0,wkidOrWkt:e}}));export{Z as fromExtent,d as fromGeometry,E as fromMultipoint,j as fromPoint,R as fromPolygon,k as fromPolyline,X as fromSpatialReference,P as getSpatialReference,z as toExtent,Y as toGeometry,I as toMultipoint,U as toPoint,D as toPolygon,N as toPolyline};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{replace as e}from"../../core/string.js";import{i as r,l as n,P as i,a as t}from"../../chunks/pe.js";import{SupportedGCSWkids as _}from"./SupportedGCSWkids.js";import a from"./WKIDUnitConversion.js";const l=[102100,102113,3857,3785,900913],E=[104905,104971],M=[4326,...l,...E],S=[-20037508.342788905,20037508.342788905],u=[-20037508.342787,20037508.342787],R={wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:S,origin:u,dx:1e-5},o={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:S,origin:u,dx:1e-5},102100:R,3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:S,origin:u,dx:1e-5},3857:R,4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},900913:R};function G(e,r){if(e===r)return!0;if(null==e||null==r)return!1;const n=e.wkid,i=r.wkid;if(null!=n||null!=i){if(n===i)return!0;if(w(e)&&w(r))return!0;const t=e.latestWkid;if(null!=t&&i===t)return!0;const _=r.latestWkid;return null!=_&&n===_}let t,_;return e.wkt2&&r.wkt2?(t=e.wkt2,_=r.wkt2):e.wkt&&r.wkt&&(t=e.wkt,_=r.wkt),!(!t||!_)&&t.toUpperCase()===_.toUpperCase()}function s(e){const r=e?.wkid;return null!=r&&r>=2e3&&o[r]||null}async function T(e,_){if(1===_&&!c(e)||2===_&&c(e))return e;r()||await n();const a=i.fromString(t.PE_TYPE_NONE,e);return a?.toString(1===_?t.PE_STR_FMT_WKT:t.PE_STR_FMT_WKT2)??null}function d(e){if(!e)return;const{wkid:r,vcsWkid:n}=e;if(r)return n?JSON.stringify({wkid:r,vcsWkid:n}):String(r);const i=e.wkt||e.wkt2;return JSON.stringify(i?n?{wkt:i,vcsWkid:n}:{wkt:i}:{})}function A(e){if(!N(e))return!1;const{wkid:r}=e;if(r)return null==a[r];const n=e.wkt2||e.wkt;return!!n&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(n)}function P(e){return!(f(e)||p(e))}function C(e){return 4326===e?.wkid}function c(e){return/^\s*(?:GEOD|GEODETIC|GEOG|GEOGRAPHIC|PROJ|PROJECTED|VERT|VERTICAL|ENG|ENGINEERING|PARAMETRIC|TIME|DERIVEDPROJ|COMPOUND|BOUND)CRS/i.test(e)}function k(e){return e?.wkid===_.CGCS2000}function w(e){const r=e?.wkid;return null!=r&&r>=2e3&&l.includes(r)}function O(e){return 32662===e?.wkid}function I(e){return e===_.GCSMARS2000||e===_.GCSMARS2000_SPHERE}function f(e){return I(e?.wkid)}function D(e){return e===_.GCSMOON2000}function p(e){return D(e?.wkid)}function W(e){const r=e?.wkid;return null!=r&&r>=2e3&&M.includes(r)}function N(e){if(null==e)return!1;const r=e.wkid;return null!=r&&r>=2e3||(null!=e.wkt2||null!=e.wkt)}const g={wkid:4326,wkt:e(o[4326].wkTemplate,{Central_Meridian:"0.0"})},U={wkid:102100,latestWkid:3857},h={wkid:32662};export{G as equals,s as getInfo,T as getWKT,k as isCGCS2000,P as isEarth,A as isGeographic,f as isMars,p as isMoon,O as isPlateCarree,N as isValid,C as isWGS84,I as isWKIDFromMars,D as isWKIDFromMoon,c as isWKT2,w as isWebMercator,W as isWrappable,h as plateCarree,d as srToRESTValue,U as webMercator,u as webMercatorOrigin,g as wgs84};
5
+ import{replace as e}from"../../core/string.js";import{i as r,l as n,P as i,a as t}from"../../chunks/pe.js";import{SupportedGCSWkids as _}from"./SupportedGCSWkids.js";import a from"./WKIDUnitConversion.js";const l=[102100,102113,3857,3785,900913],E=[104905,104971],M=[4326,...l,...E],S=[-20037508.342788905,20037508.342788905],u=[-20037508.342787,20037508.342787],R={wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:S,origin:u,dx:1e-5},o={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:S,origin:u,dx:1e-5},102100:R,3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:S,origin:u,dx:1e-5},3857:R,4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},900913:R};function G(e,r){if(e===r)return!0;if(null==e||null==r)return!1;const n=e.wkid,i=r.wkid;if(null!=n||null!=i){if(n===i)return!0;if(w(e)&&w(r))return!0;const t=e.latestWkid;if(null!=t&&i===t)return!0;const _=r.latestWkid;return null!=_&&n===_}let t,_;return e.wkt2&&r.wkt2?(t=e.wkt2,_=r.wkt2):e.wkt&&r.wkt&&(t=e.wkt,_=r.wkt),!(!t||!_)&&t.toUpperCase()===_.toUpperCase()}function s(e){const r=e?.wkid;return null!=r&&r>=2e3&&o[r]||null}async function T(e,_){if(1===_&&!c(e)||2===_&&c(e))return e;r()||await n();const a=i.fromString(t.PE_TYPE_NONE,e);return a?.toString(1===_?t.PE_STR_FMT_WKT:t.PE_STR_FMT_WKT2)??null}function d(e){if(!e)return;const{wkid:r,vcsWkid:n}=e;if(r)return n?JSON.stringify({wkid:r,vcsWkid:n}):String(r);const i=e.wkt||e.wkt2;return JSON.stringify(i?n?{wkt:i,vcsWkid:n}:{wkt:i}:{})}function A(e){if(!N(e))return!1;const{wkid:r}=e;if(r)return null==a[r];const n=e.wkt2||e.wkt;return!!n&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(n)}function P(e){return!(f(e)||p(e))}function C(e){return 4326===e?.wkid}function c(e){return/^\s*(?:GEOD|GEODETIC|GEOG|GEOGRAPHIC|PROJ|PROJECTED|VERT|VERTICAL|ENG|ENGINEERING|PARAMETRIC|TIME|DERIVEDPROJ|COMPOUND|BOUND)CRS/i.test(e)}function k(e){return e?.wkid===_.CGCS2000}function w(e){const r=e?.wkid;return null!=r&&r>=2e3&&l.includes(r)}function O(e){return 32662===e?.wkid}function I(e){return e===_.GCSMARS2000||e===_.GCSMARS2000_SPHERE}function f(e){return I(e?.wkid)}function D(e){return e===_.GCSMOON2000}function p(e){return D(e?.wkid)}function W(e){const r=e?.wkid;return null!=r&&r>=2e3&&M.includes(r)}function N(e){if(null==e)return!1;const r=e.wkid;return null!=r&&r>=2e3||(null!=e.wkt2||null!=e.wkt)}const g={wkid:4326,wkt:e(o[4326].wkTemplate,{Central_Meridian:"0.0"})},U={wkid:102100,latestWkid:3857},h={wkid:32662};export{G as equals,s as getInfo,T as getWKT,k as isCGCS2000,P as isEarth,A as isGeographic,f as isMars,p as isMoon,O as isPlateCarree,N as isValid,C as isWGS84,I as isWKIDFromMars,D as isWKIDFromMoon,c as isWKT2,w as isWebMercator,W as isWrappable,h as plateCarree,d as srToRESTValue,U as webMercator,u as webMercatorOrigin,S as webMercatorValid,g as wgs84};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{clone as n}from"../../core/lang.js";import t from"../SpatialReference.js";import{earth as e}from"./Ellipsoid.js";import{equals as i,isWebMercator as r,isWGS84 as s}from"./spatialReferenceUtils.js";const a=57.29577951308232,o=.017453292519943;function u(n){return n*a}function l(n){return n*o}function p(n){return n/e.radius}function f(n){return Math.PI/2-2*Math.atan(Math.exp(-n/e.radius))}function c(n){return null!=n.wkid||null!=n.wkt}const h=[0,0];function m(n,t,e,i,r){const s=n,a=r;if(a.spatialReference=e,"x"in s&&"x"in a)[a.x,a.y]=t(s.x,s.y,h,i);else if("xmin"in s&&"xmin"in a)[a.xmin,a.ymin]=t(s.xmin,s.ymin,h,i),[a.xmax,a.ymax]=t(s.xmax,s.ymax,h,i);else if("paths"in s&&"paths"in a||"rings"in s&&"rings"in a){const n="paths"in s?s.paths:s.rings,e=[];let r;for(let s=0;s<n.length;s++){const a=n[s];r=[],e.push(r);for(let n=0;n<a.length;n++)r.push(t(a[n][0],a[n][1],[0,0],i)),a[n].length>2&&r[n].push(a[n][2]),a[n].length>3&&r[n].push(a[n][3])}"paths"in a?a.paths=e:a.rings=e}else if("points"in s&&"points"in a){const n=s.points,e=[];for(let r=0;r<n.length;r++)e[r]=t(n[r][0],n[r][1],[0,0],i),n[r].length>2&&e[r].push(n[r][2]),n[r].length>3&&e[r].push(n[r][3]);a.points=e}return r}function x(n,t){const e=n&&(c(n)?n:n.spatialReference),a=t&&(c(t)?t:t.spatialReference);return!(n&&"type"in n&&"mesh"===n.type||t&&"type"in t&&"mesh"===t.type||!e||!a)&&(!!i(a,e)||(r(a)&&s(e)||r(e)&&s(a)))}function g(e,a){if(null==e)return null;const o=e.spatialReference,u=a&&(c(a)?a:a.spatialReference);return x(o,u)?i(o,u)?n(e):r(u)?m(e,M,t.WebMercator,!1,n(e)):s(u)?m(e,y,t.WGS84,!1,n(e)):null:null}function M(n,t,i=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const r=l(t);return i[0]=l(n)*e.radius,i[1]=e.halfSemiMajorAxis*Math.log((1+Math.sin(r))/(1-Math.sin(r))),i}function y(n,t,i=[0,0],r=!1){const s=u(n/e.radius);return i[0]=r?s:s-360*Math.floor((s+180)/360),i[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/e.radius))),i}function d(e,i=!1,r=n(e)){return m(e,M,t.WebMercator,i,r)}function R(e,i=!1,r=n(e)){return m(e,y,t.WGS84,i,r)}export{x as canProject,d as geographicToWebMercator,M as lngLatToXY,g as project,R as webMercatorToGeographic,p as x2lon,y as xyToLngLat,f as y2lat};
5
+ import{clone as n}from"../../core/lang.js";import t from"../SpatialReference.js";import{earth as e}from"./Ellipsoid.js";import{equals as i,isWebMercator as r,isWGS84 as s,webMercatorValid as a}from"./spatialReferenceUtils.js";const o=57.29577951308232,l=.017453292519943;function u(n){return n*o}function f(n){return n*l}function p(n){return n/e.radius}function c(n){return Math.PI/2-2*Math.atan(Math.exp(-n/e.radius))}function h(n){return null!=n.wkid||null!=n.wkt}const m=[0,0];function x(n,t,e,i,r){const s=n,a=r;if(a.spatialReference=e,"x"in s&&"x"in a)[a.x,a.y]=t(s.x,s.y,m,i);else if("xmin"in s&&"xmin"in a)[a.xmin,a.ymin]=t(s.xmin,s.ymin,m,i),[a.xmax,a.ymax]=t(s.xmax,s.ymax,m,i);else if("paths"in s&&"paths"in a||"rings"in s&&"rings"in a){const n="paths"in s?s.paths:s.rings,e=[];let r;for(let s=0;s<n.length;s++){const a=n[s];r=[],e.push(r);for(let n=0;n<a.length;n++)r.push(t(a[n][0],a[n][1],[0,0],i)),a[n].length>2&&r[n].push(a[n][2]),a[n].length>3&&r[n].push(a[n][3])}"paths"in a?a.paths=e:a.rings=e}else if("points"in s&&"points"in a){const n=s.points,e=[];for(let r=0;r<n.length;r++)e[r]=t(n[r][0],n[r][1],[0,0],i),n[r].length>2&&e[r].push(n[r][2]),n[r].length>3&&e[r].push(n[r][3]);a.points=e}return r}function g(n,t){const e=n&&(h(n)?n:n.spatialReference),a=t&&(h(t)?t:t.spatialReference);return!(n&&"type"in n&&"mesh"===n.type||t&&"type"in t&&"mesh"===t.type||!e||!a)&&(!!i(a,e)||(r(a)&&s(e)||r(e)&&s(a)))}function M(e,a){if(null==e)return null;const o=e.spatialReference,l=a&&(h(a)?a:a.spatialReference);return g(o,l)?i(o,l)?n(e):r(l)?x(e,y,t.WebMercator,!1,n(e)):s(l)?x(e,d,t.WGS84,!1,n(e)):null:null}function y(n,t,i=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const r=f(t);return i[0]=f(n)*e.radius,i[1]=e.halfSemiMajorAxis*Math.log((1+Math.sin(r))/(1-Math.sin(r))),i}function d(n,t,i=[0,0],r=!1){if(n===a[0])i[0]=-180;else if(n===a[1])i[0]=180;else{const t=u(n/e.radius);i[0]=r?t:t-360*Math.floor((t+180)/360)}return i[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/e.radius))),i}function R(e,i=!1,r=n(e)){return x(e,y,t.WebMercator,i,r)}function j(e,i=!1,r=n(e)){return x(e,d,t.WGS84,i,r)}export{g as canProject,R as geographicToWebMercator,y as lngLatToXY,M as project,j as webMercatorToGeographic,p as x2lon,d as xyToLngLat,c as y2lat};