@arcgis/core 4.28.0-rc.2 → 4.28.0-rc.4

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 (163) hide show
  1. package/arcade/ArcadeDate.js +1 -1
  2. package/arcade/functions/featuresetbase.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{0e354096ad8817971eed.js → 02d235849ba93541d7ad.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0422c5160491fbcf01dc.js +1 -0
  6. package/assets/esri/core/workers/chunks/1da721608993783dc9cf.js +1 -0
  7. package/assets/esri/core/workers/chunks/224e79f6c172da444e0a.js +1 -0
  8. package/assets/esri/core/workers/chunks/{ca3d5803cdf035d7389d.js → 30776102fbab294bfe7b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{61dec8399919b278b636.js → 3ac9001b19a90faf5573.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{fa6103e3d4e857b0035b.js → 3dcb2a82e1e4b520c9c9.js} +11 -8
  11. package/assets/esri/core/workers/chunks/41081c921037e543a22f.js +1 -0
  12. package/assets/esri/core/workers/chunks/4564a7885d045a850887.js +1 -0
  13. package/assets/esri/core/workers/chunks/4adf3a8c6b49c381a633.js +1 -0
  14. package/assets/esri/core/workers/chunks/{2721aa6b6941b28b9758.js → 63c8bf00120a4e67f5b0.js} +1 -1
  15. package/assets/esri/core/workers/chunks/6bc1f6f8a2408fa4bb6a.js +1 -0
  16. package/assets/esri/core/workers/chunks/74951370a341f02d3714.js +1 -0
  17. package/assets/esri/core/workers/chunks/78e49a70193e5adea17c.js +1 -0
  18. package/assets/esri/core/workers/chunks/7b8377b3a9f78f9d3613.js +1 -0
  19. package/assets/esri/core/workers/chunks/{fd28400141a6751327ae.js → 7cf7f2b991a7cbdad2ce.js} +1 -1
  20. package/assets/esri/core/workers/chunks/830d99e6c58a52a58973.js +1 -0
  21. package/assets/esri/core/workers/chunks/{1a723bb4a341f645e5fe.js → 83b8141f0c80e3448012.js} +1 -1
  22. package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +1 -0
  23. package/assets/esri/core/workers/chunks/934c32c49bb9e21482fd.js +1 -0
  24. package/assets/esri/core/workers/chunks/{a4341ec0fe89b865d849.js → a160576f21ada91995ac.js} +1 -1
  25. package/assets/esri/core/workers/chunks/a1e16c33f1843dbdce26.js +1 -0
  26. package/assets/esri/core/workers/chunks/{d07235ce2765a25b9be4.js → a50ec5b647a160199cb2.js} +1 -1
  27. package/assets/esri/core/workers/chunks/b6bd31674076e543d8b2.js +1 -0
  28. package/assets/esri/core/workers/chunks/{77923afde29ae1ff10ca.js → b6e86e179f99b5cf8dff.js} +1 -1
  29. package/assets/esri/core/workers/chunks/c3ddf5dbc34f118002df.js +1 -0
  30. package/assets/esri/core/workers/chunks/{562eafa5090827ebb7ec.js → c87e9280681c20d042b5.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{7b3d5f044c96e2c2af11.js → d191267d91a53db42956.js} +1 -1
  32. package/assets/esri/core/workers/chunks/ffa330a19a09679212fb.js +1 -0
  33. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +9 -13
  34. package/assets/esri/themes/base/widgets/_Features.scss +5 -0
  35. package/assets/esri/themes/base/widgets/_Legend.scss +1 -1
  36. package/assets/esri/themes/base/widgets/_Popup.scss +0 -1
  37. package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +3 -3
  38. package/assets/esri/themes/dark/main.css +1 -1
  39. package/assets/esri/themes/light/main.css +1 -1
  40. package/assets/esri/themes/light/view.css +1 -1
  41. package/geometry/support/meshUtils/georeference.js +1 -1
  42. package/interfaces.d.ts +1506 -314
  43. package/intl/date.js +1 -1
  44. package/kernel.js +1 -1
  45. package/layers/FeatureLayer.js +1 -1
  46. package/layers/GroupLayer.js +1 -1
  47. package/layers/OrientedImageryLayer.js +1 -1
  48. package/layers/SceneLayer.js +1 -1
  49. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  50. package/layers/graphics/data/QueryEngineResult.js +1 -1
  51. package/layers/graphics/data/queryValidationUtils.js +1 -1
  52. package/layers/mixins/ArcGISMapService.js +1 -1
  53. package/layers/save/groupLayerUtils.js +1 -1
  54. package/layers/save/utils.js +1 -1
  55. package/layers/support/ImageElement.js +1 -1
  56. package/layers/support/LayerContingentValuesCache.js +1 -1
  57. package/layers/support/Sublayer.js +1 -1
  58. package/layers/support/Subtype.d.ts +4 -0
  59. package/layers/support/Subtype.js +1 -1
  60. package/layers/support/imageryRendererUtils.js +1 -1
  61. package/networks/Network.js +1 -1
  62. package/package.json +1 -1
  63. package/portal/support/jsonContext.js +1 -1
  64. package/portal/support/layersLoader.js +1 -1
  65. package/rest/featureService/FeatureService.d.ts +4 -0
  66. package/rest/featureService/FeatureService.js +1 -1
  67. package/rest/featureService/utils.d.ts +4 -0
  68. package/rest/query/operations/query.js +1 -1
  69. package/smartMapping/support/utils.js +1 -1
  70. package/statistics/utils.js +1 -1
  71. package/support/basemapUtils.js +1 -1
  72. package/support/revision.js +1 -1
  73. package/versionManagement/VersionManagementService.d.ts +4 -0
  74. package/versionManagement/VersionManagementService.js +1 -1
  75. package/views/2d/engine/Container.js +1 -1
  76. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  77. package/views/2d/engine/webgl/Overlay.js +1 -1
  78. package/views/2d/input/handlers/KeyPan.js +1 -1
  79. package/views/2d/interactive/editingTools/manipulations/DragManipulation.js +1 -1
  80. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  81. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  82. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  83. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  84. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  85. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  86. package/views/3d/layers/I3SMeshView3D.js +1 -1
  87. package/views/3d/layers/MediaLayerView3D.js +1 -1
  88. package/views/3d/layers/SceneLayerWorker.js +1 -1
  89. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  90. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  91. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  92. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  93. package/views/3d/support/MemoryController.js +1 -1
  94. package/views/3d/support/PBFDecoder.js +1 -1
  95. package/views/3d/support/ResourceController.js +1 -1
  96. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  97. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  98. package/views/3d/webgl-engine/core/FBOPool.js +5 -0
  99. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -6
  100. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -2
  101. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  102. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  103. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  104. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  105. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  106. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  107. package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
  108. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  109. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  110. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  111. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
  112. package/views/draw/DrawOperation.js +1 -1
  113. package/views/draw/support/Reshape.js +1 -1
  114. package/views/interactive/sketch/constraints.js +1 -1
  115. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  116. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  117. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  118. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  119. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  120. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  121. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  122. package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
  123. package/webdoc/support/writeUtils.js +1 -1
  124. package/widgets/BasemapGallery.js +1 -1
  125. package/widgets/DirectionalPad.js +1 -1
  126. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  127. package/widgets/Editor/EditorViewModel.js +1 -1
  128. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  129. package/widgets/Editor/UpdateWorkflow.js +1 -1
  130. package/widgets/Editor/VisibleElements.js +1 -1
  131. package/widgets/Editor/workflowUtils.js +1 -1
  132. package/widgets/Editor.js +1 -1
  133. package/widgets/FeatureForm/FieldInput.js +1 -1
  134. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  135. package/widgets/FeatureForm.js +1 -1
  136. package/widgets/Features.js +1 -1
  137. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +4 -0
  138. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  139. package/widgets/OrientedImageryViewer.js +1 -1
  140. package/widgets/TimeSlider.js +1 -1
  141. package/widgets/TimeZoneLabel.js +1 -1
  142. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  143. package/widgets/UtilityNetworkTrace.js +1 -1
  144. package/widgets/support/dateUtils.js +1 -1
  145. package/assets/esri/core/workers/chunks/00da3c16741a9bc47f3a.js +0 -1
  146. package/assets/esri/core/workers/chunks/0e4646d14fa0775bf463.js +0 -1
  147. package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +0 -1
  148. package/assets/esri/core/workers/chunks/51b8913dff24e693bd25.js +0 -1
  149. package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +0 -1
  150. package/assets/esri/core/workers/chunks/7388fd97e7b1a2142744.js +0 -1
  151. package/assets/esri/core/workers/chunks/7648f3341b7dff2825c3.js +0 -1
  152. package/assets/esri/core/workers/chunks/92d8f75e616afa5c761e.js +0 -1
  153. package/assets/esri/core/workers/chunks/9c77d69a13ec22cdd760.js +0 -1
  154. package/assets/esri/core/workers/chunks/a821fa1870b83fed5d31.js +0 -1
  155. package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +0 -1
  156. package/assets/esri/core/workers/chunks/b251d8a856dc8b9406e0.js +0 -1
  157. package/assets/esri/core/workers/chunks/c416df0668f6c596095f.js +0 -1
  158. package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +0 -1
  159. package/assets/esri/core/workers/chunks/f0d342303fc20e266d27.js +0 -1
  160. package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +0 -1
  161. package/assets/esri/core/workers/chunks/fc95b1a36ed68b851400.js +0 -1
  162. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +0 -4
  163. package/widgets/DirectionalPad.d.ts +0 -4
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4828,5732],{92835:(t,e,n)=>{n.d(e,{Z:()=>m});var i,o=n(43697),r=n(96674),s=n(35463),a=n(5600),l=(n(75215),n(67676),n(80442),n(71715)),c=n(52011),u=n(30556),h=n(25031);let d=i=class extends r.wq{static get allTime(){return p}static get empty(){return f}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,o=t.end?.getTime()??t.end;return e===i&&n===o}expandTo(t,e=h.By){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.JE)(n,t,e));let o=this.end;if(o){const n=(0,s.JE)(o,t,e);o=o.getTime()===n.getTime()?n:(0,s.Nm)(n,1,t,e)}return new i({start:n,end:o})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,o=t.start?.getTime()??-1/0,r=t.end?.getTime()??1/0;let s,a;if(o>=e&&o<=n?s=o:e>=o&&e<=r&&(s=e),n>=o&&n<=r?a=n:r>=e&&r<=n&&(a=r),null!=s&&null!=a&&!isNaN(s)&&!isNaN(a)){const t=new i;return t.start=s===-1/0?null:new Date(s),t.end=a===1/0?null:new Date(a),t}return i.empty}offset(t,e,n=h.By){if(this.isEmpty||this.isAllTime)return this.clone();const o=new i,{start:r,end:a}=this;return null!=r&&(o.start=(0,s.Nm)(r,t,e,n)),null!=a&&(o.end=(0,s.Nm)(a,t,e,n)),o}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:n})}};(0,o._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,o._)([(0,l.r)("end")],d.prototype,"readEnd",null),(0,o._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,o._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,o._)([(0,l.r)("start")],d.prototype,"readStart",null),(0,o._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=i=(0,o._)([(0,c.j)("esri.TimeExtent")],d);const p=new d,f=new d({start:void 0,end:void 0}),m=d},5732:(t,e,n)=>{n.d(e,{c:()=>i,g:()=>o});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},21787:(t,e,n)=>{n.d(e,{a:()=>l,d:()=>a,f:()=>o,i:()=>d,m:()=>c,n:()=>u,s:()=>r,t:()=>s});var i=n(46851);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function r(t,e,n,i,o,r,s,a,l,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t[4]=r,t[5]=s,t[6]=a,t[7]=l,t[8]=c,t}function s(t,e){if(t===e){const n=e[1],i=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*s-a*c,d=-u*r+a*l,p=c*r-s*l;let f=n*h+i*d+o*p;return f?(f=1/f,t[0]=h*f,t[1]=(-u*i+o*c)*f,t[2]=(a*i-o*s)*f,t[3]=d*f,t[4]=(u*n-o*l)*f,t[5]=(-a*n+o*r)*f,t[6]=p*f,t[7]=(-c*n+i*l)*f,t[8]=(s*n-i*r)*f,t):null}function l(t,e){const n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t[0]=s*u-a*c,t[1]=o*c-i*u,t[2]=i*a-o*s,t[3]=a*l-r*u,t[4]=n*u-o*l,t[5]=o*r-n*a,t[6]=r*c-s*l,t[7]=i*l-n*c,t[8]=n*s-i*r,t}function c(t,e,n){const i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],p=n[1],f=n[2],m=n[3],y=n[4],_=n[5],x=n[6],g=n[7],b=n[8];return t[0]=d*i+p*s+f*c,t[1]=d*o+p*a+f*u,t[2]=d*r+p*l+f*h,t[3]=m*i+y*s+_*c,t[4]=m*o+y*a+_*u,t[5]=m*r+y*l+_*h,t[6]=x*i+g*s+b*c,t[7]=x*o+g*a+b*u,t[8]=x*r+g*l+b*h,t}function u(t,e){const n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],p=e[11],f=e[12],m=e[13],y=e[14],_=e[15],x=n*a-i*s,g=n*l-o*s,b=n*c-r*s,v=i*l-o*a,w=i*c-r*a,M=o*c-r*l,P=u*m-h*f,C=u*y-d*f,R=u*_-p*f,I=h*y-d*m,S=h*_-p*m,B=d*_-p*y;let j=x*B-g*S+b*I+v*R-w*C+M*P;return j?(j=1/j,t[0]=(a*B-l*S+c*I)*j,t[1]=(l*R-s*B-c*C)*j,t[2]=(s*S-a*R+c*P)*j,t[3]=(o*S-i*B-r*I)*j,t[4]=(n*B-o*R+r*C)*j,t[5]=(i*R-n*S-r*P)*j,t[6]=(m*M-y*w+_*v)*j,t[7]=(y*b-f*M-_*g)*j,t[8]=(f*w-m*b+_*x)*j,t):null}function h(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function d(t){const e=(0,i.g)(),n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8];return Math.abs(1-(n*n+s*s+c*c))<=e&&Math.abs(1-(o*o+a*a+u*u))<=e&&Math.abs(1-(r*r+l*l+h*h))<=e}const p=c,f=h;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],i=t[2],o=t[3],r=t[4],s=t[5],a=t[6],l=t[7],c=t[8];return e*(c*r-s*l)+n*(-c*o+s*a)+i*(l*o-r*a)},equals:function(t,e){const n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=e[0],p=e[1],f=e[2],m=e[3],y=e[4],_=e[5],x=e[6],g=e[7],b=e[8],v=(0,i.g)();return Math.abs(n-d)<=v*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(o-p)<=v*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(r-f)<=v*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(s-m)<=v*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(a-y)<=v*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(l-_)<=v*Math.max(1,Math.abs(l),Math.abs(_))&&Math.abs(c-x)<=v*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(u-g)<=v*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(h-b)<=v*Math.max(1,Math.abs(h),Math.abs(b))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,e){const n=e[0],i=e[1],o=e[2],r=e[3],s=n+n,a=i+i,l=o+o,c=n*s,u=i*s,h=i*a,d=o*s,p=o*a,f=o*l,m=r*s,y=r*a,_=r*l;return t[0]=1-h-f,t[3]=u-_,t[6]=d+y,t[1]=u+_,t[4]=1-c-f,t[7]=p-m,t[2]=d-y,t[5]=p+m,t[8]=1-c-h,t},fromRotation:function(t,e){const n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:p,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},normalFromMat4:u,normalFromMat4Legacy:function(t,e){const n=e[0],i=e[1],o=e[2],r=e[4],s=e[5],a=e[6],l=e[8],c=e[9],u=e[10],h=u*s-a*c,d=-u*r+a*l,p=c*r-s*l,f=n*h+i*d+o*p;if(!f)return null;const m=1/f;return t[0]=h*m,t[1]=(-u*i+o*c)*m,t[2]=(a*i-o*s)*m,t[3]=d*m,t[4]=(u*n-o*l)*m,t[5]=(-a*n+o*r)*m,t[6]=p*m,t[7]=(-c*n+i*l)*m,t[8]=(s*n-i*r)*m,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=Math.sin(n),p=Math.cos(n);return t[0]=p*i+d*s,t[1]=p*o+d*a,t[2]=p*r+d*l,t[3]=p*s-d*i,t[4]=p*a-d*o,t[5]=p*l-d*r,t[6]=c,t[7]=u,t[8]=h,t},scale:function(t,e,n){const i=n[0],o=n[1],r=n[2];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const i=n[0],o=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t},set:r,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:f,subtract:h,translate:function(t,e,n){const i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],p=n[1];return t[0]=i,t[1]=o,t[2]=r,t[3]=s,t[4]=a,t[5]=l,t[6]=d*i+p*s+c,t[7]=d*o+p*a+u,t[8]=d*r+p*l+h,t},transpose:s},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,i,o,r,s,a,l){return[t,e,n,i,o,r,s,a,l]}function r(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>i,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:i,createView:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var i,o,r,s=n(5732),a={exports:{}};i=a,o=function(){function t(n,i,o,r,s){for(;r>o;){if(r-o>600){var a=r-o+1,l=i-o+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(o,Math.floor(i-l*u/a+h)),Math.min(r,Math.floor(i+(a-l)*u/a+h)),s)}var d=n[i],p=o,f=r;for(e(n,o,i),s(n[r],d)>0&&e(n,o,r);p<f;){for(e(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[o],d)?e(n,o,f):e(n,++f,r),f<=i&&(o=f+1),i<=f&&(r=f-1)}}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}return function(e,i,o,r,s){t(e,i,o||0,r||e.length-1,s||n)}},void 0!==(r=o())&&(i.exports=r);const l=(0,s.g)(a.exports)},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>f,s:()=>o,t:()=>p});var i=n(46851);function o(t,e,n){return t[0]=e,t[1]=n,t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function a(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function l(t,e){const n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function c(t,e){const n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function u(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function h(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,i){const o=e[0],r=e[1];return t[0]=o+i*(n[0]-o),t[1]=r+i*(n[1]-r),t}function p(t,e,n){const i=e[0],o=e[1];return t[0]=n[0]*i+n[2]*o+n[4],t[1]=n[1]*i+n[3]*o+n[5],t}function f(t,e,n,i){const o=e[0]-n[0],r=e[1]-n[1],s=Math.sin(i),a=Math.cos(i);return t[0]=o*a-r*s+n[0],t[1]=o*s+r*a+n[1],t}const m=u,y=r,_=s,x=a,g=l,b=c,v=h;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},angle:function(t,e){const n=t[0],i=t[1],o=e[0],r=e[1];let s=n*n+i*i;s>0&&(s=1/Math.sqrt(s));let a=o*o+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*o+i*r)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,n){const i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},dist:g,distance:l,div:x,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],o=t[1],r=e[0],s=e[1],a=(0,i.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(o-s)<=a*Math.max(1,Math.abs(o),Math.abs(s))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:m,length:u,lerp:d,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:_,multiply:s,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const n=e[0],i=e[1];let o=n*n+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o),t},projectAndScale:function(t,e,n,i,o){let r=e[0]-n[0],s=e[1]-n[1];const a=(i[0]*r+i[1]*s)*(o-1);return r=i[0]*a,s=i[1]*a,t[0]=e[0]+r,t[1]=e[1]+s,t},random:function(t,e){e=e||1;const n=2*(0,i.R)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:f,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},set:o,sqrDist:b,sqrLen:v,squaredDistance:c,squaredLength:h,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:y,subtract:r,transformMat2:function(t,e,n){const i=e[0],o=e[1];return t[0]=n[0]*i+n[2]*o,t[1]=n[1]*i+n[3]*o,t},transformMat2d:p,transformMat3:function(t,e,n){const i=e[0],o=e[1];return t[0]=n[0]*i+n[3]*o+n[6],t[1]=n[1]*i+n[4]*o+n[7],t},transformMat4:function(t,e,n){const i=e[0],o=e[1];return t[0]=n[0]*i+n[4]*o+n[12],t[1]=n[1]*i+n[5]*o+n[13],t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function i(){return[0,0]}function o(t,e){return[t,e]}function r(t,e){return new Float64Array(t,e,2)}function s(){return o(1,1)}function a(){return o(1,0)}function l(){return o(0,1)}n.d(e,{a:()=>i,c:()=>r,f:()=>o});const c=s(),u=a(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:h,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:i,createView:r,fromArray:function(t,e=[0,0]){const n=Math.min(2,t.length);for(let i=0;i<n;++i)e[i]=t[i];return e},fromValues:o,ones:s,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},2368:(t,e,n)=>{n.d(e,{J:()=>u,j:()=>h});var i=n(43697),o=n(92036),r=(n(80442),n(22974)),s=(n(92604),n(70586)),a=n(31263),l=n(1153),c=n(52011);const u=t=>{let e=class extends t{clone(){const t=(0,l.vw)(this);(0,s.O3)(t,"unable to clone instance of non-accessor class");const e=t.metadatas,n=t.store,i={},o=new Map;for(const t in e){const s=e[t],l=n?.originOf(t),c=s.clonable;if(s.readOnly||!1===c||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const u=this[t];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,r.Vo)(u),null!=u&&null==h||(l===a.s3.DEFAULTS?o.set(t,h):i[t]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(i);if(o.size){const t=(0,l.vw)(c)?.store;if(t)for(const[e,n]of o)t.set(e,n,a.s3.DEFAULTS)}return c}};return e=(0,i._)([(0,c.j)("esri.core.Clonable")],e),e};let h=class extends(u(o.Z)){};h=(0,i._)([(0,c.j)("esri.core.Clonable")],h)},10699:(t,e,n)=>{n.d(e,{IG:()=>s,iv:()=>a});var i=n(43697),o=n(52011);let r=0;const s=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+r++})}};return e=(0,i._)([(0,o.j)("esri.core.Identifiable")],e),e},a=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:r++})}};return e=(0,i._)([(0,o.j)("esri.core.NumericIdentifiable")],e),e};let l=class extends(s(class{})){};l=(0,i._)([(0,o.j)("esri.core.Identifiable")],l)},70163:(t,e,n)=>{n.d(e,{Jl:()=>u,n$:()=>h});var i=n(3172),o=n(20102),r=n(95330),s=n(17452),a=n(49917);let l=null,c=!0;function u(t,e,n,i){if(!e||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(t,e,n)}catch(t){c=!1}const o=function(t,e,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(t,e)}(e,n,i);return o.data.set(t,0),o}async function h(t,e){const{arrayBuffer:l,mediaType:c}=await async function(t,e){const n=(0,s.sJ)(t);if(n?.isBase64)return{arrayBuffer:(0,a.R)(n.data),mediaType:n.mediaType};const o=await(0,i.Z)(t,{responseType:"array-buffer",...e});return{arrayBuffer:o.data,mediaType:o.getHeader("Content-Type")}}(t,e),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:t,parseGif:i}=await n.e(3310).then(n.bind(n,83310));if(t(l))return i(l,e)}if(u){const{isAnimatedPNG:t,parseApng:i}=await n.e(4492).then(n.bind(n,54492));if(t(l))return i(l,e)}return async function(t,e){const n=window.URL.createObjectURL(t);try{const{data:t}=await(0,i.Z)(n,{...e,responseType:"image"});return t}catch(t){if(!(0,r.D_)(t))throw new o.Z("invalid-image",`Could not fetch requested image at ${n}`);throw t}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),e)}},24133:(t,e,n)=>{n.d(e,{Q:()=>s});var i=n(67676),o=n(44553),r=n(88764);class s{constructor(t=9,e){this._compareMinX=u,this._compareMinY=h,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),g.prune(),b.prune(),v.prune(),w.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const i=this._toBBox;if(_(t,n))for(g.clear();n;){for(let o=0,r=n.children.length;o<r;o++){const r=n.children[o],s=n.leaf?i(r):r;_(t,s)&&(n.leaf?e(r):y(t,s)?this._all(r,e):g.push(r))}n=g.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!_(t,e))return!1;for(g.clear();e;){for(let i=0,o=e.children.length;i<o;i++){const o=e.children[i],r=e.leaf?n(o):o;if(_(t,r)){if(e.leaf||y(t,r))return!0;g.push(o)}}e=g.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new C([]),this}remove(t){if(!t)return this;let e,n=this._data,o=null,r=0,s=!1;const a=this._toBBox(t);for(v.clear(),w.clear();n||v.length>0;){if(n||(n=v.pop(),o=v.data[v.length-1],r=w.pop()??0,s=!0),n.leaf&&(e=(0,i.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),v.push(n),this._condense(v),this;s||n.leaf||!y(n,a)?o?(r++,n=o.children[r],s=!1):n=null:(v.push(n),w.push(r),r=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,i){const o=n-e+1;let r=this._maxEntries;if(o<=r){const i=new C(t.slice(e,n+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(o)/Math.log(r)),r=Math.ceil(o/r**(i-1)));const s=new R([]);s.height=i;const l=Math.ceil(o/r),c=l*Math.ceil(Math.sqrt(r));x(t,e,n,c,this._compareMinX);for(let o=e;o<=n;o+=c){const e=Math.min(o+c-1,n);x(t,o,e,l,this._compareMinY);for(let n=o;n<=e;n+=l){const o=Math.min(n+l-1,e);s.children.push(this._build(t,n,o,i-1))}}return a(s,this._toBBox),s}_chooseSubtree(t,e,n,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==n;){let n,i=1/0,o=1/0;for(let r=0,s=e.children.length;r<s;r++){const s=e.children[r],a=d(s),l=f(t,s)-a;l<o?(o=l,i=a<i?a:i,n=s):l===o&&a<i&&(i=a,n=s)}e=n||e.children[0]}return e}_insert(t,e,n){const i=this._toBBox,o=n?t:i(t);v.clear();const r=this._chooseSubtree(o,this._data,e,v);for(r.children.push(t),c(r,o);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(o,v,e)}_split(t,e){const n=t.data[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);const r=this._chooseSplitIndex(n,o,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const s=n.children.splice(r,n.children.length-r),l=n.leaf?new C(s):new R(s);l.height=n.height,a(n,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new R([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let i,o,r;i=o=1/0;for(let s=e;s<=n-e;s++){const e=l(t,0,s,this._toBBox),a=l(t,s,n,this._toBBox),c=m(e,a),u=d(e)+d(a);c<i?(i=c,r=s,o=u<o?u:o):c===i&&u<o&&(o=u,r=s)}return r}_chooseSplitAxis(t,e,n){const i=t.leaf?this._compareMinX:u,o=t.leaf?this._compareMinY:h;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,o)&&t.children.sort(i)}_allDistMargin(t,e,n,i){t.children.sort(i);const o=this._toBBox,r=l(t,0,e,o),s=l(t,n-e,n,o);let a=p(r)+p(s);for(let i=e;i<n-e;i++){const e=t.children[i];c(r,t.leaf?o(e):e),a+=p(r)}for(let i=n-e-1;i>=e;i--){const e=t.children[i];c(s,t.leaf?o(e):e),a+=p(s)}return a}_adjustParentBBoxes(t,e,n){for(let i=n;i>=0;i--)c(e.data[i],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const o=t.data[e-1],r=o.children;r.splice((0,i.cq)(r,n,r.length,o.indexHint),1)}else this.clear();else a(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,n,i,o){o||(o=new C([])),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let r,s=e;s<n;s++)r=t.children[s],c(o,t.leaf?i(r):r);return o}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function m(t,e){const n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),o=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,o-n)*Math.max(0,r-i)}function y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function _(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,i,o){const s=[e,n];for(;s.length;){const e=s.pop(),n=s.pop();if(e-n<=i)continue;const a=n+Math.ceil((e-n)/i/2)*i;(0,r.q)(t,a,n,e,o),s.push(n,a,a,e)}}const g=new o.Z,b=new o.Z,v=new o.Z,w=new o.Z({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class C extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class R extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>m,gx:()=>c,nn:()=>y,on:()=>h,tX:()=>_}),n(66643),n(46791);var i=n(91460),o=n(50758),r=n(70586),s=n(95330),a=n(26258);function l(t,e,n={}){return u(t,e,n,p)}function c(t,e,n={}){return u(t,e,n,f)}function u(t,e,n={},i){let o=null;const s=n.once?(t,n)=>{i(t)&&((0,r.hw)(o),e(t,n))}:(t,n)=>{i(t)&&e(t,n)};if(o=(0,a.aQ)(t,s,n.sync,n.equals),n.initial){const e=t();s(e,e)}return o}function h(t,e,n,s={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),s.onListenerRemove?.(a),a=null,c=null)}function d(t){s.once&&s.once&&(0,r.hw)(u),n(t)}const p=l(t,((t,n)=>{h(),(0,i.vT)(t)&&(a=t,c=(0,i.on)(t,e,d),s.onListenerAdd?.(t))}),{sync:s.sync,initial:!0});return u=(0,o.kB)((()=>{p.remove(),h()})),u}function d(t,e){return function(t,e,n){if((0,s.Hc)(n))return Promise.reject((0,s.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,o.AL)([(0,s.fu)(n,(()=>{l(),r((0,s.zE)())})),u(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??p)])}))}(t,f,e)}function p(t){return!0}function f(t){return!!t}n(87538);const m={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},41123:(t,e,n)=>{n.d(e,{D:()=>o,z:()=>r});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function r(){return`{${o()}}`}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>s,XZ:()=>a,x3:()=>c});var i=n(58901),o=n(82971),r=n(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=c(t);for(const t of n)for(const n of t)n[0]+=e;return t}function c(t){return(0,r.oU)(t)?t.rings:t.paths}},87085:(t,e,n)=>{n.d(e,{Z:()=>g});var i=n(43697),o=(n(66577),n(3172)),r=n(20102),s=n(32448),a=n(10699),l=n(83379),c=n(92604),u=n(95330),h=n(17452),d=n(5600),p=(n(75215),n(67676),n(80442),n(52011)),f=n(68773),m=n(6570),y=n(82971);let _=0,x=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,y.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await n.e(3529).then(n.bind(n,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await n.e(8008).then(n.bind(n,28008));try{return await i(e)}catch(t){const n=e&&e.portalItem,i=n?.id||"unset",o=n&&n.portal&&n.portal.url||f.default.portalUrl;throw c.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,u.D_)(t)||c.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,o.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new r.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.Cb)({type:String})],x.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.Cb)({type:m.Z})],x.prototype,"fullExtent",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"hasAttributionData",null),(0,i._)([(0,d.Cb)({type:String,clonable:!1})],x.prototype,"id",void 0),(0,i._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],x.prototype,"legendEnabled",void 0),(0,i._)([(0,d.Cb)({type:["show","hide","hide-children"]})],x.prototype,"listMode",void 0),(0,i._)([(0,d.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],x.prototype,"opacity",void 0),(0,i._)([(0,d.Cb)({clonable:!1})],x.prototype,"parent",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"parsedUrl",null),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],x.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.Cb)({type:Boolean})],x.prototype,"popupEnabled",void 0),(0,i._)([(0,d.Cb)({type:Boolean})],x.prototype,"attributionVisible",void 0),(0,i._)([(0,d.Cb)({type:y.Z})],x.prototype,"spatialReference",void 0),(0,i._)([(0,d.Cb)({type:String})],x.prototype,"title",void 0),(0,i._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],x.prototype,"type",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"url",void 0),(0,i._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],x.prototype,"visible",void 0),x=(0,i._)([(0,p.j)("esri.layers.Layer")],x);const g=x},57765:(t,e,n)=>{n.r(e),n.d(e,{default:()=>se});var i=n(43697),o=n(46791),r=n(20102),s=n(92604),a=n(16453),l=n(5600),c=n(90578),u=(n(67676),n(80442),n(71715)),h=n(52011),d=n(30556),p=n(87085),f=n(71612),m=n(38009),y=n(72965),_=n(3172),x=n(70163),g=n(17452),b=n(41123),v=(n(75215),n(10699)),w=n(96674),M=n(83379),P=n(92036),C=n(21787),R=n(46521),I=n(4307),S=n(17896);const B=(0,n(65617).c)(),j=(0,R.a)(),T=(0,R.a)(),Z=(0,R.a)();function O(t,e,n){return(0,S.s)(B,e[0],e[1],1),(0,S.t)(B,B,(0,C.t)(j,n)),0===B[2]?(0,I.s)(t,B[0],B[1]):(0,I.s)(t,B[0]/B[2],B[1]/B[2])}function L(t,e,n){return E(T,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),E(Z,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,C.m)(t,(0,C.a)(T,T),Z),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function E(t,e,n,i,o,r,s,a,l){(0,C.s)(t,e,i,r,n,o,s,1,1,1),(0,S.s)(B,a,l,1),(0,C.a)(j,t);const[c,u,h]=(0,S.t)(B,B,(0,C.t)(j,j));return(0,C.s)(j,c,0,0,0,u,0,0,0,h),(0,C.m)(t,j,t)}var X=n(62357),Y=n(97323),A=n(94139),N=n(38913),D=n(73615),U=n(82971),z=n(2368);let H=class extends z.j{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:i}=(0,D.projectOrLoad)(t,e);return i?null:i||n?n:(s.Z.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};H=(0,i._)([(0,h.j)("esri.layers.support.GeoreferenceBase")],H);const W=H,q=(0,R.a)(),V=(0,Y.a)();let F=class extends P.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,i._)([(0,l.Cb)()],F.prototype,"sourcePoint",void 0),(0,i._)([(0,l.Cb)({type:A.Z})],F.prototype,"mapPoint",void 0),F=(0,i._)([(0,h.j)("esri.layers.support.ControlPoint")],F);let G=class extends((0,w.eC)(W)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=U.Z.fromJSON(e.spatialReference),i=(0,R.f)(...e.coefficients,1);return t.map((t=>((0,I.s)(V,t.x,t.y),O(V,V,i),{sourcePoint:t,mapPoint:new A.Z({x:V[0],y:V[1],spatialReference:n})})))}writeControlPoints(t,e,n,i){if(null!=this.transform)null!=t&&J(t[0])&&(e.controlPoints=t.map((t=>{const e=t.sourcePoint;return{x:e.x,y:e.y}})),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8));else{const t=new r.Z("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:i?.layer,georeference:this});i?.messages?i.messages.push(t):s.Z.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(q);if(null==t||!J(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,i){const o=(0,Y.f)(0,n),r=(0,Y.f)(0,0),s=(0,Y.f)(e,0),a=(0,Y.f)(e,n);return O(o,o,t),O(r,r,t),O(s,s,t),O(a,a,t),new N.Z({rings:[[o,r,s,a,o]],spatialReference:i})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!J(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:i}=this,{rings:[[o,r,s,a]]}=t,l={sourcePoint:(0,X.vW)(0,i),mapPoint:new A.Z({x:o[0],y:o[1],spatialReference:e})},c={sourcePoint:(0,X.vW)(0,0),mapPoint:new A.Z({x:r[0],y:r[1],spatialReference:e})},u={sourcePoint:(0,X.vW)(n,0),mapPoint:new A.Z({x:s[0],y:s[1],spatialReference:e})},h={sourcePoint:(0,X.vW)(n,i),mapPoint:new A.Z({x:a[0],y:a[1],spatialReference:e})};J(l)&&J(c)&&J(u)&&J(h)&&(st(q,l,c,u,h),this.controlPoints=this.controlPoints.map((({sourcePoint:t})=>((0,I.s)(V,t.x,t.y),O(V,V,q),{sourcePoint:t,mapPoint:new A.Z({x:V[0],y:V[1],spatialReference:e})}))))}get inverseTransform(){return null==this.transform?null:(0,C.d)((0,R.a)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!J(this.controlPoints[0]))return null;(0,I.s)(V,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return O(V,V,this.transform),new A.Z({x:V[0],y:V[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!J(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,D.projectOrLoad)(t,e).geometry)?null:((0,I.s)(V,t.x,t.y),O(V,V,this.inverseTransform),(0,X.vW)(V[0],V[1]))}toSourceNormalized(t){const e=this.toSource(t);return null!=e&&(e.x/=this.width,e.y/=this.height),e}_updateTransform(t){const{controlPoints:e,width:n,height:i}=this;if(!(null!=e&&n>0&&i>0))return null;const[o,r,s,a]=e;if(!J(o))return null;const l=o.mapPoint.spatialReference,c=this._projectControlPoint(r,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!J(c.controlPoint))return null;null==t&&(t=(0,R.a)());let d=null;return d=J(u.controlPoint)&&J(h.controlPoint)?st(t,o,c.controlPoint,u.controlPoint,h.controlPoint):J(u.controlPoint)?function(t,e,n,i){return rt(k,tt,e),rt($,et,n),rt(K,nt,i),(0,I.l)(Q,k,$,.5),(0,I.r)(Q,K,Q,Math.PI),(0,I.l)(it,tt,et,.5),(0,I.r)(it,nt,it,Math.PI),ut(t,k,$,K,Q,tt,et,nt,it)}(t,o,c.controlPoint,u.controlPoint):function(t,e,n){return rt(k,tt,e),rt($,et,n),(0,I.r)(K,$,k,ot),(0,I.r)(Q,k,$,ot),(0,I.r)(nt,et,tt,-ot),(0,I.r)(it,tt,et,-ot),ut(t,k,$,K,Q,tt,et,nt,it)}(t,o,c.controlPoint),d.every((t=>0===t))?null:d}_projectControlPoint(t,e){if(!J(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:i}=t,{geometry:o,pending:r}=(0,D.projectOrLoad)(i,e);return r?{valid:!1,controlPoint:null}:r||o?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:o}}:(s.Z.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:i.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function J(t){return null!=t?.sourcePoint&&null!=t.mapPoint}(0,i._)([(0,l.Cb)({type:[F],json:{write:{allowNull:!1,isRequired:!0}}})],G.prototype,"controlPoints",void 0),(0,i._)([(0,u.r)("controlPoints")],G.prototype,"readControlPoints",null),(0,i._)([(0,d.c)("controlPoints")],G.prototype,"writeControlPoints",null),(0,i._)([(0,l.Cb)()],G.prototype,"coords",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],G.prototype,"height",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],G.prototype,"inverseTransform",null),(0,i._)([(0,l.Cb)({readOnly:!0})],G.prototype,"transform",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],G.prototype,"width",void 0),G=(0,i._)([(0,h.j)("esri.layers.support.ControlPointsGeoreference")],G);const k=(0,Y.a)(),$=(0,Y.a)(),K=(0,Y.a)(),Q=(0,Y.a)(),tt=(0,Y.a)(),et=(0,Y.a)(),nt=(0,Y.a)(),it=(0,Y.a)(),ot=Math.PI/2;function rt(t,e,n){(0,I.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,I.s)(e,n.mapPoint.x,n.mapPoint.y)}function st(t,e,n,i,o){return rt(k,tt,e),rt($,et,n),rt(K,nt,i),rt(Q,it,o),ut(t,k,$,K,Q,tt,et,nt,it)}const at=new Array(8).fill(0),lt=new Array(8).fill(0);function ct(t,e,n,i,o){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=i[0],t[5]=i[1],t[6]=o[0],t[7]=o[1],t}function ut(t,e,n,i,o,r,s,a,l){return L(t,ct(at,e,n,i,o),ct(lt,r,s,a,l))}const ht=G,dt=(0,Y.a)();let pt=class extends W{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:i}=this;if(null==t||null==e||null==n||null==i)return null;const o=t.spatialReference;return e=this.projectOrWarn(e,o),n=this.projectOrWarn(n,o),i=this.projectOrWarn(i,o),null==e||null==n||null==i?null:new N.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[i.x,i.y],[n.x,n.y]]],spatialReference:o})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[i,o,r,s]]}=t;this.bottomLeft=new A.Z({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new A.Z({x:o[0],y:o[1],spatialReference:n}),this.topRight=new A.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new A.Z({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(t){const{topLeft:e,topRight:n,bottomRight:i,bottomLeft:o}=this;if(null==t||null==e||null==n||null==i||null==o)return null;const r=e.spatialReference;t=t.normalize();const s=(0,D.projectOrLoad)(t,r).geometry;if(null==s)return null;(0,I.s)(dt,s.x,s.y);const a=L((0,R.a)(),[e.x,e.y,o.x,o.y,n.x,n.y,i.x,i.y],[0,0,0,1,1,0,1,1]);return O(dt,dt,a),(0,X.vW)(dt[0],dt[1])}};(0,i._)([(0,l.Cb)()],pt.prototype,"coords",null),(0,i._)([(0,l.Cb)({type:A.Z})],pt.prototype,"bottomLeft",void 0),(0,i._)([(0,l.Cb)({type:A.Z})],pt.prototype,"bottomRight",void 0),(0,i._)([(0,l.Cb)({type:A.Z})],pt.prototype,"topLeft",void 0),(0,i._)([(0,l.Cb)({type:A.Z})],pt.prototype,"topRight",void 0),pt=(0,i._)([(0,h.j)("esri.layers.support.CornersGeoreference")],pt);const ft=pt;var mt=n(22021),yt=n(46851),_t=n(6570);let xt=class extends W{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:o}=this.extent;let r;if(this.rotation){const{x:o,y:s}=this.extent.center,a=gt(o,s,this.rotation);r=[a(t,e),a(t,i),a(n,i),a(n,e)],r.push(r[0])}else r=[[t,e],[t,i],[n,i],[n,e],[t,e]];return new N.Z({rings:[r],spatialReference:o})}set coords(t){if(null==t||null==this.extent)return;const e=this.extent.spatialReference;if(t=this.projectOrWarn(t,e),null==t?.extent)return;const{rings:[[n,i,o]],extent:{center:{x:r,y:s}}}=t,a=(0,mt.BV)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),l=gt(r,s,-a),[c,u]=l(n[0],n[1]),[h,d]=l(o[0],o[1]);this.extent=new _t.Z({xmin:c,ymin:u,xmax:h,ymax:d,spatialReference:e}),this.rotation=a}toSourceNormalized(t){const{extent:e,rotation:n}=this;if(null==t||null==e)return null;const{xmin:i,ymin:o,xmax:r,ymax:s,center:a,spatialReference:l}=e;t=t.normalize();const c=(0,D.projectOrLoad)(t,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=gt(a.x,a.y,-n)(u,h)),(0,X.vW)((0,mt.bA)(u,i,r,0,1),(0,mt.bA)(h,s,o,0,1))}};function gt(t,e,n){const i=(0,yt.t)(n),o=Math.cos(i),r=Math.sin(i);return(n,i)=>[o*(n-t)+r*(i-e)+t,o*(i-e)-r*(n-t)+e]}(0,i._)([(0,l.Cb)()],xt.prototype,"coords",null),(0,i._)([(0,l.Cb)({type:_t.Z})],xt.prototype,"extent",void 0),(0,i._)([(0,l.Cb)({type:Number})],xt.prototype,"rotation",void 0),xt=(0,i._)([(0,h.j)("esri.layers.support.ExtentAndRotationGeoreference")],xt);const bt={key:"type",base:W,typeMap:{"control-points":ht,corners:ft,"extent-and-rotation":xt}};let vt=class extends((0,v.iv)((0,w.eC)(M.Z))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return ht.fromJSON(t)}get contentWidth(){return 0}get contentHeight(){return 0}toSource(t){const{georeference:e,contentWidth:n,contentHeight:i}=this;if(null==t||null==e||0===n||0===i)return null;const o=e.toSourceNormalized(t);return null==o?null:(o.x*=n,o.y*=i,o)}};(0,i._)([(0,l.Cb)({types:bt,json:{write:!0}})],vt.prototype,"georeference",void 0),(0,i._)([(0,u.r)("georeference")],vt.prototype,"readGeoreference",null),(0,i._)([(0,l.Cb)()],vt.prototype,"opacity",void 0),vt=(0,i._)([(0,h.j)("esri.layers.support.MediaElementBase")],vt);const wt=vt;var Mt=n(66094),Pt=n(25929);let Ct=class extends wt{constructor(t){super(t),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,x.n$)(t).then((t=>{this._set("content",t)}));this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then((()=>{this._set("content",t)}));this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r.Z("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(t,e,n){return(0,Pt.f)(e.url,n)}writeImage(t,e,n,i){if(null==t)return;const o=i?.portalItem,r=i?.resources;if(!o||!r)return void("string"==typeof t&&(e[n]=(0,Pt.t)(t,i)));const s="string"!=typeof t||(0,g.HK)(t)||(0,g.jc)(t)?null:t;if(s){if(null==(0,Pt.i)(s))return void(e[n]=s);const t=(0,Pt.t)(s,{...i,verifyItemRelativeUrls:i?.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Pt.M.NO);if(o&&t&&!(0,g.YP)(t))return r.toKeep.push({resource:o.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",r.pendingOperations.push(It(t).then((t=>{const i=function(t,e){const n=(0,b.D)(),i=`${(0,g.v_)("media",n)}.${(0,Mt.B)({type:"blob",blob:t})}`;return e.resourceFromPath(i)}(t,o);e[n]=i.itemRelativeUrl,r.toAdd.push({resource:i,content:{type:"blob",blob:t},compress:!1,finish:t=>{this.image=t.url}})})))}};(0,i._)([(0,l.Cb)()],Ct.prototype,"animationOptions",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Ct.prototype,"content",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Ct.prototype,"contentWidth",null),(0,i._)([(0,l.Cb)({readOnly:!0})],Ct.prototype,"contentHeight",null),(0,i._)([(0,l.Cb)({json:{name:"url",type:String}})],Ct.prototype,"image",void 0),(0,i._)([(0,u.r)("image",["url"])],Ct.prototype,"readImage",null),(0,i._)([(0,d.c)("image")],Ct.prototype,"writeImage",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{name:"mediaType"}})],Ct.prototype,"type",void 0),Ct=(0,i._)([(0,h.j)("esri.layers.support.ImageElement")],Ct);const Rt=Ct;async function It(t){if("string"==typeof t){if((0,g.jc)(t)){const{data:e}=await(0,_.Z)(t,{responseType:"blob"});return e}return(0,g.HK)(t)?(0,g.fw)(t):It((await(0,_.Z)(t,{responseType:"image"})).data)}return new Promise((e=>function(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,n=t instanceof HTMLImageElement?t.naturalHeight:t.height,i=document.createElement("canvas"),o=i.getContext("2d");return i.width=e,i.height=n,t instanceof HTMLImageElement?o.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&o.putImageData(t,0,0),i}(t).toBlob(e)))}n(66577);var St=n(70921),Bt=n(32448),jt=n(609),Tt=n(95330),Zt=n(17445),Ot=n(24470),Lt=n(87416),Et=n(8744),Xt=n(37549),Yt=n(20322),At=n(86662),Nt=n(33955),Dt=n(73913);function Ut(t,e,n){if(Array.isArray(t)){const i=t[0];if(i>e){const n=(0,Dt.XZ)(i,e);t[0]=i+n*(-2*e)}else if(i<n){const e=(0,Dt.XZ)(i,n);t[0]=i+e*(-2*n)}}else{const i=t.x;if(i>e){const n=(0,Dt.XZ)(i,e);t.x+=n*(-2*e)}else if(i<n){const e=(0,Dt.XZ)(i,n);t.x+=e*(-2*n)}}return t}function zt(t,e){const n=[],{ymin:i,ymax:o,xmin:r,xmax:s}=t,a=t.xmax-t.xmin,[l,c]=e.valid,{x:u,frameId:h}=Ht(t.xmin,e),{x:d,frameId:p}=Ht(t.xmax,e),f=u===d&&a>0;if(a>2*c){const t={xmin:r<s?u:d,ymin:i,xmax:c,ymax:o},e={xmin:l,ymin:i,xmax:r<s?d:u,ymax:o},a={xmin:0,ymin:i,xmax:c,ymax:o},f={xmin:l,ymin:i,xmax:0,ymax:o},m=[],y=[];Wt(t,a)&&m.push(h),Wt(t,f)&&y.push(h),Wt(e,a)&&m.push(p),Wt(e,f)&&y.push(p);for(let t=h+1;t<p;t++)m.push(t),y.push(t);n.push(new Ft(t,[h]),new Ft(e,[p]),new Ft(a,m),new Ft(f,y))}else u>d||f?n.push(new Ft({xmin:u,ymin:i,xmax:c,ymax:o},[h]),new Ft({xmin:l,ymin:i,xmax:d,ymax:o},[p])):n.push(new Ft({xmin:u,ymin:i,xmax:d,ymax:o},[h]));return n}function Ht(t,e){const[n,i]=e.valid,o=2*i;let r,s=0;return t>i?(r=Math.ceil(Math.abs(t-i)/o),t-=r*o,s=r):t<n&&(r=Math.ceil(Math.abs(t-n)/o),t+=r*o,s=-r),{x:t,frameId:s}}function Wt(t,e){const{xmin:n,ymin:i,xmax:o,ymax:r}=e;return qt(t,n,i)&&qt(t,n,r)&&qt(t,o,r)&&qt(t,o,i)}function qt(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function Vt(t,e,n=!0){const i=!(0,Nt.l9)(t);if(i&&(0,At.Zy)(t),n)return(new Jt).cut(t,e);const o=i?t.rings:t.paths,r=i?4:2,s=o.length,a=-2*e;for(let t=0;t<s;t++){const e=o[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);o.push(t)}}return i?t.rings=o:t.paths=o,t}class Ft{constructor(t,e){this.extent=t,this.frameIds=e}}const Gt=(0,Ot.Ue)();class Jt{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,e){let n;if(this._xCut=e,t.rings)this._closed=!0,n=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,n=t.paths,this._minPts=2}for(const t of n){if(!t||t.length<this._minPts)continue;let e=!0;for(const n of t)e?(this.moveTo(n),e=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const t of this._linesIn)t&&t.length>=this._minPts&&n.push(t);const i=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=i;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide==-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(this._addPolyVertex(this._lineIn,n<=0?t:this._xCut,e),this._addPolyVertex(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_addPolyVertex(t,e,n){const i=t.length;i>1&&t[i-1][0]===e&&t[i-2][0]===e?t[i-1][1]=n:t.push([e,n])}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let kt=class extends P.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t?.extent?null:(0,Ot.oJ)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,D.projectOrLoad)(t,this.spatialReference).geometry}get normalizedCoords(){return N.Z.fromJSON(function(t,e){if(null==t)return null;const n=t.spatialReference,i=(0,Et.C5)(n),o=(0,w.AK)(t)?t.toJSON():t;if(!i)return o;const r=(0,Et.sS)(n)?102100:4326,s=Dt.UZ[r].maxX,a=Dt.UZ[r].minX;if((0,Nt.wp)(o))return Ut(o,s,a);if((0,Nt.aW)(o))return o.points=o.points.map((t=>Ut(t,s,a))),o;if((0,Nt.YX)(o))return function(t,e){if(!e)return t;const n=zt(t,e).map((t=>t.extent));return n.length<2?n[0]||t:n.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:n.map((t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]))}}(o,i);if((0,Nt.oU)(o)||(0,Nt.l9)(o)){const t=(0,Yt.$P)(Gt,o),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},i=(0,Dt.XZ)(n.xmin,a)*(2*s),r=0===i?o:(0,Dt.Sy)(o,i);return n.xmin+=i,n.xmax+=i,n.xmax>s?Vt(r,s,e):n.xmin<a?Vt(r,a,e):r}return o}(this.coords,!0))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,Ot.oJ)(t):null}};(0,i._)([(0,l.Cb)()],kt.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)()],kt.prototype,"element",void 0),(0,i._)([(0,l.Cb)()],kt.prototype,"bounds",null),(0,i._)([(0,l.Cb)()],kt.prototype,"coords",null),(0,i._)([(0,l.Cb)()],kt.prototype,"normalizedCoords",null),(0,i._)([(0,l.Cb)()],kt.prototype,"normalizedBounds",null),kt=(0,i._)([(0,h.j)("esri.layers.support.MediaElementView")],kt);var $t=n(91460);let Kt=class extends wt{constructor(t){super(t),this.autoplay=!0,this.content=null,this.type="video"}load(){const t=this.video;if("string"==typeof t){const e=document.createElement("video");e.src=t,e.crossOrigin="anonymous",e.autoplay=!0,e.muted=!0,e.loop=!0,this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)})))}else t instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)}))):this.addResolvingPromise(Promise.reject(new r.Z("video-element:invalid-video-type","Invalid video type",{video:t})));return Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}set video(t){"not-loaded"===this.loadStatus?this._set("video",t):s.Z.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(t){return new Promise(((e,n)=>{const i=(0,$t.IH)(t,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?t.play().then(e,n):e()}));this.addHandles(i,"canplay"),"anonymous"!==t.crossOrigin&&(t.crossOrigin="anonymous",t.src?.includes("blob:")||(t.src=t.src))}))}};(0,i._)([(0,l.Cb)()],Kt.prototype,"autoplay",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Kt.prototype,"content",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Kt.prototype,"contentWidth",null),(0,i._)([(0,l.Cb)({readOnly:!0})],Kt.prototype,"contentHeight",null),(0,i._)([(0,l.Cb)()],Kt.prototype,"video",null),Kt=(0,i._)([(0,h.j)("esri.layers.support.VideoElement")],Kt);const Qt=Kt,te={key:"type",defaultKeyValue:"image",base:wt,typeMap:{image:Rt,video:Qt}},ee=o.Z.ofType(te);let ne=class extends(M.Z.LoadableMixin((0,jt.v)(Bt.Z.EventedAccessor))){constructor(t){super(t),this._index=new Xt.H,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.removeHandles(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new kt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const i=(0,Zt.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.addHandles(i,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new ee}async load(t){if((0,Tt.k_)(t),!this.spatialReference){const t=this.elements.find((t=>null!=t.georeference?.coords));this._set("spatialReference",t?t.georeference.coords.spatialReference:U.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,St.Z)(t,this._get("elements"),ee))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new _t.Z({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:this.spatialReference})}set spatialReference(t){"not-loaded"===this.loadStatus?this._set("spatialReference",t):s.Z.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,D.initializeProjection)(t.spatialReference,this.spatialReference,null,e);const n=(0,Et.fS)(t.spatialReference,this.spatialReference)?t:(0,D.project)(t,this.spatialReference);if(!n)return[];const i=n.normalize(),o=[];for(const t of i)this._index.forEachInBounds((0,Ot.oJ)(t),(({normalizedCoords:e,element:n})=>{null!=e&&(0,Lt.Nl)(t,e)&&o.push(n)}));return o.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),o}_updateIndexForElement(t,e){const n=t.normalizedBounds,i=this._index.has(t),o=null!=n;this._index.delete(t),o&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(i!==o?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,i._)([(0,l.Cb)()],ne.prototype,"elements",null),(0,i._)([(0,l.Cb)({readOnly:!0})],ne.prototype,"fullExtent",null),(0,i._)([(0,l.Cb)()],ne.prototype,"spatialReference",null),ne=(0,i._)([(0,h.j)("esri.layers.support.LocalMediaElementSource")],ne);const ie=ne;function oe(t){return"object"==typeof t&&null!=t&&"type"in t}let re=class extends((0,f.h)((0,y.M)((0,m.q)((0,a.R)(p.Z))))){constructor(t){super(t),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new ie}load(t){const e=this.source;if(!e)return this.addResolvingPromise(Promise.reject(new r.Z("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer."))),Promise.resolve(this);const n=oe(e)?new ie({elements:new o.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const i=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(i),Promise.resolve(this)}destroy(){this.effectiveSource?.destroy(),this.source?.destroy()}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(t){"not-loaded"===this.loadStatus?this._set("source",t):s.Z.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)?new ie({elements:new o.Z(t)}):t instanceof o.Z?new ie({elements:t}):t:null}readSource(t,e,n){const i="image"===e.mediaType?new Rt:"video"===e.mediaType?new Qt:null;return i?.read(e,n),i}writeSource(t,e,n,i){t&&oe(t)&&"image"===t.type?t.write(e,i):i?.messages&&i?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,i._)([(0,l.Cb)({readOnly:!0})],re.prototype,"effectiveSource",void 0),(0,i._)([(0,l.Cb)({type:String})],re.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],re.prototype,"fullExtent",null),(0,i._)([(0,l.Cb)({type:["MediaLayer"]})],re.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.Cb)({type:["show","hide"]})],re.prototype,"listMode",void 0),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],re.prototype,"source",null),(0,i._)([(0,c.p)("source")],re.prototype,"castSource",null),(0,i._)([(0,u.r)("source",["url"])],re.prototype,"readSource",null),(0,i._)([(0,d.c)("source")],re.prototype,"writeSource",null),(0,i._)([(0,l.Cb)()],re.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],re.prototype,"type",void 0),re=(0,i._)([(0,h.j)("esri.layers.MediaLayer")],re);const se=re},37549:(t,e,n)=>{n.d(e,{H:()=>a});var i=n(80442),o=n(24133),r=n(24470);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new o.Q(9,(0,i.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){s.minX=t[0],s.minY=t[1],s.maxX=t[2],s.maxY=t[3]})(e),t.search(s,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},66094:(t,e,n)=>{n.d(e,{B:()=>o});var i=n(17452);function o(t){return r[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,i.Ml)(t);return l[e]||s}(t.url)}(t)]||a}const r={},s="text/plain",a=r[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 t in l)r[l[t]]=t}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4828,5732],{92835:(t,e,n)=>{n.d(e,{Z:()=>f});var i,o=n(43697),r=n(96674),s=n(35463),a=n(5600),l=(n(75215),n(67676),n(80442),n(71715)),c=n(52011),u=n(30556),h=n(25031);let d=i=class extends r.wq{static get allTime(){return p}static get empty(){return m}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,o=t.end?.getTime()??t.end;return e===i&&n===o}expandTo(t,e=h.By){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.JE)(n,t,e));let o=this.end;if(o){const n=(0,s.JE)(o,t,e);o=o.getTime()===n.getTime()?n:(0,s.Nm)(n,1,t,e)}return new i({start:n,end:o})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,o=t.start?.getTime()??-1/0,r=t.end?.getTime()??1/0;let s,a;if(o>=e&&o<=n?s=o:e>=o&&e<=r&&(s=e),n>=o&&n<=r?a=n:r>=e&&r<=n&&(a=r),null!=s&&null!=a&&!isNaN(s)&&!isNaN(a)){const t=new i;return t.start=s===-1/0?null:new Date(s),t.end=a===1/0?null:new Date(a),t}return i.empty}offset(t,e,n=h.By){if(this.isEmpty||this.isAllTime)return this.clone();const o=new i,{start:r,end:a}=this;return null!=r&&(o.start=(0,s.Nm)(r,t,e,n)),null!=a&&(o.end=(0,s.Nm)(a,t,e,n)),o}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:n})}};(0,o._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,o._)([(0,l.r)("end")],d.prototype,"readEnd",null),(0,o._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,o._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,o._)([(0,l.r)("start")],d.prototype,"readStart",null),(0,o._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=i=(0,o._)([(0,c.j)("esri.TimeExtent")],d);const p=new d,m=new d({start:void 0,end:void 0}),f=d},5732:(t,e,n)=>{n.d(e,{c:()=>i,g:()=>o});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},21787:(t,e,n)=>{n.d(e,{a:()=>l,d:()=>a,f:()=>o,i:()=>d,m:()=>c,n:()=>u,s:()=>r,t:()=>s});var i=n(46851);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function r(t,e,n,i,o,r,s,a,l,c){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t[4]=r,t[5]=s,t[6]=a,t[7]=l,t[8]=c,t}function s(t,e){if(t===e){const n=e[1],i=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*s-a*c,d=-u*r+a*l,p=c*r-s*l;let m=n*h+i*d+o*p;return m?(m=1/m,t[0]=h*m,t[1]=(-u*i+o*c)*m,t[2]=(a*i-o*s)*m,t[3]=d*m,t[4]=(u*n-o*l)*m,t[5]=(-a*n+o*r)*m,t[6]=p*m,t[7]=(-c*n+i*l)*m,t[8]=(s*n-i*r)*m,t):null}function l(t,e){const n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t[0]=s*u-a*c,t[1]=o*c-i*u,t[2]=i*a-o*s,t[3]=a*l-r*u,t[4]=n*u-o*l,t[5]=o*r-n*a,t[6]=r*c-s*l,t[7]=i*l-n*c,t[8]=n*s-i*r,t}function c(t,e,n){const i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],p=n[1],m=n[2],f=n[3],y=n[4],_=n[5],x=n[6],g=n[7],b=n[8];return t[0]=d*i+p*s+m*c,t[1]=d*o+p*a+m*u,t[2]=d*r+p*l+m*h,t[3]=f*i+y*s+_*c,t[4]=f*o+y*a+_*u,t[5]=f*r+y*l+_*h,t[6]=x*i+g*s+b*c,t[7]=x*o+g*a+b*u,t[8]=x*r+g*l+b*h,t}function u(t,e){const n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],p=e[11],m=e[12],f=e[13],y=e[14],_=e[15],x=n*a-i*s,g=n*l-o*s,b=n*c-r*s,v=i*l-o*a,M=i*c-r*a,w=o*c-r*l,P=u*f-h*m,C=u*y-d*m,R=u*_-p*m,I=h*y-d*f,S=h*_-p*f,B=d*_-p*y;let j=x*B-g*S+b*I+v*R-M*C+w*P;return j?(j=1/j,t[0]=(a*B-l*S+c*I)*j,t[1]=(l*R-s*B-c*C)*j,t[2]=(s*S-a*R+c*P)*j,t[3]=(o*S-i*B-r*I)*j,t[4]=(n*B-o*R+r*C)*j,t[5]=(i*R-n*S-r*P)*j,t[6]=(f*w-y*M+_*v)*j,t[7]=(y*b-m*w-_*g)*j,t[8]=(m*M-f*b+_*x)*j,t):null}function h(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function d(t){const e=(0,i.g)(),n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8];return Math.abs(1-(n*n+s*s+c*c))<=e&&Math.abs(1-(o*o+a*a+u*u))<=e&&Math.abs(1-(r*r+l*l+h*h))<=e}const p=c,m=h;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],i=t[2],o=t[3],r=t[4],s=t[5],a=t[6],l=t[7],c=t[8];return e*(c*r-s*l)+n*(-c*o+s*a)+i*(l*o-r*a)},equals:function(t,e){const n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=e[0],p=e[1],m=e[2],f=e[3],y=e[4],_=e[5],x=e[6],g=e[7],b=e[8],v=(0,i.g)();return Math.abs(n-d)<=v*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(o-p)<=v*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(r-m)<=v*Math.max(1,Math.abs(r),Math.abs(m))&&Math.abs(s-f)<=v*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(a-y)<=v*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(l-_)<=v*Math.max(1,Math.abs(l),Math.abs(_))&&Math.abs(c-x)<=v*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(u-g)<=v*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(h-b)<=v*Math.max(1,Math.abs(h),Math.abs(b))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,e){const n=e[0],i=e[1],o=e[2],r=e[3],s=n+n,a=i+i,l=o+o,c=n*s,u=i*s,h=i*a,d=o*s,p=o*a,m=o*l,f=r*s,y=r*a,_=r*l;return t[0]=1-h-m,t[3]=u-_,t[6]=d+y,t[1]=u+_,t[4]=1-c-m,t[7]=p-f,t[2]=d-y,t[5]=p+f,t[8]=1-c-h,t},fromRotation:function(t,e){const n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:d,mul:p,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t[4]=e[4]+n[4]*i,t[5]=e[5]+n[5]*i,t[6]=e[6]+n[6]*i,t[7]=e[7]+n[7]*i,t[8]=e[8]+n[8]*i,t},normalFromMat4:u,normalFromMat4Legacy:function(t,e){const n=e[0],i=e[1],o=e[2],r=e[4],s=e[5],a=e[6],l=e[8],c=e[9],u=e[10],h=u*s-a*c,d=-u*r+a*l,p=c*r-s*l,m=n*h+i*d+o*p;if(!m)return null;const f=1/m;return t[0]=h*f,t[1]=(-u*i+o*c)*f,t[2]=(a*i-o*s)*f,t[3]=d*f,t[4]=(u*n-o*l)*f,t[5]=(-a*n+o*r)*f,t[6]=p*f,t[7]=(-c*n+i*l)*f,t[8]=(s*n-i*r)*f,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=Math.sin(n),p=Math.cos(n);return t[0]=p*i+d*s,t[1]=p*o+d*a,t[2]=p*r+d*l,t[3]=p*s-d*i,t[4]=p*a-d*o,t[5]=p*l-d*r,t[6]=c,t[7]=u,t[8]=h,t},scale:function(t,e,n){const i=n[0],o=n[1],r=n[2];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=r*e[6],t[7]=r*e[7],t[8]=r*e[8],t},scaleByVec2:function(t,e,n){const i=n[0],o=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t},set:r,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:m,subtract:h,translate:function(t,e,n){const i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],p=n[1];return t[0]=i,t[1]=o,t[2]=r,t[3]=s,t[4]=a,t[5]=l,t[6]=d*i+p*s+c,t[7]=d*o+p*a+u,t[8]=d*r+p*l+h,t},transpose:s},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,i,o,r,s,a,l){return[t,e,n,i,o,r,s,a,l]}function r(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>i,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:i,createView:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var i,o,r,s=n(5732),a={exports:{}};i=a,o=function(){function t(n,i,o,r,s){for(;r>o;){if(r-o>600){var a=r-o+1,l=i-o+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(o,Math.floor(i-l*u/a+h)),Math.min(r,Math.floor(i+(a-l)*u/a+h)),s)}var d=n[i],p=o,m=r;for(e(n,o,i),s(n[r],d)>0&&e(n,o,r);p<m;){for(e(n,p,m),p++,m--;s(n[p],d)<0;)p++;for(;s(n[m],d)>0;)m--}0===s(n[o],d)?e(n,o,m):e(n,++m,r),m<=i&&(o=m+1),i<=m&&(r=m-1)}}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}return function(e,i,o,r,s){t(e,i,o||0,r||e.length-1,s||n)}},void 0!==(r=o())&&(i.exports=r);const l=(0,s.g)(a.exports)},4307:(t,e,n)=>{n.d(e,{d:()=>l,l:()=>d,r:()=>m,s:()=>o,t:()=>p});var i=n(46851);function o(t,e,n){return t[0]=e,t[1]=n,t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function a(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function l(t,e){const n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function c(t,e){const n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function u(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function h(t){const e=t[0],n=t[1];return e*e+n*n}function d(t,e,n,i){const o=e[0],r=e[1];return t[0]=o+i*(n[0]-o),t[1]=r+i*(n[1]-r),t}function p(t,e,n){const i=e[0],o=e[1];return t[0]=n[0]*i+n[2]*o+n[4],t[1]=n[1]*i+n[3]*o+n[5],t}function m(t,e,n,i){const o=e[0]-n[0],r=e[1]-n[1],s=Math.sin(i),a=Math.cos(i);return t[0]=o*a-r*s+n[0],t[1]=o*s+r*a+n[1],t}const f=u,y=r,_=s,x=a,g=l,b=c,v=h;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},angle:function(t,e){const n=t[0],i=t[1],o=e[0],r=e[1];let s=n*n+i*i;s>0&&(s=1/Math.sqrt(s));let a=o*o+r*r;a>0&&(a=1/Math.sqrt(a));const l=(n*o+i*r)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,n){const i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},dist:g,distance:l,div:x,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],o=t[1],r=e[0],s=e[1],a=(0,i.g)();return Math.abs(n-r)<=a*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(o-s)<=a*Math.max(1,Math.abs(o),Math.abs(s))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:f,length:u,lerp:d,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:_,multiply:s,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const n=e[0],i=e[1];let o=n*n+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o),t},projectAndScale:function(t,e,n,i,o){let r=e[0]-n[0],s=e[1]-n[1];const a=(i[0]*r+i[1]*s)*(o-1);return r=i[0]*a,s=i[1]*a,t[0]=e[0]+r,t[1]=e[1]+s,t},random:function(t,e){e=e||1;const n=2*(0,i.R)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:m,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},scaleAndAdd:function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},set:o,sqrDist:b,sqrLen:v,squaredDistance:c,squaredLength:h,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:y,subtract:r,transformMat2:function(t,e,n){const i=e[0],o=e[1];return t[0]=n[0]*i+n[2]*o,t[1]=n[1]*i+n[3]*o,t},transformMat2d:p,transformMat3:function(t,e,n){const i=e[0],o=e[1];return t[0]=n[0]*i+n[3]*o+n[6],t[1]=n[1]*i+n[4]*o+n[7],t},transformMat4:function(t,e,n){const i=e[0],o=e[1];return t[0]=n[0]*i+n[4]*o+n[12],t[1]=n[1]*i+n[5]*o+n[13],t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function i(){return[0,0]}function o(t,e){return[t,e]}function r(t,e){return new Float64Array(t,e,2)}function s(){return o(1,1)}function a(){return o(1,0)}function l(){return o(0,1)}n.d(e,{a:()=>i,c:()=>r,f:()=>o});const c=s(),u=a(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:h,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:i,createView:r,fromArray:function(t,e=[0,0]){const n=Math.min(2,t.length);for(let i=0;i<n;++i)e[i]=t[i];return e},fromValues:o,ones:s,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},2368:(t,e,n)=>{n.d(e,{J:()=>u,j:()=>h});var i=n(43697),o=n(92036),r=(n(80442),n(22974)),s=(n(92604),n(70586)),a=n(31263),l=n(1153),c=n(52011);const u=t=>{let e=class extends t{clone(){const t=(0,l.vw)(this);(0,s.O3)(t,"unable to clone instance of non-accessor class");const e=t.metadatas,n=t.store,i={},o=new Map;for(const t in e){const s=e[t],l=n?.originOf(t),c=s.clonable;if(s.readOnly||!1===c||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const u=this[t];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,r.Vo)(u),null!=u&&null==h||(l===a.s3.DEFAULTS?o.set(t,h):i[t]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(i);if(o.size){const t=(0,l.vw)(c)?.store;if(t)for(const[e,n]of o)t.set(e,n,a.s3.DEFAULTS)}return c}};return e=(0,i._)([(0,c.j)("esri.core.Clonable")],e),e};let h=class extends(u(o.Z)){};h=(0,i._)([(0,c.j)("esri.core.Clonable")],h)},10699:(t,e,n)=>{n.d(e,{IG:()=>s,iv:()=>a});var i=n(43697),o=n(52011);let r=0;const s=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+r++})}};return e=(0,i._)([(0,o.j)("esri.core.Identifiable")],e),e},a=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:r++})}};return e=(0,i._)([(0,o.j)("esri.core.NumericIdentifiable")],e),e};let l=class extends(s(class{})){};l=(0,i._)([(0,o.j)("esri.core.Identifiable")],l)},70163:(t,e,n)=>{n.d(e,{Jl:()=>u,n$:()=>h});var i=n(3172),o=n(20102),r=n(95330),s=n(17452),a=n(49917);let l=null,c=!0;function u(t,e,n,i){if(!e||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(t,e,n)}catch(t){c=!1}const o=function(t,e,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(t,e)}(e,n,i);return o.data.set(t,0),o}async function h(t,e){const{arrayBuffer:l,mediaType:c}=await async function(t,e){const n=(0,s.sJ)(t);if(n?.isBase64)return{arrayBuffer:(0,a.R)(n.data),mediaType:n.mediaType};const o=await(0,i.Z)(t,{responseType:"array-buffer",...e});return{arrayBuffer:o.data,mediaType:o.getHeader("Content-Type")}}(t,e),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:t,parseGif:i}=await n.e(3310).then(n.bind(n,83310));if(t(l))return i(l,e)}if(u){const{isAnimatedPNG:t,parseApng:i}=await n.e(4492).then(n.bind(n,54492));if(t(l))return i(l,e)}return async function(t,e){const n=window.URL.createObjectURL(t);try{const{data:t}=await(0,i.Z)(n,{...e,responseType:"image"});return t}catch(t){if(!(0,r.D_)(t))throw new o.Z("invalid-image",`Could not fetch requested image at ${n}`);throw t}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),e)}},24133:(t,e,n)=>{n.d(e,{Q:()=>s});var i=n(67676),o=n(44553),r=n(88764);class s{constructor(t=9,e){this._compareMinX=u,this._compareMinY=h,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),g.prune(),b.prune(),v.prune(),M.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const i=this._toBBox;if(_(t,n))for(g.clear();n;){for(let o=0,r=n.children.length;o<r;o++){const r=n.children[o],s=n.leaf?i(r):r;_(t,s)&&(n.leaf?e(r):y(t,s)?this._all(r,e):g.push(r))}n=g.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!_(t,e))return!1;for(g.clear();e;){for(let i=0,o=e.children.length;i<o;i++){const o=e.children[i],r=e.leaf?n(o):o;if(_(t,r)){if(e.leaf||y(t,r))return!0;g.push(o)}}e=g.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new C([]),this}remove(t){if(!t)return this;let e,n=this._data,o=null,r=0,s=!1;const a=this._toBBox(t);for(v.clear(),M.clear();n||v.length>0;){if(n||(n=v.pop(),o=v.data[v.length-1],r=M.pop()??0,s=!0),n.leaf&&(e=(0,i.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),v.push(n),this._condense(v),this;s||n.leaf||!y(n,a)?o?(r++,n=o.children[r],s=!1):n=null:(v.push(n),M.push(r),r=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,i){const o=n-e+1;let r=this._maxEntries;if(o<=r){const i=new C(t.slice(e,n+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(o)/Math.log(r)),r=Math.ceil(o/r**(i-1)));const s=new R([]);s.height=i;const l=Math.ceil(o/r),c=l*Math.ceil(Math.sqrt(r));x(t,e,n,c,this._compareMinX);for(let o=e;o<=n;o+=c){const e=Math.min(o+c-1,n);x(t,o,e,l,this._compareMinY);for(let n=o;n<=e;n+=l){const o=Math.min(n+l-1,e);s.children.push(this._build(t,n,o,i-1))}}return a(s,this._toBBox),s}_chooseSubtree(t,e,n,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==n;){let n,i=1/0,o=1/0;for(let r=0,s=e.children.length;r<s;r++){const s=e.children[r],a=d(s),l=m(t,s)-a;l<o?(o=l,i=a<i?a:i,n=s):l===o&&a<i&&(i=a,n=s)}e=n||e.children[0]}return e}_insert(t,e,n){const i=this._toBBox,o=n?t:i(t);v.clear();const r=this._chooseSubtree(o,this._data,e,v);for(r.children.push(t),c(r,o);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;this._adjustParentBBoxes(o,v,e)}_split(t,e){const n=t.data[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);const r=this._chooseSplitIndex(n,o,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const s=n.children.splice(r,n.children.length-r),l=n.leaf?new C(s):new R(s);l.height=n.height,a(n,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new R([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let i,o,r;i=o=1/0;for(let s=e;s<=n-e;s++){const e=l(t,0,s,this._toBBox),a=l(t,s,n,this._toBBox),c=f(e,a),u=d(e)+d(a);c<i?(i=c,r=s,o=u<o?u:o):c===i&&u<o&&(o=u,r=s)}return r}_chooseSplitAxis(t,e,n){const i=t.leaf?this._compareMinX:u,o=t.leaf?this._compareMinY:h;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,o)&&t.children.sort(i)}_allDistMargin(t,e,n,i){t.children.sort(i);const o=this._toBBox,r=l(t,0,e,o),s=l(t,n-e,n,o);let a=p(r)+p(s);for(let i=e;i<n-e;i++){const e=t.children[i];c(r,t.leaf?o(e):e),a+=p(r)}for(let i=n-e-1;i>=e;i--){const e=t.children[i];c(s,t.leaf?o(e):e),a+=p(s)}return a}_adjustParentBBoxes(t,e,n){for(let i=n;i>=0;i--)c(e.data[i],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const o=t.data[e-1],r=o.children;r.splice((0,i.cq)(r,n,r.length,o.indexHint),1)}else this.clear();else a(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,n,i,o){o||(o=new C([])),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let r,s=e;s<n;s++)r=t.children[s],c(o,t.leaf?i(r):r);return o}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function f(t,e){const n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),o=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,o-n)*Math.max(0,r-i)}function y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function _(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,i,o){const s=[e,n];for(;s.length;){const e=s.pop(),n=s.pop();if(e-n<=i)continue;const a=n+Math.ceil((e-n)/i/2)*i;(0,r.q)(t,a,n,e,o),s.push(n,a,a,e)}}const g=new o.Z,b=new o.Z,v=new o.Z,M=new o.Z({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class C extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class R extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>f,gx:()=>c,nn:()=>y,on:()=>h,tX:()=>_}),n(66643),n(46791);var i=n(91460),o=n(50758),r=n(70586),s=n(95330),a=n(26258);function l(t,e,n={}){return u(t,e,n,p)}function c(t,e,n={}){return u(t,e,n,m)}function u(t,e,n={},i){let o=null;const s=n.once?(t,n)=>{i(t)&&((0,r.hw)(o),e(t,n))}:(t,n)=>{i(t)&&e(t,n)};if(o=(0,a.aQ)(t,s,n.sync,n.equals),n.initial){const e=t();s(e,e)}return o}function h(t,e,n,s={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),s.onListenerRemove?.(a),a=null,c=null)}function d(t){s.once&&s.once&&(0,r.hw)(u),n(t)}const p=l(t,((t,n)=>{h(),(0,i.vT)(t)&&(a=t,c=(0,i.on)(t,e,d),s.onListenerAdd?.(t))}),{sync:s.sync,initial:!0});return u=(0,o.kB)((()=>{p.remove(),h()})),u}function d(t,e){return function(t,e,n){if((0,s.Hc)(n))return Promise.reject((0,s.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,o.AL)([(0,s.fu)(n,(()=>{l(),r((0,s.zE)())})),u(t,(t=>{l(),i(t)}),{sync:!1,once:!0},e??p)])}))}(t,m,e)}function p(t){return!0}function m(t){return!!t}n(87538);const f={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},41123:(t,e,n)=>{n.d(e,{D:()=>o,z:()=>r});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function r(){return`{${o()}}`}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>s,XZ:()=>a,x3:()=>c});var i=n(58901),o=n(82971),r=n(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=c(t);for(const t of n)for(const n of t)n[0]+=e;return t}function c(t){return(0,r.oU)(t)?t.rings:t.paths}},87085:(t,e,n)=>{n.d(e,{Z:()=>g});var i=n(43697),o=(n(66577),n(3172)),r=n(20102),s=n(32448),a=n(10699),l=n(83379),c=n(92604),u=n(95330),h=n(17452),d=n(5600),p=(n(75215),n(67676),n(80442),n(52011)),m=n(68773),f=n(6570),y=n(82971);let _=0,x=class extends(s.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,y.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await n.e(3529).then(n.bind(n,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await n.e(8008).then(n.bind(n,28008));try{return await i(e)}catch(t){const n=e&&e.portalItem,i=n?.id||"unset",o=n&&n.portal&&n.portal.url||m.default.portalUrl;throw c.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,u.D_)(t)||c.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,o.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new r.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.Cb)({type:String})],x.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.Cb)({type:f.Z})],x.prototype,"fullExtent",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"hasAttributionData",null),(0,i._)([(0,d.Cb)({type:String,clonable:!1})],x.prototype,"id",void 0),(0,i._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],x.prototype,"legendEnabled",void 0),(0,i._)([(0,d.Cb)({type:["show","hide","hide-children"]})],x.prototype,"listMode",void 0),(0,i._)([(0,d.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],x.prototype,"opacity",void 0),(0,i._)([(0,d.Cb)({clonable:!1})],x.prototype,"parent",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"parsedUrl",null),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],x.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.Cb)({type:Boolean})],x.prototype,"popupEnabled",void 0),(0,i._)([(0,d.Cb)({type:Boolean})],x.prototype,"attributionVisible",void 0),(0,i._)([(0,d.Cb)({type:y.Z})],x.prototype,"spatialReference",void 0),(0,i._)([(0,d.Cb)({type:String})],x.prototype,"title",void 0),(0,i._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],x.prototype,"type",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"url",void 0),(0,i._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],x.prototype,"visible",void 0),x=(0,i._)([(0,p.j)("esri.layers.Layer")],x);const g=x},57765:(t,e,n)=>{n.r(e),n.d(e,{default:()=>re});var i=n(43697),o=n(46791),r=n(20102),s=n(92604),a=n(16453),l=n(5600),c=n(90578),u=(n(67676),n(80442),n(71715)),h=n(52011),d=n(30556),p=n(87085),m=n(71612),f=n(38009),y=n(72965),_=n(3172),x=n(70163),g=n(17452),b=n(41123),v=(n(75215),n(10699)),M=n(96674),w=n(83379),P=n(92036),C=n(21787),R=n(46521),I=n(4307),S=n(17896);const B=(0,n(65617).c)(),j=(0,R.a)(),T=(0,R.a)(),Z=(0,R.a)();function O(t,e,n){return(0,S.s)(B,e[0],e[1],1),(0,S.t)(B,B,(0,C.t)(j,n)),0===B[2]?(0,I.s)(t,B[0],B[1]):(0,I.s)(t,B[0]/B[2],B[1]/B[2])}function L(t,e,n){return E(T,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),E(Z,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,C.m)(t,(0,C.a)(T,T),Z),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function E(t,e,n,i,o,r,s,a,l){(0,C.s)(t,e,i,r,n,o,s,1,1,1),(0,S.s)(B,a,l,1),(0,C.a)(j,t);const[c,u,h]=(0,S.t)(B,B,(0,C.t)(j,j));return(0,C.s)(j,c,0,0,0,u,0,0,0,h),(0,C.m)(t,j,t)}var X=n(62357),Y=n(97323),A=n(94139),N=n(38913),D=n(73615),U=n(82971),z=n(2368);let H=class extends z.j{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:i}=(0,D.projectOrLoad)(t,e);return i?null:i||n?n:(s.Z.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};H=(0,i._)([(0,h.j)("esri.layers.support.GeoreferenceBase")],H);const W=H,q=(0,R.a)(),V=(0,Y.a)();let F=class extends P.Z{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,i._)([(0,l.Cb)()],F.prototype,"sourcePoint",void 0),(0,i._)([(0,l.Cb)({type:A.Z})],F.prototype,"mapPoint",void 0),F=(0,i._)([(0,h.j)("esri.layers.support.ControlPoint")],F);let G=class extends((0,M.eC)(W)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=U.Z.fromJSON(e.spatialReference),i=(0,R.f)(...e.coefficients,1);return t.map((t=>((0,I.s)(V,t.x,t.y),O(V,V,i),{sourcePoint:t,mapPoint:new A.Z({x:V[0],y:V[1],spatialReference:n})})))}writeControlPoints(t,e,n,i){if(null!=this.transform)null!=t&&J(t[0])&&(e.controlPoints=t.map((t=>{const e=t.sourcePoint;return{x:e.x,y:e.y}})),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8));else{const t=new r.Z("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:i?.layer,georeference:this});i?.messages?i.messages.push(t):s.Z.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(q);if(null==t||!J(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,i){const o=(0,Y.f)(0,n),r=(0,Y.f)(0,0),s=(0,Y.f)(e,0),a=(0,Y.f)(e,n);return O(o,o,t),O(r,r,t),O(s,s,t),O(a,a,t),new N.Z({rings:[[o,r,s,a,o]],spatialReference:i})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!J(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:i}=this,{rings:[[o,r,s,a]]}=t,l={sourcePoint:(0,X.vW)(0,i),mapPoint:new A.Z({x:o[0],y:o[1],spatialReference:e})},c={sourcePoint:(0,X.vW)(0,0),mapPoint:new A.Z({x:r[0],y:r[1],spatialReference:e})},u={sourcePoint:(0,X.vW)(n,0),mapPoint:new A.Z({x:s[0],y:s[1],spatialReference:e})},h={sourcePoint:(0,X.vW)(n,i),mapPoint:new A.Z({x:a[0],y:a[1],spatialReference:e})};J(l)&&J(c)&&J(u)&&J(h)&&(st(q,l,c,u,h),this.controlPoints=this.controlPoints.map((({sourcePoint:t})=>((0,I.s)(V,t.x,t.y),O(V,V,q),{sourcePoint:t,mapPoint:new A.Z({x:V[0],y:V[1],spatialReference:e})}))))}get inverseTransform(){return null==this.transform?null:(0,C.d)((0,R.a)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!J(this.controlPoints[0]))return null;(0,I.s)(V,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return O(V,V,this.transform),new A.Z({x:V[0],y:V[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!J(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,D.projectOrLoad)(t,e).geometry)?null:((0,I.s)(V,t.x,t.y),O(V,V,this.inverseTransform),(0,X.vW)(V[0],V[1]))}toSourceNormalized(t){const e=this.toSource(t);return null!=e&&(e.x/=this.width,e.y/=this.height),e}_updateTransform(t){const{controlPoints:e,width:n,height:i}=this;if(!(null!=e&&n>0&&i>0))return null;const[o,r,s,a]=e;if(!J(o))return null;const l=o.mapPoint.spatialReference,c=this._projectControlPoint(r,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!J(c.controlPoint))return null;null==t&&(t=(0,R.a)());let d=null;return d=J(u.controlPoint)&&J(h.controlPoint)?st(t,o,c.controlPoint,u.controlPoint,h.controlPoint):J(u.controlPoint)?function(t,e,n,i){return rt(k,tt,e),rt($,et,n),rt(K,nt,i),(0,I.l)(Q,k,$,.5),(0,I.r)(Q,K,Q,Math.PI),(0,I.l)(it,tt,et,.5),(0,I.r)(it,nt,it,Math.PI),ut(t,k,$,K,Q,tt,et,nt,it)}(t,o,c.controlPoint,u.controlPoint):function(t,e,n){return rt(k,tt,e),rt($,et,n),(0,I.r)(K,$,k,ot),(0,I.r)(Q,k,$,ot),(0,I.r)(nt,et,tt,-ot),(0,I.r)(it,tt,et,-ot),ut(t,k,$,K,Q,tt,et,nt,it)}(t,o,c.controlPoint),d.every((t=>0===t))?null:d}_projectControlPoint(t,e){if(!J(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:i}=t,{geometry:o,pending:r}=(0,D.projectOrLoad)(i,e);return r?{valid:!1,controlPoint:null}:r||o?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:o}}:(s.Z.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:i.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function J(t){return null!=t?.sourcePoint&&null!=t.mapPoint}(0,i._)([(0,l.Cb)({type:[F],json:{write:{allowNull:!1,isRequired:!0}}})],G.prototype,"controlPoints",void 0),(0,i._)([(0,u.r)("controlPoints")],G.prototype,"readControlPoints",null),(0,i._)([(0,d.c)("controlPoints")],G.prototype,"writeControlPoints",null),(0,i._)([(0,l.Cb)()],G.prototype,"coords",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],G.prototype,"height",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],G.prototype,"inverseTransform",null),(0,i._)([(0,l.Cb)({readOnly:!0})],G.prototype,"transform",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],G.prototype,"width",void 0),G=(0,i._)([(0,h.j)("esri.layers.support.ControlPointsGeoreference")],G);const k=(0,Y.a)(),$=(0,Y.a)(),K=(0,Y.a)(),Q=(0,Y.a)(),tt=(0,Y.a)(),et=(0,Y.a)(),nt=(0,Y.a)(),it=(0,Y.a)(),ot=Math.PI/2;function rt(t,e,n){(0,I.s)(t,n.sourcePoint.x,n.sourcePoint.y),(0,I.s)(e,n.mapPoint.x,n.mapPoint.y)}function st(t,e,n,i,o){return rt(k,tt,e),rt($,et,n),rt(K,nt,i),rt(Q,it,o),ut(t,k,$,K,Q,tt,et,nt,it)}const at=new Array(8).fill(0),lt=new Array(8).fill(0);function ct(t,e,n,i,o){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=i[0],t[5]=i[1],t[6]=o[0],t[7]=o[1],t}function ut(t,e,n,i,o,r,s,a,l){return L(t,ct(at,e,n,i,o),ct(lt,r,s,a,l))}const ht=G,dt=(0,Y.a)();let pt=class extends W{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:i}=this;if(null==t||null==e||null==n||null==i)return null;const o=t.spatialReference;return e=this.projectOrWarn(e,o),n=this.projectOrWarn(n,o),i=this.projectOrWarn(i,o),null==e||null==n||null==i?null:new N.Z({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[i.x,i.y],[n.x,n.y]]],spatialReference:o})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[i,o,r,s]]}=t;this.bottomLeft=new A.Z({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new A.Z({x:o[0],y:o[1],spatialReference:n}),this.topRight=new A.Z({x:r[0],y:r[1],spatialReference:n}),this.bottomRight=new A.Z({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(t){const{topLeft:e,topRight:n,bottomRight:i,bottomLeft:o}=this;if(null==t||null==e||null==n||null==i||null==o)return null;const r=e.spatialReference;t=t.normalize();const s=(0,D.projectOrLoad)(t,r).geometry;if(null==s)return null;(0,I.s)(dt,s.x,s.y);const a=L((0,R.a)(),[e.x,e.y,o.x,o.y,n.x,n.y,i.x,i.y],[0,0,0,1,1,0,1,1]);return O(dt,dt,a),(0,X.vW)(dt[0],dt[1])}};(0,i._)([(0,l.Cb)()],pt.prototype,"coords",null),(0,i._)([(0,l.Cb)({type:A.Z})],pt.prototype,"bottomLeft",void 0),(0,i._)([(0,l.Cb)({type:A.Z})],pt.prototype,"bottomRight",void 0),(0,i._)([(0,l.Cb)({type:A.Z})],pt.prototype,"topLeft",void 0),(0,i._)([(0,l.Cb)({type:A.Z})],pt.prototype,"topRight",void 0),pt=(0,i._)([(0,h.j)("esri.layers.support.CornersGeoreference")],pt);const mt=pt;var ft=n(22021),yt=n(46851),_t=n(6570);let xt=class extends W{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:o}=this.extent;let r;if(this.rotation){const{x:o,y:s}=this.extent.center,a=gt(o,s,this.rotation);r=[a(t,e),a(t,i),a(n,i),a(n,e)],r.push(r[0])}else r=[[t,e],[t,i],[n,i],[n,e],[t,e]];return new N.Z({rings:[r],spatialReference:o})}set coords(t){if(null==t||null==this.extent)return;const e=this.extent.spatialReference;if(t=this.projectOrWarn(t,e),null==t?.extent)return;const{rings:[[n,i,o]],extent:{center:{x:r,y:s}}}=t,a=(0,ft.BV)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),l=gt(r,s,-a),[c,u]=l(n[0],n[1]),[h,d]=l(o[0],o[1]);this.extent=new _t.Z({xmin:c,ymin:u,xmax:h,ymax:d,spatialReference:e}),this.rotation=a}toSourceNormalized(t){const{extent:e,rotation:n}=this;if(null==t||null==e)return null;const{xmin:i,ymin:o,xmax:r,ymax:s,center:a,spatialReference:l}=e;t=t.normalize();const c=(0,D.projectOrLoad)(t,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=gt(a.x,a.y,-n)(u,h)),(0,X.vW)((0,ft.bA)(u,i,r,0,1),(0,ft.bA)(h,s,o,0,1))}};function gt(t,e,n){const i=(0,yt.t)(n),o=Math.cos(i),r=Math.sin(i);return(n,i)=>[o*(n-t)+r*(i-e)+t,o*(i-e)-r*(n-t)+e]}(0,i._)([(0,l.Cb)()],xt.prototype,"coords",null),(0,i._)([(0,l.Cb)({type:_t.Z})],xt.prototype,"extent",void 0),(0,i._)([(0,l.Cb)({type:Number})],xt.prototype,"rotation",void 0),xt=(0,i._)([(0,h.j)("esri.layers.support.ExtentAndRotationGeoreference")],xt);const bt={key:"type",base:W,typeMap:{"control-points":ht,corners:mt,"extent-and-rotation":xt}};let vt=class extends((0,v.iv)((0,M.eC)(w.Z))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return ht.fromJSON(t)}get contentWidth(){return 0}get contentHeight(){return 0}toSource(t){const{georeference:e,contentWidth:n,contentHeight:i}=this;if(null==t||null==e||0===n||0===i)return null;const o=e.toSourceNormalized(t);return null==o?null:(o.x*=n,o.y*=i,o)}};(0,i._)([(0,l.Cb)({types:bt,json:{write:!0}})],vt.prototype,"georeference",void 0),(0,i._)([(0,u.r)("georeference")],vt.prototype,"readGeoreference",null),(0,i._)([(0,l.Cb)()],vt.prototype,"opacity",void 0),vt=(0,i._)([(0,h.j)("esri.layers.support.MediaElementBase")],vt);const Mt=vt;var wt=n(66094),Pt=n(25929);let Ct=class extends Mt{constructor(t){super(t),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,x.n$)(t).then((t=>{this._set("content",t)}));this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then((()=>{this._set("content",t)}));this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r.Z("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(t,e,n){return(0,Pt.f)(e.url,n)}writeImage(t,e,n,i){if(null==t)return;const o=i?.portalItem,r=i?.resources;if(!o||!r)return void("string"==typeof t&&(e[n]=(0,Pt.t)(t,i)));const s="string"!=typeof t||(0,g.HK)(t)||(0,g.jc)(t)?null:t;if(s){if(null==(0,Pt.i)(s))return void(e[n]=s);const t=(0,Pt.t)(s,{...i,verifyItemRelativeUrls:i?.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Pt.M.NO);if(o&&t&&!(0,g.YP)(t))return r.toKeep.push({resource:o.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",r.pendingOperations.push(async function(t){return"string"==typeof t?(0,g.HK)(t)?(0,g.fw)(t):(await(0,_.Z)(t,{responseType:"blob"})).data:new Promise((e=>function(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,n=t instanceof HTMLImageElement?t.naturalHeight:t.height,i=document.createElement("canvas"),o=i.getContext("2d");return i.width=e,i.height=n,t instanceof HTMLImageElement?o.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&o.putImageData(t,0,0),i}(t).toBlob(e)))}(t).then((t=>{const i=function(t,e){const n=(0,b.D)(),i=`${(0,g.v_)("media",n)}.${(0,wt.B)({type:"blob",blob:t})}`;return e.resourceFromPath(i)}(t,o);e[n]=i.itemRelativeUrl,r.toAdd.push({resource:i,content:{type:"blob",blob:t},compress:!1,finish:t=>{this.image=t.url}})})))}};(0,i._)([(0,l.Cb)()],Ct.prototype,"animationOptions",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Ct.prototype,"content",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Ct.prototype,"contentWidth",null),(0,i._)([(0,l.Cb)({readOnly:!0})],Ct.prototype,"contentHeight",null),(0,i._)([(0,l.Cb)({json:{name:"url",type:String}})],Ct.prototype,"image",void 0),(0,i._)([(0,u.r)("image",["url"])],Ct.prototype,"readImage",null),(0,i._)([(0,d.c)("image")],Ct.prototype,"writeImage",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{name:"mediaType"}})],Ct.prototype,"type",void 0),Ct=(0,i._)([(0,h.j)("esri.layers.support.ImageElement")],Ct);const Rt=Ct;n(66577);var It=n(70921),St=n(32448),Bt=n(609),jt=n(95330),Tt=n(17445),Zt=n(24470),Ot=n(87416),Lt=n(8744),Et=n(37549),Xt=n(20322),Yt=n(86662),At=n(33955),Nt=n(73913);function Dt(t,e,n){if(Array.isArray(t)){const i=t[0];if(i>e){const n=(0,Nt.XZ)(i,e);t[0]=i+n*(-2*e)}else if(i<n){const e=(0,Nt.XZ)(i,n);t[0]=i+e*(-2*n)}}else{const i=t.x;if(i>e){const n=(0,Nt.XZ)(i,e);t.x+=n*(-2*e)}else if(i<n){const e=(0,Nt.XZ)(i,n);t.x+=e*(-2*n)}}return t}function Ut(t,e){const n=[],{ymin:i,ymax:o,xmin:r,xmax:s}=t,a=t.xmax-t.xmin,[l,c]=e.valid,{x:u,frameId:h}=zt(t.xmin,e),{x:d,frameId:p}=zt(t.xmax,e),m=u===d&&a>0;if(a>2*c){const t={xmin:r<s?u:d,ymin:i,xmax:c,ymax:o},e={xmin:l,ymin:i,xmax:r<s?d:u,ymax:o},a={xmin:0,ymin:i,xmax:c,ymax:o},m={xmin:l,ymin:i,xmax:0,ymax:o},f=[],y=[];Ht(t,a)&&f.push(h),Ht(t,m)&&y.push(h),Ht(e,a)&&f.push(p),Ht(e,m)&&y.push(p);for(let t=h+1;t<p;t++)f.push(t),y.push(t);n.push(new Vt(t,[h]),new Vt(e,[p]),new Vt(a,f),new Vt(m,y))}else u>d||m?n.push(new Vt({xmin:u,ymin:i,xmax:c,ymax:o},[h]),new Vt({xmin:l,ymin:i,xmax:d,ymax:o},[p])):n.push(new Vt({xmin:u,ymin:i,xmax:d,ymax:o},[h]));return n}function zt(t,e){const[n,i]=e.valid,o=2*i;let r,s=0;return t>i?(r=Math.ceil(Math.abs(t-i)/o),t-=r*o,s=r):t<n&&(r=Math.ceil(Math.abs(t-n)/o),t+=r*o,s=-r),{x:t,frameId:s}}function Ht(t,e){const{xmin:n,ymin:i,xmax:o,ymax:r}=e;return Wt(t,n,i)&&Wt(t,n,r)&&Wt(t,o,r)&&Wt(t,o,i)}function Wt(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function qt(t,e,n=!0){const i=!(0,At.l9)(t);if(i&&(0,Yt.Zy)(t),n)return(new Gt).cut(t,e);const o=i?t.rings:t.paths,r=i?4:2,s=o.length,a=-2*e;for(let t=0;t<s;t++){const e=o[t];if(e&&e.length>=r){const t=[];for(const n of e)t.push([n[0]+a,n[1]]);o.push(t)}}return i?t.rings=o:t.paths=o,t}class Vt{constructor(t,e){this.extent=t,this.frameIds=e}}const Ft=(0,Zt.Ue)();class Gt{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,e){let n;if(this._xCut=e,t.rings)this._closed=!0,n=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,n=t.paths,this._minPts=2}for(const t of n){if(!t||t.length<this._minPts)continue;let e=!0;for(const n of t)e?(this.moveTo(n),e=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const t of this._linesIn)t&&t.length>=this._minPts&&n.push(t);const i=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=i;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide==-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(this._addPolyVertex(this._lineIn,n<=0?t:this._xCut,e),this._addPolyVertex(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_addPolyVertex(t,e,n){const i=t.length;i>1&&t[i-1][0]===e&&t[i-2][0]===e?t[i-1][1]=n:t.push([e,n])}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let Jt=class extends P.Z{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t?.extent?null:(0,Zt.oJ)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,D.projectOrLoad)(t,this.spatialReference).geometry}get normalizedCoords(){return N.Z.fromJSON(function(t,e){if(null==t)return null;const n=t.spatialReference,i=(0,Lt.C5)(n),o=(0,M.AK)(t)?t.toJSON():t;if(!i)return o;const r=(0,Lt.sS)(n)?102100:4326,s=Nt.UZ[r].maxX,a=Nt.UZ[r].minX;if((0,At.wp)(o))return Dt(o,s,a);if((0,At.aW)(o))return o.points=o.points.map((t=>Dt(t,s,a))),o;if((0,At.YX)(o))return function(t,e){if(!e)return t;const n=Ut(t,e).map((t=>t.extent));return n.length<2?n[0]||t:n.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:n.map((t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]))}}(o,i);if((0,At.oU)(o)||(0,At.l9)(o)){const t=(0,Xt.$P)(Ft,o),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},i=(0,Nt.XZ)(n.xmin,a)*(2*s),r=0===i?o:(0,Nt.Sy)(o,i);return n.xmin+=i,n.xmax+=i,n.xmax>s?qt(r,s,e):n.xmin<a?qt(r,a,e):r}return o}(this.coords,!0))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,Zt.oJ)(t):null}};(0,i._)([(0,l.Cb)()],Jt.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)()],Jt.prototype,"element",void 0),(0,i._)([(0,l.Cb)()],Jt.prototype,"bounds",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"coords",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"normalizedCoords",null),(0,i._)([(0,l.Cb)()],Jt.prototype,"normalizedBounds",null),Jt=(0,i._)([(0,h.j)("esri.layers.support.MediaElementView")],Jt);var kt=n(91460);let $t=class extends Mt{constructor(t){super(t),this.autoplay=!0,this.content=null,this.type="video"}load(){const t=this.video;if("string"==typeof t){const e=document.createElement("video");e.src=t,e.crossOrigin="anonymous",e.autoplay=!0,e.muted=!0,e.loop=!0,this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)})))}else t instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)}))):this.addResolvingPromise(Promise.reject(new r.Z("video-element:invalid-video-type","Invalid video type",{video:t})));return Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}set video(t){"not-loaded"===this.loadStatus?this._set("video",t):s.Z.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(t){return new Promise(((e,n)=>{const i=(0,kt.IH)(t,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?t.play().then(e,n):e()}));this.addHandles(i,"canplay"),"anonymous"!==t.crossOrigin&&(t.crossOrigin="anonymous",t.src?.includes("blob:")||(t.src=t.src))}))}};(0,i._)([(0,l.Cb)()],$t.prototype,"autoplay",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],$t.prototype,"content",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],$t.prototype,"contentWidth",null),(0,i._)([(0,l.Cb)({readOnly:!0})],$t.prototype,"contentHeight",null),(0,i._)([(0,l.Cb)()],$t.prototype,"video",null),$t=(0,i._)([(0,h.j)("esri.layers.support.VideoElement")],$t);const Kt=$t,Qt={key:"type",defaultKeyValue:"image",base:Mt,typeMap:{image:Rt,video:Kt}},te=o.Z.ofType(Qt);let ee=class extends(w.Z.LoadableMixin((0,Bt.v)(St.Z.EventedAccessor))){constructor(t){super(t),this._index=new Et.H,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.removeHandles(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new Jt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const i=(0,Tt.YP)((()=>t.coords),(()=>this._updateIndexForElement(t,!1)));this._updateIndexForElement(t,!0),this.addHandles(i,t)}this._elementsIndexes.clear(),this.elements.forEach(((t,e)=>this._elementsIndexes.set(t,e))),this.emit("refresh")},this.elements=new te}async load(t){if((0,jt.k_)(t),!this.spatialReference){const t=this.elements.find((t=>null!=t.georeference?.coords));this._set("spatialReference",t?t.georeference.coords.spatialReference:U.Z.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,It.Z)(t,this._get("elements"),te))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new _t.Z({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:this.spatialReference})}set spatialReference(t){"not-loaded"===this.loadStatus?this._set("spatialReference",t):s.Z.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,D.initializeProjection)(t.spatialReference,this.spatialReference,null,e);const n=(0,Lt.fS)(t.spatialReference,this.spatialReference)?t:(0,D.project)(t,this.spatialReference);if(!n)return[];const i=n.normalize(),o=[];for(const t of i)this._index.forEachInBounds((0,Zt.oJ)(t),(({normalizedCoords:e,element:n})=>{null!=e&&(0,Ot.Nl)(t,e)&&o.push(n)}));return o.sort(((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e))),o}_updateIndexForElement(t,e){const n=t.normalizedBounds,i=this._index.has(t),o=null!=n;this._index.delete(t),o&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(i!==o?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,i._)([(0,l.Cb)()],ee.prototype,"elements",null),(0,i._)([(0,l.Cb)({readOnly:!0})],ee.prototype,"fullExtent",null),(0,i._)([(0,l.Cb)()],ee.prototype,"spatialReference",null),ee=(0,i._)([(0,h.j)("esri.layers.support.LocalMediaElementSource")],ee);const ne=ee;function ie(t){return"object"==typeof t&&null!=t&&"type"in t}let oe=class extends((0,m.h)((0,y.M)((0,f.q)((0,a.R)(p.Z))))){constructor(t){super(t),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new ne}load(t){const e=this.source;if(!e)return this.addResolvingPromise(Promise.reject(new r.Z("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer."))),Promise.resolve(this);const n=ie(e)?new ne({elements:new o.Z([e])}):e;this._set("effectiveSource",n),this.spatialReference&&(n.spatialReference=this.spatialReference);const i=n.load(t).then((()=>{this.spatialReference=n.spatialReference}));return this.addResolvingPromise(i),Promise.resolve(this)}destroy(){this.effectiveSource?.destroy(),this.source?.destroy()}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(t){"not-loaded"===this.loadStatus?this._set("source",t):s.Z.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)?new ne({elements:new o.Z(t)}):t instanceof o.Z?new ne({elements:t}):t:null}readSource(t,e,n){const i="image"===e.mediaType?new Rt:"video"===e.mediaType?new Kt:null;return i?.read(e,n),i}writeSource(t,e,n,i){t&&ie(t)&&"image"===t.type?t.write(e,i):i?.messages&&i?.messages?.push(new r.Z("media-layer:unsupported-source","source must be an 'ImageElement'"))}};(0,i._)([(0,l.Cb)({readOnly:!0})],oe.prototype,"effectiveSource",void 0),(0,i._)([(0,l.Cb)({type:String})],oe.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],oe.prototype,"fullExtent",null),(0,i._)([(0,l.Cb)({type:["MediaLayer"]})],oe.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.Cb)({type:["show","hide"]})],oe.prototype,"listMode",void 0),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],oe.prototype,"source",null),(0,i._)([(0,c.p)("source")],oe.prototype,"castSource",null),(0,i._)([(0,u.r)("source",["url"])],oe.prototype,"readSource",null),(0,i._)([(0,d.c)("source")],oe.prototype,"writeSource",null),(0,i._)([(0,l.Cb)()],oe.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],oe.prototype,"type",void 0),oe=(0,i._)([(0,h.j)("esri.layers.MediaLayer")],oe);const re=oe},37549:(t,e,n)=>{n.d(e,{H:()=>a});var i=n(80442),o=n(24133),r=n(24470);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new o.Q(9,(0,i.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){s.minX=t[0],s.minY=t[1],s.maxX=t[2],s.maxY=t[3]})(e),t.search(s,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},66094:(t,e,n)=>{n.d(e,{B:()=>o});var i=n(17452);function o(t){return r[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,i.Ml)(t);return l[e]||s}(t.url)}(t)]||a}const r={},s="text/plain",a=r[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 t in l)r[l[t]]=t}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(t,e,r)=>{r.d(e,{Z:()=>f});var i,s=r(43697),l=r(96674),o=r(35463),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),h=r(30556),c=r(25031);let p=i=class extends l.wq{static get allTime(){return d}static get empty(){return y}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,s=t.end?.getTime()??t.end;return e===i&&r===s}expandTo(t,e=c.By){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.JE)(r,t,e));let s=this.end;if(s){const r=(0,o.JE)(s,t,e);s=s.getTime()===r.getTime()?r:(0,o.Nm)(r,1,t,e)}return new i({start:r,end:s})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,l=t.end?.getTime()??1/0;let o,n;if(s>=e&&s<=r?o=s:e>=s&&e<=l&&(o=e),r>=s&&r<=l?n=r:l>=e&&l<=r&&(n=l),null!=o&&null!=n&&!isNaN(o)&&!isNaN(n)){const t=new i;return t.start=o===-1/0?null:new Date(o),t.end=n===1/0?null:new Date(n),t}return i.empty}offset(t,e,r=c.By){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:l,end:n}=this;return null!=l&&(s.start=(0,o.Nm)(l,t,e,r)),null!=n&&(s.end=(0,o.Nm)(n,t,e,r)),s}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:r})}};(0,s._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],p.prototype,"readEnd",null),(0,s._)([(0,h.c)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],p.prototype,"readStart",null),(0,s._)([(0,h.c)("start")],p.prototype,"writeStart",null),p=i=(0,s._)([(0,u.j)("esri.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0}),f=p},10699:(t,e,r)=>{r.d(e,{IG:()=>o,iv:()=>n});var i=r(43697),s=r(52011);let l=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++})}};return e=(0,i._)([(0,s.j)("esri.core.Identifiable")],e),e},n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:l++})}};return e=(0,i._)([(0,s.j)("esri.core.NumericIdentifiable")],e),e};let a=class extends(o(class{})){};a=(0,i._)([(0,s.j)("esri.core.Identifiable")],a)},13867:(t,e,r)=>{r.d(e,{z:()=>s});var i=r(69801);class s{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,r)=>{r.d(e,{WJ:()=>n,Xq:()=>o});var i,s,l=r(44553);(s=i||(i={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(t,e,r){this.name=t,this._storage=e,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),r&&(this._storage.registerRemoveFunc(this.id,r),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,r,i=0){this._storage.put(this,t,e,r,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,r){this._storage.updateSize(this,t,e,r)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class n{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.Z,this._users=new l.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,r,s,l){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==r&&this._notifyRemove(e,o.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(e,r,i.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${e}`),void this._notifyRemove(e,r,i.ALL);const n=1+Math.max(l,-3)- -3;this._db.set(e,{entry:r,size:s,lifetime:n,lives:n}),this._size+=s,t.size+=s,this._checkSizeLimits()}updateSize(t,e,r,s){e=t.id+e;const l=this._db.get(e);if(l&&l.entry===r){for(this._size-=l.size,t.size-=l.size;s>this._maxSize;){const t=this._notifyRemove(e,r,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);s=t}l.size=s,this._size+=s,t.size+=s,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach(((t,i)=>{const s=t.lifetime;r[s]=(r[s]||0)+t.size,this._users.forAll((r=>{const{id:s,name:l}=r;if(i.startsWith(s)){const r=e[l]||0;e[l]=r+t.size}}))}));const i={};this._users.forAll((t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const s=e[r]||0;e[r]=s,i[r]=Math.round(100*t.hitRate)+"%"}else i[r]="0%"}));const s=Object.keys(e);s.sort(((t,r)=>e[r]-e[t])),s.forEach((r=>t[r]=Math.round(e[r]/2**20)+"MB / "+i[r]));for(let e=r.length-1;e>=0;--e){const i=r[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r){let i;return this._removeFuncs.some((s=>{if(t.startsWith(s[0])){const t=s[1](e,r);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,r]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,r,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,r=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const s=this._notifyRemove(t,e.entry,i.SOME);null!=s&&s>0&&(this._size+=s,r&&(r.size+=s),e.lives=e.lifetime,e.size=s,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let a=0},17445:(t,e,r)=>{r.d(e,{N1:()=>p,YP:()=>a,Z_:()=>f,gx:()=>u,nn:()=>m,on:()=>c,tX:()=>g}),r(66643),r(46791);var i=r(91460),s=r(50758),l=r(70586),o=r(95330),n=r(26258);function a(t,e,r={}){return h(t,e,r,d)}function u(t,e,r={}){return h(t,e,r,y)}function h(t,e,r={},i){let s=null;const o=r.once?(t,r)=>{i(t)&&((0,l.hw)(s),e(t,r))}:(t,r)=>{i(t)&&e(t,r)};if(s=(0,n.aQ)(t,o,r.sync,r.equals),r.initial){const e=t();o(e,e)}return s}function c(t,e,r,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(t){o.once&&o.once&&(0,l.hw)(h),r(t)}const d=a(t,((t,r)=>{c(),(0,i.vT)(t)&&(n=t,u=(0,i.on)(t,e,p),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return h=(0,s.kB)((()=>{d.remove(),c()})),h}function p(t,e){return function(t,e,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let n=null;function a(){n=(0,l.hw)(n)}return new Promise(((i,l)=>{n=(0,s.AL)([(0,o.fu)(r,(()=>{a(),l((0,o.zE)())})),h(t,(t=>{a(),i(t)}),{sync:!1,once:!0},e??d)])}))}(t,y,e)}function d(t){return!0}function y(t){return!!t}r(87538);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},87085:(t,e,r)=>{r.d(e,{Z:()=>v});var i=r(43697),s=(r(66577),r(3172)),l=r(20102),o=r(32448),n=r(10699),a=r(83379),u=r(92604),h=r(95330),c=r(17452),p=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),y=r(68773),f=r(6570),m=r(82971);let g=0,_=class extends(o.Z.EventedMixin((0,n.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await r.e(8008).then(r.bind(r,28008));try{return await i(e)}catch(t){const r=e&&e.portalItem,i=r?.id||"unset",s=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: '"+s+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,h.D_)(t)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,s.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new l.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,p.Cb)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],_.prototype,"fullExtent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i._)([(0,p.Cb)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({clonable:!1})],_.prototype,"parent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i._)([(0,p.Cb)({type:m.Z})],_.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:String})],_.prototype,"title",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i._)([(0,p.Cb)()],_.prototype,"url",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i._)([(0,d.j)("esri.layers.Layer")],_);const v=_},94756:(t,e,r)=>{r.r(e),r.d(e,{default:()=>yt});var i=r(43697),s=r(3172),l=r(66643),o=r(20102),n=r(22974),a=r(16453),u=r(95330),h=r(17452),c=r(5600),p=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(6570),m=r(82971),g=r(87085),_=r(54295),v=r(46486),w=r(17287),b=r(71612),S=r(17017),A=r(38009),x=r(16859),E=r(72965);let I=null;var R=r(92604),T=r(1533);class U{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:i,json:s}=await this._getSpriteData(this._spriteSource,t),l=Object.keys(s);if(!l||0===l.length||!i)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw R.Z.getLogger("esri.layers.support.SpriteSource").error(t),new o.Z("SpriteSource",t)}let a;for(let t=0;t<i.length;t+=4)a=i[t+3]/255,i[t]=i[t]*a,i[t+1]=i[t+1]*a,i[t+2]=i[t+2]*a;this.image=i}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new o.Z("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new o.Z("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,T.eP)(e.data)||(0,T.KZ)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...P(e),json:r}}const r=(0,h.mN)(this.baseURL),i=r.query?"?"+(0,h.B7)(r.query):"",l=this._isRetina?"@2x":"",n=`${r.path}${l}.${this._spriteImageFormat}${i}`,a=`${r.path}${l}.json${i}`,[u,c]=await Promise.all([(0,s.Z)(a,e),(0,s.Z)(n,{responseType:"image",...e})]);return{...P(c.data),json:u.data}}}function P(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const i=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(i.data)}}var C=r(11145),L=r(28589),z=r(8744),O=r(40488),B=r(55415);class D{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.Z)(this.url).then((t=>t.data.index))),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,u.k_)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let i=e;for(;0!==i.level;)i=new B.Z(i.level-1,i.row>>1,i.col>>1,i.world),r.push(i);let s,l,o=t,n=r.pop();if(1===o)return n;for(;r.length;)if(s=r.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var F=r(70586);class M{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,F.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.Z)(this._tileIndexUrl,{query:{...t?.query}}).then((t=>t.data.index))),this._tileIndexPromise}dataKey(t,e){const{level:r,row:i,col:s}=t,l=new B.Z(t);return this._tilemap.fetchAvailabilityUpsample(r,i,s,l,e).then((()=>(l.world=t.world,l))).catch((t=>{if((0,u.D_)(t))throw t;return null}))}}var j=r(30175);class Z{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const e=this._abortOptions;return e.push(t),(0,u.fu)(t,(()=>{e.every((t=>(0,u.Hc)(t)))&&this._abortController.abort()})),this._promise.then((t=>(0,n.d9)(t)))}async _makeRequest(t,e){const{data:r}=await(0,s.Z)(t,{responseType:"array-buffer",signal:e});return r}}const N=new Map;function k(t,e){return(0,j.s1)(N,t,(()=>new Z(t))).getData(e).then((e=>(N.delete(t),e))).catch((e=>{throw N.delete(t),e}))}class W{constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const i=(0,h.mN)(this.sourceUrl),s=(0,n.d9)(r),l=s.tiles;if(i)for(let t=0;t<l.length;t++){const e=(0,h.mN)(l[t]);e&&((0,h.YP)(e.path)||(e.path=(0,h.v_)(i.path,e.path)),l[t]=(0,h.fl)(e.path,{...i.query,...e.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map((t=>t.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=C.Z.fromJSON(s.tileInfo);const p=r.tileMap?(0,h.fl)((0,h.v_)(i.path,r.tileMap),i.query??{}):null;u?(this.type="vector-tile",this.tilemap=new M(new L.y({layer:{parsedUrl:i,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new D(p)),this.fullExtent=f.Z.fromJSON(r.fullExtent),this.initialExtent=f.Z.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return await(this.tilemap?.dataKey(t,e))??t}requestTile(t,e,r,i){return function(t,e,r,i,s){const l=(0,h.mN)(t),o=l.query;if(o)for(const[t,s]of Object.entries(o))switch(s){case"{x}":o[t]=i.toString();break;case"{y}":o[t]=r.toString();break;case"{z}":o[t]=e.toString()}const n=l.path;return k((0,h.fl)(n.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,i.toString()),{...l.query}),s)}(this.tileServers[e%this.tileServers.length],t,e,r,i)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const i=e.lods,s=r.lods,l=Math.min(i.length,s.length);for(let t=0;t<l;t++){const e=i[t],r=s[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function G(...t){let e;for(const r of t)if(null!=r)if((0,h.oC)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,h.YP)(r)?r:(0,h.v_)(e,r);return e?(0,h.Qj)(e):void 0}async function $(t,e,r,i,l){let o,n,a;if((0,u.k_)(l),"string"==typeof r){const t=(0,h.Fv)(r);a=await(0,s.Z)(t,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=t,n=t}else null!=r&&(a={data:r},o=r.jsonUrl||null,n=i);const c=a?.data;if(H(c))return t.styleUrl=o||null,async function(t,e,r,i){const s=r?(0,h.Yd)(r):(0,h.L)();t.styleBase=s,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const l=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await $(t,"esri",G(s,r.url),void 0,i):l.push($(t,"esri",r,s,i))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?l.push($(t,r,G(s,e.sources[r].url),void 0,i)):e.sources[r].tiles&&l.push($(t,r,e.sources[r],s,i)));await Promise.all(l)}(t,c,n,l);if(!H(c))return t.sourceUrl?V(t,c,n,!1,e,l):(t.sourceUrl=o||null,V(t,c,n,!0,e,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function q(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function H(t){return!!t&&"sources"in t&&!!t.sources}async function V(t,e,r,i,s,l){const o=r?(0,h.Qj)(r)+"/":(0,h.L)(),a=function(t){if(t.hasOwnProperty("tileInfo"))return t;const e={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let r=null;if(q(t)){const{bounds:e}=t;if(e){const t=(0,O.$)({x:e[0],y:e[1],spatialReference:(0,n.d9)(z.Zn)}),i=(0,O.$)({x:e[2],y:e[3],spatialReference:(0,n.d9)(z.Zn)});r={xmin:t.x,ymin:t.y,xmax:i.x,ymax:i.y,spatialReference:(0,n.d9)(z.R_)}}}null===r&&(r=e);let i=78271.51696400007,s=295828763.7957775;const l=[],o=t.hasOwnProperty("minzoom")?+t.minzoom:0,a=t.hasOwnProperty("maxzoom")?+t.maxzoom:22;for(let t=0;t<=a;t++)t>=o&&l.push({level:t,scale:s,resolution:i}),i/=2,s/=2;return{capabilities:"TilesOnly",initialExtent:r,fullExtent:e,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:l,spatialReference:(0,n.d9)(z.R_)}}}(e),u=new W(s,(0,h.fl)(o,l?.query??{}),a);if(!i&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(i&&(t.sourceBase=o,t.source=e,t.validatedSource=a,t.primarySourceName=s),t.sourceNameToSource[s]=u,!q(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?$(t,"",G(o,e.defaultStyles,"root.json"),void 0,l):$(t,"",e.defaultStyles,G(o,"root.json"),l)}}var K=r(33516),Q=r(19745),J=r(25929),X=r(94139),Y=r(39450);const tt=1e-6;function et(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,i=e.origin;if(Math.abs(r.x-i.x)>=tt||Math.abs(r.y-i.y)>=tt)return!1;let s,l;t.lods[0].scale>e.lods[0].scale?(s=t,l=e):(l=t,s=e);for(let t=s.lods[0].scale;t>=l.lods[l.lods.length-1].scale-tt;t/=2)if(Math.abs(t-l.lods[0].scale)<tt)return!0;return!1}function rt(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],i=t.format,s=t.dpi,l=new X.Z({x:t.origin.x,y:t.origin.y}),o=t.spatialReference,n=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>c;)p.push(new Y.Z({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new C.Z({size:[r,r],dpi:s,format:i||"pbf",origin:l,lods:p,spatialReference:o})}var it=r(51785),st=r(7575);let lt,ot;function nt(t){const e=(0,st.Sh)(t);for(;e.length>1;){const t=at(e.shift());if(t.available)return t}return at(e.shift())}function at(t){switch(t){case st.zO.WEBGL1:return lt||(lt=function(){const t=new ht,e=pt(st.zO.WEBGL1,t);return null==e||(t.supportsElementIndexUint=null!==e.getExtension("OES_element_index_uint"),t.supportsStandardDerivatives=null!==e.getExtension("OES_standard_derivatives"),t.supportsInstancedArrays=null!==e.getExtension("ANGLE_instanced_arrays"),t.supportsTextureFloat=null!==e.getExtension("OES_texture_float"),t.supportsTextureHalfFloat=null!==e.getExtension("OES_texture_half_float"),t.supportsColorBufferFloat=null!==e.getExtension("WEBGL_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=null!==e.getExtension("EXT_color_buffer_half_float")),t}()),lt;case st.zO.WEBGL2:return ot||(ot=function(){const t=new ct,e=pt(st.zO.WEBGL2,t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}()),ot}}class ut{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class ht extends ut{constructor(){super(...arguments),this.type=st.zO.WEBGL1}}class ct extends ut{constructor(){super(...arguments),this.type=st.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function pt(t,e){if(t===st.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||t===st.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let i=(0,st.kr)(r,t,{failIfMajorPerformanceCaveat:!0});if(null==i&&(i=(0,st.kr)(r,t),null!=i&&(e.majorPerformanceCaveat=!0)),null==i)return i;if(t===st.zO.WEBGL1){const t=i.getParameter(i.VERSION),r=t?.match(/^WebGL\s+([\d.]*)/);if(r){const t=parseFloat(r[1]);e.available=t>=.94}}else e.available=!0;e.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return s&&(e.supportsHighPrecisionFragment=s.precision>0),i}let dt=class extends((0,b.h)((0,E.M)((0,v.Z)((0,w.Y)((0,A.q)((0,x.I)((0,S.N)((0,_.V)((0,a.R)(g.Z)))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null,this.path=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(u.r9).then((async()=>{if(!this.portalItem?.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.Z)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:e},(0,K.ht)(this.portalItem))})).catch(u.r9).then((()=>this._loadStyle(t)));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t?.serviceUrl&&(0,h.mN)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,h.fl)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(t,e){t&&(0,h.oC)(t)&&(t=`https:${t}`);const r=(0,Q.a)(t);e.styleUrl=(0,J.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new C.Z;if(t.length>1)for(let r=0;r<t.length;r++)et(e,t[r].tileInfo)&&(e=rt(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new L.y({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=nt("2d").maxTextureSize,i=this.currentStyleInfo?.spriteUrl?(0,h.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new U({type:"url",spriteUrl:i,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await s.load(e),this._spriteSourceMap.set(t,s)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=nt("2d").maxTextureSize,i=t.spriteUrl,s=i?(0,h.fl)(i,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===t.type)return null;const l=new U(t,r);try{await l.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(t){(0,u.r9)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.vr)((t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t}))),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,n.d9)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const i=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||i})}getStyleLayer(t){return(0,n.d9)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,n.d9)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new o.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[i,s]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await $(r,"esri",t,s,e),{layerDefinition:r.validatedSource,url:i,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&G(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&G(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(t){if(I)return I;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return I=new Promise((t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy})),I}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new it.Z(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!e)return;const i=e[2]&&e[2].toLowerCase();if(!i)return;const s=e[1]||"";for(const t of r)if(t.toLowerCase().includes(i))return(0,h.Fv)(`//static.arcgis.com/attribution/Vector${s}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"attributionDataUrl",null),(0,i._)([(0,c.Cb)({type:["show","hide"]})],dt.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({json:{read:!0,write:!0}})],dt.prototype,"blendMode",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"capabilities",null),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"currentStyleInfo",void 0),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:f.Z})],dt.prototype,"fullExtent",null),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:f.Z})],dt.prototype,"initialExtent",null),(0,i._)([(0,c.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],dt.prototype,"isReference",void 0),(0,i._)([(0,c.Cb)({type:["VectorTileLayer"]})],dt.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"parsedUrl",null),(0,i._)([(0,c.Cb)()],dt.prototype,"style",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"serviceUrl",null),(0,i._)([(0,c.Cb)({type:m.Z,readOnly:!0})],dt.prototype,"spatialReference",null),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"styleRepository",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"sourceNameToSource",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"primarySource",void 0),(0,i._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],dt.prototype,"styleUrl",null),(0,i._)([(0,y.c)(["portal-item","web-document"],"styleUrl")],dt.prototype,"writeStyleUrl",null),(0,i._)([(0,c.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:C.Z})],dt.prototype,"tileInfo",null),(0,i._)([(0,c.Cb)()],dt.prototype,"tilemapCache",void 0),(0,i._)([(0,p.r)("service","tilemapCache",["capabilities","tileInfo"])],dt.prototype,"readTilemapCache",null),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],dt.prototype,"type",void 0),(0,i._)([(0,c.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],dt.prototype,"url",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"version",void 0),(0,i._)([(0,p.r)("version",["version","currentVersion"])],dt.prototype,"readVersion",null),(0,i._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],dt.prototype,"path",void 0),dt=(0,i._)([(0,d.j)("esri.layers.VectorTileLayer")],dt);const yt=dt},54295:(t,e,r)=>{r.d(e,{V:()=>o});var i=r(43697),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],e.prototype,"apiKey",null),e=(0,i._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],e),e}},17017:(t,e,r)=>{r.d(e,{N:()=>o});var i=r(43697),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,i._)([(0,l.j)("esri.layers.mixins.CustomParametersMixin")],e),e}},16859:(t,e,r)=>{r.d(e,{I:()=>S});var i=r(43697),s=r(68773),l=r(40330),o=r(3172),n=r(66643),a=r(20102),u=r(92604),h=r(70586),c=r(95330),p=r(17452),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),g=r(84230),_=r(48522),v=r(15235),w=r(86082),b=r(14661);const S=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new v.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(e),await i({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap},e)}catch(t){throw(0,c.D_)(t)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,c.r9)(t),!0))))}async setUserPrivileges(t,e){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(t){(0,c.r9)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const i=t===r.id;if(i&&r.portal.user)return(0,b.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,g.oP)(this.url,e)}catch(t){(0,c.r9)(t)}if(!s||!(0,p.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;o=await(l.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.r9)(t)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:t,portal:{url:s}}),await r.load(e)),r.portal.user)return(0,b.Ss)(r)}catch(t){(0,c.r9)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.r9)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?l.id?.findCredential(this.url):null;if(!e)return!0;const r=A.credential===e?A.user:await this._fetchEditingUser(t);return A.credential=e,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=l.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=_.Z.getDefault();if(s&&s.loaded&&(0,p.Fv)(s.restUrl)===(0,p.Fv)(i))return s.user;const a=`${i}/community/self`,u=null!=t?t.signal:null,h=await(0,n.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?w.Z.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,i=this.portalItem?.id&&(this.portalItem.portal||_.Z.getDefault());return r&&i&&!(0,p.tm)(i.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.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(t,{...e,layer:this})}};return(0,i._)([(0,d.Cb)({type:v.default})],e.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],e),e},A={credential:null,user:null}},33516:(t,e,r)=>{r.d(e,{M4:()=>a,Yv:()=>o,ht:()=>l,wk:()=>n});var i=r(17452),s=r(48522);function l(t){return{origin:"portal-item",url:(0,i.mN)(t.itemUrl),portal:t.portal||s.Z.getDefault(),portalItem:t,readResourcePaths:[]}}function o(t){return{origin:"portal-item",messages:[],writtenProperties:[],url:t.itemUrl?(0,i.mN)(t.itemUrl):null,portal:t.portal||s.Z.getDefault(),portalItem:t}}function n(t){return{origin:"web-map",url:(0,i.mN)(t.itemUrl),portal:t.portal||s.Z.getDefault(),portalItem:t,readResourcePaths:[]}}function a(t){return{origin:"web-map",messages:[],writtenProperties:[],url:t.itemUrl?(0,i.mN)(t.itemUrl):null,portal:t.portal||s.Z.getDefault(),portalItem:t}}},55415:(t,e,r)=>{r.d(e,{Z:()=>s});var i=r(71143);class s{static getId(t,e,r,i){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${i}`}constructor(t,e,r,i){this.set(t,e,r,i)}get key(){return this}get id(){return this.toString()}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,i){this.set(t,e,r,i)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,i){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,i,s]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(i),this.world=parseFloat(s)}else this.level=+t,this.row=+e,this.col=+r,this.world=+i||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,i=this.world;return[new s(t,e,r,i),new s(t,e,r+1,i),new s(t,e+1,r,i),new s(t,e+1,r+1,i)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}s.pool=new i.Z(s,null,null,25,50)},7575:(t,e,r)=>{r.d(e,{Sh:()=>o,kr:()=>l,zO:()=>i});var i,s=r(80442);function l(t,e,r={}){const s=e===i.WEBGL1?"webgl":"webgl2";return t.getContext(s,r)||null}function o(t){if("3d"===t)return[i.WEBGL2];const e=(0,s.Z)("esri-force-webgl");return e===i.WEBGL1||e===i.WEBGL2?[e]:(0,s.Z)("mac")&&(0,s.Z)("chrome")?[i.WEBGL1,i.WEBGL2]:[i.WEBGL2,i.WEBGL1]}!function(t){t[t.WEBGL1=1]="WEBGL1",t[t.WEBGL2=2]="WEBGL2"}(i||(i={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(t,e,r)=>{r.d(e,{Z:()=>f});var i,s=r(43697),l=r(96674),o=r(35463),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),h=r(30556),c=r(25031);let p=i=class extends l.wq{static get allTime(){return d}static get empty(){return y}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,s=t.end?.getTime()??t.end;return e===i&&r===s}expandTo(t,e=c.By){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.JE)(r,t,e));let s=this.end;if(s){const r=(0,o.JE)(s,t,e);s=s.getTime()===r.getTime()?r:(0,o.Nm)(r,1,t,e)}return new i({start:r,end:s})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,l=t.end?.getTime()??1/0;let o,n;if(s>=e&&s<=r?o=s:e>=s&&e<=l&&(o=e),r>=s&&r<=l?n=r:l>=e&&l<=r&&(n=l),null!=o&&null!=n&&!isNaN(o)&&!isNaN(n)){const t=new i;return t.start=o===-1/0?null:new Date(o),t.end=n===1/0?null:new Date(n),t}return i.empty}offset(t,e,r=c.By){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:l,end:n}=this;return null!=l&&(s.start=(0,o.Nm)(l,t,e,r)),null!=n&&(s.end=(0,o.Nm)(n,t,e,r)),s}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:r})}};(0,s._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],p.prototype,"readEnd",null),(0,s._)([(0,h.c)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,n.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,n.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],p.prototype,"readStart",null),(0,s._)([(0,h.c)("start")],p.prototype,"writeStart",null),p=i=(0,s._)([(0,u.j)("esri.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0}),f=p},10699:(t,e,r)=>{r.d(e,{IG:()=>o,iv:()=>n});var i=r(43697),s=r(52011);let l=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++})}};return e=(0,i._)([(0,s.j)("esri.core.Identifiable")],e),e},n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:l++})}};return e=(0,i._)([(0,s.j)("esri.core.NumericIdentifiable")],e),e};let a=class extends(o(class{})){};a=(0,i._)([(0,s.j)("esri.core.Identifiable")],a)},13867:(t,e,r)=>{r.d(e,{z:()=>s});var i=r(69801);class s{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,r)=>{r.d(e,{WJ:()=>n,Xq:()=>o});var i,s,l=r(44553);(s=i||(i={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(t,e,r){this.name=t,this._storage=e,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),r&&(this._storage.registerRemoveFunc(this.id,r),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,r,i=0){this._storage.put(this,t,e,r,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,r){this._storage.updateSize(this,t,e,r)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class n{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.Z,this._users=new l.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,r,s,l){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==r&&this._notifyRemove(e,o.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(e,r,i.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${e}`),void this._notifyRemove(e,r,i.ALL);const n=1+Math.max(l,-3)- -3;this._db.set(e,{entry:r,size:s,lifetime:n,lives:n}),this._size+=s,t.size+=s,this._checkSizeLimits()}updateSize(t,e,r,s){e=t.id+e;const l=this._db.get(e);if(l&&l.entry===r){for(this._size-=l.size,t.size-=l.size;s>this._maxSize;){const t=this._notifyRemove(e,r,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);s=t}l.size=s,this._size+=s,t.size+=s,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach(((t,i)=>{const s=t.lifetime;r[s]=(r[s]||0)+t.size,this._users.forAll((r=>{const{id:s,name:l}=r;if(i.startsWith(s)){const r=e[l]||0;e[l]=r+t.size}}))}));const i={};this._users.forAll((t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const s=e[r]||0;e[r]=s,i[r]=Math.round(100*t.hitRate)+"%"}else i[r]="0%"}));const s=Object.keys(e);s.sort(((t,r)=>e[r]-e[t])),s.forEach((r=>t[r]=Math.round(e[r]/2**20)+"MB / "+i[r]));for(let e=r.length-1;e>=0;--e){const i=r[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r){let i;return this._removeFuncs.some((s=>{if(t.startsWith(s[0])){const t=s[1](e,r);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,r]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,r,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,r=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const s=this._notifyRemove(t,e.entry,i.SOME);null!=s&&s>0&&(this._size+=s,r&&(r.size+=s),e.lives=e.lifetime,e.size=s,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let a=0},17445:(t,e,r)=>{r.d(e,{N1:()=>p,YP:()=>a,Z_:()=>f,gx:()=>u,nn:()=>m,on:()=>c,tX:()=>g}),r(66643),r(46791);var i=r(91460),s=r(50758),l=r(70586),o=r(95330),n=r(26258);function a(t,e,r={}){return h(t,e,r,d)}function u(t,e,r={}){return h(t,e,r,y)}function h(t,e,r={},i){let s=null;const o=r.once?(t,r)=>{i(t)&&((0,l.hw)(s),e(t,r))}:(t,r)=>{i(t)&&e(t,r)};if(s=(0,n.aQ)(t,o,r.sync,r.equals),r.initial){const e=t();o(e,e)}return s}function c(t,e,r,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(t){o.once&&o.once&&(0,l.hw)(h),r(t)}const d=a(t,((t,r)=>{c(),(0,i.vT)(t)&&(n=t,u=(0,i.on)(t,e,p),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return h=(0,s.kB)((()=>{d.remove(),c()})),h}function p(t,e){return function(t,e,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const i=t();if(e?.(i))return Promise.resolve(i);let n=null;function a(){n=(0,l.hw)(n)}return new Promise(((i,l)=>{n=(0,s.AL)([(0,o.fu)(r,(()=>{a(),l((0,o.zE)())})),h(t,(t=>{a(),i(t)}),{sync:!1,once:!0},e??d)])}))}(t,y,e)}function d(t){return!0}function y(t){return!!t}r(87538);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},87085:(t,e,r)=>{r.d(e,{Z:()=>v});var i=r(43697),s=(r(66577),r(3172)),l=r(20102),o=r(32448),n=r(10699),a=r(83379),u=r(92604),h=r(95330),c=r(17452),p=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),y=r(68773),f=r(6570),m=r(82971);let g=0,_=class extends(o.Z.EventedMixin((0,n.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await r.e(8008).then(r.bind(r,28008));try{return await i(e)}catch(t){const r=e&&e.portalItem,i=r?.id||"unset",s=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: '"+s+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,h.D_)(t)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,s.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new l.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,p.Cb)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],_.prototype,"fullExtent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i._)([(0,p.Cb)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({clonable:!1})],_.prototype,"parent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i._)([(0,p.Cb)({type:m.Z})],_.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:String})],_.prototype,"title",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i._)([(0,p.Cb)()],_.prototype,"url",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i._)([(0,d.j)("esri.layers.Layer")],_);const v=_},94756:(t,e,r)=>{r.r(e),r.d(e,{default:()=>yt});var i=r(43697),s=r(3172),l=r(66643),o=r(20102),n=r(22974),a=r(16453),u=r(95330),h=r(17452),c=r(5600),p=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(6570),m=r(82971),g=r(87085),_=r(54295),v=r(46486),w=r(17287),b=r(71612),S=r(17017),A=r(38009),x=r(16859),E=r(72965);let I=null;var R=r(92604),T=r(1533);class U{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:i,json:s}=await this._getSpriteData(this._spriteSource,t),l=Object.keys(s);if(!l||0===l.length||!i)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw R.Z.getLogger("esri.layers.support.SpriteSource").error(t),new o.Z("SpriteSource",t)}let a;for(let t=0;t<i.length;t+=4)a=i[t+3]/255,i[t]=i[t]*a,i[t+1]=i[t+1]*a,i[t+2]=i[t+2]*a;this.image=i}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new o.Z("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new o.Z("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,T.eP)(e.data)||(0,T.KZ)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...P(e),json:r}}const r=(0,h.mN)(this.baseURL),i=r.query?"?"+(0,h.B7)(r.query):"",l=this._isRetina?"@2x":"",n=`${r.path}${l}.${this._spriteImageFormat}${i}`,a=`${r.path}${l}.json${i}`,[u,c]=await Promise.all([(0,s.Z)(a,e),(0,s.Z)(n,{responseType:"image",...e})]);return{...P(c.data),json:u.data}}}function P(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const i=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(i.data)}}var C=r(11145),L=r(28589),z=r(8744),O=r(40488),B=r(55415);class D{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.Z)(this.url).then((t=>t.data.index))),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,u.k_)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let i=e;for(;0!==i.level;)i=new B.Z(i.level-1,i.row>>1,i.col>>1,i.world),r.push(i);let s,l,o=t,n=r.pop();if(1===o)return n;for(;r.length;)if(s=r.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var F=r(70586);class M{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,F.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.Z)(this._tileIndexUrl,{query:{...t?.query}}).then((t=>t.data.index))),this._tileIndexPromise}dataKey(t,e){const{level:r,row:i,col:s}=t,l=new B.Z(t);return this._tilemap.fetchAvailabilityUpsample(r,i,s,l,e).then((()=>(l.world=t.world,l))).catch((t=>{if((0,u.D_)(t))throw t;return null}))}}var j=r(30175);class Z{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const e=this._abortOptions;return e.push(t),(0,u.fu)(t,(()=>{e.every((t=>(0,u.Hc)(t)))&&this._abortController.abort()})),this._promise.then((t=>(0,n.d9)(t)))}async _makeRequest(t,e){const{data:r}=await(0,s.Z)(t,{responseType:"array-buffer",signal:e});return r}}const N=new Map;function k(t,e){return(0,j.s1)(N,t,(()=>new Z(t))).getData(e).then((e=>(N.delete(t),e))).catch((e=>{throw N.delete(t),e}))}class W{constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const i=(0,h.mN)(this.sourceUrl),s=(0,n.d9)(r),l=s.tiles;if(i)for(let t=0;t<l.length;t++){const e=(0,h.mN)(l[t]);e&&((0,h.YP)(e.path)||(e.path=(0,h.v_)(i.path,e.path)),l[t]=(0,h.fl)(e.path,{...i.query,...e.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map((t=>t.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=C.Z.fromJSON(s.tileInfo);const p=r.tileMap?(0,h.fl)((0,h.v_)(i.path,r.tileMap),i.query??{}):null;u?(this.type="vector-tile",this.tilemap=new M(new L.y({layer:{parsedUrl:i,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new D(p)),this.fullExtent=f.Z.fromJSON(r.fullExtent),this.initialExtent=f.Z.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return await(this.tilemap?.dataKey(t,e))??t}requestTile(t,e,r,i){return function(t,e,r,i,s){const l=(0,h.mN)(t),o=l.query;if(o)for(const[t,s]of Object.entries(o))switch(s){case"{x}":o[t]=i.toString();break;case"{y}":o[t]=r.toString();break;case"{z}":o[t]=e.toString()}const n=l.path;return k((0,h.fl)(n.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,i.toString()),{...l.query}),s)}(this.tileServers[e%this.tileServers.length],t,e,r,i)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const i=e.lods,s=r.lods,l=Math.min(i.length,s.length);for(let t=0;t<l;t++){const e=i[t],r=s[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function G(...t){let e;for(const r of t)if(null!=r)if((0,h.oC)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,h.YP)(r)?r:(0,h.v_)(e,r);return e?(0,h.Qj)(e):void 0}async function $(t,e,r,i,l){let o,n,a;if((0,u.k_)(l),"string"==typeof r){const t=(0,h.Fv)(r);a=await(0,s.Z)(t,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=t,n=t}else null!=r&&(a={data:r},o=r.jsonUrl||null,n=i);const c=a?.data;if(H(c))return t.styleUrl=o||null,async function(t,e,r,i){const s=r?(0,h.Yd)(r):(0,h.L)();t.styleBase=s,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const l=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await $(t,"esri",G(s,r.url),void 0,i):l.push($(t,"esri",r,s,i))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?l.push($(t,r,G(s,e.sources[r].url),void 0,i)):e.sources[r].tiles&&l.push($(t,r,e.sources[r],s,i)));await Promise.all(l)}(t,c,n,l);if(!H(c))return t.sourceUrl?K(t,c,n,!1,e,l):(t.sourceUrl=o||null,K(t,c,n,!0,e,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function q(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function H(t){return!!t&&"sources"in t&&!!t.sources}async function K(t,e,r,i,s,l){const o=r?(0,h.Qj)(r)+"/":(0,h.L)(),a=function(t){if(t.hasOwnProperty("tileInfo"))return t;const e={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let r=null;if(q(t)){const{bounds:e}=t;if(e){const t=(0,O.$)({x:e[0],y:e[1],spatialReference:(0,n.d9)(z.Zn)}),i=(0,O.$)({x:e[2],y:e[3],spatialReference:(0,n.d9)(z.Zn)});r={xmin:t.x,ymin:t.y,xmax:i.x,ymax:i.y,spatialReference:(0,n.d9)(z.R_)}}}null===r&&(r=e);let i=78271.51696400007,s=295828763.7957775;const l=[],o=t.hasOwnProperty("minzoom")?+t.minzoom:0,a=t.hasOwnProperty("maxzoom")?+t.maxzoom:22;for(let t=0;t<=a;t++)t>=o&&l.push({level:t,scale:s,resolution:i}),i/=2,s/=2;return{capabilities:"TilesOnly",initialExtent:r,fullExtent:e,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:l,spatialReference:(0,n.d9)(z.R_)}}}(e),u=new W(s,(0,h.fl)(o,l?.query??{}),a);if(!i&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(i&&(t.sourceBase=o,t.source=e,t.validatedSource=a,t.primarySourceName=s),t.sourceNameToSource[s]=u,!q(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?$(t,"",G(o,e.defaultStyles,"root.json"),void 0,l):$(t,"",e.defaultStyles,G(o,"root.json"),l)}}var V=r(33516),Q=r(19745),J=r(25929),X=r(94139),Y=r(39450);const tt=1e-6;function et(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,i=e.origin;if(Math.abs(r.x-i.x)>=tt||Math.abs(r.y-i.y)>=tt)return!1;let s,l;t.lods[0].scale>e.lods[0].scale?(s=t,l=e):(l=t,s=e);for(let t=s.lods[0].scale;t>=l.lods[l.lods.length-1].scale-tt;t/=2)if(Math.abs(t-l.lods[0].scale)<tt)return!0;return!1}function rt(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],i=t.format,s=t.dpi,l=new X.Z({x:t.origin.x,y:t.origin.y}),o=t.spatialReference,n=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>c;)p.push(new Y.Z({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new C.Z({size:[r,r],dpi:s,format:i||"pbf",origin:l,lods:p,spatialReference:o})}var it=r(51785),st=r(7575);let lt,ot;function nt(t){const e=(0,st.Sh)(t);for(;e.length>1;){const t=at(e.shift());if(t.available)return t}return at(e.shift())}function at(t){switch(t){case st.zO.WEBGL1:return lt||(lt=function(){const t=new ht,e=pt(st.zO.WEBGL1,t);return null==e||(t.supportsElementIndexUint=null!==e.getExtension("OES_element_index_uint"),t.supportsStandardDerivatives=null!==e.getExtension("OES_standard_derivatives"),t.supportsInstancedArrays=null!==e.getExtension("ANGLE_instanced_arrays"),t.supportsTextureFloat=null!==e.getExtension("OES_texture_float"),t.supportsTextureHalfFloat=null!==e.getExtension("OES_texture_half_float"),t.supportsColorBufferFloat=null!==e.getExtension("WEBGL_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=null!==e.getExtension("EXT_color_buffer_half_float")),t}()),lt;case st.zO.WEBGL2:return ot||(ot=function(){const t=new ct,e=pt(st.zO.WEBGL2,t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}()),ot}}class ut{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class ht extends ut{constructor(){super(...arguments),this.type=st.zO.WEBGL1}}class ct extends ut{constructor(){super(...arguments),this.type=st.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function pt(t,e){if(t===st.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||t===st.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let i=(0,st.kr)(r,t,{failIfMajorPerformanceCaveat:!0});if(null==i&&(i=(0,st.kr)(r,t),null!=i&&(e.majorPerformanceCaveat=!0)),null==i)return i;if(t===st.zO.WEBGL1){const t=i.getParameter(i.VERSION),r=t?.match(/^WebGL\s+([\d.]*)/);if(r){const t=parseFloat(r[1]);e.available=t>=.94}}else e.available=!0;e.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return s&&(e.supportsHighPrecisionFragment=s.precision>0),i}let dt=class extends((0,b.h)((0,E.M)((0,v.Z)((0,w.Y)((0,A.q)((0,x.I)((0,S.N)((0,_.V)((0,a.R)(g.Z)))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null,this.path=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(u.r9).then((async()=>{if(!this.portalItem?.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.Z)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:e},(0,V.ht)(this.portalItem))})).catch(u.r9).then((()=>this._loadStyle(t)));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t?.serviceUrl&&(0,h.mN)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,h.fl)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(t,e){t&&(0,h.oC)(t)&&(t=`https:${t}`);const r=(0,Q.a)(t);e.styleUrl=(0,J.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new C.Z;if(t.length>1)for(let r=0;r<t.length;r++)et(e,t[r].tileInfo)&&(e=rt(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new L.y({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=nt("2d").maxTextureSize,i=this.currentStyleInfo?.spriteUrl?(0,h.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new U({type:"url",spriteUrl:i,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await s.load(e),this._spriteSourceMap.set(t,s)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=nt("2d").maxTextureSize,i=t.spriteUrl,s=i?(0,h.fl)(i,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===t.type)return null;const l=new U(t,r);try{await l.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(t){(0,u.r9)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.vr)((t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t}))),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,n.d9)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const i=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||i})}getStyleLayer(t){return(0,n.d9)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,n.d9)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new o.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[i,s]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await $(r,"esri",t,s,e),{layerDefinition:r.validatedSource,url:i,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&G(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&G(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(t){if(I)return I;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return I=new Promise((t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy})),I}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new it.Z(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!e)return;const i=e[2]&&e[2].toLowerCase();if(!i)return;const s=e[1]||"";for(const t of r)if(t.toLowerCase().includes(i))return(0,h.Fv)(`//static.arcgis.com/attribution/Vector${s}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"attributionDataUrl",null),(0,i._)([(0,c.Cb)({type:["show","hide"]})],dt.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({json:{read:!0,write:!0}})],dt.prototype,"blendMode",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"capabilities",null),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"currentStyleInfo",void 0),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:f.Z})],dt.prototype,"fullExtent",null),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:f.Z})],dt.prototype,"initialExtent",null),(0,i._)([(0,c.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],dt.prototype,"isReference",void 0),(0,i._)([(0,c.Cb)({type:["VectorTileLayer"]})],dt.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"parsedUrl",null),(0,i._)([(0,c.Cb)()],dt.prototype,"style",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"serviceUrl",null),(0,i._)([(0,c.Cb)({type:m.Z,readOnly:!0})],dt.prototype,"spatialReference",null),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"styleRepository",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"sourceNameToSource",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"primarySource",void 0),(0,i._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],dt.prototype,"styleUrl",null),(0,i._)([(0,y.c)(["portal-item","web-document"],"styleUrl")],dt.prototype,"writeStyleUrl",null),(0,i._)([(0,c.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:C.Z})],dt.prototype,"tileInfo",null),(0,i._)([(0,c.Cb)()],dt.prototype,"tilemapCache",void 0),(0,i._)([(0,p.r)("service","tilemapCache",["capabilities","tileInfo"])],dt.prototype,"readTilemapCache",null),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],dt.prototype,"type",void 0),(0,i._)([(0,c.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],dt.prototype,"url",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],dt.prototype,"version",void 0),(0,i._)([(0,p.r)("version",["version","currentVersion"])],dt.prototype,"readVersion",null),(0,i._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],dt.prototype,"path",void 0),dt=(0,i._)([(0,d.j)("esri.layers.VectorTileLayer")],dt);const yt=dt},54295:(t,e,r)=>{r.d(e,{V:()=>o});var i=r(43697),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],e.prototype,"apiKey",null),e=(0,i._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],e),e}},17017:(t,e,r)=>{r.d(e,{N:()=>o});var i=r(43697),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,i._)([(0,l.j)("esri.layers.mixins.CustomParametersMixin")],e),e}},16859:(t,e,r)=>{r.d(e,{I:()=>S});var i=r(43697),s=r(68773),l=r(40330),o=r(3172),n=r(66643),a=r(20102),u=r(92604),h=r(70586),c=r(95330),p=r(17452),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),g=r(84230),_=r(48522),v=r(15235),w=r(86082),b=r(14661);const S=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new v.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(e),await i({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap},e)}catch(t){throw(0,c.D_)(t)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,c.r9)(t),!0))))}async setUserPrivileges(t,e){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(t){(0,c.r9)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const i=t===r.id;if(i&&r.portal.user)return(0,b.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,g.oP)(this.url,e)}catch(t){(0,c.r9)(t)}if(!s||!(0,p.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;o=await(l.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.r9)(t)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:t,portal:{url:s}}),await r.load(e)),r.portal.user)return(0,b.Ss)(r)}catch(t){(0,c.r9)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.r9)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?l.id?.findCredential(this.url):null;if(!e)return!0;const r=A.credential===e?A.user:await this._fetchEditingUser(t);return A.credential=e,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=l.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=_.Z.getDefault();if(s&&s.loaded&&(0,p.Fv)(s.restUrl)===(0,p.Fv)(i))return s.user;const a=`${i}/community/self`,u=null!=t?t.signal:null,h=await(0,n.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?w.Z.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,i=this.portalItem?.id&&(this.portalItem.portal||_.Z.getDefault());return r&&i&&!(0,p.tm)(i.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.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(t,{...e,layer:this})}};return(0,i._)([(0,d.Cb)({type:v.default})],e.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],e),e},A={credential:null,user:null}},33516:(t,e,r)=>{r.d(e,{M4:()=>a,Yv:()=>o,ht:()=>l,wk:()=>n});var i=r(17452),s=r(48522);function l(t){return{origin:"portal-item",url:(0,i.mN)(t.itemUrl),portal:t.portal||s.Z.getDefault(),portalItem:t,readResourcePaths:[]}}function o(t){const e=(0,i.mN)(t.itemUrl);return{origin:"portal-item",messages:[],writtenProperties:[],url:e,portal:t.portal||s.Z.getDefault(),portalItem:t,verifyItemRelativeUrls:e?{rootPath:e.path,writtenUrls:[]}:null,blockedRelativeUrls:[]}}function n(t){return{origin:"web-map",url:(0,i.mN)(t.itemUrl),portal:t.portal||s.Z.getDefault(),portalItem:t,readResourcePaths:[]}}function a(t,e){const r=(0,i.mN)(t.itemUrl);return{origin:"web-map",messages:[],writtenProperties:[],url:r,portal:t.portal||s.Z.getDefault(),portalItem:t,initiator:e,verifyItemRelativeUrls:r?{rootPath:r.path,writtenUrls:[]}:null,blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}}},55415:(t,e,r)=>{r.d(e,{Z:()=>s});var i=r(71143);class s{static getId(t,e,r,i){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${i}`}constructor(t,e,r,i){this.set(t,e,r,i)}get key(){return this}get id(){return this.toString()}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,i){this.set(t,e,r,i)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,i){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,i,s]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(i),this.world=parseFloat(s)}else this.level=+t,this.row=+e,this.col=+r,this.world=+i||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,i=this.world;return[new s(t,e,r,i),new s(t,e,r+1,i),new s(t,e+1,r,i),new s(t,e+1,r+1,i)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}s.pool=new i.Z(s,null,null,25,50)},7575:(t,e,r)=>{r.d(e,{Sh:()=>o,kr:()=>l,zO:()=>i});var i,s=r(80442);function l(t,e,r={}){const s=e===i.WEBGL1?"webgl":"webgl2";return t.getContext(s,r)||null}function o(t){if("3d"===t)return[i.WEBGL2];const e=(0,s.Z)("esri-force-webgl");return e===i.WEBGL1||e===i.WEBGL2?[e]:(0,s.Z)("mac")&&(0,s.Z)("chrome")?[i.WEBGL1,i.WEBGL2]:[i.WEBGL2,i.WEBGL1]}!function(t){t[t.WEBGL1=1]="WEBGL1",t[t.WEBGL2=2]="WEBGL2"}(i||(i={}))}}]);