@arcgis/core 4.27.0-next.20230419 → 4.27.0-next.20230421

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 (203) hide show
  1. package/WebMap.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/arcadeAsyncRuntime.js +1 -1
  4. package/arcade/arcadeCompiler.js +1 -1
  5. package/arcade/arcadeRuntime.js +1 -1
  6. package/arcade/executionError.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{f64f95623d9296a91f95.js → 059ec6fd9b971de4b4c1.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0d805fd9cd9ff3a636ca.js +1 -0
  10. package/assets/esri/core/workers/chunks/{1fe31a412479815e5e2d.js → 10770939900946feb20d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5252f3cc244204edc299.js → 1216e939d363f96b6cc6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/156dad2b7fed6749bae7.js +1 -0
  13. package/assets/esri/core/workers/chunks/15a97d3e42b00ac42984.js +1 -0
  14. package/assets/esri/core/workers/chunks/{d72c0c97cc4e30f1e4f2.js → 18704903814b9d73c708.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1db5e4c8244dbc21590c.js +1 -0
  16. package/assets/esri/core/workers/chunks/2a1a5a1969e80a10dcca.js +1 -0
  17. package/assets/esri/core/workers/chunks/33b735faa582e6f39e9a.js +1 -0
  18. package/assets/esri/core/workers/chunks/34025ac04ca02531923a.js +1 -0
  19. package/assets/esri/core/workers/chunks/3e9f3479fd8558d9e3e3.js +1 -0
  20. package/assets/esri/core/workers/chunks/{d59274ac695dfcff1143.js → 46090b69e9161bc05141.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{f7aa972cb3903847b3bf.js → 47bf38d910e71ac39bb8.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{3978f4f68ada540ee3a3.js → 4f8a09b61267e5e26712.js} +1 -1
  23. package/assets/esri/core/workers/chunks/5183ecab7eddae7b70e8.js +1 -0
  24. package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js → 51a0d1dabe7415515c77.js} +2 -2
  25. package/assets/esri/core/workers/chunks/541e6efc3b491e507410.js +1 -0
  26. package/assets/esri/core/workers/chunks/588256e65685ff21d2e9.js +1 -0
  27. package/assets/esri/core/workers/chunks/5c64fd3bf057a1a5527f.js +1 -0
  28. package/assets/esri/core/workers/chunks/6047bdaf4855506f8fdb.js +1 -0
  29. package/assets/esri/core/workers/chunks/6adb58f1bffc5d1c03bd.js +1 -0
  30. package/assets/esri/core/workers/chunks/770940417e6ddbdbb9d6.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1c1d8be85297c483a606.js → 77c98121223a144170e3.js} +1 -1
  32. package/assets/esri/core/workers/chunks/80117007d86be4eb3bc3.js +1 -0
  33. package/assets/esri/core/workers/chunks/812cba53143565a825f1.js +1 -0
  34. package/assets/esri/core/workers/chunks/838849b751805615833a.js +1 -0
  35. package/assets/esri/core/workers/chunks/{9ca395f7bc8d397b5240.js → 88197520501fcc20b6e8.js} +1 -1
  36. package/assets/esri/core/workers/chunks/88f9dededcf60fd011ef.js +1 -0
  37. package/assets/esri/core/workers/chunks/88fdd288ef799a7ac48a.js +1 -0
  38. package/assets/esri/core/workers/chunks/8ae7fea9f7fda38dd207.js +1 -0
  39. package/assets/esri/core/workers/chunks/{0d080dd1ca6a71597409.js → 9265d4e9cfab2c7bbce5.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{8d41305509fedb3603ac.js → 94041a9ced04aa281d40.js} +1 -1
  41. package/assets/esri/core/workers/chunks/98540791fcef86069e44.js +1 -0
  42. package/assets/esri/core/workers/chunks/9c1b2f82877ff79969f5.js +1 -0
  43. package/assets/esri/core/workers/chunks/a7b3cd537c9127b5e65e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{3d1c697182237807ab49.js → abea316f2eac0f3086ab.js} +1 -1
  45. package/assets/esri/core/workers/chunks/ad85ade6a2cfb56cf328.js +1 -0
  46. package/assets/esri/core/workers/chunks/b833b4ea2973bb16792e.js +1 -0
  47. package/assets/esri/core/workers/chunks/be4aa835a7abfc809126.js +1 -0
  48. package/assets/esri/core/workers/chunks/c2ec6e904f96173a7b83.js +1 -0
  49. package/assets/esri/core/workers/chunks/{c25aa08b869f2777dc26.js → c4488a8d857c765da30e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/c5c56b6d99db96a6755a.js +2 -0
  51. package/assets/esri/core/workers/chunks/{7f3b0856f594df2b044e.js → c727d38f71e52bee17e1.js} +1 -1
  52. package/assets/esri/core/workers/chunks/cf315d255f0dc8d50f21.js +1 -0
  53. package/assets/esri/core/workers/chunks/cf7676fdc09ad4835680.js +1 -0
  54. package/assets/esri/core/workers/chunks/cfad34c949cbe8a31ef8.js +1 -0
  55. package/assets/esri/core/workers/chunks/{edb4568fe281b5609092.js → d244e50c981146f018d2.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{a2c9cb23f3e35e88da1d.js → d399b1b9cbf0737d1735.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{df7dcd035997881cf2ef.js → d5c8119d6d34628d3126.js} +1 -1
  58. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +1 -0
  59. package/assets/esri/core/workers/chunks/{8dfa32cc8453f85faab0.js → dd1f8bade9c5c3b7929b.js} +1 -1
  60. package/assets/esri/core/workers/chunks/e11e60759821746259c6.js +1 -0
  61. package/assets/esri/core/workers/chunks/{e4b65c5a4575a5c1c49f.js → e356c576f9a7521a49b3.js} +1 -1
  62. package/assets/esri/core/workers/chunks/f02edf71645eb33bf92f.js +1 -0
  63. package/assets/esri/core/workers/chunks/f1a4165c2710ca90e5ea.js +1 -0
  64. package/assets/esri/core/workers/chunks/f57a3ee17869ced3dd33.js +1 -0
  65. package/assets/esri/core/workers/chunks/fc07f6e103d7f69a9909.js +1 -0
  66. package/chunks/WaterSurface.glsl.js +35 -20
  67. package/chunks/index.js +1 -1
  68. package/core/Loadable.js +1 -1
  69. package/core/Promise.js +1 -1
  70. package/core/accessorSupport/ensureType.js +1 -1
  71. package/core/accessorSupport/watch.js +1 -1
  72. package/core/accessorSupport/write.js +1 -1
  73. package/core/promiseUtils.js +1 -1
  74. package/core/watchUtils.js +1 -1
  75. package/core/workers/Connection.js +1 -1
  76. package/core/workers/RemoteClient.js +1 -1
  77. package/core/workers/workerFactory.js +1 -1
  78. package/geometry/support/geodesicUtils.js +1 -1
  79. package/geometry/support/meshUtils/External.js +1 -1
  80. package/geometry/support/meshUtils/Metadata.js +1 -1
  81. package/intl/messages.js +1 -1
  82. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  83. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  84. package/layers/graphics/data/attributeSupport.js +1 -1
  85. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  86. package/layers/mixins/ArcGISMapService.js +1 -1
  87. package/layers/support/PromiseQueue.js +1 -1
  88. package/layers/support/Sublayer.js +1 -1
  89. package/layers/support/TileKey.js +1 -1
  90. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  91. package/networks/Network.js +1 -1
  92. package/package.json +1 -1
  93. package/portal/schemas/definitions.js +1 -1
  94. package/renderers/support/RasterSymbolizer.js +1 -1
  95. package/renderers/support/rasterRendererChecks.js +5 -0
  96. package/renderers/support/rasterRendererHelper.js +1 -1
  97. package/request.js +1 -1
  98. package/rest/query/operations/query.js +1 -1
  99. package/smartMapping/raster/renderers/uniqueValue.js +1 -1
  100. package/support/featureFlags.js +1 -1
  101. package/support/revision.js +1 -1
  102. package/symbols/support/previewSymbol3D.js +1 -1
  103. package/symbols/support/styleUtils.js +1 -1
  104. package/symbols/support/symbolLayerUtils.js +1 -1
  105. package/symbols/support/utils.js +1 -1
  106. package/symbols/support/webStyleSymbolUtils.js +1 -1
  107. package/views/2d/engine/webgl/TextureManager.js +1 -1
  108. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  109. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  110. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  111. package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
  112. package/views/2d/layers/features/sources/DrillDownFeatureSource.js +1 -1
  113. package/views/2d/layers/features/sources/PagedFeatureSource.js +1 -1
  114. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  115. package/views/2d/layers/features/tileRenderers/HeatmapTileRenderer.js +1 -1
  116. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  117. package/views/2d/layers/features/tileRenderers.js +1 -1
  118. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  119. package/views/2d/layers/support/webStyleUtils.js +1 -1
  120. package/views/3d/input/SceneInputManager.js +1 -1
  121. package/views/3d/interactive/manipulatorUtils.js +1 -1
  122. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  123. package/views/3d/layers/GraphicsView3D.js +1 -1
  124. package/views/3d/layers/I3SMeshView3D.js +1 -1
  125. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  126. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  127. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  128. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  129. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  130. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  131. package/views/3d/layers/graphics/webStyleUtils.js +5 -0
  132. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  133. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  134. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  135. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  136. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  137. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  138. package/views/LayerViewManager.js +1 -1
  139. package/views/PopupView.js +1 -1
  140. package/views/SceneView.js +1 -1
  141. package/views/ViewAnimation.js +1 -1
  142. package/views/input/BrowserEventSource.js +1 -1
  143. package/views/input/InputManager.js +1 -1
  144. package/views/interactive/coordinateHelper.js +1 -1
  145. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  146. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  147. package/views/support/QueueProcessor.js +1 -1
  148. package/views/ui/DefaultUI.js +1 -1
  149. package/views/ui/UI.js +1 -1
  150. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  151. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  152. package/widgets/Editor/Upload.js +1 -1
  153. package/widgets/Editor/deprecationUtils.js +1 -1
  154. package/widgets/Editor/modelUploadUtils.js +1 -1
  155. package/widgets/Editor.js +1 -1
  156. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  157. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  158. package/widgets/Feature/FeatureViewModel.js +1 -1
  159. package/widgets/Feature/support/featureUtils.js +1 -1
  160. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  161. package/widgets/Popup.js +1 -1
  162. package/widgets/support/decorators/accessibleHandler.js +1 -1
  163. package/assets/esri/core/workers/chunks/0948a40569b2408edefb.js +0 -1
  164. package/assets/esri/core/workers/chunks/192e3eeed50768c77c65.js +0 -1
  165. package/assets/esri/core/workers/chunks/1d1b9856f2f44d0c2144.js +0 -1
  166. package/assets/esri/core/workers/chunks/203115cc836e7b364eec.js +0 -1
  167. package/assets/esri/core/workers/chunks/20ad44b1a7adfed4c6c4.js +0 -1
  168. package/assets/esri/core/workers/chunks/27353056c3e4e8d8b8d3.js +0 -1
  169. package/assets/esri/core/workers/chunks/41ae9037c70461d5fdc7.js +0 -1
  170. package/assets/esri/core/workers/chunks/4b6a903d4aeeb4eeb615.js +0 -1
  171. package/assets/esri/core/workers/chunks/4bf9bc8b52d618f395c5.js +0 -1
  172. package/assets/esri/core/workers/chunks/5ec4fedbbcbb0053cf74.js +0 -2
  173. package/assets/esri/core/workers/chunks/60e29d172a2dcf45e8d0.js +0 -1
  174. package/assets/esri/core/workers/chunks/68a15cc7c51645d31572.js +0 -1
  175. package/assets/esri/core/workers/chunks/6b065e581bcf743079cf.js +0 -1
  176. package/assets/esri/core/workers/chunks/6c54579981a7bd483f1a.js +0 -1
  177. package/assets/esri/core/workers/chunks/778ecf61f07dafc51bbc.js +0 -1
  178. package/assets/esri/core/workers/chunks/7da1fd3629362b81b43c.js +0 -1
  179. package/assets/esri/core/workers/chunks/80d335bec34d60b7bbdc.js +0 -1
  180. package/assets/esri/core/workers/chunks/810da30f13151b72a293.js +0 -1
  181. package/assets/esri/core/workers/chunks/81485a5056aed94b3d8d.js +0 -1
  182. package/assets/esri/core/workers/chunks/8374d89e995f0d15c042.js +0 -1
  183. package/assets/esri/core/workers/chunks/8ebda132068f6b962dd9.js +0 -1
  184. package/assets/esri/core/workers/chunks/8f553ae2f1aba4e0371f.js +0 -1
  185. package/assets/esri/core/workers/chunks/8fec9979ae2b0e3a878f.js +0 -1
  186. package/assets/esri/core/workers/chunks/979ea2e3b1b164334634.js +0 -1
  187. package/assets/esri/core/workers/chunks/a0e92dd27c8f6b642dbf.js +0 -1
  188. package/assets/esri/core/workers/chunks/a6240bf258b3886a6661.js +0 -1
  189. package/assets/esri/core/workers/chunks/b059cd03f31ead61abb4.js +0 -1
  190. package/assets/esri/core/workers/chunks/b1a8024bf8cdd0cd3884.js +0 -1
  191. package/assets/esri/core/workers/chunks/b366e0db9b5f27dd53a3.js +0 -1
  192. package/assets/esri/core/workers/chunks/b976d5599672665561ec.js +0 -1
  193. package/assets/esri/core/workers/chunks/c260ac058e63a5c0cf60.js +0 -1
  194. package/assets/esri/core/workers/chunks/c646dc9da08b509e39d6.js +0 -1
  195. package/assets/esri/core/workers/chunks/db5598944b691e43f13e.js +0 -1
  196. package/assets/esri/core/workers/chunks/eb163a2ddeb27c690308.js +0 -1
  197. package/assets/esri/core/workers/chunks/eec12b5666819bf2119d.js +0 -1
  198. package/assets/esri/core/workers/chunks/ef05496c1faf08d247f1.js +0 -1
  199. package/assets/esri/core/workers/chunks/f05634909c9449533193.js +0 -1
  200. package/assets/esri/core/workers/chunks/fcebd70b089dea833c75.js +0 -1
  201. package/views/layers/GraphicsView.js +0 -5
  202. /package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js.LICENSE.txt → 51a0d1dabe7415515c77.js.LICENSE.txt} +0 -0
  203. /package/assets/esri/core/workers/chunks/{5ec4fedbbcbb0053cf74.js.LICENSE.txt → c5c56b6d99db96a6755a.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[24,8008,8062],{25929:(e,r,a)=>{a.d(r,{M:()=>f,a:()=>m,e:()=>p,f:()=>n,i:()=>u,p:()=>y,r:()=>l,t:()=>i,w:()=>s});var t=a(17452);function n(e,r){const a=r&&r.url&&r.url.path;if(e&&a&&(e=(0,t.hF)(e,a,{preserveProtocolRelative:!0}),r.portalItem&&r.readResourcePaths)){const a=(0,t.PF)(e,r.portalItem.itemUrl);null!=a&&c.test(a)&&r.readResourcePaths.push(r.portalItem.resourceFromPath(a).path)}return d(e,r&&r.portal)}function i(e,r,a=f.YES){if(null==e)return e;!(0,t.YP)(e)&&r&&r.blockedRelativeUrls&&r.blockedRelativeUrls.push(e);let n=(0,t.hF)(e);if(r){const a=r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.rootPath||r.url&&r.url.path;if(a){const i=d(a,r.portal),l=d(n,r.portal);n=(0,t.PF)(l,i,i),null!=n&&n!==l&&n!==e&&r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.writtenUrls.push(n)}}return n=p(n,r?.portal),(0,t.YP)(n)&&(n=(0,t.Fv)(n)),r?.resources&&r?.portalItem&&!(0,t.YP)(n)&&!(0,t.HK)(n)&&a===f.YES&&r.resources.toKeep.push({resource:r.portalItem.resourceFromPath(n),compress:!1}),n}function l(e,r,a){return n(e,a)}function s(e,r,a,t){const n=i(e,t);void 0!==n&&(r[a]=n)}const o=/\/items\/([^\/]+)\/resources\/(.*)/,c=/^\.\/resources\//;function u(e){const r=e?.match(o)??null;return r?.[1]??null}function y(e){const r=e?.match(o)??null;if(null==r)return null;const a=r[2],n=a.lastIndexOf("/");if(-1===n){const{path:e,extension:r}=(0,t.fZ)(a);return{prefix:null,filename:e,extension:r}}const{path:i,extension:l}=(0,t.fZ)(a.slice(n+1));return{prefix:a.slice(0,n),filename:i,extension:l}}function p(e,r){return r&&!r.isPortal&&r.urlKey&&r.customBaseUrl?(0,t.Ie)(e,`${r.urlKey}.${r.customBaseUrl}`,r.portalHostname):e}function d(e,r){if(!r||r.isPortal||!r.urlKey||!r.customBaseUrl)return e;const a=`${r.urlKey}.${r.customBaseUrl}`,n=(0,t.TI)();return(0,t.D6)(n,`${n.scheme}://${a}`)?(0,t.Ie)(e,r.portalHostname,a):(0,t.Ie)(e,a,r.portalHostname)}var f,L;(L=f||(f={}))[L.YES=0]="YES",L[L.NO=1]="NO";const m=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return f},ensureMainOnlineDomain:p,fromJSON:n,itemIdFromResourceUrl:u,prefixAndFilenameFromResourceUrl:y,read:l,toJSON:i,write:s},Symbol.toStringTag,{value:"Module"}))},10699:(e,r,a)=>{a.d(r,{IG:()=>l,iv:()=>s});var t=a(43697),n=a(52011);let i=0;const l=e=>{let r=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+i++})}};return r=(0,t._)([(0,n.j)("esri.core.Identifiable")],r),r},s=e=>{let r=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:i++})}};return r=(0,t._)([(0,n.j)("esri.core.NumericIdentifiable")],r),r};let o=class extends(l(class{})){};o=(0,t._)([(0,n.j)("esri.core.Identifiable")],o)},87085:(e,r,a)=>{a.d(r,{Z:()=>h});var t=a(43697),n=(a(66577),a(3172)),i=a(20102),l=a(32448),s=a(10699),o=a(83379),c=a(92604),u=a(95330),y=a(17452),p=a(5600),d=(a(75215),a(67676),a(80442),a(52011)),f=a(68773),L=a(6570),m=a(82971);let S=0,b=class extends(l.Z.EventedMixin((0,s.IG)(o.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new L.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+S++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const r="string"==typeof e?{url:e}:e;return(await a.e(3529).then(a.bind(a,63529))).fromUrl(r)}static fromPortalItem(e){return async function(e){const r="portalItem"in e?e:{portalItem:e},t=await a.e(8008).then(a.bind(a,28008));try{return await t.fromItem(r)}catch(e){const a=r&&r.portalItem,t=a&&a.id||"unset",n=a&&a.portal&&a.portal.url||f.default.portalUrl;throw c.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+t+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.D_)(e)||c.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,r=this.parent;"layers"in r&&r.layers.includes(e)?r.layers.remove(e):"tables"in r&&r.tables.includes(e)?r.tables.remove(e):"baseLayers"in r&&r.baseLayers.includes(e)?r.baseLayers.remove(e):"baseLayers"in r&&r.referenceLayers.includes(e)&&r.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,y.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new i.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,t._)([(0,p.Cb)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,t._)([(0,p.Cb)({type:L.Z})],b.prototype,"fullExtent",void 0),(0,t._)([(0,p.Cb)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,t._)([(0,p.Cb)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,t._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,t._)([(0,p.Cb)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,t._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,t._)([(0,p.Cb)({clonable:!1})],b.prototype,"parent",void 0),(0,t._)([(0,p.Cb)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,t._)([(0,p.Cb)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,t._)([(0,p.Cb)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,t._)([(0,p.Cb)({type:m.Z})],b.prototype,"spatialReference",void 0),(0,t._)([(0,p.Cb)({type:String})],b.prototype,"title",void 0),(0,t._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,t._)([(0,p.Cb)()],b.prototype,"url",void 0),(0,t._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,t._)([(0,d.j)("esri.layers.Layer")],b);const h=b},66677:(e,r,a)=>{a.d(r,{B5:()=>u,DR:()=>p,G:()=>h,M8:()=>L,Nm:()=>m,Qc:()=>y,XG:()=>S,a7:()=>f,ld:()=>d,wH:()=>b});var t=a(17452),n=a(25929);const i={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(i),s=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return!!s.test(e)}function y(e){if(null==e)return null;const r=(0,t.mN)(e),a=r.path.match(s)||r.path.match(o);if(!a)return null;const[,n,l,c,u]=a,y=l.indexOf("/");return{title:d(-1!==y?l.slice(y+1):l),serverType:i[c.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:n}}}function p(e){const r=(0,t.mN)(e).path.match(c);return r?{serviceUrl:r[1],sublayerId:Number(r[2])}:null}function d(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,r){const a=[];if(e){const r=y(e);null!=r&&r.title&&a.push(r.title)}if(r){const e=d(r);a.push(e)}if(2===a.length){if(a[0].toLowerCase().includes(a[1].toLowerCase()))return a[0];if(a[1].toLowerCase().includes(a[0].toLowerCase()))return a[1]}return a.join(" - ")}function L(e){if(!e)return!1;const r=(e=e.toLowerCase()).includes(".arcgis.com/"),a=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return r&&a}function m(e,r){return e?(0,t.Qj)((0,t.Hu)(e,r)):e}function S(e){let{url:r}=e;if(!r)return{url:r};r=(0,t.Hu)(r,e.logger);const a=(0,t.mN)(r),n=y(a.path);let i;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(i=n.sublayer),r=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(a.path);null!=e&&(r=e.serviceUrl,i=e.sublayerId)}return{url:(0,t.Qj)(r),layerId:i}}function b(e,r,a,i,l){(0,n.w)(r,i,"url",l),i.url&&null!=e.layerId&&(i.url=(0,t.v_)(i.url,a,e.layerId.toString()))}function h(e){if(!e)return!1;const r=e.toLowerCase(),a=r.includes("/services/"),t=r.includes("/mapserver/wmsserver"),n=r.includes("/imageserver/wmsserver"),i=r.includes("/wmsserver");return a&&(t||n||i)}},52104:(e,r,a)=>{a.d(r,{V:()=>n});var t=a(96187);async function n(e,r){const a=await(0,t.T)(e,r);a.layers=a.layers.filter(i);const n={serviceJSON:a};if((a.currentVersion??0)<10.5)return n;const l=await(0,t.T)(e+"/layers",r);return n.layersJSON={layers:l.layers.filter(i),tables:l.tables},n}function i(e){return!e.type||"Feature Layer"===e.type}},70024:(e,r,a)=>{a.d(r,{populateOperationalLayers:()=>u});var t=a(46791),n=(a(80442),a(95330)),i=a(87344),l=a(15235);function s(e,r){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===r}var o=a(28008),c=a(40555);async function u(e,r,a){if(!r)return;const t=[];for(const e of r){const r=S(e,a);"GroupLayer"===e.layerType?t.push(I(r,e,a)):t.push(r)}const i=await(0,n.as)(t);for(const r of i)r.value&&e.add(r.value)}const y={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"},p={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},d={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",DefaultTileLayer:"TileLayer"},f={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"},L={ArcGISFeatureLayer:"FeatureLayer"},m={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"};async function S(e,r){return async function(e,r,a){const t=new e;return t.read(r,a.context),"group"===t.type&&b(r)&&await async function(e,r,a){const t=i.T.FeatureLayer,n=await t(),l=r.featureCollection,s=l?.showLegend,o=l?.layers?.map(((t,i)=>{const l=new n;l.read(t,a);const o={...a,ignoreDefaults:!0};return l.read({id:`${e.id}-sublayer-${i}`,visibility:r.visibleLayers?.includes(i)??!0},o),null!=s&&l.read({showLegend:s},o),l}));e.layers.addMany(o??[])}(t,r,a.context),await(0,c.y)(t,a.context),t}(await async function(e,r){const a=r.context,t=w(a);let n=e.layerType||e.type;!n&&r&&r.defaultLayerType&&(n=r.defaultLayerType);const c=t[n];let u=c?i.T[c]:i.T.UnknownLayer;if(h(e)){const r=a?.portal;if(e.itemId){const a=new l.default({id:e.itemId,portal:r});await a.load();const t=(await(0,o.selectLayerClassPath)(a)).className||"UnknownLayer";u=i.T[t]}}else"ArcGISFeatureLayer"===n?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&&e.wmtsInfo.url&&e.wmtsInfo.layerIdentifier?u=i.T.WMTSLayer:"WFS"===n&&"2.0.0"!==e.wfsInfo?.version&&(u=i.T.UnsupportedLayer);return u()}(e,r),e,r)}function b(e){return"ArcGISFeatureLayer"===e.layerType&&!h(e)&&(e.featureCollection?.layers?.length??0)>1}function h(e){return"Feature Collection"===e.type}function w(e){let r;if("web-scene"===e.origin)switch(e.layerContainerType){case"basemap":r=d;break;case"ground":r=p;break;default:r=y}else switch(e.layerContainerType){case"basemap":r=m;break;case"tables":r=L;break;default:r=f}return r}async function I(e,r,a){const n=new t.Z,i=u(n,Array.isArray(r.layers)?r.layers:[],a);try{const r=await e;try{if(await i,"group"===r.type)return r.layers.addMany(n),r}catch(e){r.destroy();for(const e of n)e.destroy();throw e}}catch(e){throw e}}},87344:(e,r,a)=>{a.d(r,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(8153)]).then(a.bind(a,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(9942),a.e(9238),a.e(5590),a.e(6935),a.e(632),a.e(223)]).then(a.bind(a,30223))).default,CSVLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(9942),a.e(9238),a.e(9675)]).then(a.bind(a,45425))).default,DimensionLayer:async()=>(await Promise.all([a.e(163),a.e(9037),a.e(81)]).then(a.bind(a,40081))).default,ElevationLayer:async()=>(await Promise.all([a.e(163),a.e(9157),a.e(2763)]).then(a.bind(a,65665))).default,FeatureLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(9942),a.e(9238),a.e(5159)]).then(a.bind(a,19238))).default,GeoJSONLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(7202)]).then(a.bind(a,23477))).default,GeoRSSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8024)]).then(a.bind(a,3723))).default,GroupLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(7483)]).then(a.bind(a,89348))).default,ImageryLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(4165),a.e(4599),a.e(6610),a.e(7391),a.e(1194)]).then(a.bind(a,90444))).default,ImageryTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(9157),a.e(6610),a.e(7391),a.e(5604),a.e(3381)]).then(a.bind(a,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([a.e(163),a.e(6935),a.e(1537)]).then(a.bind(a,9310))).default,KMLLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(739)]).then(a.bind(a,42756))).default,LineOfSightLayer:async()=>(await Promise.all([a.e(163),a.e(7316)]).then(a.bind(a,30690))).default,MapImageLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(4599),a.e(6368),a.e(7374)]).then(a.bind(a,27374))).default,MapNotesLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(9942),a.e(9238),a.e(1227)]).then(a.bind(a,62128))).default,MediaLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(4828)]).then(a.bind(a,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(2855)]).then(a.bind(a,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971),a.e(6237)]).then(a.bind(a,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(9942),a.e(9238),a.e(5132)]).then(a.bind(a,76604))).default,PointCloudLayer:async()=>(await Promise.all([a.e(163),a.e(5653),a.e(4266),a.e(237)]).then(a.bind(a,10608))).default,RouteLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4286)]).then(a.bind(a,40153))).default,SceneLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(9942),a.e(9238),a.e(5590),a.e(6935),a.e(632),a.e(7476)]).then(a.bind(a,57476))).default,StreamLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(5004)]).then(a.bind(a,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(9942),a.e(908)]).then(a.bind(a,30359))).default,TileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(4599),a.e(9157),a.e(6368),a.e(8636)]).then(a.bind(a,98636))).default,UnknownLayer:async()=>(await a.e(4166).then(a.bind(a,44166))).default,UnsupportedLayer:async()=>(await a.e(9296).then(a.bind(a,39296))).default,VectorTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9157),a.e(4325),a.e(9805),a.e(5481)]).then(a.bind(a,94756))).default,VoxelLayer:async()=>(await Promise.all([a.e(163),a.e(5653),a.e(9037),a.e(8865)]).then(a.bind(a,28865))).default,WFSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(8244),a.e(1223),a.e(1423),a.e(4165),a.e(911),a.e(5546),a.e(3974)]).then(a.bind(a,12653))).default,WMSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(5653),a.e(2462)]).then(a.bind(a,25906))).default,WMTSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971),a.e(5853)]).then(a.bind(a,55853))).default,WebTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971)]).then(a.bind(a,16199))).default}},33516:(e,r,a)=>{a.d(r,{Y:()=>l,h:()=>i});var t=a(17452),n=a(65587);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}}},18062:(e,r,a)=>{a.r(r),a.d(r,{getFirstLayerOrTableId:()=>h,getNumLayersAndTables:()=>w,getSubtypeGroupLayerIds:()=>I,load:()=>d,preprocessFSItemData:()=>b});var t=a(20102),n=a(87085),i=a(66677),l=a(52104),s=a(65587),o=a(15235),c=a(33516),u=a(14661),y=a(40555),p=a(96187);async function d(e,r){const a=e.instance.portalItem;if(a&&a.id)return await a.load(r),function(e){const r=e.instance.portalItem;if(!r?.type||!e.supportedTypes.includes(r.type))throw new t.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:r?.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,r){const a=e.instance,n=a.portalItem;if(!n)return;const{url:i,title:s}=n,o=(0,c.h)(n);if("group"===a.type)return a.read({title:s},o),async function(e,r){let a;const{portalItem:n}=e;if(!n)return;const i=n.type,s=r.layerModuleTypeMap,o=(0,u._$)(n,"Oriented Imagery Layer")??!1;switch(i){case"Feature Service":a=o?s.OrientedImageryLayer:s.FeatureLayer;break;case"Stream Service":a=s.StreamLayer;break;case"Scene Service":a=s.SceneLayer;break;case"Feature Collection":a=s.FeatureLayer;break;default:throw new t.Z("portal:unsupported-item-type-as-group",`The item type '${i}' is not supported as a 'IGroupLayer'`)}let[c,y]=await Promise.all([a(),S(r)]),d=()=>c;if("Feature Service"===i){if(y=n.url?await b(y,n.url):{},I(y).length){const e=s.SubtypeGroupLayer,r=await e();d=e=>"SubtypeGroupLayer"===e.layerType?r:c}return L(e,d,y,await async function(e){const{layersJSON:r}=await(0,l.V)(e);if(!r)return null;const a=[...r.layers,...r.tables];return e=>a.find((r=>r.id===e.id))}(n.url))}return w(y)>0?L(e,d,y):async function(e,r){const{portalItem:a}=e;if(!a?.url)return;const t=await(0,p.T)(a.url);t&&L(e,r,{layers:t.layers?.map(f),tables:t.tables?.map(f)})}(e,d)}(a,e);i&&a.read({url:i},o);const d=await S(e,r);return d&&a.read(d,o),a.resourceReferences={portalItem:n,paths:o.readResourcePaths??[]},"subtype-group"!==a.type&&a.read({title:s},o),(0,y.y)(a,o)}(e,r)}function f(e){return{id:e.id,name:e.name}}function L(e,r,a,l){let s=a.layers||[];const c=a.tables||[];if("Feature Collection"===e.portalItem?.type&&(s.forEach((e=>{"Table"===e?.layerDefinition?.type&&c.push(e)})),s=s.filter((e=>"Table"!==e?.layerDefinition?.type))),"coverage"in a){const r=function(e){const{coverage:r}=e;if(!r)return null;const a=new URL(r);if(r.toLowerCase().includes("item.html")){const e=a.searchParams.get("id"),r=a.origin;return n.Z.fromPortalItem({portalItem:new o.default({id:e,url:r})})}if((0,i.B5)(r))return n.Z.fromArcGISServerUrl({url:r});throw new t.Z("portal:oriented-imagery-layer-coverage","the provided coverage url couldn't be loaded as a layer")}(a);r&&e.add(r)}s.reverse().forEach((t=>{const n=m(e,r(t),a,t,l?.(t));e.add(n)})),c.reverse().forEach((t=>{const n=m(e,r(t),a,t,l?.(t));e.tables.add(n)}))}function m(e,r,a,t,n){const i=e.portalItem,l=new r({portalItem:i.clone(),layerId:t.id});if("sourceJSON"in l&&(l.sourceJSON=n),"subtype-group"!==l.type&&(l.sublayerTitleMode="service-name"),"Feature Collection"===i.type){const e={origin:"portal-item",portal:i.portal||s.Z.getDefault()};l.read(t,e);const r=a.showLegend;null!=r&&l.read({showLegend:r},e)}return l}async function S(e,r){if(!1===e.supportsData)return;const a=e.instance,t=a.portalItem;if(!t)return;let n=null;try{n=await t.fetchData("json",r)}catch(e){}if(function(e){return"stream"!==e.type&&"oriented-imagery"!==e.type&&"layerId"in e}(a)){let e=null,r=!0;if(n&&w(n)>0){if(null==a.layerId){const e=I(n);a.layerId="subtype-group"===a.type?e?.[0]:h(n)}e=function(e,r){const{layerId:a}=r,t=e.layers?.find((e=>e.id===a))||e.tables?.find((e=>e.id===a));return t&&function(e,r){return!("feature"===r.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===r.type&&!("layerType"in e))}(t,r)?t:null}(n,a),e&&(1===w(n)&&(r=!1),null!=n.showLegend&&(e.showLegend=n.showLegend))}return r&&"sublayerTitleMode"in a&&"service-name"!==a.sublayerTitleMode&&(a.sublayerTitleMode="item-title-and-service-name"),e}return n}async function b(e,r){if(null==e?.layers||null==e?.tables){const a=await(0,p.T)(r);(e=e||{}).layers=e.layers||a?.layers,e.tables=e.tables||a?.tables}return e}function h(e){const r=e.layers;if(r&&r.length)return r[0].id;const a=e.tables;return a&&a.length?a[0].id:null}function w(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function I(e){const r=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&r.push(e.id)})),r}},14661:(e,r,a)=>{a.d(r,{$o:()=>u,Fj:()=>o,Kz:()=>y,Ss:()=>p,_$:()=>s,ck:()=>c,qj:()=>l});var t=a(44547),n=a(82971),i=a(40488);function l(e,r){if(!s(e,r)){const a=e.typeKeywords;a?a.push(r):e.typeKeywords=[r]}}function s(e,r){return!!e.typeKeywords?.includes(r)}function o(e){return s(e,y.HOSTED_SERVICE)}function c(e,r){const a=e.typeKeywords;if(a){const e=a.indexOf(r);e>-1&&a.splice(e,1)}}async function u(e){const r=e.clone().normalize();let a;if(r.length>1)for(const e of r)a?e.width>a.width&&(a=e):a=e;else a=r[0];return async function(e){const r=e.spatialReference;if(r.isWGS84)return e.clone();if(r.isWebMercator)return(0,i.Sx)(e);const a=n.Z.WGS84;return await(0,t.iQ)(r,a),(0,t.iV)(e,a)}(a)}const y={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service"};function p(e){const{portal:r,isOrgItem:a,itemControl:t}=e,n=r.user?.privileges;let i=!n||n.includes("features:user:edit"),l=!!a&&!!n?.includes("features:user:fullEdit");const s="update"===t||"admin"===t;return s?l=i=!0:l&&(i=!0),{features:{edit:i,fullEdit:l},content:{updateItem:s}}}},28008:(e,r,a)=>{a.r(r),a.d(r,{fromItem:()=>u,selectLayerClassPath:()=>y});var t=a(20102),n=a(84230),i=a(87344),l=a(15235),s=a(18062),o=a(14661),c=a(96187);async function u(e){!e.portalItem||e.portalItem instanceof l.default||(e={...e,portalItem:new l.default(e.portalItem)});const r=await async function(e){return await e.load(),async function(e){const r=e.className,a=i.T[r];return{constructor:await a(),properties:e.properties}}(await y(e))}(e.portalItem);return new(0,r.constructor)({portalItem:e.portalItem,...r.properties})}async function y(e){switch(e.type){case"Map Service":return async function(e){return await async function(e){return(await(0,c.T)(e.url)).tileInfo}(e)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e);case"Feature Service":return async function(e){if((0,o._$)(e,"Oriented Imagery Layer"))return async function(e){await e.load();const r=await e.fetchData();return r.coverage?{className:"GroupLayer"}:{className:"OrientedImageryLayer",properties:r}}(e);const r=await p(e);if("object"==typeof r){const e={};return null!=r.id&&(e.layerId=r.id),{className:r.className||"FeatureLayer",properties:e}}return{className:"GroupLayer"}}(e);case"Feature Collection":return async function(e){await e.load();const r=(0,o._$)(e,"Map Notes"),a=(0,o._$)(e,"Markup");if(r||a)return{className:"MapNotesLayer"};if((0,o._$)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,s.getNumLayersAndTables)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return async function(e){const r=await p(e);if("object"==typeof r){const a={};let t;if(null!=r.id?(a.layerId=r.id,t=`${e.url}/layers/${r.id}`):t=e.url,e.typeKeywords?.length)for(const r of Object.keys(n.fb))if(e.typeKeywords.includes(r))return{className:n.fb[r]};const i=await(0,c.T)(t);return{className:n.fb[i?.layerType]||"SceneLayer",properties:a}}if(!1===r){const r=await(0,c.T)(e.url);return"Voxel"===r?.layerType?{className:"VoxelLayer"}:{className:"GroupLayer"}}return{className:"GroupLayer"}}(e);case"Image Service":return async function(e){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 a=await e.fetchData(),t=a?.layerType;if("ArcGISTiledImageServiceLayer"===t)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===t)return{className:"ImageryLayer"};const n=await(0,c.T)(e.url),i=n.cacheType?.toLowerCase(),l=n.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e);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"};default:throw new t.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e){const r=e.url;if(!r||r.match(/\/\d+$/))return{};await e.load();const a=await e.fetchData();if("Feature Service"===e.type){const e=d(await(0,s.preprocessFSItemData)(a,r));if("object"==typeof e){const r=(0,s.getSubtypeGroupLayerIds)(a);e.className=null!=e.id&&r.includes(e.id)?"SubtypeGroupLayer":"FeatureLayer"}return e}return(0,s.getNumLayersAndTables)(a)>0?d(a):d(await(0,c.T)(r))}function d(e){return 1===(0,s.getNumLayersAndTables)(e)&&{id:(0,s.getFirstLayerOrTableId)(e)}}},40555:(e,r,a)=>{a.d(r,{y:()=>l});var t=a(66643),n=a(95330),i=a(20941);async function l(e,r,a){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",r.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,t.q6)(l.populateFromStyle());if((0,n.k_)(a),!1===s.ok){const a=s.error;r&&r.messages&&r.messages.push(new i.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${a.message}`,{error:a,context:r})),e.clear("renderer",r?.origin)}}}},96187:(e,r,a)=>{a.d(r,{T:()=>n});var t=a(3172);async function n(e,r){const{data:a}=await(0,t.default)(e,{responseType:"json",query:{f:"json",...r?.customParameters,token:r?.apiKey}});return a}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7697],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,o,i,s=n(5732),a={exports:{}};r=a,o=function(){function e(e,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:e.length,d=t(e,0,g,o,!0),m=[];if(!d||d.next===d.prev)return m;if(f&&(d=l(e,n,d,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var x=o;x<g;x+=o)(u=e[x])<i&&(i=u),(p=e[x+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(d,m,o,i,s,h),m}function t(e,t,n,r,o){var i,s;if(o===S(e,t,n,r)>0)for(i=t;i<n;i+=r)s=Z(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=Z(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;_(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(_(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,p,h){if(e){!h&&p&&f(e,c,u,p);for(var g,d,m=e;e.prev!==e.next;)if(g=e.prev,d=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(d.i/l),_(e),e=d.next,m=d.next;else if((e=d)===m){h?1===h?r(e=s(n(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):r(n(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,n,r){var o=e.prev,i=e,s=e.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,t,n,r),h=g(c,u,t,n,r),f=e.prevZ,d=e.nextZ;f&&f.z>=p&&d&&d.z<=h;){if(f!==e.prev&&f!==e.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==e.prev&&d!==e.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=p;){if(f!==e.prev&&f!==e.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==e.prev&&d!==e.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&C(i,s)&&C(s,i)&&(t.push(i.i/r),t.push(o.i/r),t.push(s.i/r),_(o),_(o.next),o=e=s),o=o.next}while(o!==e);return n(o)}function a(e,t,o,i,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&x(l,c)){var u=T(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,o,i,s,a),void r(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*i,s<a-1?r[s+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(d(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function p(e,t){var r=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&m(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),C(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var o=T(r,e),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(t===r?i:t)}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function f(e,t,n,r){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,c=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function x(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(C(e,t)&&C(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var o=A(y(e,t,n)),i=A(y(e,t,r)),s=A(y(n,r,e)),a=A(y(n,r,t));return o!==i&&s!==a||!(0!==o||!b(e,n,t))||!(0!==i||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function C(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function T(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(e,t,n,r){var o=new M(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function _(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(S(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(S(e,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((e[h]-e[g])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[g+1]-e[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},e},void 0!==(i=o())&&(r.exports=i);const l=(0,s.g)(a.exports)},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>o});var r=n(1533);function o(e){return(0,r.kJ)(e)?e.length<r.DB?e:i(e):e.length<r.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:i(e)}function i(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>y});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const d="esri.geometry.support.MeshComponent",m=a.Z.getLogger(d);let x=r=class extends i.wq{static from(e){return(0,p.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},m)}castMaterial(e){return(0,p.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.Z:h.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],x.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],x.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],x.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],x.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],x.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],x.prototype,"trustSourceNormals",void 0),x=r=(0,o._)([(0,u.j)(d)],x);const y=x},65542:(e,t,n)=>{n.d(t,{Z:()=>p});var r,o=n(43697),i=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(91024);let u=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.normalTexture=null,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:null!=this.colorTexture?this.colorTexture.cloneWithDeduplication(e):null,normalTexture:null!=this.normalTexture?this.normalTexture.cloneWithDeduplication(e):null,alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:null!=this.colorTextureTransform?this.colorTextureTransform:null,normalTextureTransform:null!=this.normalTextureTransform?this.normalTextureTransform:null}}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],u.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"colorTexture",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"normalTexture",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],u.prototype,"alphaMode",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],u.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],u.prototype,"doubleSided",void 0),(0,o._)([(0,a.Cb)()],u.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.Cb)()],u.prototype,"normalTextureTransform",void 0),u=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterial")],u);const p=u},60746:(e,t,n)=>{n.d(t,{Z:()=>p});var r,o=n(43697),i=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(91024);let u=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.occlusionTexture=null,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:null!=this.emissiveColor?this.emissiveColor.clone():null,emissiveTexture:null!=this.emissiveTexture?this.emissiveTexture.cloneWithDeduplication(e):null,occlusionTexture:null!=this.occlusionTexture?this.occlusionTexture.cloneWithDeduplication(e):null,metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:null!=this.metallicRoughnessTexture?this.metallicRoughnessTexture.cloneWithDeduplication(e):null,occlusionTextureTransform:null!=this.occlusionTextureTransform?this.occlusionTextureTransform:null,emissiveTextureTransform:null!=this.emissiveTextureTransform?this.emissiveTextureTransform:null,metallicRoughnessTextureTransform:null!=this.metallicRoughnessTextureTransform?this.metallicRoughnessTextureTransform:null}}};(0,o._)([(0,s.Cb)({type:i.Z,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],u.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.Cb)()],u.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.Cb)()],u.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.Cb)()],u.prototype,"metallicRoughnessTextureTransform",void 0),u=r=(0,o._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],u);const p=u},91024:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(43697);n(80442);let o=null,i=!0;function s(){return o||(o=document.createElement("canvas"),o.width=1,o.height=1),o}function a(e,t,n){return n||(n=s()),n.getContext("2d").createImageData(e,t)}var l,c=n(96674),u=n(5600),p=n(75215),h=(n(67676),n(71715)),f=n(52011),g=n(30556),d=n(25929);const m=new WeakMap;let x=0,y=l=class extends c.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,d.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,d.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(m.has(this.data)||m.set(this.data,++x),t(m.get(this.data))):t()}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new l(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return function(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,n)}catch(e){i=!1}const o=a(t,n,void 0);return o.data.set(e,0),o}(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new l({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new l({data:e}):(0,p.TJ)(l,e)}};(0,r._)([(0,u.Cb)({type:String,json:{write:d.w}})],y.prototype,"url",null),(0,r._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,u.Cb)()],y.prototype,"data",null),(0,r._)([(0,g.c)("data")],y.prototype,"writeData",null),(0,r._)([(0,h.r)("data")],y.prototype,"readData",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],y.prototype,"contentHash",null),y=l=(0,r._)([(0,f.j)("esri.geometry.support.MeshTexture")],y);const v=y},71630:(e,t,n)=>{n.d(t,{Q:()=>f,X:()=>d});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=r=class extends i.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return d(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},h)}castPosition(e){return e&&e instanceof Float32Array&&h.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),d(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},h)}castUv(e){return d(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},h)}castNormal(e){return d(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},h)}castTangent(e){return d(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},h)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}};function g(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function d(e,t,n,r,o){if(!e)return e;if(e instanceof t)return g(e,r,t,o);for(const i of n)if(e instanceof i)return g(new t(e),r,t,o);if(Array.isArray(e))return g(new t(e),r,t,o);{const r=n.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function m(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,o._)([(0,l.Cb)({json:{write:m}})],f.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],f.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:m}})],f.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],f.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:m}})],f.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],f.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:m}})],f.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],f.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:m}})],f.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],f.prototype,"castTangent",null),f=r=(0,o._)([(0,u.j)(p)],f)},84470:(e,t,n)=>{n.d(t,{JG:()=>c,NZ:()=>o,fV:()=>u,vj:()=>f});var r=n(2981);function o(e){const t=e?.source;return!!t&&(Array.isArray(t)?t.some((e=>l(e))):l(t))}function i(e){return Array.isArray(e)?0!==e.length&&i(e[0]):!(e instanceof File)}const s=/^(model\/gltf\+json)|(model\/gltf-binary)$/,a=/\.(gltf|glb)/i;function l(e){if(e instanceof File){const{type:t,name:n}=e;return s.test(t)||a.test(n)}return s.test(e.assetMimeType)||a.test(e.assetName)||a.test(e.assetUrl)}function c(e,t){if(!e)return!1;const{source:n}=e;return Array.isArray(n)?function(e,t){return e.every((e=>h(e,t)))}(n,t):h(n,t)}function u(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(i(n)&&i(r)){if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetHash<t.assetHash?-1:e.assetHash>t.assetHash?1:0,t=[...n].sort(e),o=[...r].sort(e);for(let e=0;e<t.length;++e)if(!p(t[e],o[e]))return!1;return!0}if(!Array.isArray(n)&&!Array.isArray(r))return p(n,r)}return!1}function p(e,t){return e.assetUrl===t.assetUrl}function h(e,t){return!(e instanceof File)&&e.assetUrl.startsWith(`${t.path}/assets/`)}function f(e,t){return e instanceof File?(0,r.Es)(e.name,t)??(0,r.PM)(e.type,t):(0,r.PM)(e.assetMimeType,t)??(0,r.Es)(e.assetName,t)}},47545:(e,t,n)=>{n.d(t,{d:()=>i});var r=n(22021),o=n(24882);function i(e,t,n){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),h=n?.minReduction??0,f=n?.originalIndices||null,g=f?f.length:0,d=n?.componentOffsets||null;let m=0;if(d)for(let e=0;e<d.length-1;e++){const t=d[e+1]-d[e];t>m&&(m=t)}else m=u;const x=Math.floor(1.1*m)+1;(null==c||c.length<2*x)&&(c=new Uint32Array((0,r.Sf)(2*x)));for(let e=0;e<2*x;e++)c[e]=0;let y=0;const v=!!d&&!!f,w=v?g:u;let b=(0,o.$z)(u);const A=new Uint32Array(g),C=1.96;let T=0!==h?Math.ceil(4*C*C/(h*h)*h*(1-h)):w,Z=1,_=d?d[1]:w;for(let e=0;e<w;e++){if(e===T){const t=1-y/e;if(t+C*Math.sqrt(t*(1-t)/e)<h)return null;T*=2}if(e===_){for(let e=0;e<2*x;e++)c[e]=0;if(f)for(let e=d[Z-1];e<d[Z];e++)A[e]=b[f[e]];_=d[++Z]}const n=v?f[e]:e,r=n*t,o=l(p,r,t);let i=o%x,a=y;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(s(p,r,e*t,t)){a=b[e];break}}i++,i>=x&&(i-=x)}a===y&&(c[2*i]=o,c[2*i+1]=n+1,y++),b[n]=a}if(0!==h&&1-y/u<h)return null;if(v){for(let e=d[Z-1];e<A.length;e++)A[e]=b[f[e]];b=(0,o.mi)(A)}const M=i?new Array(y):new Uint32Array(y*t);y=0;for(let e=0;e<w;e++)b[e]===y&&(a(p,(v?f[e]:e)*t,M,y*t,t),y++);if(f&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=b[f[t]];b=(0,o.mi)(e)}return{buffer:Array.isArray(M)?M:M.buffer,indices:b,uniqueCount:y}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},87697:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>ze,extractMesh:()=>Ne,meshFeatureSetFromJSON:()=>Ue});var r,o,i=n(38171),s=n(92604),a=n(6570),l=n(43697),c=n(20102),u=n(3920),p=n(83379),h=n(609),f=n(95330),g=n(17445),d=n(5600),m=(n(75215),n(67676),n(80442),n(52011)),x=n(65617),y=n(9361),v=n(94139),w=n(38913),b=n(3709),A=n(62540),C=n(2674),T=n(71630),Z=n(95401),_=n(86662),M=n(83025),S=n(24882),F=n(47545);function R(e,t,n){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const h=(0,M.bg)(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],d=n===r.CCW_IS_HOLE&&L(g);if(d&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const n={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=d?D(g,g.length-1,-1,h,f,g.length,t):D(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const r=i[e];n.holeIndices[e]=f,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=D(r,0,1,h,f,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=i[e];n.length>0&&(a[u++]={index:f,count:n.length}),f=D(n,0,1,h,f,n.length,t)}return s.length=c,a.length=u,{position:h,polygons:s,outlines:a}}function D(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,t+=n}return o/3}function L(e){return!(0,_.bu)(e,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var I=n(44547),E=n(13442),O=n(66459);const j=s.Z.getLogger("esri.geometry.support.meshUtils.centerAt");const P=(0,x.c)(),U=(0,x.c)();var N=n(17452);function z(e){const t=(0,N.Yd)(e.url);return n=>{const r=(0,N.PF)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}function k(e){const{assetUrl:t}=e;return new G(t)}function $(e){return G.fromBlob(e)}const W=/^(model\/gltf\+json)|(model\/gltf-binary)$/,H=/\.(gltf|glb)/i;function B(e){const t=new Map;let n=null;for(const{name:r,mimeType:o,source:i}of e)(null==n||W.test(o)||H.test(r))&&(n=i.url),t.set(r,i.url),i.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new G(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class G{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new G(t,(()=>URL.revokeObjectURL(t)))}}var V=n(2368),J=n(46791),Y=n(84470);let q=class extends V.j{constructor(){super(),this.externalSources=new J.Z,this._explicitDisplaySource=null}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,Y.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&!this.externalSources.some((t=>(0,Y.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.displaySource=null,this.externalSources.removeAll()}get _implicitDisplaySource(){return this.externalSources.find(Y.NZ)}};(0,l._)([(0,d.Cb)()],q.prototype,"externalSources",void 0),(0,l._)([(0,d.Cb)()],q.prototype,"displaySource",null),(0,l._)([(0,d.Cb)()],q.prototype,"_implicitDisplaySource",null),(0,l._)([(0,d.Cb)()],q.prototype,"_explicitDisplaySource",void 0),q=(0,l._)([(0,m.j)("esri.geometry.support.meshUtils.Metadata")],q);var K=n(21787),X=n(46521),Q=n(13598),ee=n(17896),te=n(58995),ne=n(56493);function re(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const oe=(0,x.c)(),ie=(0,Q.c)(),se=(0,X.c)(),ae={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function le(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];he[0]=n[0],he[4]=n[1],he[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)pe[n]=e.position[t+n];(0,ee.t)(pe,pe,he);for(let n=0;n<3;n++)e.position[t+n]=pe[n]}if(n[0]!==n[1]||n[1]!==n[2]){he[0]=1/n[0],he[4]=1/n[1],he[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)pe[n]=e.normal[t+n];(0,ee.t)(pe,pe,he),(0,ee.n)(pe,pe);for(let n=0;n<3;n++)e.normal[t+n]=pe[n]}}}(e,n?.size);const{vertexAttributes:r,transform:o}=(0,O.w1)(e,t,n);return{vertexAttributes:new T.Q({...r,uv:e.uv}),transform:o,components:[new A.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const ce={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},ue={south:0,east:1,north:2,west:3,up:4,down:5},pe=(0,x.c)(),he=(0,X.c)();var fe=n(52138);const ge=s.Z.getLogger("esri.geometry.support.meshUtils.rotate");function de(e,t,n,r=x.Z){if(null!=e){(0,fe.d)(ve,(0,b.WH)(t),(0,b.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)me[n]=e[t+n]-r[n];(0,ee.m)(me,me,ve);for(let n=0;n<3;n++)e[t+n]=me[n]+r[n]}}}const me=(0,x.c)(),xe=(0,x.c)(),ye=(0,b.Ue)(),ve=(0,Q.c)(),we=(0,X.c)(),be=(0,x.c)(),Ae=s.Z.getLogger("esri.geometry.support.meshUtils.scale");function Ce(e,t,n=x.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Te[t]=e[r+t]-n[t];(0,ee.g)(Te,Te,t);for(let t=0;t<3;t++)e[r+t]=Te[t]+n[t]}}const Te=(0,x.c)(),Ze=(0,x.c)(),_e=(0,x.c)();var Me;const Se="esri.geometry.Mesh";let Fe=Me=class extends((0,u.p)(p.Z.LoadableMixin((0,h.v)(y.Z)))){constructor(e){super(e),this.components=null,this.transform=null,this.metadata=new q,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new T.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,g.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _boundingInfo(){const e=this.vertexAttributes.position,t=this.spatialReference;if(0===e.length||this.components&&0===this.components.length)return{extent:new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t}),center:new v.Z({x:0,y:0,z:0,spatialReference:t})};const n=null!=this.transform?this.transform.project(e,t):e;let r=1/0,o=1/0,i=1/0,s=-1/0,l=-1/0,c=-1/0,u=0,p=0,h=0;const f=n.length,g=1/(f/3);let d=0;for(;d<f;){const e=n[d++],t=n[d++],a=n[d++];r=Math.min(r,e),o=Math.min(o,t),i=Math.min(i,a),s=Math.max(s,e),l=Math.max(l,t),c=Math.max(c,a),u+=g*e,p+=g*t,h+=g*a}return{extent:new a.Z({xmin:r,ymin:o,zmin:i,xmax:s,ymax:l,zmax:c,spatialReference:t}),center:new v.Z({x:u,y:p,z:h,spatialReference:t})}}get anchor(){if(null!=this.transform)return this.transform.getOriginPoint(this.spatialReference);const e=this._boundingInfo;return new v.Z({x:e.center.x,y:e.center.y,z:e.extent.zmin,spatialReference:this.spatialReference})}get origin(){return null!=this.transform?this.transform.getOriginPoint(this.spatialReference):this._boundingInfo.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._boundingInfo.extent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(A.Z.from(e)),this.notifyChange("components")):s.Z.getLogger(this.declaredClass).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.Z.getLogger(this.declaredClass).error("removeComponent()","Provided component is not part of the list of components")}else s.Z.getLogger(this.declaredClass).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,b.qw)(e,t,n,De),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const r=e.spatialReference;if(null!=e.transform){null!=n?.geographic&&n.geographic!==e.transform.geographic&&ge.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`);const o=n?.origin??e.transform.getOriginPoint(r);!function(e,t,n){const r=(0,ee.s)(me,n.x,n.y,n.z),o=(0,ee.b)(me,r,e.origin);e.applyLocalInverse(o,xe),e.rotation=(0,b.qC)(e.rotation,t,(0,b.Ue)()),e.applyLocalInverse(o,o),(0,ee.b)(o,o,xe),e.translation=(0,ee.a)((0,x.c)(),e.translation,o)}(e.transform,t,o)}else{const r=n?.origin??e.origin;(0,E.h)(e.spatialReference,n)?function(e,t,n){const r=e.spatialReference,o=(0,te.rS)(r),i=be;(0,I.KC)(n,i,o)||(0,I.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,I.Bm)(o,i,ve,o),(0,K.f)(we,ve);const h=ye;(0,ee.t)((0,b.ZZ)(ye),(0,b.ZZ)(t),we),h[3]=t[3],(0,ne.XO)(s,r,c),null!=a&&null!=u&&(0,ne.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,ne.wi)(l,s,c,r,p),de(c,h,3,i),(0,ne.To)(c,s,r),null!=a&&null!=u&&(de(u,h,3),(0,ne.Yk)(u,s,c,r,a)),null!=l&&null!=p&&(de(p,h,4),(0,ne.M2)(p,s,c,r,l)),e.vertexAttributesChanged()}(e,t,r):function(e,t,n){const r=be;if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,ge.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}de(e.vertexAttributes.position,t,3,r),de(e.vertexAttributes.normal,t,3),de(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,r)}}(this,De,r),this}offset(e,t,n,r){return this.loaded?(Re[0]=e,Re[1]=t,Re[2]=n,function(e,t,n){e.vertexAttributes&&e.vertexAttributes.position&&(null!=e.transform?(null!=n?.geographic&&n.geographic!==e.transform.geographic&&s.Z.getLogger("esri.geometry.support.meshUtils.offset").warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`),function(e,t){const n=e.origin;e.origin=(0,ee.a)((0,x.c)(),n,t)}(e.transform,t)):(0,E.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=o?new Float32Array(o.length):null,l=null!=i?new Float32Array(i.length):null,c=e.extent.center,u=oe;(0,I.Bm)(n,[c.x,c.y,c.z],ie,(0,te.rS)(n)),(0,K.f)(se,ie),(0,ee.t)(u,t,se),(0,ne.XO)(r,n,s),null!=o&&null!=a&&(0,ne.Iz)(o,r,s,n,a),null!=i&&null!=l&&(0,ne.wi)(i,r,s,n,l),re(s,u),(0,ne.To)(s,r,n),null!=o&&null!=a&&(0,ne.Yk)(a,r,s,n,o),null!=i&&null!=l&&(0,ne.M2)(l,r,s,n,i),e.vertexAttributesChanged()}(e,t):function(e,t){re(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t))}(this,Re,r),this):(s.Z.getLogger(this.declaredClass).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const r=e.spatialReference;if(null!=e.transform){null!=n?.geographic&&n.geographic!==e.transform.geographic&&Ae.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`);const o=n?.origin??e.transform.getOriginPoint(r);!function(e,t,n){const r=(0,ee.s)(Te,n.x,n.y,n.z),o=(0,ee.b)(Te,r,e.origin);e.applyLocalInverse(o,Ze);const i=(0,ee.g)((0,x.c)(),e.scale,t);e.scale=i,e.applyLocalInverse(o,o),(0,ee.b)(o,o,Ze),e.translation=(0,ee.a)((0,x.c)(),e.translation,o)}(e.transform,t,o)}else{const r=(0,E.h)(e.spatialReference,n),o=n&&n.origin||e.origin;r?function(e,t,n){const r=e.spatialReference,o=(0,te.rS)(r),i=_e;(0,I.KC)(n,i,o)||(0,I.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,ne.XO)(s,r,c),null!=a&&null!=u&&(0,ne.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,ne.wi)(l,s,c,r,p),Ce(c,t,i),(0,ne.To)(c,s,r),null!=a&&null!=u&&(0,ne.Yk)(u,s,c,r,a),null!=l&&null!=p&&(0,ne.M2)(p,s,c,r,l),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=_e;if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,Ae.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}Ce(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,o)}}(this,e,t),this):(s.Z.getLogger(this.declaredClass).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const r=n?.origin??e.origin;null!=e.transform?(null!=n?.geographic&&n.geographic!==e.transform.geographic&&j.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`),function(e,t,n){const r=t.x-n.x,o=t.y-n.y,i=t.hasZ&&n.hasZ?t.z-n.z:0,s=e.origin;e.origin=[s[0]+r,s[1]+o,s[2]+i]}(e.transform,t,r)):(0,E.h)(e.spatialReference,n)?function(e,t,n){const r=(0,O.FF)(e.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,O.iv)(r,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,r):function(e,t,n){const r=U,o=P;if((0,I.KC)(t,o,e.spatialReference)){if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,j.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else j.error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid})`)}(e,t,r)}(this,e,t),this):(s.Z.getLogger(this.declaredClass).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:o}=t,{loadGLTFMesh:i}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=function(e){if(Array.isArray(e)){if(!e.length)throw new c.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?B(e.map((e=>({name:e.name,mimeType:e.type,source:$(e)})))):function(e){return B(e.map((e=>({name:e.assetName,mimeType:e.assetMimeType,source:k(e)}))))}(e)}return e instanceof File?$(e):k(e)}(o),a=i(new v.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:z(s),useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:u}=await a;e.vertexAttributes=l,e.components=u}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){let e=null;if(this.components){const t=new Map,n=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,n)))}const t={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),transform:null!=this.transform?this.transform.clone():null,metadata:this.metadata.clone()};return new Me(t)}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:i}=o[0];return i(this,e)}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof v.Z))return s.Z.getLogger(Se).error(".createBox()","expected location to be a Point instance"),null;const n=new Me(le(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=ce,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<e.length;r++){const h=e[r],f=l/3;for(const e of t)a[p++]=f+e;const g=h.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[u++]=.25*n[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==h.axis[e]?(o[l++]=.5*h.axis[e],i[c++]=h.axis[e]):(o[l++]=.5*t[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=ue[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new A.Z({faces:s,material:n.material}),new A.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof v.Z?new Me(le(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);pe[2]=f;const g=0===e||e===t,d=g?n-1:n;for(let r=0;r<=d;r++){const f=r/d*2*Math.PI;pe[0]=-Math.sin(f)*h,pe[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*pe[e],i[l]=pe[e],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==e&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(Se).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof v.Z?new Me(le(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const n=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){const m=d/g*2*Math.PI,x=n?0:.5;pe[0]=x*Math.sin(m),pe[1]=x*-Math.cos(m),pe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=pe[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:pe[t]/x;i[c++]=(d+(n?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,f||0===e||d===t||(5!==e&&(s[u++]=p,s[u++]=p+1,s[u++]=p-t),1!==e&&(s[u++]=p,s[u++]=p-t,s[u++]=p-t-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(Se).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof v.Z))return s.Z.getLogger(Se).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new Me(le(function(e){const t=ae.facingAxisOrderSwap[e],n=ae.position,r=ae.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[e+c]*u,i[s]=r[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(ae.uv),faces:new Uint32Array(ae.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(Se).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=R(e.rings,e.hasZ,r.CCW_IS_HOLE),n=new Array;let o=0,i=0;for(const e of t.polygons){const r=e.count,s=e.index,a=(0,M.Rq)(t.position,3*s,3*r),l=e.holeIndices.map((e=>e-s)),c=(0,S.mi)((0,Z.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,n){if(1===e.length)return e[0];const r=(0,M.bg)(t),o=new Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,S.mi)(o)}}(n,o,i),a=Array.isArray(s.position)?(0,F.d)(s.position,3,{originalIndices:s.faces}):(0,F.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=(0,M.QZ)(new Float64Array(a.buffer)),s.faces=a.indices,s}(e);return new Me({vertexAttributes:new T.Q({position:n.position}),components:[new A.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference})}static async createFromGLTF(e,t,r){if(!(e instanceof v.Z))throw s.Z.getLogger(Se).error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Me(await o(e,t,r))}static createWithExternalSource(e,t,n){const r=n?.extent??null,o=n?.transform?.clone()??new C.Z;o.origin=[e.x,e.y,e.z??0];const i=e.spatialReference,s={source:t,extent:r},a=new q;return a.externalSources.push(s),new Me({metadata:a,transform:o,spatialReference:i})}static createIncomplete(e,t){const n=t?.transform?.clone()??new C.Z;n.origin=[e.x,e.y,e.z??0];const r=e.spatialReference,o=new Me({transform:n,spatialReference:r});return o.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),o}};(0,l._)([(0,d.Cb)({type:[A.Z],json:{write:!0}})],Fe.prototype,"components",void 0),(0,l._)([(0,d.Cb)({type:C.Z,json:{write:!0}})],Fe.prototype,"transform",void 0),(0,l._)([(0,d.Cb)({constructOnly:!0})],Fe.prototype,"metadata",void 0),(0,l._)([(0,d.Cb)({readOnly:!0})],Fe.prototype,"hasExtent",null),(0,l._)([(0,d.Cb)({readOnly:!0})],Fe.prototype,"_boundingInfo",null),(0,l._)([(0,d.Cb)({readOnly:!0})],Fe.prototype,"anchor",null),(0,l._)([(0,d.Cb)({readOnly:!0})],Fe.prototype,"origin",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],Fe.prototype,"extent",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Fe.prototype,"hasZ",void 0),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Fe.prototype,"hasM",void 0),(0,l._)([(0,d.Cb)({type:T.Q,nonNullable:!0,json:{write:!0}})],Fe.prototype,"vertexAttributes",void 0),Fe=Me=(0,l._)([(0,m.j)(Se)],Fe);const Re=(0,x.c)(),De=(0,b.Ue)(),Le=Fe;var Ie,Ee,Oe=n(82971),je=n(2981),Pe=n(74889);function Ue(e,t,n){const r=n.features;n.features=[],delete n.geometryType;const o=Pe.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=ze(t,n.assetMaps),a=o.spatialReference??Oe.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(p=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!p)return e;for(const t in e)p.has(t)||delete e[t];return e}):()=>({});var p;for(const e of r){const n=Ne(e,l,a,t,s);null!=n&&o.features.push(new i.Z({geometry:n,attributes:u(e)}))}return o}function Ne(e,t,n,r,o){const i=e.attributes[t],s=o.get(i);if(null==s||s.status===Ie.FAILED||null==s.url)return null;const l=function({attributes:e},t,{transformFieldRoles:n}){return new v.Z({x:e[n.originX],y:e[n.originY],z:e[n.originZ],spatialReference:t})}(e,n,r),c=a.Z.fromJSON(e.geometry);c.spatialReference=n;const u=function(e,{transformFieldRoles:t},n){return new C.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotation:(0,b.uT)([e[t.rotationX],e[t.rotationZ],e[t.rotationY]],e[t.rotationDeg]),scale:[e[t.scaleX],e[t.scaleY],e[t.scaleZ]],geographic:n})}(e.attributes,r,s.projectVertices);return s.status===Ie.PENDING?Le.createIncomplete(l,{extent:c,transform:u}):Le.createWithExternalSource(l,function(e){return{assetUrl:e.url,assetName:e.name,assetHash:e.hash,assetMimeType:e.mimeType}}(s),{extent:c,transform:u})}function ze(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const o=r.assetName,i=r.assetType,a=r.assetHash,l=r.assetURL,c=r.conversionStatus,u=(0,je.rm)(i,e.supportedFormats);if(!u){s.Z.getLogger("esri.rest.support.meshFeatureSet").error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}let p=n.get(t);if(null==p)switch(p={name:o,type:i,mimeType:u,hash:a,status:Ie.FAILED,url:l,projectVertices:ke(r.flags).projectVertices},n.set(t,p),c){case"COMPLETED":case"SUBMITTED":p.status=Ie.COMPLETED;break;case"INPROGRESS":p.status=Ie.PENDING;break;default:p.status=Ie.FAILED}else console.warn(`Multiple asset parts not expected. Ignoring additional parts. conflicting assetname: ${r.assetName}`)}return n}function ke(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(Ee=Ie||(Ie={}))[Ee.FAILED=0]="FAILED",Ee[Ee.PENDING=1]="PENDING",Ee[Ee.COMPLETED=2]="COMPLETED"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9037],{22303:(e,t,s)=>{s.d(t,{Z:()=>c});var i,r,n=s(35270),l=s(22021),a=s(75215);function h(e){return(0,l.uZ)((0,a.vU)(e),0,255)}function o(e,t,s){return e=Number(e),isNaN(e)?s:e<t?t:e>s?s:e}class u{static blendColors(e,t,s,i=new u){return i.r=Math.round(e.r+(t.r-e.r)*s),i.g=Math.round(e.g+(t.g-e.g)*s),i.b=Math.round(e.b+(t.b-e.b)*s),i.a=e.a+(t.a-e.a)*s,i._sanitize()}static fromRgb(e,t){const s=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(s){const e=s[2].split(/\s*,\s*/),i=s[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const s=e[0];if("%"===s.charAt(s.length-1)){const s=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(s[3]=parseFloat(e[3])),u.fromArray(s,t)}return u.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return u.fromArray((0,n.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new u){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const s=4===e.length?4:8,i=(1<<s)-1;let r=Number("0x"+e.substr(1));return isNaN(r)?null:(["b","g","r"].forEach((e=>{const n=r&i;r>>=s,t[e]=4===s?17*n:n})),t.a=1,t)}static fromArray(e,t=new u){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const s=(0,n.St)(e)?(0,n.h$)(e):null;return s&&u.fromArray(s,t)||u.fromRgb(e,t)||u.fromHex(e,t)}static fromJSON(e){return e&&new u([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?u.fromString(e,this):Array.isArray(e)?u.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof u||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),s=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${s.length<2?"0"+s:s}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=u.AlphaMode.ALWAYS){const t=h(this.r),s=h(this.g),i=h(this.b);return e===u.AlphaMode.ALWAYS||1!==this.a?[t,s,i,h(255*this.a)]:[t,s,i]}clone(){return new u(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(o(this.r,0,255)),this.g=Math.round(o(this.g,0,255)),this.b=Math.round(o(this.b,0,255)),this.a=o(this.a,0,1),this}_set(e,t,s,i){this.r=e,this.g=t,this.b=s,this.a=i}}u.prototype.declaredClass="esri.Color",(r=(i=u||(u={})).AlphaMode||(i.AlphaMode={}))[r.ALWAYS=0]="ALWAYS",r[r.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const c=u},92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,r=s(43697),n=s(96674),l=s(70586),a=s(35463),h=s(5600),o=(s(75215),s(67676),s(80442),s(71715)),u=s(52011),c=s(30556);let g=i=class extends n.wq{static get allTime(){return m}static get empty(){return d}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===i&&s===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,a.JE)(t,e))),s=(0,l.yw)(this.end,(t=>{const s=(0,a.JE)(t,e);return t.getTime()===s.getTime()?s:(0,a.Nm)(s,1,e)}));return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let l,a;if(r>=t&&r<=s?l=r:t>=r&&t<=n&&(l=t),s>=r&&s<=n?a=s:n>=t&&n<=s&&(a=n),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:r,end:n}=this;return null!=r&&(s.start=(0,a.Nm)(r,e,t)),null!=n&&(s.end=(0,a.Nm)(n,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r._)([(0,h.Cb)({type:Date,json:{write:{allowNull:!0}}})],g.prototype,"end",void 0),(0,r._)([(0,o.r)("end")],g.prototype,"readEnd",null),(0,r._)([(0,c.c)("end")],g.prototype,"writeEnd",null),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],g.prototype,"isAllTime",null),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],g.prototype,"isEmpty",null),(0,r._)([(0,h.Cb)({type:Date,json:{write:{allowNull:!0}}})],g.prototype,"start",void 0),(0,r._)([(0,o.r)("start")],g.prototype,"readStart",null),(0,r._)([(0,c.c)("start")],g.prototype,"writeStart",null),g=i=(0,r._)([(0,u.j)("esri.TimeExtent")],g);const m=new g,d=new g({start:void 0,end:void 0}),f=g},35270:(e,t,s)=>{s.d(t,{B7:()=>h,St:()=>r,VL:()=>l,h$:()=>n,rW:()=>o});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(e){return!!i[e]||!!i[e.toLowerCase()]}function n(e){return i[e]??i[e.toLowerCase()]}function l(e){return[...n(e)]}function a(e,t,s){s<0&&++s,s>1&&--s;const i=6*s;return i<1?e+(t-e)*i:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}function h(e,t,s,i=1){const r=(e%360+360)%360/360,n=s<=.5?s*(t+1):s+t-s*t,l=2*s-n;return[Math.round(255*a(l,n,r+1/3)),Math.round(255*a(l,n,r)),Math.round(255*a(l,n,r-1/3)),i]}function o(e){const t=e.length>5,s=t?8:4,i=(1<<s)-1,r=t?1:17,n=t?9===e.length:5===e.length;let l=Number("0x"+e.substr(1));if(isNaN(l))return null;const a=[0,0,0,1];let h;return n&&(h=l&i,l>>=s,a[3]=r*h/255),h=l&i,l>>=s,a[2]=r*h,h=l&i,l>>=s,a[1]=r*h,h=l&i,l>>=s,a[0]=r*h,a}},46791:(e,t,s)=>{s.d(t,{Z:()=>T});var i,r=s(43697),n=s(3894),l=s(32448),a=s(22974),h=s(70586),o=s(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var u,c=s(1654),g=s(75215),m=s(58971),d=s(5600),f=s(52421),b=s(52011),_=s(10661);const p=new o.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),v=()=>{};function y(e){return e?e instanceof N?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function A(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function E(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),E(e,s.call(i,t,r,n),s,i)}))}const M=new Set,C=new Set,D=new Set,k=new Map;let O=0,N=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new _.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:O++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,m.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,y(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=v,s.removed=!0,e.splice(e.indexOf(s),1)}}}return this._emitter.on(e,t)}once(e,t){const s=this.on(e,t);return{remove(){s.remove()}}}add(e,t){if((0,m.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,m.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,y(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,m.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...e){(0,m.it)(this._observable);const t=e.map(y);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=(0,h.j0)(this._splice(0,this.length)),r=s.length;for(let i=0;i<r;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,m.it)(this._observable),this._items.every(e,t)}filter(e,t){let s;return(0,m.it)(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return(0,m.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,m.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,m.it)(this._observable);const s=[];return E(s,this,e,t),new u(s)}forEach(e,t){return(0,m.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,m.it)(this._observable),this._items[e]}getNextIndex(e){(0,m.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,m.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,m.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,m.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,m.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,m.it)(this._observable);const s=this._items.map(e,t);return new u({items:s})}reorder(e,t=this.length-1){(0,m.it)(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,m.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,m.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,m.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,m.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,m.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,m.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof u?e.toArray():e,s=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=s.indexOf(i);if(n>-1){const i=1+A(t,s,e+1,n+1),l=this._splice(n,i);l&&l.length>0&&r.push.apply(r,l),e+=i-1}}return this._emitAfterChanges(i.REMOVE),r}reverse(){if((0,m.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,m.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,m.it)(this._observable),this._items.some(e,t)}sort(e){if((0,m.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,h.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...s){(0,m.it)(this._observable);const r=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,s)||[];return this._emitAfterChanges(r),n}toArray(){return(0,m.it)(this._observable),this._items.slice()}toJSON(){return(0,m.it)(this._observable),this.toArray()}toLocaleString(){return(0,m.it)(this._observable),this._items.toLocaleString()}toString(){return(0,m.it)(this._observable),this._items.toString()}unshift(...e){return(0,m.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=i.splice(e,t),this.hasEventListener("before-remove")){const t=p.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=l.length;s<r;s++)n=l[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);p.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=p.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let s=0;s<t;s++)e.reset(l[s]),this.emit("after-remove",e);p.release(e)}}if(s&&s.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=p.acquire();r.target=this,r.cancellable=!0;const a=p.acquire();a.target=this,a.cancellable=!1;for(const h of s)t?(r.reset(h),this.emit("before-add",r),r.defaultPrevented||(l?i.push(h):i.splice(e++,0,h),this._set("length",i.length),n&&(a.reset(h),this.emit("after-add",a)))):(l?i.push(h):i.splice(e++,0,h),this._set("length",i.length),a.reset(h),this.emit("after-add",a));p.release(a),p.release(r)}else{if(l)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}return(s&&s.length||l&&l.length)&&this._notifyChangeEvent(s,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=p.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,p.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=p.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),p.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;M.clear(),C.clear(),D.clear();for(const{added:t,removed:s}of e){if(t)if(0===D.size&&0===C.size)for(const e of t)M.add(e);else for(const e of t)C.has(e)?(D.add(e),C.delete(e)):D.has(e)||M.add(e);if(s)if(0===D.size&&0===M.size)for(const e of s)C.add(e);else for(const e of s)M.has(e)?M.delete(e):(D.delete(e),C.add(e))}const s=n.Z.acquire();M.forEach((e=>{s.push(e)}));const i=n.Z.acquire();C.forEach((e=>{i.push(e)}));const r=this._items,l=t.items,a=n.Z.acquire();if(D.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&a.push(e)})),t.listeners&&(s.length||i.length||a.length)){const e={target:this,added:s,removed:i,moved:a},r=t.listeners.length;for(let s=0;s<r;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}n.Z.release(s),n.Z.release(i),n.Z.release(a)}M.clear(),C.clear(),D.clear()}};N.ofType=e=>{if(!e)return u;if(k.has(e))return k.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const s in e.typeMap){const i=e.typeMap[s].prototype.declaredClass;t?t+=` | ${i}`:t=i}let s=class extends u{};return(0,r._)([(0,f.c)({Type:e,ensureType:"function"==typeof e?(0,g.se)(e):(0,g.N7)(e)})],s.prototype,"itemType",void 0),s=(0,r._)([(0,b.j)(`esri.core.Collection<${t}>`)],s),k.set(e,s),s},(0,r._)([(0,d.Cb)()],N.prototype,"length",void 0),(0,r._)([(0,d.Cb)()],N.prototype,"items",null),N=u=(0,r._)([(0,b.j)("esri.core.Collection")],N);const T=N},68251:(e,t,s)=>{s.d(t,{BV:()=>l});var i=s(22021);class r{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,s,i=0,r=!1){return(s-=i)<e?s+=this.ndiff(e-s):s>t&&(s-=this.ndiff(s-t)),r&&s===t&&(s=e),s+i}normalize(e,t=0,s=!1){return this._normalize(this.min,this.max,e,t,s)}clamp(e,t=0){return(0,i.uZ)(e-t,this.min,this.max)+t}monotonic(e,t,s){return e<t?t:t+this.ndiff(e-t,s)}minimalMonotonic(e,t,s){return this._normalize(e,e+this.range,t,s)}center(e,t,s){return t=this.monotonic(e,t,s),this.normalize((e+t)/2,s)}diff(e,t,s){return this.monotonic(e,t,s)-e}shortestSignedDiff(e,t){e=this.normalize(e);const s=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(s)<Math.abs(i)?s:i}contains(e,t,s){return t=this.minimalMonotonic(e,t),(s=this.minimalMonotonic(e,s))>e&&s<t}}function n(e){for(const t in e){const s=e[t];s instanceof Function&&(e[t]=s.bind(e))}return e}n(new r(0,2*Math.PI)),n(new r(-Math.PI,Math.PI));const l=n(new r(0,360))},52421:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{c:()=>i})},70921:(e,t,s)=>{s.d(t,{R:()=>n,Z:()=>r});var i=s(46791);function r(e,t,s=i.Z){return t||(t=new s),t===e||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function n(e){return e}},35463:(e,t,s)=>{s.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>a}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=r[s],{getter:n,setter:l,multiplier:a}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[l](i[n]()+t*a)}return i}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,s){return 0===e?0:e*i[t]/i[s]}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5587],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(15923),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(){this._resolver=(0,a.hh)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.hh)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},70171:(t,e,r)=>{let o;r.d(e,{Kd:()=>l,Ze:()=>p,qe:()=>a});const s=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return s??globalThis.navigator?.language??"en"}function l(){return void 0===o&&(o=i()),o}const n=[];function a(t){return n.push(t),{remove(){n.splice(n.indexOf(t),1)}}}const u=[];function p(t){return u.push(t),{remove(){n.splice(u.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=i();o!==t&&(o=t,[...u].forEach((e=>{e.call(null,t)})),[...n].forEach((e=>{e.call(null,t)})))}))},65587:(t,e,r)=>{r.d(e,{Z:()=>U});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171),C=r(41253),b=r(15923);let f=class extends b.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],f.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],f.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],f.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],f.prototype,"total",void 0),f=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],f);const g=f;var S,P=r(86082),O=r(71058);let w;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let G=S=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.default.portalUrl,this.urlKey=null,this.user=null,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){E.unregister(this),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.default.request.trustedServers.includes(e)||s.default.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=P.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(3668)]).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),w=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==S.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),E.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(4547),r.e(5235),r.e(9157),r.e(2763),r.e(9393)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}fetchBasemaps(t,e){const r=new C.Z;return r.query=t||(s.default.apiKey&&(0,O.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0,this.queryGroups(r,e).then((t=>{if(r.num=100,r.query='type:"Web Map" -type:"Web Application"',t.total){const o=t.results[0];return r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc",o.queryItems(r,e)}return null})).then((t=>{let e;return e=t&&t.total?t.results.filter((t=>"Web Map"===t.type)).map((t=>new w({portalItem:t}))):[],e}))}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return S._default&&!S._default.destroyed||(S._default=new S),S._default}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new g({nextQueryParams:r,queryParams:s,total:t.total,results:S._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===S.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=S._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===S.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new S({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=w.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};G.AUTH_MODE_ANONYMOUS="anonymous",G.AUTH_MODE_AUTO="auto",G.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],G.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],G.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],G.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],G.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],G.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],G.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],G.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],G.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],G.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],G.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],G.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],G.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],G.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],G.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],G.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],G.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],G.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],G.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],G.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],G.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],G.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],G.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],G.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],G.prototype,"vectorBasemapGalleryGroupQuery",void 0),G=S=(0,o._)([(0,m.j)("esri.portal.Portal")],G);const U=G,E=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var o=r(43697),s=r(20102),i=r(96674),l=r(70586),n=r(5600),a=r(75215),u=(r(67676),r(80442),r(52011)),p=r(41253);let d=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return(0,l.s3)(this.portal).request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return(0,l.s3)(this.portal).request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,a.se)(p.Z,t);const o=(0,l.s3)(this.portal);return parseFloat(o.currentVersion)>5?(r=r||new p.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=(0,l.s3)(this.portal);return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,n.Cb)()],d.prototype,"access",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"description",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"owner",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"portal",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"snippet",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortField",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"tags",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,n.Cb)()],d.prototype,"title",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"url",null),d=(0,o._)([(0,u.j)("esri.portal.PortalGroup")],d);const h=d},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(15923),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3974],{3920:(e,t,r)=>{r.d(t,{p:()=>u,r:()=>p});var n=r(43697),s=r(15923),o=r(61247),i=r(5600),a=r(52011),l=r(72762);const u=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new o.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,n._)([(0,i.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,n._)([(0,i.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,n._)([(0,a.j)("esri.core.HandleOwner")],t),t};let p=class extends(u(s.Z)){};p=(0,n._)([(0,a.j)("esri.core.HandleOwner")],p)},64830:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(70586);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,n.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,n.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},72762:(e,t,r)=>{r.d(t,{t:()=>p});var n=r(43697),s=r(15923),o=r(61247),i=r(17445),a=r(1654),l=r(5600),u=r(52011);let p=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new o.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,r={}){return this._installWatch(e,t,r,i.YP)}addWhen(e,t,r={}){return this._installWatch(e,t,r,i.gx)}addOnCollectionChange(e,t,{initial:r=!1,final:n=!1}={}){const s=++this._handleId;return this._handles.add([(0,i.on)(e,"after-changes",this._createSyncUpdatingCallback(),i.Z_),(0,i.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:n?e=>t({added:[],removed:e.toArray()}):void 0})],s),{remove:()=>this._handles.remove(s)}}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const r=()=>this._handles.remove(t);return e.then(r,r),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,r={},n){const s=++this._handleId;r.sync||this._installSyncUpdatingWatch(e,s);const o=n(e,t,r);return this._handles.add(o,s),{remove:()=>this._handles.remove(s)}}_installSyncUpdatingWatch(e,t){const r=this._createSyncUpdatingCallback(),n=(0,i.YP)(e,r,{sync:!0,equals:()=>!1});return this._handles.add(n,t),n}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,n._)([(0,l.Cb)({readOnly:!0})],p.prototype,"updating",void 0),p=(0,n._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],p);const c=-42},80903:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(50758),s=r(92604),o=r(95330),i=r(64830),a=r(728);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((r,n)=>{let s=!0;const i=e=>{(0,o.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const l=e[s];(0,o.y8)(l)?this._clientPromises[s]=l.then((e=>(this._clients[s]=new a.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),i(r),this._clients[s])),(()=>(i(n),null))):(this._clients[s]=new a.default(l,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[s]=Promise.resolve(this._clients[s]),i(r))}}))}broadcast(e,t,r){const n=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const o=this._clientPromises[s];n[s]=o.then((n=>n?.invoke(e,t,r)))}return n}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,o.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0}invoke(e,t,r){let n;Array.isArray(r)?(s.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),n={transferList:r}):n=r;const i=(0,o.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:n,resolver:i});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return i.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,n.AL)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then((s=>{s&&(t[n]=s.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},78346:(e,t,r)=>{r.d(t,{bA:()=>q});var n=r(20102),s=r(80442),o=r(95330),i=r(80903),a=r(728),l=r(40330),u=r(92604),p=r(70586),c=r(94362),d=r(99880),y=r(68773),h=(r(2587),r(17452));const f={};function m(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=f.baseUrl),t}var g=r(41213);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class b{constructor(){this._dispatcher=new w,this._workerPostMessage({type:c.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,g.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,g.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,c.QM)(e);if(t&&t.type===c.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let n=await a.default.loadWorker(e);n||(n=await import(e));const s=a.default.connect(n);this._workerPostMessage({type:c.MessageType.OPENED,jobId:r,data:s})}}}var v=r(70171),_=r(17202);const S=u.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:C}=c.MessageType;let F,P;const k="Failed to create Worker. Fallback to execute module in main thread";async function x(e){return new Promise((t=>{function r(s){const o=(0,c.QM)(s);o&&o.type===C&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),S.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new b).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}function O(){let e;if(null!=y.default.default){const t={...y.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(y.default));e.assetsPath=(0,h.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,h.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.Kd)(),e.has={"esri-csp-restrictions":(0,s.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,s.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,s.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,s.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,s.Z)("esri-atomics"),"esri-shared-array-buffer":(0,s.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.Z)("feature-polyline-generalization-factor"),"host-webworker":1,"polylabel-placement-enabled":(0,s.Z)("polylabel-placement-enabled")},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,h.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,h.hF)(e.workers.workerPath):e.workers.workerPath=(0,h.hF)((0,d.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=y.default.workers.loaderConfig,r=m({baseUrl:t?.baseUrl,locale:(0,v.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={buildDate:_.r,fullVersion:l.bR,revision:_.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}let E=0;const{ABORT:T,INVOKE:R,OPEN:N,OPENED:j,RESPONSE:I}=c.MessageType;class Z{static async create(e){const t=await async function(){if(!(0,s.Z)("esri-workers")||((0,s.Z)("mozilla"),0))return x(new b);if(!F&&!P)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${O()}'`);F=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){P=e||{}}let e;if(F)try{e=new Worker(F,{name:"esri-worker-"+E++})}catch(t){S.warn(k,P),e=new b}else S.warn(k,P),e=new b;return x(e)}();return new Z(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,c.jt)();return new Promise(((t,s)=>{const i={resolve:t,reject:s,abortHandle:(0,o.$F)(r,(()=>{this._outJobs.delete(n),this._post({type:T,jobId:n})}))};this._outJobs.set(n,i),this._post({type:N,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case j:this._onOpenedMessage(t);break;case I:this._onResponseMessage(t);break;case T:this._onAbortMessage(t);break;case R:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,i=s?new AbortController:null,a=this._inJobs,u=l.Nv[t];let p;try{if("function"!=typeof u)throw new TypeError(`${t} is not a function`);p=u.call(null,n,{signal:i?i.signal:null})}catch(e){return void this._post({type:I,jobId:r,error:(0,c.AB)(e)})}(0,o.y8)(p)?(a.set(r,{controller:i,promise:p}),p.then((e=>{a.has(r)&&(a.delete(r),this._post({type:I,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.D_)(e)||this._post({type:I,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:I,jobId:r},p)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,p.hw)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,p.hw)(o.abortHandle),r?o.reject(n.Z.fromJSON(JSON.parse(r))):o.resolve(s))}_post(e,t,r){return(0,c.oi)(this.worker,e,t,r)}}const A=Math.min(navigator.hardwareConcurrency-1,(0,s.Z)("workers-pool-size"));let M=(0,s.Z)("esri-mobile")?Math.min(A,3):(0,s.Z)("host-browser")?A:0;M||(M=(0,s.Z)("safari")&&(0,s.Z)("mac")?7:2);let U=0;const L=[];async function D(e,t){const r=new i.Z;return await r.open(e,t),r}async function q(e,t={}){if("string"!=typeof e)throw new n.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.Z)("host-webworker")&&!(0,s.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,o.k_)(t.signal);const n=t.client||r;return D([a.default.connect(r)],{...t,client:n})}if(await async function(){if(J)return J;G=new AbortController;const e=[];for(let t=0;t<M;t++){const r=Z.create(t).then((e=>(L[t]=e,e)));e.push(r)}return J=Promise.all(e),J}(),(0,o.k_)(t.signal),"dedicated"===r){const r=U++%M;return D([await L[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,M);if(r<M){const n=new Array(r);for(let s=0;s<r;++s){const r=U++%M;n[s]=L[r].open(e,t)}return D(n,t)}}return D(L.map((r=>r.open(e,t))),t)}let G,J=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var n=r(94443),s=r(3172),o=r(20102);async function i(e){if(null!=l.fetchBundleAsset)return l.fetchBundleAsset(e);const t=await(0,s.default)(e,{responseType:"text"});return JSON.parse(t.data)}class a{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let n;n="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=n,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const a=t.exec(r);if(!a)throw new o.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",u=a[2],p=(0,n.Su)(s),c=`${l}${u}.json`,d=p?`${l}${u}_${p}.json`:c;let y;try{y=await i(e(d))}catch(t){if(d===c)throw new o.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{y=await i(e(c))}catch(e){throw new o.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return y}(this.getAssetUrl,this.matcher,e,t)}}const l={};var u,p=r(99880);(0,n.tz)((u={pattern:"esri/",location:p.V},new a(u)))},940:(e,t,r)=>{r.d(t,{n:()=>u});var n=r(92604),s=r(78286),o=r(19153),i=r(90344),a=r(18848);const l=n.Z.getLogger("esri.intl.substitute");function u(e,t,r={}){const{format:n={}}=r;return(0,o.gx)(e,(e=>function(e,t,r){let n,o;const i=e.indexOf(":");if(-1===i?n=e.trim():(n=e.slice(0,i).trim(),o=e.slice(i+1).trim()),!n)return"";const a=(0,s.hS)(n,t);if(null==a)return"";const l=(o?r?.[o]:null)??r?.[n];return l?p(a,l):o?c(a,o):d(a)}(e,t,n)))}function p(e,t){switch(t.type){case"date":return(0,i.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),d(e)}}function c(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):d(e)}}function d(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.p6)(e):""}}},12653:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Q});var n=r(43697),s=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),i=r(16453),a=r(78286),l=r(17452),u=r(5600),p=r(75215),c=(r(67676),r(80442)),d=r(52011),y=r(30556),h=r(86973),f=r(87085),m=r(20102),g=r(3920),w=r(83379),b=r(95330),v=r(78346),_=r(25278),S=r(51432),C=r(74889),F=r(6570);let P=class extends((0,g.p)(w.Z)){constructor(){super(...arguments),this._connection=null,this.capabilities=(0,_.MS)(!1,!1),this.type="wfs",this.refresh=(0,b.Ds)((async e=>{await this.load();const{extent:t}=await this._connection.invoke("refresh",e);return t&&(this.sourceJSON.extent=t),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return C.Z.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)}async queryObjectIds(e,t={}){return await this.load(t),this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._connection.invoke("queryExtent",e?e.toJSON():null,t);return{count:r.count,extent:F.Z.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke("querySnapping",e,t)}async _createLoadOptions(e){const{url:t,customParameters:r,name:n,namespaceUri:s,spatialReference:o,fields:i,geometryType:a,swapXY:l}=this.layer;if(!t)throw new m.Z("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,S.FU)(t,{customParameters:r,...e}));const u=["fields","geometryType","name","namespaceUri","spatialReference","swapXY"].some((e=>null==this.layer[e])),p=u?await(0,S.be)(this.wfsCapabilities,n,s,{spatialReference:o,customParameters:r,signal:e?.signal}):{...(0,S.eB)(i??[]),geometryType:a,name:n,namespaceUri:s,spatialReference:o,swapXY:l},c=(0,S.ft)(this.wfsCapabilities.readFeatureTypes(),p.name,p.namespaceUri),d=h.M.toJSON(p.geometryType);return{customParameters:r,featureType:c,fields:p.fields?.map((e=>e.toJSON()))??[],geometryField:p.geometryField,geometryType:d,getFeatureUrl:this.wfsCapabilities.operations.GetFeature.url,getFeatureOutputFormat:this.wfsCapabilities.operations.GetFeature.outputFormat,objectIdField:p.objectIdField,spatialReference:p.spatialReference.toJSON(),swapXY:!!p.swapXY}}async _startWorker(e){const[t,r]=await(0,b.as)([this._createLoadOptions(e),(0,v.bA)("WFSSourceWorker",{...e,strategy:(0,c.Z)("feature-layers-workers")?"dedicated":"local"})]),n=t.error||r.error||null,s=r.value||null;if(n)throw s&&s.close(),n;const o=t.value;this._connection=r.value;const i=(await this._connection.invoke("load",o,e)).extent;this.sourceJSON={extent:i,fields:o.fields,geometryType:o.geometryType,objectIdField:o.objectIdField,geometryField:o.geometryField,drawingInfo:(0,_.bU)(o.geometryType),name:o.featureType.title,wfsInfo:{name:o.featureType.name,featureUrl:o.getFeatureUrl,maxFeatures:3e3,swapXY:o.swapXY,supportedSpatialReferences:o.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:o.featureType.namespaceUri}}}};(0,n._)([(0,u.Cb)()],P.prototype,"capabilities",void 0),(0,n._)([(0,u.Cb)({constructOnly:!0})],P.prototype,"layer",void 0),(0,n._)([(0,u.Cb)()],P.prototype,"sourceJSON",void 0),(0,n._)([(0,u.Cb)()],P.prototype,"type",void 0),(0,n._)([(0,u.Cb)()],P.prototype,"wfsCapabilities",void 0),P=(0,n._)([(0,d.j)("esri.layers.graphics.sources.WFSSource")],P);var k,x=r(71612),O=r(17017),E=r(69637),T=r(6404),R=r(38009),N=r(68825),j=r(16859),I=r(34760),Z=r(72965),A=r(28294),M=r(21506),U=r(1231),L=r(53518),D=r(35671),q=r(54306),G=r(30707),J=r(14165),H=r(32163),W=r(82971);const $=(0,L.v)();let z=k=class extends((0,N.c)((0,O.N)((0,T.M)((0,E.b)((0,x.h)((0,A.n)((0,I.Q)((0,Z.M)((0,R.q)((0,j.I)((0,i.R)(f.Z)))))))))))){static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:n,geometryType:s,name:o,namespaceUri:i,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c}=e;return new k({customParameters:t,fields:r,geometryField:n,geometryType:s,name:o,namespaceUri:i,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxFeatures=3e3,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new P({layer:this}),this.spatialReference=W.Z.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),(0,D.YN)(this.renderer,this.fieldsIndex),(0,D.UF)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const n=e.filter((e=>e.name!==S.M8));this.geometryField&&n.unshift(new U.Z({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,a.RB)(r,n.map((e=>e.toJSON())),t)}get parsedUrl(){return(0,l.mN)(this.url)}set renderer(e){(0,D.YN)(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return(0,H.eZ)(this,e)}createQuery(){const e=new J.Z;e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(J.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(J.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(J.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(J.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,n._)([(0,u.Cb)({readOnly:!0})],z.prototype,"capabilities",null),(0,n._)([(0,u.Cb)({type:String})],z.prototype,"copyright",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],z.prototype,"createQueryVersion",null),(0,n._)([(0,u.Cb)({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],z.prototype,"customParameters",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],z.prototype,"defaultPopupTemplate",null),(0,n._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],z.prototype,"definitionExpression",void 0),(0,n._)([(0,u.Cb)({type:String})],z.prototype,"displayField",void 0),(0,n._)([(0,u.Cb)(M.PV)],z.prototype,"elevationInfo",void 0),(0,n._)([(0,u.Cb)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"featureUrl",void 0),(0,n._)([(0,u.Cb)({type:[U.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],z.prototype,"fields",void 0),(0,n._)([(0,y.c)("fields")],z.prototype,"writeFields",null),(0,n._)([(0,u.Cb)($.fieldsIndex)],z.prototype,"fieldsIndex",void 0),(0,n._)([(0,u.Cb)({type:F.Z,json:{name:"extent"}})],z.prototype,"fullExtent",void 0),(0,n._)([(0,u.Cb)()],z.prototype,"geometryField",void 0),(0,n._)([(0,u.Cb)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:h.M.read},write:{target:"layerDefinition.geometryType",writer:h.M.write,ignoreOrigin:!0},origins:{service:{read:h.M.read}}}})],z.prototype,"geometryType",void 0),(0,n._)([(0,u.Cb)({type:String})],z.prototype,"id",void 0),(0,n._)([(0,u.Cb)(M.iR)],z.prototype,"labelsVisible",void 0),(0,n._)([(0,u.Cb)({type:[q.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:G.r},write:!0}})],z.prototype,"labelingInfo",void 0),(0,n._)([(0,u.Cb)(M.rn)],z.prototype,"legendEnabled",void 0),(0,n._)([(0,u.Cb)({type:["show","hide"]})],z.prototype,"listMode",void 0),(0,n._)([(0,u.Cb)({type:String})],z.prototype,"objectIdField",void 0),(0,n._)([(0,u.Cb)({type:["WFS"]})],z.prototype,"operationalLayerType",void 0),(0,n._)([(0,u.Cb)({type:p.z8,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"maxFeatures",void 0),(0,n._)([(0,u.Cb)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],z.prototype,"mode",void 0),(0,n._)([(0,u.Cb)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"name",void 0),(0,n._)([(0,u.Cb)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"namespaceUri",void 0),(0,n._)([(0,u.Cb)(M.bT)],z.prototype,"opacity",void 0),(0,n._)([(0,u.Cb)($.outFields)],z.prototype,"outFields",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],z.prototype,"parsedUrl",null),(0,n._)([(0,u.Cb)(M.C_)],z.prototype,"popupEnabled",void 0),(0,n._)([(0,u.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],z.prototype,"popupTemplate",void 0),(0,n._)([(0,u.Cb)({types:o.A,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:o.o,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],z.prototype,"renderer",null),(0,n._)([(0,u.Cb)(M.YI)],z.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],z.prototype,"source",void 0),(0,n._)([(0,u.Cb)({type:W.Z,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],z.prototype,"spatialReference",void 0),(0,n._)([(0,u.Cb)({readOnly:!0,type:[p.z8],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"spatialReferences",void 0),(0,n._)([(0,u.Cb)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"swapXY",void 0),(0,n._)([(0,u.Cb)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],z.prototype,"title",void 0),(0,n._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],z.prototype,"type",void 0),(0,n._)([(0,u.Cb)(M.HQ)],z.prototype,"url",void 0),(0,n._)([(0,u.Cb)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"version",void 0),(0,n._)([(0,u.Cb)()],z.prototype,"wfsCapabilities",null),z=k=(0,n._)([(0,d.j)("esri.layers.WFSLayer")],z);const Q=z},61159:(e,t,r)=>{r.d(t,{g:()=>n});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},92722:(e,t,r)=>{r.d(t,{O3:()=>_,lG:()=>C,my:()=>S,q9:()=>l});var n=r(20102),s=r(70272),o=r(5428),i=r(35671);const a={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function l(e){return a[e]}function*u(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function c(e){for(const t of e)if(t.length>2)return!0;return!1}function d(e){let t=0;for(let r=0;r<e.length;r++){const n=e[r],s=e[(r+1)%e.length];t+=n[0]*s[1]-s[0]*n[1]}return t<=0}function y(e){const t=e[0],r=e[e.length-1];return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t),e}function h(e,t,r){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,r){return g(e,t.coordinates,r),e}(e,t,r);case"MultiLineString":return function(e,t,r){for(const n of t.coordinates)g(e,n,r);return e}(e,t,r);case"MultiPolygon":return function(e,t,r){for(const n of t.coordinates){f(e,n[0],r);for(let t=1;t<n.length;t++)m(e,n[t],r)}return e}(e,t,r);case"Point":return function(e,t,r){return b(e,t.coordinates,r),e}(e,t,r);case"Polygon":return function(e,t,r){const n=t.coordinates;f(e,n[0],r);for(let t=1;t<n.length;t++)m(e,n[t],r);return e}(e,t,r)}}function f(e,t,r){const n=y(t);!function(e){return!d(e)}(n)?g(e,n,r):w(e,n,r)}function m(e,t,r){const n=y(t);!function(e){return d(e)}(n)?g(e,n,r):w(e,n,r)}function g(e,t,r){for(const n of t)b(e,n,r);e.lengths.push(t.length)}function w(e,t,r){for(let n=t.length-1;n>=0;n--)b(e,t[n],r);e.lengths.push(t.length)}function b(e,t,r){const[n,s,o]=t;e.coords.push(n,s),r.hasZ&&e.coords.push(o||0)}function v(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function _(e){if(!e)throw new n.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const r="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,s=new RegExp(".*(CRS84H?|4326)$","i");if(!r||!s.test(r))throw new n.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function S(e,t={}){const r=[],n=new Set,s=new Set;let o,a=!1,d=null,y=!1,{geometryType:h=null}=t,f=!1;for(const t of u(e)){const{geometry:e,properties:u,id:m}=t;if((!e||(h||(h=l(e.type)),l(e.type)===h))&&(a||(a=c(p(e))),y||(y=null!=m,y&&(o=typeof m,u&&(d=Object.keys(u).filter((e=>u[e]===m))))),u&&d&&y&&null!=m&&(d.length>1?d=d.filter((e=>u[e]===m)):1===d.length&&(d=u[d[0]]===m?d:[])),!f&&u)){let e=!0;for(const t in u){if(n.has(t))continue;const o=u[t];if(null==o){e=!1,s.add(t);continue}const a=v(o);if("unknown"===a){s.add(t);continue}s.delete(t),n.add(t);const l=(0,i.q6)(t);l&&r.push({name:l,alias:t,type:a})}f=e}}const m=(0,i.q6)(1===d?.length&&d[0]||null)??void 0;if(m)for(const e of r)if(e.name===m&&(0,i.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:h,hasZ:a,objectIdFieldName:m,objectIdFieldType:o,unknownFields:Array.from(s)}}function C(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:n}=t;for(const i of e){const{geometry:e,properties:a,id:u}=i;if(e&&l(e.type)!==r)continue;const p=a||{};let c;n&&(c=p[n],null==u||c||(p[n]=c=u));const d=new s.u_(e?h(new o.Z,e,t):null,p,null,c??void 0);yield d}}(u(e),t))}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>c,MS:()=>d,bU:()=>a});var n=r(80442),s=r(22974),o=r(61159),i=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,n.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.d9)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var n,s=r(43697),o=r(78286),i=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(35454),u=r(96674);const p=new l.X({asc:"ascending",desc:"descending"});let c=n=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,i.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s._)([(0,i.Cb)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,s._)([(0,i.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],c.prototype,"order",void 0),c=n=(0,s._)([(0,a.j)("esri.layers.support.OrderByInfo")],c);const d=c;function y(e,t,r){if(!e)return null;const n=e.find((e=>!!e.field));if(!n)return null;const s=new d;return s.read(n,r),[s]}function h(e,t,r,n){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,i.Cb)({type:[d],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:h}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},51432:(e,t,r)=>{r.d(t,{M8:()=>v,ft:()=>I,FU:()=>R,Bm:()=>D,be:()=>Z,eB:()=>A}),r(66577);var n=r(3172),s=r(20102),o=r(66374),i=r(95330),a=r(17452),l=r(44547),u=r(8744),p=r(86973),c=r(92722);function d(e){return function(e){const t=y.exec(e);if(!t?.groups)return null;const r=t.groups,n=+r.year,s=+r.month-1,o=+r.day,i=+(r.hours??"0"),a=+(r.minutes??"0"),l=+(r.seconds??"0");if(i>23)return null;if(a>59)return null;if(l>59)return null;const u=r.ms??"0",p=u?+u.padEnd(3,"0").substring(0,3):0;let c;if(r.isUTC)c=Date.UTC(n,s,o,i,a,l,p);else if(r.offsetSign){const e=+r.offsetHours,t=+r.offsetMinutes;c=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,s,o,i,a,l,p)}else c=new Date(n,s,o,i,a,l,p).getTime();return Number.isNaN(c)?null:c}(e)??function(e){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}(e)}const y=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/;var h=r(88724),f=r(1231),m=r(82971),g=r(6570);const w="xlink:href",b="2.0.0",v="__esri_wfs_id__",_="wfs-layer:getWFSLayerTypeInfo-error",S="wfs-layer:empty-service",C="wfs-layer:feature-type-not-found",F="wfs-layer:geojson-not-supported",P="wfs-layer:kvp-encoding-not-supported",k="wfs-layer:malformed-json",x="wfs-layer:unknown-geometry-type",O="wfs-layer:unknown-field-type",E="wfs-layer:unsupported-spatial-reference",T="wfs-layer:unsupported-wfs-version";async function R(e,t){const r=function(e){const t=G(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==b)throw new s.Z(T,`Unsupported WFS version ${t}. Supported version: ${b}`)})(t),H(t);const r=t.firstElementChild,n=(0,o.Fs)(function(e){return(0,h.H)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",supportedSpatialReferences:[]},r=new Set([4326]),n=e=>{const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);Number.isNaN(t)||r.add(t)};return(0,h.h)(e,{Name:e=>{const{name:r,prefix:n}=J(e.textContent);t.typeName=`${n}:${r}`,t.name=r,t.namespacePrefix=n,t.namespaceUri=e.lookupNamespaceURI(n)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=function(e){let t,r,n,s;for(const o of e.children)switch(o.localName){case"LowerCorner":[t,r]=o.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[n,s]=o.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:r,xmax:n,ymax:s,spatialReference:u.Zn}}(e)},DefaultSRS:n,DefaultCRS:n,OtherSRS:n,OtherCRS:n}),t.title||(t.title=t.name),t.supportedSpatialReferences.push(...r),t}}})}(r));return{operations:j(r),get featureTypes(){return Array.from(n())},readFeatureTypes:n}}((await(0,n.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:b,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,a.$U)(e)&&((0,a.D6)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,a.hO)(t.operations.DescribeFeatureType.url)),(0,a.D6)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,a.hO)(t.operations.GetFeature.url)))}(e,r),r}const N=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function j(e){let t=!1;const r={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if((0,h.h)(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{r.GetCapabilities.url=e.getAttribute(w)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{r.DescribeFeatureType.url=e.getAttribute(w)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{r.GetFeature.url=e.getAttribute(w)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;t&&N.has(t.toLowerCase())&&(r.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{r.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new s.Z(P,"WFS service doesn't support key/value pair (KVP) encoding");if(null==r.GetFeature.outputFormat)throw new s.Z(F,"WFS service doesn't support GeoJSON output format");return r}function I(e,t,r){return(0,o.sE)(e,(e=>r?e.name===t&&e.namespaceUri===r:e.typeName===t||e.name===t))}async function Z(e,t,r,n={}){const{featureType:o,extent:a}=await async function(e,t,r,n={}){const{spatialReference:o=m.Z.WGS84}=n,i=e.readFeatureTypes(),a=t?I(i,t,r):i.next().value;if(null==a)throw t?new s.Z(C,`The type '${t}' could not be found in the service`):new s.Z(S,"The service is empty");let p=new g.Z({...a.extent,spatialReference:o});if(!(0,u.fS)(o,u.Zn))try{await(0,l.iQ)(u.Zn,o,void 0,n),p=(0,l.iV)(p,u.Zn)}catch{throw new s.Z(E,"Projection not supported")}return{extent:p,spatialReference:o,featureType:a}}(e,t,r,n),{fields:p,geometryType:c,swapXY:d,objectIdField:y,geometryField:h}=await async function(e,t,r={}){const[n,o]=await(0,i.as)([U(e.operations.DescribeFeatureType.url,t,r),M(e,t,r)]);if(n.error||o.error)throw new s.Z(_,`An error occurred while getting info about the feature type '${t}'`,{error:n.error||o.error});const{fields:a,errors:l}=n.value??{},u=n.value?.geometryType||o.value?.geometryType,p=o.value?.swapXY??!1;if(null==u)throw new s.Z(x,`The geometry type could not be determined for type '${t}`,{typeName:t,geometryType:u,fields:a,errors:l});return{...A(a??[]),geometryType:u,swapXY:p}}(e,o.typeName,n);return{url:e.operations.GetCapabilities.url,name:o.name,namespaceUri:o.namespaceUri,fields:p,geometryField:h,geometryType:c,objectIdField:y,spatialReference:n.spatialReference??m.Z.WGS84,extent:a,swapXY:d,wfsCapabilities:e,customParameters:n.customParameters}}function A(e){const t=e.find((e=>"geometry"===e.type));let r=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),r||(r=new f.Z({name:v,type:"oid",alias:v}),e.unshift(r)),{geometryField:t?.name??null,objectIdField:r.name,fields:e}}async function M(e,t,r={}){let s,o=!1;const[i,a]=await Promise.all([D(e.operations.GetFeature.url,t,e.operations.GetFeature.outputFormat,{...r,count:1}),(0,n.default)(e.operations.GetFeature.url,{responseType:"text",query:q(t,void 0,{...r,count:1}),signal:r?.signal})]),l="FeatureCollection"===i.type&&i.features[0]?.geometry;if(l){let e;switch(s=p.M.fromJSON((0,c.q9)(l.type)),l.type){case"Point":e=l.coordinates;break;case"LineString":case"MultiPoint":e=l.coordinates[0];break;case"MultiLineString":case"Polygon":e=l.coordinates[0][0];break;case"MultiPolygon":e=l.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(a.data);if(t){const r=e[0].toFixed(3),n=e[1].toFixed(3),s=parseFloat(t[1]).toFixed(3);r===parseFloat(t[2]).toFixed(3)&&n===s&&(o=!0)}}return{geometryType:s,swapXY:o}}async function U(e,t,r){return function(e,t){const{name:r}=J(e),n=G(t);H(n);const i=(0,o.sE)((0,h.H)(n.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:J(e.getAttribute("type")).name})}),(({name:e})=>e===r));if(null!=i){const e=(0,o.sE)((0,h.H)(n.firstElementChild,{complexType:e=>e}),(e=>e.getAttribute("name")===i.typeName));if(null!=e)return function(e){const t=[],r=[];let n;const o=(0,h.H)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const i of o){const o=i.getAttribute("name");if(!o)continue;let a,l;if(i.hasAttribute("type")?a=J(i.getAttribute("type")).name:(0,h.h)(i,{simpleType:{restriction:e=>(a=J(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!a)continue;const u="true"===i.getAttribute("nillable");let p=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":r.push(new f.Z({name:o,alias:o,type:"integer",nullable:u}));break;case"float":case"double":case"decimal":r.push(new f.Z({name:o,alias:o,type:"double",nullable:u}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":r.push(new f.Z({name:o,alias:o,type:"string",nullable:u,length:l??255}));break;case"datetime":case"date":r.push(new f.Z({name:o,alias:o,type:"date",nullable:u,length:l??36}));break;case"pointpropertytype":n="point",p=!0;break;case"multipointpropertytype":n="multipoint",p=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":n="polyline",p=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":n="polygon",p=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":p=!0,t.push(new s.Z(x,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new s.Z(O,`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}p&&r.push(new f.Z({name:o,alias:o,type:"geometry",nullable:u}))}for(const e of r)if("integer"===e.type&&!e.nullable&&L.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:n,fields:r,errors:t}}(e)}throw new s.Z(C,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(n)})}(t,(await(0,n.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:b,TYPENAME:t,...r?.customParameters},signal:r?.signal})).data)}const L=new Set(["objectid","fid"]);async function D(e,t,r,o){let{data:i}=await(0,n.default)(e,{responseType:"text",query:q(t,r,o),signal:o?.signal});i=i.replace(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{if(o?.dateFields?.length){const e=new Set(o.dateFields);return JSON.parse(i,((t,r)=>e.has(t)?d(r):r))}return JSON.parse(i)}catch(e){throw new s.Z(k,"Error while parsing the response",{response:i,error:e})}}function q(e,t,r){return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:b,TYPENAMES:e,OUTPUTFORMAT:t,SRSNAME:"EPSG:4326",STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}function G(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function J(e){const[t,r]=e.split(":");return{prefix:r?t:"",name:r??t}}function H(e){let t="",r="";if((0,h.h)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{r=e.textContent}})}),t)throw new s.Z(`wfs-layer:${t}`,r)}},88724:(e,t,r)=>{function n(e,t){if(e&&t)for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&n(r,t)}else n(r,e)}}function*s(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*s(r,e)}}r.d(t,{H:()=>s,h:()=>n})},51706:(e,t,r)=>{var n,s;function o(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function i(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?n.Expression:e.field&&"string"==typeof e.field?n.Field:n.Unknown}function l(e,t){const r=t||a(e),o=e.valueUnit||"unknown";return r===n.Unknown?s.Constant:e.stops?s.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?s.ClampedLinear:"unknown"===o?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?s.Proportional:s.Additive:s.Identity:s.RealWorldSize}r.d(t,{PS:()=>a,QW:()=>l,RY:()=>n,hL:()=>s,iY:()=>o,qh:()=>i}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(n||(n={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(s||(s={}))},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var n,s=r(43697),o=r(66577),i=r(38171),a=r(35454),l=r(96674),u=r(22974),p=r(5600),c=(r(75215),r(71715)),d=r(52011),y=r(30556),h=r(82971),f=r(33955),m=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=i.Z.fromJSON(s),a=s.geometry&&s.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],s=n?.spatialReference;null==t||s||(t.spatialReference=r)}n.push(o)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,f.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=h.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,s]}=e,o=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)i?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,s],scale:[o,i]}=r,a=this._getHydrationFunction(e,(e=>e*o+n),(e=>s-e*i));for(const{geometry:e}of t)null!=e&&a&&a(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,s;const o=[];for(let i=0,a=e.length;i<a;i++){const a=e[i];if(i>0){const e=t(a[0]),i=r(a[1]);e===n&&i===s||(o.push([e-n,i-s]),n=e,s=i)}else n=t(a[0]),s=r(a[1]),o.push([n,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],i=this._quantizePoints(o,t,r);i&&s.push(i)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.oU)(e)?e.rings:e.paths;let s,o;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],o+=n[1]):(s=n[0],o=n[1]),n[0]=t(s),n[1]=r(o)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const n=e.points;let s,o;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],o+=i[1]):(s=i[0],o=i[1]),i[0]=t(s),i[1]=r(o)}}:null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.Cb)({type:[i.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,s._)([(0,c.r)("features")],w.prototype,"readFeatures",null),(0,s._)([(0,p.Cb)({type:[m.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,s._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,s._)([(0,y.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,s._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,s._)([(0,c.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,s._)([(0,p.Cb)({type:h.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,s._)([(0,y.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,s._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,s._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>s,eG:()=>l,lF:()=>i,lj:()=>p,qP:()=>a,wW:()=>u});const n=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},i={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);