@arcgis/core 4.32.0-next.20250106 → 4.32.0-next.20250107

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 (144) hide show
  1. package/AttributeBinsGraphic.js +5 -0
  2. package/README.md +1 -1
  3. package/applications/MapViewer/templateUtils.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/000771f8eefcd6af0fda.js +1 -0
  6. package/assets/esri/core/workers/chunks/{9372d08ba8bf3342c48f.js → 011ccfd3acee83e7dc68.js} +1 -1
  7. package/assets/esri/core/workers/chunks/03af4a51043677ffcd0f.js +1 -0
  8. package/assets/esri/core/workers/chunks/{d07da8b63d83af179a2c.js → 05943caacfd28c383810.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{9f495ad57cdbfa90c5b8.js → 095aeb19e2207c8361ca.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{67c7bdc0c91a8f803ea8.js → 11cb25dfab7c8467897a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{42aa697b4718b75b8cb2.js → 1abeba63bf623a746d5c.js} +2 -2
  12. package/assets/esri/core/workers/chunks/{42aa697b4718b75b8cb2.js.LICENSE.txt → 1abeba63bf623a746d5c.js.LICENSE.txt} +1 -1
  13. package/assets/esri/core/workers/chunks/{a57cead317eb2fc9afd8.js → 206194cf069ad4bcc3ad.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{0673d811c496143fc3d4.js → 2779cf112299b612a73a.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{bd37c9cc720587665fd3.js → 304b88ade7551130ad3a.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{aedff36d3fec86abb9fb.js → 30a84ddf0384bb52fdbe.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{367af4aa7e170c8553e3.js → 33a13544b9e5f4f20bce.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{dce55e7f76adecc055c3.js → 35d9457109d0631a1ca8.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{3a90163b76b0bc7f21d2.js → 3767defbd9c4b2e86886.js} +1 -1
  20. package/assets/esri/core/workers/chunks/3a3e9701e5d7b05f41b7.js +1 -0
  21. package/assets/esri/core/workers/chunks/{9a498f2c007f4d78d4dd.js → 4234539a9721104acafb.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{76fa5c7c87831ad25cde.js → 435c037ccba71f1e22d3.js} +1 -1
  23. package/assets/esri/core/workers/chunks/4387c47ae1b36d770f1d.js +1 -0
  24. package/assets/esri/core/workers/chunks/{88c68881cbdf4e911832.js → 4423aac6e44c3dbf184e.js} +1 -1
  25. package/assets/esri/core/workers/chunks/44ec3c77339b9765aaa4.js +1 -0
  26. package/assets/esri/core/workers/chunks/4b77c8d994498899631a.js +1 -0
  27. package/assets/esri/core/workers/chunks/62f8949a2d9076f3c1ea.js +2 -0
  28. package/assets/esri/core/workers/chunks/{c8cd6ba5600d8ff8db0b.js.LICENSE.txt → 62f8949a2d9076f3c1ea.js.LICENSE.txt} +1 -1
  29. package/assets/esri/core/workers/chunks/{664aa401887b59abd7b7.js → 6400f39a965900f66ce7.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{ddce265c46e4dfeb6c6d.js → 66d40a486aa3caa76106.js} +1 -1
  31. package/assets/esri/core/workers/chunks/6b3ee691646fbc39445c.js +1 -0
  32. package/assets/esri/core/workers/chunks/{533a7fd64b17bb294545.js → 6c58f792e2ae3736f662.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{370b230fd2d7703d0698.js → 6efb36bc2205203ff44d.js} +2 -2
  34. package/assets/esri/core/workers/chunks/{370b230fd2d7703d0698.js.LICENSE.txt → 6efb36bc2205203ff44d.js.LICENSE.txt} +1 -1
  35. package/assets/esri/core/workers/chunks/{a90611cdc86190799560.js → 7a43fda8984549a084b8.js} +1 -1
  36. package/assets/esri/core/workers/chunks/7b753da3b8a6d75abf20.js +1 -0
  37. package/assets/esri/core/workers/chunks/{9b020c47ca9ff5de9bb8.js → 7db356976198c4df76c1.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{4c56698cf1c669371865.js → 81816410cb1453938593.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{4ffaa2c5ab47a599ee9f.js → 82266ca8002554198208.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{f19d3c855f6e93544918.js → 8be0151a24c9af76a976.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{d9e396adf3354ee68339.js → 8f2b2d2dc9935b0d2039.js} +1 -1
  42. package/assets/esri/core/workers/chunks/907a91266e25cc4b9d42.js +1 -0
  43. package/assets/esri/core/workers/chunks/{a77aa86896bbb0e088df.js → 9857491cafa0278d9ae6.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{993db7646a8fc60179eb.js → 98da074899c82f0ded0b.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{3bb94da29dac3367ecc6.js → a1edd3f68e691ea39594.js} +1 -1
  46. package/assets/esri/core/workers/chunks/b07710e01494a6cda097.js +1 -0
  47. package/assets/esri/core/workers/chunks/{6a4305eb1e52b80ecb5c.js → b8ea84adff5619040494.js} +3 -3
  48. package/assets/esri/core/workers/chunks/{005727711cca0614c2ab.js → c05e0bd145a1c27d6857.js} +2 -2
  49. package/assets/esri/core/workers/chunks/{005727711cca0614c2ab.js.LICENSE.txt → c05e0bd145a1c27d6857.js.LICENSE.txt} +1 -1
  50. package/assets/esri/core/workers/chunks/c4374b6bc5c8dc6435c7.js +1 -0
  51. package/assets/esri/core/workers/chunks/c49707b577f3805f0142.js +1 -0
  52. package/assets/esri/core/workers/chunks/c5a928dcff7dc8a8cc9f.js +2 -0
  53. package/assets/esri/core/workers/chunks/{f4e3db71d1adae717535.js.LICENSE.txt → c5a928dcff7dc8a8cc9f.js.LICENSE.txt} +1 -1
  54. package/assets/esri/core/workers/chunks/cac79b64a7dade8bf486.js +2 -0
  55. package/assets/esri/core/workers/chunks/{bf0a0ca7fdac98f06a89.js.LICENSE.txt → cac79b64a7dade8bf486.js.LICENSE.txt} +1 -1
  56. package/assets/esri/core/workers/chunks/{2cccaf50134c65944e0a.js → d0876eed5249b029f9f0.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{178f606c8896ae5f39de.js → d1dbbab4a4c6072c182f.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{8e42fb623f56942958d8.js → d74b5dc60f02892d03e7.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{9ad7d095e614e7e8d7f5.js → dca0eb66116e4b5403fc.js} +1 -1
  60. package/assets/esri/core/workers/chunks/e27b8674a3492db51f2e.js +1 -0
  61. package/assets/esri/core/workers/chunks/{756c2f7c8659deab6c96.js → e2d987c39a6ef318511c.js} +2 -2
  62. package/assets/esri/core/workers/chunks/{756c2f7c8659deab6c96.js.LICENSE.txt → e2d987c39a6ef318511c.js.LICENSE.txt} +1 -1
  63. package/assets/esri/core/workers/chunks/{943428cf643e87ccfaad.js → e7e26b71f9eb28421936.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{f0adabf6d71a27f3183b.js → e80b0646a7e0e466ea65.js} +1 -1
  65. package/assets/esri/core/workers/chunks/e9c21907fabcedbd32ae.js +1 -0
  66. package/assets/esri/core/workers/chunks/{f9af0473878d960a02f2.js → f6d6bc43ac1c13892d44.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{3ed7c8138231de3a3b96.js → f8c960df1dabab120c70.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{fdd8a5eb07466541f1f9.js → fd95b19f02d8dfef2baf.js} +1 -1
  69. package/assets/esri/widgets/support/GridControls/t9n/GridControls_ja.json +1 -1
  70. package/chunks/bufferOperator.js +1 -1
  71. package/chunks/geodesicBufferOperator.js +1 -1
  72. package/chunks/terrainUtilsPlanar.js +1 -1
  73. package/chunks/terrainUtilsSpherical.js +1 -1
  74. package/geometry/operators/graphicBufferOperator.js +1 -1
  75. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  76. package/interfaces.d.ts +11 -5
  77. package/layers/graphics/data/QueryEngineResult.js +1 -1
  78. package/layers/graphics/data/queryUtils.js +1 -1
  79. package/layers/graphics/data/queryValidationUtils.js +1 -1
  80. package/layers/graphics/sources/WFSSource.js +1 -1
  81. package/layers/support/capabilities.js +1 -1
  82. package/layers/support/featureLayerUtils.js +1 -1
  83. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  84. package/package.json +2 -2
  85. package/renderers/RasterStretchRenderer.js +1 -1
  86. package/rest/query/executeAttributeBinsQuery.js +1 -1
  87. package/rest/support/AttributeBinsFeatureSet.js +5 -0
  88. package/rest/support/AttributeBinsQuery.js +1 -1
  89. package/rest/support/BinParametersAttributes.js +1 -1
  90. package/rest/support/BinParametersBase.js +1 -1
  91. package/rest/support/DateBinParameters.js +1 -1
  92. package/rest/support/FeatureSet.js +1 -1
  93. package/rest/support/NormalizationBinParametersMixin.js +1 -1
  94. package/rest/support/Query.js +1 -1
  95. package/rest/support/TopFeaturesQuery.js +1 -1
  96. package/smartMapping/renderers/dotDensity.js +1 -1
  97. package/smartMapping/renderers/pieChart.js +1 -1
  98. package/smartMapping/statistics/summaryStatisticsForAttributes.js +1 -1
  99. package/support/revision.js +1 -1
  100. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  101. package/symbols/cim/cimAnalyzer.js +1 -1
  102. package/views/2d/engine/Bitmap.js +1 -1
  103. package/views/2d/engine/BitmapContainer.js +1 -1
  104. package/views/2d/engine/BitmapTileContainer.js +1 -1
  105. package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
  106. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  107. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  108. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  109. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  110. package/views/3d/state/NearFarHeuristic.js +1 -1
  111. package/views/3d/terrain/TerrainRenderer.js +1 -1
  112. package/views/3d/terrain/TerrainSurface.js +1 -1
  113. package/views/3d/terrain/terrainUtilsPlanar.js +1 -1
  114. package/views/3d/terrain/terrainUtilsSpherical.js +1 -1
  115. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  116. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  117. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +4 -4
  118. package/views/draw/support/HighlightHelper.js +1 -1
  119. package/views/layers/DimensionLayerView.js +1 -1
  120. package/views/webgl/Texture.js +1 -1
  121. package/views/webgl/textureUtils.js +5 -0
  122. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  123. package/widgets/Editor/UpdateWorkflow.js +1 -1
  124. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  125. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  126. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  127. package/widgets/support/ColorPicker.js +1 -1
  128. package/assets/esri/core/workers/chunks/0a3bf1b74cce1b6b7ed8.js +0 -1
  129. package/assets/esri/core/workers/chunks/0d2411a941c42acb8cc2.js +0 -1
  130. package/assets/esri/core/workers/chunks/13720b1d97fb7d80e972.js +0 -1
  131. package/assets/esri/core/workers/chunks/14b87f3dd9942e6b19d0.js +0 -1
  132. package/assets/esri/core/workers/chunks/16530347bd78dc6c2fcd.js +0 -1
  133. package/assets/esri/core/workers/chunks/1a713cc601c6fcd97d2f.js +0 -1
  134. package/assets/esri/core/workers/chunks/3029354194f1a3030c5c.js +0 -1
  135. package/assets/esri/core/workers/chunks/318a39b56851e707edad.js +0 -1
  136. package/assets/esri/core/workers/chunks/53cd990b2c988518de6d.js +0 -1
  137. package/assets/esri/core/workers/chunks/5a0eb9dfe668cf290462.js +0 -1
  138. package/assets/esri/core/workers/chunks/9f0ebeae8a3ba360284b.js +0 -1
  139. package/assets/esri/core/workers/chunks/a3cef3837f4df9ab022e.js +0 -1
  140. package/assets/esri/core/workers/chunks/bf0a0ca7fdac98f06a89.js +0 -2
  141. package/assets/esri/core/workers/chunks/c8cd6ba5600d8ff8db0b.js +0 -2
  142. package/assets/esri/core/workers/chunks/ea250d66089967976c05.js +0 -1
  143. package/assets/esri/core/workers/chunks/ecf317c6c790b3cc83bf.js +0 -1
  144. package/assets/esri/core/workers/chunks/f4e3db71d1adae717535.js +0 -2
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8469],{98469:(e,t,n)=>{n.r(t),n.d(t,{area:()=>re,buffer:()=>Ee,centroid:()=>Ve,clip:()=>Be,contains:()=>Fe,convexHull:()=>$e,crosses:()=>tt,cut:()=>mt,densify:()=>lt,difference:()=>gt,disjoint:()=>dt,distance:()=>bt,equals:()=>St,generalize:()=>Mt,geodesicBuffer:()=>P,geodeticArea:()=>E,geodeticDensify:()=>B,geodeticLength:()=>Q,intersection:()=>It,intersects:()=>At,length:()=>qt,loadAll:()=>Dn,offset:()=>Ut,overlaps:()=>Jt,proximity:()=>rn,relate:()=>an,rotate:()=>Sn,simplify:()=>cn,symmetricDifference:()=>_n,touches:()=>yn,union:()=>bn,within:()=>Gn});var r=n(4576),s=n(76061),i=n(55537);class o extends s.G{constructor(e,t,n){super(),this.m_index=-1,this.m_transformation=t.clone(),this.m_inputGeometryCursor=e}next(){let e;if(e=this.m_inputGeometryCursor.next()){(0,i.c)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID();const t=e.clone();return t.applyTransformation(this.m_transformation),t}return null}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}}const a=new class{getOperatorType(){return 10303}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n){return new o(e,t,n)}execute(e,t,n){const r=e.clone();return r.applyTransformation(t),r}};var m=n(78125);a.supportsCurves();var u=n(83047),c=n(24988),l=n(5808);let h,f,g,_,p;function d(){return!!h&&(0,c.s1)()}async function y(){if(!d()){const[e]=await Promise.all([Promise.resolve().then(n.bind(n,78125)),(0,c.Hh)()]);h=e.fromGeometry,f=e.fromSpatialReference,g=e.getSpatialReference,_=e.toGeometry,p=(0,c.fz)()}}const P=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t,n={}){let{curveType:r="geodesic",maxDeviation:s=NaN,unit:i}=n;i&&(t=(0,u.oU)(t,i,"meters"),s&&(s=(0,u.oU)(s,i,"meters")));const o=g(e);return _((0,c.g7)(h(e),f(o),l.O[r],t,s),o)},executeMany:function(e,t,n={}){let{curveType:s="geodesic",maxDeviation:i=NaN,union:o=!1,unit:a}=n;a&&(t=t.map((e=>(0,u.oU)(e,a,"meters"))),i&&(i=(0,u.oU)(i,a,"meters")));const m=e.map(h),p=g(e);return(0,c.zo)(m,f(p),l.O[s],t,i,o).map((e=>_(e,p))).filter(r.Ru)},isLoaded:d,load:y,get supportsCurves(){return p}},Symbol.toStringTag,{value:"Module"}));var x=n(83290);let b,C,v,G,S;function D(){return!!b&&(0,x.i)()}async function w(){if(!D()){const[e,t]=await Promise.all([n.e(7066).then(n.bind(n,37066)),Promise.resolve().then(n.bind(n,9192)).then((e=>e.a8)).then((({injectPe:e})=>e)),(0,x.l)()]);b=new e.OperatorGeodeticArea,t(x.p)}}function M(){return!!C&&D()}async function T(){if(!M()){const[e]=await Promise.all([Promise.resolve().then(n.bind(n,78125)),w()]);C=e.fromGeometry,v=e.fromSpatialReference,G=e.getSpatialReference,S=b.supportsCurves()}}const E=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t={}){const{curveType:n="geodesic",unit:r}=t,s=G(e);let i=function(e,t,n){return b.execute(e,t,n,null)}(C(e),v(s),l.O[n]);return i&&r&&(i=(0,u.oU)(i,"square-meters",r)),i},isLoaded:M,load:T,get supportsCurves(){return S}},Symbol.toStringTag,{value:"Module"}));let I,N,R,A,q,O;function k(){return!!I&&(0,x.i)()}async function V(){if(!k()){const[e,t]=await Promise.all([n.e(1088).then(n.bind(n,31088)),Promise.resolve().then(n.bind(n,9192)).then((e=>e.a8)).then((({injectPe:e})=>e)),(0,x.l)()]);I=new e.OperatorGeodeticDensifyByLength,t(x.p)}}function Y(){return!!N&&k()}async function X(){if(!Y()){const[e]=await Promise.all([Promise.resolve().then(n.bind(n,78125)),V()]);N=e.fromGeometry,R=e.fromSpatialReference,A=e.getSpatialReference,q=e.toGeometry,O=I.supportsCurves()}}const B=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t,n={}){const{curveType:r="geodesic",unit:s}=n;s&&(t=(0,u.oU)(t,s,"meters"));const i=A(e);return q(function(e,t,n,r){return I.execute(e,t,n,r,null)}(N(e),t,R(i),l.O[r]),i)},executeMany:function(e,t,n={}){const{curveType:r="geodesic",unit:i}=n;i&&(t=(0,u.oU)(t,i,"meters"));const o=e.map(N),a=A(e);return function(e,t,n,r){const i=I.executeMany(new s.S(e),t,n,r,null);return Array.from(i)}(o,t,R(a),l.O[r]).map((e=>q(e,a)))},isLoaded:Y,load:X,get supportsCurves(){return O}},Symbol.toStringTag,{value:"Module"}));let j,z,L,F,U;function Z(){return!!j&&(0,x.i)()}async function W(){if(!Z()){const[e,t]=await Promise.all([n.e(8879).then(n.bind(n,28879)),Promise.resolve().then(n.bind(n,9192)).then((e=>e.a8)).then((({injectPe:e})=>e)),(0,x.l)()]);j=new e.OperatorGeodeticLength,t(x.p)}}function J(){return!!z&&Z()}async function K(){if(!J()){const[e]=await Promise.all([Promise.resolve().then(n.bind(n,78125)),W()]);z=e.fromGeometry,L=e.fromSpatialReference,F=e.getSpatialReference,U=j.supportsCurves()}}const Q=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t={}){const{curveType:n="geodesic",unit:r}=t,s=F(e);let i=function(e,t,n){return j.execute(e,t,n,null)}(z(e),L(s),l.O[n]);return i&&r&&(i=(0,u.oU)(i,"meters",r)),i},isLoaded:J,load:K,get supportsCurves(){return U}},Symbol.toStringTag,{value:"Module"}));var $=n(11878),H=n(34727);const ee={uniform:0,conformal:1,rigid:2,"rigid-motion":3,general:4},te=e=>e.map((e=>new $.P(e.x,e.y)));class ne{constructor(){this.transform=new $.T}calculateErrors(e,t){const n=e.length,r=t.length;if(n!==r)throw new Error(`The input length (${n}) is not the same as output length (${r})`);const s=[];return{rms:this.transform.calculateErrors(n,te(e),te(t),s),errorsOut:s}}flipX(e,t){return this.transform.flipX(e,t),this}flipY(e,t){return this.transform.flipY(e,t),this}initializeFromControlPoints(e,t,n,r){const s=t.length,i=n.length;if(s!==i)throw new Error(`The input length (${s}) is not the same as output length (${i})`);this.transform.initializeFromControlPoints(ee[e],s,te(t),te(n),r?.transform)}isIdentity(){return this.transform.isIdentity()}rotate(e,t,n){const r=(0,H.kU)(e);return null!=t&&null!=n?this.transform.rotateAngleAbout(r,new $.P(t,n)):this.transform.rotateAngle(r),this}scale(e,t){return this.transform.scale(e,t),this}setIdentity(){this.transform.setIdentity()}setSwapCoordinates(){return this.transform.setSwapCoordinates(),this}shear(e,t){return this.transform.shear(e,t),this}shift(e,t){return this.transform.shiftCoords(e,t),this}}const re=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t={}){const{unit:n}=t;let r=(0,m.fromGeometry)(e).calculateArea2D();if(r&&n){const t=(0,m.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const s=(0,u.B5)(t);s!==n&&(s?r=(0,u.oU)(r,s,n):(r=Math.sqrt(r),r*=(0,u.GA)(t),r**=2,r=(0,u.oU)(r,"square-meters",n)))}return r},supportsCurves:!0},Symbol.toStringTag,{value:"Module"}));var se,ie,oe=n(96546),ae=n(35368),me=n(90237),ue=n(80407),ce=n(32406),le=n(5247);class he{getOperatorType(){return 10204}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r){return new fe(e,t,n,r)}execute(e,t,n,r){return e||(0,i.t)("null param is not allowed."),new fe(null,t,n,r).generalize(e)}}class fe extends s.G{constructor(e,t,n,r){super(),this.m_pline=null,this.m_point=new ae.P,this.m_stack=[],this.m_resultstack=[],this.m_callCount=0,this.m_progressTracker=r,this.m_geoms=e,this.m_maxDeviation=t,this.m_bRemoveDegenerateParts=n}tock(){return!0}getRank(){return 1}next(){const e=this.m_geoms.next();return null===e?null:((0,i.c)(e),this.generalize(e))}getGeometryID(){return this.m_geoms.getGeometryID()}generalize(e){const t=e.getGeometryType();if((0,i.h)(t))return e;if(t===i.G.enumEnvelope){const t=new ae.h({vd:e.getDescription()});return t.addEnvelope(e,!1),this.generalize(t)}if((0,i.e)(t)){const t=new ae.i({vd:e.getDescription()});return t.addSegment(e,!0),this.generalize(t)}if((0,i.f)(t)||(0,i.a)(""),e.isEmpty()||this.m_maxDeviation<=0)return e;const n=(new le.O).execute(e,0,.05*this.m_maxDeviation,0,this.m_progressTracker);e.hasNonLinearSegments()&&(this.m_maxDeviation*=.95);const r=n,s=e.createInstance();s.getGeometryType()===i.G.enumPolygon&&s.setFillRule(e.getFillRule()),this.m_xy=r.getAttributeStreamRef(0);{const e={stack:[],error:void 0,hasError:!1};try{const t=new ae.L;this.m_pline=t,(0,me.b)(e,(0,$.f)((()=>{this.m_pline=null}),!1),!1);for(let e=0,t=r.getPathCount();e<t;e++)this.generalizePath(r.getImpl(),e,s.getImpl())}catch(t){e.error=t,e.hasError=!0}finally{(0,me.c)(e)}}return this.m_resultstack.length=0,this.m_stack.length=0,s}generalizePath(e,t,n){if(e.getPathSize(t)<2)return;this.m_resultstack.length=0,this.m_stack.length=0;const r=e.getPathStart(t),s=e.getPathEnd(t)-1,i=e.isClosedPath(t),o=e.isClosedPathInXYPlane(t);let a=0,m=-1;this.m_stack.push(i?r:s),this.m_stack.push(r);let u=!1,c=!1;for(!this.m_bRemoveDegenerateParts&&o&&(u=!0,c=!0);this.m_stack.length>1;){const t=this.m_stack.at(-1);this.m_stack.pop();const n=this.m_stack.at(-1);let r=e.getXY(t);this.m_pline.setStartXY(r),r=e.getXY(n),this.m_pline.setEndXY(r);const i=[0];let o=this.findGreatestDistance(t,n,s,i);o>=0&&(u?u=!1:(c&&i[0]>a&&(a=i[0],m=o),i[0]<=this.m_maxDeviation&&(o=-1))),o>=0?(this.m_stack.push(o),this.m_stack.push(t)):this.m_resultstack.push(t)}i||this.m_resultstack.push(this.m_stack[0]);const l=this.m_resultstack.length;if(l===e.getPathSize(t)&&l===this.m_stack.length)n.addPath(e,t,!0);else if(this.m_resultstack.length>0){if(this.m_bRemoveDegenerateParts&&this.m_resultstack.length<=2){if(i||1===this.m_resultstack.length)return;if($.P.distance(e.getXY(this.m_resultstack[0]),e.getXY(this.m_resultstack[1]))<=this.m_maxDeviation)return}if(c&&m>=0&&a<=this.m_maxDeviation){const e=this.m_resultstack.at(-1)>m;this.m_resultstack.push(m),e&&(this.m_resultstack[this.m_resultstack.length-2]=(0,$.b)(this.m_resultstack[this.m_resultstack.length-1],this.m_resultstack[this.m_resultstack.length-1]=this.m_resultstack[this.m_resultstack.length-2]))}for(let t=0,r=this.m_resultstack.length;t<r;t++)e.getPointByVal(this.m_resultstack[t],this.m_point),0===t?n.startPathPoint(this.m_point):n.lineToPoint(this.m_point);if(i){for(let e=this.m_resultstack.length;e<3;e++)n.lineToPoint(this.m_point);n.closePathWithLine()}}}findGreatestDistance(e,t,n,r){let s=t-1;t<=e&&(s=n);let i=-1,o=0;const a=new $.P;for(let t=e+1;t<=s;t++){this.m_xy.queryPoint2D(2*t,a);const e=a.x,n=a.y,r=this.m_pline.getClosestCoordinate(a,!1);a.assign(this.m_pline.getCoord2D(r)),a.x-=e,a.y-=n;const s=a.length();s>o&&(i=t,o=s),this.m_callCount++}return r[0]=o,i}}class ge{getOperatorType(){return 10104}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}isSimple(e,t,n,r,s){return 5===(0,ce.k)(e,t,n,r,s)}executeMany(e,t,n,r){return new _e(e,t,n,r)}execute(e,t,n,r){const o=new s.S([e]),a=this.executeMany(o,t,n,r).next();return a||(0,i.b)("null output"),a}}class _e extends s.G{constructor(e,t,n,r){super(),e||(0,i.t)(""),this.m_progressTracker=r,this.m_bForceSimplify=n,this.m_index=-1,this.m_inputGeometryCursor=e,this.m_spatialReference=t}next(){const e=this.m_inputGeometryCursor.next();return e?((0,i.c)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.simplify(e)):null}getGeometryID(){return this.m_index}tock(){return!1}getRank(){return 1}simplify(e){return e||(0,i.t)(""),(0,ce.l)(e,this.m_spatialReference,this.m_bForceSimplify,this.m_progressTracker)}}function pe(e,t,n,r,s,i){return{m_from:e.clone(),m_to:t.clone(),m_center:n.clone(),m_next:s,m_type:r}}function de(e,t,n,r,s){return{m_from:e.clone(),m_to:t.clone(),m_next:n,m_type:4,m_center:new $.P}}(ie=se||(se={}))[ie.enumDummy=256]="enumDummy",ie[ie.enumLine=1]="enumLine",ie[ie.enumArc=2]="enumArc",ie[ie.enumMiter=8]="enumMiter",ie[ie.enumBevel=16]="enumBevel",ie[ie.enumJoinMask=26]="enumJoinMask",ie[ie.enumConnectionMask=27]="enumConnectionMask";class ye extends s.G{constructor(e,t,n,r,s,i,o,a,m,u){super(),this.m_index=0,this.m_bufferedPolygon=null,this.m_x=0,this.m_y=0,this.m_progressTracker=u,this.m_parent=e,this.m_mp=t,this.m_distance=n,this.m_spatialReference=r,this.m_densifyDist=a,this.m_maxVertexInCompleteCircle=m,this.m_joins=s,this.m_caps=i,this.m_miterLimit=o}next(){const e=new ae.P;for(;;){if(this.m_index===this.m_mp.getPointCount())return null;if(1===this.m_caps)return this.m_index=this.m_mp.getPointCount(),new ae.h({vd:this.m_mp.getDescription()});if(this.m_mp.getPointByVal(this.m_index,e),this.m_index++,!e.isEmpty())break}let t,n=!1;if(null===this.m_bufferedPolygon&&(this.m_x=e.getX(),this.m_y=e.getY(),this.m_bufferedPolygon=this.m_parent.buffer(e,this.m_distance,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_densifyDist,this.m_maxVertexInCompleteCircle),n=!0),t=this.m_index<this.m_mp.getPointCount()?this.m_bufferedPolygon.clone():this.m_bufferedPolygon,!n){const n=new $.T,r=e.getX()-this.m_x,s=e.getY()-this.m_y;n.setShiftCoords(r,s),t.applyTransformation(n)}return(0,ae.N)(t,0),t}getGeometryID(){return 0}getRank(){return 1}tock(){return!0}}class Pe extends s.G{constructor(e){super(),this.m_currentPathIndex=0,this.m_polyline=e}next(){if(!this.m_polyline)return null;const e=this.m_polyline.getImpl(),t=e.getPathCount();if(this.m_currentPathIndex<t){const t=this.m_currentPathIndex;if(this.m_currentPathIndex++,!e.isClosedPathInXYPlane(t)){let n=e.getXY(e.getPathEnd(t)-1);for(;this.m_currentPathIndex<e.getPathCount();){const t=e.getXY(e.getPathStart(this.m_currentPathIndex));if(e.isClosedPathInXYPlane(this.m_currentPathIndex))break;if(!t.equals(n))break;n=e.getXY(e.getPathEnd(this.m_currentPathIndex)-1),this.m_currentPathIndex++}}if(0===t&&this.m_currentPathIndex===this.m_polyline.getPathCount()){const e=this.m_polyline;return this.m_polyline=null,e}const n=new ae.i({vd:this.m_polyline.getDescription()});n.addPath(this.m_polyline,t,!0);for(let r=t+1;r<this.m_currentPathIndex;r++)n.addSegmentsFromPath(this.m_polyline,r,0,e.getSegmentCountPath(r),!1);return this.m_currentPathIndex===this.m_polyline.getPathCount()&&(this.m_polyline=null),n}return null}getGeometryID(){return 0}getRank(){return 1}tock(){return!0}}class xe extends s.G{constructor(e,t,n){super(),this.m_geometry=null,this.m_index=0,this.m_bufferer=e,this.m_geoms=t,this.m_index=0,this.m_bFilter=n}next(){if(null===this.m_geometry&&(this.m_index=0,this.m_geometry=this.m_geoms.next(),!this.m_geometry))return null;const e=this.m_geometry.getImpl();if(this.m_index<e.getPathCount()){const e=this.m_index;return this.m_index++,this.m_bufferer.bufferPolylinePath(this.m_geometry,e,this.m_bFilter)}return this.m_geometry=null,this.next()}getGeometryID(){return 0}getRank(){return 1}tock(){return!0}}class be extends s.G{constructor(e){super(),this.m_index=0,this.m_bufferer=e}next(){const e=this.m_bufferer.m_geometry;if(this.m_index<e.getPathCount()){const t=this.m_index,n=e.calculateRingArea2D(this.m_index);for((0,i.g)(n>0),this.m_index++;this.m_index<e.getPathCount()&&!(e.calculateRingArea2D(this.m_index)>0);)this.m_index++;let r;return r=0===t&&this.m_index===e.getPathCount()?this.m_bufferer.bufferPolygonImpl(e,0,e.getPathCount()):this.m_bufferer.bufferPolygonImpl(e,t,this.m_index),r}return null}getGeometryID(){return 0}getRank(){return 1}tock(){return!0}}class Ce{constructor(e){this.m_geometry=null,this.m_bufferCommands=[],this.m_originalGeomType=i.G.enumUnknown,this.m_maxVertexInCompleteCircle=-1,this.m_circleTemplateSize=-1,this.m_oldCircleTemplateSize=0,this.m_spatialReference=null,this.m_tolerance=new ae.C(0,0),this.m_smallTolerance=new ae.C(0,0),this.m_filterTolerance=0,this.m_densifyDist=-1,this.m_distance=Number.NaN,this.m_absDistance=0,this.m_absDistanceReversed=0,this.m_dA=-1,this.m_miterLimit=4,this.m_joins=0,this.m_caps=0,this.m_bRoundBuffer=!0,this.m_bOutputLoops=!0,this.m_bFilter=!0,this.m_circleTemplate=[],this.m_leftStack=[],this.m_middleStack=[],this.m_helperLine1=new ae.L,this.m_helperLine2=new ae.L,this.m_helperArray=[],this.m_progressCounter=0,this.m_densificator=ae.D.constructDefault(e),this.m_progressTracker=e}buffer(e,t,n,r,s,o,a,m){if(e||(0,i.t)("Geometry.Bufferer.Impl.Buffer"),a<0&&(0,i.t)("Geometry.Bufferer.Impl.Buffer"),(0,i.q)(e.getGeometryType())&&(0,i.a)("Unsupported geometry type."),e.isEmpty())return new ae.h({vd:e.getDescription()});if(this.m_joins=r,this.m_caps=s,this.m_bRoundBuffer=!1,this.m_miterLimit=o,this.m_originalGeomType=e.getGeometryType(),(0,i.r)(this.m_originalGeomType)?this.m_bRoundBuffer=0===this.m_joins:(0,i.h)(this.m_originalGeomType)?this.m_bRoundBuffer=0===this.m_caps:(0,i.s)(this.m_originalGeomType)&&(this.m_bRoundBuffer=0===this.m_joins&&0===this.m_caps),this.m_bFilter=this.m_bRoundBuffer,this.m_geometry=(0,ue.c)(e),this.m_geometry.isEmpty())return new ae.h({vd:e.getDescription()});const u=new ae.a;this.m_geometry.queryLooseEnvelope(u),t>0&&u.inflateCoords(t,t),this.m_tolerance=(0,ae.b)(n,u,!0),this.m_smallTolerance=(0,ae.b)(null,u,!0),m<=0&&(m=96),this.m_spatialReference=n,this.m_distance=t,this.m_absDistance=Math.abs(this.m_distance),this.m_absDistanceReversed=0!==this.m_absDistance?1/this.m_absDistance:0,Number.isNaN(a)||0===a?a=1e-5*this.m_absDistance:a>.5*this.m_absDistance&&(a=.5*this.m_absDistance),m<12&&(m=12);const c=Math.abs(t)*(1-Math.cos(Math.PI/m));if(c>a)a=c;else if(0!==t){const e=Math.PI/Math.acos(1-a/Math.abs(t));e<m-1&&(m=Math.trunc(e))<12&&(m=12,a=Math.abs(t)*(1-Math.cos(Math.PI/m)))}this.m_densifyDist=a,this.m_maxVertexInCompleteCircle=m,this.m_filterTolerance=this.m_bRoundBuffer?Math.min(this.m_smallTolerance.total(),.25*this.m_densifyDist):0,this.m_circleTemplateSize=this.calcN(),this.m_circleTemplateSize!==this.m_oldCircleTemplateSize&&(this.m_circleTemplate.length=0,this.m_oldCircleTemplateSize=this.m_circleTemplateSize),this.m_densifyDist>0&&(0,i.n)(this.m_geometry)&&(this.m_geometry=this.m_densificator.densifyEx(this.m_geometry,0,this.m_densifyDist,0,0!==this.m_joins,(0,$.o)()));const l=this.bufferImpl();return this.m_geometry=null,l}generateCircleTemplate(){if(this.m_circleTemplate.length)return;const e=this.m_circleTemplateSize,t=Math.trunc((e+3)/4),n=.5*Math.PI/t;this.m_dA=n,this.m_circleTemplate.length=4*t;const r=Math.cos(n),s=Math.sin(n),i=$.P.construct(0,1);for(let e=0;e<t;e++)this.m_circleTemplate[e+0*t]=$.P.construct(i.y,-i.x),this.m_circleTemplate[e+1*t]=$.P.construct(-i.x,-i.y),this.m_circleTemplate[e+2*t]=$.P.construct(-i.y,i.x),this.m_circleTemplate[e+3*t]=i.clone(),i.rotateReverse(r,s)}bufferImpl(){const e=this.m_geometry.getGeometryType();if((0,i.e)(e)){const e=new ae.i({vd:this.m_geometry.getDescription()});return e.addSegment(this.m_geometry,!0),this.m_geometry=e,this.bufferImpl()}if(this.m_distance<=this.m_tolerance.total()){if(!(0,i.r)(e))return new ae.h({vd:this.m_geometry.getDescription()});if(this.m_distance<0){const e=new ae.a;if(this.m_geometry.queryEnvelope(e),e.width()<=2*this.m_absDistance||e.height()<=2*this.m_absDistance)return new ae.h({vd:this.m_geometry.getDescription()})}}switch(this.m_geometry.getGeometryType()){case i.G.enumPoint:return this.bufferPoint();case i.G.enumMultiPoint:return this.bufferMultiPoint();case i.G.enumPolyline:return this.bufferPolyline();case i.G.enumPolygon:return this.bufferPolygon();case i.G.enumEnvelope:return this.bufferEnvelope();default:(0,i.b)("")}}bufferPolyline(){if(this.isDegenerateGeometry(this.m_geometry)){const e=new ae.P;this.m_geometry.getPointByVal(0,e);const t=new ae.a;return this.m_geometry.queryEnvelope(t),e.setXY(t.getCenter()),this.bufferDegeneratePath(e,!0)}const e=this.m_geometry,t=this.m_geometry.getDescription();this.m_geometry=null;const n=new Pe(e);let r,s;r=0===this.m_joins?(new he).executeMany(n,.25*this.m_densifyDist,!1,this.m_progressTracker):n,s=this.m_bRoundBuffer?(new ge).executeMany(r,null,!0,this.m_progressTracker):r;const i=new xe(this,s,this.m_bFilter),o=(new oe.O).executeMany(i,this.m_spatialReference,this.m_progressTracker,2),a=(new ce.O).executeMany(o,this.m_spatialReference,!1,this.m_progressTracker).next();return null!==a?a:new ae.h({vd:t})}bufferPolygon(){if(0===this.m_distance)return this.m_geometry;this.generateCircleTemplate();const e=(new ce.O).execute(this.m_geometry,null,!1,this.m_progressTracker);if(this.m_distance<0){if(this.m_geometry=e,this.m_geometry.isEmpty())return this.m_geometry;const t=this.m_geometry,n=this.bufferPolygonImpl(t,0,t.getPathCount());return(new ce.O).execute(n,this.m_spatialReference,!1,this.m_progressTracker)}{if(this.m_geometry=e,this.isDegenerateGeometry(this.m_geometry)){const e=new ae.P;this.m_geometry.getPointByVal(0,e);const t=new ae.a;return this.m_geometry.queryEnvelope(t),e.setXY(t.getCenter()),this.bufferDegeneratePath(e,!0)}const t=new be(this),n=(new oe.O).executeMany(t,this.m_spatialReference,this.m_progressTracker,2),r=(new ce.O).executeMany(n,this.m_spatialReference,!1,this.m_progressTracker).next();return null!==r?r:new ae.h({vd:this.m_geometry.getDescription()})}}bufferPolygonImpl(e,t,n){const r=e,s=r.getImpl();let i=new ae.h({vd:e.getDescription()});for(let o=t;o<n;o++){if(s.getPathSize(o)<1)continue;const t=s.calculateRingArea2D(o),n=new ae.a;if(s.queryPathEnvelope(o,n),this.m_distance>0)if(t>0)if(this.isDegeneratePath(s,o)){const e=new ae.P;s.getPointByVal(s.getPathStart(o),e),e.setXY(n.getCenter()),i.add(this.bufferDegeneratePath(e,!0),!1)}else{const t=new ae.i({vd:e.getDescription()}),n=t.getImpl();if((0,ae.U)(this.m_geometry,o)){const e=this.bufferConvexPath(r,o);i.add(e,!1)}else{this.bufferClosedPath(this.m_geometry,o,n,this.m_bRoundBuffer,1);const e=this.bufferCleanup(t);i.add(e,!1)}}else{if(n.width()+this.m_tolerance.total()<=2*this.m_absDistance||n.height()+this.m_tolerance.total()<=2*this.m_absDistance)continue;const t=new ae.i({vd:e.getDescription()}),r=t.getImpl();if(this.bufferClosedPath(this.m_geometry,o,r,this.m_bRoundBuffer,1),!t.isEmpty()){const e=n,s=Math.max(1,this.m_absDistance),o=e.clone();o.inflateCoords(s,s),r.addEnvelope(o,!1);const a=this.bufferCleanup(t);i.reserve(i.getPointCount()+a.getPointCount()-4),De(a,i,o,!0)}}else if(t>0){if(n.width()+this.m_tolerance.total()<=2*this.m_absDistance||n.height()+this.m_tolerance.total()<=2*this.m_absDistance)continue;const t=new ae.i({vd:e.getDescription()}),r=t.getImpl();if(this.bufferClosedPath(this.m_geometry,o,r,this.m_bRoundBuffer,-1),!t.isEmpty()){const e=new ae.a;r.queryLooseEnvelope(e);const n=Math.max(1,this.m_absDistance),s=e.clone();s.inflateCoords(n,n),r.addEnvelope(s,!1),De(this.bufferCleanup(t),i,s,!0)}}else{const t=new ae.i({vd:e.getDescription()}),n=t.getImpl();this.bufferClosedPath(this.m_geometry,o,n,this.m_bRoundBuffer,-1);const r=this.bufferCleanup(t);for(let e=0,t=r.getPathCount();e<t;e++)i.addPath(r,e,!0)}}if(this.m_distance>0)return i.getPathCount()>1?this.bufferCleanup(i):ve(i);{const e=new ae.a;if(i.queryLooseEnvelope(e),i.isEmpty())return ve(i);{const t=Math.max(1,this.m_absDistance),n=e.clone();n.inflateCoords(t,t),i.addEnvelope(n,!1);const r=this.bufferCleanup(i);i=new ae.h;const s=new ae.h({vd:r.getDescription()});return De(r,s,n,!1),ve(s)}}}bufferPoint(){return this.bufferPointImpl(this.m_geometry)}bufferPointImpl(e){const t=new ae.h({vd:e.getDescription()});return 0===this.m_caps?(this.addCircle(t.getImpl(),e),this.setStrongSimple(t)):2===this.m_caps?(this.addSquare(t.getImpl(),e),this.setStrongSimple(t)):t}bufferDegeneratePath(e,t){const n=new ae.h({vd:e.getDescription()});return t&&0===this.m_joins||!t&&0===this.m_caps?(this.addCircle(n.getImpl(),e),this.setStrongSimple(n)):t||2!==this.m_caps?n:(this.addSquare(n.getImpl(),e),this.setStrongSimple(n))}bufferMultiPoint(){const e=new ye(this,this.m_geometry,this.m_distance,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_densifyDist,this.m_maxVertexInCompleteCircle,this.m_progressTracker);return(new oe.O).executeMany(e,this.m_spatialReference,this.m_progressTracker,2).next()}bufferEnvelope(){let e=new ae.h({vd:this.m_geometry.getDescription()});if(this.m_distance<=0){if(0===this.m_distance)e.addEnvelope(this.m_geometry,!1),Ge(this.m_geometry,this.m_tolerance.total())&&(e=this.setStrongSimple(e));else{const t=new ae.E;this.m_geometry.queryEnvelope(t),t.inflateCoords(this.m_distance,this.m_distance),e.addEnvelope(t,!1),Ge(t,this.m_tolerance.total())&&(e=this.setStrongSimple(e))}return e}if(1===this.m_joins){const t=new ae.E({copy:this.m_geometry});return t.inflateCoords(this.m_absDistance,this.m_absDistance),e.addEnvelope(t,!1),e}const t=this.m_geometry.clone();if(0===t.width()||0===t.height()){if(0===t.width()&&0===t.height()){const e=new ae.P({vd:this.m_geometry.getDescription()});return t.queryCornerByVal(0,e),this.m_geometry=e,this.bufferImpl()}const e=new ae.i({vd:this.m_geometry.getDescription()}),n=new ae.P;return t.queryCornerByVal(0,n),e.startPathPoint(n),t.queryCornerByVal(2,n),e.lineToPoint(n),this.m_geometry=e,this.bufferImpl()}return e.addEnvelope(this.m_geometry,!1),this.m_geometry=e,this.bufferConvexPath(e,0)}bufferConvexPath(e,t){this.generateCircleTemplate();const n=e.hasAttribute(10),r=new ae.h({vd:e.getDescription()}),s=r.getImpl();r.reserve((this.m_circleTemplate.length/10+4)*e.getPathSize(t));const o=new $.P,a=new $.P,m=new $.P,u=new $.P(0,0),c=new $.P,l=new $.P,h=e.getImpl(),f=e.getPathSize(t),g=e.getPathStart(t);for(let r=0,_=e.getPathSize(t);r<_;r++){const e=h.getXY(g+r),t=h.getXY(g+(r+1)%f),_=h.getXY(g+(r+2)%f);c.setSub(t,e),0===c.length()&&(0,i.b)("");const p=n&&!!(1&h.getAttributeAsInt(10,(r+1)%f,0));c.normalize();const d=c.clone();c.leftPerpendicularThis(),c.scale(this.m_absDistance),o.setAdd(c,e),a.setAdd(c,t),0===r?s.startPath(o):s.lineTo(o),s.lineTo(a),l.setSub(_,t),0===l.length()&&(0,i.b)(""),l.normalize();const y=l.clone();l.leftPerpendicularThis(),l.scale(this.m_absDistance),m.setAdd(l,t);let P=se.enumArc;const x=p?0:this.m_joins;if(2===x)P=se.enumBevel;else if(1===x){const e=-d.crossProduct(y);u.setSub(d,y),u.scale(this.m_absDistance/e),u.length()<this.m_miterLimit*this.m_absDistance?(u.addThis(t),P=se.enumMiter):P=se.enumBevel}else u.assign(t);this.addJoin(P,s,u,a,m,!1,!1)}return ve(r)}bufferPolylinePath(e,t,n){this.generateCircleTemplate();const r=e,s=r.getImpl();if(s.getPathSize(t)<1)return null;let i;if(i=this.m_bRoundBuffer?s.isClosedPathInXYPlane(t):s.isClosedPath(t),this.isDegeneratePath(s,t)&&this.m_distance>0){const e=new ae.P;s.getPointByVal(s.getPathStart(t),e);const n=new ae.a;return s.queryPathEnvelope(t,n),e.setXY(n.getCenter()),this.bufferDegeneratePath(e,i)}const o=new ae.i({vd:e.getDescription()});o.reserve((Math.trunc(this.m_circleTemplate.length/10)+4)*s.getPathSize(t));const a=o.getImpl();return i?2!==this.bufferClosedPath(r,t,a,n,1)&&this.bufferClosedPath(r,t,a,n,-1):this.bufferOpenPath(r,t,a,n),this.bufferCleanup(o)}progress_(){}bufferCleanup(e,t=!1){const n=t?this.m_tolerance:this.m_smallTolerance;return(0,ce.p)(e,n,!0,!t,-1,this.m_progressTracker,0,!1)}calcN(){if(0===this.m_densifyDist)return this.m_maxVertexInCompleteCircle;const e=1-this.m_densifyDist*Math.abs(this.m_absDistanceReversed);let t=4;return t=e<-1?4:2*Math.PI/Math.acos(e)+.5,t<4?t=4:t>this.m_maxVertexInCompleteCircle&&(t=this.m_maxVertexInCompleteCircle),Math.trunc(t)}addJoin(e,t,n,r,s,i,o){if(this.generateCircleTemplate(),i&&(t.startPath(r),i=!1),e===se.enumBevel)return void(o&&t.lineTo(s));if(e===se.enumMiter){const e=n.clone();return t.lineTo(e),void(o&&t.lineTo(s))}const a=new $.P;a.setSub(r,n),a.scale(this.m_absDistanceReversed);const m=new $.P;m.setSub(s,n),m.scale(this.m_absDistanceReversed);let u=Math.atan2(a.y,a.x)/this.m_dA;u<0&&(u=this.m_circleTemplate.length+u),u=this.m_circleTemplate.length-u;let c=Math.atan2(m.y,m.x)/this.m_dA;c<0&&(c=this.m_circleTemplate.length+c),c=this.m_circleTemplate.length-c,c<u&&(c+=this.m_circleTemplate.length);let l=Math.trunc(c),h=Math.ceil(u),f=this.m_circleTemplate[h%this.m_circleTemplate.length].clone();f.scaleAddThis(this.m_absDistance,n);const g=10*this.m_tolerance.total();f.sub(r).length()<g&&(h+=1),f=this.m_circleTemplate[l%this.m_circleTemplate.length].clone(),f.scaleAddThis(this.m_absDistance,n),f.sub(s).length()<g&&(l-=1);let _=l-h;_++;for(let e=0,r=h%this.m_circleTemplate.length;e<_;e++,r=(r+1)%this.m_circleTemplate.length)f=this.m_circleTemplate[r].clone(),f.scaleAddThis(this.m_absDistance,n),t.lineTo(f),this.progress_();o&&t.lineTo(s)}bufferClosedPath(e,t,n,r,s){const i=new ae.d,o=i.addPathFromMultiPath(e,t,!0);return this.bufferClosedPathImpl(i,o,n,r,s)}bufferClosedPathImpl(e,t,n,r,s){const o=e.getFirstVertex(e.getFirstPath(t)),a=new ae.P;if(e.queryPoint(o,a),e.filterClosePoints(this.m_filterTolerance,!1,!1,!1,-1),e.getPointCount(t)<2)return s<0?0:(this.m_bRoundBuffer&&this.addCircle(n,a),2);(0,i.g)(e.getFirstPath(t)!==ae.n),(0,i.g)(e.getFirstVertex(e.getFirstPath(t))!==ae.n);const m=e.getXY(e.getFirstVertex(e.getFirstPath(t))),u=new $.T;if(u.setShift(m.negate()),e.applyTransformation(u),r){const r=function(e,t,n,r,s,i,o){return function(e,t,n,r,s,i,o){const a={stack:[],error:void 0,hasError:!1};try{const r=e.getFirstPath(t),m=e.createUserIndex();(0,me.b)(a,(0,$.f)((()=>{e.removeUserIndex(m)}),!1),!1),function(e,t,n,r){let s=-1;const i=new $.P,o=new $.P,a=new $.P;for(let n=0,m=e.getPathSize(r),u=e.getFirstVertex(r);n<m;++n){-1===s&&(e.queryXY(u,o),s=e.getPrevVertex(u),-1!==s&&(e.queryXY(s,i),a.setSub(o,i),a.normalize()));const n=e.getNextVertex(u);if(-1===n)break;const r=e.getXY(n),m=r.sub(o);m.normalize(),-1!==s&&m.dotProduct(a)<-.99&&Math.abs(m.crossProduct(a))<1e-7&&e.setUserIndex(u,t,1),s=u,u=n,i.assign(o),o.assign(r),a.assign(m)}}(e,m,0,r);for(let t=0;t<100;++t){if(0===e.getPathSize(r))return 1;let t=e.getFirstVertex(r),i=e.getPathSize(r);if(i<3)return 1;e.isClosedPath(r)||(i-=1);const a=64;let u=0,c=!1;for(let r=0;r<i&&t!==ae.n;r++){let l=0,h=t;for(let u=1,c=Math.min(a,i-r);u<c;u++)if(h=e.getNextVertexEx(h,n),u>1){const r=Se(e,m,t,h,n,s,o,a);if(-1===r)break;l+=r,i-=r}if(u+=l,c=l>0,c){const r=e.getPrevVertexEx(t,n);if(-1!==r){t=r,i++;continue}}t=e.getNextVertexEx(t,n)}if(0===u)break}return e.filterClosePoints(i,!1,!1,!1,-1),1}catch(e){a.error=e,a.hasError=!0}finally{(0,me.c)(a)}}(e,t,n,0,s,i,o)}(e,t,s,0,this.m_absDistance,this.m_filterTolerance,this.m_densifyDist);if((0,i.g)(1===r),e.getPointCount(t)<2)return s<0?0:(this.addCircle(n,a),2)}const c=0!==this.m_joins&&e.getVertexDescription().hasAttribute(10);this.m_bufferCommands.length=0;const l=e.getFirstPath(t);let h=e.getFirstVertex(l),f=1===s?e.getPrevVertex(h):e.getNextVertex(h),g=1===s?e.getNextVertex(h):e.getPrevVertex(h),_=!0;const p=new $.P,d=new $.P,y=new $.P,P=new $.P,x=new $.P,b=new $.P,C=new $.P,v=new $.P,G=this.m_absDistance,S=e.getPathSize(l),D=new $.P(0,0);for(let t=0;t<S;t++){d.assign(e.getXY(g)),_&&(p.assign(e.getXY(h)),y.assign(e.getXY(f)),b.setSub(p,y),b.normalize(),v.leftPerpendicularOther(b),v.scale(G),P.setAdd(v,p));const t=c&&!!(1&e.getAttributeAsDbl(10,h,0));x.setSub(d,p),x.normalize(),C.leftPerpendicularOther(x),C.scale(G);const n=new $.P;n.setAdd(p,C);const r=b.crossProduct(x),i=b.dotProduct(x);if(r<0||i<0&&r<Math.abs(i)*Number.EPSILON*8){let e=!1;const s=t?0:this.m_joins;if(1===s){const t=-r;D.setSub(b,x),D.scale(this.m_absDistance/t),D.length()<this.m_miterLimit*this.m_absDistance&&(D.addThis(p),e=!0),this.m_bufferCommands.push(pe(P,n,D,e?se.enumMiter:se.enumBevel,this.m_bufferCommands.length+1))}else this.m_bufferCommands.push(pe(P,n,p,0===s?se.enumArc:se.enumBevel,this.m_bufferCommands.length+1))}else P.equals(n)||(this.m_bufferCommands.push(de(P,p,this.m_bufferCommands.length+1)),this.m_bufferCommands.push(de(p,n,this.m_bufferCommands.length+1)));const o=new $.P;o.setAdd(d,C),this.m_bufferCommands.push(pe(n,o,p,se.enumLine,this.m_bufferCommands.length+1)),P.setCoordsPoint2D(o),v.setCoordsPoint2D(C),y.setCoordsPoint2D(p),p.setCoordsPoint2D(d),b.setCoordsPoint2D(x),f=h,h=g,_=!1,g=1===s?e.getNextVertex(h):e.getPrevVertex(h)}return this.m_bufferCommands.at(-1).m_next=0,this.processBufferCommands(n),u.setShift(m),n.applyTransformationToPath(u,n.getPathCount()-1),1}bufferOpenPath(e,t,n,r){if(this.m_bRoundBuffer){const s=new ae.i({vd:e.getDescription()});return s.addPath(e,t,!1),s.addSegmentsFromPath(e,t,0,e.getSegmentCountPath(t),!1),this.bufferClosedPath(s,0,n,r,1)}let s=0;const o=new ae.i({vd:e.getDescription()}),a=new $.P(0,0);{const r=new ae.d,i=r.addPathFromMultiPath(e,t,!1),m=r.getFirstVertex(r.getFirstPath(i)),u=new ae.P;if(r.queryPoint(m,u),a.assign(u.getXY()),r.filterClosePoints(0,!1,!1,!1,-1),r.getPointCount(i)<2)return this.m_bRoundBuffer&&this.addCircle(n,u),2;const c=r.getGeometry(r.getFirstGeometry());o.addPath(c,0,!1),s=o.getPointCount()-1,o.addSegmentsFromPath(c,0,0,c.getSegmentCountPath(0)-1,!1)}const m=new ae.d,u=m.addPathFromMultiPath(o,0,!0);(0,i.g)(m.getFirstPath(u)!==ae.n),(0,i.g)(m.getFirstVertex(m.getFirstPath(u))!==ae.n);const c=new $.T;c.setShift(a.negate()),m.applyTransformation(c),this.m_bufferCommands.length=0;const l=m.getFirstPath(u),h=0!==this.m_joins&&m.getVertexDescription().hasAttribute(10);let f=m.getFirstVertex(l),g=m.getPrevVertex(f),_=m.getNextVertex(f),p=!0;const d=new $.P,y=new $.P,P=new $.P,x=new $.P,b=new $.P,C=new $.P,v=new $.P,G=new $.P,S=this.m_absDistance,D=m.getPathSize(l),w=new $.P(0,0);for(let e=0;e<D;e++){let t=!1;0!==e&&e!==s||(t=!0),y.assign(m.getXY(_)),p&&(d.assign(m.getXY(f)),P.assign(m.getXY(g)),C.setSub(d,P),C.normalize(),G.leftPerpendicularOther(C),G.scale(S),x.setAdd(G,d));const n=h&&!!(1&m.getAttributeAsDbl(10,f,0));b.setSub(y,d),b.normalize(),v.leftPerpendicularOther(b),v.scale(S);const r=new $.P;r.setAdd(d,v);const i=C.crossProduct(b),o=C.dotProduct(b);if(i<0||o<0&&i<Math.abs(o)*Number.EPSILON*8)if(t)if(0===this.m_caps)this.m_bufferCommands.push(pe(x,r,d,se.enumArc,this.m_bufferCommands.length+1));else if(1===this.m_caps)this.m_bufferCommands.push(pe(x,r,d,se.enumLine,this.m_bufferCommands.length+1));else{const e=b.mul(this.m_absDistance).negate(),t=e.clone();e.addThis(x),t.addThis(r),this.m_bufferCommands.push(pe(x,e,d,se.enumLine,this.m_bufferCommands.length+1)),this.m_bufferCommands.push(pe(e,t,d,se.enumLine,this.m_bufferCommands.length+1)),this.m_bufferCommands.push(pe(t,r,d,se.enumLine,this.m_bufferCommands.length+1))}else{let e=!1;const t=n?0:this.m_joins;if(1===t){const t=-i;w.setSub(C,b),w.scale(this.m_absDistance/t),w.length()<this.m_miterLimit*this.m_absDistance&&(w.addThis(d),e=!0),this.m_bufferCommands.push(pe(x,r,w,e?se.enumMiter:se.enumBevel,this.m_bufferCommands.length+1))}else this.m_bufferCommands.push(pe(x,r,d,0===t?se.enumArc:se.enumBevel,this.m_bufferCommands.length+1))}else x.equals(r)||(this.m_bufferCommands.push(de(x,d,this.m_bufferCommands.length+1)),this.m_bufferCommands.push(de(d,r,this.m_bufferCommands.length+1)));const a=new $.P;a.setAdd(y,v),this.m_bufferCommands.push(pe(r,a,d,se.enumLine,this.m_bufferCommands.length+1)),x.setCoordsPoint2D(a),G.setCoordsPoint2D(v),P.setCoordsPoint2D(d),d.setCoordsPoint2D(y),C.setCoordsPoint2D(b),g=f,f=_,p=!1,_=m.getNextVertex(f)}return this.m_bufferCommands.at(-1).m_next=0,this.processBufferCommands(n),c.setShift(a),n.applyTransformationToPath(c,n.getPathCount()-1),1}processBufferCommands(e){const t=this.cleanupBufferCommands();let n=!0,r=t+1;for(let s=t;r!==t;s=r){const t=this.m_bufferCommands[s];r=-1!==t.m_next?t.m_next:(s+1)%this.m_bufferCommands.length,t.m_type&&(n&&(e.startPath(t.m_from),n=!1),t.m_type&se.enumJoinMask?this.addJoin(t.m_type,e,t.m_center,t.m_from,t.m_to,!1,!0):e.lineTo(t.m_to))}}cleanupBufferCommands(){this.m_helperArray=(0,$.m)($.P,9);let e=0;for(let t=0,n=this.m_bufferCommands.length;t<n;){const n=this.m_bufferCommands[t];if(n.m_type&se.enumConnectionMask){e=t;break}t=n.m_next}let t=e+1;for(let n=e;t!==e;n=t){const e=this.m_bufferCommands[n];t=e.m_next;let r=1,s=null;for(;t!==n&&(s=this.m_bufferCommands[t],!(s.m_type&se.enumConnectionMask));)t=s.m_next,r++;1!==r&&(e.m_type&s.m_type)===se.enumLine&&(this.m_helperLine1.setStartXY(e.m_from),this.m_helperLine1.setEndXY(e.m_to),this.m_helperLine2.setStartXY(s.m_from),this.m_helperLine2.setEndXY(s.m_to),1===this.m_helperLine1.intersect(this.m_helperLine2,this.m_helperArray,null,null,this.m_smallTolerance.total())&&(e.m_to.assign(this.m_helperArray[0]),s.m_from.assign(this.m_helperArray[0]),e.m_next=t))}return e}isDegeneratePath(e,t){if(1===e.getPathSize(t))return!0;if(0===this.m_joins&&0===this.m_caps){const n=new ae.a;if(e.queryPathEnvelope(t,n),Math.max(n.width(),n.height())<.5*this.m_densifyDist)return!0}return!1}isDegenerateGeometry(e){if(0===this.m_joins&&0===this.m_caps){const t=new ae.a;if(e.queryEnvelope(t),Math.max(t.width(),t.height())<.5*this.m_densifyDist)return!0}return!1}addCircle(e,t){const n=t.getXY();if(0!==this.m_circleTemplate.length){let t=this.m_circleTemplate[0].clone();t.scaleAddThis(this.m_absDistance,n),e.startPath(t);for(let r=1,s=this.m_circleTemplate.length;r<s;r++)t=this.m_circleTemplate[r].clone(),t.scaleAddThis(this.m_absDistance,n),e.lineTo(t);return}const r=this.m_circleTemplateSize,s=Math.trunc((r+3)/4),i=.5*Math.PI/s;e.reserve(4*s);const o=Math.cos(i),a=Math.sin(i);for(let t=3;t>=0;t--){const r=$.P.construct(0,this.m_absDistance);switch(t){case 0:for(let t=0;t<s;t++)e.lineToCoords(r.x+n.x,r.y+n.y),r.rotateReverse(o,a);break;case 1:for(let t=0;t<s;t++)e.lineToCoords(-r.y+n.x,r.x+n.y),r.rotateReverse(o,a);break;case 2:for(let t=0;t<s;t++)e.lineToCoords(-r.x+n.x,-r.y+n.y),r.rotateReverse(o,a);break;default:e.startPathCoords(r.y+n.x,-r.x+n.y);for(let t=1;t<s;t++)r.rotateReverse(o,a),e.lineToCoords(r.y+n.x,-r.x+n.y)}this.progress_()}}addSquare(e,t){const n=new ae.E({vd:t.getDescription()});n.setCoords(t.getX(),t.getY(),t.getX(),t.getY()),n.inflateCoords(this.m_absDistance,this.m_absDistance),e.addEnvelope(n,!1)}setStrongSimple(e){return e.getImpl().setIsSimple(4,this.m_tolerance.total()),e.getImpl().updateOGCFlagsProtected(),e}}function ve(e){return(0,ae.N)(e,0),e}function Ge(e,t){return!!e.isEmpty()||Math.min(e.width(),e.height())>t}function Se(e,t,n,r,s,o,a,m){const u=e.getXY(n),c=e.getXY(r);if(u.equals(c))return-1;const l=.25*a,h=.25*a,f=new $.P;f.setSub(c,u);const g=f.length(),_=g*g*.25,p=o*o-_;if(p<=_)return-1;const d=Math.sqrt(p);f.normalize();const y=f.clone();y.rightPerpendicularThis();const P=_/d,x=P<=h,b=$.P.lerp(c,u,.5),C=y.clone(),v=P-l;C.scaleAddThis(Math.max(0,v),b),y.negate().scaleAddThis(d,b);const G=3.61*(0,$.e)(o-h),S=C.sub(u),D=C.sub(c);let w=!1,M=0;const T=(0,$.a)(64,0);(0,i.g)(m===T.length);{for(let i=e.getPrevVertexEx(r,s);i!==n;){if(1===e.getUserIndex(i,t))return-1;if(!e.getXY(i).equals(c))break;{const t=e.getPrevVertexEx(i,s);e.removeVertex(i,!1),i=t}}const o=new $.P,a=u.clone();T[M++]=1;for(let i=e.getNextVertexEx(n,s);i!==r;){if(1===e.getUserIndex(i,t))return-1;const n=e.getXY(i);if(n.equals(a)){const t=e.getNextVertexEx(i,s);e.removeVertex(i,!1),i=t;continue}T[M++]=0;const r=new $.P;if(r.setSub(n,u),r.dotProduct(y)<0)return 0;($.P.sqrDistance(n,u)>G||$.P.sqrDistance(n,c)>G)&&(w=!0);let m=0;if(n.sub(u).crossProduct(S)>=0&&(m=1),n.sub(c).crossProduct(D)<=0&&(m|=2),0===m)return 0;T[M-1]=m,o.assign(a),a.assign(n),i=e.getNextVertexEx(i,s)}if(1===M)return 0;(0,i.g)(M<T.length),T[M++]=2}let E=!0;for(let e=1,t=0;e<M;e++)if(T[e]!==T[e-1]&&(t++,E=t<3&&(1===t&&3===T[e]||2===t&&2===T[e]),!E))return 0;if(M>2&&E&&(3===M||!w)){let t=0,i=e.getNextVertexEx(n,s);for(x||(e.setXY(i,C),i=e.getNextVertexEx(i,s));i!==r;){const n=e.getNextVertexEx(i,s);e.removeVertex(i,!1),i=n,++t}return t}if((0,i.g)(3!==M),w&&M>3)return 0;const I=u.clone();let N=n;const R=u.clone();let A=1,q=-1,O=N,k=0;for(M=1;O!==r;){O=e.getNextVertexEx(O,s);const t=T[M++];if(0===t){if(O===r)break;continue}const n=e.getXY(O);if(-1!==q){if(q&A&t&3){e.removeVertex(N,!0),k++,N=O,R.setCoordsPoint2D(n),A=t;continue}if(3===A&&0!==q&&0!==t){if(R.setCoordsPoint2D(C),x||R.equals(I)){e.removeVertex(N,!0),k++,N=O,R.setCoordsPoint2D(n),A=t;continue}e.setXY(N,R)}}q=A,I.setCoordsPoint2D(R),N=O,A=t,R.setCoordsPoint2D(n)}return k}function De(e,t,n,r){for(let s=0,i=e.getPathCount();s<i;s++){const i=e.getXY(e.getPathStart(s));i.x!==n.xmin&&i.x!==n.xmax&&t.addPath(e,s,r)}}class we extends s.G{constructor(e,t,n,r,s,i,o){super(),this.m_currentUnionEnvelope2D=new ae.a,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=o,this.m_bufferer=new Ce(o),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=n,this.m_maxDeviation=r,this.m_maxVerticesInFullCircle=s}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return(0,i.c)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const Me=new class{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r,s){return this.executeManyEx(e,t,n,Number.NaN,96,r,s)}execute(e,t,n,r){Number.isFinite(n)||(0,i.t)("Invalid distance for buffer operation");const o=new s.S([e]),a=[n],m=this.executeMany(o,t,a,!1,r).next();return m||(0,i.b)("null buffer output"),m}executeManyEx(e,t,n,r,s,o,a){if(void 0!==n.find((e=>!Number.isFinite(e)))&&(0,i.t)("Invalid distance for buffer operation"),o){const i=new we(e,t,n,r,s,!1,a);return(new oe.O).executeMany(i,t,a,2)}return new we(e,t,n,r,s,!1,a)}},Te=Me.supportsCurves(),Ee=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t,n={}){const{unit:r}=n,s=(0,m.getSpatialReference)(e);return r&&(t=(0,u.UW)(t,r,s)),(0,m.toGeometry)(function(e,t,n){return Me.execute(e,t,n,null)}((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(s),t),s)},executeMany:function(e,t,n={}){let{maxDeviation:i=NaN,maxVerticesInFullCircle:o=96,union:a=!1,unit:c}=n;const l=(0,m.getSpatialReference)(e);return c&&(t=t.map((e=>(0,u.UW)(e,c,l))),i&&(i=(0,u.UW)(i,c,l))),function(e,t,n,r,i,o){const a=Me.executeManyEx(new s.S(e),t,n,r,i,o,null);return Array.from(a)}(e.map(m.fromGeometry),(0,m.fromSpatialReference)(l),t,i,o,a).map((e=>(0,m.toGeometry)(e,l))).filter(r.Ru)},supportsCurves:Te},Symbol.toStringTag,{value:"Module"}));function Ie(e,t){if(!e.isEmpty())switch(e.getGeometryType()){case i.G.enumPolygon:return function(e,t=-1){const n=new $.K(0),r=new $.K(0),s=e.getImpl();let i;const o=s.hasNonLinearSegments();let a;const m=s.getXY(0);if(-1===t){if(a=s.calculateArea2D(),0===a)return Ae(e);o&&(i=s.querySegmentIterator());for(let e=0,t=s.getPathCount();e<t;e++)Ne(m,s,e,n,r),o&&Re(m,i,n,r)}else{if(a=s.calculateRingArea2D(t),0===a)return Ae(e,t);o&&(i=s.querySegmentIterator(),i.resetToPath(t)),Ne(m,s,t,n,r),o&&Re(m,i,n,r)}const u=new $.P,c=new $.P;return u.setCoords(n.getResult(),r.getResult()),c.assign(u.mul(1/a).add(m)),c}(e);case i.G.enumPolyline:return qe(e.getImpl());case i.G.enumLine:case i.G.enumBezier:case i.G.enumEllipticArc:return function(e){const t=e.calculateLength2D();return 0===t?e.getStartXY():e.calculateWeightedCentroid2D().mul(1/t)}(e);case i.G.enumMultiPoint:return function(e){const t=new $.K(0),n=new $.K(0),r=e.getImpl(),s=r.getAttributeStreamRef(0),i=r.getPointCount(),o=new $.P;for(let e=0;e<i;e++)s.queryPoint2D(2*e,o),t.add(o.x),n.add(o.y);const a=new $.P;return a.setCoords(t.getResult(),n.getResult()),a.divThis(i)}(e);case i.G.enumEnvelope:return e.getCenterXY();case i.G.enumPoint:return e.getXY();default:return $.P.construct(Number.NaN,Number.NaN)}return $.P.construct(Number.NaN,Number.NaN)}function Ne(e,t,n,r,s){const i=t.getPathStart(n),o=t.getPathEnd(n);if(o-i<3)return;const a=t.getAttributeStreamRef(0),m=a.readPoint2D(2*i),u=a.readPoint2D(2*(i+1));u.subThis(m);const c=new $.K(0),l=t.hasNonLinearSegments(),h=1/3,f=new $.P;for(let e=i+2;e<o;e++){a.queryPoint2D(2*e,f),f.subThis(m);const t=.5*f.crossProduct(u);l&&c.add(t);const n=h*t;r.add((u.x+f.x)*n),s.add((u.y+f.y)*n),u.setCoordsPoint2D(f)}const g=l?c.getResult():t.calculateRingArea2D(n),_=m.sub(e).mul(g);r.add(_.x),s.add(_.y)}function Re(e,t,n,r){let s;for(t.nextPath()||(0,i.b)("centroid");null!==(s=t.nextCurve());){const t=s.calculateWeightedAreaCentroid2D(e);n.add(t.x),r.add(t.y)}}function Ae(e,t=-1){return qe(e.getImpl(),t)}function qe(e,t=-1){const n=-1===t?e.calculateLength2D():e.calculatePathLength2D(t);if(0===n)return function(e,t=-1){if(-1!==t)return e.getXY(e.getPathStart(t));const n=new $.K(0),r=new $.K(0);for(let t=0;t<e.getPathCount();++t){const s=e.getXY(e.getPathStart(t));n.add(s.x),r.add(s.y)}return $.P.construct(n.getResult(),r.getResult()).mul(1/e.getPathCount())}(e,t);const r=new $.K(0),s=new $.K(0),i=e.querySegmentIterator();for(-1!==t&&i.resetToPath(t);i.nextPath();){const n=i.getPathIndex(),o=e.getXY(e.getPathStart(n));for(;i.hasNextSegment();){const e=i.nextSegment(),t=e.calculateLength2D();if(0===t)continue;const n=e.calculateWeightedCentroid2D().sub(o.mul(t));r.add(n.x),s.add(n.y)}const a=o.mul(e.calculatePathLength2D(n));if(r.add(a.x),s.add(a.y),-1!==t)break}const o=new $.P;return o.setCoords(r.getResult(),s.getResult()),o.mul(1/n)}const Oe=new class{getOperatorType(){return 10205}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t){return Ie(e)}},ke=Oe.supportsCurves(),Ve=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e){const t=Oe.execute((0,m.fromGeometry)(e),null);return(0,m.toPoint)(t,(0,m.getSpatialReference)(e))},supportsCurves:ke},Symbol.toStringTag,{value:"Module"})),Ye=new(n(31139).O),Xe=Ye.supportsCurves(),Be=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t){const n=(0,m.getSpatialReference)(e),r=(0,m.fromExtent)(t).asEnvelope2D();return(0,m.toGeometry)(function(e,t,n){return Ye.execute(e,t,n,null)}((0,m.fromGeometry)(e),r,(0,m.fromSpatialReference)(n)),n)},executeMany:function(e,t){const n=e.map(m.fromGeometry),r=(0,m.getSpatialReference)(e);return function(e,t,n){const r=Ye.executeMany(new s.S(e),t,n,null);return Array.from(r)}(n,(0,m.fromExtent)(t).asEnvelope2D(),(0,m.fromSpatialReference)(r)).map((e=>(0,m.toGeometry)(e,r)))},supportsCurves:Xe},Symbol.toStringTag,{value:"Module"}));var je=n(9192);const ze=new je.O,Le=ze.supportsCurves(),Fe=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return ze.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t){return ze.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference),null)},supportsCurves:Le},Symbol.toStringTag,{value:"Module"}));class Ue extends s.G{constructor(e,t,n){super(),t||(0,i.t)(""),this.m_progressTracker=n,this.m_index=-1,this.m_bMerge=e,this.m_bDone=!1,this.m_inputGeometryCursor=t}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge){if(!this.m_bDone){const e=Ze(this.m_inputGeometryCursor);return this.m_bDone=!0,e}return null}if(!this.m_bDone){const e=this.m_inputGeometryCursor.next();if(null!==e)return(0,i.p)(e),(0,i.c)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),We(e);this.m_bDone=!0}return null}}function Ze(e,t){const n=new ae.X;let r;for(;r=e.next();)(0,i.p)(r),(0,i.c)(r),n.addGeometry(r);return n.getBoundingGeometry()}function We(e,t){if(e||(0,i.t)(""),(0,i.p)(e),(0,i.c)(e),e.isEmpty())return e.createInstance();const n=e.getGeometryType();if((0,i.e)(n)){const t=e;if(t.getStartXY().equals(t.getEndXY())){const e=new ae.P;return t.queryStart(e),e}{const n=new ae.P,r=new ae.i({vd:e.getDescription()});return t.queryStart(n),r.startPathPoint(n),t.queryEnd(n),r.lineToPoint(n),r}}if(n===i.G.enumEnvelope){const t=e,n=new ae.a;if(t.queryEnvelope(n),n.xmin===n.xmax&&n.ymin===n.ymax){const e=new ae.P;return t.queryCornerByVal(0,e),e}if(n.xmin===n.xmax||n.ymin===n.ymax){const n=new ae.P,r=new ae.i({vd:e.getDescription()});return t.queryCornerByVal(0,n),r.startPathPoint(n),t.queryCornerByVal(1,n),r.lineToPoint(n),r}{const n=new ae.h({vd:e.getDescription()});return n.addEnvelope(t,!1),n}}if(n===i.G.enumGeometryCollection)return Ze((0,ae.q)(e,-1));if(Je(e)){if(n===i.G.enumMultiPoint){const t=e,n=new ae.P;return t.getPointByVal(0,n),n}return e}return(0,ae.Y)(e)}function Je(e,t){if((0,i.p)(e),(0,i.c)(e),e.isEmpty())return!0;const n=e.getGeometryType();if(n===i.G.enumPoint)return!0;if(n===i.G.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,i.e)(n)){const t=e;return!t.getStartXY().equals(t.getEndXY())}if(n===i.G.enumMultiPoint)return 1===e.getPointCount();if(n===i.G.enumPolyline){const t=e;return 1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(n===i.G.enumGeometryCollection){const t=e;return 1===t.getGeometryCount()&&Je(t.getGeometry(0))}const r=e;return!(1!==r.getPathCount()||r.getPointCount()<3)&&(0,ae.U)(r,0)}const Ke=new class{getOperatorType(){return 10102}supportsCurves(){return!1}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n){return new Ue(t,e,n)}execute(e,t){return We(e)}isConvex(e,t){if((0,i.p)(e),(0,i.c)(e),e.isEmpty())return!0;const n=e.getGeometryType();if(n===i.G.enumPoint)return!0;if(n===i.G.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,i.e)(n)){const t=e;return!t.getStartXY().equals(t.getEndXY())}if(n===i.G.enumMultiPoint)return 1===e.getPointCount();if(n===i.G.enumPolyline){const t=e;return 1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(n===i.G.enumGeometryCollection){const n=e;return 1===n.getGeometryCount()&&this.isConvex(n.getGeometry(0),t)}const r=e;return!(1!==r.getPathCount()||r.getPointCount()<3)&&(0,ae.U)(r,0)}constructOrientedMinimumBoundingBox(e,t,n,r,s){(0,ae.W)(e,t,n,r,s)}},Qe=Ke.supportsCurves(),$e=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e){const t=(0,m.getSpatialReference)(e);return(0,m.toGeometry)((n=(0,m.fromGeometry)(e),Ke.execute(n,null)),t);var n},executeMany:function(e,t={}){const{merge:n=!1}=t,r=e.map(m.fromGeometry),i=(0,m.getSpatialReference)(e);return function(e,t){const n=Ke.executeMany(new s.S(e),t,null);return Array.from(n)}(r,n).map((e=>(0,m.toGeometry)(e,i)))},isConvex:function(e){return t=(0,m.fromGeometry)(e),Ke.isConvex(t,null);var t},supportsCurves:Qe},Symbol.toStringTag,{value:"Module"})),He=new(n(29821).O),et=He.supportsCurves(),tt=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return He.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t){return He.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference),null)},supportsCurves:et},Symbol.toStringTag,{value:"Module"}));var nt=n(77592),rt=nt.C;function st(e,t){return{m_geometry:e,m_side:t}}class it extends s.G{constructor(e,t,n,r,s){super(),this.m_cutIndex=-1,this.m_cuts=[],this.m_progressTracker=s,this.m_cuttee=t.clone(),this.m_cutter=new ae.i({copy:n}),this.m_bConsiderTouch=e;const i=(0,ae.H)(t,n);this.m_tolerance=(0,ae.b)(r,i,!0)}next(){return-1===this.m_cutIndex&&this.generateCuts(),++this.m_cutIndex<this.m_cuts.length?this.m_cuts[this.m_cutIndex]:null}getGeometryID(){return 0}tock(){return!0}getRank(){return 1}generateCuts(){switch(this.m_cuttee.getGeometryType()){case i.G.enumPolyline:this.generatePolylineCuts();break;case i.G.enumPolygon:this.generatePolygonCuts()}}generatePolylineCuts(){const e=new ae.i,t=new ae.i,n=new ae.i;this.m_cuts.length=0,this.m_cuts.push(e),this.m_cuts.push(t);const r=[];!function(e,t,n,r,s,i){if(t.isEmpty()){const e=st(t,0);return void s.push(e)}if(n.isEmpty()){const e=st(t,0);return void s.push(e)}const o=[],a=new ae.d;{const m=a.createGeometryUserIndex(),u=a.addGeometry(t),c=a.addGeometry(n),l=new ce.T(i);let h=0,f=null;if(a.hasCurves()){f=new rt;const e=a.getEnvelope2D(i);h=(0,nt.s)(r.total());const t=(0,nt.d)(r.total(),e);(0,nt.b)(a,t,r.total(),12e3,f,null,i)}a.dbgVerifyCurves(),l.setEditShapeCrackAndCluster(a,r),l.cut(e,m,u,c,o);for(const e of o){null!==f&&f.stitchCurves(a,e,h,!1);const t=st(a.getGeometry(e),(0,ce.s)(a.getGeometryUserIndex(e,m)));s.push(t)}null!==f&&f.clearStitcher(a)}}(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,r,this.m_progressTracker);for(let s=0;s<r.length;s++){const o=r[s];1===o.m_side?e.add(o.m_geometry,!1):2===o.m_side||4===o.m_side?t.add(o.m_geometry,!1):3===o.m_side?this.m_cuts.push(o.m_geometry):0===o.m_side?n.add(o.m_geometry,!1):(0,i.b)("")}n.isEmpty()||e.isEmpty()&&t.isEmpty()&&!(this.m_cuts.length>=3)||this.m_cuts.push(n),e.isEmpty()&&t.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}generatePolygonCuts(){const e=new ae.h,t=new ae.h,n=new ae.h;this.m_cuts.length=0,this.m_cuts.push(e),this.m_cuts.push(t);const r=[];!function(e,t,n,r,s,i){if(t.isEmpty()){const e=st(t,0);return void s.push(e)}if(n.isEmpty()){const e=st(t,0);return void s.push(e)}const o=[],a=new ae.d;{const e=a.createGeometryUserIndex(),m=a.addGeometry(t),u=a.addGeometry(n),c=new ce.T(i);let l=0,h=null;if(a.hasCurves()){h=new rt;const e=a.getEnvelope2D(i);l=(0,nt.s)(r.total());const t=(0,nt.d)(r.total(),e);(0,nt.b)(a,t,r.total(),12e3,h,null,i)}a.dbgVerifyCurves(),c.setEditShapeCrackAndCluster(a,r),c.cut(!1,e,m,u,o),null!==h&&h.stitchCurves(a,ae.n,l,!0);let f=a.getGeometry(m);const g=new ae.h,_=new ae.h,p=[];for(let t=0;t<o.length;t++){let n=null;{const s=new ae.d,m=s.addGeometry(f),u=s.addGeometry(a.getGeometry(o[t]));if(s.hasCurves()){const e=s.getEnvelope2D(i);l=(0,nt.s)(r.total());const t=(0,nt.d)(r.total(),e);(0,nt.b)(s,t,r.total(),12e3,h,null,i)}c.setEditShapeCrackAndCluster(s,r);const d=c.intersection(m,u);if(null!==h&&h.stitchCurves(s,ae.n,l,!0),n=s.getGeometry(d),n.isEmpty())continue;const y=a.getGeometryUserIndex(o[t],e);2===y?g.add(n,!1):1===y?_.add(n,!1):p.push(n)}{const e=new ae.d,n=e.addGeometry(f),s=e.addGeometry(a.getGeometry(o[t]));if(e.hasCurves()){const t=e.getEnvelope2D(i);l=(0,nt.s)(r.total());const n=(0,nt.d)(r.total(),t);(0,nt.b)(e,n,r.total(),12e3,h,null,i)}c.setEditShapeCrackAndCluster(e,r);const m=c.difference(n,s);null!==h&&h.stitchCurves(e,ae.n,l,!0),f=e.getGeometry(m)}}if(!f.isEmpty()&&o.length>0&&p.push(f),g.isEmpty()&&_.isEmpty())return;if(!g.isEmpty()){const e=st(g,1);s.push(e)}if(!_.isEmpty()){const e=st(_,2);s.push(e)}for(let e=0,t=p.length;e<t;++e){const t=st(p[e],3);s.push(t)}}}(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,r,this.m_progressTracker);for(let s=0;s<r.length;s++){const o=r[s];1===o.m_side?e.add(o.m_geometry,!1):2===o.m_side?t.add(o.m_geometry,!1):3===o.m_side?this.m_cuts.push(o.m_geometry):0===o.m_side?n.add(o.m_geometry,!1):(0,i.b)("")}(0,i.g)(n.isEmpty()||1===r.length),e.isEmpty()&&t.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}}const ot=new class{getOperatorType(){return 10005}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,r,s){return new it(e,t,n,r,s)}},at=ot.supportsCurves(),mt=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t){const n=(0,m.getSpatialReference)(e);return function(e,t,n){const r=ot.execute(!0,e,t,n,null);return Array.from(r)}((0,m.fromGeometry)(e),(0,m.fromPolyline)(t),(0,m.fromSpatialReference)(n)).map((e=>(0,m.toGeometry)(e,n))).filter(r.Ru)},supportsCurves:at},Symbol.toStringTag,{value:"Module"})),ut=new le.O,ct=ut.supportsCurves(),lt=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t,n={}){let{maxAngleInDegrees:r=0,maxDeviation:s=0,unit:i}=n;const o=(0,m.getSpatialReference)(e);return i&&(t=(0,u.UW)(t,i,o),s&&(s=(0,u.UW)(s,i,o))),(0,m.toGeometry)(function(e,t,n,r){return ut.execute(e,t,n,r,null)}((0,m.fromGeometry)(e),t,s,(0,H.kU)(r)),o)},executeMany:function(e,t,n={}){let{maxAngleInDegrees:i=0,maxDeviation:o=0,unit:a}=n;const c=e.map(m.fromGeometry),l=(0,m.getSpatialReference)(e);return a&&(t=(0,u.UW)(t,a,l),o&&(o=(0,u.UW)(o,a,l))),function(e,t,n,r){const i=ut.executeMany(new s.S(e),t,n,r,null);return Array.from(i)}(c,t,o,(0,H.kU)(i)).map((e=>(0,m.toGeometry)(e,l))).filter(r.Ru)},supportsCurves:ct},Symbol.toStringTag,{value:"Module"})),ht=new(n(31085).O),ft=ht.supportsCurves(),gt=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t){const n=(0,m.getSpatialReference)(e);return(0,m.toGeometry)(function(e,t,n){return ht.execute(e,t,n,null)}((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(n)),n)},executeMany:function(e,t){const n=e.map(m.fromGeometry),r=(0,m.getSpatialReference)(e);return function(e,t,n){const r=ht.executeMany(new s.S(e),new s.S([t]),n,null);return Array.from(r)}(n,(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(r)).map((e=>(0,m.toGeometry)(e,r)))},supportsCurves:ft},Symbol.toStringTag,{value:"Module"})),_t=new je.a,pt=_t.supportsCurves(),dt=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return _t.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t){return _t.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference))},supportsCurves:pt},Symbol.toStringTag,{value:"Module"}));var yt=n(22194);const Pt=new class{getOperatorType(){return 10100}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n){return this.executeEx(e,t,n,null,null,Number.NaN)}executeEx(e,t,n,r,s,o){if(e.isEmpty()||t.isEmpty())return Number.NaN;(0,i.c)(e),(0,i.c)(t);const a=e,m=t;Number.isNaN(o)&&(o=Number.POSITIVE_INFINITY);const u=new yt.D(o,n).calculate(a,m,r,s);return Number.isFinite(u)?u:Number.NaN}},xt=Pt.supportsCurves(),bt=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t,n={}){const{unit:r}=n;let s=Pt.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),null);if(s&&r){const t=(0,m.getSpatialReference)(e);s=(0,u.PQ)(s,t,r)}return s},supportsCurves:xt},Symbol.toStringTag,{value:"Module"}));class Ct extends je.d{getOperatorType(){return 2}execute(e,t,n,r){return(0,je.r)(e,t,n,3,r)}}const vt=new Ct,Gt=vt.supportsCurves(),St=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return vt.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t){return vt.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference),null)},supportsCurves:Gt},Symbol.toStringTag,{value:"Module"})),Dt=new he,wt=Dt.supportsCurves(),Mt=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t,n={}){const{removeDegenerateParts:r=!1,unit:s}=n,i=(0,m.getSpatialReference)(e);return s&&(t=(0,u.UW)(t,s,i)),(0,m.toGeometry)(function(e,t,n){return Dt.execute(e,t,n,null)}((0,m.fromGeometry)(e),t,r),i)},executeMany:function(e,t,n={}){const{removeDegenerateParts:i=!1,unit:o}=n,a=e.map(m.fromGeometry),c=(0,m.getSpatialReference)(e);return o&&(t=(0,u.UW)(t,o,c)),function(e,t,n){const r=Dt.executeMany(new s.S(e),t,n,null);return Array.from(r)}(a,t,i).map((e=>(0,m.toGeometry)(e,c))).filter(r.Ru)},supportsCurves:wt},Symbol.toStringTag,{value:"Module"})),Tt=new(n(32932).O),Et=Tt.supportsCurves(),It=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return function(e,t){return Tt.accelerateGeometry(e,t,1)}((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t))},execute:function(e,t){const n=(0,m.getSpatialReference)(e);return(0,m.toGeometry)(function(e,t,n){return Tt.execute(e,t,n,null)}((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(n)),n)},executeMany:function(e,t){const n=e.map(m.fromGeometry),i=(0,m.getSpatialReference)(e);return function(e,t,n){const r=Tt.executeMany(new s.S(e),new s.S([t]),n,null,7);return Array.from(r)}(n,(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(i)).map((e=>(0,m.toGeometry)(e,i))).filter(r.Ru)},supportsCurves:Et},Symbol.toStringTag,{value:"Module"})),Nt=new(n(70031).O),Rt=Nt.supportsCurves(),At=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return Nt.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t){return Nt.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference),null)},supportsCurves:Rt},Symbol.toStringTag,{value:"Module"})),qt=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t={}){const{unit:n}=t;let r=(0,m.fromGeometry)(e).calculateLength2D();if(r&&n){const t=(0,m.getSpatialReference)(e);r=(0,u.PQ)(r,t,n)}return r},supportsCurves:!0},Symbol.toStringTag,{value:"Module"})),Ot=1.4142135623730951,kt=.017453292519943295,Vt=256,Yt=1024;class Xt{static construct(e,t,n){const r=new Xt;return r.x=e.x,r.y=e.y,r.m_next=-1,r.m_prev=-1,r.z=t,r.m=n,r.type=0,r}clone(){const e=new Xt;return e.x=this.x,e.y=this.y,e.m_next=this.m_next,e.m_prev=this.m_prev,e.z=this.z,e.m=this.m,e.type=this.type,e}asPoint2D(){return new $.P(this.x,this.y)}}class Bt{constructor(e){this.m_distance=-1,this.m_tolerance=-1,this.m_miterLimit=10,this.m_joins=0,this.m_progressCounter=0,this.m_bUseZ=!1,this.m_bUseM=!1,this.m_srcPts=[],this.m_srcPtCount=0,this.m_offsetPts=[],this.m_offsetPtCount=0,this.m_a1=0,this.m_a2=0,this.m_progressTracker=e}constructOffset(){const e=this.m_inputGeometry.getGeometryType();if(e===i.G.enumLine)return this.offsetLine();if(e===i.G.enumEnvelope)return this.offsetEnvelope();if((0,i.e)(e)){const e=new ae.i;return e.addSegment(this.m_inputGeometry,!0),this.m_inputGeometry=e,this.constructOffset()}if(e===i.G.enumPolyline){const e=new ae.i;return this.offsetMultiPath(e),e}if(e===i.G.enumPolygon){const e=new ae.h;return this.offsetMultiPath(e),e}(0,i.a)("")}offsetLine(){const e=this.m_inputGeometry,t=e.getStartXY(),n=e.getEndXY(),r=new $.P;r.setSub(n,t),r.normalize(),r.leftPerpendicularThis(),r.scale(this.m_distance),t.addThis(r),n.addThis(r);const s=e.clone();return s.setStartXY(t),s.setEndXY(n),s}offsetEnvelope(){const e=this.m_inputGeometry;if(this.m_distance>0&&2!==this.m_joins){const t=new ae.h;return t.addEnvelope(e,!1),this.m_inputGeometry=t,this.constructOffset()}const t=e.clone();return t.inflateCoords(this.m_distance,this.m_distance),t}progress(){}static buildPoint(e,t,n,r){r.x=e.x+t*Math.cos(n),r.y=e.y+t*Math.sin(n),r.type=e.type,r.z=e.z,r.m=e.m,r.m_next=-1,r.m_prev=-1}addPoint(e){this.m_offsetPts.push(e.clone()),this.m_offsetPtCount++}addPointEx(e,t){if(0===this.m_offsetPtCount)return void this.addPoint(e);const n=this.m_srcPtCount,r=this.m_srcPts[0===t?n-1:t-1],s=this.m_srcPts[t],i=Bt.dotSign(r,s,this.m_offsetPts[this.m_offsetPtCount-1],e);if(i>0)this.addPoint(e);else if(i<0)if(Bt.dotSign(r,s,s,this.m_offsetPts[this.m_offsetPtCount-1])>0){const s=new Xt;let i;i=0===t?n-2:1===t?n-1:t-2;const o=this.m_srcPts[i],a=Math.atan2(r.y-o.y,r.x-o.x);if(Bt.buildPoint(r,this.m_distance,a-$.q,s),this.m_offsetPts[this.m_offsetPtCount-1]=s,1===this.m_joins||2===this.m_joins){s.x=.5*(s.x+r.x),s.y=.5*(s.y+r.y),this.addPoint(s),Bt.buildPoint(r,this.m_distance,this.m_a1+$.q,s);const e=s.clone();e.x=.5*(e.x+r.x),e.y=.5*(e.y+r.y),e.type|=Vt,this.addPoint(e),this.addPoint(s)}else Bt.buildPoint(r,this.m_distance,this.m_a1+$.q,s),s.type|=Vt,this.addPoint(s);this.addPointEx(e,t)}else{const e=new Xt;if(Bt.buildPoint(s,this.m_distance,this.m_a1+$.q,e),this.addPoint(e),1===this.m_joins||2===this.m_joins){e.x=.5*(e.x+s.x),e.y=.5*(e.y+s.y),this.addPoint(e),Bt.buildPoint(s,this.m_distance,this.m_a2-$.q,e);const t=e.clone();t.x=.5*(t.x+s.x),t.y=.5*(t.y+s.y),t.type|=Vt,this.addPoint(t),this.addPoint(e)}else Bt.buildPoint(s,this.m_distance,this.m_a2-$.q,e),e.type|=Vt,this.addPoint(e)}}buildOffset(){const e=new Xt,t=this.m_srcPtCount;this.m_offsetPtCount=0;const n=.5*this.m_tolerance;let r=0,s=0;for(let i=0;i<t;i++){const o=this.m_srcPts[i],a=0===i?this.m_srcPts[t-1]:this.m_srcPts[i-1],m=i===t-1?this.m_srcPts[0]:this.m_srcPts[i+1];let u,c,l=0;{const e=a.x-o.x,t=a.y-o.y,n=m.x-o.x,h=m.y-o.y;u=Math.atan2(t,e),c=Math.atan2(h,n),this.m_a1=u,this.m_a2=c,0===i&&(r=u,s=c),l=$.P.orientationRobust(o.asPoint2D(),a.asPoint2D(),m.asPoint2D())}const h=c;if(c<u&&(c+=$.p),l*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){Bt.buildPoint(o,this.m_distance,u+$.q,e),this.addPoint(e);const t=.001;e.x=o.x+(e.x-o.x)*t,e.y=o.y+(e.y-o.y)*t,this.addPoint(e),Bt.buildPoint(o,this.m_distance,c-$.q,e);const n=e.clone();n.x=o.x+(n.x-o.x)*t,n.y=o.y+(n.y-o.y)*t,n.type|=Vt,this.addPoint(n),this.addPoint(e)}else{const t=.5*(c-u),n=0===t?this.m_distance:this.m_distance/Math.abs(Math.sin(t));Bt.buildPoint(o,n,.5*(u+c),e),this.addPointEx(e,i)}else if(512&o.type){const t=1-n/Math.abs(this.m_distance);let r=1,s=this.m_distance<0?-Math.PI:Math.PI;if(t>-1&&t<1){let e=2*Math.acos(t);e<kt&&(e=kt),r=Math.trunc(Math.PI/e+1.5),r>1&&(s/=r)}r<=1&&(r=2,s/=2);let a=u+$.q;Bt.buildPoint(o,this.m_distance,a,e),0===i&&(e.type|=Yt),this.addPointEx(e,i);const m=this.m_distance/Math.cos(s/2);for(a+=s/2,Bt.buildPoint(o,m,a,e),e.type|=Yt,this.addPoint(e);--r>0;)a+=s,Bt.buildPoint(o,m,a,e),e.type|=Yt,this.addPoint(e);Bt.buildPoint(o,this.m_distance,c-$.q,e),e.type|=Yt,this.addPoint(e)}else if(1!==this.m_joins)if(0!==this.m_joins)if(2!==this.m_joins){let t;if(c=h,this.m_distance>0?(c>u&&(c-=$.p),t=u-c<$.q):(c<u&&(c+=$.p),t=c-u<$.q),t){const t=this.m_distance*Ot;let n;n=t<0?u+.25*Math.PI:u+3*Math.PI*.25,Bt.buildPoint(o,t,n,e),this.addPointEx(e,i),n=t<0?c-.25*Math.PI:c-3*Math.PI*.25,Bt.buildPoint(o,t,n,e),this.addPoint(e)}else{const t=.5*(c-u),n=this.m_distance/Math.abs(Math.sin(t));c<u&&(c+=$.p),Bt.buildPoint(o,n,(u+c)/2,e),this.addPointEx(e,i)}}else{const t=a.x-o.x,n=a.y-o.y,r=m.x-o.x,s=m.y-o.y,l=(t*r+n*s)/Math.sqrt(t*t+n*n)/Math.sqrt(r*r+s*s);if(l>1-1e-8){Bt.buildPoint(o,Ot*this.m_distance,c-.25*Math.PI,e),this.addPointEx(e,i),Bt.buildPoint(o,Ot*this.m_distance,c+.25*Math.PI,e),this.addPoint(e);continue}const h=Math.abs(this.m_distance/Math.sin(.5*Math.acos(l))),f=Math.abs(this.m_miterLimit*this.m_distance);if(h>f){const t=.5*(c-u),n=this.m_distance/Math.abs(Math.sin(t));Bt.buildPoint(o,n,.5*(u+c),e);const r=$.P.construct(e.x,e.y),s=$.P.construct(o.x,o.y),a=new $.P;a.setSub(r,s);const m=new $.P;m.setScaleAdd(f/a.length(),a,s);const l=Math.sqrt(h*h-this.m_distance*this.m_distance),g=(h-f)*Math.abs(this.m_distance)/l;this.m_distance>0?a.leftPerpendicularThis():a.rightPerpendicularThis(),a.scale(g/a.length());const _=new $.P;_.setAdd(m,a);const p=new $.P;p.setSub(m,a),e.x=_.x,e.y=_.y,this.addPointEx(e,i),e.x=p.x,e.y=p.y,this.addPoint(e);continue}const g=.5*(c-u),_=this.m_distance/Math.abs(Math.sin(g));Bt.buildPoint(o,_,.5*(u+c),e),this.addPointEx(e,i)}else{const t=1-n/Math.abs(this.m_distance);let r=1,s=c-$.q-(u+$.q);if(t>-1&&t<1){let e=2*Math.acos(t);e<kt&&(e=kt),r=Math.trunc(Math.abs(s)/e+1.5),r>1&&(s/=r)}const a=this.m_distance/Math.cos(.5*s);let m=u+$.q+.5*s;for(Bt.buildPoint(o,a,m,e),this.addPointEx(e,i);--r>0;)m+=s,Bt.buildPoint(o,a,m,e),this.addPoint(e)}else Bt.buildPoint(o,this.m_distance,u+$.q,e),this.addPointEx(e,i),Bt.buildPoint(o,this.m_distance,c-$.q,e),this.addPoint(e)}return this.m_a1=r,this.m_a2=s,this.addPointEx(this.m_offsetPts[0],0),this.m_offsetPts[0]=this.m_offsetPts[this.m_offsetPtCount-1].clone(),this.removeBadSegsFast()}removeBadSegsFast(){let e=!1;for(let e=0;e<this.m_offsetPtCount;e++){const t=this.m_offsetPts[e];t.m_next=e+1,t.m_prev=e-1}this.m_offsetPts[0].m_prev=this.m_offsetPtCount-2,this.m_offsetPts[this.m_offsetPtCount-2].m_next=0;let t=0;for(let n=0;n<this.m_offsetPtCount;n++)if(this.m_offsetPts[t].type&Vt){const n=this.deleteClosedSeg(t);if(-1===n){e=!0;break}t=n}else t=this.m_offsetPts[t].m_next;return!e&&(this.compressOffsetArray(t),!0)}deleteClosedSeg(e){const t=this.m_offsetPtCount-1;let n,r,s=e;for(let i=1;i<=t-2;i++){s=this.m_offsetPts[s].m_next,n=s,r=e;for(let e=1;e<=i;e++){if(r=this.m_offsetPts[r].m_prev,!(this.m_offsetPts[r].type&Vt||this.m_offsetPts[n].type&Vt)){const e=this.handleClosedIntersection(r,n);if(-1!==e)return e}n=this.m_offsetPts[n].m_prev}}return-1}handleClosedIntersection(e,t){const n=this.m_offsetPts[this.m_offsetPts[e].m_prev],r=this.m_offsetPts[e],s=this.m_offsetPts[this.m_offsetPts[t].m_prev],i=this.m_offsetPts[t];if(!this.sectGraphicRect(n,r,s,i))return-1;const o={pt:new Xt,bAtExistingPt:!1};if(((r.x-n.x)*(i.y-s.y)-(r.y-n.y)*(i.x-s.x))*this.m_distance<0&&this.findIntersection(n,r,s,i,o)&&!o.bAtExistingPt){const a=1e-8,m=Math.sqrt((r.x-n.x)*(r.x-n.x)+(r.y-n.y)*(r.y-n.y)),u=(r.x-n.x)/m,c=(r.y-n.y)/m,l=Math.sqrt((i.x-s.x)*(i.x-s.x)+(i.y-s.y)*(i.y-s.y)),h=(i.x-s.x)/l,f=(i.y-s.y)/l;let g=!1;const _=o.pt.clone();_.x+=(u+h)*a,_.y+=(c+f)*a;let p=s,d=o.pt,y=this.m_offsetPts[e].m_prev;for(;d.y>_.y!=p.y>_.y&&_.x<(p.x-d.x)*(_.y-d.y)/(p.y-d.y)+d.x&&(g=!g),p=d,y=this.m_offsetPts[y].m_next,y!==t;)d=this.m_offsetPts[y];if(g)return-1;const P=this.m_offsetPts[e].m_prev;return o.pt.type=r.type,o.pt.m_next=t,o.pt.m_prev=P,this.m_offsetPts[e]=o.pt,this.m_offsetPts[t].m_prev=e,t}return-1}sectGraphicRect(e,t,n,r){return Math.max(e.x,t.x)>=Math.min(n.x,r.x)&&Math.max(n.x,r.x)>=Math.min(e.x,t.x)&&Math.max(e.y,t.y)>=Math.min(n.y,r.y)&&Math.max(n.y,r.y)>=Math.min(e.y,t.y)}findIntersection(e,t,n,r,s){let i,o,a,m;return s.bAtExistingPt=!1,i=(t.y-e.y)*(r.x-n.x)-(t.x-e.x)*(r.y-n.y),o=(n.y-e.y)*(t.x-e.x)-(n.x-e.x)*(t.y-e.y),a=0===i?2:o/i,a>=0&&a<=1&&(m=a,i=(r.y-n.y)*(t.x-e.x)-(r.x-n.x)*(t.y-e.y),o=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y),a=0===i?2:o/i,a>=0&&a<=1)&&(s.pt.x=e.x+a*(t.x-e.x),s.pt.y=e.y+a*(t.y-e.y),this.m_bUseZ&&(s.pt.z=n.z+m*(r.z-n.z)),this.m_bUseM&&(s.pt.m=n.m+m*(r.m-n.m)),0!==m&&1!==m||0!==a&&1!==a||(s.bAtExistingPt=!0),!((0===m||1===m)&&a>0&&a<1||(0===a||1===a)&&m>0&&m<1))}compressOffsetArray(e){for(;this.m_offsetPts[e].m_prev<e;)e=this.m_offsetPts[e].m_prev;let t=0,n=e;do{const e=this.m_offsetPts[n].clone();this.m_offsetPts[t]=e,n=e.m_next,t++}while(n!==e);this.m_offsetPts[t]=this.m_offsetPts[0].clone(),this.m_offsetPtCount=t+1}addPart(e,t){if(!(t<2))for(let n=0;n<t;n++){const t=this.m_offsetPts[e+n];if(n?this.m_bUseZ?this.m_resultPath.lineTo3DCoords(t.x,t.y,t.z):this.m_resultPath.lineToCoords(t.x,t.y):this.m_bUseZ?this.m_resultPath.startPath3DCoords(t.x,t.y,t.z):this.m_resultPath.startPathCoords(t.x,t.y),this.m_bUseM){const e=this.m_resultPath.getPointCount()-1;this.m_resultPath.setAttribute(2,e,0,t.m)}}}offsetMultiPath(e){const t=(0,ae.e)(this.m_inputGeometry,0,this.m_tolerance,0,this.m_progressTracker,12e3),n=t.querySegmentIterator();n.resetToFirstPath();let r=-1;for(;n.nextPath();)r++,this.offsetPath(t,r,e)}offsetPath(e,t,n){let r=e.getPathStart(t),s=e.getPathEnd(t);if(this.m_resultPath=n,e.isClosedPath(t)){const t=e.getXY(r);for(;s>r&&e.getXY(s-1).equals(t);)s--;if(s-r>=2){this.m_srcPtCount=s-r,this.m_srcPts.length=this.m_srcPtCount;for(let t=r;t<s;t++)this.progress(),this.m_srcPts[t-r]=Xt.construct(e.getXY(t),this.m_bUseZ?e.getAttributeAsDbl(1,t,0):0,this.m_bUseM?e.getAttributeAsDbl(2,t,0):0);this.buildOffset()&&this.addPart(0,this.m_offsetPtCount-1)}}else{const t=e.getXY(r);for(;r<s-1&&e.getXY(r+1).equals(t);)r++;const n=e.getXY(s-1);for(;r<s-1&&e.getXY(s-2).equals(n);)s--;if(s-r>=2){this.m_srcPtCount=2*(s-r)-2,this.m_srcPts.length=this.m_srcPtCount;let n=Xt.construct(t,this.m_bUseZ?e.getAttributeAsDbl(1,r,0):0,this.m_bUseM?e.getAttributeAsDbl(2,r,0):0);n.type|=1536,this.m_srcPts[0]=n;let i=1,o=this.m_srcPtCount-1;for(let t=r+1;t<s-1;t++,i++,o--)this.progress(),n=Xt.construct(e.getXY(t),this.m_bUseZ?e.getAttributeAsDbl(1,t,0):0,this.m_bUseM?e.getAttributeAsDbl(2,t,0):0),this.m_srcPts[i]=n.clone(),n.type|=Yt,this.m_srcPts[o]=n.clone();if(n=Xt.construct(e.getXY(s-1),this.m_bUseZ?e.getAttributeAsDbl(1,s-1,0):0,this.m_bUseM?e.getAttributeAsDbl(2,s-1,0):0),n.type|=512,this.m_srcPts[i]=n.clone(),this.buildOffset())if(this.m_offsetPts.length>=2){let e=-1,t=-1,n=!!(this.m_offsetPts[this.m_offsetPtCount-1].type&Yt);n||(e=0);for(let r=1;r<this.m_offsetPtCount;r++){this.progress();const s=!!(this.m_offsetPts[r].type&Yt);s?n||(t=r-1,t-e+1>1&&this.addPart(e,t-e+1)):n&&(e=r-1),n=s}n||(t=this.m_offsetPtCount-1,t-e+1>1&&this.addPart(e,t-e+1))}else{const e=0,t=this.m_offsetPtCount-1;t-e>=1&&this.addPart(e,t-e+1)}}}this.m_srcPts.length=0,this.m_srcPtCount=0,this.m_offsetPts.length=0,this.m_offsetPtCount=0}static dotSign(e,t,n,r){const s=t.x-e.x,i=t.y-e.y,o=r.x-n.x,a=r.y-n.y,m=(0,$.u)(s,i,o,a);return(0,$.s)(m)}}class jt extends s.G{constructor(e,t,n,r,s,i,o){super(),this.m_progressTracker=o,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distance=n,this.m_joins=r,this.m_miterLimit=s,this.m_flattenError=i}tock(){return!0}getRank(){return 1}next(){if(!this.m_inputGeoms)return null;let e;for(;e=this.m_inputGeoms.next();)return this.m_index=this.m_inputGeoms.getGeometryID(),this.offset(e);return null}getGeometryID(){return this.m_index}offset(e){let t;return(0,i.c)(e),t=this.m_flattenError<=0?(0,ae.u)(this.m_spatialReference,e,!0).total():this.m_flattenError,function(e,t,n,r,s,o){if(null===e&&(0,i.t)(""),e.getDimension()<1&&(0,i.t)(""),s>0||(0,i.t)(""),(0,i.c)(e),0===t||e.isEmpty())return e;const a=new Bt(o);return a.m_bUseZ=e.hasAttribute(1),a.m_bUseM=e.hasAttribute(2),a.m_inputGeometry=e,a.m_distance=t,a.m_tolerance=s,a.m_joins=n,a.m_miterLimit=r>1?r:1,a.m_progressCounter=0,a.constructOffset()}(e,this.m_distance,this.m_joins,this.m_miterLimit,t,this.m_progressTracker)}}const zt=new class{getOperatorType(){return 10108}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t,n,r,s,i,o){return new jt(e,t,n,r,s,i,o)}execute(e,t,n,r,s,i,o){return new jt(null,t,n,r,s,i,o).offset(e)}},Lt={round:0,bevel:1,miter:2,square:3},Ft=zt.supportsCurves(),Ut=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t,n={}){const{miterLimit:r=10,flattenError:s=0,joins:i="round",unit:o}=n,a=(0,m.getSpatialReference)(e);return o&&(t=(0,u.UW)(t,o,a)),(0,m.toGeometry)(function(e,t,n,r,s,i){return zt.execute(e,t,n,r,s,i,null)}((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(a),t,Lt[i],r,s),a)},executeMany:function(e,t,n={}){const{miterLimit:i=10,flattenError:o=0,joins:a="round",unit:c}=n,l=(0,m.getSpatialReference)(e);return c&&(t=(0,u.UW)(t,c,l)),function(e,t,n,r,i,o){const a=zt.executeMany(new s.S(e),t,n,r,i,o,null);return Array.from(a)}(e.map(m.fromGeometry),(0,m.fromSpatialReference)(l),t,Lt[a],i,o).map((e=>(0,m.toGeometry)(e,l))).filter(r.Ru)},supportsCurves:Ft},Symbol.toStringTag,{value:"Module"})),Zt=new(n(85181).O),Wt=Zt.supportsCurves(),Jt=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return Zt.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t){return Zt.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference),null)},supportsCurves:Wt},Symbol.toStringTag,{value:"Module"}));function Kt(){return Qt(new $.P,-1,Number.NaN)}function Qt(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:$t}}function $t(){return Number.isNaN(this.m_distance)}function Ht(e,t,n=-1,r=-1){if(e.isEmpty())return 3;const s=e.getGeometryType();if((0,i.e)(s))return function(e,t,n,r){if(n>=0||r>=0)return(0,i.t)("");if(e.isDegenerate(0))return e.getStartXY().equals(t)?2:3;if(!e.isCurve()){const n=$.P.orientationRobust(t,e.getStartXY(),e.getEndXY());return n<0?1:n>0?0:2}const s=e.getClosestCoordinate(t,!1),o=e.getTangent(s),a=e.getCoord2D(s),m=$.P.orientationRobust(t,a,a.add(o));return m<0?1:m>0?0:2}(e,t,n,r);if(s===i.G.enumPolygon)return function(e,t,n,r){(n>=0||r>=0)&&(0,i.t)("");const s=new ae.a;e.queryEnvelope(s);const o=(0,nt.i)(e,t,0);return 0===o?0:1===o?1:2}(e,t,n,r);if(s===i.G.enumPolyline)return function(e,t,n,r){(n<0&&r>=0||n>=0&&r<0)&&(0,i.t)("");const s=e.querySegmentIterator();if(n<0){let e=Number.MAX_VALUE,i=0;for(;s.nextPath();)for(;s.hasNextSegment();){const o=s.nextSegment(),a=o.getClosestCoordinate(t,!1),m=o.getCoord2D(a),u=$.P.sqrDistance(m,t);u<e?(i=1,n=s.getStartPointIndex(),r=s.getPathIndex(),e=u):u===e&&i++}if(0===i)return 3;if(1===i)return s.resetToVertex(n,r),Ht(s.nextSegment(),t)}const o=function(e,t,n,r){const s={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(s.i1=function(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();for(e.resetToVertex(t,n);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,n,r),-1!==s.i1){t.resetToVertex(s.i1,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r),o=$.P.sqrDistance(i,e);{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight1=t.crossProduct(r)<0}if(s.i2=function(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2){t.resetToVertex(s.i2,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r);if($.P.sqrDistance(i,e)>o)s.i2=-1;else{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight2=t.crossProduct(r)<0}}if(-1===s.i2&&(s.i2=function(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2)){t.resetToVertex(s.i2,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r);if($.P.sqrDistance(i,e)>o)s.i2=-1;else{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight2=t.crossProduct(r)<0;const o=s.i1;s.i1=s.i2,s.i2=o;const a=s.bRight1;s.bRight1=s.bRight2,s.bRight2=a}}}return s}(t,s,n,r);if(-1!==o.i1&&-1===o.i2)return o.bRight1?1:0;if(-1!==o.i1&&-1!==o.i2){if(o.bRight1===o.bRight2)return o.bRight1?1:0;{s.resetToVertex(o.i1,-1);const e=s.nextSegment().getTangent(1);s.resetToVertex(o.i2,-1);const t=s.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}return s.resetToVertex(n,r),Ht(s.nextSegment(),t)}(e,t,n,r);if(s===i.G.enumEnvelope){const n=new ae.a;return e.queryEnvelope(n),n.contains(t)?n.containsExclusive(t)?1:2:0}return 3}function en(e,t,n=!1){const r=(0,m.toPoint)(e.m_coordinate,(0,m.getSpatialReference)(t)),s=e.m_distance,i=e.isEmpty(),o=e.m_bRightSide;return{coordinate:r,distance:s,isEmpty:i,...n&&{isRightSide:o},vertexIndex:e.m_vertexIndex}}const tn=new class{getOperatorType(){return 10500}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(e,t,n,r){if(t.isNAN()&&(0,i.t)("NAN xy coordinates are not allowed"),e.isEmpty())return Kt();switch(e.getGeometryType()){case i.G.enumPoint:return this.pointGetNearestVertex(e,t);case i.G.enumMultiPoint:return this.multiVertexGetNearestVertex(e,t);case i.G.enumPolyline:case i.G.enumPolygon:return this.multiPathGetNearestCoordinate(e,t,n,r);default:(0,i.a)("")}}getNearestVertex(e,t){if(t.isNAN()&&(0,i.t)("NAN xy coordinates are not allowed"),e.isEmpty())return Kt();switch(e.getGeometryType()){case i.G.enumPoint:return this.pointGetNearestVertex(e,t);case i.G.enumMultiPoint:case i.G.enumPolyline:case i.G.enumPolygon:return this.multiVertexGetNearestVertex(e,t);default:(0,i.a)("")}}getNearestVertices(e,t,n,r){if(0===r&&(0,i.t)(""),t.isNAN()&&(0,i.t)("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case i.G.enumPoint:return this.pointGetNearestVertices(e,t,n,r);case i.G.enumMultiPoint:case i.G.enumPolyline:case i.G.enumPolygon:return this.multiVertexGetNearestVertices(e,t,n,r);default:(0,i.a)("")}}multiPathGetNearestCoordinate(e,t,n,r){if(e.getGeometryType()===i.G.enumPolygon&&n){const n=new ae.a;e.queryEnvelope(n);const s=(0,ae.c)(null,n,!1);let i;if(i=(0,nt.i)(e,t,r?0:s),0!==i){const e=Qt(t,-1,0);return r&&(e.m_bRightSide=!0),e}}const s=e.querySegmentIterator(),o=new $.P;let a=-1,m=-1,u=Number.MAX_VALUE,c=0;for(;s.nextPath();)for(;s.hasNextSegment();){const e=s.nextSegment(),n=e.getClosestCoordinate(t,!1),r=e.getCoord2D(n),i=$.P.sqrDistance(r,t);i<u?(c=1,o.assign(r),a=s.getStartPointIndex(),m=s.getPathIndex(),u=i):i===u&&c++}-1===a&&(0,i.t)("");const l=Qt(o,a,Math.sqrt(u));if(r)if(e.getGeometryType()!==i.G.enumPolygon){let n=!1;if(c>1){const r=Ht(e,t,a,m);n=0!==r&&3!==r}else s.resetToVertex(a,m),n=0!==Ht(s.nextSegment(),t);l.m_bRightSide=n}else n||0!==(0,nt.i)(e,t,0)&&(l.m_bRightSide=!0);return l}pointGetNearestVertex(e,t){const n=e.getXY();return Qt(n,0,$.P.distance(n,t))}multiVertexGetNearestVertex(e,t){const n=e.getAttributeStreamRef(0),r=e.getPointCount();let s=-1;const i=new $.P;let o=Number.MAX_VALUE;const a=new $.P;for(let e=0;e<r;e++){n.queryPoint2D(2*e,a);const r=$.P.sqrDistance(a,t);r<o&&(i.assign(a),s=e,o=r)}return Qt(i,s,Math.sqrt(o))}pointGetNearestVertices(e,t,n,r){const s=[];if(0!==r){const r=n*n,i=e.getXY(),o=$.P.sqrDistance(i,t);o<=r&&s.push(Qt(i,0,Math.sqrt(o)))}return s}multiVertexGetNearestVertices(e,t,n,r){const s=[];if(0!==r){const i=e.getAttributeStreamRef(0),o=e.getPointCount();s.length=r+1;const a=n*n;for(let e=0;e<o;e++){const n=i.read(2*e),r=i.read(2*e+1),o=t.x-n,m=t.y-r,u=o*o+m*m;u<=a&&s.push(Qt($.P.construct(n,r),e,Math.sqrt(u)))}s.sort(((e,t)=>e.m_distance-t.m_distance))}return s.slice(0,r)}},nn=tn.supportsCurves(),rn=Object.freeze(Object.defineProperty({__proto__:null,getNearestCoordinate:function(e,t,n={}){const{calculateLeftRightSide:r=!1,testPolygonInterior:s=!0,unit:i}=n,o=tn.getNearestCoordinate((0,m.fromGeometry)(e),(0,m.fromPoint)(t).getXY(),s,r);if(i&&o.m_distance){const t=(0,m.getSpatialReference)(e);o.m_distance=(0,u.PQ)(o.m_distance,t,i)}return en(o,e,r)},getNearestVertex:function(e,t,n={}){const{unit:r}=n,s=tn.getNearestVertex((0,m.fromGeometry)(e),(0,m.fromPoint)(t).getXY());if(r&&s.m_distance){const t=(0,m.getSpatialReference)(e);s.m_distance=(0,u.PQ)(s.m_distance,t,r)}return en(s,e)},getNearestVertices:function(e,t,n,r,s={}){const{unit:i}=s,o=(0,m.getSpatialReference)(e);return i&&n&&(n=(0,u.UW)(n,i,o)),tn.getNearestVertices((0,m.fromGeometry)(e),(0,m.fromPoint)(t).getXY(),n,r).map((t=>(i&&t.m_distance&&(t.m_distance=(0,u.PQ)(t.m_distance,o,i)),en(t,e))))},supportsCurves:nn},Symbol.toStringTag,{value:"Module"})),sn=new class{supportsCurves(){return!0}getOperatorType(){return 1}execute(e,t,n,r,s){return(0,je.V)(e,t,n,r,s)}isValidDE9IM(e){return 0===(0,je.W)(e)}accelerateGeometry(e,t,n){return(0,je.X)(e,t,n)}canAccelerateGeometry(e){return(0,je.Y)(e)}},on=sn.supportsCurves(),an=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return sn.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t,n){return sn.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference),n,null)},isValidDE9IM:function(e){return sn.isValidDE9IM(e)},supportsCurves:on},Symbol.toStringTag,{value:"Module"})),mn=new ce.O,un=mn.supportsCurves(),cn=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e){const t=(0,m.getSpatialReference)(e);return(0,m.toGeometry)((n=(0,m.fromGeometry)(e),r=(0,m.fromSpatialReference)(t),mn.execute(n,r,!1,null)),t);var n,r},executeMany:function(e){const t=e.map(m.fromGeometry),n=(0,m.getSpatialReference)(e);return function(e,t){const n=mn.executeMany(new s.S(e),t,!1,null);return Array.from(n)}(t,(0,m.fromSpatialReference)(n)).map((e=>(0,m.toGeometry)(e,n)))},isSimple:function(e){return t=(0,m.fromGeometry)(e),n=(0,m.fromSpatialReference)((0,m.getSpatialReference)(e)),mn.isSimpleAsFeature(t,n,!1,null,null);var t,n},supportsCurves:un},Symbol.toStringTag,{value:"Module"}));function ln(e,t,n,r){const s=e.getImpl().getAttributeStreamRef(0),i=e.getPointCount(),o=t.getXY(),a=e.createInstance(),m=(0,ae.l)(n),u=new ae.a;if(e.queryEnvelope(u),u.inflateCoords(m,m),u.contains(o)){const n=m*m;let r=!1;const u=(0,$.a)(i,!1);for(let e=0;e<i;e++){const t=s.read(2*e),i=s.read(2*e+1),a=t-o.x,m=i-o.y;a*a+m*m<=n&&(r=!0,u[e]=!0)}if(r)for(let t=0;t<i;t++)u[t]||a.addPoints(e,t,t+1);else a.addPoints(e,0,i),a.add(t)}else a.addPoints(e,0,i),a.add(t);return a}class hn extends s.G{constructor(e,t,n,r){super(),this.m_progressTracker=r,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=n,this.m_rightGeom=t.next(),this.m_bEmpty=!this.m_rightGeom,(0,i.c)(this.m_rightGeom)}tock(){return!0}getRank(){return 1}next(){if(this.m_bEmpty)return null;const e=this.m_inputGeoms.next();return e?((0,i.c)(e),this.m_index=this.m_inputGeoms.getGeometryID(),function(e,t,n,r){const s=e.getDimension(),o=t.getDimension();if(s!==o)return s>o?e:t;if(e.isEmpty())return t;if(t.isEmpty())return e;const a=new ae.a,m=new ae.a,u=new ae.a;e.queryEnvelope(a),t.queryEnvelope(m),u.setCoords({env2D:a}),u.mergeEnvelope2D(m);const c=(0,ae.b)(n,u,!0),l=e.getGeometryType(),h=t.getGeometryType();return l===i.G.enumPoint&&h===i.G.enumPoint?function(e,t,n){const r=(0,ae.l)(n),s=r*r,i=e.getXY(),o=t.getXY(),a=new ae.M({vd:e.getDescription()});return $.P.sqrDistance(i,o)>s&&(a.add(e),a.add(t)),a}(e,t,c):l===i.G.enumPoint&&h===i.G.enumMultiPoint?ln(t,e,c):l===i.G.enumMultiPoint&&h===i.G.enumPoint?ln(e,t,c):(0,ce.j)(e,t,n,r)}(e,this.m_rightGeom,this.m_spatialReference,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}const fn=new class{getOperatorType(){return 10003}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r){return new hn(e,t,n,r)}execute(e,t,n,r){const o=new s.S([e]),a=new s.S([t]),m=this.executeMany(o,a,n,r).next();return m||(0,i.b)("null output"),m}},gn=fn.supportsCurves(),_n=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t){const n=(0,m.getSpatialReference)(e);return(0,m.toGeometry)(function(e,t,n){return fn.execute(e,t,n,null)}((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(n)),n)},executeMany:function(e,t){const n=e.map(m.fromGeometry),i=(0,m.getSpatialReference)(e);return function(e,t,n){const r=fn.executeMany(new s.S(e),new s.S([t]),n,null);return Array.from(r)}(n,(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(i)).map((e=>(0,m.toGeometry)(e,i))).filter(r.Ru)},supportsCurves:gn},Symbol.toStringTag,{value:"Module"})),pn=new(n(46810).O),dn=pn.supportsCurves(),yn=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return pn.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t){return pn.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference),null)},supportsCurves:dn},Symbol.toStringTag,{value:"Module"})),Pn=new oe.O,xn=Pn.supportsCurves(),bn=Object.freeze(Object.defineProperty({__proto__:null,execute:function(e,t){const n=(0,m.getSpatialReference)(e);return(0,m.toGeometry)(function(e,t,n){return Pn.execute(e,t,n,null)}((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(n)),n)},executeMany:function(e){const t=e.map(m.fromGeometry),n=(0,m.getSpatialReference)(e);return(0,m.toGeometry)(function(e,t){return Pn.executeMany(new s.S(e),t,null).next()}(t,(0,m.fromSpatialReference)(n)),n)},supportsCurves:xn},Symbol.toStringTag,{value:"Module"})),Cn=new(n(22802).O),vn=Cn.supportsCurves(),Gn=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,m.getSpatialReference)(e);return Cn.accelerateGeometry((0,m.fromGeometry)(e),(0,m.fromSpatialReference)(t),1)},execute:function(e,t){return Cn.execute((0,m.fromGeometry)(e),(0,m.fromGeometry)(t),(0,m.fromSpatialReference)(e.spatialReference),null)},supportsCurves:vn},Symbol.toStringTag,{value:"Module"}));function Sn(e,t,n,r){return function(e,t){const n=(0,m.getSpatialReference)(e);return(0,m.toGeometry)(function(e,t){return a.execute(e,t,null)}((0,m.fromGeometry)(e),t.transform),n)}(e,(new ne).rotate(t,n,r))}async function Dn(){await Promise.all([T(),y(),X(),K()])}},22194:(e,t,n)=>{n.d(t,{D:()=>y,m:()=>m,s:()=>_,w:()=>g});var r=n(90237),s=n(55537),i=n(35368),o=n(77592),a=n(11878);function m(){return{outPoint:new a.P,index:-1,t:Number.NaN}}function u(e,t,n){return{outPoint:e.clone(),index:t,t:n}}function c(e,t,n,r){e.outPoint.assign(t),e.index=n,e.t=r}function l(e,t){e.outPoint.assign(t.outPoint),e.index=t.index,e.t=t.t}function h(e,t,n,r){e.index=n,e.t=r,t.queryCoord2D(e.t,e.outPoint)}function f(e,t){const n=m();l(n,e),l(e,t),l(t,n)}function g(e,t,n,r,i,a){if(e.getGeometryType()===s.G.enumPolygon){for(;r.nextPath();)if(r.hasNextSegment()){const t=r.nextSegment();if(0!==(0,o.i)(e,t.getEndXY(),0))return c(i,t.getEndXY(),-1,Number.NaN),c(a,t.getEndXY(),-1,Number.NaN),!0}r.resetToFirstPath()}if(t.getGeometryType()===s.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){const e=n.nextSegment();if(0!==(0,o.i)(t,e.getEndXY(),0))return c(i,e.getEndXY(),-1,Number.NaN),c(a,e.getEndXY(),-1,Number.NaN),!0}n.resetToFirstPath()}return!1}function _(e){const t=e.getPathCount(),n=new Array(e.getSegmentCount());let r=0;for(let s=0;s<t;++s){const t=r+e.getSegmentCountPath(s);for(let i=r,o=e.getPathStart(s);i<t;++i,++o)n[i]=o;r=t}return(0,i.J)(e.getPointCount(),n),n}function p(e,t){return!!Number.isNaN(t)||e<=t}function d(e){const t=new i.h;return t.addEnvelope(e,!1),t}class y{constructor(e,t){if(this.m_env2DgeometryA=null,this.m_env2DgeometryB=null,this.m_progressCounter=0,this.m_progressTracker=t,this.m_maxSqrDistance=e*e,this.m_maxDistance=e,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=e,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let e=Math.sqrt(this.m_maxSqrDistance);for(;e<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,e=Math.sqrt(this.m_maxSqrDistance)}}calculate(e,t,n,r){if((e.getGeometryType()!==i.P.type||t.getGeometryType()!==i.P.type)&&(this.m_env2DgeometryA=new i.a,this.m_env2DgeometryB=new i.a,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!p(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return Number.POSITIVE_INFINITY;const s=u(new a.P,(0,a.j)(),Number.NaN),o=u(new a.P,(0,a.j)(),Number.NaN),m=this._ExecuteBruteForce(e,t,s,o);return p(m,this.m_maxDistance)?(null!==n&&l(n,s),null!==r&&l(r,o),m):Number.POSITIVE_INFINITY}isNear(e,t){if(this.m_bIsNearCalc=!0,e.isEmpty()||t.isEmpty())return!1;if(e===t)return!0;let n=!0;if(e.getGeometryType()!==i.P.type&&e.getGeometryType()!==i.E.type||t.getGeometryType()!==i.P.type&&t.getGeometryType()!==i.E.type||(n=!1),n){if(this.m_env2DgeometryA=new i.a,this.m_env2DgeometryB=new i.a,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const r=u(new a.P,(0,a.j)(),Number.NaN),s=u(new a.P,(0,a.j)(),Number.NaN);return this._ExecuteBruteForce(e,t,r,s)<=this.m_maxDistance}progress_(e=!1){}_ExecuteBruteForce(e,t,n,r){switch(e.getGeometryType()){case s.G.enumPoint:return this.distancePointGeometry(e,t,n,r);case s.G.enumMultiPoint:return this.distanceMultipointGeometry(e,t,n,r);case s.G.enumEnvelope:return this.distanceEnvelopeGeometry(e,t,n,r);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathGeometry(e,t,n,r);default:return Number.NaN}}distancePointGeometry(e,t,n,r){switch(t.getGeometryType()){case s.G.enumPoint:return this.distancePointPoint(e,t,n,r);case s.G.enumMultiPoint:return this.distancePointMultipoint(e,t,n,r);case s.G.enumPolyline:case s.G.enumPolygon:return this.distancePointMultipath(e,t,n,r);case s.G.enumEnvelope:return this.distancePointEnvelope(e,t,n,r);default:return Number.NaN}}distancePointPoint(e,t,n,r){const s=e.getXY(),i=t.getXY();return c(n,s,0,0),c(r,i,0,0),Math.sqrt(a.P.sqrDistance(s,i))}distancePointMultipoint(e,t,n,r){const s=e.getXY();let i=this.m_maxSqrDistance,o=i,m=!1;const u=t.getPointCount(),l=new a.P;for(let e=0;e<u;++e)if(t.queryXY(e,l),o=a.P.sqrDistance(s,l),this.m_bIsNearCalc){if(o<=i)return 0}else if(!(o>i)&&(!m&&o===i||o<i)&&(i=o,c(n,s,0,0),c(r,l,e,0),m=!0,0===i))return 0;return m?Math.sqrt(i):Number.POSITIVE_INFINITY}distancePointMultipath(e,t,n,r){const m=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),u=e.getXY();if(!m&&t.getGeometryType()===s.G.enumPolygon&&0!==(0,o.i)(t,u,0))return c(n,u,0,0),c(r,u,-1,Number.NaN),0;t.getImpl().getAccelerators();let l=this.m_maxSqrDistance,h=l,f=-1;const g=new i.a,_=t.querySegmentIterator();let p=!1;for(;_.nextPath();)for(;_.hasNextSegment();){const e=_.nextSegment();e.queryEnvelope(g);const t=g.sqrDistance(u);if(t>l)continue;if(!this.m_bIsNearCalc&&p&&t===l)continue;f=e.getClosestCoordinate(u,!1);const s=e.getCoord2D(f);if(h=a.P.sqrDistance(u,s),this.m_bIsNearCalc){if(h<=l)return 0}else if(!(h>l)&&(!p||h<l)&&(l=h,c(n,u,0,0),c(r,s,_.getStartPointIndex(),f),p=!0,0===l))return 0}return p?Math.sqrt(l):Number.POSITIVE_INFINITY}distancePointEnvelope(e,t,n,r){const s=e.getXY();c(n,s,0,0),c(r,s,-1,Number.NaN);const i=t.asEnvelope2D();return i.contains(s)?0:Math.sqrt(i.sqrDistance(s,r.outPoint))}distanceMultipointGeometry(e,t,n,r){switch(t.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distancePointMultipoint(t,e,r,n);return this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumMultiPoint:return this.distanceMultipointMultipoint(e,t,n,r,1,1);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipointMultipath(e,t,n,r);case s.G.enumEnvelope:return this.distanceMultipointMultipath(e,d(t),n,r);default:return Number.NaN}}distanceMultipointMultipoint(e,t,n,s,i,o){const m={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===i&&1===o){const r=Math.trunc((0,a.l)(Math.sqrt(e.getPointCount())+1,1,(0,a.o)())),i=Math.trunc((0,a.l)(Math.sqrt(t.getPointCount())+1,1,(0,a.o)()));if((r>=4||i>=4)&&this.distanceMultipointMultipoint(e,t,n,s,r,i)<=this.m_maxSqrDistance)return 0}let u=this.m_maxSqrDistance;const l=[e],h=[t],g=this.swapGeometriesIfBGtA(l,h);g&&(this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o=(0,a.b)(i,i=o),f(n,s)),(0,r.b)(m,(0,a.f)((()=>{f(n,s),this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)}),!g),!1);const _=l[0].getImpl(),p=h[0].getImpl(),d=_.getPointCount(),y=p.getPointCount(),P=y>1;let x=!1;const b=new a.P,C=new a.P;for(let e=0;e<d;e+=i){if(_.queryXY(e,b),P){const e=this.m_env2DgeometryB.sqrDistance(b);if(this.m_bIsNearCalc){if(e>u)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(b)<=u)return 0}else if(e>=u)continue}for(let t=0;t<y;t+=o){p.queryXY(t,C);const r=a.P.sqrDistance(b,C);if(this.m_bIsNearCalc){if(r<=u)return 0}else if(!(r>u||x&&r===u)&&(!x||r<u)&&(c(n,b,e,0),c(s,C,t,0),x=!0,u=r,0===u))return x?Math.sqrt(u):Number.POSITIVE_INFINITY}}return x?Math.sqrt(u):Number.POSITIVE_INFINITY}catch(e){m.error=e,m.hasError=!0}finally{(0,r.c)(m)}}distanceMultipointMultipath(e,t,n,r){let m=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&t.getGeometryType()===s.G.enumPolygon;const u=t.querySegmentIterator();u.stripAttributes();const l=new i.a,h=new a.P;let f=this.m_maxSqrDistance;const g=e.getImpl(),_=g.getPointCount(),p=_>1;let d=!1;for(;u.nextPath();)for(;u.hasNextSegment();){const e=u.nextSegment();if(e.queryLooseEnvelope(l),p){const e=l.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(e>f)continue}else if(e>f||d&&e===f)continue}for(let s=0;s<_;s++){if(g.queryXY(s,h),m&&0!==(0,o.i)(t,h,0))return c(n,h,-1,Number.NaN),c(r,h,s,0),0;{const e=l.sqrDistance(h);if(this.m_bIsNearCalc){if(e>f)continue}else if(e>f)continue}const i=e.getClosestCoordinate(h,!1),a=e.getCoord2D(i);h.subThis(a);const _=h.sqrLength();if(this.m_bIsNearCalc){if(_<=f)return 0}else if(!(_>f)&&(!d||_<f)&&(f=_,c(n,g.getXY(s),s,0),c(r,a,u.getStartPointIndex(),i),d=!0,0===f))return 0}m=!1}return d?Math.sqrt(f):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(e,t,n,r){switch(t.getGeometryType()){case s.G.enumPoint:return this.distancePointEnvelope(t,e,r,n);case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distanceMultipointMultipath(t,d(e),r,n);return this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(d(e),t,n,r);case s.G.enumEnvelope:return this.distanceEnvelopeEnvelope(e,t,n,r);default:return Number.NaN}}distanceEnvelopeEnvelope(e,t,n,r){n.t=Number.NaN,n.index=-1,r.t=Number.NaN,r.index=-1;const s=e.asEnvelope2D(),i=t.asEnvelope2D();return Math.sqrt(s.sqrDistanceEnvelope(i,n.outPoint,r.outPoint))}distanceMultipathGeometry(e,t,n,r){switch(t.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distancePointMultipath(t,e,r,n);return this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distanceMultipointMultipath(t,e,r,n);return this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(e,t,n,r);case s.G.enumEnvelope:return this.distanceMultipathMultipath(e,d(t),n,r);default:return Number.NaN}}distanceMultipathMultipath(e,t,n,s){const o={stack:[],error:void 0,hasError:!1};try{const u=[e],c=[t],p=this.swapGeometriesIfAGtB(u,c);p&&(this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),f(n,s)),(0,r.b)(o,(0,a.f)((()=>{f(n,s),this.m_env2DgeometryB=(0,a.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)}),!p),!1);const d=u[0],y=c[0],P=d.querySegmentIterator();P.stripAttributes();const x=y.querySegmentIterator();if(x.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const e=Math.trunc((0,a.l)(Math.sqrt(d.getPointCount())+1,1,(0,a.o)())),t=Math.trunc((0,a.l)(Math.sqrt(d.getPointCount())+1,1,(0,a.o)()));if(this.distanceMultipointMultipoint(d,y,n,s,e,t)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const e=m(),t=m();if(g(d,y,P,x,e,t))return l(n,e),l(s,t),0}const b=_(d),C=[],v=new i.S,G=new i.a,S=new i.a,D=new i.a;let w=this.m_maxSqrDistance,M=!0,T=!1;for(let e=0,t=b.length;e<t;++e){d.querySegment(b[e],v,!0);const t=v.get();if(t.queryEnvelope(G),!(G.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>w)){if(this.m_bIsNearCalc&&G.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=w)return 0;for(;x.nextPath();){if(this.progress_(),M)y.queryPathEnvelope(x.getPathIndex(),D),C[x.getPathIndex()]=D.clone();else if(G.sqrDistanceEnvelope(C[x.getPathIndex()],null,null)>w)continue;for(;x.hasNextSegment();){const r=x.nextSegment();if(r.queryEnvelope(S),G.sqrDistanceEnvelope(S,null,null)<=w){const i=!G.isIntersecting(S),o=[0],a=[0];let m=t.distance(r,i,o,a);if(m*=m,this.m_bIsNearCalc&&m<=this.m_maxSqrDistance)return 0;if(m<w||m===w&&b[e]<n.index){if(T=!0,h(n,t,b[e],o[0]),h(s,r,x.getStartPointIndex(),a[0]),0===m)return 0;w=m}}}}x.resetToFirstPath(),M=!1}}return T?Math.sqrt(w):Number.POSITIVE_INFINITY}catch(e){o.error=e,o.hasError=!0}finally{(0,r.c)(o)}}swapGeometriesIfAGtB(e,t){return(0,s.v)(e[0])>(0,s.v)(t[0])&&(t[0]=(0,a.b)(e[0],e[0]=t[0]),!0)}swapGeometriesIfBGtA(e,t){return this.swapGeometriesIfAGtB(t,e)}}},80407:(e,t,n)=>{n.d(t,{c:()=>s});var r=n(55537);function s(e,t){const n=e.getGeometryType();return n===r.G.enumPoint?e:(0,r.f)(n)?function(e){if(function(e){for(let t=0,n=e.getPathCount();t<n;t++){const n=e.getPathSize(t);if(0===n)return!1;if(1===n){if(0===e.getSegmentCountPath(t))return!1;if(e.getSegmentType(e.getPathStart(t))===r.G.enumLine)return!1;if(!e.isClosedPath(t))return!1}}return!0}(e))return e;const t=e.createInstance();for(let n=0,s=e.getPathCount();n<s;n++){const s=e.getPathSize(n);if(0!==s){if(1===s){if(0===e.getSegmentCountPath(n))continue;if(e.getSegmentType(e.getPathStart(n))===r.G.enumLine)continue;if(!e.isClosedPath(n))continue}t.addPath(e,n,!0)}}return t}(e):n===r.G.enumMultiPoint||n===r.G.enumEnvelope?e:n===r.G.enumMultipatch?((0,r.a)("not implemented for multipatch"),e):e}},29821:(e,t,n)=>{n.d(t,{O:()=>s});var r=n(9192);class s extends r.d{getOperatorType(){return 6}execute(e,t,n,s){return(0,r.r)(e,t,n,16,s)}}},70031:(e,t,n)=>{n.d(t,{O:()=>s});var r=n(9192);class s extends r.d{getOperatorType(){return 4}execute(e,t,n,s){return!(0,r.r)(e,t,n,4,s)}}},85181:(e,t,n)=>{n.d(t,{O:()=>s});var r=n(9192);class s extends r.d{getOperatorType(){return 9}execute(e,t,n,s){return(0,r.r)(e,t,n,32,s)}}},46810:(e,t,n)=>{n.d(t,{O:()=>s});var r=n(9192);class s extends r.d{getOperatorType(){return 5}execute(e,t,n,s){return(0,r.r)(e,t,n,8,s)}}},22802:(e,t,n)=>{n.d(t,{O:()=>s});var r=n(9192);class s extends r.d{getOperatorType(){return 7}execute(e,t,n,s){return(0,r.r)(e,t,n,2,s)}}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>s});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class s extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},24988:(e,t,n)=>{n.d(t,{Hh:()=>a,fz:()=>c,g7:()=>m,s1:()=>o,zo:()=>u});var r=n(76061),s=n(83290);let i;function o(){return!!i&&(0,s.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([n.e(9192),n.e(7444)]).then(n.bind(n,37444)),n.e(9192).then(n.bind(n,9192)).then((e=>e.a8)).then((({injectPe:e})=>e)),(0,s.l)()]);i=new e.OperatorGeodesicBuffer,t(s.p)}}function m(e,t,n,r,s){return i.execute(e,t,n,r,s,!1,null)}function u(e,t,n,s,o,a){const m=i.executeMany(new r.S(e),t,n,s,o,!1,a,null);return Array.from(m)}function c(){return i.supportsCurves()}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>y,fromGeometry:()=>d,fromMultipoint:()=>P,fromPoint:()=>x,fromPolygon:()=>b,fromPolyline:()=>C,fromSpatialReference:()=>v,getSpatialReference:()=>p,toExtent:()=>S,toGeometry:()=>G,toMultipoint:()=>D,toPoint:()=>w,toPolygon:()=>M,toPolyline:()=>T});var r=n(11878),s=n(35368),i=n(55537),o=n(9192),a=(n(59456),n(90293),n(83299)),m=n(5443),u=n(48526),c=n(86738),l=n(39829),h=n(82799);const f="_gxVersion",g=2,_=1;function p(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function d(e){switch(e.type){case"point":return x(e);case"multipoint":return P(e);case"polyline":return C(e);case"polygon":return b(e);case"extent":return y(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function y(e){if(!e.getCacheValue(f)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(_,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function P(e){if(!e.getCacheValue(f)){const t=new s.M,n=new s.P,r=e.points,i=e.hasM,o=e.hasZ,a=o?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),o&&n.setZ(s[2]??0),i&&n.setM(s[a]??NaN),t.add(n)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function x(e){if(!e.getCacheValue(f)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function b(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,i=(0,a.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(f,i)}return e.getCacheValue(f)}function C(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,i=(0,a.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(f,i)}return e.getCacheValue(f)}function v(e){if(e.wkid)return(0,o.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,o.b)(t):null}function G(e,t){if(e)switch(e.getGeometryType()){case i.G.enumPoint:return w(e,t);case i.G.enumEnvelope:return S(e,t);case i.G.enumMultiPoint:return D(e,t);case i.G.enumPolyline:return T(e,t);case i.G.enumPolygon:return M(e,t)}return null}function S(e,t){if(e.isEmpty())return null;const n=new m.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(g,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(_,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(f,e),n}function D(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),i=n.hasZ(),o=[],a=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];i&&n.push(a.getZ()),r&&n.push(a.getM()),o.push(n)}const m=new u.A({hasM:r,hasZ:i,points:o,spatialReference:t});return m.setCacheValue(f,e),m}function w(e,t){if(e instanceof r.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(f,e),n}function M(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({spatialReference:t,...(0,a.toGeometry)(e,null)});return n.setCacheValue(f,e),n}function T(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({spatialReference:t,...(0,a.toGeometry)(e,null)});return n.setCacheValue(f,e),n}},5808:(e,t,n)=>{n.d(t,{O:()=>r});const r={geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2626],{9775:(e,t,r)=>{r.d(t,{A:()=>o});var s=r(62788),i=r(95488);class o{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},10382:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(36563),i=(r(44208),r(74887)),o=r(9775),n=r(72457),a=r(52268),l=r(61322);class c{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let o=!0;const n=e=>{(0,i.Te)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const a=e[o];(0,i.$X)(a)?this._clientPromises[o]=a.then((e=>(this._clients[o]=new l.default(e,t,this._ongoingJobsQueue),n(r),this._clients[o])),(()=>(n(s),null))):(this._clients[o]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[o]=Promise.resolve(this._clients[o]),n(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const o=this._clientPromises[i];s[i]=o.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,n.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){}}},35982:(e,t,r)=>{r.d(t,{B:()=>l});var s=r(4576),i=r(36563),o=r(53966),n=r(74887),a=r(29953);class l{constructor(e,t,r,s,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,a.ho)(e,{...i,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,i.hA)((()=>{r.removed=!0,(0,s.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const s=this._transferLists[e],i=s?s(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,n.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},72457:(e,t,r)=>{r.d(t,{h:()=>o,k:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function o(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>j});var s=r(49186),i=r(44208),o=r(74887),n=r(10382),a=r(72457),l=r(61322),c=r(53966),h=r(97768),d=r(78888),u=r(84952);const p={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,u.sC)(e.url)?.after?s:"array-buffer";const i=await(0,d.A)(e.url,r),o={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete o.data.signal,o;case"blob":o.data=await o.data.arrayBuffer();break;case"json":o.data=(new TextEncoder).encode(JSON.stringify(o.data)).buffer;break;case"text":o.data=(new TextEncoder).encode(o.data).buffer}return{result:o,transferList:[o.data]}}};var _=r(8341),m=r(2741),g=r(92602),f=(r(47566),r(70333));const A={};var E=r(26390);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class R{constructor(){this._dispatcher=new b,this._workerPostMessage({type:_.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,E.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,E.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,_.VI)(e);if(t&&t.type===_.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:_.Go.OPENED,jobId:r,data:i})}}}var T=r(73444),w=r(18357);const I=()=>c.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:v}=_.Go;let y,M;const P="Failed to create Worker. Fallback to execute module in main thread";async function N(e){return new Promise((t=>{function r(i){const o=(0,_.VI)(i);o&&o.type===v&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),I().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new R).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let x=0;const{ABORT:C,INVOKE:S,OPEN:D,OPENED:k,RESPONSE:H}=_.Go;class U{static async create(e){const t=await async function(){if(!(0,i.A)("esri-workers"))return N(new R);if(!y&&!M)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=g.A.default){const t={...g.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(g.A));e.assetsPath=(0,u.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,u.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,T.JK)(),e.has={"esri-csp-restrictions":(0,i.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.A)("esri-atomics"),"esri-shared-array-buffer":(0,i.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,u.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,u.s2)(e.workers.workerPath):e.workers.workerPath=(0,u.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=g.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{...A.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=A.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,T.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:w.$,fullVersion:f.ol,revision:w.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());y=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){M=e||{}}let e;if(y)try{e=new Worker(y,{name:"esri-worker-"+x++})}catch(t){I().warn(P,M),e=new R}else I().warn(P,M),e=new R;return N(e)}();return new U(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,_.Jc)();return new Promise(((t,i)=>{const n={resolve:t,reject:i,abortHandle:(0,o.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:C,jobId:s})}))};this._outJobs.set(s,n),this._post({type:D,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,_.VI)(e);if(t)switch(t.type){case k:this._onOpenedMessage(t);break;case H:this._onResponseMessage(t);break;case C:this._onAbortMessage(t);break;case S:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,n=i?new AbortController:null,a=this._inJobs,l=p[t];let c;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);c=l.call(null,s,{signal:n?n.signal:null})}catch(e){return void this._post({type:H,jobId:r,error:(0,_.mF)(e)})}(0,o.$X)(c)?(a.set(r,{controller:n,promise:c}),c.then((e=>{a.has(r)&&(a.delete(r),this._post({type:H,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.zf)(e)||this._post({type:H,jobId:r,error:(0,_.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:H,jobId:r},c)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,h.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,h.xt)(o.abortHandle),r?o.reject(s.A.fromJSON(JSON.parse(r))):o.resolve(i))}_post(e,t,r){return(0,_.u1)(this.worker,e,t,r)}}const O=(0,i.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.A)("workers-pool-size")??8):0;let L=(0,i.A)("esri-mobile")?Math.min(O,3):O;L||(L=(0,i.A)("safari")&&(0,i.A)("mac")?7:2);let G=0;const F=[];async function B(e,t){const r=new n.A,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.k)(s,r),r}async function j(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.A)("host-webworker")&&!(0,i.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,o.Te)(t.signal);const s=t.client||r;return B([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if(W)return W;X=new AbortController;const e=[];for(let t=0;t<L;t++){const r=U.create(t).then((e=>(F[t]=e,e)));e.push(r)}return W=Promise.all(e),W}(),(0,o.Te)(t.signal),"dedicated"===r){const r=G++%L;return B([await F[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,L);if(r<L){const s=new Array(r);for(let i=0;i<r;++i){const r=G++%L;s[i]=F[r].open(e,t)}return B(s,t)}}return B(F.map((r=>r.open(e,t))),t)}let X,W=null},36421:(e,t,r)=>{var s;r.d(t,{p:()=>s}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(s||(s={}))},72626:(e,t,r)=>{r.d(t,{g:()=>h});var s=r(49186),i=(r(44208),r(44794));(r(53966),r(36708),r(35982)).B;new Set;var o=r(94656),n=r(63907),a=r(36421),l=r(67171);class c extends l.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case n.H0.R16F:case n.H0.R16I:case n.H0.R16UI:case n.H0.R32F:case n.H0.R32I:case n.H0.R32UI:case n.H0.R8_SNORM:case n.H0.R8:case n.H0.R8I:case n.H0.R8UI:this.pixelFormat=n.Ab.RED}}static validate(e,t){return new c(e,t)}}let h=class e{constructor(e,t=null,r=null){if(this.type=a.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._isCompressing=(0,i.v)(!1),"context"in e)this._descriptor=e,r=t;else{const r=c.validate(e,t);if(!r)throw new s.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,l.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return this._isCompressing.value}set isCompressing(e){e?(this._compressionWorkerAbortController=new AbortController,this._isCompressing.value=!0):(this._compressionWorkerAbortController=null,this._isCompressing.value=!1)}dispose(){this._compressionWorkerAbortController?.abort(),this._glName&&this._descriptor.context.instanceCounter.decrement(n.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new s.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.shouldCompress=e}_setDataCubeMap(e=null){for(let t=n.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=n.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){return this.isCompressing&&(this._compressionWorkerAbortController.abort(),this.isCompressing=!1),!_(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in n.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e),this.isCompressing}async compressOnWorker(e){const t=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),r=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),s=null,i=await createImageBitmap(e);if(s&&(t||r)){const o={data:i,flipped:this.descriptor.flipped,width:e.width,height:e.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!t,hasS3TC:!!r,buffer:[new ArrayBuffer(0)]};s.invoke(o,this._compressionWorkerAbortController.signal).then((e=>{e&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture)),this.isCompressing=!1})).catch((()=>{this.isCompressing=!1}))}}_setData(t,r){const i=this._descriptor.context?.gl;if(!i)return;(0,o.Y2)(i),this._glName||(this._glName=i.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(n.vt.Texture,this));const a=this._descriptor,l=r??a.target,c=g(l),h=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),d(a),this._configurePixelStorage(),(0,o.Y2)(i);const A=this._deriveInternalFormat();if(m(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const s=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),a.width&&a.height,c&&a.depth,a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,A,a.hasMipmap,e,r,s),this._texImage(l,0,A,e,r,s,t),(0,o.Y2)(i),a.hasMipmap&&(this.generateMipmap(),(0,o.Y2)(i)),a.width||(a.width=e),a.height||(a.height=r),c&&!a.depth&&(a.depth=s)}else{const{width:e,height:r,depth:h}=a;if(null==e||null==r)throw new s.A("Width and height must be specified!");if(c&&null==h)throw new s.A("Depth must be specified!");if(a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,A,a.hasMipmap,e,r,h),_(t)){const o=t.levels,c=f(l,e,r,h),d=Math.min(c,o.length)-1;i.texParameteri(a.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,d);const u=A;if(!(u in n.CQ))throw new s.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,s)=>{const i=o[Math.min(e,o.length-1)];this._compressedTexImage(l,e,u,t,r,s,i)}),d)}else this._texImage(l,0,A,e,r,h,t),(0,o.Y2)(i),a.hasMipmap&&this.generateMipmap()}u(i,this._descriptor),p(i,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,o.Y2)(i),this._descriptor.context.bindTexture(h,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,i,o,n,a,l=0){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const c=this._descriptor,h=this._deriveInternalFormat(),{context:d,pixelFormat:u,dataType:p,target:g,isImmutable:f}=c;if(f&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");const A=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||i<0||r+o>c.width||i+n>c.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=d;l&&E.pixelStorei(E.UNPACK_SKIP_ROWS,l),m(a)?E.texSubImage2D(g,t,r,i,o,n,u,p,a):_(a)?E.compressedTexSubImage2D(g,t,r,i,o,n,h,a.levels[t]):E.texSubImage2D(g,t,r,i,o,n,u,p,a),l&&E.pixelStorei(E.UNPACK_SKIP_ROWS,0),d.bindTexture(A,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,i,o,n,a,l,c){c||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const h=this._descriptor,d=this._deriveInternalFormat(),{context:u,pixelFormat:p,dataType:m,isImmutable:f,target:A}=h;if(f&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");g(A)||console.warn("Attempting to set 3D texture data on a non-3D texture");const E=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||i<0||o<0||r+n>h.width||i+a>h.height||o+l>h.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:b}=u;if(_(c))c=c.levels[t],b.compressedTexSubImage3D(A,t,r,i,o,n,a,l,d,c);else{const e=c;b.texSubImage3D(A,t,r,i,o,n,a,l,p,m,e)}u.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,d(t)}t.samplingMode===n.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=n.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===n.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=n.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,d(e)}e.samplingMode===n.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=n.Cj.LINEAR):e.samplingMode===n.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=n.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,d(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(u(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(p(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===n.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=n.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case n.ld.FLOAT:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA32F;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB32F;default:throw new s.A("Unable to derive format")}case n.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA8;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===n.Ab.DEPTH_STENCIL?n.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:s}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s?1:0)}_texStorage(e,t,r,i,o,a){const{gl:l}=this._descriptor.context;if(!(t in n.H0))throw new s.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const c=r?f(e,i,o,a):1;if(g(e)){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");l.texStorage3D(e,c,t,i,o,a)}else l.texStorage2D(e,c,t,i,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,i,o,n,a){const l=this._descriptor.context.gl,c=g(e),{isImmutable:h,pixelFormat:d,dataType:u}=this._descriptor;if(h){if(null!=a){const r=a;if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,i,o,n,d,u,r)}else l.texSubImage2D(e,t,0,0,i,o,d,u,r)}}else{const h=a;if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,i,o,n,0,d,u,h)}else l.texImage2D(e,t,r,i,o,0,d,u,h)}}_compressedTexImage(e,t,r,i,o,n,a){const l=this._descriptor.context.gl,c=g(e);if(this._descriptor.isImmutable){if(null!=a)if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,i,o,n,r,a)}else l.compressedTexSubImage2D(e,t,0,0,i,o,r,a)}else if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,i,o,n,0,a)}else l.compressedTexImage2D(e,t,r,i,o,0,a)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:i,depth:o,hasMipmap:a,target:l}=this._descriptor;const c=l===n.Ap.TEXTURE_3D;if(null==r||null==i||c&&null==o)throw new s.A("Missing texture dimensions for mipmap calculation");for(let s=0;e(s,r,i,o),a&&(1!==r||1!==i||c&&1!==o)&&!(s>=t);++s)r=Math.max(1,r>>1),i=Math.max(1,i>>1),c&&(o=Math.max(1,o>>1))}};function d(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function u(e,t){let r=t.samplingMode,s=t.samplingMode;r===n.Cj.LINEAR_MIPMAP_NEAREST||r===n.Cj.LINEAR_MIPMAP_LINEAR?(r=n.Cj.LINEAR,t.hasMipmap||(s=n.Cj.LINEAR)):r!==n.Cj.NEAREST_MIPMAP_NEAREST&&r!==n.Cj.NEAREST_MIPMAP_LINEAR||(r=n.Cj.NEAREST,t.hasMipmap||(s=n.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,s)}function p(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function _(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!_(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function g(e){return e===n.Ap.TEXTURE_3D||e===n.Ap.TEXTURE_2D_ARRAY}function f(e,t,r,s=1){let i=Math.max(t,r);return e===n.Ap.TEXTURE_3D&&(i=Math.max(i,s)),Math.floor(Math.log2(i))+1}h.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>o,e:()=>n});var s=r(63907),i=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.target=s.Ap.TEXTURE_2D,this.pixelFormat=s.Ab.RGBA,this.dataType=s.ld.UNSIGNED_BYTE,this.samplingMode=s.Cj.LINEAR,this.wrapMode=s.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.shouldCompress=!1,this.depth=1,this.isImmutable=!1}}function n(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,i.IB)(e.internalFormat))*(e.target===s.Ap.TEXTURE_CUBE_MAP?6:1))}},42293:(e,t,r)=>{r.d(t,{Hi:()=>l,IB:()=>c,yu:()=>a}),r(44208);var s=r(94656),i=r(63907),o=r(62298);function n(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function a(e,t,r,i,a=0){const l=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(null==i){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const c=a*r.stride;if(r.count<=4)l.vertexAttribPointer(i,r.count,r.type,r.normalized,r.stride,r.offset+c),l.enableVertexAttribArray(i),r.divisor>0&&e.gl.vertexAttribDivisor(i,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)l.vertexAttribPointer(i+t,3,r.type,r.normalized,r.stride,r.offset+12*t+c),l.enableVertexAttribArray(i+t),r.divisor>0&&e.gl.vertexAttribDivisor(i+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)l.vertexAttribPointer(i+t,4,r.type,r.normalized,r.stride,r.offset+16*t+c),l.enableVertexAttribArray(i+t),r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,s.en)()){const t=n(e),s=(0,o._)(r.type),i=r.offset,a=Math.round(s/i)!==s/i?`. Offset not a multiple of stride. DataType requires ${s} bytes, but descriptor has an offset of ${i}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${c}${a}:`,t,r)}}}function l(e,t,r,s){const o=e.gl;e.bindBuffer(r);for(const r of s){const s=t.get(r.name);if(r.count<=4)o.disableVertexAttribArray(s),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s,0);else if(9===r.count)for(let t=0;t<3;t++)o.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else if(16===r.count)for(let t=0;t<4;t++)o.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(i.NZ.ARRAY_BUFFER)}function c(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656:(e,t,r)=>{r.d(t,{Xc:()=>c,Y2:()=>h,en:()=>l});var s=r(49186),i=r(44208),o=r(53966);const n=()=>o.A.getLogger("esri.views.webgl.checkWebGLError"),a=!!(0,i.A)("enable-feature:webgl-debug");function l(){return a}function c(){return a}function h(e){if(l()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),i=(new Error).stack;n().error(new s.A("webgl-error","WebGL error occurred",{message:r,stack:i}))}}}},62298:(e,t,r)=>{r.d(t,{_:()=>i});var s=r(63907);function i(e){switch(e){case s.pe.BYTE:case s.pe.UNSIGNED_BYTE:return 1;case s.pe.SHORT:case s.pe.UNSIGNED_SHORT:case s.pe.HALF_FLOAT:return 2;case s.pe.FLOAT:case s.pe.INT:case s.pe.UNSIGNED_INT:return 4}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4796],{81457:(e,t,r)=>{r.d(t,{A:()=>P});var n,o=r(90237),i=r(61147),s=(r(44208),r(66552)),a=r(25482),l=r(4718),u=r(90629),c=r(10107),p=(r(53966),r(36005)),d=r(40608),y=r(43937),h=(r(87811),r(32730));let f=n=class extends a.A{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,h.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,h.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,o._)([(0,c.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],f.prototype,"expression",void 0),(0,o._)([(0,p.w)("expression",["expression","value"])],f.prototype,"readExpression",null),(0,o._)([(0,y.K)("expression")],f.prototype,"writeExpression",null),(0,o._)([(0,c.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],f.prototype,"title",void 0),(0,o._)([(0,c.MZ)({json:{read:!1,write:!1}})],f.prototype,"value",void 0),f=n=(0,o._)([(0,d.$)("esri.layers.support.LabelExpressionInfo")],f);const m=f;var b,w=r(83531),g=r(59868),v=r(73838);const x=new s.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,w.TU)(r?.layer)}}function A(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function M(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let I=b=class extends a.A{static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),o=n[3],i=r(t[n[4]],n[5],n[6]);switch(o){case"AND":return e&&i;case"OR":return e||i}}return!1}catch(e){}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=g.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,h.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,h.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&A(n))e=new m({expression:this.getLabelExpressionArcade()});else if(!e)return;const o=e.toJSON(n);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,h.XJ)(this)}getLabelExpressionArcade(){return(0,h.BI)(this)}getLabelExpressionSingleField(){return(0,h.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new b({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o._)([(0,c.MZ)({type:String,json:{write:!0}})],I.prototype,"name",void 0),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],I.prototype,"allowOverrun",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],I.prototype,"deconflictionStrategy",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&M(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),(0,o._)([(0,p.w)("labelExpression")],I.prototype,"readLabelExpression",null),(0,o._)([(0,y.K)("labelExpression")],I.prototype,"writeLabelExpression",null),(0,o._)([(0,c.MZ)({type:m,json:{write:{overridePolicy:(e,t,r)=>function(e){return A(e)||M(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),(0,o._)([(0,y.K)("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),(0,o._)([(0,c.MZ)({type:x.apiValues,json:{type:x.jsonValues,read:x.read,write:x.write}})],I.prototype,"labelPlacement",void 0),(0,o._)([(0,c.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),(0,o._)([(0,c.MZ)({type:Number})],I.prototype,"maxScale",void 0),(0,o._)([(0,y.K)("maxScale")],I.prototype,"writeMaxScale",null),(0,o._)([(0,c.MZ)({type:Number})],I.prototype,"minScale",void 0),(0,o._)([(0,y.K)("minScale")],I.prototype,"writeMinScale",null),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],I.prototype,"repeatLabel",void 0),(0,o._)([(0,c.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],I.prototype,"repeatLabelDistance",void 0),(0,o._)([(0,c.MZ)({types:i.em,json:{origins:{"web-scene":{types:i.Rv,write:v.oO,default:null}},write:v.oO,default:null}})],I.prototype,"symbol",void 0),(0,o._)([(0,c.MZ)({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),(0,o._)([(0,c.MZ)({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=b=(0,o._)([(0,d.$)("esri.layers.support.LabelClass")],I);const P=I},15426:(e,t,r)=>{r.d(t,{Xl:()=>A,ct:()=>P,pc:()=>V,hx:()=>$,C$:()=>K,PD:()=>U,VZ:()=>D,mm:()=>j,VA:()=>J,WP:()=>E,iX:()=>S,Nv:()=>T,xd:()=>Y,GA:()=>W,rQ:()=>z,jp:()=>N,tG:()=>X,lV:()=>_,B5:()=>C,Ye:()=>Z,sg:()=>F,hM:()=>O,S2:()=>R,jD:()=>q,Zm:()=>B,$4:()=>G,Pt:()=>ee,bt:()=>I,rn:()=>L,ZJ:()=>te});var n=r(70333),o=r(61147),i=r(60999),s=r(49186),a=r(66552),l=r(39516),u=r(13069),c=r(90360),p=r(39357),d=r(53177),y=r(61956);async function h(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=f(e));const n=function(e){return f(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),o=e.capabilities.query.supportsPagination;t.start=0,t.num=n;let i=null;for(;;){const s=await e.source.queryFeaturesJSON(t,r);if(null==i?i=s:i.features=i.features.concat(s.features),i.exceededTransferLimit=s.exceededTransferLimit,!o||!s.exceededTransferLimit)break;t.start+=n}return i}function f(e){return e.capabilities.query.supportsMaxRecordCountFactor?y.A.MAX_MAX_RECORD_COUNT_FACTOR:1}var m=r(30524),b=r(83531),w=r(96576),g=r(93618),v=r(54546),x=r(26591);const S=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function A(e,t,r,n){const o=await k(e);if(await M(e,t,n),!o.addAttachment)throw new s.A(n,"Layer source does not support addAttachment capability");return o.addAttachment(t,r)}function M(e,t,r){const{attributes:n}=t,{objectIdField:o}=e;return e.capabilities?.data?.supportsAttachment?t?n?o&&n[o]?Promise.resolve():Promise.reject(new s.A(r,`feature is missing the identifying attribute ${o}`)):Promise.reject(new s.A(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new s.A(r,"A feature is required to add/delete/update attachments")):Promise.reject(new s.A(r,"this layer doesn't support attachments"))}async function I(e,t,r,n,o){const i=await k(e);if(await M(e,t,o),!i.updateAttachment)throw new s.A(o,"Layer source does not support updateAttachment capability");return i.updateAttachment(t,r,n)}async function P(e,t,n){const{applyEdits:o}=await r.e(8628).then(r.bind(r,78628)),i=await e.load();let s=n;return"feature"===i.type&&i.infoFor3D&&null!=t.deleteFeatures&&null!=i.globalIdField&&(s={...s,globalIdToObjectId:await W(i,t.deleteFeatures,i.globalIdField)}),o(i,i.source,t,n)}async function L(e,t,n){const{uploadAssets:o}=await r.e(8628).then(r.bind(r,78628)),i=await e.load();return o(i,i.source,t,n)}async function j(e,t,r,n){const o=await k(e);if(await M(e,t,n),!o.deleteAttachments)throw new s.A(n,"Layer source does not support deleteAttachments capability");return o.deleteAttachments(t,r)}async function E(e,t,r){const n=(await e.load({signal:t?.signal})).source;if(!n.fetchRecomputedExtents)throw new s.A(r,"Layer source does not support fetchUpdates capability");return n.fetchRecomputedExtents(t)}async function _(e,t,r,n){t=v.A.from(t),await e.load();const o=e.source,i=e.capabilities;if(!i?.data?.supportsAttachment)throw new s.A(n,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:c,size:p,start:d,where:y}=t;if(!i?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||p?.length>0||c||d||y))throw new s.A(n,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||y))throw new s.A(n,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!o.queryAttachments)throw new s.A(n,"Layer source does not support queryAttachments capability",t);return o.queryAttachments(t)}async function F(e,t,r,n){const o=await k(e);if(!o.queryObjectIds)throw new s.A(n,"Layer source does not support queryObjectIds capability");return o.queryObjectIds(y.A.from(t)??e.createQuery(),r)}async function Z(e,t,r,n){const o=await k(e);if(!o.queryFeatureCount)throw new s.A(n,"Layer source does not support queryFeatureCount capability");return o.queryFeatureCount(y.A.from(t)??e.createQuery(),r)}async function C(e,t,r,n){const o=await k(e);if(!o.queryExtent)throw new s.A(n,"Layer source does not support queryExtent capability");return o.queryExtent(y.A.from(t)??e.createQuery(),r)}async function O(e,t,r,n){const o=await k(e);if(!o.queryRelatedFeatures)throw new s.A(n,"Layer source does not support queryRelatedFeatures capability");return o.queryRelatedFeatures(x.default.from(t),r)}async function R(e,t,r,n){const o=await k(e);if(!o.queryRelatedFeaturesCount)throw new s.A(n,"Layer source does not support queryRelatedFeaturesCount capability");return o.queryRelatedFeaturesCount(x.default.from(t),r)}async function N(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.G)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function D(e){const t=new y.A,r=e.capabilities?.data,n=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,n&&(t.compactGeometryEnabled=n.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function q(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function B(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function G(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function T(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find((e=>e.code===o))}function V(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map((e=>new p.H({code:H(e.code,i),name:e.name})));if(t?.length)return new d.A({codedValues:t})}return null}function $(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length){const t=e.types.map((e=>new p.H({code:H(e.id,o),name:e.name})));return new d.A({codedValues:t})}return null}function H(e,t){return t?(0,m.yM)({type:t})&&"number"==typeof e?`${e}`:(0,m.R3)({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function k(e){return(await e.load()).source}async function J(e,t,r){const o=e.parsedUrl?.path;o&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!n.id)return;if(n.id.findCredential(e))return;let r;try{const o=await(0,b.wI)(e,t);o&&(r=await n.id.checkSignInStatus(`${o}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await n.id.getCredential(e,{signal:r})}catch(e){}}(o,r)}function z(e){return!!e?.toLowerCase().includes("current_user")}function K(e){return!ee(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const Q=(0,c.C)({types:o.xK});function U(e,t){if(e.defaultSymbol)return e.types?.length?new g.A({defaultSymbol:Q(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:Q(e.symbol,e,t)})))}):new w.A({symbol:Q(e.defaultSymbol,e,t)})}function X(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function W(e,t,r){if(null==t)return null;const n=[],{objectIdField:o}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:n}=e;t={globalId:n[r],objectId:null!=n[o]&&-1!==n[o]?n[o]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||n.push(t.globalId))})),0===n.length)return null;const s=e.createQuery();s.where=n.map((e=>`${r}='${e}'`)).join(" OR "),s.returnGeometry=!1,s.outFields=[o,r],s.cacheHint=!1;const a=await(0,i.DZ)(h(e,s));if(!a.ok)return null;const l=new Map,c=a.value.features;for(const e of c){const t=e.attributes[r],n=e.attributes[o];null!=t&&null!=n&&-1!==n&&l.set((0,u.AG)(t),n)}return l}function Y(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);return null==n?null:e.find((e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()}))??null}function ee(e){return e.sourceJSON?.isMultiServicesView||function(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map((e=>e.trim())).includes("map")}(e)}function te(e,t,r){const n=t?.queryAttributeBins;if(!n)throw new s.A(r,"Layer source does not support binning");switch(e.binParameters.type){case"auto-interval":if(!n.supportsAutoInterval)throw new s.A(r,"Layer source does not support auto-interval binning");break;case"date":if(!n.supportsDate)throw new s.A(r,"Layer source does not support date binning");break;case"fixed-boundaries":if(!n.supportsFixedBoundaries)throw new s.A(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!n.supportsFixedInterval)throw new s.A(r,"Layer source does not support fixed-interval binning")}const o=n?.supportedStatistics;if(e.outStatistics&&o){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:n}of e.outStatistics){const e=t.get(n);if(e&&!o[e])throw new s.A(r,`Layer source does not support ${n} statistic type`)}}}},39383:(e,t,r)=>{r.d(t,{w:()=>l,z:()=>c});var n=r(49186),o=r(53966),i=r(81457);const s=()=>o.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function l(e,t,r){return e?e.map((e=>{const n=new i.A;if(n.read(e,r),n.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;n.labelExpression=n.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const n=t[e].name;if(n.toLowerCase()===r)return n}return e}(r,e)}]`))}return n})):null}const u={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:null,esriGeometryEnvelope:null};function c(e,t){const r=[];for(const o of e){const e=o.labelPlacement,i=u[t];if(!o.symbol)return s().warn("No ILabelClass symbol specified."),[];if(!i)return s().error(new n.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(i.includes(e))r.push(o);else{const n=i[0];e&&s().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${n}`);const a=o.clone();a.labelPlacement=n,r.push(a)}}return r}},54546:(e,t,r)=>{r.d(t,{A:()=>d});var n,o=r(90237),i=r(25482),s=r(4718),a=r(10107),l=r(56507),u=r(40608),c=r(43937);let p=n=class extends i.A{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new n((0,s.o8)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"attachmentTypes",void 0),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],p.prototype,"attachmentsWhere",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"cacheHint",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"keywords",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],p.prototype,"globalIds",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),(0,o._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"returnMetadata",void 0),(0,o._)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"size",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),(0,o._)([(0,c.K)("start"),(0,c.K)("num")],p.prototype,"writeStart",null),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=n=(0,o._)([(0,u.$)("esri.rest.support.AttachmentQuery")],p),p.from=(0,l.dp)(p);const d=p},26591:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n,o=r(90237),i=(r(59456),r(25482)),s=r(4718),a=r(10107),l=r(56507),u=r(40608),c=r(43937),p=r(27733),d=r(16930);let y=n=class extends i.A{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new n((0,s.o8)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,o._)([(0,a.MZ)({type:p.L,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,o._)([(0,a.MZ)({type:Date})],y.prototype,"historicMoment",void 0),(0,o._)([(0,c.K)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,o._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"objectIds",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,o._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,o._)([(0,a.MZ)({type:d.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,o._)([(0,c.K)("start"),(0,c.K)("num")],y.prototype,"writeStart",null),(0,o._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,o._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,o._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=n=(0,o._)([(0,u.$)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.dp)(y);const h=y},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var n=r(13874),o=r(30524),i=r(28122),s=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(47582),r(41227)),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},y){if(!r)return null;const f=function(e,t){const r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){const n=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===n&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||h,sortDisabled:t?.sortDisabled}).map((t=>new a.A({fieldName:t.name,isEditable:(0,o.R$)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},y);if(!f.length)return null;const m=function(e){const t=(0,o.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),b=[new s.A,new i.A];return new n.A({title:m,content:b,fieldInfos:f})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,o.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:y(e)?-1:y(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,o.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function y(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const h=["geometry","blob","raster","guid","xml"]}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2935,8928,9340],{39516:(e,t,n)=>{async function r(e,t){const{default:r}=await n.e(8368).then(n.bind(n,88368));return r.create(e,{fieldsIndex:t})}function o(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>r,m:()=>o})},13069:(e,t,n)=>{n.d(t,{AG:()=>l,lk:()=>o,vD:()=>i,yS:()=>s});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${o().toUpperCase()}}`}function i(){return`{${o()}}`}function l(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},32756:(e,t,n)=>{n.d(t,{Rr:()=>a,fY:()=>p,ne:()=>u});var r=n(90237),o=n(93637),s=n(10107),i=(n(44208),n(53966),n(87811),n(40608)),l=n(91880);function a(e,t,n){if(!e)return null;const r=e.find((e=>!!e.field));if(!r)return null;const o=new l.A;return o.read(r,n),[o]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,n,r){const s=e.find((e=>!!e.field));s&&(0,o.sM)(n,[s.toJSON()],t)}}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,s.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,r._)([(0,i.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,n)=>{n.d(t,{A:()=>y});var r=n(90237),o=n(69540),s=n(25482),i=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),a=n(40608),u=n(43937),p=n(80451),c=n(29005);let f=class extends(o.A.ClonableMixin(s.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const n of Object.keys(e))t[n]=(0,p.rS)(e[n]);return t}writeDomains(e,t){const n={};for(const t of Object.keys(e))e[t]&&(n[t]=e[t]?.toJSON());t.domains=n}};(0,r._)([(0,i.MZ)({json:{write:!0}})],f.prototype,"id",void 0),(0,r._)([(0,i.MZ)({json:{write:!0}})],f.prototype,"name",void 0),(0,r._)([(0,i.MZ)({json:{write:!0}})],f.prototype,"domains",void 0),(0,r._)([(0,l.w)("domains")],f.prototype,"readDomains",null),(0,r._)([(0,u.K)("domains")],f.prototype,"writeDomains",null),(0,r._)([(0,i.MZ)({type:[c.A],json:{write:!0}})],f.prototype,"templates",void 0),f=(0,r._)([(0,a.$)("esri.layers.support.FeatureType")],f);const y=f},91880:(e,t,n)=>{n.d(t,{A:()=>c});var r,o=n(90237),s=n(66552),i=n(25482),l=n(10107),a=(n(44208),n(53966),n(87811),n(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=r=class extends i.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,o._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,o._)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=r=(0,o._)([(0,a.$)("esri.layers.support.OrderByInfo")],p);const c=p},32730:(e,t,n)=>{n.d(t,{BI:()=>h,D3:()=>d,XJ:()=>m,lc:()=>y,mX:()=>x,rU:()=>g,tH:()=>A});var r=n(799);const o="__begin__",s="__end__",i=new RegExp(o,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+o,"i"),u=new RegExp(s+"$","i"),p='"',c=p+" + ",f=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function d(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function h(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return x(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return A(t.expression)}return null}function x(e){let t;return e?(t=(0,r.HC)(e,(e=>o+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(i,c).replaceAll(l,f)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,R=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function A(e){if(!e)return null;let t=_.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=R.exec(e),t?t[2]:null)}},58501:(e,t,n)=>{n.d(t,{q:()=>o});var r=n(62815);function o(e,t,n){if(!n?.features||!n.hasZ)return;const o=(0,r.N)(n.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of n.features)o(e.geometry)}},22671:(e,t,n)=>{n.d(t,{A:()=>w});var r,o=n(90237),s=n(59456),i=n(52106),l=n(66552),a=n(25482),u=n(4718),p=n(10107),c=(n(44208),n(53966),n(36005)),f=n(40608),y=n(43937),d=n(16930),m=n(65864),h=n(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let x=r=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=d.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=i.A.fromJSON(o),l=o.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=n);const a=o.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=n)}r.push(s)}return r}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,m.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=d.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,o]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/n)));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,o],scale:[s,i]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*i),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,n){let r,o;const s=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=n(l[1]);e===r&&i===o||(s.push([e-r,i-o]),r=e,o=i)}else r=t(l[0]),o=n(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,m.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],i=this._quantizePoints(s,t,n);i&&o.push(i)}return o.length>0?((0,m.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,m.Bi)(e)?e.rings:e.paths;let i,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=n(l)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=o(n[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(i+=r[0],l+=r[1]):(i=r[0],l=r[1]),r[0]=t(i),r[1]=n(l)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],x.prototype,"displayFieldName",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.MZ)({type:[i.A],json:{write:!0}})],x.prototype,"features",void 0),(0,o._)([(0,c.w)("features")],x.prototype,"readFeatures",null),(0,o._)([(0,p.MZ)({type:[h.A],json:{write:!0}})],x.prototype,"fields",void 0),(0,o._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],x.prototype,"geometryType",void 0),(0,o._)([(0,y.K)("geometryType")],x.prototype,"writeGeometryType",null),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],x.prototype,"hasZ",void 0),(0,o._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],x.prototype,"queryGeometry",void 0),(0,o._)([(0,c.w)("queryGeometry")],x.prototype,"readQueryGeometry",null),(0,o._)([(0,p.MZ)({type:d.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,o._)([(0,y.K)("spatialReference")],x.prototype,"writeSpatialReference",null),(0,o._)([(0,p.MZ)({json:{write:!0}})],x.prototype,"transform",void 0),x=r=(0,o._)([(0,f.$)("esri.rest.support.FeatureSet")],x),x.prototype.toJSON.isDefaultToJSON=!0;const w=x},92935:(e,t,n)=>{var r;n.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);