@arcgis/core 4.34.0-next.55 → 4.34.0-next.56

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 (118) hide show
  1. package/WebScene.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0a4586e596413ef7a4b5.js +1 -0
  4. package/assets/esri/core/workers/chunks/{62ade6f18b375795ddfd.js → 10b46438885916d18425.js} +1 -1
  5. package/assets/esri/core/workers/chunks/1166ed298cf5ca7ad444.js +1 -0
  6. package/assets/esri/core/workers/chunks/13797036850dcc3671c3.js +1 -0
  7. package/assets/esri/core/workers/chunks/{c9c109d43a1e5160955d.js → 3490d47cac7c8dec70cd.js} +2 -2
  8. package/assets/esri/core/workers/chunks/43a56c8fa4e5be18c12a.js +1 -0
  9. package/assets/esri/core/workers/chunks/4b58da6cb91f7bf6af8b.js +1 -0
  10. package/assets/esri/core/workers/chunks/{cac060a187f3a27a19ba.js → 4d5abcf57a6ded4750ba.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{d0bf1fc6e3c198bc565d.js → 57486b18421a3c9690d0.js} +1 -1
  12. package/assets/esri/core/workers/chunks/5f518931a660b3c4f519.js +1 -0
  13. package/assets/esri/core/workers/chunks/66f3659ba18f92cd623e.js +1 -0
  14. package/assets/esri/core/workers/chunks/67355372ac5fd8a15d18.js +1 -0
  15. package/assets/esri/core/workers/chunks/{5691d504ffe5592bc40f.js → 6dc0009889f2b7cc8cff.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{4d2473e680324dc17cfa.js → 853b9f29b4d62fa621b9.js} +1 -1
  17. package/assets/esri/core/workers/chunks/855f25ce748aaef44b1a.js +1 -0
  18. package/assets/esri/core/workers/chunks/{71acded1b3c0057917a1.js → 862fe2f96d4b777ff5b8.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{fe5c37c69da3ec1e56ac.js → 8fa50cac57b6e1ecec76.js} +1 -1
  20. package/assets/esri/core/workers/chunks/9307108821d82c131654.js +1 -0
  21. package/assets/esri/core/workers/chunks/9b10e70f28873cff44f5.js +1 -0
  22. package/assets/esri/core/workers/chunks/{3b51b61a7b8a1ef87c9b.js → adf11d31f95481f89a55.js} +1 -1
  23. package/assets/esri/core/workers/chunks/af4412e79275c5a87539.js +1 -0
  24. package/assets/esri/core/workers/chunks/{7a8d740d1226719a578a.js → b457b7dd907f06278bee.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{81e518dd62bd95611d00.js → b47688e3263099540873.js} +1 -1
  26. package/assets/esri/core/workers/chunks/c91217d977a6baaee74a.js +1 -0
  27. package/assets/esri/core/workers/chunks/{e1b25b1ce3bd4f0f2cda.js → cb57cdff976d2d4b0b41.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{9fef330b241f958b55df.js → d0124b0dd62b331afe58.js} +1 -1
  29. package/assets/esri/core/workers/chunks/d3a7747f23e91d1f1b5e.js +1 -0
  30. package/assets/esri/core/workers/chunks/d3ae88fcde2d7fb3e2e2.js +1 -0
  31. package/assets/esri/core/workers/chunks/{b6a201e86f9caef45ff0.js → d42fd0effc560eefb14b.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{4f8dab492331c9a2d67a.js → d87fdc64a5cc6be4bd69.js} +1 -1
  33. package/assets/esri/core/workers/chunks/db5d3feeb61ccb5ede98.js +1 -0
  34. package/assets/esri/core/workers/chunks/{aab349d4624b78ef429f.js → e6bf4f3f6868dc9028e3.js} +1 -1
  35. package/assets/esri/core/workers/chunks/f74b0cdc1c2b56bac5f0.js +1 -0
  36. package/assets/esri/core/workers/chunks/f807e7fc90e0e7ce6b67.js +1 -0
  37. package/assets/esri/core/workers/chunks/{fae6030a81cb91a91b69.js → faf4002f9547a0cc4e33.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{fe55833c80cf59df9c2b.js → ff42b24b48019a03d841.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{e10c5405f956b2cc59e4.js → ff4e15a872de94d2b438.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{ff7962063d132c1ec814.js → ff8a4bf1bceb362d67ab.js} +1 -1
  41. package/config.js +1 -1
  42. package/core/has.js +1 -1
  43. package/geometry/Multipoint.js +1 -1
  44. package/geometry/support/coordsUtils.js +1 -1
  45. package/geometry/support/extentUtils.js +1 -1
  46. package/graphic/KMLGraphicOrigin.js +5 -0
  47. package/graphic/isKMLGraphicOrigin.js +5 -0
  48. package/interfaces.d.ts +6 -3
  49. package/kernel.js +1 -1
  50. package/layers/KMLLayer.js +1 -1
  51. package/layers/SceneLayer.js +1 -1
  52. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  53. package/layers/support/ElevationQuery.js +1 -1
  54. package/layers/support/KMLSublayer.js +1 -1
  55. package/layers/support/featureReductionUtils.js +1 -1
  56. package/layers/support/kmlUtils.js +1 -1
  57. package/package.json +1 -1
  58. package/renderers/support/colorRampUtils.js +1 -1
  59. package/support/requestUtils.js +1 -1
  60. package/support/revision.js +1 -1
  61. package/views/2d/layers/KMLLayerView2D.js +1 -1
  62. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  63. package/views/3d/analysis/Viewshed/{ArrowManipulator.js → ViewshedArrowManipulator.js} +1 -1
  64. package/views/3d/analysis/Viewshed/{FieldOfViewManipulation.js → ViewshedFieldOfViewManipulation.js} +1 -1
  65. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +5 -0
  66. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +5 -0
  67. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  68. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +5 -0
  69. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  70. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  71. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  72. package/views/draw/DrawOperation.js +1 -1
  73. package/views/draw/MultipointDrawAction.js +1 -1
  74. package/views/draw/PointDrawAction.js +1 -1
  75. package/views/draw/PolygonDrawAction.js +1 -1
  76. package/views/draw/PolylineDrawAction.js +1 -1
  77. package/views/draw/SegmentDrawAction.js +1 -1
  78. package/views/draw/support/Box.js +1 -1
  79. package/views/draw/support/GraphicMover.js +1 -1
  80. package/views/draw/support/Reshape.js +1 -1
  81. package/views/draw/support/drawUtils.js +1 -1
  82. package/views/draw/support/reshapeTooltipUtils.js +1 -1
  83. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  84. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  85. package/views/interactive/editGeometry/operations/AppendVertex.js +1 -1
  86. package/views/interactive/tooltip/infos/SelectedVertexTooltipInfo.js +1 -1
  87. package/webscene/spec-certification/api.js +1 -1
  88. package/webscene/spec-certification/compare.js +1 -1
  89. package/webscene/spec-certification/spec.js +1 -1
  90. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  91. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  92. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  93. package/widgets/OrientedImageryViewer.js +1 -1
  94. package/widgets/Sketch/SketchViewModel.js +1 -1
  95. package/widgets/Sketch/support/sketchUtils.js +1 -1
  96. package/assets/esri/core/workers/chunks/02902303e5585a16ebea.js +0 -1
  97. package/assets/esri/core/workers/chunks/0445de3a8968c0734c91.js +0 -1
  98. package/assets/esri/core/workers/chunks/09268dc856c3d5ce178f.js +0 -1
  99. package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +0 -1
  100. package/assets/esri/core/workers/chunks/17776d9d3558d45ea7b5.js +0 -1
  101. package/assets/esri/core/workers/chunks/1cbd59918c60a1a21494.js +0 -1
  102. package/assets/esri/core/workers/chunks/252ee00fd6c4ae0ee7fa.js +0 -1
  103. package/assets/esri/core/workers/chunks/3800764932a1c32cb29f.js +0 -1
  104. package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +0 -1
  105. package/assets/esri/core/workers/chunks/772e81e9162e2240a7a6.js +0 -1
  106. package/assets/esri/core/workers/chunks/8c81156b1605a16acc29.js +0 -1
  107. package/assets/esri/core/workers/chunks/8f6ff09e7d2f01b79faf.js +0 -1
  108. package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +0 -1
  109. package/assets/esri/core/workers/chunks/a7530dcb08b43e37bbb2.js +0 -1
  110. package/assets/esri/core/workers/chunks/c51e2a048df152abd901.js +0 -1
  111. package/assets/esri/core/workers/chunks/d1842745a7699879a1e1.js +0 -1
  112. package/assets/esri/core/workers/chunks/d578c3880eaf2dd62324.js +0 -1
  113. package/assets/esri/core/workers/chunks/de499e33035b56b6697d.js +0 -1
  114. package/assets/esri/core/workers/chunks/e04951ee32f041faaeca.js +0 -1
  115. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +0 -5
  116. package/views/3d/analysis/Viewshed/ViewshedAnalysisVisualization.js +0 -5
  117. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +0 -5
  118. /package/assets/esri/core/workers/chunks/{c9c109d43a1e5160955d.js.LICENSE.txt → 3490d47cac7c8dec70cd.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1882],{537:(t,n,e)=>{e.d(n,{B$:()=>g,LJ:()=>m,Pj:()=>d,Rg:()=>f,Yz:()=>y,z8:()=>p});var i=e(19419);function r(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function o(t){return void 0!==t.x&&void 0!==t.y}function a(t){return void 0!==t.paths}function h(t){return void 0!==t.rings}function l(t){return function(n,e){return null==n?e:null==e?n:t(n,e)}}const u=l(Math.min),c=l(Math.max);function f(t,n){return a(n)?y(t,n.paths,!1,!1):h(n)?y(t,n.rings,!1,!1):s(n)?d(t,n.points,!1,!1,!1,!1):r(n)?x(t,n):(o(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.x,t[3]=n.y),t)}function p(t){let n,e,r,s;for(t.reset(),n=r=1/0,e=s=-1/0;t.nextPath();){const i=g(t);n=Math.min(i[0],n),r=Math.min(i[1],r),e=Math.max(i[2],e),s=Math.max(i[3],s)}return(0,i.vt)([n,r,e,s])}function g(t){let n,e,r,s;for(n=r=1/0,e=s=-1/0;t.nextPoint();)n=Math.min(t.x,n),r=Math.min(t.y,r),e=Math.max(t.x,e),s=Math.max(t.y,s);return(0,i.vt)([n,r,e,s])}function m(t,n){return a(n)?y(t,n.paths,!0,!1):h(n)?y(t,n.rings,!0,!1):s(n)?d(t,n.points,!0,!1,!0,!1):r(n)?x(t,n,0,0,!0,!1):(o(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=n.x,t[4]=n.y,t[5]=n.z),t)}function y(t,n,e,i){const r=e?3:2;if(!n.length||!n[0].length)return null;let s,o,a,h,[l,f]=n[0][0],[p,g]=n[0][0];for(let t=0;t<n.length;t++){const m=n[t];for(let t=0;t<m.length;t++){const n=m[t],[y,x]=n;if(l=u(l,y),f=u(f,x),p=c(p,y),g=c(g,x),e&&n.length>2){const t=n[2];s=u(s,t),o=c(o,t)}if(i&&n.length>r){const t=n[r];a=u(s,t),h=c(o,t)}}}return e?i?(t[0]=l,t[1]=f,t[2]=s,t[3]=a,t[4]=p,t[5]=g,t[6]=o,t[7]=h,t.length=8,t):(t[0]=l,t[1]=f,t[2]=s,t[3]=p,t[4]=g,t[5]=o,t.length=6,t):i?(t[0]=l,t[1]=f,t[2]=a,t[3]=p,t[4]=g,t[5]=h,t.length=6,t):(t[0]=l,t[1]=f,t[2]=p,t[3]=g,t.length=4,t)}function x(t,n,e,i,r,s){const o=n.xmin,a=n.xmax,h=n.ymin,l=n.ymax;let u=n.zmin,c=n.zmax,f=n.mmin,p=n.mmax;return r?(u=u||0,c=c||0,s?(f=f||0,p=p||0,t[0]=o,t[1]=h,t[2]=u,t[3]=f,t[4]=a,t[5]=l,t[6]=c,t[7]=p,t):(t[0]=o,t[1]=h,t[2]=u,t[3]=a,t[4]=l,t[5]=c,t)):s?(f=f||0,p=p||0,t[0]=o,t[1]=h,t[2]=f,t[3]=a,t[4]=l,t[5]=p,t):(t[0]=o,t[1]=h,t[2]=a,t[3]=l,t)}function d(t,n,e,i,r,s){const o=e?3:2,a=i&&s,h=e&&r;if(!n.length||!n[0].length)return null;let l,f,p,g,[m,y]=n[0],[x,d]=n[0];for(let t=0;t<n.length;t++){const e=n[t],[i,r]=e;if(m=u(m,i),y=u(y,r),x=c(x,i),d=c(d,r),h&&e.length>2){const t=e[2];l=u(l,t),f=c(f,t)}if(a&&e.length>o){const t=e[o];p=u(l,t),g=c(f,t)}}return r?(l=l||0,f=f||0,s?(p=p||0,g=g||0,t[0]=m,t[1]=y,t[2]=l,t[3]=p,t[4]=x,t[5]=d,t[6]=f,t[7]=g,t):(t[0]=m,t[1]=y,t[2]=l,t[3]=x,t[4]=d,t[5]=f,t)):s?(p=p||0,g=g||0,t[0]=m,t[1]=y,t[2]=p,t[3]=x,t[4]=d,t[5]=g,t):(t[0]=m,t[1]=y,t[2]=x,t[3]=d,t)}},12359:(t,n,e)=>{e.d(n,{IK:()=>l,TP:()=>c,Z4:()=>s,l8:()=>o,w2:()=>h});var i=e(51118),r=e(95108);function s(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function o(t){return t?function(t,n){if(!t?.length)return null;const e=[],i=[],s=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let e=0,r=t.length;e<r;e++){const r=a(t[e],n,s);r&&i.push(r)}if(i.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i}),i.length&&(e[0]=i[0][0],e[1]=i[0][1],n&&(e[2]=i[0][3]),(e[0]<s[0]||e[0]>s[1]||e[1]<s[2]||e[1]>s[3]||n&&(e[2]<s[4]||e[2]>s[5]))&&(e.length=0)),!e.length){const i=t[0]&&t[0].length?function(t,n){const e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;for(let l=0,u=t.length;l<u-1;l++){const u=t[l],c=t[l+1];if(u&&c){e[0]=u[0],e[1]=u[1],i[0]=c[0],i[1]=c[1],n&&u.length>2&&c.length>2&&(e[2]=u[2],i[2]=c[2]);const t=(0,r.R3)(e,i);if(t){s+=t;const e=(0,r.t9)(u,c);o+=t*e[0],a+=t*e[1],n&&e.length>2&&(h+=t*e[2])}}}return s>0?n?[o/s,a/s,h/s]:[o/s,a/s]:t.length?t[0]:null}(t[0],n):null;if(!i)return null;e[0]=i[0],e[1]=i[1],n&&i.length>2&&(e[2]=i[2])}return e}(t.rings,t.hasZ??!1):null}function a(t,n,e){let i=0,r=0,s=0,o=0,a=0;const h=t.length?t[0][0]:0,l=t.length?t[0][1]:0,u=t.length&&n?t[0][2]:0;for(let c=0;c<t.length;c++){const f=t[c],p=t[(c+1)%t.length],[g,m,y]=f,x=g-h,d=m-l,[v,P,I]=p,A=v-h,R=P-l,w=x*R-A*d;if(o+=w,i+=(x+A)*w,r+=(d+R)*w,n&&f.length>2&&p.length>2){const t=y-u,n=I-u,e=x*n-A*t;s+=(t+n)*e,a+=e}g<e[0]&&(e[0]=g),g>e[1]&&(e[1]=g),m<e[2]&&(e[2]=m),m>e[3]&&(e[3]=m),n&&(y<e[4]&&(e[4]=y),y>e[5]&&(e[5]=y))}if(o>0&&(o*=-1),a>0&&(a*=-1),!o)return null;o*=.5,a*=.5;const c=[i/(6*o)+h,r/(6*o)+l,o];return n&&(e[4]===e[5]||0===a?(c[3]=(e[4]+e[5])/2,c[4]=0):(c[3]=s/(6*a)+u,c[4]=a)),c}function h(t,n){let e=0,i=0,r=0;t.nextPoint();const s=t.pathSize?t.x:0,o=t.pathSize?t.y:0;for(let a=0;a<t.pathSize;a++){t.seekInPath(a);const h=[t.x,t.y];t.seekInPath((a+1)%t.pathSize);const l=[t.x,t.y],[u,c]=h,f=u-s,p=c-o,[g,m]=l,y=g-s,x=m-o,d=f*x-y*p;r+=d,e+=(f+y)*d,i+=(p+x)*d,u<n[0]&&(n[0]=u),u>n[1]&&(n[1]=u),c<n[2]&&(n[2]=c),c>n[3]&&(n[3]=c)}return r>0&&(r*=-1),r?(r*=.5,[e/(6*r)+s,i/(6*r)+o,r]):null}function l(t){const{hasZ:n,totalSize:e}=t;if(0===e)return null;const s=[],o=[],h=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const n=a((0,i.A)(t),t.hasZ,h);n&&o.push(n)}if(o.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i}),o.length&&(s[0]=o[0][0],s[1]=o[0][1],n&&(s[2]=o[0][3]),(s[0]<h[0]||s[0]>h[1]||s[1]<h[2]||s[1]>h[3]||n&&(s[2]<h[4]||s[2]>h[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const e=t.pathSize?function(t){const{hasZ:n}=t,e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;if(t.nextPoint()){let l=t.x,u=t.y,c=t.z;for(;t.nextPoint();){const f=t.x,p=t.y,g=t.z;e[0]=l,e[1]=u,i[0]=f,i[1]=p,n&&(e[2]=c,i[2]=g);const m=(0,r.R3)(e,i);if(m){s+=m;const t=(0,r.t9)(e,i);o+=m*t[0],a+=m*t[1],n&&t.length>2&&(h+=m*t[2])}l=f,u=p,c=g}}return s>0?n?[o/s,a/s,h/s]:[o/s,a/s]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!e)return null;s[0]=e[0],s[1]=e[1],n&&e.length>2&&(s[2]=e[2])}return s}const u=1e-6;function c(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<u){const n=l(t);return n?[n[0],n[1]]:null}const e=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const i=[t.x,t.y];for(t.reset();t.nextPath();)p(e,i,t);return e[0]*=1/n,e[1]*=1/n,e[0]+=i[0],e[1]+=i[1],e}const f=1/3;function p(t,n,e){if(!t||!e||e.pathSize<3)return null;e.nextPoint();const i=e.x,r=e.y;e.nextPoint();let s,o=e.x-i,a=e.y-r,h=0,l=0;for(;e.nextPoint();)h=e.x-i,l=e.y-r,s=.5*f*(h*a-l*o),t[0]+=s*(o+h),t[1]+=s*(a+l),o=h,a=l;const u=e.getCurrentRingArea(),c=[i,r];return c[0]-=n[0],c[1]-=n[1],c[0]*=u,c[1]*=u,t[0]+=c[0],t[1]+=c[1],t}},39829:(t,n,e)=>{e.d(n,{A:()=>w});var i,r=e(31635),s=e(4576),o=e(51447),a=e(4718),h=e(53966),l=e(10107),u=(e(44208),e(40608)),c=e(43937),f=e(5443),p=e(91075),g=e(86738),m=e(16930),y=e(12359),x=e(94078),d=e(95108),v=e(90634),P=e(12176),I=e(28735),A=e(56993);function R(t){return!Array.isArray(t[0])}let w=i=class extends p.A{static fromExtent(t){const n=t.clone().normalize(),{spatialReference:e}=t;let r=!1,s=!1;for(const t of n)t.hasZ&&(r=!0),t.hasM&&(s=!0);const o={rings:n.map(t=>{const n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r&&t.hasZ){const e=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<n.length;t++)n[t].push(e)}if(s&&t.hasM){const e=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<n.length;t++)n[t].push(e)}return n}),spatialReference:e};return r&&(o.hasZ=!0),s&&(o.hasM=!0),new i(o)}constructor(t){super(function(t){if(!t)return;let{rings:n,hasM:e,hasZ:i,spatialReference:r}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:i??=!0,e??=!0;break;case 3:i??=!0!==e,e??=!i;break;default:i??=!1,e??=!1}return r??=m.A.WGS84,{...t,hasM:e,hasZ:i,rings:n,spatialReference:r}}(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){const t=(0,y.l8)(this);if(!t||isNaN(t[0])||isNaN(t[1])||this.hasZ&&isNaN(t[2]))return null;const n=new g.A;return n.x=t[0],n.y=t[1],n.spatialReference=this.spatialReference,this.hasZ&&(n.z=t[2]),n}writeCurveRings(t,n){n.curveRings=(0,a.o8)(t)}get extent(){const t=(0,v.v)(this),{spatialReference:n}=this;return t?new f.A({...t,spatialReference:n}):null}get isSelfIntersecting(){return(0,o.Lx)(h.A.getLogger(this),"isSelfIntersecting",{replacement:"Please use simplifyOperator.isSimple() instead.",version:"4.33",warnOnce:!0}),(0,P.A3)(this.rings)}writeRings(t,n){n.rings=(0,a.o8)(this.rings)}addRing(t){if(!t)return;const n=this.rings,e=n.length;if(R(t)){const i=[];for(let n=0,e=t.length;n<e;n++)i[n]=t[n].toArray();n[e]=i}else n[e]=t.slice();return this.notifyChange("rings"),this}clone(){const t=new i;return t.spatialReference=this.spatialReference,t.rings=(0,a.o8)(this.rings),t.curveRings=(0,a.o8)(this.curveRings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const n=this.spatialReference,e=t.spatialReference;if(null!=n!=(null!=e))return!1;if(null!=n&&null!=e&&!n.equals(e))return!1;if(this.rings.length!==t.rings.length)return!1;const i=([t,n,e,i],[r,s,o,a])=>t===r&&n===s&&(null==e&&null==o||e===o)&&(null==i&&null==a||i===a);for(let n=0;n<this.rings.length;n++){const e=this.rings[n],r=t.rings[n];if(!(0,s.aI)(e,r,i))return!1}return!0}contains(t){if(!t)return!1;const n=(0,I.Cv)(t,this.spatialReference);return(0,x.m3)(this,null!=n?n:t)}isClockwise(t){const n=R(t)?t.map(t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y]):t;return(0,d.$3)(n)}getPoint(t,n){if(!this._validateInputs(t,n))return null;const e=this.rings[t][n],i=this.hasZ,r=this.hasM;return i&&!r?new g.A(e[0],e[1],e[2],void 0,this.spatialReference):r&&!i?new g.A(e[0],e[1],void 0,e[2],this.spatialReference):i&&r?new g.A(e[0],e[1],e[2],e[3],this.spatialReference):new g.A(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,A.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t].splice(n,0,e),this.notifyChange("rings"),this):this}removePoint(t,n){if(!this._validateInputs(t,n))return null;const e=new g.A(this.rings[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("rings"),e}removeRing(t){if(!this._validateInputs(t,null))return null;const n=this.rings.splice(t,1)[0],e=this.spatialReference,i=n.map(t=>new g.A(t,e));return this.notifyChange("rings"),i}setPoint(t,n,e){return this._validateInputs(t,n)?((0,A.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t][n]=e,this.notifyChange("rings"),this):this}_validateInputs(t,n,e=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=n){const i=this.rings[t];if(e&&(n<0||n>i.length))return!1;if(!e&&(n<0||n>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"cache",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"centroid",null),(0,r.Cg)([(0,l.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],w.prototype,"curveRings",void 0),(0,r.Cg)([(0,c.K)("curveRings")],w.prototype,"writeCurveRings",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"extent",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"isSelfIntersecting",null),(0,r.Cg)([(0,l.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],w.prototype,"rings",void 0),(0,r.Cg)([(0,c.K)("rings")],w.prototype,"writeRings",null),w=i=(0,r.Cg)([(0,u.$)("esri.geometry.Polygon")],w),w.prototype.toJSON.isDefaultToJSON=!0},48526:(t,n,e)=>{e.d(n,{A:()=>m});var i=e(31635),r=e(69540),s=e(4718),o=e(10107),a=(e(44208),e(53966),e(40608)),h=e(43937),l=e(5443),u=e(91075),c=e(86738),f=e(16930),p=e(90634),g=e(56993);let m=class extends((0,r.O)(u.A)){constructor(t){super(function(t){if(!t)return;let{points:n,hasM:e,hasZ:i,spatialReference:r}=t;switch(n??=[],n?.at(0)?.length){case 4:i??=!0,e??=!0;break;case 3:i??=!0!==e,e??=!i;break;default:i??=!1,e??=!1}return r??=f.A.WGS84,{...t,hasM:e,hasZ:i,points:n,spatialReference:r}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const t=(0,p.ge)(this);return t?new l.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,n){n.points=(0,s.o8)(this.points)}addPoint(t){return(0,g.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;const n=this.points[t],e={x:n[0],y:n[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(e.z=n[2],i=3),this.hasM&&(e.m=n[i]),new c.A(e)}removePoint(t){if(!this._validateInputs(t))return null;const n=new c.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),n}setPoint(t,n){return this._validateInputs(t)?((0,g.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.points[t]=n,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,i.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],m.prototype,"points",void 0),(0,i.Cg)([(0,h.K)("points")],m.prototype,"writePoints",null),m=(0,i.Cg)([(0,a.$)("esri.geometry.Multipoint")],m),m.prototype.toJSON.isDefaultToJSON=!0},51118:(t,n,e)=>{function i(t){const n=[];for(t.reset();t.nextPath();){const e=[];for(;t.nextPoint();)e.push([t.x,t.y]);n.push(e)}return t.reset(),n}function r(t){const n=[];for(;t.nextPoint();)n.push([t.x,t.y]);return t.seekPathStart(),n}e.d(n,{A:()=>r,x:()=>i})},56993:(t,n,e)=>{function i(t,n,e=!1){let{hasM:i,hasZ:r}=t;Array.isArray(n)?4!==n.length||i||r?3===n.length&&e&&!i?(r=!0,i=!1):3===n.length&&i&&r&&(i=!1,r=!1):(i=!0,r=!0):(r=!r&&n.hasZ&&(!i||n.hasM),i=!i&&n.hasM&&(!r||n.hasZ)),t.hasZ=r,t.hasM=i}e.d(n,{h:()=>i})},69540:(t,n,e)=>{e.d(n,{O:()=>l,P:()=>u});var i=e(31635),r=e(65008),s=(e(44208),e(4718)),o=(e(53966),e(97768)),a=e(88620),h=e(40608);const l=t=>{const n=t;let e=class extends n{clone(t){const n=(0,a.oY)(this);(0,o.Lw)(n,"unable to clone instance of non-accessor class");const e=n.metadata,i=n.store,r={},h=new Map;for(const n in e){const o=e[n],a=i?.originOf(n),l=o.clonable;if(o.readOnly||!1===l||7!==a&&0!==a&&5!==a&&4!==a)continue;const u=this[n];let c=null;if("function"==typeof l)c=l(u,t);else if("reference"===l)c=u;else if(c=(0,s.TU)(u,t),null!=u&&null==c)continue;0===a?h.set(n,c):r[n]=c}const l=new(0,Object.getPrototypeOf(this).constructor)(r);if(h.size){const t=(0,a.oY)(l)?.store;if(t)for(const[n,e]of h)t.set(n,e,0)}return l}};return e=(0,i.Cg)([(0,h.$)("esri.core.Clonable")],e),e},u=l(r.A)},82799:(t,n,e)=>{e.d(n,{A:()=>m});var i,r=e(31635),s=e(4718),o=e(10107),a=(e(44208),e(53966),e(40608)),h=e(43937),l=e(5443),u=e(91075),c=e(86738),f=e(16930),p=e(90634),g=e(56993);let m=i=class extends u.A{constructor(t){super(function(t){if(!t)return;let{paths:n,hasM:e,hasZ:i,spatialReference:r}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:i??=!0,e??=!0;break;case 3:i??=!0!==e,e??=!i;break;default:i??=!1,e??=!1}return r??=f.A.WGS84,{...t,hasM:e,hasZ:i,paths:n,spatialReference:r}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,n){n.curvePaths=(0,s.o8)(t)}get extent(){const t=(0,p.Z3)(this),{spatialReference:n}=this;return t?new l.A({...t,spatialReference:n}):null}writePaths(t,n){n.paths=(0,s.o8)(this.paths)}addPath(t){if(!t)return;const n=this.paths,e=n.length;if(function(t){return!Array.isArray(t[0])}(t)){const i=[];for(let n=0,e=t.length;n<e;n++)i[n]=t[n].toArray();n[e]=i}else n[e]=t.slice();return this.notifyChange("paths"),this}clone(){const t=new i;return t.spatialReference=this.spatialReference,t.paths=(0,s.o8)(this.paths),t.curvePaths=(0,s.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,n){if(!this._validateInputs(t,n))return null;const e=this.paths[t][n],i=this.hasZ,r=this.hasM;return i&&!r?new c.A(e[0],e[1],e[2],void 0,this.spatialReference):r&&!i?new c.A(e[0],e[1],void 0,e[2],this.spatialReference):i&&r?new c.A(e[0],e[1],e[2],e[3],this.spatialReference):new c.A(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,g.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.paths[t].splice(n,0,e),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const n=this.paths.splice(t,1)[0],e=this.spatialReference,i=n.map(t=>new c.A(t,e));return this.notifyChange("paths"),i}removePoint(t,n){if(!this._validateInputs(t,n))return null;const e=new c.A(this.paths[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("paths"),e}setPoint(t,n,e){return this._validateInputs(t,n)?((0,g.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.paths[t][n]=e,this.notifyChange("paths"),this):this}_validateInputs(t,n,e=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=n){const i=this.paths[t];if(e&&(n<0||n>i.length))return!1;if(!e&&(n<0||n>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],m.prototype,"curvePaths",void 0),(0,r.Cg)([(0,h.K)("curvePaths")],m.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],m.prototype,"paths",void 0),(0,r.Cg)([(0,h.K)("paths")],m.prototype,"writePaths",null),m=i=(0,r.Cg)([(0,a.$)("esri.geometry.Polyline")],m),m.prototype.toJSON.isDefaultToJSON=!0},90634:(t,n,e)=>{e.d(n,{HA:()=>u,Z3:()=>p,ge:()=>c,v:()=>f});var i=e(537);const r=[];function s(t,n,e,i){return{xmin:t,ymin:n,xmax:e,ymax:i}}function o(t,n,e,i,r,s){return{xmin:t,ymin:n,zmin:e,xmax:i,ymax:r,zmax:s}}function a(t,n,e,i,r,s){return{xmin:t,ymin:n,mmin:e,xmax:i,ymax:r,mmax:s}}function h(t,n,e,i,r,s,o,a){return{xmin:t,ymin:n,zmin:e,mmin:i,xmax:r,ymax:s,zmax:o,mmax:a}}function l(t,n=!1,e=!1){return n?e?h(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):o(t[0],t[1],t[2],t[3],t[4],t[5]):e?a(t[0],t[1],t[2],t[3],t[4],t[5]):s(t[0],t[1],t[2],t[3])}function u(t){return t?function(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}(t)?t:function(t){return void 0!==t.x&&void 0!==t.y}(t)?function(t){const{x:n,y:e,z:i,m:r}=t,l=null!=r;return null!=i?l?h(n,e,i,r,n,e,i,r):o(n,e,i,n,e,i):l?a(n,e,r,n,e,r):s(n,e,n,e)}(t):function(t){return void 0!==t.rings}(t)?f(t):function(t){return void 0!==t.paths}(t)?p(t):function(t){return void 0!==t.points}(t)?c(t):null:null}function c(t){const{hasZ:n,hasM:e,points:s}=t,o=(0,i.Pj)(r,s,n??!1,e??!1,n??!1,e??!1);return o?l(o,n,e):null}function f(t){const{hasZ:n,hasM:e,rings:s}=t,o=(0,i.Yz)(r,s,n??!1,e??!1);return o?l(o,n,e):null}function p(t){const{hasZ:n,hasM:e,paths:s}=t,o=(0,i.Yz)(r,s,n??!1,e??!1);return o?l(o,n,e):null}},95108:(t,n,e)=>{e.d(n,{$3:()=>l,Ng:()=>o,R3:()=>r,Yl:()=>h,gR:()=>s,m3:()=>c,t9:()=>a});var i=e(4576);function r(t,n){const e=n[0]-t[0],i=n[1]-t[1];if(t.length>2&&n.length>2){const r=t[2]-n[2];return Math.sqrt(e*e+i*i+r*r)}return Math.sqrt(e*e+i*i)}function s(t,n,e,i){const[r,s]=n,[o,a]=e,[h,l]=i,u=h-o,c=l-a,f=u*u+c*c,p=(r-o)*u+(s-a)*c,g=Math.min(1,Math.max(0,p/f));return t[0]=o+u*g,t[1]=a+c*g,t}function o(t,n,e,i,r,s){let o=e,a=i,h=r-o,l=s-a;if(0!==h||0!==l){const e=((t-o)*h+(n-a)*l)/(h*h+l*l);e>1?(o=r,a=s):e>0&&(o+=h*e,a+=l*e)}return h=t-o,l=n-a,h*h+l*l}function a(t,n){return function(t,n,e){const i=t[0]+e*(n[0]-t[0]),r=t[1]+e*(n[1]-t[1]);return t.length>2&&n.length>2?[i,r,t[2]+e*(n[2]-t[2])]:[i,r]}(t,n,.5)}function h(t){const n=t.length;let e=0;for(let i=0;i<n-1;++i)e+=r(t[i],t[i+1]);return e}function l(t,n=0,e=1){let i=0;const r=t.length;let s=t[0];for(let o=1;o<r;o++){const r=t[o];i+=(r[n]-s[n])*(r[e]+s[e]),s=r}if(u(t)){const r=t[0];i+=(r[n]-s[n])*(r[e]+s[e])}return i>=0}function u(t){const n=t.length;return n>0&&!(0,i.aI)(t[0],t[n-1])}function c(t){if("rings"in t)for(const n of t.rings)u(n)&&n.push(n[0].slice())}e(21325)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9536],{2272:(e,t,n)=>{n.d(t,{Dl:()=>u,gf:()=>h,jV:()=>a,lF:()=>c});var i=n(92602),s=n(70333),r=n(4718),o=n(84952),l=n(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function c(e,t,n){const i={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[s]=r.map(e=>c(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(n?.[s]);i[s]=t?e:JSON.stringify(e)}else i[s]=t?r:JSON.stringify(r);else i[s]=r}return i}async function h(e,t,r){const o=function(e,t){return e?t&&(0,l.Qc)(e)?t:(0,l.CG)(e)??s.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!s.id&&i.A.request.useIdentity&&await Promise.all([n.e(7330),n.e(4813),n.e(3747)]).then(n.bind(n,73747));const a=await s.id.getCredential(e,r);return a?.token}},6518:(e,t,n)=>{n.d(t,{F:()=>l});var i=n(44208),s=n(75503),r=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class l{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>s});var i=n(37539);function s(e,t,n,s,r,o,l=Math.floor(e.length/3)){const a=(0,i.jd)(t,r);if(null==a)return!1;if(a===i.pO){if(e===s&&n===o)return!0;const t=n+3*l;for(let i=n,r=o;i<t;i++,r++)s[r]=e[i];return!0}const u=n+3*l;for(let t=n,i=o;t<u;t+=3,i+=3)a(e,t,s,i);return!0}},14607:(e,t,n)=>{n.d(t,{B:()=>u,GP:()=>l,qg:()=>c});var i=n(799),s=n(73444);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,s.JK)()){let t=(e=e.toLowerCase())in r;if(!t){const n=e.split("-");n.length>1&&n[0]in r&&(e=n[0],t=!0),t||(e="en")}const[n,i,o="#,##0.###"]=r[e];return{decimal:n,group:i,pattern:o}}function l(e,t){const n=o((t={...t}).locale);t.customs=n;const i=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,n){const i=(n=n||{}).customs.group,s=n.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const l=a,u=o.match(l);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(l,function(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const i=t.split("."),s="string"==typeof n.places&&n.places.indexOf(",");let r=n.places;s?r=n.places.slice(s+1):+r>=0||(r=(i[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),l=o[1]||"";if(i[1]||n.places){s&&(n.places=n.places.slice(0,Math.max(0,s)));const e=void 0!==n.places?n.places:i[1]&&i[1].lastIndexOf("0")+1;+e>l.length&&(o[1]=l.padEnd(Number(e),"0")),+r<l.length&&(o[1]=l.slice(0,Math.max(0,Number(r))))}else o[1]&&o.pop();const a=i[0].replace(",","");let u=a.indexOf("0");-1!==u&&(u=a.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),a.includes("#")||(o[0]=o[0].slice(-u)));let c,h,d=i[0].lastIndexOf(",");if(-1!==d){c=i[0].length-d-1;const e=i[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(h=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-c;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",h&&(c=h,h=void 0)}return o[0]=f.reverse().join(n.group||","),o.join(n.decimal||".")}(e,u[0],{decimal:s,group:i,places:n.places,round:n.round}))}(e,i,t)}const a=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),n=e.pattern||t.pattern,s=t.group,r=t.decimal;let l=1;if(n.includes("%"))l/=100;else if(n.includes("‰"))l/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const u=n.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,t=>(t="(?:"+(0,i.Cj)(t,".")+")").replace(a,t=>{const n={signed:!1,separator:e.strict?s:[s,""],fractional:e.fractional,decimal:r,exponent:!1},i=t.split(".");let o=e.places;1===i.length&&1!==l&&(i[1]="###"),1===i.length||0===o?n.fractional=!1:(void 0===o&&(o=e.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(n.fractional=!0),!e.places&&+o<i[1].length&&(o+=","+i[1].length),n.places=o);const a=i[0].split(",");return a.length>1&&(n.groupSize=a.pop().length,a.length>1&&(n.groupSize2=a.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=h(e),n=d(e.fractional,t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n},!0);let i=t+n;return n&&(i="(?:(?:"+i+")|(?:"+n+"))"),i+d(e.exponent,t=>t?"([eE]"+h({signed:e.eSigned})+")":"")}(n)+")"}),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:s,decimal:r,factor:l}}function c(e,t){const n=u(t),i=new RegExp("^"+n.regexp+"$").exec(e);if(!i)return NaN;let s=i[1];if(!i[1]){if(!i[2])return NaN;s=i[2],n.factor*=-1}return s=s.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(s)*n.factor}function h(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,e=>e?"[-+]":"",!0)+d(e.separator,t=>{if(!t)return"(?:\\d+)";" "===(t=(0,i.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const n=e.groupSize,s=e.groupSize2;if(s){const e="(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*["+t+"]\\d{"+n+"})";return n-s>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*)"},!0)}const d=(e,t,n)=>{if(!Array.isArray(e))return t(e);const i=[];for(let n=0;n<e.length;n++)i.push(t(e[n]));return f(i.join("|"),Boolean(n))},f=(e,t)=>"("+(t?"?:":"")+e+")"},36708:(e,t,n)=>{n.d(t,{C_:()=>d,OH:()=>m,Vh:()=>g,on:()=>h,pc:()=>y,wB:()=>a,z7:()=>u});var i=n(37955),s=n(36563),r=n(97768),o=n(74887),l=n(14012);function a(e,t,n={}){return c(e,t,n,f)}function u(e,t,n={}){return c(e,t,n,p)}function c(e,t,n={},i){let s=null;const o=n.once?(e,n)=>{i(e)&&((0,r.xt)(s),t(e,n))}:(e,n)=>{i(e)&&t(e,n)};if(s=(0,l.Cn)(e,o,n.sync,n.equals),n.initial){const t=e();o(t,t)}return s}function h(e,t,n,o={}){let l=null,u=null,c=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),n(e)}const f=a(e,(e,n)=>{h(),(0,i.wb)(e)&&(l=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,s.hA)(()=>{f.remove(),h()}),c}function d(e,t){return function(e,t,n){if((0,o.G4)(n))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let l=null;function a(){l=(0,r.xt)(l)}return new Promise((i,r)=>{l=(0,s.vE)([(0,o.u7)(n,()=>{a(),r((0,o.NK)())}),c(e,e=>{a(),i(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}n(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},37539:(e,t,n)=>{n.d(t,{pO:()=>m,jd:()=>d,Tp:()=>f,w5:()=>h});var i=n(34727),s=n(83047),r=n(73941),o=n(79258);Math.PI;const l=o.$O.radius,a=o.$O.eccentricitySquared,u={a1:l*a,a2:l*a*l*a,a3:l*a*a/2,a4:l*a*l*a*2.5,a5:l*a+l*a*a/2,a6:1-a};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var c=n(21325);const h={2:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:y,11:_,2:m,4:B},5:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:y,11:_,2:m,4:B},7:{5:null,7:m,9:null,10:m,1:null,6:b,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:I,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){const s=e[t]/k,r=E-2*Math.atan(Math.exp(-e[t+1]/k)),o=k+e[t+2],l=Math.cos(r)*o;n[i]=Math.cos(s)*l,n[i+1]=Math.sin(s)*l,n[i+2]=Math.sin(r)*o},6:null,8:null,0:null,3:m,11:function(e,t,n,i){g(e,t,n,i),_(n,i,n,i)},2:g,4:function(e,t,n,i){g(e,t,n,i),B(n,i,n,i)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,i){T(e,t,n,i),S(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){T(e,t,n,i),y(n,i,n,i)},11:function(e,t,n,i){T(e,t,n,i),_(n,i,n,i)},2:T,4:m},1:{5:F,7:null,9:null,10:F,1:m,6:null,8:null,0:null,3:function(e,t,n,i){F(e,t,n,i),y(n,i,n,i)},11:function(e,t,n,i){F(e,t,n,i),_(n,i,n,i)},2:F,4:function(e,t,n,i){F(e,t,n,i),B(n,i,n,i)}},6:{5:null,7:z,9:null,10:z,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:v,10:v,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:S,6:b,8:I,0:null,3:y,11:_,2:m,4:B},11:{5:x,7:null,9:null,10:x,1:function(e,t,n,i){x(e,t,n,i),S(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){x(e,t,n,i),y(n,i,n,i)},11:m,2:x,4:function(e,t,n,i){x(e,t,n,i),B(n,i,n,i)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(A.source.spatialReference===e&&A.dest.spatialReference===t)return A;const n=p(e,A.source),i=p(t,A.dest);return 0===n&&0===i?(0,c.aI)(e,t)?A.projector=m:A.projector=null:A.projector=h[n][i],A}function p(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function m(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t])}function g(e,t,n,i){n[i]=N*(e[t]/k),n[i+1]=N*(E-2*Math.atan(Math.exp(-e[t+1]/k))),n[i+2]=e[t+2]}function y(e,t,n,s){!function(e,t,n,s,r){const o=.4999999*Math.PI,l=(0,i.qE)(R*e[t+1],-o,o),a=Math.sin(l);n[s++]=R*e[t]*r.radius,n[s++]=r.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[s]=e[t+2]}(e,t,n,s,o.$O)}function _(e,t,n,i){n[i]=e[t]*C,n[i+1]=e[t+1]*C,n[i+2]=e[t+2]}function x(e,t,n,i){n[i]=e[t]*j,n[i+1]=e[t+1]*j,n[i+2]=e[t+2]}function w(e,t,n,i,s){const r=s+e[t+2],o=R*e[t+1],l=R*e[t],a=Math.cos(o)*r;n[i]=Math.cos(l)*a,n[i+1]=Math.sin(l)*a,n[i+2]=Math.sin(o)*r}function I(e,t,n,i){w(e,t,n,i,o.Sw.radius)}function b(e,t,n,i){w(e,t,n,i,o.sH.radius)}function S(e,t,n,i){w(e,t,n,i,o.$O.radius)}function M(e,t,n,s,r){const o=e[t],l=e[t+1],a=e[t+2],u=Math.sqrt(o*o+l*l+a*a),c=(0,i.YN)(a/(0===u?1:u)),h=Math.atan2(l,o);n[s++]=N*h,n[s++]=N*c,n[s]=u-r}function v(e,t,n,i){M(e,t,n,i,o.Sw.radius)}function z(e,t,n,i){M(e,t,n,i,o.sH.radius)}function F(e,t,n,i){M(e,t,n,i,o.$O.radius)}function B(e,t,n,i){!function(e,t,n,i,s){const r=R*e[t],o=R*e[t+1],l=e[t+2],a=Math.sin(o),u=Math.cos(o),c=s.radius/Math.sqrt(1-s.eccentricitySquared*a*a);n[i++]=(c+l)*u*Math.cos(r),n[i++]=(c+l)*u*Math.sin(r),n[i++]=(c*(1-s.eccentricitySquared)+l)*a}(e,t,n,i,o.$O)}function T(e,t,n,i){const s=u,r=e[t],l=e[t+1],a=e[t+2];let c,h,d,f,p,m,g,y,_,x,w,I,b,S,M,v,z,F,B,T,A;c=Math.abs(a),h=r*r+l*l,d=Math.sqrt(h),f=h+a*a,p=Math.sqrt(f),T=Math.atan2(l,r),m=a*a/f,g=h/f,S=s.a2/p,M=s.a3-s.a4/p,g>.3?(y=c/p*(1+g*(s.a1+S+m*M)/p),B=Math.asin(y),x=y*y,_=Math.sqrt(1-x)):(_=d/p*(1-m*(s.a5-S-g*M)/p),B=Math.acos(_),x=1-_*_,y=Math.sqrt(x)),w=1-o.$O.eccentricitySquared*x,I=o.$O.radius/Math.sqrt(w),b=s.a6*I,S=d-I*_,M=c-b*y,z=_*S+y*M,v=_*M-y*S,F=v/(b/w+z),B+=F,A=z+v*F/2,a<0&&(B=-B),n[i++]=N*T,n[i++]=N*B,n[i]=A}const A={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},R=(0,i.kU)(1),N=(0,i.KJ)(1),E=.5*Math.PI,k=o.$O.radius,C=k*Math.PI/180,j=180/(k*Math.PI)},37730:(e,t,n)=>{n.d(t,{T:()=>s});var i=n(43334);const s={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},40752:(e,t,n)=>{n.r(t),n.d(t,{default:()=>H});var i=n(78888),s=n(60999),r=n(67482),o=n(49186),l=n(53966),a=n(74887),u=n(84952),c=n(98988),h=n(16930),d=n(7320),f=n(21325),p=n(28735),m=n(43334),g=n(92722),y=n(83221),_=n(31464),x=n(56390),w=n(14607),I=n(30524);function b(e,t,n){t=(0,I.rS)(t)?.toLowerCase(),n=(0,I.rS)(n)?.toLowerCase();const i=e.map(e=>e.toLowerCase()),s=t?e[i.indexOf(t)]:null,r=n?e[i.indexOf(n)]:null;return{longitudeFieldName:s||e[i.indexOf(M.find(e=>i.includes(e)))],latitudeFieldName:r||e[i.indexOf(S.find(e=>i.includes(e)))]}}const S=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],M=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],v=/^\s*"([\S\s]*)"\s*$/,z=/""/g,F=[","," ",";","|","\t"];function*B(e,t,n){let i=0;for(;i<=e.length;){const s=e.indexOf(t,i),r=e.slice(i,s>-1?s:void 0);i+=r.length+t.length,n&&!r.trim()||(yield r)}}function T(e){const t=e.includes("\r\n")?"\r\n":"\n";return B(e,t,!0)}function A(e,t){return B(e,t,!1)}function R(e,t,n){e=e.trim(),t=t?.trim();const i=[],s=Array.from(new Set([n?.delimiter,...F])).filter(e=>null!=e);for(const n of s){const s=k(e,n).length,r=k(t,n).length??s;s>1&&i.push({weight:Math.min(s,r),delimiter:n})}const r=i.sort(({weight:e},{weight:t})=>t-e).map(({delimiter:e})=>e);for(const t of r){const i=b(E(e,t).names,n?.longitudeField,n?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:t,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*N(e,t,n,i=()=>Object.create(null)){const s=T(e);s.next();let r="",o="",l=0,a=i(),u=0;e:for(const e of s){const s=A(e,n);for(const e of s)if(r+=o+e,o="",l+=C(e),l%2==0){if(l>0){const e=v.exec(r);if(!e){a=i(),u=0,r="",l=0;continue e}a[t[u]]=e[1].replaceAll(z,'"'),u++}else a[t[u]]=r,u++;r="",l=0}else o=n;0===l?(yield a,a=i(),u=0):o="\n"}}function E(e,t){const n=k(e,t).filter(e=>null!=e),i=n.map(e=>(0,I.rS)(e));for(let e=i.length-1;e>=0;e--)i[e]||(i.splice(e,1),n.splice(e,1));return{names:i,aliases:n}}function k(e,t){if(!e?.length)return[];const n=[];let i="",s="",r=0;const o=A(e,t);for(const e of o)if(i+=s+e,s="",r+=C(e),r%2==0){if(r>0){const e=v.exec(i);e&&n.push(e[1].replaceAll(z,'"'))}else n.push(i);i="",r=0}else s=t;return n}function C(e){let t=0,n=0;for(n=e.indexOf('"',n);n>=0;)t++,n=e.indexOf('"',n+1);return t}function j(e,t,n,i,s){const r=[],o=N(e,n,t),l=[];for(const e of o){if(10===l.length)break;l.push(e)}for(let e=0;e<n.length;e++){const t=n[e],o=i[e];if(t===s.longitudeFieldName||t===s.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(O(l.map(e=>e[t]))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,I._b)(e)})}}return r}function O(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map(e=>{if(""!==e){if(!t.test(e)){let t=P(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.Cq)(e)?"date":"string"}}).reduce((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0)}const P=function(){const e=(0,w.B)(),t=new RegExp("^"+e.regexp+"$"),n=new RegExp("["+e.group+"\\s\\xa0]","g"),i=e.factor;return s=>{const r=t.exec(s);if(e.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(n,"").replace(e.decimal,"."),+o*e.factor}}();function q(e){return JSON.parse(JSON.stringify(e))}var L=n(64714),Y=n(95466),X=n(54218),G=n(98623);const D=(0,L.F0)("esriGeometryPoint"),$=["csv"],Z=[0,0];class U{constructor(e,t){this.x=e,this.y=t}}class H{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[n]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),i=function(e,t){const n=t.parsingOptions||{},i={delimiter:n.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:n.latitudeField,longitudeFieldName:n.longitudeField}},s=i.layerDefinition={name:(0,u.e7)(t.url,$)||"csv",dateFieldsTimeReference:{timeZoneIANA:G.n$},drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:n.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:n.spatialReference||{wkid:4326}}},r=T(e),l=r.next().value?.trim(),a=r.next().value?.trim();if(!l)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:c,locationInfo:h}=R(l,a,n);if(!c)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:l,secondLine:a,parsingOptions:n});if(!h)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:l,secondLine:a,parsingOptions:n});i.locationInfo=h,i.delimiter=c;const{names:d,aliases:f}=E(l,c),p=j(e,i.delimiter,d,f,i.locationInfo);if(n.fields?.length){const e=new Y.A(n.fields);for(const t of p){const n=e.get(t.name);n&&Object.assign(t,n)}}if(!p.some(e=>"esriFieldTypeOID"===e.type&&(s.objectIdField=e.name,!0))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};s.objectIdField=e.name,p.unshift(e)}s.fields=p;const m=new Y.A(s.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=m.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=m.get(i.locationInfo.longitudeFieldName).name),s.timeInfo){const e=s.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(s.timeInfo=null)}return i}(n,e);this._locationInfo=i.locationInfo,this._delimiter=i.delimiter,this._queryEngine=this._createQueryEngine(i);const s=this._createFeatures(n);this._queryEngine.featureStore.addMany(s);const{fullExtent:r,timeExtent:l}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=r,l){const{start:e,end:t}=l;i.layerDefinition.timeInfo.timeExtent=[e,t]}return i}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(X.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,s.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)},e=>{this._queryEngine.featureStore.clear(),(0,a.zf)(e)||l.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:n}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:n}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:n}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const s=(0,u.An)(t);return(await(0,i.A)(s.path,{query:{...s.query,...n},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:n,extent:i,timeInfo:s}=e.layerDefinition,r=new y.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1}),o={type:"object-id",fieldName:t};return new x.do({fieldsIndex:Y.A.fromLayerJSON({fields:n,dateFieldsTimeReference:{timeZoneIANA:G.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:s,featureIdInfo:o,spatialReference:i.spatialReference||{wkid:4326},featureStore:r})}_createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:n}=this._locationInfo,{objectIdField:i,fieldsIndex:s,spatialReference:o}=this._queryEngine;let l=[];const a=[],u=s.fields.filter(e=>e.name!==i).map(e=>e.name);let y=0;const _={};for(const e of s.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,I.lD)(e);void 0!==t&&(_[e.name]=t)}const x=N(e,u,this._delimiter,(0,L.Vx)(_,i));for(const e of x){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[n]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[n]=u;for(const i in e)if(i!==t&&i!==n)if(s.isDateField(i))e[i]=(0,r._U)(e[i]);else if(s.isNumericField(i)){const t=P(e[i]);isNaN(t)?e[i]=null:e[i]=t}else null!=e[i]&&(e[i]=q(e[i]));e[i]=y,y++,l.push(new U(u,o)),a.push(e)}}if(!(0,f.aI)({wkid:4326},o))if((0,f.K8)(o))for(const e of l)[e.x,e.y]=(0,p.je)(e.x,e.y,Z);else l=(0,c.projectMany)(d.g,l,h.A.WGS84,o,null,null);const w=[];for(let e=0;e<l.length;e++){const{x:t,y:n}=l[e],s=a[e];s[i]=e+1,w.push(new m.Om(new g.A([],[t,n]),s,null,s[i]))}return w}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=P(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,_.Nk)(f.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},60999:(e,t,n)=>{n.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>c,UT:()=>m,jJ:()=>u});var i=n(31635),s=n(65008),r=n(97768),o=n(74887),l=n(10107),a=n(40608);function u(e,t,n){return(0,o.Lx)(e.map((e,i)=>t.apply(n,[e,i])))}async function c(e,t,n){return(await(0,o.Lx)(e.map((e,i)=>t.apply(n,[e,i])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function p(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function m(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,l.MZ)()],g.prototype,"value",null),(0,i.Cg)([(0,l.MZ)()],g.prototype,"error",null),(0,i.Cg)([(0,l.MZ)()],g.prototype,"finished",null),(0,i.Cg)([(0,l.MZ)()],g.prototype,"promise",void 0),(0,i.Cg)([(0,l.MZ)()],g.prototype,"_result",void 0),g=(0,i.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],g)},62815:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(83047),s=n(73941),r=n(21325);function o(e,t,n){if(null==t||null==n||n.vcsWkid||(0,r.aI)(t,n)||(0,s.xP)(t)||(0,s.xP)(n))return null;const o=(0,i.G9)(t)/(0,i.G9)(n);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},64714:(e,t,n)=>{n.d(t,{F0:()=>l,Vx:()=>c,e2:()=>d,f:()=>f});var i=n(44208),s=n(4718),r=n(99352),o=n(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${h(t)} = null;`;for(const t in e)n+=`this${h(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function h(e){return a.test(e)?`.${e}`:`["${e}"]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},66344:(e,t,n)=>{n.d(t,{q:()=>l});const i=!!(0,n(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const n=this._db.get(e.id+t);return n?.size??0}put(e,t,n,s,o){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==n&&this._notifyRemove(t,l.entry,l.size,0)),s>this._maxSize)return void this._notifyRemove(t,n,s,0);if(void 0===n)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return i||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,n,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new r(n,s,a)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,n,i){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===n){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const e=this._notifyRemove(t,n,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const n=this._db.get(t);if(n)return this._size-=n.size,e.size-=n.size,this._db.delete(t),++this._hit,n.entry;++this._miss}get(e,t){t=e.id+t;const n=this._db.get(t);if(void 0!==n)return this._db.delete(t),n.lives=n.lifetime,this._db.set(t,n),++this._hit,n.entry;++this._miss}peek(e,t){const n=this._db.get(e.id+t);return n?++this._hit:++this._miss,n?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},n=new Array;this._db.forEach((e,i)=>{const s=e.lifetime;n[s]=(n[s]||0)+e.size,this._users.forEach(n=>{const{id:s,name:r}=n;if(i.startsWith(s)){const n=t[r]||0;t[r]=n+e.size}})});const i={};this._users.forEach(e=>{const n=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[n]||0;t[n]=s,i[n]=Math.round(100*e.hitRate)+"%"}else i[n]="0%"});const s=Object.keys(t);s.sort((e,n)=>t[n]-t[e]),s.forEach(n=>e[n]=Math.round(t[n]/2**20)+"MB / "+i[n]);for(let t=n.length-1;t>=0;--t){const i=n[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,n)=>{n.startsWith(t)&&(this._size-=e.size,this._db.delete(n),this._notifyRemove(n,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,n]of this._db)t.startsWith(e.id)&&(yield n.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,n,i){const s=this._users.get(e.split(o)[0])?.removeFunc,r=s?.(t,i,n);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const n=t??this;if(n.size<=e)return;const i=t?.id;let s=!0;for(;s;){s=!1;for(const[r,l]of this._db)if(0===l.lifetime&&(!i||r.startsWith(i))){const i=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,l,i),n.size<=.9*e)return;s||=this._db.has(r)}}for(const[s,r]of this._db)if(!i||s.startsWith(i)){const i=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,r,i),n.size<=.9*e)return}}_purgeItem(e,t,n){if(this._db.delete(e),t.lives<=1){this._size-=t.size,n&&(n.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,n&&(n.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class r{constructor(e,t,n){this.entry=e,this.size=t,this.lifetime=n,this.lives=n}}const o=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,n=1){this._storage.put(this,e,t,n,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67482:(e,t,n)=>{function i(e){return null!=l(e)||null!=o(e)}function s(e){return a.test(e)}function r(e){return l(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function l(e){const t=a.exec(e);if(!t?.groups)return null;const n=t.groups,i=+n.year,s=+n.month-1,r=+n.day,o=+(n.hours??"0"),l=+(n.minutes??"0"),u=+(n.seconds??"0");if(o>23)return null;if(l>59)return null;if(u>59)return null;const c=n.ms??"0",h=c?+c.padEnd(3,"0").slice(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(i,s,r,o,l,u,h);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,s,r,o,l,u,h)}return Number.isNaN(d)?null:d}n.d(t,{Br:()=>s,Cq:()=>i,_U:()=>r});const a=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},69540:(e,t,n)=>{n.d(t,{O:()=>u,P:()=>c});var i=n(31635),s=n(65008),r=(n(44208),n(4718)),o=(n(53966),n(97768)),l=n(88620),a=n(40608);const u=e=>{const t=e;let n=class extends t{clone(e){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const n=t.metadata,i=t.store,s={},a=new Map;for(const t in n){const o=n[t],l=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==l&&0!==l&&5!==l&&4!==l)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,r.TU)(c,e),null!=c&&null==h)continue;0===l?a.set(t,h):s[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(a.size){const e=(0,l.oY)(u)?.store;if(e)for(const[t,n]of a)e.set(t,n,0)}return u}};return n=(0,i.Cg)([(0,a.$)("esri.core.Clonable")],n),n},c=u(s.A)},75503:(e,t,n)=>{n.d(t,{EC:()=>v,wq:()=>l});var i=n(4576),s=n(21818),r=(n(44208),n(15142)),o=n(11006);class l{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),b.prune(),S.prune(),M.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(x(e,n))for(I.clear();n;){for(let s=0,r=n.children.length;s<r;s++){const r=n.children[s],o=n.leaf?i(r):r;x(e,o)&&(n.leaf?t(r):_(e,o)?a(r,t):I.push(r))}n=I.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!x(e,t))return!1;for(I.clear();t;){for(let i=0,s=t.children.length;i<s;i++){const s=t.children[i],r=t.leaf?n(s):s;if(x(e,r)){if(t.leaf||_(e,r))return!0;I.push(s)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,n=this._data,r=null,o=0,l=!1;const a=this._toBBox(e);for(S.clear(),M.clear();n||S.length>0;){if(n||(n=S.pop(),r=S.data[S.length-1],o=M.pop()??0,l=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,s.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),S.push(n),this._condense(S),this;l||n.leaf||!_(n,a)?r?(o++,n=r.children[o],l=!1):n=null:(S.push(n),M.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const s=n-t+1;let r=this._maxEntries;if(s<=r){const i=new F(e.slice(t,n+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(i-1)));const o=new B([]);o.height=i;const l=Math.ceil(s/r),a=l*Math.ceil(Math.sqrt(r));w(e,t,n,a,this._compareMinX);for(let s=t;s<=n;s+=a){const t=Math.min(s+a-1,n);w(e,s,t,l,this._compareMinY);for(let n=s;n<=t;n+=l){const s=Math.min(n+l-1,t);o.children.push(this._build(e,n,s,i-1))}}return u(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,s=n?e:i(e);S.clear();const r=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,s=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],l=p(o),a=g(e,o)-l;a<s?(s=a,i=l<i?l:i,n=o):a===s&&l<i&&(i=l,n=o)}t=n||t.children[0]}return t}(s,this._data,t,S);for(r.children.push(e),h(r,s);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)h(t.data[i],e)}(s,S,t)}_split(e,t){const n=e.data[t],i=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,i);const r=this._chooseSplitIndex(n,s,i);if(!r)return;const o=n.children.splice(r,n.children.length-r),l=n.leaf?new F(o):new B(o);l.height=n.height,u(n,this._toBBox),u(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(n,l)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,s,r;i=s=1/0;for(let o=t;o<=n-t;o++){const t=c(e,0,o,this._toBBox),l=c(e,o,n,this._toBBox),a=y(t,l),u=p(t)+p(l);a<i?(i=a,r=o,s=u<s?u:s):a===i&&u<s&&(s=u,r=o)}return r}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:d,s=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,s)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const s=this._toBBox,r=c(e,0,t,s),o=c(e,n-t,n,s);let l=m(r)+m(o);for(let i=t;i<n-t;i++){const t=e.children[i];h(r,e.leaf?s(t):t),l+=m(r)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?s(t):t),l+=m(o)}return l}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const s=e.data[t-1],r=s.children;r.splice((0,i.qh)(r,n,r.length,s.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(b.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,s.zI)(e));else b.pushArray(n.children);n=b.pop()??null}}function u(e,t){c(e,0,e.children.length,t,e)}function c(e,t,n,i,s){s||(s=new F([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,o=t;o<n;o++)r=e.children[o],h(s,e.leaf?i(r):r);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,s-n)*Math.max(0,r-i)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function x(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,n,i,s){const r=[t,n];for(;r.length;){const t=r.pop(),n=r.pop();if(t-n<=i)continue;const l=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,l,n,t,s),r.push(n,l,l,t)}}const I=new r.A,b=new r.A,S=new r.A,M=new r.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class z extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends z{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends z{constructor(e){super(),this.children=e,this.leaf=!1}}},83221:(e,t,n)=>{n.d(t,{A:()=>p});var i=n(4576),s=n(49186),r=n(65529),o=n(53966),l=n(70328),a=n(19419),u=n(90708),c=n(6518),h=n(51441),d=n(37730);const f=(0,l.vt)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new c.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,s]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:s,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,l.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,a.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:r}=e;for(const e in r)n.attributes[e]=r[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,a.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},93470:(e,t,n)=>{n.d(t,{Cb:()=>r,HW:()=>c,JR:()=>s,JZ:()=>a,WR:()=>l,b6:()=>h,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],s=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},l={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},98453:(e,t,n)=>{n.d(t,{m:()=>i});const i=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},98988:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>U,getTransformation:()=>L,getTransformations:()=>Y,initializeProjection:()=>W,isEqualBaseGCS:()=>H,isLoaded:()=>R,isLoadedOrLoad:()=>N,isLoadedOrLoadFor:()=>E,load:()=>C,project:()=>j,projectExtent:()=>re,projectMany:()=>O,projectMultipoint:()=>K,projectOrLoad:()=>P,projectOrLoadMany:()=>q,projectPoint:()=>V,projectPolygon:()=>ie,projectPolyline:()=>te,projectWithZConversion:()=>Z,projectWithoutEngine:()=>J,requiresLoad:()=>k,test:()=>D,tryProjectWithZConversion:()=>$,unload:()=>G});var i=n(49186),s=n(74887),r=n(62788),o=n(95488),l=n(51850),a=n(21276),u=n(73941),c=n(5443),h=n(48526),d=n(83290),f=n(86738),p=n(39829),m=n(82799),g=n(16930),y=n(9762),_=n(37539);function x(e,t,n,i,s,r){return w[0]=e,w[1]=t,w[2]=n,(0,y.projectBuffer)(w,i,0,s,r,0)}const w=(0,l.vt)();let I=0;class b{static fromGE(e){const t=new b;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=I++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=I++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=I++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=I++}getInverse(){const e=new b;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class S{static cacheKey(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}static fromGE(e){const t=new S;let n="";for(const i of e.steps){const e=b.fromGE(i);t.steps.push(e),n+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=n,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof b?this.steps.push(t):this.steps.push(new b({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new S;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,n){this._cachedProjection[S.cacheKey(e,t)]=n}getCachedGeTransformation(e,t){let n="";for(const e of this.steps)n+=e.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const i=this._cachedProjection[S.cacheKey(e,t)];return void 0===i?null:i}}var M=n(21325),v=n(62815);let z=null,F=null,B=null,T={};const A=new o.I;function R(){return!!z&&(0,d.i)()}function N(){return!!R()||((0,r.gc)(A),C(),!1)}function E(e,t){return!e||!t||U(e,t)||N()}function k(e,t){return!U(e,t)&&!R()}function C(e){return null==B&&(B=Promise.all([(0,d.l)(),n.e(9930).then(n.bind(n,49930)).then(e=>e.g),n.e(2731).then(n.bind(n,12731))])),B.then(([,t,{hydratedAdapter:n}])=>{(0,s.Te)(e),F=n,z=t.default,z._enableProjection(d.p),A.notify()})}function j(e,t,n=null,i=null){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),O(F,e,e[0].spatialReference,t,n,i)):((0,a.f)(e),O(F,[e],e.spatialReference,t,n,i)[0])}function O(e,t,n,i,s=null,r=null){if(null==n||null==i)return t;if(U(n,i,s))return t.map(e=>J(e,n,i));if(null==s&&(0,u.jA)(n))return t.map(e=>J(e,n,g.A.WGS84)).map(e=>$(e,i));if(null==s&&(0,u.jA)(i))return t.map(e=>$(e,g.A.WGS84)).map(e=>J(e,g.A.WGS84,i));if(null==s){const e=S.cacheKey(n,i);void 0!==T[e]?s=T[e]:(null==(s=L(n,i,void 0))&&(s=new S),T[e]=s)}if(null==z||null==e)throw new X;return null!=r?z._project(e,t,n,i,s,r):z._project(e,t,n,i,s)}function P(e,t){const n=q([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function q(e,t){if(!R())for(const n of e)if(null!=n&&!(0,M.aI)(n.spatialReference,t)&&(0,M.fn)(n.spatialReference)&&(0,M.fn)(t)&&!U(n.spatialReference,t))return(0,r.gc)(A),{pending:C(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,M.aI)(e.spatialReference,t)?e:(0,M.fn)(e.spatialReference)&&(0,M.fn)(t)?$(e,t):null)}}function L(e,t,n=null){if(null==e||null==t)return null;if(null==z||null==F)throw new X;const i=z._getTransformation(F,e,t,n,n?.spatialReference);return null!==i?S.fromGE(i):null}function Y(e,t,n=null){if(null==z||null==F)throw new X;const i=z._getTransformationBySuitability(F,e,t,n,n?.spatialReference);if(null!==i){const e=[];for(const t of i)e.push(S.fromGE(t));return e}return[]}class X extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function G(){z=null,F=null,B=null,T={}}const D={get loadPromise(){return B}};function $(e,t){try{const n=j(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const i=(0,v.N)(n.type,e.spatialReference,t);return null!=i&&i(n),n}catch(e){if(!(e instanceof X))throw e;return null}}async function Z(e,t,n){const i=e.spatialReference;return null!=i&&null!=t&&await W(i,t,null,n),$(e,t)}function U(e,t,n){return!n&&(!!(0,M.aI)(e,t)||(0,M.fn)(e)&&(0,M.fn)(t)&&!!(0,_.jd)(e,t))}function H(e,t){if((0,M.aI)(e,t))return!0;if(!(0,M.fn)(e)||!(0,M.fn)(t))return!1;const n=(0,M.oT)(e)||(0,M.K8)(e)||(0,M.x1)(e),i=(0,M.oT)(t)||(0,M.K8)(t)||(0,M.x1)(t);return n&&i}async function W(e,t,n,i){if(R())return(0,s.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,geographicTransformation:s}of e)if(t&&n&&!U(t,n,s))return C(i)}else if(e&&t&&!U(e,t,n))return C(i);return(0,s.NO)(i)}function J(e,t,n){return e?"x"in e?Q(e,t,new f.A,n,0):"xmin"in e?oe(e,t,new c.A,n,0):"rings"in e?se(e,t,new p.A,n,0):"paths"in e?ne(e,t,new m.A,n,0):"points"in e?ee(e,t,new h.A,n,0):null:null}function V(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=Q(e,e.spatialReference,t,n,i)}function Q(e,t,n,i,s){ae[0]=e.x,ae[1]=e.y;const r=e.z;return ae[2]=void 0!==r?r:s,(0,y.projectBuffer)(ae,t,0,ae,i,0)?(n.x=ae[0],n.y=ae[1],n.spatialReference=i,void 0!==r||(0,u.xP)(i)?(n.z=ae[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ee(e,e.spatialReference,t,n,i)}function ee(e,t,n,i,s){const{points:r,hasZ:o,hasM:l}=e,a=[],c=r.length,h=[];for(const e of r)h.push(e[0],e[1],o?e[2]:s);if(!(0,y.projectBuffer)(h,t,0,h,i,0,c))return null;const d=o||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,n=h[t],i=h[t+1];d&&l?a.push([n,i,h[t+2],r[e][3]]):d?a.push([n,i,h[t+2]]):l?a.push([n,i,r[e][2]]):a.push([n,i])}return n.points=a,n.spatialReference=i,n.hasZ=o,n.hasM=l,n}function te(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ne(e,e.spatialReference,t,n,i)}function ne(e,t,n,i,s){const{paths:r,hasZ:o,hasM:l}=e,a=[];if(!le(r,o??!1,l??!1,t,a,i,s))return null;const c=o||(0,u.xP)(i);return n.paths=a,n.spatialReference=i,n.hasZ=c,n.hasM=l,n}function ie(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=se(e,e.spatialReference,t,n,i)}function se(e,t,n,i,s){const{rings:r,hasZ:o,hasM:l}=e,a=[];if(!le(r,o??!1,l??!1,t,a,i,s))return null;const c=o||(0,u.xP)(i);return n.rings=a,n.spatialReference=i,n.hasZ=c,n.hasM=l,n}function re(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=oe(e,e.spatialReference,t,n,i)}function oe(e,t,n,i,s){const{xmin:r,ymin:o,xmax:l,ymax:a,hasZ:c,hasM:h}=e;if(!x(r,o,c?e.zmin:s,t,ae,i))return null;const d=c||(0,u.xP)(i);return n.xmin=ae[0],n.ymin=ae[1],d&&(n.zmin=ae[2]),x(l,a,c?e.zmax:s,t,ae,i)?(n.xmax=ae[0],n.ymax=ae[1],d&&(n.zmax=ae[2]),h&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function le(e,t,n,i,s,r,o=0){const l=new Array;for(const n of e)for(const e of n)l.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(l,i,0,l,r,0))return!1;let a=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const i of t)c&&n?e.push([l[a++],l[a++],l[a++],i[3]]):c?e.push([l[a++],l[a++],l[a++]]):n?(e.push([l[a++],l[a++],i[2]]),a++):(e.push([l[a++],l[a++]]),a++);s.push(e)}return!0}const ae=(0,l.vt)()}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3909],{2272:(e,t,n)=>{n.d(t,{Dl:()=>u,gf:()=>h,jV:()=>a,lF:()=>c});var i=n(92602),s=n(70333),r=n(4718),o=n(84952),l=n(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function c(e,t,n){const i={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[s]=r.map(e=>c(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(n?.[s]);i[s]=t?e:JSON.stringify(e)}else i[s]=t?r:JSON.stringify(r);else i[s]=r}return i}async function h(e,t,r){const o=function(e,t){return e?t&&(0,l.Qc)(e)?t:(0,l.CG)(e)??s.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!s.id&&i.A.request.useIdentity&&await Promise.all([n.e(7330),n.e(4813),n.e(3747)]).then(n.bind(n,73747));const a=await s.id.getCredential(e,r);return a?.token}},6518:(e,t,n)=>{n.d(t,{F:()=>l});var i=n(44208),s=n(75503),r=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class l{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>s});var i=n(37539);function s(e,t,n,s,r,o,l=Math.floor(e.length/3)){const a=(0,i.jd)(t,r);if(null==a)return!1;if(a===i.pO){if(e===s&&n===o)return!0;const t=n+3*l;for(let i=n,r=o;i<t;i++,r++)s[r]=e[i];return!0}const u=n+3*l;for(let t=n,i=o;t<u;t+=3,i+=3)a(e,t,s,i);return!0}},14607:(e,t,n)=>{n.d(t,{B:()=>u,GP:()=>l,qg:()=>c});var i=n(799),s=n(73444);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,s.JK)()){let t=(e=e.toLowerCase())in r;if(!t){const n=e.split("-");n.length>1&&n[0]in r&&(e=n[0],t=!0),t||(e="en")}const[n,i,o="#,##0.###"]=r[e];return{decimal:n,group:i,pattern:o}}function l(e,t){const n=o((t={...t}).locale);t.customs=n;const i=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,n){const i=(n=n||{}).customs.group,s=n.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const l=a,u=o.match(l);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(l,function(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const i=t.split("."),s="string"==typeof n.places&&n.places.indexOf(",");let r=n.places;s?r=n.places.slice(s+1):+r>=0||(r=(i[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),l=o[1]||"";if(i[1]||n.places){s&&(n.places=n.places.slice(0,Math.max(0,s)));const e=void 0!==n.places?n.places:i[1]&&i[1].lastIndexOf("0")+1;+e>l.length&&(o[1]=l.padEnd(Number(e),"0")),+r<l.length&&(o[1]=l.slice(0,Math.max(0,Number(r))))}else o[1]&&o.pop();const a=i[0].replace(",","");let u=a.indexOf("0");-1!==u&&(u=a.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),a.includes("#")||(o[0]=o[0].slice(-u)));let c,h,d=i[0].lastIndexOf(",");if(-1!==d){c=i[0].length-d-1;const e=i[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(h=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-c;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",h&&(c=h,h=void 0)}return o[0]=f.reverse().join(n.group||","),o.join(n.decimal||".")}(e,u[0],{decimal:s,group:i,places:n.places,round:n.round}))}(e,i,t)}const a=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),n=e.pattern||t.pattern,s=t.group,r=t.decimal;let l=1;if(n.includes("%"))l/=100;else if(n.includes("‰"))l/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const u=n.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,t=>(t="(?:"+(0,i.Cj)(t,".")+")").replace(a,t=>{const n={signed:!1,separator:e.strict?s:[s,""],fractional:e.fractional,decimal:r,exponent:!1},i=t.split(".");let o=e.places;1===i.length&&1!==l&&(i[1]="###"),1===i.length||0===o?n.fractional=!1:(void 0===o&&(o=e.pattern?i[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(n.fractional=!0),!e.places&&+o<i[1].length&&(o+=","+i[1].length),n.places=o);const a=i[0].split(",");return a.length>1&&(n.groupSize=a.pop().length,a.length>1&&(n.groupSize2=a.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=h(e),n=d(e.fractional,t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n},!0);let i=t+n;return n&&(i="(?:(?:"+i+")|(?:"+n+"))"),i+d(e.exponent,t=>t?"([eE]"+h({signed:e.eSigned})+")":"")}(n)+")"}),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:s,decimal:r,factor:l}}function c(e,t){const n=u(t),i=new RegExp("^"+n.regexp+"$").exec(e);if(!i)return NaN;let s=i[1];if(!i[1]){if(!i[2])return NaN;s=i[2],n.factor*=-1}return s=s.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(s)*n.factor}function h(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,e=>e?"[-+]":"",!0)+d(e.separator,t=>{if(!t)return"(?:\\d+)";" "===(t=(0,i.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const n=e.groupSize,s=e.groupSize2;if(s){const e="(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*["+t+"]\\d{"+n+"})";return n-s>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*)"},!0)}const d=(e,t,n)=>{if(!Array.isArray(e))return t(e);const i=[];for(let n=0;n<e.length;n++)i.push(t(e[n]));return f(i.join("|"),Boolean(n))},f=(e,t)=>"("+(t?"?:":"")+e+")"},36708:(e,t,n)=>{n.d(t,{C_:()=>d,OH:()=>m,Vh:()=>g,on:()=>h,pc:()=>y,wB:()=>a,z7:()=>u});var i=n(37955),s=n(36563),r=n(97768),o=n(74887),l=n(14012);function a(e,t,n={}){return c(e,t,n,f)}function u(e,t,n={}){return c(e,t,n,p)}function c(e,t,n={},i){let s=null;const o=n.once?(e,n)=>{i(e)&&((0,r.xt)(s),t(e,n))}:(e,n)=>{i(e)&&t(e,n)};if(s=(0,l.Cn)(e,o,n.sync,n.equals),n.initial){const t=e();o(t,t)}return s}function h(e,t,n,o={}){let l=null,u=null,c=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),n(e)}const f=a(e,(e,n)=>{h(),(0,i.wb)(e)&&(l=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,s.hA)(()=>{f.remove(),h()}),c}function d(e,t){return function(e,t,n){if((0,o.G4)(n))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let l=null;function a(){l=(0,r.xt)(l)}return new Promise((i,r)=>{l=(0,s.vE)([(0,o.u7)(n,()=>{a(),r((0,o.NK)())}),c(e,e=>{a(),i(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}n(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},37539:(e,t,n)=>{n.d(t,{pO:()=>m,jd:()=>d,Tp:()=>f,w5:()=>h});var i=n(34727),s=n(83047),r=n(73941),o=n(79258);Math.PI;const l=o.$O.radius,a=o.$O.eccentricitySquared,u={a1:l*a,a2:l*a*l*a,a3:l*a*a/2,a4:l*a*l*a*2.5,a5:l*a+l*a*a/2,a6:1-a};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var c=n(21325);const h={2:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:y,11:_,2:m,4:B},5:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:y,11:_,2:m,4:B},7:{5:null,7:m,9:null,10:m,1:null,6:b,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:I,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){const s=e[t]/k,r=E-2*Math.atan(Math.exp(-e[t+1]/k)),o=k+e[t+2],l=Math.cos(r)*o;n[i]=Math.cos(s)*l,n[i+1]=Math.sin(s)*l,n[i+2]=Math.sin(r)*o},6:null,8:null,0:null,3:m,11:function(e,t,n,i){g(e,t,n,i),_(n,i,n,i)},2:g,4:function(e,t,n,i){g(e,t,n,i),B(n,i,n,i)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,i){T(e,t,n,i),S(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){T(e,t,n,i),y(n,i,n,i)},11:function(e,t,n,i){T(e,t,n,i),_(n,i,n,i)},2:T,4:m},1:{5:z,7:null,9:null,10:z,1:m,6:null,8:null,0:null,3:function(e,t,n,i){z(e,t,n,i),y(n,i,n,i)},11:function(e,t,n,i){z(e,t,n,i),_(n,i,n,i)},2:z,4:function(e,t,n,i){z(e,t,n,i),B(n,i,n,i)}},6:{5:null,7:F,9:null,10:F,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:v,10:v,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:S,6:b,8:I,0:null,3:y,11:_,2:m,4:B},11:{5:x,7:null,9:null,10:x,1:function(e,t,n,i){x(e,t,n,i),S(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){x(e,t,n,i),y(n,i,n,i)},11:m,2:x,4:function(e,t,n,i){x(e,t,n,i),B(n,i,n,i)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(A.source.spatialReference===e&&A.dest.spatialReference===t)return A;const n=p(e,A.source),i=p(t,A.dest);return 0===n&&0===i?(0,c.aI)(e,t)?A.projector=m:A.projector=null:A.projector=h[n][i],A}function p(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function m(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t])}function g(e,t,n,i){n[i]=N*(e[t]/k),n[i+1]=N*(E-2*Math.atan(Math.exp(-e[t+1]/k))),n[i+2]=e[t+2]}function y(e,t,n,s){!function(e,t,n,s,r){const o=.4999999*Math.PI,l=(0,i.qE)(R*e[t+1],-o,o),a=Math.sin(l);n[s++]=R*e[t]*r.radius,n[s++]=r.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[s]=e[t+2]}(e,t,n,s,o.$O)}function _(e,t,n,i){n[i]=e[t]*C,n[i+1]=e[t+1]*C,n[i+2]=e[t+2]}function x(e,t,n,i){n[i]=e[t]*j,n[i+1]=e[t+1]*j,n[i+2]=e[t+2]}function w(e,t,n,i,s){const r=s+e[t+2],o=R*e[t+1],l=R*e[t],a=Math.cos(o)*r;n[i]=Math.cos(l)*a,n[i+1]=Math.sin(l)*a,n[i+2]=Math.sin(o)*r}function I(e,t,n,i){w(e,t,n,i,o.Sw.radius)}function b(e,t,n,i){w(e,t,n,i,o.sH.radius)}function S(e,t,n,i){w(e,t,n,i,o.$O.radius)}function M(e,t,n,s,r){const o=e[t],l=e[t+1],a=e[t+2],u=Math.sqrt(o*o+l*l+a*a),c=(0,i.YN)(a/(0===u?1:u)),h=Math.atan2(l,o);n[s++]=N*h,n[s++]=N*c,n[s]=u-r}function v(e,t,n,i){M(e,t,n,i,o.Sw.radius)}function F(e,t,n,i){M(e,t,n,i,o.sH.radius)}function z(e,t,n,i){M(e,t,n,i,o.$O.radius)}function B(e,t,n,i){!function(e,t,n,i,s){const r=R*e[t],o=R*e[t+1],l=e[t+2],a=Math.sin(o),u=Math.cos(o),c=s.radius/Math.sqrt(1-s.eccentricitySquared*a*a);n[i++]=(c+l)*u*Math.cos(r),n[i++]=(c+l)*u*Math.sin(r),n[i++]=(c*(1-s.eccentricitySquared)+l)*a}(e,t,n,i,o.$O)}function T(e,t,n,i){const s=u,r=e[t],l=e[t+1],a=e[t+2];let c,h,d,f,p,m,g,y,_,x,w,I,b,S,M,v,F,z,B,T,A;c=Math.abs(a),h=r*r+l*l,d=Math.sqrt(h),f=h+a*a,p=Math.sqrt(f),T=Math.atan2(l,r),m=a*a/f,g=h/f,S=s.a2/p,M=s.a3-s.a4/p,g>.3?(y=c/p*(1+g*(s.a1+S+m*M)/p),B=Math.asin(y),x=y*y,_=Math.sqrt(1-x)):(_=d/p*(1-m*(s.a5-S-g*M)/p),B=Math.acos(_),x=1-_*_,y=Math.sqrt(x)),w=1-o.$O.eccentricitySquared*x,I=o.$O.radius/Math.sqrt(w),b=s.a6*I,S=d-I*_,M=c-b*y,F=_*S+y*M,v=_*M-y*S,z=v/(b/w+F),B+=z,A=F+v*z/2,a<0&&(B=-B),n[i++]=N*T,n[i++]=N*B,n[i]=A}const A={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},R=(0,i.kU)(1),N=(0,i.KJ)(1),E=.5*Math.PI,k=o.$O.radius,C=k*Math.PI/180,j=180/(k*Math.PI)},37730:(e,t,n)=>{n.d(t,{T:()=>s});var i=n(43334);const s={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},40752:(e,t,n)=>{n.r(t),n.d(t,{default:()=>H});var i=n(78888),s=n(60999),r=n(67482),o=n(49186),l=n(53966),a=n(74887),u=n(84952),c=n(98988),h=n(16930),d=n(7320),f=n(21325),p=n(28735),m=n(43334),g=n(92722),y=n(83221),_=n(31464),x=n(56390),w=n(14607),I=n(30524);function b(e,t,n){t=(0,I.rS)(t)?.toLowerCase(),n=(0,I.rS)(n)?.toLowerCase();const i=e.map(e=>e.toLowerCase()),s=t?e[i.indexOf(t)]:null,r=n?e[i.indexOf(n)]:null;return{longitudeFieldName:s||e[i.indexOf(M.find(e=>i.includes(e)))],latitudeFieldName:r||e[i.indexOf(S.find(e=>i.includes(e)))]}}const S=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],M=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],v=/^\s*"([\S\s]*)"\s*$/,F=/""/g,z=[","," ",";","|","\t"];function*B(e,t,n){let i=0;for(;i<=e.length;){const s=e.indexOf(t,i),r=e.slice(i,s>-1?s:void 0);i+=r.length+t.length,n&&!r.trim()||(yield r)}}function T(e){const t=e.includes("\r\n")?"\r\n":"\n";return B(e,t,!0)}function A(e,t){return B(e,t,!1)}function R(e,t,n){e=e.trim(),t=t?.trim();const i=[],s=Array.from(new Set([n?.delimiter,...z])).filter(e=>null!=e);for(const n of s){const s=k(e,n).length,r=k(t,n).length??s;s>1&&i.push({weight:Math.min(s,r),delimiter:n})}const r=i.sort(({weight:e},{weight:t})=>t-e).map(({delimiter:e})=>e);for(const t of r){const i=b(E(e,t).names,n?.longitudeField,n?.latitudeField);if(i.longitudeFieldName&&i.latitudeFieldName)return{delimiter:t,locationInfo:i}}return{delimiter:r[0],locationInfo:null}}function*N(e,t,n,i=()=>Object.create(null)){const s=T(e);s.next();let r="",o="",l=0,a=i(),u=0;e:for(const e of s){const s=A(e,n);for(const e of s)if(r+=o+e,o="",l+=C(e),l%2==0){if(l>0){const e=v.exec(r);if(!e){a=i(),u=0,r="",l=0;continue e}a[t[u]]=e[1].replaceAll(F,'"'),u++}else a[t[u]]=r,u++;r="",l=0}else o=n;0===l?(yield a,a=i(),u=0):o="\n"}}function E(e,t){const n=k(e,t).filter(e=>null!=e),i=n.map(e=>(0,I.rS)(e));for(let e=i.length-1;e>=0;e--)i[e]||(i.splice(e,1),n.splice(e,1));return{names:i,aliases:n}}function k(e,t){if(!e?.length)return[];const n=[];let i="",s="",r=0;const o=A(e,t);for(const e of o)if(i+=s+e,s="",r+=C(e),r%2==0){if(r>0){const e=v.exec(i);e&&n.push(e[1].replaceAll(F,'"'))}else n.push(i);i="",r=0}else s=t;return n}function C(e){let t=0,n=0;for(n=e.indexOf('"',n);n>=0;)t++,n=e.indexOf('"',n+1);return t}function j(e,t,n,i,s){const r=[],o=N(e,n,t),l=[];for(const e of o){if(10===l.length)break;l.push(e)}for(let e=0;e<n.length;e++){const t=n[e],o=i[e];if(t===s.longitudeFieldName||t===s.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(O(l.map(e=>e[t]))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,I._b)(e)})}}return r}function O(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map(e=>{if(""!==e){if(!t.test(e)){let t=q(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.Cq)(e)?"date":"string"}}).reduce((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0)}const q=function(){const e=(0,w.B)(),t=new RegExp("^"+e.regexp+"$"),n=new RegExp("["+e.group+"\\s\\xa0]","g"),i=e.factor;return s=>{const r=t.exec(s);if(e.factor=i,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(n,"").replace(e.decimal,"."),+o*e.factor}}();function P(e){return JSON.parse(JSON.stringify(e))}var L=n(64714),Y=n(95466),X=n(54218),G=n(98623);const D=(0,L.F0)("esriGeometryPoint"),$=["csv"],Z=[0,0];class U{constructor(e,t){this.x=e,this.y=t}}class H{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[n]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),i=function(e,t){const n=t.parsingOptions||{},i={delimiter:n.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:n.latitudeField,longitudeFieldName:n.longitudeField}},s=i.layerDefinition={name:(0,u.e7)(t.url,$)||"csv",dateFieldsTimeReference:{timeZoneIANA:G.n$},drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:n.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:n.spatialReference||{wkid:4326}}},r=T(e),l=r.next().value?.trim(),a=r.next().value?.trim();if(!l)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:c,locationInfo:h}=R(l,a,n);if(!c)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:l,secondLine:a,parsingOptions:n});if(!h)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:l,secondLine:a,parsingOptions:n});i.locationInfo=h,i.delimiter=c;const{names:d,aliases:f}=E(l,c),p=j(e,i.delimiter,d,f,i.locationInfo);if(n.fields?.length){const e=new Y.A(n.fields);for(const t of p){const n=e.get(t.name);n&&Object.assign(t,n)}}if(!p.some(e=>"esriFieldTypeOID"===e.type&&(s.objectIdField=e.name,!0))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};s.objectIdField=e.name,p.unshift(e)}s.fields=p;const m=new Y.A(s.fields);if(i.locationInfo&&(i.locationInfo.latitudeFieldName=m.get(i.locationInfo.latitudeFieldName).name,i.locationInfo.longitudeFieldName=m.get(i.locationInfo.longitudeFieldName).name),s.timeInfo){const e=s.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(s.timeInfo=null)}return i}(n,e);this._locationInfo=i.locationInfo,this._delimiter=i.delimiter,this._queryEngine=this._createQueryEngine(i);const s=this._createFeatures(n);this._queryEngine.featureStore.addMany(s);const{fullExtent:r,timeExtent:l}=await this._queryEngine.fetchRecomputedExtents();if(i.layerDefinition.extent=r,l){const{start:e,end:t}=l;i.layerDefinition.timeInfo.timeExtent=[e,t]}return i}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(X.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,s.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)},e=>{this._queryEngine.featureStore.clear(),(0,a.zf)(e)||l.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:n}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:n}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:n}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const s=(0,u.An)(t);return(await(0,i.A)(s.path,{query:{...s.query,...n},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:n,extent:i,timeInfo:s}=e.layerDefinition,r=new y.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1}),o={type:"object-id",fieldName:t};return new x.do({fieldsIndex:Y.A.fromLayerJSON({fields:n,dateFieldsTimeReference:{timeZoneIANA:G.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:s,featureIdInfo:o,spatialReference:i.spatialReference||{wkid:4326},featureStore:r})}_createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:n}=this._locationInfo,{objectIdField:i,fieldsIndex:s,spatialReference:o}=this._queryEngine;let l=[];const a=[],u=s.fields.filter(e=>e.name!==i).map(e=>e.name);let y=0;const _={};for(const e of s.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,I.lD)(e);void 0!==t&&(_[e.name]=t)}const x=N(e,u,this._delimiter,(0,L.Vx)(_,i));for(const e of x){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[n]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[n]=u;for(const i in e)if(i!==t&&i!==n)if(s.isDateField(i))e[i]=(0,r._U)(e[i]);else if(s.isNumericField(i)){const t=q(e[i]);isNaN(t)?e[i]=null:e[i]=t}else null!=e[i]&&(e[i]=P(e[i]));e[i]=y,y++,l.push(new U(u,o)),a.push(e)}}if(!(0,f.aI)({wkid:4326},o))if((0,f.K8)(o))for(const e of l)[e.x,e.y]=(0,p.je)(e.x,e.y,Z);else l=(0,c.projectMany)(d.g,l,h.A.WGS84,o,null,null);const w=[];for(let e=0;e<l.length;e++){const{x:t,y:n}=l[e],s=a[e];s[i]=e+1,w.push(new m.Om(new g.A([],[t,n]),s,null,s[i]))}return w}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=q(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,_.Nk)(f.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},60999:(e,t,n)=>{n.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>c,UT:()=>m,jJ:()=>u});var i=n(31635),s=n(65008),r=n(97768),o=n(74887),l=n(10107),a=n(40608);function u(e,t,n){return(0,o.Lx)(e.map((e,i)=>t.apply(n,[e,i])))}async function c(e,t,n){return(await(0,o.Lx)(e.map((e,i)=>t.apply(n,[e,i])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function p(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function m(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,l.MZ)()],g.prototype,"value",null),(0,i.Cg)([(0,l.MZ)()],g.prototype,"error",null),(0,i.Cg)([(0,l.MZ)()],g.prototype,"finished",null),(0,i.Cg)([(0,l.MZ)()],g.prototype,"promise",void 0),(0,i.Cg)([(0,l.MZ)()],g.prototype,"_result",void 0),g=(0,i.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],g)},62815:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(83047),s=n(73941),r=n(21325);function o(e,t,n){if(null==t||null==n||n.vcsWkid||(0,r.aI)(t,n)||(0,s.xP)(t)||(0,s.xP)(n))return null;const o=(0,i.G9)(t)/(0,i.G9)(n);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},64714:(e,t,n)=>{n.d(t,{F0:()=>l,Vx:()=>c,e2:()=>d,f:()=>f});var i=n(44208),s=n(4718),r=n(99352),o=n(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${h(t)} = null;`;for(const t in e)n+=`this${h(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function h(e){return a.test(e)?`.${e}`:`["${e}"]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},66344:(e,t,n)=>{n.d(t,{q:()=>l});const i=!!(0,n(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const n=this._db.get(e.id+t);return n?.size??0}put(e,t,n,s,o){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==n&&this._notifyRemove(t,l.entry,l.size,0)),s>this._maxSize)return void this._notifyRemove(t,n,s,0);if(void 0===n)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return i||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,n,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new r(n,s,a)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,n,i){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===n){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const e=this._notifyRemove(t,n,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const n=this._db.get(t);if(n)return this._size-=n.size,e.size-=n.size,this._db.delete(t),++this._hit,n.entry;++this._miss}get(e,t){t=e.id+t;const n=this._db.get(t);if(void 0!==n)return this._db.delete(t),n.lives=n.lifetime,this._db.set(t,n),++this._hit,n.entry;++this._miss}peek(e,t){const n=this._db.get(e.id+t);return n?++this._hit:++this._miss,n?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},n=new Array;this._db.forEach((e,i)=>{const s=e.lifetime;n[s]=(n[s]||0)+e.size,this._users.forEach(n=>{const{id:s,name:r}=n;if(i.startsWith(s)){const n=t[r]||0;t[r]=n+e.size}})});const i={};this._users.forEach(e=>{const n=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[n]||0;t[n]=s,i[n]=Math.round(100*e.hitRate)+"%"}else i[n]="0%"});const s=Object.keys(t);s.sort((e,n)=>t[n]-t[e]),s.forEach(n=>e[n]=Math.round(t[n]/2**20)+"MB / "+i[n]);for(let t=n.length-1;t>=0;--t){const i=n[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,n)=>{n.startsWith(t)&&(this._size-=e.size,this._db.delete(n),this._notifyRemove(n,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,n]of this._db)t.startsWith(e.id)&&(yield n.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,n,i){const s=this._users.get(e.split(o)[0])?.removeFunc,r=s?.(t,i,n);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const n=t??this;if(n.size<=e)return;const i=t?.id;let s=!0;for(;s;){s=!1;for(const[r,l]of this._db)if(0===l.lifetime&&(!i||r.startsWith(i))){const i=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,l,i),n.size<=.9*e)return;s||=this._db.has(r)}}for(const[s,r]of this._db)if(!i||s.startsWith(i)){const i=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,r,i),n.size<=.9*e)return}}_purgeItem(e,t,n){if(this._db.delete(e),t.lives<=1){this._size-=t.size,n&&(n.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,n&&(n.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class r{constructor(e,t,n){this.entry=e,this.size=t,this.lifetime=n,this.lives=n}}const o=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,n=1){this._storage.put(this,e,t,n,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67482:(e,t,n)=>{function i(e){return null!=l(e)||null!=o(e)}function s(e){return a.test(e)}function r(e){return l(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function l(e){const t=a.exec(e);if(!t?.groups)return null;const n=t.groups,i=+n.year,s=+n.month-1,r=+n.day,o=+(n.hours??"0"),l=+(n.minutes??"0"),u=+(n.seconds??"0");if(o>23)return null;if(l>59)return null;if(u>59)return null;const c=n.ms??"0",h=c?+c.padEnd(3,"0").slice(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(i,s,r,o,l,u,h);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,s,r,o,l,u,h)}return Number.isNaN(d)?null:d}n.d(t,{Br:()=>s,Cq:()=>i,_U:()=>r});const a=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},75503:(e,t,n)=>{n.d(t,{EC:()=>v,wq:()=>l});var i=n(4576),s=n(21818),r=(n(44208),n(15142)),o=n(11006);class l{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),b.prune(),S.prune(),M.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(x(e,n))for(I.clear();n;){for(let s=0,r=n.children.length;s<r;s++){const r=n.children[s],o=n.leaf?i(r):r;x(e,o)&&(n.leaf?t(r):_(e,o)?a(r,t):I.push(r))}n=I.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!x(e,t))return!1;for(I.clear();t;){for(let i=0,s=t.children.length;i<s;i++){const s=t.children[i],r=t.leaf?n(s):s;if(x(e,r)){if(t.leaf||_(e,r))return!0;I.push(s)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new z([]),this}remove(e){if(!e)return this;let t,n=this._data,r=null,o=0,l=!1;const a=this._toBBox(e);for(S.clear(),M.clear();n||S.length>0;){if(n||(n=S.pop(),r=S.data[S.length-1],o=M.pop()??0,l=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,s.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),S.push(n),this._condense(S),this;l||n.leaf||!_(n,a)?r?(o++,n=r.children[o],l=!1):n=null:(S.push(n),M.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const s=n-t+1;let r=this._maxEntries;if(s<=r){const i=new z(e.slice(t,n+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(i-1)));const o=new B([]);o.height=i;const l=Math.ceil(s/r),a=l*Math.ceil(Math.sqrt(r));w(e,t,n,a,this._compareMinX);for(let s=t;s<=n;s+=a){const t=Math.min(s+a-1,n);w(e,s,t,l,this._compareMinY);for(let n=s;n<=t;n+=l){const s=Math.min(n+l-1,t);o.children.push(this._build(e,n,s,i-1))}}return u(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,s=n?e:i(e);S.clear();const r=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,s=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],l=p(o),a=g(e,o)-l;a<s?(s=a,i=l<i?l:i,n=o):a===s&&l<i&&(i=l,n=o)}t=n||t.children[0]}return t}(s,this._data,t,S);for(r.children.push(e),h(r,s);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)h(t.data[i],e)}(s,S,t)}_split(e,t){const n=e.data[t],i=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,i);const r=this._chooseSplitIndex(n,s,i);if(!r)return;const o=n.children.splice(r,n.children.length-r),l=n.leaf?new z(o):new B(o);l.height=n.height,u(n,this._toBBox),u(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(n,l)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,s,r;i=s=1/0;for(let o=t;o<=n-t;o++){const t=c(e,0,o,this._toBBox),l=c(e,o,n,this._toBBox),a=y(t,l),u=p(t)+p(l);a<i?(i=a,r=o,s=u<s?u:s):a===i&&u<s&&(s=u,r=o)}return r}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:d,s=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,s)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const s=this._toBBox,r=c(e,0,t,s),o=c(e,n-t,n,s);let l=m(r)+m(o);for(let i=t;i<n-t;i++){const t=e.children[i];h(r,e.leaf?s(t):t),l+=m(r)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?s(t):t),l+=m(o)}return l}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const s=e.data[t-1],r=s.children;r.splice((0,i.qh)(r,n,r.length,s.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(b.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,s.zI)(e));else b.pushArray(n.children);n=b.pop()??null}}function u(e,t){c(e,0,e.children.length,t,e)}function c(e,t,n,i,s){s||(s=new z([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,o=t;o<n;o++)r=e.children[o],h(s,e.leaf?i(r):r);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,s-n)*Math.max(0,r-i)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function x(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,n,i,s){const r=[t,n];for(;r.length;){const t=r.pop(),n=r.pop();if(t-n<=i)continue;const l=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,l,n,t,s),r.push(n,l,l,t)}}const I=new r.A,b=new r.A,S=new r.A,M=new r.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class F extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class z extends F{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends F{constructor(e){super(),this.children=e,this.leaf=!1}}},83221:(e,t,n)=>{n.d(t,{A:()=>p});var i=n(4576),s=n(49186),r=n(65529),o=n(53966),l=n(70328),a=n(19419),u=n(90708),c=n(6518),h=n(51441),d=n(37730);const f=(0,l.vt)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new c.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,s]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:s,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,l.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,a.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:r}=e;for(const e in r)n.attributes[e]=r[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,a.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},93470:(e,t,n)=>{n.d(t,{Cb:()=>r,HW:()=>c,JR:()=>s,JZ:()=>a,WR:()=>l,b6:()=>h,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],s=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},l={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},98453:(e,t,n)=>{n.d(t,{m:()=>i});const i=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},98988:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>U,getTransformation:()=>L,getTransformations:()=>Y,initializeProjection:()=>W,isEqualBaseGCS:()=>H,isLoaded:()=>R,isLoadedOrLoad:()=>N,isLoadedOrLoadFor:()=>E,load:()=>C,project:()=>j,projectExtent:()=>re,projectMany:()=>O,projectMultipoint:()=>K,projectOrLoad:()=>q,projectOrLoadMany:()=>P,projectPoint:()=>V,projectPolygon:()=>ie,projectPolyline:()=>te,projectWithZConversion:()=>Z,projectWithoutEngine:()=>J,requiresLoad:()=>k,test:()=>D,tryProjectWithZConversion:()=>$,unload:()=>G});var i=n(49186),s=n(74887),r=n(62788),o=n(95488),l=n(51850),a=n(21276),u=n(73941),c=n(5443),h=n(48526),d=n(83290),f=n(86738),p=n(39829),m=n(82799),g=n(16930),y=n(9762),_=n(37539);function x(e,t,n,i,s,r){return w[0]=e,w[1]=t,w[2]=n,(0,y.projectBuffer)(w,i,0,s,r,0)}const w=(0,l.vt)();let I=0;class b{static fromGE(e){const t=new b;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=I++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=I++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=I++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=I++}getInverse(){const e=new b;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class S{static cacheKey(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}static fromGE(e){const t=new S;let n="";for(const i of e.steps){const e=b.fromGE(i);t.steps.push(e),n+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=n,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof b?this.steps.push(t):this.steps.push(new b({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new S;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,n){this._cachedProjection[S.cacheKey(e,t)]=n}getCachedGeTransformation(e,t){let n="";for(const e of this.steps)n+=e.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const i=this._cachedProjection[S.cacheKey(e,t)];return void 0===i?null:i}}var M=n(21325),v=n(62815);let F=null,z=null,B=null,T={};const A=new o.I;function R(){return!!F&&(0,d.i)()}function N(){return!!R()||((0,r.gc)(A),C(),!1)}function E(e,t){return!e||!t||U(e,t)||N()}function k(e,t){return!U(e,t)&&!R()}function C(e){return null==B&&(B=Promise.all([(0,d.l)(),n.e(9930).then(n.bind(n,49930)).then(e=>e.g),n.e(2731).then(n.bind(n,12731))])),B.then(([,t,{hydratedAdapter:n}])=>{(0,s.Te)(e),z=n,F=t.default,F._enableProjection(d.p),A.notify()})}function j(e,t,n=null,i=null){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),O(z,e,e[0].spatialReference,t,n,i)):((0,a.f)(e),O(z,[e],e.spatialReference,t,n,i)[0])}function O(e,t,n,i,s=null,r=null){if(null==n||null==i)return t;if(U(n,i,s))return t.map(e=>J(e,n,i));if(null==s&&(0,u.jA)(n))return t.map(e=>J(e,n,g.A.WGS84)).map(e=>$(e,i));if(null==s&&(0,u.jA)(i))return t.map(e=>$(e,g.A.WGS84)).map(e=>J(e,g.A.WGS84,i));if(null==s){const e=S.cacheKey(n,i);void 0!==T[e]?s=T[e]:(null==(s=L(n,i,void 0))&&(s=new S),T[e]=s)}if(null==F||null==e)throw new X;return null!=r?F._project(e,t,n,i,s,r):F._project(e,t,n,i,s)}function q(e,t){const n=P([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function P(e,t){if(!R())for(const n of e)if(null!=n&&!(0,M.aI)(n.spatialReference,t)&&(0,M.fn)(n.spatialReference)&&(0,M.fn)(t)&&!U(n.spatialReference,t))return(0,r.gc)(A),{pending:C(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,M.aI)(e.spatialReference,t)?e:(0,M.fn)(e.spatialReference)&&(0,M.fn)(t)?$(e,t):null)}}function L(e,t,n=null){if(null==e||null==t)return null;if(null==F||null==z)throw new X;const i=F._getTransformation(z,e,t,n,n?.spatialReference);return null!==i?S.fromGE(i):null}function Y(e,t,n=null){if(null==F||null==z)throw new X;const i=F._getTransformationBySuitability(z,e,t,n,n?.spatialReference);if(null!==i){const e=[];for(const t of i)e.push(S.fromGE(t));return e}return[]}class X extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function G(){F=null,z=null,B=null,T={}}const D={get loadPromise(){return B}};function $(e,t){try{const n=j(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const i=(0,v.N)(n.type,e.spatialReference,t);return null!=i&&i(n),n}catch(e){if(!(e instanceof X))throw e;return null}}async function Z(e,t,n){const i=e.spatialReference;return null!=i&&null!=t&&await W(i,t,null,n),$(e,t)}function U(e,t,n){return!n&&(!!(0,M.aI)(e,t)||(0,M.fn)(e)&&(0,M.fn)(t)&&!!(0,_.jd)(e,t))}function H(e,t){if((0,M.aI)(e,t))return!0;if(!(0,M.fn)(e)||!(0,M.fn)(t))return!1;const n=(0,M.oT)(e)||(0,M.K8)(e)||(0,M.x1)(e),i=(0,M.oT)(t)||(0,M.K8)(t)||(0,M.x1)(t);return n&&i}async function W(e,t,n,i){if(R())return(0,s.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,geographicTransformation:s}of e)if(t&&n&&!U(t,n,s))return C(i)}else if(e&&t&&!U(e,t,n))return C(i);return(0,s.NO)(i)}function J(e,t,n){return e?"x"in e?Q(e,t,new f.A,n,0):"xmin"in e?oe(e,t,new c.A,n,0):"rings"in e?se(e,t,new p.A,n,0):"paths"in e?ne(e,t,new m.A,n,0):"points"in e?ee(e,t,new h.A,n,0):null:null}function V(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=Q(e,e.spatialReference,t,n,i)}function Q(e,t,n,i,s){ae[0]=e.x,ae[1]=e.y;const r=e.z;return ae[2]=void 0!==r?r:s,(0,y.projectBuffer)(ae,t,0,ae,i,0)?(n.x=ae[0],n.y=ae[1],n.spatialReference=i,void 0!==r||(0,u.xP)(i)?(n.z=ae[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ee(e,e.spatialReference,t,n,i)}function ee(e,t,n,i,s){const{points:r,hasZ:o,hasM:l}=e,a=[],c=r.length,h=[];for(const e of r)h.push(e[0],e[1],o?e[2]:s);if(!(0,y.projectBuffer)(h,t,0,h,i,0,c))return null;const d=o||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,n=h[t],i=h[t+1];d&&l?a.push([n,i,h[t+2],r[e][3]]):d?a.push([n,i,h[t+2]]):l?a.push([n,i,r[e][2]]):a.push([n,i])}return n.points=a,n.spatialReference=i,n.hasZ=o,n.hasM=l,n}function te(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ne(e,e.spatialReference,t,n,i)}function ne(e,t,n,i,s){const{paths:r,hasZ:o,hasM:l}=e,a=[];if(!le(r,o??!1,l??!1,t,a,i,s))return null;const c=o||(0,u.xP)(i);return n.paths=a,n.spatialReference=i,n.hasZ=c,n.hasM=l,n}function ie(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=se(e,e.spatialReference,t,n,i)}function se(e,t,n,i,s){const{rings:r,hasZ:o,hasM:l}=e,a=[];if(!le(r,o??!1,l??!1,t,a,i,s))return null;const c=o||(0,u.xP)(i);return n.rings=a,n.spatialReference=i,n.hasZ=c,n.hasM=l,n}function re(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=oe(e,e.spatialReference,t,n,i)}function oe(e,t,n,i,s){const{xmin:r,ymin:o,xmax:l,ymax:a,hasZ:c,hasM:h}=e;if(!x(r,o,c?e.zmin:s,t,ae,i))return null;const d=c||(0,u.xP)(i);return n.xmin=ae[0],n.ymin=ae[1],d&&(n.zmin=ae[2]),x(l,a,c?e.zmax:s,t,ae,i)?(n.xmax=ae[0],n.ymax=ae[1],d&&(n.zmax=ae[2]),h&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function le(e,t,n,i,s,r,o=0){const l=new Array;for(const n of e)for(const e of n)l.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(l,i,0,l,r,0))return!1;let a=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const i of t)c&&n?e.push([l[a++],l[a++],l[a++],i[3]]):c?e.push([l[a++],l[a++],l[a++]]):n?(e.push([l[a++],l[a++],i[2]]),a++):(e.push([l[a++],l[a++]]),a++);s.push(e)}return!0}const ae=(0,l.vt)()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5356,5613],{4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(7985)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(7937),t.e(7005),t.e(6445),t.e(6298),t.e(3546),t.e(1624)]).then(t.bind(t,53892))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(5964)]).then(t.bind(t,68695))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(708),t.e(4111),t.e(8506),t.e(364),t.e(8628),t.e(2593),t.e(2696),t.e(3549)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(3813)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9953),t.e(9186),t.e(3340)]).then(t.bind(t,68611))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(2236)]).then(t.bind(t,29784))).default,GaussianSplatLayer:async()=>(await Promise.all([t.e(6131),t.e(4447)]).then(t.bind(t,36475))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(8766)]).then(t.bind(t,15481))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(2157)]).then(t.bind(t,85582))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(2165),t.e(8256)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(9953),t.e(1956),t.e(364),t.e(1427),t.e(8106),t.e(4990)]).then(t.bind(t,58434))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(9953),t.e(1427),t.e(6049),t.e(8106),t.e(7677),t.e(5943)]).then(t.bind(t,35943))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(7196),t.e(1312)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(6298),t.e(7196),t.e(6894)]).then(t.bind(t,74660))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1863)]).then(t.bind(t,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(708),t.e(3029),t.e(8368),t.e(4649),t.e(217),t.e(2568),t.e(7213),t.e(9171),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(7937),t.e(7721),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(708),t.e(3029),t.e(8368),t.e(4649),t.e(217),t.e(2568),t.e(7213),t.e(9171),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(708),t.e(4111),t.e(364),t.e(3249),t.e(7656),t.e(2042)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(7213),t.e(8110)]).then(t.bind(t,96299))).default,MediaLayer:async()=>(await Promise.all([t.e(7330),t.e(6131),t.e(2763)]).then(t.bind(t,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(708),t.e(3029),t.e(6445),t.e(9936),t.e(4224)]).then(t.bind(t,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9344),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(9361),t.e(4151)]).then(t.bind(t,9352))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(6742)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(217),t.e(979)]).then(t.bind(t,64185))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(7937),t.e(7005),t.e(6445),t.e(6298),t.e(3546),t.e(1395)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(3029),t.e(73)]).then(t.bind(t,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1956),t.e(4796),t.e(4111),t.e(8506),t.e(6731)]).then(t.bind(t,97483))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(708),t.e(4111),t.e(364),t.e(9186),t.e(3249),t.e(573)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(5897),t.e(2272)]).then(t.bind(t,48757))).default,VideoLayer:async()=>(await Promise.all([t.e(6131),t.e(3910),t.e(8096),t.e(6638),t.e(7732)]).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(7937),t.e(7721),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(6183)]).then(t.bind(t,16183))).default,WCSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(9953),t.e(1427),t.e(6049),t.e(8106),t.e(7677),t.e(9547)]).then(t.bind(t,19547))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(9110)]).then(t.bind(t,21901))).default,WMSLayer:async()=>(await Promise.all([t.e(7330),t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(6638),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9344),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9344)]).then(t.bind(t,47314))).default}},8947:(e,a,t)=>{t.d(a,{L:()=>l});var r=t(60999),n=t(74887),i=t(67076);async function l(e,a,t){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,r.Ke)(l.populateFromStyle());if((0,n.Te)(t),!1===s.ok){const t=s.error;a?.messages&&a.messages.push(new i.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${t.message}`,{error:t,context:a})),e.clear("renderer",a?.origin)}}}},9762:(e,a,t)=>{t.r(a),t.d(a,{projectBuffer:()=>n});var r=t(37539);function n(e,a,t,n,i,l,s=Math.floor(e.length/3)){const c=(0,r.jd)(a,i);if(null==c)return!1;if(c===r.pO){if(e===n&&t===l)return!0;const a=t+3*s;for(let r=t,i=l;r<a;r++,i++)n[i]=e[r];return!0}const o=t+3*s;for(let a=t,r=l;a<o;a+=3,r+=3)c(e,a,n,r);return!0}},10407:(e,a,t)=>{t.d(a,{It:()=>d,LG:()=>l,OM:()=>o,Sm:()=>u,Y:()=>s,bK:()=>c,mm:()=>f,sQ:()=>y});var r=t(98988),n=t(16930),i=t(28735);function l(e,a){if(!s(e,a)){const t=e.typeKeywords;t?t.push(a):e.typeKeywords=[a]}}function s(e,a){return!!e.typeKeywords?.includes(a)}function c(e){return s(e,f.HOSTED_SERVICE)}function o(e,a){const t=e.typeKeywords;if(t){const e=t.indexOf(a);e>-1&&t.splice(e,1)}}function u(e,a,t){t?l(e,a):o(e,a)}async function y(e){const a=e.clone().normalize();let t;if(a.length>1)for(const e of a)t?e.width>t.width&&(t=e):t=e;else t=a[0];return async function(e){const a=e.spatialReference;if(a.isWGS84)return e.clone();if(a.isWebMercator)return(0,i.ci)(e);const t=n.A.WGS84;return await(0,r.initializeProjection)(a,t),(0,r.project)(e,t)}(t)}const f={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function d(e){const{portal:a,isOrgItem:t,itemControl:r}=e,n=a.user?.privileges;let i=!n||n.includes("features:user:edit"),l=!!t&&!!n?.includes("features:user:fullEdit");const s="update"===r||"admin"===r;return s?l=i=!0:l&&(i=!0),{features:{edit:i,fullEdit:l},content:{updateItem:s}}}},22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>l});var r=t(77548),n=t(24183);const i=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){const{loadContext:t,...i}=a||{},l=t?await t.fetchServiceMetadata(e,i):await(0,n.V)(e,i),s=(0,r.G$)();f(l),o(l);const c={serviceJSON:l,preferredHost:s};if((l.currentVersion??0)<10.5)return c;const u=`${(0,r.$x)()??e}/layers`,y=t?await t.fetchServiceMetadata(u,i):await(0,n.V)(u,i);return f(y),o(y),c.layersJSON={layers:y.layers,tables:y.tables},c}function s(e){const{type:a}=e;return!!a&&i.has(a)}function c(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(c)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function f(e){e.layers?.forEach(u),e.tables?.forEach(y)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},37539:(e,a,t)=>{t.d(a,{pO:()=>L,jd:()=>f,Tp:()=>d,w5:()=>y});var r=t(34727),n=t(83047),i=t(73941),l=t(79258);Math.PI;const s=l.$O.radius,c=l.$O.eccentricitySquared,o={a1:s*c,a2:s*c*s*c,a3:s*c*c/2,a4:s*c*s*c*2.5,a5:s*c+s*c*c/2,a6:1-c};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var u=t(21325);const y={2:{5:L,7:null,9:null,10:L,1:v,6:null,8:null,0:null,3:h,11:w,2:L,4:A},5:{5:L,7:null,9:null,10:L,1:v,6:null,8:null,0:null,3:h,11:w,2:L,4:A},7:{5:null,7:L,9:null,10:L,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:L,10:L,1:null,6:null,8:I,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,a,t,r){const n=e[a]/N,i=j-2*Math.atan(Math.exp(-e[a+1]/N)),l=N+e[a+2],s=Math.cos(i)*l;t[r]=Math.cos(n)*s,t[r+1]=Math.sin(n)*s,t[r+2]=Math.sin(i)*l},6:null,8:null,0:null,3:L,11:function(e,a,t,r){m(e,a,t,r),w(t,r,t,r)},2:m,4:function(e,a,t,r){m(e,a,t,r),A(t,r,t,r)}},4:{5:R,7:null,9:null,10:R,1:function(e,a,t,r){R(e,a,t,r),v(t,r,t,r)},6:null,8:null,0:null,3:function(e,a,t,r){R(e,a,t,r),h(t,r,t,r)},11:function(e,a,t,r){R(e,a,t,r),w(t,r,t,r)},2:R,4:L},1:{5:P,7:null,9:null,10:P,1:L,6:null,8:null,0:null,3:function(e,a,t,r){P(e,a,t,r),h(t,r,t,r)},11:function(e,a,t,r){P(e,a,t,r),w(t,r,t,r)},2:P,4:function(e,a,t,r){P(e,a,t,r),A(t,r,t,r)}},6:{5:null,7:G,9:null,10:G,1:null,6:L,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:T,10:T,1:null,6:null,8:L,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:L,3:null,11:null,2:null,4:null},10:{5:L,7:L,9:L,10:L,1:v,6:M,8:I,0:null,3:h,11:w,2:L,4:A},11:{5:S,7:null,9:null,10:S,1:function(e,a,t,r){S(e,a,t,r),v(t,r,t,r)},6:null,8:null,0:null,3:function(e,a,t,r){S(e,a,t,r),h(t,r,t,r)},11:L,2:S,4:function(e,a,t,r){S(e,a,t,r),A(t,r,t,r)}}};function f(e,a){return d(e,a)?.projector}function d(e,a){if(null==e||null==a)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===a)return C;const t=p(e,C.source),r=p(a,C.dest);return 0===t&&0===r?(0,u.aI)(e,a)?C.projector=L:C.projector=null:C.projector=y[t][r],C}function p(e,a){return e?a.spatialReference===e?a.spatialReferenceId:(a.spatialReference=e,"metersPerUnit"in a&&(a.metersPerUnit=(0,n.GA)(e,1)),(0,i.jA)(e)?a.spatialReferenceId=1:(0,u.oT)(e)?a.spatialReferenceId=2:(0,u.K8)(e)?a.spatialReferenceId=3:(0,u.r1)(e)?a.spatialReferenceId=11:e.wkt===i.Ro.wkt?a.spatialReferenceId=4:4490===e.wkid?a.spatialReferenceId=5:e.wkt===i.FY.wkt?a.spatialReferenceId=6:e.wkt===i.LJ.wkt?a.spatialReferenceId=8:(0,u.q8)(e)?a.spatialReferenceId=7:(0,u.KQ)(e)?a.spatialReferenceId=9:a.spatialReferenceId=0):0}function L(e,a,t,r){e!==t&&(t[r++]=e[a++],t[r++]=e[a++],t[r]=e[a])}function m(e,a,t,r){t[r]=k*(e[a]/N),t[r+1]=k*(j-2*Math.atan(Math.exp(-e[a+1]/N))),t[r+2]=e[a+2]}function h(e,a,t,n){!function(e,a,t,n,i){const l=.4999999*Math.PI,s=(0,r.qE)(O*e[a+1],-l,l),c=Math.sin(s);t[n++]=O*e[a]*i.radius,t[n++]=i.halfSemiMajorAxis*Math.log((1+c)/(1-c)),t[n]=e[a+2]}(e,a,t,n,l.$O)}function w(e,a,t,r){t[r]=e[a]*_,t[r+1]=e[a+1]*_,t[r+2]=e[a+2]}function S(e,a,t,r){t[r]=e[a]*E,t[r+1]=e[a+1]*E,t[r+2]=e[a+2]}function g(e,a,t,r,n){const i=n+e[a+2],l=O*e[a+1],s=O*e[a],c=Math.cos(l)*i;t[r]=Math.cos(s)*c,t[r+1]=Math.sin(s)*c,t[r+2]=Math.sin(l)*i}function I(e,a,t,r){g(e,a,t,r,l.Sw.radius)}function M(e,a,t,r){g(e,a,t,r,l.sH.radius)}function v(e,a,t,r){g(e,a,t,r,l.$O.radius)}function b(e,a,t,n,i){const l=e[a],s=e[a+1],c=e[a+2],o=Math.sqrt(l*l+s*s+c*c),u=(0,r.YN)(c/(0===o?1:o)),y=Math.atan2(s,l);t[n++]=k*y,t[n++]=k*u,t[n]=o-i}function T(e,a,t,r){b(e,a,t,r,l.Sw.radius)}function G(e,a,t,r){b(e,a,t,r,l.sH.radius)}function P(e,a,t,r){b(e,a,t,r,l.$O.radius)}function A(e,a,t,r){!function(e,a,t,r,n){const i=O*e[a],l=O*e[a+1],s=e[a+2],c=Math.sin(l),o=Math.cos(l),u=n.radius/Math.sqrt(1-n.eccentricitySquared*c*c);t[r++]=(u+s)*o*Math.cos(i),t[r++]=(u+s)*o*Math.sin(i),t[r++]=(u*(1-n.eccentricitySquared)+s)*c}(e,a,t,r,l.$O)}function R(e,a,t,r){const n=o,i=e[a],s=e[a+1],c=e[a+2];let u,y,f,d,p,L,m,h,w,S,g,I,M,v,b,T,G,P,A,R,C;u=Math.abs(c),y=i*i+s*s,f=Math.sqrt(y),d=y+c*c,p=Math.sqrt(d),R=Math.atan2(s,i),L=c*c/d,m=y/d,v=n.a2/p,b=n.a3-n.a4/p,m>.3?(h=u/p*(1+m*(n.a1+v+L*b)/p),A=Math.asin(h),S=h*h,w=Math.sqrt(1-S)):(w=f/p*(1-L*(n.a5-v-m*b)/p),A=Math.acos(w),S=1-w*w,h=Math.sqrt(S)),g=1-l.$O.eccentricitySquared*S,I=l.$O.radius/Math.sqrt(g),M=n.a6*I,v=f-I*w,b=u-M*h,G=w*v+h*b,T=w*b-h*v,P=T/(M/g+G),A+=P,C=G+T*P/2,c<0&&(A=-A),t[r++]=k*R,t[r++]=k*A,t[r]=C}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:L},O=(0,r.kU)(1),k=(0,r.KJ)(1),j=.5*Math.PI,N=l.$O.radius,_=N*Math.PI/180,E=180/(N*Math.PI)},45613:(e,a,t)=>{t.d(a,{fromItem:()=>f,n:()=>d});var r=t(49186),n=t(92009),i=t(23154),l=t(22429),s=t(77548),c=t(4513),o=t(80812),u=t(66964),y=t(10407);async function f(e){let{portalItem:a}=e;!a||a instanceof o.default||(a=new o.default(a));const t=await async function(e){await e.load();const a=new l.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await d(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function d(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,u.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await p(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),l=i.cacheType?.toLowerCase(),s=i.capabilities?.toLowerCase().includes("tilesonly"),c=i.tileInfo?.format?.toLowerCase()??"",o=null==l&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===l||o||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await p(e,a,async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}});if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(s.XX))if(e.typeKeywords.includes(a))return{className:s.XX[a]};const i=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,e=>(0,u.pJ)(e)?.customParameters)});return{className:s.XX[i?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Video Service":return async function(e,a){return"object"==typeof await p(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e,a,t){const{url:r,type:n}=e,l="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(l){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,e=>(0,u.pJ)(e)?.customParameters)});return(0,s.Gh)(e,(0,s.G$)()),{id:t.id,className:(0,i.K)(t.type),sourceJSON:t}}return{}}if("Video Service"===n){const e=await a.fetchServiceMetadata(r);return!((e.layers?.length??0)>1)&&{}}await e.load();let c=await a.fetchItemData(e);if(l){const{data:t,preferredHost:n}=await(0,u.bO)(c,r,a);(0,s.Gh)(e,n);const i=L(t);if("object"==typeof i){const e=(0,u.rc)(t,i.id);i.className=(0,u.K8)(e?.layerType)}return i}if("Scene Service"===n&&(c=await(0,u.nu)(e,c,a)),(0,u.XH)(c)>0)return L(c);const o=await a.fetchServiceMetadata(r);return t&&(o.tables=await t()),L(o)}function L(e){return 1===(0,u.XH)(e)&&{id:(0,u.pJ)(e)?.id}}},62815:(e,a,t)=>{t.d(a,{N:()=>l});var r=t(83047),n=t(73941),i=t(21325);function l(e,a,t){if(null==a||null==t||t.vcsWkid||(0,i.aI)(a,t)||(0,n.xP)(a)||(0,n.xP)(t))return null;const l=(0,r.G9)(a)/(0,r.G9)(t);if(1===l)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,a){null!=e?.z&&(e.z*=a)}(e,l);case"polyline":case"esriGeometryPolyline":return e=>function(e,a){if(e)for(const t of e.paths)for(const e of t)e.length>2&&(e[2]*=a)}(e,l);case"polygon":case"esriGeometryPolygon":return e=>function(e,a){if(e)for(const t of e.rings)for(const e of t)e.length>2&&(e[2]*=a)}(e,l);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,a){if(e)for(const t of e.points)t.length>2&&(t[2]*=a)}(e,l);case"extent":case"esriGeometryEnvelope":return e=>function(e,a){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=a,e.zmax*=a)}(e,l);default:return null}}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>y,_r:()=>l,bO:()=>s,l:()=>f,nu:()=>p,pJ:()=>c,rc:()=>o});var r=t(92009),n=t(23154),i=t(77548);function l(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function s(e,a,t){let r;if(null==e?.layers||null==e?.tables){const n=await t.fetchServiceMetadata(a,{customParameters:c(e)?.customParameters});r=(0,i.G$)(),(e=e||{}).layers=e.layers||n?.layers?.map(l),e.tables=e.tables||n?.tables?.map(l)}return{data:e,preferredHost:r}}function c(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function o(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find(e=>e.id===a)}function u(e,a){return[...e.layers||[],...e.tables||[]].filter(({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer"))}function y(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function f(e){switch(e){case"catalog":return["CatalogLayer"];case"feature":return["ArcGISFeatureLayer"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return"FeatureLayer"}async function p(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(l)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:c(a)?.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData().catch(()=>null);if(e?.tables)a.tables=e.tables.map(l);else{const r=await t.fetchServiceMetadata(n,{customParameters:c(e)?.customParameters}).catch(()=>null);a.tables=r?.tables?.map(l)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},75356:(e,a,t)=>{t.d(a,{N:()=>T,populateOperationalLayers:()=>u});var r=t(7762),n=(t(44208),t(22429)),i=t(4513),l=t(80812);function s(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var c=t(45613),o=t(8947);async function u(e,a,t){if(!a)return;const r=a.map(e=>async function(e,a){return async function(e,a,t){const r=new e;return r.read(a,t.context),"group"===r.type&&("GroupLayer"===a.layerType?await T(r,a,t):v(a)?function(e,a,t){a.itemId&&(e.portalItem=new l.default({id:a.itemId,portal:t?.portal}),e.when(()=>{const r=r=>{const n=r.layerId;G(r,e,a,n,t);const i=a.featureCollection?.layers?.[n];i&&r.read(i,t)};e.layers?.forEach(r),e.tables?.forEach(r)}))}(r,a,t.context):M(a)&&await async function(e,a,t){const r=i.S.FeatureLayer,n=await r(),l=a.featureCollection,s=l?.showLegend,c=l?.layers?.map((r,i)=>{const l=new n;l.read(r,t);const c={...t,ignoreDefaults:!0};return G(l,e,a,i,c),null!=s&&l.read({showLegend:s},c),l});e.layers.addMany(c??[])}(r,a,t.context)),await(0,o.L)(r,t.context),r}(await I(e,a),e,a)}(e,t)),n=await Promise.allSettled(r);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const y={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},f={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},d={ArcGISFeatureLayer:"FeatureLayer"},p={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},L={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},h={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},w={...L,LinkChartLayer:"LinkChartLayer"},S={...m},g={...h};async function I(e,a){const t=a.context,r=b(t);let o=e.layerType||e.type;!o&&a?.defaultLayerType&&(o=a.defaultLayerType);const u=r[o];let y=u?i.S[u]:i.S.UnknownLayer;if(v(e)){const a=t?.portal;if(e.itemId){const t=new l.default({id:e.itemId,portal:a});await t.load();const r=(await(0,c.n)(t,new n.v)).className||"UnknownLayer";y=i.S[r]}}else"ArcGISFeatureLayer"===o?function(e){return s(e,"notes")}(e)||function(e){return s(e,"markup")}(e)?y=i.S.MapNotesLayer:function(e){return s(e,"route")}(e)?y=i.S.RouteLayer:M(e)&&(y=i.S.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?y=i.S.WMTSLayer:"WFS"===o&&"2.0.0"!==e.wfsInfo?.version&&(y=i.S.UnsupportedLayer);return y()}function M(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function b(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=p;break;case"ground":a=f;break;case"tables":a=d;break;default:a=y}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=g;break;case"tables":a=S;break;default:a=w}break;default:switch(e.layerContainerType){case"basemap":a=h;break;case"tables":a=m;break;default:a=L}}return a}async function T(e,a,t){const n=new r.A,i=u(n,Array.isArray(a.layers)?a.layers:[],t);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,t,r,n){e.read({id:`${a.id}-sublayer-${r}`,visibility:t.visibleLayers?.includes(r)??!0},n)}},92009:(e,a,t)=>{t.d(a,{L:()=>u});var r=t(70333),n=t(78888),i=t(49186),l=t(74887),s=t(60694),c=t(20655),o=t(80812);async function u(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new o.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.QP)(e)}return null}(e);null!=i&&(t.portal=new c.A({url:i}));try{return await t.load({signal:e.signal})}catch(e){return(0,l.QP)(e),null}}(u),null==u.sceneLayerItem)return f(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const d=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!t)return null;const r=new o.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,l.QP)(e),null}}(u);if(!d?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=d;const p=await f(d.url,u);return p.portalItem=d,p}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function f(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,l=a.layerId;if(null==l)return{serverUrl:r};const c=y(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,f=e=>{const t={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},d=f("anonymous").catch(()=>f("no-prompt")),[p,L]=await Promise.all([d,c]),m=L?.layers,h=p.data&&p.data.layers;if(!Array.isArray(h))throw new Error("expected layers array");if(Array.isArray(m)){for(let e=0;e<Math.min(m.length,h.length);e++)if(m[e].id===l)return{serverUrl:r,layerId:h[e].id}}else if(null!=l&&l<h.length)return{serverUrl:r,layerId:h[l].id};throw new Error("could not find matching associated sublayer")}},98988:(e,a,t)=>{t.r(a),t.d(a,{canProjectWithoutEngine:()=>J,getTransformation:()=>D,getTransformations:()=>V,initializeProjection:()=>H,isEqualBaseGCS:()=>z,isLoaded:()=>O,isLoadedOrLoad:()=>k,isLoadedOrLoadFor:()=>j,load:()=>_,project:()=>E,projectExtent:()=>ie,projectMany:()=>x,projectMultipoint:()=>Q,projectOrLoad:()=>W,projectOrLoadMany:()=>F,projectPoint:()=>Z,projectPolygon:()=>re,projectPolyline:()=>ae,projectWithZConversion:()=>q,projectWithoutEngine:()=>Y,requiresLoad:()=>N,test:()=>B,tryProjectWithZConversion:()=>$,unload:()=>K});var r=t(49186),n=t(74887),i=t(62788),l=t(95488),s=t(51850),c=t(21276),o=t(73941),u=t(5443),y=t(48526),f=t(83290),d=t(86738),p=t(39829),L=t(82799),m=t(16930),h=t(9762),w=t(37539);function S(e,a,t,r,n,i){return g[0]=e,g[1]=a,g[2]=t,(0,h.projectBuffer)(g,r,0,n,i,0)}const g=(0,s.vt)();let I=0;class M{static fromGE(e){const a=new M;return a._wkt=e.wkt,a._wkid=e.wkid,a._isInverse=e.isInverse,a}constructor(e){this.uid=I++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=I++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=I++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=I++}getInverse(){const e=new M;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class v{static cacheKey(e,a){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",a.wkid?.toString()??"-1",a.wkt?.toString()??"",a.wkt2?.toString()??""].join()}static fromGE(e){const a=new v;let t="";for(const r of e.steps){const e=M.fromGE(r);a.steps.push(e),t+=e.uid.toString()+","}return a._cachedProjection={},a._gtlistentry=null,a._chain=t,a}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const a of e.steps)a instanceof M?this.steps.push(a):this.steps.push(new M({wkid:a.wkid,wkt:a.wkt,isInverse:a.isInverse}))}getInverse(){const e=new v;e.steps=[];for(let a=this.steps.length-1;a>=0;a--){const t=this.steps[a];e.steps.push(t.getInverse())}return e}getGTListEntry(){let e="";for(const a of this.steps)e+=a.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,a,t){this._cachedProjection[v.cacheKey(e,a)]=t}getCachedGeTransformation(e,a){let t="";for(const e of this.steps)t+=e.uid.toString()+",";t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t);const r=this._cachedProjection[v.cacheKey(e,a)];return void 0===r?null:r}}var b=t(21325),T=t(62815);let G=null,P=null,A=null,R={};const C=new l.I;function O(){return!!G&&(0,f.i)()}function k(){return!!O()||((0,i.gc)(C),_(),!1)}function j(e,a){return!e||!a||J(e,a)||k()}function N(e,a){return!J(e,a)&&!O()}function _(e){return null==A&&(A=Promise.all([(0,f.l)(),t.e(9930).then(t.bind(t,49930)).then(e=>e.g),t.e(2731).then(t.bind(t,12731))])),A.then(([,a,{hydratedAdapter:t}])=>{(0,n.Te)(e),P=t,G=a.default,G._enableProjection(f.p),C.notify()})}function E(e,a,t=null,r=null){return Array.isArray(e)?0===e.length?[]:((0,c.H)(e),x(P,e,e[0].spatialReference,a,t,r)):((0,c.f)(e),x(P,[e],e.spatialReference,a,t,r)[0])}function x(e,a,t,r,n=null,i=null){if(null==t||null==r)return a;if(J(t,r,n))return a.map(e=>Y(e,t,r));if(null==n&&(0,o.jA)(t))return a.map(e=>Y(e,t,m.A.WGS84)).map(e=>$(e,r));if(null==n&&(0,o.jA)(r))return a.map(e=>$(e,m.A.WGS84)).map(e=>Y(e,m.A.WGS84,r));if(null==n){const e=v.cacheKey(t,r);void 0!==R[e]?n=R[e]:(null==(n=D(t,r,void 0))&&(n=new v),R[e]=n)}if(null==G||null==e)throw new U;return null!=i?G._project(e,a,t,r,n,i):G._project(e,a,t,r,n)}function W(e,a){const t=F([e],a);return null!=t.pending?{pending:t.pending,geometry:null}:null!=t.geometries?{pending:null,geometry:t.geometries[0]}:{pending:null,geometry:null}}function F(e,a){if(!O())for(const t of e)if(null!=t&&!(0,b.aI)(t.spatialReference,a)&&(0,b.fn)(t.spatialReference)&&(0,b.fn)(a)&&!J(t.spatialReference,a))return(0,i.gc)(C),{pending:_(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,b.aI)(e.spatialReference,a)?e:(0,b.fn)(e.spatialReference)&&(0,b.fn)(a)?$(e,a):null)}}function D(e,a,t=null){if(null==e||null==a)return null;if(null==G||null==P)throw new U;const r=G._getTransformation(P,e,a,t,t?.spatialReference);return null!==r?v.fromGE(r):null}function V(e,a,t=null){if(null==G||null==P)throw new U;const r=G._getTransformationBySuitability(P,e,a,t,t?.spatialReference);if(null!==r){const e=[];for(const a of r)e.push(v.fromGE(a));return e}return[]}class U extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function K(){G=null,P=null,A=null,R={}}const B={get loadPromise(){return A}};function $(e,a){try{const t=E(e,a);if(null==t)return null;"xmin"in e&&"xmin"in t&&(t.zmin=e.zmin,t.zmax=e.zmax);const r=(0,T.N)(t.type,e.spatialReference,a);return null!=r&&r(t),t}catch(e){if(!(e instanceof U))throw e;return null}}async function q(e,a,t){const r=e.spatialReference;return null!=r&&null!=a&&await H(r,a,null,t),$(e,a)}function J(e,a,t){return!t&&(!!(0,b.aI)(e,a)||(0,b.fn)(e)&&(0,b.fn)(a)&&!!(0,w.jd)(e,a))}function z(e,a){if((0,b.aI)(e,a))return!0;if(!(0,b.fn)(e)||!(0,b.fn)(a))return!1;const t=(0,b.oT)(e)||(0,b.K8)(e)||(0,b.x1)(e),r=(0,b.oT)(a)||(0,b.K8)(a)||(0,b.x1)(a);return t&&r}async function H(e,a,t,r){if(O())return(0,n.NO)(r);if(Array.isArray(e)){for(const{source:a,dest:t,geographicTransformation:n}of e)if(a&&t&&!J(a,t,n))return _(r)}else if(e&&a&&!J(e,a,t))return _(r);return(0,n.NO)(r)}function Y(e,a,t){return e?"x"in e?X(e,a,new d.A,t,0):"xmin"in e?le(e,a,new u.A,t,0):"rings"in e?ne(e,a,new p.A,t,0):"paths"in e?te(e,a,new L.A,t,0):"points"in e?ee(e,a,new y.A,t,0):null:null}function Z(e,a,t=a.spatialReference,r=0){return null!=t&&null!=e.spatialReference&&null!=X(e,e.spatialReference,a,t,r)}function X(e,a,t,r,n){ce[0]=e.x,ce[1]=e.y;const i=e.z;return ce[2]=void 0!==i?i:n,(0,h.projectBuffer)(ce,a,0,ce,r,0)?(t.x=ce[0],t.y=ce[1],t.spatialReference=r,void 0!==i||(0,o.xP)(r)?(t.z=ce[2],t.hasZ=!0):(t.z=void 0,t.hasZ=!1),void 0===e.m?(t.m=void 0,t.hasM=!1):(t.m=e.m,t.hasM=!0),t):null}function Q(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ee(e,e.spatialReference,a,t,r)}function ee(e,a,t,r,n){const{points:i,hasZ:l,hasM:s}=e,c=[],u=i.length,y=[];for(const e of i)y.push(e[0],e[1],l?e[2]:n);if(!(0,h.projectBuffer)(y,a,0,y,r,0,u))return null;const f=l||(0,o.xP)(r);for(let e=0;e<u;++e){const a=3*e,t=y[a],r=y[a+1];f&&s?c.push([t,r,y[a+2],i[e][3]]):f?c.push([t,r,y[a+2]]):s?c.push([t,r,i[e][2]]):c.push([t,r])}return t.points=c,t.spatialReference=r,t.hasZ=l,t.hasM=s,t}function ae(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=te(e,e.spatialReference,a,t,r)}function te(e,a,t,r,n){const{paths:i,hasZ:l,hasM:s}=e,c=[];if(!se(i,l??!1,s??!1,a,c,r,n))return null;const u=l||(0,o.xP)(r);return t.paths=c,t.spatialReference=r,t.hasZ=u,t.hasM=s,t}function re(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ne(e,e.spatialReference,a,t,r)}function ne(e,a,t,r,n){const{rings:i,hasZ:l,hasM:s}=e,c=[];if(!se(i,l??!1,s??!1,a,c,r,n))return null;const u=l||(0,o.xP)(r);return t.rings=c,t.spatialReference=r,t.hasZ=u,t.hasM=s,t}function ie(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=le(e,e.spatialReference,a,t,r)}function le(e,a,t,r,n){const{xmin:i,ymin:l,xmax:s,ymax:c,hasZ:u,hasM:y}=e;if(!S(i,l,u?e.zmin:n,a,ce,r))return null;const f=u||(0,o.xP)(r);return t.xmin=ce[0],t.ymin=ce[1],f&&(t.zmin=ce[2]),S(s,c,u?e.zmax:n,a,ce,r)?(t.xmax=ce[0],t.ymax=ce[1],f&&(t.zmax=ce[2]),y&&(t.mmin=e.mmin,t.mmax=e.mmax),t.spatialReference=r,t):null}function se(e,a,t,r,n,i,l=0){const s=new Array;for(const t of e)for(const e of t)s.push(e[0],e[1],a?e[2]:l);if(!(0,h.projectBuffer)(s,r,0,s,i,0))return!1;let c=0;n.length=0;const u=a||(0,o.xP)(i);for(const a of e){const e=new Array;for(const r of a)u&&t?e.push([s[c++],s[c++],s[c++],r[3]]):u?e.push([s[c++],s[c++],s[c++]]):t?(e.push([s[c++],s[c++],r[2]]),c++):(e.push([s[c++],s[c++]]),c++);n.push(e)}return!0}const ce=(0,s.vt)()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3813,8256],{4146:(t,e,i)=>{i.d(e,{A:()=>b});var r=i(31635),n=i(78888),s=i(49186),o=i(65529),l=i(4902),a=i(92474),u=i(53966),p=i(74887),h=i(84952),d=i(10107),c=(i(44208),i(87811),i(40608)),y=i(5443),g=i(16930),m=i(92602),f=i(64272);let v=0,b=class extends((0,o.Zt)((0,l.sA)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(e)}catch(t){const i=e?.portalItem,r=i?.id||"unset",n=i?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch(t=>{(0,p.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"groundLayers"in t&&t.groundLayers.includes(e)?t.groundLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,d.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,r.Cg)([(0,d.MZ)({type:y.A})],b.prototype,"fullExtent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,r.Cg)([(0,d.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,r.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,r.Cg)([(0,d.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,d.MZ)({type:g.A})],b.prototype,"spatialReference",void 0),(0,r.Cg)([(0,d.MZ)({type:String})],b.prototype,"title",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,r.Cg)([(0,d.MZ)()],b.prototype,"url",void 0),(0,r.Cg)([(0,d.MZ)({type:f.T})],b.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,r.Cg)([(0,c.$)("esri.layers.Layer")],b)},4902:(t,e,i)=>{i.d(e,{PH:()=>l,sA:()=>o});var r=i(31635),n=i(40608);let s=0;const o=t=>{const e=t;let i=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return i=(0,r.Cg)([(0,n.$)("esri.core.Identifiable")],i),i},l=t=>{const e=t;let i=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return i=(0,r.Cg)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],i),i};o(class{})},62885:(t,e,i)=>{i.d(e,{H:()=>s,V:()=>n});var r=i(7762);function n(t,e,i=r.A){return e||(e=new i),e===t||e.destroyed||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},64272:(t,e,i)=>{i.d(e,{T:()=>d});var r,n=i(31635),s=i(25482),o=i(88930),l=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),p=i(43937),h=i(98623);let d=class extends s.o{static{r=this}static get allTime(){return c}static get empty(){return y}static fromArray(t){return new r({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===r&&i===n}expandTo(t,e=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,t,e));let n=this.end;if(n){const i=(0,o.lL)(n,t,e);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,t,e)}return new r({start:i,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return r.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,l;return n>=e&&n<=i?o=n:e>=n&&e<=s&&(o=e),i>=n&&i<=s?l=i:s>=e&&s<=i&&(l=s),null==o||null==l||isNaN(o)||isNaN(l)?r.empty:new r({start:o===-1/0?null:new Date(o),end:l===1/0?null:new Date(l)})}offset(t,e,i=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new r,{start:s,end:l}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,i)),null!=l&&(n.end=(0,o.S1)(l,t,e,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return c.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,i=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new r({start:e,end:i})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,a.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,p.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,a.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,p.K)("start")],d.prototype,"writeStart",null),d=r=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],d);const c=new d,y=new d({start:void 0,end:void 0})},68197:(t,e,i)=>{i.d(e,{A:()=>a});var r=i(40876),n=i(34727),s=i(56507);function o(t){return(0,n.qE)((0,s.Vr)(t),0,255)}function l(t,e){const i=t.toString(16).padStart(2,"0");return e?i.slice(0,1):i}class a{static blendColors(t,e,i,r=new a){return r.r=Math.round(t.r+(e.r-t.r)*i),r.g=Math.round(t.g+(e.g-t.g)*i),r.b=Math.round(t.b+(e.b-t.b)*i),r.a=t.a+(e.a-t.a)*i,r._sanitize()}static fromRgb(t,e){const i=(0,r.lT)(t);return i?a.fromArray(i,e):null}static fromHex(t,e=new a){const i=(0,r.oW)(t);return i?a.fromArray(i,e):null}static fromArray(t,e=new a){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,r.Eq)(t);return i?a.fromArray(i,e):null}static fromJSON(t){return null!=t?new a([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?a.fromString(t,this):Array.isArray(t)?a.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof a||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,r=3===i||4===i,n=4===i||8===i,s=`#${l(this.r,r)}${l(this.g,r)}${l(this.b,r)}${n?l(Math.round(255*this.a),r):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=0){const e=o(this.r),i=o(this.g),r=o(this.b);return 0===t||1!==this.a?[e,i,r,o(255*this.a)]:[e,i,r]}clone(){return new a(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,r.c1)(this.r),this.g=(0,r.c1)(this.g),this.b=(0,r.c1)(this.b),this.a=(0,r.G1)(this.a),this}_set(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}}a.prototype.declaredClass="esri.Color"},69052:(t,e,i)=>{i.d(e,{hr:()=>n,ie:()=>a,uC:()=>l});var r=i(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,i=!1){return s(this.range,this.min,this.max,t,e,i)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,i){return t<e?e:e+o(this.range,t-e,i)}minimalMonotonic(t,e,i){return s(this.range,t,t+this.range,e,i)}center(t,e,i){return e=this.monotonic(t,e,i),this.normalize((t+e)/2,i)}diff(t,e,i){return this.monotonic(t,e,i)-t}shortestSignedDiff(t,e){t=this.normalize(t);const i=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(i)<Math.abs(r)?i:r}contains(t,e,i){return e=this.minimalMonotonic(t,e),(i=this.minimalMonotonic(t,i))>t&&i<e}}function s(t,e,i,r,n=0,s=!1){return(r-=n)<e?r+=o(t,e-r):r>i&&(r-=o(t,r-i)),s&&r===i&&(r=e),r+n}function o(t,e,i=0){return Math.ceil((e-i)/t)*t+i}const l=new n(0,2*Math.PI),a=(new n(-Math.PI,Math.PI),new n(0,360))},71493:(t,e,i)=>{i.r(e),i.d(e,{default:()=>E});var r=i(31635),n=i(79608),s=i(68197),o=i(69540),l=i(25482),a=i(90629),u=i(10107),p=i(56507),h=(i(44208),i(87811),i(40608));let d=class extends((0,l.T)(o.P)){constructor(t){super(t),this.type="simple",this.color=new s.A("black"),this.lineSize=2,this.fontSize=10,this.textColor=new s.A("black"),this.textBackgroundColor=new s.A([255,255,255,.6])}equals(t){return this===t||this.color.equals(t.color)&&this.lineSize===t.lineSize&&this.fontSize===t.fontSize&&this.textColor.equals(t.textColor)&&this.textBackgroundColor.equals(t.textBackgroundColor)}};(0,r.Cg)([(0,u.MZ)({type:["simple"],readOnly:!0,json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],d.prototype,"color",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,range:{min:(0,a.PN)(1)},json:{write:{isRequired:!0}}})],d.prototype,"lineSize",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,json:{write:{isRequired:!0}}})],d.prototype,"fontSize",void 0),(0,r.Cg)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],d.prototype,"textColor",void 0),(0,r.Cg)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],d.prototype,"textBackgroundColor",void 0),d=(0,r.Cg)([(0,h.$)("esri.analysis.DimensionSimpleStyle")],d);var c=i(69052),y=i(97768),g=i(79901),m=i(86738);let f=class extends((0,l.T)(o.P)){constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType="direct",this.offset=0,this.orientation=0}get valid(){return null!=this.startPoint&&null!=this.endPoint}equals(t){return this===t||(0,y.CM)(this.startPoint,t.startPoint)&&(0,y.CM)(this.endPoint,t.endPoint)&&this.measureType===t.measureType&&this.offset===t.offset&&this.orientation===t.orientation}};(0,r.Cg)([(0,u.MZ)({type:["length"],json:{write:{isRequired:!0}}})],f.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)({type:m.A,json:{write:{isRequired:!0}}})],f.prototype,"startPoint",void 0),(0,r.Cg)([(0,u.MZ)({type:m.A,json:{write:{isRequired:!0}}})],f.prototype,"endPoint",void 0),(0,r.Cg)([(0,u.MZ)({type:["horizontal","vertical","direct"],nonNullable:!0,json:{write:{isRequired:!0}}})],f.prototype,"measureType",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],f.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,g.w)(t=>c.ie.normalize((0,p.GB)(t),0,!0))],f.prototype,"orientation",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],f.prototype,"valid",null),f=(0,r.Cg)([(0,h.$)("esri.analysis.LengthDimension")],f);var v=i(4576),b=i(7762),w=i(62885),M=i(36708),C=(i(53966),i(5443)),A=i(98988);const O=b.A.ofType(f);let S=class extends n.A{constructor(t){super(t),this.type="dimension",this.style=new d,this.extent=null}initialize(){this.addHandles((0,M.wB)(()=>this._computeExtent(),t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)},M.pc))}get dimensions(){return this._get("dimensions")||new O}set dimensions(t){this._set("dimensions",(0,w.V)(t,this.dimensions,O))}get spatialReference(){for(const t of this.dimensions){if(null!=t.startPoint)return t.startPoint.spatialReference;if(null!=t.endPoint)return t.endPoint.spatialReference}return null}get valid(){return this.dimensions.every(t=>t.valid)}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==t)return{pending:null,extent:null};const e=[];for(const t of this.dimensions)null!=t.startPoint&&e.push(t.startPoint),null!=t.endPoint&&e.push(t.endPoint);const i=(0,A.projectOrLoadMany)(e,t);if(null!=i.pending)return{pending:i.pending,extent:null};let r=null;return null!=i.geometries&&(r=i.geometries.reduce((t,e)=>null==t?null!=e?C.A.fromPoint(e):null:null!=e?t.union(C.A.fromPoint(e)):t,null)),{pending:null,extent:r}}clear(){this.dimensions.removeAll()}equals(t){return this===t||super.equals(t)&&this.style.equals(t.style)&&(0,v.aI)(this.dimensions.toArray(),t.dimensions.toArray(),(t,e)=>t.equals(e))}};(0,r.Cg)([(0,u.MZ)({type:["dimension"]})],S.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)({cast:w.H,type:O,nonNullable:!0})],S.prototype,"dimensions",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],S.prototype,"spatialReference",null),(0,r.Cg)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:d}},nonNullable:!0})],S.prototype,"style",void 0),(0,r.Cg)([(0,u.MZ)({value:null,readOnly:!0})],S.prototype,"extent",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],S.prototype,"valid",null),S=(0,r.Cg)([(0,h.$)("esri.analysis.DimensionAnalysis")],S);var Z=i(92071),x=i(43937),T=i(4146),_=i(16131);let N=class extends((0,_.q)((0,Z.P)(T.A))){constructor(t){if(super(t),this.type="dimension",this.operationalLayerType="ArcGISDimensionLayer",this.source=new S,this.opacity=1,t){const{source:e,style:i}=t;e&&i&&(e.style=i)}}initialize(){this.addHandles([(0,M.wB)(()=>this.source,(t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)},M.pc)])}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get style(){return this.source.style}set style(t){this.source.style=t}get fullExtent(){return this.source.extent}releaseAnalysis(t){this.source===t&&(this.source=new S)}get analysis(){return this.source}set analysis(t){this.source=t}get dimensions(){return this.source.dimensions}set dimensions(t){this.source.dimensions=t}writeDimensions(t,e,i,r){e.dimensions=t.filter(({startPoint:t,endPoint:e})=>null!=t&&null!=e).toJSON(r)}};(0,r.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0})],N.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISDimensionLayer"]})],N.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)({nonNullable:!0})],N.prototype,"source",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],N.prototype,"spatialReference",null),(0,r.Cg)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:d}},json:{write:{ignoreOrigin:!0}}})],N.prototype,"style",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],N.prototype,"fullExtent",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],N.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],N.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({type:b.A.ofType(f),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],N.prototype,"dimensions",null),(0,r.Cg)([(0,x.K)("web-scene","dimensions")],N.prototype,"writeDimensions",null),N=(0,r.Cg)([(0,h.$)("esri.layers.DimensionLayer")],N);const E=N},78553:(t,e,i)=>{i.d(e,{D:()=>s,p:()=>n});var r=i(56507);function n(t){const e=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,i)=>{i.d(e,{A:()=>c});var r=i(31635),n=i(69540),s=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let l=class extends n.P{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,r.Cg)([(0,s.MZ)()],l.prototype,"type",void 0),l=(0,r.Cg)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],l);const a=l;var u=i(65008),p=i(4902),h=i(25482);let d=0,c=class extends((0,h.T)((0,n.O)((0,p.sA)(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${d++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}equals(t){return!0}};(0,r.Cg)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],c.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({clonable:!1,value:null})],c.prototype,"parent",null),(0,r.Cg)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":a}}})],c.prototype,"origin",void 0),c=(0,r.Cg)([(0,o.$)("esri.analysis.Analysis")],c)},92071:(t,e,i)=>{i.d(e,{P:()=>v,L:()=>b});var r=i(31635),n=i(65008),s=i(76953),o=i(4718),l=i(35666);class a{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new a,i=this._originStores[0];i&&i.forEach((t,i)=>{e.set(i,(0,o.o8)(t),0)});for(let i=2;i<l.AU;i++){const r=this._originStores[i];r&&r.forEach((r,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(r),i)})}return e}get(t,e){const i=void 0===e?this._values:this._originStores[e];return i?i.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,i=7){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=i){const r=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,i),r!==e}return!1}delete(t,e=7){const i=this._originStores[e];if(!i)return;const r=i.get(t);if(i.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let i=e-1;i>=0;i--){const e=this._originStores[i];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,i);break}}}return r}has(t,e){const i=void 0===e?this._values:this._originStores[e];return!!i&&i.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const i=this._originStores[e],r=i?.get(t),n=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,e),n!==r}originOf(t){return this._propertyOriginMap.get(t)||0}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=i(45917),p=i(88620),h=i(40608);const d=t=>{const e=t;let i=class extends e{constructor(...t){super(...t);const e=(0,p.oY)(this),i=e.store,r=new a;e.store=r,(0,s.k)(e,i,r)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const i=c(this),r=(0,l.aB)(e);if("string"==typeof t)return i.get(t,r);const n={};return t.forEach(t=>{n[t]=i.get(t,r)}),n}originOf(t){return(0,l.OL)(this.originIdOf(t))}originIdOf(t){return c(this).originOf(t)}revert(t,e){const i=c(this),r=(0,l.aB)(e),n=(0,p.oY)(this);let s;s="string"==typeof t?"*"===t?i.keys(r):[t]:t,s.forEach(t=>{n.invalidate(t),i.revert(t,r),n.commit(t)})}};return i=(0,r.Cg)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],i),i};function c(t){return(0,p.oY)(t).store}d(n.A);var y=i(16649),g=i(49422);const m=t=>{const e=t;let i=class extends e{constructor(...t){super(...t)}clear(t,e="user"){(0,p.oY)(this).clearOrigin(t,(0,l.aB)(e))}write(t,e){return(0,g.M)(this,t=t||{},e),t}setAtOrigin(t,e,i){(0,p.oY)(this).setAtOrigin(t,e,(0,l.aB)(i))}removeOrigin(t){const e=f(this),i=(0,l.aB)(t),r=e.keys(i);for(const t of r)e.originOf(t)===i&&e.set(t,e.get(t,i),7)}updateOrigin(t,e){const i=f(this),r=(0,l.aB)(e),n=(0,y.Jt)(this,t);for(let e=r+1;e<l.AU;++e)i.delete(t,e);i.set(t,n,r)}toJSON(t){return this.write({},t)}};return i=(0,r.Cg)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],i),i.prototype.toJSON.isDefaultToJSON=!0,i};function f(t){return(0,p.oY)(t).store}const v=t=>{const e=m(d(t));let i=class extends e{constructor(...t){super(...t)}};return i=(0,r.Cg)([(0,h.$)("esri.core.MultiOriginJSONSupport")],i),i},b=v(n.A)}}]);