@arcgis/core 4.34.0-next.55 → 4.34.0-next.57

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 (211) hide show
  1. package/WebScene.js +1 -1
  2. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +4 -0
  3. package/analysis/VolumeMeasurement/{CutFillOptions.js → VolumeMeasurementCutFillOptions.js} +1 -1
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/02a31483e09652a1a1a2.js +1 -0
  7. package/assets/esri/core/workers/chunks/0390f3aa624e3f380ce2.js +1 -0
  8. package/assets/esri/core/workers/chunks/047d6f7b1677cc7ab271.js +1 -0
  9. package/assets/esri/core/workers/chunks/04e652df94790f5ca08a.js +1 -0
  10. package/assets/esri/core/workers/chunks/{9f178cf73c63caaea190.js → 06d2251d6f6b3e44800a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/07d5e0633cc2f765037f.js +1 -0
  12. package/assets/esri/core/workers/chunks/{fe5c37c69da3ec1e56ac.js → 08393d9cc2ed846dd5b4.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{18ceea59e469a0f2721b.js → 094c741fa8139c3f40cf.js} +1 -1
  14. package/assets/esri/core/workers/chunks/0d946a226b846b3c0849.js +1 -0
  15. package/assets/esri/core/workers/chunks/{6530449cd1975deb61f1.js → 184d3c88ac2fc1d7e2c3.js} +1 -1
  16. package/assets/esri/core/workers/chunks/2ded2446700f89155ccd.js +1 -0
  17. package/assets/esri/core/workers/chunks/{19391d60c76a1dc7c262.js → 2f7e192ee2066f863e1d.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{6b11476b2004b4db576e.js → 3445ffd752262673fb13.js} +1 -1
  19. package/assets/esri/core/workers/chunks/38f09e36e174792646bd.js +1 -0
  20. package/assets/esri/core/workers/chunks/43a56c8fa4e5be18c12a.js +1 -0
  21. package/assets/esri/core/workers/chunks/{65e1f5b20a585e04655a.js → 44dc7ec52c4abb700783.js} +1 -1
  22. package/assets/esri/core/workers/chunks/4558f2e3e77831758fdc.js +1 -0
  23. package/assets/esri/core/workers/chunks/4753793daf0b7ff8b5ff.js +1 -0
  24. package/assets/esri/core/workers/chunks/52917b753c5ceab0c1f7.js +353 -0
  25. package/assets/esri/core/workers/chunks/{6940bb6524938894a246.js → 53873f26a2c24cd75e4a.js} +1 -1
  26. package/assets/esri/core/workers/chunks/561a2078458bc0339f83.js +1 -0
  27. package/assets/esri/core/workers/chunks/56b4dcd04c844eaacd60.js +1 -0
  28. package/assets/esri/core/workers/chunks/{d0bf1fc6e3c198bc565d.js → 57486b18421a3c9690d0.js} +1 -1
  29. package/assets/esri/core/workers/chunks/5f079be7f322768aef21.js +1 -0
  30. package/assets/esri/core/workers/chunks/61a294f9411bf884f2ab.js +1 -0
  31. package/assets/esri/core/workers/chunks/{ad93a2621f75270f06cb.js → 69fbe363bb130fdd8146.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{722931d1a60be461e521.js → 70cf81ec5a901782d2db.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{24ac204d8a045aa821be.js → 7388e8c905d93dea1c05.js} +1 -1
  34. package/assets/esri/core/workers/chunks/749c7159e0902388e828.js +1 -0
  35. package/assets/esri/core/workers/chunks/76ff7ccfe583927918f3.js +969 -0
  36. package/assets/esri/core/workers/chunks/{ae73ac81bd10614c2b53.js → 7714228825fb44d506df.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{6130bc641aa7c1bcaaa8.js → 7c23be93d394f1bee941.js} +1 -1
  38. package/assets/esri/core/workers/chunks/7c86af4f60cea383ed96.js +1 -0
  39. package/assets/esri/core/workers/chunks/7eda1c400658b6a99be8.js +1 -0
  40. package/assets/esri/core/workers/chunks/{97ae2fdb6cb98249f5fa.js → 7f80bbbd0897082c1af3.js} +1 -1
  41. package/assets/esri/core/workers/chunks/80a69897fa3ce1eaa6e7.js +1 -0
  42. package/assets/esri/core/workers/chunks/80bd5988180f4618fd61.js +1 -0
  43. package/assets/esri/core/workers/chunks/{62ade6f18b375795ddfd.js → 8257352421f453a669e9.js} +1 -1
  44. package/assets/esri/core/workers/chunks/8762928d10c3821738ad.js +1 -0
  45. package/assets/esri/core/workers/chunks/88a5e7415f8858c454f7.js +1 -0
  46. package/assets/esri/core/workers/chunks/893e5eb5c028c4704317.js +1 -0
  47. package/assets/esri/core/workers/chunks/8ead467a5af0d9bba804.js +1 -0
  48. package/assets/esri/core/workers/chunks/91e04d03b0013bcaad82.js +1 -0
  49. package/assets/esri/core/workers/chunks/{c7d4c296011c5393bcaa.js → 9275313e0f1f521b2658.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{e666ca4d14b6490485d6.js → 92b60d4fb09711919601.js} +1 -1
  51. package/assets/esri/core/workers/chunks/977582cb3c8f17a2cb4c.js +1 -0
  52. package/assets/esri/core/workers/chunks/{5c556468e2a598ab793a.js → 9940e59033a8a1eff2a9.js} +1 -1
  53. package/assets/esri/core/workers/chunks/9b10e70f28873cff44f5.js +1 -0
  54. package/assets/esri/core/workers/chunks/{9928e432b884c75c3436.js → 9d920f3488d59e7f276c.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{a778a72456fefdf40115.js → a249e56a0be8cef33ba8.js} +1 -1
  56. package/assets/esri/core/workers/chunks/a3ee76b7e46d3fba7cf7.js +1 -0
  57. package/assets/esri/core/workers/chunks/{2cda605c302176905e84.js → a96ac5c68d84122e7751.js} +1 -1
  58. package/assets/esri/core/workers/chunks/acf13a64df2991a4cb6b.js +1 -0
  59. package/assets/esri/core/workers/chunks/{7a8d740d1226719a578a.js → b457b7dd907f06278bee.js} +1 -1
  60. package/assets/esri/core/workers/chunks/b5640f9623a9c9ded92a.js +1 -0
  61. package/assets/esri/core/workers/chunks/bb67d491f62a5cce96cd.js +1 -0
  62. package/assets/esri/core/workers/chunks/{71acded1b3c0057917a1.js → bbdbb618a18542f7a4a2.js} +1 -1
  63. package/assets/esri/core/workers/chunks/bc9f54a6b577c43189fd.js +1 -0
  64. package/assets/esri/core/workers/chunks/{6fe738748ce837811ff4.js → bd4125d163f372a7e978.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bead38898c3f4d4d3569.js +1 -0
  66. package/assets/esri/core/workers/chunks/{22334a464f798b5279b2.js → c80c032c5b7a11db177a.js} +1 -1
  67. package/assets/esri/core/workers/chunks/cc748d4f4adb9c584aa4.js +1 -0
  68. package/assets/esri/core/workers/chunks/cf699b9bb530b87be14c.js +1 -0
  69. package/assets/esri/core/workers/chunks/{5d331f7628514a572f82.js → d6ab4d55f1023ee6ec6a.js} +1 -1
  70. package/assets/esri/core/workers/chunks/d71836cf70b9604832f1.js +1 -0
  71. package/assets/esri/core/workers/chunks/{4874aabdb5c60ca66216.js → db2b8d8cf7131554cf7e.js} +1 -1
  72. package/assets/esri/core/workers/chunks/de4da985c398c8bcf2e7.js +1 -0
  73. package/assets/esri/core/workers/chunks/ef85cd0e82d59db8a26f.js +33 -0
  74. package/assets/esri/core/workers/chunks/fd1fdb97a294a1b7041d.js +1 -0
  75. package/config.js +1 -1
  76. package/core/has.js +1 -1
  77. package/geometry/Multipoint.js +1 -1
  78. package/geometry/support/boundsUtils.js +1 -1
  79. package/geometry/support/contains.js +1 -1
  80. package/geometry/support/coordsUtils.js +1 -1
  81. package/geometry/support/curves/circleUtils.js +1 -1
  82. package/geometry/support/curves/circularArcUtils.js +1 -1
  83. package/geometry/support/curves/curveUtils.js +1 -1
  84. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  85. package/geometry/support/curves/rotate.js +5 -0
  86. package/geometry/support/extentUtils.js +1 -1
  87. package/geometry/support/rotate.js +1 -1
  88. package/graphic/ImageryGraphicOrigin.js +5 -0
  89. package/graphic/ImageryTileGraphicOrigin.js +5 -0
  90. package/graphic/KMLGraphicOrigin.js +5 -0
  91. package/graphic/WCSGraphicOrigin.js +5 -0
  92. package/graphic/isImageryGraphicOrigin.js +5 -0
  93. package/graphic/isImageryTileGraphicOrigin.js +5 -0
  94. package/graphic/isKMLGraphicOrigin.js +5 -0
  95. package/graphic/isWCSGraphicOrigin.js +5 -0
  96. package/interfaces.d.ts +10 -10
  97. package/kernel.js +1 -1
  98. package/layers/CatalogLayer.js +1 -1
  99. package/layers/FeatureLayer.js +1 -1
  100. package/layers/GroundLayer.js +5 -0
  101. package/layers/ImageryLayer.js +1 -1
  102. package/layers/ImageryTileLayer.js +1 -1
  103. package/layers/KMLLayer.js +1 -1
  104. package/layers/SceneLayer.js +1 -1
  105. package/layers/WCSLayer.js +1 -1
  106. package/layers/catalog/CatalogFootprintLayer.js +1 -1
  107. package/layers/mixins/ArcGISImageService.js +1 -1
  108. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  109. package/layers/support/ElevationQuery.js +1 -1
  110. package/layers/support/KMLSublayer.js +1 -1
  111. package/layers/support/featureReductionUtils.js +1 -1
  112. package/layers/support/kmlUtils.js +1 -1
  113. package/package.json +1 -1
  114. package/renderers/support/colorRampUtils.js +1 -1
  115. package/support/requestUtils.js +1 -1
  116. package/support/revision.js +1 -1
  117. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  118. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  119. package/views/2d/layers/KMLLayerView2D.js +1 -1
  120. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  121. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  122. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  123. package/views/3d/analysis/Viewshed/{ArrowManipulator.js → ViewshedArrowManipulator.js} +1 -1
  124. package/views/3d/analysis/Viewshed/{FieldOfViewManipulation.js → ViewshedFieldOfViewManipulation.js} +1 -1
  125. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +5 -0
  126. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +5 -0
  127. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  128. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +5 -0
  129. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  130. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  131. package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementComputation.js → VolumeMeasurementCutFillComputation.js} +1 -1
  132. package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementController.js → VolumeMeasurementCutFillController.js} +1 -1
  133. package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementVisualization.js → VolumeMeasurementCutFillVisualization.js} +1 -1
  134. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  135. package/views/3d/layers/CatalogFootprintLayerView3D.js +1 -1
  136. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  137. package/views/GroundView.js +1 -1
  138. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  139. package/views/draw/DrawOperation.js +1 -1
  140. package/views/draw/MultipointDrawAction.js +1 -1
  141. package/views/draw/PointDrawAction.js +1 -1
  142. package/views/draw/PolygonDrawAction.js +1 -1
  143. package/views/draw/PolylineDrawAction.js +1 -1
  144. package/views/draw/SegmentDrawAction.js +1 -1
  145. package/views/draw/support/Box.js +1 -1
  146. package/views/draw/support/GraphicMover.js +1 -1
  147. package/views/draw/support/Reshape.js +1 -1
  148. package/views/draw/support/drawUtils.js +1 -1
  149. package/views/draw/support/reshapeTooltipUtils.js +1 -1
  150. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  151. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  152. package/views/interactive/editGeometry/operations/AppendVertex.js +1 -1
  153. package/views/interactive/editGeometry/operations/RotateVertex.js +1 -1
  154. package/views/interactive/editGeometry/operations/curveOperationUtils.js +1 -1
  155. package/views/interactive/tooltip/infos/SelectedVertexTooltipInfo.js +1 -1
  156. package/views/layers/ImageryLayerView.js +1 -1
  157. package/views/layers/ImageryTileLayerView.js +1 -1
  158. package/webscene/spec-certification/api.js +1 -1
  159. package/webscene/spec-certification/compare.js +1 -1
  160. package/webscene/spec-certification/spec.js +1 -1
  161. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  162. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  163. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  164. package/widgets/OrientedImageryViewer.js +1 -1
  165. package/widgets/Sketch/SketchViewModel.js +1 -1
  166. package/widgets/Sketch/support/sketchUtils.js +1 -1
  167. package/analysis/VolumeMeasurement/CutFillOptions.d.ts +0 -4
  168. package/assets/esri/core/workers/chunks/01e8b9dc77a57d1c2a52.js +0 -1
  169. package/assets/esri/core/workers/chunks/027cfcde29fe87aa2ffe.js +0 -1
  170. package/assets/esri/core/workers/chunks/03ee4d63aa8de44958ab.js +0 -1
  171. package/assets/esri/core/workers/chunks/0445de3a8968c0734c91.js +0 -1
  172. package/assets/esri/core/workers/chunks/09268dc856c3d5ce178f.js +0 -1
  173. package/assets/esri/core/workers/chunks/0a6d33d013628f671aea.js +0 -1
  174. package/assets/esri/core/workers/chunks/17776d9d3558d45ea7b5.js +0 -1
  175. package/assets/esri/core/workers/chunks/1a2278b9fe9666342728.js +0 -1
  176. package/assets/esri/core/workers/chunks/1e01aaebdeffdfc0c6bd.js +0 -1
  177. package/assets/esri/core/workers/chunks/222f981e876f60ae282f.js +0 -1
  178. package/assets/esri/core/workers/chunks/252ee00fd6c4ae0ee7fa.js +0 -1
  179. package/assets/esri/core/workers/chunks/277941bec15525dbd3a0.js +0 -1
  180. package/assets/esri/core/workers/chunks/2cb14d040e67a261b31c.js +0 -1
  181. package/assets/esri/core/workers/chunks/31c088966ccfff2ea1db.js +0 -1
  182. package/assets/esri/core/workers/chunks/3245d20ea4bb779f87ef.js +0 -1
  183. package/assets/esri/core/workers/chunks/3800764932a1c32cb29f.js +0 -1
  184. package/assets/esri/core/workers/chunks/46a470bea2a3601182dc.js +0 -1
  185. package/assets/esri/core/workers/chunks/4f8dab492331c9a2d67a.js +0 -1
  186. package/assets/esri/core/workers/chunks/5900dde7a201a7d47469.js +0 -1
  187. package/assets/esri/core/workers/chunks/5b2ff220aebe464dac23.js +0 -1
  188. package/assets/esri/core/workers/chunks/6801b92bce7a918fda6f.js +0 -1
  189. package/assets/esri/core/workers/chunks/772e81e9162e2240a7a6.js +0 -1
  190. package/assets/esri/core/workers/chunks/7b560ac0be93c6aa9940.js +0 -1
  191. package/assets/esri/core/workers/chunks/7bdfc7c7ce1d94c00745.js +0 -353
  192. package/assets/esri/core/workers/chunks/83737d86584bf1b32368.js +0 -1
  193. package/assets/esri/core/workers/chunks/854bfda25bb406814929.js +0 -1
  194. package/assets/esri/core/workers/chunks/87f68c2b9361bd3f8cac.js +0 -1
  195. package/assets/esri/core/workers/chunks/8c81156b1605a16acc29.js +0 -1
  196. package/assets/esri/core/workers/chunks/8f6ff09e7d2f01b79faf.js +0 -1
  197. package/assets/esri/core/workers/chunks/97a38d700f2cb8807d51.js +0 -1
  198. package/assets/esri/core/workers/chunks/9e9be7f6ea32957f1088.js +0 -33
  199. package/assets/esri/core/workers/chunks/cbec768cd98caff212f2.js +0 -1
  200. package/assets/esri/core/workers/chunks/d1842745a7699879a1e1.js +0 -1
  201. package/assets/esri/core/workers/chunks/d81c4afad4abe2d1d0b9.js +0 -1
  202. package/assets/esri/core/workers/chunks/de499e33035b56b6697d.js +0 -1
  203. package/assets/esri/core/workers/chunks/dfb12f42b8d319ffa5fc.js +0 -1
  204. package/assets/esri/core/workers/chunks/e04951ee32f041faaeca.js +0 -1
  205. package/assets/esri/core/workers/chunks/e10c5405f956b2cc59e4.js +0 -1
  206. package/assets/esri/core/workers/chunks/ead1acf95c3385630da8.js +0 -1001
  207. package/assets/esri/core/workers/chunks/f3e3c2340452c1d60c95.js +0 -1
  208. package/assets/esri/core/workers/chunks/f4d7cbd33ef8710d7316.js +0 -1
  209. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +0 -5
  210. package/views/3d/analysis/Viewshed/ViewshedAnalysisVisualization.js +0 -5
  211. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +0 -5
@@ -1,4 +0,0 @@
1
- import "../../interfaces";
2
-
3
- import CutFillOptions = __esri.CutFillOptions;
4
- export default CutFillOptions;
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4304],{21015:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(78888),o=r(60999),s=r(49186),i=r(74887),a=r(84952);class u{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load(0,e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,i.Te)(t),(0,a.lJ)(e)):this._load(1,e,t)}async loadImage(e,t){return this._load(2,e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,n.A)(t,{responseType:l[e]})).data;const a=await(0,o.Ke)(this._streamDataRequester.request(t,e,r));if(!0===a.ok)return a.value;throw(0,i.QP)(a.error),new s.A("glt-loader-request-error",`Request for resource failed: ${a.error}`)}}const l={2:"image",1:"array-buffer",0:"json",3:void 0}},43609:(e,t,r)=>{r.d(t,{a:()=>s,f:()=>i,n:()=>o});var n=r(34275);function o(e,t){s(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r=2,o=r){const s=t.length/2;let i=0,a=0;if(!(0,n.iu)(t)||(0,n.dk)(t)){for(let n=0;n<s;++n)e[i]=t[a],e[i+1]=t[a+1],i+=r,a+=o;return}const u=(0,n.a3)(t);if((0,n.JI)(t))for(let n=0;n<s;++n)e[i]=Math.max(t[a]/u,-1),e[i+1]=Math.max(t[a+1]/u,-1),i+=r,a+=o;else for(let n=0;n<s;++n)e[i]=t[a]/u,e[i+1]=t[a+1]/u,i+=r,a+=o}function i(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,i=n?.count??e.count;let a=(n?.dstIndex??0)*s;for(let e=0;e<i;++e)o[a]=t,o[a+1]=r,a+=s}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:s,normalizeIntegerBufferView:o},Symbol.toStringTag,{value:"Module"}))},51530:(e,t,r)=>{r.d(t,{KB:()=>i,Xi:()=>o,pn:()=>a,x3:()=>s});var n=r(44208);class o{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function s(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function a(e,t){if("image/ktx2"===t)return new o(e);const r=new Blob([e],{type:t});let s=URL.createObjectURL(r);switch(t){case"image/jpeg":s+="#.jpg";break;case"image/png":s+="#.png"}const i=new Image;if((0,n.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{o(),e(i)},n=e=>{o(),t(e)},o=()=>{URL.revokeObjectURL(s),i.removeEventListener("load",r),i.removeEventListener("error",n)};i.addEventListener("load",r),i.addEventListener("error",n),i.src=s});try{i.src=s,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(s),i}},61473:(e,t,r)=>{function n(e){return e=e||globalThis.location.hostname,l.some(t=>null!=e?.match(t))}function o(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(s)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(u)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>o,b5:()=>n});const s=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,u=/^[\w-]*\.mapsqa\.arcgis\.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,s,i,/^jsapps\.esri\.com$/,a,u]},64304:(e,t,r)=>{r.d(t,{fetch:()=>J});var n=r(40876),o=r(61473),s=r(34727),i=r(77690),a=r(29242),u=r(58083),l=r(9093),c=r(48163),f=r(38954),d=r(51850),m=r(70328),p=r(11868),h=r(13030),y=r(73354),g=r(65686),x=r(43609),w=r(21015),b=r(84498),v=r(51530),T=r(88340);function B(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,n=null!=e.scale?e.scale:T.Un,o=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),u=(0,a.fA)(n[0],0,0,0,n[1],0,0,0,1),l=(0,a.vt)();return(0,i.lw)(l,s,u),(0,i.lw)(l,o,l),l}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class M{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var R=r(78888),A=r(60999),_=r(49186),E=r(53966),I=r(69397);class P{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const n=this._outer.get(e);n?n.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,n)=>e(t,r,n)))}}var O=r(74887),U=r(46140),L=r(97146),j=r(99677),k=r(46610),C=r(87170),F=r(48833),V=r(2495);const q=()=>E.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class z{constructor(e,t,r){this.resource=e,this.textures=t,this.cachedMemory=r}}function $(e){throw new _.A("",`Request for object resource failed: ${e}`)}function D(e){const t=e.params,r=t.topology;let n=!0;switch(t.vertexAttributes||(q().warn("Geometry must specify vertex attributes"),n=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(q().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),n=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(q().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),n=!1)):(q().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),n=!1)}}else q().warn("Indexed geometries must specify faces"),n=!1;break}default:q().warn(`Unsupported topology '${r}'`),n=!1}e.params.material||(q().warn("Geometry requires material"),n=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(q().warn("Geometries with externally defined attributes are not yet supported"),n=!1);return n}function G(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function N(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function Q(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const K=new U.R(1,2,"wosr");var W=r(74810);async function J(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const n=await(0,A.Ke)(t.request(e,0,r));if(!0===n.ok)return n.value;(0,O.QP)(n.error),$(n.error.details.url)}(e,r,t);const n=await(0,A.Ke)((0,R.A)(e,t));if(!0===n.ok)return n.value.data;(0,O.QP)(n.error),$(n.error)}(e,t),n=await async function(e,t){const r=new Array;for(const n in e){const o=e[n],s=o.images[0].data;if(!s){q().warn("Externally referenced texture data is not yet supported");continue}const i=o.encoding+";base64,"+s,a="/textureDefinitions/"+n,u="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",l={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==N(u)},c=t?.disableTextures?Promise.resolve(null):(0,j.D)(i,t);r.push(c.then(e=>({refId:a,image:e,parameters:l,alphaChannelUsage:u})))}const n=await Promise.all(r),o={};for(const e of n)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];o+=t?.image?t.image.width*t.image.height*4:0}return new z(r,n,o+(0,I.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:n}=function(e,t){const r=new Array,n=new Array,o=new Array,s=new P,i=e.resource,a=U.R.parse(i.version||"1.0","wosr");K.validate(a);const u=i.model.name,l=i.model.geometries,c=i.materialDefinitions??{},f=e.textures;let m=0;const p=new Map;for(let e=0;e<l.length;e++){const i=l[e];if(!D(i))continue;const a=Q(i),u=i.params.vertexAttributes,h=[],y=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=u.position,x=g.values.length/g.valuesPerElement;for(const e in u){const t=u[e],r=t.values,n=y(e)??(0,L.tM)(x);h.push([e,new k.n(r,n,t.valuesPerElement,!0)])}const w=a.texture,b=f&&f[w];if(b&&!p.has(w)){const{image:e,parameters:t}=b,r=new F.g(e,t);n.push(r),p.set(w,r)}const v=p.get(w),T=v?v.id:void 0,B=a.material;let S=s.get(B,w);if(null==S){const e=c[B.slice(B.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=b?N(b.alphaChannelUsage):void 0,n={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:T,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:b?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),S=new V.$U(n,t),s.set(B,w,S)}o.push(S);const M=new C.V(S,h);m+=h.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(M)}return{engineResources:[{name:u,stageResources:{textures:n,materials:o,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:G(r)}}(e,t);return{lods:r,referenceBoundingBox:n,isEsriSymbolResource:!1,isWosr:!0}}let T;if(t.cache)T=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(9738).then(r.bind(r,99738));T=await e(new w.R(t.streamDataRequester),a.url,t,t.usePBR)}const S=T.model.meta?.ESRI_proxyEllipsoid,_=T.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===T.meta.ESRI_webstyle;_&&!T.customMeta.esriTreeRendering&&(T.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const s of o.parts){const o=s.attributes.normal;if(null==o)return;const i=s.attributes.position,a=i.count,c=(0,d.vt)(),m=(0,d.vt)(),p=(0,d.vt)(),y=new Float32Array(4*a),g=new Float32Array(3*a),x=(0,u.B8)((0,l.vt)(),s.transform);let w=0,b=0;for(let u=0;u<a;u++){i.getVec(u,m),o.getVec(u,c),(0,f.t)(m,m,s.transform),(0,f.d)(p,m,t.center),(0,f.D)(p,p,t.radius);const a=p[2],l=(0,f.l)(p),d=Math.min(.45+.55*l*l,1)**n.Tf;(0,f.D)(p,p,t.radius),null!==x&&(0,f.t)(p,p,x),(0,f.n)(p,p),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,f.m)(p,p,c,a>-1?.2:Math.min(-4*a-3.8,1)),g[w]=p[0],g[w+1]=p[1],g[w+2]=p[2],w+=3,y[b]=d,y[b+1]=d,y[b+2]=d,y[b+3]=1,b+=4}s.attributes.normal=new h.xs(g.buffer),s.attributes.color=new h.Eq(y.buffer)}}}(T,S));const E=!!t.usePBR,J=T.meta.isEsriSymbolResource?{usePBR:E,isSchematic:!1,treeRendering:_,mrrFactors:W.SY}:{usePBR:E,isSchematic:!1,treeRendering:!1,mrrFactors:W.mb},X={...t.materialParameters,treeRendering:_},{engineResources:H,referenceBoundingBox:Z}=function(e,t,r,o,a,u){const l=e.model,f=new Array,d=new Map,w=new Map,T=l.lods.length,S=(0,m.Ie)();return l.lods.forEach((e,R)=>{const A=!0===o.skipHighLods&&(T>1&&0===R||T>3&&1===R)||!1===o.skipHighLods&&null!=a&&R!==a;if(A&&0!==R)return;const _=new M(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const a=A?new V.$U({},o):function(e,t,r,o,s,i,a,u,l){const f=e.materials.get(t.material);if(null==f)return null;const{normal:d,color:m,texCoord0:p,tangent:h}=t.attributes,y=t.material+(d?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(h?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,w=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(f.alphaMode);if(!i.has(y)){if(g){const t=(t,r=!1,n=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(o){const e=o.data,s=r&&!(0,v.x3)(e)?u.compressionOptions:void 0;a.set(t,new F.g((0,v.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,v.x3)(e)&&n,encoding:(0,v.x3)(e)?e.encoding:void 0,compressionOptions:s}))}}},r=1!==w&&!l;t(f.colorTexture,r,1!==w),t(f.normalTexture),t(f.occlusionTexture,!0),t(f.emissiveTexture),t(f.metallicRoughnessTexture,!0)}const r=1/n.Tf,d=f.color[0]**r,m=f.color[1]**r,p=f.color[2]**r,h=f.emissiveFactor[0]**r,b=f.emissiveFactor[1]**r,T=f.emissiveFactor[2]**r,S=null!=f.colorTexture&&g?a.get(f.colorTexture):null,M=(0,W.Jr)(f),R=null!=f.normalTextureTransform?.scale?f.normalTextureTransform?.scale:c.Un;i.set(y,new V.$U({...o,customDepthTest:1,textureAlphaMode:w,textureAlphaCutoff:f.alphaCutoff,diffuse:[d,m,p],ambient:[d,m,p],opacity:"OPAQUE"===f.alphaMode?1:f.opacity,doubleSided:f.doubleSided,doubleSidedType:"winding-order",cullFace:f.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:f.receiveShadows,receiveAmbientOcclusion:f.receiveAmbientOcclusion,textureId:null!=S?S.id:void 0,colorMixMode:f.colorMixMode,normalTextureId:null!=f.normalTexture&&g?a.get(f.normalTexture).id:void 0,textureAlphaPremultiplied:null!=S&&!!S.parameters.preMultiplyAlpha,occlusionTextureId:null!=f.occlusionTexture&&g?a.get(f.occlusionTexture).id:void 0,emissiveTextureId:null!=f.emissiveTexture&&g?a.get(f.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=f.metallicRoughnessTexture&&g?a.get(f.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[h,b,T],mrrFactors:M?W.Bt:[f.metallicFactor,f.roughnessFactor,o.mrrFactors[2]],isSchematic:M,colorTextureTransformMatrix:B(f.colorTextureTransform),normalTextureTransformMatrix:B(f.normalTextureTransform),scale:[R[0],R[1]],occlusionTextureTransformMatrix:B(f.occlusionTextureTransform),emissiveTextureTransformMatrix:B(f.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:B(f.metallicRoughnessTextureTransform),...s},u))}const b=i.get(y);if(r.stageResources.materials.push(b),g){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(f.colorTexture),e(f.normalTexture),e(f.occlusionTexture),e(f.emissiveTexture),e(f.metallicRoughnessTexture)}return b}(l,e,_,t,r,d,w,o,u),{geometry:f,vertexCount:T}=function(e,t){const r=e.attributes.position.count,n=(0,b.x)(e.indices||r,e.primitiveType),o=(0,p.oe)(3*r),{typedBuffer:a,typedBufferStride:u}=e.attributes.position;(0,y.t)(o,a,e.transform,3,u);const l=[["position",new k.n(o,n,3,!0)]];if(null!=e.attributes.normal){const t=(0,p.oe)(3*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.normal;(0,i.Ge)(Y,e.transform),(0,y.b)(t,o,Y,3,a),(0,s.or)(Y)&&(0,y.n)(t,t),l.push(["normal",new k.n(t,n,3,!0)])}if(null!=e.attributes.tangent){const t=(0,p.oe)(4*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.tangent;(0,i.z0)(Y,e.transform),(0,g.t)(t,o,Y,4,a),(0,s.or)(Y)&&(0,y.n)(t,t,4),l.push(["tangent",new k.n(t,n,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,p.oe)(2*r),{typedBuffer:o,typedBufferStride:s}=e.attributes.texCoord0;(0,x.a)(t,o,2,s),l.push(["uv0",new k.n(t,n,2,!0)])}const c=e.attributes.color;if(null!=c){const t=new Uint8Array(4*r);4===c.elementCount?c instanceof h.Eq?(0,g.b)(t,c,1,255):(c instanceof h.XP||c instanceof h.Uz)&&(0,g.b)(t,c,1/255,255):(t.fill(255),c instanceof h.xs?(0,y.f)(t,c.typedBuffer,1,255,4,c.typedBufferStride):(e.attributes.color instanceof h.eI||e.attributes.color instanceof h.nS)&&(0,y.f)(t,c.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new k.n(t,n,4,!0)])}return{geometry:new C.V(t,l),vertexCount:r}}(e,a??new V.$U({},o)),M=f.boundingInfo;null!=M&&0===R&&((0,m.iT)(S,M.bbMin),(0,m.iT)(S,M.bbMax)),null!=a&&(_.stageResources.geometries.push(f),_.numberOfVertices+=T)}),A||f.push(_)}),{engineResources:f,referenceBoundingBox:S}}(T,J,X,t,a.specifiedLodIndex,_);return{lods:H,referenceBoundingBox:Z,isEsriSymbolResource:T.meta.isEsriSymbolResource,isWosr:!1}}const Y=(0,a.vt)()},65686:(e,t,r)=>{r.d(t,{a:()=>s,b:()=>c,l:()=>l,n:()=>a,t:()=>i});var n=r(40876),o=(r(44208),r(53966));function s(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,n=4,o=n){if(e.length/n!==t.length/o)return;const s=e.length/n,i=r[0],a=r[1],u=r[2],l=r[3],c=r[4],f=r[5],d=r[6],m=r[7],p=r[8];let h=0,y=0;for(let r=0;r<s;r++){const r=t[h],s=t[h+1],g=t[h+2],x=t[h+3];e[y]=i*r+l*s+d*g,e[y+1]=a*r+c*s+m*g,e[y+2]=u*r+f*s+p*g,e[y+3]=x,h+=o,y+=n}}function a(e,t){const r=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*o,r=e*i,a=s[r],u=s[r+1],l=s[r+2],c=a*a+u*u+l*l;if(c>0){const e=1/Math.sqrt(c);n[t]=e*a,n[t+1]=e*u,n[t+2]=e*l}}}function u(e,t,r,n=4){const o=Math.min(e.length/n,t.count),s=t.typedBuffer,i=t.typedBufferStride;let a=0,u=0;for(let t=0;t<o;t++)e[u]=r*s[a],e[u+1]=r*s[a+1],e[u+2]=r*s[a+2],e[u+3]=r*s[a+3],a+=i,u+=n}function l(e,t,r,n){c(e.typedBuffer,t,r,n,e.typedBufferStride)}function c(e,t,r,o,s=4){const i=Math.min(e.length/s,t.count),a=t.typedBuffer,u=t.typedBufferStride;let l=0,c=0;const f=1/n.Tf;for(let t=0;t<i;t++)e[c]=o*(r*a[l])**f,e[c+1]=o*(r*a[l+1])**f,e[c+2]=o*(r*a[l+2])**f,e[c+3]=o*r*a[l+3],l+=u,c+=s}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:a,scale:u,scaleView:function(e,t,r){u(e.typedBuffer,t,r,e.typedBufferStride)},transformMat3:i,transformMat3View:s,transformMat4:function(e,t,r,n=4,s=n){if(e.length/n!==t.length/s)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const i=e.length/n,a=r[0],u=r[1],l=r[2],c=r[3],f=r[4],d=r[5],m=r[6],p=r[7],h=r[8],y=r[9],g=r[10],x=r[11],w=r[12],b=r[13],v=r[14],T=r[15];let B=0,S=0;for(let r=0;r<i;r++){const r=t[B],o=t[B+1],i=t[B+2],M=t[B+3];e[S]=a*r+f*o+h*i+w*M,e[S+1]=u*r+d*o+y*i+b*M,e[S+2]=l*r+m*o+g*i+v*M,e[S+3]=c*r+p*o+x*i+T*M,B+=s,S+=n}},transformMat4View:function(e,t,r){if(e.count!==t.count)return;const n=e.count,o=r[0],s=r[1],i=r[2],a=r[3],u=r[4],l=r[5],c=r[6],f=r[7],d=r[8],m=r[9],p=r[10],h=r[11],y=r[12],g=r[13],x=r[14],w=r[15],b=e.typedBuffer,v=e.typedBufferStride,T=t.typedBuffer,B=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*v,r=e*B,n=T[r],S=T[r+1],M=T[r+2],R=T[r+3];b[t]=o*n+u*S+d*M+y*R,b[t+1]=s*n+l*S+m*M+g*R,b[t+2]=i*n+c*S+p*M+x*R,b[t+3]=a*n+f*S+h*M+w*R}}},Symbol.toStringTag,{value:"Module"}))},69397:(e,t,r)=>{r.d(t,{$B:()=>o,Qf:()=>l,Qh:()=>a,RS:()=>s,ez:()=>d,lM:()=>i,qK:()=>f});var n=r(34275);function o(e){return 32+e.length}const s=16;function i(e){if(!e)return 0;let t=f;for(const r in e)e.hasOwnProperty(r)&&(t+=u(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let n=0;n<t;n++)r+=u(e[n]);return r}(e);let t=f;for(const r in e)e.hasOwnProperty(r)&&(t+=u(e[r]));return t}function u(e,t=!0){switch(typeof e){case"object":return t?a(e):f;case"string":return o(e);case"number":return s;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+m:Array.isArray(t)?c(t,s):0:0),0)}function c(e,t){return d+e.length*t}const f=32,d=16,m=145},73354:(e,t,r)=>{r.d(t,{a:()=>f,b:()=>a,c:()=>i,d:()=>o,e:()=>d,f:()=>c,l:()=>l,n:()=>m,t:()=>s});var n=r(40876);function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return e;const s=e.length/n,i=r[0],a=r[1],u=r[2],l=r[4],c=r[5],f=r[6],d=r[8],m=r[9],p=r[10],h=r[12],y=r[13],g=r[14];let x=0,w=0;for(let r=0;r<s;r++){const r=t[x],s=t[x+1],b=t[x+2];e[w]=i*r+l*s+d*b+h,e[w+1]=a*r+c*s+m*b+y,e[w+2]=u*r+f*s+p*b+g,x+=o,w+=n}return e}function i(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return;const s=e.length/n,i=r[0],a=r[1],u=r[2],l=r[3],c=r[4],f=r[5],d=r[6],m=r[7],p=r[8];let h=0,y=0;for(let r=0;r<s;r++){const r=t[h],s=t[h+1],g=t[h+2];e[y]=i*r+l*s+d*g,e[y+1]=a*r+c*s+m*g,e[y+2]=u*r+f*s+p*g,h+=o,y+=n}}function u(e,t,r,n=3,o=n){const s=Math.min(e.length/n,t.length/o);let i=0,a=0;for(let u=0;u<s;u++)e[a]=r*t[i],e[a+1]=r*t[i+1],e[a+2]=r*t[i+2],i+=o,a+=n;return e}function l(e,t,r,n){c(e.typedBuffer,t.typedBuffer,r,n,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r,o,s=3,i=s){const a=Math.min(e.length/s,t.length/i);let u=0,l=0;const c=1/n.Tf;for(let n=0;n<a;n++)e[l]=o*(r*t[u])**c,e[l+1]=o*(r*t[u+1])**c,e[l+2]=o*(r*t[u+2])**c,u+=i,l+=s}function f(e,t,r,n=3,o=n){const s=e.length/n;if(s!==Math.ceil(t.length/o))return e;let i=0,a=0;for(let u=0;u<s;u++)e[a]=t[i]+r[0],e[a+1]=t[i+1]+r[1],e[a+2]=t[i+2]+r[2],i+=o,a+=n;return e}function d(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,n=r){const o=Math.min(e.length/r,t.length/n);let s=0,i=0;for(let a=0;a<o;a++){const o=t[s],a=t[s+1],u=t[s+2],l=o*o+a*a+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*o,e[i+1]=t*a,e[i+2]=t*u}s+=n,i+=r}}r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:m,normalizeView:d,scale:u,scaleView:function(e,t,r){u(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;let u=0,l=0;for(let e=0;e<n;e++)o[l]=i[u]>>r,o[l+1]=i[u+1]>>r,o[l+2]=i[u+2]>>r,u+=a,l+=s},transformMat3:a,transformMat3View:i,transformMat4:s,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},84498:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(34275),o=r(97146),s=r(63907);function i(e,t){switch(t){case s.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,o.tM)(e):(0,n.mg)(e)?new Uint16Array(e):e}(e);case s.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)o%2==0?(n[t++]=e[o],n[t++]=e[o+1],n[t++]=e[o+2]):(n[t++]=e[o+1],n[t++]=e[o],n[t++]=e[o+2])}return n}(e);case s.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}const o=e[0];let s=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];n[i++]=o,n[i++]=s,n[i++]=r,s=r}return n}(e)}}},88340:(e,t,r)=>{function n(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function s(){return n()}function i(){return o(1,1)}function a(){return o(1,0)}function u(){return o(0,1)}r.d(t,{Un:()=>c,fA:()=>o,uY:()=>l,vt:()=>n});const l=s(),c=i(),f=a(),d=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:f,UNIT_Y:d,ZEROS:l,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:n,fromValues:o,ones:i,unitX:a,unitY:u,zeros:s},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4980],{9093:(t,e,n)=>{function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>r,vt:()=>o,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:r,create:o,fromValues:function(t,e,n,o,r,i,s,c,u,a,h,d,l,f,m,p){return[t,e,n,o,r,i,s,c,u,a,h,d,l,f,m,p]}},Symbol.toStringTag,{value:"Module"}))},11964:(t,e,n)=>{n.d(e,{Cr:()=>h,H6:()=>f,LV:()=>a,_I:()=>l,kb:()=>d,vt:()=>u});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),c=n(32114);function u(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function a(t,e){const n=m.get();return n.origin=t,n.vector=e,n}function h(t,e,n=u()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function d(t,e){const n=(0,i.d)(c.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),u=(0,o.qE)(r/s,0,1),a=(0,i.d)(c.rq.get(),(0,i.g)(c.rq.get(),t.vector,u),n);return(0,i.e)(a,a)}function l(t,e,n){return f(t,e,0,1,n)}function f(t,e,n,r,s){const{vector:u,origin:a}=t,h=(0,i.d)(c.rq.get(),e,a),d=(0,i.e)(u,h)/(0,i.k)(u);return(0,i.g)(s,u,(0,o.qE)(d,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)();const m=new r.I(()=>u())},27444:(t,e,n)=>{n.r(e),n.d(e,{default:()=>G});var o=n(31635),r=n(74887),i=(n(53966),n(44208),n(87811),n(49186),n(40608)),s=n(38954),c=n(51850),u=n(11964),a=n(97937),h=n(93687),d=n(15142),l=n(82919),f=n(71351),m=n(620);class p{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new g,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),g.clearPool(),N[0]=null,k.prune(),H.prune()}add(t){const e=Array.from(t);this._grow(e);const n=g.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));g.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=g.acquire();for(const o of t){const t=e??(0,a.j)(this.objectToBoundingSphere(o),L);E(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}g.release(n),this._shrink()}update(t,e){if(!E(e[3])&&this._isDegenerate(t))return;const n=function(t){return N[0]=t,N}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,f.LV)(t,e);_(this._root,t=>{if(!function(t,e){return y((0,a.a)(e.bounds),2*-e.halfSize,D),y((0,a.a)(e.bounds),2*e.halfSize,B),(0,m.O_)(t.origin,t.direction,D,B)}(o,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,f.LV)(t,e);_(this._root,t=>{if(!function(t,e,n){return y((0,a.a)(e.bounds),2*-e.halfSize,D),y((0,a.a)(e.bounds),2*e.halfSize,B),n.applyToMinMax(D,B),(0,m.O_)(t.origin,t.direction,D,B)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)}),!0})}forEach(t){_(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,c=1/0,u=null;const h=O(t,e),d=s=>{if(--r,!o(s))return;const h=this.objectToBoundingSphere(s);if(!(0,l.m7)(n,h))return;const d=w(t,e,(0,a.a)(h)),f=d-h[3],m=d+h[3];f<i&&(i=f,c=m,u=s)};return b(this._root,o=>{if(r<=0||!(0,l.m7)(n,o.bounds))return!1;if((0,s.g)(P,h,o.halfSize),(0,s.f)(P,P,(0,a.a)(o.bounds)),w(t,e,P)>c)return!1;const i=o.node;return i.terminals.forAll(t=>d(t)),null!==i.residents&&i.residents.forAll(t=>d(t)),!0},t,e),u}forEachInDepthRange(t,e,n,o,r,i,c){let u=-1/0,h=1/0;const d={setRange:t=>{1===n?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};d.setRange(o);const f=w(e,n,t),m=O(e,n),p=O(e,-n),g=t=>{if(!c(t))return;const o=this.objectToBoundingSphere(t),s=w(e,n,(0,a.a)(o))-f,m=s-o[3],p=s+o[3];m>h||p<u||!(0,l.m7)(i,o)||r(t,d)};b(this._root,t=>{if(!(0,l.m7)(i,t.bounds))return!1;if((0,s.g)(P,m,t.halfSize),(0,s.f)(P,P,(0,a.a)(t.bounds)),w(e,n,P)-f>h)return!1;if((0,s.g)(P,p,t.halfSize),(0,s.f)(P,P,(0,a.a)(t.bounds)),w(e,n,P)-f<u)return!1;const o=t.node;return o.terminals.forAll(t=>g(t)),null!==o.residents&&o.residents.forAll(t=>g(t)),!0},e,n)}forEachNode(t){_(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=(0,a.g)(e),o=(0,a.k)(e,(0,c.vt)()),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,a.g)(r),c=n+i;return!((0,s.s)((0,a.a)(r),o)-c*c<=0)||t(e)};let i=!0;const u=t=>{i&&(i=r(t))};_(this._root,t=>{const e=(0,a.g)(t.bounds),r=n+e;if((0,s.s)((0,a.a)(t.bounds),o)-r*r>0)return!1;const c=t.node;return c.terminals.forAll(u),i&&null!==c.residents&&c.residents.forAll(u),i}),i&&this.forEachDegenerateObject(u)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,a.q)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,a.q)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=g.acquire().init(t);this._add(e.at(n),o),g.release(o)}}_grow(t){if(M(t,t=>this.objectToBoundingSphere(t),R),E(R[3])&&!this._fitsInsideTree(R))if(j(this._root.node))(0,a.j)(R,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(R);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(R,t):this._growRootAsSubNode(t),g.release(t)}}_rebuildTree(t,e){(0,a.r)(I,e.bounds),I[3]=e.halfSize,M([t,I],t=>t,V);const n=g.acquire().init(this._root);this._root.initFrom(null,V,V[3]),this._root.increaseHalfSize(1.25),_(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),g.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return _(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),c=n[t]+e-(r[t]+i),u=Math.max(0,Math.ceil(s/(2*i))),a=Math.max(0,Math.ceil(c/(2*i)))+1,h=2**Math.ceil(Math.log(u+a)*Math.LOG2E);o=Math.max(o,h),F[t].min=u,F[t].max=a}for(let t=0;t<3;t++){let e=F[t].min,n=F[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const c=r[t]-i-e*i*2;q[t]=c+(n+e)*i}const s=o*i;return q[3]=s*z,g.acquire().initFrom(null,q,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,a.r)(R,this._root.bounds),R[3]=this._root.halfSize,this._root.init(t),t.advanceTo(R,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!E(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),o=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new p(t=>t,{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class g{constructor(){this.bounds=(0,a.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:g.createEmptyNode(),e&&(0,a.j)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=g.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=T[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e?.(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new d.A({shrink:!0}),residents:new d.A({shrink:!0})}}static{this._pool=new h.A(()=>new g)}static acquire(){return g._pool.acquire()}static release(t){g._pool.release(t)}static clearPool(){g._pool.prune()}}function _(t,e){let n=g.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(g.acquire().init(n).advance(t));g.release(n)}}function b(t,e,n,o=1){let r=g.acquire().init(t);const i=[r];for(function(t,e,n){if(!H.length)for(let t=0;t<8;++t)H.push({index:0,distance:0});for(let n=0;n<8;++n){const o=T[n];H.data[n].index=n,H.data[n].distance=w(t,e,o)}H.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=H.data[t].index}(n,o,U);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=U[t];r.node.children[e]&&i.push(g.acquire().init(r).advance(e))}g.release(r)}}function v(t,e,n){k.clear();const o=n.advanceTo(e,(t,e)=>{k.push(t.node),k.push(e)})?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=k.length-2;t>=0&&S(k.data[t],k.data[t+1]);t-=2);}function S(t,e){return e>=0&&(t.children[e]=null),!!j(t)&&(null===t.residents&&(t.residents=new d.A({shrink:!0})),!0)}function j(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function x(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function A(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function y(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function M(t,e,n){D[0]=1/0,D[1]=1/0,D[2]=1/0,B[0]=-1/0,B[1]=-1/0,B[2]=-1/0;for(const n of t){const t=e(n);E(t[3])&&(x(D,t),A(B,t))}(0,a.l)(n,(0,s.m)(J,D,B,.5)),n[3]=Math.max(B[0]-D[0],B[1]-D[1],B[2]-D[2])/2}function O(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=w(t,e,C[r]);i<o&&(o=i,n=C[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function E(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const T=[(0,c.fA)(-1,-1,-1),(0,c.fA)(1,-1,-1),(0,c.fA)(-1,1,-1),(0,c.fA)(1,1,-1),(0,c.fA)(-1,-1,1),(0,c.fA)(1,-1,1),(0,c.fA)(-1,1,1),(0,c.fA)(1,1,1)],C=[(0,c.fA)(-1,-1,-1),(0,c.fA)(-1,-1,1),(0,c.fA)(-1,1,-1),(0,c.fA)(-1,1,1),(0,c.fA)(1,-1,-1),(0,c.fA)(1,-1,1),(0,c.fA)(1,1,-1),(0,c.fA)(1,1,1)],z=Math.sqrt(3),N=[null],q=(0,a.c)(),P=(0,c.vt)(),D=(0,c.vt)(),B=(0,c.vt)(),k=new d.A,L=(0,a.c)(),R=(0,a.c)(),I=(0,a.c)(),V=(0,a.c)(),F=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],H=new d.A,U=[0,0,0,0,0,0,0,0],J=(0,c.vt)();var W=n(431);function Q(t,e,n){const o=K;(0,s.g)(o,t,.5),(0,s.b)(o,o,e,.5);const r=(0,s.j)(o,t);return(0,s.f)(o,o,n),(0,a.u)(o,r)}const K=(0,c.vt)();let $=class{constructor(){this._idToComponent=new Map,this._components=new p(t=>t.bounds),this._edges=new p(t=>t.bounds),this._tmpLineSegment=(0,u.vt)(),this._tmpP1=(0,c.vt)(),this._tmpP2=(0,c.vt)(),this._tmpP3=(0,c.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,r.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor(e=>(this._addCandidates(t,e,n),n.length<1e3),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0},t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new Y(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=W.HY.createView(t.locations),o=new Array(n.count),r=(0,c.vt)(),i=(0,c.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const c=Q(r,i,t.origin),u=new Z(e,s,c);o[s]=u}this._edges.add(o);const{objectIds:s,origin:u}=t;e.info={locations:n,objectIds:s,origin:u}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,c=o.locations,u=c.position0.getVec(e.index,this._tmpP1),a=c.position1.getVec(e.index,this._tmpP2);(0,s.f)(u,u,r),(0,s.f)(a,a,r);const h=i[c.componentIndex.get(e.index)];this._addEdgeCandidate(t,h,u,a,n),X(t,h,u,n),X(t,h,a,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,a.k)(t.bounds,tt),h=(0,u.Cr)(n,o,this._tmpLineSegment),d=(0,u._I)(h,i,this._tmpP3);(0,a.B)(t.bounds,d)&&r.push({type:"edge",objectId:e,target:(0,c.o8)(d),distance:(0,s.j)(i,d),start:(0,c.o8)(n),end:(0,c.o8)(o)})}};$=(0,o.Cg)([(0,i.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],$);const G=$;function X(t,e,n,o){t.returnVertex&&(0,a.B)(t.bounds,n)&&o.push({type:"vertex",objectId:e,target:(0,c.o8)(n),distance:(0,s.j)((0,a.a)(t.bounds),n)})}class Y{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++Y.uid}static{this.uid=0}}class Z{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}const tt=(0,c.vt)()},27921:(t,e,n)=>{n.d(e,{$Q:()=>w,C:()=>a,Cr:()=>f,LV:()=>u,O_:()=>l,Qj:()=>h,T7:()=>y,Tj:()=>O,Ui:()=>A,_I:()=>E,fA:()=>d,gv:()=>M,lU:()=>m,mN:()=>T,mP:()=>j,mR:()=>x,vE:()=>z,vt:()=>c});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function c(t=N){return[t[0],t[1],t[2],t[3]]}function u(t=N[0],e=N[1],n=N[2],o=N[3]){return d(t,e,n,o,s.Km.get())}function a(t,e){return d(e[0],e[1],e[2],e[3],t)}function h(t){return t}function d(t,e,n,o,r=c()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function l(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function f(t,e,n,o=c()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],u=t[0]-e[0],a=t[1]-e[1],h=t[2]-e[2],d=i*h-s*a,l=s*u-r*h,f=r*a-i*u,m=d*d+l*l+f*f,p=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return o[0]=d*p,o[1]=l*p,o[2]=f*p,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function m(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(g,o);let c=i,u=!1;for(;c<n-1&&!u;)e(_,c),c++,u=!(0,r.q)(g,_);if(!u)return!1;for(c=Math.max(c,s),u=!1;c<n&&!u;)e(b,c),c++,(0,r.d)(v,g,_),(0,r.n)(v,v),(0,r.d)(S,_,b),(0,r.n)(S,S),u=!(0,r.q)(g,b)&&!(0,r.q)(_,b)&&Math.abs((0,r.e)(v,S))<p;return u?(f(g,_,b,t),!0):(0!==o||1!==i||2!==s)&&m(t,e,n,0,1,2)}n(32728);const p=.99619469809,g=(0,i.vt)(),_=(0,i.vt)(),b=(0,i.vt)(),v=(0,i.vt)(),S=(0,i.vt)();function j(t,e,n){return e!==t&&a(t,e),t[3]=-(0,r.e)(t,n),t}function x(t,e,n,o){return(0,r.h)(b,e,t),l(n,b,o)}function A(t,e,n){return null!=e&&C(z(t,e.origin,e.direction,q,n))}function y(t,e,n){return C(z(t,e.origin,e.vector,0,n))}function M(t,e,n){return C(z(t,e.origin,e.vector,1,n))}function O(t,e){return T(t,e)>=0}function w(t,e){const n=(0,r.e)(t,e.ray.direction),o=-T(t,e.ray.origin);if(o<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return o>0;if((o<0||n<0)&&!(o<0&&n<0))return!0;const i=o/n;return n>0?i<e.c1&&(e.c1=i):i>e.c0&&(e.c0=i),e.c0<=e.c1}function E(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function T(t,e){return(0,r.e)(t,e)+t[3]}function C(t){return 0===t||1===t}function z(t,e,n,i,s){const c=(0,r.e)(t,n),u=T(t,e);if(0===c)return u>=0?2:3;let a=-u/c;return 1&i&&(a=(0,o.qE)(a,0,1)),!(4&i)&&a<0||!(8&i)&&a>1?u>=0?2:3:((0,r.f)(s,e,(0,r.g)(s,n,a)),u>=0?0:1)}const N=[0,0,1,0],q=8},31635:(t,e,n)=>{function o(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function r(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var o,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=e[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=e[Symbol.dispose],n&&(r=o)}if("function"!=typeof o)throw new TypeError("Object not disposable.");r&&(o=function(){try{r.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:o,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>o,hk:()=>s,mS:()=>r}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var o=new Error(n);return o.name="SuppressedError",o.error=t,o.suppressed=e,o};function s(t){function e(e){t.error=t.hasError?new i(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,o=0;return function r(){for(;n=t.stack.pop();)try{if(!n.async&&1===o)return o=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return o|=2,Promise.resolve(i).then(r,function(t){return e(t),r()})}else o|=1}catch(t){e(t)}if(1===o)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},32728:(t,e,n)=>{n.d(e,{nu:()=>s,wp:()=>i}),n(34727);var o=n(38954),r=n(51850);function i(t,e){const n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),r=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,o.i)(t,n,r,i),t}function s(t,e,n,i=(0,r.vt)()){const s=(0,o.l)(t),a=(0,o.l)(e),h=(0,o.e)(t,e)/(s*a);if(h<.9999999999999999){const r=Math.acos(h),d=((1-n)*s+n*a)/Math.sin(r),l=d/s*Math.sin((1-n)*r),f=d/a*Math.sin(n*r);return(0,o.g)(c,t,l),(0,o.g)(u,e,f),(0,o.f)(i,c,u)}return(0,o.m)(i,t,e,n)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const c=(0,r.vt)(),u=(0,r.vt)()},82919:(t,e,n)=>{n.d(e,{DV:()=>_,C:()=>p,vt:()=>f,Qy:()=>m,ui:()=>g,ST:()=>S,bU:()=>j,pw:()=>v,m7:()=>b,c8:()=>A});var o=n(4341),r=n(58083),i=n(38954),s=n(51850),c=n(87317),u=n(91829),a=n(71351);function h(t){return t?{ray:(0,a.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,a.vt)(),c0:0,c1:Number.MAX_VALUE}}new o.I(()=>h());var d=n(27921),l=n(32114);function f(t){return t?[(0,d.vt)(t[0]),(0,d.vt)(t[1]),(0,d.vt)(t[2]),(0,d.vt)(t[3]),(0,d.vt)(t[4]),(0,d.vt)(t[5])]:[(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)()]}function m(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function p(t,e){for(let n=0;n<y;n++)(0,d.C)(t[n],e[n]);return t}function g(t,e,n,o=E){const s=(0,r.lw)(l.Rc.get(),e,t);(0,r.B8)(s,s);for(let t=0;t<M;++t){const e=(0,c.t)(l.Km.get(),O[t],s);(0,i.i)(o[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}_(n,o)}function _(t,e){(0,d.Cr)(e[4],e[0],e[3],t[0]),(0,d.Cr)(e[1],e[5],e[6],t[1]),(0,d.Cr)(e[4],e[5],e[1],t[2]),(0,d.Cr)(e[3],e[2],e[6],t[3]),(0,d.Cr)(e[0],e[1],e[2],t[4]),(0,d.Cr)(e[5],e[4],e[7],t[5])}function b(t,e){for(let n=0;n<y;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}function v(t,e){return x(t,function(t,e=h()){return(0,a.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,w.get()))}function S(t,e,n){return x(t,function(t,e,n=h()){const o=(0,i.l)(t.vector);return(0,a.fA)(t.origin,e,n.ray),n.c0=0,n.c1=o,n}(e,n,w.get()))}function j(t,e){for(let n=0;n<y;n++)if((0,d.mN)(t[n],e)>0)return!1;return!0}function x(t,e){for(let n=0;n<y;n++)if(!(0,d.$Q)(t[n],e))return!1;return!0}const A={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},y=6,M=8,O=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],w=new o.I(h),E=m()},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7087],{34727:(e,t,n)=>{n.d(t,{$8:()=>B,Cc:()=>s,Hx:()=>g,Io:()=>M,KJ:()=>u,Sp:()=>c,XM:()=>f,YN:()=>m,ZH:()=>d,cU:()=>a,gg:()=>h,hs:()=>l,kU:()=>o,or:()=>v,pF:()=>U,pq:()=>b,qE:()=>r});const i=new Float32Array(1);function a(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function r(e,t,n){return Math.min(Math.max(e,t),n)}function s(e,t,n){return e+(t-e)*n}function l(e,t,n,i,a){return s(i,a,(e-t)/(n-t))}function o(e){return e*Math.PI/180}function u(e){return 180*e/Math.PI}function f(e){return Math.acos(r(e,-1,1))}function m(e){return Math.asin(r(e,-1,1))}function c(e,t,n=1e-6){return e===t||!(!Number.isFinite(e)||!Number.isFinite(t))&&(e>t?e-t:t-e)<=n}function h(e,t,n=1e-6){return!c(e,t,n)&&e>t}function d(e,t,n=1e-6){return!c(e,t,n)&&e<t}function g(e,t,n=1e-6){return c(e,t,n)||e>t}const k=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function x(e){return k.setFloat64(0,e),k.getBigInt64(0)}const p=1000000n,w=y(1);function y(e){const t=x(e=Math.abs(e)),n=function(e){return k.setBigInt64(0,e),k.getFloat64(0)}(t<=p?p:t-p);return Math.abs(e-n)}function M(e,t,n=w){if(e===t)return!0;if(!Number.isFinite(e)||!Number.isFinite(t))return!1;if(null!=n&&y(Math.min(Math.abs(e),Math.abs(t)))<n)return Math.abs(e-t)<=n;const i=x(e),a=x(t);return i<0==a<0&&!((i<a?a-i:i-a)>p)}function B(e){return V(Math.max(-b,Math.min(e,b)))}function V(e){return i[0]=e,i[0]}function v(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],i=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(c(t,1)&&c(n,1)&&c(i,1))}const b=V(34028234663852886e22);function U(e,t,n){if(void 0===n||0===+n)return Math[e](t);if(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!=0)return NaN;let i=t.toString().split("e");return i=(t=Math[e](+(i[0]+"e"+(i[1]?+i[1]-n:-n)))).toString().split("e"),+(i[0]+"e"+(i[1]?+i[1]+n:n))}},57087:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var i=n(34727),a={};a.defaultNoDataValue=(0,i.$8)(-1/0),a.decode=function(e,t){var n=(t=t||{}).encodedMaskData||null===t.encodedMaskData,u=o(e,t.inputOffset||0,n),f=null!=t.noDataValue?(0,i.$8)(t.noDataValue):a.defaultNoDataValue,m=r(u,t.pixelType||Float32Array,t.encodedMaskData,f,t.returnMask),c={width:u.width,height:u.height,pixelData:m.resultPixels,minValue:u.pixels.minValue,maxValue:u.pixels.maxValue,noDataValue:f};return m.resultMask&&(c.maskData=m.resultMask),t.returnEncodedMask&&u.mask&&(c.encodedMaskData=u.mask.bitset?u.mask.bitset:null),t.returnFileInfo&&(c.fileInfo=s(u,f),t.computeUsedBitDepths&&(c.fileInfo.bitDepths=l(u))),c};var r=function(e,t,n,i,a){var r,s,l=0,o=e.pixels.numBlocksX,f=e.pixels.numBlocksY,m=Math.floor(e.width/o),c=Math.floor(e.height/f),h=2*e.maxZError;n=n||(e.mask?e.mask.bitset:null),r=new t(e.width*e.height),a&&n&&(s=new Uint8Array(e.width*e.height));for(var d,g,k=new Float32Array(m*c),x=0;x<=f;x++){var p=x!==f?c:e.height%f;if(0!==p)for(var w=0;w<=o;w++){var y=w!==o?m:e.width%o;if(0!==y){var M,B,V,v,b=x*e.width*c+w*m,U=e.width-y,D=e.pixels.blocks[l];if(D.encoding<2?(0===D.encoding?M=D.rawData:(u(D.stuffedData,D.bitsPerPixel,D.numValidPixels,D.offset,h,k,e.pixels.maxValue),M=k),B=0):V=2===D.encoding?0:D.offset,n)for(g=0;g<p;g++){for(7&b&&(v=n[b>>3],v<<=7&b),d=0;d<y;d++)7&b||(v=n[b>>3]),128&v?(s&&(s[b]=1),r[b++]=D.encoding<2?M[B++]:V):(s&&(s[b]=0),r[b++]=i),v<<=1;b+=U}else if(D.encoding<2)for(g=0;g<p;g++){for(d=0;d<y;d++)r[b++]=M[B++];b+=U}else for(g=0;g<p;g++)if(r.fill)r.fill(V,b,b+y),b+=y+U;else{for(d=0;d<y;d++)r[b++]=V;b+=U}if(1===D.encoding&&B!==D.numValidPixels)throw"Block and Mask do not match";l++}}}return{resultPixels:r,resultMask:s}},s=function(e,t){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,minValue:e.pixels.minValue,noDataValue:t}}},l=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,n={},i=0;i<t;i++){var a=e.pixels.blocks[i];0===a.encoding?n.float32=!0:1===a.encoding?n[a.bitsPerPixel]=!0:n[0]=!0}return Object.keys(n)},o=function(e,t,n){var i={},a=new Uint8Array(e,t,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,a),"CntZImage"!=i.fileIdentifierString.trim())throw"Unexpected file identifier string: "+i.fileIdentifierString;t+=10;var r=new DataView(e,t,24);if(i.fileVersion=r.getInt32(0,!0),i.imageType=r.getInt32(4,!0),i.height=r.getUint32(8,!0),i.width=r.getUint32(12,!0),i.maxZError=r.getFloat64(16,!0),t+=24,!n)if(r=new DataView(e,t,16),i.mask={},i.mask.numBlocksY=r.getUint32(0,!0),i.mask.numBlocksX=r.getUint32(4,!0),i.mask.numBytes=r.getUint32(8,!0),i.mask.maxValue=r.getFloat32(12,!0),t+=16,i.mask.numBytes>0){var s=new Uint8Array(Math.ceil(i.width*i.height/8)),l=(r=new DataView(e,t,i.mask.numBytes)).getInt16(0,!0),o=2,u=0;do{if(l>0)for(;l--;)s[u++]=r.getUint8(o++);else{var f=r.getUint8(o++);for(l=-l;l--;)s[u++]=f}l=r.getInt16(o,!0),o+=2}while(o<i.mask.numBytes);if(-32768!==l||u<s.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=s,t+=i.mask.numBytes}else 0===(i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue)&&(s=new Uint8Array(Math.ceil(i.width*i.height/8)),i.mask.bitset=s);r=new DataView(e,t,16),i.pixels={},i.pixels.numBlocksY=r.getUint32(0,!0),i.pixels.numBlocksX=r.getUint32(4,!0),i.pixels.numBytes=r.getUint32(8,!0),i.pixels.maxValue=r.getFloat32(12,!0),t+=16;var m=i.pixels.numBlocksX,c=i.pixels.numBlocksY,h=m+(i.width%m>0?1:0),d=c+(i.height%c>0?1:0);i.pixels.blocks=new Array(h*d);for(var g=1e9,k=0,x=0;x<d;x++)for(var p=0;p<h;p++){var w=0,y=e.byteLength-t;r=new DataView(e,t,Math.min(10,y));var M={};i.pixels.blocks[k++]=M;var B=r.getUint8(0);if(w++,M.encoding=63&B,M.encoding>3)throw"Invalid block encoding ("+M.encoding+")";if(2!==M.encoding){if(0!==B&&2!==B){if(B>>=6,M.offsetType=B,2===B)M.offset=r.getInt8(1),w++;else if(1===B)M.offset=r.getInt16(1,!0),w+=2;else{if(0!==B)throw"Invalid block offset type";M.offset=r.getFloat32(1,!0),w+=4}if(g=Math.min(M.offset,g),1===M.encoding)if(B=r.getUint8(w),w++,M.bitsPerPixel=63&B,B>>=6,M.numValidPixelsType=B,2===B)M.numValidPixels=r.getUint8(w),w++;else if(1===B)M.numValidPixels=r.getUint16(w,!0),w+=2;else{if(0!==B)throw"Invalid valid pixel count type";M.numValidPixels=r.getUint32(w,!0),w+=4}}var V;if(t+=w,3!=M.encoding)if(0===M.encoding){var v=(i.pixels.numBytes-1)/4;if(v!==Math.floor(v))throw"uncompressed block has invalid length";V=new ArrayBuffer(4*v),new Uint8Array(V).set(new Uint8Array(e,t,4*v));for(var b=new Float32Array(V),U=0;U<b.length;U++)g=Math.min(g,b[U]);M.rawData=b,t+=4*v}else if(1===M.encoding){var D=Math.ceil(M.numValidPixels*M.bitsPerPixel/8),I=Math.ceil(D/4);V=new ArrayBuffer(4*I),new Uint8Array(V).set(new Uint8Array(e,t,D)),M.stuffedData=new Uint32Array(V),t+=D}}else t++,g=Math.min(g,0)}return i.pixels.minValue=g,i.eofOffset=t,i},u=function(e,t,n,i,a,r,s){var l,o,u,f=(1<<t)-1,m=0,c=0,h=Math.ceil((s-i)/a),d=4*e.length-Math.ceil(t*n/8);for(e[e.length-1]<<=8*d,l=0;l<n;l++){if(0===c&&(u=e[m++],c=32),c>=t)o=u>>>c-t&f,c-=t;else{var g=t-c;o=(u&f)<<g&f,o+=(u=e[m++])>>>(c=32-g)}r[l]=o<h?i+o*a:s}return r};const f=a.decode;class m{_decode(e){const t=f(e.buffer,e.options);return Promise.resolve({result:t,transferList:[t.pixelData.buffer]})}}function c(){return new m}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2741],{926:(e,t,r)=>{r.d(t,{CG:()=>a,Dd:()=>i,Jn:()=>l,Qc:()=>c});var s=r(92602),n=r(84952);const o=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]);function a(e){if(!c(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),r=s.A.apiKeys;if(Array.isArray(r.scopes))for(const e of r.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return r.basemapStyles&&/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i.test(e)?r.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?s.A.apiKey:null}function i(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function l(e,t){return t?c(e):null!=a(e)}function c(e){const t=(0,n.$z)(e,!0);return!!t&&!o.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},2741:(e,t,r)=>{r.d(t,{s:()=>i});var s=r(92602),n=(r(78888),r(49186)),o=r(53966),a=r(84952);function i(e){if(!s.A.assetsPath)throw o.A.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.A("assets:path-not-set","config.assetsPath is not set");return(0,a.fj)(s.A.assetsPath,e)}},56058:(e,t,r)=>{r.d(t,{$x:()=>v,Sx:()=>c,c8:()=>f,gS:()=>w,m3:()=>g,ql:()=>p,tz:()=>h,xW:()=>m});var s=r(92602),n=r(44208),o=r(74887),a=r(84952),i=r(60694),l=r(39131);function c(e,t,r=!1,s){return new Promise((a,i)=>{if((0,o.G4)(s))return void i(u());let l=()=>{p(),i(new Error(`Unable to load ${t}`))},c=()=>{const t=e;p(),a(t)},d=()=>{if(!e)return;const t=e;p(),t.src="",i(u())};const p=()=>{(0,n.A)("esri-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",c)),l=null,c=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=s&&s.addEventListener("abort",d),(0,n.A)("esri-image-decode")?e.decode().then(c,l):(e.addEventListener("error",l),e.addEventListener("load",c))})}function u(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const d="Timeout exceeded";function p(){return new Error(d)}function f(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===d}function h(e){s.A.request.crossOriginNoCorsDomains||(s.A.request.crossOriginNoCorsDomains={});const t=s.A.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,a.$z)(r)??""]=0:(t[(0,a.$z)("http://"+r)??""]=0,t[(0,a.$z)("https://"+r)??""]=0)}function m(e){const t=s.A.request.crossOriginNoCorsDomains;if(t){let r=(0,a.$z)(e);if(r)return r=r.toLowerCase(),!(0,a.FX)(r,(0,a.Xq)())&&t[r]<Date.now()-36e5}return!1}async function g(e){const t=(0,a.An)(e);e=t.path,"json"===t.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}const r=s.A.request.crossOriginNoCorsDomains,n=(0,a.$z)(e);r&&n&&(r[n.toLowerCase()]=Date.now())}const y=new Map;function w(e,t){const r=t?.preferredHost;if(!r||(0,a.FX)(e,`https://${r}`,!0))return;const s=(0,i.qg)(e);if(!s||"FeatureServer"!==s.serverType||(0,l.$E)(e))return;const n=s.url.path.toLowerCase();y.has(n)||y.set(n,r)}function v(e){const t=(0,i.qg)(e)?.url.path.toLowerCase();if(!t)return e;const r=y.get(t);return r?(0,a.hf)(e,r):e}},60694:(e,t,r)=>{r.d(t,{Fi:()=>u,HZ:()=>y,Jf:()=>g,LS:()=>w,Wo:()=>m,bd:()=>v,cr:()=>f,iz:()=>p,qg:()=>d,yG:()=>h});var s=r(84952),n=r(97159);const o={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},a=Object.values(o),i=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return i.test(e)}function d(e){if(null==e)return null;const t=(0,s.An)(e),r=t?.path.match(i)||t?.path.match(l);if(!r)return null;const[,n,a,c,u]=r,d=a.indexOf("/");return{title:f(-1!==d?a.slice(d+1):a),serverType:o[c.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:n}}}function p(e){const t=(0,s.An)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=d(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function m(e){let t=(0,s.$z)(e,!0);return!!t&&(t=t.toLowerCase(),t.endsWith(".arcgis.com")&&(t.startsWith("services")||t.startsWith("tiles")||t.startsWith("features")||/^[a-z\d-]+\.svcs[a-z\d-]*\./.test(t)))}function g(e,t){return e?(0,s.UC)((0,s.zi)(e,t)):e}function y(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.zi)(t,e.logger);const r=(0,s.An)(t),n=d(r.path);let o;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(r.path);null!=e&&(t=e.serviceUrl,o=e.sublayerId)}return{url:(0,s.UC)(t),layerId:o}}function w(e,t,r,o,a){(0,n.w)(t,o,"url",a),o.url&&null!=e.layerId&&(o.url=(0,s.fj)(o.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),s=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),o=t.includes("/wmsserver");return r&&(s||n||o)}},78888:(e,t,r)=>{r.d(t,{A:()=>m});var s=r(92602),n=r(70333),o=r(49186),a=r(44208),i=r(4718),l=r(91869),c=r(74887),u=r(84952),d=r(60694),p=r(39131),f=r(926),h=r(56058);async function m(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,u.zf)(t.query.toString().replaceAll("+"," ")));const s=(0,u.DB)(e),n=(0,u.w8)(e);n||s||(e=(0,u.S8)(e));const o={url:e,requestOptions:{...t}},i=e=>({data:e,getAllHeaders:C,getHeader:C,httpStatus:200,requestOptions:o.requestOptions,url:o.url}),p=(0,u.sC)(e,w.internalInterceptors);if(p){const e=await E(p,o);if(null!=e)return i(e)}let f=(0,u.sC)(e);if(f){const e=await E(f,o);if(null!=e)return i(e);f.after||f.error||(f=null)}if(e=o.url,"image"===(t=o.requestOptions).responseType&&((0,a.A)("host-webworker")||(0,a.A)("host-node")))throw O("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),o);if("head"===t.method){if(t.body)throw O("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),o);if(s||n)throw O("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),o)}if(await async function(){(0,a.A)("host-webworker")&&(!g&&globalThis.invokeStaticMessage?g=await r.e(369).then(r.bind(r,40369)):y=!0)}(),g)return g.execute(e,t);const h=new AbortController,m=(0,c.u7)(t,()=>h.abort()),v={controller:h,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:f,params:o,redoRequest:!1,useIdentity:w.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},b=t.useRequestQueue?async function(e){const t=function(e){let t,r;return"string"==typeof e?(t=(0,u.$z)(e,!0),r=(0,d.Wo)(e)):(t=e.origin,r=(0,d.Wo)(e.toString())),null==t?null:{origin:t,isHosted:r}}(e.params.url);if(!t)return $(e);const{QueueProcessor:s}=await r.e(563).then(r.bind(r,563)),n=(0,l.tE)(P,t.origin,()=>{const e=t.isHosted?(0,a.A)("request-queue-concurrency-hosted"):(0,a.A)("request-queue-concurrency-non-hosted");return new s({concurrency:e,process:e=>{if((0,c.G4)(e.params.requestOptions))throw O("",(0,c.NK)("Request canceled"),e.params);return $(e)}})});return n.push(e)}(v):$(v),q=await b.finally(()=>m?.remove());return f?.after?.(q),q}let g,y=!1;const w=s.A.request,v="FormData"in globalThis,b=new Set([499,498,403,401]),q=new Set(["COM_0056","COM_0057","SB_0008"]),S=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],C=()=>null,A=Symbol();function x(e){const t=(0,u.$z)(e);return!t||t.endsWith(".arcgis.com")||m._corsServers.includes(t)||(0,u.FL)(t)}function O(e,t,r,s){let n;const a={url:r.url,requestOptions:r.requestOptions,getAllHeaders:C,getHeader:C,ssl:!1};if(t instanceof o.A)return t.details?(t.details=(0,i.o8)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(()=>Array.from(s.headers)),r=s&&(e=>s.headers.get(e)),o=s?.status,i=t.message;i&&(n=i),e&&r&&(a.getAllHeaders=e,a.getHeader=r),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||o||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?(a.messages=[t.details],n??=t.details):(a.messages=t.details,n??=a.messages?.[0]),a.raw=A in t?t[A]:t}return n??="Error",(0,c.zf)(t)?(0,c.NK)():new o.A(e,n,a)}async function T(){n.id||await Promise.all([r.e(5431),r.e(7330),r.e(4813),r.e(4946),r.e(6791),r.e(3747),r.e(2507)]).then(r.bind(r,73747))}function k(e){return S.some(t=>t.test(e))}async function L(e){let t=e.params.url,r=(0,h.$x)(t);const s=e.params.requestOptions,o=e.fetchOptions??{},i=(0,u.w8)(t)||(0,u.DB)(t),l=s.responseType||"json",d=i?0:null!=s.timeout?s.timeout:w.timeout;let f=!1;if(!i){e.useSSL&&(t=(0,u.lM)(t));let i={...s.query};e.credentialToken&&(i.token=e.credentialToken);let l=(0,u.x0)(i);(0,a.A)("esri-url-encodes-apostrophe")&&(l=l.replaceAll("'","%27"));const c=r.length+1+l.length;let d;f="delete"===s.method||"post"===s.method||"put"===s.method||!!s.body||c>w.maxUrlLength;const m=s.useProxy||!!(0,u.zs)(t);if(m){const e=(0,u.s_)(t);d=e.path,!f&&d.length+1+c>w.maxUrlLength&&(f=!0),e.query&&(i={...e.query,...i})}if("HEAD"===o.method&&(f||m)){if(f){if(c>w.maxUrlLength)throw O("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw O("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(m)throw O("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(f?(o.method="delete"===s.method?"DELETE":"put"===s.method?"PUT":"POST",s.body?t=(0,u.a6)(t,i):(o.body=(0,u.x0)(i),o.headers||(o.headers={}),o.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,u.a6)(t,i),m&&(e.useProxy=!0,t=`${d}?${t}`),i.token&&v&&o.body instanceof FormData&&!(0,p.$E)(t)&&o.body.set("token",i.token),s.hasOwnProperty("withCredentials"))e.withCredentials=s.withCredentials;else if(!(0,u.FX)(t,(0,u.Xq)()))if((0,u.FL)(t))e.withCredentials=!0;else if(n.id){const r=n.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(o.credentials="include",(0,h.xW)(t)&&await(0,h.m3)(f?(0,u.a6)(t,i):t)),r=(0,h.$x)(t)}let g,y,b=0,q=!1;d>0&&(b=setTimeout(()=>{q=!0,e.controller.abort()},d));try{if("native-request-init"===s.responseType)y=o,y.url=r,s.signal?y.signal=s.signal:delete y.signal;else if("image"!==s.responseType||"default"!==o.cache||o.keepalive||"GET"!==o.method||f||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(s.headers)||!i&&!e.useProxy&&w.proxyUrl&&!x(t)){if(m._beforeFetch&&await m._beforeFetch(t,o),g=await fetch(r,o),m._afterFetch&&await m._afterFetch(g),e.useProxy||function(e){const t=(0,u.$z)(e);t&&!m._corsServers.includes(t)&&m._corsServers.push(t)}(t),"native"===s.responseType)y=g;else if("HEAD"!==o.method)if(g.ok){switch(l){case"array-buffer":y=await g.arrayBuffer();break;case"blob":case"image":y=await g.blob();break;default:y=await g.text()}if(b&&(clearTimeout(b),b=0),"json"===l||"xml"===l||"document"===l)if(y)switch(l){case"json":y=JSON.parse(y);break;case"xml":y=U(y,"application/xml");break;case"document":y=U(y,"text/html")}else y=null;if(y){if("array-buffer"===l||"blob"===l){const e=g.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&y["blob"===l?"size":"byteLength"]<=750)try{const e=await new Response(y).json();e.error&&(y=e)}catch{}}"image"===l&&y instanceof Blob&&(y=await R(URL.createObjectURL(y),e,!0))}}else{y=await g.text();try{y=JSON.parse(y)}catch{}}}else y=await R(r,e)}catch(r){if("AbortError"===r.name){if(q)throw(0,h.ql)();throw(0,c.NK)("Request canceled")}if(!(!g&&r instanceof TypeError&&w.proxyUrl)||s.body||"delete"===s.method||"head"===s.method||"post"===s.method||"put"===s.method||e.useProxy||x(t))throw r;e.redoRequest=!0,(0,u.oy)({proxyUrl:w.proxyUrl,urlPrefix:(0,u.$z)(t)??""})}finally{b&&clearTimeout(b)}return[g,y]}async function E(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=O("request:interceptor",e,t)}if((s instanceof Error||s instanceof o.A)&&(r=O("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}function U(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}m._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"],m._beforeFetch=void 0,m._afterFetch=void 0;const P=new Map;async function $(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,s=e.controller.signal,o=r.body;let a=null,i=null;if(v&&"HTMLFormElement"in globalThis&&(o instanceof FormData?a=o:o instanceof HTMLFormElement&&(a=new FormData(o))),"string"==typeof o&&(i=o),e.fetchOptions={cache:r.cacheBust?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},keepalive:r.keepAlive??!1,method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:w.priority,redirect:"follow",signal:s},(a||i)&&(e.fetchOptions.body=a||i),(y||"anonymous"===r.authMode)&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||a?.get("token")),!e.hasToken){const s=(0,f.CG)(t);s&&(r.query??={},r.query.token=s,e.hasToken=!0)}if(e.useIdentity&&!e.hasToken&&!e.credential&&!e.credentialToken&&!k(t)&&!(0,c.G4)(s)){let o;"immediate"===r.authMode?(await T(),o=await n.id.getCredential(t,{signal:s})):"no-prompt"===r.authMode?(await T(),o=await n.id.getCredential(t,{prompt:!1,signal:s}).catch(()=>{})):n.id&&(o=n.id.findCredential(t)),o&&(e.credential=o,e.credentialToken=o.token,e.useSSL=!!o.ssl)}}(e);try{do{[t,r]=await L(e)}while(!await I(e,t,r))}catch(r){const s=O("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}const s=e.params.url;if(r)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(s)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,u.FL)(s)){const e=(0,u.$z)(s,!0);e&&w.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,h.tz)(r.authorizedCrossOriginNoCorsDomains)}else"json"===(e.params.requestOptions.responseType||"json")&&(0,h.gS)(s,r);const o=e.credential;if(o&&n.id){const e=n.id.findServerInfo(o.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=n.id.findCredential(t,o.userId);e&&-1===n.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getAllHeaders:t?()=>Array.from(t.headers):C,getHeader:t?e=>t.headers.get(e):C,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function I(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(r&&(r.error&&"object"==typeof r.error?o=r.error:"error"===r.status&&Array.isArray(r.messages)&&(o={...r},o[A]=r,o.details=r.messages)),!o&&!t.ok)throw o=new Error(`Unable to load ${t.url} status: ${t.status}`),o[A]=r,o;let i,l=null;o&&(a=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const c=s.authMode;if(403===a&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&b.has(a)&&!k(e.params.url)&&(403!==a||(!i||!q.has(i))&&(null==l||2===l&&e.credentialToken))){await T();try{const t=await n.id.getCredential(e.params.url,{error:O("request:server",o,e.params),credential:e.credential,prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;o=t}}if(o)throw o;return!0}function R(e,t,r=!1){const s=t.controller.signal,n=new Image;return t.withCredentials?n.crossOrigin="use-credentials":n.crossOrigin="anonymous",n.alt="",n.fetchPriority=w.priority,n.src=e,(0,h.Sx)(n,e,r,s)}},91869:(e,t,r)=>{function s(e,t){for(const r of e.values())if(t(r))return!0;return!1}function n(e,t,r){const s=e.get(t);if(void 0!==s)return s;const n=r();return e.set(t,n),n}function o(e){const t=new Map;return r=>(t.has(r)||t.set(r,e(r)),t.get(r))}r.d(t,{Bj:()=>o,Bs:()=>s,tE:()=>n})},97159:(e,t,r)=>{r.d(t,{a:()=>g,b:()=>w,e:()=>h,f:()=>a,i:()=>p,p:()=>f,r:()=>l,t:()=>i,w:()=>c});var s=r(70333),n=r(84952),o=r(39131);function a(e,t){const r=t?.url?.path;if(e&&r&&(e=(0,n.s2)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,n.V1)(e,t.portalItem.itemUrl);null!=r&&r.startsWith(d)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return(e=m(e,t?.portal))&&u.test(e)?g(e):e}function i(e,t,r=0){if(null==(e=e&&u.test(e)?y(e):e))return e;!(0,n.oP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,n.s2)(e);if(t){const r=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(r){const o=m(r,t.portal),a=m(s,t.portal);s=(0,n.V1)(a,o,o),null!=s&&s!==a&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=h(s,t?.portal),(0,n.oP)(s)&&(s=(0,n.S8)(s)),t?.resources&&t?.portalItem&&!(0,n.oP)(s)&&!(0,n.DB)(s)&&0===r&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,t,r){return a(e,r)}function c(e,t,r,s){const n=i(e,s);void 0!==n&&(t[r]=n)}const u=/\/items\/([^/]+)\/resources\/(.*)/,d="./resources/";function p(e){const t=e?.match(u)??null;return t?.[1]??null}function f(e){const t=e?.match(u)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,n.xw)(r);return{prefix:null,filename:e,extension:t}}const{path:o,extension:a}=(0,n.xw)(r.slice(s+1));return{prefix:r.slice(0,s),filename:o,extension:a}}function h(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,n.T1)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function m(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,n.Xq)();return(0,n.FX)(s,`${s.scheme}://${r}`)?(0,n.T1)(e,t.portalHostname,r):(0,n.T1)(e,r,t.portalHostname)}function g(e){if(!e)return e||null;let t=e;return t&&s.id&&!s.id.findCredential(t)&&(t=(0,o.qG)(t),t=t.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),t=t.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),t=t.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),t}function y(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),t=t.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),t=t.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),t&&s.id&&!s.id.findCredential(t)&&(t=(0,o.qG)(t)),t}const w=Object.freeze(Object.defineProperty({__proto__:null,ensureMainOnlineDomain:h,fromCDNUrl:y,fromJSON:a,itemIdFromResourceUrl:p,prefixAndFilenameFromResourceUrl:f,read:l,toCDNUrl:g,toJSON:i,write:c},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1882],{537:(t,n,e)=>{e.d(n,{B$:()=>g,LJ:()=>m,Pj:()=>d,Rg:()=>p,Yz:()=>y,z8:()=>f});var i=e(19419);function r(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function o(t){return void 0!==t.x&&void 0!==t.y}function a(t){return void 0!==t.paths}function h(t){return void 0!==t.rings}function l(t){return function(n,e){return null==n?e:null==e?n:t(n,e)}}const u=l(Math.min),c=l(Math.max);function p(t,n){return a(n)?y(t,n.paths,!1,!1):h(n)?y(t,n.rings,!1,!1):s(n)?d(t,n.points,!1,!1,!1,!1):r(n)?x(t,n):(o(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.x,t[3]=n.y),t)}function f(t){let n,e,r,s;for(t.reset(),n=r=1/0,e=s=-1/0;t.nextPath();){const i=g(t);n=Math.min(i[0],n),r=Math.min(i[1],r),e=Math.max(i[2],e),s=Math.max(i[3],s)}return(0,i.vt)([n,r,e,s])}function g(t){let n,e,r,s;for(n=r=1/0,e=s=-1/0;t.nextPoint();)n=Math.min(t.x,n),r=Math.min(t.y,r),e=Math.max(t.x,e),s=Math.max(t.y,s);return(0,i.vt)([n,r,e,s])}function m(t,n){return a(n)?y(t,n.paths,!0,!1):h(n)?y(t,n.rings,!0,!1):s(n)?d(t,n.points,!0,!1,!0,!1):r(n)?x(t,n,0,0,!0,!1):(o(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=n.x,t[4]=n.y,t[5]=n.z),t)}function y(t,n,e,i){const r=e?3:2;if(!n.length||!n[0].length)return null;let s,o,a,h,[l,p]=n[0][0],[f,g]=n[0][0];for(let t=0;t<n.length;t++){const m=n[t];for(let t=0;t<m.length;t++){const n=m[t],[y,x]=n;if(l=u(l,y),p=u(p,x),f=c(f,y),g=c(g,x),e&&n.length>2){const t=n[2];s=u(s,t),o=c(o,t)}if(i&&n.length>r){const t=n[r];a=u(s,t),h=c(o,t)}}}return e?i?(t[0]=l,t[1]=p,t[2]=s,t[3]=a,t[4]=f,t[5]=g,t[6]=o,t[7]=h,t.length=8,t):(t[0]=l,t[1]=p,t[2]=s,t[3]=f,t[4]=g,t[5]=o,t.length=6,t):i?(t[0]=l,t[1]=p,t[2]=a,t[3]=f,t[4]=g,t[5]=h,t.length=6,t):(t[0]=l,t[1]=p,t[2]=f,t[3]=g,t.length=4,t)}function x(t,n,e,i,r,s){const o=n.xmin,a=n.xmax,h=n.ymin,l=n.ymax;let u=n.zmin,c=n.zmax,p=n.mmin,f=n.mmax;return r?(u=u||0,c=c||0,s?(p=p||0,f=f||0,t[0]=o,t[1]=h,t[2]=u,t[3]=p,t[4]=a,t[5]=l,t[6]=c,t[7]=f,t):(t[0]=o,t[1]=h,t[2]=u,t[3]=a,t[4]=l,t[5]=c,t)):s?(p=p||0,f=f||0,t[0]=o,t[1]=h,t[2]=p,t[3]=a,t[4]=l,t[5]=f,t):(t[0]=o,t[1]=h,t[2]=a,t[3]=l,t)}function d(t,n,e,i,r,s){const o=e?3:2,a=i&&s,h=e&&r;if(!n.length||!n[0].length)return null;let l,p,f,g,[m,y]=n[0],[x,d]=n[0];for(let t=0;t<n.length;t++){const e=n[t],[i,r]=e;if(m=u(m,i),y=u(y,r),x=c(x,i),d=c(d,r),h&&e.length>2){const t=e[2];l=u(l,t),p=c(p,t)}if(a&&e.length>o){const t=e[o];f=u(l,t),g=c(p,t)}}return r?(l=l||0,p=p||0,s?(f=f||0,g=g||0,t[0]=m,t[1]=y,t[2]=l,t[3]=f,t[4]=x,t[5]=d,t[6]=p,t[7]=g,t):(t[0]=m,t[1]=y,t[2]=l,t[3]=x,t[4]=d,t[5]=p,t)):s?(f=f||0,g=g||0,t[0]=m,t[1]=y,t[2]=f,t[3]=x,t[4]=d,t[5]=g,t):(t[0]=m,t[1]=y,t[2]=x,t[3]=d,t)}},12359:(t,n,e)=>{e.d(n,{IK:()=>l,TP:()=>c,Z4:()=>s,l8:()=>o,w2:()=>h});var i=e(51118),r=e(95108);function s(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function o(t){return t?function(t,n){if(!t?.length)return null;const e=[],i=[],s=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let e=0,r=t.length;e<r;e++){const r=a(t[e],n,s);r&&i.push(r)}if(i.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i}),i.length&&(e[0]=i[0][0],e[1]=i[0][1],n&&(e[2]=i[0][3]),(e[0]<s[0]||e[0]>s[1]||e[1]<s[2]||e[1]>s[3]||n&&(e[2]<s[4]||e[2]>s[5]))&&(e.length=0)),!e.length){const i=t[0]&&t[0].length?function(t,n){const e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;for(let l=0,u=t.length;l<u-1;l++){const u=t[l],c=t[l+1];if(u&&c){e[0]=u[0],e[1]=u[1],i[0]=c[0],i[1]=c[1],n&&u.length>2&&c.length>2&&(e[2]=u[2],i[2]=c[2]);const t=(0,r.R3)(e,i);if(t){s+=t;const e=(0,r.t9)(u,c);o+=t*e[0],a+=t*e[1],n&&e.length>2&&(h+=t*e[2])}}}return s>0?n?[o/s,a/s,h/s]:[o/s,a/s]:t.length?t[0]:null}(t[0],n):null;if(!i)return null;e[0]=i[0],e[1]=i[1],n&&i.length>2&&(e[2]=i[2])}return e}(t.rings,t.hasZ??!1):null}function a(t,n,e){let i=0,r=0,s=0,o=0,a=0;const h=t.length?t[0][0]:0,l=t.length?t[0][1]:0,u=t.length&&n?t[0][2]:0;for(let c=0;c<t.length;c++){const p=t[c],f=t[(c+1)%t.length],[g,m,y]=p,x=g-h,d=m-l,[v,P,R]=f,I=v-h,A=P-l,M=x*A-I*d;if(o+=M,i+=(x+I)*M,r+=(d+A)*M,n&&p.length>2&&f.length>2){const t=y-u,n=R-u,e=x*n-I*t;s+=(t+n)*e,a+=e}g<e[0]&&(e[0]=g),g>e[1]&&(e[1]=g),m<e[2]&&(e[2]=m),m>e[3]&&(e[3]=m),n&&(y<e[4]&&(e[4]=y),y>e[5]&&(e[5]=y))}if(o>0&&(o*=-1),a>0&&(a*=-1),!o)return null;o*=.5,a*=.5;const c=[i/(6*o)+h,r/(6*o)+l,o];return n&&(e[4]===e[5]||0===a?(c[3]=(e[4]+e[5])/2,c[4]=0):(c[3]=s/(6*a)+u,c[4]=a)),c}function h(t,n){let e=0,i=0,r=0;t.nextPoint();const s=t.pathSize?t.x:0,o=t.pathSize?t.y:0;for(let a=0;a<t.pathSize;a++){t.seekInPath(a);const h=[t.x,t.y];t.seekInPath((a+1)%t.pathSize);const l=[t.x,t.y],[u,c]=h,p=u-s,f=c-o,[g,m]=l,y=g-s,x=m-o,d=p*x-y*f;r+=d,e+=(p+y)*d,i+=(f+x)*d,u<n[0]&&(n[0]=u),u>n[1]&&(n[1]=u),c<n[2]&&(n[2]=c),c>n[3]&&(n[3]=c)}return r>0&&(r*=-1),r?(r*=.5,[e/(6*r)+s,i/(6*r)+o,r]):null}function l(t){const{hasZ:n,totalSize:e}=t;if(0===e)return null;const s=[],o=[],h=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const n=a((0,i.A)(t),t.hasZ,h);n&&o.push(n)}if(o.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i}),o.length&&(s[0]=o[0][0],s[1]=o[0][1],n&&(s[2]=o[0][3]),(s[0]<h[0]||s[0]>h[1]||s[1]<h[2]||s[1]>h[3]||n&&(s[2]<h[4]||s[2]>h[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const e=t.pathSize?function(t){const{hasZ:n}=t,e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;if(t.nextPoint()){let l=t.x,u=t.y,c=t.z;for(;t.nextPoint();){const p=t.x,f=t.y,g=t.z;e[0]=l,e[1]=u,i[0]=p,i[1]=f,n&&(e[2]=c,i[2]=g);const m=(0,r.R3)(e,i);if(m){s+=m;const t=(0,r.t9)(e,i);o+=m*t[0],a+=m*t[1],n&&t.length>2&&(h+=m*t[2])}l=p,u=f,c=g}}return s>0?n?[o/s,a/s,h/s]:[o/s,a/s]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!e)return null;s[0]=e[0],s[1]=e[1],n&&e.length>2&&(s[2]=e[2])}return s}const u=1e-6;function c(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<u){const n=l(t);return n?[n[0],n[1]]:null}const e=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const i=[t.x,t.y];for(t.reset();t.nextPath();)f(e,i,t);return e[0]*=1/n,e[1]*=1/n,e[0]+=i[0],e[1]+=i[1],e}const p=1/3;function f(t,n,e){if(!t||!e||e.pathSize<3)return null;e.nextPoint();const i=e.x,r=e.y;e.nextPoint();let s,o=e.x-i,a=e.y-r,h=0,l=0;for(;e.nextPoint();)h=e.x-i,l=e.y-r,s=.5*p*(h*a-l*o),t[0]+=s*(o+h),t[1]+=s*(a+l),o=h,a=l;const u=e.getCurrentRingArea(),c=[i,r];return c[0]-=n[0],c[1]-=n[1],c[0]*=u,c[1]*=u,t[0]+=c[0],t[1]+=c[1],t}},39829:(t,n,e)=>{e.d(n,{A:()=>M});var i,r=e(31635),s=e(4576),o=e(51447),a=e(4718),h=e(53966),l=e(10107),u=(e(44208),e(40608)),c=e(43937),p=e(5443),f=e(91075),g=e(86738),m=e(16930),y=e(12359),x=e(94078),d=e(95108),v=e(90634),P=e(12176),R=e(28735),I=e(56993);function A(t){return!Array.isArray(t[0])}let M=i=class extends f.A{static fromExtent(t){const n=t.clone().normalize(),{spatialReference:e}=t;let r=!1,s=!1;for(const t of n)t.hasZ&&(r=!0),t.hasM&&(s=!0);const o={rings:n.map(t=>{const n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r&&t.hasZ){const e=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<n.length;t++)n[t].push(e)}if(s&&t.hasM){const e=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<n.length;t++)n[t].push(e)}return n}),spatialReference:e};return r&&(o.hasZ=!0),s&&(o.hasM=!0),new i(o)}constructor(t){super(function(t){if(!t)return;let{rings:n,hasM:e,hasZ:i,spatialReference:r}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:i??=!0,e??=!0;break;case 3:i??=!0!==e,e??=!i;break;default:i??=!1,e??=!1}return r??=m.A.WGS84,{...t,hasM:e,hasZ:i,rings:n,spatialReference:r}}(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){const t=(0,y.l8)(this);if(!t||isNaN(t[0])||isNaN(t[1])||this.hasZ&&isNaN(t[2]))return null;const n=new g.A;return n.x=t[0],n.y=t[1],n.spatialReference=this.spatialReference,this.hasZ&&(n.z=t[2]),n}writeCurveRings(t,n){n.curveRings=(0,a.o8)(t)}get extent(){const t=(0,v.v)(this),{spatialReference:n}=this;return t?new p.A({...t,spatialReference:n}):null}get isSelfIntersecting(){return(0,o.Lx)(h.A.getLogger(this),"isSelfIntersecting",{replacement:"Please use simplifyOperator.isSimple() instead.",version:"4.33",warnOnce:!0}),(0,P.A3)(this.rings)}writeRings(t,n){n.rings=(0,a.o8)(this.rings)}addRing(t){if(!t)return;const n=this.rings,e=n.length;if(A(t)){const i=[];for(let n=0,e=t.length;n<e;n++)i[n]=t[n].toArray();n[e]=i}else n[e]=t.slice();return this.notifyChange("rings"),this}clone(){const t=new i;return t.spatialReference=this.spatialReference,t.rings=(0,a.o8)(this.rings),t.curveRings=(0,a.o8)(this.curveRings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const n=this.spatialReference,e=t.spatialReference;if(null!=n!=(null!=e))return!1;if(null!=n&&null!=e&&!n.equals(e))return!1;if(this.rings.length!==t.rings.length)return!1;const i=([t,n,e,i],[r,s,o,a])=>t===r&&n===s&&(null==e&&null==o||e===o)&&(null==i&&null==a||i===a);for(let n=0;n<this.rings.length;n++){const e=this.rings[n],r=t.rings[n];if(!(0,s.aI)(e,r,i))return!1}return!0}contains(t){if(!t)return!1;const n=(0,R.Cv)(t,this.spatialReference);return(0,x.m3)(this,null!=n?n:t)}isClockwise(t){const n=A(t)?t.map(t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y]):t;return(0,d.$3)(n)}getPoint(t,n){if(!this._validateInputs(t,n))return null;const e=this.rings[t][n],i=this.hasZ,r=this.hasM;return i&&!r?new g.A(e[0],e[1],e[2],void 0,this.spatialReference):r&&!i?new g.A(e[0],e[1],void 0,e[2],this.spatialReference):i&&r?new g.A(e[0],e[1],e[2],e[3],this.spatialReference):new g.A(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,I.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t].splice(n,0,e),this.notifyChange("rings"),this):this}removePoint(t,n){if(!this._validateInputs(t,n))return null;const e=new g.A(this.rings[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("rings"),e}removeRing(t){if(!this._validateInputs(t,null))return null;const n=this.rings.splice(t,1)[0],e=this.spatialReference,i=n.map(t=>new g.A(t,e));return this.notifyChange("rings"),i}setPoint(t,n,e){return this._validateInputs(t,n)?((0,I.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t][n]=e,this.notifyChange("rings"),this):this}_validateInputs(t,n,e=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=n){const i=this.rings[t];if(e&&(n<0||n>i.length))return!1;if(!e&&(n<0||n>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,l.MZ)({readOnly:!0})],M.prototype,"cache",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],M.prototype,"centroid",null),(0,r.Cg)([(0,l.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],M.prototype,"curveRings",void 0),(0,r.Cg)([(0,c.K)("curveRings")],M.prototype,"writeCurveRings",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],M.prototype,"extent",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],M.prototype,"isSelfIntersecting",null),(0,r.Cg)([(0,l.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],M.prototype,"rings",void 0),(0,r.Cg)([(0,c.K)("rings")],M.prototype,"writeRings",null),M=i=(0,r.Cg)([(0,u.$)("esri.geometry.Polygon")],M),M.prototype.toJSON.isDefaultToJSON=!0},48526:(t,n,e)=>{e.d(n,{A:()=>g});var i,r=e(31635),s=e(4718),o=e(10107),a=(e(44208),e(53966),e(40608)),h=e(43937),l=e(5443),u=e(91075),c=e(86738),p=e(56993);function f(t){return(n,e)=>null==n?e:null==e?n:t(n,e)}let g=i=class extends u.A{constructor(...t){super(...t),this.points=[],this.type="multipoint"}normalizeCtorArgs(t,n){if(!t&&!n)return{};const e={};Array.isArray(t)?(e.points=t,e.spatialReference=n):function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?e.spatialReference=t:(t.points&&(e.points=t.points),t.spatialReference&&(e.spatialReference=t.spatialReference),t.hasZ&&(e.hasZ=t.hasZ),t.hasM&&(e.hasM=t.hasM));const i=e.points?.[0];return i&&(void 0===e.hasZ&&void 0===e.hasM?(e.hasZ=i.length>2,e.hasM=!1):void 0===e.hasZ?e.hasZ=i.length>3:void 0===e.hasM&&(e.hasM=i.length>3)),e}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const t=this.points;if(!t.length)return null;const n=new l.A,e=this.hasZ,i=this.hasM,r=e?3:2,s=t[0],o=f(Math.min),a=f(Math.max);let h,u,c,p,[g,m]=s,[y,x]=s;for(let n=0,s=t.length;n<s;n++){const s=t[n],[l,f]=s;if(g=o(g,l),m=o(m,f),y=a(y,l),x=a(x,f),e&&s.length>2){const t=s[2];h=o(h,t),c=a(c,t)}if(i&&s.length>r){const t=s[r];u=o(u,t),p=a(p,t)}}return n.xmin=g,n.ymin=m,n.xmax=y,n.ymax=x,n.spatialReference=this.spatialReference,e?(n.zmin=h,n.zmax=c):(n.zmin=void 0,n.zmax=void 0),i?(n.mmin=u,n.mmax=p):(n.mmin=void 0,n.mmax=void 0),n}writePoints(t,n){n.points=(0,s.o8)(this.points)}addPoint(t){return(0,p.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}clone(){const t={points:(0,s.o8)(this.points),spatialReference:this.spatialReference};return this.hasZ&&(t.hasZ=!0),this.hasM&&(t.hasM=!0),new i(t)}getPoint(t){if(!this._validateInputs(t))return null;const n=this.points[t],e={x:n[0],y:n[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(e.z=n[2],i=3),this.hasM&&(e.m=n[i]),new c.A(e)}removePoint(t){if(!this._validateInputs(t))return null;const n=new c.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),n}setPoint(t,n){return this._validateInputs(t)?((0,p.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.points[t]=n,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],g.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)()],g.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],g.prototype,"points",void 0),(0,r.Cg)([(0,h.K)("points")],g.prototype,"writePoints",null),g=i=(0,r.Cg)([(0,a.$)("esri.geometry.Multipoint")],g),g.prototype.toJSON.isDefaultToJSON=!0},51118:(t,n,e)=>{function i(t){const n=[];for(t.reset();t.nextPath();){const e=[];for(;t.nextPoint();)e.push([t.x,t.y]);n.push(e)}return t.reset(),n}function r(t){const n=[];for(;t.nextPoint();)n.push([t.x,t.y]);return t.seekPathStart(),n}e.d(n,{A:()=>r,x:()=>i})},56993:(t,n,e)=>{function i(t,n,e=!1){let{hasM:i,hasZ:r}=t;Array.isArray(n)?4!==n.length||i||r?3===n.length&&e&&!i?(r=!0,i=!1):3===n.length&&i&&r&&(i=!1,r=!1):(i=!0,r=!0):(r=!r&&n.hasZ&&(!i||n.hasM),i=!i&&n.hasM&&(!r||n.hasZ)),t.hasZ=r,t.hasM=i}e.d(n,{h:()=>i})},82799:(t,n,e)=>{e.d(n,{A:()=>m});var i,r=e(31635),s=e(4718),o=e(10107),a=(e(44208),e(53966),e(40608)),h=e(43937),l=e(5443),u=e(91075),c=e(86738),p=e(16930),f=e(90634),g=e(56993);let m=i=class extends u.A{constructor(t){super(function(t){if(!t)return;let{paths:n,hasM:e,hasZ:i,spatialReference:r}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:i??=!0,e??=!0;break;case 3:i??=!0!==e,e??=!i;break;default:i??=!1,e??=!1}return r??=p.A.WGS84,{...t,hasM:e,hasZ:i,paths:n,spatialReference:r}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,n){n.curvePaths=(0,s.o8)(t)}get extent(){const t=(0,f.Z3)(this),{spatialReference:n}=this;return t?new l.A({...t,spatialReference:n}):null}writePaths(t,n){n.paths=(0,s.o8)(this.paths)}addPath(t){if(!t)return;const n=this.paths,e=n.length;if(function(t){return!Array.isArray(t[0])}(t)){const i=[];for(let n=0,e=t.length;n<e;n++)i[n]=t[n].toArray();n[e]=i}else n[e]=t.slice();return this.notifyChange("paths"),this}clone(){const t=new i;return t.spatialReference=this.spatialReference,t.paths=(0,s.o8)(this.paths),t.curvePaths=(0,s.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,n){if(!this._validateInputs(t,n))return null;const e=this.paths[t][n],i=this.hasZ,r=this.hasM;return i&&!r?new c.A(e[0],e[1],e[2],void 0,this.spatialReference):r&&!i?new c.A(e[0],e[1],void 0,e[2],this.spatialReference):i&&r?new c.A(e[0],e[1],e[2],e[3],this.spatialReference):new c.A(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,g.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.paths[t].splice(n,0,e),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const n=this.paths.splice(t,1)[0],e=this.spatialReference,i=n.map(t=>new c.A(t,e));return this.notifyChange("paths"),i}removePoint(t,n){if(!this._validateInputs(t,n))return null;const e=new c.A(this.paths[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("paths"),e}setPoint(t,n,e){return this._validateInputs(t,n)?((0,g.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.paths[t][n]=e,this.notifyChange("paths"),this):this}_validateInputs(t,n,e=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=n){const i=this.paths[t];if(e&&(n<0||n>i.length))return!1;if(!e&&(n<0||n>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],m.prototype,"curvePaths",void 0),(0,r.Cg)([(0,h.K)("curvePaths")],m.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],m.prototype,"paths",void 0),(0,r.Cg)([(0,h.K)("paths")],m.prototype,"writePaths",null),m=i=(0,r.Cg)([(0,a.$)("esri.geometry.Polyline")],m),m.prototype.toJSON.isDefaultToJSON=!0},90634:(t,n,e)=>{e.d(n,{HA:()=>u,Z3:()=>p,v:()=>c});var i=e(537);const r=[];function s(t,n,e,i){return{xmin:t,ymin:n,xmax:e,ymax:i}}function o(t,n,e,i,r,s){return{xmin:t,ymin:n,zmin:e,xmax:i,ymax:r,zmax:s}}function a(t,n,e,i,r,s){return{xmin:t,ymin:n,mmin:e,xmax:i,ymax:r,mmax:s}}function h(t,n,e,i,r,s,o,a){return{xmin:t,ymin:n,zmin:e,mmin:i,xmax:r,ymax:s,zmax:o,mmax:a}}function l(t,n=!1,e=!1){return n?e?h(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):o(t[0],t[1],t[2],t[3],t[4],t[5]):e?a(t[0],t[1],t[2],t[3],t[4],t[5]):s(t[0],t[1],t[2],t[3])}function u(t){return t?function(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}(t)?t:function(t){return void 0!==t.x&&void 0!==t.y}(t)?function(t){const{x:n,y:e,z:i,m:r}=t,l=null!=r;return null!=i?l?h(n,e,i,r,n,e,i,r):o(n,e,i,n,e,i):l?a(n,e,r,n,e,r):s(n,e,n,e)}(t):function(t){return void 0!==t.rings}(t)?c(t):function(t){return void 0!==t.paths}(t)?p(t):function(t){return void 0!==t.points}(t)?function(t){const{hasZ:n,hasM:e,points:s}=t;return l((0,i.Pj)(r,s,n??!1,e??!1),n,e)}(t):null:null}function c(t){const{hasZ:n,hasM:e,rings:s}=t,o=(0,i.Yz)(r,s,n??!1,e??!1);return o?l(o,n,e):null}function p(t){const{hasZ:n,hasM:e,paths:s}=t,o=(0,i.Yz)(r,s,n??!1,e??!1);return o?l(o,n,e):null}},95108:(t,n,e)=>{e.d(n,{$3:()=>l,Ng:()=>o,R3:()=>r,Yl:()=>h,gR:()=>s,m3:()=>c,t9:()=>a});var i=e(4576);function r(t,n){const e=n[0]-t[0],i=n[1]-t[1];if(t.length>2&&n.length>2){const r=t[2]-n[2];return Math.sqrt(e*e+i*i+r*r)}return Math.sqrt(e*e+i*i)}function s(t,n,e,i){const[r,s]=n,[o,a]=e,[h,l]=i,u=h-o,c=l-a,p=u*u+c*c,f=(r-o)*u+(s-a)*c,g=Math.min(1,Math.max(0,f/p));return t[0]=o+u*g,t[1]=a+c*g,t}function o(t,n,e,i,r,s){let o=e,a=i,h=r-o,l=s-a;if(0!==h||0!==l){const e=((t-o)*h+(n-a)*l)/(h*h+l*l);e>1?(o=r,a=s):e>0&&(o+=h*e,a+=l*e)}return h=t-o,l=n-a,h*h+l*l}function a(t,n){return function(t,n,e){const i=t[0]+e*(n[0]-t[0]),r=t[1]+e*(n[1]-t[1]);return t.length>2&&n.length>2?[i,r,t[2]+e*(n[2]-t[2])]:[i,r]}(t,n,.5)}function h(t){const n=t.length;let e=0;for(let i=0;i<n-1;++i)e+=r(t[i],t[i+1]);return e}function l(t,n=0,e=1){let i=0;const r=t.length;let s=t[0];for(let o=1;o<r;o++){const r=t[o];i+=(r[n]-s[n])*(r[e]+s[e]),s=r}if(u(t)){const r=t[0];i+=(r[n]-s[n])*(r[e]+s[e])}return i>=0}function u(t){const n=t.length;return n>0&&!(0,i.aI)(t[0],t[n-1])}function c(t){if("rings"in t)for(const n of t.rings)u(n)&&n.push(n[0].slice())}e(21325)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5455],{22141:(t,n,r)=>{r.d(n,{$5:()=>x,CN:()=>y,JP:()=>g,KM:()=>S,Mv:()=>T,X4:()=>b,gr:()=>A,qs:()=>w,si:()=>v,xA:()=>B});var e=r(34727),o=r(77690),u=r(29242),a=r(58083),i=r(9093),c=r(38954),s=r(51850),l=r(48353),f=r(9762),h=(r(79258),r(21325)),M=r(28735),p=r(13030),m=r(73354),d=r(65686);const g="Projection may be possible after calling projection.load().";function y(t,n,r,e){t.error(`Failed to project from (wkid:${n.wkid}) to (wkid:${r.wkid}).${e?" ":""}${e}`)}function b(t,n,r,e,o,u){return R(0,p.xs.fromTypedArray(t),0,p.Xm.fromTypedArray(n),r,p.Xm.fromTypedArray(e),o,p.xs.fromTypedArray(u))?u:null}function v(t,n,r,e,o,u){return R(1,p.xs.fromTypedArray(t),0,p.Xm.fromTypedArray(n),r,p.Xm.fromTypedArray(e),o,p.xs.fromTypedArray(u))?u:null}function A(t,n,r,e){return(0,f.projectBuffer)(t,n,0,r,e,0)?r:null}function x(t,n,r,e){return(0,f.projectBuffer)(t,n,0,r,e,0)?r:null}function w(t,n,r){return(0,o.Ge)(j,r),(0,m.b)(n,t,j),(0,e.or)(j)&&(0,m.n)(n,n),n}function S(t,n,r){return(0,o.z0)(j,r),(0,d.t)(n,t,j),(0,e.or)(j)&&(0,m.n)(n,n,4),n}function B(t,n,r,e,o,u){if(!R(0,p.xs.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),1,p.Xm.fromTypedArray(n),r,p.Xm.fromTypedArray(e),o,p.xs.fromTypedArray(u,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let n=3;n<t.length;n+=4)u[n]=t[n];return u}function T(t,n,r,e,o,u){if(!R(1,p.xs.fromTypedArray(t,16),1,p.Xm.fromTypedArray(n),r,p.Xm.fromTypedArray(e),o,p.xs.fromTypedArray(u,16)))return null;for(let n=3;n<t.length;n+=4)u[n]=t[n];return u}function _(t,n,r,e,u){switch((0,l.l)(e,r,C,e),1===t&&(0,a.B8)(C,C),n){case 0:return(0,o.Ge)(u,C);case 1:return(0,o.z0)(u,C)}}function R(t,n,r,e,o,u,a,i){if(!n)return;const s=e.count;if(function(t){return t.isWGS84||(0,h.x1)(t)||(0,h.q8)(t)||(0,h.KQ)(t)}(o))for(let e=0;e<s;e++)u.getVec(e,q),n.getVec(e,F),(0,c.o)(F,F,_(t,r,q,a,j)),i.setVec(e,F);else for(let o=0;o<s;o++){u.getVec(o,q),n.getVec(o,F);const s=(0,M.jg)(e.get(o,1));let l=Math.cos(s);1===r!=(0===t)&&(l=1/l),_(t,r,q,a,j),0===t?(j[0]*=l,j[1]*=l,j[2]*=l,j[3]*=l,j[4]*=l,j[5]*=l):(j[0]*=l,j[3]*=l,j[6]*=l,j[1]*=l,j[4]*=l,j[7]*=l),(0,c.o)(F,F,j),(0,c.n)(F,F),i.setVec(o,F)}return i}const q=(0,s.vt)(),F=(0,s.vt)(),C=(0,i.vt)(),j=(0,u.vt)()},27615:(t,n,r)=>{r.d(n,{CK:()=>c,Hq:()=>i,MW:()=>s,TE:()=>l,yJ:()=>f});var e=r(38954),o=r(86738),u=r(95696),a=r(18251);function i(t){return null!=t.origin}function c(t){return i(t.vertexSpace)}function s(t,n){if(!i(t))return null;const[r,e,u]=t.origin;return new o.A({x:r,y:e,z:u,spatialReference:n})}function l(t,n){const{x:r,y:e,z:o,spatialReference:i}=t,c=[r,e,o??0];return"local"===(n?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(i))?new a.A({origin:c}):new u.A({origin:c})}function f(t,n){return t.type===n.type&&(t.origin===n.origin||null!=t.origin&&null!=n.origin&&(0,e.q)(t.origin,n.origin))}},29242:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function o(t,n,r,e,o,u,a,i,c){return[t,n,r,e,o,u,a,i,c]}r.d(n,{fA:()=>o,vt:()=>e,zK:()=>u});const u=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:u,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:o},Symbol.toStringTag,{value:"Module"}))},38954:(t,n,r)=>{r.d(n,{A:()=>p,B:()=>M,C:()=>l,D:()=>f,E:()=>z,F:()=>O,H:()=>X,a:()=>N,b:()=>g,c:()=>a,d:()=>s,e:()=>S,f:()=>c,g:()=>d,h:()=>B,i:()=>i,j:()=>y,k:()=>v,l:()=>u,m:()=>T,n:()=>w,o:()=>R,q:()=>j,r:()=>x,s:()=>b,t:()=>_,u:()=>A,v:()=>q,w:()=>h,x:()=>V,y:()=>U,z:()=>m});var e=r(51850),o=r(34304);function u(t){const n=t[0],r=t[1],e=t[2];return Math.sqrt(n*n+r*r+e*e)}function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function i(t,n,r,e){return t[0]=n,t[1]=r,t[2]=e,t}function c(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t}function s(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function l(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function f(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function h(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function M(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function p(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t}function m(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t}function d(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}function g(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t}function y(t,n){const r=n[0]-t[0],e=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+e*e+o*o)}function b(t,n){const r=n[0]-t[0],e=n[1]-t[1],o=n[2]-t[2];return r*r+e*e+o*o}function v(t){const n=t[0],r=t[1],e=t[2];return n*n+r*r+e*e}function A(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function x(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function w(t,n){const r=n[0],e=n[1],o=n[2];let u=r*r+e*e+o*o;return u>0&&(u=1/Math.sqrt(u),t[0]=n[0]*u,t[1]=n[1]*u,t[2]=n[2]*u),t}function S(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function B(t,n,r){const e=n[0],o=n[1],u=n[2],a=r[0],i=r[1],c=r[2];return t[0]=o*c-u*i,t[1]=u*a-e*c,t[2]=e*i-o*a,t}function T(t,n,r,e){const o=n[0],u=n[1],a=n[2];return t[0]=o+e*(r[0]-o),t[1]=u+e*(r[1]-u),t[2]=a+e*(r[2]-a),t}function _(t,n,r){const e=n[0],o=n[1],u=n[2];return t[0]=r[0]*e+r[4]*o+r[8]*u+r[12],t[1]=r[1]*e+r[5]*o+r[9]*u+r[13],t[2]=r[2]*e+r[6]*o+r[10]*u+r[14],t}function R(t,n,r){const e=n[0],o=n[1],u=n[2];return t[0]=e*r[0]+o*r[3]+u*r[6],t[1]=e*r[1]+o*r[4]+u*r[7],t[2]=e*r[2]+o*r[5]+u*r[8],t}function q(t,n,r){const e=r[0],o=r[1],u=r[2],a=r[3],i=n[0],c=n[1],s=n[2],l=o*s-u*c,f=u*i-e*s,h=e*c-o*i,M=o*h-u*f,p=u*l-e*h,m=e*f-o*l,d=2*a;return t[0]=i+l*d+2*M,t[1]=c+f*d+2*p,t[2]=s+h*d+2*m,t}const F=(0,e.vt)(),C=(0,e.vt)();function j(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function z(t,n,r){const e=r[0]-n[0],o=r[1]-n[1],u=r[2]-n[2];let a=e*e+o*o+u*u;return a>0?(a=1/Math.sqrt(a),t[0]=e*a,t[1]=o*a,t[2]=u*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const N=s,E=l,k=f,O=y,V=b,X=u,U=v;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:c,angle:function(t,n){w(F,t),w(C,n);const r=S(F,C);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,n,r,e,o,u){const a=1-u,i=a*a,c=u*u,s=i*a,l=3*u*i,f=3*c*a,h=c*u;return t[0]=n[0]*s+r[0]*l+e[0]*f+o[0]*h,t[1]=n[1]*s+r[1]*l+e[1]*f+o[1]*h,t[2]=n[2]*s+r[2]*l+e[2]*f+o[2]*h,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,r=1){return t[0]=Math.min(Math.max(t[0],n),r),t[1]=Math.min(Math.max(t[1],n),r),t[2]=Math.min(Math.max(t[2],n),r),t},copy:a,cross:B,crossAndNormalize:function(t,n,r){const e=n[0],o=n[1],u=n[2],a=r[0],i=r[1],c=r[2],s=o*c-u*i,l=u*a-e*c,f=e*i-o*a,h=Math.sqrt(s*s+l*l+f*f);return t[0]=s/h,t[1]=l/h,t[2]=f/h,t},direction:z,dist:O,distance:y,div:k,divide:f,dot:S,equals:function(t,n){if(t===n)return!0;const r=t[0],e=t[1],u=t[2],a=n[0],i=n[1],c=n[2],s=(0,o.FD)();return Math.abs(r-a)<=s*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(e-i)<=s*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(u-c)<=s*Math.max(1,Math.abs(u),Math.abs(c))},exactEquals:j,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,r,e,o,u){const a=u*u,i=a*(2*u-3)+1,c=a*(u-2)+u,s=a*(u-1),l=a*(3-2*u);return t[0]=n[0]*i+r[0]*c+e[0]*s+o[0]*l,t[1]=n[1]*i+r[1]*c+e[1]*s+o[1]*l,t[2]=n[2]*i+r[2]*c+e[2]*s+o[2]*l,t},inverse:x,len:X,length:u,lerp:T,max:m,min:p,mul:E,multiply:l,negate:A,normalize:w,random:function(t,n=1){const r=o.Ov,e=2*r()*Math.PI,u=2*r()-1,a=Math.sqrt(1-u*u)*n;return t[0]=Math.cos(e)*a,t[1]=Math.sin(e)*a,t[2]=u*n,t},rotateX:function(t,n,r,e){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[0],u[1]=o[1]*Math.cos(e)-o[2]*Math.sin(e),u[2]=o[1]*Math.sin(e)+o[2]*Math.cos(e),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},rotateY:function(t,n,r,e){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[2]*Math.sin(e)+o[0]*Math.cos(e),u[1]=o[1],u[2]=o[2]*Math.cos(e)-o[0]*Math.sin(e),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},rotateZ:function(t,n,r,e){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[0]*Math.cos(e)-o[1]*Math.sin(e),u[1]=o[0]*Math.sin(e)+o[1]*Math.cos(e),u[2]=o[2],t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:d,scaleAndAdd:g,set:i,sign:M,sqrDist:V,sqrLen:U,squaredDistance:b,squaredLength:v,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:N,subtract:s,transformMat3:R,transformMat4:_,transformQuat:q},Symbol.toStringTag,{value:"Module"}))},48163:(t,n,r)=>{function e(){return[0,0]}function o(t){return[t[0],t[1]]}function u(t,n){return[t,n]}function a(){return u(1,1)}function i(){return u(1,0)}function c(){return u(0,1)}r.d(n,{Un:()=>s,fA:()=>u,o8:()=>o,vt:()=>e});const s=a(),l=i(),f=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:s,UNIT_X:l,UNIT_Y:f,ZEROS:[0,0],clone:o,create:e,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const r=Math.min(2,t.length);for(let e=0;e<r;++e)n[e]=t[e];return n},fromValues:u,ones:a,unitX:i,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(t,n,r)=>{r.d(n,{l:()=>s});var e=r(34727),o=r(58083),u=r(51850);function a(t,n,r){const e=Math.sin(t),o=Math.cos(t),u=Math.sin(n),a=Math.cos(n),i=r;return i[0]=-e,i[4]=-u*o,i[8]=a*o,i[12]=0,i[1]=o,i[5]=-u*e,i[9]=a*e,i[13]=0,i[2]=0,i[6]=a,i[10]=u,i[14]=0,i[3]=0,i[7]=0,i[11]=0,i[15]=1,i}var i=r(37539),c=r(21325);function s(t,n,r,e){const u=(0,i.Tp)(t,e);if(null==u)return!1;const s=u.source.spatialReferenceId,p=u.dest.spatialReferenceId;if(s===p&&!l(p)&&(0!==s||(0,c.aI)(t,e)))return(0,o.kN)(r,n),!0;if(l(p)){const t=i.w5[s][10],e=i.w5[10][p];return null!=t&&null!=e&&(t(n,0,h,0),e(h,0,M,0),a(f*h[0],f*h[1],r),r[12]=M[0],r[13]=M[1],r[14]=M[2],!0)}const m=l(s);if((3===p||11===p||2===p||5===p)&&(2===s||m||3===s||5===s)){const t=i.w5[s][10],e=i.w5[10][p];return null!=t&&null!=e&&(t(n,0,h,0),e(h,0,M,0),m?function(t,n,r){a(t,n,r),(0,o.mg)(r,r)}(f*h[0],f*h[1],r):(0,o.D_)(r),r[12]=M[0],r[13]=M[1],r[14]=M[2],!0)}return!1}function l(t){return 1===t||6===t||8===t||4===t}const f=(0,e.kU)(1),h=(0,u.vt)(),M=(0,u.vt)()},65686:(t,n,r)=>{r.d(n,{a:()=>u,b:()=>l,l:()=>s,n:()=>i,t:()=>a});var e=r(40876),o=(r(44208),r(53966));function u(t,n,r){a(t.typedBuffer,n.typedBuffer,r,t.typedBufferStride,n.typedBufferStride)}function a(t,n,r,e=4,o=e){if(t.length/e!==n.length/o)return;const u=t.length/e,a=r[0],i=r[1],c=r[2],s=r[3],l=r[4],f=r[5],h=r[6],M=r[7],p=r[8];let m=0,d=0;for(let r=0;r<u;r++){const r=n[m],u=n[m+1],g=n[m+2],y=n[m+3];t[d]=a*r+s*u+h*g,t[d+1]=i*r+l*u+M*g,t[d+2]=c*r+f*u+p*g,t[d+3]=y,m+=o,d+=e}}function i(t,n){const r=Math.min(t.count,n.count),e=t.typedBuffer,o=t.typedBufferStride,u=n.typedBuffer,a=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*o,r=t*a,i=u[r],c=u[r+1],s=u[r+2],l=i*i+c*c+s*s;if(l>0){const t=1/Math.sqrt(l);e[n]=t*i,e[n+1]=t*c,e[n+2]=t*s}}}function c(t,n,r,e=4){const o=Math.min(t.length/e,n.count),u=n.typedBuffer,a=n.typedBufferStride;let i=0,c=0;for(let n=0;n<o;n++)t[c]=r*u[i],t[c+1]=r*u[i+1],t[c+2]=r*u[i+2],t[c+3]=r*u[i+3],i+=a,c+=e}function s(t,n,r,e){l(t.typedBuffer,n,r,e,t.typedBufferStride)}function l(t,n,r,o,u=4){const a=Math.min(t.length/u,n.count),i=n.typedBuffer,c=n.typedBufferStride;let s=0,l=0;const f=1/e.Tf;for(let n=0;n<a;n++)t[l]=o*(r*i[s])**f,t[l+1]=o*(r*i[s+1])**f,t[l+2]=o*(r*i[s+2])**f,t[l+3]=o*r*i[s+3],s+=c,l+=u}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:l,linearToSRGBView:s,normalize:i,scale:c,scaleView:function(t,n,r){c(t.typedBuffer,n,r,t.typedBufferStride)},transformMat3:a,transformMat3View:u,transformMat4:function(t,n,r,e=4,u=e){if(t.length/e!==n.length/u)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const a=t.length/e,i=r[0],c=r[1],s=r[2],l=r[3],f=r[4],h=r[5],M=r[6],p=r[7],m=r[8],d=r[9],g=r[10],y=r[11],b=r[12],v=r[13],A=r[14],x=r[15];let w=0,S=0;for(let r=0;r<a;r++){const r=n[w],o=n[w+1],a=n[w+2],B=n[w+3];t[S]=i*r+f*o+m*a+b*B,t[S+1]=c*r+h*o+d*a+v*B,t[S+2]=s*r+M*o+g*a+A*B,t[S+3]=l*r+p*o+y*a+x*B,w+=u,S+=e}},transformMat4View:function(t,n,r){if(t.count!==n.count)return;const e=t.count,o=r[0],u=r[1],a=r[2],i=r[3],c=r[4],s=r[5],l=r[6],f=r[7],h=r[8],M=r[9],p=r[10],m=r[11],d=r[12],g=r[13],y=r[14],b=r[15],v=t.typedBuffer,A=t.typedBufferStride,x=n.typedBuffer,w=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*A,r=t*w,e=x[r],S=x[r+1],B=x[r+2],T=x[r+3];v[n]=o*e+c*S+h*B+d*T,v[n+1]=u*e+s*S+M*B+g*T,v[n+2]=a*e+l*S+p*B+y*T,v[n+3]=i*e+f*S+m*B+b*T}}},Symbol.toStringTag,{value:"Module"}))},72258:(t,n,r)=>{r.d(n,{UR:()=>A,p5:()=>v,xK:()=>_});var e=r(53966),o=r(34727),u=r(83047),a=r(77690),i=r(29242),c=r(58083),s=r(9093),l=r(38954),f=r(51850),h=r(98764),M=r(48353),p=r(65806),m=r(27615),d=r(21325),g=r(73354),y=r(22141);const b=()=>e.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function v(t,n,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=t;if(!(0,p.g)(n,o,e))return!1;const{origin:u}=r;return(0,l.d)(t,o,u),!0}const o=(0,h.lO)(e),u=t;if(!(0,p.g)(n,u,o))return!1;const{origin:a}=r,i=j;if(!(0,M.l)(e,a,i,o))return!1;const s=(0,c.B8)(j,i);return null!=s&&((0,l.t)(t,u,s),!0)}function A(t,n,r){const{vertexSpace:e,transform:o,vertexAttributes:u}=t,i=(0,m.Hq)(e)?o:null,f=B(t.spatialReference,r,3);if((0,m.yJ)(e,n)&&(!i||(0,c.t2)(i.localMatrix,s.zK))&&T(f)){const{position:t,normal:n,tangent:e}=u,o=r?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?e:e?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,u){const a=x(n,u);if(!(0,M.l)(n,e,R,a))return(0,y.CN)(b(),n,a),null;if(r&&(0,c.lw)(R,R,r.localMatrix),!(0,M.l)(n,o,q,a))return(0,y.CN)(b(),a,n),null;(0,c.B8)(q,q);const i=(0,c.lw)(R,q,R);return S(i,n,u,3),w(t,i)}(t,t.vertexSpace,n.origin,r):function({spatialReference:t,vertexAttributes:n,transform:r},{origin:e},o,u){const a=x(t,u);if(!(0,M.l)(t,e,R,a))return(0,y.CN)(b(),t,a),null;r&&(0,c.lw)(R,R,r.localMatrix),S(R,t,u,1);const i=new Float64Array(n.position.length),s=function(t,n,r,e,o){(0,g.t)(e,t,n);const u=new Float64Array(t.length);return(0,y.$5)(e,o,u,r)?u:((0,y.CN)(b(),o,r),null)}(n.position,R,t,i,a);if(!s)return null;const f=function(t,n,r,e,o,u){if(null==o)return null;const a=new Float32Array(o.length);return(0,y.qs)(o,a,u),(0,y.si)(a,t,n,r,e,a)?a:((0,y.CN)(b(),e,n),null)}(s,t,i,a,n.normal,R);if(n.normal&&!f)return null;const h=function(t,n,r,e,o,u){if(null==o)return null;const a=new Float32Array(o.length);return(0,y.KM)(o,a,u),(0,y.Mv)(a,t,n,r,e,a)?a:((0,y.CN)(b(),e,n),null)}(s,t,i,a,n.tangent,R);if(n.tangent&&!h)return null;if(o){const t=(0,l.u)(C,o);(0,g.a)(s,s,t)}return{position:s,normal:f,tangent:h}}(t,t.vertexSpace,n.origin,r);case"georeferenced":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,u){const i=x(n,u);if(!(0,M.l)(n,o,R,i))return(0,y.CN)(b(),n,i),null;const s=1/B(n,u,2);(0,c.hs)(R,R,[s,s,s]);const l=(0,c.B8)(q,R),{position:f,normal:h,tangent:p}=function(t,n,r){if(!n)return t;if(!r){const{position:r,normal:e,tangent:o}=t;return{position:(0,g.a)(new Float64Array(r.length),r,n),tangent:o,normal:e}}const e=w(t,r.localMatrix);return(0,g.a)(e.position,e.position,n),e}(t,e,r),m=new Float64Array(f.length),d=function(t,n,r,e,o){const u=(0,y.gr)(t,n,e,o);if(!u)return(0,y.CN)(b(),n,o),null;const a=new Float64Array(u.length);return(0,g.t)(a,u,r),a}(f,n,l,m,i);if(!d)return null;const v=(0,a.Ge)(F,l),A=function(t,n,r,e,o,u,a){if(null==t)return null;const i=a??new Float32Array(t.length);return(0,y.X4)(t,n,r,e,o,i)?((0,g.b)(i,i,u),i):((0,y.CN)(b(),r,o),null)}(h,f,n,m,i,v,h!==t.normal?h:void 0);if(!A&&h)return null;const S=function(t,n,r,e,o,u,a){if(null==t)return null;const i=a??new Float32Array(t.length);return(0,y.xA)(t,n,r,e,o,i)?((0,g.b)(i,i,u,4),i):((0,y.CN)(b(),r,o),null)}(p,f,n,m,i,v,p!==t.tangent?p:void 0);return!S&&p?null:{position:d,normal:A,tangent:S}}(t,t.vertexSpace,n.origin,r):function({vertexAttributes:t,transform:n,spatialReference:r},{origin:e},o,u){const a=B(r,u,3),i=e||!T(a)?(0,c.C)(R,n?.localMatrix??s.zK):null;i&&S(i,r,u,3);const{position:f,normal:h,tangent:M}=i?w(t,i):t,p=u?.allowBufferReuse,m=p?f:new Float64Array(f.length);let d=f;if(e&&(d=(0,g.a)(m,d,e)),o){const t=(0,l.u)(C,o);d=(0,g.a)(m,d,t)}return{position:d!==t.position||p?d:d.slice(),normal:h!==t.normal||p?h:h?.slice(),tangent:M!==t.tangent||p?M:M?.slice()}}(t,t.vertexSpace,n.origin,r)}}function x(t,n){return n?.useEllipsoid&&(0,d.B3)(t)?h.Y0:(0,h.lO)(t)}function w(t,n){const r=new Float64Array(t.position.length);(0,g.t)(r,t.position,n);const e=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return e&&t.normal&&(0,y.qs)(t.normal,e,n),o&&t.tangent&&(0,y.KM)(t.tangent,o,n),{position:r,normal:e,tangent:o}}function S(t,n,r,e){const o=B(n,r,e);T(o)||(0,c.hs)(t,t,[o,o,o])}function B(t,n,r){const e=!!(1&r),o=!!(2&r),u=n?.sourceUnit,a=n?.targetUnit;if(!u&&!a)return 1;let i=_(u,t);e||!u||T(i)||(b().warn("source unit conversion not supported"),i=1);let c=1/_(a,t);return o||!a||T(c)||(b().warn("target unit conversion not supported"),c=1),i*c}function T(t){return(0,o.Io)(t,1)}function _(t,n){if(null==t)return 1;const r=(0,u.KX)(n);return 1/(0,u.oU)(r,"meters",t)}const R=(0,s.vt)(),q=(0,s.vt)(),F=(0,i.vt)(),C=(0,f.vt)(),j=(0,s.vt)()},74594:(t,n,r)=>{r.d(n,{projectMeshVertexPositions:()=>i});var e=r(9762),o=r(95696),u=r(21325),a=r(72258);function i(t,n){const r=(0,a.UR)(t,o.A.absolute);if(!r)return null;let i=r.position;return(0,u.aI)(t.spatialReference,n)||(i=new Float64Array(r.position.length),(0,e.projectBuffer)(r.position,t.spatialReference,0,i,n,0))?i:null}},77690:(t,n,r)=>{r.d(n,{B8:()=>i,Ge:()=>h,I0:()=>f,KC:()=>c,hZ:()=>u,hs:()=>l,lw:()=>s,mg:()=>a,z0:()=>o});var e=r(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function u(t,n,r,e,o,u,a,i,c,s){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=u,t[5]=a,t[6]=i,t[7]=c,t[8]=s,t}function a(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function i(t,n){const r=n[0],e=n[1],o=n[2],u=n[3],a=n[4],i=n[5],c=n[6],s=n[7],l=n[8],f=l*a-i*s,h=-l*u+i*c,M=s*u-a*c;let p=r*f+e*h+o*M;return p?(p=1/p,t[0]=f*p,t[1]=(-l*e+o*s)*p,t[2]=(i*e-o*a)*p,t[3]=h*p,t[4]=(l*r-o*c)*p,t[5]=(-i*r+o*u)*p,t[6]=M*p,t[7]=(-s*r+e*c)*p,t[8]=(a*r-e*u)*p,t):null}function c(t,n){const r=n[0],e=n[1],o=n[2],u=n[3],a=n[4],i=n[5],c=n[6],s=n[7],l=n[8];return t[0]=a*l-i*s,t[1]=o*s-e*l,t[2]=e*i-o*a,t[3]=i*c-u*l,t[4]=r*l-o*c,t[5]=o*u-r*i,t[6]=u*s-a*c,t[7]=e*c-r*s,t[8]=r*a-e*u,t}function s(t,n,r){const e=n[0],o=n[1],u=n[2],a=n[3],i=n[4],c=n[5],s=n[6],l=n[7],f=n[8],h=r[0],M=r[1],p=r[2],m=r[3],d=r[4],g=r[5],y=r[6],b=r[7],v=r[8];return t[0]=h*e+M*a+p*s,t[1]=h*o+M*i+p*l,t[2]=h*u+M*c+p*f,t[3]=m*e+d*a+g*s,t[4]=m*o+d*i+g*l,t[5]=m*u+d*c+g*f,t[6]=y*e+b*a+v*s,t[7]=y*o+b*i+v*l,t[8]=y*u+b*c+v*f,t}function l(t,n,r){const e=r[0],o=r[1],u=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=u*n[6],t[7]=u*n[7],t[8]=u*n[8],t}function f(t,n){const r=n[0],e=n[1],o=n[2],u=n[3],a=r+r,i=e+e,c=o+o,s=r*a,l=e*a,f=e*i,h=o*a,M=o*i,p=o*c,m=u*a,d=u*i,g=u*c;return t[0]=1-f-p,t[3]=l-g,t[6]=h+d,t[1]=l+g,t[4]=1-s-p,t[7]=M-m,t[2]=h-d,t[5]=M+m,t[8]=1-s-f,t}function h(t,n){const r=n[0],e=n[1],o=n[2],u=n[3],a=n[4],i=n[5],c=n[6],s=n[7],l=n[8],f=n[9],h=n[10],M=n[11],p=n[12],m=n[13],d=n[14],g=n[15],y=r*i-e*a,b=r*c-o*a,v=r*s-u*a,A=e*c-o*i,x=e*s-u*i,w=o*s-u*c,S=l*m-f*p,B=l*d-h*p,T=l*g-M*p,_=f*d-h*m,R=f*g-M*m,q=h*g-M*d;let F=y*q-b*R+v*_+A*T-x*B+w*S;return F?(F=1/F,t[0]=(i*q-c*R+s*_)*F,t[1]=(c*T-a*q-s*B)*F,t[2]=(a*R-i*T+s*S)*F,t[3]=(o*R-e*q-u*_)*F,t[4]=(r*q-o*T+u*B)*F,t[5]=(e*T-r*R-u*S)*F,t[6]=(m*w-d*x+g*A)*F,t[7]=(d*v-p*w-g*b)*F,t[8]=(p*x-m*v+g*y)*F,t):null}function M(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const p=s,m=M;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],u=t[4],a=t[5],i=t[6],c=t[7],s=t[8];return n*(s*u-a*c)+r*(-s*o+a*i)+e*(c*o-u*i)},equals:function(t,n){const r=t[0],o=t[1],u=t[2],a=t[3],i=t[4],c=t[5],s=t[6],l=t[7],f=t[8],h=n[0],M=n[1],p=n[2],m=n[3],d=n[4],g=n[5],y=n[6],b=n[7],v=n[8],A=(0,e.FD)();return Math.abs(r-h)<=A*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(o-M)<=A*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(u-p)<=A*Math.max(1,Math.abs(u),Math.abs(p))&&Math.abs(a-m)<=A*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(i-d)<=A*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(c-g)<=A*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(s-y)<=A*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(l-b)<=A*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(f-v)<=A*Math.max(1,Math.abs(f),Math.abs(v))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:f,fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:i,isOrthoNormal:function(t){const n=(0,e.FD)(),r=t[0],o=t[1],u=t[2],a=t[3],i=t[4],c=t[5],s=t[6],l=t[7],f=t[8];return Math.abs(1-(r*r+a*a+s*s))<=n&&Math.abs(1-(o*o+i*i+l*l))<=n&&Math.abs(1-(u*u+c*c+f*f))<=n},mul:p,multiply:s,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:h,normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],o=n[2],u=n[4],a=n[5],i=n[6],c=n[8],s=n[9],l=n[10],f=l*a-i*s,h=-l*u+i*c,M=s*u-a*c,p=r*f+e*h+o*M;if(!p)return null;const m=1/p;return t[0]=f*m,t[1]=(-l*e+o*s)*m,t[2]=(i*e-o*a)*m,t[3]=h*m,t[4]=(l*r-o*c)*m,t[5]=(-i*r+o*u)*m,t[6]=M*m,t[7]=(-s*r+e*c)*m,t[8]=(a*r-e*u)*m,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){const e=n[0],o=n[1],u=n[2],a=n[3],i=n[4],c=n[5],s=n[6],l=n[7],f=n[8],h=Math.sin(r),M=Math.cos(r);return t[0]=M*e+h*a,t[1]=M*o+h*i,t[2]=M*u+h*c,t[3]=M*a-h*e,t[4]=M*i-h*o,t[5]=M*c-h*u,t[6]=s,t[7]=l,t[8]=f,t},scale:l,scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:u,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:m,subtract:M,translate:function(t,n,r){const e=n[0],o=n[1],u=n[2],a=n[3],i=n[4],c=n[5],s=n[6],l=n[7],f=n[8],h=r[0],M=r[1];return t[0]=e,t[1]=o,t[2]=u,t[3]=a,t[4]=i,t[5]=c,t[6]=h*e+M*a+s,t[7]=h*o+M*i+l,t[8]=h*u+M*c+f,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},98764:(t,n,r)=>{r.d(n,{Y0:()=>s,lO:()=>l});var e=r(73941),o=r(16930),u=r(21325);const a=new o.A(e.fv),i=new o.A(e.FY),c=new o.A(e.LJ),s=new o.A(e.Ro);function l(t){const n=f.get(t);if(n)return n;let r=a;if(t)if(t===i)r=i;else if(t===c)r=c;else{const n=t.wkid,e=t.latestWkid;if(null!=n||null!=e)(0,u.tl)(n)||(0,u.tl)(e)?r=i:((0,u.ZL)(n)||(0,u.ZL)(e))&&(r=c);else{const n=t.wkt2??t.wkt;if(n){const t=n.toUpperCase();t===h?r=i:t===M&&(r=c)}}}return f.set(t,r),r}const f=new Map,h=i.wkt.toUpperCase(),M=c.wkt.toUpperCase()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7982],{4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(7036)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(9784),r.e(7937),r.e(7005),r.e(6445),r.e(6298),r.e(3546),r.e(1624)]).then(r.bind(r,53892))).default,CSVLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(9784),r.e(5964)]).then(r.bind(r,68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(1956),r.e(4796),r.e(708),r.e(4111),r.e(8506),r.e(364),r.e(8628),r.e(2593),r.e(2696),r.e(3549)]).then(r.bind(r,79003))).default,DimensionLayer:async()=>(await Promise.all([r.e(6131),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(6131),r.e(9953),r.e(9186),r.e(5751)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(9784),r.e(2236)]).then(r.bind(r,29784))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(6131),r.e(6730)]).then(r.bind(r,36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(8766)]).then(r.bind(r,15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3474)]).then(r.bind(r,85582))).default,GroupLayer:async()=>(await Promise.all([r.e(6131),r.e(3562),r.e(8256)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(9953),r.e(1956),r.e(364),r.e(1427),r.e(8106),r.e(4990)]).then(r.bind(r,58434))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(9953),r.e(1427),r.e(6049),r.e(8106),r.e(7677),r.e(5943)]).then(r.bind(r,35943))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(6131),r.e(5335),r.e(1312)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(6131),r.e(6298),r.e(5335),r.e(6894)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(5366)]).then(r.bind(r,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(708),r.e(3029),r.e(8368),r.e(4649),r.e(217),r.e(2568),r.e(7213),r.e(9171),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(6131),r.e(7937),r.e(7721),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(708),r.e(3029),r.e(8368),r.e(4649),r.e(217),r.e(2568),r.e(7213),r.e(9171),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(1956),r.e(4796),r.e(708),r.e(4111),r.e(364),r.e(3249),r.e(7656),r.e(2042)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(9784),r.e(7213),r.e(8110)]).then(r.bind(r,96299))).default,MediaLayer:async()=>(await Promise.all([r.e(7330),r.e(6131),r.e(2763)]).then(r.bind(r,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(1956),r.e(4796),r.e(708),r.e(3029),r.e(6445),r.e(9936),r.e(4224)]).then(r.bind(r,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(6773),r.e(349)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(9784),r.e(9361),r.e(4151)]).then(r.bind(r,9352))).default,PointCloudLayer:async()=>(await Promise.all([r.e(6131),r.e(8948),r.e(7984),r.e(6742)]).then(r.bind(r,76742))).default,RouteLayer:async()=>(await Promise.all([r.e(6131),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(217),r.e(979)]).then(r.bind(r,64185))).default,SceneLayer:async()=>(await Promise.all([r.e(6131),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(1956),r.e(4796),r.e(7937),r.e(7005),r.e(6445),r.e(6298),r.e(3546),r.e(1395)]).then(r.bind(r,13899))).default,StreamLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(1956),r.e(4796),r.e(3029),r.e(73)]).then(r.bind(r,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1956),r.e(4796),r.e(4111),r.e(8506),r.e(6731)]).then(r.bind(r,97483))).default,TileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(1956),r.e(4796),r.e(708),r.e(4111),r.e(364),r.e(9186),r.e(3249),r.e(573)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(9186),r.e(5897),r.e(4937)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(6131),r.e(3910),r.e(8096),r.e(5323),r.e(7732)]).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(6131),r.e(7937),r.e(7721),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(6131),r.e(8948),r.e(6183)]).then(r.bind(r,16183))).default,WCSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(9953),r.e(1427),r.e(6049),r.e(8106),r.e(7677),r.e(9547)]).then(r.bind(r,19547))).default,WFSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(8096),r.e(5323),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(9110)]).then(r.bind(r,21901))).default,WMSLayer:async()=>(await Promise.all([r.e(7330),r.e(6131),r.e(8219),r.e(8948),r.e(3910),r.e(5323),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(6773),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(6773)]).then(r.bind(r,47314))).default}},23154:(e,a,r)=>{r.d(a,{K:()=>f,Q:()=>s});var t=r(77548),n=r(24183);const l=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:r,...l}=a||{},s=r?await r.fetchServiceMetadata(e,l):await(0,n.V)(e,l),i=(0,t.G$)();d(s),c(s);const o={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return o;const u=`${(0,t.$x)()??e}/layers`,y=r?await r.fetchServiceMetadata(u,l):await(0,n.V)(u,l);return d(y),c(y),o.layersJSON={layers:y.layers,tables:y.tables},o}function i(e){const{type:a}=e;return!!a&&l.has(a)}function o(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(y)}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,r)=>{r.d(a,{V:()=>n});var t=r(78888);async function n(e,a){const{data:r}=await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}},27982:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(49186),n=r(84952),l=r(60694),s=r(92009),i=r(23154),o=r(77548),c=r(4513),u=r(24183);const y={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function d(e){const{properties:a,url:c}=e,d={...a,url:c},p=await async function(e,a){let r=(0,l.qg)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.iz)(e):null;return{title:null!=o&&r.name||(0,n.e7)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.An)(e).path}}}(e,a)),null==r)throw new t.A("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const w={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},p="FeatureServer"===c,b="SceneServer"===c,L={parsedUrl:r,Constructor:null,layerId:p||b?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":if(null!=d){const{type:r}=await(0,u.V)(e,{customParameters:a});switch(f="FeatureLayer",r){case"Catalog Layer":f="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new t.A("arcgis-layers:unsupported",`fromUrl() not supported for "${r}" layers`)}}else f=await async function(e,a){return(await(0,u.V)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.V)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.V)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.XX[e]&&(f=o.XX[e])}}break}case"3DTilesServer":throw new t.A("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.V)(e,{customParameters:a});L.sourceJSON=r,L.preferredUrl=(0,o.$x)(),f=(0,i.K)(r.type)}break;default:f=w[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l,c=!1;switch(a){case"FeatureServer":{const a=await(0,i.Q)(e,{customParameters:r});l=(0,o.$x)(e,{preferredHost:a.preferredHost}),c=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.L)(e),n=await(0,u.V)(t,{customParameters:a}).catch(()=>null);return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.V)(e,{customParameters:r})}const y=t?.layers,d=t?.tables;return{preferredUrl:l,layers:y?.map(e=>({id:e.id})).reverse()||[],tables:d?.map(e=>({serverUrl:n,id:e.id})).reverse()||[],layerInfos:c?y:[],tableInfos:c?d:[]}}(e,c,a);if(p&&(L.preferredUrl=r.preferredUrl,L.sublayerInfos=r.layerInfos,L.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)L.layers=r.layers,L.tables=r.tables,p&&r.layerInfos?.length&&(L.sublayerConstructorProvider=await async function(e){if(!e.length)return;const a=new Set,r=[];for(const{type:t}of e)a.has(t)||(a.add(t),r.push(h((0,i.K)(t))));const t=await Promise.all(r),n=new Map;return Array.from(a).forEach((e,a)=>{n.set(e,t[a])}),e=>n.get(e.type)}(r.layerInfos));else if(p||b){const e=r.layerInfos?.[0]??r.tableInfos?.[0];if(L.layerId=r.layers[0]?.id??r.tables[0]?.id,L.sourceJSON=e,p){const a=e?.type;f=(0,i.K)(a)}}}return L.Constructor=await h(f),L}(c,a?.customParameters),{Constructor:b,layerId:L,sourceJSON:S,parsedUrl:v,layers:P,tables:g}=p;if(P.length+g.length===0)return null!=L&&(d.layerId=L),null!=S&&(d.sourceJSON=S),new b(d);const I=new(0,(await Promise.all([r.e(6131),r.e(3562)]).then(r.bind(r,85989))).default)({title:v.title});return await async function(e,a,r){const t=a.sublayerConstructorProvider;for(const{id:n,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,n),i=w(l,n,s,(s&&t?.(s))??a.Constructor,r);e.add(i)}if(a.tables.length){const t=await h("FeatureLayer");a.tables.forEach(({id:n,serverUrl:l})=>{const s=w(l,n,f(a.tableInfos,n),t,r);e.tables.add(s)})}}(I,p,d),I}function f(e,a){return e?e.find(({id:e})=>e===a):null}function w(e,a,r,t,n){const l={...n,layerId:a};return null!=e&&(l.url=e),null!=r&&(l.sourceJSON=r),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e){return(0,c.S[e])()}},92009:(e,a,r)=>{r.d(a,{L:()=>u});var t=r(70333),n=r(78888),l=r(49186),s=r(74887),i=r(60694),o=r(20655),c=r(80812);async function u(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(r.portal=new o.A({url:l}));try{return await r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(u);if(!f?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const w=await d(f.url,u);return w.portalItem=f,w}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch(()=>d("no-prompt")),[w,m]=await Promise.all([f,o]),h=m?.layers,p=w.data&&w.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6982],{34727:(t,n,r)=>{r.d(n,{$8:()=>A,Cc:()=>o,Hx:()=>F,Io:()=>y,KJ:()=>s,Sp:()=>l,XM:()=>c,YN:()=>h,ZH:()=>b,cU:()=>i,gg:()=>M,hs:()=>a,kU:()=>f,or:()=>k,pF:()=>C,pq:()=>E,qE:()=>u});const e=new Float32Array(1);function i(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function u(t,n,r){return Math.min(Math.max(t,n),r)}function o(t,n,r){return t+(n-t)*r}function a(t,n,r,e,i){return o(e,i,(t-n)/(r-n))}function f(t){return t*Math.PI/180}function s(t){return 180*t/Math.PI}function c(t){return Math.acos(u(t,-1,1))}function h(t){return Math.asin(u(t,-1,1))}function l(t,n,r=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=r}function M(t,n,r=1e-6){return!l(t,n,r)&&t>n}function b(t,n,r=1e-6){return!l(t,n,r)&&t<n}function F(t,n,r=1e-6){return l(t,n,r)||t>n}const m=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function g(t){return m.setFloat64(0,t),m.getBigInt64(0)}const p=1000000n,w=N(1);function N(t){const n=g(t=Math.abs(t)),r=function(t){return m.setBigInt64(0,t),m.getFloat64(0)}(n<=p?p:n-p);return Math.abs(t-r)}function y(t,n,r=w){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=r&&N(Math.min(Math.abs(t),Math.abs(n)))<r)return Math.abs(t-n)<=r;const e=g(t),i=g(n);return e<0==i<0&&!((e<i?i-e:e-i)>p)}function A(t){return d(Math.max(-E,Math.min(t,E)))}function d(t){return e[0]=t,e[0]}function k(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],e=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(l(n,1)&&l(r,1)&&l(e,1))}const E=d(34028234663852886e22);function C(t,n,r){if(void 0===r||0===+r)return Math[t](n);if(n=+n,r=+r,isNaN(n)||"number"!=typeof r||r%1!=0)return NaN;let e=n.toString().split("e");return e=(n=Math[t](+(e[0]+"e"+(e[1]?+e[1]-r:-r)))).toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+r:r))}},96982:(t,n,r)=>{r.r(n),r.d(n,{getFacesWithVertexAttributes:()=>i});var e=r(34727);function i({distance:t,heading:n,horizontalFieldOfView:r,pitch:i,verticalFieldOfView:u,origin:o=[0,0,0],positionLength:a=3}){const f=a-1,s=a*a,c=new Float32Array(2*s),h=new Float64Array(3*s),l=new Float32Array(3*s).fill(0),M=new Uint32Array(f**2*6);for(let b=0,F=0;b<s;b++){const s=Math.floor(b/a),m=b%a,g=1-m/f,p=s/f,w=2*b,N=3*b;c[w]=g,c[w+1]=p;const y=i+u/2-p*u,A=(0,e.kU)(n-r/2+g*r),d=(0,e.kU)(y),k=Math.sin(d),E=Math.cos(d),C=[k*Math.sin(A),Math.cos(A)*k,-E];h[N]=o[0]+t*C[0],h[N+1]=o[1]+t*C[1],h[N+2]=o[2]+t*C[2],l[N]=-C[0],l[N+1]=-C[1],l[N+2]=-C[2],s!==f&&m!==f&&(M[F++]=b,M[F++]=b+a,M[F++]=b+a+1,M[F++]=b,M[F++]=b+a+1,M[F++]=b+1)}return{result:{position:h,uv:c,normal:l,faces:M},transferList:[h.buffer,c.buffer,l.buffer,M?.buffer]}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(31635),r=i(53966),n=i(10107),a=(i(44208),i(87811),i(40608)),o=i(60694);const l=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,r.A.getLogger(this)))}};return(0,s.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,a.$)("esri.layers.mixins.ArcGISService")],i),i}},21312:(e,t,i)=>{i.d(t,{A:()=>m});var s,r=i(31635),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),f=i(86738),h=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,n=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+n*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+n*e[9]+i*e[11]}}const n=s*s,a=r*r,o=s*r,l=n*s,c=n*r,u=s*a,f=r*a;return{x:e[0]+s*e[2]+r*e[4]+n*e[6]+o*e[8]+a*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+n*e[7]+o*e[9]+a*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:n,ymax:a,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:a}),l.push({x:n,y:a}),l.push({x:s,y:r}),l.push({x:n,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(a-r)*t/(e-1)}),l.push({x:n,y:r+(a-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(n-s)*t/e,y:r}),l.push({x:s+(n-s)*t/e,y:a})}l=l.map(t=>p(e,t,i));const c=l.map(e=>e.x),f=l.map(e=>e.y);return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:o})}let m=s=class extends h.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,n,a]=e,o=s*a-n*r,l=n*r-s*a;return[(n*i-t*a)/o,(s*i-t*r)/l,a/o,r/l,-n/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r.Cg)([(0,n.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r.Cg)([(0,n.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r.Cg)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r.Cg)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r.Cg)([(0,n.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r.Cg)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r.Cg)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r.Cg)([(0,n.MZ)()],m.prototype,"affectsPixelSize",null),(0,r.Cg)([(0,a.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r.Cg)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m)},24212:(e,t,i)=>{function s(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:c}(e).mode}(null==e||(e.hasZ??!1),t)}function r(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function n(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function o(e,t){t&&e.warn(".elevationInfo=",t)}i.d(t,{$7:()=>n,B:()=>r,XF:()=>o,tW:()=>a,w7:()=>s}),i(83047),i(16271);const l={mode:"absolute-height",offset:0},c={mode:"on-the-ground",offset:null}},25943:(e,t,i)=>{i.d(t,{d:()=>S});var s,r=i(31635),n=i(78888),a=i(65008),o=i(49186),l=i(36563),c=(i(44208),i(66344)),u=i(15142),f=i(74887),h=i(36708),p=i(96211),d=i(84952),m=i(10107),g=(i(53966),i(87811),i(40608)),y=i(72802),w=i(4718),v=i(69397),x=i(34275);class b{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,w.o8)(t));const s=this.location.width,r=this.location.height;let n=!0,a=!0;const l=function(e,t=!1){return e<=x.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,l[c]|=1<<t):n=!1,31===t&&++c}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,n=this._availability;return r<0||r>n.length?"unknown":n[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:s,col:r,width:a,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:a,height:l},valid:!0,data:new Array(a*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==a||e.location.height!==l))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:a,height:l}});return b.fromJSON(e)})}static fromJSON(e){return Object.freeze(new b(e))}}function I(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let S=class extends a.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),this.addHandles((0,h.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),h.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,s).catch(e=>e).then(s=>{if(s instanceof b){const r=s.getAvailability(t,i);if("unavailable"===r)throw C(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"})}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const n=this.layer.tileInfo;n.updateTileInfo(s);const a=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,f.zf)(e))throw e;if(n.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,n,a){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const c=new AbortController;a.then(()=>c.abort(),()=>c.abort());let u=!1;const h=(0,l.hA)(()=>{u||(u=!0,c.abort())});if(this.addHandles(h,o),await(0,p.md)(10,c.signal).catch(()=>{}),u||(u=!0,this.removeHandles(o)),(0,f.G4)(c))return;const d=new y.U(e,t,i,r),m={...n,signal:c.signal},g=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&g.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:s._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,r);if(n)return Promise.resolve(n);const a=s?.signal;return s={...s,signal:null},new Promise((e,t)=>{(0,f.u7)(a,()=>t((0,f.NK)()));const i=I(r);let n=this._pendingTilemapRequests[i];if(!n){n=b.fromDefinition(r,s).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,d.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=I(s);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"size",void 0),S=s=(0,r.Cg)([(0,g.$)("esri.layers.support.TilemapCache")],S)},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ze});var s=i(31635),r=i(13874),n=i(69540),a=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),f=i(10107),h=i(56507),p=i(44208),d=(i(87811),i(40608)),m=i(4146),g=i(18768),y=i(63074),w=i(69208),v=i(89015),x=i(16131),b=i(8303),I=i(63660),C=i(56551),S=i(54310),A=i(25036),T=i(82935),R=i(10873),_=i(20437),M=i(74797),O=i(22796),F=i(76353),P=i(84169),k=i(4916),D=i(68197),N=i(5443),L=i(16930),E=i(73444),B=i(14140),z=i(16019);function J(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function $(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function U(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let n=-1,a=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];J(l)?n=e:$(l)&&(a=e);const c=t[l],u=[];if("values"in c){c.values.forEach(e=>u.push("string"==typeof e?new Date(e).getTime():e));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,n=(t-e)/(i-1);s.push([e-.5*n,t+.5*n]),r.push(n);for(let t=0;t<i;t++)u.push(e+n*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}n>-1&&-1===a?a=0===n?1:0:a>-1&&-1===n?n=0===a?1:0:-1===a&&-1===n&&(n=0,a=1),o=o.filter((e,t)=>!(t===n||t===a));const{referencing:l}=e.domain,c=l.find(e=>e.coordinates.includes(i[n])).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new L.A({wkid:f}),[p,d]=s[n],[m,g]=s[a],y=new N.A({xmin:p,xmax:d,ymin:m,ymax:g,spatialReference:h});return{width:Math.round(y.width/r[n]),height:Math.round(y.height/r[a]),extent:y,dimensions:o}}function j(e){const t=(0,E.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function V(){return Math.round(255*Math.random())}function q(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:n,categoryEncoding:a,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=j(r)),n&&(t[e].unit=n.label?j(n.label):null,t[e].symbol=n.symbol?.value),a)){const i=Object.entries(a).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1}));let s=!1;o?.categories?.length&&(o.categories.forEach(e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find(e=>e.ClassName===t);if(!r)return;const n=e.label?j(e.label):null;if(r.Label=n,e.preferredColor){const t=D.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}}),s&&i.forEach(e=>{null==e.Red&&(e.Red=V(),e.Green=V(),e.Blue=V())}));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map(e=>({attributes:e}))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function Z(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,z.X1)(t,i)}function H(e,t,i){const s=e.map((e,i)=>({name:e,count:t[i]})).sort((e,t)=>e.name>t.name?-1:1),r=(n=1,e=>n*=e.count);var n;const a=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=a[s.findIndex(({name:t})=>t===e[r])]*(i%t[r]),i=Math.floor(i/t[r]);return o}var G=i(45617),W=i(87186),X=i(77301),Y=i(28435),K=i(6952);let Q=class extends k.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[n,a]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:n,height:a},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,Y.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:n,name:a,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:f,pixelType:h}=c,p=t.extent??new N.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:f-.5,spatialReference:new L.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/f},g={...t.keyProperties};s&&(g.DataType="Thematic");const y=new W.A({width:u,height:f,pixelType:h,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:g,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:n});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(y),this.createRemoteDatasetStorageInfo(y,512,512),this._set("rasterInfo",y),this.updateTileInfo(),y.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,y.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),y.multidimensionalInfo||(this.source=null),this.datasetName=a}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,n="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:n},i):Promise.resolve((0,Y.lD)(e,t,r,n)),l=null!=s.statistics,u=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,K.f4)(e)),h=await(0,c.Lx)([o,f]);if(!h[0].value&&h[1].value)throw new a.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),u||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const n=r.dimensions.map(e=>new G.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),a=(0,X.NG)(n,t),o=null==a?null:e[a];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,K.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,s.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Q.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,f.MZ)()],Q.prototype,"source",void 0),(0,s.Cg)([(0,f.MZ)()],Q.prototype,"url",null),Q=(0,s.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Q);const ee=Q;var te=i(22671);let ie=class extends k.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:n}=await this._fetchData(e),{statistics:a,histograms:o}=(0,K.eH)(i[0]),l=n?.map(e=>({BandName:e})),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ee({source:{extent:t,pixelBlocks:i,attributeTable:r?te.A.fromJSON(r):null,multidimensionalInfo:s,statistics:a,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new a.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new a.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new a.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:n,values:o}=s[e];if(!("ndarray"===n.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new a.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!J(t[t.length-1])||!$(t[t.length-2]))throw new a.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=U(e),{ranges:n}=e,a=Object.keys(n).sort((e,t)=>e<t?-1:1),o=[];for(let e=0;e<a.length;e++){const t=a[e];r?.length&&o.push({name:t,dimensions:r})}const l=q(e);o.forEach(e=>l[e.name]&&Object.assign(e,l[e.name]));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<a.length;e++){const s=a[e],{values:o,dataType:l,axisNames:c,shape:f}=n[s],h=f.length>2?e*f.slice(0,-2).reduce((e,t)=>e*t):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":Z(o),g=t*i,y=o.length/g;for(let s=0;s<y;s++){const n=B.A.createEmptyBand(m,g),a=new Uint8Array(g).fill(255);let l=!1;const c=s*g;for(let e=0;e<g;e++){const t=o[c+e];null==t?(a[e]=0,l=!0):n[e]=t}if(0===e||r?.length){const e=new B.A({width:t,height:i,mask:l?a:null,pixels:[n],pixelType:m});e.updateStatistics(),r?.length?u[H(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(n),l?e.mask&&(e.mask=B.A.combineBandMasks([e.mask,a])):e.mask=l?a:null}}}const f=Object.values(l).find(e=>e.attributeTable)?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:a}}(t)}};(0,s.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],ie.prototype,"source",void 0),ie=(0,s.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],ie);const se=ie;var re=i(4576),ne=i(21325),ae=i(50103),oe=i(21312);function le(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function ce(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new L.A({wkid:t});if(e=String(e).trim(),(0,ne.jp)(e))return new L.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),n=r>-1?r:i.indexOf("GEOGCS");if(-1===n)return null;const a=e.slice(n,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=ue(a);const l=new L.A(t?{wkid:t}:{wkt:a}),c=ue(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=ue(e),new L.A(0!==t?{wkid:t}:{wkt:e})):null}function ue(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function fe(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,ae.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,ae.mX)(e);t.spatialReference=ce(i)}}else if((0,ae.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,ae.V6)(e,"GeodataXform"),i=ce((0,ae.v7)(t,"SpatialReference/WKID")||(0,ae.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,ae.v7)(t,"PolynomialOrder")??1,r=(0,ae.Ui)(t,"CoeffX/Double"),n=(0,ae.Ui)(t,"CoeffY/Double"),a=(0,ae.Ui)(t,"InverseCoeffX/Double"),o=(0,ae.Ui)(t,"InverseCoeffY/Double"),l=le(r,n),c=le(a,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new oe.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,ae.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,ae.mX)(e));else if((0,ae.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,ae.v7)(e,"NoDataValue"),i=(0,ae.V6)(e,"Histograms/HistItem"),s=(0,ae.v7)(i,"HistMin"),r=(0,ae.v7)(i,"HistMax"),n=(0,ae.v7)(i,"BucketCount"),a=(0,ae.mX)(i,"HistCounts")?.split("|").map(e=>Number(e));let o,l,c,u;(0,ae.IC)(e,"Metadata/MDI").forEach(e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}});const f=(0,ae.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=s&&null!=r?{min:s,max:r,size:n||a.length,counts:a}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}});const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map(e=>e.statistics).filter(re.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map(e=>e.histogram).filter(re.Ru):null}return t}var he=i(51244);let pe=class extends k.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:n}=await this._fetchAuxiliaryData(e);const a=!i;a&&(i=new L.A({wkid:3857})),r?.length&&null==s&&(s=(0,K.Pg)(r));const{width:o,height:l}=t;let c=new N.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=n?n.forwardTransform(c):c;let f=!0;if(n){const e=n.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(n=null,c=u)}const h=new ee({source:{extent:u,nativeExtent:c,transform:n,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,he.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new a.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,p.A)("ios"),n=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==n)throw new a.A("image-aux-raster:open","the data cannot be decoded");return n}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),n=this.datasetFormat,a="JPG"===n?"jgw":"PNG"===n?"pgw":"BMP"===n?"bpw":null,o=a&&i.includes(a)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+a,{responseType:"text",signal:t}),l=await(0,c.Lx)([r,o]);if(t?.aborted)throw(0,c.NK)();const u=fe(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;u.transform=6===e?.length?new oe.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),pe=(0,s.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],pe);const de=pe;var me=i(97768),ge=i(84952),ye=i(86738),we=i(20223),ve=i(87045),xe=i(25943),be=i(73037),Ie=i(82371);let Ce=class extends k.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:n}=this.rasterInfo,{transposeInfo:a}=r,o=null!=a&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);h=[];let n=0;for(const{data:e}of t)h.push(n),r.set(new Uint8Array(e),n),n+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?a.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:g,blockWidth:y,blockHeight:w}=r,{x:v,y:x}=this.getPyramidPixelSize(e),b=Math.round((n.xmin-g.x)/v)%y,I=Math.round((n.xmax-g.x)/v)%y||y,C=Math.round((g.y-n.ymax)/x)%w,S=Math.round((g.y-n.ymin)/x)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?C:0,R=i===m.maxCol?I:y,_=t===m.maxRow?S:w;return(0,Y.z$)(d,{x:A,y:T},{width:R-A,height:_-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some(e=>{const i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,s]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let n=r-s+this._levelOffset;const a=i.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,i.row,i.col,t))break}catch{}if(n--,s++,i=this.identifyPixelLocation(a,s,t.datumTransformation),null===i)return null}return-1===n||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new a.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new a.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new a.A("image-server-raster:open","cannot initialize image service");(0,Ie.E9)(r,s);const n="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:n}=t;if(null!=r&&null!=n)return ve.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=n)});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,n=s?t(s):-1/0;return ve.A.fromJSON({...e,lods:e.lods.filter(e=>{const i=t(e.scale);return i<=r&&i>=n})})}return ve.A.fromJSON(e)}(s.tileInfo,s):ve.A.fromJSON(s.tileInfo);(0,me.Lw)(n);const[o,l]=this._computeMinMaxLOD(r,n),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=n;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some(e=>Math.abs(e.resolution-h)<f))&&(u.x=u.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,g]=n.size,y=[],w=[];p.forEach((e,t)=>{e.level>=l.level&&e.level<=o.level&&y.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)}),y.sort((e,t)=>e.x-t.x);const v=this.computeBlockBoundary(c,m,g,n.origin,y,d),x=y.length>1?y.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every(e=>e===w[0])?w[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(r.storageInfo=new we.A({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:x,pyramidScalingFactor:I,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:n,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:v}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new be.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,ge.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new xe.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=L.A.fromJSON(t.spatialReference||e.spatialReference),n=new ye.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new W.A({width:i,height:s,bandCount:3,extent:N.A.fromJSON(e),spatialReference:r,pixelSize:n,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Ie.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then(e=>e.data?.slices).catch(()=>null):null,n=await Promise.all([s,r]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,n=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),a=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[n,a];if("Raster"===o)return[r.find(e=>e.resolution===i.x)??n,a];const{minScale:l,maxScale:c}=this.sourceJSON;let u=n;c>0&&(u=r.find(e=>Math.abs(e.scale-c)<s),u||(u=r.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??n));let f=a;return l>0&&(f=r.find(e=>Math.abs(e.scale-l)<s)??a,this._levelOffset=f.level-a.level),[u,f]}};(0,s.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Ce.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,f.MZ)()],Ce.prototype,"tileType",void 0),Ce=(0,s.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],Ce);const Se=Ce;var Ae=i(47124);const Te=new Map;Te.set("Int8","s8"),Te.set("UInt8","u8"),Te.set("Int16","s16"),Te.set("UInt16","u16"),Te.set("Int32","s32"),Te.set("UInt32","u32"),Te.set("Float32","f32"),Te.set("Float64","f32"),Te.set("Double64","f32");const Re=new Map;Re.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Re.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Re.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Re.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let _e=class extends k.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*n);return new B.A({width:r,height:n,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let g=0;for(g=0;g<d;g++)p&&!p.includes(g)||m.push(this.request(this._files.data,{range:{from:u[g].from,to:u[g].to},responseType:"array-buffer",signal:s.signal}));const y=await Promise.all(m),w=y.map(e=>e.data.byteLength).reduce((e,t)=>e+t),v=new Uint8Array(w),x=[];let b=0;for(g=0;g<d;g++)x.push(b),v.set(new Uint8Array(y[g].data),b),b+=y[g].data.byteLength;const I=Re.get(this.rasterInfo.storageInfo.compression).decoderFormat,C=await this.decodePixelBlock(v.buffer,{width:r,height:n,format:I,planes:p?.length||l,offsets:x,pixelType:c});if(null==C)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!C.mask&&(S=S[0],null!=S)){const e=C.width*C.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(g=0;g<e;g++)Math.abs((C.pixels[0][g]-S)/S)>1e-6&&(t[g]=1);else for(g=0;g<e;g++)C.pixels[0][g]!==S&&(t[g]=1);C.mask=t}let A=0,T=0;if(f!==r||h!==n){let e=C.mask;if(e)for(g=0;g<n;g++)if(T=g*r,g<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*n),C.mask=e,g=0;g<h;g++)for(T=g*r,A=0;A<f;A++)e[T+A]=1}return C}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:n,skipExtensions:a=[]}=this.ioConfig;if(!a.includes("aux.xml")&&!n){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,K.Pg)(t.histograms)))}n&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,n,a;if(Ae.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)s[4*n+a]=i[4*n+3-a];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,g=-1;for(;m<this._storageIndex.length;){g++;const e=Math.ceil(f/l/u**g)-1,t=Math.ceil(h/c/u**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return Re.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=n**f,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=c*u;p=n**e,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,g=0;const y=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:i<c-1?s:Math.ceil(a/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,ae.V6)(e,"MRF_META/Raster");if(!t)throw new a.A("mrf:open","not a valid MRF format");const i=(0,ae.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),o=((0,ae.mX)(t,"Compression")||"none").toLowerCase();if(!Re.has(o))throw new a.A("mrf:open","currently does not support compression "+o);const l=(0,ae.mX)(t,"DataType")||"UInt8",c=Te.get(l);if(null==c)throw new a.A("mrf:open","currently does not support pixel type "+l);const u=(0,ae.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,ae.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map(e=>parseFloat(e)))),(0,ae.V6)(e,"MRF_META/CachedSource"))throw new a.A("mrf:open","currently does not support MRF referencing other data files");const g=(0,ae.V6)(e,"MRF_META/GeoTags"),y=(0,ae.V6)(g,"BoundingBox");let w,v=!1;if(null!=y){const e=parseFloat(y.getAttribute("minx")),t=parseFloat(y.getAttribute("miny")),i=parseFloat(y.getAttribute("maxx")),s=parseFloat(y.getAttribute("maxy")),r=(0,ae.mX)(g,"Projection")||"";let n=L.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(n=new L.A({wkid:e}))}else n=ce(r)??L.A.WGS84;else v=!0,n=new L.A({wkid:3857});w=new N.A(e,t,i,s),w.spatialReference=n}else v=!0,w=new N.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new L.A({wkid:3857})});const x=(0,ae.V6)(e,"MRF_META/Rsets"),b=parseInt(x?.getAttribute("scale")||"2",10),I=w.spatialReference,C=new we.A({origin:new ye.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:o,pyramidScalingFactor:b}),S=new ye.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new W.A({width:s,height:r,extent:w,isPseudoSpatialReference:v,spatialReference:I,bandCount:n,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:C}),T=(0,ae.mX)(e,"datafile"),R=(0,ae.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Re.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}};(0,s.Cg)([(0,f.MZ)()],_e.prototype,"_files",void 0),(0,s.Cg)([(0,f.MZ)()],_e.prototype,"_storageIndex",void 0),(0,s.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],_e.prototype,"datasetFormat",void 0),_e=(0,s.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],_e);const Me=_e;var Oe=i(15265);function Fe(e){const t=e.fields,i=e.records,s=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),n=r.map(e=>e.name),a=[];let o=0,l=0;return i.forEach(e=>{const t={};for(t[s]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})}),{displayFieldName:"",fields:r,features:a}}class Pe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:i,recordCount:s,headerByteCount:r,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Oe.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>n;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach(t=>{if("C"===t.type)i.push((0,Oe.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length}),c.push(i)):o+=n}}return{header:a,fields:l,records:c,recordSet:Fe({fields:l,records:c})}}}var ke=i(45664),De=i(12196);const Ne=(e,t)=>e.get(t)?.values,Le=(e,t)=>e.get(t)?.values?.[0];let Ee=class extends k.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const n=await this._fetchRawTiffTile(e,t,i,!0,s);null!=n&&n.pixels[0]instanceof Uint8Array&&(r.mask=n.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:n}=(0,ke.uT)(i),l=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(l,c,s,n?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,ke.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:n,planes:a,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:g}=t;let y=ce(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==y&&(w=!0,y=new L.A({wkid:3857}));const v=new N.A({...t.extent,spatialReference:y}),x=new ye.A(v?{x:v.xmin,y:v.ymax,spatialReference:y}:{x:0,y:0}),b=new we.A({blockWidth:r,blockHeight:n,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:x,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new ye.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),C=g?{BandProperties:g.bandProperties,DataType:g.dataType}:{};let S=null;const A=Le(e[0],"PHOTOMETRICINTERPRETATION"),T=Ne(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new W.A({width:i,height:s,bandCount:a,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:y,isPseudoSpatialReference:w,keyProperties:C,extent:v,colormap:S,statistics:g?g.statistics:null});if(m?.length&&(R.nativeExtent=new N.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:y}),R.transform=new oe.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new ye.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach(i=>{i.x*=e,i.y*=t})}return{imageInfo:t,rasterInfo:R}}(l),h=(0,ke.zS)(l),p=(0,ke.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:n,ifds:l,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new a.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new a.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=l[0].get("PREDICTOR")?.values?.[0],m=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new a.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:g,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!g){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,K.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new ye.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}y.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||g||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),g&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const n=await this._readIFD(t,i,De.NB,s,r);if(!n?.ifd)throw new a.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(n.ifd),!n.nextIFD)return null;t.posIFD=n.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=De.NB,s=4,r){let{fileChunk:n,posIFD:a,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,ke.JM)(n,t,a,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach(t=>{t.values||e.push(t)}),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];a=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:n,posIFD:a,fileOffset:o},r),c=await this._readIFD(l,t,De.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(n=(await this.request(this.url,{range:{from:o,to:o+a+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,n.byteLength<a+l.requiredBufferSize?null:(e.fileChunk=n,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter(e=>null!=e.offlineOffsetSize);if(0===r.length)return;const n=r.map(e=>e.offlineOffsetSize),a=Math.min.apply(null,n.map(e=>e[0])),o=Math.max.apply(null,n.map(e=>e[0]+e[1]));let l=1===n.length||o-a<=this._bufferSize;if(!l&&n.length>1&&(n.sort((e,t)=>e[0]-t[0]),l=n.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,n[0][0])===o),l){const e=await this._fetchOffsets(a,Math.max(o,a+this._bufferSize),s);return void r.forEach(i=>(0,ke.Cr)(e,t,i,a))}const c=r.map(async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,ke.Cr)(r,t,e,i[0])});await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,n=Math.ceil((t-e)/r);let a=e;for(let e=0;e<n;e++)s.push(this.request(this.url,{range:{from:a,to:e===n-1?t:a+r-1},responseType:"array-buffer",signal:i})),a+=r;const o=await Promise.all(s);if(1===n)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<n;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const n=this._getTileLocation(e,t,i,s);if(!n)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=n,u=a.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal})),f=await Promise.all(u),h=f.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==w)return null;let v,x,b;if(o!==g||l!==y){let e=w.mask;if(e)for(v=0;v<y;v++)if(b=v*g,v<l)for(x=o;x<g;x++)e[b+x]=0;else for(x=0;x<g;x++)e[b+x]=0;else for(e=new Uint8Array(g*y),w.mask=e,v=0;v<l;v++)for(b=v*g,x=0;x<o;x++)e[b+x]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:n}=this.rasterInfo.storageInfo,a=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[a]:0===a?o?.ifds[0]:o?.pyramidIFDs[a-1];if(!l)return null;const c=(0,ke.XO)(l,o),u=Ne(l,"TILEOFFSETS");if(void 0===u)return null;const f=Ne(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=n[a];if(t>d||i>m||t<h||i<p)return null;const g=Le(l,"IMAGEWIDTH"),y=Le(l,"IMAGELENGTH"),w=Le(l,"TILEWIDTH"),v=Le(l,"TILELENGTH"),x=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;x[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;x.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<x.length;e++)if(null==x[e].from||!x[e].to||x[e].to<0)return null;return{ranges:x,ifd:l,actualTileWidth:i===m&&g%w||w,actualTileHeight:t===d&&y%v||v}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Pe.parse(t);return i?.recordSet?te.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s.Cg)([(0,f.MZ)()],Ee.prototype,"_files",void 0),(0,s.Cg)([(0,f.MZ)()],Ee.prototype,"_headerInfo",void 0),(0,s.Cg)([(0,f.MZ)()],Ee.prototype,"_bufferSize",void 0),(0,s.Cg)([(0,f.MZ)()],Ee.prototype,"_chunkSize",void 0),(0,s.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Ee.prototype,"datasetFormat",void 0),Ee=(0,s.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Ee);const Be=Ee,ze=new Map;ze.set("MRF",{desc:"Meta Raster Format",constructor:Me}),ze.set("TIFF",{desc:"GeoTIFF",constructor:Be}),ze.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Se}),ze.set("JPG",{desc:"JPG Raster Format",constructor:de}),ze.set("PNG",{desc:"PNG Raster Format",constructor:de}),ze.set("GIF",{desc:"GIF Raster Format",constructor:de}),ze.set("BMP",{desc:"BMP Raster Format",constructor:de}),ze.set("CovJSON",{desc:"COVJSON Raster Format",constructor:se}),ze.set("MEMORY",{desc:"In Memory Raster Format",constructor:ee});class Je{static get supportedFormats(){const e=new Set;return ze.forEach((t,i)=>e.add(i)),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let n=e.datasetFormat??i?.datasetFormat;null==n&&(t.includes(".")?n=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?n="CovJSON":s?.extent&&s.pixelblocks&&(n="MEMORY")),"OVR"===n||"TIF"===n?n="TIFF":"JPG"===n||"JPEG"===n||"JFIF"===n?n="JPG":"COVJSON"===n&&(n="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(n="RasterTileServer");const o={url:t,source:s,sourceJSON:r,datasetFormat:n,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach(e=>{null==o[e]&&delete o[e]}),n){if(!this.supportedFormats.has(n))throw new a.A("rasterfactory:open","not a supported format "+n);if("CRF"===n)throw new a.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,ze.get(n).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(ze.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e);let c=0;const u=()=>{if(n=l[c++],!n)return null;if("CRF"===n)return null;const t=new(0,ze.get(n).constructor)(o);return t.open({signal:e.signal}).then(()=>t).catch(()=>u())};return u()}static register(e,t,i){ze.has(e.toUpperCase())||ze.set(e.toUpperCase(),{desc:t,constructor:i})}}var $e=i(6049),Ue=i(24212),je=i(30291),Ve=i(88625);let qe=class extends((0,y.dM)((0,A.j)((0,x.q)((0,b.A)((0,C.H)((0,w.d)((0,v.o)((0,I.G)((0,T.e)((0,g.b)((0,S.J)((0,l.P)((0,n.O)(m.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)(async(e,t,s)=>{const{save:r,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return r(this,t);case 1:return n(this,s,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:["Image Service"]},e).catch(c.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,M.rZ)("Pixel Value"),(0,M.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,M.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,M.DV)(t),s=(0,M.y6)();e.push(i,s)}if(r){const t=(0,M.AL)(r);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==M.F_.rawServicePixelValue)),s=(0,je.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,M.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,h.PZ)(O.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof a.A)throw e;throw new a.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,F.q)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new a.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new a.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,F.p)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,$e.UD)(t.toJSON(),s);const r=await Promise.all(s.map(e=>Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i}))),n=r.findIndex(e=>null==e);if(n>-1)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${s[n]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new a.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Je.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new a.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>i[e.url]=e);const s=(0,$e.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new P.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof a.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(){const e=this.elevationInfo;(0,Ue.XF)(o.A.getLogger(this),(0,Ue.$7)("ImageryTile layers","relative-to-scene",e)),(0,Ue.XF)(o.A.getLogger(this),(0,Ue.tW)("ImageryTile layers",e))}};(0,s.Cg)([(0,f.MZ)({clonable:!1})],qe.prototype,"_primaryRasters",void 0),(0,s.Cg)([(0,f.MZ)({type:Ve.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],qe.prototype,"elevationInfo",null),(0,s.Cg)([(0,f.MZ)(R.fV)],qe.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,f.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],qe.prototype,"isReference",void 0),(0,s.Cg)([(0,f.MZ)({type:["show","hide"]})],qe.prototype,"listMode",void 0),(0,s.Cg)([(0,f.MZ)({json:{read:!0,write:!0}})],qe.prototype,"blendMode",void 0),(0,s.Cg)([(0,f.MZ)({type:O.A,json:{name:"renderingRule",write:!0}})],qe.prototype,"rasterFunction",void 0),(0,s.Cg)([(0,f.MZ)()],qe.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,f.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],qe.prototype,"version",void 0),(0,s.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],qe.prototype,"type",void 0),(0,s.Cg)([(0,f.MZ)({type:["ArcGISTiledImageServiceLayer"]})],qe.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,f.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],qe.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,f.MZ)({type:r.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],qe.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,f.MZ)({readOnly:!0})],qe.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,f.MZ)({readOnly:!0,type:[_.A]})],qe.prototype,"fields",void 0),(0,s.Cg)([(0,f.MZ)({readOnly:!0,type:[_.A]})],qe.prototype,"rasterFields",null),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],qe.prototype,"source",void 0),qe=(0,s.Cg)([(0,d.$)("esri.layers.ImageryTileLayer")],qe);const Ze=qe},56551:(e,t,i)=>{i.d(t,{H:()=>h});var s=i(31635),r=i(10107),n=(i(44208),i(53966),i(87811),i(40608)),a=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let f=class extends((0,a.O)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,s.Cg)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,s.Cg)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,s.Cg)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,s.Cg)([(0,n.$)("esri.renderers.support.RasterPresetRenderer")],f);const h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,s.Cg)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,s.Cg)([(0,n.$)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},69397:(e,t,i)=>{i.d(t,{$B:()=>r,Qf:()=>c,Qh:()=>o,RS:()=>n,ez:()=>h,lM:()=>a,qK:()=>f});var s=i(34275);function r(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=h;for(let s=0;s<t;s++)i+=l(e[s]);return i}(e);let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):f;case"string":return r(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0),0)}function u(e,t){return h+e.length*t}const f=32,h=16,p=145},73037:(e,t,i)=>{i.d(t,{A:()=>c});var s,r=i(31635),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r.Cg)([(0,a.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r.Cg)([(0,n.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r.Cg)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c)},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(78888),r=i(5443),n=i(86738),a=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),g=(0,c.jV)(m,i);e=f.path;const y=p||await(0,s.A)(e,g).then(e=>e.data),w=y.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,g):null,v=y.hasColormap?(0,s.A)(`${e}/colormap`,g):null,x=y.hasHistograms?(0,s.A)(`${e}/histograms`,g):null,b=y.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,g):null,I=y.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,g):null,C=await Promise.allSettled([w,v,x,b,I]);let S=null;if(y.minValues&&y.minValues.length===y.bandCount){S=[];for(let e=0;e<y.minValues.length;e++)S.push({min:y.minValues[e],max:y.maxValues[e],avg:y.meanValues[e],stddev:y.stdvValues[e]})}const A=r.A.fromJSON(y.extent),T=Math.ceil(A.width/y.pixelSizeX-.1),R=Math.ceil(A.height/y.pixelSizeY-.1),_=a.A.fromJSON(y.spatialReference||y.extent.spatialReference),M="fulfilled"===C[0].status?C[0].value?.data:null,O=M?.features?.length?u.A.fromJSON(M):null,F="fulfilled"===C[1].status?C[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===C[2].status?C[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===C[3].status?C[3].value?.data??{}:{},L="fulfilled"===C[4].status?C[4].value?.data.multidimensionalInfo:null,E=L?.variables?.length?L:null;E&&E.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});const{defaultVariable:B,serviceDataType:z}=y;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=y.noDataValue;y.noDataValues?.length&&y.noDataValues.some(e=>e!==J)&&(J=y.noDataValues);const $=y.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:y.extent.xmin,y:y.extent.ymax,spatialReference:_}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:y.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:y.bandCount,extent:r.A.fromJSON(y.extent),spatialReference:_,pixelSize:new n.A({x:y.pixelSizeX,y:y.pixelSizeY,spatialReference:_}),pixelType:y.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:E,storageInfo:$})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(31635),r=i(25482),n=i(10107),a=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s.Cg)([(0,n.MZ)()],o.prototype,"affectsPixelSize",null),(0,s.Cg)([(0,n.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s.Cg)([(0,a.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o)}}]);