@arcgis/core 4.34.0-next.76 → 4.34.0-next.78

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 (186) hide show
  1. package/Basemap.js +1 -1
  2. package/Ground.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/025f1d78dfa5ec93178b.js +1 -0
  5. package/assets/esri/core/workers/chunks/050429f516149ce3b517.js +1 -0
  6. package/assets/esri/core/workers/chunks/0652d7e525d99e39c957.js +1 -0
  7. package/assets/esri/core/workers/chunks/0668eee42b3169e1bf66.js +1 -0
  8. package/assets/esri/core/workers/chunks/07a355a9c95154971aab.js +1 -0
  9. package/assets/esri/core/workers/chunks/0dd6b8b3e634bb5f0ca7.js +1 -0
  10. package/assets/esri/core/workers/chunks/124f8757ea18bfd158ec.js +1 -0
  11. package/assets/esri/core/workers/chunks/1990162dcf73601d54f7.js +1 -0
  12. package/assets/esri/core/workers/chunks/20850b0fdb55fb17bc90.js +1 -0
  13. package/assets/esri/core/workers/chunks/{6a1b652ccbf58ac44658.js → 23e17b745adf71a5efc7.js} +1 -1
  14. package/assets/esri/core/workers/chunks/2605062e44f2d4e73f14.js +1 -0
  15. package/assets/esri/core/workers/chunks/29a86d51407310bb7745.js +1 -0
  16. package/assets/esri/core/workers/chunks/2a2a925c45d5fd58628b.js +1 -0
  17. package/assets/esri/core/workers/chunks/2fe96bf7dedef11a3b63.js +1 -0
  18. package/assets/esri/core/workers/chunks/3452ba299f6ce0582f09.js +1 -0
  19. package/assets/esri/core/workers/chunks/36a006c55766f9540bfc.js +1 -0
  20. package/assets/esri/core/workers/chunks/{18641332bee3e9b9c44a.js → 388482cea4b9fdeaf06e.js} +1 -1
  21. package/assets/esri/core/workers/chunks/3b23c37e5bc552dc81d4.js +1 -0
  22. package/assets/esri/core/workers/chunks/{9325000c87295c473291.js → 3b2ef975831eb75b40fb.js} +1 -1
  23. package/assets/esri/core/workers/chunks/3ff3e1507220d3869c76.js +1 -0
  24. package/assets/esri/core/workers/chunks/43818bf53dd5445a7bdb.js +1 -0
  25. package/assets/esri/core/workers/chunks/4823e4522bd7379d858e.js +1 -0
  26. package/assets/esri/core/workers/chunks/49e6202da7a20f06c661.js +353 -0
  27. package/assets/esri/core/workers/chunks/{b818b5e392d5eb7c7e70.js → 4e6e8dda6c12f6fbed8e.js} +1 -1
  28. package/assets/esri/core/workers/chunks/5019f1b8186a65a0313b.js +1 -0
  29. package/assets/esri/core/workers/chunks/512dcd6e34e217029391.js +1 -0
  30. package/assets/esri/core/workers/chunks/5248581d23ada240c78d.js +1 -0
  31. package/assets/esri/core/workers/chunks/614a00a3179f8fe23f45.js +1 -0
  32. package/assets/esri/core/workers/chunks/{5477ff0ce432c9e5b3ab.js → 6201356f7f91e5c06425.js} +1 -1
  33. package/assets/esri/core/workers/chunks/6271a706ac3fcba91432.js +1 -0
  34. package/assets/esri/core/workers/chunks/6593b419339e7598b760.js +1 -0
  35. package/assets/esri/core/workers/chunks/{51ddda291bbbf5db9905.js → 65e279516170ddbd4a65.js} +1 -1
  36. package/assets/esri/core/workers/chunks/67fdc8074cdcf374af9a.js +1 -0
  37. package/assets/esri/core/workers/chunks/6dafb2b95bae552c1cc2.js +1 -0
  38. package/assets/esri/core/workers/chunks/7680d4d739f7aa3f7ae1.js +1 -0
  39. package/assets/esri/core/workers/chunks/7889a909394c61a9d3e0.js +1 -0
  40. package/assets/esri/core/workers/chunks/79e965e8f7cf822b4f45.js +1 -0
  41. package/assets/esri/core/workers/chunks/804e3b3df375177e6c86.js +1 -0
  42. package/assets/esri/core/workers/chunks/81a8addcb858086ff9ee.js +1 -0
  43. package/assets/esri/core/workers/chunks/83065bef261314f9b2c5.js +1 -0
  44. package/assets/esri/core/workers/chunks/8a5e40f48a8265fd1b42.js +1 -0
  45. package/assets/esri/core/workers/chunks/8bd6c27a93a697a7fa3d.js +1 -0
  46. package/assets/esri/core/workers/chunks/8c94448a44fb27054a22.js +1 -0
  47. package/assets/esri/core/workers/chunks/92d0e0155563c6355079.js +1 -0
  48. package/assets/esri/core/workers/chunks/{c86f5bb199cf046b8952.js → 930322c9790572bd0c49.js} +1 -1
  49. package/assets/esri/core/workers/chunks/96a14689815bec741308.js +1 -0
  50. package/assets/esri/core/workers/chunks/97d71459ad72b4b780a3.js +1 -0
  51. package/assets/esri/core/workers/chunks/9835c579edfc08125d31.js +1 -0
  52. package/assets/esri/core/workers/chunks/9971de3f38a55735cec9.js +1 -0
  53. package/assets/esri/core/workers/chunks/99ac292a858bbedc6a89.js +1 -0
  54. package/assets/esri/core/workers/chunks/9ce599dc1d385e6893c1.js +1 -0
  55. package/assets/esri/core/workers/chunks/{fec572f03f9514244972.js → a05a7df07b74e1957538.js} +1 -1
  56. package/assets/esri/core/workers/chunks/a7e649b3b02e664ada80.js +1 -0
  57. package/assets/esri/core/workers/chunks/a8a79a5c804ef715aa94.js +1 -0
  58. package/assets/esri/core/workers/chunks/acb49f3d2b783e81a215.js +1 -0
  59. package/assets/esri/core/workers/chunks/adc61d88c3c6936ad75a.js +1 -0
  60. package/assets/esri/core/workers/chunks/afa3ca2bd2648774f133.js +1 -0
  61. package/assets/esri/core/workers/chunks/afb76f9d6abedef771df.js +1 -0
  62. package/assets/esri/core/workers/chunks/b168b6ffc16cd509d316.js +1 -0
  63. package/assets/esri/core/workers/chunks/b19d723d09f5bea9ca27.js +1 -0
  64. package/assets/esri/core/workers/chunks/b246ed6d86c2c8df56fb.js +1 -0
  65. package/assets/esri/core/workers/chunks/b4a053063e6022080d31.js +1 -0
  66. package/assets/esri/core/workers/chunks/b4ba7f8ea81522ad1e2e.js +1 -0
  67. package/assets/esri/core/workers/chunks/b97f224972f1b1abaee8.js +1 -0
  68. package/assets/esri/core/workers/chunks/b9e725d2b5a7d0132663.js +1 -0
  69. package/assets/esri/core/workers/chunks/bbb3b32affde9ea78534.js +1 -0
  70. package/assets/esri/core/workers/chunks/bbb585f0b484ab5eabb3.js +1 -0
  71. package/assets/esri/core/workers/chunks/bc83bcfe123525d21884.js +1 -0
  72. package/assets/esri/core/workers/chunks/c799f1c03cb22ef52f5f.js +1 -0
  73. package/assets/esri/core/workers/chunks/cac5732f9dfece4bf2c5.js +1 -0
  74. package/assets/esri/core/workers/chunks/cafc19bf2caaf7a8c2e8.js +1 -0
  75. package/assets/esri/core/workers/chunks/cc7423413747566f56e2.js +1 -0
  76. package/assets/esri/core/workers/chunks/ccd157ede169b93eea65.js +1 -0
  77. package/assets/esri/core/workers/chunks/ce0bf0d0cd9e9a90093b.js +1 -0
  78. package/assets/esri/core/workers/chunks/ce49ff6bf20cff349726.js +1 -0
  79. package/assets/esri/core/workers/chunks/d1657a29321adb259166.js +1 -0
  80. package/assets/esri/core/workers/chunks/d2b69f91eb85b561fe01.js +1 -0
  81. package/assets/esri/core/workers/chunks/d51e8eeb1e1eb0605cc9.js +1 -0
  82. package/assets/esri/core/workers/chunks/d69bd6b5d781a6c527d1.js +1 -0
  83. package/assets/esri/core/workers/chunks/d7fc8ea2ff527a09f4b9.js +1 -0
  84. package/assets/esri/core/workers/chunks/d8494617cebc68e50d35.js +1 -0
  85. package/assets/esri/core/workers/chunks/d89832617bac4890893e.js +1 -0
  86. package/assets/esri/core/workers/chunks/{d55c55d39a253630d228.js → db2396bf062468ee8b60.js} +1 -1
  87. package/assets/esri/core/workers/chunks/e4833b718a813a8d125b.js +1 -0
  88. package/assets/esri/core/workers/chunks/{d1f181f91b36351f1d3b.js → e7af5caab9aa9b6a12e3.js} +1 -1
  89. package/assets/esri/core/workers/chunks/e81386199a6db9a50fd3.js +1 -0
  90. package/assets/esri/core/workers/chunks/f45c343527709f6f91c2.js +1 -0
  91. package/assets/esri/core/workers/chunks/f5710ced8d38f9a90fc5.js +1 -0
  92. package/assets/esri/core/workers/chunks/f592c4e5e1746d4619db.js +1 -0
  93. package/assets/esri/core/workers/chunks/f8d2c52cc51d5f1bbce2.js +1 -0
  94. package/assets/esri/core/workers/chunks/feed74ed275f21a68a1b.js +1 -0
  95. package/assets/esri/core/workers/chunks/ffee8cc83d703c1dc0c0.js +1 -0
  96. package/config.js +1 -1
  97. package/kernel.js +1 -1
  98. package/layers/Layer.js +1 -1
  99. package/layers/catalog/catalogUtils.js +1 -1
  100. package/layers/mixins/ScaleRangeLayer.js +1 -1
  101. package/package.json +1 -1
  102. package/support/LayersMixin.js +1 -1
  103. package/support/TablesMixin.js +1 -1
  104. package/support/revision.js +1 -1
  105. package/symbols/support/symbolUtils.js +1 -1
  106. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  107. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  108. package/assets/esri/core/workers/chunks/03fac1122eb73bb14d2d.js +0 -1
  109. package/assets/esri/core/workers/chunks/0434a490326c0de47c22.js +0 -1
  110. package/assets/esri/core/workers/chunks/0618ea8bf9da93d713b1.js +0 -1
  111. package/assets/esri/core/workers/chunks/06b65105b15abf4d0fbf.js +0 -1
  112. package/assets/esri/core/workers/chunks/0b71100fa1e7ca706dbb.js +0 -1
  113. package/assets/esri/core/workers/chunks/13de06e614adf92239fe.js +0 -1
  114. package/assets/esri/core/workers/chunks/14a22d1a0eefa970efa1.js +0 -1
  115. package/assets/esri/core/workers/chunks/181b3564a0e3939020bc.js +0 -1
  116. package/assets/esri/core/workers/chunks/199a17b0a0f75cbaed16.js +0 -1
  117. package/assets/esri/core/workers/chunks/19c1f1431c0b2f4525a2.js +0 -1
  118. package/assets/esri/core/workers/chunks/21bfad7283620766d9cd.js +0 -1
  119. package/assets/esri/core/workers/chunks/28a2f74d4a449386d082.js +0 -1
  120. package/assets/esri/core/workers/chunks/2afafaf40293d5ab1d8e.js +0 -1
  121. package/assets/esri/core/workers/chunks/2c399991e8627baa51b3.js +0 -1
  122. package/assets/esri/core/workers/chunks/2f44848916051f5501eb.js +0 -1
  123. package/assets/esri/core/workers/chunks/3064320d54a9b48bd697.js +0 -1
  124. package/assets/esri/core/workers/chunks/38e7d1c6987aaa9b520b.js +0 -1
  125. package/assets/esri/core/workers/chunks/3a5f0c759dd2f4638343.js +0 -1
  126. package/assets/esri/core/workers/chunks/3bf99037befdedd75cb4.js +0 -1
  127. package/assets/esri/core/workers/chunks/3e9c3e7c5cf7c0afbc80.js +0 -1
  128. package/assets/esri/core/workers/chunks/3fecfe4f8ca2a5fd7360.js +0 -1
  129. package/assets/esri/core/workers/chunks/43095bed5456251940b9.js +0 -1
  130. package/assets/esri/core/workers/chunks/433c4dc666a6b2c99063.js +0 -353
  131. package/assets/esri/core/workers/chunks/451761c7bd2da530e1d0.js +0 -1
  132. package/assets/esri/core/workers/chunks/4832faefd3b7edc17c84.js +0 -1
  133. package/assets/esri/core/workers/chunks/48449abe795cb7a831eb.js +0 -1
  134. package/assets/esri/core/workers/chunks/4bc091770bab38874848.js +0 -1
  135. package/assets/esri/core/workers/chunks/52286d4135b8395a3400.js +0 -1
  136. package/assets/esri/core/workers/chunks/540506802776f77e47f3.js +0 -1
  137. package/assets/esri/core/workers/chunks/56f54d007b0da0d908aa.js +0 -1
  138. package/assets/esri/core/workers/chunks/5879cebb22157b0b4998.js +0 -1
  139. package/assets/esri/core/workers/chunks/58cc06ed86301f4cee75.js +0 -1
  140. package/assets/esri/core/workers/chunks/61896e64e9ef49b4bb1b.js +0 -1
  141. package/assets/esri/core/workers/chunks/6531f33d6710960079e9.js +0 -1
  142. package/assets/esri/core/workers/chunks/6e59ba2afd444eb4be18.js +0 -1
  143. package/assets/esri/core/workers/chunks/70367da4ba916376f40c.js +0 -1
  144. package/assets/esri/core/workers/chunks/7430c462c350fdd26349.js +0 -1
  145. package/assets/esri/core/workers/chunks/7aaa6b318195d7342e6c.js +0 -1
  146. package/assets/esri/core/workers/chunks/7b73a808922b52755abd.js +0 -1
  147. package/assets/esri/core/workers/chunks/7e746427375e83fc4351.js +0 -1
  148. package/assets/esri/core/workers/chunks/810e4c16c6eae420508b.js +0 -1
  149. package/assets/esri/core/workers/chunks/8b587affaaa0b1e4368c.js +0 -1
  150. package/assets/esri/core/workers/chunks/8bc8caa384b24af12411.js +0 -1
  151. package/assets/esri/core/workers/chunks/8fc13e0e1a5a8f3e4798.js +0 -1
  152. package/assets/esri/core/workers/chunks/90540fdfb0c5f68aa959.js +0 -1
  153. package/assets/esri/core/workers/chunks/92d5b0559e128d62fbda.js +0 -1
  154. package/assets/esri/core/workers/chunks/9304c3cdf732745577fd.js +0 -1
  155. package/assets/esri/core/workers/chunks/9421389888d4d9e4e809.js +0 -1
  156. package/assets/esri/core/workers/chunks/98c94a99e2e04d5ae65f.js +0 -1
  157. package/assets/esri/core/workers/chunks/9c35860439948638cb8f.js +0 -1
  158. package/assets/esri/core/workers/chunks/a0a519f498e9ea7623ff.js +0 -1
  159. package/assets/esri/core/workers/chunks/a2baeb9fa805c3537049.js +0 -1
  160. package/assets/esri/core/workers/chunks/a33e1a031ba9f028023d.js +0 -1
  161. package/assets/esri/core/workers/chunks/a9f6054d86982b9e5a7c.js +0 -1
  162. package/assets/esri/core/workers/chunks/ad3ebd4f05cc673140f3.js +0 -1
  163. package/assets/esri/core/workers/chunks/b6c6f82df3b60c2f831f.js +0 -1
  164. package/assets/esri/core/workers/chunks/b70d71144a060f7eeeeb.js +0 -1
  165. package/assets/esri/core/workers/chunks/b7f5a26ff3a73c64552d.js +0 -1
  166. package/assets/esri/core/workers/chunks/bd2dc1282c49125ede89.js +0 -1
  167. package/assets/esri/core/workers/chunks/bd4e64d6e73cd4db9695.js +0 -1
  168. package/assets/esri/core/workers/chunks/bfbbf180c2c8fdbb6731.js +0 -1
  169. package/assets/esri/core/workers/chunks/c07507a42def2bd2a222.js +0 -1
  170. package/assets/esri/core/workers/chunks/c34a164a8ece4cb33e81.js +0 -1
  171. package/assets/esri/core/workers/chunks/c6fecf2bbd2a711f15d3.js +0 -1
  172. package/assets/esri/core/workers/chunks/d95554f43694b4769675.js +0 -1
  173. package/assets/esri/core/workers/chunks/dd587d51dad2d82708d1.js +0 -1
  174. package/assets/esri/core/workers/chunks/e086b835a98b71a46825.js +0 -1
  175. package/assets/esri/core/workers/chunks/e3f2cdf5d71a7040894b.js +0 -1
  176. package/assets/esri/core/workers/chunks/e54df2128039425a9090.js +0 -1
  177. package/assets/esri/core/workers/chunks/e58c5c8639aa837c84d1.js +0 -1
  178. package/assets/esri/core/workers/chunks/e92d9e0ac789bcf1cdf4.js +0 -1
  179. package/assets/esri/core/workers/chunks/eb0a5d592f5805836203.js +0 -1
  180. package/assets/esri/core/workers/chunks/eccb4550edc4752cf41a.js +0 -1
  181. package/assets/esri/core/workers/chunks/f3ef59991c577ff5e825.js +0 -1
  182. package/assets/esri/core/workers/chunks/f749e2a89a14ab89ae59.js +0 -1
  183. package/assets/esri/core/workers/chunks/f7f5c4f30e5a0ddbf9a4.js +0 -1
  184. package/assets/esri/core/workers/chunks/fb0f729eff2f2911d6c3.js +0 -1
  185. package/assets/esri/core/workers/chunks/fdf2b980e8a8aa47ce91.js +0 -1
  186. package/assets/esri/core/workers/chunks/fe24c6d61a50898549a5.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9695],{13069:(t,e,r)=>{r.d(e,{AG:()=>a,lk:()=>s,vD:()=>i,yS:()=>o});const n="randomUUID"in crypto;function s(){if(n)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function o(){return`{${s().toUpperCase()}}`}function i(){return`{${s()}}`}function a(t){const e=t.toUpperCase();return t.startsWith("{")?e:`{${e}}`}},49695:(t,e,r)=>{r.r(e),r.d(e,{default:()=>P});var n=r(31635),s=r(79608),o=r(29133),i=r(65008),a=r(69540),l=r(25482),p=r(97768),u=r(10107),c=(r(44208),r(53966),r(87811),r(40608)),g=r(87024),y=r(86738),d=r(88625);let f=class extends((0,l.T)((0,a.OU)(i.A))){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,p.CM)(this.position,t.position)&&(0,p.CM)(this.elevationInfo,t.elevationInfo)&&(0,o.xH)(this.feature,t.feature)}};(0,n.Cg)([(0,u.MZ)({type:y.A,json:{write:{isRequired:!0}}})],f.prototype,"position",void 0),(0,n.Cg)([(0,u.MZ)({type:d.A}),(0,g.P)()],f.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,u.MZ)(o.N1)],f.prototype,"feature",void 0),f=(0,n.Cg)([(0,c.$)("esri.analysis.LineOfSightAnalysisObserver")],f);const h=f;let v=class extends((0,l.T)(a.Pw)){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,p.CM)(this.position,t.position)&&(0,p.CM)(this.elevationInfo,t.elevationInfo)&&(0,o.xH)(this.feature,t.feature)}};(0,n.Cg)([(0,u.MZ)({type:y.A,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,g.P)()],v.prototype,"position",void 0),(0,n.Cg)([(0,u.MZ)({type:d.A}),(0,g.P)()],v.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,u.MZ)(o.N1)],v.prototype,"feature",void 0),v=(0,n.Cg)([(0,c.$)("esri.analysis.LineOfSightAnalysisTarget")],v);var m=r(4576),w=r(7762),b=r(62885),C=r(36708),x=r(98988),A=r(70328),j=r(24212);const M=w.A.ofType(v);let R=class extends s.A{constructor(t){super(t),this.type="line-of-sight",this.observer=null,this.extent=null}initialize(){this.addHandles((0,C.wB)(()=>this._computeExtent(),t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)},C.pc))}get targets(){return this._get("targets")||new M}set targets(t){this._set("targets",(0,b.V)(t,this.targets,M))}get spatialReference(){return null!=this.observer?.position?this.observer.position.spatialReference:null}get valid(){return null!=this.observer?.position}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==this.observer?.position||null==t)return null;const e=t=>"absolute-height"===(0,j.w7)(t.position,t.elevationInfo),r=this.observer.position,n=(0,A.fA)(r.x,r.y,r.z,r.x,r.y,r.z);for(const e of this.targets)if(null!=e.position){const r=(0,x.projectOrLoad)(e.position,t);if(null!=r.pending)return{pending:r.pending,extent:null};if(null!=r.geometry){const{x:t,y:e,z:s}=r.geometry;(0,A.iT)(n,[t,e,s])}}const s=(0,A.w1)(n,t);return e(this.observer)&&this.targets.every(e)||(s.zmin=void 0,s.zmax=void 0),{pending:null,extent:s}}clear(){this.observer=null,this.targets.removeAll()}equals(t){return this===t||super.equals(t)&&(0,p.CM)(this.observer,t.observer)&&(0,m.aI)(this.targets.toArray(),t.targets.toArray(),(t,e)=>t.equals(e))}};(0,n.Cg)([(0,u.MZ)({type:["line-of-sight"]})],R.prototype,"type",void 0),(0,n.Cg)([(0,u.MZ)({type:h,json:{read:!0,write:!0}})],R.prototype,"observer",void 0),(0,n.Cg)([(0,u.MZ)({cast:b.H,type:M,nonNullable:!0,json:{read:!0,write:!0}})],R.prototype,"targets",null),(0,n.Cg)([(0,u.MZ)({value:null,readOnly:!0})],R.prototype,"extent",void 0),(0,n.Cg)([(0,u.MZ)()],R.prototype,"spatialReference",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],R.prototype,"valid",null),R=(0,n.Cg)([(0,c.$)("esri.analysis.LineOfSightAnalysis")],R);var I=r(92071),O=r(4146),Z=r(16131);const U=w.A.ofType(v);let S=class extends((0,Z.q)((0,I.P)(O.A))){constructor(t){super(t),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new R,this.opacity=1}initialize(){this.addHandles((0,C.wB)(()=>this.analysis,(t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)},C.pc))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return this.analysis?.observer}set observer(t){const{analysis:e}=this;e&&(e.observer=t)}get targets(){return null!=this.analysis?this.analysis.targets:new w.A}set targets(t){(0,b.V)(t,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(t){this.analysis===t&&(this.analysis=new R)}};(0,n.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0})],S.prototype,"type",void 0),(0,n.Cg)([(0,u.MZ)({type:["LineOfSightLayer"]})],S.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,u.MZ)({type:h,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],S.prototype,"observer",null),(0,n.Cg)([(0,u.MZ)({type:U,json:{read:!0,write:{ignoreOrigin:!0,isRequired:!0}}})],S.prototype,"targets",null),(0,n.Cg)([(0,u.MZ)({type:R,nonNullable:!0,json:{read:!1,write:!1}})],S.prototype,"analysis",void 0),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],S.prototype,"fullExtent",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0})],S.prototype,"spatialReference",null),(0,n.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],S.prototype,"opacity",void 0),(0,n.Cg)([(0,u.MZ)({type:["show","hide"]})],S.prototype,"listMode",void 0),S=(0,n.Cg)([(0,c.$)("esri.layers.LineOfSightLayer")],S);const P=S},76553:(t,e,r)=>{function n(t){return t&&"getAtOrigin"in t&&"originOf"in t}r.d(e,{H:()=>n})},80200:(t,e,r)=>{r.d(e,{T:()=>n,d:()=>f});const n={Base64:0,Hex:1,String:2,Raw:3},s=8,o=(1<<s)-1;function i(t,e){const r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function a(t){const e=[];for(let r=0,n=t.length*s;r<n;r+=s)e[r>>5]|=(t.charCodeAt(r/s)&o)<<r%32;return e}function l(t){const e=[];for(let r=0,n=32*t.length;r<n;r+=s)e.push(String.fromCharCode(t[r>>5]>>>r%32&o));return e.join("")}function p(t,e,r,n,s,o){return i(function(t,e){return t<<e|t>>>32-e}(i(i(e,t),i(n,o)),s),r)}function u(t,e,r,n,s,o,i){return p(e&r|~e&n,t,e,s,o,i)}function c(t,e,r,n,s,o,i){return p(e&n|r&~n,t,e,s,o,i)}function g(t,e,r,n,s,o,i){return p(e^r^n,t,e,s,o,i)}function y(t,e,r,n,s,o,i){return p(r^(e|~n),t,e,s,o,i)}function d(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;let r=1732584193,n=-271733879,s=-1732584194,o=271733878;for(let e=0;e<t.length;e+=16){const a=r,l=n,p=s,d=o;r=u(r,n,s,o,t[e],7,-680876936),o=u(o,r,n,s,t[e+1],12,-389564586),s=u(s,o,r,n,t[e+2],17,606105819),n=u(n,s,o,r,t[e+3],22,-1044525330),r=u(r,n,s,o,t[e+4],7,-176418897),o=u(o,r,n,s,t[e+5],12,1200080426),s=u(s,o,r,n,t[e+6],17,-1473231341),n=u(n,s,o,r,t[e+7],22,-45705983),r=u(r,n,s,o,t[e+8],7,1770035416),o=u(o,r,n,s,t[e+9],12,-1958414417),s=u(s,o,r,n,t[e+10],17,-42063),n=u(n,s,o,r,t[e+11],22,-1990404162),r=u(r,n,s,o,t[e+12],7,1804603682),o=u(o,r,n,s,t[e+13],12,-40341101),s=u(s,o,r,n,t[e+14],17,-1502002290),n=u(n,s,o,r,t[e+15],22,1236535329),r=c(r,n,s,o,t[e+1],5,-165796510),o=c(o,r,n,s,t[e+6],9,-1069501632),s=c(s,o,r,n,t[e+11],14,643717713),n=c(n,s,o,r,t[e],20,-373897302),r=c(r,n,s,o,t[e+5],5,-701558691),o=c(o,r,n,s,t[e+10],9,38016083),s=c(s,o,r,n,t[e+15],14,-660478335),n=c(n,s,o,r,t[e+4],20,-405537848),r=c(r,n,s,o,t[e+9],5,568446438),o=c(o,r,n,s,t[e+14],9,-1019803690),s=c(s,o,r,n,t[e+3],14,-187363961),n=c(n,s,o,r,t[e+8],20,1163531501),r=c(r,n,s,o,t[e+13],5,-1444681467),o=c(o,r,n,s,t[e+2],9,-51403784),s=c(s,o,r,n,t[e+7],14,1735328473),n=c(n,s,o,r,t[e+12],20,-1926607734),r=g(r,n,s,o,t[e+5],4,-378558),o=g(o,r,n,s,t[e+8],11,-2022574463),s=g(s,o,r,n,t[e+11],16,1839030562),n=g(n,s,o,r,t[e+14],23,-35309556),r=g(r,n,s,o,t[e+1],4,-1530992060),o=g(o,r,n,s,t[e+4],11,1272893353),s=g(s,o,r,n,t[e+7],16,-155497632),n=g(n,s,o,r,t[e+10],23,-1094730640),r=g(r,n,s,o,t[e+13],4,681279174),o=g(o,r,n,s,t[e],11,-358537222),s=g(s,o,r,n,t[e+3],16,-722521979),n=g(n,s,o,r,t[e+6],23,76029189),r=g(r,n,s,o,t[e+9],4,-640364487),o=g(o,r,n,s,t[e+12],11,-421815835),s=g(s,o,r,n,t[e+15],16,530742520),n=g(n,s,o,r,t[e+2],23,-995338651),r=y(r,n,s,o,t[e],6,-198630844),o=y(o,r,n,s,t[e+7],10,1126891415),s=y(s,o,r,n,t[e+14],15,-1416354905),n=y(n,s,o,r,t[e+5],21,-57434055),r=y(r,n,s,o,t[e+12],6,1700485571),o=y(o,r,n,s,t[e+3],10,-1894986606),s=y(s,o,r,n,t[e+10],15,-1051523),n=y(n,s,o,r,t[e+1],21,-2054922799),r=y(r,n,s,o,t[e+8],6,1873313359),o=y(o,r,n,s,t[e+15],10,-30611744),s=y(s,o,r,n,t[e+6],15,-1560198380),n=y(n,s,o,r,t[e+13],21,1309151649),r=y(r,n,s,o,t[e+4],6,-145523070),o=y(o,r,n,s,t[e+11],10,-1120210379),s=y(s,o,r,n,t[e+2],15,718787259),n=y(n,s,o,r,t[e+9],21,-343485551),r=i(r,a),n=i(n,l),s=i(s,p),o=i(o,d)}return[r,n,s,o]}function f(t,e=n.Hex){const r=e||n.Base64,o=d(a(t),t.length*s);switch(r){case n.Raw:return o;case n.Hex:return function(t){const e="0123456789abcdef",r=[];for(let n=0,s=4*t.length;n<s;n++)r.push(e.charAt(t[n>>2]>>n%4*8+4&15)+e.charAt(t[n>>2]>>n%4*8&15));return r.join("")}(o);case n.String:return l(o);case n.Base64:return function(t){const e=[];for(let r=0,n=4*t.length;r<n;r+=3){const n=(t[r>>2]>>r%4*8&255)<<16|(t[r+1>>2]>>(r+1)%4*8&255)<<8|t[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*t.length?e.push("="):e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-s)&63))}return e.join("")}(o)}}},85648:(t,e,r)=>{r.d(e,{n:()=>s});var n=r(84952);function s(t){return o[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,n.Zo)(t);return l[e]||i}(t.url)}(t)]||a}const o={},i="text/plain",a=o[i],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)o[l[t]]=t},87024:(t,e,r)=>{r.d(e,{P:()=>y});var n=r(49186),s=r(80200),o=r(76553),i=r(84952),a=r(13069),l=r(96156),p=r(35666),u=r(10107),c=r(85648),g=r(97159);function y(t){const e=t?.origins??[void 0];return(r,n)=>{const s=function(t,e,r){if("resource"===t?.type)return function(t,e,r){const n=(0,l.z4)(e,r);return{type:String,read:(t,e,r)=>{const s=(0,g.r)(t,e,r);return n.type===String?s:"function"==typeof n.type?new n.type({url:s}):void 0},write:{isRequired:n.json?.write?.isRequired,writer(e,s,a,l){if(!l?.resources)return"string"==typeof e?void(s[a]=(0,g.t)(e,l)):void(s[a]=e.write({},l));const u=function(t){return null==t?null:"string"==typeof t?t:t.url}(e),y=(0,g.t)(u,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),v=n.type!==String&&(!(0,o.H)(this)||l?.origin&&this.originIdOf(r)>(0,p.aB)(l.origin)),m={object:this,propertyName:r,value:e,targetUrl:y,dest:s,targetPropertyName:a,context:l,params:t};l?.portalItem&&y&&!(0,i.oP)(y)?v&&t?.contentAddressed?d(m):v?function(t){const{context:e,targetUrl:r,params:n,value:s,dest:o,targetPropertyName:a}=t;if(!e.portalItem)return;const l=e.portalItem.resourceFromPath(r),p=h(s,r,e),u=(0,c.n)(p),g=(0,i.Zo)(l.path),y=n?.compress??!1;u===g?(e.resources&&f({...t,resource:l,content:p,compress:y,updates:e.resources.toUpdate}),o[a]=r):d(t)}(m):function({context:t,targetUrl:e,dest:r,targetPropertyName:n}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(e),compress:!1}),r[n]=e)}(m):l?.portalItem&&(null==y||null!=(0,g.i)(y)||(0,i.w8)(y)||v)?d(m):s[a]=y}}}}(t,e,r);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:t,write:e}=g.b;return{read:t,write:e}}}}(t,r,n);for(const t of e){const e=(0,u.rM)(r,t,n);for(const t in s)e[t]=s[t]}}}function d(t){const{targetUrl:e,params:r,value:o,context:l,dest:p,targetPropertyName:u}=t;if(!l.portalItem)return;const y=(0,g.p)(e),d=h(o,e,l);if(r?.contentAddressed&&"json"!==d.type)return void l.messages?.push(new n.A("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${d.type} with content addressing. Content addressing is only supported for json resources.`,{content:d}));const v=r?.contentAddressed&&"json"===d.type?(0,s.d)(d.jsonString):y?.filename??(0,a.lk)(),m=(0,i.fj)(r?.prefix??y?.prefix,v),w=`${m}.${(0,c.n)(d)}`;if(r?.contentAddressed&&l.resources&&"json"===d.type){const t=l.resources.toKeep.find(({resource:t})=>t.path===w)??l.resources.toAdd.find(({resource:t})=>t.path===w);if(t)return void(p[u]=t.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(w);(0,i.w8)(e)&&l.resources&&l.resources.pendingOperations.push((0,i.tk)(e).then(t=>{b.path=`${m}.${(0,c.n)({type:"blob",blob:t})}`,p[u]=b.itemRelativeUrl}).catch(()=>{}));const C=r?.compress??!1;l.resources&&f({...t,resource:b,content:d,compress:C,updates:l.resources.toAdd}),p[u]=b.itemRelativeUrl}function f({object:t,propertyName:e,updates:r,resource:n,content:s,compress:o}){r.push({resource:n,content:s,compress:o,finish:r=>{!function(t,e,r){"string"==typeof t[e]?t[e]=r.url:t[e].url=r.url}(t,e,r)}})}function h(t,e,r){return"string"==typeof t?{type:"url",url:e}:{type:"json",jsonString:JSON.stringify(t.toJSON(r))}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[309],{13043:(e,t,i)=>{function r(e,t){if(e&&t)for(const i of e.children)if(i.localName in t){const e=t[i.localName];if("function"==typeof e){const t=e(i);t&&r(i,t)}else r(i,e)}}function*s(e,t){for(const i of e.children)if(i.localName in t){const e=t[i.localName];"function"==typeof e?yield e(i):yield*s(i,e)}}i.d(t,{i:()=>s,p:()=>r})},20309:(e,t,i)=>{i.r(t),i.d(t,{default:()=>he});var r,s=i(31635),l=i(78888),o=i(4576),n=i(7762),a=i(49186),c=i(4718),u=i(92071),p=i(93637),d=i(74887),m=i(36708),h=i(84952),y=i(10107),f=(i(44208),i(53966),i(36005)),g=i(40608),w=i(43937),v=i(5443),M=i(4146),x=i(47314),C=i(63074),I=i(16131),S=i(8303),L=i(54310),T=i(25036),A=i(33446),P=i(87045),b=i(65509),E=i(83703),O=i(25482);i(87811);let R=r=class extends O.o{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){const e=new r;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()??null),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo?.clone()??null),e}};(0,s.Cg)([(0,y.MZ)({type:v.A,json:{read:{source:"fullExtent"}}})],R.prototype,"fullExtent",void 0),(0,s.Cg)([(0,y.MZ)({type:String,json:{read:{source:"id"}}})],R.prototype,"id",void 0),(0,s.Cg)([(0,y.MZ)({type:P.A,json:{read:{source:"tileInfo"}}})],R.prototype,"tileInfo",void 0),R=r=(0,s.Cg)([(0,g.$)("esri.layers.support.TileMatrixSet")],R);const F=R;var Z;let V=Z=class extends O.o{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new Z;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s.Cg)([(0,y.MZ)({json:{read:{source:"id"}}})],V.prototype,"id",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"title"}}})],V.prototype,"title",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"abstract"}}})],V.prototype,"description",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"legendUrl"}}})],V.prototype,"legendUrl",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"isDefault"}}})],V.prototype,"isDefault",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"keywords"}}})],V.prototype,"keywords",void 0),V=Z=(0,s.Cg)([(0,g.$)("esri.layers.support.WMTSStyle")],V);const U=V;var j;let _=j=class extends O.o{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?v.A.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map(e=>v.A.fromJSON(e)):t.tileMatrixSets?.map(e=>v.A.fromJSON(e.fullExtent)).filter(e=>e)??[]}get imageFormat(){let e=this._get("imageFormat");return e||(e=this.imageFormats?.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||(e=this.styles?.at(0)?.id??""),e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?.find(({id:e})=>e===this.tileMatrixSetId)??null}clone(){const e=new j;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats?.slice()??null),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles?.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s.Cg)([(0,y.MZ)()],_.prototype,"description",void 0),(0,s.Cg)([(0,y.MZ)({type:v.A})],_.prototype,"fullExtent",void 0),(0,s.Cg)([(0,f.w)("fullExtent",["fullExtent"])],_.prototype,"readFullExtent",null),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],_.prototype,"fullExtents",void 0),(0,s.Cg)([(0,f.w)("fullExtents",["fullExtents","tileMatrixSets"])],_.prototype,"readFullExtents",null),(0,s.Cg)([(0,y.MZ)()],_.prototype,"id",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"imageFormat",null),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"formats"}}})],_.prototype,"imageFormats",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"layer",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"parent",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"styleId",null),(0,s.Cg)([(0,y.MZ)({type:n.A.ofType(U),json:{read:{source:"styles"}}})],_.prototype,"styles",void 0),(0,s.Cg)([(0,y.MZ)({json:{write:{ignoreOrigin:!0}}})],_.prototype,"title",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"tileMatrixSetId",void 0),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],_.prototype,"tileMatrixSet",null),(0,s.Cg)([(0,y.MZ)({type:n.A.ofType(F),json:{read:{source:"tileMatrixSets"}}})],_.prototype,"tileMatrixSets",void 0),_=j=(0,s.Cg)([(0,g.$)("esri.layers.support.WMTSSublayer")],_);var N=i(73941),k=i(86738),D=i(22530),W=i(38458),B=i(13043),K=i(91806);const $=90.71428571428571;function H(e){const t=e.replaceAll(/ows:/gi,"");return(new DOMParser).parseFromString(t,"text/xml")}function J(e){if(!G("Contents",e.documentElement))throw new a.A("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant")}function q(e){return e.nodeType===Node.ELEMENT_NODE}function G(e,t){for(let i=0;i<t.childNodes.length;i++){const r=t.childNodes[i];if(q(r)&&r.nodeName===e)return r}return null}function z(e,t){const i=[];for(let r=0;r<t.childNodes.length;r++){const s=t.childNodes[r];q(s)&&s.nodeName===e&&i.push(s)}return i}function Q(e,t){const i=[];for(let r=0;r<t.childNodes.length;r++){const s=t.childNodes[r];q(s)&&s.nodeName===e&&i.push(s)}return i.map(e=>e.textContent).filter(o.Ru)}function X(e,t){return e.split(">").forEach(e=>{t&&(t=G(e,t))}),t&&t.textContent}function Y(e,t,i,r){let s;return Array.prototype.slice.call(r.childNodes).some(r=>{if(r.nodeName.includes(e)){const e=G(t,r),l=e?.textContent;if(l===i||i.split(":")&&i.split(":")[1]===l)return s=r,!0}return!1}),s}function ee(e,t,i,r,s){const l=X("Abstract",t),o=Q("Format",t);return{id:e,fullExtent:ie(t),fullExtents:re(t),description:l,formats:o,styles:se(t,r),title:X("Title",t),tileMatrixSets:le(s,t,i)}}function te(e,t){const i=[],r=e.layerMap?.get(t);if(!r)return null;const s=z("ResourceURL",r),l=z("Dimension",r);let o,n,a,c;return l.length&&(o=X("Identifier",l[0]),n=Q("Default",l[0])||Q("Value",l[0])),l.length>1&&(a=X("Identifier",l[1]),c=Q("Default",l[1])||Q("Value",l[1])),e.dimensionMap.set(t,{dimensions:n,dimensions2:c}),s.forEach(e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(o&&n.length)if(t.includes("{"+o+"}"))t=t.replace("{"+o+"}","{dimensionValue}");else{const e=t.toLowerCase().indexOf("{"+o.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue}"+t.slice(e+o.length+2))}if(a&&c.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{const e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue2}"+t.slice(e+a.length+2))}i.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}}),i}function ie(e){const t=G("WGS84BoundingBox",e),i=t?X("LowerCorner",t).split(" "):["-180","-90"],r=t?X("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(i[0]),ymin:parseFloat(i[1]),xmax:parseFloat(r[0]),ymax:parseFloat(r[1]),spatialReference:{wkid:4326}}}function re(e){const t=[];return(0,B.p)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;const i=e.getAttribute("crs").toLowerCase(),r=oe(i),s=i.includes("epsg")&&(0,W.m)(r.wkid);let l,o,n,a;(0,B.p)(e,{LowerCorner:e=>{[l,o]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),s&&([l,o]=[o,l])},UpperCorner:e=>{[n,a]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),s&&([n,a]=[a,n])}}),t.push({xmin:l,ymin:o,xmax:n,ymax:a,spatialReference:r})}}),t}function se(e,t){return z("Style",e).map(e=>{const i=G("LegendURL",e),r=G("Keywords",e),s=r?Q("Keyword",r):[];let l=i?.getAttribute("xlink:href");return t&&(l=l?.replace(/^http:/i,"https:")),{abstract:X("Abstract",e),id:X("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:s,legendUrl:l,title:X("Title",e)}})}function le(e,t,i){return z("TileMatrixSetLink",t).map(t=>function(e,t,i){const r=G("TileMatrixSet",t).textContent,s=Q("TileMatrix",t),l=i.find(e=>{const t=G("Identifier",e),i=t?.textContent;return!!(i===r||r.split(":")&&r.split(":")[1]===i)}),o=G("TileMatrixSetLimits",t),n=o&&z("TileMatrixLimits",o),a=new Map;if(n?.length)for(const e of n){const t=G("TileMatrix",e).textContent,i=+G("MinTileRow",e).textContent,r=+G("MaxTileRow",e).textContent,s=+G("MinTileCol",e).textContent,l=+G("MaxTileCol",e).textContent;a.set(t,{minCol:s,maxCol:l,minRow:i,maxRow:r})}const c=X("SupportedCRS",l).toLowerCase(),u=function(e,t){return ne(G("TileMatrix",e),t)}(l,c),p=u.spatialReference,d=G("TileMatrix",l),m=[parseInt(X("TileWidth",d),10),parseInt(X("TileHeight",d),10)],h=[];s.length?s.forEach((e,t)=>{const i=Y("TileMatrix","Identifier",e,l);h.push(ae(i,c,t,r,a))}):z("TileMatrix",l).forEach((e,t)=>{h.push(ae(e,c,t,r,a))});const y=function(e,t,i,r,s){const l=G("BoundingBox",t);let o,n,a,c,u,p;if(l&&(o=X("LowerCorner",l).split(" "),n=X("UpperCorner",l).split(" ")),o&&o.length>1&&n&&n.length>1)a=parseFloat(o[0]),u=parseFloat(o[1]),c=parseFloat(n[0]),p=parseFloat(n[1]);else{const e=G("TileMatrix",t),l=parseInt(X("MatrixWidth",e),10),o=parseInt(X("MatrixHeight",e),10);a=i.x,p=i.y,c=a+l*r[0]*s.resolution,u=p-o*r[1]*s.resolution}return function(e,t,i){return"1.0.0"===e&&(0,W.m)(t.wkid)&&!(i.spatialReference.isGeographic&&i.x<-90&&i.y>=-90)}(e,i.spatialReference,i)?new v.A(u,a,p,c,i.spatialReference):new v.A(a,u,c,p,i.spatialReference)}(e,l,u,m,h[0]).toJSON(),f=new P.A({dpi:96,spatialReference:p,size:m,origin:u,lods:h}).toJSON();return{id:r,fullExtent:y,tileInfo:f}}(e,t,i))}function oe(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);900913!==t&&3857!==t||(t=102100);const i=function(e){return e.includes("crs84")||e.includes("crs:84")?4326:e.includes("crs83")||e.includes("crs:83")?4269:e.includes("crs27")||e.includes("crs:27")?4267:null}(e);return null!=i&&(t=i),{wkid:t}}function ne(e,t){const i=oe(t),[r,s]=X("TopLeftCorner",e).split(" ").map(e=>parseFloat(e)),l=t.includes("epsg")&&(0,W.m)(i.wkid);return new k.A(l?{x:s,y:r,spatialReference:i}:{x:r,y:s,spatialReference:i})}function ae(e,t,i,r,s){const l=oe(t),o=X("Identifier",e);let n=parseFloat(X("ScaleDenominator",e));const a=ce(l.wkid,n,r);n*=96/$;const c=+X("MatrixWidth",e),u=+X("MatrixHeight",e),{maxCol:p=c-1,maxRow:d=u-1,minCol:m=0,minRow:h=0}=s.get(o)??{},{x:y,y:f}=ne(e,t);return new K.A({cols:[m,p],level:i,levelValue:o,origin:[y,f],scale:n,resolution:a,rows:[h,d]})}function ce(e,t,i){let r;return r=D.A.hasOwnProperty(""+e)?D.A.values[D.A[e]]:"default028mm"===i?6370997*Math.PI/180:(0,N.y7)(e).metersPerDegree,7*t/25e3/r}var ue;const pe={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},de=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let me=ue=class extends((0,C.dM)((0,L.J)((0,T.j)((0,I.q)((0,S.A)((0,u.P)(M.A))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,m.wB)(()=>this.activeLayer,(e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)},m.OH),(0,m.on)(()=>this.sublayers,"after-add",({item:e})=>{e.layer=this,e.parent=this},m.OH),(0,m.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=null,e.parent=null},m.OH),(0,m.wB)(()=>this.sublayers,(e,t)=>{if(t)for(const e of t)e.layer=null,e.parent=null;if(e)for(const t of e)t.layer=this,t.parent=this},m.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(d.QP).then(()=>this._fetchService(e)).catch(e=>{throw(0,d.QP)(e),new a.A("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})})),Promise.resolve(this)}readActiveLayerFromService(e,t,i){this.activeLayer||(this.activeLayer=new _);let r=t.layers.find(e=>e.id===this.activeLayer.id);return r||(r=t.layers[0]),this.activeLayer.read(r,i),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:i,wmtsInfo:r}=t,s=i?this._getLowerCasedUrlParams(i):null,l=r?.layerIdentifier;let o=null;const n=r?.tileMatrixSet;n&&(Array.isArray(n)?n.length&&(o=n[0]):o=n);const a=s?.format,c=s?.style;return new _({id:l,imageFormat:a,styleId:c,tileMatrixSetId:o})}writeActiveLayer(e,t,i,r){const s=this.activeLayer;t.templateUrl=this.getUrlTemplate(s.id,s.tileMatrixSetId,s.imageFormat,s.styleId);const l=(0,p.wc)("tileMatrixSet.tileInfo",s);t.tileInfo=l?l.toJSON(r):null,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:s.id,tileMatrixSet:s.tileMatrixSetId}}readCustomParameters(e,t){const i=t.wmtsInfo;return i?this._mergeParams(i.customParameters,i.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,i){return function(e,t){return e.map(e=>{const i=new _;return i.read(e,t),i})}(t.layers,i)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map(e=>e.tileInfo?.spatialReference).toArray().filter(o.Ru)??[]}get tilemapCache(){const e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new b.A(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&e.endsWith("/")?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),i=this._getTileMatrixSetById(e.tileMatrixSetId),r=i?.tileInfo,s=e.fullExtent,l=new E.x({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new x.default({fullExtent:s,urlTemplate:t,tileInfo:r,wmtsInfo:l})}async fetchTile(e,t,i,r={}){const{signal:s}=r,o=this.getTileUrl(e,t,i),{data:n}=await(0,l.A)(o,{responseType:"image",signal:s});return n}async fetchImageBitmapTile(e,t,i,r={}){const{signal:s}=r;if(this.fetchTile!==ue.prototype.fetchTile){const l=await this.fetchTile(e,t,i,r);return(0,A.C)(l,e,t,i,s)}const o=this.getTileUrl(e,t,i),{data:n}=await(0,l.A)(o,{responseType:"blob",signal:s});return(0,A.C)(n,e,t,i,s)}findSublayerById(e){return this.sublayers?.find(t=>t.id===e)}getTileUrl(e,t,i){const r=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId),s=r?.tileInfo?.lods[e],l=s?s.levelValue||`${s.level}`:`${e}`;let o=this.resourceInfo?"":function(e,t,i,r,s,l,o,n){const a=function(e,t,i){const r=te(e,t),s=r?.filter(e=>e.format===i);return(s?.length?s:r)??[]}(e,t,r);if(!(a?.length>0))return"";const{dimensionMap:c}=e,u=c.get(t).dimensions?.[0],p=c.get(t).dimensions2?.[0];return a[o%a.length].template.replaceAll(/\{Style\}/gi,s??"").replaceAll(/\{TileMatrixSet\}/gi,i??"").replaceAll(/\{TileMatrix\}/gi,l).replaceAll(/\{TileRow\}/gi,""+o).replaceAll(/\{TileCol\}/gi,""+n).replaceAll(/\{dimensionValue\}/gi,u).replaceAll(/\{dimensionValue2\}/gi,p)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,l,t,i);return o||(o=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,l).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${i}`)),o=this._appendCustomLayerParameters(o),o}getUrlTemplate(e,t,i,r){if(!this.resourceInfo){const i=function(e,t,i,r){const{dimensionMap:s}=e,l=te(e,t);let o="";if(l&&l.length>0){const e=s.get(t).dimensions?.[0],n=s.get(t).dimensions2?.[0];o=l[0].template,o.endsWith(".xxx")&&(o=o.slice(0,-4)),o=o.replaceAll(/\{Style\}/gi,r),o=o.replaceAll(/\{TileMatrixSet\}/gi,i),o=o.replaceAll(/\{TileMatrix\}/gi,"{level}"),o=o.replaceAll(/\{TileRow\}/gi,"{row}"),o=o.replaceAll(/\{TileCol\}/gi,"{col}"),o=o.replaceAll(/\{dimensionValue\}/gi,e),o=o.replaceAll(/\{dimensionValue2\}/gi,n)}return o}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,r);if(i)return i}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+r+"&FORMAT="+i+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let s="";return pe[i.toLowerCase()]&&(s=pe[i.toLowerCase()]),this.url+e+"/"+r+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){if(this.resourceInfo)return"KVP"!==this.resourceInfo.serviceMode||this.url.includes("?")||(this.url+="?"),function(e){for(const t of e.layers)for(const e of t.tileMatrixSets??[]){const{tileInfo:t}=e;if(t&&96!==t.dpi){for(const i of t.lods??[])i.scale=96*i.scale/t.dpi,i.resolution=ce(t.spatialReference?.wkid,i.scale*$/96,e.id);t.dpi=96}}}(this.resourceInfo),void this.read(this.resourceInfo,{origin:"service"});let t=null;try{const{data:i}=await this._getCapabilities(this.serviceMode,e);t=H(i),J(t)}catch{const i="KVP"===this.serviceMode?"RESTful":"KVP";try{const{data:r}=await this._getCapabilities(i,e);t=H(r),J(t),this.serviceMode=i}catch(e){throw new a.A("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}const{serviceMode:i,url:r}=this,s=function(e,t){const i=e.documentElement,r=new Map,s=new Map,l=G("Contents",i);if(!l)throw new a.A("wmtslayer:wmts-capabilities-xml-is-not-valid","Can't retrieve xml capabilities element");const o=G("OperationsMetadata",i),n=o?.querySelector("[name='GetTile']"),c=n?.getElementsByTagName("Get"),u=c&&Array.prototype.slice.call(c),p=t.url?.indexOf("https"),d=void 0!==p&&p>-1;let m,h,y=t.serviceMode,f=t?.url;if(u?.length&&u.some(e=>{const t=G("Constraint",e);return!t||Y("AllowedValues","Value",y,t)?(f=e.attributes[0].nodeValue,!0):(!t||Y("AllowedValues","Value","RESTful",t)||Y("AllowedValues","Value","REST",t)?h=e.attributes[0].nodeValue:t&&!Y("AllowedValues","Value","KVP",t)||(m=e.attributes[0].nodeValue),!1)}),!f)if(h)f=h,y="RESTful";else if(m)f=m,y="KVP";else{const e=G("ServiceMetadataURL",i);f=e?.getAttribute("xlink:href")}const g=f.indexOf("1.0.0/");-1===g&&"RESTful"===y?f+="/":g>-1&&(f=f.slice(0,g)),"KVP"===y&&(f+=g>-1?"":"?"),d&&(f=f.replace(/^http:/i,"https:"));const w=X("ServiceIdentification>ServiceTypeVersion",i),v=X("ServiceIdentification>AccessConstraints",i),M=v&&/^none$/i.test(v)?null:v,x=z("Layer",l),C=z("TileMatrixSet",l),I=x.map(e=>{const t=X("Identifier",e);return r.set(t,e),ee(t,e,C,d,w)});return{copyright:M,dimensionMap:s,layerMap:r,layers:I,serviceMode:y,tileUrl:f}}(t,{serviceMode:i,url:r});this.read(s,{origin:"service"})}async _getCapabilities(e,t){const i=this._getCapabilitiesUrl(e);return await(0,l.A)(i,{...t,responseType:"text"})}_getTileMatrixSetById(e){const t=this.findSublayerById(this.activeLayer.id);return t?.tileMatrixSets?.find(({id:t})=>t===e)}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,c.o8)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const i=(0,h.An)(e),r={...i.query,...t},s=(0,h.x0)(r);return""===s?i.path:`${i.path}?${s}`}_getCapabilitiesUrl(e){this.url=(0,h.An)(this.url).path;let t=this.url;switch(e){case"KVP":t+=`?request=GetCapabilities&service=WMTS&version=${this.version}`;break;case"RESTful":{const e=`/${this.version}/WMTSCapabilities.xml`,i=new RegExp(e,"i");t=t.replace(i,""),t+=e;break}}return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=(0,h.An)(e).query;if(!t)return null;const i={};return Object.keys(t).forEach(e=>{i[e.toLowerCase()]=t[e]}),i}_mergeParams(e,t){const i=this._getLowerCasedUrlParams(t);if(i){const t=Object.keys(i);t.length&&(e=e?(0,c.o8)(e):{},t.forEach(t=>{e.hasOwnProperty(t)||de.has(t)||(e[t]=i[t])}))}return e}};(0,s.Cg)([(0,y.MZ)()],me.prototype,"dimensionMap",void 0),(0,s.Cg)([(0,y.MZ)()],me.prototype,"layerMap",void 0),(0,s.Cg)([(0,y.MZ)({type:_,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],me.prototype,"activeLayer",void 0),(0,s.Cg)([(0,f.w)("service","activeLayer",["layers"])],me.prototype,"readActiveLayerFromService",null),(0,s.Cg)([(0,f.w)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],me.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,s.Cg)([(0,w.K)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:P.A},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],me.prototype,"writeActiveLayer",null),(0,s.Cg)([(0,y.MZ)({type:String,value:"",json:{write:!0}})],me.prototype,"copyright",void 0),(0,s.Cg)([(0,y.MZ)({type:["show","hide"]})],me.prototype,"listMode",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:!0,write:!0}})],me.prototype,"blendMode",void 0),(0,s.Cg)([(0,y.MZ)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],me.prototype,"customParameters",void 0),(0,s.Cg)([(0,f.w)(["portal-item","web-document"],"customParameters")],me.prototype,"readCustomParameters",null),(0,s.Cg)([(0,y.MZ)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],me.prototype,"customLayerParameters",void 0),(0,s.Cg)([(0,y.MZ)({type:v.A,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],me.prototype,"fullExtent",void 0),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],me.prototype,"fullExtents",null),(0,s.Cg)([(0,y.MZ)({type:["WebTiledLayer"]})],me.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,y.MZ)()],me.prototype,"resourceInfo",void 0),(0,s.Cg)([(0,y.MZ)()],me.prototype,"serviceMode",void 0),(0,s.Cg)([(0,f.w)(["portal-item","web-document"],"serviceMode",["templateUrl"])],me.prototype,"readServiceMode",null),(0,s.Cg)([(0,y.MZ)({type:n.A.ofType(_)})],me.prototype,"sublayers",void 0),(0,s.Cg)([(0,f.w)("service","sublayers",["layers"])],me.prototype,"readSublayersFromService",null),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],me.prototype,"supportedSpatialReferences",null),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],me.prototype,"tilemapCache",null),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"title"}}})],me.prototype,"title",null),(0,s.Cg)([(0,y.MZ)({json:{read:!1},readOnly:!0,value:"wmts"})],me.prototype,"type",void 0),(0,s.Cg)([(0,y.MZ)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],me.prototype,"url",null),(0,s.Cg)([(0,y.MZ)()],me.prototype,"version",void 0),me=ue=(0,s.Cg)([(0,g.$)("esri.layers.WMTSLayer")],me);const he=me},38458:(e,t,i)=>{i.d(t,{m:()=>s});const r=[[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 s(e){return null!=e&&r.some(([t,i])=>e>=t&&e<=i)}},65509:(e,t,i)=>{i.d(t,{A:()=>l});var r=i(49186),s=i(74887);class l{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,l){await(0,s.NO)(l);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,r,l){await(0,s.NO)(l),r.level=e,r.row=t,r.col=i;const o=this.tileInfo;return o.updateTileInfo(r),this.fetchAvailability(e,t,i,l).catch(e=>{if((0,s.zf)(e))throw e;if(o.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e})}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[309],{13043:(e,t,r)=>{function i(e,t){if(e&&t)for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&i(r,t)}else i(r,e)}}function*s(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*s(r,e)}}r.d(t,{i:()=>s,p:()=>i})},20309:(e,t,r)=>{r.r(t),r.d(t,{default:()=>he});var i,s=r(31635),l=r(78888),o=r(4576),n=r(7762),a=r(49186),u=r(4718),c=r(92071),p=r(93637),d=r(74887),m=r(36708),h=r(84952),y=r(10107),f=(r(44208),r(53966),r(36005)),g=r(40608),w=r(43937),M=r(5443),x=r(4146),v=r(47314),C=r(63074),S=r(16131),I=r(8303),T=r(54310),L=r(25036),A=r(33446),P=r(87045),E=r(65509),b=r(83703),O=r(25482);r(87811);let R=i=class extends O.o{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){const e=new i;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()??null),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo?.clone()??null),e}};(0,s.Cg)([(0,y.MZ)({type:M.A,json:{read:{source:"fullExtent"}}})],R.prototype,"fullExtent",void 0),(0,s.Cg)([(0,y.MZ)({type:String,json:{read:{source:"id"}}})],R.prototype,"id",void 0),(0,s.Cg)([(0,y.MZ)({type:P.A,json:{read:{source:"tileInfo"}}})],R.prototype,"tileInfo",void 0),R=i=(0,s.Cg)([(0,g.$)("esri.layers.support.TileMatrixSet")],R);const F=R;var Z;let V=Z=class extends O.o{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new Z;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s.Cg)([(0,y.MZ)({json:{read:{source:"id"}}})],V.prototype,"id",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"title"}}})],V.prototype,"title",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"abstract"}}})],V.prototype,"description",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"legendUrl"}}})],V.prototype,"legendUrl",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"isDefault"}}})],V.prototype,"isDefault",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"keywords"}}})],V.prototype,"keywords",void 0),V=Z=(0,s.Cg)([(0,g.$)("esri.layers.support.WMTSStyle")],V);const U=V;var j;let _=j=class extends O.o{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?M.A.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map(e=>M.A.fromJSON(e)):t.tileMatrixSets?.map(e=>M.A.fromJSON(e.fullExtent)).filter(e=>e)??[]}get imageFormat(){let e=this._get("imageFormat");return e||(e=this.imageFormats?.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||(e=this.styles?.at(0)?.id??""),e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?.find(({id:e})=>e===this.tileMatrixSetId)??null}clone(){const e=new j;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats?.slice()??null),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles?.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s.Cg)([(0,y.MZ)()],_.prototype,"description",void 0),(0,s.Cg)([(0,y.MZ)({type:M.A})],_.prototype,"fullExtent",void 0),(0,s.Cg)([(0,f.w)("fullExtent",["fullExtent"])],_.prototype,"readFullExtent",null),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],_.prototype,"fullExtents",void 0),(0,s.Cg)([(0,f.w)("fullExtents",["fullExtents","tileMatrixSets"])],_.prototype,"readFullExtents",null),(0,s.Cg)([(0,y.MZ)()],_.prototype,"id",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"imageFormat",null),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"formats"}}})],_.prototype,"imageFormats",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"layer",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"parent",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"styleId",null),(0,s.Cg)([(0,y.MZ)({type:n.A.ofType(U),json:{read:{source:"styles"}}})],_.prototype,"styles",void 0),(0,s.Cg)([(0,y.MZ)({json:{write:{ignoreOrigin:!0}}})],_.prototype,"title",void 0),(0,s.Cg)([(0,y.MZ)()],_.prototype,"tileMatrixSetId",void 0),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],_.prototype,"tileMatrixSet",null),(0,s.Cg)([(0,y.MZ)({type:n.A.ofType(F),json:{read:{source:"tileMatrixSets"}}})],_.prototype,"tileMatrixSets",void 0),_=j=(0,s.Cg)([(0,g.$)("esri.layers.support.WMTSSublayer")],_);var N=r(73941),k=r(86738),W=r(22530),D=r(38458),B=r(13043),K=r(91806);const $=90.71428571428571;function H(e){const t=e.replaceAll(/ows:/gi,"");return(new DOMParser).parseFromString(t,"text/xml")}function J(e){if(!G("Contents",e.documentElement))throw new a.A("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant")}function q(e){return e.nodeType===Node.ELEMENT_NODE}function G(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(q(i)&&i.nodeName===e)return i}return null}function Q(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];q(s)&&s.nodeName===e&&r.push(s)}return r}function z(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];q(s)&&s.nodeName===e&&r.push(s)}return r.map(e=>e.textContent).filter(o.Ru)}function X(e,t){return e.split(">").forEach(e=>{t&&(t=G(e,t))}),t&&t.textContent}function Y(e,t,r,i){let s;return Array.prototype.slice.call(i.childNodes).some(i=>{if(i.nodeName.includes(e)){const e=G(t,i),l=e?.textContent;if(l===r||r.split(":")&&r.split(":")[1]===l)return s=i,!0}return!1}),s}function ee(e,t,r,i,s){const l=X("Abstract",t),o=z("Format",t);return{id:e,fullExtent:re(t),fullExtents:ie(t),description:l,formats:o,styles:se(t,i),title:X("Title",t),tileMatrixSets:le(s,t,r)}}function te(e,t){const r=[],i=e.layerMap?.get(t);if(!i)return null;const s=Q("ResourceURL",i),l=Q("Dimension",i);let o,n,a,u;return l.length&&(o=X("Identifier",l[0]),n=z("Default",l[0])||z("Value",l[0])),l.length>1&&(a=X("Identifier",l[1]),u=z("Default",l[1])||z("Value",l[1])),e.dimensionMap.set(t,{dimensions:n,dimensions2:u}),s.forEach(e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(o&&n.length)if(t.includes("{"+o+"}"))t=t.replace("{"+o+"}","{dimensionValue}");else{const e=t.toLowerCase().indexOf("{"+o.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue}"+t.slice(e+o.length+2))}if(a&&u.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{const e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue2}"+t.slice(e+a.length+2))}r.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}}),r}function re(e){const t=G("WGS84BoundingBox",e),r=t?X("LowerCorner",t).split(" "):["-180","-90"],i=t?X("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function ie(e){const t=[];return(0,B.p)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;const r=e.getAttribute("crs").toLowerCase(),i=oe(r),s=r.includes("epsg")&&(0,D.m)(i.wkid);let l,o,n,a;(0,B.p)(e,{LowerCorner:e=>{[l,o]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),s&&([l,o]=[o,l])},UpperCorner:e=>{[n,a]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),s&&([n,a]=[a,n])}}),t.push({xmin:l,ymin:o,xmax:n,ymax:a,spatialReference:i})}}),t}function se(e,t){return Q("Style",e).map(e=>{const r=G("LegendURL",e),i=G("Keywords",e),s=i?z("Keyword",i):[];let l=r?.getAttribute("xlink:href");return t&&(l=l?.replace(/^http:/i,"https:")),{abstract:X("Abstract",e),id:X("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:s,legendUrl:l,title:X("Title",e)}})}function le(e,t,r){return Q("TileMatrixSetLink",t).map(t=>function(e,t,r){const i=G("TileMatrixSet",t).textContent,s=z("TileMatrix",t),l=r.find(e=>{const t=G("Identifier",e),r=t?.textContent;return!!(r===i||i.split(":")&&i.split(":")[1]===r)}),o=G("TileMatrixSetLimits",t),n=o&&Q("TileMatrixLimits",o),a=new Map;if(n?.length)for(const e of n){const t=G("TileMatrix",e).textContent,r=+G("MinTileRow",e).textContent,i=+G("MaxTileRow",e).textContent,s=+G("MinTileCol",e).textContent,l=+G("MaxTileCol",e).textContent;a.set(t,{minCol:s,maxCol:l,minRow:r,maxRow:i})}const u=X("SupportedCRS",l).toLowerCase(),c=function(e,t){return ne(G("TileMatrix",e),t)}(l,u),p=c.spatialReference,d=G("TileMatrix",l),m=[parseInt(X("TileWidth",d),10),parseInt(X("TileHeight",d),10)],h=[];s.length?s.forEach((e,t)=>{const r=Y("TileMatrix","Identifier",e,l);h.push(ae(r,u,t,i,a))}):Q("TileMatrix",l).forEach((e,t)=>{h.push(ae(e,u,t,i,a))});const y=function(e,t,r,i,s){const l=G("BoundingBox",t);let o,n,a,u,c,p;if(l&&(o=X("LowerCorner",l).split(" "),n=X("UpperCorner",l).split(" ")),o&&o.length>1&&n&&n.length>1)a=parseFloat(o[0]),c=parseFloat(o[1]),u=parseFloat(n[0]),p=parseFloat(n[1]);else{const e=G("TileMatrix",t),l=parseInt(X("MatrixWidth",e),10),o=parseInt(X("MatrixHeight",e),10);a=r.x,p=r.y,u=a+l*i[0]*s.resolution,c=p-o*i[1]*s.resolution}return function(e,t,r){return"1.0.0"===e&&(0,D.m)(t.wkid)&&!(r.spatialReference.isGeographic&&r.x<-90&&r.y>=-90)}(e,r.spatialReference,r)?new M.A(c,a,p,u,r.spatialReference):new M.A(a,c,u,p,r.spatialReference)}(e,l,c,m,h[0]).toJSON(),f=new P.A({dpi:96,spatialReference:p,size:m,origin:c,lods:h}).toJSON();return{id:i,fullExtent:y,tileInfo:f}}(e,t,r))}function oe(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);900913!==t&&3857!==t||(t=102100);const r=function(e){return e.includes("crs84")||e.includes("crs:84")?4326:e.includes("crs83")||e.includes("crs:83")?4269:e.includes("crs27")||e.includes("crs:27")?4267:null}(e);return null!=r&&(t=r),{wkid:t}}function ne(e,t){const r=oe(t),[i,s]=X("TopLeftCorner",e).split(" ").map(e=>parseFloat(e)),l=t.includes("epsg")&&(0,D.m)(r.wkid);return new k.A(l?{x:s,y:i,spatialReference:r}:{x:i,y:s,spatialReference:r})}function ae(e,t,r,i,s){const l=oe(t),o=X("Identifier",e);let n=parseFloat(X("ScaleDenominator",e));const a=ue(l.wkid,n,i);n*=96/$;const u=+X("MatrixWidth",e),c=+X("MatrixHeight",e),{maxCol:p=u-1,maxRow:d=c-1,minCol:m=0,minRow:h=0}=s.get(o)??{},{x:y,y:f}=ne(e,t);return new K.A({cols:[m,p],level:r,levelValue:o,origin:[y,f],scale:n,resolution:a,rows:[h,d]})}function ue(e,t,r){let i;return i=W.A.hasOwnProperty(""+e)?W.A.values[W.A[e]]:"default028mm"===r?6370997*Math.PI/180:(0,N.y7)(e).metersPerDegree,7*t/25e3/i}var ce;const pe={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},de=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let me=ce=class extends((0,C.dM)((0,T.J)((0,L.j)((0,S.q)((0,I.A)((0,c.P)(x.A))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,m.wB)(()=>this.activeLayer,(e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)},m.OH),(0,m.on)(()=>this.sublayers,"after-add",({item:e})=>{e.layer=this,e.parent=this},m.OH),(0,m.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=null,e.parent=null},m.OH),(0,m.wB)(()=>this.sublayers,(e,t)=>{if(t)for(const e of t)e.layer=null,e.parent=null;if(e)for(const t of e)t.layer=this,t.parent=this},m.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(d.QP).then(()=>this._fetchService(e)).catch(e=>{throw(0,d.QP)(e),new a.A("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})})),Promise.resolve(this)}readActiveLayerFromService(e,t,r){this.activeLayer||(this.activeLayer=new _);let i=t.layers.find(e=>e.id===this.activeLayer.id);return i||(i=t.layers[0]),this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:r,wmtsInfo:i}=t,s=r?this._getLowerCasedUrlParams(r):null,l=i?.layerIdentifier;let o=null;const n=i?.tileMatrixSet;n&&(Array.isArray(n)?n.length&&(o=n[0]):o=n);const a=s?.format,u=s?.style;return new _({id:l,imageFormat:a,styleId:u,tileMatrixSetId:o})}writeActiveLayer(e,t,r,i){const s=this.activeLayer;t.templateUrl=this.getUrlTemplate(s.id,s.tileMatrixSetId,s.imageFormat,s.styleId);const l=(0,p.wc)("tileMatrixSet.tileInfo",s);t.tileInfo=l?l.toJSON(i):null,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:s.id,tileMatrixSet:s.tileMatrixSetId}}readCustomParameters(e,t){const r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return function(e,t){return e.map(e=>{const r=new _;return r.read(e,t),r})}(t.layers,r)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map(e=>e.tileInfo?.spatialReference).toArray().filter(o.Ru)??[]}get tilemapCache(){const e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new E.A(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&e.endsWith("/")?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId),i=r?.tileInfo,s=e.fullExtent,l=new b.x({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new v.default({fullExtent:s,urlTemplate:t,tileInfo:i,wmtsInfo:l})}async fetchTile(e,t,r,i={}){const{signal:s}=i,o=this.getTileUrl(e,t,r),{data:n}=await(0,l.A)(o,{responseType:"image",signal:s});return n}async fetchImageBitmapTile(e,t,r,i={}){const{signal:s}=i;if(this.fetchTile!==ce.prototype.fetchTile){const l=await this.fetchTile(e,t,r,i);return(0,A.C)(l,e,t,r,s)}const o=this.getTileUrl(e,t,r),{data:n}=await(0,l.A)(o,{responseType:"blob",signal:s});return(0,A.C)(n,e,t,r,s)}findSublayerById(e){return this.sublayers?.find(t=>t.id===e)}getTileUrl(e,t,r){const i=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId),s=i?.tileInfo?.lods[e],l=s?s.levelValue||`${s.level}`:`${e}`;let o=this.resourceInfo?"":function(e,t,r,i,s,l,o,n){const a=function(e,t,r){const i=te(e,t),s=i?.filter(e=>e.format===r);return(s?.length?s:i)??[]}(e,t,i);if(!(a?.length>0))return"";const{dimensionMap:u}=e,c=u.get(t).dimensions?.[0],p=u.get(t).dimensions2?.[0];return a[o%a.length].template.replaceAll(/\{Style\}/gi,s??"").replaceAll(/\{TileMatrixSet\}/gi,r??"").replaceAll(/\{TileMatrix\}/gi,l).replaceAll(/\{TileRow\}/gi,""+o).replaceAll(/\{TileCol\}/gi,""+n).replaceAll(/\{dimensionValue\}/gi,c).replaceAll(/\{dimensionValue2\}/gi,p)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,l,t,r);return o||(o=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,l).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${r}`)),o=this._appendCustomLayerParameters(o),o}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){const r=function(e,t,r,i){const{dimensionMap:s}=e,l=te(e,t);let o="";if(l&&l.length>0){const e=s.get(t).dimensions?.[0],n=s.get(t).dimensions2?.[0];o=l[0].template,o.endsWith(".xxx")&&(o=o.slice(0,-4)),o=o.replaceAll(/\{Style\}/gi,i),o=o.replaceAll(/\{TileMatrixSet\}/gi,r),o=o.replaceAll(/\{TileMatrix\}/gi,"{level}"),o=o.replaceAll(/\{TileRow\}/gi,"{row}"),o=o.replaceAll(/\{TileCol\}/gi,"{col}"),o=o.replaceAll(/\{dimensionValue\}/gi,e),o=o.replaceAll(/\{dimensionValue2\}/gi,n)}return o}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(r)return r}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let s="";return pe[r.toLowerCase()]&&(s=pe[r.toLowerCase()]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){if(this.resourceInfo)return"KVP"!==this.resourceInfo.serviceMode||this.url.includes("?")||(this.url+="?"),function(e){for(const t of e.layers)for(const e of t.tileMatrixSets??[]){const{tileInfo:t}=e;if(t&&96!==t.dpi){for(const r of t.lods??[])r.scale=96*r.scale/t.dpi,r.resolution=ue(t.spatialReference?.wkid,r.scale*$/96,e.id);t.dpi=96}}}(this.resourceInfo),void this.read(this.resourceInfo,{origin:"service"});let t=null;try{const{data:r}=await this._getCapabilities(this.serviceMode,e);t=H(r),J(t)}catch{const r="KVP"===this.serviceMode?"RESTful":"KVP";try{const{data:i}=await this._getCapabilities(r,e);t=H(i),J(t),this.serviceMode=r}catch(e){throw new a.A("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}const{serviceMode:r,url:i}=this,s=function(e,t){const r=e.documentElement,i=new Map,s=new Map,l=G("Contents",r);if(!l)throw new a.A("wmtslayer:wmts-capabilities-xml-is-not-valid","Can't retrieve xml capabilities element");const o=G("OperationsMetadata",r),n=o?.querySelector("[name='GetTile']"),u=n?.getElementsByTagName("Get"),c=u&&Array.prototype.slice.call(u),p=t.url?.indexOf("https"),d=void 0!==p&&p>-1;let m,h,y=t.serviceMode,f=t?.url;if(c?.length&&c.some(e=>{const t=G("Constraint",e);return!t||Y("AllowedValues","Value",y,t)?(f=e.attributes[0].nodeValue,!0):(!t||Y("AllowedValues","Value","RESTful",t)||Y("AllowedValues","Value","REST",t)?h=e.attributes[0].nodeValue:t&&!Y("AllowedValues","Value","KVP",t)||(m=e.attributes[0].nodeValue),!1)}),!f)if(h)f=h,y="RESTful";else if(m)f=m,y="KVP";else{const e=G("ServiceMetadataURL",r);f=e?.getAttribute("xlink:href")}const g=f.indexOf("1.0.0/");-1===g&&"RESTful"===y?f+="/":g>-1&&(f=f.slice(0,g)),"KVP"===y&&(f+=g>-1?"":"?"),d&&(f=f.replace(/^http:/i,"https:"));const w=X("ServiceIdentification>ServiceTypeVersion",r),M=X("ServiceIdentification>AccessConstraints",r),x=M&&/^none$/i.test(M)?null:M,v=Q("Layer",l),C=Q("TileMatrixSet",l),S=v.map(e=>{const t=X("Identifier",e);return i.set(t,e),ee(t,e,C,d,w)});return{copyright:x,dimensionMap:s,layerMap:i,layers:S,serviceMode:y,tileUrl:f}}(t,{serviceMode:r,url:i});this.read(s,{origin:"service"})}async _getCapabilities(e,t){const r=this._getCapabilitiesUrl(e);return await(0,l.A)(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){const t=this.findSublayerById(this.activeLayer.id);return t?.tileMatrixSets?.find(({id:t})=>t===e)}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,u.o8)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const r=(0,h.An)(e),i={...r.query,...t},s=(0,h.x0)(i);return""===s?r.path:`${r.path}?${s}`}_getCapabilitiesUrl(e){this.url=(0,h.An)(this.url).path;let t=this.url;switch(e){case"KVP":t+=`?request=GetCapabilities&service=WMTS&version=${this.version}`;break;case"RESTful":{const e=`/${this.version}/WMTSCapabilities.xml`,r=new RegExp(e,"i");t=t.replace(r,""),t+=e;break}}return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=(0,h.An)(e).query;if(!t)return null;const r={};return Object.keys(t).forEach(e=>{r[e.toLowerCase()]=t[e]}),r}_mergeParams(e,t){const r=this._getLowerCasedUrlParams(t);if(r){const t=Object.keys(r);t.length&&(e=e?(0,u.o8)(e):{},t.forEach(t=>{e.hasOwnProperty(t)||de.has(t)||(e[t]=r[t])}))}return e}};(0,s.Cg)([(0,y.MZ)()],me.prototype,"dimensionMap",void 0),(0,s.Cg)([(0,y.MZ)()],me.prototype,"layerMap",void 0),(0,s.Cg)([(0,y.MZ)({type:_,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],me.prototype,"activeLayer",void 0),(0,s.Cg)([(0,f.w)("service","activeLayer",["layers"])],me.prototype,"readActiveLayerFromService",null),(0,s.Cg)([(0,f.w)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],me.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,s.Cg)([(0,w.K)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:P.A},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],me.prototype,"writeActiveLayer",null),(0,s.Cg)([(0,y.MZ)({type:String,value:"",json:{write:!0}})],me.prototype,"copyright",void 0),(0,s.Cg)([(0,y.MZ)({type:["show","hide"]})],me.prototype,"listMode",void 0),(0,s.Cg)([(0,y.MZ)({json:{read:!0,write:!0}})],me.prototype,"blendMode",void 0),(0,s.Cg)([(0,y.MZ)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],me.prototype,"customParameters",void 0),(0,s.Cg)([(0,f.w)(["portal-item","web-document"],"customParameters")],me.prototype,"readCustomParameters",null),(0,s.Cg)([(0,y.MZ)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],me.prototype,"customLayerParameters",void 0),(0,s.Cg)([(0,y.MZ)({type:M.A,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],me.prototype,"fullExtent",void 0),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],me.prototype,"fullExtents",null),(0,s.Cg)([(0,y.MZ)({type:["WebTiledLayer"]})],me.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,y.MZ)()],me.prototype,"resourceInfo",void 0),(0,s.Cg)([(0,y.MZ)()],me.prototype,"serviceMode",void 0),(0,s.Cg)([(0,f.w)(["portal-item","web-document"],"serviceMode",["templateUrl"])],me.prototype,"readServiceMode",null),(0,s.Cg)([(0,y.MZ)({type:n.A.ofType(_)})],me.prototype,"sublayers",void 0),(0,s.Cg)([(0,f.w)("service","sublayers",["layers"])],me.prototype,"readSublayersFromService",null),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],me.prototype,"supportedSpatialReferences",null),(0,s.Cg)([(0,y.MZ)({readOnly:!0})],me.prototype,"tilemapCache",null),(0,s.Cg)([(0,y.MZ)({json:{read:{source:"title"}}})],me.prototype,"title",null),(0,s.Cg)([(0,y.MZ)({json:{read:!1},readOnly:!0,value:"wmts"})],me.prototype,"type",void 0),(0,s.Cg)([(0,y.MZ)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],me.prototype,"url",null),(0,s.Cg)([(0,y.MZ)()],me.prototype,"version",void 0),me=ce=(0,s.Cg)([(0,g.$)("esri.layers.WMTSLayer")],me);const he=me},38458:(e,t,r)=>{r.d(t,{m:()=>s});const i=[[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 s(e){return null!=e&&i.some(([t,r])=>e>=t&&e<=r)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9573],{8303:(e,t,r)=>{r.d(t,{A:()=>C});var l=r(31635),i=r(92602),s=r(70333),o=r(78888),n=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),g=r(43937),m=r(77548),v=r(20655),w=r(80812),A=r(41318),b=r(10407);const C=e=>{const t=e;let C=class extends t{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:l}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await l({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.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,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:l},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",l),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const l=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,l);let o,n;if(i)o=r.portal.url;else try{o=await(0,m.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,p=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,l)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,b.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.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 l=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(l))return i.user;const a=`${l}/community/self`,u=null!=e?e.signal:null,p=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?A.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,l=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&l&&!(0,d.ut)(l.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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,l.Cg)([(0,h.MZ)({type:w.default})],C.prototype,"portalItem",null),(0,l.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,l.Cg)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,l.Cg)([(0,h.MZ)({clonable:!1})],C.prototype,"resourceReferences",void 0),(0,l.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasEditingPrivileges",void 0),(0,l.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasFullEditingPrivileges",void 0),(0,l.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasUpdateItemPrivileges",void 0),C=(0,l.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],C),C},I={credential:null,user:null}},10407:(e,t,r)=>{r.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>p,Y:()=>n,bK:()=>a,mm:()=>d,sQ:()=>c});var l=r(98988),i=r(16930),s=r(28735);function o(e,t){if(!n(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return n(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?o(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=i.A.WGS84;return await(0,l.initializeProjection)(t,r),(0,l.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:r,itemControl:l}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),o=!!r&&!!i?.includes("features:user:fullEdit");const n="update"===l||"admin"===l;return n?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:n}}}},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>s});var l=r(49186),i=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new l.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.Te)(r),s}async function o(e,t,r,s,o){let n;try{n=await createImageBitmap(e)}catch(e){throw new l.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.Te)(o),n}},47314:(e,t,r)=>{r.r(t),r.d(t,{default:()=>E});var l,i=r(31635),s=r(78888),o=r(49186),n=r(92071),a=r(799),u=r(84952),p=r(10107),c=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),h=r(43937),y=r(5443),f=r(86738),g=r(16930),m=r(4146),v=r(63074),w=r(16131),A=r(8303),b=r(54310),C=r(25036),I=r(33446),M=r(91806),P=r(87045),T=r(83703);let E=l=class extends((0,v.dM)((0,b.J)((0,C.j)((0,w.q)((0,A.A)((0,n.P)(m.A))))))){constructor(...e){super(...e),this.copyright="",this.fullExtent=new y.A(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,g.A.WebMercator),this.legendEnabled=!1,this.isReference=null,this.popupEnabled=!1,this.spatialReference=g.A.WebMercator,this.subDomains=null,this.tileInfo=new P.A({size:[256,256],dpi:96,format:"png8",compressionQuality:0,origin:new f.A({x:-20037508.342787,y:20037508.342787,spatialReference:g.A.WebMercator}),spatialReference:g.A.WebMercator,lods:[new M.A({level:0,scale:591657527.591555,resolution:156543.033928}),new M.A({level:1,scale:295828763.795777,resolution:78271.5169639999}),new M.A({level:2,scale:147914381.897889,resolution:39135.7584820001}),new M.A({level:3,scale:73957190.948944,resolution:19567.8792409999}),new M.A({level:4,scale:36978595.474472,resolution:9783.93962049996}),new M.A({level:5,scale:18489297.737236,resolution:4891.96981024998}),new M.A({level:6,scale:9244648.868618,resolution:2445.98490512499}),new M.A({level:7,scale:4622324.434309,resolution:1222.99245256249}),new M.A({level:8,scale:2311162.217155,resolution:611.49622628138}),new M.A({level:9,scale:1155581.108577,resolution:305.748113140558}),new M.A({level:10,scale:577790.554289,resolution:152.874056570411}),new M.A({level:11,scale:288895.277144,resolution:76.4370282850732}),new M.A({level:12,scale:144447.638572,resolution:38.2185141425366}),new M.A({level:13,scale:72223.819286,resolution:19.1092570712683}),new M.A({level:14,scale:36111.909643,resolution:9.55462853563415}),new M.A({level:15,scale:18055.954822,resolution:4.77731426794937}),new M.A({level:16,scale:9027.977411,resolution:2.38865713397468}),new M.A({level:17,scale:4513.988705,resolution:1.19432856685505}),new M.A({level:18,scale:2256.994353,resolution:.597164283559817}),new M.A({level:19,scale:1128.497176,resolution:.298582141647617}),new M.A({level:20,scale:564.248588,resolution:.14929107082380833}),new M.A({level:21,scale:282.124294,resolution:.07464553541190416}),new M.A({level:22,scale:141.062147,resolution:.03732276770595208}),new M.A({level:23,scale:70.5310735,resolution:.01866138385297604})]}),this.type="web-tile",this.urlTemplate=null,this.wmtsInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{urlTemplate:e,...t}:e}load(e){const t=this.loadFromPortal({supportedTypes:["WMTS"]},e).then(()=>{let e="";if(this.urlTemplate)if(this.spatialReference.equals(this.tileInfo.spatialReference)){const t=new u.s0(this.urlTemplate);!(this.subDomains&&this.subDomains.length>0)&&t.authority?.includes("{subDomain}")&&(e="is missing 'subDomains' property")}else e="spatialReference must match tileInfo.spatialReference";else e="is missing the required 'urlTemplate' property value";if(e)throw new o.A("web-tile-layer:load",`WebTileLayer (title: '${this.title}', id: '${this.id}') ${e}`)});return this.addResolvingPromise(t),Promise.resolve(this)}get levelValues(){const e=[];if(!this.tileInfo)return null;for(const t of this.tileInfo.lods)e[t.level]=t.levelValue||t.level;return e}get loaded(){return super.loaded}readSpatialReference(e,t){return e||g.A.fromJSON(t.fullExtent?.spatialReference)}get tileServers(){if(!this.urlTemplate)return null;const e=[],{urlTemplate:t,subDomains:r}=this,l=new u.s0(t),i=l.scheme?l.scheme+"://":"//",s=i+l.authority+"/",o=l.authority;if(o?.includes("{subDomain}")){if(r&&r.length>0&&o.split(".").length>1)for(const t of r)e.push(i+o.replaceAll(/\{subDomain\}/gi,t)+"/")}else e.push(s);return e.map(u.Il)}get urlPath(){if(!this.urlTemplate)return null;const e=this.urlTemplate,t=new u.s0(e),r=(t.scheme?t.scheme+"://":"//")+t.authority+"/";return e.slice(r.length)}readUrlTemplate(e,t){return e||t.templateUrl}writeUrlTemplate(e,t){(0,u.BQ)(e)&&(e="https:"+e),e&&(e=e.replaceAll(/\{z\}/gi,"{level}").replaceAll(/\{x\}/gi,"{col}").replaceAll(/\{y\}/gi,"{row}"),e=(0,u.S8)(e)),t.templateUrl=e}fetchTile(e,t,r,l={}){const{signal:i}=l,o=this.getTileUrl(e,t,r),n={responseType:"image",signal:i,query:{...this.refreshParameters}};return(0,s.A)(o,n).then(e=>e.data)}async fetchImageBitmapTile(e,t,r,i={}){const{signal:o}=i;if(this.fetchTile!==l.prototype.fetchTile){const l=await this.fetchTile(e,t,r,i);return(0,I.C)(l,e,t,r,o)}const n=this.getTileUrl(e,t,r),a={responseType:"blob",signal:o,query:{...this.refreshParameters}},{data:u}=await(0,s.A)(n,a);return(0,I.C)(u,e,t,r,o)}getTileUrl(e,t,r){const{levelValues:l,tileServers:i,urlPath:s}=this;if(!l||!i||!s)return"";const o=l[e];return i[t%i.length]+(0,a.HC)(s,{level:o,z:o,col:r,x:r,row:t,y:t})}};(0,i.Cg)([(0,p.MZ)({type:String,value:"",json:{write:!0}})],E.prototype,"copyright",void 0),(0,i.Cg)([(0,p.MZ)({type:y.A,json:{write:!0},nonNullable:!0})],E.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1}})],E.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide"]})],E.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!0,write:!0}})],E.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)()],E.prototype,"levelValues",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],E.prototype,"isReference",void 0),(0,i.Cg)([(0,p.MZ)({type:["WebTiledLayer"],value:"WebTiledLayer"})],E.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1}})],E.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:g.A})],E.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.w)("spatialReference",["spatialReference","fullExtent.spatialReference"])],E.prototype,"readSpatialReference",null),(0,i.Cg)([(0,p.MZ)({type:[String],json:{write:!0}})],E.prototype,"subDomains",void 0),(0,i.Cg)([(0,p.MZ)({type:P.A,json:{write:!0}})],E.prototype,"tileInfo",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],E.prototype,"tileServers",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],E.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],E.prototype,"urlPath",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{"portal-item":{read:{source:"url"}}}}})],E.prototype,"urlTemplate",void 0),(0,i.Cg)([(0,c.w)("urlTemplate",["urlTemplate","templateUrl"])],E.prototype,"readUrlTemplate",null),(0,i.Cg)([(0,h.K)("urlTemplate",{templateUrl:{type:String}})],E.prototype,"writeUrlTemplate",null),(0,i.Cg)([(0,p.MZ)({type:T.x,json:{write:!0}})],E.prototype,"wmtsInfo",void 0),E=l=(0,i.Cg)([(0,d.$)("esri.layers.WebTileLayer")],E)},60999:(e,t,r)=>{r.d(t,{DZ:()=>y,Ke:()=>h,Tj:()=>p,UT:()=>f,jJ:()=>u});var l=r(31635),i=r(65008),s=r(97768),o=r(74887),n=r(10107),a=r(40608);function u(e,t,r){return(0,o.Lx)(e.map((e,l)=>t.apply(r,[e,l])))}async function p(e,t,r){return(await(0,o.Lx)(e.map((e,l)=>t.apply(r,[e,l])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function y(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function f(e,t){return new g(e,t)}let g=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,l.Cg)([(0,n.MZ)()],g.prototype,"value",null),(0,l.Cg)([(0,n.MZ)()],g.prototype,"error",null),(0,l.Cg)([(0,n.MZ)()],g.prototype,"finished",null),(0,l.Cg)([(0,n.MZ)()],g.prototype,"promise",void 0),(0,l.Cg)([(0,n.MZ)()],g.prototype,"_result",void 0),g=(0,l.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],g)},69540:(e,t,r)=>{r.d(t,{OU:()=>p,Pw:()=>c});var l=r(31635),i=r(65008),s=(r(44208),r(4718)),o=(r(53966),r(97768)),n=r(88620),a=r(40608);const u=Symbol("ClonableMixin"),p=e=>{var t;const r=e;let i=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,n.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,l=t.store,i={},a=new Map;for(const t in r){const o=r[t],n=l?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==n&&0!==n&&5!==n&&4!==n)continue;const p=this[t];let c=null;if("function"==typeof u)c=u(p,e);else if("reference"===u)c=p;else if(c=(0,s.TU)(p,e),null!=p&&null==c)continue;0===n?a.set(t,c):i[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(a.size){const e=(0,n.oY)(u)?.store;if(e)for(const[t,r]of a)e.set(t,r,0)}return u}};return i=(0,l.Cg)([(0,a.$)("esri.core.Clonable")],i),i},c=p(i.A)},78553:(e,t,r)=>{r.d(t,{D:()=>s,p:()=>i});var l=r(56507);function i(e){const t=(0,l.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},83703:(e,t,r)=>{r.d(t,{x:()=>u});var l,i=r(31635),s=r(25482),o=r(4718),n=r(10107),a=(r(44208),r(53966),r(40608));let u=l=class extends s.o{constructor(e){super(e)}clone(){return new l({customLayerParameters:(0,o.o8)(this.customLayerParameters),customParameters:(0,o.o8)(this.customParameters),layerIdentifier:this.layerIdentifier,tileMatrixSet:this.tileMatrixSet,url:this.url})}};(0,i.Cg)([(0,n.MZ)({json:{type:Object,write:!0}})],u.prototype,"customLayerParameters",void 0),(0,i.Cg)([(0,n.MZ)({json:{type:Object,write:!0}})],u.prototype,"customParameters",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"layerIdentifier",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"tileMatrixSet",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"url",void 0),u=l=(0,i.Cg)([(0,a.$)("esri.layers.support.WMTSLayerInfo")],u)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1791],{9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>s});var i=n(37539);function s(e,t,n,s,r,o,a=Math.floor(e.length/3)){const l=(0,i.jd)(t,r);if(null==l)return!1;if(l===i.pO){if(e===s&&n===o)return!0;const t=n+3*a;for(let i=n,r=o;i<t;i++,r++)s[r]=e[i];return!0}const u=n+3*a;for(let t=n,i=o;t<u;t+=3,i+=3)l(e,t,s,i);return!0}},37539:(e,t,n)=>{n.d(t,{pO:()=>h,jd:()=>d,Tp:()=>f,w5:()=>p});var i=n(34727),s=n(83047),r=n(73941),o=n(79258);Math.PI;const a=o.$O.radius,l=o.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var c=n(21325);const p={2:{5:h,7:null,9:null,10:h,1:C,6:null,8:null,0:null,3:v,11:y,2:h,4:D},5:{5:h,7:null,9:null,10:h,1:C,6:null,8:null,0:null,3:v,11:y,2:h,4:D},7:{5:null,7:h,9:null,10:h,1:null,6:I,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:h,10:h,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){const s=e[t]/O,r=N-2*Math.atan(Math.exp(-e[t+1]/O)),o=O+e[t+2],a=Math.cos(r)*o;n[i]=Math.cos(s)*a,n[i+1]=Math.sin(s)*a,n[i+2]=Math.sin(r)*o},6:null,8:null,0:null,3:h,11:function(e,t,n,i){g(e,t,n,i),y(n,i,n,i)},2:g,4:function(e,t,n,i){g(e,t,n,i),D(n,i,n,i)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,i){T(e,t,n,i),C(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){T(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){T(e,t,n,i),y(n,i,n,i)},2:T,4:h},1:{5:R,7:null,9:null,10:R,1:h,6:null,8:null,0:null,3:function(e,t,n,i){R(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){R(e,t,n,i),y(n,i,n,i)},2:R,4:function(e,t,n,i){R(e,t,n,i),D(n,i,n,i)}},6:{5:null,7:M,9:null,10:M,1:null,6:h,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:h,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:h,3:null,11:null,2:null,4:null},10:{5:h,7:h,9:h,10:h,1:C,6:I,8:b,0:null,3:v,11:y,2:h,4:D},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,i){w(e,t,n,i),C(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){w(e,t,n,i),v(n,i,n,i)},11:h,2:w,4:function(e,t,n,i){w(e,t,n,i),D(n,i,n,i)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(P.source.spatialReference===e&&P.dest.spatialReference===t)return P;const n=m(e,P.source),i=m(t,P.dest);return 0===n&&0===i?(0,c.aI)(e,t)?P.projector=h:P.projector=null:P.projector=p[n][i],P}function m(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function h(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t])}function g(e,t,n,i){n[i]=k*(e[t]/O),n[i+1]=k*(N-2*Math.atan(Math.exp(-e[t+1]/O))),n[i+2]=e[t+2]}function v(e,t,n,s){!function(e,t,n,s,r){const o=.4999999*Math.PI,a=(0,i.qE)(L*e[t+1],-o,o),l=Math.sin(a);n[s++]=L*e[t]*r.radius,n[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[s]=e[t+2]}(e,t,n,s,o.$O)}function y(e,t,n,i){n[i]=e[t]*V,n[i+1]=e[t+1]*V,n[i+2]=e[t+2]}function w(e,t,n,i){n[i]=e[t]*E,n[i+1]=e[t+1]*E,n[i+2]=e[t+2]}function x(e,t,n,i,s){const r=s+e[t+2],o=L*e[t+1],a=L*e[t],l=Math.cos(o)*r;n[i]=Math.cos(a)*l,n[i+1]=Math.sin(a)*l,n[i+2]=Math.sin(o)*r}function b(e,t,n,i){x(e,t,n,i,o.Sw.radius)}function I(e,t,n,i){x(e,t,n,i,o.sH.radius)}function C(e,t,n,i){x(e,t,n,i,o.$O.radius)}function S(e,t,n,s,r){const o=e[t],a=e[t+1],l=e[t+2],u=Math.sqrt(o*o+a*a+l*l),c=(0,i.YN)(l/(0===u?1:u)),p=Math.atan2(a,o);n[s++]=k*p,n[s++]=k*c,n[s]=u-r}function A(e,t,n,i){S(e,t,n,i,o.Sw.radius)}function M(e,t,n,i){S(e,t,n,i,o.sH.radius)}function R(e,t,n,i){S(e,t,n,i,o.$O.radius)}function D(e,t,n,i){!function(e,t,n,i,s){const r=L*e[t],o=L*e[t+1],a=e[t+2],l=Math.sin(o),u=Math.cos(o),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);n[i++]=(c+a)*u*Math.cos(r),n[i++]=(c+a)*u*Math.sin(r),n[i++]=(c*(1-s.eccentricitySquared)+a)*l}(e,t,n,i,o.$O)}function T(e,t,n,i){const s=u,r=e[t],a=e[t+1],l=e[t+2];let c,p,d,f,m,h,g,v,y,w,x,b,I,C,S,A,M,R,D,T,P;c=Math.abs(l),p=r*r+a*a,d=Math.sqrt(p),f=p+l*l,m=Math.sqrt(f),T=Math.atan2(a,r),h=l*l/f,g=p/f,C=s.a2/m,S=s.a3-s.a4/m,g>.3?(v=c/m*(1+g*(s.a1+C+h*S)/m),D=Math.asin(v),w=v*v,y=Math.sqrt(1-w)):(y=d/m*(1-h*(s.a5-C-g*S)/m),D=Math.acos(y),w=1-y*y,v=Math.sqrt(w)),x=1-o.$O.eccentricitySquared*w,b=o.$O.radius/Math.sqrt(x),I=s.a6*b,C=d-b*y,S=c-I*v,M=y*C+v*S,A=y*S-v*C,R=A/(I/x+M),D+=R,P=M+A*R/2,l<0&&(D=-D),n[i++]=k*T,n[i++]=k*D,n[i]=P}const P={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:h},L=(0,i.kU)(1),k=(0,i.KJ)(1),N=.5*Math.PI,O=o.$O.radius,V=O*Math.PI/180,E=180/(O*Math.PI)},38458:(e,t,n)=>{n.d(t,{m:()=>s});const i=[[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 s(e){return null!=e&&i.some(([t,n])=>e>=t&&e<=n)}},62815:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(83047),s=n(73941),r=n(21325);function o(e,t,n){if(null==t||null==n||n.vcsWkid||(0,r.aI)(t,n)||(0,s.xP)(t)||(0,s.xP)(n))return null;const o=(0,i.G9)(t)/(0,i.G9)(n);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},88854:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ae});var i=n(31635),s=n(37838),r=n(69540),o=n(49186),a=n(92071),l=n(74887),u=n(36708),c=n(10107),p=(n(44208),n(53966)),d=(n(87811),n(40608)),f=n(89808),m=n(99959);const h=Symbol("isWCSGraphicOrigin");var g;class v extends m.A{get[(g=h,f.Q)](){return this.layer}constructor(e){super(),this[g]=!0,this.type="wcs",this.layer=e}get id(){return this.layer.id}}var y=n(4146),w=n(63074),x=n(69208),b=n(89015),I=n(16131),C=n(8303),S=n(63660),A=n(54310),M=n(25036),R=n(82935),D=n(10873),T=n(20437),P=n(74797),L=n(5443),k=n(38458),N=n(78888),O=n(50103);function V(e){return e.endsWith("?")?e.slice(0,-1):e}function E(e){return e.filter(({coverageSubType:e})=>null==e||""===e||/^rectified(grid|dataset)/i.test(e))}function $(e){const t={};for(let n=0;n<e.childNodes.length;n++){const i=e.childNodes[n];if(1!==i.nodeType)continue;const s=(0,O.vv)(i).toLowerCase();switch(s){case"title":case"abstract":t[s]=(0,O.mX)(i);break;case"identifier":t.id=(0,O.mX)(i);break;case"wgs84boundingbox":{const e=(0,O.pN)(i,"LowerCorner"),n=(0,O.pN)(i,"UpperCorner");t.lonLatEnvelope=new L.A({xmin:e[0],ymin:e[1],xmax:n[0],ymax:n[1],spatialReference:{wkid:4326}})}break;case"coveragesummary":t.coverageSummaries=t.coverageSummaries||[],t.coverageSummaries.push($(i))}}return t}function _(e,t){if(e.coverageSummaries)for(let n=0;n<e.coverageSummaries.length;n++)e.coverageSummaries[n].abstract=e.coverageSummaries[n].abstract||e.abstract,e.coverageSummaries[n].lonLatEnvelope=e.coverageSummaries[n].lonLatEnvelope||e.lonLatEnvelope,e.coverageSummaries[n].title=e.coverageSummaries[n].title||e.title,_(e.coverageSummaries[n],t);null!=e.id&&t.push(e)}function j(e){const t=(0,O.V6)(e.querySelector("Operation[name=GetCapabilities]"),"Get")?.getAttribute("xlink:href")||"",n=(0,O.V6)(e.querySelector("Operation[name=DescribeCoverage]"),"Get")?.getAttribute("xlink:href")||"",i=(0,O.V6)(e.querySelector("Operation[name=GetCoverage]"),"Get")?.getAttribute("xlink:href")||"";return{getCapabilities:V(t),describeCoverage:V(n),getCoverage:V(i)}}function G(e,t=null){let n=null;n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;let i=n.documentElement.getAttribute("version");"1.0"===i?i="1.0.0":"1.1"===i&&(i="1.1.0");const s=i||t||"1.0.0",r=s.slice(0,3);let a;if("2.0"===r)a=function(e){const t=(0,O.V6)(e,"ServiceIdentification"),n=(0,O.mX)(t,"Title"),i=(0,O.Dy)(t,"ServiceTypeVersion"),s=(0,O.Dy)(t,"Profile"),r=j((0,O.V6)(e,"OperationsMetadata")),o=(0,O.IC)(e,"Contents/CoverageSummary"),a=[];for(let e=0;e<o.length;e++){const t=o[e],n=(0,O.mX)(t,"CoverageId"),i=(0,O.V6)(t,"WGS84BoundingBox");let s;if(i){const e=(0,O.pN)(i,"LowerCorner"),t=(0,O.pN)(i,"UpperCorner");s=new L.A({xmin:e[0],ymin:e[1],xmax:t[0],ymax:t[1],spatialReference:{wkid:4326}})}const r=(0,O.mX)(t,"CoverageSubtype")||"RectifiedGridCoverage";a.push({id:n,lonLatEnvelope:s,coverageSubType:r})}const l=(0,O.V6)(e,"ServiceMetadata");return{name:n,supportedVersions:i,supportedFormats:(0,O.Dy)(l,"formatSupported"),supportedInterpolations:(0,O.Dy)(l,"interpolationSupported").concat((0,O.Dy)(l,"InterpolationSupported")),onlineResources:r,profiles:s,coverages:a,gridCoverages:E(a),version:"2.0.1"}}(n);else if("1.1"===r)a=function(e){const t=(0,O.mX)(e,"ServiceIdentification/Title"),n=(0,O.Dy)(e,"ServiceIdentification/ServiceTypeVersion"),i=j((0,O.V6)(e,"OperationsMetadata")),s=[],r=(0,O.V6)(e,"Contents");for(let e=0;e<r.childNodes.length;e++){const t=r.childNodes[e];1===t.nodeType&&(0,O.g7)(t,"CoverageSummary")&&_($(t),s)}const o=(0,O.Dy)(r,"SupportedFormat");return{name:t,onlineResources:i,coverages:s,gridCoverages:E(s),supportedVersions:n,supportedFormats:o,version:"1.1.0"}}(n);else{if("1.0"!==r)throw new o.A("wcsraster:parsecapabilities","the capabilities version is not supported");a=function(e){const t=(0,O.mX)(e,"Service/name"),n=(0,O.V6)(e,"Capability"),i=(0,O.V6)(n,"GetCapabilities/Get/OnlineResource")?.getAttribute("xlink:href")??"",s=(0,O.V6)(n,"DescribeCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",r=(0,O.V6)(n,"GetCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",o={getCapabilities:V(i),describeCoverage:V(s),getCoverage:V(r)},a=(0,O.IC)(e,"CoverageOfferingBrief"),l=[];for(let e=0;e<a.length;e++){const t=a[e],n=(0,O.mX)(t,"name"),i=(0,O.IC)(t,"pos"),s=(0,O.pN)(i[0]),r=(0,O.pN)(i[1]),o=new L.A({xmin:s[0],ymin:s[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}});l.push({id:n,lonLatEnvelope:o})}return{name:t,onlineResources:o,coverages:l,gridCoverages:E(l),supportedVersions:["1.0.0"],version:"1.0.0"}}(n)}return a.version=s,a}var X=n(39829),F=n(87186),W=n(77301);function q(e){e.variables.forEach(e=>e.dimensions.forEach(e=>e.values??=(0,W.Xg)(e)))}function B(e){return{requestResponseCRSs:(0,O.Dy)(e,"requestResponseCRSs").map(e=>e.split(":")[1]),nativeCRSs:(0,O.Dy)(e,"nativeCRSs").map(e=>e.split(":")[1])}}function Z(e,t){const n=(0,O.Dy)(e,"1.0.0"===t?"interpolationMethod":"InterpolationMethod"),i="1.0.0"===t?e.getAttribute("default"):(0,O.mX)(e,"InterpolationMethods/Default");return null!=i?[i].concat(n.filter(e=>e.toLowerCase()!==i.toLowerCase())):n}function z(e){return null==e?["nearest"]:e.map(e=>{const t=e.toLowerCase();return t.includes("nearest")?"nearest":t.includes("linear")?"bilinear":t.includes("cubic")?"cubic":null}).filter(e=>!!e)}function U(e){const t=(0,O.IC)(e,"pos"),n=(0,O.pN)(t[0]),i=(0,O.pN)(t[1]);return new L.A({xmin:n[0],ymin:n[1],xmax:i[0],ymax:i[1],spatialReference:{wkid:4326}})}function H(e,t){const n=(0,O.Dy)(e,t);return n?.length&&""!==n[0]&&!isNaN(Number(n[0]))?n.map(e=>Number(e)):null}function K(e){const t=(0,O.pN)(e,"MinimumValue"),n=(0,O.pN)(e,"MaximumValue");return t.length&&n.length?t.map((e,t)=>({min:e,max:n[t],avg:-1,stddev:-1})):null}function Y(e){return null==e?null:e.every(t=>t===e[0])?e[0]:e}function Q(e){const t=[],n=(0,O.IC)(e,"RangeSet");let i=[];for(let e=0;e<n.length;e++){const s=(0,O.mX)(n[e],"name"),r=(0,O.mX)(n[e],"label"),o=[],a=H(n[e],"nullValues/singleValue"),l=(0,O.IC)(n[e],"AxisDescription");for(let e=0;e<l.length;e++){const t=(0,O.mX)(l[e],"name"),n=(0,O.mX)(l[e],"label"),s=(0,O.Dy)(l[e],"singleValue");if(0===s.length){const t=(0,O.mX)(l[e],"min"),n=(0,O.mX)(l[e],"max"),i=Number((0,O.mX)(l[e],"res"))||1;if(null!==t&&null!==n)for(let e=parseInt(t,10);e<=parseInt(n,10);e+=i)s.push(e.toString())}"band"===t.toLowerCase()&&(i=s),o.push({name:t,label:n,values:s})}t.push({name:s,label:r,nullValues:a,axis:o})}return{rangeSet:t,bandNames:i}}function J(e=null){if(!e)return{resolution:null,units:null};let t=e.toUpperCase();const n=["Years","Months","Days","Hours","Minutes","Seconds"];let i,s,r;return t.includes("PT")?(t=t.slice(2),r=["H","M","S"].findIndex(e=>t.includes(e)),i=n[3+r],s=parseFloat(t.slice(0,-1))):(t=t.slice(1),r=["Y","M","D"].findIndex(e=>t.includes(e)),r>-1&&(i=n[r]),s=parseFloat(t.slice(0,-1))),{resolution:s,units:i}}function ee(e){const t=(0,O.IC)(e,"timeposition");if(t.length>0){const e=[];for(let n=0;n<t.length;n++)e.push(new Date((0,O.mX)(t[n])));return{begin:e[0],end:e[e.length-1],values:e}}const n=(0,O.V6)(e,"timePeriod")||(0,O.V6)(e,"TimePeriod");return n?{begin:new Date((0,O.mX)(n,"beginPosition")||(0,O.mX)(n,"BeginPosition")),end:new Date((0,O.mX)(n,"endPosition")||(0,O.mX)(n,"EndPosition")),...J((0,O.mX)(n,"timeResolution")||(0,O.mX)(n,"TimeResolution"))}:null}function te(e){const t=(0,O.V6)(e,"spatialDomain"),n=(0,O.V6)(t,"Envelope")||(0,O.V6)(t,"EnvelopeWithTimePeriod"),i=n.getAttribute("srsName").split(":"),s=i[i.length-1],r=(0,O.IC)(n,"pos"),o=(0,O.pN)(r[0]),a=(0,O.pN)(r[1]),l=parseInt(s,10),u=isNaN(l)?null:{wkid:l},c=new L.A({xmin:o[0],ymin:o[1],xmax:a[0],ymax:a[1],spatialReference:u}),p=(0,O.V6)(t,"RectifiedGrid"),d=(0,O.mX)(p,"low").split(" "),f=(0,O.mX)(p,"high").split(" "),m=parseInt(f[0],10)-parseInt(d[0],10)+1,h=parseInt(f[1],10)-parseInt(d[1],10)+1,g=(0,O.pN)(t,"origin/pos"),v=(0,O.IC)(t,"offsetVector"),y={envelope:c,columns:m,rows:h,offset:{x:parseFloat((0,O.mX)(v[0]).split(" ")[0]),y:parseFloat((0,O.mX)(v[1]).split(" ")[1])},origin:{x:g[0],y:g[1]}},w=(0,O.V6)(e,"temporalDomain")||(0,O.V6)(e,"TemporalDomain");return{spatialDomain:y,temporalDomain:w?ee(w):null}}function ne(e,t){const n=[],i=(0,O.IC)(e,"Field");let s,r=[];for(let e=0;e<i.length;e++){const o=(0,O.mX)(i[e],"Identifier"),a=(0,O.mX)(i[e],"Description"),l=(0,O.mX)(i[e],"Definition"),u=(0,O.mX)(i[e],"Abstract"),c=(0,O.mX)(i[e],"Title"),p=H(i[e],"NullValue"),d=(0,O.V6)(i[e],"AllowedValues"),f=d?K(d):null,m=Z(i[e],"1.1.0"),h=[],g=(0,O.IC)(i[e],"Axis");for(let e=0;e<g.length;e++){const n=g[e].getAttribute("identifier"),i=(0,O.mX)(g[e],"UOM"),o=(0,O.mX)(g[e],"DataType"),a=(0,O.Dy)(g[e],"Key");t&&!n.toLowerCase().includes("band")||(r=a,s=p),h.push({identifier:n,uom:i,dataType:o,values:a,bandNoDataValues:s})}n.push({identifier:o,description:a,definition:l,abstract:u,title:c,supportedInterpolations:m,axis:h,nullValues:p,statistics:f})}return{rangeSet:n,bandNames:r,bandNoDataValues:s,statistics:n[0].statistics}}function ie(e){const t=(0,O.V6)(e,"SpatialDomain"),n=(0,O.V6)(t,"GridCRS"),i=(0,O.mX)(n,"GridBaseCRS"),s=(0,O.mX)(n,"GridOrigin"),r=s?.split(" ").map(e=>parseFloat(e))??[0,0],o=(0,O.pN)(n,"GridOffsets"),a=(0,O.IC)(t,"BoundingBox");let l,u,c,p;for(let e=0;e<a.length;e++){const t=a[e].getAttribute("crs")?.toLowerCase();if(null!=t)if(t.includes("imagecrs")){const t=(0,O.pN)(a[e],"LowerCorner"),n=(0,O.pN)(a[e],"UpperCorner");l=n[0]-t[0]+1,u=n[1]-t[1]+1}else if(t.indexOf("epsg")>0){const n=t.split(":");c=parseInt(n[n.length-1],10);const i=(0,O.pN)(a[e],"LowerCorner"),s=(0,O.pN)(a[e],"UpperCorner");p=new L.A({xmin:i[0],ymin:i[1],xmax:s[0],ymax:s[1],spatialReference:{wkid:c}})}}const d=l>u,f=p.xmax-p.xmin>p.ymax-p.ymin;let m=!1;(0,k.m)(c)&&(d===f?m=!1:(m=!0,p=new L.A({xmin:p.ymin,ymin:p.xmin,xmax:p.ymax,ymax:p.xmax,spatialReference:{wkid:c}})));const h={columns:l,rows:u,origin:{x:r[0],y:r[1]},offset:{x:o[0],y:o[o.length-1]},gridBaseCRS:i,envelope:p,useEPSGAxis:m},g=(0,O.V6)(e,"temporalDomain")||(0,O.V6)(e,"TemporalDomain");return{spatialDomain:h,temporalDomain:g?ee(g):null}}function se(e){const t=(0,O.V6)(e,"Envelope")||(0,O.V6)(e,"EnvelopeWithTimePeriod"),n=t.getAttribute("srsName"),i=n.slice(n.lastIndexOf("/")+1),s=t.getAttribute("axisLabels").split(" ").map(e=>e.trim()).filter(e=>""!==e.trim()),r=(0,O.pN)(t,"lowerCorner"),o=(0,O.pN)(t,"upperCorner"),a=!["y","lat","latitude","north","nor","n","b"].includes(s[0].toLowerCase());let l;const u=parseInt(i,10),c=isNaN(u)?null:{wkid:u};l=new L.A(a?{xmin:r[0],ymin:r[1],xmax:o[0],ymax:o[1],spatialReference:c}:{xmin:r[1],ymin:r[0],xmax:o[1],ymax:o[0],spatialReference:c});const p={mins:r,maxs:o},d=t.getAttribute("uomLabels").trim().split(" ");let f,m;if((0,O.g7)(t,"EnvelopeWithTimePeriod")){f=new Date((0,O.mX)(e,"beginPosition")||(0,O.mX)(e,"BeginPosition")),m=new Date((0,O.mX)(e,"endPosition")||(0,O.mX)(e,"EndPosition"));const t=d?.findIndex(e=>"oledatetime"===e?.toLowerCase());t>-1&&(d[t]="ISO8601")}return{envelope:l,axisLabels:s,uomLabels:d.length?d:null,envelopeAllDims:p,beginPosition:f,endPosition:m,isEastFirst:a}}function re(e,t){const n=[],i=(0,O.IC)(e,"DataRecord"),s=[];let r,o=[];for(let e=0;e<i.length;e++){const a=(0,O.IC)(i[e],"field"),l=[];for(let e=0;e<a.length;e++){const n=a[e].getAttribute("name"),i=(0,O.mX)(a[e],"description")||"",u=(0,O.V6)(a[e],"uom")?.getAttribute("code")||"",c=(0,O.pN)(a[e],"interval"),p=H(a[e],"nilValue")?.[0];t&&!n.toLowerCase().includes("band")||(s.push(n),c?.length&&(r=r||[],r.push({min:c[0],max:c[1],avg:-1,stddev:-1})),o.push(p)),l.push({name:n,description:i,uom:u,allowedValues:c,nilValue:p})}n.push(l)}return o.some(e=>null!=e)||(o=null),{rangeType:n,bandNames:s,bandStats:r,bandNoDataValues:o}}function oe(e){let t=1,n="";const i=.01;return Math.abs(e-1/24)<1/24*i?n="Hours":Math.abs(e-1)<1*i?n="Days":e<1?(t=Math.round(24*e),n="Hours"):e>28-i&&e<31+i||Math.round(e/30)<12?n="Months":e>365-i&&e<366+i&&(n="Years"),{interval:t,intervalUnit:n}}function ae(e,t){const n=(0,O.V6)(e,"RectifiedGrid"),i=(0,O.pN)(n,"low"),s=(0,O.pN)(n,"high"),r=[];for(let e=0;e<i.length;e++)r.push(s[e]-i[e]+1);const o=(0,O.mX)(n,"axisLabels").split(" "),a=(0,O.pN)(n,"origin/pos"),l=(0,O.IC)(n,"offsetVector"),u=[];for(let e=0;e<l.length;e++){const t=(0,O.pN)(l[e]),n=t.findIndex(e=>0!==e);u[n]=t[n]}let c,p,d,f=!1;return t?.length&&o?.length&&(f=[...t].sort((e,t)=>e<t?-1:1).join(",")===[...o].sort((e,t)=>e<t?-1:1).join(",")),["y","lat","latitude","north","nor","n","b"].includes((f?o:t)[0].toLowerCase())?(c=r[1],p=r[0],d={y:Math.abs(u[0]),x:Math.abs(u[1])}):(c=r[0],p=r[1],d={x:Math.abs(u[0]),y:Math.abs(u[1])}),{columns:c,rows:p,origin:a,offset:u,resolution:d,gridSamples:r,axisLabels:o,hasSameAxisLabelsAsBoundedBy:f}}function le(e){const t=(0,O.V6)(e,"EarthObservation");if(!t)return null;const n=(0,O.V6)(t,"phenomenonTime"),i=n?ee(n):null,s=(0,O.V6)(t,"phenomenonTime"),r=s?ee(s):null,o=(0,O.mX)(t,"featureOfInterest/Footprint/multiExtentOf/MultiSurface/surfaceMembers/Polygon/exterior/LinearRing/posList");let a=null;if(o){const e=o.split(" ").map(e=>e.trim()).filter(e=>null!=e&&""!==e).map(Number);if(e.length){const t=[];for(let n=0;n<e.length/2;n+=2)t.push(e[n],e[n+1]);a=new X.A({rings:[[t]]})}}return{observation:{phenomenonTime:i,resultTime:r,footprint:a,identifier:(0,O.mX)(e,"metaDataProperty/EarthObservationMetaData/identifier"),acquisitionType:(0,O.mX)(e,"metaDataProperty/EarthObservationMetaData/acquisitionType"),status:(0,O.mX)(e,"metaDataProperty/EarthObservationMetaData/status")}}}async function ue(e,t){const{coverageIds:n,version:i,customParameters:s,signal:r}=t,a=i.slice(0,3),u="1.0"===a?"coverage":"1.1"===a?"identifiers":"coverageId",c={service:"WCS",request:"DescribeCoverage",version:i,[u]:n.join(","),...s};try{const{data:t}=await(0,N.A)(e,{query:c,responseType:"xml",signal:r});return function(e,t){let n=null;if(n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e,"1.0.0"===t)return(0,O.IC)(n,"CoverageOffering").map(e=>function(e){const t={version:"1.0"};let n,i=[];for(let s=0;s<e.childNodes.length;s++){const r=e.childNodes[s];if(1===r.nodeType)if((0,O.g7)(r,"description"))t.description=(0,O.mX)(r);else if((0,O.g7)(r,"name"))t.name=(0,O.mX)(r);else if((0,O.g7)(r,"label"))t.label=(0,O.mX)(r);else if((0,O.g7)(r,"supportedFormats"))t.supportedFormats=(0,O.Dy)(r,"formats");else if((0,O.g7)(r,"supportedCRSs"))t.supportedCRSs=B(r);else if((0,O.g7)(r,"supportedInterpolations"))t.supportedInterpolations=Z(r,"1.0.0");else if((0,O.g7)(r,"lonLatEnvelope"))t.lonLatEnvelope=U(r);else if((0,O.g7)(r,"rangeSet")){const e=Q(r);t.rangeSet=e.rangeSet,i=e.bandNames;const s=e.rangeSet[0].nullValues;s?.length&&(n=Y(s))}else(0,O.g7)(r,"domainSet")&&(t.domainSet=te(r))}const s=z(t.supportedInterpolations),{name:r,description:o,label:a,lonLatEnvelope:l,supportedFormats:u}=t,{spatialDomain:c}=t.domainSet,p={x:Math.abs(c.offset.x),y:Math.abs(c.offset.y)},d=function(e){if(!e.temporalDomain)return null;const{begin:t,end:n,values:i,units:s,resolution:r}=e.temporalDomain,o={variables:[{name:"default",description:"",dimensions:[{name:"StdTime",description:"",unit:"ISO8601",values:i?.map(e=>e.getTime()),hasRegularIntervals:!i,interval:r,intervalUnit:s,extent:[t.getTime(),n.getTime()]}]}]};return q(o),o}(t.domainSet),f=new F.A({width:c.columns,height:c.rows,pixelSize:p,pixelType:"unknown",extent:c.envelope,spatialReference:c.envelope.spatialReference,bandCount:i.length||1,noDataValue:n,multidimensionalInfo:d});return{id:r,title:t.name,description:o||a,lonLatEnvelope:l,rasterInfo:f,bandNames:i,supportedFormats:u,supportedInterpolations:s,coverageDescription:t,version:"1.0.0",useEPSGAxis:!1}}(e));const i=(0,O.IC)(n,"CoverageDescription");return"1.1.0"===t||"1.1.1"===t||"1.1.2"===t?i.map(e=>function(e,t){const n=[],i=[],s={supportedFormats:n,supportedCRSs:i,version:"1.1"};let r,o,a=[];for(let t=0;t<e.childNodes.length;t++){const l=e.childNodes[t];if(1!==l.nodeType)continue;const u=(0,O.vv)(l).toLowerCase();switch(u){case"title":case"abstract":case"identifier":s[u]=(0,O.mX)(l);break;case"supportedformat":{const e=(0,O.mX)(l);n.includes(e)||n.push(e)}break;case"supportedcrs":{const e=(0,O.mX)(l);i.includes(e)||i.push(e)}break;case"range":{const e=ne(l,!!s.domain?.temporalDomain);s.range=e.rangeSet,a=e.bandNames;const{bandNoDataValues:t}=e;t?.length&&(r=Y(t)),o=e.statistics}break;case"domain":s.domain=ie(l)}}const l=z(s.range[0].supportedInterpolations),{identifier:u,abstract:c,title:p,domain:d,range:f}=s,m={x:Math.abs(d.spatialDomain.offset.x),y:Math.abs(d.spatialDomain.offset.y)},h=function(e,t){if(!t.temporalDomain)return null;const n=e.filter(e=>!e.identifier.toLowerCase().includes("field_1")&&!e.axis.some(e=>e.identifier.includes("band"))),i=[];if(n.length&&n.forEach(e=>{const t=e.axis.map(e=>{const t=e.values.map(t=>"ISO8601"===e.uom?(t=t.trim()).toLowerCase().includes("z")?new Date(t).getTime():new Date(t+"Z").getTime():parseFloat(t.trim())),n=[Math.min.apply(null,t),Math.max.apply(null,t)];return{name:e.identifier.trim(),description:"",field:e.identifier.trim(),unit:e.uom?e.uom.trim():"",hasRegularIntervals:!1,values:t,extent:n}});i.push({name:e.identifier.trim(),description:e.description?.trim()??"",unit:"",dimensions:t,statistics:e.statistics})}),t.temporalDomain){const{begin:e,end:n,values:s,units:r,resolution:o}=t.temporalDomain;i.some(e=>e.dimensions.some(e=>"stdtime"===e.name.toLowerCase()))||i.forEach(t=>{t.dimensions.push({name:"StdTime",description:"",unit:"ISO8601",values:s?.map(e=>e.getTime()),hasRegularIntervals:!s,interval:o,intervalUnit:r,extent:[e.getTime(),n.getTime()]})})}if(i.length){const e={variables:i};return q(e),e}return null}(f,d);h&&(r=f[0].nullValues,1===r?.length&&(r=r[0]));const g=new F.A({width:d.spatialDomain.columns,height:d.spatialDomain.rows,pixelSize:m,pixelType:"unknown",extent:d.spatialDomain.envelope,spatialReference:d.spatialDomain.envelope.spatialReference,bandCount:a.length||1,noDataValue:r,statistics:o,multidimensionalInfo:h});return{id:u,title:s.title,description:c||p,bandNames:a,rasterInfo:g,supportedFormats:n,supportedInterpolations:l,coverageDescription:s,version:t,useEPSGAxis:d.spatialDomain.useEPSGAxis}}(e,t)):i.map(e=>function(e){const t={version:"2.0"};let n,i,s=[];for(let r=0;r<e.childNodes.length;r++){const o=e.childNodes[r];if(1===o.nodeType)if((0,O.g7)(o,"coverageId"))t.coverageId=(0,O.mX)(o);else if((0,O.g7)(o,"ServiceParameters"))t.serviceParameters={supportedFormats:(0,O.Dy)(o,"nativeFormat")};else if((0,O.g7)(o,"boundedBy"))t.boundedBy=se(o);else if((0,O.g7)(o,"rangeType")){const e=re(o,t.boundedBy?.axisLabels.length>2||t.domainSet?.axisLabels.length>2);t.rangeType=e.rangeType,s=e.bandNames,n=e.bandStats;const{bandNoDataValues:r}=e;r?.length&&(i=Y(r))}else if((0,O.g7)(o,"domainSet"))t.domainSet=ae(o,t.boundedBy?.axisLabels);else if((0,O.g7)(o,"metadata")){const e=(0,O.V6)(o,"EOMetadata");t.eoMetadata=e?le(e):null}}const{coverageId:r,boundedBy:o,domainSet:a,rangeType:l,serviceParameters:u}=t,c=function(e,t,n){if(n.axisLabels.length<=2)return null;const i=[];for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.length;e++)n[e].name.toLowerCase().includes("band")||i.push(n[e])}const s=[];if(i.length){const e=[];for(let i=2;i<n.axisLabels.length;i++){const s=t.uomLabels?.[i]?.trim()??"",r=n.axisLabels[i].toLowerCase().includes("time")||"iso8601"===s.toLowerCase()||"oledatetime"===s.toLowerCase();let o,a;if(r){const e=oe(n.offset[i]);o=e.interval,a=e.intervalUnit}else o=n.offset[i],a=s;const l=[];r?(l.push((0,W.$E)(t.envelopeAllDims.mins[i])),l.push((0,W.$E)(t.envelopeAllDims.maxs[i]))):(l.push(t.envelopeAllDims.mins[i]),l.push(t.envelopeAllDims.maxs[i])),e.push({name:n.axisLabels[i].trim(),description:n.axisLabels[i].trim(),unit:r?"ISO8601":s,hasRegularIntervals:!0,extent:l,interval:o,intervalUnit:a})}if(i.forEach(t=>{const{allowedValues:n}=t,i=2===n?.length?[{min:n[0],max:n[1],avg:-1,stddev:-1}]:null;s.push({name:t.name.trim(),description:t.description?.trim()??"",unit:t.uom.trim(),statistics:i,dimensions:[...e]})}),s.length){const e={variables:s};return q(e),e}}return null}(l,o,a);return!n&&c&&(n=c?.variables[0].statistics),null!=c&&(i=l[0][0].nilValue),{id:r,title:r,description:r,bandNames:s,rasterInfo:new F.A({width:a.columns,height:a.rows,pixelSize:a.resolution,pixelType:"unknown",extent:o.envelope,spatialReference:o.envelope.spatialReference,bandCount:s.length||1,statistics:n,noDataValue:i,multidimensionalInfo:c}),supportedFormats:u.supportedFormats,coverageDescription:t,version:"2.0.1",useEPSGAxis:!1}}(e))}(t,i)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs coverage description is not valid or supported");throw e}}var ce=n(45617),pe=n(4916);function de(e,t,n=0){const i="--"+t.boundary,s=[];for(let e=0;e<i.length;e++)s.push(i.charCodeAt(e));const r=[],o="\n--"+t.boundary+"--";for(let e=0;e<o.length;e++)r.push(o.charCodeAt(e));const a=[10],l=[13,10],u=[],c=s.length,p=new Uint8Array(e,n),d=p.length-c;let f=0,m=0;for(let e=0;e<d;e++){for(m=0;m<c&&p[e+m]===s[m];m++);if(m!==c)continue;let n=!1;if(f){const i=fe(p.subarray(f,e),t);u.push(i),n=!!i.isValidImage}if(e+=c-1,p[e+1]===a[0]?e+=1:p[e+1]===l[0]&&p[e+2]===l[1]&&(e+=2),f=e+1,n)break}const h=r.length;for(let e=p.length-h-10;e<p.length-h;e++){for(m=0;m<h&&p[e+m]===r[m];m++);if(m===h){u.push(fe(p.subarray(f,e),t));break}}return u}function fe(e,t){const n=String.fromCharCode.apply(null,e.subarray(0,Math.min(300,e.length))).split("\n"),i=Math.min(n.length,7),s={contentDisposition:"inline"};let r=0;for(let o=0;o<i;o++)if(n[o].length<4)r=r+n[o].length+1;else if("content"===n[o].slice(0,7).toLowerCase()){r=r+n[o].length+1;const e=n[o].indexOf(":");if(-1===e)continue;const t=n[o].slice(0,e).trim(),i=n[o].slice(e+1).trim();switch(t.toLowerCase()){case"content-type":s.contentType=i;break;case"content-description":s.contentDescription=i;break;case"content-transfer-encoding":s.contentTransferEncoding=i;break;case"content-id":s.contentID=i;break;case"content-disposition":s.contentDisposition=i;break;case"content-location":s.contentLocation=i}}else{if(s.contentDisposition.toLowerCase().includes("inline")&&n[o].length>=4&&s.contentType?.toLowerCase().includes("image")){let t=!0,n=e.subarray(r,e.length);if(s.contentType.toLowerCase().indexOf("tif")>0){if("base64"===s.contentTransferEncoding){let e="";const t=n;for(let n=0;n<t.length;n+=65535){const i=t.subarray(n,n+65535>t.length-1?t.length-1:n+65535);e+=String.fromCharCode.apply(null,i)}const i=atob(e);n=new Uint8Array(i.length);for(let e=0;e<n.length;e++)n[e]=i.charCodeAt(e)}t=73===n[0]&&73===n[1]||77===n[0]&&77===n[1]}if(t){let t=n.buffer;"base64"!==s.contentTransferEncoding&&(t=new ArrayBuffer(e.length-r),n=new Uint8Array(t),n.set(e.subarray(r,e.length))),s.contentData=t,s.isValidImage=!0}break}if((""===t.start||s.contentID===t.start)&&s.contentType){if(s.contentType.includes("text")||s.contentType.includes("xml")){s.contentData=String.fromCharCode.apply(null,e.subarray(r,e.length));break}s.contentData=e.subarray(r,e.length)}}return s}var me=n(77649),he=n(28435);const ge=["nearest neighbor","bilinear","bicubic"],ve=["nearest","linear","cubic"],ye="response is not a supported multipart/related mediaType with inline tiff, switching to compatibility mode",we=new Set(["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"]);let xe=class extends pe.A{constructor(){super(...arguments),this.datasetFormat="WCSServer",this.tileType="Raster"}get rasterId(){return`${this.url}-${this.coverageId}-${this.version}`}async fetchRawTile(e,t,n,i={}){if(this.isBlockOutside(e,t,n))return null;const{nativePixelSize:s,spatialReference:r}=this.rasterInfo,a=2**e,l=s.x*a,u=s.y*a,{blockWidth:c,blockHeight:p}=this.getBlockWidthHeight(e),{origin:d}=this.rasterInfo.storageInfo.tileInfo,f=this.getTileExtent({x:l,y:u},t,n,d,r,[c,p]),m=this.rasterInfo.extent,h=f.xmax>m.xmax,g=f.ymin<m.ymin,v=h||g;let y=f,w=c,x=p;if(v&&(y=f.clone().intersection(m),null!=y&&(h&&(w=Math.floor((y.xmax-y.xmin)/l),y.xmax=y.xmin+l*w),g&&(x=Math.floor((y.ymax-y.ymin)/u),y.ymin=y.ymax-u*x))),null==y||w<=1||x<=1)return null;const b=await this._getCoverage(y,w,x,a,i);if(!b)return null;const{coverageDescription:I}=this.coverageInfo,{noDataValue:C,multidimensionalInfo:S}=this.rasterInfo,{multidimensionalDefinition:A}=i;let M;if(null!=S&&null!=A&&A.length){const e=A[0].variableName;if("2.0"===I.version){const t=I.rangeType[0].find(t=>t.name===e);M=t?.nilValue}else if("1.1"===I.version){const t=I.range.find(t=>t.identifier===e);M=t?.nullValues}}const R=M??C,D=await this.decodePixelBlock(b,{width:w,height:x,planes:null,pixelType:null,tiffNoDataValue:Array.isArray(R)?R[0]:R,matchAllNoData:!0});if(null==D)return null;if(D&&(D.width!==w||D.height!==x))throw new o.A("wcsraster-fetch",`the response has unexpected dimension width: ${D.width}, height: {pixelBlock.height}`);return v?(0,he.$Q)(D,{x:0,y:0},{width:p,height:p}):D}async _open(e){const{customFetchParameters:t}=this.ioConfig,n=e?.signal,i=await async function(e,t){const{version:n,customParameters:i,signal:s}=t??{},r=n?.startsWith("1.0")?"version":"acceptVersions",a={service:"WCS",request:"GetCapabilities",[r]:n,...i};try{let{data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s});return t?.version||function(e){let t=null;t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;const n=t.documentElement.getAttribute("version"),i=n?.slice(0,3);return null!=i&&i<"2.1"}(n)||(a[r]="2.0.1",({data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s}))),G(n)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs capabilities is not valid or supported");throw e}}(this.url,{version:t?.version??this.version,customParameters:t,signal:n});if(this.capabilities=i,!this.version){let e=i.version.slice(0,3);"2.0"===e||"1.1"===e||"1.0"===e?this.version=i.version:(e=i.supportedVersions.find(e=>"2.0.1"===e)||i.supportedVersions.find(e=>e.startsWith("2.0"))||i.supportedVersions.find(e=>e.startsWith("1.1"))||i.supportedVersions.find(e=>e.startsWith("1.0"))||"1.0.0",this.version=e)}const{version:s}=this;if(!we.has(s))throw new o.A("wcsraster-open",`unsupported WCS version ${s}`);const{gridCoverages:r}=i;if(!r.length)throw new o.A("wcsraster-open","cannot find rectified grid coverages");this.coverageId??=r[0].id;const{coverageId:a}=this,u=r.find(e=>e.id===a);if(null==u)throw new o.A("wcsraster-open",`the coverageId ${a} does not exist in capabilities`);const c=await ue(this.url,{coverageIds:[a],version:s,customParameters:t,signal:n});if(this.coverageInfo=c[0],s.startsWith("2.0")){const{coverageInfo:e}=this;e.lonLatEnvelope=u.lonLatEnvelope,e.supportedInterpolations=z(i.supportedInterpolations),this._patchDimensionValues201(a,n)}this.datasetName=this.coverageInfo.title;const{rasterInfo:p}=this.coverageInfo;if(this.createRemoteDatasetStorageInfo(p,512,512),this._set("rasterInfo",p),null==p.spatialReference)throw new o.A("wcsraster-open",`coverage without spatial reference is not supported: ${a}`);const{pixelType:d,bandCount:f}=await this._getPixelTypeAndBandCount(n);p.pixelType=d,1===p.bandCount&&f>1&&(p.bandCount=f),this.updateTileInfo()}async _patchDimensionValues201(e,t){const{coverageInfo:n}=this,i=n.rasterInfo.multidimensionalInfo?.variables,s=we.has("1.1.2")?"1.1.2":we.has("1.1.1")?"1.1.1":we.has("1.1.0")?"1.1.0":null,{customFetchParameters:r}=this.ioConfig;if(i&&s)try{const n=this.url.includes("/ImageServer/"),o=e.length>8&&e.startsWith("Coverage")&&n?e.slice(8):e,a=await ue(this.url,{coverageIds:[o??e],version:s,customParameters:r,signal:t}).catch(()=>{if(o)return ue(this.url,{coverageIds:[e],version:s,customParameters:r,signal:t})}),l=a?.[0].rasterInfo.multidimensionalInfo?.variables;if(l)for(const e of i){const t=l.find(({name:t})=>t===e.name);if(t?.dimensions?.length)for(let i=e.dimensions.length-1;i>=0;i--){const s=e.dimensions[i],r=t.dimensions.find(({name:e})=>e===s.name);r?r.values&&r.extent?.join(",")===s.extent?.join(",")&&(e.dimensions[i]={...s,values:r.values}):n&&e.dimensions.splice(i,1)}}}catch{}}async _getPixelTypeAndBandCount(e){const{pixelSize:t,extent:n,multidimensionalInfo:i}=this.rasterInfo,s=n.center,r=new L.A({xmin:s.x-t.x,xmax:s.x+t.x,ymin:s.y-t.y,ymax:s.y+t.y,spatialReference:n.spatialReference});let a=[];if(null!=i){const e=i.variables[0];a=[],e.dimensions.forEach(t=>{a.push(new ce.A({variableName:e.name,dimensionName:t.name,values:t.hasRegularIntervals?t.extent?.[0]:t.values?.[0],isSlice:!0}))})}const{coverageDescription:l}=this.coverageInfo,u={interpolation:"nearest",multidimensionalDefinition:a,signal:e},{version:c}=l,{ioConfig:d}=this,f="2.0"===c&&null==d.allowAnyMediaType||"1.1"===c&&null==d.use2GridOffsets;let m;try{m=await this._getCoverage(r,2,2,1,u,!0)}catch(e){if(!f)throw e;if("1.1"===c){if(!e.details?.isResolutionMismatch)throw e;d.use2GridOffsets=!0}}if(!m&&f&&("2.0"===c&&(d.allowAnyMediaType=!0),m=await this._getCoverage(r,2,2,1,u),m&&p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),!m)throw new o.A("wcsraster-open","unable to determine pixel type");const h=await this.decodePixelBlock(m,{width:2,height:2,planes:null,pixelType:null});if(null==h)throw new o.A("wcsraster-open","unable to determine pixel type");return{pixelType:h.pixelType,bandCount:h.getPlaneCount()??0}}async _getCoverage(e,t,n,i,s,r=!1){const{coverageDescription:a}=this.coverageInfo,{version:l}=a,u="2.0"===l?this._getCoverage201Parameters(e,t,n,i,s,a):"1.1"===l?this._getCoverage110Parameters(e,t,n,s,a):this._getCoverage100Parameters(e,t,n,s),c="2.0"===l?await this.request(this._constructWCS201Url(u),{signal:s.signal,responseType:"array-buffer"}):await this.request(this.url,{query:u,signal:s.signal,responseType:"array-buffer"});if("1.0"===l)return c.data;if("2.0"===l&&!1!==this.ioConfig.allowAnyMediaType&&"tiff"===(0,me.g)(c.data))return r&&(this.ioConfig.allowAnyMediaType=!0,p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),c.data;const d=function(e){const t=function(e){const t=e.getHeader?.("Content-Type")?.split(";");if(!t)return null;if(!(t[0].trim()??"").startsWith("multipart/"))return null;const n={boundary:"",start:"",type:""};for(let e=1;e<t.length;e++){const i=t[e].indexOf("=");if(i>0){const s=t[e].slice(0,i).trim(),r=t[e].slice(i+1).trim();n[s]=r.startsWith('"')?r.slice(1,-1):r}}return n}(e);return t?{isMultipart:!0,data:t.boundary?de(e.data,t,0):null}:{isMultipart:!1,data:null}}(c);if(d.isMultipart&&d.data){const e=d.data.find(e=>e.isValidImage);return r&&"base64"===e?.contentTransferEncoding&&p.A.getLogger(this).warn("wcsraster:getcoverage","response is base64 encoded which may impact layer display performance"),e?.contentData}const f=new Uint8Array(c.data,0,Math.min(c.data.byteLength,2e3)),m=String.fromCharCode.apply(null,f).toLowerCase().includes("exception"),h=m&&String.fromCharCode.apply(null,f).includes("A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided");if(m)throw new o.A("wcsraster:getcoverage","server returns an exception",{isResolutionMismatch:h});throw new o.A("wcsraster:getcoverage","response is not a supported multipart mediaType with inline tiff")}_getInterpolationIndex(e){return e&&this.coverageInfo.supportedInterpolations?.includes(e)?"nearest"===e?0:"bilinear"===e?1:"cubic"===e?2:0:0}_getCoverage100Parameters(e,t,n,i){const s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`,r=e.spatialReference.wkid,o=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"GEOTIFF",{bandIds:a,interpolation:l}=i,u=this._getInterpolationIndex(l),c=a?a.map(e=>this.coverageInfo.bandNames[e]):null,p=ge[u],{multidimensionalDefinition:d}=i;let f;if(null!=d&&null!=this.rasterInfo.multidimensionalInfo){const e=d.find(e=>"StdTime"===e.dimensionName);let t=e?.values;t&&t.length>0&&(Array.isArray(t[0])&&(t=t[0]),f=t.map(e=>be(e)).join(","))}return{service:"WCS",request:"GetCoverage",version:this.version,coverage:this.coverageId,format:o,crs:`EPSG:${r}`,bbox:s,width:t,height:n,time:f,interpolation:p,band:c?.join(",")}}_getCoverage110Parameters(e,t,n,i,s){const{multidimensionalDefinition:r,bandIds:o,interpolation:a}=i,l=e.spatialReference.wkid,u=`urn:ogc:def:crs:EPSG::${l}`,c=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",p=this._getInterpolationIndex(a),d=ve[p],f=null==a||0===this.coverageInfo.supportedInterpolations?.indexOf(a),m=s.domain.spatialDomain,h=m.origin.x<=m.envelope.xmin&&m.origin.y<=m.envelope.ymin,g=e.width/t,v=e.height/n*(h?1:-1),y=h?[e.xmin,e.ymin]:[e.xmin,e.ymax],w=m.useEPSGAxis&&(0,k.m)(l),x=w?`${y[1]},${y[0]}`:`${y[0]},${y[1]}`,b=this.ioConfig.use2GridOffsets,I=w?b?`${v},${g}`:`${v},0,0,${g}`:b?`${g},${v}`:`${g},0,0,${v}`,C=g/2,S=e.xmin+C,A=e.xmax-C,M=Math.abs(v)/2,R=e.ymin+M,D=e.ymax-M,T=w?`${R},${S},${D},${A},${u}`:`${S},${R},${A},${D},${u}`,P=s.range.find(e=>e.axis.some(e=>e.identifier.toLowerCase().includes("band")));let L,N=P&&d&&o?f?`${P.identifier}[${P.axis[0].identifier}[${o.join(",")}]]`:`${P.identifier}:${d}[${P.axis[0].identifier}[${o.join(",")}]]`:null;if(null!=r&&r.length)for(let e=0;e<r.length;e++){let t=r[e].values;const n=r[e].dimensionName?.toLowerCase(),i=r[e].variableName?.toLowerCase(),o=s.range.find(e=>e.identifier.toLowerCase()===i);if(t.length>0)if(Array.isArray(t[0])&&(t=t[0]),"stdtime"===n)L=t.map(e=>be(e)).join(",");else if(o){const e=o.axis.find(e=>e.identifier.toLowerCase()===n);e&&(N=f?o.identifier+"["+e.identifier+"["+t.join(",")+"]]":o.identifier+":"+d+"["+e.identifier+"["+t.join(",")+"]]")}e===r.length-1&&o&&!N&&(N=f?o.identifier:o.identifier+":"+d)}return{service:"WCS",request:"GetCoverage",version:this.version,identifier:this.coverageId,format:c,crs:`EPSG:${l}`,boundingbox:T,gridCS:"urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS",gridType:"urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs",gridOrigin:x,gridOffsets:I,gridBaseCRS:u,timeSequence:L,rangeSubset:N}}_getCoverage201Parameters(e,t,n,i,s,r){const{multidimensionalDefinition:o,interpolation:a}=s,l=this._getInterpolationIndex(a);let u=null;const{supportedInterpolations:c}=this.capabilities;if(c?.length)switch(l){case 0:u=c.find(e=>e.toLowerCase().includes("nearest"));break;case 1:u=c.find(e=>e.toLowerCase().includes("linear"));break;case 2:u=c.find(e=>e.toLowerCase().includes("cubic")||e.toLowerCase().includes("quadratic"))}const p=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",{bandNames:d}=this.coverageInfo,{boundedBy:f,domainSet:m,rangeType:h}=r,g=f.isEastFirst?0:1,v=1-g,{axisLabels:y}=f,w=y[g],x=y[v],b=`http://www.opengis.net/def/crs/EPSG/0/${e.spatialReference.wkid}`,I=b,C=[];C.push(`${w}(${e.xmin},${e.xmax})`),C.push(`${x}(${e.ymin},${e.ymax})`);const S=[];if(y.length>2)for(let e=2;e<y.length;e++){const t=m.origin[e];if(y[e].toLowerCase().includes("time")){let n=t.toString();f.uomLabels?.[e].toLowerCase().includes("ole")&&(S.push(y[e]),n=be(t,!0)),C.push(y[e]+",http://www.opengis.net("+n+")")}else C.push(y[e]+",http://www.opengis.net("+t+")")}let A=null;if(null!=o&&o.length){const e=[];h.forEach(t=>t.forEach(t=>e.push(t.name)));const t=[];for(let n=0;n<o.length;n++){const i=y.find(e=>e===o[n].dimensionName),s=e.find(e=>e===o[n].variableName);if(t.includes(s)||t.push(s),i){let e=o[n].values;if(e.length>0){Array.isArray(e[0])&&(e=e[0]);let t="";t=i.toLowerCase().includes("time")?e.map(e=>be(e)).join(","):e.join(",");const n=C.findIndex(e=>e.startsWith(i+",http://www.opengis.net"));-1===n&&C.push(i+",http://www.opengis.net("+t+")"),-1===n||C[n].includes("("+t+")")||C.splice(n,1,i+",http://www.opengis.net("+t+")")}}}t.length&&(A=t.join(","))}else d?.length>=2&&(A=(s.bandIds?s.bandIds.map(e=>d[e]):d).join(","));const M=C.join("&subset="),R=!r.domainSet.hasSameAxisLabelsAsBoundedBy&&!1!==this.ioConfig.allowScaleFactor,D=R?null:`${w}(${t}),${x}(${n})`,T=R?1/i:null;return{service:"WCS",request:"GetCoverage",version:this.version,coverageId:this.coverageId,rangesubset:A,interpolation:u,scaleSize:D,scaleFactor:T,subset:M,format:p,mediaType:this.ioConfig.allowAnyMediaType?null:"multipart/related",outputcrs:b,subsettingcrs:I}}_constructWCS201Url(e){const t={...this.ioConfig.customFetchParameters,...e},n=[];return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&("subset"===e?"string"==typeof i&&i.split("&subset=").forEach(e=>{e&&n.push(`subset=${encodeURIComponent(e)}`)}):n.push(`${e}=${encodeURIComponent(i)}`))}),`${encodeURI(this.url)}?${n.join("&")}`}};function be(e,t=!1){return(t?new Date((0,W.$E)(e)):new Date(e)).toISOString()}(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"datasetFormat",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"tileType",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"rasterId",null),xe=(0,i.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.WCSRaster")],xe);var Ie=n(30291);const Ce=new Set(["milliseconds","seconds","minutes","hours","days","weeks","months","years","decades","centuries"]);let Se=class extends((0,w.dM)((0,M.j)((0,I.q)((0,C.A)((0,x.d)((0,b.o)((0,S.G)((0,R.e)((0,A.J)((0,a.P)((0,r.OU)(y.A)))))))))))){constructor(...e){super(...e),this.coverageId=null,this.version=null,this.isReference=null,this.graphicOrigin=new v(this),this.legendEnabled=!0,this.noData=0,this.operationalLayerType="WCS",this.type="wcs",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:s,saveAs:r}=await n.e(9838).then(n.bind(n,59838));switch(e){case 0:return s(this,t);case 1:return r(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WCS"]},e).catch(l.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}get renderer(){return super.renderer}set renderer(e){super.renderer=e}get coverageInfo(){return this.raster.coverageInfo}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,P.rZ)("Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.multidimensionalInfo;if(n){const t=(0,P.AL)(n);e.push(...t)}return e}createPopupTemplate(e){return(0,Ie.tn)({fields:this.rasterFields,title:this.title},e)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _openRaster(e){const t=new xe({url:this.url,version:this.version,coverageId:this.coverageId,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters}});if(await t.open({signal:e}),!t.rasterInfo)throw t.destroy(),new o.A("wcs-layer:load","cannot load resources on "+this.url);const{rasterInfo:n}=t;null==n.noDataValue&&(n.noDataValue=this.noData),this._set("serviceRasterInfo",n),this._set("spatialReference",n.spatialReference),null==this.title&&this.setAtOrigin("title",t.datasetName,"service"),null==this.coverageId&&this.setAtOrigin("coverageId",t.coverageInfo.id,"service"),null==this.version&&t.version&&this.setAtOrigin("version",t.version,"service"),this.setAtOrigin("tileInfo",t.rasterInfo.storageInfo.tileInfo,"service");const{multidimensionalInfo:i}=n;if(null!=i){const e=i.variables[0].dimensions.find(({name:e})=>"StdTime"===e);if(e){let t=e.extent?.[0]??e.values[0];Array.isArray(t)&&(t=t[0]);let n=e.extent?.[1]??e.values[e.values.length-1];Array.isArray(n)&&(n=n[1]);const i=Ce.has(e.intervalUnit?.toLowerCase())?e.intervalUnit?.toLowerCase():null;this.set("timeInfo",{startField:"StdTime",fullTimeExtent:{start:t,end:n},timeZone:null,interval:i?{value:e.interval,unit:i}:null})}}this.raster=t,this._configDefaultSettings(),this.addHandles((0,u.wB)(()=>this.customParameters,e=>this.raster.ioConfig.customFetchParameters=e))}};(0,i.Cg)([(0,c.MZ)({type:String,nonNullable:!0,json:{name:"wcsInfo.coverageId",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"coverageInfo",null),(0,i.Cg)([(0,c.MZ)({type:["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"],nonNullable:!0,json:{name:"wcsInfo.version",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Se.prototype,"isReference",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],Se.prototype,"blendMode",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],Se.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,c.MZ)(D.fV)],Se.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],Se.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"noData",void 0),(0,i.Cg)([(0,c.MZ)({type:["WCS"]})],Se.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"raster",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)(D.M6)],Se.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Se.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"fields",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"rasterFields",null),Se=(0,i.Cg)([(0,d.$)("esri.layers.WCSLayer")],Se);const Ae=Se},98988:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>z,getTransformation:()=>G,getTransformations:()=>X,initializeProjection:()=>H,isEqualBaseGCS:()=>U,isLoaded:()=>L,isLoadedOrLoad:()=>k,isLoadedOrLoadFor:()=>N,load:()=>V,project:()=>E,projectExtent:()=>re,projectMany:()=>$,projectMultipoint:()=>J,projectOrLoad:()=>_,projectOrLoadMany:()=>j,projectPoint:()=>Y,projectPolygon:()=>ie,projectPolyline:()=>te,projectWithZConversion:()=>Z,projectWithoutEngine:()=>K,requiresLoad:()=>O,test:()=>q,tryProjectWithZConversion:()=>B,unload:()=>W});var i=n(49186),s=n(74887),r=n(62788),o=n(95488),a=n(51850),l=n(21276),u=n(73941),c=n(5443),p=n(48526),d=n(83290),f=n(86738),m=n(39829),h=n(82799),g=n(16930),v=n(9762),y=n(37539);function w(e,t,n,i,s,r){return x[0]=e,x[1]=t,x[2]=n,(0,v.projectBuffer)(x,i,0,s,r,0)}const x=(0,a.vt)();let b=0;class I{static fromGE(e){const t=new I;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=b++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=b++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=b++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=b++}getInverse(){const e=new I;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class C{static cacheKey(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}static fromGE(e){const t=new C;let n="";for(const i of e.steps){const e=I.fromGE(i);t.steps.push(e),n+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=n,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof I?this.steps.push(t):this.steps.push(new I({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new C;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,n){this._cachedProjection[C.cacheKey(e,t)]=n}getCachedGeTransformation(e,t){let n="";for(const e of this.steps)n+=e.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const i=this._cachedProjection[C.cacheKey(e,t)];return void 0===i?null:i}}var S=n(21325),A=n(62815);let M=null,R=null,D=null,T={};const P=new o.I;function L(){return!!M&&(0,d.i)()}function k(){return!!L()||((0,r.gc)(P),V(),!1)}function N(e,t){return!e||!t||z(e,t)||k()}function O(e,t){return!z(e,t)&&!L()}function V(e){return null==D&&(D=Promise.all([(0,d.l)(),n.e(9930).then(n.bind(n,49930)).then(e=>e.g),n.e(2731).then(n.bind(n,12731))])),D.then(([,t,{hydratedAdapter:n}])=>{(0,s.Te)(e),R=n,M=t.default,M._enableProjection(d.p),P.notify()})}function E(e,t,n=null,i=null){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),$(R,e,e[0].spatialReference,t,n,i)):((0,l.f)(e),$(R,[e],e.spatialReference,t,n,i)[0])}function $(e,t,n,i,s=null,r=null){if(null==n||null==i)return t;if(z(n,i,s))return t.map(e=>K(e,n,i));if(null==s&&(0,u.jA)(n))return t.map(e=>K(e,n,g.A.WGS84)).map(e=>B(e,i));if(null==s&&(0,u.jA)(i))return t.map(e=>B(e,g.A.WGS84)).map(e=>K(e,g.A.WGS84,i));if(null==s){const e=C.cacheKey(n,i);void 0!==T[e]?s=T[e]:(null==(s=G(n,i,void 0))&&(s=new C),T[e]=s)}if(null==M||null==e)throw new F;return null!=r?M._project(e,t,n,i,s,r):M._project(e,t,n,i,s)}function _(e,t){const n=j([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function j(e,t){if(!L())for(const n of e)if(null!=n&&!(0,S.aI)(n.spatialReference,t)&&(0,S.fn)(n.spatialReference)&&(0,S.fn)(t)&&!z(n.spatialReference,t))return(0,r.gc)(P),{pending:V(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,S.aI)(e.spatialReference,t)?e:(0,S.fn)(e.spatialReference)&&(0,S.fn)(t)?B(e,t):null)}}function G(e,t,n=null){if(null==e||null==t)return null;if(null==M||null==R)throw new F;const i=M._getTransformation(R,e,t,n,n?.spatialReference);return null!==i?C.fromGE(i):null}function X(e,t,n=null){if(null==M||null==R)throw new F;const i=M._getTransformationBySuitability(R,e,t,n,n?.spatialReference);if(null!==i){const e=[];for(const t of i)e.push(C.fromGE(t));return e}return[]}class F extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function W(){M=null,R=null,D=null,T={}}const q={get loadPromise(){return D}};function B(e,t){try{const n=E(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const i=(0,A.N)(n.type,e.spatialReference,t);return null!=i&&i(n),n}catch(e){if(!(e instanceof F))throw e;return null}}async function Z(e,t,n){const i=e.spatialReference;return null!=i&&null!=t&&await H(i,t,null,n),B(e,t)}function z(e,t,n){return!n&&(!!(0,S.aI)(e,t)||(0,S.fn)(e)&&(0,S.fn)(t)&&!!(0,y.jd)(e,t))}function U(e,t){if((0,S.aI)(e,t))return!0;if(!(0,S.fn)(e)||!(0,S.fn)(t))return!1;const n=(0,S.oT)(e)||(0,S.K8)(e)||(0,S.x1)(e),i=(0,S.oT)(t)||(0,S.K8)(t)||(0,S.x1)(t);return n&&i}async function H(e,t,n,i){if(L())return(0,s.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,geographicTransformation:s}of e)if(t&&n&&!z(t,n,s))return V(i)}else if(e&&t&&!z(e,t,n))return V(i);return(0,s.NO)(i)}function K(e,t,n){return e?"x"in e?Q(e,t,new f.A,n,0):"xmin"in e?oe(e,t,new c.A,n,0):"rings"in e?se(e,t,new m.A,n,0):"paths"in e?ne(e,t,new h.A,n,0):"points"in e?ee(e,t,new p.A,n,0):null:null}function Y(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=Q(e,e.spatialReference,t,n,i)}function Q(e,t,n,i,s){le[0]=e.x,le[1]=e.y;const r=e.z;return le[2]=void 0!==r?r:s,(0,v.projectBuffer)(le,t,0,le,i,0)?(n.x=le[0],n.y=le[1],n.spatialReference=i,void 0!==r||(0,u.xP)(i)?(n.z=le[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function J(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ee(e,e.spatialReference,t,n,i)}function ee(e,t,n,i,s){const{points:r,hasZ:o,hasM:a}=e,l=[],c=r.length,p=[];for(const e of r)p.push(e[0],e[1],o?e[2]:s);if(!(0,v.projectBuffer)(p,t,0,p,i,0,c))return null;const d=o||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,n=p[t],i=p[t+1];d&&a?l.push([n,i,p[t+2],r[e][3]]):d?l.push([n,i,p[t+2]]):a?l.push([n,i,r[e][2]]):l.push([n,i])}return n.points=l,n.spatialReference=i,n.hasZ=o,n.hasM=a,n}function te(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ne(e,e.spatialReference,t,n,i)}function ne(e,t,n,i,s){const{paths:r,hasZ:o,hasM:a}=e,l=[];if(!ae(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.paths=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ie(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=se(e,e.spatialReference,t,n,i)}function se(e,t,n,i,s){const{rings:r,hasZ:o,hasM:a}=e,l=[];if(!ae(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.rings=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function re(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=oe(e,e.spatialReference,t,n,i)}function oe(e,t,n,i,s){const{xmin:r,ymin:o,xmax:a,ymax:l,hasZ:c,hasM:p}=e;if(!w(r,o,c?e.zmin:s,t,le,i))return null;const d=c||(0,u.xP)(i);return n.xmin=le[0],n.ymin=le[1],d&&(n.zmin=le[2]),w(a,l,c?e.zmax:s,t,le,i)?(n.xmax=le[0],n.ymax=le[1],d&&(n.zmax=le[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function ae(e,t,n,i,s,r,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,v.projectBuffer)(a,i,0,a,r,0))return!1;let l=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const i of t)c&&n?e.push([a[l++],a[l++],a[l++],i[3]]):c?e.push([a[l++],a[l++],a[l++]]):n?(e.push([a[l++],a[l++],i[2]]),l++):(e.push([a[l++],a[l++]]),l++);s.push(e)}return!0}const le=(0,a.vt)()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[873],{8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(31635),s=i(92602),n=i(70333),l=i(78888),o=i(60999),a=i(49186),d=i(53966),u=i(97768),p=i(74887),c=i(84952),h=i(10107),g=(i(44208),i(87811),i(36005)),y=i(40608),f=i(43937),m=i(77548),v=i(20655),w=i(80812),C=i(41318),b=i(10407);const S=e=>{const t=e;let S=class extends t{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 w.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,p.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,p.zf)(e)||d.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,p.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,p.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 l,o;if(s)l=i.portal.url;else try{l=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!l||!(0,c.b8)(l,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,d=!1,u=!1;if(!o)return{features:{edit:a,fullEdit:d},content:{updateItem:u}};try{if(s?await i.reload():(i=new w.default({id:e,portal:{url:l}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:d},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,p.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=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.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=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const a=`${r}/community/self`,d=null!=e?e.signal:null,u=await(0,o.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?C.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||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.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.Cg)([(0,h.MZ)({type:w.default})],S.prototype,"portalItem",null),(0,r.Cg)([(0,g.w)("web-document","portalItem",["itemId"])],S.prototype,"readPortalItem",null),(0,r.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],S.prototype,"writePortalItem",null),(0,r.Cg)([(0,h.MZ)({clonable:!1})],S.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasUpdateItemPrivileges",void 0),S=(0,r.Cg)([(0,y.$)("esri.layers.mixins.PortalLayer")],S),S},I={credential:null,user:null}},10407:(e,t,i)=>{i.d(t,{It:()=>h,LG:()=>l,OM:()=>d,Sm:()=>u,Y:()=>o,bK:()=>a,mm:()=>c,sQ:()=>p});var r=i(98988),s=i(16930),n=i(28735);function l(e,t){if(!o(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return o(e,c.HOSTED_SERVICE)}function d(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?l(e,t):d(e,t)}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const c={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),l=!!i&&!!s?.includes("features:user:fullEdit");const o="update"===r||"admin"===r;return o?l=n=!0:l&&(n=!0),{features:{edit:n,fullEdit:l},content:{updateItem:o}}}},17036:(e,t,i)=>{i.d(t,{p:()=>a});var r=i(44208),s=i(53966),n=i(20437),l=i(95466),o=i(30524);function a(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,r.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return l.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,o.DB)(this.fieldsIndex,e)}}}}},18768:(e,t,i)=>{i.d(t,{b:()=>a});var r=i(31635),s=i(53966),n=i(10107),l=(i(44208),i(87811),i(40608)),o=i(60694);const a=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.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,o.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,l.$)("esri.layers.mixins.ArcGISService")],i),i}},25036:(e,t,i)=>{i.d(t,{j:()=>l});var r=i(31635),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const l=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const i=this._get("effectiveScaleRange");return i&&i.minScale===e.minScale&&i.maxScale===e.maxScale?i:e}};return(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],i.prototype,"minScale",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"effectiveScaleRange",null),i=(0,r.Cg)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],i),i}},30291:(e,t,i)=>{i.d(t,{tn:()=>d});var r=i(37838),s=i(30524),n=i(41227),l=i(89893),o=i(66159),a=i(68780);function d({displayField:e,editFieldsInfo:t,fields:i,objectIdField:a,title:d},h){if(!i)return null;const y=function(e,t){const i=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:i}){const r=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===r&&(e=e.slice()),!0!==i&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||g,sortDisabled:t?.sortDisabled}).map(t=>new n.A({fieldName:t.name,isEditable:(0,s.R$)(t,e),label:t.alias,format:c(t),visible:u(t,{...e,visibleFieldNames:i})}))}({editFieldsInfo:t,fields:i,objectIdField:a},h);if(!y.length)return null;const f=function(e){const t=(0,s.mB)(e),{titleBase:i}=e;return t?`${i}: {${t.trim()}}`:i??""}({titleBase:d,fields:i,displayField:e}),m=[new o.A,new l.A];return new r.A({title:f,content:m,fieldInfos:y})}const u=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,s.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.A({digitSeparator:!0,places:0});case"double":return new a.A({digitSeparator:!0,places:2});case"string":return(0,s.JL)(e.name)?new a.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const g=["geometry","blob","raster","guid","xml"]},54239:(e,t,i)=>{i.d(t,{A:()=>m});var r,s=i(31635),n=i(4576),l=i(66552),o=i(25482),a=i(83047),d=i(67076),u=i(10107),p=(i(44208),i(53966),i(36005)),c=i(40608),h=i(43937);const g=(0,l.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=g.jsonValues.slice();(0,n.Xy)(y,"orthometric");const f=(0,l.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 m=r=class extends o.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return g.write(e,t,i)}readHeightModel(e,t,i){return g.read(e)||(i?.messages&&i.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,a.LA)(e)||f.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,a.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 v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=r=(0,s.Cg)([(0,c.$)("esri.geometry.HeightModelInfo")],m)},60999:(e,t,i)=>{i.d(t,{DZ:()=>g,Ke:()=>h,Tj:()=>u,UT:()=>y,jJ:()=>d});var r=i(31635),s=i(65008),n=i(97768),l=i(74887),o=i(10107),a=i(40608);function d(e,t,i){return(0,l.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,l.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return c(e)}}async function g(e){try{return p(await e)}catch(e){return(0,l.QP)(e),c(e)}}function y(e,t){return new f(e,t)}let f=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=p(e),this._cleanup()},e=>{this._result=c(e),this._cleanup()}),this._abortHandle=(0,l.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,o.MZ)()],f.prototype,"value",null),(0,r.Cg)([(0,o.MZ)()],f.prototype,"error",null),(0,r.Cg)([(0,o.MZ)()],f.prototype,"finished",null),(0,r.Cg)([(0,o.MZ)()],f.prototype,"promise",void 0),(0,r.Cg)([(0,o.MZ)()],f.prototype,"_result",void 0),f=(0,r.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],f)},69208:(e,t,i)=>{i.d(t,{d:()=>l});var r=i(31635),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const l=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,r.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,r.Cg)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],i),i}},73179:(e,t,i)=>{i.d(t,{b:()=>a,h:()=>d});var r=i(4718),s=i(53966),n=i(84952),l=i(60694),o=i(10873);function a(e){const{nonStandardUrlAllowed:t=!1,separator:i}=e??{},n=(0,r.o8)(o.OZ),a=n.json?.write;return"object"==typeof a&&a&&(a.writer=function(e,t,r,s){(0,l.LS)(this,e,i,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);const i=(0,l.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",i.url),null!=i.layerId&&this._set("layerId",i.layerId)}}}function d(e,t){const{separator:i}=t??{},r=(0,n.An)(e.url);return null!=r&&(null!=e.dynamicDataSource?r.path=(0,n.fj)(r.path,"dynamicLayer"):null!=e.layerId&&(r.path=(0,n.fj)(r.path,i??"",e.layerId.toString()))),r}},77885:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ae});var r=i(31635),s=i(37838),n=i(78888),l=i(69540),o=i(49186),a=i(4718),d=i(53966),u=i(92071),p=i(93637),c=i(74887),h=i(84952),g=i(10107),y=(i(44208),i(36005)),f=i(40608),m=i(43937),v=i(60950),w=i(89808),C=i(99959);const b=Symbol("isPointCloudGraphicOrigin");var S;class I extends C.A{get[(S=b,v.ym)](){return this.layer}get[w.Q](){return this.layer}constructor(e){super(),this[S]=!0,this.type="point-cloud",this.layer=e}get id(){return this.layer.id}}var F=i(4146),_=i(52136),M=i(18768),A=i(69208),P=i(16131),R=i(8303),T=i(25036),x=i(58947),Z=i(56507),E=i(93223),L=i(25482);i(87811);let O=class extends L.o{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,r.Cg)([(0,g.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],O.prototype,"field",void 0),(0,r.Cg)([(0,g.MZ)({readOnly:!0,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],O.prototype,"type",void 0),O=(0,r.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudFilter")],O);const U=O;var j;let N=j=class extends U{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new j({field:this.field,requiredClearBits:(0,a.o8)(this.requiredClearBits),requiredSetBits:(0,a.o8)(this.requiredSetBits)})}};(0,r.Cg)([(0,g.MZ)({type:[Z.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],N.prototype,"requiredClearBits",void 0),(0,r.Cg)([(0,g.MZ)({type:[Z.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],N.prototype,"requiredSetBits",void 0),(0,r.Cg)([(0,E.e)({pointCloudBitfieldFilter:"bitfield"})],N.prototype,"type",void 0),N=j=(0,r.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],N);const $=N;var B;let k=B=class extends U{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new B({field:this.field,includedReturns:(0,a.o8)(this.includedReturns)})}};(0,r.Cg)([(0,g.MZ)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],k.prototype,"includedReturns",void 0),(0,r.Cg)([(0,E.e)({pointCloudReturnFilter:"return"})],k.prototype,"type",void 0),k=B=(0,r.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],k);const q=k;var H;let D=H=class extends U{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new H({field:this.field,mode:this.mode,values:(0,a.o8)(this.values)})}};(0,r.Cg)([(0,g.MZ)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],D.prototype,"mode",void 0),(0,r.Cg)([(0,E.e)({pointCloudValueFilter:"value"})],D.prototype,"type",void 0),(0,r.Cg)([(0,g.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],D.prototype,"values",void 0),D=H=(0,r.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudValueFilter")],D);const G={key:"type",base:U,typeMap:{value:D,bitfield:$,return:q}};var V,z=i(10873),K=i(20437),Q=i(17036),Y=i(93705),J=i(63531),X=i(51857);let W=V=class extends X.A{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new V({...this.cloneProperties(),field:(0,a.o8)(this.field)})}};(0,r.Cg)([(0,E.e)({pointCloudRGBRenderer:"point-cloud-rgb"})],W.prototype,"type",void 0),(0,r.Cg)([(0,g.MZ)({type:String,json:{write:{isRequired:!0}}})],W.prototype,"field",void 0),W=V=(0,r.Cg)([(0,f.$)("esri.renderers.PointCloudRGBRenderer")],W);const ee=W;var te=i(69846),ie=i(48425);const re={key:"type",base:X.A,typeMap:{"point-cloud-class-breaks":J.A,"point-cloud-rgb":ee,"point-cloud-stretch":te.A,"point-cloud-unique-value":ie.A},errorContext:"renderer"};var se=i(24212),ne=i(30291);const le=(0,Q.p)();let oe=class extends((0,x.w)((0,M.b)((0,P.q)((0,R.A)((0,T.j)((0,u.P)((0,A.d)((0,_.p)((0,l.OU)(F.A)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new I(this)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t?.domain?t.domain:null}readServiceFields(e,t,i){return Array.isArray(e)?e.map(e=>{const t=new K.A;return"FieldTypeInteger"===e.type&&((e=(0,a.o8)(e)).type="esriFieldTypeInteger"),t.read(e,i),t}):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map(e=>new K.A({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,t,i,r){(0,p.sM)("layerDefinition.drawingInfo.renderer",e.write({},r),t)}load(e){const t=null!=e?e.signal:null,i=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP).then(()=>this._fetchService(t));return this.addResolvingPromise(i),Promise.resolve(this)}createPopupTemplate(e){const t=(0,ne.tn)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const i=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!i)return;const r=new Y.A({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],r],i.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const i=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!i)return;const r=new Y.A({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],r],i.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new o.A("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const i=this.fieldsIndex.get(e);if(!i)throw new o.A("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.attributeStorageInfo)if(e.name===i.name){const i=(0,h.fj)(this.parsedUrl?.path??"",`./statistics/${e.key}`);return(0,n.A)(i,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then(e=>e.data)}throw new o.A("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new o.A("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new o.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(t=>t.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){(0,se.XF)(d.A.getLogger(this),(0,se.B)("Point cloud layers","absolute-height",e)),(0,se.XF)(d.A.getLogger(this),(0,se.tW)("Point cloud layers",e))}};(0,r.Cg)([(0,g.MZ)({type:["PointCloudLayer"]})],oe.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,g.MZ)(z.M6)],oe.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,g.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],oe.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],oe.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,g.MZ)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],oe.prototype,"opacity",void 0),(0,r.Cg)([(0,g.MZ)({type:["show","hide"]})],oe.prototype,"listMode",void 0),(0,r.Cg)([(0,g.MZ)({types:[G],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],oe.prototype,"filters",void 0),(0,r.Cg)([(0,g.MZ)({type:[K.A]})],oe.prototype,"fields",void 0),(0,r.Cg)([(0,g.MZ)(le.fieldsIndex)],oe.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,y.w)("service","fields",["fields","attributeStorageInfo"])],oe.prototype,"readServiceFields",null),(0,r.Cg)([(0,g.MZ)(le.outFields)],oe.prototype,"outFields",void 0),(0,r.Cg)([(0,g.MZ)({readOnly:!0})],oe.prototype,"attributeStorageInfo",void 0),(0,r.Cg)([(0,g.MZ)(z.Yj)],oe.prototype,"elevationInfo",null),(0,r.Cg)([(0,g.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],oe.prototype,"path",void 0),(0,r.Cg)([(0,g.MZ)(z.fV)],oe.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,g.MZ)({types:re,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:re},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],oe.prototype,"renderer",void 0),(0,r.Cg)([(0,m.K)("renderer")],oe.prototype,"writeRenderer",null),(0,r.Cg)([(0,g.MZ)({json:{read:!1},readOnly:!0})],oe.prototype,"type",void 0),(0,r.Cg)([(0,g.MZ)({readOnly:!0})],oe.prototype,"graphicOrigin",void 0),oe=(0,r.Cg)([(0,f.$)("esri.layers.PointCloudLayer")],oe);const ae=oe},89808:(e,t,i)=>{i.d(t,{Q:()=>r});const r=Symbol("getSliceableSymbol")},95466:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(49186),s=i(53966),n=i(91869),l=i(3330),o=i(12195),a=i(30524),d=i(98623),u=i(56400),p=i(96285);const c=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],m(e))}static fromLayerJSON(e){return new h(e.fields??[],m(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 i=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const s=g(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.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(g(e))??this._normalizedFieldsMap.get(y(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?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):f.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?l.GB.instance:t===d.n$?p.mQ.utcInstance:(0,n.tE)(c,t,()=>p.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.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,o.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function g(e){return e.trim().toLowerCase()}function y(e){return(0,a.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",l=(r?"endField"in r?r.endField:r.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,a=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.dateFieldsTimeReference?(0,u.ZS)(s.dateFieldsTimeReference):o??d.n$:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??o:r.timeReference?(0,u.ZS)(r.timeReference):o:null,c=new Map([[g(s?.creationDateField??""),a],[g(s?.editDateField??""),a],[g(n),p],[g(l),p]]);for(const{name:r,type:s}of e.fields)if(f.has(s))t.set(r,d.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,d.L5);else{const e=c.get(g(r??""))??o;t.set(r,e)}return t}},99959:(e,t,i)=>{i.d(t,{A:()=>n});var r=i(31635),s=(i(53966),i(44208),i(87811),i(49186),i(40608));let n=class{};n=(0,r.Cg)([(0,s.$)("esri.graphic.GraphicOrigin")],n)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7548],{4146:(t,e,r)=>{r.d(e,{A:()=>w});var n=r(31635),i=r(78888),l=r(49186),s=r(65529),a=r(4902),o=r(92474),u=r(53966),p=r(74887),d=r(84952),c=r(10107),y=(r(44208),r(87811),r(40608)),h=r(5443),g=r(16930),m=r(92602),f=r(79677);let b=0,w=class extends((0,s.Zt)((0,a.sA)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,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(t){const e="string"==typeof t?{url:t}:t;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:n}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await n(e)}catch(t){const r=e?.portalItem,n=r?.id||"unset",i=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+n+"')",t),t}}(t)}initialize(){this.when().catch(t=>{(0,p.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const{parent:t}=this;t&&(this.parent=null,t.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:t}=this;t&&(t.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(t,e){return Promise.reject(new l.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,i.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new l.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n.Cg)([(0,c.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,n.Cg)([(0,c.MZ)({type:h.A})],w.prototype,"fullExtent",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,n.Cg)([(0,c.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,n.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,n.Cg)([(0,c.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,n.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,n.Cg)([(0,c.MZ)({type:g.A})],w.prototype,"spatialReference",void 0),(0,n.Cg)([(0,c.MZ)({type:String})],w.prototype,"title",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,n.Cg)([(0,c.MZ)()],w.prototype,"url",void 0),(0,n.Cg)([(0,c.MZ)({type:f.A})],w.prototype,"visibilityTimeExtent",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,n.Cg)([(0,y.$)("esri.layers.Layer")],w)},77548:(t,e,r)=>{r.d(e,{Gh:()=>g,tk:()=>d,BR:()=>p,wI:()=>u,G$:()=>y,$x:()=>c,Ov:()=>a,W_:()=>o,OP:()=>h,TU:()=>s,XX:()=>l});var n=r(70333),i=r(78888);r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap;const l={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function s(t){const e=t?.type;return"building-scene"===e||"integrated-mesh"===e||"point-cloud"===e||"scene"===e}function a(t){return"feature"===t?.type&&!t.url&&"memory"===t.source?.type}function o(t){const e=t?.type;return("feature"===e||"subtype-group"===e||"oriented-imagery"===e)&&"feature-layer"===t?.source?.type}async function u(t,e){const r=n.id?.findServerInfo(t);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const l=t.toLowerCase().indexOf("/rest/services");if(-1===l)return null;const s=`${t.slice(0,l)}/rest/info`,a=null!=e?e.signal:null,{data:o}=await(0,i.A)(s,{query:{f:"json"},responseType:"json",signal:a});return o?.owningSystemUrl||null}function p(t){return function(t){if(!("capabilities"in t))return!1;switch(t.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(t)?"effectiveCapabilities"in t?t.effectiveCapabilities:t.capabilities:null}function d(t){return!!function(t){if(!("editingEnabled"in t))return!1;switch(t.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(t)&&("effectiveEditingEnabled"in t?t.effectiveEditingEnabled:t.editingEnabled)}function c(t,e){return null}function y(t){return null}function h(t){return!t||"Feature Service"===t.type&&!t.sourceUrl}function g(t,e){if(!e||!h(t))return;const r=(t.url,null);r&&(t.url=r)}},79677:(t,e,r)=>{r.d(e,{A:()=>c});var n,i=r(31635),l=r(25482),s=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 l.o{static{n=this}static get allTime(){return y}static get empty(){return h}static fromArray(t){return new n({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===n&&r===i}expandTo(t,e=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.lL)(r,t,e));let i=this.end;if(i){const r=(0,s.lL)(i,t,e);i=i.getTime()===r.getTime()?r:(0,s.S1)(r,1,t,e)}return new n({start:r,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return n.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,l=t.end?.getTime()??1/0;let s,a;return i>=e&&i<=r?s=i:e>=i&&e<=l&&(s=e),r>=i&&r<=l?a=r:l>=e&&l<=r&&(a=l),null==s||null==a||isNaN(s)||isNaN(a)?n.empty:new n({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(t,e,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:l,end:a}=this;return null!=l&&(i.start=(0,s.S1)(l,t,e,r)),null!=a&&(i.end=(0,s.S1)(a,t,e,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return y.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new n({start:e,end:r})}};(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i.Cg)([(0,o.w)("end")],c.prototype,"readEnd",null),(0,i.Cg)([(0,p.K)("end")],c.prototype,"writeEnd",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i.Cg)([(0,o.w)("start")],c.prototype,"readStart",null),(0,i.Cg)([(0,p.K)("start")],c.prototype,"writeStart",null),c=n=(0,i.Cg)([(0,u.$)("esri.time.TimeExtent")],c);const y=new c,h=new c({start:void 0,end:void 0})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5710],{4513:(e,a,t)=>{t.d(a,{S:()=>n});const n={BingMapsLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(9036)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(8506),t.e(9784),t.e(6277),t.e(7005),t.e(9240),t.e(3474),t.e(5971),t.e(61),t.e(8991)]).then(t.bind(t,51613))).default,CSVLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(8506),t.e(9784),t.e(1407)]).then(t.bind(t,68695))).default,CatalogLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(708),t.e(957),t.e(8506),t.e(364),t.e(8628),t.e(2593),t.e(9279),t.e(9692)]).then(t.bind(t,83508))).default,DimensionLayer:async()=>(await Promise.all([t.e(4045),t.e(3813)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(4045),t.e(9953),t.e(4660),t.e(8207)]).then(t.bind(t,68611))).default,FeatureLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(8506),t.e(9784),t.e(6713)]).then(t.bind(t,29784))).default,GaussianSplatLayer:async()=>(await Promise.all([t.e(4045),t.e(6277),t.e(6730)]).then(t.bind(t,36475))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(8766)]).then(t.bind(t,15481))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(5890)]).then(t.bind(t,85582))).default,GroupLayer:async()=>(await Promise.all([t.e(4045),t.e(5613),t.e(3562)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(9953),t.e(1956),t.e(6277),t.e(364),t.e(3356),t.e(6699),t.e(5794)]).then(t.bind(t,55942))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(9953),t.e(6277),t.e(3356),t.e(6049),t.e(6699),t.e(7677),t.e(9718)]).then(t.bind(t,19718))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(4045),t.e(6277),t.e(2515),t.e(132)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(4045),t.e(6277),t.e(9240),t.e(2515),t.e(7464)]).then(t.bind(t,74660))).default,KMLLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(1863)]).then(t.bind(t,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(708),t.e(1017),t.e(8368),t.e(3577),t.e(1812),t.e(217),t.e(2568),t.e(5655),t.e(1082),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(4045),t.e(6277),t.e(1224),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(708),t.e(1017),t.e(8368),t.e(3577),t.e(1812),t.e(217),t.e(2568),t.e(5655),t.e(1082),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(708),t.e(957),t.e(364),t.e(7048),t.e(7656),t.e(3217)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(8506),t.e(9784),t.e(5655),t.e(744)]).then(t.bind(t,96299))).default,MediaLayer:async()=>(await Promise.all([t.e(7330),t.e(4045),t.e(3577),t.e(2763)]).then(t.bind(t,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(708),t.e(1017),t.e(5971),t.e(5363),t.e(4224)]).then(t.bind(t,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(9573),t.e(4806)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(8506),t.e(9784),t.e(9361),t.e(5950)]).then(t.bind(t,9352))).default,PointCloudLayer:async()=>(await Promise.all([t.e(4045),t.e(2869),t.e(6277),t.e(9240),t.e(7984),t.e(873)]).then(t.bind(t,77885))).default,RouteLayer:async()=>(await Promise.all([t.e(4045),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(217),t.e(979)]).then(t.bind(t,64185))).default,SceneLayer:async()=>(await Promise.all([t.e(4045),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(6277),t.e(7005),t.e(9240),t.e(3474),t.e(5971),t.e(61),t.e(1713)]).then(t.bind(t,36969))).default,StreamLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(1017),t.e(73)]).then(t.bind(t,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1956),t.e(8399),t.e(957),t.e(8506),t.e(9211)]).then(t.bind(t,97483))).default,TileLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(708),t.e(957),t.e(364),t.e(4660),t.e(7048),t.e(573)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(4660),t.e(5897),t.e(1776)]).then(t.bind(t,48757))).default,VideoLayer:async()=>(await Promise.all([t.e(4045),t.e(3910),t.e(5323),t.e(8303),t.e(957),t.e(6171)]).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(4045),t.e(1224),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(4045),t.e(2869),t.e(9240),t.e(3081)]).then(t.bind(t,21005))).default,WCSLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(9953),t.e(3356),t.e(6049),t.e(6699),t.e(7677),t.e(1791)]).then(t.bind(t,88854))).default,WFSLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(9110)]).then(t.bind(t,21901))).default,WMSLayer:async()=>(await Promise.all([t.e(7330),t.e(4045),t.e(6554),t.e(2869),t.e(3910),t.e(5323),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(4660),t.e(9573),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(4045),t.e(6554),t.e(9573),t.e(3310)]).then(t.bind(t,47314))).default}},23154:(e,a,t)=>{t.d(a,{K:()=>f,Q:()=>l});var n=t(77548),r=t(24183);const i=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){const{loadContext:t,...i}=a||{},l=t?await t.fetchServiceMetadata(e,i):await(0,r.V)(e,i),s=(0,n.G$)();d(l),y(l);const o={serviceJSON:l,preferredHost:s};if((l.currentVersion??0)<10.5)return o;const c=`${(0,n.$x)()??e}/layers`,u=t?await t.fetchServiceMetadata(c,i):await(0,r.V)(c,i);return d(u),y(u),o.layersJSON={layers:u.layers,tables:u.tables},o}function s(e){const{type:a}=e;return!!a&&i.has(a)}function o(e){return"Table"===e.type}function y(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function c(e){e.type||="Feature Layer"}function u(e){e.type||="Table"}function d(e){e.layers?.forEach(c),e.tables?.forEach(u)}function f(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,t)=>{t.d(a,{V:()=>r});var n=t(78888);async function r(e,a){const{data:t}=await(0,n.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},92009:(e,a,t)=>{t.d(a,{L:()=>c});var n=t(70333),r=t(78888),i=t(49186),l=t(74887),s=t(60694),o=t(20655),y=t(80812);async function c(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-url","Invalid scene service url");const c={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(c.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const t=new y.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=n.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,r.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.QP)(e)}return null}(e);null!=i&&(t.portal=new o.A({url:i}));try{return await t.load({signal:e.signal})}catch(e){return(0,l.QP)(e),null}}(c),null==c.sceneLayerItem)return d(c.sceneServerUrl.replace("/SceneServer","/FeatureServer"),c);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!t)return null;const n=new y.default({portal:t.portal,id:t.id});return await n.load(),n}catch(e){return(0,l.QP)(e),null}}(c);if(!f?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");c.featureServiceItem=f;const w=await d(f.url,c);return w.portalItem=f,w}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,r.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-feature-service-url","Invalid feature service url");const n=t.url.path,l=a.layerId;if(null==l)return{serverUrl:n};const o=u(a),y=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,c=(y?.layers?.[0]||y?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...c},responseType:"json",authMode:e,signal:a.signal};return(0,r.A)(n,t)},f=d("anonymous").catch(()=>d("no-prompt")),[w,h]=await Promise.all([f,o]),m=h?.layers,L=w.data&&w.data.layers;if(!Array.isArray(L))throw new Error("expected layers array");if(Array.isArray(m)){for(let e=0;e<Math.min(m.length,L.length);e++)if(m[e].id===l)return{serverUrl:n,layerId:L[e].id}}else if(null!=l&&l<L.length)return{serverUrl:n,layerId:L[l].id};throw new Error("could not find matching associated sublayer")}}}]);