@arcgis/core 4.33.0-next.20250421 → 4.33.0-next.20250423

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 (175) hide show
  1. package/arcade/geometry/constructors.js +1 -1
  2. package/assets/components/assets/icon/mosaicMethodBlend16.json +1 -0
  3. package/assets/components/assets/icon/mosaicMethodBlend24.json +1 -0
  4. package/assets/components/assets/icon/mosaicMethodBlend32.json +1 -0
  5. package/assets/components/assets/icon/mosaicMethodByAttribute16.json +1 -0
  6. package/assets/components/assets/icon/mosaicMethodByAttribute24.json +1 -0
  7. package/assets/components/assets/icon/mosaicMethodByAttribute32.json +1 -0
  8. package/assets/components/assets/icon/mosaicMethodClosestToCenter16.json +1 -0
  9. package/assets/components/assets/icon/mosaicMethodClosestToCenter24.json +1 -0
  10. package/assets/components/assets/icon/mosaicMethodClosestToCenter32.json +1 -0
  11. package/assets/components/assets/icon/mosaicMethodClosestToNadir16.json +1 -0
  12. package/assets/components/assets/icon/mosaicMethodClosestToNadir24.json +1 -0
  13. package/assets/components/assets/icon/mosaicMethodClosestToNadir32.json +1 -0
  14. package/assets/components/assets/icon/mosaicMethodFirst16.json +1 -0
  15. package/assets/components/assets/icon/mosaicMethodFirst24.json +1 -0
  16. package/assets/components/assets/icon/mosaicMethodFirst32.json +1 -0
  17. package/assets/components/assets/icon/mosaicMethodLast16.json +1 -0
  18. package/assets/components/assets/icon/mosaicMethodLast24.json +1 -0
  19. package/assets/components/assets/icon/mosaicMethodLast32.json +1 -0
  20. package/assets/components/assets/icon/mosaicMethodLockRaster16.json +1 -0
  21. package/assets/components/assets/icon/mosaicMethodLockRaster24.json +1 -0
  22. package/assets/components/assets/icon/mosaicMethodLockRaster32.json +1 -0
  23. package/assets/components/assets/icon/mosaicMethodMaximum16.json +1 -0
  24. package/assets/components/assets/icon/mosaicMethodMaximum24.json +1 -0
  25. package/assets/components/assets/icon/mosaicMethodMaximum32.json +1 -0
  26. package/assets/components/assets/icon/mosaicMethodMean16.json +1 -0
  27. package/assets/components/assets/icon/mosaicMethodMean24.json +1 -0
  28. package/assets/components/assets/icon/mosaicMethodMean32.json +1 -0
  29. package/assets/components/assets/icon/mosaicMethodMinimum16.json +1 -0
  30. package/assets/components/assets/icon/mosaicMethodMinimum24.json +1 -0
  31. package/assets/components/assets/icon/mosaicMethodMinimum32.json +1 -0
  32. package/assets/components/assets/icon/mosaicMethodNone16.json +1 -0
  33. package/assets/components/assets/icon/mosaicMethodNone24.json +1 -0
  34. package/assets/components/assets/icon/mosaicMethodNone32.json +1 -0
  35. package/assets/components/assets/icon/mosaicMethodNorthWest16.json +1 -0
  36. package/assets/components/assets/icon/mosaicMethodNorthWest24.json +1 -0
  37. package/assets/components/assets/icon/mosaicMethodNorthWest32.json +1 -0
  38. package/assets/components/assets/icon/mosaicMethodSeamline16.json +1 -0
  39. package/assets/components/assets/icon/mosaicMethodSeamline24.json +1 -0
  40. package/assets/components/assets/icon/mosaicMethodSeamline32.json +1 -0
  41. package/assets/components/assets/icon/mosaicMethodSum16.json +1 -0
  42. package/assets/components/assets/icon/mosaicMethodSum24.json +1 -0
  43. package/assets/components/assets/icon/mosaicMethodSum32.json +1 -0
  44. package/assets/esri/core/workers/RemoteClient.js +1 -1
  45. package/assets/esri/core/workers/chunks/{b2f9f0767dadf185120c.js → 00612d6e05b1c8647668.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{f54546c155fba2fd3a7e.js → 05d7d8ff3e4cbad32580.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{b1e275607d9754079f60.js → 079434fe765c53d304f2.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{0eed612e82a279ac8d1e.js → 11b55e7e76e50fe11bbe.js} +1 -1
  49. package/assets/esri/core/workers/chunks/235efd948ae470a6f238.js +1 -0
  50. package/assets/esri/core/workers/chunks/{0c6f2808c57ff820bfdd.js → 30551c1d3e4fa7be86c1.js} +2 -2
  51. package/assets/esri/core/workers/chunks/{0c6f2808c57ff820bfdd.js.LICENSE.txt → 30551c1d3e4fa7be86c1.js.LICENSE.txt} +1 -1
  52. package/assets/esri/core/workers/chunks/3293b4041c222299428f.js +1 -0
  53. package/assets/esri/core/workers/chunks/{78242f2bf742b33d99fa.js → 3795793643f4db64af0e.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{38f9ede26098eb03ca2d.js → 3cf001abca8ad933bccf.js} +2 -2
  55. package/assets/esri/core/workers/chunks/{38f9ede26098eb03ca2d.js.LICENSE.txt → 3cf001abca8ad933bccf.js.LICENSE.txt} +1 -1
  56. package/assets/esri/core/workers/chunks/{a91f2d1deb950f46ad09.js → 4f8782b3b6ad414409e8.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{dbaa4b8d37aab40d7bd1.js → 543eb46b55cacd6e1dbc.js} +2 -2
  58. package/assets/esri/core/workers/chunks/{dbaa4b8d37aab40d7bd1.js.LICENSE.txt → 543eb46b55cacd6e1dbc.js.LICENSE.txt} +1 -1
  59. package/assets/esri/core/workers/chunks/{93f792f5b94f3745b57d.js → 577f24923fa4d08360e4.js} +2 -2
  60. package/assets/esri/core/workers/chunks/{93f792f5b94f3745b57d.js.LICENSE.txt → 577f24923fa4d08360e4.js.LICENSE.txt} +1 -1
  61. package/assets/esri/core/workers/chunks/{f46c4a69ef2f763e905b.js → 5d63dfa5a60c88e03b28.js} +1 -1
  62. package/assets/esri/core/workers/chunks/7bfa18dd8771d4932533.js +1 -0
  63. package/assets/esri/core/workers/chunks/{96cddbbeef61a4f33f29.js → 7c42281188b874ffcdad.js} +1 -1
  64. package/assets/esri/core/workers/chunks/82555a39a60110ca2713.js +1 -0
  65. package/assets/esri/core/workers/chunks/8dd26b12c625d20196ed.js +319 -0
  66. package/assets/esri/core/workers/chunks/{736a11e64e5f03e3936b.js → 9408a72968cbd985dd24.js} +53 -53
  67. package/assets/esri/core/workers/chunks/{c2f38c66fae2cdb57445.js → 96e5d192c8d23c1e324f.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{796cf1c2ca9955595836.js → 9b2ab27159500315fbc1.js} +1 -1
  69. package/assets/esri/core/workers/chunks/a79511b926a2830bb160.js +1 -0
  70. package/assets/esri/core/workers/chunks/{814d72abbfdd4552e4ec.js → ac9c6779771ec855da79.js} +2 -2
  71. package/assets/esri/core/workers/chunks/{814d72abbfdd4552e4ec.js.LICENSE.txt → ac9c6779771ec855da79.js.LICENSE.txt} +1 -1
  72. package/assets/esri/core/workers/chunks/{ef6e805c49e1afdf966b.js → c054198c6438cb57f188.js} +1 -1
  73. package/assets/esri/core/workers/chunks/c5d786166a5609b85276.js.LICENSE.txt +1 -1
  74. package/assets/esri/core/workers/chunks/{601fc99426f0213b0769.js → cbec01223d51cdb9ee79.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{90c893959145827961ac.js → cd9343c78a7c3acdbbcd.js} +1 -1
  76. package/assets/esri/core/workers/chunks/d81bebbb6fe000200d35.js +1 -0
  77. package/assets/esri/core/workers/chunks/{5db336767959507c07e5.js → d8dc922f7466300b668f.js} +2 -2
  78. package/assets/esri/core/workers/chunks/{5db336767959507c07e5.js.LICENSE.txt → d8dc922f7466300b668f.js.LICENSE.txt} +1 -1
  79. package/assets/esri/core/workers/chunks/e524462c63834fae7e01.js +2 -0
  80. package/assets/esri/core/workers/chunks/{02176f84d6d57f1bc1c8.js.LICENSE.txt → e524462c63834fae7e01.js.LICENSE.txt} +1 -1
  81. package/assets/esri/core/workers/chunks/{e7e987558cf017c62458.js → ebfa4a0334401f5e004a.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{60d3b329e69f3cddb7f4.js → fa8a3c75f9b41d31559b.js} +1 -1
  83. package/assets/esri/core/workers/chunks/fd36b7aaf0d8e0c84471.js +1 -0
  84. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  85. package/assets/esri/themes/dark/main.css +1 -1
  86. package/assets/esri/themes/light/main.css +1 -1
  87. package/assets/esri/themes/light/view.css +1 -1
  88. package/chunks/Bufferer-CicaNej1.js +1 -1
  89. package/chunks/Envelope.js +1 -1
  90. package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
  91. package/chunks/Geometry.js +1 -1
  92. package/chunks/OperatorGeodesicBuffer.js +1 -1
  93. package/chunks/OperatorGeodeticArea.js +1 -1
  94. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  95. package/chunks/OperatorGeodeticLength.js +1 -1
  96. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  97. package/chunks/OperatorProximityGeodesic.js +1 -1
  98. package/chunks/OperatorShapePreservingLength.js +1 -1
  99. package/chunks/OperatorShapePreservingProject.js +1 -1
  100. package/chunks/OperatorSimplifyOGC.js +5 -0
  101. package/chunks/Point2D.js +1 -1
  102. package/chunks/ProjectionTransformation.js +1 -1
  103. package/chunks/QuadraticBezier.js +1 -1
  104. package/chunks/languageUtils.js +1 -1
  105. package/chunks/relateOperator.js +1 -1
  106. package/chunks/vxlLayer.js +1 -1
  107. package/geometry/operators/extendOperator.js +1 -1
  108. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  109. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  110. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  111. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  112. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  113. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  114. package/geometry/operators/gx/operatorSimplifyOGC.js +5 -0
  115. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  116. package/geometry/operators/reshapeOperator.js +1 -1
  117. package/geometry/operators/simplifyOGCOperator.d.ts +6 -0
  118. package/geometry/operators/simplifyOGCOperator.js +5 -0
  119. package/geometry/operators/support/jsonConverter.js +1 -1
  120. package/interfaces.d.ts +463 -55
  121. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  122. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  123. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  124. package/layers/support/wmsUtils.js +1 -1
  125. package/package.json +2 -2
  126. package/smartMapping/renderers/size.d.ts +1 -0
  127. package/smartMapping/renderers/size.js +1 -1
  128. package/smartMapping/renderers/support/referenceSizeUtils.js +1 -1
  129. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  130. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  131. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  132. package/support/revision.js +1 -1
  133. package/versionManagement/utils.js +1 -1
  134. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  135. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  136. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  137. package/views/3d/layers/graphics/pipeline/PipelineCommand.js +1 -1
  138. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  139. package/views/3d/layers/graphics/pipeline/TileActionSynchronizer.js +5 -0
  140. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  141. package/views/3d/webgl/ManagedFBO.js +1 -1
  142. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  143. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  144. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  145. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  146. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  147. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  148. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  149. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  150. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  151. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  152. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  153. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  154. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  155. package/views/interactive/Tooltip.js +1 -1
  156. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  157. package/views/layers/LineOfSightLayerView.d.ts +4 -0
  158. package/views/layers/LineOfSightLayerView.js +5 -0
  159. package/views/webgl/FramebufferObject.js +1 -1
  160. package/views/webgl/formats.js +5 -0
  161. package/views/webgl/textureUtils.js +1 -1
  162. package/widgets/Print/CustomTemplate.js +1 -1
  163. package/widgets/Print/PrintViewModel.js +1 -1
  164. package/widgets/Print/utils.js +1 -1
  165. package/widgets/Print.js +1 -1
  166. package/assets/esri/core/workers/chunks/02176f84d6d57f1bc1c8.js +0 -2
  167. package/assets/esri/core/workers/chunks/0a7cba60a5286ba621d4.js +0 -1
  168. package/assets/esri/core/workers/chunks/2cbab0c078d0b844934c.js +0 -1
  169. package/assets/esri/core/workers/chunks/38557792ff9516fc991b.js +0 -1
  170. package/assets/esri/core/workers/chunks/82353e59ac6d909dcf41.js +0 -1
  171. package/assets/esri/core/workers/chunks/873327fc41edd3830afa.js +0 -319
  172. package/assets/esri/core/workers/chunks/d28e2c9bdf514236b011.js +0 -1
  173. package/assets/esri/core/workers/chunks/daa54c8a317c27881763.js +0 -1
  174. package/assets/esri/core/workers/chunks/e15c612caadf7bac4ab9.js +0 -1
  175. package/views/3d/webgl/formats.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{G as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{l as i,d as n,i as s,G as o,t as r,g as h}from"../../../chunks/Geometry.js";import{m as d,P as g,i as a,u as c,n as l,b as u,d as f,v as m}from"../../../chunks/Point2D.js";import{a as p,M as E,r as x,e as P}from"../../../chunks/QuadraticBezier.js";function _(t,e,i,n,s,o){const r=n-e;if(r<=o)return P(t,e,i,n,s),i;const h=w(t,e,n,s,Math.min(Math.max(r>>1,3),100)),d=t[h];t[e]=u(t[h],t[h]=t[e]);let g=e+1,a=!1;for(let c=e+1;c!==n;++c)s(t[c],d)&&(t[g]=u(t[c],t[c]=t[g]),++g,a=!0);if(!a)for(let c=e+1;c<i;++c)s(d,t[c])||(c!==g&&(t[g]=u(t[c],t[c]=t[g])),++g);return--g,t[g]=u(t[e],t[e]=t[g]),g}function F(t,e,i){const n=Math.trunc(e/2);let s=BigInt(n);const o=BigInt(e);for(let h=0;h<i;++h)t.push(Number(s%o)),s=6364136223846793005n*s+1442695040888963407n&0x7fffffffffffffffn,s=BigInt.asUintN(64,s);m(t);const r=c(t,((t,e)=>t===e));t.length=r}function w(t,e,i,n,s){const o=[];F(o,i-e,s);const r=[];for(let d=0,g=o.length;d<g;d++){const i=o[d];r.push(l(t[e+i],i))}const h=Math.trunc(r.length/2);return r.sort(((t,e)=>n(t.first,e.first)?-1:1)),e+r[h].second}function k(){return{p:new g,userData:Number.NaN,edge:null}}class T{constructor(){this.info=0,this.mask=!1,this.p=null,this.a=[null,null],this.twin=null}nextFreeEdge(){return this.twin}setIndex(t){this.info=t,this.mask=!1}getIndex(){return this.info}setMask(){this.mask=!0}getMask(){return this.mask}}function y(t,e){return{first:t,second:e}}function b(t,e){t.first=e.first,t.second=e.second}function C(){return this.i1-this.i0}function D(){return{i0:Number.NaN,i1:Number.NaN,nextFreeEdgeIndex:[-1],box:[y(null,null),y(null,null)],size:C}}function I(){return{k:0,pTask:null,pTask0:null,pTask1:null}}function X(){return{p:[new g,new g],points:[null,null]}}function Y(){return{p:[null,null,null]}}class N{constructor(){this.m_nextFreePairEdge=y(null,null),this.m_points=[],this.m_pointZero=null,this.m_edges=[],this.m_voronoiToEdge=[],this.m_nextFreeEdge=0}clear(){this.m_nextFreePairEdge=y(null,null),this.m_points.length=0,this.m_pointZero=null,this.m_edges.length=0,this.m_voronoiToEdge.length=0,this.m_nextFreeEdge=0}reservePoints(t){h(t>1)}prepare(t){{const e=k();e.p.x=Number.POSITIVE_INFINITY,e.p.y=Number.POSITIVE_INFINITY,e.userData=t,this.m_points.push(e)}}addVertex(t,e){const i=k();i.p.assign(t),i.userData=e,i.edge=null,this.m_points.push(i)}removeDuplicates(){const t=this.m_points.shift();this.m_points.sort(((t,e)=>t.p.compareX(e.p)));const e=c(this.m_points,((t,e)=>t.p.equals(e.p))),i=e!==this.m_points.length;return this.m_points.length=e,this.m_points.unshift(t),i}boundVoronoiCells(t,e){const i=this.m_points.length;if(i<2)return!1;const n=[this.m_points[1].p.clone(),this.m_points[1].p.clone()];for(let d=2;d<i;d++){const t=this.m_points[d].p;t.x<n[0].x&&(n[0].x=t.x),n[1].x<t.x&&(n[1].x=t.x),t.y<n[0].y&&(n[0].y=t.y),n[1].y<t.y&&(n[1].y=t.y)}const s=new g;s.x=.5*(n[0].x+n[1].x),s.y=.5*(n[0].y+n[1].y);let o=0;for(let d=1;d<i;d++){const t=this.m_points[d].p,e=g.sqrDistanceCoords(t.x,t.y,s.x,s.y);o<e&&(o=e)}const r=Math.sqrt(o),h=Math.max(r+2*t,1.5*r);{const t=.8660254037844386,i=.5;let n=1,o=0;for(let r=0;r<12;r++){const r=new g;r.x=s.x+h*n,r.y=s.y+h*o,this.addVertex(r,e);const d=n*i+o*t;n=n*t-o*i,o=d}}return!0}construct(){const t=D();return!!this.constructTask(t)&&(this.solveTask(t),!0)}constructTask(t){if(this.m_pointZero=this.createZeroHandle(),h(void 0!==this.m_pointZero),this.m_points.length<3)return!1;const e=6*(this.m_points.length-2);this.m_edges=d(T,e);for(let i=0;i<e;i++)this.m_edges[i].setIndex(i);return t.i0=1,t.i1=this.m_points.length,t.nextFreeEdgeIndex[0]=0,!0}splitTask(t,e,i,n){const s=t,o=e,r=i,h=n;s.k=this.findMaxSide(h.i0,h.i1);let d=h.i0+h.i1>>1;const g=1250;if(0===s.k){d=_(this.m_points,h.i0,d,h.i1,((t,e)=>t.p[0]!==e.p[0]?t.p[0]<e.p[0]:t.p[1]<e.p[1]),g)}else{d=_(this.m_points,h.i0,d,h.i1,((t,e)=>t.p[1]!==e.p[1]?t.p[1]<e.p[1]:t.p[0]<e.p[0]),g)}o.i0=h.i0,o.i1=d,o.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(o.i1-o.i0-1)+2,r.i0=d,r.i1=h.i1,r.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(r.i1-r.i0-1)+2,s.pTask=h,s.pTask0=o,s.pTask1=r}solveMergeTask(t){const e=this.newPairEdgeEx(t.pTask.nextFreeEdgeIndex,!1);if(t.pTask.box[t.k]=y(t.pTask0.box[t.k].first,t.pTask1.box[t.k].second),t.pTask.box[1-t.k]=y(A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].first),this.getPointXYFromEdge(t.pTask1.box[1-t.k].first),1-t.k)?t.pTask0.box[1-t.k].first:t.pTask1.box[1-t.k].first,A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].second),this.getPointXYFromEdge(t.pTask1.box[1-t.k].second),1-t.k)?t.pTask1.box[1-t.k].second:t.pTask0.box[1-t.k].second),t.pTask.i0+2===t.pTask.i1){const i=t.pTask0.box[t.k].second,n=i.twin,s=t.pTask1.box[t.k].first,o=s.twin;return this.joinEdges2(n,o),this.joinEdges2(o,n),void this.join(i,s,0,1,e)}const i=[new Array(2),new Array(2)];i[0][0]=i[1][0]=y(t.pTask0.box[t.k].second,t.pTask0.box[t.k].second.twin),i[0][1]=i[1][1]=y(t.pTask1.box[t.k].first,t.pTask1.box[t.k].first.twin);const n=[!1,!1];if(t.pTask0.i0+1===t.pTask0.i1?(this.findEdgeSide(i[0],n,1,0),this.findEdgeSide(i[1],n,1,1)):(this.findEdge(i[0],n,0),this.findEdge(i[1],n,1)),n[0]||n[1]){if(n[0]){const e=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1);this.insertEdge(i[0][0].first,e.first,0),this.insertEdge(i[0][0].second,e.second,1)}if(n[1]){const e=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1);this.insertEdge(i[0][1].first,e.first,1),this.insertEdge(i[0][1].second,e.second,0)}}else this.getNextDEdge(i[0][0].first,0)!==i[0][0].first&&(i[1][0]=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1),this.insertEdge(i[0][0].first,i[1][0].first,0),this.insertEdge(i[0][0].second,i[1][0].second,1)),this.getNextDEdge(i[0][1].first,0)!==i[0][1].first&&(i[1][1]=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1),this.insertEdge(i[0][1].first,i[1][1].first,1),this.insertEdge(i[0][1].second,i[1][1].second,0));this.merge(i[1][0],i[0][0],i[0][1],i[1][1],e)}solveTask(t){const e=t;switch(e.i1-e.i0){case 1:{this.insertPoint(e.i0,e.nextFreeEdgeIndex);const t=this.m_points[e.i0].edge;e.box[0]=e.box[1]=l(t,t)}break;case 2:{const t=e.i0,i=t+1;this.insertPoint(t,e.nextFreeEdgeIndex),this.insertPoint(i,e.nextFreeEdgeIndex);const n=this.m_points[t],s=this.m_points[i],o=n.edge,r=s.edge,h=o.twin,d=r.twin;this.joinEdges2(h,d),this.joinEdges2(d,h);const g=this.newPairEdgeEx(e.nextFreeEdgeIndex,!1);this.join(o,r,0,1,g);for(let a=0;a<2;a++)e.box[a]=A(this.getPointXY(n),this.getPointXY(s),a)?y(o,r):y(r,o)}break;case 3:{const t=[e.i0,e.i0+1,e.i0+2];this.insertPoint(t[0],e.nextFreeEdgeIndex),this.insertPoint(t[1],e.nextFreeEdgeIndex),this.insertPoint(t[2],e.nextFreeEdgeIndex);const i=[this.m_points[t[0]],this.m_points[t[1]],this.m_points[t[2]]],n=this.caseFromCompare(i[0].p,i[1].p,i[2].p),s=[i[0].edge,i[1].edge,i[2].edge],o=N.c_aTableDelaunayTriangulationSolution[n],r=v(19*v(1+(7&o))),h=v(19*v(1+(o>>5)));let d=v(o<<3)>>6;const g=3&r,a=r>>6,c=3&h,l=h>>6;e.box[0]=y(s[g],s[a]),e.box[1]=y(s[c],s[l]);const f=[s[0].twin,s[1].twin,s[2].twin],m=[this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1)];switch(3===d&&(d=this.orientation(i[0].p,i[1].p,i[2].p)+1),d){case 0:this.joinEdges2(f[0],f[2]),this.joinEdges2(f[2],f[1]),this.joinEdges2(f[1],f[0]),this.join(s[0],s[2],0,1,m[0]),this.join(s[2],s[1],0,1,m[1]),this.join(s[1],s[0],0,1,m[2]);break;case 1:{const t=[0,1,2];t[3-(g+a)]=u(t[1],t[1]=t[3-(g+a)]),this.joinEdges2(f[t[0]],f[t[1]]),this.joinEdges2(f[t[1]],f[t[2]]),this.joinEdges2(f[t[2]],f[t[0]]),this.join(s[t[0]],s[t[1]],0,1,m[0]),this.join(s[t[1]],s[t[2]],0,1,m[1]),this.join(m[1].first,f[t[2]],0,1,m[2])}break;case 2:this.joinEdges2(f[0],f[1]),this.joinEdges2(f[1],f[2]),this.joinEdges2(f[2],f[0]),this.join(s[0],s[1],0,1,m[0]),this.join(s[1],s[2],0,1,m[1]),this.join(s[2],s[0],0,1,m[2])}}break;default:{const e=I(),i=D(),n=D();this.splitTask(e,i,n,t),this.solveTask(i),this.solveTask(n),this.solveMergeTask(e)}}}getOutsideHull(){const t=[],e=this.m_points[0].edge;let i=e;do{t.push(this.getPointFromEdge(this.getTwinEdge(i))),i=this.getNextDEdge(i,0)}while(i!==e);return t}getConvexHull(){const t=[],e=this.m_points[0].edge;let i=e;do{const e=this.getPointFromEdge(this.getTwinEdge(i));t.length<2||!this.insideLine(this.getPointXY(t.at(-2)),this.getPointXY(t.at(-1)),this.getPointXY(e))?t.push(e):t[t.length-1]=e,i=this.getNextDEdge(i,0)}while(i!==e);return 2<t.length&&this.insideLine(this.getPointXY(t[0]),this.getPointXY(t.at(-1)),this.getPointXY(t.at(-2)))&&t.pop(),2<t.length&&this.insideLine(this.getPointXY(t[1]),this.getPointXY(t[0]),this.getPointXY(t.at(-1)))&&(t[0]=t.at(-1),t.pop()),t}getVoronoiPolygon(t,e){t.length=0;const i=this.getEdgeFromPoint(e);let n=i;for(;;){const e=this.calculateCircleCenter(n);t.push(e);const s=this.getNextDEdge(n,1);if(s===i)break;n=s}}getNearestPoint(t){this.isInfinitePointFromPoint(t)&&r("Not supported for the infinite point");const e=this.getPointXY(t);let i=this.m_pointZero,n=Number.MAX_VALUE;const s=this.getEdgeFromPoint(t);let o=s;do{const t=this.getPointFromEdge(this.getTwinEdge(o));if(!this.isInfinitePointFromPoint(t)){const s=g.sqrDistance(e,this.getPointXY(t));s<n&&(i=t,n=s)}o=this.getCounterClockwiseEdge(o)}while(o!==s);return i}addConstraint(t,e){const i=[null],n=[null];if(!this.constraintFindFirstEdge(i,n,t,e))return y(n[0],i[0]);i[0]=this.getTwinEdge(i[0]);const s=this.getPointXY(t),o=this.getPointXY(e),h=[new Array(0),new Array(0)],d=i[0];for(;;){const t=this.getClockwiseEdge(n[0]);t.getMask()&&r("add_constraint");const d=y(t,this.getTwinEdge(t));this.deleteTwinEdges(d,!0);const g=this.getCounterClockwiseEdge(this.getTwinEdge(i[0])),a=this.getTwinEdge(this.getClockwiseEdge(n[0])),c=this.getPointFromEdge(a);if(c===e){h[0].push(i[0]),i[0]=g,h[1].push(n[0]),n[0]=a;break}const l=this.orientation(s,o,this.getPointXY(c));0===l&&r("add_constraint - point on constraint"),0<l?(h[0].push(i[0]),i[0]=g):(h[1].push(n[0]),n[0]=a)}h[0].push(i[0]),h[1].push(n[0]);const g=this.newPairEdge();g.first.setMask(),g.second.setMask(),this.join(n[0],d,1,1,g),this.triangulateConstraint(h[0],1,h[0].length-1,g),h[1].reverse();const a=y(g.second,g.first);return this.triangulateConstraint(h[1],1,h[1].length-1,a),a}verify(){for(let t=0,e=this.m_edges.length;t<e;t++){const e=this.m_edges[t];if(!e.getMask()&&!this.testEdge(e))return!1}return!0}getDelaunayTriangleCount(){return this.m_points.length-2<<1}getVoronoiSegments(t=Number.MAX_VALUE){const e=[];for(let i=0,n=this.m_edges.length;i<n;i+=2){const n=y(null,null);if(n.first=this.m_edges[i],n.second=n.first.twin,this.isInfinitePointFromEdge(n.first)&&(n.second=u(n.first,n.first=n.second)),this.isInfinitePointFromEdge(n.second)){const i=d(g,3);i[0]=this.calculateCircleCenter(this.getNextDEdge(n.first,0).twin,1),i[2]=this.calculateCircleCenter(this.getNextDEdge(n.first,1),1);const s=d(g,2);s[0].assign(i[0]),s[1].assign(i[2]),s[0].rightPerpendicularThis(),s[1].leftPerpendicularThis(),i[1]=i[0].add(s[0]).add(i[2].add(s[1])),i[1].normalize();for(const e of i)e.mulThis(t);const o=X();o.points[0]=n.first.p,o.points[1]=n.second.p;for(let t=0;t<i.length-1;t++){for(let e=0;e<2;e++)o.p[e]=i[t+e];o.p[0].equals(o.p[1])||e.push(o)}}else if(this.isInfinitePointFromEdge(this.getNextDEdge(n.first,0).twin)&&this.isInfinitePointFromEdge(this.getNextDEdge(n.first,1).twin)){const t=d(g,3);t[0]=this.calculateCircleCenter(n.first),t[1]=this.getPointXY(this.getPointFromEdge(n.first)).add(this.getPointXY(this.getPointFromEdge(n.second))).mul(.5),t[2]=this.calculateCircleCenter(n.second);const i=X();i.points[0]=n.first.p,i.points[1]=n.second.p;for(let n=0;n<t.length-1;n++){for(let e=0;e<2;e++)i.p[e]=t[n+e];i.p[0].equals(i.p[1])||e.push(i)}}else{const t=X();t.p[0]=this.calculateCircleCenter(n.first),t.p[1]=this.calculateCircleCenter(n.second),t.points[0]=n.first.p,t.points[1]=n.second.p,t.p[0].equals(t.p[1])||e.push(t)}}return e}startDelaunayTriangles(){return-1}nextDelaunayTriangle(t,e){for(;;){if(++e[0],e[0]===this.m_edges.length)return!1;const i=this.m_edges[e[0]];if(t.p[0]=this.getPointFromEdge(i),this.isInfinitePointFromPoint(t.p[0]))continue;const n=this.getTwinEdge(i);if(t.p[1]=this.getPointFromEdge(n),this.isInfinitePointFromPoint(t.p[1]))continue;if(this.getPointXY(t.p[1]).lt(this.getPointXY(t.p[0])))continue;const s=this.getTwinEdge(this.getNextDEdge(i,1));if(t.p[2]=this.getPointFromEdge(s),!this.isInfinitePointFromPoint(t.p[2])&&!this.getPointXY(t.p[2]).lt(this.getPointXY(t.p[0])))return!0}}getPointCount(){return this.m_points.length-1}getPoint(t){return this.m_points[t+1]}getInfinitePoint(){return this.m_pointZero}isInfinitePointFromPoint(t){return t===this.m_pointZero}getPointXY(t){return t.p}getPointIndex(t){return t.userData}setPointIndex(t,e){t.userData=e}getEdgeFromPoint(t){return t.edge}isInfinitePointFromEdge(t){return t.p===this.m_pointZero}getEdgeCount(){return this.m_edges.length}getEdge(t){return this.m_edges[t]}getEdgeIndex(t){return t.getIndex()}getPointFromEdge(t){return t.p}getPointXYFromEdge(t){return t.p.p}getCounterClockwiseEdge(t){return t.a[0]}getClockwiseEdge(t){return t.a[1]}getTwinEdge(t){return t.twin}getPreviousEdge(t){return this.getTwinEdge(this.getCounterClockwiseEdge(t))}getNextEdge(t){return this.getClockwiseEdge(this.getTwinEdge(t))}getNextDEdge(t,e=1){return t.a[e]}newPairEdge(){const t=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second);return this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge(),t.first.twin=t.second,t.second.twin=t.first,t}newPairEdgeEx(t,e){let i;if(e&&null!==this.m_nextFreePairEdge.first)i=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second),this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge();else{const e=t[0]++,n=t[0]++;i=y(this.m_edges[e],this.m_edges[n])}return i.first.twin=i.second,i.second.twin=i.first,i}insertEdge(t,e,i){e.p=t.p;const n=t.a[i],s=e.a;s[i]=n,s[1-i]=t,t.a[i]=e,n.a[1-i]=e}insertPoint(t,e){const i=this.m_points[t],n=this.newPairEdgeEx(e,!1),s=n.first,o=n.second;i.edge=n.first,s.p=this.m_points[t],s.a[0]=n.first,s.a[1]=n.first,o.p=this.m_pointZero,o.a[0]=n.second,o.a[1]=n.second,null===this.m_points[0].edge&&(this.m_points[0].edge=n.second)}deleteTwinEdges(t,e){this.deleteEdge(t.first),this.deleteEdge(t.second),e&&(t.first.twin=this.m_nextFreePairEdge.first,t.second.twin=this.m_nextFreePairEdge.second,this.m_nextFreePairEdge=t)}join(t,e,i,n,s){this.insertEdge(t,s.first,i),this.insertEdge(e,s.second,n)}joinEdges2(t,e){t.a[1]=e,e.a[0]=t}checkEdge(t,e,i,n,s){for(;;){const o=y(null,null);if(o.first=this.getNextDEdge(t.first,n),o.second=o.first.twin,this.isInfinitePointFromEdge(o.second))return t;const r=this.getPointXYFromEdge(t.second),h=this.getPointXYFromEdge(o.second);if(this.inCircle(e,i,r,h)<=0)return t;if(this.deleteTwinEdges(t,s),!s){const e=this.getNextDEdge(t.second,n).twin;this.join(o.second,e,n,n,t)}t=o}}calculateCircleCenter(t,e=Number.MAX_VALUE){const i=this.getPointXYFromEdge(t),n=this.getPointXYFromEdge(t.twin),s=this.getNextDEdge(t,0);if(this.isInfinitePointFromEdge(s.twin)){const t=new g;if(Number.isNaN(e))t.setNAN();else{const s=n.sub(i);s.leftPerpendicularThis(),t.assign(s),t.divThis(Math.max(Math.abs(t.x),Math.abs(t.y))),t.normalize(),t.mulThis(e)}return t}const o=this.getPointXYFromEdge(s.twin);return this.calculateCircleCenterFromThreePoints(i,n,o)}createZeroHandle(){return this.m_points[0]}deleteEdge(t){const e=t,i=e.p;i.edge===t&&(i.edge=e.a[0]),e.a[0].a[1]=e.a[1],e.a[1].a[0]=e.a[0]}testEdge(t){if(this.isInfinitePointFromEdge(t))return!0;const e=t.twin;if(this.isInfinitePointFromEdge(e))return!0;const i=this.getNextDEdge(t,0).twin,n=this.getNextDEdge(e,0).twin;if(this.isInfinitePointFromEdge(i)||this.isInfinitePointFromEdge(n))return!0;const s=this.getPointXYFromEdge(t),o=this.getPointXYFromEdge(e),r=this.getPointXYFromEdge(i),h=this.getPointXYFromEdge(n);return!(this.orientation(s,o,r)<=0)&&(!(0<=this.orientation(s,o,h))&&this.inCircle(s,o,r,h)<=0)}findMaxSide(t,e){const i=[this.m_points[t].p.clone(),this.m_points[t].p.clone()];for(t++;t!==e;t++){const e=this.m_points[t].p;e.x<i[0].x&&(i[0].x=e.x),i[1].x<e.x&&(i[1].x=e.x),e.y<i[0].y&&(i[0].y=e.y),i[1].y<e.y&&(i[1].y=e.y)}return i[1].x-i[0].x<i[1].y-i[0].y?1:0}findEdge(t,e,i){let n=!1,s=0;for(;;){const o=y(null,null);if(o.second=this.getNextDEdge(t[s].second,i^s),o.first=o.second.twin,0===i&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first))<0||1===i&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first)))t[s]=o,e[s]=!0,n=!1;else{if(n)return;s^=1,n=!0}}}findEdgeSide(t,e,i,n){for(;;){const s=y(null,null);if(s.second=this.getNextDEdge(t[i].second,n^i),s.first=s.second.twin,!(0===n&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))<0||1===n&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))))return;t[i]=s,e[i]=!0}}merge(t,e,i,n,s){const o={...t},r={...n},h={...s};let d={...e},g={...i};const a=d.second,c=g.second;for(;;){if(this.join(d.first,g.first,0,1,h),d.first=this.getNextDEdge(h.first,0),g.first=this.getNextDEdge(h.second,1),d.first===o.first&&g.first===r.first){this.joinEdges2(a,c),this.joinEdges2(r.second,o.second);break}d.second=d.first.twin,g.second=g.first.twin;const t=this.getPointXYFromEdge(h.first),e=this.getPointXYFromEdge(h.second);if(d.first===o.first){let i=y(null,null);i.first=this.getNextDEdge(g.first,1),i.second=i.first.twin,i=this.checkEdge(i,t,e,1,!1),b(d,h),b(h,g),g=y(i.second,i.first)}else if(g.first===r.first){let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1),g=y(h.second,h.first),b(h,d),d=y(i.second,i.first)}else{let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1);let n=y(null,null);n.first=this.getNextDEdge(g.first,1),n.second=n.first.twin,n=this.checkEdge(n,t,e,1,!1);const s=this.getPointXYFromEdge(i.second),o=this.getPointXYFromEdge(n.second);let r=this.inCircle(t,e,s,o);0===r&&(r=this.orientation(t,e,o)),0<r?(b(d,h),b(h,g),g=y(n.second,n.first)):(g=y(h.second,h.first),b(h,d),d=y(i.second,i.first))}this.deleteTwinEdges(h,!1)}}findEdgeClockwise(t,e,i,n,s,o){for(t[0]=n;;){e[0]=t[0],++e[0]===i.length&&(e[0]=0);const n=this.orientation(s,o,this.getPointXYFromEdge(i[e[0]]));if(n<=0)return n<0;t[0]=e[0]}}findEdgeCounterClockwise(t,e,i,n,s,o){for(e[0]=n;;){t[0]=0!==e[0]?e[0]:i.length,t[0]--;const n=this.orientation(s,o,this.getPointXYFromEdge(i[t[0]]));if(0<=n)return 0<n;e[0]=t[0]}}constraintFindFirstEdge(t,e,i,n){const s=[];{const o=this.getEdgeFromPoint(i);let r=o;do{const i=this.getTwinEdge(r);if(this.getPointFromEdge(i)===n)return t[0]=i,e[0]=r,t[0].setMask(),e[0].setMask(),!1;s.push(i),r=this.getClockwiseEdge(r)}while(r!==o)}s.length<3&&r("add_constraint");let o=-1;for(let c=0,l=s.length;c<l;c++)this.isInfinitePointFromEdge(s[c])&&(-1!==o&&r("add_constraint"),o=c);const h=this.getPointXY(i),d=this.getPointXY(n);let g,a;if(-1!==o){x(s,0,o+1,s.length),s.pop();0===this.orientation(h,d,this.getPointXYFromEdge(s[0]))&&r("add_constraint - point on constraint");for(0===this.orientation(h,d,this.getPointXYFromEdge(s.at(-1)))&&r("add_constraint - point on constraint"),g=0,a=s.length-1;g+1!==a;){const t=g+a>>1,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));0===e&&r("add_constraint - point on constraint"),0<e?g=t:a=t}}else{let t=0,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));if(0!==e)if(0<e){const e=[0],i=[0];this.findEdgeClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{const e=[0],i=[0];this.findEdgeCounterClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{t++,e=this.orientation(h,d,this.getPointXYFromEdge(s[t])),e<=0&&r("add_constraint");const i=[0],n=[0];this.findEdgeClockwise(i,n,s,t,h,d)||r("add_constraint"),g=i[0],a=n[0]}}return t[0]=s[g],e[0]=s[a],!0}triangulateConstraint(t,e,i,n){if(e===i)return;let s=i;for(let o=e;o!==i;++o)this.inCircle(this.getPointXYFromEdge(n.first),this.getPointXYFromEdge(n.second),this.getPointXYFromEdge(t[s]),this.getPointXYFromEdge(t[o]))<0&&(s=o);if(s!==i){const e=this.newPairEdge();this.join(n.first,t[s],1,1,e),t[s]=e.second,this.triangulateConstraint(t,s+1,i,e)}if(s!==e){const i=this.newPairEdge();this.join(t[s],n.second,1,0,i),this.triangulateConstraint(t,e,s-1,i)}}insideLine(t,e,i){return 0===this.orientation(t,e,i)&&(e.x<t.x!=e.x<i.x||e.y<t.y!=e.y<i.y)}orientation(t,e,i){return g.orientationRobust(t,e,i)}inCircle(t,e,i,n){return g.inCircleRobust(t,e,i,n)}calculateCircleCenterFromThreePoints(t,e,i){return e.lt(t)&&(e=u(t,t=e)),i.lt(e)&&(i=u(e,e=i)),e.lt(t)&&(e=u(t,t=e)),g.calculateCircleCenterFromThreePoints(t,e,i)}compare(t,e){return 3*((j(t[0]<e[0])<<1)+j(t[0]>e[0]))+(j(t[1]<e[1])<<1)+j(t[1]>e[1])-1}caseFromCompare(t,e,i){return(this.compare(t,e)<<6)+(this.compare(t,i)<<3)+this.compare(e,i)}}function j(t){return t?1:0}function A(t,e,i){return t[i]!==e[i]?t[i]<e[i]:t[1-i]<e[1-i]}function v(t){return 255&t}N.c_aTableDelaunayTriangulationSolution=Uint8Array.from([41,74,0,0,0,0,0,0,0,206,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,33,33,65,0,0,0,0,0,0,0,193,0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,214,173,0,0,0,0,0,0,0,107,239,0,0,0,0,0,0,0,0,0,181,0,0,0,0,0,0,0,181,0,0,0,0,0,0,117,117,245,0,0,0,0,0,0,0,0,0,103,0,0,0,0,0,0,0,167,0,0,0,0,0,0,231,103,231,0,0,0,0,0,0,50,0,0,0,0,0,0,0,0,198,0,0,41,0,0,74,0,0,49,0,0,49,0,0,50,0,0,194,0,0,193,0,0,194,0,0,0,0,0,206,0,0,0,0,0,0,0,0,54,0,0,0,0,0,0,0,0,198,0,0,0,0,0,82,50,82,0,0,0,0,0,0,0,198,0,66,0,0,65,0,0,66,49,66,33,57,65,82,50,90,0,194,0,0,193,0,0,194,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,222,0,0,0,0,0,0,178,0,0,0,0,0,0,230,102,230,177,0,0,177,0,0,178,0,177,0,0,177,0,0,178,0,113,226,113,113,249,226,122,226,0,0,0,0,0,0,102,0,0,0,0,0,0,0,190,0,0,0,0,0,0,230,102,230,0,0,0,165,0,0,0,0,0,0,0,0,243,0,0,0,0,0,173,0,0,0,0,0,0,0,0,165,0,0,0,0,0,0,0,0,245,0,0,0,0,0,107,0,0,239,0,0,163,0,0,163,0,0,167,0,0,247,0,0,243,0,0,247,0,0,37,37,69,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,69,0,0,0,0,0,37,37,69,0,0,0,0,0,0,0,221,0,0,0,0,215,0,0,211,0,0,215,35,87,35,35,91,87,63,87,0,215,0,0,211,0,0,215,0,0,0,165,0,0,0,0,0,0,115,115,243,0,0,0,0,0,0,181,0,0,0,0,0,0,0,189,0,0,0,0,0,0,117,117,245,0,0,0,99,0,0,99,0,0,103,0,163,0,0,163,0,0,167,0,99,247,115,123,243,231,103,255]);class M{constructor(t){this.m_numberOfSets=t,this.m_elements=Array.from({length:t},((t,e)=>e)),this.m_sizes=f(t,1)}getNumberOfSets(){return this.m_numberOfSets}connected(t,e){return this.findRoot(t)===this.findRoot(e)}connect(t,e){const i=this.findRoot(t),n=this.findRoot(e);return i!==n&&(this.m_sizes[i]<this.m_sizes[n]?(this.m_sizes[n]+=this.m_sizes[i],this.m_elements[i]=n):(this.m_sizes[i]+=this.m_sizes[n],this.m_elements[n]=i),--this.m_numberOfSets,!0)}connectRange(t,e,i){if(e!==i)for(let n=e;n<i;++n)this.connect(t[e],t[n])}size(){return this.m_elements.length}size1(t){return h(0),0}findRoot(t){let e=t;if(this.m_elements[e]!==e)do{this.m_elements[e]=this.m_elements[this.m_elements[e]],e=this.m_elements[e]}while(this.m_elements[e]!==e);return e}}function S(){return l(Number.NaN,l([0,0,0],[0,0,0]))}function G(t,e){if(t.first!==e.first)return t.first-e.first;let i=t.second.first,n=e.second.first;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];i=t.second.second,n=e.second.second;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];return 0}class q{getOperatorType(){return 10112}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!1}executeMany(t,e,i,n){return new z(t,e,i,n)}execute(t,e,i,n=null){const s=new z(null,e,!1,i);s.addGeometry(t);return s.buildAlphaShape(n)}}class z extends t{alphaShapeConstruct(t,e){const i=t.getEdgeCount(),n=new p({vd:this.m_vertexDescription});if(!n)throw new Error("alphaShapeConstruct");for(let s=0;s<i;++s){if(2!==e[s])continue;const i=y(null,null);i.first=t.getEdge(s),i.second=t.getTwinEdge(i.first);if(1!==e[t.getEdgeIndex(i.second)])continue;t.getPointXYFromEdge(i.first),n.startPath(t.getPointXYFromEdge(i.first));let o=s,r=i.second;for(;;){for(e[o]=3,r=t.getCounterClockwiseEdge(r);1===e[t.getEdgeIndex(r)];)r=t.getCounterClockwiseEdge(r);if(r===i.first)break;n.lineTo(t.getPointXYFromEdge(r)),o=t.getEdgeIndex(r),r=t.getTwinEdge(r)}}return n}alphaShape(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i);for(let s=0;s<i;++s){if(0!==n[s])continue;const i=Y(),o=t.getEdge(s);i.p[0]=t.getPointFromEdge(o);const r=t.getClockwiseEdge(t.getTwinEdge(o));i.p[1]=t.getPointFromEdge(r);const h=t.getEdgeIndex(r),a=t.getClockwiseEdge(t.getTwinEdge(r));i.p[2]=t.getPointFromEdge(a);const c=t.getEdgeIndex(a);let l=1;for(let e=0;e<3;++e)if(t.isInfinitePointFromPoint(i.p[e])){l=2;break}if(1===l){const n=d(g,3);for(let e=0;e<3;++e)n[e]=t.getPointXY(i.p[e]);const s=g.sqrDistance(n[0],n[1]),o=g.sqrDistance(n[1],n[2]),r=g.sqrDistance(n[2],n[0]),h=2*n[1].sub(n[0]).crossProduct(n[2].sub(n[0]));e<s*o*r/(h*h)&&(l=2)}n[s]=n[h]=n[c]=l}return this.alphaShapeConstruct(t,n)}alphaShapeAlphaOut(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i),s=[],o=new M(t.getPointCount());for(let h=0;h<i;++h){if(0!==n[h])continue;const e=Y(),i=t.getEdge(h);e.p[0]=t.getPointFromEdge(i);const o=t.getClockwiseEdge(t.getTwinEdge(i));e.p[1]=t.getPointFromEdge(o);const r=t.getEdgeIndex(o),d=t.getClockwiseEdge(t.getTwinEdge(o));e.p[2]=t.getPointFromEdge(d);const a=t.getEdgeIndex(d);let c=1;for(let n=0;n<3;++n)if(t.isInfinitePointFromPoint(e.p[n])){c=2;break}if(1===c){const i=new Array(3);for(let s=0;s<3;++s)i[s]=t.getPointXY(e.p[s]);const n=g.sqrDistance(i[0],i[1]),o=g.sqrDistance(i[1],i[2]),d=g.sqrDistance(i[2],i[0]),l=i[1].sub(i[0]).crossProduct(i[2].sub(i[0])),u=S();u.first=n*o*d/(l*l),u.second.first[0]=h,u.second.first[1]=r,u.second.first[2]=a,u.second.second[0]=t.getPointIndex(e.p[0]),u.second.second[1]=t.getPointIndex(e.p[1]),u.second.second[2]=t.getPointIndex(e.p[2]),s.push(u),c=2}n[h]=n[r]=n[a]=c}s.sort(((t,e)=>G(t,e)));let r=0;for(const h of s){if(1===o.getNumberOfSets()&&h.first!==r)break;n[h.second.first[0]]=n[h.second.first[1]]=n[h.second.first[2]]=1;const t=[h.second.second[0],h.second.second[1],h.second.second[2]];o.connectRange(t,0,3),r=h.first}return e&&(e[0]=.25*r),this.alphaShapeConstruct(t,n)}constructor(t,e,i,n){super(),this.m_multiPointForAttributes=null,this.m_inputGeometryCursor=null,this.m_index=-1,this.m_nDelaunayPoints=0,this.m_cDelaunay=new N,this.m_vertexDescription=null,this.m_progressTracker=n,this.m_alpha=Number.isNaN(e)||!Number.isFinite(e)||e<0?-1:e<Number.MIN_VALUE?0:e,this.m_bMerge=i,this.m_bDone=!1,this.m_inputGeometryCursor=t,this.prepareDelaunay()}prepareDelaunay(){this.m_nDelaunayPoints=0,this.m_cDelaunay.clear(),0!==this.m_alpha&&this.m_cDelaunay.prepare(a())}next(){if(this.m_bMerge){if(!this.m_bDone){const t=this.calculateAlphaShapeMerging(this.m_inputGeometryCursor,this.m_progressTracker);return this.m_bDone=!0,t}return null}if(!this.m_bDone){const t=this.m_inputGeometryCursor.next();if(null!==t)return i(t),n(t),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.calculateAlphaShape(t,this.m_progressTracker);this.m_bDone=!0}return null}tock(){return!0}getRank(){return 1}getGeometryID(){return this.m_index}calculateAlphaShapeMerging(t,e){let s;for(;s=t.next();)i(s),n(s),this.addGeometry(s);return this.buildAlphaShape()}calculateAlphaShape(t,e){return t.isEmpty()?new p({vd:t.getDescription()}):(this.prepareDelaunay(),this.addGeometry(t),this.buildAlphaShape())}buildAlphaShape(t=null){if(t&&(t[0]=this.m_alpha),0===this.m_alpha)return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;if(this.m_cDelaunay.removeDuplicates())for(let e=0,i=this.m_cDelaunay.getPointCount();e<i;++e)this.m_cDelaunay.setPointIndex(this.m_cDelaunay.getPoint(e),e);if(!this.m_cDelaunay.construct())return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;return this.m_alpha<0?this.alphaShapeAlphaOut(this.m_cDelaunay,t):this.alphaShape(this.m_cDelaunay,this.m_alpha)}addGeometry(t){if(i(t),n(t),0===this.m_alpha)return;if(this.m_vertexDescription&&this.m_bMerge||(this.m_vertexDescription=t.getDescription(),this.m_vertexDescription.getAttributeCount()>1?this.m_multiPointForAttributes=new E({vd:this.m_vertexDescription}):this.m_multiPointForAttributes=null),t.isEmpty())return;const e=t.getGeometryType();if(s(e)){const e=t,i=new g;for(let t=0,n=e.getPointCount();t<n;t++)e.queryXY(t,i),this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++);this.m_multiPointForAttributes&&this.m_multiPointForAttributes.addPoints(e,0,-1)}else if(e===o.enumPoint){const e=t,i=e.getXY();this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++),this.m_multiPointForAttributes&&this.m_multiPointForAttributes.add(e)}else r("bad geometry type")}}const V=new q;function O(t,e,i){return V.execute(t,e,null,i)}function Z(t,i,n){const s=V.executeMany(new e(t),i,n,null);return Array.from(s)}function R(){return V.supportsCurves()}export{O as execute,Z as executeMany,R as supportsCurves};
5
+ import{G as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{o as i,d as n,i as s,G as o,t as r,g as h}from"../../../chunks/Geometry.js";import{m as d,P as g,i as a,u as c,n as l,b as u,d as f,v as m}from"../../../chunks/Point2D.js";import{a as p,M as E,r as x,e as P}from"../../../chunks/QuadraticBezier.js";function _(t,e,i,n,s,o){const r=n-e;if(r<=o)return P(t,e,i,n,s),i;const h=w(t,e,n,s,Math.min(Math.max(r>>1,3),100)),d=t[h];t[e]=u(t[h],t[h]=t[e]);let g=e+1,a=!1;for(let c=e+1;c!==n;++c)s(t[c],d)&&(t[g]=u(t[c],t[c]=t[g]),++g,a=!0);if(!a)for(let c=e+1;c<i;++c)s(d,t[c])||(c!==g&&(t[g]=u(t[c],t[c]=t[g])),++g);return--g,t[g]=u(t[e],t[e]=t[g]),g}function F(t,e,i){const n=Math.trunc(e/2);let s=BigInt(n);const o=BigInt(e);for(let h=0;h<i;++h)t.push(Number(s%o)),s=6364136223846793005n*s+1442695040888963407n&0x7fffffffffffffffn,s=BigInt.asUintN(64,s);m(t);const r=c(t,((t,e)=>t===e));t.length=r}function w(t,e,i,n,s){const o=[];F(o,i-e,s);const r=[];for(let d=0,g=o.length;d<g;d++){const i=o[d];r.push(l(t[e+i],i))}const h=Math.trunc(r.length/2);return r.sort(((t,e)=>n(t.first,e.first)?-1:1)),e+r[h].second}function k(){return{p:new g,userData:Number.NaN,edge:null}}class T{constructor(){this.info=0,this.mask=!1,this.p=null,this.a=[null,null],this.twin=null}nextFreeEdge(){return this.twin}setIndex(t){this.info=t,this.mask=!1}getIndex(){return this.info}setMask(){this.mask=!0}getMask(){return this.mask}}function y(t,e){return{first:t,second:e}}function b(t,e){t.first=e.first,t.second=e.second}function C(){return this.i1-this.i0}function D(){return{i0:Number.NaN,i1:Number.NaN,nextFreeEdgeIndex:[-1],box:[y(null,null),y(null,null)],size:C}}function I(){return{k:0,pTask:null,pTask0:null,pTask1:null}}function X(){return{p:[new g,new g],points:[null,null]}}function Y(){return{p:[null,null,null]}}class N{constructor(){this.m_nextFreePairEdge=y(null,null),this.m_points=[],this.m_pointZero=null,this.m_edges=[],this.m_voronoiToEdge=[],this.m_nextFreeEdge=0}clear(){this.m_nextFreePairEdge=y(null,null),this.m_points.length=0,this.m_pointZero=null,this.m_edges.length=0,this.m_voronoiToEdge.length=0,this.m_nextFreeEdge=0}reservePoints(t){h(t>1)}prepare(t){{const e=k();e.p.x=Number.POSITIVE_INFINITY,e.p.y=Number.POSITIVE_INFINITY,e.userData=t,this.m_points.push(e)}}addVertex(t,e){const i=k();i.p.assign(t),i.userData=e,i.edge=null,this.m_points.push(i)}removeDuplicates(){const t=this.m_points.shift();this.m_points.sort(((t,e)=>t.p.compareX(e.p)));const e=c(this.m_points,((t,e)=>t.p.equals(e.p))),i=e!==this.m_points.length;return this.m_points.length=e,this.m_points.unshift(t),i}boundVoronoiCells(t,e){const i=this.m_points.length;if(i<2)return!1;const n=[this.m_points[1].p.clone(),this.m_points[1].p.clone()];for(let d=2;d<i;d++){const t=this.m_points[d].p;t.x<n[0].x&&(n[0].x=t.x),n[1].x<t.x&&(n[1].x=t.x),t.y<n[0].y&&(n[0].y=t.y),n[1].y<t.y&&(n[1].y=t.y)}const s=new g;s.x=.5*(n[0].x+n[1].x),s.y=.5*(n[0].y+n[1].y);let o=0;for(let d=1;d<i;d++){const t=this.m_points[d].p,e=g.sqrDistanceCoords(t.x,t.y,s.x,s.y);o<e&&(o=e)}const r=Math.sqrt(o),h=Math.max(r+2*t,1.5*r);{const t=.8660254037844386,i=.5;let n=1,o=0;for(let r=0;r<12;r++){const r=new g;r.x=s.x+h*n,r.y=s.y+h*o,this.addVertex(r,e);const d=n*i+o*t;n=n*t-o*i,o=d}}return!0}construct(){const t=D();return!!this.constructTask(t)&&(this.solveTask(t),!0)}constructTask(t){if(this.m_pointZero=this.createZeroHandle(),h(void 0!==this.m_pointZero),this.m_points.length<3)return!1;const e=6*(this.m_points.length-2);this.m_edges=d(T,e);for(let i=0;i<e;i++)this.m_edges[i].setIndex(i);return t.i0=1,t.i1=this.m_points.length,t.nextFreeEdgeIndex[0]=0,!0}splitTask(t,e,i,n){const s=t,o=e,r=i,h=n;s.k=this.findMaxSide(h.i0,h.i1);let d=h.i0+h.i1>>1;const g=1250;if(0===s.k){d=_(this.m_points,h.i0,d,h.i1,((t,e)=>t.p[0]!==e.p[0]?t.p[0]<e.p[0]:t.p[1]<e.p[1]),g)}else{d=_(this.m_points,h.i0,d,h.i1,((t,e)=>t.p[1]!==e.p[1]?t.p[1]<e.p[1]:t.p[0]<e.p[0]),g)}o.i0=h.i0,o.i1=d,o.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(o.i1-o.i0-1)+2,r.i0=d,r.i1=h.i1,r.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(r.i1-r.i0-1)+2,s.pTask=h,s.pTask0=o,s.pTask1=r}solveMergeTask(t){const e=this.newPairEdgeEx(t.pTask.nextFreeEdgeIndex,!1);if(t.pTask.box[t.k]=y(t.pTask0.box[t.k].first,t.pTask1.box[t.k].second),t.pTask.box[1-t.k]=y(A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].first),this.getPointXYFromEdge(t.pTask1.box[1-t.k].first),1-t.k)?t.pTask0.box[1-t.k].first:t.pTask1.box[1-t.k].first,A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].second),this.getPointXYFromEdge(t.pTask1.box[1-t.k].second),1-t.k)?t.pTask1.box[1-t.k].second:t.pTask0.box[1-t.k].second),t.pTask.i0+2===t.pTask.i1){const i=t.pTask0.box[t.k].second,n=i.twin,s=t.pTask1.box[t.k].first,o=s.twin;return this.joinEdges2(n,o),this.joinEdges2(o,n),void this.join(i,s,0,1,e)}const i=[new Array(2),new Array(2)];i[0][0]=i[1][0]=y(t.pTask0.box[t.k].second,t.pTask0.box[t.k].second.twin),i[0][1]=i[1][1]=y(t.pTask1.box[t.k].first,t.pTask1.box[t.k].first.twin);const n=[!1,!1];if(t.pTask0.i0+1===t.pTask0.i1?(this.findEdgeSide(i[0],n,1,0),this.findEdgeSide(i[1],n,1,1)):(this.findEdge(i[0],n,0),this.findEdge(i[1],n,1)),n[0]||n[1]){if(n[0]){const e=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1);this.insertEdge(i[0][0].first,e.first,0),this.insertEdge(i[0][0].second,e.second,1)}if(n[1]){const e=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1);this.insertEdge(i[0][1].first,e.first,1),this.insertEdge(i[0][1].second,e.second,0)}}else this.getNextDEdge(i[0][0].first,0)!==i[0][0].first&&(i[1][0]=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1),this.insertEdge(i[0][0].first,i[1][0].first,0),this.insertEdge(i[0][0].second,i[1][0].second,1)),this.getNextDEdge(i[0][1].first,0)!==i[0][1].first&&(i[1][1]=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1),this.insertEdge(i[0][1].first,i[1][1].first,1),this.insertEdge(i[0][1].second,i[1][1].second,0));this.merge(i[1][0],i[0][0],i[0][1],i[1][1],e)}solveTask(t){const e=t;switch(e.i1-e.i0){case 1:{this.insertPoint(e.i0,e.nextFreeEdgeIndex);const t=this.m_points[e.i0].edge;e.box[0]=e.box[1]=l(t,t)}break;case 2:{const t=e.i0,i=t+1;this.insertPoint(t,e.nextFreeEdgeIndex),this.insertPoint(i,e.nextFreeEdgeIndex);const n=this.m_points[t],s=this.m_points[i],o=n.edge,r=s.edge,h=o.twin,d=r.twin;this.joinEdges2(h,d),this.joinEdges2(d,h);const g=this.newPairEdgeEx(e.nextFreeEdgeIndex,!1);this.join(o,r,0,1,g);for(let a=0;a<2;a++)e.box[a]=A(this.getPointXY(n),this.getPointXY(s),a)?y(o,r):y(r,o)}break;case 3:{const t=[e.i0,e.i0+1,e.i0+2];this.insertPoint(t[0],e.nextFreeEdgeIndex),this.insertPoint(t[1],e.nextFreeEdgeIndex),this.insertPoint(t[2],e.nextFreeEdgeIndex);const i=[this.m_points[t[0]],this.m_points[t[1]],this.m_points[t[2]]],n=this.caseFromCompare(i[0].p,i[1].p,i[2].p),s=[i[0].edge,i[1].edge,i[2].edge],o=N.c_aTableDelaunayTriangulationSolution[n],r=v(19*v(1+(7&o))),h=v(19*v(1+(o>>5)));let d=v(o<<3)>>6;const g=3&r,a=r>>6,c=3&h,l=h>>6;e.box[0]=y(s[g],s[a]),e.box[1]=y(s[c],s[l]);const f=[s[0].twin,s[1].twin,s[2].twin],m=[this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1)];switch(3===d&&(d=this.orientation(i[0].p,i[1].p,i[2].p)+1),d){case 0:this.joinEdges2(f[0],f[2]),this.joinEdges2(f[2],f[1]),this.joinEdges2(f[1],f[0]),this.join(s[0],s[2],0,1,m[0]),this.join(s[2],s[1],0,1,m[1]),this.join(s[1],s[0],0,1,m[2]);break;case 1:{const t=[0,1,2];t[3-(g+a)]=u(t[1],t[1]=t[3-(g+a)]),this.joinEdges2(f[t[0]],f[t[1]]),this.joinEdges2(f[t[1]],f[t[2]]),this.joinEdges2(f[t[2]],f[t[0]]),this.join(s[t[0]],s[t[1]],0,1,m[0]),this.join(s[t[1]],s[t[2]],0,1,m[1]),this.join(m[1].first,f[t[2]],0,1,m[2])}break;case 2:this.joinEdges2(f[0],f[1]),this.joinEdges2(f[1],f[2]),this.joinEdges2(f[2],f[0]),this.join(s[0],s[1],0,1,m[0]),this.join(s[1],s[2],0,1,m[1]),this.join(s[2],s[0],0,1,m[2])}}break;default:{const e=I(),i=D(),n=D();this.splitTask(e,i,n,t),this.solveTask(i),this.solveTask(n),this.solveMergeTask(e)}}}getOutsideHull(){const t=[],e=this.m_points[0].edge;let i=e;do{t.push(this.getPointFromEdge(this.getTwinEdge(i))),i=this.getNextDEdge(i,0)}while(i!==e);return t}getConvexHull(){const t=[],e=this.m_points[0].edge;let i=e;do{const e=this.getPointFromEdge(this.getTwinEdge(i));t.length<2||!this.insideLine(this.getPointXY(t.at(-2)),this.getPointXY(t.at(-1)),this.getPointXY(e))?t.push(e):t[t.length-1]=e,i=this.getNextDEdge(i,0)}while(i!==e);return 2<t.length&&this.insideLine(this.getPointXY(t[0]),this.getPointXY(t.at(-1)),this.getPointXY(t.at(-2)))&&t.pop(),2<t.length&&this.insideLine(this.getPointXY(t[1]),this.getPointXY(t[0]),this.getPointXY(t.at(-1)))&&(t[0]=t.at(-1),t.pop()),t}getVoronoiPolygon(t,e){t.length=0;const i=this.getEdgeFromPoint(e);let n=i;for(;;){const e=this.calculateCircleCenter(n);t.push(e);const s=this.getNextDEdge(n,1);if(s===i)break;n=s}}getNearestPoint(t){this.isInfinitePointFromPoint(t)&&r("Not supported for the infinite point");const e=this.getPointXY(t);let i=this.m_pointZero,n=Number.MAX_VALUE;const s=this.getEdgeFromPoint(t);let o=s;do{const t=this.getPointFromEdge(this.getTwinEdge(o));if(!this.isInfinitePointFromPoint(t)){const s=g.sqrDistance(e,this.getPointXY(t));s<n&&(i=t,n=s)}o=this.getCounterClockwiseEdge(o)}while(o!==s);return i}addConstraint(t,e){const i=[null],n=[null];if(!this.constraintFindFirstEdge(i,n,t,e))return y(n[0],i[0]);i[0]=this.getTwinEdge(i[0]);const s=this.getPointXY(t),o=this.getPointXY(e),h=[new Array(0),new Array(0)],d=i[0];for(;;){const t=this.getClockwiseEdge(n[0]);t.getMask()&&r("add_constraint");const d=y(t,this.getTwinEdge(t));this.deleteTwinEdges(d,!0);const g=this.getCounterClockwiseEdge(this.getTwinEdge(i[0])),a=this.getTwinEdge(this.getClockwiseEdge(n[0])),c=this.getPointFromEdge(a);if(c===e){h[0].push(i[0]),i[0]=g,h[1].push(n[0]),n[0]=a;break}const l=this.orientation(s,o,this.getPointXY(c));0===l&&r("add_constraint - point on constraint"),0<l?(h[0].push(i[0]),i[0]=g):(h[1].push(n[0]),n[0]=a)}h[0].push(i[0]),h[1].push(n[0]);const g=this.newPairEdge();g.first.setMask(),g.second.setMask(),this.join(n[0],d,1,1,g),this.triangulateConstraint(h[0],1,h[0].length-1,g),h[1].reverse();const a=y(g.second,g.first);return this.triangulateConstraint(h[1],1,h[1].length-1,a),a}verify(){for(let t=0,e=this.m_edges.length;t<e;t++){const e=this.m_edges[t];if(!e.getMask()&&!this.testEdge(e))return!1}return!0}getDelaunayTriangleCount(){return this.m_points.length-2<<1}getVoronoiSegments(t=Number.MAX_VALUE){const e=[];for(let i=0,n=this.m_edges.length;i<n;i+=2){const n=y(null,null);if(n.first=this.m_edges[i],n.second=n.first.twin,this.isInfinitePointFromEdge(n.first)&&(n.second=u(n.first,n.first=n.second)),this.isInfinitePointFromEdge(n.second)){const i=d(g,3);i[0]=this.calculateCircleCenter(this.getNextDEdge(n.first,0).twin,1),i[2]=this.calculateCircleCenter(this.getNextDEdge(n.first,1),1);const s=d(g,2);s[0].assign(i[0]),s[1].assign(i[2]),s[0].rightPerpendicularThis(),s[1].leftPerpendicularThis(),i[1]=i[0].add(s[0]).add(i[2].add(s[1])),i[1].normalize();for(const e of i)e.mulThis(t);const o=X();o.points[0]=n.first.p,o.points[1]=n.second.p;for(let t=0;t<i.length-1;t++){for(let e=0;e<2;e++)o.p[e]=i[t+e];o.p[0].equals(o.p[1])||e.push(o)}}else if(this.isInfinitePointFromEdge(this.getNextDEdge(n.first,0).twin)&&this.isInfinitePointFromEdge(this.getNextDEdge(n.first,1).twin)){const t=d(g,3);t[0]=this.calculateCircleCenter(n.first),t[1]=this.getPointXY(this.getPointFromEdge(n.first)).add(this.getPointXY(this.getPointFromEdge(n.second))).mul(.5),t[2]=this.calculateCircleCenter(n.second);const i=X();i.points[0]=n.first.p,i.points[1]=n.second.p;for(let n=0;n<t.length-1;n++){for(let e=0;e<2;e++)i.p[e]=t[n+e];i.p[0].equals(i.p[1])||e.push(i)}}else{const t=X();t.p[0]=this.calculateCircleCenter(n.first),t.p[1]=this.calculateCircleCenter(n.second),t.points[0]=n.first.p,t.points[1]=n.second.p,t.p[0].equals(t.p[1])||e.push(t)}}return e}startDelaunayTriangles(){return-1}nextDelaunayTriangle(t,e){for(;;){if(++e[0],e[0]===this.m_edges.length)return!1;const i=this.m_edges[e[0]];if(t.p[0]=this.getPointFromEdge(i),this.isInfinitePointFromPoint(t.p[0]))continue;const n=this.getTwinEdge(i);if(t.p[1]=this.getPointFromEdge(n),this.isInfinitePointFromPoint(t.p[1]))continue;if(this.getPointXY(t.p[1]).lt(this.getPointXY(t.p[0])))continue;const s=this.getTwinEdge(this.getNextDEdge(i,1));if(t.p[2]=this.getPointFromEdge(s),!this.isInfinitePointFromPoint(t.p[2])&&!this.getPointXY(t.p[2]).lt(this.getPointXY(t.p[0])))return!0}}getPointCount(){return this.m_points.length-1}getPoint(t){return this.m_points[t+1]}getInfinitePoint(){return this.m_pointZero}isInfinitePointFromPoint(t){return t===this.m_pointZero}getPointXY(t){return t.p}getPointIndex(t){return t.userData}setPointIndex(t,e){t.userData=e}getEdgeFromPoint(t){return t.edge}isInfinitePointFromEdge(t){return t.p===this.m_pointZero}getEdgeCount(){return this.m_edges.length}getEdge(t){return this.m_edges[t]}getEdgeIndex(t){return t.getIndex()}getPointFromEdge(t){return t.p}getPointXYFromEdge(t){return t.p.p}getCounterClockwiseEdge(t){return t.a[0]}getClockwiseEdge(t){return t.a[1]}getTwinEdge(t){return t.twin}getPreviousEdge(t){return this.getTwinEdge(this.getCounterClockwiseEdge(t))}getNextEdge(t){return this.getClockwiseEdge(this.getTwinEdge(t))}getNextDEdge(t,e=1){return t.a[e]}newPairEdge(){const t=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second);return this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge(),t.first.twin=t.second,t.second.twin=t.first,t}newPairEdgeEx(t,e){let i;if(e&&null!==this.m_nextFreePairEdge.first)i=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second),this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge();else{const e=t[0]++,n=t[0]++;i=y(this.m_edges[e],this.m_edges[n])}return i.first.twin=i.second,i.second.twin=i.first,i}insertEdge(t,e,i){e.p=t.p;const n=t.a[i],s=e.a;s[i]=n,s[1-i]=t,t.a[i]=e,n.a[1-i]=e}insertPoint(t,e){const i=this.m_points[t],n=this.newPairEdgeEx(e,!1),s=n.first,o=n.second;i.edge=n.first,s.p=this.m_points[t],s.a[0]=n.first,s.a[1]=n.first,o.p=this.m_pointZero,o.a[0]=n.second,o.a[1]=n.second,null===this.m_points[0].edge&&(this.m_points[0].edge=n.second)}deleteTwinEdges(t,e){this.deleteEdge(t.first),this.deleteEdge(t.second),e&&(t.first.twin=this.m_nextFreePairEdge.first,t.second.twin=this.m_nextFreePairEdge.second,this.m_nextFreePairEdge=t)}join(t,e,i,n,s){this.insertEdge(t,s.first,i),this.insertEdge(e,s.second,n)}joinEdges2(t,e){t.a[1]=e,e.a[0]=t}checkEdge(t,e,i,n,s){for(;;){const o=y(null,null);if(o.first=this.getNextDEdge(t.first,n),o.second=o.first.twin,this.isInfinitePointFromEdge(o.second))return t;const r=this.getPointXYFromEdge(t.second),h=this.getPointXYFromEdge(o.second);if(this.inCircle(e,i,r,h)<=0)return t;if(this.deleteTwinEdges(t,s),!s){const e=this.getNextDEdge(t.second,n).twin;this.join(o.second,e,n,n,t)}t=o}}calculateCircleCenter(t,e=Number.MAX_VALUE){const i=this.getPointXYFromEdge(t),n=this.getPointXYFromEdge(t.twin),s=this.getNextDEdge(t,0);if(this.isInfinitePointFromEdge(s.twin)){const t=new g;if(Number.isNaN(e))t.setNAN();else{const s=n.sub(i);s.leftPerpendicularThis(),t.assign(s),t.divThis(Math.max(Math.abs(t.x),Math.abs(t.y))),t.normalize(),t.mulThis(e)}return t}const o=this.getPointXYFromEdge(s.twin);return this.calculateCircleCenterFromThreePoints(i,n,o)}createZeroHandle(){return this.m_points[0]}deleteEdge(t){const e=t,i=e.p;i.edge===t&&(i.edge=e.a[0]),e.a[0].a[1]=e.a[1],e.a[1].a[0]=e.a[0]}testEdge(t){if(this.isInfinitePointFromEdge(t))return!0;const e=t.twin;if(this.isInfinitePointFromEdge(e))return!0;const i=this.getNextDEdge(t,0).twin,n=this.getNextDEdge(e,0).twin;if(this.isInfinitePointFromEdge(i)||this.isInfinitePointFromEdge(n))return!0;const s=this.getPointXYFromEdge(t),o=this.getPointXYFromEdge(e),r=this.getPointXYFromEdge(i),h=this.getPointXYFromEdge(n);return!(this.orientation(s,o,r)<=0)&&(!(0<=this.orientation(s,o,h))&&this.inCircle(s,o,r,h)<=0)}findMaxSide(t,e){const i=[this.m_points[t].p.clone(),this.m_points[t].p.clone()];for(t++;t!==e;t++){const e=this.m_points[t].p;e.x<i[0].x&&(i[0].x=e.x),i[1].x<e.x&&(i[1].x=e.x),e.y<i[0].y&&(i[0].y=e.y),i[1].y<e.y&&(i[1].y=e.y)}return i[1].x-i[0].x<i[1].y-i[0].y?1:0}findEdge(t,e,i){let n=!1,s=0;for(;;){const o=y(null,null);if(o.second=this.getNextDEdge(t[s].second,i^s),o.first=o.second.twin,0===i&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first))<0||1===i&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first)))t[s]=o,e[s]=!0,n=!1;else{if(n)return;s^=1,n=!0}}}findEdgeSide(t,e,i,n){for(;;){const s=y(null,null);if(s.second=this.getNextDEdge(t[i].second,n^i),s.first=s.second.twin,!(0===n&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))<0||1===n&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))))return;t[i]=s,e[i]=!0}}merge(t,e,i,n,s){const o={...t},r={...n},h={...s};let d={...e},g={...i};const a=d.second,c=g.second;for(;;){if(this.join(d.first,g.first,0,1,h),d.first=this.getNextDEdge(h.first,0),g.first=this.getNextDEdge(h.second,1),d.first===o.first&&g.first===r.first){this.joinEdges2(a,c),this.joinEdges2(r.second,o.second);break}d.second=d.first.twin,g.second=g.first.twin;const t=this.getPointXYFromEdge(h.first),e=this.getPointXYFromEdge(h.second);if(d.first===o.first){let i=y(null,null);i.first=this.getNextDEdge(g.first,1),i.second=i.first.twin,i=this.checkEdge(i,t,e,1,!1),b(d,h),b(h,g),g=y(i.second,i.first)}else if(g.first===r.first){let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1),g=y(h.second,h.first),b(h,d),d=y(i.second,i.first)}else{let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1);let n=y(null,null);n.first=this.getNextDEdge(g.first,1),n.second=n.first.twin,n=this.checkEdge(n,t,e,1,!1);const s=this.getPointXYFromEdge(i.second),o=this.getPointXYFromEdge(n.second);let r=this.inCircle(t,e,s,o);0===r&&(r=this.orientation(t,e,o)),0<r?(b(d,h),b(h,g),g=y(n.second,n.first)):(g=y(h.second,h.first),b(h,d),d=y(i.second,i.first))}this.deleteTwinEdges(h,!1)}}findEdgeClockwise(t,e,i,n,s,o){for(t[0]=n;;){e[0]=t[0],++e[0]===i.length&&(e[0]=0);const n=this.orientation(s,o,this.getPointXYFromEdge(i[e[0]]));if(n<=0)return n<0;t[0]=e[0]}}findEdgeCounterClockwise(t,e,i,n,s,o){for(e[0]=n;;){t[0]=0!==e[0]?e[0]:i.length,t[0]--;const n=this.orientation(s,o,this.getPointXYFromEdge(i[t[0]]));if(0<=n)return 0<n;e[0]=t[0]}}constraintFindFirstEdge(t,e,i,n){const s=[];{const o=this.getEdgeFromPoint(i);let r=o;do{const i=this.getTwinEdge(r);if(this.getPointFromEdge(i)===n)return t[0]=i,e[0]=r,t[0].setMask(),e[0].setMask(),!1;s.push(i),r=this.getClockwiseEdge(r)}while(r!==o)}s.length<3&&r("add_constraint");let o=-1;for(let c=0,l=s.length;c<l;c++)this.isInfinitePointFromEdge(s[c])&&(-1!==o&&r("add_constraint"),o=c);const h=this.getPointXY(i),d=this.getPointXY(n);let g,a;if(-1!==o){x(s,0,o+1,s.length),s.pop();0===this.orientation(h,d,this.getPointXYFromEdge(s[0]))&&r("add_constraint - point on constraint");for(0===this.orientation(h,d,this.getPointXYFromEdge(s.at(-1)))&&r("add_constraint - point on constraint"),g=0,a=s.length-1;g+1!==a;){const t=g+a>>1,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));0===e&&r("add_constraint - point on constraint"),0<e?g=t:a=t}}else{let t=0,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));if(0!==e)if(0<e){const e=[0],i=[0];this.findEdgeClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{const e=[0],i=[0];this.findEdgeCounterClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{t++,e=this.orientation(h,d,this.getPointXYFromEdge(s[t])),e<=0&&r("add_constraint");const i=[0],n=[0];this.findEdgeClockwise(i,n,s,t,h,d)||r("add_constraint"),g=i[0],a=n[0]}}return t[0]=s[g],e[0]=s[a],!0}triangulateConstraint(t,e,i,n){if(e===i)return;let s=i;for(let o=e;o!==i;++o)this.inCircle(this.getPointXYFromEdge(n.first),this.getPointXYFromEdge(n.second),this.getPointXYFromEdge(t[s]),this.getPointXYFromEdge(t[o]))<0&&(s=o);if(s!==i){const e=this.newPairEdge();this.join(n.first,t[s],1,1,e),t[s]=e.second,this.triangulateConstraint(t,s+1,i,e)}if(s!==e){const i=this.newPairEdge();this.join(t[s],n.second,1,0,i),this.triangulateConstraint(t,e,s-1,i)}}insideLine(t,e,i){return 0===this.orientation(t,e,i)&&(e.x<t.x!=e.x<i.x||e.y<t.y!=e.y<i.y)}orientation(t,e,i){return g.orientationRobust(t,e,i)}inCircle(t,e,i,n){return g.inCircleRobust(t,e,i,n)}calculateCircleCenterFromThreePoints(t,e,i){return e.lt(t)&&(e=u(t,t=e)),i.lt(e)&&(i=u(e,e=i)),e.lt(t)&&(e=u(t,t=e)),g.calculateCircleCenterFromThreePoints(t,e,i)}compare(t,e){return 3*((j(t[0]<e[0])<<1)+j(t[0]>e[0]))+(j(t[1]<e[1])<<1)+j(t[1]>e[1])-1}caseFromCompare(t,e,i){return(this.compare(t,e)<<6)+(this.compare(t,i)<<3)+this.compare(e,i)}}function j(t){return t?1:0}function A(t,e,i){return t[i]!==e[i]?t[i]<e[i]:t[1-i]<e[1-i]}function v(t){return 255&t}N.c_aTableDelaunayTriangulationSolution=Uint8Array.from([41,74,0,0,0,0,0,0,0,206,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,33,33,65,0,0,0,0,0,0,0,193,0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,214,173,0,0,0,0,0,0,0,107,239,0,0,0,0,0,0,0,0,0,181,0,0,0,0,0,0,0,181,0,0,0,0,0,0,117,117,245,0,0,0,0,0,0,0,0,0,103,0,0,0,0,0,0,0,167,0,0,0,0,0,0,231,103,231,0,0,0,0,0,0,50,0,0,0,0,0,0,0,0,198,0,0,41,0,0,74,0,0,49,0,0,49,0,0,50,0,0,194,0,0,193,0,0,194,0,0,0,0,0,206,0,0,0,0,0,0,0,0,54,0,0,0,0,0,0,0,0,198,0,0,0,0,0,82,50,82,0,0,0,0,0,0,0,198,0,66,0,0,65,0,0,66,49,66,33,57,65,82,50,90,0,194,0,0,193,0,0,194,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,222,0,0,0,0,0,0,178,0,0,0,0,0,0,230,102,230,177,0,0,177,0,0,178,0,177,0,0,177,0,0,178,0,113,226,113,113,249,226,122,226,0,0,0,0,0,0,102,0,0,0,0,0,0,0,190,0,0,0,0,0,0,230,102,230,0,0,0,165,0,0,0,0,0,0,0,0,243,0,0,0,0,0,173,0,0,0,0,0,0,0,0,165,0,0,0,0,0,0,0,0,245,0,0,0,0,0,107,0,0,239,0,0,163,0,0,163,0,0,167,0,0,247,0,0,243,0,0,247,0,0,37,37,69,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,69,0,0,0,0,0,37,37,69,0,0,0,0,0,0,0,221,0,0,0,0,215,0,0,211,0,0,215,35,87,35,35,91,87,63,87,0,215,0,0,211,0,0,215,0,0,0,165,0,0,0,0,0,0,115,115,243,0,0,0,0,0,0,181,0,0,0,0,0,0,0,189,0,0,0,0,0,0,117,117,245,0,0,0,99,0,0,99,0,0,103,0,163,0,0,163,0,0,167,0,99,247,115,123,243,231,103,255]);class M{constructor(t){this.m_numberOfSets=t,this.m_elements=Array.from({length:t},((t,e)=>e)),this.m_sizes=f(t,1)}getNumberOfSets(){return this.m_numberOfSets}connected(t,e){return this.findRoot(t)===this.findRoot(e)}connect(t,e){const i=this.findRoot(t),n=this.findRoot(e);return i!==n&&(this.m_sizes[i]<this.m_sizes[n]?(this.m_sizes[n]+=this.m_sizes[i],this.m_elements[i]=n):(this.m_sizes[i]+=this.m_sizes[n],this.m_elements[n]=i),--this.m_numberOfSets,!0)}connectRange(t,e,i){if(e!==i)for(let n=e;n<i;++n)this.connect(t[e],t[n])}size(){return this.m_elements.length}size1(t){return h(0),0}findRoot(t){let e=t;if(this.m_elements[e]!==e)do{this.m_elements[e]=this.m_elements[this.m_elements[e]],e=this.m_elements[e]}while(this.m_elements[e]!==e);return e}}function S(){return l(Number.NaN,l([0,0,0],[0,0,0]))}function G(t,e){if(t.first!==e.first)return t.first-e.first;let i=t.second.first,n=e.second.first;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];i=t.second.second,n=e.second.second;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];return 0}class q{getOperatorType(){return 10112}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!1}executeMany(t,e,i,n){return new z(t,e,i,n)}execute(t,e,i,n=null){const s=new z(null,e,!1,i);s.addGeometry(t);return s.buildAlphaShape(n)}}class z extends t{alphaShapeConstruct(t,e){const i=t.getEdgeCount(),n=new p({vd:this.m_vertexDescription});if(!n)throw new Error("alphaShapeConstruct");for(let s=0;s<i;++s){if(2!==e[s])continue;const i=y(null,null);i.first=t.getEdge(s),i.second=t.getTwinEdge(i.first);if(1!==e[t.getEdgeIndex(i.second)])continue;t.getPointXYFromEdge(i.first),n.startPath(t.getPointXYFromEdge(i.first));let o=s,r=i.second;for(;;){for(e[o]=3,r=t.getCounterClockwiseEdge(r);1===e[t.getEdgeIndex(r)];)r=t.getCounterClockwiseEdge(r);if(r===i.first)break;n.lineTo(t.getPointXYFromEdge(r)),o=t.getEdgeIndex(r),r=t.getTwinEdge(r)}}return n}alphaShape(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i);for(let s=0;s<i;++s){if(0!==n[s])continue;const i=Y(),o=t.getEdge(s);i.p[0]=t.getPointFromEdge(o);const r=t.getClockwiseEdge(t.getTwinEdge(o));i.p[1]=t.getPointFromEdge(r);const h=t.getEdgeIndex(r),a=t.getClockwiseEdge(t.getTwinEdge(r));i.p[2]=t.getPointFromEdge(a);const c=t.getEdgeIndex(a);let l=1;for(let e=0;e<3;++e)if(t.isInfinitePointFromPoint(i.p[e])){l=2;break}if(1===l){const n=d(g,3);for(let e=0;e<3;++e)n[e]=t.getPointXY(i.p[e]);const s=g.sqrDistance(n[0],n[1]),o=g.sqrDistance(n[1],n[2]),r=g.sqrDistance(n[2],n[0]),h=2*n[1].sub(n[0]).crossProduct(n[2].sub(n[0]));e<s*o*r/(h*h)&&(l=2)}n[s]=n[h]=n[c]=l}return this.alphaShapeConstruct(t,n)}alphaShapeAlphaOut(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i),s=[],o=new M(t.getPointCount());for(let h=0;h<i;++h){if(0!==n[h])continue;const e=Y(),i=t.getEdge(h);e.p[0]=t.getPointFromEdge(i);const o=t.getClockwiseEdge(t.getTwinEdge(i));e.p[1]=t.getPointFromEdge(o);const r=t.getEdgeIndex(o),d=t.getClockwiseEdge(t.getTwinEdge(o));e.p[2]=t.getPointFromEdge(d);const a=t.getEdgeIndex(d);let c=1;for(let n=0;n<3;++n)if(t.isInfinitePointFromPoint(e.p[n])){c=2;break}if(1===c){const i=new Array(3);for(let s=0;s<3;++s)i[s]=t.getPointXY(e.p[s]);const n=g.sqrDistance(i[0],i[1]),o=g.sqrDistance(i[1],i[2]),d=g.sqrDistance(i[2],i[0]),l=i[1].sub(i[0]).crossProduct(i[2].sub(i[0])),u=S();u.first=n*o*d/(l*l),u.second.first[0]=h,u.second.first[1]=r,u.second.first[2]=a,u.second.second[0]=t.getPointIndex(e.p[0]),u.second.second[1]=t.getPointIndex(e.p[1]),u.second.second[2]=t.getPointIndex(e.p[2]),s.push(u),c=2}n[h]=n[r]=n[a]=c}s.sort(((t,e)=>G(t,e)));let r=0;for(const h of s){if(1===o.getNumberOfSets()&&h.first!==r)break;n[h.second.first[0]]=n[h.second.first[1]]=n[h.second.first[2]]=1;const t=[h.second.second[0],h.second.second[1],h.second.second[2]];o.connectRange(t,0,3),r=h.first}return e&&(e[0]=.25*r),this.alphaShapeConstruct(t,n)}constructor(t,e,i,n){super(),this.m_multiPointForAttributes=null,this.m_inputGeometryCursor=null,this.m_index=-1,this.m_nDelaunayPoints=0,this.m_cDelaunay=new N,this.m_vertexDescription=null,this.m_progressTracker=n,this.m_alpha=Number.isNaN(e)||!Number.isFinite(e)||e<0?-1:e<Number.MIN_VALUE?0:e,this.m_bMerge=i,this.m_bDone=!1,this.m_inputGeometryCursor=t,this.prepareDelaunay()}prepareDelaunay(){this.m_nDelaunayPoints=0,this.m_cDelaunay.clear(),0!==this.m_alpha&&this.m_cDelaunay.prepare(a())}next(){if(this.m_bMerge){if(!this.m_bDone){const t=this.calculateAlphaShapeMerging(this.m_inputGeometryCursor,this.m_progressTracker);return this.m_bDone=!0,t}return null}if(!this.m_bDone){const t=this.m_inputGeometryCursor.next();if(null!==t)return i(t),n(t),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.calculateAlphaShape(t,this.m_progressTracker);this.m_bDone=!0}return null}tock(){return!0}getRank(){return 1}getGeometryID(){return this.m_index}calculateAlphaShapeMerging(t,e){let s;for(;s=t.next();)i(s),n(s),this.addGeometry(s);return this.buildAlphaShape()}calculateAlphaShape(t,e){return t.isEmpty()?new p({vd:t.getDescription()}):(this.prepareDelaunay(),this.addGeometry(t),this.buildAlphaShape())}buildAlphaShape(t=null){if(t&&(t[0]=this.m_alpha),0===this.m_alpha)return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;if(this.m_cDelaunay.removeDuplicates())for(let e=0,i=this.m_cDelaunay.getPointCount();e<i;++e)this.m_cDelaunay.setPointIndex(this.m_cDelaunay.getPoint(e),e);if(!this.m_cDelaunay.construct())return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;return this.m_alpha<0?this.alphaShapeAlphaOut(this.m_cDelaunay,t):this.alphaShape(this.m_cDelaunay,this.m_alpha)}addGeometry(t){if(i(t),n(t),0===this.m_alpha)return;if(this.m_vertexDescription&&this.m_bMerge||(this.m_vertexDescription=t.getDescription(),this.m_vertexDescription.getAttributeCount()>1?this.m_multiPointForAttributes=new E({vd:this.m_vertexDescription}):this.m_multiPointForAttributes=null),t.isEmpty())return;const e=t.getGeometryType();if(s(e)){const e=t,i=new g;for(let t=0,n=e.getPointCount();t<n;t++)e.queryXY(t,i),this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++);this.m_multiPointForAttributes&&this.m_multiPointForAttributes.addPoints(e,0,-1)}else if(e===o.enumPoint){const e=t,i=e.getXY();this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++),this.m_multiPointForAttributes&&this.m_multiPointForAttributes.add(e)}else r("bad geometry type")}}const V=new q;function O(t,e,i){return V.execute(t,e,null,i)}function Z(t,i,n){const s=V.executeMany(new e(t),i,n,null);return Array.from(s)}function R(){return V.supportsCurves()}export{O as execute,Z as executeMany,R 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{E as r,n as s}from"../../../chunks/QuadraticBezier.js";import{G as o,p as n}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{a as i}from"../../../chunks/Envelope.js";import{h as u,al as l}from"../../../chunks/ProjectionTransformation.js";class p{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,s){const o=(new u).executeMany(e,r,s);return new c(o,t,r,s)}}class c extends e{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 m,t=new r;let u,p=s;for(;u=this.m_polylines.next();){if(u.getGeometryType()!==o.enumPolyline||u.isEmpty())continue;p===s?p=t.addGeometry(u):t.appendGeometry(p,u);const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r)}if(0===t.getTotalPointCount())return;for(;u=this.m_polygons.next();){if(!n(u.getGeometryType())||u.isEmpty())continue;const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r),t.addGeometry(u)}const c=i(this.m_sr,e,!0);this.m_resultPolygons=l(t,p,c,this.m_progressTracker)}}const a=new p;function y(e,r,s){const o=a.execute(new t(e),new t(r),s,null);return Array.from(o)}function h(){return a.supportsCurves()}export{y as execute,h as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{E as r,n as s}from"../../../chunks/QuadraticBezier.js";import{G as o,k as n}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{a as i}from"../../../chunks/Envelope.js";import{h as u,al as l}from"../../../chunks/ProjectionTransformation.js";class p{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,s){const o=(new u).executeMany(e,r,s);return new c(o,t,r,s)}}class c extends e{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 m,t=new r;let u,p=s;for(;u=this.m_polylines.next();){if(u.getGeometryType()!==o.enumPolyline||u.isEmpty())continue;p===s?p=t.addGeometry(u):t.appendGeometry(p,u);const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r)}if(0===t.getTotalPointCount())return;for(;u=this.m_polygons.next();){if(!n(u.getGeometryType())||u.isEmpty())continue;const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r),t.addGeometry(u)}const c=i(this.m_sr,e,!0);this.m_resultPolygons=l(t,p,c,this.m_progressTracker)}}const a=new p;function y(e,r,s){const o=a.execute(new t(e),new t(r),s,null);return Array.from(o)}function h(){return a.supportsCurves()}export{y as execute,h 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{d as n,t as r,G as o,g as s}from"../../../chunks/Geometry.js";import{P as a,a as i}from"../../../chunks/Envelope.js";import{a as l,L as u}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";import{P as m,q as N,r as g,m as h}from"../../../chunks/Point2D.js";import{ah as y,i as P}from"../../../chunks/ProjectionTransformation.js";import{a as p}from"../../../chunks/Centroid-DZi-eb9F.js";import{O as f}from"../../../chunks/OperatorProximity.js";class d{getOperatorType(){return 10203}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t){return new x(e,t)}execute(e,t){return new x(null,t).labelPoint(e)}}class x extends e{progress_(){}tock(){return!0}getRank(){return 1}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 a({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(e){const t=new c;e.queryEnvelope(t);const n=i(null,t,!0).total();let r=null,o=e;if(e.hasNonLinearSegments()){const t=new l({copy:e}),a=y(t,.25*n,n);s(a!==e),r=a,o=r}let u=0,h=0;for(let s=0,a=o.getPathCount();s<a;++s){const e=Math.abs(o.calculateRingArea2D(s));e>h&&(h=e,u=s)}const d=new m;if(Math.abs(h)<=2*n*n?d.setNAN():d.assign(p(o,u)),Number.isNaN(d.x)){const e=new c;return o.queryPathEnvelope(u,e),new a({pt:e.getCenter()})}if(o.getPointCount()<4)return new a({x:d.x,y:d.y});const x=m.getNAN(),w=[x.clone(),x.clone(),x.clone(),x.clone()],b=[Number.NaN,Number.NaN,Number.NaN,Number.NaN],C=[Number.NaN,Number.NaN,Number.NaN,Number.NaN];let _=!1,D=(new f).getNearestCoordinate(o,d,!0,!1);if(0===D.m_distance&&(_=!0,w[0]=d,D=(new f).getNearestCoordinate(o,d,!1,!1),D.m_distance>.25*t.minDimension()*1.66666666))return new a({x:d.x,y:d.y});b[0]=D.m_distance,C[0]=0;const k=new m;let A=!1,E=.25,q=-1;const v=new c;o.queryPathEnvelope(u,v);do{let e=Number.NaN;if(w[1]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[1].isNAN()||(D=(new f).getNearestCoordinate(o,w[1],!1,!1),e=D.m_distance),e>n&&1===P(o,w[1],n))A=!0,b[1]=e,C[1]=m.sqrDistance(w[1],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[1])),E-=.01,E<.1){if(!(q>=0))break;A=!0,b[1]=q,w[1]=k,C[1]=m.sqrDistance(w[1],d)}}while(!A);A=!1,E=.5,q=-1;let G=.01,M=1;do{let e=Number.NaN;if(w[2]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[2].isNAN()||(D=(new f).getNearestCoordinate(o,w[2],!1,!1),e=D.m_distance),e>n&&1===P(o,w[2],n))A=!0,b[2]=e,C[2]=m.sqrDistance(w[2],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[2])),E=.5+G*M,G+=.01,M*=-1,E<.3||E>.7){if(!(q>=0))break;A=!0,b[2]=q,w[2]=k,C[2]=m.sqrDistance(w[2],d)}}while(!A);A=!1,E=.75,q=-1;do{let e=Number.NaN;if(w[3]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[3].isNAN()||(D=(new f).getNearestCoordinate(o,w[3],!1,!1),e=D.m_distance),e>n&&1===P(o,w[3],n))A=!0,b[3]=e,C[3]=m.sqrDistance(w[3],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[3])),E+=.01,E>.9){if(!(q>=0))break;A=!0,b[3]=q,w[3]=k,C[3]=m.sqrDistance(w[3],d)}}while(!A);const S=[0,1,2,3],j=_?0:1;for(let s=j;s<4;s++)for(let e=j;e<3;e++){const t=C[e],n=C[e+1];if(g(t,n)>0){const r=S[e];S[e]=S[e+1],S[e+1]=r,C[e]=n,C[e+1]=t}}let X=j,L=0,T=0;for(let s=j;s<4;s++){switch(s){case 0:T=2*b[S[s]];break;case 1:T=1.66666666*b[S[s]];break;case 2:T=1.33333333*b[S[s]];break;case 3:T=b[S[s]]}T>L&&(L=T,X=S[s])}return s(!w[X].isNAN()),new a({x:w[X].x,y:w[X].y})}labelPointPolyline(e){const t=new m;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 a({x:t.x,y:t.y})}labelPointMultiPoint(e){const t=new c;e.queryEnvelope(t);const n=t.getCenter(),r=(new f).getNearestCoordinate(e,n,!1,!1).m_coordinate;return new a({x:r.x,y:r.y})}labelPointEnvelope(e){const t=e.getCenterXY();return new a({x:t.x,y:t.y})}calculateParacentroid_(e,t,n){const r=new c;e.queryEnvelope(r);const o=new m(t,0);let a=Number.MAX_VALUE,i=Number.MAX_VALUE,l=!1,N=!1;const g=new u;g.setStartXYCoords(o.x,r.ymin-1),g.setEndXYCoords(o.x,r.ymax+1);const y=new c,P=new m,p=new m,f=h(m,2),d=e.querySegmentIterator();for(;d.nextPath();)for(;d.hasNextSegment();){const e=d.nextSegment();if(e.queryEnvelope(y),s(e.isMonotoneQuickAndDirty()),P.setCoordsPoint2D(g.getStartXY()),p.setCoordsPoint2D(g.getEndXY()),0===y.clipLine(P,p))continue;if(1!==g.intersect(e,f,null,null,n))continue;const t=f[0].y;a>i?t<a&&(a=t,l=!0):t<i&&(i=t,N=!0)}return l&&N?o.y=(a+i)/2:o.setNAN(),o}}const w=new d;function b(e){return w.execute(e,null)}function C(e){const n=w.executeMany(new t(e),null);return Array.from(n)}function _(){return w.supportsCurves()}export{b as execute,C as executeMany,_ as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{d as n,t as r,G as o,g as s}from"../../../chunks/Geometry.js";import{P as a,a as i}from"../../../chunks/Envelope.js";import{a as l,L as u}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";import{P as m,q as N,r as g,m as h}from"../../../chunks/Point2D.js";import{aj as y,i as P}from"../../../chunks/ProjectionTransformation.js";import{a as p}from"../../../chunks/Centroid-DZi-eb9F.js";import{O as f}from"../../../chunks/OperatorProximity.js";class d{getOperatorType(){return 10203}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t){return new x(e,t)}execute(e,t){return new x(null,t).labelPoint(e)}}class x extends e{progress_(){}tock(){return!0}getRank(){return 1}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 a({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(e){const t=new c;e.queryEnvelope(t);const n=i(null,t,!0).total();let r=null,o=e;if(e.hasNonLinearSegments()){const t=new l({copy:e}),a=y(t,.25*n,n);s(a!==e),r=a,o=r}let u=0,h=0;for(let s=0,a=o.getPathCount();s<a;++s){const e=Math.abs(o.calculateRingArea2D(s));e>h&&(h=e,u=s)}const d=new m;if(Math.abs(h)<=2*n*n?d.setNAN():d.assign(p(o,u)),Number.isNaN(d.x)){const e=new c;return o.queryPathEnvelope(u,e),new a({pt:e.getCenter()})}if(o.getPointCount()<4)return new a({x:d.x,y:d.y});const x=m.getNAN(),w=[x.clone(),x.clone(),x.clone(),x.clone()],b=[Number.NaN,Number.NaN,Number.NaN,Number.NaN],C=[Number.NaN,Number.NaN,Number.NaN,Number.NaN];let _=!1,D=(new f).getNearestCoordinate(o,d,!0,!1);if(0===D.m_distance&&(_=!0,w[0]=d,D=(new f).getNearestCoordinate(o,d,!1,!1),D.m_distance>.25*t.minDimension()*1.66666666))return new a({x:d.x,y:d.y});b[0]=D.m_distance,C[0]=0;const k=new m;let A=!1,E=.25,q=-1;const v=new c;o.queryPathEnvelope(u,v);do{let e=Number.NaN;if(w[1]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[1].isNAN()||(D=(new f).getNearestCoordinate(o,w[1],!1,!1),e=D.m_distance),e>n&&1===P(o,w[1],n))A=!0,b[1]=e,C[1]=m.sqrDistance(w[1],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[1])),E-=.01,E<.1){if(!(q>=0))break;A=!0,b[1]=q,w[1]=k,C[1]=m.sqrDistance(w[1],d)}}while(!A);A=!1,E=.5,q=-1;let G=.01,M=1;do{let e=Number.NaN;if(w[2]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[2].isNAN()||(D=(new f).getNearestCoordinate(o,w[2],!1,!1),e=D.m_distance),e>n&&1===P(o,w[2],n))A=!0,b[2]=e,C[2]=m.sqrDistance(w[2],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[2])),E=.5+G*M,G+=.01,M*=-1,E<.3||E>.7){if(!(q>=0))break;A=!0,b[2]=q,w[2]=k,C[2]=m.sqrDistance(w[2],d)}}while(!A);A=!1,E=.75,q=-1;do{let e=Number.NaN;if(w[3]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[3].isNAN()||(D=(new f).getNearestCoordinate(o,w[3],!1,!1),e=D.m_distance),e>n&&1===P(o,w[3],n))A=!0,b[3]=e,C[3]=m.sqrDistance(w[3],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[3])),E+=.01,E>.9){if(!(q>=0))break;A=!0,b[3]=q,w[3]=k,C[3]=m.sqrDistance(w[3],d)}}while(!A);const S=[0,1,2,3],j=_?0:1;for(let s=j;s<4;s++)for(let e=j;e<3;e++){const t=C[e],n=C[e+1];if(g(t,n)>0){const r=S[e];S[e]=S[e+1],S[e+1]=r,C[e]=n,C[e+1]=t}}let X=j,L=0,T=0;for(let s=j;s<4;s++){switch(s){case 0:T=2*b[S[s]];break;case 1:T=1.66666666*b[S[s]];break;case 2:T=1.33333333*b[S[s]];break;case 3:T=b[S[s]]}T>L&&(L=T,X=S[s])}return s(!w[X].isNAN()),new a({x:w[X].x,y:w[X].y})}labelPointPolyline(e){const t=new m;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 a({x:t.x,y:t.y})}labelPointMultiPoint(e){const t=new c;e.queryEnvelope(t);const n=t.getCenter(),r=(new f).getNearestCoordinate(e,n,!1,!1).m_coordinate;return new a({x:r.x,y:r.y})}labelPointEnvelope(e){const t=e.getCenterXY();return new a({x:t.x,y:t.y})}calculateParacentroid_(e,t,n){const r=new c;e.queryEnvelope(r);const o=new m(t,0);let a=Number.MAX_VALUE,i=Number.MAX_VALUE,l=!1,N=!1;const g=new u;g.setStartXYCoords(o.x,r.ymin-1),g.setEndXYCoords(o.x,r.ymax+1);const y=new c,P=new m,p=new m,f=h(m,2),d=e.querySegmentIterator();for(;d.nextPath();)for(;d.hasNextSegment();){const e=d.nextSegment();if(e.queryEnvelope(y),s(e.isMonotoneQuickAndDirty()),P.setCoordsPoint2D(g.getStartXY()),p.setCoordsPoint2D(g.getEndXY()),0===y.clipLine(P,p))continue;if(1!==g.intersect(e,f,null,null,n))continue;const t=f[0].y;a>i?t<a&&(a=t,l=!0):t<i&&(i=t,N=!0)}return l&&N?o.y=(a+i)/2:o.setNAN(),o}}const w=new d;function b(e){return w.execute(e,null)}function C(e){const n=w.executeMany(new t(e),null);return Array.from(n)}function _(){return w.supportsCurves()}export{b as execute,C as executeMany,_ 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as r}from"../../../chunks/SimpleGeometryCursor.js";import{E as t}from"../../../chunks/QuadraticBezier.js";import{o as s,d as n}from"../../../chunks/Geometry.js";import{a as o}from"../../../chunks/Envelope.js";import{as as m}from"../../../chunks/ProjectionTransformation.js";class i{getOperatorType(){return 10010}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,r,t){return new u(e,r,t)}}class u extends e{constructor(e,r,t){super(),this.m_result=null,this.m_geoms=e,this.m_sr=r,this.m_progressTracker=t,this.m_bfirst=!0,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){return this.m_bfirst&&(this.performOperation(),this.m_bfirst=!1),this.m_result?this.m_result.next():null}getGeometryID(){return null!==this.m_result?this.m_result.getGeometryID():-1}performOperation(){const e=new t;for(let t=this.m_geoms.next();null!==t;t=this.m_geoms.next())t.isEmpty()||t.getDimension()<1||s(t.getGeometryType())||(n(t),e.addGeometry(t));if(0===e.getGeometryCount())return;const r=e.getEnvelope2D(this.m_progressTracker),i=o(this.m_sr,r,!0);this.m_result=m(e,i,this.m_progressTracker)}}const a=new i;function c(e,t){const s=a.executeMany(new r(e),t,null);return Array.from(s)}function p(){return a.supportsCurves()}export{c as executeMany,p as supportsCurves};
5
+ import{G as e,S as r}from"../../../chunks/SimpleGeometryCursor.js";import{E as t}from"../../../chunks/QuadraticBezier.js";import{j as s,d as n}from"../../../chunks/Geometry.js";import{a as o}from"../../../chunks/Envelope.js";import{as as m}from"../../../chunks/ProjectionTransformation.js";class i{getOperatorType(){return 10010}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,r,t){return new u(e,r,t)}}class u extends e{constructor(e,r,t){super(),this.m_result=null,this.m_geoms=e,this.m_sr=r,this.m_progressTracker=t,this.m_bfirst=!0,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){return this.m_bfirst&&(this.performOperation(),this.m_bfirst=!1),this.m_result?this.m_result.next():null}getGeometryID(){return null!==this.m_result?this.m_result.getGeometryID():-1}performOperation(){const e=new t;for(let t=this.m_geoms.next();null!==t;t=this.m_geoms.next())t.isEmpty()||t.getDimension()<1||s(t.getGeometryType())||(n(t),e.addGeometry(t));if(0===e.getGeometryCount())return;const r=e.getEnvelope2D(this.m_progressTracker),i=o(this.m_sr,r,!0);this.m_result=m(e,i,this.m_progressTracker)}}const a=new i;function c(e,t){const s=a.executeMany(new r(e),t,null);return Array.from(s)}function p(){return a.supportsCurves()}export{c as executeMany,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.33/esri/copyright.txt for details.
4
4
  */
5
- import{G as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{d as n,G as r,t as s,p as i,f as o,c as u}from"../../../chunks/Geometry.js";import{E as l,b as m}from"../../../chunks/Point2D.js";import{V as c,P as a}from"../../../chunks/Envelope.js";import{g as h,M as p,S as g,P as d,G as y}from"../../../chunks/QuadraticBezier.js";function _(t,e,n,r,s){return new f(e,n,r,s).processGeometry(t)}class f{constructor(t,e,n,r){this.m_interval=n,this.m_progressTracker=r,this.m_attribute=t,this.m_ord=e,(c.getComponentCount(this.m_attribute)<=e||e<0)&&s("LocateBetween: ordinate");2===c.getInterpolation(this.m_attribute)&&s("LocateBetween: angular interpolation")}processGeometry(t){const e=t.getGeometryType();if(e===r.enumGeometryCollection)return this.processGeometryCollection(t);if(i(e)&&s("LocateBetween does not support Polygons and Envelopes."),t.isEmpty()||!t.hasAttribute(this.m_attribute))return new a({vd:t.getDescription()});if(o(e))return this.processSegment(t);switch(e){case r.enumPoint:return this.processPoint(t);case r.enumMultiPoint:return this.processMultiPoint(t);case r.enumPolyline:return this.processPolyline(t);default:u("LocateBetween")}}processPoint(t){const e=t.getAttributeAsDbl(this.m_attribute,this.m_ord);return this.m_interval.containsCoordinate(e)?new p({point:t}):new a({vd:t.getDescription()})}processMultiPoint(t){let e=null,n=-1;const r=t.getAttributeStreamRef(this.m_attribute),s=c.getComponentCount(this.m_attribute);for(let i=0,o=0,u=t.getPointCount();i<u;++i,o+=s){const s=r.readAsDbl(o);this.m_interval.containsCoordinate(s)?-1===n&&(n=i):n>=0&&(e||(e=new p({vd:t.getDescription()})),e.addPoints(t,n,i),n=-1)}return n>=0&&(e||(e=new p({vd:t.getDescription()})),e.addPoints(t,n,-1)),e||new a({vd:t.getDescription()})}processPolyline(t){const e=t.queryInterval(this.m_attribute,this.m_ord);if(this.m_interval.contains(e))return t;if(!this.m_interval.isIntersecting(e))return new a({vd:t.getDescription()});let n=null,s=null;const i=t.querySegmentIterator(),o=new g,u=new a,l=new a,m=new a;let c=!0,h=!1;for(;i.nextPath();)for(c=!0,h=!1;i.hasNextSegment();){const t=i.nextSegment(),e=[null],a=this.processSegmentHelper(t,o,e,u);if(a!==r.enumUnknown)if(a===r.enumPoint){if(!c&&(s.getPointByVal(s.getPointCount()-1,l),l.equals(u)))continue;if(c=!0,h&&(t.queryStart(l),u.equals(l)))continue;t.queryEnd(l),h=u.equals(l),n?n.add(u):n=new p({point:u})}else a===r.enumLine&&(h=!1,s||(s=new d),c&&(null===n||n.isEmpty()||(n.getPointByVal(n.getPointCount()-1,l),e[0].queryStart(u),l.equals(u)&&n.removePoint(n.getPointCount()-1))),s.addSegment(e[0],c),t.queryEnd(l),e[0].queryEnd(m),c=!l.equals(m));else c=!0,h=!1}if(null!==n&&n.isEmpty()&&(n=null),null!==n&&null!==s){const t=new y;return t.addGeometry(s),t.addGeometry(n),t}return null!==n?n:null!==s?s:new a({vd:t.getDescription()})}processSegment(t){const e=t.getAttributeAsDbl(0,this.m_attribute,this.m_ord),n=t.getAttributeAsDbl(1,this.m_attribute,this.m_ord),r=Number.isNaN(e)?n:e,s=Number.isNaN(n)?e:n,i=new l;i.setCoords(r,s);const o=i.clone();if(o.intersect(this.m_interval),o.isEmpty())return new a({vd:t.getDescription()});if(i.equals(o))return t;const u=s-r,c=t.calculateLength2D();if(0===o.width()){const e=new a({vd:t.getDescription()}),n=(o.vmin-r)/u,s=t.lengthToT(n*c);return t.queryCoord(s,e),e}let h=(o.vmin-r)/u,p=(o.vmax-r)/u;return h>p&&(p=m(h,h=p)),h=t.lengthToT(h*c),p=t.lengthToT(p*c),t.cut(h,p)}processGeometryCollection(t){if(t.isEmpty()||!t.hasAttribute(this.m_attribute))return new a({vd:t.getDescription()});const e=h(t),n=new y;for(let r=e.next();null!==r;r=e.next()){const t=this.processGeometry(r);t.isEmpty()||n.addGeometry(t)}return n.isEmpty()?new a({vd:t.getDescription()}):n}processSegmentHelper(t,e,n,s){const i=t.getAttributeAsDbl(0,this.m_attribute,this.m_ord),o=t.getAttributeAsDbl(1,this.m_attribute,this.m_ord),u=Number.isNaN(i)?o:i,c=Number.isNaN(o)?i:o,a=new l;a.setCoords(u,c);const h=a.clone();if(h.intersect(this.m_interval),h.isEmpty())return r.enumUnknown;if(a.equals(h))return n[0]=t,r.enumLine;const p=c-u,g=t.calculateLength2D();if(0===h.width()){const e=(h.vmin-u)/p,n=1===e?1:t.lengthToT(e*g);return t.queryCoord(n,s),r.enumPoint}let d=(h.vmin-u)/p,y=(h.vmax-u)/p;return d>y&&(y=m(d,d=y)),d=1===d?1:t.lengthToT(d*g),y=1===y?1:t.lengthToT(y*g),t.queryCut(d,y,e),n[0]=e.get(),r.enumLine}}class w{getOperatorType(){return 10801}accelerateGeometry(t,e,n){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,n){return new b(t,e,n)}}class b extends t{constructor(t,e,n){super(),this.m_collectionCursor=null,this.m_interval=e,this.m_progressTracker=n,this.m_inputGeoms=t,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){if(this.m_collectionCursor){const t=this.m_collectionCursor.next();if(t)return t;this.m_collectionCursor=null}const t=this.m_inputGeoms.next();if(null===t)return null;n(t),this.m_index=this.m_inputGeoms.getGeometryID();const e=_(t,2,0,this.m_interval,this.m_progressTracker);if(e.getGeometryType()===r.enumGeometryCollection){this.m_collectionCursor=h(e);return this.m_collectionCursor.next()}return e}getGeometryID(){return this.m_index}}const v=new w;function C(t,n){const r=v.executeMany(new e(t),n,null);return Array.from(r)}function P(){return v.supportsCurves()}export{C as executeMany,P as supportsCurves};
5
+ import{G as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{d as n,G as r,t as s,k as i,f as o,c as u}from"../../../chunks/Geometry.js";import{E as l,b as m}from"../../../chunks/Point2D.js";import{V as c,P as a}from"../../../chunks/Envelope.js";import{g as h,M as p,S as g,P as d,G as y}from"../../../chunks/QuadraticBezier.js";function _(t,e,n,r,s){return new f(e,n,r,s).processGeometry(t)}class f{constructor(t,e,n,r){this.m_interval=n,this.m_progressTracker=r,this.m_attribute=t,this.m_ord=e,(c.getComponentCount(this.m_attribute)<=e||e<0)&&s("LocateBetween: ordinate");2===c.getInterpolation(this.m_attribute)&&s("LocateBetween: angular interpolation")}processGeometry(t){const e=t.getGeometryType();if(e===r.enumGeometryCollection)return this.processGeometryCollection(t);if(i(e)&&s("LocateBetween does not support Polygons and Envelopes."),t.isEmpty()||!t.hasAttribute(this.m_attribute))return new a({vd:t.getDescription()});if(o(e))return this.processSegment(t);switch(e){case r.enumPoint:return this.processPoint(t);case r.enumMultiPoint:return this.processMultiPoint(t);case r.enumPolyline:return this.processPolyline(t);default:u("LocateBetween")}}processPoint(t){const e=t.getAttributeAsDbl(this.m_attribute,this.m_ord);return this.m_interval.containsCoordinate(e)?new p({point:t}):new a({vd:t.getDescription()})}processMultiPoint(t){let e=null,n=-1;const r=t.getAttributeStreamRef(this.m_attribute),s=c.getComponentCount(this.m_attribute);for(let i=0,o=0,u=t.getPointCount();i<u;++i,o+=s){const s=r.readAsDbl(o);this.m_interval.containsCoordinate(s)?-1===n&&(n=i):n>=0&&(e||(e=new p({vd:t.getDescription()})),e.addPoints(t,n,i),n=-1)}return n>=0&&(e||(e=new p({vd:t.getDescription()})),e.addPoints(t,n,-1)),e||new a({vd:t.getDescription()})}processPolyline(t){const e=t.queryInterval(this.m_attribute,this.m_ord);if(this.m_interval.contains(e))return t;if(!this.m_interval.isIntersecting(e))return new a({vd:t.getDescription()});let n=null,s=null;const i=t.querySegmentIterator(),o=new g,u=new a,l=new a,m=new a;let c=!0,h=!1;for(;i.nextPath();)for(c=!0,h=!1;i.hasNextSegment();){const t=i.nextSegment(),e=[null],a=this.processSegmentHelper(t,o,e,u);if(a!==r.enumUnknown)if(a===r.enumPoint){if(!c&&(s.getPointByVal(s.getPointCount()-1,l),l.equals(u)))continue;if(c=!0,h&&(t.queryStart(l),u.equals(l)))continue;t.queryEnd(l),h=u.equals(l),n?n.add(u):n=new p({point:u})}else a===r.enumLine&&(h=!1,s||(s=new d),c&&(null===n||n.isEmpty()||(n.getPointByVal(n.getPointCount()-1,l),e[0].queryStart(u),l.equals(u)&&n.removePoint(n.getPointCount()-1))),s.addSegment(e[0],c),t.queryEnd(l),e[0].queryEnd(m),c=!l.equals(m));else c=!0,h=!1}if(null!==n&&n.isEmpty()&&(n=null),null!==n&&null!==s){const t=new y;return t.addGeometry(s),t.addGeometry(n),t}return null!==n?n:null!==s?s:new a({vd:t.getDescription()})}processSegment(t){const e=t.getAttributeAsDbl(0,this.m_attribute,this.m_ord),n=t.getAttributeAsDbl(1,this.m_attribute,this.m_ord),r=Number.isNaN(e)?n:e,s=Number.isNaN(n)?e:n,i=new l;i.setCoords(r,s);const o=i.clone();if(o.intersect(this.m_interval),o.isEmpty())return new a({vd:t.getDescription()});if(i.equals(o))return t;const u=s-r,c=t.calculateLength2D();if(0===o.width()){const e=new a({vd:t.getDescription()}),n=(o.vmin-r)/u,s=t.lengthToT(n*c);return t.queryCoord(s,e),e}let h=(o.vmin-r)/u,p=(o.vmax-r)/u;return h>p&&(p=m(h,h=p)),h=t.lengthToT(h*c),p=t.lengthToT(p*c),t.cut(h,p)}processGeometryCollection(t){if(t.isEmpty()||!t.hasAttribute(this.m_attribute))return new a({vd:t.getDescription()});const e=h(t),n=new y;for(let r=e.next();null!==r;r=e.next()){const t=this.processGeometry(r);t.isEmpty()||n.addGeometry(t)}return n.isEmpty()?new a({vd:t.getDescription()}):n}processSegmentHelper(t,e,n,s){const i=t.getAttributeAsDbl(0,this.m_attribute,this.m_ord),o=t.getAttributeAsDbl(1,this.m_attribute,this.m_ord),u=Number.isNaN(i)?o:i,c=Number.isNaN(o)?i:o,a=new l;a.setCoords(u,c);const h=a.clone();if(h.intersect(this.m_interval),h.isEmpty())return r.enumUnknown;if(a.equals(h))return n[0]=t,r.enumLine;const p=c-u,g=t.calculateLength2D();if(0===h.width()){const e=(h.vmin-u)/p,n=1===e?1:t.lengthToT(e*g);return t.queryCoord(n,s),r.enumPoint}let d=(h.vmin-u)/p,y=(h.vmax-u)/p;return d>y&&(y=m(d,d=y)),d=1===d?1:t.lengthToT(d*g),y=1===y?1:t.lengthToT(y*g),t.queryCut(d,y,e),n[0]=e.get(),r.enumLine}}class w{getOperatorType(){return 10801}accelerateGeometry(t,e,n){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,n){return new b(t,e,n)}}class b extends t{constructor(t,e,n){super(),this.m_collectionCursor=null,this.m_interval=e,this.m_progressTracker=n,this.m_inputGeoms=t,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){if(this.m_collectionCursor){const t=this.m_collectionCursor.next();if(t)return t;this.m_collectionCursor=null}const t=this.m_inputGeoms.next();if(null===t)return null;n(t),this.m_index=this.m_inputGeoms.getGeometryID();const e=_(t,2,0,this.m_interval,this.m_progressTracker);if(e.getGeometryType()===r.enumGeometryCollection){this.m_collectionCursor=h(e);return this.m_collectionCursor.next()}return e}getGeometryID(){return this.m_index}}const v=new w;function C(t,n){const r=v.executeMany(new e(t),n,null);return Array.from(r)}function P(){return v.supportsCurves()}export{C as executeMany,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.33/esri/copyright.txt for details.
4
4
  */
5
- import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{c as r,l as n,d as s,G as o,i,t as u}from"../../../chunks/Geometry.js";import{m as c,h as m,a,j as l,M as g}from"../../../chunks/QuadraticBezier.js";import{m as d,P as h}from"../../../chunks/Point2D.js";class p{getOperatorType(){return 10113}supportsCurves(){return!1}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r){return new y(e,t,r)}execute(t,n){const s=new e([t]),o=this.executeMany(s,!1,n).next();return o||r("null output"),o}minimumBoundingCircle(e,t,r,n){return c(e,t,r)}}class y extends t{constructor(e,t,r){super(),this.m_geometryCursor=e,this.m_bMerge=t,this.m_progressTracker=r}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge)return this.mergedMinimumBoundingCircle();const e=this.m_geometryCursor.next();return e?this.minimumBoundingCircle(e):null}getGeometryID(){return this.m_geometryCursor.getGeometryID()}minimumBoundingCircle(e){if(n(e),s(e),this.m_progressTracker?.checkProgress(),e.isEmpty())return e.clone();const t=e.getGeometryType();if(t===o.enumPoint)return this.makeCircle([e.getXY()],1);if(t===o.enumLine){const t=e,r=[t.getStartXY(),t.getEndXY()];return this.makeCircle(r,2)}if(t===o.enumEnvelope){const t=e,r=d(h,2);return t.queryCorner(0,r[0]),t.queryCorner(2,r[1]),this.makeCircle(r,2)}if(i(t)){const t=e,r=[0,0,0],n=m(t,r),s=new Array(n);for(let e=0;e<n;++e)s[e]=t.getXY(r[e]);return this.makeCircle(s,n)}u("Geometry type not supported.")}makeCircle(e,t){const r=new a,n=new l;if(1===t)n.constructCircleRadius(0,e[0],!1);else if(2===t){const t=h.lerp(e[0],e[1],.5),r=h.distance(e[0],t),s=h.distance(e[1],t);n.constructCircleRadius(Math.max(r,s),t,!1)}else if(3===t){const t=h.calculateCircleCenterFromThreePoints(e[0],e[1],e[2]),r=h.distance(e[0],t),s=h.distance(e[1],t),o=h.distance(e[2],t);n.constructCircleRadius(Math.max(r,s,o),t,!1)}return r.addPathFromClosedSegment(n,!1),r}mergedMinimumBoundingCircle(){let e=null,t=this.m_geometryCursor.next();if(!t)return null;e=new g;const r=e.getImpl();do{n(t),s(t),this.m_progressTracker?.checkProgress();switch(t.getGeometryType()){case o.enumPoint:r.addPoint2D(t.getXY());break;case o.enumLine:r.addPoint2D(t.getStartXY()),r.addPoint2D(t.getEndXY());break;case o.enumEnvelope:for(let e=0;e<4;++e){const n=new h;t.queryCorner(e,n),r.addPoint2D(n)}break;case o.enumMultiPoint:case o.enumPolyline:case o.enumPolygon:{const e=t.getImpl();for(let t=0,n=e.getPointCount();t<n;t++)r.addPoint2D(e.getXY(t));break}default:u("Geometry type not supported.")}}while(t=this.m_geometryCursor.next());return this.minimumBoundingCircle(e)}}const C=new p;function f(e){return C.execute(e,null)}function k(t,r){const n=C.executeMany(new e(t),r,null);return Array.from(n)}function P(){return C.supportsCurves()}export{f as execute,k as executeMany,P as supportsCurves};
5
+ import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{c as r,o as n,d as s,G as o,i,t as u}from"../../../chunks/Geometry.js";import{m as c,h as m,a,j as l,M as g}from"../../../chunks/QuadraticBezier.js";import{m as d,P as h}from"../../../chunks/Point2D.js";class p{getOperatorType(){return 10113}supportsCurves(){return!1}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r){return new y(e,t,r)}execute(t,n){const s=new e([t]),o=this.executeMany(s,!1,n).next();return o||r("null output"),o}minimumBoundingCircle(e,t,r,n){return c(e,t,r)}}class y extends t{constructor(e,t,r){super(),this.m_geometryCursor=e,this.m_bMerge=t,this.m_progressTracker=r}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge)return this.mergedMinimumBoundingCircle();const e=this.m_geometryCursor.next();return e?this.minimumBoundingCircle(e):null}getGeometryID(){return this.m_geometryCursor.getGeometryID()}minimumBoundingCircle(e){if(n(e),s(e),this.m_progressTracker?.checkProgress(),e.isEmpty())return e.clone();const t=e.getGeometryType();if(t===o.enumPoint)return this.makeCircle([e.getXY()],1);if(t===o.enumLine){const t=e,r=[t.getStartXY(),t.getEndXY()];return this.makeCircle(r,2)}if(t===o.enumEnvelope){const t=e,r=d(h,2);return t.queryCorner(0,r[0]),t.queryCorner(2,r[1]),this.makeCircle(r,2)}if(i(t)){const t=e,r=[0,0,0],n=m(t,r),s=new Array(n);for(let e=0;e<n;++e)s[e]=t.getXY(r[e]);return this.makeCircle(s,n)}u("Geometry type not supported.")}makeCircle(e,t){const r=new a,n=new l;if(1===t)n.constructCircleRadius(0,e[0],!1);else if(2===t){const t=h.lerp(e[0],e[1],.5),r=h.distance(e[0],t),s=h.distance(e[1],t);n.constructCircleRadius(Math.max(r,s),t,!1)}else if(3===t){const t=h.calculateCircleCenterFromThreePoints(e[0],e[1],e[2]),r=h.distance(e[0],t),s=h.distance(e[1],t),o=h.distance(e[2],t);n.constructCircleRadius(Math.max(r,s,o),t,!1)}return r.addPathFromClosedSegment(n,!1),r}mergedMinimumBoundingCircle(){let e=null,t=this.m_geometryCursor.next();if(!t)return null;e=new g;const r=e.getImpl();do{n(t),s(t),this.m_progressTracker?.checkProgress();switch(t.getGeometryType()){case o.enumPoint:r.addPoint2D(t.getXY());break;case o.enumLine:r.addPoint2D(t.getStartXY()),r.addPoint2D(t.getEndXY());break;case o.enumEnvelope:for(let e=0;e<4;++e){const n=new h;t.queryCorner(e,n),r.addPoint2D(n)}break;case o.enumMultiPoint:case o.enumPolyline:case o.enumPolygon:{const e=t.getImpl();for(let t=0,n=e.getPointCount();t<n;t++)r.addPoint2D(e.getXY(t));break}default:u("Geometry type not supported.")}}while(t=this.m_geometryCursor.next());return this.minimumBoundingCircle(e)}}const C=new p;function f(e){return C.execute(e,null)}function k(t,r){const n=C.executeMany(new e(t),r,null);return Array.from(n)}function P(){return C.supportsCurves()}export{f as execute,k as executeMany,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.33/esri/copyright.txt for details.
4
+ */
5
+ import{S as n}from"../../../chunks/SimpleGeometryCursor.js";import{O as r}from"../../../chunks/OperatorSimplifyOGC.js";const e=new r;function u(n,r,u){return e.execute(n,r,u,null)}function t(r,u,t){const o=e.executeMany(new n(r),u,t,null);return Array.from(o)}function o(n,r,u){return e.isSimple(n,r,u,null,null)}function s(){return e.supportsCurves()}export{u as execute,t as executeMany,o as isSimple,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.33/esri/copyright.txt for details.
4
4
  */
5
- import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{c as n,d as r,G as s}from"../../../chunks/Geometry.js";import{P as o,d as i}from"../../../chunks/Point2D.js";import{M as u}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{a as c,d as a}from"../../../chunks/Envelope.js";import{ai as p}from"../../../chunks/ProjectionTransformation.js";class l{getOperatorType(){return 10003}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r){return new y(e,t,n,r)}execute(t,r,s,o){const i=new e([t]),u=new e([r]),m=this.executeMany(i,u,s,o).next();return m||n("null output"),m}}function h(e,t,n,r){const o=e.getDimension(),i=t.getDimension();if(o!==i)return o>i?e:t;if(e.isEmpty())return t;if(t.isEmpty())return e;const u=new m,a=new m,l=new m;e.queryEnvelope(u),t.queryEnvelope(a),l.setCoords({env2D:u}),l.mergeEnvelope2D(a);const h=c(n,l,!0),y=e.getGeometryType(),g=t.getGeometryType();return y===s.enumPoint&&g===s.enumPoint?d(e,t,h):y===s.enumPoint&&g===s.enumMultiPoint?f(t,e,h):y===s.enumMultiPoint&&g===s.enumPoint?f(e,t,h):p(e,t,n,r)}function d(e,t,n,r){const s=a(n),i=s*s,m=e.getXY(),c=t.getXY(),p=new u({vd:e.getDescription()});return o.sqrDistance(m,c)>i&&(p.add(e),p.add(t)),p}function f(e,t,n,r){const s=e.getImpl().getAttributeStreamRef(0),o=e.getPointCount(),u=t.getXY(),c=e.createInstance(),p=a(n),l=new m;if(e.queryEnvelope(l),l.inflateCoords(p,p),l.contains(u)){const n=p*p;let r=!1;const m=i(o,!1);for(let e=0;e<o;e++){const t=s.read(2*e),o=s.read(2*e+1),i=t-u.x,c=o-u.y;i*i+c*c<=n&&(r=!0,m[e]=!0)}if(r)for(let t=0;t<o;t++)m[t]||c.addPoints(e,t,t+1);else c.addPoints(e,0,o),c.add(t)}else c.addPoints(e,0,o),c.add(t);return c}class y extends t{constructor(e,t,n,s){super(),this.m_progressTracker=s,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=n,this.m_rightGeom=t.next(),this.m_bEmpty=!this.m_rightGeom,r(this.m_rightGeom)}tock(){return!0}getRank(){return 1}next(){if(this.m_bEmpty)return null;const e=this.m_inputGeoms.next();return e?(r(e),this.m_index=this.m_inputGeoms.getGeometryID(),h(e,this.m_rightGeom,this.m_spatialReference,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}const g=new l;function G(e,t,n){return g.execute(e,t,n,null)}function _(t,n,r){const s=g.executeMany(new e(t),new e([n]),r,null);return Array.from(s)}function x(){return g.supportsCurves()}export{G as execute,_ as executeMany,x as supportsCurves};
5
+ import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{c as n,d as r,G as s}from"../../../chunks/Geometry.js";import{P as o,d as i}from"../../../chunks/Point2D.js";import{M as u}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{a as c,d as a}from"../../../chunks/Envelope.js";import{ak as p}from"../../../chunks/ProjectionTransformation.js";class l{getOperatorType(){return 10003}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r){return new y(e,t,n,r)}execute(t,r,s,o){const i=new e([t]),u=new e([r]),m=this.executeMany(i,u,s,o).next();return m||n("null output"),m}}function h(e,t,n,r){const o=e.getDimension(),i=t.getDimension();if(o!==i)return o>i?e:t;if(e.isEmpty())return t;if(t.isEmpty())return e;const u=new m,a=new m,l=new m;e.queryEnvelope(u),t.queryEnvelope(a),l.setCoords({env2D:u}),l.mergeEnvelope2D(a);const h=c(n,l,!0),y=e.getGeometryType(),g=t.getGeometryType();return y===s.enumPoint&&g===s.enumPoint?d(e,t,h):y===s.enumPoint&&g===s.enumMultiPoint?f(t,e,h):y===s.enumMultiPoint&&g===s.enumPoint?f(e,t,h):p(e,t,n,r)}function d(e,t,n,r){const s=a(n),i=s*s,m=e.getXY(),c=t.getXY(),p=new u({vd:e.getDescription()});return o.sqrDistance(m,c)>i&&(p.add(e),p.add(t)),p}function f(e,t,n,r){const s=e.getImpl().getAttributeStreamRef(0),o=e.getPointCount(),u=t.getXY(),c=e.createInstance(),p=a(n),l=new m;if(e.queryEnvelope(l),l.inflateCoords(p,p),l.contains(u)){const n=p*p;let r=!1;const m=i(o,!1);for(let e=0;e<o;e++){const t=s.read(2*e),o=s.read(2*e+1),i=t-u.x,c=o-u.y;i*i+c*c<=n&&(r=!0,m[e]=!0)}if(r)for(let t=0;t<o;t++)m[t]||c.addPoints(e,t,t+1);else c.addPoints(e,0,o),c.add(t)}else c.addPoints(e,0,o),c.add(t);return c}class y extends t{constructor(e,t,n,s){super(),this.m_progressTracker=s,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=n,this.m_rightGeom=t.next(),this.m_bEmpty=!this.m_rightGeom,r(this.m_rightGeom)}tock(){return!0}getRank(){return 1}next(){if(this.m_bEmpty)return null;const e=this.m_inputGeoms.next();return e?(r(e),this.m_index=this.m_inputGeoms.getGeometryID(),h(e,this.m_rightGeom,this.m_spatialReference,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}const g=new l;function G(e,t,n){return g.execute(e,t,n,null)}function _(t,n,r){const s=g.executeMany(new e(t),new e([n]),r,null);return Array.from(s)}function x(){return g.supportsCurves()}export{G as execute,_ as executeMany,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.33/esri/copyright.txt for details.
4
4
  */
5
- import{b as e,l as t,G as r,c as s}from"../../chunks/Geometry.js";import{P as a,S as n,a as m}from"../../chunks/QuadraticBezier.js";import{Envelope2D as i}from"../../chunks/Envelope2D.js";import{a as o,P as h}from"../../chunks/Envelope.js";import{g as l}from"../../chunks/ProjectionTransformation.js";import{getSpatialReference as c,fromGeometry as u,fromPolyline as g,fromSpatialReference as _,toGeometry as d}from"./support/apiConverter.js";function x(s,n,m,h){if(n.getPathCount()>1&&e(""),s.isEmpty()||n.isEmpty())return null;t(s),t(n);let l=null;const c=new i;s.queryEnvelope(c);const u=new i;n.queryEnvelope(u);const g=new i;g.setCoords({env2D:c}),g.mergeEnvelope2D(u);const _=o(m,g,!1).total(),d=new A(h);let x=d.setIndicesAndScalars(s,n,_);if(x){const e=d.getTrimmedPolyline(s,n);if(e.isEmpty())return null;l=d.getReshapedMultiPath(s,e,m)}else{if(Number.isNaN(d.m_scalarB0)||s.getGeometryType()===r.enumPolyline)return null;const e=new a;if(e.add(n,!0),d.clearIndicesAndScalars(),x=d.setIndicesAndScalars(s,e,_),!x)return null;const t=d.getTrimmedPolyline(s,e);if(t.isEmpty())return null;l=d.getReshapedMultiPath(s,t,m)}return l}class A{constructor(e){this.m_progressTracker=e,this.clearIndicesAndScalars()}setIndicesAndScalars(e,t,s){const a=new i,n=new i;e.queryEnvelope(a),e.queryEnvelope(n),a.inflateCoords(s,s);if(!a.intersect(n))return!1;const m=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,v=Number.NaN;for(o.nextPath();o.hasNextSegment();){const e=o.nextSegment(),t=new i;for(e.queryEnvelope(t),t.inflateCoords(s,s),m.resetToFirstPath();m.nextPath();){for(;m.hasNextSegment();){const r=m.nextSegment(),a=new i;if(r.queryEnvelope(a),t.isIntersecting(a)){if(0!==e.intersect(r,null,l,h,s)&&(Number.isNaN(S)||l[0]<S)&&(c=m.getPathIndex(),g=m.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 y=e.getGeometryType();for(o.resetToLastSegment();o.hasPreviousSegment();){const e=o.previousSegment(),t=new i;for(e.queryEnvelope(t),t.inflateCoords(s,s),y===r.enumPolygon?m.resetToPath(c):m.resetToFirstPath();m.nextPath();){for(;m.hasNextSegment();){const r=m.nextSegment(),a=new i;if(r.queryEnvelope(a),t.isIntersecting(a)){const t=e.intersect(r,null,l,h,s);if(0!==t&&(Number.isNaN(v)||l[t-1]>v)&&(o.getStartPointIndex()!==this.m_vertexB0||l[t-1]!==this.m_scalarB0)&&(u=m.getPathIndex(),_=m.getStartPointIndex(),x=o.getStartPointIndex(),p=h[t-1],v=l[t-1],1===v))break}}if(1===v)break;if(y===r.enumPolygon)break}if(!Number.isNaN(v))break}return!Number.isNaN(v)&&(this.m_pathA1=u,this.m_vertexA1=_,this.m_vertexB1=x,this.m_scalarA1=p,this.m_scalarB1=v,!0)}getTrimmedPolyline(e,t){const r=new n,s=t.createInstance();let a=!0;const m=t.getImpl().querySegmentIterator();if(m.resetToVertex(this.m_vertexB0,0),this.m_vertexB0>this.m_vertexB1)return s;if(this.m_vertexB0===this.m_vertexB1){m.nextSegment().queryCut(this.m_scalarB0,this.m_scalarB1,r,!1),s.addSegment(r.get(),!0)}else for(;;){const e=m.nextSegment(),t=m.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 h,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,s){let a;return a=e.getGeometryType()===r.enumPolygon?this.getReshapedPolygon(e,t,s):this.getReshapedPolyline(e,t),a}getReshapedPolygon(e,t,r){const s=e.getImpl().querySegmentIterator();s.setCirculator(!0);const a=new n;new h;const i=new m({vd:e.getDescription()});if(i.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),i.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA1&&(e.queryCut(this.m_scalarA1,1,a),i.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),i.addSegment(a.get(),!1));break}i.addSegment(e,!1)}}const o=new m({vd:e.getDescription()}),c=t.clone();if(c.reversePath(0),o.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),o.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA0&&(e.queryCut(this.m_scalarA0,1,a),o.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),o.addSegment(a.get(),!1));break}o.addSegment(e,!1)}}const u=Math.abs(i.calculateArea2D()),g=Math.abs(o.calculateArea2D());let _=e.createInstance();for(let n=0;n<e.getPathCount();n++)n===this.m_pathA0?u>=g?_.add(i,!1):_.add(o,!1):_.addPath(e,n,!0);return _=(new l).execute(_,r,!1,this.m_progressTracker),_}getReshapedPolyline(e,t){const r=e.getImpl().querySegmentIterator(),m=new a,i=new n;let o=!1,h=-1,l=Number.NaN;o=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),o?(h=this.m_vertexA1,l=this.m_scalarA1,r.resetToPath(this.m_pathA1)):(h=this.m_vertexA0,l=this.m_scalarA0,r.resetToPath(this.m_pathA0));let c=!0;for(r.nextPath()||s("reshaper");;){const e=r.nextSegment();if(r.getStartPointIndex()===h){0!==l&&(e.queryCut(0,l,i),m.addSegment(i.get(),c),c=!1);break}m.addSegment(e,c),c=!1}if(o){const e=t.clone();e.reversePath(0),m.addSegmentsFromPath(e,0,0,e.getSegmentCount(),c)}else m.addSegmentsFromPath(t,0,0,t.getSegmentCount(),c);o?(l=this.m_scalarA0,r.resetToVertex(this.m_vertexA0,this.m_pathA0)):(l=this.m_scalarA1,r.resetToVertex(this.m_vertexA1,this.m_pathA1));{const e=r.nextSegment();1!==l&&(e.queryCut(l,1,i),m.addSegment(i.get(),!1))}for(;r.hasNextSegment();){const e=r.nextSegment();m.addSegment(e,!1)}const u=e.createInstance();let g=!1;for(let s=0;s<e.getPathCount();s++)s===this.m_pathA0||s===this.m_pathA1?g||(u.add(m,!1),g=!0):u.addPath(e,s,!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 v(e,t){const r=c(e),s=S.execute(u(e),g(t),_(r),null);return d(s,r)}const y=S.supportsCurves();export{v as execute,y as supportsCurves};
5
+ import{b as e,o as t,G as r,c as s}from"../../chunks/Geometry.js";import{P as a,S as n,a as m}from"../../chunks/QuadraticBezier.js";import{Envelope2D as i}from"../../chunks/Envelope2D.js";import{a as o,P as h}from"../../chunks/Envelope.js";import{g as l}from"../../chunks/ProjectionTransformation.js";import{getSpatialReference as c,fromGeometry as u,fromPolyline as g,fromSpatialReference as _,toGeometry as d}from"./support/apiConverter.js";function x(s,n,m,h){if(n.getPathCount()>1&&e(""),s.isEmpty()||n.isEmpty())return null;t(s),t(n);let l=null;const c=new i;s.queryEnvelope(c);const u=new i;n.queryEnvelope(u);const g=new i;g.setCoords({env2D:c}),g.mergeEnvelope2D(u);const _=o(m,g,!1).total(),d=new A(h);let x=d.setIndicesAndScalars(s,n,_);if(x){const e=d.getTrimmedPolyline(s,n);if(e.isEmpty())return null;l=d.getReshapedMultiPath(s,e,m)}else{if(Number.isNaN(d.m_scalarB0)||s.getGeometryType()===r.enumPolyline)return null;const e=new a;if(e.add(n,!0),d.clearIndicesAndScalars(),x=d.setIndicesAndScalars(s,e,_),!x)return null;const t=d.getTrimmedPolyline(s,e);if(t.isEmpty())return null;l=d.getReshapedMultiPath(s,t,m)}return l}class A{constructor(e){this.m_progressTracker=e,this.clearIndicesAndScalars()}setIndicesAndScalars(e,t,s){const a=new i,n=new i;e.queryEnvelope(a),e.queryEnvelope(n),a.inflateCoords(s,s);if(!a.intersect(n))return!1;const m=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,v=Number.NaN;for(o.nextPath();o.hasNextSegment();){const e=o.nextSegment(),t=new i;for(e.queryEnvelope(t),t.inflateCoords(s,s),m.resetToFirstPath();m.nextPath();){for(;m.hasNextSegment();){const r=m.nextSegment(),a=new i;if(r.queryEnvelope(a),t.isIntersecting(a)){if(0!==e.intersect(r,null,l,h,s)&&(Number.isNaN(S)||l[0]<S)&&(c=m.getPathIndex(),g=m.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 y=e.getGeometryType();for(o.resetToLastSegment();o.hasPreviousSegment();){const e=o.previousSegment(),t=new i;for(e.queryEnvelope(t),t.inflateCoords(s,s),y===r.enumPolygon?m.resetToPath(c):m.resetToFirstPath();m.nextPath();){for(;m.hasNextSegment();){const r=m.nextSegment(),a=new i;if(r.queryEnvelope(a),t.isIntersecting(a)){const t=e.intersect(r,null,l,h,s);if(0!==t&&(Number.isNaN(v)||l[t-1]>v)&&(o.getStartPointIndex()!==this.m_vertexB0||l[t-1]!==this.m_scalarB0)&&(u=m.getPathIndex(),_=m.getStartPointIndex(),x=o.getStartPointIndex(),p=h[t-1],v=l[t-1],1===v))break}}if(1===v)break;if(y===r.enumPolygon)break}if(!Number.isNaN(v))break}return!Number.isNaN(v)&&(this.m_pathA1=u,this.m_vertexA1=_,this.m_vertexB1=x,this.m_scalarA1=p,this.m_scalarB1=v,!0)}getTrimmedPolyline(e,t){const r=new n,s=t.createInstance();let a=!0;const m=t.getImpl().querySegmentIterator();if(m.resetToVertex(this.m_vertexB0,0),this.m_vertexB0>this.m_vertexB1)return s;if(this.m_vertexB0===this.m_vertexB1){m.nextSegment().queryCut(this.m_scalarB0,this.m_scalarB1,r,!1),s.addSegment(r.get(),!0)}else for(;;){const e=m.nextSegment(),t=m.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 h,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,s){let a;return a=e.getGeometryType()===r.enumPolygon?this.getReshapedPolygon(e,t,s):this.getReshapedPolyline(e,t),a}getReshapedPolygon(e,t,r){const s=e.getImpl().querySegmentIterator();s.setCirculator(!0);const a=new n;new h;const i=new m({vd:e.getDescription()});if(i.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),i.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA1&&(e.queryCut(this.m_scalarA1,1,a),i.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),i.addSegment(a.get(),!1));break}i.addSegment(e,!1)}}const o=new m({vd:e.getDescription()}),c=t.clone();if(c.reversePath(0),o.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),o.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA0&&(e.queryCut(this.m_scalarA0,1,a),o.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),o.addSegment(a.get(),!1));break}o.addSegment(e,!1)}}const u=Math.abs(i.calculateArea2D()),g=Math.abs(o.calculateArea2D());let _=e.createInstance();for(let n=0;n<e.getPathCount();n++)n===this.m_pathA0?u>=g?_.add(i,!1):_.add(o,!1):_.addPath(e,n,!0);return _=(new l).execute(_,r,!1,this.m_progressTracker),_}getReshapedPolyline(e,t){const r=e.getImpl().querySegmentIterator(),m=new a,i=new n;let o=!1,h=-1,l=Number.NaN;o=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),o?(h=this.m_vertexA1,l=this.m_scalarA1,r.resetToPath(this.m_pathA1)):(h=this.m_vertexA0,l=this.m_scalarA0,r.resetToPath(this.m_pathA0));let c=!0;for(r.nextPath()||s("reshaper");;){const e=r.nextSegment();if(r.getStartPointIndex()===h){0!==l&&(e.queryCut(0,l,i),m.addSegment(i.get(),c),c=!1);break}m.addSegment(e,c),c=!1}if(o){const e=t.clone();e.reversePath(0),m.addSegmentsFromPath(e,0,0,e.getSegmentCount(),c)}else m.addSegmentsFromPath(t,0,0,t.getSegmentCount(),c);o?(l=this.m_scalarA0,r.resetToVertex(this.m_vertexA0,this.m_pathA0)):(l=this.m_scalarA1,r.resetToVertex(this.m_vertexA1,this.m_pathA1));{const e=r.nextSegment();1!==l&&(e.queryCut(l,1,i),m.addSegment(i.get(),!1))}for(;r.hasNextSegment();){const e=r.nextSegment();m.addSegment(e,!1)}const u=e.createInstance();let g=!1;for(let s=0;s<e.getPathCount();s++)s===this.m_pathA0||s===this.m_pathA1?g||(u.add(m,!1),g=!0):u.addPath(e,s,!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 v(e,t){const r=c(e),s=S.execute(u(e),g(t),_(r),null);return d(s,r)}const y=S.supportsCurves();export{v as execute,y as supportsCurves};
@@ -0,0 +1,6 @@
1
+ import "../../interfaces";
2
+
3
+ export const supportsCurves: __esri.simplifyOGCOperator["supportsCurves"];
4
+ export const execute: __esri.simplifyOGCOperator["execute"];
5
+ export const executeMany: __esri.simplifyOGCOperator["executeMany"];
6
+ export const isSimple: __esri.simplifyOGCOperator["isSimple"];
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{supportsCurves as r,execute as t,executeMany as o,isSimple as e}from"./gx/operatorSimplifyOGC.js";import{getSpatialReference as n,toGeometry as s,fromSpatialReference as p,fromGeometry as u}from"./support/apiConverter.js";function i(r){const o=n(r);return s(t(u(r),p(o),!1),o)}function a(r){const t=r.map(u),e=n(r);return o(t,p(e),!1).map((r=>s(r,e)))}function c(r){return e(u(r),p(n(r)),!1)}const m=r();export{i as execute,a as executeMany,c as isSimple,m as supportsCurves};