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

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 (123) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0e354096ad8817971eed.js → 02d235849ba93541d7ad.js} +1 -1
  3. package/assets/esri/core/workers/chunks/0422c5160491fbcf01dc.js +1 -0
  4. package/assets/esri/core/workers/chunks/224e79f6c172da444e0a.js +1 -0
  5. package/assets/esri/core/workers/chunks/{ca3d5803cdf035d7389d.js → 30776102fbab294bfe7b.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{61dec8399919b278b636.js → 3ac9001b19a90faf5573.js} +1 -1
  7. package/assets/esri/core/workers/chunks/41081c921037e543a22f.js +1 -0
  8. package/assets/esri/core/workers/chunks/4564a7885d045a850887.js +1 -0
  9. package/assets/esri/core/workers/chunks/4adf3a8c6b49c381a633.js +1 -0
  10. package/assets/esri/core/workers/chunks/{2721aa6b6941b28b9758.js → 63c8bf00120a4e67f5b0.js} +1 -1
  11. package/assets/esri/core/workers/chunks/74951370a341f02d3714.js +1 -0
  12. package/assets/esri/core/workers/chunks/{fa6103e3d4e857b0035b.js → 78e2fa121760383b08ec.js} +9 -6
  13. package/assets/esri/core/workers/chunks/7b8377b3a9f78f9d3613.js +1 -0
  14. package/assets/esri/core/workers/chunks/{fd28400141a6751327ae.js → 7cf7f2b991a7cbdad2ce.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{1a723bb4a341f645e5fe.js → 83b8141f0c80e3448012.js} +1 -1
  16. package/assets/esri/core/workers/chunks/934c32c49bb9e21482fd.js +1 -0
  17. package/assets/esri/core/workers/chunks/969a82b674eda9f8720f.js +1 -0
  18. package/assets/esri/core/workers/chunks/a1e16c33f1843dbdce26.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d07235ce2765a25b9be4.js → a50ec5b647a160199cb2.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{77923afde29ae1ff10ca.js → b6e86e179f99b5cf8dff.js} +1 -1
  21. package/assets/esri/core/workers/chunks/c3ddf5dbc34f118002df.js +1 -0
  22. package/assets/esri/core/workers/chunks/{7b3d5f044c96e2c2af11.js → d191267d91a53db42956.js} +1 -1
  23. package/assets/esri/core/workers/chunks/ffa330a19a09679212fb.js +1 -0
  24. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +3 -9
  25. package/assets/esri/themes/base/widgets/_Legend.scss +1 -1
  26. package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +3 -3
  27. package/assets/esri/themes/dark/main.css +1 -1
  28. package/assets/esri/themes/light/main.css +1 -1
  29. package/assets/esri/themes/light/view.css +1 -1
  30. package/geometry/support/meshUtils/georeference.js +1 -1
  31. package/interfaces.d.ts +1254 -262
  32. package/kernel.js +1 -1
  33. package/layers/GroupLayer.js +1 -1
  34. package/layers/SceneLayer.js +1 -1
  35. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  36. package/layers/graphics/data/queryValidationUtils.js +1 -1
  37. package/layers/mixins/ArcGISMapService.js +1 -1
  38. package/layers/save/groupLayerUtils.js +1 -1
  39. package/layers/save/utils.js +1 -1
  40. package/layers/support/ImageElement.js +1 -1
  41. package/layers/support/Sublayer.js +1 -1
  42. package/layers/support/Subtype.d.ts +4 -0
  43. package/layers/support/Subtype.js +1 -1
  44. package/layers/support/imageryRendererUtils.js +1 -1
  45. package/networks/Network.js +1 -1
  46. package/package.json +1 -1
  47. package/portal/support/jsonContext.js +1 -1
  48. package/portal/support/layersLoader.js +1 -1
  49. package/rest/featureService/FeatureService.d.ts +4 -0
  50. package/rest/featureService/FeatureService.js +1 -1
  51. package/rest/featureService/utils.d.ts +4 -0
  52. package/rest/query/operations/query.js +1 -1
  53. package/support/basemapUtils.js +1 -1
  54. package/support/revision.js +1 -1
  55. package/versionManagement/VersionManagementService.d.ts +4 -0
  56. package/versionManagement/VersionManagementService.js +1 -1
  57. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  58. package/views/2d/engine/webgl/Overlay.js +1 -1
  59. package/views/2d/input/handlers/KeyPan.js +1 -1
  60. package/views/2d/interactive/editingTools/manipulations/DragManipulation.js +1 -1
  61. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  62. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  63. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  64. package/views/3d/layers/I3SMeshView3D.js +1 -1
  65. package/views/3d/layers/MediaLayerView3D.js +1 -1
  66. package/views/3d/layers/SceneLayerWorker.js +1 -1
  67. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  68. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  69. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  70. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  71. package/views/3d/support/MemoryController.js +1 -1
  72. package/views/3d/support/PBFDecoder.js +1 -1
  73. package/views/3d/support/ResourceController.js +1 -1
  74. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  75. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  76. package/views/3d/webgl-engine/core/FBOPool.js +5 -0
  77. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -6
  78. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  79. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  80. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  81. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  82. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  83. package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
  84. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  85. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  86. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  87. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
  88. package/views/draw/DrawOperation.js +1 -1
  89. package/views/draw/support/Reshape.js +1 -1
  90. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  91. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  92. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  93. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  94. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  95. package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
  96. package/widgets/BasemapGallery.js +1 -1
  97. package/widgets/DirectionalPad.js +1 -1
  98. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  99. package/widgets/Editor/EditorViewModel.js +1 -1
  100. package/widgets/Editor/UpdateWorkflow.js +1 -1
  101. package/widgets/Editor/workflowUtils.js +1 -1
  102. package/widgets/FeatureForm.js +1 -1
  103. package/widgets/Features.js +1 -1
  104. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  105. package/widgets/OrientedImageryViewer.js +1 -1
  106. package/widgets/TimeSlider.js +1 -1
  107. package/widgets/TimeZoneLabel.js +1 -1
  108. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  109. package/widgets/UtilityNetworkTrace.js +1 -1
  110. package/assets/esri/core/workers/chunks/00da3c16741a9bc47f3a.js +0 -1
  111. package/assets/esri/core/workers/chunks/0e4646d14fa0775bf463.js +0 -1
  112. package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +0 -1
  113. package/assets/esri/core/workers/chunks/51b8913dff24e693bd25.js +0 -1
  114. package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +0 -1
  115. package/assets/esri/core/workers/chunks/7388fd97e7b1a2142744.js +0 -1
  116. package/assets/esri/core/workers/chunks/92d8f75e616afa5c761e.js +0 -1
  117. package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +0 -1
  118. package/assets/esri/core/workers/chunks/b251d8a856dc8b9406e0.js +0 -1
  119. package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +0 -1
  120. package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +0 -1
  121. package/assets/esri/core/workers/chunks/fc95b1a36ed68b851400.js +0 -1
  122. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +0 -4
  123. package/widgets/DirectionalPad.d.ts +0 -4
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8062,8008],{7335:(e,a,r)=>{r.d(a,{L:()=>n});var t=r(96187);class n{constructor(){this._serviceMetadatas=new Map}async fetchServiceMetadata(e,a){const r=this._serviceMetadatas.get(e);if(r)return r;const n=await(0,t.T)(e,a);return this._serviceMetadatas.set(e,n),n}}},71592:(e,a,r)=>{r.d(a,{w:()=>y});var t=r(40330),n=r(3172),i=r(20102),l=r(95330),s=r(66677),o=r(48522),c=r(15235);async function y(e,a){const r=(0,s.Qc)(e);if(!r)throw new i.Z("invalid-url","Invalid scene service url");const y={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(y.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.r9)(e)}return null}(e);null!=i&&(r.portal=new o.Z({url:i}));try{return r.load({signal:e.signal})}catch(e){return(0,l.r9)(e),null}}(y),null==y.sceneLayerItem)return d(y.sceneServerUrl.replace("/SceneServer","/FeatureServer"),y);const p=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,l.r9)(e),null}}(y);if(!p?.url)throw new i.Z("related-service-not-found","Could not find feature service through portal item relationship");const f=await d(p.url,y);return f.portalItem=p,f}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.Z)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,s.Qc)(e);if(!r)throw new i.Z("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,l=a.layerId;if(null==l)return{serverUrl:t};const o=u(a),c=e=>{const r={query:{f:"json"},responseType:"json",authMode:e,signal:a.signal};return(0,n.Z)(t,r)},y=c("anonymous").catch((()=>c("no-prompt"))),[d,p]=await Promise.all([y,o]),f=p?.layers,L=d.data&&d.data.layers;if(!Array.isArray(L))throw new Error("expected layers array");if(Array.isArray(f)){for(let e=0;e<Math.min(f.length,L.length);e++)if(f[e].id===l)return{serverUrl:t,layerId:L[e].id}}else if(null!=l&&l<L.length)return{serverUrl:t,layerId:L[l].id};throw new Error("could not find matching associated sublayer")}},52104:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(96187);async function n(e,a){const r=await(0,t.T)(e,a);r.layers=r.layers.filter(i);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const l=await(0,t.T)(e+"/layers",a);return n.layersJSON={layers:l.layers.filter(i),tables:l.tables},n}function i(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},70024:(e,a,r)=>{r.d(a,{k:()=>M,populateOperationalLayers:()=>y});var t=r(46791),n=(r(80442),r(7335)),i=r(87344),l=r(15235);function s(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var o=r(28008),c=r(40555);async function y(e,a,r){if(!a)return;const t=[];for(const e of a)t.push(g(e,r));const n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",OGCFeatureLayer:"OGCFeatureLayer",BuildingSceneLayer:"BuildingSceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",GeoJSON:"GeoJSONLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer",KML:"KMLLayer",RasterDataLayer:"UnsupportedLayer",Voxel:"VoxelLayer",LineOfSightLayer:"LineOfSightLayer"},d={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISFeatureLayer:"FeatureLayer"},f={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",DefaultTileLayer:"TileLayer"},L={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoRSS:"GeoRSSLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={ArcGISFeatureLayer:"FeatureLayer"},w={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},S={...L,LinkChartLayer:"LinkChartLayer"},h={...m},I={...w};async function g(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await M(t,a,r):v(a)?function(e,a,r){a.itemId&&(e.portalItem=new l.default({id:a.itemId,portal:r?.portal}),e.when((()=>{const t=t=>{const n=t.layerId;G(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)})))}(t,a,r.context):b(a)&&await async function(e,a,r){const t=i.T.FeatureLayer,n=await t(),l=a.featureCollection,s=l?.showLegend,o=l?.layers?.map(((t,i)=>{const l=new n;l.read(t,r);const o={...r,ignoreDefaults:!0};return G(l,e,a,i,o),null!=s&&l.read({showLegend:s},o),l}));e.layers.addMany(o??[])}(t,a,r.context)),await(0,c.y)(t,r.context),t}(await async function(e,a){const r=a.context,t=T(r);let c=e.layerType||e.type;!c&&a?.defaultLayerType&&(c=a.defaultLayerType);const y=t[c];let u=y?i.T[y]:i.T.UnknownLayer;if(v(e)){const a=r?.portal;if(e.itemId){const r=new l.default({id:e.itemId,portal:a});await r.load();const t=(await(0,o.v)(r,new n.L)).className||"UnknownLayer";u=i.T[t]}}else"ArcGISFeatureLayer"===c?function(e){return s(e,"notes")}(e)||function(e){return s(e,"markup")}(e)?u=i.T.MapNotesLayer:function(e){return s(e,"route")}(e)?u=i.T.RouteLayer:b(e)&&(u=i.T.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.T.WMTSLayer:"WFS"===c&&"2.0.0"!==e.wfsInfo?.version&&(u=i.T.UnsupportedLayer);return u()}(e,a),e,a)}function b(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function T(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=f;break;case"ground":a=d;break;case"tables":a=p;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=I;break;case"tables":a=h;break;default:a=S}break;default:switch(e.layerContainerType){case"basemap":a=w;break;case"tables":a=m;break;default:a=L}}return a}async function M(e,a,r){const n=new t.Z,i=y(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},87344:(e,a,r)=>{r.d(a,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(8153)]).then(r.bind(r,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(6170),r.e(1767),r.e(4681),r.e(3554)]).then(r.bind(r,30223))).default,CSVLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(7587)]).then(r.bind(r,45425))).default,DimensionLayer:async()=>(await Promise.all([r.e(163),r.e(9717)]).then(r.bind(r,40081))).default,ElevationLayer:async()=>(await Promise.all([r.e(163),r.e(6569),r.e(9016),r.e(2763)]).then(r.bind(r,65665))).default,FeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(447)]).then(r.bind(r,19238))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(8621)]).then(r.bind(r,23477))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(6e3)]).then(r.bind(r,3723))).default,GroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9059)]).then(r.bind(r,40504))).default,ImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(4599),r.e(6610),r.e(1319),r.e(4608)]).then(r.bind(r,60590))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(6610),r.e(4136),r.e(1319),r.e(9532)]).then(r.bind(r,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(163),r.e(1767),r.e(1537)]).then(r.bind(r,9310))).default,KMLLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(1423),r.e(6413)]).then(r.bind(r,42756))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(163),r.e(4998)]).then(r.bind(r,21786))).default,LinkChartLayer:async()=>(await Promise.all([r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(6404),r.e(8968),r.e(3794),r.e(5129)]).then(r.bind(r,19087))).default,MapImageLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4599),r.e(9735),r.e(2725),r.e(7374)]).then(r.bind(r,27374))).default,MapNotesLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(6618)]).then(r.bind(r,62128))).default,MediaLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4828)]).then(r.bind(r,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(3966),r.e(3809)]).then(r.bind(r,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(6237)]).then(r.bind(r,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(178)]).then(r.bind(r,44958))).default,PointCloudLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(1767),r.e(7863)]).then(r.bind(r,10608))).default,RouteLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(1423),r.e(9206)]).then(r.bind(r,40153))).default,SceneLayer:async()=>(await Promise.all([r.e(163),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6170),r.e(1767),r.e(4681),r.e(299)]).then(r.bind(r,57476))).default,StreamLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(3847)]).then(r.bind(r,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4680),r.e(7157),r.e(7701)]).then(r.bind(r,20697))).default,TileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4599),r.e(9735),r.e(9016),r.e(2725),r.e(8636)]).then(r.bind(r,98636))).default,UnknownLayer:async()=>(await r.e(4166).then(r.bind(r,44166))).default,UnsupportedLayer:async()=>(await r.e(9296).then(r.bind(r,39296))).default,VectorTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9016),r.e(4325),r.e(9805),r.e(5481)]).then(r.bind(r,94756))).default,VoxelLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(1767),r.e(7528)]).then(r.bind(r,28865))).default,WFSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(8089),r.e(5245)]).then(r.bind(r,12653))).default,WMSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7915)]).then(r.bind(r,25906))).default,WMTSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(2594)]).then(r.bind(r,72594))).default,WebTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971)]).then(r.bind(r,16199))).default}},33516:(e,a,r)=>{r.d(a,{M4:()=>o,Yv:()=>l,ht:()=>i,wk:()=>s});var t=r(17452),n=r(48522);function i(e){return{origin:"portal-item",url:(0,t.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,t.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}function s(e){return{origin:"web-map",url:(0,t.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"web-map",messages:[],writtenProperties:[],url:e.itemUrl?(0,t.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}},18062:(e,a,r)=>{r.d(a,{load:()=>m});var t=r(20102),n=r(31263),i=r(66677),l=r(52104),s=r(7335),o=r(70024),c=r(87344),y=r(48522),u=r(33516),d=r(3072),p=r(14661),f=r(40555),L=r(96187);async function m(e,a){const r=e.instance.portalItem;if(r?.id)return await r.load(a),function(e){const a=e.instance.portalItem;if(!a?.type||!e.supportedTypes.includes(a.type))throw new t.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:a?.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,a){const r=e.instance,i=r.portalItem;if(!i)return;const{url:c,title:y}=i,m=(0,u.ht)(i);if("group"===r.type)return async function(e,a,r){const i=e.portalItem;if(e.originIdOf("portalItem")!==n.s3.USER)return;const{title:c,type:y}=i;if("Group Layer"===y){if(!(0,p._$)(i,"Map"))throw new t.Z("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return async function(e){const a=e.portalItem,r=await a.fetchData("json");if(!r)return;const t=(0,u.wk)(a);e.read(r,t),await(0,o.k)(e,r,{context:t})}(e)}return e.read({title:c},a),async function(e,a){let r;const{portalItem:n}=e;if(!n)return;const i=n.type,o=a.layerModuleTypeMap;switch(i){case"Feature Service":case"Feature Collection":r=o.FeatureLayer;break;case"Stream Service":r=o.StreamLayer;break;case"Scene Service":r=o.SceneLayer;break;default:throw new t.Z("portal:unsupported-item-type-as-group",`The item type '${i}' is not supported as a 'IGroupLayer'`)}const c=new s.L;let[y,u]=await Promise.all([r(),h(a,c)]),p=()=>y;if("Feature Service"===i){u=n.url?await(0,d.$O)(u,n.url,c):{};const a=(0,d.XX)(u),r=(0,d._Y)(u),t=[];if(a.length||r?.length){a.length&&t.push("SubtypeGroupLayer"),r?.length&&t.push("OrientedImageryLayer");const e=[];for(const a of t){const r=o[a];e.push(r())}const n=await Promise.all(e),i=new Map;t.forEach(((e,a)=>{i.set(e,n[a])})),p=e=>e.layerType?i.get(e.layerType)??y:y}const i=await async function(e){const{layersJSON:a}=await(0,l.V)(e);if(!a)return null;const r=[...a.layers,...a.tables];return e=>r.find((a=>a.id===e.id))}(n.url);return await w(e,p,u,i)}return"Scene Service"===i&&n.url&&(u=await(0,d.CD)(n,u,c)),(0,d.Q4)(u)>0?await w(e,p,u):await async function(e,a){const{portalItem:r}=e;if(!r?.url)return;const t=await(0,L.T)(r.url);t&&w(e,a,{layers:t.layers?.map(d.bS),tables:t.tables?.map(d.bS)})}(e,p)}(e,r)}(r,m,e);c&&r.read({url:c},m);const S=new s.L,I=await h(e,S,a);return I&&r.read(I,m),r.resourceReferences={portalItem:i,paths:m.readResourcePaths??[]},"subtype-group"!==r.type&&r.read({title:y},m),(0,f.y)(r,m)}(e,a)}async function w(e,a,r,t){let n=r.layers||[];const i=r.tables||[];if("Feature Collection"===e.portalItem?.type?(n.forEach(((e,a)=>{e.id=a,"Table"===e?.layerDefinition?.type&&i.push(e)})),n=n.filter((e=>"Table"!==e?.layerDefinition?.type))):(n.reverse(),i.reverse()),n.forEach((n=>{const i=t?.(n);if(i||!t){const t=S(e,a(n),r,n,i);e.add(t)}})),i.length){const a=await c.T.FeatureLayer();i.forEach((n=>{const i=t?.(n);if(i||!t){const t=S(e,a,r,n,i);e.tables.add(t)}}))}}function S(e,a,r,t,n){const i=e.portalItem,l={portalItem:i.clone(),layerId:t.id};null!=t.url&&(l.url=t.url);const s=new a(l);if("sourceJSON"in s&&(s.sourceJSON=n),"subtype-group"!==s.type&&(s.sublayerTitleMode="service-name"),"Feature Collection"===i.type){const e={origin:"portal-item",portal:i.portal||y.Z.getDefault()};s.read(t,e);const a=r.showLegend;null!=a&&s.read({showLegend:a},e)}return s}async function h(e,a,r){if(!1===e.supportsData)return;const t=e.instance,n=t.portalItem;if(!n)return;let l=null;try{l=await n.fetchData("json",r)}catch(e){}if(function(e){return"stream"!==e.type&&"layerId"in e}(t)){let e=null;const r=await async function(e,a,r){if(a?.layers&&a?.tables)return(0,d.Q4)(a);const t=(0,i.Qc)(e.url);if(!t)return 1;const n=await r.fetchServiceMetadata(t.url.path).catch((()=>null));return(a?.layers?.length??n?.layers?.length??0)+(a?.tables?.length??n?.tables?.length??0)}(n,l,a);if((l?.layers||l?.tables)&&r>0){if(null==t.layerId){const e=(0,d.XX)(l);t.layerId="subtype-group"===t.type?e?.[0]:(0,d.Ok)(l)}e=function(e,a){const{layerId:r}=a,t=e.layers?.find((e=>e.id===r))||e.tables?.find((e=>e.id===r));return t&&function(e,a){return!("feature"===a.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===a.type&&!("layerType"in e))}(t,a)?t:null}(l,t),e&&null!=l.showLegend&&(e.showLegend=l.showLegend)}return r>1&&"sublayerTitleMode"in t&&"service-name"!==t.sublayerTitleMode&&(t.sublayerTitleMode="item-title-and-service-name"),e}return l}},3072:(e,a,r)=>{r.d(a,{$O:()=>i,CD:()=>y,Ok:()=>l,Q4:()=>s,XX:()=>o,_Y:()=>c,bS:()=>n});var t=r(71592);function n(e){const a={id:e.id,name:e.name};return"Oriented Imagery Layer"===e.type&&(a.layerType="OrientedImageryLayer"),a}async function i(e,a,r){if(null==e?.layers||null==e?.tables){const t=await r.fetchServiceMetadata(a);(e=e||{}).layers=e.layers||t?.layers?.map(n),e.tables=e.tables||t?.tables?.map(n)}return e}function l(e){const a=e.layers;if(a?.length)return a[0].id;const r=e.tables;return r?.length?r[0].id:null}function s(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function o(e){const a=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&a.push(e.id)})),a}function c(e){return e?.layers?.filter((({layerType:e})=>"OrientedImageryLayer"===e)).map((({id:e})=>e))}async function y(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){const t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(n)}const{serverUrl:i,portalItem:l}=await(0,t.w)(e.url,{sceneLayerItem:e}).catch((()=>({serverUrl:null,portalItem:null})));if(null==i)return a.tables=[],a;if(!a.tables&&l){const e=await l.fetchData();if(e?.tables)a.tables=e.tables.map(n);else{const e=await r.fetchServiceMetadata(i);a.tables=e?.tables?.map(n)}}if(a.tables)for(const e of a.tables)e.url=`${i}/${e.id}`;return a}},28008:(e,a,r)=>{r.d(a,{fromItem:()=>u,v:()=>d});var t=r(20102),n=r(71592),i=r(7335),l=r(84230),s=r(87344),o=r(15235),c=r(3072),y=r(14661);async function u(e){!e.portalItem||e.portalItem instanceof o.default||(e={...e,portalItem:new o.default(e.portalItem)});const a=await async function(e){await e.load();const a=new i.L;return async function(e){const a=e.className,r=s.T[a];return{constructor:await r(),properties:e.properties}}(await d(e,a))}(e.portalItem);return new(0,a.constructor)({portalItem:e.portalItem,...a.properties})}async function d(e,a){switch(e.type){case"Map Service":return async function(e,a){return await async function(e,a){return(await a.fetchServiceMetadata(e.url)).tileInfo}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Feature Service":return async function(e,a){const r=await p(e,a);if("object"==typeof r){const e={};return null!=r.id&&(e.layerId=r.id),{className:r.className||"FeatureLayer",properties:e}}return{className:"GroupLayer"}}(e,a);case"Feature Collection":return async function(e){await e.load();const a=(0,y._$)(e,"Map Notes"),r=(0,y._$)(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if((0,y._$)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,c.Q4)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return async function(e,a){const r=await p(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:r}=await(0,n.w)(e.url,{sceneLayerItem:e}),t=await a.fetchServiceMetadata(r);return t?.tables??[]}catch{return[]}}));if("object"==typeof r){const t={};let n;if(null!=r.id?(t.layerId=r.id,n=`${e.url}/layers/${r.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.fb))if(e.typeKeywords.includes(a))return{className:l.fb[a]};const i=await a.fetchServiceMetadata(n);return{className:l.fb[i?.layerType]||"SceneLayer",properties:t}}if(!1===r){const r=await a.fetchServiceMetadata(e.url);if("Voxel"===r?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Image Service":return async function(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await e.fetchData(),n=t?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url),l=i.cacheType?.toLowerCase(),s=i.capabilities?.toLowerCase().includes("tilesonly");return"map"===l||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"Stream Service":case"Feed":return{className:"StreamLayer"};case"Vector Tile Service":return{className:"VectorTileLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"CSV":return{className:"CSVLayer"};case"KML":return{className:"KMLLayer"};case"WFS":return{className:"WFSLayer"};case"WMTS":return{className:"WMTSLayer"};case"WMS":return{className:"WMSLayer"};case"Group Layer":return{className:"GroupLayer"};default:throw new t.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e,a,r){const t=e.url;if(!t||/\/\d+$/.test(t))return{};await e.load();let n=await e.fetchData();if("Feature Service"===e.type){const e=await(0,c.$O)(n,t,a),r=f(e);if("object"==typeof r){const a=(0,c.XX)(e),t=(0,c._Y)(e);r.className=null!=r.id&&a.includes(r.id)?"SubtypeGroupLayer":null!=r.id&&t?.includes(r.id)?"OrientedImageryLayer":"FeatureLayer"}return r}if("Scene Service"===e.type&&(n=await(0,c.CD)(e,n,a)),(0,c.Q4)(n)>0)return f(n);const i=await a.fetchServiceMetadata(t);return r&&(i.tables=await r()),f(i)}function f(e){return 1===(0,c.Q4)(e)&&{id:(0,c.Ok)(e)}}},40555:(e,a,r)=>{r.d(a,{y:()=>l});var t=r(66643),n=r(95330),i=r(20941);async function l(e,a,r){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,t.q6)(l.populateFromStyle());if((0,n.k_)(r),!1===s.ok){const r=s.error;a?.messages&&a.messages.push(new i.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},96187:(e,a,r)=>{r.d(a,{T:()=>n});var t=r(3172);async function n(e,a){const{data:r}=await(0,t.Z)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8062,8008],{7335:(e,a,r)=>{r.d(a,{L:()=>n});var t=r(96187);class n{constructor(){this._serviceMetadatas=new Map}async fetchServiceMetadata(e,a){const r=this._serviceMetadatas.get(e);if(r)return r;const n=await(0,t.T)(e,a);return this._serviceMetadatas.set(e,n),n}}},71592:(e,a,r)=>{r.d(a,{w:()=>y});var t=r(40330),n=r(3172),i=r(20102),l=r(95330),s=r(66677),o=r(48522),c=r(15235);async function y(e,a){const r=(0,s.Qc)(e);if(!r)throw new i.Z("invalid-url","Invalid scene service url");const y={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(y.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.r9)(e)}return null}(e);null!=i&&(r.portal=new o.Z({url:i}));try{return r.load({signal:e.signal})}catch(e){return(0,l.r9)(e),null}}(y),null==y.sceneLayerItem)return d(y.sceneServerUrl.replace("/SceneServer","/FeatureServer"),y);const p=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,l.r9)(e),null}}(y);if(!p?.url)throw new i.Z("related-service-not-found","Could not find feature service through portal item relationship");const f=await d(p.url,y);return f.portalItem=p,f}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.Z)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,s.Qc)(e);if(!r)throw new i.Z("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,l=a.layerId;if(null==l)return{serverUrl:t};const o=u(a),c=e=>{const r={query:{f:"json"},responseType:"json",authMode:e,signal:a.signal};return(0,n.Z)(t,r)},y=c("anonymous").catch((()=>c("no-prompt"))),[d,p]=await Promise.all([y,o]),f=p?.layers,L=d.data&&d.data.layers;if(!Array.isArray(L))throw new Error("expected layers array");if(Array.isArray(f)){for(let e=0;e<Math.min(f.length,L.length);e++)if(f[e].id===l)return{serverUrl:t,layerId:L[e].id}}else if(null!=l&&l<L.length)return{serverUrl:t,layerId:L[l].id};throw new Error("could not find matching associated sublayer")}},52104:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(96187);async function n(e,a){const r=await(0,t.T)(e,a);r.layers=r.layers.filter(i);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const l=await(0,t.T)(e+"/layers",a);return n.layersJSON={layers:l.layers.filter(i),tables:l.tables},n}function i(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},70024:(e,a,r)=>{r.d(a,{k:()=>M,populateOperationalLayers:()=>y});var t=r(46791),n=(r(80442),r(7335)),i=r(87344),l=r(15235);function s(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var o=r(28008),c=r(40555);async function y(e,a,r){if(!a)return;const t=[];for(const e of a)t.push(g(e,r));const n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",OGCFeatureLayer:"OGCFeatureLayer",BuildingSceneLayer:"BuildingSceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",GeoJSON:"GeoJSONLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer",KML:"KMLLayer",RasterDataLayer:"UnsupportedLayer",Voxel:"VoxelLayer",LineOfSightLayer:"LineOfSightLayer"},d={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISFeatureLayer:"FeatureLayer"},f={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",DefaultTileLayer:"TileLayer"},L={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoRSS:"GeoRSSLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={ArcGISFeatureLayer:"FeatureLayer"},w={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},S={...L,LinkChartLayer:"LinkChartLayer"},h={...m},I={...w};async function g(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await M(t,a,r):v(a)?function(e,a,r){a.itemId&&(e.portalItem=new l.default({id:a.itemId,portal:r?.portal}),e.when((()=>{const t=t=>{const n=t.layerId;G(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)})))}(t,a,r.context):b(a)&&await async function(e,a,r){const t=i.T.FeatureLayer,n=await t(),l=a.featureCollection,s=l?.showLegend,o=l?.layers?.map(((t,i)=>{const l=new n;l.read(t,r);const o={...r,ignoreDefaults:!0};return G(l,e,a,i,o),null!=s&&l.read({showLegend:s},o),l}));e.layers.addMany(o??[])}(t,a,r.context)),await(0,c.y)(t,r.context),t}(await async function(e,a){const r=a.context,t=T(r);let c=e.layerType||e.type;!c&&a?.defaultLayerType&&(c=a.defaultLayerType);const y=t[c];let u=y?i.T[y]:i.T.UnknownLayer;if(v(e)){const a=r?.portal;if(e.itemId){const r=new l.default({id:e.itemId,portal:a});await r.load();const t=(await(0,o.v)(r,new n.L)).className||"UnknownLayer";u=i.T[t]}}else"ArcGISFeatureLayer"===c?function(e){return s(e,"notes")}(e)||function(e){return s(e,"markup")}(e)?u=i.T.MapNotesLayer:function(e){return s(e,"route")}(e)?u=i.T.RouteLayer:b(e)&&(u=i.T.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.T.WMTSLayer:"WFS"===c&&"2.0.0"!==e.wfsInfo?.version&&(u=i.T.UnsupportedLayer);return u()}(e,a),e,a)}function b(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function T(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=f;break;case"ground":a=d;break;case"tables":a=p;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=I;break;case"tables":a=h;break;default:a=S}break;default:switch(e.layerContainerType){case"basemap":a=w;break;case"tables":a=m;break;default:a=L}}return a}async function M(e,a,r){const n=new t.Z,i=y(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},87344:(e,a,r)=>{r.d(a,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(8153)]).then(r.bind(r,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(6170),r.e(1767),r.e(4681),r.e(3554)]).then(r.bind(r,30223))).default,CSVLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(7587)]).then(r.bind(r,45425))).default,DimensionLayer:async()=>(await Promise.all([r.e(163),r.e(9717)]).then(r.bind(r,40081))).default,ElevationLayer:async()=>(await Promise.all([r.e(163),r.e(6569),r.e(9016),r.e(2763)]).then(r.bind(r,65665))).default,FeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(447)]).then(r.bind(r,19238))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(8621)]).then(r.bind(r,23477))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(6e3)]).then(r.bind(r,3723))).default,GroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9059)]).then(r.bind(r,40504))).default,ImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(4599),r.e(6610),r.e(1319),r.e(4608)]).then(r.bind(r,60590))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(6610),r.e(4136),r.e(1319),r.e(9532)]).then(r.bind(r,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(163),r.e(1767),r.e(1537)]).then(r.bind(r,9310))).default,KMLLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(1423),r.e(6413)]).then(r.bind(r,42756))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(163),r.e(4998)]).then(r.bind(r,21786))).default,LinkChartLayer:async()=>(await Promise.all([r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(6404),r.e(8968),r.e(3794),r.e(5129)]).then(r.bind(r,19087))).default,MapImageLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4599),r.e(9735),r.e(2725),r.e(7374)]).then(r.bind(r,27374))).default,MapNotesLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(6618)]).then(r.bind(r,62128))).default,MediaLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4828)]).then(r.bind(r,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(3966),r.e(3809)]).then(r.bind(r,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(6237)]).then(r.bind(r,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(178)]).then(r.bind(r,44958))).default,PointCloudLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(1767),r.e(7863)]).then(r.bind(r,10608))).default,RouteLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(1423),r.e(9206)]).then(r.bind(r,40153))).default,SceneLayer:async()=>(await Promise.all([r.e(163),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6170),r.e(1767),r.e(4681),r.e(299)]).then(r.bind(r,57476))).default,StreamLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(3847)]).then(r.bind(r,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4680),r.e(7157),r.e(7701)]).then(r.bind(r,20697))).default,TileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4599),r.e(9735),r.e(9016),r.e(2725),r.e(8636)]).then(r.bind(r,98636))).default,UnknownLayer:async()=>(await r.e(4166).then(r.bind(r,44166))).default,UnsupportedLayer:async()=>(await r.e(9296).then(r.bind(r,39296))).default,VectorTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9016),r.e(4325),r.e(9805),r.e(5481)]).then(r.bind(r,94756))).default,VoxelLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(1767),r.e(7528)]).then(r.bind(r,28865))).default,WFSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6569),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(8089),r.e(5245)]).then(r.bind(r,12653))).default,WMSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7915)]).then(r.bind(r,25906))).default,WMTSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(2594)]).then(r.bind(r,72594))).default,WebTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971)]).then(r.bind(r,16199))).default}},33516:(e,a,r)=>{r.d(a,{M4:()=>o,Yv:()=>l,ht:()=>i,wk:()=>s});var t=r(17452),n=r(48522);function i(e){return{origin:"portal-item",url:(0,t.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e){const a=(0,t.mN)(e.itemUrl);return{origin:"portal-item",messages:[],writtenProperties:[],url:a,portal:e.portal||n.Z.getDefault(),portalItem:e,verifyItemRelativeUrls:a?{rootPath:a.path,writtenUrls:[]}:null,blockedRelativeUrls:[]}}function s(e){return{origin:"web-map",url:(0,t.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e,a){const r=(0,t.mN)(e.itemUrl);return{origin:"web-map",messages:[],writtenProperties:[],url:r,portal:e.portal||n.Z.getDefault(),portalItem:e,initiator:a,verifyItemRelativeUrls:r?{rootPath:r.path,writtenUrls:[]}:null,blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}}},18062:(e,a,r)=>{r.d(a,{load:()=>L});var t=r(20102),n=r(66677),i=r(52104),l=r(7335),s=r(70024),o=r(87344),c=r(48522),y=r(33516),u=r(3072),d=r(14661),p=r(40555),f=r(96187);async function L(e,a){const r=e.instance.portalItem;if(r?.id)return await r.load(a),function(e){const a=e.instance.portalItem;if(!a?.type||!e.supportedTypes.includes(a.type))throw new t.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:a?.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,a){const r=e.instance,n=r.portalItem;if(!n)return;const{url:o,title:c}=n,L=(0,y.ht)(n);if("group"===r.type)return async function(e,a,r){const n=e.portalItem;if(!e.sourceIsPortalItem)return;const{title:o,type:c}=n;if("Group Layer"===c){if(!(0,d._$)(n,"Map"))throw new t.Z("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return async function(e){const a=e.portalItem,r=await a.fetchData("json");if(!r)return;const t=(0,y.wk)(a);e.read(r,t),await(0,s.k)(e,r,{context:t}),e.resourceReferences={portalItem:a,paths:t.readResourcePaths??[]}}(e)}return e.read({title:o},a),async function(e,a){let r;const{portalItem:n}=e;if(!n)return;const s=n.type,o=a.layerModuleTypeMap;switch(s){case"Feature Service":case"Feature Collection":r=o.FeatureLayer;break;case"Stream Service":r=o.StreamLayer;break;case"Scene Service":r=o.SceneLayer;break;default:throw new t.Z("portal:unsupported-item-type-as-group",`The item type '${s}' is not supported as a 'IGroupLayer'`)}const c=new l.L;let[y,d]=await Promise.all([r(),S(a,c)]),p=()=>y;if("Feature Service"===s){d=n.url?await(0,u.$O)(d,n.url,c):{};const a=(0,u.XX)(d),r=(0,u._Y)(d),t=[];if(a.length||r?.length){a.length&&t.push("SubtypeGroupLayer"),r?.length&&t.push("OrientedImageryLayer");const e=[];for(const a of t){const r=o[a];e.push(r())}const n=await Promise.all(e),i=new Map;t.forEach(((e,a)=>{i.set(e,n[a])})),p=e=>e.layerType?i.get(e.layerType)??y:y}const l=await async function(e){const{layersJSON:a}=await(0,i.V)(e);if(!a)return null;const r=[...a.layers,...a.tables];return e=>r.find((a=>a.id===e.id))}(n.url);return await m(e,p,d,l)}return"Scene Service"===s&&n.url&&(d=await(0,u.CD)(n,d,c)),(0,u.Q4)(d)>0?await m(e,p,d):await async function(e,a){const{portalItem:r}=e;if(!r?.url)return;const t=await(0,f.T)(r.url);t&&m(e,a,{layers:t.layers?.map(u.bS),tables:t.tables?.map(u.bS)})}(e,p)}(e,r)}(r,L,e);o&&r.read({url:o},L);const w=new l.L,h=await S(e,w,a);return h&&r.read(h,L),r.resourceReferences={portalItem:n,paths:L.readResourcePaths??[]},"subtype-group"!==r.type&&r.read({title:c},L),(0,p.y)(r,L)}(e,a)}async function m(e,a,r,t){let n=r.layers||[];const i=r.tables||[];if("Feature Collection"===e.portalItem?.type?(n.forEach(((e,a)=>{e.id=a,"Table"===e?.layerDefinition?.type&&i.push(e)})),n=n.filter((e=>"Table"!==e?.layerDefinition?.type))):(n.reverse(),i.reverse()),n.forEach((n=>{const i=t?.(n);if(i||!t){const t=w(e,a(n),r,n,i);e.add(t)}})),i.length){const a=await o.T.FeatureLayer();i.forEach((n=>{const i=t?.(n);if(i||!t){const t=w(e,a,r,n,i);e.tables.add(t)}}))}}function w(e,a,r,t,n){const i=e.portalItem,l={portalItem:i.clone(),layerId:t.id};null!=t.url&&(l.url=t.url);const s=new a(l);if("sourceJSON"in s&&(s.sourceJSON=n),"subtype-group"!==s.type&&(s.sublayerTitleMode="service-name"),"Feature Collection"===i.type){const e={origin:"portal-item",portal:i.portal||c.Z.getDefault()};s.read(t,e);const a=r.showLegend;null!=a&&s.read({showLegend:a},e)}return s}async function S(e,a,r){if(!1===e.supportsData)return;const t=e.instance,i=t.portalItem;if(!i)return;let l=null;try{l=await i.fetchData("json",r)}catch(e){}if(function(e){return"stream"!==e.type&&"layerId"in e}(t)){let e=null;const r=await async function(e,a,r){if(a?.layers&&a?.tables)return(0,u.Q4)(a);const t=(0,n.Qc)(e.url);if(!t)return 1;const i=await r.fetchServiceMetadata(t.url.path).catch((()=>null));return(a?.layers?.length??i?.layers?.length??0)+(a?.tables?.length??i?.tables?.length??0)}(i,l,a);if((l?.layers||l?.tables)&&r>0){if(null==t.layerId){const e=(0,u.XX)(l);t.layerId="subtype-group"===t.type?e?.[0]:(0,u.Ok)(l)}e=function(e,a){const{layerId:r}=a,t=e.layers?.find((e=>e.id===r))||e.tables?.find((e=>e.id===r));return t&&function(e,a){return!("feature"===a.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===a.type&&!("layerType"in e))}(t,a)?t:null}(l,t),e&&null!=l.showLegend&&(e.showLegend=l.showLegend)}return r>1&&"sublayerTitleMode"in t&&"service-name"!==t.sublayerTitleMode&&(t.sublayerTitleMode="item-title-and-service-name"),e}return l}},3072:(e,a,r)=>{r.d(a,{$O:()=>i,CD:()=>y,Ok:()=>l,Q4:()=>s,XX:()=>o,_Y:()=>c,bS:()=>n});var t=r(71592);function n(e){const a={id:e.id,name:e.name};return"Oriented Imagery Layer"===e.type&&(a.layerType="OrientedImageryLayer"),a}async function i(e,a,r){if(null==e?.layers||null==e?.tables){const t=await r.fetchServiceMetadata(a);(e=e||{}).layers=e.layers||t?.layers?.map(n),e.tables=e.tables||t?.tables?.map(n)}return e}function l(e){const a=e.layers;if(a?.length)return a[0].id;const r=e.tables;return r?.length?r[0].id:null}function s(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function o(e){const a=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&a.push(e.id)})),a}function c(e){return e?.layers?.filter((({layerType:e})=>"OrientedImageryLayer"===e)).map((({id:e})=>e))}async function y(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){const t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(n)}const{serverUrl:i,portalItem:l}=await(0,t.w)(e.url,{sceneLayerItem:e}).catch((()=>({serverUrl:null,portalItem:null})));if(null==i)return a.tables=[],a;if(!a.tables&&l){const e=await l.fetchData();if(e?.tables)a.tables=e.tables.map(n);else{const e=await r.fetchServiceMetadata(i);a.tables=e?.tables?.map(n)}}if(a.tables)for(const e of a.tables)e.url=`${i}/${e.id}`;return a}},28008:(e,a,r)=>{r.d(a,{fromItem:()=>u,v:()=>d});var t=r(20102),n=r(71592),i=r(7335),l=r(84230),s=r(87344),o=r(15235),c=r(3072),y=r(14661);async function u(e){!e.portalItem||e.portalItem instanceof o.default||(e={...e,portalItem:new o.default(e.portalItem)});const a=await async function(e){await e.load();const a=new i.L;return async function(e){const a=e.className,r=s.T[a];return{constructor:await r(),properties:e.properties}}(await d(e,a))}(e.portalItem);return new(0,a.constructor)({portalItem:e.portalItem,...a.properties})}async function d(e,a){switch(e.type){case"Map Service":return async function(e,a){return await async function(e,a){return(await a.fetchServiceMetadata(e.url)).tileInfo}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Feature Service":return async function(e,a){const r=await p(e,a);if("object"==typeof r){const e={};return null!=r.id&&(e.layerId=r.id),{className:r.className||"FeatureLayer",properties:e}}return{className:"GroupLayer"}}(e,a);case"Feature Collection":return async function(e){await e.load();const a=(0,y._$)(e,"Map Notes"),r=(0,y._$)(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if((0,y._$)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,c.Q4)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return async function(e,a){const r=await p(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:r}=await(0,n.w)(e.url,{sceneLayerItem:e}),t=await a.fetchServiceMetadata(r);return t?.tables??[]}catch{return[]}}));if("object"==typeof r){const t={};let n;if(null!=r.id?(t.layerId=r.id,n=`${e.url}/layers/${r.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.fb))if(e.typeKeywords.includes(a))return{className:l.fb[a]};const i=await a.fetchServiceMetadata(n);return{className:l.fb[i?.layerType]||"SceneLayer",properties:t}}if(!1===r){const r=await a.fetchServiceMetadata(e.url);if("Voxel"===r?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Image Service":return async function(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await e.fetchData(),n=t?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url),l=i.cacheType?.toLowerCase(),s=i.capabilities?.toLowerCase().includes("tilesonly");return"map"===l||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"Stream Service":case"Feed":return{className:"StreamLayer"};case"Vector Tile Service":return{className:"VectorTileLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"CSV":return{className:"CSVLayer"};case"KML":return{className:"KMLLayer"};case"WFS":return{className:"WFSLayer"};case"WMTS":return{className:"WMTSLayer"};case"WMS":return{className:"WMSLayer"};case"Group Layer":return{className:"GroupLayer"};default:throw new t.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e,a,r){const t=e.url;if(!t||/\/\d+$/.test(t))return{};await e.load();let n=await e.fetchData();if("Feature Service"===e.type){const e=await(0,c.$O)(n,t,a),r=f(e);if("object"==typeof r){const a=(0,c.XX)(e),t=(0,c._Y)(e);r.className=null!=r.id&&a.includes(r.id)?"SubtypeGroupLayer":null!=r.id&&t?.includes(r.id)?"OrientedImageryLayer":"FeatureLayer"}return r}if("Scene Service"===e.type&&(n=await(0,c.CD)(e,n,a)),(0,c.Q4)(n)>0)return f(n);const i=await a.fetchServiceMetadata(t);return r&&(i.tables=await r()),f(i)}function f(e){return 1===(0,c.Q4)(e)&&{id:(0,c.Ok)(e)}}},40555:(e,a,r)=>{r.d(a,{y:()=>l});var t=r(66643),n=r(95330),i=r(20941);async function l(e,a,r){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,t.q6)(l.populateFromStyle());if((0,n.k_)(r),!1===s.ok){const r=s.error;a?.messages&&a.messages.push(new i.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},96187:(e,a,r)=>{r.d(a,{T:()=>n});var t=r(3172);async function n(e,a){const{data:r}=await(0,t.Z)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4680,5935],{84552:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(43697),o=i(2368),n=i(96674),s=i(35463),l=i(5600),a=(i(75215),i(67676),i(80442),i(36030)),p=i(52011),d=i(78981);let u=class extends((0,o.J)(n.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.rJ)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,a.J)(d.v,{nonNullable:!0})],u.prototype,"unit",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,r._)([(0,p.j)("esri.TimeInterval")],u);const c=u},41123:(e,t,i)=>{i.d(t,{D:()=>o,z:()=>n});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o()}}`}},90100:(e,t,i)=>{i.d(t,{Z:()=>Ue});var r,o=i(43697),n=i(96674),s=i(22974),l=i(5600),a=i(90578),p=i(71715),d=i(52011),u=i(30556),c=i(75215);i(67676),i(80442);let y=r=class extends n.wq{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new r({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"expression",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,o._)([(0,l.Cb)({type:["boolean","date","number","string"],json:{write:!0}})],y.prototype,"returnType",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"title",void 0),y=r=(0,o._)([(0,d.j)("esri.form.ExpressionInfo")],y);const h=y;let m=class extends n.wq{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"description",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"label",void 0),(0,o._)([(0,l.Cb)()],m.prototype,"type",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"visibilityExpression",void 0),m=(0,o._)([(0,d.j)("esri.form.elements.Element")],m);const f=m;var b;let v=b=class extends n.wq{constructor(e){super(e),this.type=null}clone(){return new b({type:this.type})}};(0,o._)([(0,l.Cb)({type:["attachment","audio","document","image","signature","video"],json:{write:!0}})],v.prototype,"type",void 0),v=b=(0,o._)([(0,d.j)("esri.form.elements.inputs.AttachmentInput")],v);const w=v;var g;let _=g=class extends f{constructor(e){super(e),this.attachmentKeyword=null,this.editableExpression=null,this.input=null,this.type="attachment"}clone(){return new g({attachmentKeyword:this.attachmentKeyword,description:this.description,editableExpression:this.editableExpression,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],_.prototype,"attachmentKeyword",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],_.prototype,"editableExpression",void 0),(0,o._)([(0,l.Cb)({type:w,json:{read:{source:"inputType"},write:{target:"inputType"}}})],_.prototype,"input",void 0),(0,o._)([(0,l.Cb)({type:["attachment"],json:{read:!1,write:!0}})],_.prototype,"type",void 0),_=g=(0,o._)([(0,d.j)("esri.form.elements.AttachmentElement")],_);const x=_;var C=i(60235),j=i(92604);let I=class extends n.wq{constructor(e){super(e),this.type=null}};(0,o._)([(0,l.Cb)()],I.prototype,"type",void 0),I=(0,o._)([(0,d.j)("esri.form.elements.inputs.Input")],I);const S=I;let F=class extends S{constructor(e){super(e),this.maxLength=null,this.minLength=0}};(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],F.prototype,"maxLength",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],F.prototype,"minLength",void 0),F=(0,o._)([(0,d.j)("esri.form.elements.inputs.TextInput")],F);const E=F;var M;let T=M=class extends E{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new M({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,l.Cb)({type:["barcode-scanner"],json:{read:!1,write:!0}})],T.prototype,"type",void 0),T=M=(0,o._)([(0,d.j)("esri.form.elements.inputs.BarcodeScannerInput")],T);const O=T;var R;let U=R=class extends S{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="combo-box"}clone(){return new R({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"noValueOptionLabel",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"showNoValueOption",void 0),(0,o._)([(0,l.Cb)({type:["combo-box"],json:{read:!1,write:!0}})],U.prototype,"type",void 0),U=R=(0,o._)([(0,d.j)("esri.form.elements.inputs.ComboBoxInput")],U);const V=U;var Z;function A(e){return null!=e?e:null}function k(e){return null!=e?e:null}let D=Z=class extends S{constructor(e){super(e),this.max=null,this.min=null,this.type="date-picker"}readMax(e,t){return A(t.max)}writeMax(e,t){t.max=k(e)}readMin(e,t){return A(t.min)}writeMin(e,t){t.min=k(e)}clone(){return new Z({max:this.max,min:this.min})}};(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],D.prototype,"max",void 0),(0,o._)([(0,p.r)("max")],D.prototype,"readMax",null),(0,o._)([(0,u.c)("max")],D.prototype,"writeMax",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],D.prototype,"min",void 0),(0,o._)([(0,p.r)("min")],D.prototype,"readMin",null),(0,o._)([(0,u.c)("min")],D.prototype,"writeMin",null),(0,o._)([(0,l.Cb)({type:["date-picker"],json:{read:!1,write:!0}})],D.prototype,"type",void 0),D=Z=(0,o._)([(0,d.j)("esri.form.elements.inputs.DatePickerInput")],D);const N=D;var L;function q(e){return null!=e?e:null}function B(e){return null!=e?e:null}let P=L=class extends S{constructor(e){super(e),this.includeTimeOffset=!0,this.max=null,this.min=null,this.timeResolution="minutes",this.type="datetimeoffset-picker"}readMax(e,t){return q(t.max)}writeMax(e,t){t.max=B(e)}readMin(e,t){return q(t.min)}writeMin(e,t){t.min=B(e)}readTimeResolution(e,t){return q(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=B(e)}clone(){return new L({includeTimeOffset:this.includeTimeOffset,max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"includeTimeOffset",void 0),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],P.prototype,"max",void 0),(0,o._)([(0,p.r)("max")],P.prototype,"readMax",null),(0,o._)([(0,u.c)("max")],P.prototype,"writeMax",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],P.prototype,"min",void 0),(0,o._)([(0,p.r)("min")],P.prototype,"readMin",null),(0,o._)([(0,u.c)("min")],P.prototype,"writeMin",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],P.prototype,"timeResolution",void 0),(0,o._)([(0,p.r)("timeResolution")],P.prototype,"readTimeResolution",null),(0,o._)([(0,u.c)("timeResolution")],P.prototype,"writeTimeResolution",null),(0,o._)([(0,l.Cb)({type:["datetimeoffset-picker"],json:{read:!1,write:!0}})],P.prototype,"type",void 0),P=L=(0,o._)([(0,d.j)("esri.form.elements.inputs.DateTimeOffsetPickerInput")],P);const G=P;var H;function J(e){return null!=e?new Date(e):null}function Q(e){return e?e.getTime():null}let W=H=class extends S{constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return J(t.max)}writeMax(e,t){t.max=Q(e)}readMin(e,t){return J(t.min)}writeMin(e,t){t.min=Q(e)}clone(){return new H({includeTime:this.includeTime,max:this.max,min:this.min})}};(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],W.prototype,"includeTime",void 0),(0,o._)([(0,l.Cb)({type:Date,json:{type:Number,write:!0}})],W.prototype,"max",void 0),(0,o._)([(0,p.r)("max")],W.prototype,"readMax",null),(0,o._)([(0,u.c)("max")],W.prototype,"writeMax",null),(0,o._)([(0,l.Cb)({type:Date,json:{type:Number,write:!0}})],W.prototype,"min",void 0),(0,o._)([(0,p.r)("min")],W.prototype,"readMin",null),(0,o._)([(0,u.c)("min")],W.prototype,"writeMin",null),(0,o._)([(0,l.Cb)({type:["datetime-picker"],json:{read:!1,write:!0}})],W.prototype,"type",void 0),W=H=(0,o._)([(0,d.j)("esri.form.elements.inputs.DateTimePickerInput")],W);const $=W;var z;let X=z=class extends S{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="radio-buttons"}clone(){return new z({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],X.prototype,"noValueOptionLabel",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],X.prototype,"showNoValueOption",void 0),(0,o._)([(0,l.Cb)({type:["radio-buttons"],json:{read:!1,write:!0}})],X.prototype,"type",void 0),X=z=(0,o._)([(0,d.j)("esri.form.elements.inputs.RadioButtonsInput")],X);const K=X;var Y;let ee=Y=class extends S{constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new Y({offValue:this.offValue,onValue:this.onValue})}};(0,o._)([(0,l.Cb)({type:[String,Number],json:{write:!0}})],ee.prototype,"offValue",void 0),(0,o._)([(0,l.Cb)({type:[String,Number],json:{write:!0}})],ee.prototype,"onValue",void 0),(0,o._)([(0,l.Cb)({type:["switch"],json:{read:!1,write:!0}})],ee.prototype,"type",void 0),ee=Y=(0,o._)([(0,d.j)("esri.form.elements.inputs.SwitchInput")],ee);const te=ee;var ie;let re=ie=class extends E{constructor(e){super(e),this.type="text-area"}clone(){return new ie({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,l.Cb)({type:["text-area"],json:{read:!1,write:!0}})],re.prototype,"type",void 0),re=ie=(0,o._)([(0,d.j)("esri.form.elements.inputs.TextAreaInput")],re);const oe=re;var ne;let se=ne=class extends E{constructor(e){super(e),this.type="text-box"}clone(){return new ne({maxLength:this.maxLength,minLength:this.minLength})}};(0,o._)([(0,l.Cb)({type:["text-box"],json:{read:!1,write:!0}})],se.prototype,"type",void 0),se=ne=(0,o._)([(0,d.j)("esri.form.elements.inputs.TextBoxInput")],se);const le=se;var ae;function pe(e){return null!=e?e:null}function de(e){return null!=e?e:null}let ue=ae=class extends S{constructor(e){super(e),this.max=null,this.min=null,this.timeResolution="minutes",this.type="time-picker"}readMax(e,t){return pe(t.max)}writeMax(e,t){t.max=de(e)}readMin(e,t){return pe(t.min)}writeMin(e,t){t.min=de(e)}readTimeResolution(e,t){return pe(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=de(e)}clone(){return new ae({max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],ue.prototype,"max",void 0),(0,o._)([(0,p.r)("max")],ue.prototype,"readMax",null),(0,o._)([(0,u.c)("max")],ue.prototype,"writeMax",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],ue.prototype,"min",void 0),(0,o._)([(0,p.r)("min")],ue.prototype,"readMin",null),(0,o._)([(0,u.c)("min")],ue.prototype,"writeMin",null),(0,o._)([(0,l.Cb)({type:String,json:{type:String,write:!0}})],ue.prototype,"timeResolution",void 0),(0,o._)([(0,p.r)("timeResolution")],ue.prototype,"readTimeResolution",null),(0,o._)([(0,u.c)("timeResolution")],ue.prototype,"writeTimeResolution",null),(0,o._)([(0,l.Cb)({type:["time-picker"],json:{read:!1,write:!0}})],ue.prototype,"type",void 0),ue=ae=(0,o._)([(0,d.j)("esri.form.elements.inputs.TimePickerInput")],ue);const ce={base:S,key:"type",typeMap:{"barcode-scanner":O,"combo-box":V,"date-picker":N,"datetime-picker":$,"datetimeoffset-picker":G,"radio-buttons":K,switch:te,"text-area":oe,"text-box":le,"time-picker":ue}};var ye,he=i(72729);const me="esri.form.elements.FieldElement",fe=j.Z.getLogger(me);let be=ye=class extends f{constructor(e){super(e),this.domain=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}get editable(){return(0,C.Mr)(fe,"editable",{replacement:"editableExpression",version:"4.26",warnOnce:!0}),this._get("editable")??!0}set editable(e){(0,C.Mr)(fe,"editable",{replacement:"editableExpression",version:"4.26",warnOnce:!0}),this._set("editable",e)}clone(){return new ye({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,l.Cb)({types:he.V5,json:{read:{reader:he.im},write:!0}})],be.prototype,"domain",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],be.prototype,"editable",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],be.prototype,"editableExpression",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],be.prototype,"fieldName",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],be.prototype,"hint",void 0),(0,o._)([(0,l.Cb)({types:ce,json:{read:{source:"inputType"},write:{target:"inputType"}}})],be.prototype,"input",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],be.prototype,"requiredExpression",void 0),(0,o._)([(0,l.Cb)({type:String,json:{read:!1,write:!0}})],be.prototype,"type",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],be.prototype,"valueExpression",void 0),be=ye=(0,o._)([(0,d.j)(me)],be);const ve=be;var we,ge=i(44729);let _e=we=class extends f{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editableExpression=null,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new we({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editableExpression:this.editableExpression,label:this.label,orderByFields:(0,s.d9)(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],_e.prototype,"displayCount",void 0),(0,o._)([(0,l.Cb)({type:["list"],json:{write:!0}})],_e.prototype,"displayType",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],_e.prototype,"editableExpression",void 0),(0,o._)([(0,l.Cb)({type:[ge.Z],json:{write:!0}})],_e.prototype,"orderByFields",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],_e.prototype,"relationshipId",void 0),(0,o._)([(0,l.Cb)({type:["relationship"],json:{read:!1,write:!0}})],_e.prototype,"type",void 0),_e=we=(0,o._)([(0,d.j)("esri.form.elements.RelationshipElement")],_e);const xe=_e;function Ce(e){return{typesWithGroup:{base:f,key:"type",typeMap:{attachment:x,field:ve,group:e,relationship:xe}},typesWithoutGroup:{base:f,key:"type",typeMap:{attachment:x,field:ve,relationship:xe}}}}function je(e,t,i=!0){if(!e)return null;const r=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>r[e.type])).map((e=>r[e.type].fromJSON(e)))}function Ie(e,t,i=!0){if(!e)return null;const r=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>r[e.type])).map((e=>e.toJSON()))}function Se(e,t,i=!0){return e?e.map((e=>(0,c.N7)(i?t.typesWithGroup:t.typesWithoutGroup,e))):null}var Fe;let Ee=Fe=class extends f{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return Se(e,Me,!1)}readElements(e,t){return je(t.formElements,Me,!1)}writeElements(e,t){t.formElements=Ie(e,Me,!1)}clone(){return new Fe({description:this.description,elements:(0,s.d9)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,o._)([(0,l.Cb)({json:{write:!0}})],Ee.prototype,"elements",void 0),(0,o._)([(0,a.p)("elements")],Ee.prototype,"castElements",null),(0,o._)([(0,p.r)("elements",["formElements"])],Ee.prototype,"readElements",null),(0,o._)([(0,u.c)("elements")],Ee.prototype,"writeElements",null),(0,o._)([(0,l.Cb)({type:["collapsed","expanded"],json:{write:!0}})],Ee.prototype,"initialState",void 0),(0,o._)([(0,l.Cb)({type:String,json:{read:!1,write:!0}})],Ee.prototype,"type",void 0),Ee=Fe=(0,o._)([(0,d.j)("esri.form.elements.GroupElement")],Ee);const Me=Ce(Ee);var Te;const Oe=Ce(Ee);let Re=Te=class extends n.wq{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(e){return Se(e,Oe)}readElements(e,t){return je(t.formElements,Oe)}writeElements(e,t){t.formElements=Ie(e,Oe)}clone(){return new Te({description:this.description,expressionInfos:(0,s.d9)(this.expressionInfos),elements:(0,s.d9)(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],Re.prototype,"description",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],Re.prototype,"elements",void 0),(0,o._)([(0,a.p)("elements")],Re.prototype,"castElements",null),(0,o._)([(0,p.r)("elements",["formElements"])],Re.prototype,"readElements",null),(0,o._)([(0,u.c)("elements")],Re.prototype,"writeElements",null),(0,o._)([(0,l.Cb)({type:[h],json:{write:!0}})],Re.prototype,"expressionInfos",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{default:!1,write:!0}})],Re.prototype,"preserveFieldValuesWhenHidden",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],Re.prototype,"title",void 0),Re=Te=(0,o._)([(0,d.j)("esri.form.FormTemplate")],Re);const Ue=Re},79235:(e,t,i)=>{i.d(t,{Z:()=>w});var r,o=i(43697),n=i(67676),s=i(35454),l=i(96674),a=i(67900),p=i(20941),d=i(5600),u=(i(75215),i(80442),i(71715)),c=i(52011),y=i(30556);const h=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=h.jsonValues.slice();(0,n.e$)(m,"orthometric");const f=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let b=r=class extends l.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return h.write(e,t,i)}readHeightModel(e,t,i){return h.read(e)||(i?.messages&&i.messages.push(function(e,t){return new p.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,a.$C)(e)||f.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,a.cM)(t);return new r({heightModel:e.heightModel,heightUnit:i,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new p.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,d.Cb)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],b.prototype,"heightModel",void 0),(0,o._)([(0,y.c)("web-scene","heightModel")],b.prototype,"writeHeightModel",null),(0,o._)([(0,u.r)(["web-scene","service"],"heightModel")],b.prototype,"readHeightModel",null),(0,o._)([(0,d.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],b.prototype,"heightUnit",void 0),(0,o._)([(0,u.r)("web-scene","heightUnit")],b.prototype,"readHeightUnit",null),(0,o._)([(0,u.r)("service","heightUnit")],b.prototype,"readHeightUnitService",null),(0,o._)([(0,d.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],b.prototype,"vertCRS",void 0),(0,o._)([(0,u.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],b.prototype,"readVertCRS",null),b=r=(0,o._)([(0,c.j)("esri.geometry.HeightModelInfo")],b);const w=b},66361:(e,t,i)=>{i.d(t,{jF:()=>d,lQ:()=>y,o1:()=>f});var r=i(43697),o=i(32448),n=i(22974),s=i(95330),l=(i(92604),i(75215),i(20102),i(80442),i(52011)),a=i(18596);const p=new o.Z.EventEmitter;function d(e,t,i=null,r=!1){const o=(0,s.hh)();return r=null==t||r,p.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:i,mayReceiveServiceEdits:r,result:o.promise}),o}const u="esri.layers.mixins.EditBusLayer",c=Symbol(u);function y(e){return null!=e&&"object"==typeof e&&c in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,i){const r=new URL(e).host,o=a.Jp.get(r),n=e=>!e||e===o;return n(t)&&n(i)||t===i}const f=e=>{var t;let i=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:i,gdbVersion:r,mayReceiveServiceEdits:o,result:s}=e,l=t===this.url,p=null!=i&&null!=this.layerId&&i===this.layerId,d=h(this),u=h(this)&&m(t,r,this.gdbVersion);if(!l||d&&!u||!p&&!o)return;const c=s.then((e=>{if(p&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.d9)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:i,updates:r,deletes:o}=t.editedFeatures,s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:i?i.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:o?o.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:r?r.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.d9)(e.historicMoment)};return this.emit("edits",s),s}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.d9)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,a.JV)(t,r)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:i,moment:r}=e,o=t===this.url,n=h(this),s=h(this)&&m(t,i,this.gdbVersion),l=h(this)&&!m(t,this.gdbVersion,null);o&&n&&s&&l&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then((()=>{this.addHandles(function(e){return p.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return p.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=c,i=(0,r._)([(0,l.j)(u)],i),i}},25113:(e,t,i)=>{i.d(t,{B:()=>k});var r=i(43697),o=i(46791),n=i(22974),s=i(92604),l=i(5600),a=(i(75215),i(71715)),p=i(52011),d=i(30556),u=i(82960),c=i(6570),y=i(79235),h=i(82971),m=i(66677),f=i(21506),b=i(2368),v=i(96674),w=(i(67676),i(80442),i(25031));let g=class extends((0,b.J)(v.wq)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,r._)([(0,l.Cb)()],g.prototype,"creatorField",void 0),(0,r._)([(0,l.Cb)()],g.prototype,"creationDateField",void 0),(0,r._)([(0,l.Cb)()],g.prototype,"editorField",void 0),(0,r._)([(0,l.Cb)()],g.prototype,"editDateField",void 0),(0,r._)([(0,l.Cb)()],g.prototype,"realm",void 0),(0,r._)([(0,l.Cb)((0,w.mi)("dateFieldsTimeReference",!0))],g.prototype,"timeZone",void 0),g=(0,r._)([(0,p.j)("esri.layers.support.EditFieldsInfo")],g);const _=g;let x=class extends((0,b.J)(v.wq)){constructor(e){super(e)}};(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"name",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"fields",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"isAscending",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"indexType",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"isUnique",void 0),(0,r._)([(0,l.Cb)({constructOnly:!0,json:{write:!0}})],x.prototype,"description",void 0),x=(0,r._)([(0,p.j)("esri.layers.support.FeatureIndex")],x);var C=i(45574),j=i(67900);let I=class extends((0,b.J)(v.wq)){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:{source:"shapeAreaFieldName"}}})],I.prototype,"shapeAreaField",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:{source:"shapeLengthFieldName"}}})],I.prototype,"shapeLengthField",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:e=>j.gV.read(e)||j.Jo.read(e)}})],I.prototype,"units",void 0),I=(0,r._)([(0,p.j)("esri.layers.support.GeometryFieldsInfo")],I);const S=I;var F=i(56765),E=i(35454);const M=new E.X({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),T=new E.X({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let O=class extends((0,b.J)(v.wq)){constructor(e){super(e),this.cardinality=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,r._)([(0,l.Cb)({json:{read:M.read,write:M.write}})],O.prototype,"cardinality",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"composite",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"id",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"keyField",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"keyFieldInRelationshipTable",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"name",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"relatedTableId",void 0),(0,r._)([(0,l.Cb)({json:{read:!0,write:!0}})],O.prototype,"relationshipTableId",void 0),(0,r._)([(0,l.Cb)({json:{read:T.read,write:T.write}})],O.prototype,"role",void 0),O=(0,r._)([(0,p.j)("esri.layers.support.Relationship")],O);const R=O;var U=i(54275),V=i(72729);let Z=class extends((0,b.J)(v.wq)){constructor(e){super(e),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const t={};for(const i of Object.keys(e))t[i]=(0,V.im)(e[i]);return t}writeDomains(e,t){if(!e)return;const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Z.prototype,"code",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],Z.prototype,"defaultValues",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Z.prototype,"domains",void 0),(0,r._)([(0,a.r)("domains")],Z.prototype,"readDomains",null),(0,r._)([(0,d.c)("domains")],Z.prototype,"writeDomains",null),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Z.prototype,"name",void 0),Z=(0,r._)([(0,p.j)("esri.layers.support.Subtype")],Z);const A=Z,k=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(o.Z.ofType(x)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=h.Z.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:r}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(r.supportsUpdateByOthers&&r.supportsUpdateByAnonymous&&r.supportsDeleteByOthers&&r.supportsDeleteByAnonymous))return"load"}return this.userHasUpdateItemPrivileges?(0,C.uA)(this)?"load":this.hasUpdateItemRestrictions?e.operations.supportsQuery?"editing":"load":null:this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions?"editing":null}readCapabilitiesFromService(e,t){return(0,U.h)(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=(0,n.d9)(e),{operations:i,editing:r}=t;return this.sourceJSON?.isMultiServicesView?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=r.supportsDeleteByOthers=r.supportsGeometryUpdate=r.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=r.supportsGeometryUpdate=!0),t)}readGlobalIdFieldFromService(e,t){return(0,C.rk)(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||this.sourceJSON?.isMultiServicesView)return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return this.sourceJSON?.isMultiServicesView?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return(0,C.kZ)(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}set url(e){const t=(0,m.XG)({layer:this,url:e,nonStandardUrlAllowed:!0,logger:s.Z.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,i,r){(0,m.wH)(this,e,null,t,r)}readVersion(e,t){return(0,C.JY)(t)}};return(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"authenticationTriggerEvent",null),(0,r._)([(0,l.Cb)({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],t.prototype,"capabilities",void 0),(0,r._)([(0,a.r)("service","capabilities")],t.prototype,"readCapabilitiesFromService",null),(0,r._)([(0,l.Cb)((0,w.mi)("dateFieldsTimeReference"))],t.prototype,"dateFieldsTimeZone",void 0),(0,r._)([(0,l.Cb)({type:Boolean})],t.prototype,"datesInUnknownTimezone",void 0),(0,r._)([(0,l.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,l.Cb)({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],t.prototype,"displayField",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:_})],t.prototype,"editFieldsInfo",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"editingInfo",void 0),(0,r._)([(0,a.r)("editingInfo")],t.prototype,"readEditingInfo",null),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"effectiveCapabilities",null),(0,r._)([(0,l.Cb)((()=>{const e=(0,n.d9)(f.PV),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],t.prototype,"elevationInfo",void 0),(0,r._)([(0,l.Cb)({type:F.Z,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"floorInfo",void 0),(0,r._)([(0,l.Cb)({type:c.Z,json:{origins:{service:{read:{source:"extent"}}}}})],t.prototype,"fullExtent",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"gdbVersion",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:S,json:{read:{source:"geometryProperties"}}})],t.prototype,"geometryFieldsInfo",void 0),(0,r._)([(0,l.Cb)({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:C.Fr.read}}}})],t.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)({type:String})],t.prototype,"globalIdField",void 0),(0,r._)([(0,a.r)("service","globalIdField",["globalIdField","fields"])],t.prototype,"readGlobalIdFieldFromService",null),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"hasFullEditingRestrictions",null),(0,r._)([(0,l.Cb)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasM",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"hasUpdateItemRestrictions",null),(0,r._)([(0,l.Cb)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasZ",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:y.Z})],t.prototype,"heightModelInfo",void 0),(0,r._)([(0,l.Cb)({type:Date})],t.prototype,"historicMoment",void 0),(0,r._)([(0,l.Cb)({type:o.Z.ofType(x),readOnly:!0})],t.prototype,"indexes",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"isTable",void 0),(0,r._)([(0,a.r)("service","isTable",["type"])],t.prototype,"readIsTableFromService",null),(0,r._)([(0,l.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],t.prototype,"layerId",void 0),(0,r._)([(0,l.Cb)(f.u1)],t.prototype,"maxScale",void 0),(0,r._)([(0,a.r)("service","maxScale",["maxScale","effectiveMaxScale"])],t.prototype,"readMaxScale",null),(0,r._)([(0,l.Cb)(f.rO)],t.prototype,"minScale",void 0),(0,r._)([(0,a.r)("service","minScale",["minScale","effectiveMinScale"])],t.prototype,"readMinScale",null),(0,r._)([(0,l.Cb)({type:String})],t.prototype,"objectIdField",void 0),(0,r._)([(0,a.r)("service","objectIdField",["objectIdField","fields"])],t.prototype,"readObjectIdFieldFromService",null),(0,r._)([(0,l.Cb)((0,w.mi)("preferredTimeReference"))],t.prototype,"preferredTimeZone",void 0),(0,r._)([(0,l.Cb)({type:[R],readOnly:!0})],t.prototype,"relationships",void 0),(0,r._)([(0,l.Cb)({type:Boolean})],t.prototype,"returnM",void 0),(0,r._)([(0,l.Cb)({type:Boolean})],t.prototype,"returnZ",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,json:{write:!1}})],t.prototype,"serverGens",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"serviceDefinitionExpression",void 0),(0,r._)([(0,a.r)("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],t.prototype,"readServiceDefinitionExpression",null),(0,r._)([(0,l.Cb)({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"serviceItemId",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,l.Cb)({type:h.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],t.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],t.prototype,"subtypeField",void 0),(0,r._)([(0,l.Cb)({type:[A],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"subtypes",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],t.prototype,"trackIdField",void 0),(0,r._)([(0,l.Cb)(f.HQ)],t.prototype,"url",null),(0,r._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,r._)([(0,l.Cb)({json:{origins:{service:{read:!0}},read:!1}})],t.prototype,"version",void 0),(0,r._)([(0,a.r)("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],t.prototype,"readVersion",null),t=(0,r._)([(0,p.j)("esri.layers.mixins.FeatureLayerBase")],t),t}},28294:(e,t,i)=>{i.d(t,{n:()=>c});var r=i(43697),o=i(92835),n=i(84552),s=i(5600),l=(i(75215),i(67676),i(80442),i(71715)),a=i(52011),p=i(35671),d=i(76259),u=i(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,o=u.v.fromJSON(i.timeOffsetUnits);return r&&o?new n.Z({value:r,unit:o}):null}set timeInfo(e){(0,p.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,s.Cb)({type:o.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,s.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,r._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,s.Cb)({value:null,type:d.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,s.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},76259:(e,t,i)=>{i.d(t,{Z:()=>m});var r=i(43697),o=i(92835),n=i(84552),s=i(2368),l=i(96674),a=i(5600),p=(i(75215),i(67676),i(80442),i(71715)),d=i(52011),u=i(30556),c=i(25031);function y(e,t){return n.Z.fromJSON({value:e,unit:t})}let h=class extends((0,s.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const i=new Date(t.timeExtent[0]),r=new Date(t.timeExtent[1]);return new o.Z({start:i,end:r})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,r._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,r._)([(0,a.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,r._)([(0,p.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,r._)([(0,u.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,r._)([(0,a.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,r._)([(0,p.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,r._)([(0,u.c)("interval")],h.prototype,"writeInterval",null),(0,r._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,r._)([(0,a.Cb)((0,c.mi)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,r._)([(0,d.j)("esri.layers.support.TimeInfo")],h);const m=h},45574:(e,t,i)=>{i.d(t,{JD:()=>w,Jj:()=>x,sX:()=>N,Ob:()=>q,rP:()=>U,FV:()=>j,nU:()=>D,Ci:()=>I,Fr:()=>v,HW:()=>P,gG:()=>R,uA:()=>B,SU:()=>S,KE:()=>M,VG:()=>E,tD:()=>F,kp:()=>T,C9:()=>O,rk:()=>V,kZ:()=>Z,JY:()=>A,Y5:()=>_,uj:()=>C});var r=i(40330),o=i(9790),n=i(66643),s=i(20102),l=i(35454),a=i(42033),p=i(63213),d=i(14165);async function u(e,t,i){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=c(e));const r=function(e){return c(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),o=e.capabilities.query.supportsPagination;t.start=0,t.num=r;let n=null;for(;;){const s=await e.source.queryFeaturesJSON(t,i);if(null==n?n=s:n.features=n.features.concat(s.features),n.exceededTransferLimit=s.exceededTransferLimit,!o||!s.exceededTransferLimit)break;t.start+=r}return n}function c(e){return e.capabilities.query.supportsMaxRecordCountFactor?d.Z.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=i(84230),h=i(84382),m=i(81571),f=i(56545),b=i(75935);const v=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function w(e,t,i,r){const o=await k(e);if(await g(e,t,r),!o.addAttachment)throw new s.Z(r,"Layer source does not support addAttachment capability");return o.addAttachment(t,i)}function g(e,t,i){const{attributes:r}=t,{objectIdField:o}=e;return e.capabilities?.data?.supportsAttachment?t?r?o&&r[o]?Promise.resolve():Promise.reject(new s.Z(i,`feature is missing the identifying attribute ${o}`)):Promise.reject(new s.Z(i,"'attributes' are required on a feature to query attachments")):Promise.reject(new s.Z(i,"A feature is required to add/delete/update attachments")):Promise.reject(new s.Z(i,"this layer doesn't support attachments"))}async function _(e,t,i,r,o){const n=await k(e);if(await g(e,t,o),!n.updateAttachment)throw new s.Z(o,"Layer source does not support updateAttachment capability");return n.updateAttachment(t,i,r)}async function x(e,t,r){const{applyEdits:o}=await i.e(4720).then(i.bind(i,14720)),n=await e.load(),{source:s,globalIdField:l}=n;let a=r;return("feature"===n.type?n.infoFor3D:null)&&null!=t.deleteFeatures&&null!=l&&(a={...a,globalIdToObjectId:await P(e,t.deleteFeatures,l)}),o(n,s,t,r)}async function C(e,t,r){const{uploadAssets:o}=await i.e(4720).then(i.bind(i,14720)),n=await e.load();return o(n,n.source,t,r)}async function j(e,t,i,r){const o=await k(e);if(await g(e,t,r),!o.deleteAttachments)throw new s.Z(r,"Layer source does not support deleteAttachments capability");return o.deleteAttachments(t,i)}async function I(e,t,i){const r=(await e.load({signal:t?.signal})).source;if(!r.fetchRecomputedExtents)throw new s.Z(i,"Layer source does not support fetchUpdates capability");return r.fetchRecomputedExtents(t)}async function S(e,t,i,r){t=f.Z.from(t),await e.load();const o=e.source,n=e.capabilities;if(!n?.data?.supportsAttachment)throw new s.Z(r,"this layer doesn't support attachments");const{attachmentTypes:l,objectIds:a,globalIds:p,num:d,size:u,start:c,where:y}=t;if(!n?.operations?.supportsQueryAttachments&&(l?.length>0||p?.length>0||u?.length>0||d||c||y))throw new s.Z(r,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(a?.length||p?.length||y))throw new s.Z(r,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!o.queryAttachments)throw new s.Z(r,"Layer source does not support queryAttachments capability",t);return o.queryAttachments(t)}async function F(e,t,i,r){const o=await k(e);if(!o.queryObjectIds)throw new s.Z(r,"Layer source does not support queryObjectIds capability");return o.queryObjectIds(d.Z.from(t)??e.createQuery(),i)}async function E(e,t,i,r){const o=await k(e);if(!o.queryFeatureCount)throw new s.Z(r,"Layer source does not support queryFeatureCount capability");return o.queryFeatureCount(d.Z.from(t)??e.createQuery(),i)}async function M(e,t,i,r){const o=await k(e);if(!o.queryExtent)throw new s.Z(r,"Layer source does not support queryExtent capability");return o.queryExtent(d.Z.from(t)??e.createQuery(),i)}async function T(e,t,i,r){const o=await k(e);if(!o.queryRelatedFeatures)throw new s.Z(r,"Layer source does not support queryRelatedFeatures capability");return o.queryRelatedFeatures(b.default.from(t),i)}async function O(e,t,i,r){const o=await k(e);if(!o.queryRelatedFeaturesCount)throw new s.Z(r,"Layer source does not support queryRelatedFeaturesCount capability");return o.queryRelatedFeaturesCount(b.default.from(t),i)}async function R(e){const t=e.source;if(t?.refresh)try{const{dataChanged:i,updates:r}=await t.refresh();if(null!=r&&(e.sourceJSON={...e.sourceJSON,...r},e.read(r,{origin:"service",url:e.parsedUrl})),i)return!0}catch{}if(e.definitionExpression)try{return(await(0,a.E)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function U(e){const t=new d.Z,i=e.capabilities?.data,r=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference),i&&(i.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),i.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:o,timeExtent:n}=e;return t.timeExtent=null!=o&&null!=n?n.offset(-o.value,o.unit):n||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function V(e){const{globalIdField:t,fields:i}=e;if(t)return t;if(i)for(const e of i)if("esriFieldTypeGlobalID"===e.type)return e.name}function Z(e){const{objectIdField:t,fields:i}=e;if(t)return t;if(i)for(const e of i)if("esriFieldTypeOID"===e.type)return e.name}function A(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function k(e){return(await e.load()).source}async function D(e,t,i){const o=e.parsedUrl?.path;o&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!r.id)return;if(r.id.findCredential(e))return;let i;try{const o=await(0,y.oP)(e,t);o&&(i=await r.id.checkSignInStatus(`${o}/sharing`))}catch(e){}if(i)try{const i=null!=t?t.signal:null;await r.id.getCredential(e,{signal:i})}catch(e){}}(o,i)}function N(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const L=(0,p.d)({types:o.QT});function q(e,t){if(e.defaultSymbol)return e.types?.length?new m.Z({defaultSymbol:L(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:L(e.symbol,e,t)})))}):new h.Z({symbol:L(e.defaultSymbol,e,t)})}function B(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const i=e.editingInfo?.lastEditDate?.getTime();return null==i||(t*=1e3,Date.now()-i<t)}async function P(e,t,i){if(null==t)return null;const r=[],{objectIdField:o}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[i],objectId:null!=r[o]&&-1!==r[o]?r[o]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||r.push(t.globalId))})),0===r.length)return null;const s=e.createQuery();s.where=r.map((e=>`${i}='${e}'`)).join(" OR "),s.returnGeometry=!1,s.outFields=[o,i],s.cacheHint=!1;const l=await(0,n.mt)(u(e,s));if(!l.ok)return null;const a=new Map,p=l.value.features;for(const e of p){const t=e.attributes[i],r=e.attributes[o];null!=t&&null!=r&&-1!==r&&a.set(t,r)}return a}},53518:(e,t,i)=>{i.d(t,{v:()=>a});var r=i(80442),o=i(92604),n=i(1231),s=i(99514),l=i(35671);function a(){return{fields:{type:[n.Z],value:null,set:function(e){if(e&&(0,r.Z)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");o.Z.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.Z.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||o.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.Q0)(this.fieldsIndex,e)}}}}},60199:(e,t,i)=>{i.d(t,{D:()=>n});var r=i(66677);const o=[];function n(e,t){if((0,r.M8)(e.url??""))return!0;const{wkid:i}=t;for(const t of o){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}o.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),o.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),o.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),o.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),o.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),o.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),o.push([10.61,()=>new Set([102497])]),o.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},78981:(e,t,i)=>{i.d(t,{v:()=>r});const r=(0,i(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},75935:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,o=i(43697),n=(i(66577),i(96674)),s=i(22974),l=i(5600),a=i(75215),p=i(52011),d=i(30556),u=i(10158),c=i(82971);let y=r=class extends n.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new r((0,s.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,o._)([(0,l.Cb)({type:u.n,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,o._)([(0,l.Cb)({type:Date})],y.prototype,"historicMoment",void 0),(0,o._)([(0,d.c)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,o._)([(0,l.Cb)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,o._)([(0,l.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,o._)([(0,l.Cb)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,o._)([(0,l.Cb)({type:c.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,o._)([(0,d.c)("start"),(0,d.c)("num")],y.prototype,"writeStart",null),(0,o._)([(0,l.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,o._)([(0,l.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=r=(0,o._)([(0,p.j)("esri.rest.support.RelationshipQuery")],y),y.from=(0,a.se)(y);const h=y},18596:(e,t,i)=>{i.d(t,{JV:()=>l,Jp:()=>o,Px:()=>s,U8:()=>r});const r=(0,i(41123).z)(),o=new Map,n=new Map;async function s(e,t,o=!1){if(!e||!t)return!0;const s=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),l=n.get(s)?.entries();if(l)for(const[e,n]of l)if(n.name===t){const t=!n.stack?.hasForwardEdits();if(!t&&o){const[{deleteForwardEdits:t},{default:o}]=await Promise.all([i.e(1316).then(i.bind(i,51316)),i.e(4573).then(i.bind(i,84573))]);return t(s,e,new o({sessionId:r,moment:n.moment}))}return t}return!0}function l(e,t){if(!e)return!1;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=n.get(i)?.entries();if(r)for(const[e,i]of r)if(i.name===t)return"edit"===i.lockType;return!1}new Map},12259:(e,t,i)=>{var r;i.d(t,{x:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4330],{65845:(e,t,r)=>{r.d(t,{D:()=>o});var a=r(81153);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},94330:(e,t,r)=>{r.d(t,{save:()=>c,saveAs:()=>m});var a=r(64383),o=r(14661);const i="Stream Service",n="stream-layer-save",l="stream-layer-save-as";function s(e){return{isValid:"stream"===e.type&&!!e.url&&!e.webSocketUrl,errorMessage:"Stream layer should be created using a url to a stream service"}}function u(e){const t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function p(e,t){const{parsedUrl:r,title:a,fullExtent:i}=e;t.url=r.path,t.title||=a,t.extent=null,null!=i&&(t.extent=await(0,o.$o)(i)),(0,o.qj)(t,o.Kz.SINGLE_LAYER)}async function c(e,t){return(0,a.a1)({layer:e,itemType:i,validateLayer:s,createItemData:u,errorNamePrefix:n},t)}async function m(e,t,r){return(0,a.po)({layer:e,itemType:i,validateLayer:s,createItemData:u,errorNamePrefix:l,newItem:t,setItemProperties:p},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>v,po:()=>g});var a=r(20102),o=r(65845),i=r(48522),n=r(15235),l=r(33516),s=r(14661),u=r(14769);async function p(e){const{layer:t,errorNamePrefix:r,validateLayer:o}=e;await t.load(),function(e,t,r){const o=r(e);if(!o.isValid)throw new a.Z(`${t}:invalid-parameters`,o.errorMessage,{layer:e})}(t,r,o)}function c(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function m(e){const{item:t,itemType:r,errorNamePrefix:o,layer:i,validateItem:n}=e;if((0,u.w)(t),t.type!==r)throw new a.Z(`${o}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:t,layer:i});if(n){const e=n(t);if(!e.isValid)throw new a.Z(`${o}:invalid-parameters`,e.errorMessage,{layer:i})}}function d(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:o}=t;if(!o)throw new a.Z(`${r}:portal-item-not-set`,c(t,"requires the portalItem property to be set"));if(!o.loaded)throw new a.Z(`${r}:portal-item-not-loaded`,c(t,"cannot be saved to a portal item that does not exist or is inaccessible"));m({...e,item:o})}function f(e){const{newItem:t,itemType:r}=e;let a=n.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=i.Z.getDefault(),m({...e,item:a}),a}async function y(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const o=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(e.blockedRelativeUrls&&(r=r.concat(e.blockedRelativeUrls.map((e=>new a.Z("url:unsupported",`Relative url '${e}' is not supported`))))),t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),o}function w(e){(0,s.qj)(e,s.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function v(e,t){const{layer:r,createItemData:a,createJSONContext:i,saveResources:n}=e;await p(e),d(e);const s=r.portalItem,u=i?i(s):(0,l.Yv)(s),c=await y(r,u,t),m=await a({layer:r,layerJSON:c},s);return w(s),await s.update({data:m}),(0,o.D)(u),await(n?.(s,u)),s}async function g(e,t){const{layer:r,createItemData:a,createJSONContext:i,setItemProperties:n,saveResources:s}=e;await p(e);const u=f(e),c=i?i(u):(0,l.Yv)(u),m=await y(r,c,t),d=await a({layer:r,layerJSON:m},u);return await n(r,u),w(u),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(u,d,t),r.portalItem=u,(0,o.D)(c),await(s?.(u,c)),u}},33516:(e,t,r)=>{r.d(t,{M4:()=>s,Yv:()=>n,ht:()=>i,wk:()=>l});var a=r(17452),o=r(48522);function i(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||o.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function n(e){const t=(0,a.mN)(e.itemUrl);return{origin:"portal-item",messages:[],writtenProperties:[],url:t,portal:e.portal||o.Z.getDefault(),portalItem:e,verifyItemRelativeUrls:t?{rootPath:t.path,writtenUrls:[]}:null,blockedRelativeUrls:[]}}function l(e){return{origin:"web-map",url:(0,a.mN)(e.itemUrl),portal:e.portal||o.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function s(e,t){const r=(0,a.mN)(e.itemUrl);return{origin:"web-map",messages:[],writtenProperties:[],url:r,portal:e.portal||o.Z.getDefault(),portalItem:e,initiator:t,verifyItemRelativeUrls:r?{rootPath:r.path,writtenUrls:[]}:null,blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}}},14769:(e,t,r)=>{r.d(t,{w:()=>n});var a=r(68773),o=r(20102),i=r(71058);function n(e){if(a.default.apiKey&&(0,i.r)(e.portal.url))throw new o.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);
@@ -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}}]);