@arcgis/core 4.33.0-next.20250507 → 4.33.0-next.20250508

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 (156) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/arcade/batchExec.js +5 -0
  3. package/arcade/functions/aiServices.js +1 -1
  4. package/arcade.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/029a118e6dfb3f544a5c.js +1 -0
  7. package/assets/esri/core/workers/chunks/037af6379f3e9278633b.js +1 -0
  8. package/assets/esri/core/workers/chunks/0516bd18334d3af6c555.js +1 -0
  9. package/assets/esri/core/workers/chunks/094300acbd24085cb063.js +1 -0
  10. package/assets/esri/core/workers/chunks/0bbb38f59f37c51c72f0.js +1 -0
  11. package/assets/esri/core/workers/chunks/10e6dffa57aa1a626708.js +1 -0
  12. package/assets/esri/core/workers/chunks/1abd026ed12c863e1d94.js +1 -0
  13. package/assets/esri/core/workers/chunks/1eef9cf19634c038b59b.js +1 -0
  14. package/assets/esri/core/workers/chunks/{7cd32b10ed0e18e44ef2.js → 2b01e3bce78541620a86.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{cd81df932b87583b7e4c.js → 306e262f148b3057b11b.js} +1 -1
  16. package/assets/esri/core/workers/chunks/352b7dcd1633e0c98194.js +1 -0
  17. package/assets/esri/core/workers/chunks/35c996f6fbff165b03f4.js +1 -0
  18. package/assets/esri/core/workers/chunks/391b1c3e736a62befbaf.js +1 -0
  19. package/assets/esri/core/workers/chunks/{cbec01223d51cdb9ee79.js → 3c45603af279ad7fed8c.js} +1 -1
  20. package/assets/esri/core/workers/chunks/40e556a0645af8658658.js +1 -0
  21. package/assets/esri/core/workers/chunks/4402336db7210cd583e0.js +1 -0
  22. package/assets/esri/core/workers/chunks/46104db7f77952bb6c12.js +1 -0
  23. package/assets/esri/core/workers/chunks/{5383dc4814b0ba42e871.js → 47cd99ab3ed11a931084.js} +1 -1
  24. package/assets/esri/core/workers/chunks/47f64a340b5d56bf9e59.js +1 -0
  25. package/assets/esri/core/workers/chunks/49f0e53b3c9ba8451442.js +1 -0
  26. package/assets/esri/core/workers/chunks/515e3295495d0958db7e.js +1 -0
  27. package/assets/esri/core/workers/chunks/5ddf463c85c33428e807.js +1 -0
  28. package/assets/esri/core/workers/chunks/5e0118a030cf741f78c6.js +319 -0
  29. package/assets/esri/core/workers/chunks/{875a0e2d023094c8e15e.js → 66e79aa02b3aa12b3778.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{a5a43d54684747561aa9.js → 6b42bcfbb60432e3ed1f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/6b5274d46a155d65dff1.js +39 -0
  32. package/assets/esri/core/workers/chunks/6e5d8a6b29c06a27998c.js +1 -0
  33. package/assets/esri/core/workers/chunks/6eabced7123a65d47292.js +1 -0
  34. package/assets/esri/core/workers/chunks/6f506303017903b9a06f.js +1 -0
  35. package/assets/esri/core/workers/chunks/6f6bf67a7960b7e9b03e.js +1 -0
  36. package/assets/esri/core/workers/chunks/{52a3d0e041717da7697e.js → 736cb9f74bf050b70f4c.js} +1 -1
  37. package/assets/esri/core/workers/chunks/74187c771ee7083d1db7.js +1 -0
  38. package/assets/esri/core/workers/chunks/{85d87cd1bf7eecd54100.js → 752ef63d910852b7be44.js} +1 -1
  39. package/assets/esri/core/workers/chunks/7c49a8877bd744daa3d5.js +1 -0
  40. package/assets/esri/core/workers/chunks/7ffc1db10b00754398e8.js +1 -0
  41. package/assets/esri/core/workers/chunks/81546c6141d564ed59c9.js +1 -0
  42. package/assets/esri/core/workers/chunks/83fcc6f770ad084b8ab9.js +1 -0
  43. package/assets/esri/core/workers/chunks/852dd5af8e704613310a.js +1 -0
  44. package/assets/esri/core/workers/chunks/85efb318cda7260221ae.js +1 -0
  45. package/assets/esri/core/workers/chunks/86138c297095af1ac604.js +1 -0
  46. package/assets/esri/core/workers/chunks/8b74b609de4f70e1a75c.js +1 -0
  47. package/assets/esri/core/workers/chunks/90f93091fe088875f80f.js +1 -0
  48. package/assets/esri/core/workers/chunks/91a02ee91f61cf841111.js +1 -0
  49. package/assets/esri/core/workers/chunks/9aedd7874da7c63865d6.js +1 -0
  50. package/assets/esri/core/workers/chunks/9ca480eb8b2312381ccf.js +1 -0
  51. package/assets/esri/core/workers/chunks/a0d2bd5d4ed3c90f6b1c.js +1 -0
  52. package/assets/esri/core/workers/chunks/a73c6b4bc5baf440f85a.js +1 -0
  53. package/assets/esri/core/workers/chunks/b5d68d8460b7c15001dd.js +1 -0
  54. package/assets/esri/core/workers/chunks/b816b608f31954128246.js +1 -0
  55. package/assets/esri/core/workers/chunks/bcab8b9ce2f9d2ebaae7.js +1 -0
  56. package/assets/esri/core/workers/chunks/bd7b54db7fd278b15500.js +1 -0
  57. package/assets/esri/core/workers/chunks/c1175477dfcdee90a453.js +1 -0
  58. package/assets/esri/core/workers/chunks/c17c269cc30e7e1d0bfb.js +1 -0
  59. package/assets/esri/core/workers/chunks/c2f925167a43f63289a7.js +1 -0
  60. package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +1 -0
  61. package/assets/esri/core/workers/chunks/cb80b7ddc9acf625d754.js +1 -0
  62. package/assets/esri/core/workers/chunks/{812d8554144ef5a7cd4b.js → cd4fb107489594c57438.js} +1 -1
  63. package/assets/esri/core/workers/chunks/cd5c380196db7fb55242.js +1 -0
  64. package/assets/esri/core/workers/chunks/d874d24568b1acedebc4.js +1 -0
  65. package/assets/esri/core/workers/chunks/d9948763423784b68c09.js +1 -0
  66. package/assets/esri/core/workers/chunks/e662c86b8bafc5512d3d.js +1 -0
  67. package/assets/esri/core/workers/chunks/e697dd4508f02dcfe329.js +1 -0
  68. package/assets/esri/core/workers/chunks/ed6d0fea159dea638c2f.js +1 -0
  69. package/assets/esri/themes/base/widgets/_Daylight.scss +0 -4
  70. package/assets/esri/themes/base/widgets/_ShadowCast.scss +27 -28
  71. package/assets/esri/themes/dark/main.css +1 -1
  72. package/assets/esri/themes/light/main.css +1 -1
  73. package/assets/esri/themes/light/view.css +1 -1
  74. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast.json +1 -1
  75. package/chunks/aiServices.js +1 -1
  76. package/interfaces.d.ts +50 -3
  77. package/layers/KnowledgeGraphLayer.js +1 -1
  78. package/layers/LinkChartLayer.js +1 -1
  79. package/layers/MapImageLayer.js +1 -1
  80. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  81. package/layers/mixins/SublayersOwner.js +1 -1
  82. package/layers/support/Sublayer.js +1 -1
  83. package/package.json +1 -1
  84. package/rest/print.js +1 -1
  85. package/rest/support/JobInfo.js +1 -1
  86. package/rest/support/TranslateContent.js +1 -1
  87. package/rest/support/TranslateParameters.js +1 -1
  88. package/rest/support/TranslateResult.js +1 -1
  89. package/support/loadArcade.js +1 -1
  90. package/support/revision.js +1 -1
  91. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js +1 -1
  92. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  93. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
  94. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  95. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  96. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  97. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  98. package/views/3d/state/controllers/InteractiveController.js +1 -1
  99. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  100. package/widgets/Daylight/DaylightViewModel.js +1 -1
  101. package/widgets/Daylight/css.js +1 -1
  102. package/widgets/Daylight.js +1 -1
  103. package/widgets/FeatureForm.js +1 -1
  104. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  105. package/widgets/ShadowCast/css.js +1 -1
  106. package/assets/esri/core/workers/chunks/00e49ed684cc167c4481.js +0 -1
  107. package/assets/esri/core/workers/chunks/02e1332e91393ee985e8.js +0 -1
  108. package/assets/esri/core/workers/chunks/0366d46c78aa3b4a0523.js +0 -1
  109. package/assets/esri/core/workers/chunks/076a205298026e926d70.js +0 -1
  110. package/assets/esri/core/workers/chunks/07adf428f5fdba5c7cdf.js +0 -1
  111. package/assets/esri/core/workers/chunks/1349d4ea29fbf41e22bc.js +0 -1
  112. package/assets/esri/core/workers/chunks/2934fd7ec0c07371c4fe.js +0 -1
  113. package/assets/esri/core/workers/chunks/2a72f272051721767ca1.js +0 -319
  114. package/assets/esri/core/workers/chunks/2a9f206c23f69045d3f2.js +0 -1
  115. package/assets/esri/core/workers/chunks/2ac2c9cb88a7d1249b56.js +0 -1
  116. package/assets/esri/core/workers/chunks/2ad47c0ba1680f7d5e03.js +0 -1
  117. package/assets/esri/core/workers/chunks/2b3aa568356f4b70afe8.js +0 -1
  118. package/assets/esri/core/workers/chunks/35002d23c5b9f37c6331.js +0 -1
  119. package/assets/esri/core/workers/chunks/35b138f6d0687c5bee4f.js +0 -1
  120. package/assets/esri/core/workers/chunks/4957450197305498d327.js +0 -1
  121. package/assets/esri/core/workers/chunks/4b63f36189730396721b.js +0 -1
  122. package/assets/esri/core/workers/chunks/55def679b9f1c7c4d4d3.js +0 -1
  123. package/assets/esri/core/workers/chunks/598fade09fa4da759ac2.js +0 -1
  124. package/assets/esri/core/workers/chunks/60f7cd05e88701f43d3f.js +0 -1
  125. package/assets/esri/core/workers/chunks/6118144588af9cd8e49b.js +0 -1
  126. package/assets/esri/core/workers/chunks/62c5030557595c9a7c37.js +0 -1
  127. package/assets/esri/core/workers/chunks/62d1e6e7d8685ffc152f.js +0 -1
  128. package/assets/esri/core/workers/chunks/687a11f49772bf5e1f5a.js +0 -1
  129. package/assets/esri/core/workers/chunks/6b554b42e16ad32b433d.js +0 -1
  130. package/assets/esri/core/workers/chunks/6fc39a58f3011291c602.js +0 -1
  131. package/assets/esri/core/workers/chunks/7978b66cdfe078960ddd.js +0 -1
  132. package/assets/esri/core/workers/chunks/7fa70851868f80eaccfc.js +0 -1
  133. package/assets/esri/core/workers/chunks/8d09cc782dae1dcfc6c4.js +0 -1
  134. package/assets/esri/core/workers/chunks/8ec0a762ec73d1f91fce.js +0 -1
  135. package/assets/esri/core/workers/chunks/919673d958045ab94c95.js +0 -1
  136. package/assets/esri/core/workers/chunks/9321e3244ccb1ee9985a.js +0 -1
  137. package/assets/esri/core/workers/chunks/97a4f8504e76c877893b.js +0 -1
  138. package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +0 -1
  139. package/assets/esri/core/workers/chunks/a1278a1c4a913c671989.js +0 -1
  140. package/assets/esri/core/workers/chunks/a2452958b0ced28fc1e5.js +0 -1
  141. package/assets/esri/core/workers/chunks/aed72cbac8d463b1d2e0.js +0 -1
  142. package/assets/esri/core/workers/chunks/af44ba2ee6c7670ddcc1.js +0 -1
  143. package/assets/esri/core/workers/chunks/b2f1d1721a9dd88a1adf.js +0 -1
  144. package/assets/esri/core/workers/chunks/b52a738ca2b5c39f8e15.js +0 -1
  145. package/assets/esri/core/workers/chunks/b60504e6326464a512df.js +0 -1
  146. package/assets/esri/core/workers/chunks/b79e8d1e3f2c214549b7.js +0 -1
  147. package/assets/esri/core/workers/chunks/ba4aafa8dfa76006c3e7.js +0 -1
  148. package/assets/esri/core/workers/chunks/bbcc5c5ef7cb92c2e213.js +0 -39
  149. package/assets/esri/core/workers/chunks/bceb837623aa79fcfbed.js +0 -1
  150. package/assets/esri/core/workers/chunks/bfd39cd1d83291ba014b.js +0 -1
  151. package/assets/esri/core/workers/chunks/ca8c631172902c6623fa.js +0 -1
  152. package/assets/esri/core/workers/chunks/cf008faa999e8d07116f.js +0 -1
  153. package/assets/esri/core/workers/chunks/dcb9ab790e694328d02c.js +0 -1
  154. package/assets/esri/core/workers/chunks/e93222c65bd28203ddf7.js +0 -1
  155. package/assets/esri/core/workers/chunks/ea70cabea50960dc8167.js +0 -1
  156. package/assets/esri/core/workers/chunks/f07b3aecff90a6a400d8.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5181],{4197:(e,t,r)=>{r.d(t,{jh:()=>i,l5:()=>l,xm:()=>s});var n=r(34275);function i(e,t=!1){return e<=n.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var n=r(90237),i=r(92602),s=r(70333),l=r(78888),a=r(60999),o=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),m=r(10107),h=(r(44208),r(87811),r(36005)),y=r(40608),f=r(43937),g=r(77548),v=r(20655),w=r(80812),b=r(41318),x=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let l,a;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!l||!(0,c.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const o=!0,u=!1,p=!1;if(!a)return{features:{edit:o,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,d.QP)(e)}return{features:{edit:o,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,x.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,c.S8)(i.restUrl)===(0,c.S8)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,l.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&n&&!(0,c.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n._)([(0,m.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,n._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,y.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},26253:(e,t,r)=>{r.d(t,{T:()=>d});var n=r(90237),i=r(69540),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.t)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,o.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,n._)([(0,u.$)("esri.time.TimeInterval")],d)},33446:(e,t,r)=>{r.d(t,{C:()=>l,m:()=>s});var n=r(49186),i=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.Te)(r),s}async function l(e,t,r,s,l){let a;try{a=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.Te)(l),a}},38458:(e,t,r)=>{r.d(t,{m:()=>i});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function i(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},38961:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(5503),s=r(36708),l=r(10107),a=r(40608),o=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,o.fm)((()=>this._refresh()),s.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,l.MZ)()],u.prototype,"getCollections",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,n._)([(0,a.$)("esri.core.CollectionFlattener")],u)},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Me});var n=r(90237),i=r(92602),s=r(52106),l=r(13874),a=r(78888),o=r(5503),u=r(38961),p=r(49186),d=r(66552),c=r(4718),m=r(92071),h=r(74887),y=r(36708),f=r(84952),g=r(10107),v=r(56507),w=r(36005),b=r(40608),x=r(43937),_=r(49422),I=r(5443),M=r(16930),E=r(83960),T=r(21325),S=r(4146),A=r(63074),N=r(16131),F=r(8303),O=r(54310),P=r(25036),U=r(82935),Z=r(38458),R=r(60694),L=r(10873),j=r(69622);r(44208),r(53966),r(87811);const C={visible:"visibleSublayers"};let $=class extends j.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(C[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],i=e=>{const{minScale:r,maxScale:s,sublayers:l,visible:a}=e;a&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(l?l.forEach(i):n.push(e))};return r?.forEach(i),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:i}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:i,layers:t}}};(0,n._)([(0,g.MZ)()],$.prototype,"layer",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"layers",null),(0,n._)([(0,g.MZ)({type:Number})],$.prototype,"scale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"version",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"visibleSublayers",null),$=(0,n._)([(0,b.$)("esri.layers.support.ExportWMSImageParameters")],$);var q,H=r(33446),B=r(4902),D=r(79901);let V=0,k=q=class extends(B.A.IdentifiableMixin(m.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,y.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),y.OH),(0,y.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),y.OH),(0,y.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),y.OH),(0,y.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),y.OH)])}get id(){return this._get("id")??V++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,v.dp)(o.A.ofType(q),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new q;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,g.MZ)()],k.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],k.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({type:I.A,json:{name:"extent"}})],k.prototype,"fullExtent",void 0),(0,n._)([(0,g.MZ)()],k.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],k.prototype,"id",null),(0,n._)([(0,g.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],k.prototype,"legendUrl",void 0),(0,n._)([(0,w.w)("legendUrl",["legendUrl","legendURL"])],k.prototype,"readLegendUrl",null),(0,n._)([(0,g.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],k.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)()],k.prototype,"layer",void 0),(0,n._)([(0,g.MZ)()],k.prototype,"maxScale",void 0),(0,n._)([(0,g.MZ)()],k.prototype,"minScale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],k.prototype,"effectiveScaleRange",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],k.prototype,"name",void 0),(0,n._)([(0,g.MZ)()],k.prototype,"parent",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],k.prototype,"popupEnabled",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],k.prototype,"queryable",void 0),(0,n._)([(0,g.MZ)()],k.prototype,"sublayers",void 0),(0,n._)([(0,D.w)("sublayers")],k.prototype,"castSublayers",null),(0,n._)([(0,g.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],k.prototype,"spatialReferences",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],k.prototype,"title",void 0),(0,n._)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],k.prototype,"visible",null),k=q=(0,n._)([(0,b.$)("esri.layers.support.WMSSublayer")],k);var W=r(4576),G=r(96285);const J={84:4326,83:4269,27:4267};function X(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new p.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=Y("Capability",r),i=Y("Service",r),s=n&&Y("Request",n);if(!n||!i||!s)return null;const l=Y("Layer",n);if(!l)return null;const a="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=te("Title",i,"")||te("Name",i,""),u=te("AccessConstraints",i,""),d=/^none$/i.test(u)?"":u,c=te("Abstract",i,""),m=parseInt(te("MaxWidth",i,"5000"),10),h=parseInt(te("MaxHeight",i,"5000"),10),y=ie(s,"GetMap"),f=ne(s,"GetMap"),g=le(l,a,t);if(!g)return null;let v,w=0;const b=Array.prototype.slice.call(n.childNodes),x=g.sublayers??[],_=e=>{null!=e&&x.push(e)};b.forEach((e=>{"Layer"===e.nodeName&&(0===w?v=e:1===w?(g.name&&(g.name="",_(le(v,a,t))),_(le(e,a,t))):_(le(e,a,t)),w++)}));const I=g.sublayers??[],M=g.fullExtents??[];0===I.length&&I.push(g),g.extent??=I[0].extent;const E=g.spatialReferences.length>0?g.spatialReferences:K(g),T=ne(s,"GetFeatureInfo"),S=T?ie(s,"GetFeatureInfo"):null,A=Q(I),N=g.minScale||0,F=g.maxScale||0,O=g.dimensions??[],P=A.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),U=O.concat(P).filter(oe);let Z=null;if(U.length){const e=U.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(W.Ru);Z={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:d,description:c,dimensions:O,extent:g.extent,fullExtents:M,featureInfoFormats:S,featureInfoUrl:T,mapUrl:f,maxWidth:m,maxHeight:h,maxScale:F,minScale:N,layers:A,spatialReferences:E,supportedImageFormatTypes:y,timeInfo:Z,title:o,version:a}}function K(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=K(t);if(e.length>0)return e}return[]}function Q(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(Q(r.sublayers)),delete r.sublayers);return t}function z(e,t,r){return t.getAttribute(e)??r}function Y(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(ae(n)&&n.nodeName===e)return n}return null}function ee(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];ae(i)&&i.nodeName===e&&r.push(i)}return r}function te(e,t,r){return Y(e,t)?.textContent??r}function re(e,t,r){const n=parseFloat(e.getAttribute("minx")??"0"),i=parseFloat(e.getAttribute("miny")??"0"),s=parseFloat(e.getAttribute("maxx")??"0"),l=parseFloat(e.getAttribute("maxy")??"0");return{xmin:r?isNaN(i)?-Number.MAX_VALUE:i:isNaN(n)?-Number.MAX_VALUE:n,ymin:r?isNaN(n)?-Number.MAX_VALUE:n:isNaN(i)?-Number.MAX_VALUE:i,xmax:r?isNaN(l)?Number.MAX_VALUE:l:isNaN(s)?Number.MAX_VALUE:s,ymax:r?isNaN(s)?Number.MAX_VALUE:s:isNaN(l)?Number.MAX_VALUE:l,spatialReference:{wkid:t}}}function ne(e,t){const r=Y(t,e);if(r){const e=Y("DCPType",r);if(e){const t=Y("HTTP",e);if(t){const e=Y("Get",t);if(e){let t=function(e,t,r){const n=Y("OnlineResource",r);return n?z("xlink:href",n,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],n=(0,f.An)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function ie(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",Y(t,e)).map((({textContent:e})=>e)).filter(W.Ru);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function se(e,t,r){const n=Y(t,e);if(!n)return r;const{textContent:i}=n;if(null==i||""===i)return r;const s=Number(i);return isNaN(s)?r:s}function le(e,t,r){if(!e)return null;const n=e.getAttribute("queryable")?.toLowerCase(),i="1"===n||"true"===n,s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:i,spatialReferences:[],sublayers:null},l=Y("LatLonBoundingBox",e),a=Y("EX_GeographicBoundingBox",e),o=l?re(l,4326):a?{xmin:parseFloat(te("westBoundLongitude",a,"0")),ymin:parseFloat(te("southBoundLatitude",a,"0")),xmax:parseFloat(te("eastBoundLongitude",a,"0")),ymax:parseFloat(te("northBoundLatitude",a,"0")),spatialReference:{wkid:4326}}:{xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};s.minScale=se(e,"MaxScaleDenominator",0),s.maxScale=se(e,"MinScaleDenominator",0);const u=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(u),n=r?.indexOf(":");if(n&&n>-1){let i=parseInt(r.slice(n+1),10);0===i||isNaN(i)||(i=J[i]??i);const l="1.3.0"===t?re(e,i,(0,Z.m)(i)):re(e,i);l&&s.fullExtents&&s.fullExtents.push(l)}}else if(e.nodeName===u)(e.textContent?.split(" ")??[]).forEach((e=>{let t=NaN;if(e.includes(":")){const[r,n]=e.toUpperCase().split(":");"CRS"!==r&&"EPSG"!==r||(t=parseInt(n,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=J[t]??t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendUrl){if("Layer"===e.nodeName){const n=le(e,t,r);n&&(n.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(n))}}else{const t=Y("LegendURL",e);if(t){const e=Y("OnlineResource",t);e&&(s.legendUrl=e.getAttribute("xlink:href"))}}})),s.extent=o,s.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,l="0"!==z("default",e,"0"),a="0"!==z("nearestValue",e,"0"),o="0"!==z("current",e,"0");return oe({name:t,units:r})?{name:"time",units:"ISO8601",extent:de(n),default:de(s),multipleValues:l,nearestValue:a,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:i,default:ue(s),multipleValues:l,nearestValue:a}:{name:t,units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:a}})),s}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function oe(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(W.Ru):r.map((e=>parseFloat(e)))}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(W.Ru):r}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:ce(t[0]),max:ce(t[1]),resolution:t.length>=3&&"0"!==t[2]?me(t[2]):void 0}})).filter(W.Ru):r.map((e=>ce(e)))}function ce(e){return G.c9.fromISO(e,{zone:G.mQ.utcInstance}).toJSDate()}function me(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:he(t[1]),months:he(t[2]),days:he(t[3]),hours:he(t[4]),minutes:he(t[5]),seconds:he(t[6])}:null}function he(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function ye(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function fe(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${ye(t)}`:`${t?ye(t):"0000-01-01T00:00:00Z"}/${r?ye(r):"9999-12-31T23:59:59Z"}`}const ge=new Set([102100,3857,102113,900913]),ve=new Set([3395,54004]),we=new d.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function xe(e){return"text/plain"===e}let _e=class extends((0,A.dM)((0,U.e)((0,O.J)((0,P.j)((0,N.q)((0,F.A)((0,m.P)(S.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,y.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),y.OH),(0,y.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),y.OH),(0,y.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),y.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(h.QP).then((()=>this._fetchService(t))).then((()=>this._checkLayerValidity()))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new I.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(be)??this.featureInfoFormats.find(xe)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||xe(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new M.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Ie(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Ie(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const i=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=i.get(e.parent.id);null!=t?t.push(e.id):i.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...n},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(i.has(e.id)&&(s.sublayerIds=i.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,f.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,f.a6)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,E.X_)({extent:e,width:t})*i,l=new $({layer:this,scale:s}),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ge.has(r)?t.find((e=>ge.has(e)))||t.find((e=>ve.has(e)))||102100:r)}(d,this.spatialReferences),m="1.3.0"===this.version&&(0,Z.m)(c)?`${o},${a},${p},${u}`:`${a},${o},${u},${p}`,h=l.toJSON(),y="1.3.0"===this.version?"crs":"srs";return{bbox:m,[y]:null==c||isNaN(c)?void 0:"EPSG:"+c,...h}}async fetchImage(e,t,r,n){const i=this.mapUrl,s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=fe(n?.timeExtent),o={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal};return(0,a.A)(i??"",o).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const i=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=fe(n?.timeExtent),o={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal},{data:u}=await(0,a.A)(i,o);return(0,H.m)(u,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,E.X_)({extent:e,width:t}),l=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new $({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==l)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const a="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},o={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...a},u={...this.createExportImageParameters(e,t,r),...o},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,f.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,R.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?M.A.WebMercator:new M.A({wkid:t});return(0,T.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=encodeURI((0,f.yM)(e)),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.A({title:this.title,content:t}),n=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,a.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=X(n)}if(this.parsedUrl){const e=new f.s0(this.parsedUrl.path),{httpsDomains:t}=i.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_checkLayerValidity(){if(!this.allSublayers.length)throw new p.A("wmslayer:empty-layer","The layer doesn't have any sublayer")}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Ie(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.o8)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new k;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const i=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new o.A),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,g.MZ)({readOnly:!0})],_e.prototype,"allSublayers",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],_e.prototype,"customParameters",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],_e.prototype,"customLayerParameters",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:!0}})],_e.prototype,"copyright",void 0),(0,n._)([(0,g.MZ)()],_e.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],_e.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],_e.prototype,"fullExtent",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"fullExtent",["extent"])],_e.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,x.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],_e.prototype,"writeFullExtent",null),(0,n._)([(0,g.MZ)({type:[I.A]})],_e.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],_e.prototype,"featureInfoFormat",null),(0,n._)([(0,g.MZ)({type:[String],readOnly:!0})],_e.prototype,"featureInfoFormats",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],_e.prototype,"featureInfoUrl",void 0),(0,n._)([(0,g.MZ)()],_e.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,g.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:we.jsonValues,read:{reader:we.read,source:"format"},write:{writer:we.write,target:"format"}}}}})],_e.prototype,"imageFormat",void 0),(0,n._)([(0,w.w)("imageFormat",["supportedImageFormatTypes"])],_e.prototype,"readImageFormat",null),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],_e.prototype,"imageMaxHeight",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],_e.prototype,"imageMaxWidth",void 0),(0,n._)([(0,g.MZ)()],_e.prototype,"imageTransparency",void 0),(0,n._)([(0,g.MZ)(L.fV)],_e.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)({type:["show","hide","hide-children"]})],_e.prototype,"listMode",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],_e.prototype,"mapUrl",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],_e.prototype,"isReference",void 0),(0,n._)([(0,g.MZ)({type:["WMS"]})],_e.prototype,"operationalLayerType",void 0),(0,n._)([(0,g.MZ)()],_e.prototype,"resourceInfo",void 0),(0,n._)([(0,g.MZ)({type:M.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],_e.prototype,"spatialReference",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],_e.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,g.MZ)({type:[v.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],_e.prototype,"spatialReferences",void 0),(0,n._)([(0,x.K)(["web-document","portal-item"],"spatialReferences")],_e.prototype,"writeSpatialReferences",null),(0,n._)([(0,g.MZ)({type:o.A.ofType(k),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],_e.prototype,"sublayers",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],_e.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,w.w)("service","sublayers",["layers"])],_e.prototype,"readSublayers",null),(0,n._)([(0,x.K)("sublayers",{layers:{type:[k]},visibleLayers:{type:[String]}})],_e.prototype,"writeSublayers",null),(0,n._)([(0,g.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],_e.prototype,"type",void 0),(0,n._)([(0,g.MZ)(L.OZ)],_e.prototype,"url",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],_e.prototype,"version",void 0),_e=(0,n._)([(0,b.$)("esri.layers.WMSLayer")],_e);const Me=_e},64272:(e,t,r)=>{r.d(t,{T:()=>c});var n,i=r(90237),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),d=r(98623);let c=class extends s.A{static{n=this}static get allTime(){return m}static get empty(){return h}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,e,t));let i=this.end;if(i){const r=(0,l.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let l,a;return i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==l||null==a||isNaN(l)||isNaN(a)?n.empty:new n({start:l===-1/0?null:new Date(l),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:a}=this;return null!=s&&(i.start=(0,l.S1)(s,e,t,r)),null!=a&&(i.end=(0,l.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}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,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,o.w)("end")],c.prototype,"readEnd",null),(0,i._)([(0,p.K)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,o.w)("start")],c.prototype,"readStart",null),(0,i._)([(0,p.K)("start")],c.prototype,"writeStart",null),c=n=(0,i._)([(0,u.$)("esri.time.TimeExtent")],c);const m=new c,h=new c({start:void 0,end:void 0})},70328:(e,t,r)=>{r.d(t,{BI:()=>v,Ej:()=>c,Ie:()=>f,Jt:()=>g,Ne:()=>m,RF:()=>p,aI:()=>b,fA:()=>l,gE:()=>o,hZ:()=>y,iT:()=>d,is:()=>w,qv:()=>x,vI:()=>h,vY:()=>a,v_:()=>_,vt:()=>s,w1:()=>u});var n=r(5443),i=(r(19419),r(4197));function s(e=_){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function l(e,t,r,n,i,l,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=l,a}function a(e,t=s()){return function(e,t,r,n=s()){return y(n,x),function(e,t,r=0,n=t.length/3){let i=e[0],s=e[1],l=e[2],a=e[3],o=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),l=Math.min(l,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),o=Math.max(o,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=s,e[2]=l,e[3]=a,e[4]=o,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function o(e,t=(0,i.jh)(24)){const[r,n,s,l,a,o]=e;return t[0]=r,t[1]=n,t[2]=s,t[3]=r,t[4]=n,t[5]=o,t[6]=r,t[7]=a,t[8]=s,t[9]=r,t[10]=a,t[11]=o,t[12]=l,t[13]=n,t[14]=s,t[15]=l,t[16]=n,t[17]=o,t[18]=l,t[19]=a,t[20]=s,t[21]=l,t[22]=a,t[23]=o,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function c(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function m(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function h(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?y(e,x):s(x)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function b(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],_=[0,0,0,0,0,0];s()},73133:(e,t,r)=>{r.d(t,{j:()=>n});const n=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},82935:(e,t,r)=>{r.d(t,{B:()=>m,e:()=>h});var n=r(90237),i=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),a=r(89317),o=r(30524),u=r(96184),p=r(73133),d=r(64272),c=r(26253);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return n&&i?new c.T({value:n,unit:i}):null}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,i.MZ)({type:d.T,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,i.MZ)({type:c.T})],t.prototype,"timeOffset",void 0),(0,n._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,i.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,i.MZ)(m)],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},83960:(e,t,r)=>{r.d(t,{X_:()=>l,oW:()=>o,zx:()=>a});var n=r(34727),i=r(83047);const s=96;function l(e,t){const r=t||e.extent,n=e.width,l=(0,i.GA)(r?.spatialReference);return r&&n?r.width/n*l*i.dy*s:0}function a(e,t,r){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,r)}function o(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(90237),i=r(69540),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),u=r(43937),p=r(64272),d=r(26253),c=r(56400);function m(e,t){return d.T.fromJSON({value:e,unit:t})}let h=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,l.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,a.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,u.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,l.MZ)({type:d.T,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,u.K)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,n._)([(0,l.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,n._)([(0,o.$)("esri.layers.support.TimeInfo")],h)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3543,7367],{71163:(e,n,t)=>{t.d(n,{C:()=>c});var r=t(29953);let a,o,i=!1;function l(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then((e=>{o=e,i=!0,a=void 0}))}async function c(e,n){return i?o.apply("invokeGeometryOp",[e,n]):(await l(),c(e,n))}},80672:(e,n,t)=>{t.d(n,{R:()=>a});var r=t(20655);function a(e,n){return null===e?n:new r.A({url:e.field("url")})}},87367:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>A});var r=t(47609),a=t(66395),o=t(85935),i=t(78502),l=t(78878),c=t(80672),s=t(81844),u=t(71163),f=t(5443),d=t(91075),w=t(48526),p=t(86738),h=t(39829),y=t(82799),g=t(65864),m=t(20655),v=t(70333),S=t(78888);async function D(e,n,t){const r=v.id?.findCredential(e.restUrl);if(!r)return null;if("loaded"===e.loadStatus&&""===n&&e.user?.sourceJSON&&!1===t)return e.user.sourceJSON;const a={responseType:"json",query:{f:"json"}};if(t&&(a.query.returnUserLicenseTypeExtensions=!0),""===n){const n=await(0,S.A)(e.restUrl+"/community/self",a);if(n.data){const e=n.data;if(e?.username)return e}return null}const o=await(0,S.A)(e.restUrl+"/community/users/"+n,a);if(o.data){const e=o.data;return e.error?null:e}return null}var b=t(54218);function X(e){if(null==e)return e;switch(typeof e){case"string":case"number":return e;default:throw new o.D$(null,o.TX.InvalidParameter,null)}}function A(e){"async"===e.mode&&(e.functions.disjoint=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null===a[0]||null===a[1]||(0,u.C)("disjoint",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.intersects=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("intersects",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.touches=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("touches",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.crosses=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("crosses",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.within=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("within",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.contains=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("contains",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.overlaps=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("overlaps",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.equals=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>((0,l.D)(a,2,2,n,t),a[0]===a[1]||(a[0]instanceof d.A&&a[1]instanceof d.A?(0,u.C)("equals",[a[0].toJSON(),a[1].toJSON()]):((0,l.g)(a[0])&&(0,l.g)(a[1])||!!((0,l.k)(a[0])&&(0,l.k)(a[1])||(0,l.j)(a[0])&&(0,l.j)(a[1])))&&a[0].equals(a[1])))))},e.functions.relate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,3,3,n,t),a[0]instanceof d.A&&a[1]instanceof d.A)return(0,u.C)("relate",[a[0].toJSON(),a[1].toJSON(),(0,l.f)(a[2])]);if(a[0]instanceof d.A&&null===a[1])return!1;if(a[1]instanceof d.A&&null===a[0])return!1;if(null===a[0]&&null===a[1])return!1;throw new o.D$(n,o.TX.InvalidParameter,t)}))},e.functions.intersection=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null===a[0]||null===a[1]?null:(0,g.rS)(await(0,u.C)("intersection",[a[0].toJSON(),a[1].toJSON()])))))},e.functions.union=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(0===(a=(0,l.E)(a)).length)throw new o.D$(n,o.TX.WrongNumberOfParameters,t);const c=[];if(1===a.length)if((0,b.cy)(a[0])){for(const e of(0,l.E)(a[0]))if(null!==e){if(!(e instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);c.push(e.toJSON())}}else{if(!(0,l.m)(a[0])){if(a[0]instanceof d.A)return(0,l.F)((0,i.Yq)(a[0]),n.spatialReference);if(null===a[0])return null;throw new o.D$(n,o.TX.InvalidParameter,t)}for(const e of(0,l.E)(a[0].toArray()))if(null!==e){if(!(e instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);c.push(e.toJSON())}}else for(const e of a)if(null!==e){if(!(e instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);c.push(e.toJSON())}return 0===c.length?null:(0,g.rS)(await(0,u.C)("union",[c]))}))},e.functions.difference=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null===a[0]?null:null===a[1]?(0,i.Yq)(a[0]):(0,g.rS)(await(0,u.C)("difference",[a[0].toJSON(),a[1].toJSON()])))))},e.functions.symmetricdifference=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null===a[0]&&null===a[1]?null:null===a[0]?(0,i.Yq)(a[1]):null===a[1]?(0,i.Yq)(a[0]):(0,g.rS)(await(0,u.C)("symmetricDifference",[a[0].toJSON(),a[1].toJSON()])))))},e.functions.clip=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,2,n,t),!(a[1]instanceof f.A)&&null!==a[1])throw new o.D$(n,o.TX.InvalidParameter,t);if(null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return null===a[1]?null:(0,g.rS)(await(0,u.C)("clip",[a[0].toJSON(),a[1].toJSON()]))}))},e.functions.cut=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,2,n,t),!(a[1]instanceof y.A)&&null!==a[1])throw new o.D$(n,o.TX.InvalidParameter,t);if(null===a[0])return[];if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return null===a[1]?[(0,i.Yq)(a[0])]:(await(0,u.C)("cut",[a[0].toJSON(),a[1].toJSON()])).map((e=>(0,g.rS)(e)))}))},e.functions.area=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if((0,l.D)(a,1,2,n,t),a=(0,l.E)(a),(0,l.p)(a[0])){const e=await a[0].sumArea(X(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new o.D$(n,o.TX.Cancelled,t);return e}let i=a[0];if(((0,b.cy)(i)||(0,l.m)(i))&&(i=(0,l.G)(a[0],n.spatialReference)),null===i)return 0;if(!(i instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("area",[i.toJSON(),X(a[1])])}))},e.functions.areageodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{(0,l.D)(a,1,3,n,t);let i=(a=(0,l.E)(a))[0];((0,b.cy)(i)||(0,l.m)(i))&&(i=(0,l.G)(i,n.spatialReference));const c=X(a[1]),f=(0,s.rE)(a[2])??"geodesic";if((0,l.p)(i)){const e=await i.sumArea(c,f,n.abortSignal);if(n.abortSignal.aborted)throw new o.D$(n,o.TX.Cancelled,t);return e}if(null==i)return 0;if(!(0,l.l)(i))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("geodeticArea",[i.toJSON(),c,f])}))},e.functions.length=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if((0,l.D)(a,1,2,n,t),a=(0,l.E)(a),(0,l.p)(a[0])){const e=await a[0].sumLength(X(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new o.D$(n,o.TX.Cancelled,t);return e}let i=a[0];if(((0,b.cy)(a[0])||(0,l.m)(a[0]))&&(i=(0,l.H)(a[0],n.spatialReference)),null===i)return 0;if(!(i instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("length",[i.toJSON(),X(a[1])])}))},e.functions.length3d=function(n,r){return e.standardFunctionAsync(n,r,(async(e,a,i)=>{if((0,l.D)(i,1,2,n,r),null===(i=(0,l.E)(i))[0])return 0;let c=i[0];if(((0,b.cy)(i[0])||(0,l.m)(i[0]))&&(c=(0,l.H)(i[0],n.spatialReference)),null===c)return 0;if(!(c instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,r);if(!0===c.hasZ){const{convertFromSpatialReferenceUnit:e,toLengthUnit:n}=await Promise.resolve().then(t.bind(t,40547)),r=(0,s.UI)(c);return e(c.spatialReference,n(i[1]),r)}return(0,u.C)("length",[c.toJSON(),X(i[1])])}))},e.functions.lengthgeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{(0,l.D)(a,1,3,n,t);let i=(a=(0,l.E)(a))[0];((0,b.cy)(a[0])||(0,l.m)(a[0]))&&(i=(0,l.H)(a[0],n.spatialReference));const c=X(a[1]),f=(0,s.rE)(a[2])??"geodesic";if((0,l.p)(i)){const e=await i.sumLength(c,f,n.abortSignal);if(n.abortSignal.aborted)throw new o.D$(n,o.TX.Cancelled,t);return e}if(null===i)return 0;if(!(0,l.l)(i))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("geodeticLength",[i.toJSON(),c,f])}))},e.functions.distance=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{a=(0,l.E)(a),(0,l.D)(a,2,3,n,t);let i=a[0];if(((0,b.cy)(a[0])||(0,l.m)(a[0]))&&(i=(0,l.J)(a[0],n.spatialReference)),!(i instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);let c=a[1];if(((0,b.cy)(a[1])||(0,l.m)(a[1]))&&(c=(0,l.J)(a[1],n.spatialReference)),!(c instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("distance",[i.toJSON(),c.toJSON(),X(a[2])])}))},e.functions.distancegeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{a=(0,l.E)(a),(0,l.D)(a,2,4,n,t);const i=a[0];if(!(i instanceof p.A))throw new o.D$(n,o.TX.InvalidParameter,t);const c=a[1];if(!(c instanceof p.A))throw new o.D$(n,o.TX.InvalidParameter,t);const f=new y.A({paths:[],spatialReference:i.spatialReference});return f.addPath([i,c]),(0,u.C)("geodeticLength",[f.toJSON(),X(a[2]),(0,s.rE)(a[3])??"geodesic"])}))},e.functions.densify=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,3,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);const i=(0,l.t)(a[1]);if(isNaN(i))throw new o.D$(n,o.TX.InvalidParameter,t);if(i<=0)throw new o.D$(n,o.TX.InvalidParameter,t);switch(a[0].type){case"polygon":case"polyline":case"extent":return(0,g.rS)(await(0,u.C)("densify",[a[0].toJSON(),i,X(a[2])]));default:return a[0]}}))},e.functions.densifygeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{a=(0,l.E)(a),(0,l.D)(a,2,4,n,t);const i=a[0];if(null==i)return null;if(!(0,l.l)(i))throw new o.D$(n,o.TX.InvalidParameter,t);const c=(0,l.t)(a[1]);if(isNaN(c))throw new o.D$(n,o.TX.InvalidParameter,t);if(c<=0)throw new o.D$(n,o.TX.InvalidParameter,t);const f=X(a[2]),d=(0,s.rE)(a[3])??"geodesic";switch(i.type){case"polygon":case"polyline":case"extent":return(0,g.rS)(await(0,u.C)("geodeticDensify",[i.toJSON(),c,f,d]));default:return i}}))},e.functions.generalize=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,4,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);const i=(0,l.t)(a[1]);if(isNaN(i))throw new o.D$(n,o.TX.InvalidParameter,t);const c=(0,l.e)((0,l.K)(a[2],!0));return(0,g.rS)(await(0,u.C)("generalize",[a[0].toJSON(),i,X(a[3]),{removeDegenerateParts:c}]))}))},e.functions.buffer=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,3,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);const c=(0,l.t)(a[1]);if(isNaN(c))throw new o.D$(n,o.TX.InvalidParameter,t);return 0===c?(0,i.Yq)(a[0]):(0,g.rS)(await(0,u.C)("buffer",[a[0].toJSON(),c,X(a[2])]))}))},e.functions.buffergeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{a=(0,l.E)(a),(0,l.D)(a,2,4,n,t);const c=a[0];if(null==c)return null;if(!(0,l.l)(c))throw new o.D$(n,o.TX.InvalidParameter,t);const f=(0,l.t)(a[1]);if(isNaN(f))throw new o.D$(n,o.TX.InvalidParameter,t);if(0===f)return(0,i.Yq)(c);const d=X(a[2]),w=(0,s.rE)(a[3])??"geodesic";return(0,g.rS)(await(0,u.C)("geodesicBuffer",[c.toJSON(),f,d,w]))}))},e.functions.offset=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,6,n,t),null===a[0])return null;if(!(a[0]instanceof h.A||a[0]instanceof y.A))throw new o.D$(n,o.TX.InvalidParameter,t);const i=(0,l.t)(a[1]);if(isNaN(i))throw new o.D$(n,o.TX.InvalidParameter,t);const c=(0,l.f)(a[3]??"round").toLowerCase();let s;switch(c){case"round":case"bevel":case"miter":case"square":s=c;break;default:s="round"}const f=(0,l.t)((0,l.K)(a[4],10));if(isNaN(f))throw new o.D$(n,o.TX.InvalidParameter,t);const d=(0,l.t)((0,l.K)(a[5],0));if(isNaN(d))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,g.rS)(await(0,u.C)("offset",[a[0].toJSON(),i,X(a[2]),{joins:s,miterLimit:f,flattenError:d}]))}))},e.functions.rotate=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,3,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);const i=a[0]instanceof f.A?h.A.fromExtent(a[0]):a[0],c=(0,l.t)(a[1]);if(isNaN(c))throw new o.D$(n,o.TX.InvalidParameter,t);const s=(0,l.K)(a[2],null);if(null===s){const e="point"===i.type?i:i.extent?.center;return(0,g.rS)(await(0,u.C)("rotate",[i.toJSON(),c,e?.x,e?.y]))}if(s instanceof p.A)return(0,g.rS)(await(0,u.C)("rotate",[i.toJSON(),c,s.x,s.y]));throw new o.D$(n,o.TX.InvalidParameter,t)}))},e.functions.centroid=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,2,n,t),null===a[0])return null;const i=(0,l.f)(a[1]??"geometric").toLowerCase();if("geometric"!==i&&"labelpoint"!==i)throw new o.D$(n,o.TX.InvalidParameter,t);let c=a[0];if(((0,b.cy)(a[0])||(0,l.m)(a[0]))&&(c="geometric"===i?(0,l.J)(a[0],n.spatialReference):(0,l.G)(a[0],n.spatialReference),null===c))return null;if(!(c instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,g.rS)("geometric"===i?await(0,u.C)("centroid",[c.toJSON()]):await(0,u.C)("labelPoint",[c.toJSON()]))}))},e.functions.measuretocoordinate=function(n,t){return e.standardFunctionAsync(n,t,s.Cd)},e.functions.pointtocoordinate=function(n,t){return e.standardFunctionAsync(n,t,s.kr)},e.functions.distancetocoordinate=function(n,t){return e.standardFunctionAsync(n,t,s.Bn)},e.functions.multiparttosinglepart=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,1,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);if(a[0]instanceof p.A)return[(0,l.F)((0,i.Yq)(a[0]),n.spatialReference)];if(a[0]instanceof f.A)return[(0,l.F)((0,i.Yq)(a[0]),n.spatialReference)];const c=(0,g.rS)(await(0,u.C)("simplify",[a[0].toJSON()]));if(c instanceof h.A){const e=[],n=[];for(let t=0;t<c.rings.length;t++)if(c.isClockwise(c.rings[t])){const n=(0,g.rS)({rings:[c.rings[t]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});e.push(n)}else n.push({ring:c.rings[t],pt:c.getPoint(t,0)});for(let t=0;t<n.length;t++)for(let r=0;r<e.length;r++)if(e[r].contains(n[t].pt)){e[r].addRing(n[t].ring);break}return e}if(c instanceof y.A){const e=[];for(let n=0;n<c.paths.length;n++){const t=(0,g.rS)({paths:[c.paths[n]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});e.push(t)}return e}if(a[0]instanceof w.A){const e=[],t=(0,l.F)((0,i.Yq)(a[0]),n.spatialReference);for(let n=0;n<t.points.length;n++)e.push(t.getPoint(n));return e}return null}))},e.functions.issimple=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,1,n,t),null===a[0])return!0;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("isSimple",[a[0].toJSON()])}))},e.functions.simplify=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,1,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,g.rS)(await(0,u.C)("simplify",[a[0].toJSON()]))}))},e.functions.convexhull=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,1,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,g.rS)(await(0,u.C)("convexHull",[a[0].toJSON()]))}))},e.functions.getuser=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,s)=>{(0,l.D)(s,0,2,n,t);let u=(0,l.K)(s[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,l.f)(u),0===s.length||s[0]instanceof r.A){let e;e=n.services?.portal?n.services.portal:m.A.getDefault(),s.length>0&&(e=(0,c.R)(s[0],e));const t=await D(e,u,f);if(t){const e=JSON.parse(JSON.stringify(t));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return a.A.convertObjectToArcadeDictionary(e,(0,l.L)(n))}return null}let d=null;if((0,l.p)(s[0])&&(d=s[0]),d){if(f=!1,u)return null;await d.load();const e=await d.getOwningSystemUrl();if(!e){if(!u){const e=await d.getIdentityUser();return e?a.A.convertObjectToArcadeDictionary({username:e},(0,l.L)(n)):null}return null}let t;t=n.services?.portal?n.services.portal:m.A.getDefault(),t=(0,c.R)(new r.A(e),t);const o=await D(t,u,f);if(o){const e=JSON.parse(JSON.stringify(o));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return a.A.convertObjectToArcadeDictionary(e,(0,l.L)(n))}return null}throw new o.D$(n,o.TX.InvalidParameter,t)}))},e.functions.nearestcoordinate=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if(i=(0,l.E)(i),(0,l.D)(i,2,2,n,t),!(i[0]instanceof d.A||null===i[0]))throw new o.D$(n,o.TX.InvalidParameter,t);if(!(i[1]instanceof p.A||null===i[1]))throw new o.D$(n,o.TX.InvalidParameter,t);if(null===i[0]||null===i[1])return null;const c=i[0]instanceof f.A?h.A.fromExtent(i[0]):i[0],s=await(0,u.C)("getNearestCoordinate",[c.toJSON(),i[1].toJSON(),{calculateLeftRightSide:!0}]);return null===s?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,g.rS)(s.coordinate),distance:s.distance,sideOfLine:0===s.distance?"straddle":s.rightSide?"right":"left"},(0,l.L)(n),!1,!0)}))},e.functions.nearestvertex=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if(i=(0,l.E)(i),(0,l.D)(i,2,2,n,t),!(i[0]instanceof d.A||null===i[0]))throw new o.D$(n,o.TX.InvalidParameter,t);if(!(i[1]instanceof p.A||null===i[1]))throw new o.D$(n,o.TX.InvalidParameter,t);if(null===i[0]||null===i[1])return null;const c=i[0]instanceof f.A?h.A.fromExtent(i[0]):i[0],s=await(0,u.C)("getNearestVertex",[c.toJSON(),i[1].toJSON()]);return null===s?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,g.rS)(s.coordinate),distance:s.distance,sideOfLine:0===s.distance?"straddle":s.rightSide?"right":"left"},(0,l.L)(n),!1,!0)}))})}},93543:(e,n,t)=>{t.r(n),t.d(n,{executeScript:()=>_,extend:()=>Y});var r=t(48938),a=t(99719),o=t(72888),i=t(15695),l=t(66395),c=t(85935),s=t(93833),u=t(92400),f=t(78878),d=t(19157),w=t(3367),p=t(63680),h=t(81113),y=t(32091),g=t(87367),m=t(41217),v=t(36770),S=t(47346),D=t(29304),b=(t(44208),t(91075)),X=t(16930),A=t(54218);async function T(e,n){const t=[];for(let r=0;r<n.arguments.length;r++)t.push(await x(e,n.arguments[r]));return t}async function $(e,n,t){return!0===n.preparsed?t(e,null,n.arguments):t(e,n,await T(e,n))}class N extends u.fF{constructor(e,n){super(),this.definition=null,this.context=null,this.definition=e,this.context=n}createFunction(e){return(...n)=>{const t={spatialReference:this.context.spatialReference,console:this.context.console,lrucache:this.context.lrucache,timeZone:this.context.timeZone??null,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,services:this.context.services,abortSignal:this.context.abortSignal,localScope:{},depthCounter:{depth:e.depthCounter+1},globalScope:this.context.globalScope};if(t.depthCounter.depth>64)throw new c.D$(e,c.TX.MaximumCallDepth,null);return O(this.definition,t,n,null)}}call(e,n){return F(e,n,((t,r,a)=>{const o={spatialReference:e.spatialReference,services:e.services,console:e.console,libraryResolver:e.libraryResolver,exports:e.exports,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:{},abortSignal:e.abortSignal,globalScope:e.globalScope,depthCounter:{depth:e.depthCounter.depth+1}};if(o.depthCounter.depth>64)throw new c.D$(e,c.TX.MaximumCallDepth,n);return O(this.definition,o,a,n)}))}marshalledCall(e,n,t,r){return r(e,n,(async(a,o,i)=>{const l={spatialReference:e.spatialReference,services:e.services,globalScope:t.globalScope,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,console:e.console,abortSignal:e.abortSignal,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:{}};return i=i.map((n=>!(0,f.i)(n)||n instanceof u.CU?n:(0,u.o6)(n,e,r))),(0,u.o6)(await O(this.definition,l,i,n),t,r)}))}}async function O(e,n,t,a){const o=e.body;if(t.length!==e.params.length)throw new c.D$(n,c.TX.WrongNumberOfParameters,null);for(let a=0;a<t.length;a++){const o=e.params[a];"Identifier"===o.type&&null!=n.localScope&&(n.localScope[(0,r.X)(o)]={value:t[a]})}const i=await C(n,o);if(i instanceof f.R)return i.value;if(i===f.w)throw new c.D$(n,c.TX.UnexpectedToken,a);if(i===f.x)throw new c.D$(n,c.TX.UnexpectedToken,a);return i instanceof f.I?i.value:i}class I extends a.x{constructor(e){super(),this.source=e}global(e){const n=this.executingContext.globalScope[(0,r.X)(e)];if((0,f.i)(n.value)&&!(n.value instanceof u.CU)){const t=new u.CU;return t.fn=n.value,t.parameterEvaluator=F,t.context=this.executingContext,this.executingContext.globalScope[(0,r.X)(e)]={value:t},t}return n.value}setGlobal(e,n){if((0,f.i)(n))throw new c.D$(null,c.TX.AssignModuleFunction,null);this.executingContext.globalScope[(0,r.X)(e)]={value:n}}hasGlobal(e){return void 0===this.executingContext.exports[e]&&(e=(0,r.X)(e)),void 0!==this.executingContext.exports[e]}async loadModule(e){const n=e.spatialReference??X.A.WebMercator;this.moduleScope=z(null,null,e.timeZone),this.executingContext={spatialReference:n,services:e.services,libraryResolver:new o.a(e.libraryResolver._moduleSingletons,this.source.syntax.loadedModules),exports:{},abortSignal:e.abortSignal??r._,globalScope:this.moduleScope,console:e.console??V,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:null,depthCounter:{depth:1}},await k(this.executingContext,this.source.syntax)}}async function F(e,n,t){return!0===n.preparsed?t(e,null,n.arguments):t(e,n,await T(e,n))}async function x(e,n){n.breakpoint&&await n.breakpoint();try{switch(n.type){case"UpdateExpression":return await async function(e,n){const t=n.argument;if("CallExpression"===t.type)throw new c.D$(e,c.TX.NeverReach,n);if("MemberExpression"===t.type){const r=await x(e,t.object);let a,o;if(!0===t.computed)a=await x(e,t.property);else{if("Identifier"!==t.property.type)throw new c.D$(e,c.TX.Unrecognized,n);a=t.property.name}if((0,A.cy)(r)){if(!(0,A.Et)(a))throw new c.D$(e,c.TX.ArrayAccessorMustBeNumber,n);if(a<0&&(a=r.length+a),a<0||a>=r.length)throw new c.D$(e,c.TX.OutOfBounds,n);o=(0,f.t)(r[a]),r[a]="++"===n.operator?o+1:o-1}else if(r instanceof l.A){if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0!==r.hasField(a))throw new c.D$(e,c.TX.FieldNotFound,n,{key:a});o=(0,f.t)(r.field(a)),r.setField(a,"++"===n.operator?o+1:o-1)}else if(r instanceof I){if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.ModuleAccessorMustBeString,n);if(!0!==r.hasGlobal(a))throw new c.D$(e,c.TX.ModuleExportNotFound,n);o=(0,f.t)(r.global(a)),r.setGlobal(a,"++"===n.operator?o+1:o-1)}else{if(!(0,f.n)(r))throw(0,f.m)(r)?new c.D$(e,c.TX.Immutable,n):new c.D$(e,c.TX.InvalidParameter,n);if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0!==r.hasField(a))throw new c.D$(e,c.TX.FieldNotFound,n,{key:a});o=(0,f.t)(r.field(a)),r.setField(a,"++"===n.operator?o+1:o-1)}return!1===n.prefix?o:"++"===n.operator?o+1:o-1}const a=(0,r.X)(t);let o;if(null!=e.localScope&&void 0!==e.localScope[a])return o=(0,f.t)(e.localScope[a].value),e.localScope[a]={value:"++"===n.operator?o+1:o-1},!1===n.prefix?o:"++"===n.operator?o+1:o-1;if(void 0!==e.globalScope[a])return o=(0,f.t)(e.globalScope[a].value),e.globalScope[a]={value:"++"===n.operator?o+1:o-1},!1===n.prefix?o:"++"===n.operator?o+1:o-1;throw new c.D$(e,c.TX.InvalidIdentifier,n)}(e,n);case"AssignmentExpression":return await async function(e,n){const t=n.left;if("MemberExpression"===t.type){const r=await x(e,t.object);let a;if(!0===t.computed)a=await x(e,t.property);else{if("Identifier"!==t.property.type)throw new c.D$(e,c.TX.InvalidIdentifier,n);a=t.property.name}const o=await x(e,n.right);if((0,A.cy)(r)){if(!(0,A.Et)(a))throw new c.D$(e,c.TX.ArrayAccessorMustBeNumber,n);if(a<0&&(a=r.length+a),a<0||a>r.length)throw new c.D$(e,c.TX.OutOfBounds,n);if(a===r.length){if("="!==n.operator)throw new c.D$(e,c.TX.OutOfBounds,n);r[a]=P(o,n.operator,r[a],n,e)}else r[a]=P(o,n.operator,r[a],n,e)}else if(r instanceof l.A){if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0===r.hasField(a))r.setField(a,P(o,n.operator,r.field(a),n,e));else{if("="!==n.operator)throw new c.D$(e,c.TX.FieldNotFound,n,{key:a});r.setField(a,P(o,n.operator,null,n,e))}}else if(r instanceof I){if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0!==r.hasGlobal(a))throw new c.D$(e,c.TX.ModuleExportNotFound,n);r.setGlobal(a,P(o,n.operator,r.global(a),n,e))}else{if(!(0,f.n)(r))throw(0,f.m)(r)?new c.D$(e,c.TX.Immutable,n):new c.D$(e,c.TX.InvalidParameter,n);if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0===r.hasField(a))r.setField(a,P(o,n.operator,r.field(a),n,e));else{if("="!==n.operator)throw new c.D$(e,c.TX.FieldNotFound,n,{key:a});r.setField(a,P(o,n.operator,null,n,e))}}return f.v}const a=(0,r.X)(t);if(null!=e.localScope&&void 0!==e.localScope[a]){const t=await x(e,n.right);return e.localScope[a]={value:P(t,n.operator,e.localScope[a].value,n,e)},f.v}if(void 0!==e.globalScope[a]){const t=await x(e,n.right);return e.globalScope[a]={value:P(t,n.operator,e.globalScope[a].value,n,e)},f.v}throw new c.D$(e,c.TX.InvalidIdentifier,n)}(e,n);case"TemplateLiteral":return await async function(e,n){let t="",r=0;for(const a of n.quasis)if(t+=a.value?a.value.cooked:"",!1===a.tail){if(n.expressions[r]){const a=await x(e,n.expressions[r]);if((0,f.i)(a))throw new c.D$(e,c.TX.NoFunctionInTemplateLiteral,n);t+=(0,f.f)(a)}r++}return t}(e,n);case"Identifier":return K(e,n);case"MemberExpression":return await async function(e,n){const t=await x(e,n.object);if(null===t)throw new c.D$(e,c.TX.MemberOfNull,n);if(!1===n.computed){if("Identifier"===n.property.type){if(t instanceof l.A||(0,f.y)(t))return t.field(n.property.name);if(t instanceof b.A)return(0,i.Bl)(t,n.property.name,e,n);if(t instanceof I){if(!t.hasGlobal(n.property.name))throw new c.D$(e,c.TX.InvalidIdentifier,n);return t.global(n.property.name)}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}let r=await x(e,n.property);if(t instanceof l.A||(0,f.y)(t)){if((0,A.Kg)(r))return t.field(r);throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if(t instanceof I){if((0,A.Kg)(r))return t.global(r);throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if(t instanceof b.A){if((0,A.Kg)(r))return(0,i.Bl)(t,r,e,n);throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if((0,A.cy)(t)){if((0,A.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new c.D$(e,c.TX.OutOfBounds,n);return t[r]}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if((0,f.m)(t)){if((0,A.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length()+r),r>=t.length()||r<0)throw new c.D$(e,c.TX.OutOfBounds,n);return t.get(r)}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if((0,A.Kg)(t)){if((0,A.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new c.D$(e,c.TX.OutOfBounds,n);return t[r]}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}(e,n);case"Literal":return n.value;case"CallExpression":return await async function(e,n){if("MemberExpression"===n.callee.type){const t=await x(e,n.callee.object);if(!(t instanceof I))throw new c.D$(e,c.TX.FunctionNotFound,n);const r=!1===n.callee.computed?n.callee.property.name:await x(e,n.callee.property);if(!t.hasGlobal(r))throw new c.D$(e,c.TX.FunctionNotFound,n);const a=t.global(r);if(!(0,f.i)(a))throw new c.D$(e,c.TX.CallNonFunction,n);return a.call(e,n)}if("Identifier"!==n.callee.type)throw new c.D$(e,c.TX.FunctionNotFound,n);const t=(0,r.X)(n.callee);if(null!=e.localScope&&void 0!==e.localScope[t]){const r=e.localScope[t];if((0,f.i)(r.value))return r.value.call(e,n);throw new c.D$(e,c.TX.CallNonFunction,n)}if(void 0!==e.globalScope[t]){const r=e.globalScope[t];if((0,f.i)(r.value))return r.value.call(e,n);throw new c.D$(e,c.TX.CallNonFunction,n)}throw new c.D$(e,c.TX.FunctionNotFound,n)}(e,n);case"UnaryExpression":return await async function(e,n){const t=await x(e,n.argument);if((0,A.Lm)(t)){if("!"===n.operator)return!t;if("-"===n.operator)return-1*(0,f.t)(t);if("+"===n.operator)return 1*(0,f.t)(t);if("~"===n.operator)return~(0,f.t)(t);throw new c.D$(e,c.TX.UnsupportedUnaryOperator,n)}if("-"===n.operator)return-1*(0,f.t)(t);if("+"===n.operator)return 1*(0,f.t)(t);if("~"===n.operator)return~(0,f.t)(t);throw new c.D$(e,c.TX.UnsupportedUnaryOperator,n)}(e,n);case"BinaryExpression":return await async function(e,n){const t=await x(e,n.left),r=await x(e,n.right);switch(n.operator){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,f.B)((0,f.t)(t),(0,f.t)(r),n.operator);case"==":return(0,f.A)(t,r);case"!=":return!(0,f.A)(t,r);case"<":case">":case"<=":case">=":return(0,f.z)(t,r,n.operator);case"+":return(0,A.Kg)(t)||(0,A.Kg)(r)?(0,f.f)(t)+(0,f.f)(r):(0,f.t)(t)+(0,f.t)(r);case"-":return(0,f.t)(t)-(0,f.t)(r);case"*":return(0,f.t)(t)*(0,f.t)(r);case"/":return(0,f.t)(t)/(0,f.t)(r);case"%":return(0,f.t)(t)%(0,f.t)(r);default:throw new c.D$(e,c.TX.UnsupportedOperator,n)}}(e,n);case"LogicalExpression":return await async function(e,n){const t=await x(e,n.left);if(!(0,A.Lm)(t))throw new c.D$(e,c.TX.LogicalExpressionOnlyBoolean,n);switch(n.operator){case"||":{if(!0===t)return t;const r=await x(e,n.right);if((0,A.Lm)(r))return r;throw new c.D$(e,c.TX.LogicExpressionOrAnd,n)}case"&&":{if(!1===t)return t;const r=await x(e,n.right);if((0,A.Lm)(r))return r;throw new c.D$(e,c.TX.LogicExpressionOrAnd,n)}default:throw new c.D$(e,c.TX.LogicExpressionOrAnd,n)}}(e,n);case"ArrayExpression":return await async function(e,n){const t=[];for(let r=0;r<n.elements.length;r++)t.push(await x(e,n.elements[r]));for(let r=0;r<t.length;r++){if((0,f.i)(t[r]))throw new c.D$(e,c.TX.NoFunctionInArray,n);t[r]===f.v&&(t[r]=null)}return t}(e,n);case"ObjectExpression":return await async function(e,n){const t=[];for(let r=0;r<n.properties.length;r++){const a=n.properties[r],o=await x(e,a.value),i="Identifier"===a.key.type?a.key.name:await x(e,a.key);t[r]={key:i,value:o}}const r={},a=new Map;for(let o=0;o<t.length;o++){const i=t[o];if((0,f.i)(i.value))throw new c.D$(e,c.TX.NoFunctionInDictionary,n);if(!1===(0,A.Kg)(i.key))throw new c.D$(e,c.TX.KeyMustBeString,n);let l=i.key.toString();const s=l.toLowerCase();a.has(s)?l=a.get(s):a.set(s,l),i.value===f.v?r[l]=null:r[l]=i.value}const o=new l.A(r);return o.immutable=!1,o}(e,n);default:throw new c.D$(e,c.TX.Unrecognized,n)}}catch(t){throw(0,c.Nh)(e,n,t)}}async function C(e,n){n.breakpoint&&await n.breakpoint();try{switch(n.type){case"ImportDeclaration":return await async function(e,n){const t=(0,r.X)(n.specifiers[0].local),a=e.libraryResolver.loadLibrary(t);let o;return e.libraryResolver._moduleSingletons?.has(a.uri)?o=e.libraryResolver._moduleSingletons.get(a.uri):(o=new I(a),await o.loadModule(e),e.libraryResolver._moduleSingletons?.set(a.uri,o)),e.globalScope[t]={value:o},f.v}(e,n);case"ExportNamedDeclaration":return await async function(e,n){if(await C(e,n.declaration),"FunctionDeclaration"===n.declaration.type)e.exports[(0,r.X)(n.declaration.id)]="function";else if("VariableDeclaration"===n.declaration.type)for(const t of n.declaration.declarations)e.exports[(0,r.X)(t.id)]="variable";return f.v}(e,n);case"VariableDeclaration":return await M(e,n,0);case"BlockStatement":return await k(e,n);case"FunctionDeclaration":return await async function(e,n){const t=(0,r.X)(n.id);return e.globalScope[t]={value:new N(n,e)},f.v}(e,n);case"ReturnStatement":return await async function(e,n){if(null===n.argument)return new f.R(f.v);const t=await x(e,n.argument);return new f.R(t)}(e,n);case"IfStatement":return await async function(e,n){const t=await x(e,n.test);if(!0===t)return C(e,n.consequent);if(!1===t)return null!==n.alternate?C(e,n.alternate):f.v;throw new c.D$(e,c.TX.BooleanConditionRequired,n)}(e,n);case"ExpressionStatement":return await async function(e,n){const t=await x(e,n.expression);return t===f.v?f.v:new f.I(t)}(e,n);case"ForStatement":return await async function(e,n){try{for(null!==n.init&&("VariableDeclaration"===n.init.type?await C(e,n.init):await x(e,n.init));;){if(null!==n.test){const t=await x(e,n.test);if(!0===e.abortSignal?.aborted)throw new c.D$(e,c.TX.Cancelled,n);if(!1===t)break;if(!0!==t)throw new c.D$(e,c.TX.BooleanConditionRequired,n)}const t=await C(e,n.body);if(t===f.w)break;if(t instanceof f.R)return t;null!==n.update&&await x(e,n.update)}return f.v}catch(e){throw e}}(e,n);case"WhileStatement":return await async function(e,n){let t=await x(e,n.test);if(!1===t)return f.v;if(!0!==t)throw new c.D$(e,c.TX.BooleanConditionRequired,n);for(;!0===t;){const r=await C(e,n.body);if(r===f.w)break;if(r instanceof f.R)return r;if(t=await x(e,n.test),!0!==t&&!1!==t)throw new c.D$(e,c.TX.BooleanConditionRequired,n)}return f.v}(e,n);case"ForInStatement":return await async function(e,n){const t=await x(e,n.right);"VariableDeclaration"===n.left.type&&await C(e,n.left);const a=(0,r.X)("VariableDeclaration"===n.left.type?n.left.declarations[0].id:n.left);let o=null;if(null!=e.localScope&&void 0!==e.localScope[a]&&(o=e.localScope[a]),null===o&&void 0!==e.globalScope[a]){const n=e.globalScope[a].value;o=e.globalScope[a]={value:n}}if(null===o)throw new c.D$(e,c.TX.InvalidIdentifier,n);return(0,A.cy)(t)||(0,A.Kg)(t)?await E(e,n,t,o):(0,f.m)(t)?await R(e,n,t,o):t instanceof l.A||(0,f.y)(t)?await E(e,n,t.keys(),o,"k"):(0,f.p)(t)?await J(e,n,t,o):(0,f.l)(t)?await E(e,n,(0,i.T)(t),o,"k"):f.v}(e,n);case"ForOfStatement":return await async function(e,n){const t=await x(e,n.right);"VariableDeclaration"===n.left.type&&await C(e,n.left);const a=(0,r.X)("VariableDeclaration"===n.left.type?n.left.declarations[0].id:n.left);let o=null;if(null!=e.localScope&&void 0!==e.localScope[a]&&(o=e.localScope[a]),null===o&&void 0!==e.globalScope[a]){const n=e.globalScope[a].value;o=e.globalScope[a]={value:n}}if(null===o)throw new c.D$(e,c.TX.InvalidIdentifier,n);return(0,A.cy)(t)||(0,A.Kg)(t)?await E(e,n,t,o,"k"):(0,f.m)(t)?await R(e,n,t,o,"k"):t instanceof l.A||(0,f.y)(t)?await async function(e,n,t,r){for(const a of t.keys()){const o=t.field(a);r.value=new l.A({key:a,value:o});const i=await C(e,n.body);if(i===f.w)break;if(i instanceof f.R)return i}return f.v}(e,n,t,o):(0,f.p)(t)?await J(e,n,t,o):(0,f.l)(t)?await async function(e,n,t,r){for(const a of(0,i.T)(t)){const o=(0,i.Bl)(t,a,e,n,1);r.value=new l.A({key:a,value:o});const c=await C(e,n.body);if(c===f.w)break;if(c instanceof f.R)return c}return f.v}(e,n,t,o):f.v}(e,n);case"BreakStatement":return f.w;case"EmptyStatement":return f.v;case"ContinueStatement":return f.x;default:throw new c.D$(e,c.TX.Unrecognized,n)}}catch(t){throw(0,c.Nh)(e,n,t)}}async function E(e,n,t,r,a="i"){const o=t.length;for(let i=0;i<o;i++){if("k"===a){if(i>=t.length)throw new c.D$(e,c.TX.OutOfBounds,n);r.value=t[i]}else r.value=i;const o=await C(e,n.body);if(o===f.w)break;if(o instanceof f.R)return o}return f.v}async function R(e,n,t,r,a="i"){const o=t.length();for(let i=0;i<o;i++){r.value="k"===a?t.get(i):i;const o=await C(e,n.body);if(o===f.w)break;if(o instanceof f.R)return o}return f.v}async function J(e,n,t,r){const a=t.iterator(e.abortSignal);let o;for(;null!=(o=await a.next());){const a=s.A.createFromGraphicLikeObject(o.geometry,o.attributes,t,e.timeZone);a._underlyingGraphic=o,r.value=a;const i=await C(e,n.body);if(i===f.w)break;if(i instanceof f.R)return i}return f.v}function P(e,n,t,r,a){switch(n){case"=":return e===f.v?null:e;case"/=":return(0,f.t)(t)/(0,f.t)(e);case"*=":return(0,f.t)(t)*(0,f.t)(e);case"-=":return(0,f.t)(t)-(0,f.t)(e);case"+=":return(0,A.Kg)(t)||(0,A.Kg)(e)?(0,f.f)(t)+(0,f.f)(e):(0,f.t)(t)+(0,f.t)(e);case"%=":return(0,f.t)(t)%(0,f.t)(e);default:throw new c.D$(a,c.TX.UnsupportedOperator,r)}}async function k(e,n){return L(e,n,0)}async function L(e,n,t){if(t>=n.body.length)return f.v;const r=await C(e,n.body[t]);return r instanceof f.R||r===f.w||r===f.x||t===n.body.length-1?r:L(e,n,t+1)}async function M(e,n,t){return t>=n.declarations.length||(await async function(e,n){let t=null;if(t=null===n.init?null:await x(e,n.init),null!==e.localScope){if(t===f.v&&(t=null),"Identifier"!==n.id.type)throw new c.D$(e,c.TX.InvalidIdentifier,n);const a=(0,r.X)(n.id);return void(null!=e.localScope&&(e.localScope[a]={value:t}))}if("Identifier"!==n.id.type)throw new c.D$(e,c.TX.InvalidIdentifier,n);const a=(0,r.X)(n.id);t===f.v&&(t=null),e.globalScope[a]={value:t}}(e,n.declarations[t]),t===n.declarations.length-1||await M(e,n,t+1)),f.v}function K(e,n){const t=(0,r.X)(n);if(null!=e.localScope&&void 0!==e.localScope[t])return e.localScope[t].value;if(void 0!==e.globalScope[t])return e.globalScope[t].value;throw new c.D$(e,c.TX.InvalidIdentifier,n)}async function B(e,n){(0,f.D)(null===n.arguments?[]:n.arguments,3,3,e,n);const t=await x(e,n.arguments[0]);if(!1===(0,A.Lm)(t))throw new c.D$(e,c.TX.BooleanConditionRequired,n);return x(e,t?n.arguments[1]:n.arguments[2])}async function U(e,n){(0,f.D)(null===n.arguments?[]:n.arguments,2,3,e,n);const t=await x(e,n.arguments[0]);if(3===n.arguments.length){const r=await x(e,n.arguments[1]),a=(0,i.jd)(t,r);return null!=a&&""!==a?a:x(e,n.arguments[2])}return null==t||""===t?x(e,n.arguments[1]):t}async function j(e,n){if(n.arguments.length<2)throw new c.D$(e,c.TX.WrongNumberOfParameters,n);if(2===n.arguments.length)return x(e,n.arguments[1]);if((n.arguments.length-1)%2==0)throw new c.D$(e,c.TX.WrongNumberOfParameters,n);return Z(e,n,1,await x(e,n.arguments[0]))}async function Z(e,n,t,r){const a=await x(e,n.arguments[t]);if((0,f.A)(a,r))return x(e,n.arguments[t+1]);const o=n.arguments.length-t;return 1===o?x(e,n.arguments[t]):2===o?null:3===o?x(e,n.arguments[t+2]):Z(e,n,t+2,r)}async function q(e,n){if(n.arguments.length<3)throw new c.D$(e,c.TX.WrongNumberOfParameters,n);if(n.arguments.length%2==0)throw new c.D$(e,c.TX.WrongNumberOfParameters,n);const t=await x(e,n.arguments[0]);if(!1===(0,A.Lm)(t))throw new c.D$(e,c.TX.BooleanConditionRequired,n.arguments[0]);return G(e,n,0,t)}async function G(e,n,t,r){if(!0===r)return x(e,n.arguments[t+1]);if(3==n.arguments.length-t)return x(e,n.arguments[t+2]);const a=await x(e,n.arguments[t+2]);if(!1===(0,A.Lm)(a))throw new c.D$(e,c.TX.ModuleExportNotFound,n.arguments[t+2]);return G(e,n,t+2,a)}const W=function(){const e=Object.create(null);(0,h.d)(e,$),(0,D.d)(e,$),(0,y.d)(e,$,K),(0,v.d)(e,$),(0,m.d)(e,$),(0,S.d)(e,$),(0,g.registerFunctions)({functions:e,compiled:!1,signatures:null,evaluateIdentifier:null,mode:"async",standardFunction:$,standardFunctionAsync:F}),e.iif=B,e.defaultvalue=U,e.decode=j,e.when=q;const n=function(){const e=new l.A({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});e.immutable=!1,this.textformatting={value:e}};(n.prototype=Object.create(null)).infinity=Object.freeze({value:Number.POSITIVE_INFINITY}),n.prototype.pi=Object.freeze({value:Math.PI});for(const[t,r]of Object.entries(e))n.prototype[t]=Object.freeze({value:new u.UQ(r)});return n}();function Y(e){const n={mode:"async",compiled:!1,functions:Object.create(null),signatures:[],standardFunction:$,standardFunctionAsync:F,evaluateIdentifier:K};for(let t=0;t<e.length;t++)e[t].registerFunctions(n);for(const[e,t]of Object.entries(n.functions))W.prototype[e]=Object.freeze({value:new u.UQ(t)});for(let e=0;e<n.signatures.length;e++)(0,d.WC)(n.signatures[e],"async")}function z(e,n,t){const r=new W;null==e&&(e={}),null==n&&(n={});for(const e in n)r[e]={value:new u.UQ(n[e])};for(const n in e)r[n]={value:(0,A.DU)(e[n])?s.A.createFromGraphic(e[n],t):e[n]};return r}function V(e){console.log(e)}async function _(e,n){const t=n.spatialReference??X.A.WebMercator;let a=null;e.usesModules&&(a=new o.a(new Map,e.loadedModules));const i=z(n.vars,n.customfunctions,n.timeZone),l={spatialReference:t,services:n.services,exports:{},libraryResolver:a,abortSignal:n.abortSignal??r._,globalScope:i,console:n.console??V,timeZone:n.timeZone??null,lrucache:n.lrucache,interceptor:n.interceptor,localScope:null,depthCounter:{depth:1}},s=await k(l,e);if(s instanceof f.R||s instanceof f.I){const e=s.value;if((0,f.C)(e))return null;if((0,f.i)(e))throw new c.D$(l,c.TX.IllegalResult,null);return e}if((0,f.C)(s))return null;if(s===f.w)throw new c.D$(l,c.TX.IllegalResult,null);if(s===f.x)throw new c.D$(l,c.TX.IllegalResult,null);throw new c.D$(l,c.TX.NeverReach,null)}Y([p.A]),Y([w.A])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8010],{563:(e,t,s)=>{s.d(t,{QueueProcessor:()=>u});var i=s(97768),r=s(74887),n=s(9775),h=s(32587),o=s(11932),l=s(44794);class a{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class u{constructor(e){this._schedule=null,this._deferreds=new h.A,this._controllers=new h.A,this._processingItems=new h.A,this._pausedSignal=(0,l.v)(!1),this.concurrency=1,e.concurrency&&(this.concurrency=e.concurrency),this._queue=new n.A(e.peeker),this.process=e.process}destroy(){this.clear(),this._schedule=(0,i.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size<this.concurrency}abort(e){const t=this._controllers.get(e);t&&t.abort()}clear(){this._queue.clear();const e=[];this._controllers.forEach((t=>e.push(t))),this._controllers.clear(),e.forEach((e=>e.abort())),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach(((t,s)=>e(s)))}get(e){const t=this._deferreds.get(e);return t?t.promise:void 0}isOngoing(e){return this._processingItems.has(e)}has(e){return this._deferreds.has(e)}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const s=this.get(e);if(s)return s;const i=new AbortController;let n=null;t&&(n=(0,r.u7)(t,(()=>i.abort())));const h=()=>{o.remove(),null!=n&&n.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()},o=(0,r.NY)(i.signal,(()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),h(),l.reject((0,r.NK)())})),l=(0,r.Tw)();return this._deferreds.set(e,l),this._controllers.set(e,i),l.promise.then(h,h),this._queue.push(e),this._scheduleNext(),l.promise}last(){return this._queue.last()}lastPromise(){const e=this.last();return e?this.get(e):null}peek(){return this._queue.peek()}popLast(){const e=this._queue.popLast();return e&&(this._deferreds.get(e)?.reject((0,r.NK)()),this._removeItem(e)),e}reset(){const e=Array.from(this._processingItems.values());this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.delete(e)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,o._)((()=>{this._schedule=null,this._next()})))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const s=new AbortController,i=new a(e,s);this._processingItems.set(e,i);try{t=this.process(e,s.signal)}catch(e){this._processError(i,e)}(0,r.$X)(t)?(i.promise=t,t.then((e=>this._processResult(i,e)),(e=>this._processError(i,e)))):this._processResult(i,t)}}},8010:(e,t,s)=>{s.r(t),s.d(t,{createBatchExecutor:()=>h}),s(44208);var i=s(91869),r=s(74887),n=s(563);function h(e,t,s,i){return new l(e,t,s,i)}class o{constructor(e,t,s){this._executor=e,this._data=t,this._impl=s,this._closed=!1,this._resolver=(0,r.Tw)(),this._impl.open(this)}assertOpen(){if(this._closed)throw new Error("Batch closed.")}get data(){return this.assertOpen(),this._data}get results(){return this._resolver.promise}send(){try{this.assertOpen(),this._closed=!0,this._executor.resume(this),this._impl.close(this),(0,r.hn)(this._resolver,this._impl.execute(this._data))}catch(e){this._resolver.reject(e)}}}class l{constructor(e,t,s,i){if(this._runJob=t,this._maxRunning=s,this._abortSignal=i,this._jobIdSeq=0,this._running=new Set,this._blocked=new Set,this._openBatches=new Map,this._state="ready",this._runResolver=null,s<1)throw new Error(`_maxRunning=${s} but cannot be < 1`);this._todo=e[Symbol.iterator](),this._queue=new n.QueueProcessor({concurrency:1,process:async e=>{if("start"===e.type){const{id:t,args:s}=e,i=(0,r.Tw)(),n=(0,r.Tw)(),h={id:t,interrupt:i,finished:n.promise};return(0,r.hn)(n,this._runJob(s,{id:t,yieldFor:e=>this.yieldFor(h,e)}).then((()=>{this._blocked.has(t)&&this._fail(new Error(`job ${t} completed before resuming`)),this._running.delete(t)||this._fail(new Error(`job ${t} not running?`))}))),await Promise.race([i.promise,h.finished]),void this._tryQueue()}if("continue"===e.type)return e.job.interrupt=(0,r.Tw)(),"fulfilled"===e.data.status?e.continuation.resolve(e.data.value):e.continuation.reject(e.data.reason),await Promise.race([e.job.interrupt.promise,e.job.finished]),void this._tryQueue()}})}openBatch(e,t){return new o(this,e,t)}_fail(e,t=!1){if(this._runResolver?.reject(e),this._state="stopped",!t)throw e}_schedule(e){this._queue.push(e).catch((e=>this._fail(e,!0)))}_tryQueue(){if("running"===this._state)if(this._abortSignal?.aborted)this._fail((0,r.NK)(),!0);else{if(this._running.size<this._maxRunning){const e=this._todo.next();if(!e.done){const t=this._jobIdSeq++;return this._running.add(t),void this._schedule({type:"start",id:t,args:e.value})}}if(0===this._running.size)return this._runResolver?.resolve(),this._runResolver=null,void(this._state="stopped");if(this._blocked.size===this._running.size){let e=null,t=-1/0;for(const[s,i]of this._openBatches)i.size>t&&(e=s,t=i.size);return null==e&&this._fail(new Error("deadlock")),void e.send()}}}resume(e){const t=this._openBatches.get(e);if(this._openBatches.delete(e),null!=t)for(const e of t)this._blocked.delete(e)||this._fail(new Error(`job ${e} not suspended`))}async yieldFor(e,t){t.assertOpen(),this._running.has(e.id)||this._fail(new Error(`job ${e.id} not running`)),this._blocked.has(e.id)&&this._fail(new Error(`job ${e.id} already suspended`)),this._blocked.add(e.id),(0,i.tE)(this._openBatches,t,(()=>new Set)).add(e.id),null==e.interrupt&&this._fail(new Error(`job ${e.id} hasn't resumed yet`)),e.interrupt.resolve(),e.interrupt=null;const s=(0,r.Tw)();let n;try{n={status:"fulfilled",value:await t.results}}catch(e){n={status:"rejected",reason:e}}return this._schedule({type:"continue",continuation:s,data:n,job:e}),s.promise}run(){"ready"!==this._state&&this._fail(new Error(`executor not ready to start. state=${this._state}`));const e=(0,r.Tw)();return this._state="running",this._runResolver=e,this._tryQueue(),e.promise}}},9775:(e,t,s)=>{s.d(t,{A:()=>n});var i=s(62788),r=s(95488);class n{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,i.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},32587:(e,t,s)=>{s.d(t,{A:()=>n});var i=s(62788),r=s(95488);class n{constructor(e){this._observable=new r.I,this._map=new Map(e)}get size(){return(0,i.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,i.gc)(this._observable),this._map.entries()}forEach(e,t){(0,i.gc)(this._observable),this._map.forEach(((s,i)=>e.call(t,s,i,this)),t)}get(e){return(0,i.gc)(this._observable),this._map.get(e)}has(e){return(0,i.gc)(this._observable),this._map.has(e)}keys(){return(0,i.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,i.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,i.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(e,t,s)=>{s.d(t,{v:()=>o});var i=s(4718),r=s(62788),n=s(95488);class h{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.gh){return new h(e,t)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8132,8256],{4146:(e,t,i)=>{i.d(t,{A:()=>v});var r=i(90237),s=i(78888),n=i(49186),o=i(65529),a=i(4902),l=i(92474),h=i(53966),u=i(74887),d=i(84952),c=i(10107),p=(i(44208),i(87811),i(40608)),y=i(5443),g=i(16930),_=i(92602),f=i(64272);let m=0,v=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",s=i?.portal?.url||_.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r._)([(0,c.MZ)({type:y.A})],v.prototype,"fullExtent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,c.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,c.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,c.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,c.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,c.MZ)({type:g.A})],v.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,c.MZ)()],v.prototype,"url",void 0),(0,r._)([(0,c.MZ)({type:f.T})],v.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,p.$)("esri.layers.Layer")],v)},4902:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(90237),s=i(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable")],t),t};let a=class extends(o(class{})){};var l;a=(0,r._)([(0,s.$)("esri.core.Identifiable")],a),(l=a||(a={})).IdentifiableMixin=o,l.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const h=a},8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(90237),s=i(92602),n=i(70333),o=i(78888),a=i(60999),l=i(49186),h=i(53966),u=i(97768),d=i(74887),c=i(84952),p=i(10107),y=(i(44208),i(87811),i(36005)),g=i(40608),_=i(43937),f=i(77548),m=i(20655),v=i(80812),w=i(41318),b=i(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new v.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,a;if(s)o=i.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,h=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:h},content:{updateItem:u}};try{if(s?await i.reload():(i=new v.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(e,t){const i=(0,b.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=m.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?w.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,_.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},35982:(e,t,i)=>{i.d(t,{B:()=>l});var r=i(4576),s=i(36563),n=i(53966),o=i(74887),a=i(29953);class l{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,a.ho)(e,{...s,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)((()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,i){if(this._thread){const r=this._transferLists[e],s=r?r(t):[];return this._thread.invoke(e,t,{transferList:s,signal:i})}return this._promise?this._promise.then((()=>((0,o.Te)(i),this.invokeMethod(e,t,i)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},54239:(e,t,i)=>{i.d(t,{A:()=>f});var r,s=i(90237),n=i(4576),o=i(66552),a=i(25482),l=i(83047),h=i(67076),u=i(10107),d=(i(44208),i(53966),i(36005)),c=i(40608),p=i(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=y.jsonValues.slice();(0,n.Xy)(g,"orthometric");const _=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=r=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return y.write(e,t,i)}readHeightModel(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return _.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||_.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function m(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],f.prototype,"heightModel",void 0),(0,s._)([(0,p.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s._)([(0,d.w)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:_.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:_.jsonValues,write:{writer:_.write,isRequired:!0}}}}})],f.prototype,"heightUnit",void 0),(0,s._)([(0,d.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s._)([(0,d.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s._)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=r=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],f)},64272:(e,t,i)=>{i.d(t,{T:()=>c});var r,s=i(90237),n=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),h=i(40608),u=i(43937),d=i(98623);let c=class extends n.A{static{r=this}static get allTime(){return p}static get empty(){return y}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let s=this.end;if(s){const i=(0,o.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?a=i:n>=t&&n<=i&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,i)),null!=a&&(s.end=(0,o.S1)(a,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,s._)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,l.w)("start")],c.prototype,"readStart",null),(0,s._)([(0,u.K)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,h.$)("esri.time.TimeExtent")],c);const p=new c,y=new c({start:void 0,end:void 0})},66344:(e,t,i)=>{var r,s;i.d(t,{q:()=>l}),(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME",Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,n){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,s,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,r.ALL);const l=1+Math.max(n,-4)- -3;this._db.set(t,new o(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,s,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSize()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forEach((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(a)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,o]of this._db)if(0===o.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(a)[0]);if(this._purgeItem(n,o,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class o{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new n,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68611:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var r=i(90237),s=i(78888),n=i(49186),o=i(97768),a=i(92071),l=i(74887),h=i(84952),u=i(10107),d=(i(44208),i(53966),i(87811),i(36005)),c=i(40608),p=i(54239),y=i(4146),g=i(89186),_=i(18768),f=i(16131),m=i(8303),v=i(10873);class w{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get cachedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var b=i(35982);class S extends b.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(M.forEach(((e,t)=>{e===this&&M.delete(t)})),this.destroy())}}const M=new Map;let A=class extends((0,g.f)((0,_.b)((0,f.q)((0,m.A)((0,a.P)(y.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=M.get(e);return t||(null!=e?(t=new S((t=>e.immediate.schedule(t))),M.set(e,t)):(t=new S,M.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=r?.signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,i,r))).then((()=>(0,s.A)(this.getTileUrl(e,t,i),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new w(e)))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await i.e(3492).then(i.bind(i,63492));return(0,l.Te)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await i.e(3492).then(i.bind(i,63492));return(0,l.Te)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[z]}};(0,r._)([(0,u.MZ)({readOnly:!0})],A.prototype,"capabilities",void 0),(0,r._)([(0,d.w)("service","capabilities",["capabilities"])],A.prototype,"readCapabilities",null),(0,r._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],A.prototype,"copyright",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:p.A})],A.prototype,"heightModelInfo",void 0),(0,r._)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],A.prototype,"path",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],A.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],A.prototype,"minScale",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],A.prototype,"maxScale",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],A.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],A.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)()],A.prototype,"sourceJSON",void 0),(0,r._)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],A.prototype,"type",void 0),(0,r._)([(0,u.MZ)(v.OZ)],A.prototype,"url",void 0),(0,r._)([(0,u.MZ)()],A.prototype,"version",void 0),(0,r._)([(0,d.w)("version",["currentVersion"])],A.prototype,"readVersion",null),A=(0,r._)([(0,c.$)("esri.layers.ElevationLayer")],A);const z=Symbol("default-fetch-tile");A.prototype.fetchTile[z]=!0;const E=A},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>a,RS:()=>n,ez:()=>c,lM:()=>o,qK:()=>d});var r=i(34275);function s(e){return 32+e.length}const n=16;function o(e){if(!e)return 0;let t=d;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=c;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=d;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?a(e):d;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce(((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0)),0)}function u(e,t){return c+e.length*t}const d=32,c=16,p=145},69540:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(90237),s=i(69622),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(35666),l=i(88620),h=i(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,i=e.store,r={},s=new Map;for(const e in t){const o=t[e],l=i?.originOf(e),h=o.clonable;if(o.readOnly||!1===h||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let d=null;d="function"==typeof h?h(u):"reference"===h?u:(0,n.TU)(u),null!=u&&null==d||(l===a.Gr.DEFAULTS?s.set(e,d):r[e]=d)}const h=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){const e=(0,l.oY)(h)?.store;if(e)for(const[t,i]of s)e.set(t,i,a.Gr.DEFAULTS)}return h}};return t=(0,r._)([(0,h.$)("esri.core.Clonable")],t),t};let d=class extends(u(s.A)){};d=(0,r._)([(0,h.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=u;const c=d},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},92071:(e,t,i)=>{i.d(t,{P:()=>v,L:()=>w});var r=i(90237),s=i(69622),n=i(76953),o=i(4718),a=i(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,i=this._originStores[a.Gr.DEFAULTS];i&&i.forEach(((e,i)=>{t.set(i,(0,o.o8)(e),a.Gr.DEFAULTS)}));for(let i=a.Gr.SERVICE;i<a.AU;i++){const r=this._originStores[i];r&&r.forEach(((r,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(r),i)}))}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=a.Gr.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=a.Gr.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i?.get(e),s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),s!==r}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var h=i(45917),u=i(88620),d=i(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),i=t.store,r=new l;t.store=r,(0,n.k)(t,i,r)}read(e,t){(0,h.L)(this,e,t)}getAtOrigin(e,t){const i=p(this),r=(0,a.aB)(t);if("string"==typeof e)return i.get(e,r);const s={};return e.forEach((e=>{s[e]=i.get(e,r)})),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const i=p(this),r=(0,a.aB)(t),s=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?i.keys(r):[e]:e,n.forEach((e=>{s.invalidate(e),i.revert(e,r),s.commit(e)}))}};return t=(0,r._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function p(e){return(0,u.oY)(e).store}let y=class extends(c(s.A)){};y=(0,r._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=i(16649),_=i(49422);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,_.M)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(i))}removeOrigin(e){const t=m(this),i=(0,a.aB)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),a.Gr.USER)}updateOrigin(e,t){const i=m(this),r=(0,a.aB)(t),s=(0,g.Jt)(this,e);for(let t=r+1;t<a.AU;++t)i.delete(e,t);i.set(e,s,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function m(e){return(0,u.oY)(e).store}const v=e=>{let t=class extends(f(c(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(v(s.A)){};w=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],w)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1100,3186,3383,3890,4342,4812],{4197:(e,t,r)=>{r.d(t,{jh:()=>n,l5:()=>o,xm:()=>s});var i=r(34275);function n(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function o(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17311:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),n=r(69622),s=r(60999),o=r(5503),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(30524),c=r(43668);let p=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new o.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){try{const{attributes:i}=t,n=r?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(r.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const r=this._createFormattedAttributes(e,t,n).global;return s({attributes:i,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:r,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const r=t.getObjectId();if(null==r)return t;if(!(0,u.Kl)(this.requiredFields,t)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[r];const i=await e.queryFeatures(t);if(1===i?.features.length)return i.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,i._)([(0,a.MZ)({readOnly:!0})],p.prototype,"_arcadeTask",null),(0,i._)([(0,a.MZ)()],p.prototype,"_featureUtils",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],p.prototype,"featureUtilsPromise",null),(0,i._)([(0,a.MZ)({readOnly:!0})],p.prototype,"calculatedExpressions",null),(0,i._)([(0,a.MZ)()],p.prototype,"displayField",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"effectivePopupTemplate",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"expressionsUsedInTitle",null),(0,i._)([(0,a.MZ)()],p.prototype,"fieldsIndex",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"fieldInfoMap",null),(0,i._)([(0,a.MZ)()],p.prototype,"fields",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"requiredFields",null),p=(0,i._)([(0,l.$)("esri.layers.support.TitleCreator")],p)},22671:(e,t,r)=>{r.d(t,{A:()=>_});var i,n=r(90237),s=r(52106),o=r(66552),a=r(25482),l=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),p=r(40608),d=r(43937),h=r(16930),f=r(65864),m=r(50498),y=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends a.A{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){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}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 i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({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 i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.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:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=h.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),a=s.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=i);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s: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 i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.MZ)({type:[s.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n._)([(0,c.w)("features")],_.prototype,"readFeatures",null),(0,n._)([(0,u.MZ)({type:[y.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n._)([(0,d.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n._)([(0,u.MZ)({types:m.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n._)([(0,c.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n._)([(0,u.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n._)([(0,d.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n._)([(0,p.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},32730:(e,t,r)=>{r.d(t,{BI:()=>y,D3:()=>f,XJ:()=>m,lc:()=>h,mX:()=>_,rU:()=>g,tH:()=>T});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',p=c+" + ",d=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function y(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return T(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,p).replaceAll(a,d)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,F=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function T(e){if(!e)return null;let t=w.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=F.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var i=r(90237),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new a.A;return n.read(i,r),[n]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,n.sM)(r,[s.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,s.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(80451),p=r(29005);let d=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,o.MZ)({type:[p.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],d)},39516:(e,t,r)=>{let i;async function n(){return null==i&&(i=Promise.all([r.e(8368),r.e(4123)]).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),i}async function s(e,t){const r=await n(),i=r.get(e,t);if(null==i)throw r.getError(e,t);return i}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>s,IW:()=>a,mA:()=>o})},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var i=r(90237),n=r(66552),s=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&c||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],p(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const o=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=p(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(c(n.minScale),p(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,n.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)l(i.minScale,i.maxScale,t,r)&&(yield i)}}function l(e,t,r,n){return e=c(e),r=c(r),t=p(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(n,10),l=parseInt(s,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>y,QY:()=>d,lL:()=>g,xR:()=>f});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const p=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return m.create(e,t,null,["$feature","$view"])}function f(e,t,r){return m.create(e,t,r,["$feature","$view","$config"])}class m{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,u.l)();let a;try{a=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const c={vars:i.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},p=s.compileScript(a,c);let d=null;null!=r&&(d=new o(r),d.immutable=!0);const h=new o;return h.immutable=!1,h.setField("scale",0),new m(e,s,a,p,t,h,d,o)}constructor(e,t,r,i,n,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new y,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class y{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(this._boundTarget.attributes[r.name]);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(this._boundTarget.attributes[r.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[r.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[r.name];return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU)}default:return this._boundTarget.attributes[r.name]}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>c,e2:()=>d,f:()=>h});var i=r(44208),n=r(4718),s=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${p(t)} = null;`;for(const t in e)r+=`this${p(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function p(e){return l.test(e)?`.${e}`:`["${e}"]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},70328:(e,t,r)=>{r.d(t,{BI:()=>_,Ej:()=>d,Ie:()=>y,Jt:()=>g,Ne:()=>h,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>l,hZ:()=>m,iT:()=>p,is:()=>v,qv:()=>x,vI:()=>f,vY:()=>a,v_:()=>F,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(e=F){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,n,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function a(e,t=s()){return function(e,t,r,i=s()){return m(i,x),function(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[r,i,s,o,a,l]=e;return t[0]=r,t[1]=i,t[2]=s,t[3]=r,t[4]=i,t[5]=l,t[6]=r,t[7]=a,t[8]=s,t[9]=r,t[10]=a,t[11]=l,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?m(e,x):s(x)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function _(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function v(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!v(e)||!v(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],F=[0,0,0,0,0,0];s()},72256:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var i=r(90237),n=r(49186),s=r(74887),o=r(84952),a=r(10107),l=r(44208),u=(r(53966),r(87811),r(36005)),c=r(40608),p=r(16930),d=r(13600),h=r(92474),f=r(29953),m=r(5443),y=r(22671);let g=class extends h.A{constructor(e){super(e),this.type="csv",this.refresh=(0,s.sg)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return t&&(this.sourceJSON.extent=t),r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(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 y.A.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:m.A.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke("querySnapping",e,t)}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?e.toJSON():null,t)}async _startWorker(e){this._connection=await(0,f.ho)("CSVSourceWorker",{strategy:(0,l.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{url:t,delimiter:r,fields:i,latitudeField:n,longitudeField:s,spatialReference:o,timeInfo:a}=this.loadOptions,u=await this._connection.invoke("load",{url:t,customParameters:this.customParameters,parsingOptions:{delimiter:r,fields:i?.map((e=>e.toJSON())),latitudeField:n,longitudeField:s,spatialReference:o?.toJSON(),timeInfo:a?.toJSON()}},{signal:e});this.locationInfo=u.locationInfo,this.sourceJSON=u.layerDefinition,this.delimiter=u.delimiter}};(0,i._)([(0,a.MZ)()],g.prototype,"type",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"loadOptions",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"customParameters",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"locationInfo",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"sourceJSON",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"delimiter",void 0),g=(0,i._)([(0,c.$)("esri.layers.graphics.sources.CSVSource")],g);var _=r(64714),v=r(61956),w=r(97159);function x(e,t){throw new n.A(t,`CSVLayer (title: ${e.title}, id: ${e.id}) cannot be saved to a portal item`)}let F=class extends d.default{constructor(...e){super(...e),this.geometryType="point",this.capabilities=(0,_.f)(!1,!1),this.delimiter=null,this.editingEnabled=!1,this.fields=null,this.latitudeField=null,this.locationType="coordinates",this.longitudeField=null,this.operationalLayerType="CSV",this.outFields=["*"],this.path=null,this.spatialReference=p.A.WGS84,this.source=null,this.type="csv"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["CSV"],supportsData:!1},e).catch(s.QP).then((async()=>this.initLayerProperties(await this.createGraphicsSource(t))));return this.addResolvingPromise(r),Promise.resolve(this)}get isTable(){return this.loaded&&null==this.geometryType}readWebMapLabelsVisible(e,t){return null!=t.showLabels?t.showLabels:!!t.layerDefinition?.drawingInfo?.labelingInfo}set url(e){if(!e)return void this._set("url",e);const t=(0,o.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async createGraphicsSource(e){const t=new g({loadOptions:{delimiter:this.delimiter,fields:this.fields,latitudeField:this.latitudeField??void 0,longitudeField:this.longitudeField??void 0,spatialReference:this.spatialReference??void 0,timeInfo:this.timeInfo??void 0,url:this.url},customParameters:this.customParameters??void 0});return this._set("source",t),await t.load({signal:e}),this.read({locationInfo:t.locationInfo,columnDelimiter:t.delimiter},{origin:"service",url:this.parsedUrl}),t}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(v.A.from(e)||this.createQuery()))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(v.A.from(e)||this.createQuery())}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(v.A.from(e)||this.createQuery())))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(v.A.from(e)||this.createQuery())))}read(e,t){super.read(e,t),t&&"service"===t.origin&&this.revert(["latitudeField","longitudeField"],"service")}write(e,t){return super.write(e,{...t,writeLayerSchema:!0})}clone(){throw new n.A("csv-layer:clone",`CSVLayer (title: ${this.title}, id: ${this.id}) cannot be cloned`)}async save(e){return x(this,"csv-layer:save")}async saveAs(e,t){return x(this,"csv-layer:save-as")}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}_verifyFields(){}_verifySource(){}_hasMemorySource(){return!1}};(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],F.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({type:[","," ",";","|","\t"],json:{read:{source:"columnDelimiter"},write:{target:"columnDelimiter",ignoreOrigin:!0}}})],F.prototype,"delimiter",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:Boolean,json:{origins:{"web-scene":{read:!1,write:!1}}}})],F.prototype,"editingEnabled",void 0),(0,i._)([(0,a.MZ)({json:{read:{source:"layerDefinition.fields"},write:{target:"layerDefinition.fields"}}})],F.prototype,"fields",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!0})],F.prototype,"isTable",null),(0,i._)([(0,u.w)("web-map","labelsVisible",["layerDefinition.drawingInfo.labelingInfo","showLabels"])],F.prototype,"readWebMapLabelsVisible",null),(0,i._)([(0,a.MZ)({type:String,json:{read:{source:"locationInfo.latitudeFieldName"},write:{target:"locationInfo.latitudeFieldName",ignoreOrigin:!0}}})],F.prototype,"latitudeField",void 0),(0,i._)([(0,a.MZ)({type:["show","hide"]})],F.prototype,"listMode",void 0),(0,i._)([(0,a.MZ)({type:["coordinates"],json:{read:{source:"locationInfo.locationType"},write:{target:"locationInfo.locationType",ignoreOrigin:!0,isRequired:!0}}})],F.prototype,"locationType",void 0),(0,i._)([(0,a.MZ)({type:String,json:{read:{source:"locationInfo.longitudeFieldName"},write:{target:"locationInfo.longitudeFieldName",ignoreOrigin:!0}}})],F.prototype,"longitudeField",void 0),(0,i._)([(0,a.MZ)({type:["CSV"]})],F.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.MZ)()],F.prototype,"outFields",void 0),(0,i._)([(0,a.MZ)({type:String,json:{origins:{"web-scene":{read:!1,write:!1}},read:!1,write:!1}})],F.prototype,"path",void 0),(0,i._)([(0,a.MZ)({json:{read:!1},cast:null,type:g,readOnly:!0})],F.prototype,"source",void 0),(0,i._)([(0,a.MZ)({json:{read:!1},value:"csv",readOnly:!0})],F.prototype,"type",void 0),(0,i._)([(0,a.MZ)({json:{read:w.r,write:{isRequired:!0,ignoreOrigin:!0,writer:w.w}}})],F.prototype,"url",null),F=(0,i._)([(0,c.$)("esri.layers.CSVLayer")],F);const T=F},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const h=await(0,a.xR)(e.expression,null,p);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!o||!o.greaterEqual(4,0);f&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new u(r,f);return new l(f,c,h,m)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t?"":""+this._boundTarget.attributes[t.name]}}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(90237),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let c=class extends o.A{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],c)},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))},95466:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(49186),n=r(53966),s=r(91869),o=r(3330),a=r(12195),l=r(30524),u=r(98623),c=r(56400),p=r(96285);const d=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=m(t);if(t&&i){const n=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?p.mQ.utcInstance:(0,s.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,c.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,c.ZS)(i.timeReference):a:null,d=new Map([[f(n?.creationDateField??""),l],[f(n?.editDateField??""),l],[f(s),p],[f(o),p]]);for(const{name:i,type:n}of e.fields)if(y.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(f(i??""))??a;t.set(i,e)}return t}},99352:(e,t,r)=>{r.d(t,{F:()=>i,P:()=>n});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);