@arcgis/core 4.28.0-next.20230920 → 4.28.0-next.20230921

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 (146) 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/1cbaba30f55f00f7498b.js +1 -0
  4. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +1 -0
  5. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +1 -0
  6. package/assets/esri/core/workers/chunks/{b428fcb53ecc82b49e66.js → 332689bf60d246485993.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{b558a402e2ce2616cf37.js → 3ca759f72d3bb29e9ea9.js} +22 -22
  8. package/assets/esri/core/workers/chunks/4339ce8aaf87fabb80cc.js +1 -0
  9. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +1 -0
  10. package/assets/esri/core/workers/chunks/43ba2bacd0f7d19915f7.js +1 -0
  11. package/assets/esri/core/workers/chunks/44b8e75593b7df1843e1.js +1 -0
  12. package/assets/esri/core/workers/chunks/53097659f31750c03a6d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{7c72d5368bb2d7484b9b.js → 580039dd491854ca325c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +1 -0
  15. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +1 -0
  16. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +1 -0
  17. package/assets/esri/core/workers/chunks/652749dc847fcb887234.js +1 -0
  18. package/assets/esri/core/workers/chunks/74d3ecb1a06d9f81e2c5.js +1 -0
  19. package/assets/esri/core/workers/chunks/7ea33aa455c5143affb1.js +1 -0
  20. package/assets/esri/core/workers/chunks/90771b0de3e520a1df9a.js +1 -0
  21. package/assets/esri/core/workers/chunks/a277c980ba8704939688.js +1 -0
  22. package/assets/esri/core/workers/chunks/bbc0dcd316c5598bc9ad.js +1 -0
  23. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +1 -0
  24. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +1 -0
  25. package/assets/esri/core/workers/chunks/{aa021bc97b4a18a749dd.js → cad260881653567bc8f9.js} +1 -1
  26. package/assets/esri/core/workers/chunks/cec607d0138351a4952e.js +1 -0
  27. package/assets/esri/core/workers/chunks/{f147269d85adfb4588ed.js → d9061beaa43065316062.js} +1 -1
  28. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +1 -0
  29. package/assets/esri/core/workers/chunks/{9c40e7ed387071544f8c.js → ed1fbc1bc8d50453e2f5.js} +1 -1
  30. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +1 -0
  31. package/assets/esri/images/portal/onlinemedialayer16.png +0 -0
  32. package/chunks/LaserlinePath.glsl.js +5 -1
  33. package/core/sql.js +1 -1
  34. package/interfaces.d.ts +1 -17
  35. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  36. package/layers/mixins/SceneService.js +1 -1
  37. package/layers/save/utils.js +1 -1
  38. package/layers/support/editableLayers.js +1 -1
  39. package/package.json +1 -1
  40. package/portal/PortalItem.js +1 -1
  41. package/rest/geometryService/cut.js +1 -1
  42. package/rest/query/operations/query.js +1 -1
  43. package/rest/versionManagement/deleteVersion.js +1 -1
  44. package/rest/versionManagement/gdbVersion/alterVersion.js +1 -1
  45. package/rest/versionManagement/gdbVersion/post.js +1 -1
  46. package/rest/versionManagement/gdbVersion/reconcile.js +1 -1
  47. package/rest/versionManagement/gdbVersion/serverVersionUtils.js +5 -0
  48. package/support/revision.js +1 -1
  49. package/views/2d/engine/Stage.js +1 -1
  50. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  51. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  52. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  53. package/views/3d/environment/LocalAtmosphere.js +1 -1
  54. package/views/3d/interactive/manipulatorUtils.js +1 -1
  55. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  56. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  57. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  58. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  59. package/views/3d/layers/MediaLayerView3D.js +1 -1
  60. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  61. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  62. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  63. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  64. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  65. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  66. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  67. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  68. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  69. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  70. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  71. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  72. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  73. package/views/3d/layers/support/patternUtils.js +1 -1
  74. package/views/3d/support/dito.js +1 -1
  75. package/views/3d/support/engineContent/line.js +1 -1
  76. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  77. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  78. package/views/3d/terrain/TerrainRenderer.js +1 -1
  79. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  80. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  81. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +6 -6
  82. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  83. package/views/3d/webgl-engine/lib/Attribute.js +1 -1
  84. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  85. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  86. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  87. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  88. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  89. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  90. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  91. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  92. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  93. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  94. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  95. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  96. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  97. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  98. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  99. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  100. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  101. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  102. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  103. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  104. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  105. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  106. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  107. package/views/draw/DrawGraphicTool.js +1 -1
  108. package/views/interactive/keybindings.js +1 -1
  109. package/views/interactive/tooltip/SketchTooltipInfo.js +1 -1
  110. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  111. package/views/interactive/tooltip/content/Fields.js +5 -0
  112. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  113. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  114. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  115. package/webdoc/saveAPIKeyUtils.js +5 -0
  116. package/webdoc/webdocSaveUtils.js +1 -1
  117. package/widgets/BasemapGallery.js +1 -1
  118. package/widgets/BasemapLayerList.js +1 -1
  119. package/widgets/Expand.js +1 -1
  120. package/widgets/Feature/FeatureRelationship.js +1 -1
  121. package/widgets/Fullscreen.js +1 -1
  122. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  123. package/widgets/Swipe.js +1 -1
  124. package/widgets/support/globalCss.js +1 -1
  125. package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +0 -1
  126. package/assets/esri/core/workers/chunks/084a85e2e31b4d5fa924.js +0 -1
  127. package/assets/esri/core/workers/chunks/1a449168d30a688e6128.js +0 -1
  128. package/assets/esri/core/workers/chunks/21f0fafafcd754f5fb88.js +0 -1
  129. package/assets/esri/core/workers/chunks/273167b2dd46e58b8739.js +0 -1
  130. package/assets/esri/core/workers/chunks/2bf58296a6ea4eee960b.js +0 -1
  131. package/assets/esri/core/workers/chunks/3c2c64832fb498bbaa83.js +0 -1
  132. package/assets/esri/core/workers/chunks/4b3a5cc435435c81e6a5.js +0 -1
  133. package/assets/esri/core/workers/chunks/56afd89d08c874f620a1.js +0 -1
  134. package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +0 -1
  135. package/assets/esri/core/workers/chunks/74ddc14e4b576ddbb582.js +0 -1
  136. package/assets/esri/core/workers/chunks/7f680cf24dd97d61bcd2.js +0 -1
  137. package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +0 -1
  138. package/assets/esri/core/workers/chunks/a838dc6653ec29503053.js +0 -1
  139. package/assets/esri/core/workers/chunks/b10a91cae610aba62bf8.js +0 -1
  140. package/assets/esri/core/workers/chunks/b8eb842ea98a9734e161.js +0 -1
  141. package/assets/esri/core/workers/chunks/bbb63392485ed57703e0.js +0 -1
  142. package/assets/esri/core/workers/chunks/bdf13091bd0e1ab0db7e.js +0 -1
  143. package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +0 -1
  144. package/assets/esri/core/workers/chunks/e54ae2a4281dd58e0707.js +0 -1
  145. package/assets/esri/core/workers/chunks/e5fcfd41f0ec12dcb7f2.js +0 -1
  146. package/assets/esri/core/workers/chunks/f07a0ea10428adecea1a.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9327],{92835:(e,t,r)=>{r.d(t,{Z:()=>y});var i,o=r(43697),n=r(96674),s=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),c=r(30556);let p=i=class extends n.wq{static get allTime(){return d}static get empty(){return h}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,o=e.end?.getTime()??e.end;return t===i&&r===o}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.JE)(r,e,t));let o=this.end;if(o){const r=(0,s.JE)(o,e,t);o=o.getTime()===r.getTime()?r:(0,s.Nm)(r,1,e,t)}return new i({start:r,end:o})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,o=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let s,a;if(o>=t&&o<=r?s=o:t>=o&&t<=n&&(s=t),r>=o&&r<=n?a=r:n>=t&&n<=r&&(a=n),null!=s&&null!=a&&!isNaN(s)&&!isNaN(a)){const e=new i;return e.start=s===-1/0?null:new Date(s),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime)return this.clone();const o=new i,{start:n,end:a}=this;return null!=n&&(o.start=(0,s.Nm)(n,e,t,r)),null!=a&&(o.end=(0,s.Nm)(a,e,t,r)),o}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,o._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,o._)([(0,l.r)("end")],p.prototype,"readEnd",null),(0,o._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,o._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,o._)([(0,l.r)("start")],p.prototype,"readStart",null),(0,o._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=i=(0,o._)([(0,u.j)("esri.TimeExtent")],p);const d=new p,h=new p({start:void 0,end:void 0}),y=p},46521:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,i,o,n,s,a,l){return[e,t,r,i,o,n,s,a,l]}function n(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>i,c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:n,fromValues:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{a:()=>h,c:()=>g,g:()=>c,j:()=>M,k:()=>m,m:()=>p,s:()=>u});var i=r(46521),o=r(94961),n=r(65617),s=r(46851),a=r(17896),l=r(98766);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.g)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],o=t[1],n=t[2],s=t[3],a=r[0],l=r[1],u=r[2],c=r[3];return e[0]=i*c+s*a+o*u-n*l,e[1]=o*c+s*l+n*a-i*u,e[2]=n*c+s*u+i*l-o*a,e[3]=s*c-i*a-o*l-n*u,e}function d(e,t,r,i){const o=t[0],n=t[1],a=t[2],l=t[3];let u,c,p,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return c=o*y+n*m+a*g+l*f,c<0&&(c=-c,y=-y,m=-m,g=-g,f=-f),1-c>(0,s.g)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*o+h*y,e[1]=d*n+h*m,e[2]=d*a+h*g,e[3]=d*l+h*f,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,n=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*n+n]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+n]-t[3*n+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[n]=(t[3*n+r]+t[3*r+n])*i}return e}function m(e,t,r,i){const o=.5*Math.PI/180;t*=o,r*=o,i*=o;const n=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=n*l*c-s*a*u,e[1]=s*a*c+n*l*u,e[2]=s*l*u-n*a*c,e[3]=s*l*c+n*a*u,e}const g=l.c,f=l.s,b=l.a,v=p,w=l.b,S=l.d,_=l.l,x=l.f,C=x,j=l.g,V=j,I=l.n,M=l.h,T=l.e,z=(0,n.c)(),R=(0,n.f)(1,0,0),q=(0,n.f)(0,1,0),N=(0,o.a)(),D=(0,o.a)(),Z=(0,i.a)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(e,t){const r=t[0],i=t[1],o=t[2];return e[0]=r,e[1]=i,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-o*o)),e},conjugate:h,copy:g,dot:S,equals:T,exactEquals:M,fromEuler:m,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],o=t[2],n=t[3],s=r*r+i*i+o*o+n*n,a=s?1/s:0;return e[0]=-r*a,e[1]=-i*a,e[2]=-o*a,e[3]=n*a,e},len:C,length:x,lerp:_,mul:v,multiply:p,normalize:I,random:function(e){const t=s.R,r=t(),i=t(),o=t(),n=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*i),e[1]=n*Math.cos(2*Math.PI*i),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+s*a,e[1]=o*l+n*a,e[2]=n*l-o*a,e[3]=s*l-i*a,e},rotateY:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l-n*a,e[1]=o*l+s*a,e[2]=n*l+i*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+o*a,e[1]=o*l-i*a,e[2]=n*l+s*a,e[3]=s*l-n*a,e},rotationTo:function(e,t,r){const i=(0,a.j)(t,r);return i<-.999999?((0,a.b)(z,R,t),(0,a.k)(z)<1e-6&&(0,a.b)(z,q,t),(0,a.n)(z,z),u(e,z,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.b)(z,t,r),e[0]=z[0],e[1]=z[1],e[2]=z[2],e[3]=1+i,I(e,e))},scale:w,set:f,setAxes:function(e,t,r,i){const o=Z;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=i[0],o[4]=i[1],o[7]=i[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],I(e,y(e,o))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,o,n){return d(N,t,o,n),d(D,r,i,n),d(e,N,D,2*n*(1-n)),e},sqrLen:V,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function i(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function n(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>i,b:()=>o,c:()=>n});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:i,createView:n,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>l,St:()=>o,VL:()=>s,h$:()=>n,rW:()=>u});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return!!i[e]||!!i[e.toLowerCase()]}function n(e){return i[e]??i[e.toLowerCase()]}function s(e){return[...n(e)]}function a(e,t,r){r<0&&++r,r>1&&--r;const i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,i=1){const o=(e%360+360)%360/360,n=r<=.5?r*(t+1):r+t-r*t,s=2*r-n;return[Math.round(255*a(s,n,o+1/3)),Math.round(255*a(s,n,o)),Math.round(255*a(s,n,o-1/3)),i]}function u(e){const t=e.length>5,r=t?8:4,i=(1<<r)-1,o=t?1:17,n=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return n&&(l=s&i,s>>=r,a[3]=o*l/255),l=s&i,s>>=r,a[2]=o*l,l=s&i,s>>=r,a[1]=o*l,l=s&i,s>>=r,a[0]=o*l,a}},68251:(e,t,r)=>{r.d(t,{BV:()=>s});var i=r(22021);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,o=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),o&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.uZ)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}n(new o(0,2*Math.PI)),n(new o(-Math.PI,Math.PI));const s=n(new o(0,360))},44543:(e,t,r)=>{r.d(t,{F:()=>m,M:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},o=8,n=(1<<o)-1;function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*o;r<i;r+=o)t[r>>5]|=(e.charCodeAt(r/o)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=o)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function u(e,t,r,i,o,n){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,n)),o),r)}function c(e,t,r,i,o,n,s){return u(t&r|~t&i,e,t,o,n,s)}function p(e,t,r,i,o,n,s){return u(t&i|r&~i,e,t,o,n,s)}function d(e,t,r,i,o,n,s){return u(t^r^i,e,t,o,n,s)}function h(e,t,r,i,o,n,s){return u(r^(t|~i),e,t,o,n,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,o=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,u=o,y=n;r=c(r,i,o,n,e[t],7,-680876936),n=c(n,r,i,o,e[t+1],12,-389564586),o=c(o,n,r,i,e[t+2],17,606105819),i=c(i,o,n,r,e[t+3],22,-1044525330),r=c(r,i,o,n,e[t+4],7,-176418897),n=c(n,r,i,o,e[t+5],12,1200080426),o=c(o,n,r,i,e[t+6],17,-1473231341),i=c(i,o,n,r,e[t+7],22,-45705983),r=c(r,i,o,n,e[t+8],7,1770035416),n=c(n,r,i,o,e[t+9],12,-1958414417),o=c(o,n,r,i,e[t+10],17,-42063),i=c(i,o,n,r,e[t+11],22,-1990404162),r=c(r,i,o,n,e[t+12],7,1804603682),n=c(n,r,i,o,e[t+13],12,-40341101),o=c(o,n,r,i,e[t+14],17,-1502002290),i=c(i,o,n,r,e[t+15],22,1236535329),r=p(r,i,o,n,e[t+1],5,-165796510),n=p(n,r,i,o,e[t+6],9,-1069501632),o=p(o,n,r,i,e[t+11],14,643717713),i=p(i,o,n,r,e[t],20,-373897302),r=p(r,i,o,n,e[t+5],5,-701558691),n=p(n,r,i,o,e[t+10],9,38016083),o=p(o,n,r,i,e[t+15],14,-660478335),i=p(i,o,n,r,e[t+4],20,-405537848),r=p(r,i,o,n,e[t+9],5,568446438),n=p(n,r,i,o,e[t+14],9,-1019803690),o=p(o,n,r,i,e[t+3],14,-187363961),i=p(i,o,n,r,e[t+8],20,1163531501),r=p(r,i,o,n,e[t+13],5,-1444681467),n=p(n,r,i,o,e[t+2],9,-51403784),o=p(o,n,r,i,e[t+7],14,1735328473),i=p(i,o,n,r,e[t+12],20,-1926607734),r=d(r,i,o,n,e[t+5],4,-378558),n=d(n,r,i,o,e[t+8],11,-2022574463),o=d(o,n,r,i,e[t+11],16,1839030562),i=d(i,o,n,r,e[t+14],23,-35309556),r=d(r,i,o,n,e[t+1],4,-1530992060),n=d(n,r,i,o,e[t+4],11,1272893353),o=d(o,n,r,i,e[t+7],16,-155497632),i=d(i,o,n,r,e[t+10],23,-1094730640),r=d(r,i,o,n,e[t+13],4,681279174),n=d(n,r,i,o,e[t],11,-358537222),o=d(o,n,r,i,e[t+3],16,-722521979),i=d(i,o,n,r,e[t+6],23,76029189),r=d(r,i,o,n,e[t+9],4,-640364487),n=d(n,r,i,o,e[t+12],11,-421815835),o=d(o,n,r,i,e[t+15],16,530742520),i=d(i,o,n,r,e[t+2],23,-995338651),r=h(r,i,o,n,e[t],6,-198630844),n=h(n,r,i,o,e[t+7],10,1126891415),o=h(o,n,r,i,e[t+14],15,-1416354905),i=h(i,o,n,r,e[t+5],21,-57434055),r=h(r,i,o,n,e[t+12],6,1700485571),n=h(n,r,i,o,e[t+3],10,-1894986606),o=h(o,n,r,i,e[t+10],15,-1051523),i=h(i,o,n,r,e[t+1],21,-2054922799),r=h(r,i,o,n,e[t+8],6,1873313359),n=h(n,r,i,o,e[t+15],10,-30611744),o=h(o,n,r,i,e[t+6],15,-1560198380),i=h(i,o,n,r,e[t+13],21,1309151649),r=h(r,i,o,n,e[t+4],6,-145523070),n=h(n,r,i,o,e[t+11],10,-1120210379),o=h(o,n,r,i,e[t+2],15,718787259),i=h(i,o,n,r,e[t+9],21,-343485551),r=s(r,a),i=s(i,l),o=s(o,u),n=s(n,y)}return[r,i,o,n]}function m(e,t=i.Hex){const r=t||i.Base64,n=y(a(e),e.length*o);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,o=4*e.length;i<o;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let o=0;o<4;o++)8*r+6*o>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-o)&63))}return t.join("")}(n)}}},28576:(e,t,r)=>{r.d(t,{B:()=>h});var i=r(20102),o=r(44543),n=r(81153),s=r(17452),a=r(41123),l=r(7628),u=r(31263),c=r(5600),p=r(66094),d=r(25929);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const o=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.Oe)(t,r);return{type:String,read:(e,t,r)=>{const o=(0,d.r)(e,t,r);return i.type===String?o:"function"==typeof i.type?new i.type({url:o}):void 0},write:{writer(t,o,a,l){if(!l||!l.resources)return"string"==typeof t?void(o[a]=(0,d.t)(t,l)):void(o[a]=t.write({},l));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...l,verifyItemRelativeUrls:l&&l.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,n.l)(this)||l&&l.origin&&this.originIdOf(r)>(0,u.M9)(l.origin)),b={object:this,propertyName:r,value:t,targetUrl:h,dest:o,targetPropertyName:a,context:l,params:e};l&&l.portalItem&&h&&!(0,s.YP)(h)?f&&e?.contentAddressed?y(b):f?function(e){const{context:t,targetUrl:r,params:i,value:o,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=g(o,r,t),c=(0,p.B)(u),d=(0,s.Ml)(l.path),h=i?.compress??!1;c===d?(t.resources&&m({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):l&&l.portalItem&&(null==h||null!=(0,d.i)(h)||(0,s.jc)(h)||f)?y(b):o[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.a;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.CJ)(r,e,i);for(const e in o)t[e]=o[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:u,targetPropertyName:c}=e;if(!l.portalItem)return;const h=(0,d.p)(t),y=g(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.Z("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const f=r?.contentAddressed&&"json"===y.type?(0,o.F)(y.jsonString):h?.filename??(0,a.D)(),b=(0,s.v_)(r?.prefix??h?.prefix,f),v=`${b}.${(0,p.B)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find((e=>e.resource.path===v))??l.resources.toAdd.find((e=>e.resource.path===v));if(e)return void(u[c]=e.resource.itemRelativeUrl)}const w=l.portalItem.resourceFromPath(v);(0,s.jc)(t)&&l.resources&&l.resources.pendingOperations.push((0,s.gi)(t).then((e=>{w.path=`${b}.${(0,p.B)({type:"blob",blob:e})}`,u[c]=w.itemRelativeUrl})).catch((()=>{})));const S=r?.compress??!1;l.resources&&m({...e,resource:w,content:y,compress:S,updates:l.resources.toAdd}),u[c]=w.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:o,compress:n}){r.push({resource:i,content:o,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},70921:(e,t,r)=>{r.d(t,{R:()=>n,Z:()=>o});var i=r(46791);function o(e,t,r=i.Z){return t||(t=new r),t===e||(t.removeAll(),(o=e)&&(Array.isArray(o)||"items"in o&&Array.isArray(o.items))?t.addMany(e):e&&t.add(e)),t;var o}function n(e){return e}},35463:(e,t,r)=>{r.d(t,{JE:()=>a,Nm:()=>s,rJ:()=>l});var i=r(90344),o=r(17126);const n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function s(e,t,r,n="system"){const s=new o.vF((0,i.f1)(n)),a=o.ou.fromJSDate(e,{zone:s}),l="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),a.plus({[l]:t}).toJSDate()}function a(e,t,r="system"){const n=new o.vF((0,i.f1)(r)),s=o.ou.fromJSDate(e,{zone:n});if("decades"===t||"centuries"===t){const e=s.startOf("year"),{year:r}=e,i=r-r%("decades"===t?10:100);return e.set({year:i}).toJSDate()}const a=u(t);return s.startOf(a).toJSDate()}function l(e,t,r){return 0===e?0:e*n[t]/n[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},41123:(e,t,r)=>{r.d(t,{D:()=>o,z:()=>n});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var i,o=r(43697),n=r(67676),s=r(35454),a=r(96674),l=r(67900),u=r(20941),c=r(5600),p=(r(75215),r(80442),r(71715)),d=r(52011),h=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.e$)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new u.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||g.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function b(e,t){return new u.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,c.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,o._)([(0,h.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,o._)([(0,p.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,o._)([(0,c.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,o._)([(0,p.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,o._)([(0,p.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,o._)([(0,c.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,o._)([(0,p.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,o._)([(0,d.j)("esri.geometry.HeightModelInfo")],f);const v=f},90344:(e,t,r)=>{r.d(t,{Xr:()=>y,Ze:()=>b,f1:()=>w,p6:()=>v});var i=r(35454),o=r(70171),n=r(15512);r(17126);const s=Intl.DateTimeFormat().resolvedOptions().timeZone,a=(n.pt,{year:"numeric",month:"numeric",day:"numeric"}),l={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},c={year:"numeric",month:"long",weekday:"long",day:"numeric"},p={hour:"numeric",minute:"numeric"},d={...p,second:"numeric"},h={"short-date":a,"short-date-short-time":{...a,...p},"short-date-short-time-24":{...a,...p,hour12:!1},"short-date-long-time":{...a,...d},"short-date-long-time-24":{...a,...d,hour12:!1},"short-date-le":a,"short-date-le-short-time":{...a,...p},"short-date-le-short-time-24":{...a,...p,hour12:!1},"short-date-le-long-time":{...a,...d},"short-date-le-long-time-24":{...a,...d,hour12:!1},"long-month-day-year":l,"long-month-day-year-short-time":{...l,...p},"long-month-day-year-short-time-24":{...l,...p,hour12:!1},"long-month-day-year-long-time":{...l,...d},"long-month-day-year-long-time-24":{...l,...d,hour12:!1},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...p},"day-short-month-year-short-time-24":{...u,...p,hour12:!1},"day-short-month-year-long-time":{...u,...d},"day-short-month-year-long-time-24":{...u,...d,hour12:!1},"long-date":c,"long-date-short-time":{...c,...p},"long-date-short-time-24":{...c,...p,hour12:!1},"long-date-long-time":{...c,...d},"long-date-long-time-24":{...c,...d,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":p,"long-time":d},y=(0,i.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),m={ar:"ar-u-nu-latn-ca-gregory"};let g=new WeakMap;const f=h["short-date-short-time"];function b(e){return h[e]}function v(e,t=f){return function(e){let t=g.get(e);if(!t){const r=(0,o.Kd)(),i=m[r]||r,s=w(e.timeZone??n.By),a={...e,timeZone:s};t=new Intl.DateTimeFormat(i,a),g.set(e,t)}return t}(t).format(e)}function w(e){switch(e){case n.By:return s;case n._4:return n.pt;default:return e}}(0,o.Ze)((()=>{g=new WeakMap}))},28865:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ye});var i=r(43697),o=r(51773),n=r(46791),s=r(20102),a=r(92604),l=r(16453),u=r(95330),c=r(5600),p=r(75215),d=(r(67676),r(80442),r(71715)),h=r(52011),y=r(17896),m=r(65617),g=r(6570),f=r(87085),b=r(54295),v=r(17287),w=r(38009),S=r(16859),_=r(72965),x=r(20559),C=r(66677),j=r(21506),V=r(1231),I=r(2368),M=r(68251),T=r(96674),z=r(28576),R=r(51305),q=r(94961),N=r(46851);const D=(0,m.c)(),Z=(0,q.a)(),P=(0,q.a)(),F=(0,q.a)(),A=(0,m.f)(0,0,1),k=(0,m.f)(0,1,0),L=(0,m.f)(1,0,0);function E(e){(0,y.c)(D,e),(0,y.n)(D,D);const t=Math.atan2(D[1],D[0]),r=(0,R.s)((0,q.a)(),A,-t);(0,y.v)(D,D,r);const i=-1*Math.atan2(D[2],D[0]);return[(0,N.a)(t)+270,(0,N.a)(i)+90]}function U(e,t){return(0,R.s)(P,A,(0,N.t)(e-270)),(0,R.s)(F,k,(0,N.t)(t-90)),(0,R.m)(Z,P,F),(0,y.c)(D,L),(0,y.v)(D,D,Z),(0,y.n)(D,D),[D[0],D[1],D[2]]}var B=r(90578);let O=class extends((0,I.J)(T.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return M.BV.normalize((0,p.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return M.BV.normalize((0,p.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],O.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],O.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.p)((e=>M.BV.normalize((0,p.q9)(e),0,!0)))],O.prototype,"orientation",null),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.p)((e=>M.BV.normalize((0,p.q9)(e),0,!0)))],O.prototype,"tilt",null),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],O.prototype,"normal",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],O.prototype,"point",void 0),O=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSlice")],O);const H=O;var J=r(25929);let $=class extends((0,I.J)(T.wq)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return M.BV.normalize((0,p.q9)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return M.BV.normalize((0,p.q9)(t),0,!0)}};(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!0,write:!0}})],$.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{origins:{service:{read:J.r}},write:{enabled:!0,isRequired:!0}}}),(0,z.B)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],$.prototype,"href",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],$.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],$.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],$.prototype,"orientation",null),(0,i._)([(0,c.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],$.prototype,"tilt",null),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],$.prototype,"normal",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],$.prototype,"point",void 0),(0,i._)([(0,c.Cb)({type:[p.z8],json:{write:{enabled:!0,isRequired:!0}}})],$.prototype,"sizeInPixel",void 0),(0,i._)([(0,c.Cb)({type:[H],json:{write:!0}})],$.prototype,"slices",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{default:0,write:!0}})],$.prototype,"timeId",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],$.prototype,"variableId",void 0),$=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSection")],$);const Y=$;let W=class extends T.wq{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],W.prototype,"diffuseFactor",void 0),(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],W.prototype,"specularFactor",void 0),W=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSimpleShading")],W);const K=W;let X=class extends T.wq{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,c.Cb)({type:["discrete","continuous"],json:{write:!0}})],X.prototype,"continuity",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],X.prototype,"hasNoData",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],X.prototype,"noData",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],X.prototype,"offset",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],X.prototype,"scale",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelFormat")],X);const G=X;let Q=class extends T.wq{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Q.prototype,"description",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"name",void 0),(0,i._)([(0,c.Cb)({type:G,json:{write:!0}})],Q.prototype,"originalFormat",void 0),(0,i._)([(0,c.Cb)({type:G,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"renderingFormat",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Q.prototype,"unit",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],Q.prototype,"volumeId",void 0),(0,i._)([(0,c.Cb)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],Q.prototype,"type",void 0),Q=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVariable")],Q);const ee=Q;var te=r(22974),re=r(22303);let ie=class extends((0,I.J)(T.wq)){constructor(){super(...arguments),this.color=re.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,c.Cb)({type:re.Z,json:{type:[p.z8],write:{enabled:!0,isRequired:!0}}})],ie.prototype,"color",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ie.prototype,"value",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!0,write:!0}})],ie.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],ie.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!1,write:!0}})],ie.prototype,"colorLocked",void 0),ie=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelIsosurface")],ie);const oe=ie;var ne=r(70921),se=r(22021);let ae=class extends((0,I.J)(T.wq)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,c.Cb)({type:re.Z,json:{type:[p.z8],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelColorStop")],ae);const le=ae;let ue=class extends((0,I.J)(T.wq)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,c.Cb)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ue.prototype,"opacity",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ue.prototype,"position",void 0),ue=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelOpacityStop")],ue);const ce=ue;let pe=class extends((0,I.J)(T.wq)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!1,write:!0}})],pe.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],pe.prototype,"range",void 0),pe=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelRangeFilter")],pe);const de=pe;var he,ye;(ye=he||(he={}))[ye.Color=1]="Color",ye[ye.Alpha=2]="Alpha",ye[ye.Both=3]="Both";let me=class extends((0,I.J)(T.wq)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(n.Z.ofType(le)),this.opacityStops=new(n.Z.ofType(ce))}set colorStops(e){this._set("colorStops",(0,ne.Z)(e,this._get("colorStops"),n.Z.ofType(le)))}set opacityStops(e){this._set("opacityStops",(0,ne.Z)(e,this._get("opacityStops"),n.Z.ofType(ce)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==he.Both;);let o=e;const n=t.length;for(;++o<n&&t[o].type!==r&&t[o].type!==he.Both;);return[i,o]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:he.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,se.uZ)(e.position,0,1),i=Math.round(255*(0,se.uZ)(1-e.opacity,0,1));let o=!1;for(const e of r)if(e.type===he.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=he.Both,o=!0;break}o||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:he.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==he.Both)if(i.type===he.Color){const[o,n]=this.getPreviousNext(t,r,he.Alpha);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position);i.color.a=Math.round((0,se.t7)(r[o].color.a,r[n].color.a,e))}else i.color.a=-1!==o?r[o].color.a:r[n].color.a}else{const[o,n]=this.getPreviousNext(t,r,he.Color);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position),t=r[o].color,s=r[n].color;fe.forEach((r=>{i.color[r]=Math.round((0,se.t7)(t[r],s[r],e))}))}else-1!==o?fe.forEach((e=>{i.color[e]=r[o].color[e]})):fe.forEach((e=>{i.color[e]=r[n].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,o=1;for(let r=0;r<this._colorMapSize;++r){const n=r/this._colorMapSize;for(;n>t[o].position;)i=o++;const s=(n-t[i].position)/(t[o].position-t[i].position),a=t[i].color,l=t[o].color,u=new re.Z;fe.forEach((e=>{u[e]=Math.round((0,se.t7)(a[e],l[e],s))})),u.a=(0,se.uZ)(1-(0,se.t7)(a.a,l.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],o=this.stretchRange[1];if(i>o){const e=i;i=o,o=e}e=(0,se.uZ)(e,i,o);const n=r[Math.round((e-i)/(o-i)*(this._colorMapSize-1))].clone();return t||(n.a=1),n}};(0,i._)([(0,c.Cb)({type:["linear","nearest"],json:{write:!0}})],me.prototype,"interpolation",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],me.prototype,"stretchRange",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],me.prototype,"colorStops",null),(0,i._)([(0,c.Cb)({type:n.Z.ofType(ce),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],me.prototype,"opacityStops",null),(0,i._)([(0,c.Cb)({type:de,json:{write:!0}})],me.prototype,"rangeFilter",void 0),(0,i._)([(0,c.Cb)({type:[re.Z],clonable:!1,json:{read:!1}})],me.prototype,"rasterizedTransferFunction",null),me=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelTransferFunctionStyle")],me);const ge=me,fe=["r","g","b"];let be=class extends((0,I.J)(T.wq)){constructor(){super(...arguments),this.color=re.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,c.Cb)({type:re.Z,json:{type:[p.z8],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelUniqueValue")],be);const ve=be;var we;let Se=we=class extends T.wq{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(n.Z.ofType(ve)),this.isosurfaces=new(n.Z.ofType(oe))}clone(){return new we({variableId:this.variableId,label:this.label,transferFunction:(0,te.d9)(this.transferFunction),uniqueValues:(0,te.d9)(this.uniqueValues),isosurfaces:(0,te.d9)(this.isosurfaces)})}};(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],Se.prototype,"variableId",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Se.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:ge,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],Se.prototype,"transferFunction",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(ve),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],Se.prototype,"uniqueValues",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(oe),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],Se.prototype,"isosurfaces",void 0),Se=we=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVariableStyle")],Se);const _e=Se;var xe=r(94139),Ce=r(82971),je=r(8744);let Ve=class extends T.wq{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],Ve.prototype,"values",void 0),Ve=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelIrregularSpacing")],Ve);const Ie=Ve;let Me=class extends T.wq{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],Me.prototype,"scale",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],Me.prototype,"offset",void 0),Me=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelRegularSpacing")],Me);const Te=Me;let ze=class extends T.wq{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,c.Cb)({type:Ie,json:{write:!0}})],ze.prototype,"irregularSpacing",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],ze.prototype,"isPositiveUp",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],ze.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],ze.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],ze.prototype,"name",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],ze.prototype,"quantity",void 0),(0,i._)([(0,c.Cb)({type:Te,json:{write:!0}})],ze.prototype,"regularSpacing",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],ze.prototype,"size",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],ze.prototype,"unit",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{read:!1}})],ze.prototype,"isRegular",null),ze=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelDimension")],ze);const Re=ze,qe="esri.layers.voxel.VoxelVolume",Ne=a.Z.getLogger(qe);let De=class extends T.wq{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=Ce.Z.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],o=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)o[e]<2?o[e]=1:o[e]-=1;return r.isRegular&&!r.isPositiveUp&&(o[2]*=-1),[(e[1]-e[0])/o[0],(t[1]-t[0])/o[1],(i[1]-i[0])/o[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return Ne.error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,je.fS)(this.spatialReference,e.spatialReference))return Ne.error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.f)(e.x,e.y,e.z??0);(0,y.f)(t,t,this.originInLayerSpace3D),(0,y.B)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,o=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,s=o.reduce(((e,t)=>Math.abs(n*t-i)<Math.abs(n*e-i)?t:e));for(let e=0;e<o.length;++e)if(o[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.Z({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.e)(e);if((0,y.A)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.Z({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new xe.Z({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:[Re],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"dimensions",void 0),(0,i._)([(0,c.Cb)({type:Ce.Z,json:{read:{enabled:!1}}})],De.prototype,"spatialReference",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1}})],De.prototype,"zDimension",null),(0,i._)([(0,c.Cb)({type:[Boolean],json:{read:!1}})],De.prototype,"isValid",null),(0,i._)([(0,c.Cb)({type:[Number],json:{read:!1}})],De.prototype,"originInLayerSpace3D",null),(0,i._)([(0,c.Cb)({type:[Number],json:{read:!1}})],De.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,c.Cb)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],De.prototype,"volumeType",null),(0,i._)([(0,c.Cb)({type:[Number],json:{read:!1}})],De.prototype,"sizeInVoxels",null),De=(0,i._)([(0,h.j)(qe)],De);const Ze=De;var Pe;let Fe=Pe=class extends T.wq{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Pe;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"apronWidth",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"brickSize",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"maxLodLevel",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"nodeSize",void 0),Fe=Pe=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVolumeIndex")],Fe);const Ae=Fe;let ke=class extends((0,I.J)(T.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return M.BV.normalize((0,p.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return M.BV.normalize((0,p.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!0,write:!0}})],ke.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],ke.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.p)((e=>M.BV.normalize((0,p.q9)(e),0,!0)))],ke.prototype,"orientation",null),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,B.p)((e=>M.BV.normalize((0,p.q9)(e),0,!0)))],ke.prototype,"tilt",null),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],ke.prototype,"normal",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],ke.prototype,"point",void 0),ke=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelDynamicSection")],ke);const Le=ke;var Ee;let Ue=Ee=class extends T.wq{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(n.Z.ofType(H)),this.dynamicSections=new(n.Z.ofType(Le))}set slices(e){this._set("slices",(0,ne.Z)(e,this._get("slices"),n.Z.ofType(H)))}set dynamicSections(e){this._set("dynamicSections",(0,ne.Z)(e,this._get("dynamicSections"),n.Z.ofType(Le)))}clone(){return new Ee({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,te.d9)(this.slices),dynamicSections:(0,te.d9)(this.dynamicSections)})}};(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],Ue.prototype,"volumeId",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{default:1,write:!0}})],Ue.prototype,"verticalExaggeration",void 0),(0,i._)([(0,c.Cb)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ue.prototype,"exaggerationMode",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{default:0,write:!0}})],Ue.prototype,"verticalOffset",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(H),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ue.prototype,"slices",null),(0,i._)([(0,c.Cb)({type:n.Z.ofType(Le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ue.prototype,"dynamicSections",null),Ue=Ee=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVolumeStyle")],Ue);const Be=Ue;var Oe=r(32163);const He="esri.layers.VoxelLayer",Je=a.Z.getLogger(He);let $e=class extends((0,x.Vt)((0,v.Y)((0,w.q)((0,S.I)((0,_.M)((0,l.R)((0,b.V)(f.Z)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new K,this.opacity=1,this.variables=new n.Z,this.volumes=new n.Z,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.test=null,this.volumeStyles=new(n.Z.ofType(Be)),this.variableStyles=new(n.Z.ofType(_e)),this.sections=new(n.Z.ofType(Y))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,C.Nm)(e,Je))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.r9).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new s.Z("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new s.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new s.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.Z.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Ze.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new V.Z({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new V.Z({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new V.Z({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new V.Z({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new V.Z({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new V.Z({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get popupTemplate(){return this.loaded?this.createPopupTemplate():null}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Oe.eZ)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const o=this.variableStyles.findIndex((t=>t.variableId===e));if(o<0)return null;const n=this.variableStyles.at(o);return n?.transferFunction?n.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new Y({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),Je.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&Je.error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(Je.error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)Je.error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else Je.error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else Je.error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,m.f)(e.normal[0],e.normal[1],e.normal[2]);return(0,y.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,c.Cb)({type:["Voxel"]})],$e.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.Cb)(j.rn)],$e.prototype,"legendEnabled",void 0),(0,i._)([(0,c.Cb)({json:{write:!0}})],$e.prototype,"title",void 0),(0,i._)([(0,c.Cb)(j.HQ)],$e.prototype,"url",null),(0,i._)([(0,c.Cb)({type:n.Z.ofType(Y),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],$e.prototype,"sections",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],$e.prototype,"currentVariableId",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(Be),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],$e.prototype,"volumeStyles",void 0),(0,i._)([(0,c.Cb)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],$e.prototype,"renderMode",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(_e),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],$e.prototype,"variableStyles",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],$e.prototype,"enableSlices",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],$e.prototype,"enableSections",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],$e.prototype,"enableDynamicSections",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],$e.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,c.Cb)({type:K,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],$e.prototype,"shading",void 0),(0,i._)([(0,c.Cb)({type:["show","hide"]})],$e.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],$e.prototype,"opacity",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(ee)})],$e.prototype,"variables",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(Ze)})],$e.prototype,"volumes",void 0),(0,i._)([(0,c.Cb)({type:Ae})],$e.prototype,"index",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],$e.prototype,"minScale",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],$e.prototype,"maxScale",void 0),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0})],$e.prototype,"type",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{name:"serviceVersion"}})],$e.prototype,"version",void 0),(0,i._)([(0,d.r)("service","version")],$e.prototype,"readVersion",null),(0,i._)([(0,c.Cb)({type:g.Z})],$e.prototype,"fullExtent",void 0),(0,i._)([(0,d.r)("service","fullExtent",["fullExtent"])],$e.prototype,"readFullExtent",null),(0,i._)([(0,c.Cb)({readOnly:!0,clonable:!1,json:{read:!1}})],$e.prototype,"voxelFields",null),(0,i._)([(0,c.Cb)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],$e.prototype,"popupEnabled",void 0),(0,i._)([(0,c.Cb)({type:o.Z,json:{read:!1}})],$e.prototype,"popupTemplate",null),(0,i._)([(0,c.Cb)({readOnly:!0})],$e.prototype,"defaultPopupTemplate",null),$e=(0,i._)([(0,h.j)(He)],$e);const Ye=$e},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),o=r(68773),n=r(40330),s=r(3172),a=r(66643),l=r(20102),u=r(92604),c=r(70586),p=r(95330),d=r(17452),h=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),g=r(30556),f=r(84230),b=r(48522),v=r(15235),w=r(86082),S=r(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!o.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,S.Ss)(r);let o,s;if(i)o=r.portal.url;else try{o=await(0,f.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!o||!(0,d.Zo)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return(0,S.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=b.Z.getDefault();if(o&&o.loaded&&(0,d.Fv)(o.restUrl)===(0,d.Fv)(i))return o.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.q6)((0,s.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?w.Z.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},72965:(e,t,r)=>{r.d(t,{M:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},66094:(e,t,r)=>{r.d(t,{B:()=>o});var i=r(17452);function o(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Ml)(e);return l[t]||s}(e.url)}(e)]||a}const n={},s="text/plain",a=n[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},32163:(e,t,r)=>{r.d(t,{eZ:()=>u});var i=r(51773),o=r(35671),n=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(29986);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new a.Z({fieldName:t.name,isEditable:(0,o.Hp)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!m.length)return null;const g=function(e){const t=(0,o.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.Z,new n.Z];return new i.Z({title:g,content:f,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,o.Fv)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"string":return(0,o.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]},15512:(e,t,r)=>{r.d(t,{By:()=>i,_4:()=>o,pt:()=>n});const i="system",o="unknown",n="UTC"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1537],{92835:(e,t,r)=>{r.d(t,{Z:()=>y});var o,n=r(43697),i=r(96674),s=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556);let c=o=class extends i.wq{static get allTime(){return d}static get empty(){return h}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(o.allTime)}get isEmpty(){return this.equals(o.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new o({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,o=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===o&&r===n}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.JE)(r,e,t));let n=this.end;if(n){const r=(0,s.JE)(n,e,t);n=n.getTime()===r.getTime()?r:(0,s.Nm)(r,1,e,t)}return new o({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return o.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,i=e.end?.getTime()??1/0;let s,a;if(n>=t&&n<=r?s=n:t>=n&&t<=i&&(s=t),r>=n&&r<=i?a=r:i>=t&&i<=r&&(a=i),null!=s&&null!=a&&!isNaN(s)&&!isNaN(a)){const e=new o;return e.start=s===-1/0?null:new Date(s),e.end=a===1/0?null:new Date(a),e}return o.empty}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime)return this.clone();const n=new o,{start:i,end:a}=this;return null!=i&&(n.start=(0,s.Nm)(i,e,t,r)),null!=a&&(n.end=(0,s.Nm)(a,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new o({start:t,end:r})}};(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,n._)([(0,l.r)("end")],c.prototype,"readEnd",null),(0,n._)([(0,p.c)("end")],c.prototype,"writeEnd",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,n._)([(0,l.r)("start")],c.prototype,"readStart",null),(0,n._)([(0,p.c)("start")],c.prototype,"writeStart",null),c=o=(0,n._)([(0,u.j)("esri.TimeExtent")],c);const d=new c,h=new c({start:void 0,end:void 0}),y=c},10699:(e,t,r)=>{r.d(t,{IG:()=>s,iv:()=>a});var o=r(43697),n=r(52011);let i=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+i++})}};return t=(0,o._)([(0,n.j)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:i++})}};return t=(0,o._)([(0,n.j)("esri.core.NumericIdentifiable")],t),t};let l=class extends(s(class{})){};l=(0,o._)([(0,n.j)("esri.core.Identifiable")],l)},44543:(e,t,r)=>{r.d(t,{F:()=>m,M:()=>o});const o={Base64:0,Hex:1,String:2,Raw:3},n=8,i=(1<<n)-1;function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,o=e.length*n;r<o;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&i)<<r%32;return t}function l(e){const t=[];for(let r=0,o=32*e.length;r<o;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&i));return t.join("")}function u(e,t,r,o,n,i){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(o,i)),n),r)}function p(e,t,r,o,n,i,s){return u(t&r|~t&o,e,t,n,i,s)}function c(e,t,r,o,n,i,s){return u(t&o|r&~o,e,t,n,i,s)}function d(e,t,r,o,n,i,s){return u(t^r^o,e,t,n,i,s)}function h(e,t,r,o,n,i,s){return u(r^(t|~o),e,t,n,i,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,o=-271733879,n=-1732584194,i=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=o,u=n,y=i;r=p(r,o,n,i,e[t],7,-680876936),i=p(i,r,o,n,e[t+1],12,-389564586),n=p(n,i,r,o,e[t+2],17,606105819),o=p(o,n,i,r,e[t+3],22,-1044525330),r=p(r,o,n,i,e[t+4],7,-176418897),i=p(i,r,o,n,e[t+5],12,1200080426),n=p(n,i,r,o,e[t+6],17,-1473231341),o=p(o,n,i,r,e[t+7],22,-45705983),r=p(r,o,n,i,e[t+8],7,1770035416),i=p(i,r,o,n,e[t+9],12,-1958414417),n=p(n,i,r,o,e[t+10],17,-42063),o=p(o,n,i,r,e[t+11],22,-1990404162),r=p(r,o,n,i,e[t+12],7,1804603682),i=p(i,r,o,n,e[t+13],12,-40341101),n=p(n,i,r,o,e[t+14],17,-1502002290),o=p(o,n,i,r,e[t+15],22,1236535329),r=c(r,o,n,i,e[t+1],5,-165796510),i=c(i,r,o,n,e[t+6],9,-1069501632),n=c(n,i,r,o,e[t+11],14,643717713),o=c(o,n,i,r,e[t],20,-373897302),r=c(r,o,n,i,e[t+5],5,-701558691),i=c(i,r,o,n,e[t+10],9,38016083),n=c(n,i,r,o,e[t+15],14,-660478335),o=c(o,n,i,r,e[t+4],20,-405537848),r=c(r,o,n,i,e[t+9],5,568446438),i=c(i,r,o,n,e[t+14],9,-1019803690),n=c(n,i,r,o,e[t+3],14,-187363961),o=c(o,n,i,r,e[t+8],20,1163531501),r=c(r,o,n,i,e[t+13],5,-1444681467),i=c(i,r,o,n,e[t+2],9,-51403784),n=c(n,i,r,o,e[t+7],14,1735328473),o=c(o,n,i,r,e[t+12],20,-1926607734),r=d(r,o,n,i,e[t+5],4,-378558),i=d(i,r,o,n,e[t+8],11,-2022574463),n=d(n,i,r,o,e[t+11],16,1839030562),o=d(o,n,i,r,e[t+14],23,-35309556),r=d(r,o,n,i,e[t+1],4,-1530992060),i=d(i,r,o,n,e[t+4],11,1272893353),n=d(n,i,r,o,e[t+7],16,-155497632),o=d(o,n,i,r,e[t+10],23,-1094730640),r=d(r,o,n,i,e[t+13],4,681279174),i=d(i,r,o,n,e[t],11,-358537222),n=d(n,i,r,o,e[t+3],16,-722521979),o=d(o,n,i,r,e[t+6],23,76029189),r=d(r,o,n,i,e[t+9],4,-640364487),i=d(i,r,o,n,e[t+12],11,-421815835),n=d(n,i,r,o,e[t+15],16,530742520),o=d(o,n,i,r,e[t+2],23,-995338651),r=h(r,o,n,i,e[t],6,-198630844),i=h(i,r,o,n,e[t+7],10,1126891415),n=h(n,i,r,o,e[t+14],15,-1416354905),o=h(o,n,i,r,e[t+5],21,-57434055),r=h(r,o,n,i,e[t+12],6,1700485571),i=h(i,r,o,n,e[t+3],10,-1894986606),n=h(n,i,r,o,e[t+10],15,-1051523),o=h(o,n,i,r,e[t+1],21,-2054922799),r=h(r,o,n,i,e[t+8],6,1873313359),i=h(i,r,o,n,e[t+15],10,-30611744),n=h(n,i,r,o,e[t+6],15,-1560198380),o=h(o,n,i,r,e[t+13],21,1309151649),r=h(r,o,n,i,e[t+4],6,-145523070),i=h(i,r,o,n,e[t+11],10,-1120210379),n=h(n,i,r,o,e[t+2],15,718787259),o=h(o,n,i,r,e[t+9],21,-343485551),r=s(r,a),o=s(o,l),n=s(n,u),i=s(i,y)}return[r,o,n,i]}function m(e,t=o.Hex){const r=t||o.Base64,i=y(a(e),e.length*n);switch(r){case o.Raw:return i;case o.Hex:return function(e){const t="0123456789abcdef",r=[];for(let o=0,n=4*e.length;o<n;o++)r.push(t.charAt(e[o>>2]>>o%4*8+4&15)+t.charAt(e[o>>2]>>o%4*8&15));return r.join("")}(i);case o.String:return l(i);case o.Base64:return function(e){const t=[];for(let r=0,o=4*e.length;r<o;r+=3){const o=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>6*(3-n)&63))}return t.join("")}(i)}}},28576:(e,t,r)=>{r.d(t,{B:()=>h});var o=r(20102),n=r(44543),i=r(81153),s=r(17452),a=r(41123),l=r(7628),u=r(31263),p=r(5600),c=r(66094),d=r(25929);function h(e){const t=e?.origins??[void 0];return(r,o)=>{const n=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const o=(0,l.Oe)(t,r);return{type:String,read:(e,t,r)=>{const n=(0,d.r)(e,t,r);return o.type===String?n:"function"==typeof o.type?new o.type({url:n}):void 0},write:{writer(t,n,a,l){if(!l||!l.resources)return"string"==typeof t?void(n[a]=(0,d.t)(t,l)):void(n[a]=t.write({},l));const p=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(p,{...l,verifyItemRelativeUrls:l&&l.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=o.type!==String&&(!(0,i.l)(this)||l&&l.origin&&this.originIdOf(r)>(0,u.M9)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:n,targetPropertyName:a,context:l,params:e};l&&l.portalItem&&h&&!(0,s.YP)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:o,value:n,dest:i,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=g(n,r,t),p=(0,c.B)(u),d=(0,s.Ml)(l.path),h=o?.compress??!1;p===d?(t.resources&&m({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),i[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:o}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[o]=t)}(v):l&&l.portalItem&&(null==h||null!=(0,d.i)(h)||(0,s.jc)(h)||f)?y(v):n[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.a;return{read:e,write:t}}}}(e,r,o);for(const e of t){const t=(0,p.CJ)(r,e,o);for(const e in n)t[e]=n[e]}}}function y(e){const{targetUrl:t,params:r,value:i,context:l,dest:u,targetPropertyName:p}=e;if(!l.portalItem)return;const h=(0,d.p)(t),y=g(i,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new o.Z("persistable:contentAddressingUnsupported",`Property "${p}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const f=r?.contentAddressed&&"json"===y.type?(0,n.F)(y.jsonString):h?.filename??(0,a.D)(),v=(0,s.v_)(r?.prefix??h?.prefix,f),b=`${v}.${(0,c.B)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find((e=>e.resource.path===b))??l.resources.toAdd.find((e=>e.resource.path===b));if(e)return void(u[p]=e.resource.itemRelativeUrl)}const w=l.portalItem.resourceFromPath(b);(0,s.jc)(t)&&l.resources&&l.resources.pendingOperations.push((0,s.gi)(t).then((e=>{w.path=`${v}.${(0,c.B)({type:"blob",blob:e})}`,u[p]=w.itemRelativeUrl})).catch((()=>{})));const _=r?.compress??!1;l.resources&&m({...e,resource:w,content:y,compress:_,updates:l.resources.toAdd}),u[p]=w.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:o,content:n,compress:i}){r.push({resource:o,content:n,compress:i,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},17445:(e,t,r)=>{r.d(t,{N1:()=>d,YP:()=>l,Z_:()=>m,gx:()=>u,nn:()=>g,on:()=>c,tX:()=>f}),r(66643),r(46791);var o=r(91460),n=r(50758),i=r(70586),s=r(95330),a=r(26258);function l(e,t,r={}){return p(e,t,r,h)}function u(e,t,r={}){return p(e,t,r,y)}function p(e,t,r={},o){let n=null;const s=r.once?(e,r)=>{o(e)&&((0,i.hw)(n),t(e,r))}:(e,r)=>{o(e)&&t(e,r)};if(n=(0,a.aQ)(e,s,r.sync,r.equals),r.initial){const t=e();s(t,t)}return n}function c(e,t,r,s={}){let a=null,u=null,p=null;function c(){a&&u&&(u.remove(),s.onListenerRemove?.(a),a=null,u=null)}function d(e){s.once&&s.once&&(0,i.hw)(p),r(e)}const h=l(e,((e,r)=>{c(),(0,o.vT)(e)&&(a=e,u=(0,o.on)(e,t,d),s.onListenerAdd?.(e))}),{sync:s.sync,initial:!0});return p=(0,n.kB)((()=>{h.remove(),c()})),p}function d(e,t){return function(e,t,r){if((0,s.Hc)(r))return Promise.reject((0,s.zE)());const o=e();if(t?.(o))return Promise.resolve(o);let a=null;function l(){a=(0,i.hw)(a)}return new Promise(((o,i)=>{a=(0,n.AL)([(0,s.fu)(r,(()=>{l(),i((0,s.zE)())})),p(e,(e=>{l(),o(e)}),{sync:!1,once:!0},t??h)])}))}(e,y,t)}function h(e){return!0}function y(e){return!!e}r(87538);const m={sync:!0},g={initial:!0},f={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>a,Nm:()=>s,rJ:()=>l});var o=r(90344),n=r(17126);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function s(e,t,r,i="system"){const s=new n.vF((0,o.f1)(i)),a=n.ou.fromJSDate(e,{zone:s}),l="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),a.plus({[l]:t}).toJSDate()}function a(e,t,r="system"){const i=new n.vF((0,o.f1)(r)),s=n.ou.fromJSDate(e,{zone:i});if("decades"===t||"centuries"===t){const e=s.startOf("year"),{year:r}=e,o=r-r%("decades"===t?10:100);return e.set({year:o}).toJSDate()}const a=u(t);return s.startOf(a).toJSDate()}function l(e,t,r){return 0===e?0:e*i[t]/i[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},41123:(e,t,r)=>{r.d(t,{D:()=>n,z:()=>i});const o="randomUUID"in crypto;function n(){if(o)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function i(){return`{${n()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>b});var o,n=r(43697),i=r(67676),s=r(35454),a=r(96674),l=r(67900),u=r(20941),p=r(5600),c=(r(75215),r(80442),r(71715)),d=r(52011),h=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,i.e$)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=o=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new u.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new o({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new o({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new o;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,p.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,n._)([(0,h.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,n._)([(0,c.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,n._)([(0,p.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,n._)([(0,c.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,n._)([(0,c.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,n._)([(0,p.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,n._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=o=(0,n._)([(0,d.j)("esri.geometry.HeightModelInfo")],f);const b=f},90344:(e,t,r)=>{r.d(t,{Xr:()=>y,Ze:()=>v,f1:()=>w,p6:()=>b});var o=r(35454),n=r(70171),i=r(15512);r(17126);const s=Intl.DateTimeFormat().resolvedOptions().timeZone,a=(i.pt,{year:"numeric",month:"numeric",day:"numeric"}),l={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},d={...c,second:"numeric"},h={"short-date":a,"short-date-short-time":{...a,...c},"short-date-short-time-24":{...a,...c,hour12:!1},"short-date-long-time":{...a,...d},"short-date-long-time-24":{...a,...d,hour12:!1},"short-date-le":a,"short-date-le-short-time":{...a,...c},"short-date-le-short-time-24":{...a,...c,hour12:!1},"short-date-le-long-time":{...a,...d},"short-date-le-long-time-24":{...a,...d,hour12:!1},"long-month-day-year":l,"long-month-day-year-short-time":{...l,...c},"long-month-day-year-short-time-24":{...l,...c,hour12:!1},"long-month-day-year-long-time":{...l,...d},"long-month-day-year-long-time-24":{...l,...d,hour12:!1},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...c},"day-short-month-year-short-time-24":{...u,...c,hour12:!1},"day-short-month-year-long-time":{...u,...d},"day-short-month-year-long-time-24":{...u,...d,hour12:!1},"long-date":p,"long-date-short-time":{...p,...c},"long-date-short-time-24":{...p,...c,hour12:!1},"long-date-long-time":{...p,...d},"long-date-long-time-24":{...p,...d,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":d},y=(0,o.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),m={ar:"ar-u-nu-latn-ca-gregory"};let g=new WeakMap;const f=h["short-date-short-time"];function v(e){return h[e]}function b(e,t=f){return function(e){let t=g.get(e);if(!t){const r=(0,n.Kd)(),o=m[r]||r,s=w(e.timeZone??i.By),a={...e,timeZone:s};t=new Intl.DateTimeFormat(o,a),g.set(e,t)}return t}(t).format(e)}function w(e){switch(e){case i.By:return s;case i._4:return i.pt;default:return e}}(0,n.Ze)((()=>{g=new WeakMap}))},9310:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});var o,n=r(43697),i=r(20102),s=r(92604),a=r(16453),l=r(95330),u=r(17445),p=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),h=r(28576),y=r(87085),m=r(54295),g=r(17287),f=r(38009),v=r(16859),b=r(72965),w=r(20559),_=r(21506),S=r(51161),C=r(3172),I=r(46791),x=r(96674),T=r(17452),U=(r(66577),r(22974)),j=r(20941),M=r(30556),D=r(73615),P=r(38913);let R=o=class extends x.wq{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,r,o){if(o.layer&&o.layer.spatialReference&&!o.layer.spatialReference.equals(this.geometry.spatialReference)){if(!(0,D.canProjectWithoutEngine)(e.spatialReference,o.layer.spatialReference))return void(o&&o.messages&&o.messages.push(new j.Z("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:o.layer.spatialReference,context:o})));const n=new P.Z;(0,D.projectPolygon)(e,n,o.layer.spatialReference),t[r]=n.toJSON(o)}else t[r]=e.toJSON(o);delete t[r].spatialReference}clone(){return new o({geometry:(0,U.d9)(this.geometry),type:this.type})}};(0,n._)([(0,p.Cb)({type:P.Z}),(0,h.B)()],R.prototype,"geometry",void 0),(0,n._)([(0,M.c)(["web-scene","portal-item"],"geometry")],R.prototype,"writeGeometry",null),(0,n._)([(0,p.Cb)({type:["clip","mask","replace"],nonNullable:!0}),(0,h.B)()],R.prototype,"type",void 0),R=o=(0,n._)([(0,d.j)("esri.layers.support.SceneModification")],R);const E=R;var N;let L=N=class extends((0,x.eC)(I.Z.ofType(E))){constructor(e){super(e),this.url=null}clone(){return new N({url:this.url,items:this.items.map((e=>e.clone()))})}toJSON(e){return this.toArray().map((t=>t.toJSON(e))).filter((e=>!!e.geometry))}static fromJSON(e,t){const r=new N;for(const o of e)r.add(E.fromJSON(o,t));return r}static async fromUrl(e,t,r){const o={url:(0,T.mN)(e),origin:"service"},n=await(0,C.Z)(e,{responseType:"json",signal:r?.signal}),i=t.toJSON(),s=[];for(const e of n.data)s.push(E.fromJSON({...e,geometry:{...e.geometry,spatialReference:i}},o));return new N({url:e,items:s})}};(0,n._)([(0,p.Cb)({type:String})],L.prototype,"url",void 0),L=N=(0,n._)([(0,d.j)("esri.layers.support.SceneModifications")],L);const O=L;var Z=r(36405),k=r(25929);let A=class extends((0,w.Vt)((0,g.Y)((0,f.q)((0,v.I)((0,b.M)((0,a.R)((0,m.V)(y.Z)))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null}initialize(){this.addHandles((0,u.on)((()=>this.modifications),"after-changes",(()=>this.modifications=this.modifications),u.Z_))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,r){this._modificationsSource={url:(0,k.f)(e,r),context:r}}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,l.r9)(e)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await O.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then((()=>{}),(()=>{}))}async saveAs(e,t){return this._debouncedSaveOperations(w.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(w.xp.SAVE,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new i.Z("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new i.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new i.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(){const e=this.elevationInfo,t="Integrated mesh layers";(0,Z.LR)(s.Z.getLogger(this),(0,Z.Uy)(t,"absolute-height",e)),(0,Z.LR)(s.Z.getLogger(this),(0,Z.kf)(t,e))}};(0,n._)([(0,p.Cb)({type:String,readOnly:!0})],A.prototype,"geometryType",void 0),(0,n._)([(0,p.Cb)({type:["show","hide"]})],A.prototype,"listMode",void 0),(0,n._)([(0,p.Cb)({type:["IntegratedMeshLayer"]})],A.prototype,"operationalLayerType",void 0),(0,n._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],A.prototype,"type",void 0),(0,n._)([(0,p.Cb)({type:S.U4,readOnly:!0})],A.prototype,"nodePages",void 0),(0,n._)([(0,p.Cb)({type:[S.QI],readOnly:!0})],A.prototype,"materialDefinitions",void 0),(0,n._)([(0,p.Cb)({type:[S.Yh],readOnly:!0})],A.prototype,"textureSetDefinitions",void 0),(0,n._)([(0,p.Cb)({type:[S.H3],readOnly:!0})],A.prototype,"geometryDefinitions",void 0),(0,n._)([(0,p.Cb)({readOnly:!0})],A.prototype,"serviceUpdateTimeStamp",void 0),(0,n._)([(0,p.Cb)({type:O}),(0,h.B)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],A.prototype,"modifications",void 0),(0,n._)([(0,c.r)(["web-scene","portal-item"],"modifications")],A.prototype,"readModifications",null),(0,n._)([(0,p.Cb)(_.PV)],A.prototype,"elevationInfo",null),(0,n._)([(0,p.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],A.prototype,"path",void 0),A=(0,n._)([(0,d.j)("esri.layers.IntegratedMeshLayer")],A);const F=A},87085:(e,t,r)=>{r.d(t,{Z:()=>b});var o=r(43697),n=(r(66577),r(3172)),i=r(20102),s=r(32448),a=r(10699),l=r(83379),u=r(92604),p=r(95330),c=r(17452),d=r(5600),h=(r(75215),r(67676),r(80442),r(52011)),y=r(68773),m=r(6570),g=r(82971);let f=0,v=class extends(s.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.Z(-180,-90,180,90,g.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:o}=await r.e(8008).then(r.bind(r,28008));try{return await o(t)}catch(e){const r=t&&t.portalItem,o=r&&r.id||"unset",n=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+o+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.D_)(e)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.Z)(e,{query:{f:"json"},responseType:"json"})).data;throw new i.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,o._)([(0,d.Cb)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,o._)([(0,d.Cb)({type:m.Z})],v.prototype,"fullExtent",void 0),(0,o._)([(0,d.Cb)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,o._)([(0,d.Cb)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,o._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,o._)([(0,d.Cb)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,o._)([(0,d.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,o._)([(0,d.Cb)({clonable:!1})],v.prototype,"parent",void 0),(0,o._)([(0,d.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,o._)([(0,d.Cb)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,o._)([(0,d.Cb)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,o._)([(0,d.Cb)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,o._)([(0,d.Cb)({type:g.Z})],v.prototype,"spatialReference",void 0),(0,o._)([(0,d.Cb)({type:String})],v.prototype,"title",void 0),(0,o._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,o._)([(0,d.Cb)()],v.prototype,"url",void 0),(0,o._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,o._)([(0,h.j)("esri.layers.Layer")],v);const b=v},16859:(e,t,r)=>{r.d(t,{I:()=>S});var o=r(43697),n=r(68773),i=r(40330),s=r(3172),a=r(66643),l=r(20102),u=r(92604),p=r(70586),c=r(95330),d=r(17452),h=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),g=r(30556),f=r(84230),v=r(48522),b=r(15235),w=r(86082),_=r(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:o}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await o({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:o},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",o),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const o=e===r.id;if(o&&r.portal.user)return(0,_.Ss)(r);let n,s;if(o)n=r.portal.url;else try{n=await(0,f.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!n||!(0,d.Zo)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(i.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?i.id?.findCredential(this.url):null;if(!t)return!0;const r=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=i.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const o=`${r.owningSystemUrl}/sharing/rest`,n=v.Z.getDefault();if(n&&n.loaded&&(0,d.Fv)(n.restUrl)===(0,d.Fv)(o))return n.user;const l=`${o}/community/self`,u=null!=e?e.signal:null,p=await(0,a.q6)((0,s.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,o=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return r&&o&&!(0,d.tm)(o.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,o._)([(0,h.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,o._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,o._)([(0,g.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,o._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,o._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,o._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,o._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,o._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},72965:(e,t,r)=>{r.d(t,{M:()=>s});var o=r(43697),n=r(5600),i=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,o._)([(0,n.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,o._)([(0,n.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,o._)([(0,i.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},51161:(e,t,r)=>{r.d(t,{H3:()=>f,QI:()=>c,U4:()=>l,Yh:()=>h});var o=r(43697),n=r(96674),i=r(5600),s=(r(75215),r(67676),r(80442),r(36030)),a=r(52011);let l=class extends n.wq{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,o._)([(0,i.Cb)({type:Number})],l.prototype,"nodesPerPage",void 0),(0,o._)([(0,i.Cb)({type:Number})],l.prototype,"rootIndex",void 0),(0,o._)([(0,i.Cb)({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=(0,o._)([(0,a.j)("esri.layer.support.I3SNodePageDefinition")],l);let u=class extends n.wq{constructor(){super(...arguments),this.factor=1}};(0,o._)([(0,i.Cb)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],u.prototype,"id",void 0),(0,o._)([(0,i.Cb)({type:Number})],u.prototype,"factor",void 0),u=(0,o._)([(0,a.j)("esri.layer.support.I3SMaterialTexture")],u);let p=class extends n.wq{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,o._)([(0,i.Cb)({type:[Number]})],p.prototype,"baseColorFactor",void 0),(0,o._)([(0,i.Cb)({type:u})],p.prototype,"baseColorTexture",void 0),(0,o._)([(0,i.Cb)({type:u})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,i.Cb)({type:Number})],p.prototype,"metallicFactor",void 0),(0,o._)([(0,i.Cb)({type:Number})],p.prototype,"roughnessFactor",void 0),p=(0,o._)([(0,a.j)("esri.layer.support.I3SMaterialPBRMetallicRoughness")],p);let c=class extends n.wq{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,o._)([(0,s.J)({opaque:"opaque",mask:"mask",blend:"blend"})],c.prototype,"alphaMode",void 0),(0,o._)([(0,i.Cb)({type:Number})],c.prototype,"alphaCutoff",void 0),(0,o._)([(0,i.Cb)({type:Boolean})],c.prototype,"doubleSided",void 0),(0,o._)([(0,s.J)({none:"none",back:"back",front:"front"})],c.prototype,"cullFace",void 0),(0,o._)([(0,i.Cb)({type:u})],c.prototype,"normalTexture",void 0),(0,o._)([(0,i.Cb)({type:u})],c.prototype,"occlusionTexture",void 0),(0,o._)([(0,i.Cb)({type:u})],c.prototype,"emissiveTexture",void 0),(0,o._)([(0,i.Cb)({type:[Number]})],c.prototype,"emissiveFactor",void 0),(0,o._)([(0,i.Cb)({type:p})],c.prototype,"pbrMetallicRoughness",void 0),c=(0,o._)([(0,a.j)("esri.layer.support.I3SMaterialDefinition")],c);let d=class extends n.wq{};(0,o._)([(0,i.Cb)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],d.prototype,"name",void 0),(0,o._)([(0,s.J)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=(0,o._)([(0,a.j)("esri.layer.support.I3STextureFormat")],d);let h=class extends n.wq{constructor(){super(...arguments),this.atlas=!1}};(0,o._)([(0,i.Cb)({type:[d]})],h.prototype,"formats",void 0),(0,o._)([(0,i.Cb)({type:Boolean})],h.prototype,"atlas",void 0),h=(0,o._)([(0,a.j)("esri.layer.support.I3STextureSetDefinition")],h);let y=class extends n.wq{};(0,o._)([(0,s.J)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),(0,o._)([(0,i.Cb)({type:Number})],y.prototype,"component",void 0),y=(0,o._)([(0,a.j)("esri.layer.support.I3SGeometryAttribute")],y);let m=class extends n.wq{};(0,o._)([(0,s.J)({draco:"draco"})],m.prototype,"encoding",void 0),(0,o._)([(0,i.Cb)({type:[String]})],m.prototype,"attributes",void 0),m=(0,o._)([(0,a.j)("esri.layer.support.I3SGeometryCompressedAttributes")],m);let g=class extends n.wq{constructor(){super(...arguments),this.offset=0}};(0,o._)([(0,i.Cb)({type:Number})],g.prototype,"offset",void 0),(0,o._)([(0,i.Cb)({type:y})],g.prototype,"position",void 0),(0,o._)([(0,i.Cb)({type:y})],g.prototype,"normal",void 0),(0,o._)([(0,i.Cb)({type:y})],g.prototype,"uv0",void 0),(0,o._)([(0,i.Cb)({type:y})],g.prototype,"color",void 0),(0,o._)([(0,i.Cb)({type:y})],g.prototype,"uvRegion",void 0),(0,o._)([(0,i.Cb)({type:y})],g.prototype,"featureId",void 0),(0,o._)([(0,i.Cb)({type:y})],g.prototype,"faceRange",void 0),(0,o._)([(0,i.Cb)({type:m})],g.prototype,"compressedAttributes",void 0),g=(0,o._)([(0,a.j)("esri.layer.support.I3SGeometryBuffer")],g);let f=class extends n.wq{};(0,o._)([(0,s.J)({triangle:"triangle"})],f.prototype,"topology",void 0),(0,o._)([(0,i.Cb)()],f.prototype,"geometryBuffers",void 0),f=(0,o._)([(0,a.j)("esri.layer.support.I3SGeometryDefinition")],f)},66094:(e,t,r)=>{r.d(t,{B:()=>n});var o=r(17452);function n(e){return i[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,o.Ml)(e);return l[t]||s}(e.url)}(e)]||a}const i={},s="text/plain",a=i[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)i[l[e]]=e},36405:(e,t,r)=>{function o(e,t){return null!=t&&t.mode?t.mode:function(e){return e?u:p}(e).mode}function n(e,t){return o(null!=e&&e.hasZ,t)}function i(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function s(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function l(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{LR:()=>l,Uy:()=>i,VW:()=>n,Wb:()=>s,kf:()=>a}),r(12541);const u={mode:"absolute-height",offset:0},p={mode:"on-the-ground",offset:null}},15512:(e,t,r)=>{r.d(t,{By:()=>o,_4:()=>n,pt:()=>i});const o="system",n="unknown",i="UTC"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3831,2664],{65845:(e,t,r)=>{r.d(t,{D:()=>o});var n=r(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,n.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function n(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>n})},32664:(e,t,r)=>{r.d(t,{save:()=>S,saveAs:()=>N});var n=r(67676),o=(r(20102),r(19238)),a=r(64383),i=r(66677),s=r(52104),l=r(84230),u=(r(33516),r(14661));const p="Feature Service",y="feature-layer-utils",c=`${y}-save`,f=`${y}-save-as`;function m(e){return{isValid:(0,l.fP)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function d(e){const t=[],r=[];for(const{layer:n,layerJSON:o}of e)n.isTable?r.push(o):t.push(o);return{layers:t,tables:r}}function h(e){return d([e])}async function g(e,t){return/\/\d+\/?$/.test(e.url)?h(t[0]):async function(e,t){if(!t)return d(e);const{layer:{url:r,customParameters:n,apiKey:a}}=e[0];let i=await t.fetchData("json");i&&null!=i.layers&&null!=i.tables||(i=await async function(e,t,r){e||={},e.layers||=[],e.tables||=[];const{url:n,customParameters:a,apiKey:i}=t,{serviceJSON:l,layersJSON:u}=await(0,s.V)(n,{customParameters:a,apiKey:i}),p=w(e.layers,l.layers,r),y=w(e.tables,l.tables,r);e.layers=p.itemResources,e.tables=y.itemResources;const c=[...p.added,...y.added],f=u?[...u.layers,...u.tables]:[];return await async function(e,t,r,n){const a=t.map((({id:e})=>new o.default({url:r,layerId:e,sourceJSON:n.find((({id:t})=>t===e))})));await Promise.allSettled(a.map((e=>e.load()))),a.forEach((t=>{const{layerId:r,loaded:n,defaultPopupTemplate:o}=t;n&&null!=o&&v(t,{id:r,popupInfo:o.toJSON()},e)}))}(e,c,n,f),e}(i,{url:r??"",customParameters:n,apiKey:a},e.map((e=>e.layer.layerId))));for(const t of e)v(t.layer,t.layerJSON,i);return i}(t,e)}function w(e,t,r){const o=(0,n.e5)(e,t,((e,t)=>e.id===t.id));e=e.filter((e=>!o.removed.some((t=>t.id===e.id))));const a=o.added.map((({id:e})=>({id:e})));return a.forEach((({id:t})=>{e.push({id:t})})),{itemResources:e,added:a.filter((({id:e})=>!r.includes(e)))}}function v(e,t,r){e.isTable?b(r.tables,t):b(r.layers,t)}function b(e,t){const r=e.findIndex((({id:e})=>e===t.id));-1===r?e.push(t):e[r]=t}async function x(e,t){const{url:r,layerId:n,title:o,fullExtent:a,isTable:s}=e,l=(0,i.Qc)(r);t.url="FeatureServer"===l?.serverType?r:`${r}/${n}`,t.title||=o,t.extent=null,s||null==a||(t.extent=await(0,u.$o)(a)),(0,u.ck)(t,u.Kz.METADATA),(0,u.ck)(t,u.Kz.MULTI_LAYER),(0,u.qj)(t,u.Kz.SINGLE_LAYER),s&&(0,u.qj)(t,u.Kz.TABLE)}async function S(e,t){return(0,a.a1)({layer:e,itemType:p,validateLayer:m,createItemData:(e,t)=>g(t,[e]),errorNamePrefix:c},t)}async function N(e,t,r){return(0,a.po)({layer:e,itemType:p,validateLayer:m,createItemData:(e,t)=>Promise.resolve(h(e)),errorNamePrefix:f,newItem:t,setItemProperties:x},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>g,po:()=>w});var n=r(20102),o=r(65845),a=r(48522),i=r(15235),s=r(33516),l=r(14661),u=r(14769);async function p(e){const{layer:t,errorNamePrefix:r,validateLayer:o}=e;await t.load(),function(e,t,r){const o=r(e);if(!o.isValid)throw new n.Z(`${t}:invalid-parameters`,o.errorMessage,{layer:e})}(t,r,o)}function y(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function c(e,t,r,o){if(e.type!==r)throw new n.Z(`${t}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:e,layer:o})}function f(e,t,r){const{portalItem:o}=e;if(!o)throw new n.Z(`${t}:portal-item-not-set`,y(e,"requires the portalItem property to be set"));if(!o.loaded)throw new n.Z(`${t}:portal-item-not-loaded`,y(e,"cannot be saved to a portal item that does not exist or is inaccessible"));(0,u.w)(o),c(o,t,r,e)}function m(e,t,r,n){let o=i.default.from(e);return o.id&&(o=o.clone(),o.id=null),o.type??=r,o.portal??=a.Z.getDefault(),(0,u.w)(o),c(o,t,r,n),o}async function d(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const o=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new n.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new n.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),o}function h(e){(0,l.qj)(e,l.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t){const{layer:r,createItemData:n,errorNamePrefix:a,itemType:i}=e;await p(e),f(r,a,i);const l=r.portalItem,u=(0,s.Y)(l),y=await d(r,u,t),c=await n({layer:r,layerJSON:y},l);return h(l),await l.update({data:c}),(0,o.D)(u),l}async function w(e,t){const{layer:r,createItemData:n,setItemProperties:a,newItem:i,errorNamePrefix:l,itemType:u}=e;await p(e);const y=m(i,l,u,r),c=(0,s.Y)(y),f=await d(r,c,t),g=await n({layer:r,layerJSON:f},y);return await a(r,y),h(y),await async function(e,t,r){const n=e.portal;await n.signIn(),await(n.user?.addItem({item:e,data:t,folder:r?.folder}))}(y,g,t),r.portalItem=y,(0,o.D)(c),y}},16451:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(43697),o=r(2368),a=r(96674),i=r(5600),s=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(30556),p=r(72729),y=r(70082);let c=class extends((0,o.J)(a.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,i.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,n._)([(0,i.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,i.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,n._)([(0,s.r)("domains")],c.prototype,"readDomains",null),(0,n._)([(0,u.c)("domains")],c.prototype,"writeDomains",null),(0,n._)([(0,i.Cb)({type:[y.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,n._)([(0,l.j)("esri.layers.support.FeatureType")],c);const f=c},52104:(e,t,r)=>{r.d(t,{V:()=>o});var n=r(96187);async function o(e,t){const r=await(0,n.T)(e,t);r.layers=r.layers.filter(a);const o={serviceJSON:r};if((r.currentVersion??0)<10.5)return o;const i=await(0,n.T)(e+"/layers",t);return o.layersJSON={layers:i.layers.filter(a),tables:i.tables},o}function a(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},33516:(e,t,r)=>{r.d(t,{Y:()=>i,h:()=>a});var n=r(17452),o=r(48522);function a(e){return{origin:"portal-item",url:(0,n.mN)(e.itemUrl),portal:e.portal||o.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function i(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,n.mN)(e.itemUrl):null,portal:e.portal||o.Z.getDefault(),portalItem:e}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var n=r(69285);function o(e,t,r){if(!r||!r.features||!r.hasZ)return;const o=(0,n.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var n,o=r(43697),a=r(66577),i=r(38171),s=r(35454),l=r(96674),u=r(22974),p=r(5600),y=(r(75215),r(71715)),c=r(52011),f=r(30556),m=r(82971),d=r(33955),h=r(1231);const g=new s.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],a=i.Z.fromJSON(o),s=o.geometry&&o.geometry.spatialReference;null==a.geometry||s||(a.geometry.spatialReference=r);const l=o.aggregateGeometries,u=a.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}n.push(a)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,d.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=m.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,a=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=a.length;e<t;e++)i?.(a[e].geometry)||(a.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,o],scale:[a,i]}=r;let s=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;s=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*a+n),(e=>o-e*i),s,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,o;const a=[];for(let i=0,s=e.length;i<s;i++){const s=e[i];if(i>0){const e=t(s[0]),i=r(s[1]);e===n&&i===o||(a.push([e-n,i-o]),n=e,o=i)}else n=t(s[0]),o=r(s[1]),a.push([n,o])}return a.length>0?a:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,d.oU)(e)?e.rings:e.paths,o=[];for(let e=0,a=n.length;e<a;e++){const a=n[e],i=this._quantizePoints(a,t,r);i&&o.push(i)}return o.length>0?((0,d.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const a=(0,d.oU)(e)?e.rings:e.paths;let i,s;for(let e=0,n=a.length;e<n;e++){const n=a[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(i+=o[0],s+=o[1]):(i=o[0],s=o[1]),o[0]=t(i),o[1]=r(s)}}if(n&&o)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const a=e.points;let i,s;for(let e=0,n=a.length;e<n;e++){const n=a[e];e>0?(i+=n[0],s+=n[1]):(i=n[0],s=n[1]),n[0]=t(i),n[1]=r(s)}if(n&&o)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=n(t[2])}else if(o)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.Cb)({type:[i.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,o._)([(0,y.r)("features")],w.prototype,"readFeatures",null),(0,o._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,o._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,o._)([(0,f.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o._)([(0,p.Cb)({types:a.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o._)([(0,y.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o._)([(0,p.Cb)({type:m.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o._)([(0,f.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w},96187:(e,t,r)=>{r.d(t,{T:()=>o});var n=r(3172);async function o(e,t){const{data:r}=await(0,n.Z)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}});return r}},14769:(e,t,r)=>{r.d(t,{w:()=>i});var n=r(68773),o=r(20102),a=r(71058);function i(e){if(n.default.apiKey&&(0,a.r)(e.portal.url))throw new o.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2575,5732,7520,2596],{5732:(e,t,r)=>{r.d(t,{c:()=>o,g:()=>s});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},16306:(e,t,r)=>{r.d(t,{aX:()=>C});var o=r(68773),s=r(20102),n=r(92604),i=r(38913),l=r(58901),a=r(73913),p=r(8744),u=r(40488),y=(r(66577),r(3172)),c=r(33955),d=r(11282),f=r(17452);async function h(e,t,r){const o="string"==typeof e?(0,f.mN)(e):e,s=t[0].spatialReference,n=(0,c.Ji)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,p.B9)(s),geometries:JSON.stringify((a=t,{geometryType:(0,c.Ji)(a[0]),geometries:a.map((e=>e.toJSON()))}))}},{data:l}=await(0,y.Z)(o.path+"/simplify",i);var a;return function(e,t,r){const o=(0,c.q9)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}(l.geometries,n,s)}const m=n.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new s.Z(e)}const r=(0,a.x3)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const s=e[o][0],n=e[o][1],i=e[o+1][0],l=e[o+1][1],a=Math.sqrt((i-s)*(i-s)+(l-n)*(l-n)),p=(l-n)/a,u=(i-s)/a,y=a/t;if(y>1){for(let e=1;e<=y-1;e++){const o=e*t,i=u*o+s,l=p*o+n;r.push([i,l])}const e=(a+Math.floor(y-1)*t)/2,o=u*e+s,i=p*e+n;r.push([o,i])}r.push([i,l])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:o,spatialReference:e.spatialReference}):new l.Z({paths:o,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.Sx)(t,!0)}return r&&(e=(0,a.Sy)(e,r)),e}function w(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,a.XZ)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,a.XZ)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,a.XZ)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,a.XZ)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function v(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const s=t.cutIndexes[o],n=t.geometries[o],i=(0,a.x3)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,a.XZ)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}}))}if(s===r){if(g(e))for(const t of(0,a.x3)(n))e[s]=e[s].addRing(t);else if(S(e))for(const t of(0,a.x3)(n))e[s]=e[s].addPath(t)}else r=s,e[s]=n}return e}async function C(e,t,r){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??o.default.geometryServiceUrl;let n,f,g,S,_,x,T,O,R=0;const Z=[],N=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,f=(0,p.C5)(n),g=n.isWebMercator,x=g?102100:4326,S=a.UZ[x].maxX,_=a.UZ[x].minX,T=a.UZ[x].plus180Line,O=a.UZ[x].minus180Line),f)if("mesh"===t.type)N.push(t);else if("point"===t.type)N.push(w(t.clone(),S,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,S,_))),N.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,f);N.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,a.XZ)(e.xmin,_)*(2*S);let o=0===r?t.clone():(0,a.Sy)(t.clone(),r);e.offset(r,0),e.intersects(T)&&e.xmax!==S?(R=e.xmax>R?e.xmax:R,o=b(o,g),Z.push(o),N.push("cut")):e.intersects(O)&&e.xmin!==_?(R=e.xmax*(2*S)>R?e.xmax*(2*S):R,o=b(o,g,360),Z.push(o),N.push("cut")):N.push(o)}else N.push(t.clone());else N.push(t);else N.push(t);let M=(0,a.XZ)(R,S),A=-90;const F=M,L=new l.Z;for(;M>0;){const e=360*M-180;L.addPath([[e,A],[e,-1*A]]),A*=-1,M--}if(Z.length>0&&F>0){const t=v(Z,await async function(e,t,r,o){const s=(0,d.en)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...s.query,f:"json",sr:(0,p.B9)(n),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},l=await(0,y.Z)(s.path+"/cut",i),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,c.im)(e);return t.spatialReference=n,t}))}}(s,Z,L,r)),o=[],n=[];for(let r=0;r<N.length;r++){const s=N[r];if("cut"!==s)n.push(s);else{const s=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(o.push(s),n.push("simplify")):n.push(g?(0,u.$)(s):s)}}if(!o.length)return n;const i=await h(s,o,r),l=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?l.push(t):l.push(g?(0,u.$)(i.shift()):i.shift())}return l}const j=[];for(let e=0;e<N.length;e++){const t=N[e];if("cut"!==t)j.push(t);else{const e=Z.shift();j.push(!0===g?(0,u.$)(e):e)}}return j}},73913:(e,t,r)=>{r.d(t,{Sy:()=>a,UZ:()=>i,XZ:()=>l,x3:()=>p});var o=r(58901),s=r(82971),n=r(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator}),minus180Line:new o.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.Z({paths:[[[180,-180],[180,180]]],spatialReference:s.Z.WGS84}),minus180Line:new o.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:s.Z.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=p(e);for(const e of r)for(const r of e)r[0]+=t;return e}function p(e){return(0,n.oU)(e)?e.rings:e.paths}},62128:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var o=r(43697),s=(r(66577),r(38171)),n=(r(9790),r(46791)),i=r(20102),l=r(22974),a=r(16453),p=r(78286),u=r(20941),y=r(5600),c=r(75215),d=r(71715),f=r(52011),h=r(30556),m=r(73615),g=r(24470),S=r(16306),b=r(8744),w=r(19238),v=(r(67676),r(80442),r(70921));r(92604);let C=class extends n.Z{constructor(e){super(e),this.addHandles([this.on("before-add",(e=>{null==e.item&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(n.Z.ofType(this.itemType.Type))(e):new n.Z(e)}};(0,o._)([(0,y.Cb)()],C.prototype,"owner",null),C=(0,o._)([(0,f.j)("esri.core.support.OwningCollection")],C);var _=r(87085),x=r(71612),T=r(72965),O=r(52421);let R=class extends C{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,o._)([(0,O.c)({Type:s.Z,ensureType:(0,c.se)(s.Z)})],R.prototype,"itemType",void 0),R=(0,o._)([(0,f.j)("esri.support.GraphicsCollection")],R);var Z=r(86787);let N=class extends((0,x.h)((0,T.M)(_.Z))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new R,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var M,A;(0,o._)([(0,y.Cb)({type:Z.Z})],N.prototype,"elevationInfo",void 0),(0,o._)([(0,y.Cb)((M=R,A="graphics",{type:M,cast:v.R,set(e){const t=(0,v.Z)(e,this._get(A),M);t.owner=this,this._set(A,t)}}))],N.prototype,"graphics",void 0),(0,o._)([(0,y.Cb)({type:["show","hide"]})],N.prototype,"listMode",void 0),(0,o._)([(0,y.Cb)()],N.prototype,"screenSizePerspectiveEnabled",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],N.prototype,"type",void 0),(0,o._)([(0,y.Cb)({constructOnly:!0})],N.prototype,"internal",void 0),N=(0,o._)([(0,f.j)("esri.layers.GraphicsLayer")],N);const F=N;var L=r(92908),j=r(38009),I=r(16859),E=r(1231),J=r(20256),P=r(4095),D=r(77987),G=r(78724),Q=r(82971),z=r(6570);function q(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!B(e)))}function B({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return X.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function U(){return new z.Z({xmin:-180,ymin:-90,xmax:180,ymax:90})}const H=new E.Z({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),k=new E.Z({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0});let W=class extends F{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,m.projectOrLoad)(U(),e).geometry:(0,g.HH)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,g.cS)();return this.graphics.forEach((r=>{const o=null!=r.geometry?(0,m.projectOrLoad)(r.geometry,e).geometry:null;null!=o&&(0,g.jn)(t,"point"===o.type?o:o.extent,t)})),(0,g.fS)(t,g.G_)?null:t}get sublayers(){return this.graphics}};(0,o._)([(0,y.Cb)({readOnly:!0})],W.prototype,"fullExtent",null),(0,o._)([(0,y.Cb)({readOnly:!0})],W.prototype,"fullBounds",null),(0,o._)([(0,y.Cb)({readOnly:!0})],W.prototype,"sublayers",null),(0,o._)([(0,y.Cb)()],W.prototype,"layer",void 0),(0,o._)([(0,y.Cb)()],W.prototype,"layerId",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],W.prototype,"visibilityMode",void 0),W=(0,o._)([(0,f.j)("esri.layers.MapNotesLayer.MapNotesSublayer")],W);const X=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new J.Z).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new P.Z).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new D.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new D.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new G.Z).toJSON()}];let K=class extends((0,x.h)((0,T.M)((0,j.q)((0,I.I)((0,a.R)(_.Z)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=Q.Z.WGS84,this.sublayers=new n.Z(X.map((e=>new W({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!q(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!q(t))return null;const o=t.layers.map((e=>{const t=new w.default;return t.read(e,r),t}));return new n.Z({items:o})}readLegacyfeatureCollectionJSON(e,t){return q(t)?(0,l.d9)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,g.cS)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,g.jn)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((r=>{const o=(0,m.projectOrLoad)(r.layerDefinition.extent,e).geometry;null!=o&&(0,g.jn)(t,o,t)})),(0,g.fS)(t,g.G_)?(0,m.projectOrLoad)(U(),e).geometry:(0,g.HH)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?Q.Z.fromJSON(t.layers[0].layerDefinition.spatialReference):Q.Z.WGS84}readSublayers(e,t,r){if(q(t))return null;const o=[];let i=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:r}=e,n=t.id??i++,l=B(e);if(null!=l){const e=new W({id:l.id,title:t.name,layerId:n,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:o})=>s.Z.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:o})))});o.push(e)}}return new n.Z(o)}writeSublayers(e,t,r,o){const{minScale:s,maxScale:n}=this;if(null==e)return;const l=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(l&&o?.messages?.push(new i.Z("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const a=[];let u=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){u=e.geometry.spatialReference.toJSON();break e}for(const t of X){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(a,r,t,s,n,u,o)}(0,p.RB)("featureCollection.layers",a,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,l.d9)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const r of this.sublayers)for(const o of r.graphics)if(null!=o.geometry){const r=o.geometry;e?(0,b.fS)(r.spatialReference,e)||((0,m.canProjectWithoutEngine)(r.spatialReference,e)||(0,m.isLoaded)()||await(0,m.load)(),o.geometry=(0,m.project)(r,e)):e=r.spatialReference,t.push(o)}const r=await(0,S.aX)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=r[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,r,o,s,n,i){const a=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(a,e,r.geometryType,i);this._normalizeObjectIds(a,H),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,l.d9)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:o,maxScale:s,objectIdField:"OBJECTID",fields:[H.toJSON(),k.toJSON()],spatialReference:n},featureSet:{features:a,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,o){if(null==t)return;const{geometry:s,symbol:n,popupTemplate:i}=t;if(null==s)return;if(s.type!==r)return void o?.messages?.push(new u.Z("map-notes-layer:invalid-geometry-type",`Geometry "${s.type}" cannot be saved in "${r}" layer`,{graphic:t}));if(null==n)return void o?.messages?.push(new u.Z("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const l={attributes:{...t.attributes},geometry:s.toJSON(),symbol:n.toJSON()};null!=i&&(l.popupInfo=i.toJSON()),e.push(l)}_normalizeObjectIds(e,t){const r=t.name;let o=(0,L.S)(r,e)+1;const s=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[r]||s.has(e[r]))&&(e[r]=o++),s.add(e[r])}}};(0,o._)([(0,y.Cb)({readOnly:!0})],K.prototype,"capabilities",void 0),(0,o._)([(0,d.r)(["portal-item","web-map"],"capabilities",["layers"])],K.prototype,"readCapabilities",null),(0,o._)([(0,y.Cb)({readOnly:!0})],K.prototype,"featureCollections",void 0),(0,o._)([(0,d.r)(["web-map","portal-item"],"featureCollections",["layers"])],K.prototype,"readFeatureCollections",null),(0,o._)([(0,y.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],K.prototype,"featureCollectionJSON",void 0),(0,o._)([(0,d.r)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],K.prototype,"readLegacyfeatureCollectionJSON",null),(0,o._)([(0,y.Cb)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],K.prototype,"featureCollectionType",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],K.prototype,"fullExtent",null),(0,o._)([(0,y.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],K.prototype,"legendEnabled",void 0),(0,o._)([(0,y.Cb)({type:["show","hide","hide-children"]})],K.prototype,"listMode",void 0),(0,o._)([(0,y.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],K.prototype,"minScale",void 0),(0,o._)([(0,d.r)(["web-map","portal-item"],"minScale",["layers"])],K.prototype,"readMinScale",null),(0,o._)([(0,y.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],K.prototype,"maxScale",void 0),(0,o._)([(0,d.r)(["web-map","portal-item"],"maxScale",["layers"])],K.prototype,"readMaxScale",null),(0,o._)([(0,y.Cb)({readOnly:!0})],K.prototype,"multipointLayer",null),(0,o._)([(0,y.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],K.prototype,"operationalLayerType",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],K.prototype,"pointLayer",null),(0,o._)([(0,y.Cb)({readOnly:!0})],K.prototype,"polygonLayer",null),(0,o._)([(0,y.Cb)({readOnly:!0})],K.prototype,"polylineLayer",null),(0,o._)([(0,y.Cb)({type:Q.Z})],K.prototype,"spatialReference",void 0),(0,o._)([(0,d.r)(["web-map","portal-item"],"spatialReference",["layers"])],K.prototype,"readSpatialReference",null),(0,o._)([(0,y.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],K.prototype,"sublayers",void 0),(0,o._)([(0,d.r)("web-map","sublayers",["layers"])],K.prototype,"readSublayers",null),(0,o._)([(0,h.c)("web-map","sublayers")],K.prototype,"writeSublayers",null),(0,o._)([(0,y.Cb)({readOnly:!0})],K.prototype,"textLayer",null),(0,o._)([(0,y.Cb)()],K.prototype,"title",void 0),(0,o._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],K.prototype,"type",void 0),K=(0,o._)([(0,f.j)("esri.layers.MapNotesLayer")],K);const V=K},92908:(e,t,r)=>{r.d(t,{S:()=>s,X:()=>o});const o=1;function s(e,t){let r=0;for(const o of t){const t=o.attributes?.[e];"number"==typeof t&&isFinite(t)&&(r=Math.max(r,t))}return r}},54295:(e,t,r)=>{r.d(t,{V:()=>i});var o=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const i=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,o._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,o._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>a});var o=r(43697),s=r(92604),n=r(5600),i=(r(75215),r(67676),r(80442),r(52011)),l=r(66677);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,s.Z.getLogger(this)))}};return(0,o._)([(0,n.Cb)()],t.prototype,"title",null),(0,o._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,o._)([(0,i.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>i});var o=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const i=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,o._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,o._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>b});var o=r(43697),s=r(92604),n=r(95330),i=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),y=(r(66643),r(20102),r(26258),r(87538));const c=new u.Z,d=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let m=0,g=0;function S(){const e=Date.now();let t=!1;for(const r of c){const o=r.deref();o?o.refreshInterval&&e-(d.get(o)??0)+5>=6e4*o.refreshInterval&&(d.set(o,e),o.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,y.EH)((()=>{const e=Date.now();let t=0;for(const r of c){const o=r.deref();o&&(t=h(Math.round(6e4*o.refreshInterval),t),o.refreshInterval?d.get(o)||d.set(o,e):d.delete(o))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(S,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,o._)([(0,i.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,o._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,o._)([(0,i.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,o._)([(0,i.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,o._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>y});var o=r(43697),s=r(2368),n=r(35454),i=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const p=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,s.J)(i.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,o._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,o._)([(0,l.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,o._)([(0,a.j)("esri.layers.support.FeatureTemplate")],u);const y=u},16451:(e,t,r)=>{r.d(t,{Z:()=>d});var o=r(43697),s=r(2368),n=r(96674),i=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),p=r(30556),u=r(72729),y=r(70082);let c=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,o._)([(0,i.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,o._)([(0,i.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,i.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,o._)([(0,l.r)("domains")],c.prototype,"readDomains",null),(0,o._)([(0,p.c)("domains")],c.prototype,"writeDomains",null),(0,o._)([(0,i.Cb)({type:[y.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,o._)([(0,a.j)("esri.layers.support.FeatureType")],c);const d=c},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var o,s=r(43697),n=r(46791),i=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));let p=o=class extends i.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new o({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=o=(0,s._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},54275:(e,t,r)=>{r.d(t,{h:()=>y});var o=r(80442),s=r(66677);function n(e,t,r){return!!l(e,t,r)}function i(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function y(e,t){return{analytics:c(e),attachment:d(e),data:f(e),metadata:h(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:S(e),queryTopFeatures:b(e),editing:w(e)}}function c(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function d(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:n(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=a[e.name];t&&(r[t]=!!e.isEnabled)})),r}function f(e){return{isVersioned:n(e,"isDataVersioned",!1),supportsAttachment:n(e,"hasAttachments",!1),supportsM:n(e,"hasM",!1),supportsZ:n(e,"hasZ",!1)}}function h(e){return{supportsAdvancedFieldProperties:n(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const o=e?e.toLowerCase().split(",").map((e=>e.trim())):[],i=r?(0,s.Qc)(r):null,l=o.includes(null!=i&&"MapServer"===i.serverType?"data":"query"),a=o.includes("editing")&&!t.datesInUnknownTimezone;let p=a&&o.includes("create"),u=a&&o.includes("delete"),y=a&&o.includes("update");const c=o.includes("changetracking"),d=t.advancedQueryCapabilities;return a&&!(p||u||y)&&(p=u=y=!0),{supportsCalculate:n(t,"supportsCalculate",!1),supportsTruncate:n(t,"supportsTruncate",!1),supportsValidateSql:n(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:a,supportsChangeTracking:c,supportsQuery:l,supportsQueryAnalytics:n(d,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(d,"supportsQueryAttachments",!1),supportsQueryTopFeatures:n(d,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(t,"supportsAttachmentsResizing",!1),supportsSync:o.includes("sync"),supportsUpdate:y,supportsExceedsLimitStatistics:n(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:n(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,l=e.ownershipBasedAccessControlForFeatures,a=e.archivingInfo,y=e.currentVersion,c=t?.includes("MapServer"),d=!c||y>=(0,o.Z)("mapserver-pbf-version-support"),f=(0,s.M8)(t),h=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:n(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:n(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:n(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:n(r,"supportsReturningGeometryCentroid",!1),supportsDistance:n(r,"supportsQueryWithDistance",!1),supportsDistinct:n(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:n(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:n(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(r,"supportsHavingClause",!1),supportsOrderBy:n(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:n(r,"supportsPagination",!1),supportsQuantization:n(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:n(e,"supportsReturningQueryGeometry",!1),supportsResultType:n(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:n(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:n(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:n(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:n(l,"allowAnonymousToQuery",!0),supportsQueryByOthers:n(l,"allowOthersToQuery",!0),supportsHistoricMoment:n(a,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:d&&h.has("pbf"),supportsDisjointSpatialRelationship:n(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:n(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:n(r,"supportsDefaultSR",!1),supportsCompactGeometry:f,supportsFullTextSearch:n(r,"supportsFullTextSearch",!1),maxRecordCountFactor:i(e,"maxRecordCountFactor",void 0),maxRecordCount:i(e,"maxRecordCount",void 0),standardMaxRecordCount:i(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:i(e,"tileMaxRecordCount",void 0)}}function S(e){const t=e.advancedQueryCapabilities,r=n(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function b(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(e,"allowGeometryUpdates",!0),supportsGlobalId:n(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(r,"supportsAsyncApplyEdits",!1)}}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var o=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,o.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var o,s=r(43697),n=r(66577),i=r(38171),l=r(35454),a=r(96674),p=r(22974),u=r(5600),y=(r(75215),r(71715)),c=r(52011),d=r(30556),f=r(82971),h=r(33955),m=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let S=o=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],n=i.Z.fromJSON(s),l=s.geometry&&s.geometry.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=r);const a=s.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],o=a[e],s=o?.spatialReference;null==t||s||(t.spatialReference=r)}o.push(n)}return o}writeGeometryType(e,t,r,o){if(e)return void g.write(e,t,r,o);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,o)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,o=(0,h.im)(e);return o&&!r&&t.spatialReference&&(o.spatialReference=f.Z.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const o=t.features[r];if(o.geometry){const t=e&&e[r];o.geometry=t&&t.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,r],translate:[o,s]}=e,n=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-o)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)i?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[o,s],scale:[n,i]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*n+o),(e=>s-e*i),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let o,s;const n=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=r(l[1]);e===o&&i===s||(n.push([e-o,i-s]),o=e,s=i)}else o=t(l[0]),s=r(l[1]),n.push([o,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,h.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=o.length;e<n;e++){const n=o[e],i=this._quantizePoints(n,t,r);i&&s.push(i)}return s.length>0?((0,h.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,r);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,o,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),o&&(e.z=o(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths;let i,l;for(let e=0,o=n.length;e<o;e++){const o=n[e];for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(i+=s[0],l+=s[1]):(i=s[0],l=s[1]),s[0]=t(i),s[1]=r(l)}}if(o&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2]),r[3]=s(r[3])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),o&&null!=e.zmax&&null!=e.zmin&&(e.zmax=o(e.zmax),e.zmin=o(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let i,l;for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=r(l)}if(o&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2]),t[3]=s(t[3])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,u.Cb)({type:String,json:{write:!0}})],S.prototype,"displayFieldName",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,u.Cb)({type:[i.Z],json:{write:!0}})],S.prototype,"features",void 0),(0,s._)([(0,y.r)("features")],S.prototype,"readFeatures",null),(0,s._)([(0,u.Cb)({type:[m.Z],json:{write:!0}})],S.prototype,"fields",void 0),(0,s._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],S.prototype,"geometryType",void 0),(0,s._)([(0,d.c)("geometryType")],S.prototype,"writeGeometryType",null),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"hasM",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"hasZ",void 0),(0,s._)([(0,u.Cb)({types:n.qM,json:{write:!0}})],S.prototype,"queryGeometry",void 0),(0,s._)([(0,y.r)("queryGeometry")],S.prototype,"readQueryGeometry",null),(0,s._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],S.prototype,"spatialReference",void 0),(0,s._)([(0,d.c)("spatialReference")],S.prototype,"writeSpatialReference",null),(0,s._)([(0,u.Cb)({json:{write:!0}})],S.prototype,"transform",void 0),S=o=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],S),S.prototype.toJSON.isDefaultToJSON=!0;const b=S},11282:(e,t,r)=>{r.d(t,{cv:()=>l,en:()=>i,lA:()=>n}),r(68773),r(40330);var o=r(22974),s=r(17452);function n(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,s.mN)(e):(0,o.d9)(e)}function l(e,t,r){const o={};for(const s in e){if("declaredClass"===s)continue;const n=e[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){o[s]=[];for(let e=0;e<n.length;e++)o[s][e]=l(n[e])}else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r&&r[s]);o[s]=t?e:JSON.stringify(e)}else o[s]=t?n:JSON.stringify(n);else o[s]=n}return o}r(71058)},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>s,eG:()=>a,lF:()=>i,lj:()=>u,qP:()=>l,wW:()=>p});const o=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:o,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:o},i={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={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},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2664],{65845:(e,t,r)=>{r.d(t,{D:()=>n});var a=r(81153);function n(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},32664:(e,t,r)=>{r.d(t,{save:()=>P,saveAs:()=>S});var a=r(67676),n=(r(20102),r(19238)),i=r(64383),o=r(66677),s=r(52104),l=r(84230),u=(r(33516),r(14661));const c="Feature Service",d="feature-layer-utils",p=`${d}-save`,y=`${d}-save-as`;function f(e){return{isValid:(0,l.fP)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const t=[],r=[];for(const{layer:a,layerJSON:n}of e)a.isTable?r.push(n):t.push(n);return{layers:t,tables:r}}function w(e){return m([e])}async function v(e,t){return/\/\d+\/?$/.test(e.url)?w(t[0]):async function(e,t){if(!t)return m(e);const{layer:{url:r,customParameters:a,apiKey:i}}=e[0];let o=await t.fetchData("json");o&&null!=o.layers&&null!=o.tables||(o=await async function(e,t,r){e||={},e.layers||=[],e.tables||=[];const{url:a,customParameters:i,apiKey:o}=t,{serviceJSON:l,layersJSON:u}=await(0,s.V)(a,{customParameters:i,apiKey:o}),c=b(e.layers,l.layers,r),d=b(e.tables,l.tables,r);e.layers=c.itemResources,e.tables=d.itemResources;const p=[...c.added,...d.added],y=u?[...u.layers,...u.tables]:[];return await async function(e,t,r,a){const i=t.map((({id:e})=>new n.default({url:r,layerId:e,sourceJSON:a.find((({id:t})=>t===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((t=>{const{layerId:r,loaded:a,defaultPopupTemplate:n}=t;a&&null!=n&&I(t,{id:r,popupInfo:n.toJSON()},e)}))}(e,p,a,y),e}(o,{url:r??"",customParameters:a,apiKey:i},e.map((e=>e.layer.layerId))));for(const t of e)I(t.layer,t.layerJSON,o);return o}(t,e)}function b(e,t,r){const n=(0,a.e5)(e,t,((e,t)=>e.id===t.id));e=e.filter((e=>!n.removed.some((t=>t.id===e.id))));const i=n.added.map((({id:e})=>({id:e})));return i.forEach((({id:t})=>{e.push({id:t})})),{itemResources:e,added:i.filter((({id:e})=>!r.includes(e)))}}function I(e,t,r){e.isTable?h(r.tables,t):h(r.layers,t)}function h(e,t){const r=e.findIndex((({id:e})=>e===t.id));-1===r?e.push(t):e[r]=t}async function g(e,t){const{url:r,layerId:a,title:n,fullExtent:i,isTable:s}=e,l=(0,o.Qc)(r);t.url="FeatureServer"===l?.serverType?r:`${r}/${a}`,t.title||=n,t.extent=null,s||null==i||(t.extent=await(0,u.$o)(i)),(0,u.ck)(t,u.Kz.METADATA),(0,u.ck)(t,u.Kz.MULTI_LAYER),(0,u.qj)(t,u.Kz.SINGLE_LAYER),s&&(0,u.qj)(t,u.Kz.TABLE)}async function P(e,t){return(0,i.a1)({layer:e,itemType:c,validateLayer:f,createItemData:(e,t)=>v(t,[e]),errorNamePrefix:p},t)}async function S(e,t,r){return(0,i.po)({layer:e,itemType:c,validateLayer:f,createItemData:(e,t)=>Promise.resolve(w(e)),errorNamePrefix:y,newItem:t,setItemProperties:g},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>v,po:()=>b});var a=r(20102),n=r(65845),i=r(48522),o=r(15235),s=r(33516),l=r(14661),u=r(14769);async function c(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.Z(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function d(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function p(e,t,r,n){if(e.type!==r)throw new a.Z(`${t}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:e,layer:n})}function y(e,t,r){const{portalItem:n}=e;if(!n)throw new a.Z(`${t}:portal-item-not-set`,d(e,"requires the portalItem property to be set"));if(!n.loaded)throw new a.Z(`${t}:portal-item-not-loaded`,d(e,"cannot be saved to a portal item that does not exist or is inaccessible"));(0,u.w)(n),p(n,t,r,e)}function f(e,t,r,a){let n=o.default.from(e);return n.id&&(n=n.clone(),n.id=null),n.type??=r,n.portal??=i.Z.getDefault(),(0,u.w)(n),p(n,t,r,a),n}async function m(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const n=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),n}function w(e){(0,l.qj)(e,l.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function v(e,t){const{layer:r,createItemData:a,errorNamePrefix:i,itemType:o}=e;await c(e),y(r,i,o);const l=r.portalItem,u=(0,s.Y)(l),d=await m(r,u,t),p=await a({layer:r,layerJSON:d},l);return w(l),await l.update({data:p}),(0,n.D)(u),l}async function b(e,t){const{layer:r,createItemData:a,setItemProperties:i,newItem:o,errorNamePrefix:l,itemType:u}=e;await c(e);const d=f(o,l,u,r),p=(0,s.Y)(d),y=await m(r,p,t),v=await a({layer:r,layerJSON:y},d);return await i(r,d),w(d),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(d,v,t),r.portalItem=d,(0,n.D)(p),d}},52104:(e,t,r)=>{r.d(t,{V:()=>n});var a=r(96187);async function n(e,t){const r=await(0,a.T)(e,t);r.layers=r.layers.filter(i);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const o=await(0,a.T)(e+"/layers",t);return n.layersJSON={layers:o.layers.filter(i),tables:o.tables},n}function i(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},33516:(e,t,r)=>{r.d(t,{Y:()=>o,h:()=>i});var a=r(17452),n=r(48522);function i(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}},96187:(e,t,r)=>{r.d(t,{T:()=>n});var a=r(3172);async function n(e,t){const{data:r}=await(0,a.Z)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}});return r}},14769:(e,t,r)=>{r.d(t,{w:()=>o});var a=r(68773),n=r(20102),i=r(71058);function o(e){if(a.default.apiKey&&(0,i.r)(e.portal.url))throw new n.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4599],{45091:(e,t,s)=>{s.d(t,{Z:()=>c});var n,r,i=s(80442),a=s(71143);(r=n||(n={}))[r.varint=0]="varint",r[r.fixed64=1]="fixed64",r[r.delimited=2]="delimited",r[r.fixed32=5]="fixed32",r[r.unknown=99]="unknown";const o=4294967296,u=new TextDecoder("utf-8"),l=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class c{constructor(e,t,s=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,s,r)}_init(e,t,s,n){this._data=e,this._dataView=t,this._pos=s,this._end=n}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,n){const r=this.getMessage(),i=e(r,t,s,n);return r.release(),i}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,n=0;if(this._end-t>=10)do{if(n=e[t++],s|=127&n,0==(128&n))break;if(n=e[t++],s|=(127&n)<<7,0==(128&n))break;if(n=e[t++],s|=(127&n)<<14,0==(128&n))break;if(n=e[t++],s|=(127&n)<<21,0==(128&n))break;if(n=e[t++],s+=268435456*(127&n),0==(128&n))break;if(n=e[t++],s+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],s+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],s+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],s+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],s+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,s+=(127&n)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=n*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t=this._pos,s=0,n=0;const r=1&e[t];if(this._end-t>=10)do{if(n=e[t++],s|=127&n,0==(128&n))break;if(n=e[t++],s|=(127&n)<<7,0==(128&n))break;if(n=e[t++],s|=(127&n)<<14,0==(128&n))break;if(n=e[t++],s|=(127&n)<<21,0==(128&n))break;if(n=e[t++],s+=268435456*(127&n),0==(128&n))break;if(n=e[t++],s+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],s+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],s+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],s+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],s+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,s+=(127&n)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=n*r}return this._pos=t,r?-(s+1)/2:s/2}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>l){const n=e.subarray(t,s);return u.decode(n)}let n="",r="";for(let i=t;i<s;++i){const t=e[i];128&t?r+="%"+t.toString(16):(n+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(n+=decodeURIComponent(r)),n}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}c.pool=new a.Z(c,void 0,(e=>{e._data=null,e._dataView=null}))},16306:(e,t,s)=>{s.d(t,{aX:()=>S});var n=s(68773),r=s(20102),i=s(92604),a=s(38913),o=s(58901),u=s(73913),l=s(8744),c=s(40488),f=(s(66577),s(3172)),p=s(33955),d=s(11282),h=s(17452);async function g(e,t,s){const n="string"==typeof e?(0,h.mN)(e):e,r=t[0].spatialReference,i=(0,p.Ji)(t[0]),a={...s,query:{...n.query,f:"json",sr:(0,l.B9)(r),geometries:JSON.stringify((u=t,{geometryType:(0,p.Ji)(u[0]),geometries:u.map((e=>e.toJSON()))}))}},{data:o}=await(0,f.Z)(n.path+"/simplify",a);var u;return function(e,t,s){const n=(0,p.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}(o.geometries,i,r)}const y=i.Z.getLogger("esri.geometry.support.normalizeUtils");function m(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function b(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y.error(e),new r.Z(e)}const s=(0,u.x3)(e),n=[];for(const e of s){const s=[];n.push(s),s.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const r=e[n][0],i=e[n][1],a=e[n+1][0],o=e[n+1][1],u=Math.sqrt((a-r)*(a-r)+(o-i)*(o-i)),l=(o-i)/u,c=(a-r)/u,f=u/t;if(f>1){for(let e=1;e<=f-1;e++){const n=e*t,a=c*n+r,o=l*n+i;s.push([a,o])}const e=(u+Math.floor(f-1)*t)/2,n=c*e+r,a=l*e+i;s.push([n,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:n,spatialReference:e.spatialReference}):new o.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.Sx)(t,!0)}return s&&(e=(0,u.Sy)(e,s)),e}function k(e,t,s){if(Array.isArray(e)){const n=e[0];if(n>t){const s=(0,u.XZ)(n,t);e[0]=n+s*(-2*t)}else if(n<s){const t=(0,u.XZ)(n,s);e[0]=n+t*(-2*s)}}else{const n=e.x;if(n>t){const s=(0,u.XZ)(n,t);e=e.clone().offset(s*(-2*t),0)}else if(n<s){const t=(0,u.XZ)(n,s);e=e.clone().offset(t*(-2*s),0)}}return e}function x(e,t){let s=-1;for(let n=0;n<t.cutIndexes.length;n++){const r=t.cutIndexes[n],i=t.geometries[n],a=(0,u.x3)(i);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const n=t[e][0];s=n>s?n:s}s=Number(s.toFixed(9));const n=-360*(0,u.XZ)(s,180);for(let s=0;s<t.length;s++){const t=i.getPoint(e,s);i.setPoint(e,s,t.clone().offset(n,0))}return!0}}))}if(r===s){if(m(e))for(const t of(0,u.x3)(i))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,u.x3)(i))e[r]=e[r].addPath(t)}else s=r,e[r]=i}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let i,h,m,_,w,T,q,F,R=0;const I=[],U=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,h=(0,l.C5)(i),m=i.isWebMercator,T=m?102100:4326,_=u.UZ[T].maxX,w=u.UZ[T].minX,q=u.UZ[T].plus180Line,F=u.UZ[T].minus180Line),h)if("mesh"===t.type)U.push(t);else if("point"===t.type)U.push(k(t.clone(),_,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>k(e,_,w))),U.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,h);U.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,s=(0,u.XZ)(e.xmin,w)*(2*_);let n=0===s?t.clone():(0,u.Sy)(t.clone(),s);e.offset(s,0),e.intersects(q)&&e.xmax!==_?(R=e.xmax>R?e.xmax:R,n=b(n,m),I.push(n),U.push("cut")):e.intersects(F)&&e.xmin!==w?(R=e.xmax*(2*_)>R?e.xmax*(2*_):R,n=b(n,m,360),I.push(n),U.push("cut")):U.push(n)}else U.push(t.clone());else U.push(t);else U.push(t);let Z=(0,u.XZ)(R,_),E=-90;const V=Z,O=new o.Z;for(;Z>0;){const e=360*Z-180;O.addPath([[e,E],[e,-1*E]]),E*=-1,Z--}if(I.length>0&&V>0){const t=x(I,await async function(e,t,s,n){const r=(0,d.en)(e),i=t[0].spatialReference,a={...n,responseType:"json",query:{...r.query,f:"json",sr:(0,l.B9)(i),target:JSON.stringify({geometryType:(0,p.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,f.Z)(r.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map((e=>{const t=(0,p.im)(e);return t.spatialReference=i,t}))}}(r,I,O,s)),n=[],i=[];for(let s=0;s<U.length;s++){const r=U[s];if("cut"!==r)i.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(n.push(r),i.push("simplify")):i.push(m?(0,c.$)(r):r)}}if(!n.length)return i;const a=await g(r,n,s),o=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?o.push(t):o.push(m?(0,c.$)(a.shift()):a.shift())}return o}const N=[];for(let e=0;e<U.length;e++){const t=U[e];if("cut"!==t)N.push(t);else{const e=I.shift();N.push(!0===m?(0,c.$)(e):e)}}return N}},73913:(e,t,s)=>{s.d(t,{Sy:()=>u,UZ:()=>a,XZ:()=>o,x3:()=>l});var n=s(58901),r=s(82971),i=s(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:r.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:r.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,i.oU)(e)?e.rings:e.paths}},76497:(e,t,s)=>{function n(e){const t={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){t[s]=[];for(let e=0;e<r.length;e++)t[s][e]=n(r[e])}else"object"==typeof r?r.toJSON&&(t[s]=JSON.stringify(r)):t[s]=r}return t}s.d(t,{A:()=>n})},77863:(e,t,s)=>{s.d(t,{G$:()=>w,K9:()=>I,wn:()=>_});var n=s(20102),r=s(45091),i=s(5428),a=s(78760);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],u=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],l=["upperLeft","lowerLeft"];function c(e){return e>=o.length?null:o[e]}function f(e){return e>=u.length?null:u[e]}function p(e){return e>=l.length?null:l[e]}function d(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function h(e,t,s){const n=e.asUnsafe(),r=t.createPointGeometry(s);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addCoordinatePoint(r,n.getSInt64(),i++);break}default:n.skip()}return r}function g(e,t,s){const n=e.asUnsafe(),r=t.createGeometry(s),i=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addLength(r,n.getUInt32(),i++);break}case 3:{const e=n.getUInt32(),s=n.pos()+e;let a=0;for(t.allocateCoordinates(r);n.pos()<s;)t.addCoordinate(r,n.getSInt64(),a),a++,a===i&&(a=0);break}default:n.skip()}return r}function y(e){const t=e.asUnsafe(),s=new i.Z;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.coords.push(t.getSInt64());break}case 1:n=a.S[t.getEnum()];break;default:t.skip()}return{queryGeometry:s,queryGeometryType:n}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),s={type:c(0)};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=c(t.getEnum());break;case 3:s.alias=t.getString();break;case 4:s.sqlType=f(t.getEnum());break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function b(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}function k(e,t,s,n){const r=t.createFeature(s);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[i++].name;r.attributes[t]=e.processMessage(m);break}case 2:r.geometry=e.processMessageWithArgs(g,t,s);break;case 4:r.centroid=e.processMessageWithArgs(h,t,s);break;default:e.skip()}return r}function x(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function S(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function w(e){const t={originPosition:p(0)},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=p(s.getEnum());break;case 2:t.scale=s.processMessage(x);break;case 3:t.translate=s.processMessage(S);break;default:s.skip()}return t}function T(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function q(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function F(e,t){const s=t.createFeatureResult(),n=e.asUnsafe();s.geometryType=d(t,0);let r=!1;for(;n.next();)switch(n.tag()){case 1:s.objectIdFieldName=n.getString();break;case 3:s.globalIdFieldName=n.getString();break;case 4:s.geohashFieldName=n.getString();break;case 5:s.geometryProperties=n.processMessage(T);break;case 7:s.geometryType=d(t,n.getEnum());break;case 8:s.spatialReference=n.processMessageWithArgs(q,t);break;case 10:s.hasZ=n.getBool();break;case 11:s.hasM=n.getBool();break;case 12:s.transform=n.processMessage(w);break;case 9:s.exceededTransferLimit=n.getBool();break;case 13:t.addField(s,n.processMessage(_));break;case 15:r||(t.prepareFeatures(s),r=!0),t.addFeature(s,n.processMessageWithArgs(k,t,s,s.fields));break;case 2:s.uniqueIdField=n.processMessage(b);break;default:n.skip()}return t.finishFeatureResult(s),s}function R(e,t){const s={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(y);break;case 1:s.featureResult=e.processMessageWithArgs(F,t);break;default:e.skip()}return null!=n&&s.featureResult&&t.addQueryGeometry(s,n),s}function I(e,t){try{const s=2,n=new r.Z(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===s?i.queryResult=n.processMessageWithArgs(R,t):n.skip();return i}catch(e){throw new n.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,s)=>{s.d(t,{J:()=>l,S:()=>u});var n=s(67900),r=s(8744),i=s(70272),a=s(44876),o=s(5428);const u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this._options=e,this.geometryTypes=u,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e||!e.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,r.fS)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n._R)(this._options.sourceSpatialReference)/(0,n._R)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,i.S6)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.u_}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.Z}}},45178:(e,t,s)=>{s.d(t,{C:()=>r});var n=s(77863);function r(e,t){const s=(0,n.K9)(e,t),r=s.queryResult.featureResult,i=s.queryResult.queryGeometry,a=s.queryResult.queryGeometryType;if(r&&r.features&&r.features.length&&r.objectIdFieldName){const e=r.objectIdFieldName;for(const t of r.features)t.attributes&&(t.objectId=t.attributes[e])}return r&&(r.queryGeometry=i,r.queryGeometryType=a),r}},34599:(e,t,s)=>{s.d(t,{Ev:()=>y,JT:()=>d,Vr:()=>_,hH:()=>m,n7:()=>g,qp:()=>h});var n=s(3172),r=s(17452),i=s(33955),a=s(16306),o=s(8744),u=s(76497),l=s(45178),c=s(28694);const f="Layer does not support extent calculation.";function p(e,t){const s=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const r=n;let a,u,l;if(null!=s&&(u=s.spatialReference,l=(0,o.B9)(u),r.geometryType=(0,i.Ji)(s),r.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(s,e.compactGeometryEnabled),r.inSR=l),n.groupByFieldsForStatistics&&(r.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(r.objectIds=n.objectIds.join(",")),n.orderByFields&&(r.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete r.outFields:n.outFields.includes("*")?r.outFields="*":r.outFields=n.outFields.join(","),n.outSR?(r.outSR=(0,o.B9)(n.outSR),a=e.outSpatialReference):s&&(n.returnGeometry||n.returnCentroid)&&(r.outSR=r.inSR,a=u),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(r.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(r.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(r.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters&&null!=e.quantizationParameters.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,r.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(r.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(r.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(r.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:s}=e;null==t&&null==s||(r.time=t===s?t:`${t??"null"},${s??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=a&&u.equals(a)&&(r.defaultSR=r.inSR,delete r.inSR,delete r.outSR),r}async function d(e,t,s,n){const r=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,c.p)(t,s,r.data),r}async function h(e,t,s,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:s.createFeatureResult()};const r=await g(e,t,n),i=r;return i.data=(0,l.C)(r.data,s),i}function g(e,t,s){return b(e,t,"pbf",s)}function y(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",s,{returnIdsOnly:!0})}function m(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,s){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}),r=n.data;if(r.hasOwnProperty("extent"))return n;if(r.features)throw new Error(f);if(r.hasOwnProperty("count"))throw new Error(f);return n}async function b(e,t,s,i={},o={}){const l="string"==typeof e?(0,r.mN)(e):e,c=t.geometry?[t.geometry]:[],f=await(0,a.aX)(c,null,{signal:i.signal}),d=f&&f[0];null!=d&&((t=t.clone()).geometry=d);const h=(0,u.A)({...l.query,f:s,...o,...p(t,o)});return(0,n.Z)((0,r.v_)(l.path,(g=o,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...i,responseType:"pbf"===s?"array-buffer":"json",query:{...h,...i.query}});var g}},11282:(e,t,s)=>{s.d(t,{cv:()=>o,en:()=>a,lA:()=>i}),s(68773),s(40330);var n=s(22974),r=s(17452);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,r.mN)(e):(0,n.d9)(e)}function o(e,t,s){const n={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){n[r]=[];for(let e=0;e<i.length;e++)n[r][e]=o(i[e])}else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(s&&s[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?i:JSON.stringify(i);else n[r]=i}return n}s(71058)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3975,7873],{65845:(e,t,r)=>{r.d(t,{D:()=>a});var s=r(81153);function a(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,s.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function s(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>s})},54295:(e,t,r)=>{r.d(t,{V:()=>i});var s=r(43697),a=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const i=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,a.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var s=r(43697),a=r(92604),o=r(5600),i=(r(75215),r(67676),r(80442),r(52011)),n=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Nm)(e,a.Z.getLogger(this)))}};return(0,s._)([(0,o.Cb)()],t.prototype,"title",null),(0,s._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,i.j)("esri.layers.mixins.ArcGISService")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>L,Vt:()=>T});var s=r(43697),a=r(3172),o=r(20102),i=r(92604),n=r(95330),l=r(17452),p=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),d=r(30556),h=r(65845),y=r(6570),m=r(79235),f=r(82971),v=r(66677),g=r(21506),w=r(61064);var S=r(48522),I=r(15235),_=r(14769),x=r(66643),b=r(41123),R=r(97873);async function O(e,t,r=null){const s=await A(e,t,r);await K(s,t,r)}async function Z(e,t,r,s,a=null){const o=await A(r,s,a);await e.update({data:t}),await K(o,s,a)}async function A(e,t,r=null){if(!t||!t.resources)return;const s=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const a=new Set(t.resources.toKeep.map((e=>e.resource.path))),i=new Set,l=[];a.forEach((t=>{s.delete(t),e.paths.push(t)}));for(const o of t.resources.toUpdate)if(s.delete(o.resource.path),a.has(o.resource.path)||i.has(o.resource.path)){const{resource:t,content:s,finish:a,error:i}=o,n=(0,R.W7)(t,(0,b.D)());e.paths.push(n.path),l.push(C({resource:n,content:s,compress:o.compress,finish:a,error:i},r))}else e.paths.push(o.resource.path),l.push(N(o,r)),i.add(o.resource.path);for(const a of t.resources.toAdd)e.paths.push(a.resource.path),s.has(a.resource.path)?s.delete(a.resource.path):l.push(C(a,r));if(0===l.length)return s;const p=await(0,n.UO)(l);if((0,n.k_)(r),p.length>0)throw new o.Z("save:resources","Failed to save one or more resources",{errors:p});return s}async function K(e,t,r=null){if(!e||!t.portalItem)return;const s=[];for(const a of e){const e=t.portalItem.resourceFromPath(a);s.push(e.portalItem.removeResource(e,r))}await(0,n.as)(s)}async function C(e,t){const r={...null!=t?t:{},compress:e.compress},s=await(0,x.q6)(e.resource.portalItem.addResource(e.resource,await(0,R.FO)(e.content),r));if(!0!==s.ok)throw e.error?.(s.error),s.error;e.finish?.(e.resource)}async function N(e,t){const r=await(0,x.q6)(e.resource.update(await(0,R.FO)(e.content),t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const j="esri.layers.mixins.SceneService",P=i.Z.getLogger(j),T=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,n.Ds)((async(e,t,r)=>{switch(e){case L.SAVE:return this._save(t);case L.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return f.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,s=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=s?new f.Z(s):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const s=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.Z.fromJSON(s,r)}const s=t.store,a=this._readSpatialReference(t);return null==a||null==s||null==s.extent||!Array.isArray(s.extent)||s.extent.some((e=>e<E))?null:new y.Z({xmin:s.extent[0],ymin:s.extent[1],xmax:s.extent[2],ymax:s.extent[3],spatialReference:a})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,s=null!=r.version?r.version.toString():"";return this.parseVersionString(s)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,v.a7)(this.url,t.name);let s=t.name;if(!s&&this.url){const e=(0,v.Qc)(this.url);null!=e&&(s=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(s=r+" - "+s),(0,v.ld)(s)}set url(e){const t=(0,v.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:P});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,s){(0,v.wH)(this,e,"layers",t,s)}get parsedUrl(){const e=this._get("url"),t=(0,l.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,w.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,P,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new o.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<E||null==this.fullExtent||this.fullExtent.hasZ)return;const s=r.obb.halfSize,a=r.obb.center[2],i=Math.sqrt(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]);this.fullExtent.zmin=a-i,this.fullExtent.zmax=a+i}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<E)return;const r=t[2],s=t[3],{fullExtent:a}=this;a&&(a.zmin=r-s,a.zmax=r+s)}}async _fetchService(e){if(null==this.url)throw new o.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,a.Z)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,a.Z)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const s=t.data;this.read(s,this._getServiceContext()),this.validateLayer(s)}async _fetchVoxelServiceLayer(e){const t=(await(0,a.Z)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const s=t.getTypeKeywords();for(const t of s)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===U.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...F,...t};let s=I.default.from(e);if(!s)throw new o.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");(0,_.w)(s),s.id&&(s=s.clone(),s.id=null);const a=s.portal||S.Z.getDefault();await this._ensureLoadBeforeSave(),s.type=q,s.portal=a;const i={origin:"portal-item",url:null,messages:[],portal:a,portalItem:s,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},n={layers:[this.write({},i)]};return await Promise.all(i.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(n,i,r),s.url=this.url,s.title||(s.title=this.title),this._updateTypeKeywords(s,r,U.newItem),await a.signIn(),await(a.user?.addItem({item:s,folder:r&&r.folder,data:n})),await O(this.resourceReferences,i,null),this.portalItem=s,(0,h.D)(i),i.portalItem=s,s}async _save(e){const t={...F,...e};if(!this.portalItem)throw new o.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if((0,_.w)(this.portalItem),this.portalItem.type!==q)throw new o.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${q}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,l.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||S.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},s={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(s,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,U.existingItem),await Z(this.portalItem,s,this.resourceReferences,r,null),(0,h.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let s=t.messages?.filter((e=>"error"===e.type)).map((e=>new o.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(s=s.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)));const a=r?.validationOptions,i=a?.enabled,n=null;if(i&&n){const t=(await n()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(P.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===a.failPolicy){const e=t.map((e=>new o.Z("sceneservice:schema-validation",e))).concat(s);throw new o.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(s.length>0)throw new o.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}};return(0,s._)([(0,p.Cb)(g.id)],t.prototype,"id",void 0),(0,s._)([(0,p.Cb)({type:f.Z})],t.prototype,"spatialReference",void 0),(0,s._)([(0,u.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,s._)([(0,p.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,s._)([(0,u.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,s._)([(0,p.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,s._)([(0,u.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,p.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,s._)([(0,p.Cb)({type:String})],t.prototype,"title",void 0),(0,s._)([(0,u.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,s._)([(0,u.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,s._)([(0,p.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,s._)([(0,p.Cb)(g.HQ)],t.prototype,"url",null),(0,s._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,s._)([(0,p.Cb)()],t.prototype,"parsedUrl",null),(0,s._)([(0,p.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,s._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,s._)([(0,c.j)(j)],t),t},E=-1e38;var U,k;(k=U||(U={}))[k.existingItem=0]="existingItem",k[k.newItem=1]="newItem";const q="Scene Service",F={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var L;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(L||(L={}))},61064:(e,t,r)=>{r.d(t,{T:()=>o});var s=r(3172),a=r(20102);async function o(e,t,r,o,i,n){let l=null;if(null!=r){const t=`${e}/nodepages/`,a=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,s.Z)(a,{query:{f:"json",token:o},responseType:"json",signal:n})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=i&&i.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",a,e),l=e}}if(!t)return null;const p=`${e}/nodes/`,u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,s.Z)(u,{query:{f:"json",token:o},responseType:"json",signal:n})).data,urlPrefix:p}}catch(e){throw new a.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:u})}}},97873:(e,t,r)=>{r.d(t,{FO:()=>c,W7:()=>d,addOrUpdateResource:()=>n,fetchResources:()=>i,removeAllResources:()=>p,removeResource:()=>l});var s=r(3172),a=r(20102),o=r(17452);async function i(e,t={},r){await e.load(r);const s=(0,o.v_)(e.itemUrl,"resources"),{start:a=1,num:i=10,sortOrder:n="asc",sortField:l="created"}=t,p={query:{start:a,num:i,sortOrder:n,sortField:l,token:e.apiKey},signal:r?.signal},u=await e.portal.request(s,p);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map((({created:t,size:r,resource:s})=>({created:new Date(t),size:r,resource:e.resourceFromPath(s)})))}}async function n(e,t,r,s){if(!e.hasPath())throw new a.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const i=e.portalItem;await i.load(s);const n=(0,o.v_)(i.userItemUrl,"add"===t?"addResources":"updateResources"),[l,p]=u(e.path),c=new FormData;return l&&"."!==l&&c.append("resourcesPrefix",l),null!=s&&s.compress&&c.append("compress","true"),c.append("fileName",p),c.append("file",r,p),c.append("f","json"),null!=s&&s.access&&c.append("access",s.access),await i.portal.request(n,{method:"post",body:c,signal:s?.signal}),e}async function l(e,t,r){if(!t.hasPath())throw new a.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const s=(0,o.v_)(e.userItemUrl,"removeResources");await e.portal.request(s,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function p(e,t){await e.load(t);const r=(0,o.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function c(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,s.Z)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,s]=function(e){const[t,r]=function(e){const t=(0,o.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[s,a]=u(t);return[s,a,r]}(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+s))}},14769:(e,t,r)=>{r.d(t,{w:()=>i});var s=r(68773),a=r(20102),o=r(71058);function i(e){if(s.default.apiKey&&(0,o.r)(e.portal.url))throw new a.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);