@arcgis/core 4.32.0-next.20250121 → 4.32.0-next.20250122

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 (279) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/arcade/treeAnalysis.js +1 -1
  3. package/assets/esri/core/t9n/Units_ar.json +1 -1
  4. package/assets/esri/core/t9n/Units_bg.json +1 -1
  5. package/assets/esri/core/t9n/Units_bs.json +1 -1
  6. package/assets/esri/core/t9n/Units_ca.json +1 -1
  7. package/assets/esri/core/t9n/Units_cs.json +1 -1
  8. package/assets/esri/core/t9n/Units_da.json +1 -1
  9. package/assets/esri/core/t9n/Units_de.json +1 -1
  10. package/assets/esri/core/t9n/Units_el.json +1 -1
  11. package/assets/esri/core/t9n/Units_es.json +1 -1
  12. package/assets/esri/core/t9n/Units_et.json +1 -1
  13. package/assets/esri/core/t9n/Units_fi.json +1 -1
  14. package/assets/esri/core/t9n/Units_fr.json +1 -1
  15. package/assets/esri/core/t9n/Units_he.json +1 -1
  16. package/assets/esri/core/t9n/Units_hr.json +1 -1
  17. package/assets/esri/core/t9n/Units_hu.json +1 -1
  18. package/assets/esri/core/t9n/Units_id.json +1 -1
  19. package/assets/esri/core/t9n/Units_it.json +1 -1
  20. package/assets/esri/core/t9n/Units_ja.json +1 -1
  21. package/assets/esri/core/t9n/Units_ko.json +1 -1
  22. package/assets/esri/core/t9n/Units_lt.json +1 -1
  23. package/assets/esri/core/t9n/Units_lv.json +1 -1
  24. package/assets/esri/core/t9n/Units_nl.json +1 -1
  25. package/assets/esri/core/t9n/Units_no.json +1 -1
  26. package/assets/esri/core/t9n/Units_pl.json +1 -1
  27. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  28. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  29. package/assets/esri/core/t9n/Units_ro.json +1 -1
  30. package/assets/esri/core/t9n/Units_ru.json +1 -1
  31. package/assets/esri/core/t9n/Units_sk.json +1 -1
  32. package/assets/esri/core/t9n/Units_sl.json +1 -1
  33. package/assets/esri/core/t9n/Units_sr.json +1 -1
  34. package/assets/esri/core/t9n/Units_sv.json +1 -1
  35. package/assets/esri/core/t9n/Units_th.json +1 -1
  36. package/assets/esri/core/t9n/Units_tr.json +1 -1
  37. package/assets/esri/core/t9n/Units_uk.json +1 -1
  38. package/assets/esri/core/t9n/Units_vi.json +1 -1
  39. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  40. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  41. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  42. package/assets/esri/core/workers/RemoteClient.js +1 -1
  43. package/assets/esri/core/workers/chunks/03b94362ed2a45ee5ea3.js +1 -0
  44. package/assets/esri/core/workers/chunks/0446f2ffad255cd40272.js +1 -0
  45. package/assets/esri/core/workers/chunks/059119f1731c2103c91c.js +1 -0
  46. package/assets/esri/core/workers/chunks/05e58286f8015dba6768.js +1 -0
  47. package/assets/esri/core/workers/chunks/060414956bf316529c48.js +1 -0
  48. package/assets/esri/core/workers/chunks/{f8e188af5608293d5b2b.js → 07bff9e742f3e5877f3f.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{6400f39a965900f66ce7.js → 083c73428945fb3d4558.js} +1 -1
  50. package/assets/esri/core/workers/chunks/0d3154b90bc3fd7e6b4c.js +1 -0
  51. package/assets/esri/core/workers/chunks/0ec2ae595fa22998ffea.js +1 -0
  52. package/assets/esri/core/workers/chunks/{105dcc7b7284b1e965b7.js → 15c5b1dd8f398f641f6e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/163451124c66a7a0bcdc.js +1 -0
  54. package/assets/esri/core/workers/chunks/17cc6638a510da164f58.js +1 -0
  55. package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +1 -0
  56. package/assets/esri/core/workers/chunks/1e9349411af082ec03d0.js +1 -0
  57. package/assets/esri/core/workers/chunks/1eb47cfca815ac432cf5.js +1 -0
  58. package/assets/esri/core/workers/chunks/{82266ca8002554198208.js → 20e7fae0c173807ba9a2.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{af0b0a7eedebcf99d05d.js → 2118e9ffb24178ed7f59.js} +1 -1
  60. package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +1 -0
  61. package/assets/esri/core/workers/chunks/21c3882a282a4755e032.js +1 -0
  62. package/assets/esri/core/workers/chunks/{435c037ccba71f1e22d3.js → 2488a0da3be64b0a26f4.js} +1 -1
  63. package/assets/esri/core/workers/chunks/254fbd8055ae7a0bb393.js +1 -0
  64. package/assets/esri/core/workers/chunks/2d55eb8059a532ffcc56.js +1 -0
  65. package/assets/esri/core/workers/chunks/3034df78da56fe1c0535.js +1 -0
  66. package/assets/esri/core/workers/chunks/32a96ef30f4608f377d6.js +1 -0
  67. package/assets/esri/core/workers/chunks/{97d66b0d0ff1132966de.js → 33b2f59c2ec10b2a1034.js} +1 -1
  68. package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +1 -0
  69. package/assets/esri/core/workers/chunks/{17726b0ab1bf66185d66.js → 40efcdf03c5224e6c4f7.js} +1 -1
  70. package/assets/esri/core/workers/chunks/424c7788a708abbf9299.js +1 -0
  71. package/assets/esri/core/workers/chunks/484d99910d110830df76.js +1 -0
  72. package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js → 486969dba1dc99402172.js} +2 -2
  73. package/assets/esri/core/workers/chunks/{02b2175132c9720bc756.js → 48f4ba1a5bb692903d06.js} +1 -1
  74. package/assets/esri/core/workers/chunks/4d7bd2bbe9045a2fee7a.js +1 -0
  75. package/assets/esri/core/workers/chunks/{decd316936df1ad3fa65.js → 50b538c93696de5eda97.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{de00150030003de05146.js → 52aea8a4f292a66f5cfa.js} +1 -1
  77. package/assets/esri/core/workers/chunks/56f0eb9802f5cf9ad0d9.js +1 -0
  78. package/assets/esri/core/workers/chunks/57ddd64f0c22274d87e0.js +1 -0
  79. package/assets/esri/core/workers/chunks/5b5be7eb139b153934f5.js +1 -0
  80. package/assets/esri/core/workers/chunks/{4af0674fabfc965f1660.js → 5b876743865ef91b5648.js} +1 -1
  81. package/assets/esri/core/workers/chunks/62b88350892198de5055.js +1 -0
  82. package/assets/esri/core/workers/chunks/{206194cf069ad4bcc3ad.js → 6adf4f3d807f1af1c7c1.js} +1 -1
  83. package/assets/esri/core/workers/chunks/6b1285db2d6695a87553.js +1 -0
  84. package/assets/esri/core/workers/chunks/6c425e1041bdeef32832.js +1 -0
  85. package/assets/esri/core/workers/chunks/6eb829a7959df2269b0e.js +1 -0
  86. package/assets/esri/core/workers/chunks/765b4aefce7c11bbcb1f.js +1 -0
  87. package/assets/esri/core/workers/chunks/{6d17488396583d83d9be.js → 79a265dc21e29d3fd888.js} +1 -1
  88. package/assets/esri/core/workers/chunks/7a9e1696dc6120df15b0.js +1 -0
  89. package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +1 -0
  90. package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +1 -0
  91. package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +1 -0
  92. package/assets/esri/core/workers/chunks/{ee5f43fbe4c2cc199e64.js → 8434cd16effc5efbf1bd.js} +1 -1
  93. package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +1 -0
  94. package/assets/esri/core/workers/chunks/{2779cf112299b612a73a.js → 875cb81f143ff8fe03b5.js} +1 -1
  95. package/assets/esri/core/workers/chunks/885814ef0e34c01a589f.js +1 -0
  96. package/assets/esri/core/workers/chunks/{e610dd938d30f75778bc.js → 8be2d16663a238de9438.js} +1 -1
  97. package/assets/esri/core/workers/chunks/91d5cb094a7051abb6c5.js +1 -0
  98. package/assets/esri/core/workers/chunks/93ba76749746871357e7.js +314 -0
  99. package/assets/esri/core/workers/chunks/991c597f27daa67158c5.js +1 -0
  100. package/assets/esri/core/workers/chunks/9bd22cdf6eb158555906.js +1 -0
  101. package/assets/esri/core/workers/chunks/{33eebe5cb22a03ae90c8.js → 9c88ce9b0020b6f9a37a.js} +1 -1
  102. package/assets/esri/core/workers/chunks/9df7bffadbe0b4aad442.js +1 -0
  103. package/assets/esri/core/workers/chunks/a0a056698f8227210f49.js +1 -0
  104. package/assets/esri/core/workers/chunks/a1cdd09968e11d95c701.js +1 -0
  105. package/assets/esri/core/workers/chunks/a28cb975974b99540432.js +1 -0
  106. package/assets/esri/core/workers/chunks/a29958273958c3e3e932.js +1 -0
  107. package/assets/esri/core/workers/chunks/{98da074899c82f0ded0b.js → af224962edae72b002fa.js} +1 -1
  108. package/assets/esri/core/workers/chunks/af2ed4c8ac238b932d89.js +1 -0
  109. package/assets/esri/core/workers/chunks/af75107f207b2ba01bb4.js +1 -0
  110. package/assets/esri/core/workers/chunks/b1661e6c76ef0800ffd6.js +1 -0
  111. package/assets/esri/core/workers/chunks/b42ecc7c3eb2fd8d1308.js +1 -0
  112. package/assets/esri/core/workers/chunks/b44cf0e4c2f93408cabc.js +1 -0
  113. package/assets/esri/core/workers/chunks/b846052b6f80ad6ada89.js +1 -0
  114. package/assets/esri/core/workers/chunks/{399e67ccb69a5b206354.js → c1fd87af3129873369fd.js} +1 -1
  115. package/assets/esri/core/workers/chunks/c473756f8785ab868ba5.js +1 -0
  116. package/assets/esri/core/workers/chunks/c5368ca97b7f7261967a.js +1 -0
  117. package/assets/esri/core/workers/chunks/c685991c9a30f7435933.js +1 -0
  118. package/assets/esri/core/workers/chunks/ca5bd71bc2c1b1b3f9d9.js +1 -0
  119. package/assets/esri/core/workers/chunks/ce1c89b5a10fb5a7bb49.js +1 -0
  120. package/assets/esri/core/workers/chunks/d45ff061bf71b73e9f26.js +1 -0
  121. package/assets/esri/core/workers/chunks/d4760e583dfac95dc8a1.js +1 -0
  122. package/assets/esri/core/workers/chunks/de2ca2dc1b5d62c0d82e.js +1 -0
  123. package/assets/esri/core/workers/chunks/dfa4be2e07cc4c0938b0.js +1 -0
  124. package/assets/esri/core/workers/chunks/e067cef3b3ac3af49b88.js +1 -0
  125. package/assets/esri/core/workers/chunks/e2775bcceb62fd0df41b.js +1 -0
  126. package/assets/esri/core/workers/chunks/{c81204ae663e58c7b689.js → e63ff8d57fd771413488.js} +1 -1
  127. package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +1 -0
  128. package/assets/esri/core/workers/chunks/{54c149f90bf94b797b36.js → ed30f46236da29c15430.js} +1 -1
  129. package/assets/esri/core/workers/chunks/f016205a8f1fb665d6dd.js +1 -0
  130. package/assets/esri/core/workers/chunks/f02119812ec852edda57.js +1 -0
  131. package/assets/esri/core/workers/chunks/f272070f0878cd3e39a4.js +1 -0
  132. package/assets/esri/core/workers/chunks/f2cf05fbbb51d657d300.js +1 -0
  133. package/assets/esri/core/workers/chunks/{e4f4ad67d778dea5b956.js → f4f6f4933ca58438d7bc.js} +1 -1
  134. package/assets/esri/core/workers/chunks/fdc3d97510c6d43a8882.js +1 -0
  135. package/assets/esri/core/workers/chunks/fef135e55706d84d1947.js +1 -0
  136. package/assets/esri/core/workers/chunks/ff4107b4fd3d3ce24e84.js +1 -0
  137. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  138. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  139. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  140. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  141. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +24 -0
  142. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +49 -24
  143. package/assets/esri/themes/dark/main.css +1 -1
  144. package/assets/esri/themes/light/main.css +1 -1
  145. package/assets/esri/themes/light/view.css +1 -1
  146. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  147. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  148. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  149. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  150. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  151. package/chunks/arcgis-knowledge-client-core.js +1 -1
  152. package/chunks/lyr3DMain.js +1 -1
  153. package/chunks/lyr3DWorker.js +1 -1
  154. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  155. package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +4 -0
  156. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  157. package/editing/templateUtils.js +5 -0
  158. package/geometry/operators/projectOperator.d.ts +4 -0
  159. package/geometry/operators/shapePreservingProjectOperator.d.ts +4 -0
  160. package/geometry/operators/support/GeographicTransformation.d.ts +4 -0
  161. package/geometry/operators/support/GeographicTransformation.js +1 -1
  162. package/geometry/operators/support/GeographicTransformationStep.d.ts +4 -0
  163. package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -0
  164. package/geometry/support/GeographicTransformation.d.ts +2 -2
  165. package/geometry/support/GeographicTransformationStep.d.ts +2 -2
  166. package/interfaces.d.ts +522 -53
  167. package/layers/ILyr3DWasmPerSceneView.js +1 -1
  168. package/layers/LinkChartLayer.js +1 -1
  169. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  170. package/networks/support/utils.js +1 -1
  171. package/package.json +1 -1
  172. package/rest/featureService/FeatureService.js +1 -1
  173. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.d.ts +4 -0
  174. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.js +5 -0
  175. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.d.ts +4 -0
  176. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.js +5 -0
  177. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +4 -0
  178. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.js +5 -0
  179. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +4 -0
  180. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.js +5 -0
  181. package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.d.ts +4 -0
  182. package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.js +5 -0
  183. package/rest/knowledgeGraphService.js +1 -1
  184. package/support/revision.js +1 -1
  185. package/undoredo/support/Services.js +1 -1
  186. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  187. package/views/3d/layers/Lyr3DWasm.js +1 -1
  188. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  189. package/widgets/Editor/UpdateWorkflow.js +1 -1
  190. package/widgets/Editor/workflowUtils.js +1 -1
  191. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  192. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  193. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  194. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  195. package/widgets/FeatureTemplates/featureTemplatesUtils.js +1 -1
  196. package/widgets/FeatureTemplates.js +1 -1
  197. package/widgets/LayerList/LayerListItem.js +1 -1
  198. package/widgets/Locate.js +1 -1
  199. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  200. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  201. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  202. package/widgets/OrientedImageryViewer/components/ImageAreaMeasurement.js +5 -0
  203. package/widgets/OrientedImageryViewer/components/ImageDistanceMeasurement.js +5 -0
  204. package/widgets/OrientedImageryViewer/components/ImageMeasurement.js +5 -0
  205. package/widgets/OrientedImageryViewer/css.js +1 -1
  206. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  207. package/widgets/OrientedImageryViewer.js +1 -1
  208. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +5 -0
  209. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +5 -0
  210. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  211. package/widgets/UtilityNetworkTrace.js +1 -1
  212. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  213. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  214. package/assets/esri/core/workers/chunks/0651586dc7bd2e8b34db.js +0 -1
  215. package/assets/esri/core/workers/chunks/077070295499b9bfabb6.js +0 -1
  216. package/assets/esri/core/workers/chunks/090cfc7f088a729afd47.js +0 -1
  217. package/assets/esri/core/workers/chunks/0d387baa64a89f88b1de.js +0 -1
  218. package/assets/esri/core/workers/chunks/134de9fa142129a43b1e.js +0 -1
  219. package/assets/esri/core/workers/chunks/16fa0a5f73ab67a8d3e4.js +0 -1
  220. package/assets/esri/core/workers/chunks/1797f62e9bf8f1ac8d13.js +0 -1
  221. package/assets/esri/core/workers/chunks/182722e2fe0a35c4d8db.js +0 -1
  222. package/assets/esri/core/workers/chunks/1b3215f3290fb2f07ab8.js +0 -1
  223. package/assets/esri/core/workers/chunks/1f4dd96aacf8c40a1120.js +0 -1
  224. package/assets/esri/core/workers/chunks/22748779ca94eda44de5.js +0 -1
  225. package/assets/esri/core/workers/chunks/2427a01678f3d9fbf30b.js +0 -1
  226. package/assets/esri/core/workers/chunks/33a13544b9e5f4f20bce.js +0 -1
  227. package/assets/esri/core/workers/chunks/423329432fbf007c620b.js +0 -1
  228. package/assets/esri/core/workers/chunks/467bd3c0da9518a0058b.js +0 -1
  229. package/assets/esri/core/workers/chunks/4c1d11a91291b28a73be.js +0 -1
  230. package/assets/esri/core/workers/chunks/51fbbd082ca78e4417d9.js +0 -1
  231. package/assets/esri/core/workers/chunks/5c05c899f7e6f764fedd.js +0 -1
  232. package/assets/esri/core/workers/chunks/6c1470dc0bd4389d1a2d.js +0 -1
  233. package/assets/esri/core/workers/chunks/6e804ee2d96d4de85a5f.js +0 -1
  234. package/assets/esri/core/workers/chunks/712f0dd46932c544df68.js +0 -1
  235. package/assets/esri/core/workers/chunks/71e88c90e9f9a9bddcd8.js +0 -1
  236. package/assets/esri/core/workers/chunks/74ba752dfab8ea5b6d2a.js +0 -314
  237. package/assets/esri/core/workers/chunks/79903647d4ed16d9a402.js +0 -1
  238. package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +0 -1
  239. package/assets/esri/core/workers/chunks/7c98e4fcba1dc24eb788.js +0 -1
  240. package/assets/esri/core/workers/chunks/7d0fc25ce1f74adcfeb6.js +0 -1
  241. package/assets/esri/core/workers/chunks/8249351daa45ca82ca0c.js +0 -1
  242. package/assets/esri/core/workers/chunks/87ddc3d5d751d565cd97.js +0 -1
  243. package/assets/esri/core/workers/chunks/88bb55bca76f978c0aa3.js +0 -1
  244. package/assets/esri/core/workers/chunks/89198ca24466d939e4e8.js +0 -1
  245. package/assets/esri/core/workers/chunks/8cda8dbd95f0a78063a8.js +0 -1
  246. package/assets/esri/core/workers/chunks/8e0e5183c88a45fbfd8e.js +0 -1
  247. package/assets/esri/core/workers/chunks/90eea0c2435bb5d10460.js +0 -1
  248. package/assets/esri/core/workers/chunks/93c1541241f92fc07eaa.js +0 -1
  249. package/assets/esri/core/workers/chunks/964f2897794d8d71dcb7.js +0 -1
  250. package/assets/esri/core/workers/chunks/976daa00d35ee7f27a26.js +0 -1
  251. package/assets/esri/core/workers/chunks/99b4f146d0f1661a217c.js +0 -1
  252. package/assets/esri/core/workers/chunks/aa96a05b94ae642c1c9f.js +0 -1
  253. package/assets/esri/core/workers/chunks/b0055e7b2e840d478de8.js +0 -1
  254. package/assets/esri/core/workers/chunks/b1bf8ad629a6b8f4489a.js +0 -1
  255. package/assets/esri/core/workers/chunks/b1e3448ba51557ff6c13.js +0 -1
  256. package/assets/esri/core/workers/chunks/b30046a40bcfbec8abe4.js +0 -1
  257. package/assets/esri/core/workers/chunks/b538d02706a25bbbe2d0.js +0 -1
  258. package/assets/esri/core/workers/chunks/c436a112a3119ceabebf.js +0 -1
  259. package/assets/esri/core/workers/chunks/c690268f48bc84778b23.js +0 -1
  260. package/assets/esri/core/workers/chunks/c8a09db652389f0d254d.js +0 -1
  261. package/assets/esri/core/workers/chunks/c8a645601d041f411060.js +0 -1
  262. package/assets/esri/core/workers/chunks/cb3b7f83b3efb315bd14.js +0 -1
  263. package/assets/esri/core/workers/chunks/cdc5e4cd1214362e752a.js +0 -1
  264. package/assets/esri/core/workers/chunks/da5fc368eb5b3592d05e.js +0 -1
  265. package/assets/esri/core/workers/chunks/dae7e8357936466482fe.js +0 -1
  266. package/assets/esri/core/workers/chunks/dd935b6335c674b6f596.js +0 -1
  267. package/assets/esri/core/workers/chunks/ddd20894b5107b76b815.js +0 -1
  268. package/assets/esri/core/workers/chunks/df4d7f100222ea671730.js +0 -1
  269. package/assets/esri/core/workers/chunks/eb256e8488e341c4a6f2.js +0 -1
  270. package/assets/esri/core/workers/chunks/ebc0094355504ec09fb8.js +0 -1
  271. package/assets/esri/core/workers/chunks/f1b63f092e239f84b849.js +0 -1
  272. package/assets/esri/core/workers/chunks/f2126b79f41dc62cc576.js +0 -1
  273. package/assets/esri/core/workers/chunks/f3e0b0f07a622fcdd6ae.js +0 -1
  274. package/assets/esri/core/workers/chunks/f581aec77accce7411e0.js +0 -1
  275. package/assets/esri/core/workers/chunks/f877bcbd277a28154d82.js +0 -1
  276. package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +0 -1
  277. package/assets/esri/core/workers/chunks/feeb36ffdffb227c4353.js +0 -1
  278. package/widgets/support/templateUtils.js +0 -5
  279. /package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js.LICENSE.txt → 486969dba1dc99402172.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3427],{71903:(e,t,s)=>{var i;s.d(t,{u:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},79897:(e,t,s)=>{s.d(t,{U:()=>c});var i=s(90237),r=s(69622),n=s(36563),o=s(36708),a=s(11932),l=s(10107),u=s(40608);let c=class extends r.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const r=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],r),(0,n.hA)((()=>this.removeHandles(r)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,n.hA)((()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(h)||this._set("updating",!1))})),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const r=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,r);const o=i(e,t,s);return this.addHandles(o,r),(0,n.hA)((()=>this.removeHandles(r)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(h),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(h))})),h)}}};(0,i._)([(0,l.MZ)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,i._)([(0,u.$)("esri.core.support.UpdatingHandles")],c);const h=-42},13069:(e,t,s)=>{s.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},91806:(e,t,s)=>{s.d(t,{A:()=>c});var i,r=s(90237),n=s(25482),o=s(10107),a=s(56507),l=(s(44208),s(87811),s(40608));let u=i=class extends n.A{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,r._)([(0,o.MZ)({type:a.jz,json:{write:!0}})],u.prototype,"level",void 0),(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,r._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,r._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,r._)([(0,l.$)("esri.layers.support.LOD")],u);const c=u},87045:(e,t,s)=>{s.d(t,{A:()=>C});var i,r=s(90237),n=s(66552),o=s(25482),a=s(83047),l=s(10107),u=s(56507),c=(s(44208),s(87811),s(36005)),h=s(40608),d=s(43937),p=s(86738),f=s(16930),_=s(19419),g=s(21325),y=s(28735),m=s(91806),v=s(72802);const E=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let T=i=class extends o.A{static create(e={}){const{resolutionFactor:t=1,scales:s,size:r=256,spatialReference:n=f.A.WebMercator,numLODs:o=24}=e;if(!(0,g.fn)(n)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new m.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new m.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.A(0,0,n),size:[r,r],spatialReference:n})}const l=(0,g.Vp)(n),u=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):new p.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),c=1/(39.37*(0,a.GA)(n)*96),h=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*c;h.push(new m.A({level:e,scale:t,resolution:i}))}else{let e=(0,g.EA)(n)?512/r*591657527.5917094:256/r*591657527.591555;const s=Math.ceil(o/t);h.push(new m.A({level:0,scale:e,resolution:e*c}));for(let i=1;i<s;i++){const s=e/2**t,r=s*c;h.push(new m.A({level:i,scale:s,resolution:r})),e=s}}return new i({dpi:96,lods:h,origin:u,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],r=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,r[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],r=t[i+1];if(s<=e)return i;if(r===e)return i+1;if(s>e&&r<e)return i+Math.log(s/e)/Math.log(s/r)}return i}tileAt(e,t,s,i){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=s;else if((0,g.aI)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,i=s;else{const e=(0,y.Cv)(t,this.spatialReference);if(null==e)return null;n=e.x,o=e.y,i=s}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return i||(i=new v.U(null,0,0,0,(0,_.vt)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const r=e.level-s.level,n=s.resolution*this.size[0]/2**r,o=s.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,_.vt)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],r=this.lods.length-t;for(let e=0;e<r;e++){const i=e+t,{scale:r,resolution:n}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new m.A({level:e,scale:r,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var F,w;(0,r._)([(0,l.MZ)({type:Number,json:{write:!0}})],T.prototype,"compressionQuality",void 0),(0,r._)([(0,l.MZ)({type:Number,json:{write:!0}})],T.prototype,"dpi",void 0),(0,r._)([(0,l.MZ)({type:String,json:{read:E.read,write:E.write,origins:{"web-scene":{read:!1,write:!1}}}})],T.prototype,"format",void 0),(0,r._)([(0,l.MZ)({readOnly:!0})],T.prototype,"isWrappable",null),(0,r._)([(0,l.MZ)({type:p.A,json:{write:!0}})],T.prototype,"origin",void 0),(0,r._)([(0,c.w)("origin")],T.prototype,"readOrigin",null),(0,r._)([(0,l.MZ)({type:[m.A],value:null,json:{write:!0}})],T.prototype,"lods",null),(0,r._)([(0,l.MZ)({readOnly:!0})],T.prototype,"scales",void 0),(0,r._)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],T.prototype,"size",void 0),(0,r._)([(0,c.w)("size",["rows","cols"])],T.prototype,"readSize",null),(0,r._)([(0,d.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],T.prototype,"writeSize",null),(0,r._)([(0,l.MZ)({type:f.A,json:{write:!0}})],T.prototype,"spatialReference",void 0),T=i=(0,r._)([(0,h.$)("esri.layers.support.TileInfo")],T),F=T||(T={}),(w=F.ExtrapolateOptions||(F.ExtrapolateOptions={}))[w.NONE=0]="NONE",w[w.POWER_OF_TWO=1]="POWER_OF_TWO";const C=T},72802:(e,t,s)=>{s.d(t,{U:()=>i});class i{constructor(e,t,s,i,r=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=r}}},31756:(e,t,s)=>{s.d(t,{j:()=>n});var i=s(83047),r=s(79258);const n={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)}},58501:(e,t,s)=>{s.d(t,{q:()=>r});var i=s(62815);function r(e,t,s){if(!s?.features||!s.hasZ)return;const r=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of s.features)r(e.geometry)}},88625:(e,t,s)=>{s.d(t,{A:()=>E});var i,r=s(90237),n=s(66552),o=s(25482),a=s(97768),l=s(10107),u=(s(44208),s(53966),s(87811),s(36005)),c=s(40608),h=s(43937),d=s(30524);let p=i=class extends o.A{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r._)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"expression",void 0),(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,r._)([(0,c.$)("esri.symbols.support.FeatureExpressionInfo")],p);const f=p;var _,g=s(16271);const y=(0,n.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),m=new n.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=_=class extends o.A{constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new _({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r._)([(0,l.MZ)({type:f,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,r._)([(0,u.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,r._)([(0,h.K)("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,r._)([(0,l.MZ)({type:y.apiValues,nonNullable:!0,json:{type:y.jsonValues,read:y.read,write:{writer:y.write,isRequired:!0}}})],v.prototype,"mode",null),(0,r._)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,r._)([(0,l.MZ)({type:g.KQ,json:{type:String,read:m.read,write:m.write}})],v.prototype,"unit",null),v=_=(0,r._)([(0,c.$)("esri.symbols.support.ElevationInfo")],v);const E=v},16271:(e,t,s)=>{s.d(t,{Ao:()=>n,KQ:()=>o});var i=s(4576),r=s(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},12543:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Te});var i=s(90237),r=(s(59456),s(65529)),n=s(74887),o=s(36708),a=s(10107),l=(s(44208),s(53966)),u=(s(87811),s(40608)),c=s(79897),h=s(16930),d=s(58376),p=s(83221),f=s(19730),_=s(87045),g=s(61956),y=s(88625),m=s(66344),v=s(91869),E=s(83047),T=s(16271);function F(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new C(e,s)}return new w}class w{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class C{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new m.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:r}=s;if(null==i)return;const n=(0,E.G9)(t),o=i*((0,T.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,v.tE)(i,t.objectId,b).push(t);const[r,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(r,s);if((0,n.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:c}=l,h=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),c.has(e)||h.push(t)}return h}_prepareQuery(e,t){const s=[],i=[];for(const[t,r]of e){const e=[];for(const s of r)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const r=I(e,t),n=this._alignmentsCache.get(r);null==n?s.push(t):i.push(new S(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(i.has(r)){n+=a.length;continue}const e=!s.has(r);for(const s of a){const i=I(r,s),a=t[n++];s.z=a,e&&o.put(i,a,1)}}}}class S{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function I(e,{x:t,y:s,z:i,spatialReference:r}){return`${e}-${t}-${s}-${i??0}}-wkid:${r?.wkid}`}function b(){return[]}class x{filter(e,t){return t}notifyElevationSourceChange(){}}class A{filter(e,t){const{point:s,distance:i}=e,{z:r}=s;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,n).filter(O);return o.sort(z),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":R(i,t,s);continue;case"vertex":H(i,t,s);continue}return e}}function O(e){return e.distance<=1}function M(e=!1){return e?new A:new x}function R(e,t,{x:s,y:i,z:r}){const{start:n,end:o,target:a}=e;e.draped||function(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,o=i.z-s.z,a=r*r+n*n+o*o,l=(t.x-s.x)*r+(t.y-s.y)*n+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),c=s.x+r*u,h=s.y+n*u,d=s.z+o*u;e.x=c,e.y=h,e.z=d}(a,t,n,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,c=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+c*c)}function H(e,t,{x:s,y:i,z:r}){const{target:n}=e,o=(t.x-n.x)/s,a=(t.y-n.y)/i,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function z(e,t){return e.distance-t.distance}var P=s(4718),U=s(799);function N(e=!1,t){return e?new j(t):new D}class D{async fetch(){return[]}notifySymbologyChange(){}}class j{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new m.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],r=this._candidatesCache;for(const t of e){const e=Z(t),n=r.get(e);if(n)for(const e of n)i.push((0,P.o8)(e));else s.push(t),r.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:c}=a;for(let e=0;e<c;++e){const t=a[e],i=Z(s[l[e]]),n=r.get(i);n.push(t),r.put(i,n,n.length),u.push((0,P.o8)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function Z(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,U.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,r=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,U.Wm)(r).toString()}default:return""}}var q,B=s(69622),V=s(4576),k=s(60999),G=s(3483),L=s(13069),$=s(5443),W=s(19419),J=s(90708),Q=s(60694),Y=s(69418),K=s(80893);class X{constructor(e,t){this.data=e,this.resolution=t,this.state={type:q.CREATED},this.alive=!0}process(e){switch(this.state.type){case q.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case q.FETCH_COUNT:break;case q.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case q.FETCH_FEATURES:break;case q.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case q.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case q.CREATED:case q.FETCH_COUNT:return 0;case q.FETCHED_COUNT:return this.state.featureCount;case q.FETCH_FEATURES:return this.state.previous.featureCount;case q.FETCHED_FEATURES:return this.state.features.length;case q.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case q.CREATED:return"created";case q.FETCH_COUNT:return"fetch-count";case q.FETCHED_COUNT:return"fetched-count";case q.FETCH_FEATURES:return"fetch-features";case q.FETCHED_FEATURES:return"fetched-features";case q.DONE:return"done"}}_gotoFetchCount(e,t){return{type:q.FETCH_COUNT,previous:e,task:(0,k.UT)((async e=>{const s=await(0,k.DZ)(t.fetchCount(this,e));this.state.type===q.FETCH_COUNT&&(this.state=function(e,t){return{type:q.FETCHED_COUNT,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))}))}}_gotoFetchFeatures(e,t){return{type:q.FETCH_FEATURES,previous:e,task:(0,k.UT)((async s=>{const i=await(0,k.DZ)(t.fetchFeatures(this,e.featureCount,s));this.state.type===q.FETCH_FEATURES&&(this.state=function(e,t){return{type:q.FETCHED_FEATURES,previous:e,features:t}}(this.state,i.ok?i.value:[]))}))}}_goToDone(e,t){return t.finish(this,e.features),{type:q.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:q.CREATED},e.type){case q.CREATED:case q.FETCHED_COUNT:case q.FETCHED_FEATURES:case q.DONE:break;case q.FETCH_COUNT:case q.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,W.VY)(e,ee),(0,W.HY)(this.data.extent,ee))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(q||(q={}));const ee=(0,W.vt)();let te=class extends B.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,G.KC)(e,this._mandatoryOutFields);(0,G.aI)(s,t)||(this._set("outFields",s),(0,G.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new c.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,V.aI)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.OH),this.addHandles((0,o.z7)((()=>!this.suspended),(()=>this._process())))}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))},s=(0,k.UT)((async e=>{try{await this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),l.A.getLogger(this).warn("Failed to apply edits",e)}}));this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,Q.Wo)(this.url))return;const e=(0,k.UT)((async e=>{try{const t=await(0,K.Jf)(this.url,new g.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=$.A.fromJSON(t.data?.extent)}catch(e){(0,n.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<re}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(ne/(s*s))<oe}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<q.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=q.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new X(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,s){let i=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:c}=await this._queryFeatures(a,s);l&&(i+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!c||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;const r=e?(0,L.AG)(e):e;if(this.store.featureStore.forEach((e=>{r===(0,L.AG)(e.attributes[t])&&(i=e.objectId??e.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.IJ)(this.url,e,new Y.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.eY)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.q3)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,G.KC)((0,G.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new g.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,W.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?g.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||se);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"url",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"globalIdField",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"spatialReference",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],te.prototype,"store",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.MZ)()],te.prototype,"_mandatoryOutFields",null),(0,i._)([(0,a.MZ)()],te.prototype,"outFields",null),(0,i._)([(0,a.MZ)()],te.prototype,"suspended",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"_historicMoment",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"filter",null),(0,i._)([(0,a.MZ)()],te.prototype,"customParameters",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"_configuration",null),(0,i._)([(0,a.MZ)()],te.prototype,"tileInfo",null),(0,i._)([(0,a.MZ)()],te.prototype,"tileSize",null),(0,i._)([(0,a.MZ)()],te.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"updating",null),(0,i._)([(0,a.MZ)({readOnly:!0})],te.prototype,"availability",void 0),(0,i._)([(0,a.MZ)()],te.prototype,"hasZ",null),te=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],te);const se=2e3,ie=6e5,re=1e6,ne=25,oe=1;var ae=s(71903),le=s(69397),ue=s(6518),ce=s(72802);class he{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let de=class extends B.A{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*ae.u.MEGABYTES,this._tileBounds=new ue.F,this._tiles=new he,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,W.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map((e=>new Set(Object.keys(e.attributes)))).reduce(((e,t)=>(0,G.E$)(e,t)),new Set(Object.keys(s[0]?.attributes??[])));this._addTileStorage(e,new Set(s.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,le.rq)(e.lengths,4);return 32+(0,le.rq)(e.coords,8)+t}(e.geometry)+(0,le.lM)(e.attributes)}(t)),0)}(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const r=e.id;this._tiles.set(r,new pe(e,t,s,i)),this._tileBounds.set(r,e.extent),this._tileFeatureCounts.set(r,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===me.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const i=(await t(e,s)).features,{hasZ:r,hasM:n}=this.featureStore;for(const e of i){const t=(0,J.jQ)(this._tmpBoundingRect,e.geometry,r,n);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,W.HY)((0,W.VY)(this.extent,this._tmpBoundingRect),e.extent))return new _e(e);const i=this.getAttributesForTile(e.id);if((0,G.Yy)(s,i))return new _e(e);const r=this._createTileTree(e,this.tileInfo);return this._simplify(r,t,null,0,1),this._collectMissingTiles(e,r,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const r=this._tileFeatureCounts.get(e.id);if(null!=r)return r;const n=await(0,K.gW)(t,s,i);return this._tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const s=new fe(e.level,e.row,e.col);return t.updateTileInfo(s,_.A.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const r=this._tiles.get(i)?.data;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,n=1<<r.level-i.level;return Math.floor(r.row/n)===i.row&&Math.floor(r.col/n)===i.col}(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)})),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const r=new fe(e.level+1,n,o);s.updateTileInfo(r,_.A.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),n);const o=r/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/n<ye&&(this._purge(e),null!=s&&(s.children[i]=null),l=n),l}_mergeChildren(e){const t=new Set;let s,i=0;this._forEachLeaf(e,(e=>{const r=this._tiles.get(e.id);if(r){s=s?(0,G.E$)(s,r.attributeKeys):new Set(r.attributeKeys),i+=r.byteSize;for(const e of r.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new ge(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this.getAttributesForTile(e.id),n=r&&!(0,G.Yy)(i,r);if(n&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(n||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const r=e.children[s];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(r,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?me.ADDED:me.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),me.REMOVED):(t>0&&this._refCounts.set(e,t),me.UNCHANGED)}get test(){}};(0,i._)([(0,a.MZ)({constructOnly:!0})],de.prototype,"featureStore",void 0),(0,i._)([(0,a.MZ)()],de.prototype,"tileInfo",void 0),(0,i._)([(0,a.MZ)()],de.prototype,"extent",void 0),(0,i._)([(0,a.MZ)()],de.prototype,"maximumByteSize",void 0),de=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],de);class pe{constructor(e,t,s,i){this.data=e,this.objectIds=t,this.byteSize=s,this.attributeKeys=i}}class fe{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class _e{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,W.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class ge{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new _e(t),null!=s&&(this._extent=(0,W.VY)(s))}addMissing(e,t,s,i){const r=new ce.U(null,e,t,s);this._tileInfo.updateTileInfo(r,_.A.ExtrapolateOptions.POWER_OF_TWO),null==r.extent||null!=this._extent&&!(0,W.HY)(this._extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=(0,W.Wc)(r.extent))}}const ye=.18751;var me;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(me||(me={}));var ve=s(65864);let Ee=class extends r.A.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,n.Tw)(),this._elevationAligner=F(),this._elevationFilter=M(),this._symbologyCandidatesFetcher=N(),this._updatingHandles=new c.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,n.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,n.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=h.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new p.A({...e.serviceInfo,hasZ:n,hasM:!1}),this._queryEngine=new f.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new te({store:new de({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:h.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=F(l,{elevationInfo:null!=e.elevationInfo?y.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=M(l),this.addHandles([(0,o.wB)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.OH),(0,o.wB)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Fe}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Fe}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Fe}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const s=function(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:r,timeExtent:n,objectIds:o}=e.filter,a={geometry:e.filter.geometry?(0,ve.rS)(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:n,objectIds:o,where:r??"1=1"};return{...e,query:a}}(e),i=t?.signal,r=await(0,d.J)(this._queryEngine,s,i);(0,n.Te)(i);const o=await this._elevationAligner.alignCandidates(r.candidates,h.A.fromJSON(e.point.spatialReference)??h.A.WGS84,i);(0,n.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,n.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?_.A.fromJSON(e.tileInfo):null,Fe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Fe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)((()=>!this.updating),t),(0,n.Te)(t),Fe}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Fe}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Fe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Fe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Fe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=N(e,this._getSymbologyCandidates),Fe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?g.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.MZ)({readOnly:!0})],Ee.prototype,"updating",null),(0,i._)([(0,a.MZ)()],Ee.prototype,"_isInitializing",void 0),Ee=(0,i._)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Ee);const Te=Ee,Fe={result:{}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1053,5367],{11053:(e,a,r)=>{r.d(a,{c:()=>t,g:()=>n});var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},15367:(e,a,r)=>{r.r(a),r.d(a,{a:()=>s});var t,n=r(11053),o={exports:{}};const i=(0,n.g)(function(){return t||(t=1,e=o,a="undefined"!=typeof document?document.currentScript?.src:void 0,r=function(e={}){var r,t,o=Object.assign({},e),i=new Promise(((e,a)=>{r=e,t=a})),s=Object.assign({},o),u="./this.program",l="";"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),a&&(l=a),l=l.startsWith("blob:")?"":l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1);var c,f=o.print||console.log.bind(console),h=o.printErr||console.error.bind(console);Object.assign(o,s),s=null,o.thisProgram&&(u=o.thisProgram),o.wasmBinary&&(c=o.wasmBinary);var d,p,v,g,m,y,w,b,$,A,T,C=!1;function P(){var e=d.buffer;o.HEAP8=p=new Int8Array(e),o.HEAP16=g=new Int16Array(e),o.HEAPU8=v=new Uint8Array(e),o.HEAPU16=m=new Uint16Array(e),o.HEAP32=y=new Int32Array(e),o.HEAPU32=w=new Uint32Array(e),o.HEAPF32=b=new Float32Array(e),o.HEAPF64=T=new Float64Array(e),o.HEAP64=$=new BigInt64Array(e),o.HEAPU64=A=new BigUint64Array(e)}var W=[],O=[],k=[];function E(){var e=o.preRun.shift();W.unshift(e)}var j=0,S=null;function F(e){throw o.onAbort?.(e),h(e="Aborted("+e+")"),C=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),t(e),e}var M,D=e=>e.startsWith("data:application/octet-stream;base64,");function I(e){if(e==M&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}function R(e,a,r){return function(e){return c||"function"!=typeof fetch?Promise.resolve().then((()=>I(e))):fetch(e,{credentials:"same-origin"}).then((a=>{if(!a.ok)throw`failed to load wasm binary file at '${e}'`;return a.arrayBuffer()})).catch((()=>I(e)))}(e).then((e=>WebAssembly.instantiate(e,a))).then(r,(e=>{h(`failed to asynchronously prepare wasm: ${e}`),F(e)}))}var _=e=>{for(;0<e.length;)e.shift()(o)};class U{constructor(e){this.ca=e-24}}var x={},H=e=>{for(;e.length;){var a=e.pop();e.pop()(a)}};function Y(e){return this.fromWireType(w[e>>2])}var B,V,z,q={},N={},L={},G=(e,a,r)=>{function t(a){if((a=r(a)).length!==e.length)throw new B("Mismatched type converter count");for(var t=0;t<e.length;++t)Z(e[t],a[t])}e.forEach((function(e){L[e]=a}));var n=Array(a.length),o=[],i=0;a.forEach(((e,a)=>{N.hasOwnProperty(e)?n[a]=N[e]:(o.push(e),q.hasOwnProperty(e)||(q[e]=[]),q[e].push((()=>{n[a]=N[e],++i===o.length&&t(n)})))})),0===o.length&&t(n)},J=e=>{if(null===e)return"null";var a=typeof e;return"object"===a||"array"===a||"function"===a?e.toString():""+e},X=e=>{for(var a="";v[e];)a+=V[v[e++]];return a};function Z(e,a,r={}){if(!("argPackAdvance"in a))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,a,r={}){var t=a.name;if(!e)throw new z(`type "${t}" must have a positive integer typeid pointer`);if(N.hasOwnProperty(e)){if(r.Ma)return;throw new z(`Cannot register type '${t}' twice`)}N[e]=a,delete L[e],q.hasOwnProperty(e)&&(a=q[e],delete q[e],a.forEach((e=>e())))}(e,a,r)}var K,Q=(e,a,r)=>{switch(a){case 1:return r?e=>p[e]:e=>v[e];case 2:return r?e=>g[e>>1]:e=>m[e>>1];case 4:return r?e=>y[e>>2]:e=>w[e>>2];case 8:return r?e=>$[e>>3]:e=>A[e>>3];default:throw new TypeError(`invalid integer width (${a}): ${e}`)}},ee=e=>{throw new z(e.aa.da.ba.name+" instance already deleted")},ae=!1,re=()=>{},te=(e,a,r)=>a===r?e:void 0===r.ga||null===(e=te(e,a,r.ga))?null:r.Fa(e),ne={},oe=[],ie=()=>{for(;oe.length;){var e=oe.pop();e.aa.qa=!1,e.delete()}},se={},ue=(e,a)=>{if(!a.da||!a.ca)throw new B("makeClassHandle requires ptr and ptrType");if(!!a.ia!=!!a.fa)throw new B("Both smartPtrType and smartPtr must be specified");return a.count={value:1},le(Object.create(e,{aa:{value:a,writable:!0}}))},le=e=>"undefined"==typeof FinalizationRegistry?(le=e=>e,e):(ae=new FinalizationRegistry((e=>{--(e=e.aa).count.value,0===e.count.value&&(e.fa?e.ia.ja(e.fa):e.da.ba.ja(e.ca))})),re=e=>{ae.unregister(e)},(le=e=>{var a=e.aa;return a.fa&&ae.register(e,{aa:a},e),e})(e));function ce(){}var fe=(e,a)=>Object.defineProperty(a,"name",{value:e}),he=(e,a,r)=>{if(void 0===e[a].ea){var t=e[a];e[a]=function(...t){if(!e[a].ea.hasOwnProperty(t.length))throw new z(`Function '${r}' called with an invalid number of arguments (${t.length}) - expects one of (${e[a].ea})!`);return e[a].ea[t.length].apply(this,t)},e[a].ea=[],e[a].ea[t.pa]=t}},de=(e,a,r)=>{if(o.hasOwnProperty(e)){if(void 0===r||void 0!==o[e].ea&&void 0!==o[e].ea[r])throw new z(`Cannot register public name '${e}' twice`);if(he(o,e,e),o.hasOwnProperty(r))throw new z(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);o[e].ea[r]=a}else o[e]=a,void 0!==r&&(o[e].Za=r)};function pe(e,a,r,t,n,o,i,s){this.name=e,this.constructor=a,this.la=r,this.ja=t,this.ga=n,this.Ha=o,this.sa=i,this.Fa=s,this.Oa=[]}var ve=(e,a,r)=>{for(;a!==r;){if(!a.sa)throw new z(`Expected null or instance of ${r.name}, got an instance of ${a.name}`);e=a.sa(e),a=a.ga}return e};function ge(e,a){if(null===a){if(this.ya)throw new z(`null is not a valid ${this.name}`);return 0}if(!a.aa)throw new z(`Cannot pass "${J(a)}" as a ${this.name}`);if(!a.aa.ca)throw new z(`Cannot pass deleted object as a pointer of type ${this.name}`);return ve(a.aa.ca,a.aa.da.ba,this.ba)}function me(e,a){if(null===a){if(this.ya)throw new z(`null is not a valid ${this.name}`);if(this.va){var r=this.za();return null!==e&&e.push(this.ja,r),r}return 0}if(!a||!a.aa)throw new z(`Cannot pass "${J(a)}" as a ${this.name}`);if(!a.aa.ca)throw new z(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ua&&a.aa.da.ua)throw new z(`Cannot convert argument of type ${a.aa.ia?a.aa.ia.name:a.aa.da.name} to parameter type ${this.name}`);if(r=ve(a.aa.ca,a.aa.da.ba,this.ba),this.va){if(void 0===a.aa.fa)throw new z("Passing raw pointer to smart pointer is illegal");switch(this.Ta){case 0:if(a.aa.ia!==this)throw new z(`Cannot convert argument of type ${a.aa.ia?a.aa.ia.name:a.aa.da.name} to parameter type ${this.name}`);r=a.aa.fa;break;case 1:r=a.aa.fa;break;case 2:if(a.aa.ia===this)r=a.aa.fa;else{var t=a.clone();r=this.Pa(r,Ue((()=>t.delete()))),null!==e&&e.push(this.ja,r)}break;default:throw new z("Unsupporting sharing policy")}}return r}function ye(e,a){if(null===a){if(this.ya)throw new z(`null is not a valid ${this.name}`);return 0}if(!a.aa)throw new z(`Cannot pass "${J(a)}" as a ${this.name}`);if(!a.aa.ca)throw new z(`Cannot pass deleted object as a pointer of type ${this.name}`);if(a.aa.da.ua)throw new z(`Cannot convert argument of type ${a.aa.da.name} to parameter type ${this.name}`);return ve(a.aa.ca,a.aa.da.ba,this.ba)}function we(e,a,r,t,n,o,i,s,u,l,c){this.name=e,this.ba=a,this.ya=r,this.ua=t,this.va=n,this.Na=o,this.Ta=i,this.Da=s,this.za=u,this.Pa=l,this.ja=c,n||void 0!==a.ga?this.toWireType=me:(this.toWireType=t?ge:ye,this.ha=null)}var be,$e,Ae=(e,a,r)=>{if(!o.hasOwnProperty(e))throw new B("Replacing nonexistent public symbol");void 0!==o[e].ea&&void 0!==r?o[e].ea[r]=a:(o[e]=a,o[e].pa=r)},Te=[],Ce=(e,a)=>{e=X(e);var r=Te[a];if(r||(a>=Te.length&&(Te.length=a+1),Te[a]=r=be.get(a)),"function"!=typeof r)throw new z(`unknown function pointer with signature ${e}: ${a}`);return r},Pe=e=>{e=ma(e);var a=X(e);return wa(e),a},We=(e,a)=>{var r=[],t={};throw a.forEach((function e(a){t[a]||N[a]||(L[a]?L[a].forEach(e):(r.push(a),t[a]=!0))})),new $e(`${e}: `+r.map(Pe).join([", "]))};function Oe(e,a,r,t,n){var o=a.length;if(2>o)throw new z("argTypes array size mismatch! Must at least get return value and 'this' types!");var i=null!==a[1]&&null!==r,s=function(e){for(var a=1;a<e.length;++a)if(null!==e[a]&&void 0===e[a].ha)return!0;return!1}(a),u="void"!==a[0].name,l=o-2,c=Array(l),f=[],h=[];return fe(e,(function(...r){if(r.length!==l)throw new z(`function ${e} called with ${r.length} arguments, expected ${l}`);if(h.length=0,f.length=i?2:1,f[0]=n,i){var o=a[1].toWireType(h,this);f[1]=o}for(var d=0;d<l;++d)c[d]=a[d+2].toWireType(h,r[d]),f.push(c[d]);if(r=t(...f),s)H(h);else for(d=i?1:2;d<a.length;d++){var p=1===d?o:c[d-2];null!==a[d].ha&&a[d].ha(p)}return u?a[0].fromWireType(r):void 0}))}var ke,Ee,je,Se=(e,a)=>{for(var r=[],t=0;t<e;t++)r.push(w[a+4*t>>2]);return r},Fe=e=>{const a=(e=e.trim()).indexOf("(");return-1!==a?e.substr(0,a):e},Me=(e,a,r)=>{if(!(e instanceof Object))throw new z(`${r} with invalid "this": ${e}`);if(!(e instanceof a.ba.constructor))throw new z(`${r} incompatible with "this" of type ${e.constructor.name}`);if(!e.aa.ca)throw new z(`cannot call emscripten binding method ${r} on deleted object`);return ve(e.aa.ca,e.aa.da.ba,a.ba)},De=[],Ie=[],Re=e=>{9<e&&0==--Ie[e+1]&&(Ie[e]=void 0,De.push(e))},_e=e=>{if(!e)throw new z("Cannot use deleted val. handle = "+e);return Ie[e]},Ue=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const a=De.pop()||Ie.length;return Ie[a]=e,Ie[a+1]=1,a}},xe={name:"emscripten::val",fromWireType:e=>{var a=_e(e);return Re(e),a},toWireType:(e,a)=>Ue(a),argPackAdvance:8,readValueFromPointer:Y,ha:null},He=(e,a,r)=>{switch(a){case 1:return r?function(e){return this.fromWireType(p[e])}:function(e){return this.fromWireType(v[e])};case 2:return r?function(e){return this.fromWireType(g[e>>1])}:function(e){return this.fromWireType(m[e>>1])};case 4:return r?function(e){return this.fromWireType(y[e>>2])}:function(e){return this.fromWireType(w[e>>2])};default:throw new TypeError(`invalid integer width (${a}): ${e}`)}},Ye=(e,a)=>{var r=N[e];if(void 0===r)throw e=`${a} has unknown type ${Pe(e)}`,new z(e);return r},Be=(e,a)=>{switch(a){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${a}): ${e}`)}},Ve=(e,a,r,t)=>{if(0<t){t=r+t-1;for(var n=0;n<e.length;++n){var o=e.charCodeAt(n);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++n)),127>=o){if(r>=t)break;a[r++]=o}else{if(2047>=o){if(r+1>=t)break;a[r++]=192|o>>6}else{if(65535>=o){if(r+2>=t)break;a[r++]=224|o>>12}else{if(r+3>=t)break;a[r++]=240|o>>18,a[r++]=128|o>>12&63}a[r++]=128|o>>6&63}a[r++]=128|63&o}}a[r]=0}},ze=e=>{for(var a=0,r=0;r<e.length;++r){var t=e.charCodeAt(r);127>=t?a++:2047>=t?a+=2:55296<=t&&57343>=t?(a+=4,++r):a+=3}return a},qe="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Ne=(e,a,r)=>{var t=a+r;for(r=a;e[r]&&!(r>=t);)++r;if(16<r-a&&e.buffer&&qe)return qe.decode(e.subarray(a,r));for(t="";a<r;){var n=e[a++];if(128&n){var o=63&e[a++];if(192==(224&n))t+=String.fromCharCode((31&n)<<6|o);else{var i=63&e[a++];65536>(n=224==(240&n)?(15&n)<<12|o<<6|i:(7&n)<<18|o<<12|i<<6|63&e[a++])?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode(55296|n>>10,56320|1023&n))}}else t+=String.fromCharCode(n)}return t},Le="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Ge=(e,a)=>{for(var r=e>>1,t=r+a/2;!(r>=t)&&m[r];)++r;if(32<(r<<=1)-e&&Le)return Le.decode(v.subarray(e,r));for(r="",t=0;!(t>=a/2);++t){var n=g[e+2*t>>1];if(0==n)break;r+=String.fromCharCode(n)}return r},Je=(e,a,r)=>{if(r??=2147483647,2>r)return 0;var t=a;r=(r-=2)<2*e.length?r/2:e.length;for(var n=0;n<r;++n)g[a>>1]=e.charCodeAt(n),a+=2;return g[a>>1]=0,a-t},Xe=e=>2*e.length,Ze=(e,a)=>{for(var r=0,t="";!(r>=a/4);){var n=y[e+4*r>>2];if(0==n)break;++r,65536<=n?(n-=65536,t+=String.fromCharCode(55296|n>>10,56320|1023&n)):t+=String.fromCharCode(n)}return t},Ke=(e,a,r)=>{if(r??=2147483647,4>r)return 0;var t=a;r=t+r-4;for(var n=0;n<e.length;++n){var o=e.charCodeAt(n);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++n)),y[a>>2]=o,(a+=4)+4>r)break}return y[a>>2]=0,a-t},Qe=e=>{for(var a=0,r=0;r<e.length;++r){var t=e.charCodeAt(r);55296<=t&&57343>=t&&++r,a+=4}return a},ea=(e,a,r)=>{var t=[];return e=e.toWireType(t,r),t.length&&(w[a>>2]=Ue(t)),e},aa=[],ra={},ta=e=>{var a=ra[e];return void 0===a?X(e):a},na=()=>{function e(e){e.$$$embind_global$$$=e;var a="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return a||delete e.$$$embind_global$$$,a}if("object"==typeof globalThis)return globalThis;if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof n.c&&e(n.c)?$$$embind_global$$$=n.c:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},oa=Reflect.construct,ia={},sa=()=>{if(!ke){var e,a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(e in ia)void 0===ia[e]?delete a[e]:a[e]=ia[e];var r=[];for(e in a)r.push(`${e}=${a[e]}`);ke=r}return ke},ua=[null,[],[]],la=e=>0==e%4&&(0!=e%100||0==e%400),ca=[31,29,31,30,31,30,31,31,30,31,30,31],fa=[31,28,31,30,31,30,31,31,30,31,30,31];B=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}};for(var ha=Array(256),da=0;256>da;++da)ha[da]=String.fromCharCode(da);V=ha,z=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(ce.prototype,{isAliasOf:function(e){if(!(this instanceof ce&&e instanceof ce))return!1;var a=this.aa.da.ba,r=this.aa.ca;e.aa=e.aa;var t=e.aa.da.ba;for(e=e.aa.ca;a.ga;)r=a.sa(r),a=a.ga;for(;t.ga;)e=t.sa(e),t=t.ga;return a===t&&r===e},clone:function(){if(this.aa.ca||ee(this),this.aa.ra)return this.aa.count.value+=1,this;var e=le,a=Object,r=a.create,t=Object.getPrototypeOf(this),n=this.aa;return(e=e(r.call(a,t,{aa:{value:{count:n.count,qa:n.qa,ra:n.ra,ca:n.ca,da:n.da,fa:n.fa,ia:n.ia}}}))).aa.count.value+=1,e.aa.qa=!1,e},delete(){if(this.aa.ca||ee(this),this.aa.qa&&!this.aa.ra)throw new z("Object already scheduled for deletion");re(this);var e=this.aa;--e.count.value,0===e.count.value&&(e.fa?e.ia.ja(e.fa):e.da.ba.ja(e.ca)),this.aa.ra||(this.aa.fa=void 0,this.aa.ca=void 0)},isDeleted:function(){return!this.aa.ca},deleteLater:function(){if(this.aa.ca||ee(this),this.aa.qa&&!this.aa.ra)throw new z("Object already scheduled for deletion");return oe.push(this),1===oe.length&&K&&K(ie),this.aa.qa=!0,this}}),o.getInheritedInstanceCount=()=>Object.keys(se).length,o.getLiveInheritedInstances=()=>{var e,a=[];for(e in se)se.hasOwnProperty(e)&&a.push(se[e]);return a},o.flushPendingDeletes=ie,o.setDelayFunction=e=>{K=e,oe.length&&K&&K(ie)},Object.assign(we.prototype,{Ia(e){return this.Da&&(e=this.Da(e)),e},Ba(e){this.ja?.(e)},argPackAdvance:8,readValueFromPointer:Y,fromWireType:function(e){function a(){return this.va?ue(this.ba.la,{da:this.Na,ca:r,ia:this,fa:e}):ue(this.ba.la,{da:this,ca:e})}var r=this.Ia(e);if(!r)return this.Ba(e),null;var t=((e,a)=>{if(void 0===a)throw new z("ptr should not be undefined");for(;e.ga;)a=e.sa(a),e=e.ga;return se[a]})(this.ba,r);if(void 0!==t)return 0===t.aa.count.value?(t.aa.ca=r,t.aa.fa=e,t.clone()):(t=t.clone(),this.Ba(e),t);if(t=this.ba.Ha(r),!(t=ne[t]))return a.call(this);t=this.ua?t.Ea:t.pointerType;var n=te(r,this.ba,t.ba);return null===n?a.call(this):this.va?ue(t.ba.la,{da:t,ca:n,ia:this,fa:e}):ue(t.ba.la,{da:t,ca:n})}}),$e=o.UnboundTypeError=(Ee=Error,(je=fe("UnboundTypeError",(function(e){this.name="UnboundTypeError",this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(Ee.prototype),je.prototype.constructor=je,je.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},je),Ie.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=()=>Ie.length/2-5-De.length;var pa,va={m:(e,a,r)=>{var t=new U(e);throw w[t.ca+16>>2]=0,w[t.ca+4>>2]=a,w[t.ca+8>>2]=r,e},M:()=>{F("")},r:e=>{var a=x[e];delete x[e];var r=a.za,t=a.ja,n=a.Ca,o=n.map((e=>e.La)).concat(n.map((e=>e.Ra)));G([e],o,(e=>{var o={};return n.forEach(((a,r)=>{var t=e[r],i=a.Ja,s=a.Ka,u=e[r+n.length],l=a.Qa,c=a.Sa;o[a.Ga]={read:e=>t.fromWireType(i(s,e)),write:(e,a)=>{var r=[];l(c,e,u.toWireType(r,a)),H(r)}}})),[{name:a.name,fromWireType:e=>{var a,r={};for(a in o)r[a]=o[a].read(e);return t(e),r},toWireType:(e,a)=>{for(var n in o)if(!(n in a))throw new TypeError(`Missing field: "${n}"`);var i=r();for(n in o)o[n].write(i,a[n]);return null!==e&&e.push(t,i),i},argPackAdvance:8,readValueFromPointer:Y,ha:t}]}))},E:(e,a,r)=>{Z(e,{name:a=X(a),fromWireType:e=>e,toWireType:function(e,a){if("bigint"!=typeof a&&"number"!=typeof a)throw new TypeError(`Cannot convert "${J(a)}" to ${this.name}`);return"number"==typeof a&&(a=BigInt(a)),a},argPackAdvance:8,readValueFromPointer:Q(a,r,-1==a.indexOf("u")),ha:null})},S:(e,a,r,t)=>{Z(e,{name:a=X(a),fromWireType:function(e){return!!e},toWireType:function(e,a){return a?r:t},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(v[e])},ha:null})},f:(e,a,r,t,n,o,i,s,u,l,c,f,h)=>{c=X(c),o=Ce(n,o),s&&=Ce(i,s),l&&=Ce(u,l),h=Ce(f,h);var d=(e=>{if(void 0===e)return"_unknown";var a=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=a&&57>=a?`_${e}`:e})(c);de(d,(function(){We(`Cannot construct ${c} due to unbound types`,[t])})),G([e,a,r],t?[t]:[],(a=>{if(a=a[0],t)var r=a.ba,n=r.la;else n=ce.prototype;a=fe(c,(function(...e){if(Object.getPrototypeOf(this)!==i)throw new z("Use 'new' to construct "+c);if(void 0===f.ma)throw new z(c+" has no accessible constructor");var a=f.ma[e.length];if(void 0===a)throw new z(`Tried to invoke ctor of ${c} with invalid number of parameters (${e.length}) - expected (${Object.keys(f.ma).toString()}) parameters instead!`);return a.apply(this,e)}));var i=Object.create(n,{constructor:{value:a}});a.prototype=i;var u,f=new pe(c,a,i,h,r,o,s,l);return f.ga&&((u=f.ga).ta??(u.ta=[]),f.ga.ta.push(f)),r=new we(c,f,!0,!1,!1),u=new we(c+"*",f,!1,!1,!1),n=new we(c+" const*",f,!1,!0,!1),ne[e]={pointerType:u,Ea:n},Ae(d,a),[r,u,n]}))},v:(e,a,r,t,n,o,i)=>{var s=Se(r,t);a=X(a),a=Fe(a),o=Ce(n,o),G([],[e],(e=>{function t(){We(`Cannot call ${n} due to unbound types`,s)}var n=`${(e=e[0]).name}.${a}`;a.startsWith("@@")&&(a=Symbol[a.substring(2)]);var u=e.ba.constructor;return void 0===u[a]?(t.pa=r-1,u[a]=t):(he(u,a,n),u[a].ea[r-1]=t),G([],s,(t=>{if(t=Oe(n,[t[0],null].concat(t.slice(1)),null,o,i),void 0===u[a].ea?(t.pa=r-1,u[a]=t):u[a].ea[r-1]=t,e.ba.ta)for(const r of e.ba.ta)r.constructor.hasOwnProperty(a)||(r.constructor[a]=t);return[]})),[]}))},g:(e,a,r,t,n,o)=>{var i=Se(a,r);n=Ce(t,n),G([],[e],(e=>{var r=`constructor ${(e=e[0]).name}`;if(void 0===e.ba.ma&&(e.ba.ma=[]),void 0!==e.ba.ma[a-1])throw new z(`Cannot register multiple constructors with identical number of parameters (${a-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.ba.ma[a-1]=()=>{We(`Cannot construct ${e.name} due to unbound types`,i)},G([],i,(t=>(t.splice(1,0,null),e.ba.ma[a-1]=Oe(r,t,null,n,o),[]))),[]}))},a:(e,a,r,t,n,o,i,s)=>{var u=Se(r,t);a=X(a),a=Fe(a),o=Ce(n,o),G([],[e],(e=>{function t(){We(`Cannot call ${n} due to unbound types`,u)}var n=`${(e=e[0]).name}.${a}`;a.startsWith("@@")&&(a=Symbol[a.substring(2)]),s&&e.ba.Oa.push(a);var l=e.ba.la,c=l[a];return void 0===c||void 0===c.ea&&c.className!==e.name&&c.pa===r-2?(t.pa=r-2,t.className=e.name,l[a]=t):(he(l,a,n),l[a].ea[r-2]=t),G([],u,(t=>(t=Oe(n,t,e,o,i),void 0===l[a].ea?(t.pa=r-2,l[a]=t):l[a].ea[r-2]=t,[]))),[]}))},c:(e,a,r,t,n,o,i,s,u,l)=>{a=X(a),n=Ce(t,n),G([],[e],(e=>{var t=`${(e=e[0]).name}.${a}`,c={get(){We(`Cannot access ${t} due to unbound types`,[r,i])},enumerable:!0,configurable:!0};return c.set=u?()=>We(`Cannot access ${t} due to unbound types`,[r,i]):()=>{throw new z(t+" is a read-only property")},Object.defineProperty(e.ba.la,a,c),G([],u?[r,i]:[r],(r=>{var i=r[0],c={get(){var a=Me(this,e,t+" getter");return i.fromWireType(n(o,a))},enumerable:!0};if(u){u=Ce(s,u);var f=r[1];c.set=function(a){var r=Me(this,e,t+" setter"),n=[];u(l,r,f.toWireType(n,a)),H(n)}}return Object.defineProperty(e.ba.la,a,c),[]})),[]}))},R:e=>Z(e,xe),n:(e,a,r,t)=>{function n(){}a=X(a),n.values={},Z(e,{name:a,constructor:n,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,a)=>a.value,argPackAdvance:8,readValueFromPointer:He(a,r,t),ha:null}),de(a,n)},e:(e,a,r)=>{var t=Ye(e,"enum");a=X(a),e=t.constructor,t=Object.create(t.constructor.prototype,{value:{value:r},constructor:{value:fe(`${t.name}_${a}`,(function(){}))}}),e.values[r]=t,e[a]=t},D:(e,a,r)=>{Z(e,{name:a=X(a),fromWireType:e=>e,toWireType:(e,a)=>a,argPackAdvance:8,readValueFromPointer:Be(a,r),ha:null})},U:(e,a,r,t,n,o)=>{var i=Se(a,r);e=X(e),e=Fe(e),n=Ce(t,n),de(e,(function(){We(`Cannot call ${e} due to unbound types`,i)}),a-1),G([],i,(r=>(Ae(e,Oe(e,[r[0],null].concat(r.slice(1)),null,n,o),a-1),[])))},w:(e,a,r,t,n)=>{if(a=X(a),-1===n&&(n=4294967295),n=e=>e,0===t){var o=32-8*r;n=e=>e<<o>>>o}var i=a.includes("unsigned")?function(e,a){return a>>>0}:function(e,a){return a};Z(e,{name:a,fromWireType:n,toWireType:i,argPackAdvance:8,readValueFromPointer:Q(a,r,0!==t),ha:null})},o:(e,a,r)=>{function t(e){return new n(p.buffer,w[e+4>>2],w[e>>2])}var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][a];Z(e,{name:r=X(r),fromWireType:t,argPackAdvance:8,readValueFromPointer:t},{Ma:!0})},t:e=>{Z(e,xe)},i:(e,a,r,t,n,o,i,s,u,l,c,f)=>{r=X(r),o=Ce(n,o),s=Ce(i,s),l=Ce(u,l),f=Ce(c,f),G([e],[a],(e=>(e=e[0],[new we(r,e.ba,!1,!1,!0,e,t,o,s,l,f)])))},F:(e,a)=>{var r="std::string"===(a=X(a));Z(e,{name:a,fromWireType:function(e){var a=w[e>>2],t=e+4;if(r)for(var n=t,o=0;o<=a;++o){var i=t+o;if(o==a||0==v[i]){if(n=n?Ne(v,n,i-n):"",void 0===s)var s=n;else s+=String.fromCharCode(0),s+=n;n=i+1}}else{for(s=Array(a),o=0;o<a;++o)s[o]=String.fromCharCode(v[t+o]);s=s.join("")}return wa(e),s},toWireType:function(e,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var t="string"==typeof a;if(!(t||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array))throw new z("Cannot pass non-string to std::string");var n=r&&t?ze(a):a.length,o=ya(4+n+1),i=o+4;if(w[o>>2]=n,r&&t)Ve(a,v,i,n+1);else if(t)for(t=0;t<n;++t){var s=a.charCodeAt(t);if(255<s)throw wa(i),new z("String has UTF-16 code units that do not fit in 8 bits");v[i+t]=s}else for(t=0;t<n;++t)v[i+t]=a[t];return null!==e&&e.push(wa,o),o},argPackAdvance:8,readValueFromPointer:Y,ha(e){wa(e)}})},C:(e,a,r)=>{if(r=X(r),2===a)var t=Ge,n=Je,o=Xe,i=e=>m[e>>1];else 4===a&&(t=Ze,n=Ke,o=Qe,i=e=>w[e>>2]);Z(e,{name:r,fromWireType:e=>{for(var r,n=w[e>>2],o=e+4,s=0;s<=n;++s){var u=e+4+s*a;s!=n&&0!=i(u)||(o=t(o,u-o),void 0===r?r=o:(r+=String.fromCharCode(0),r+=o),o=u+a)}return wa(e),r},toWireType:(e,t)=>{if("string"!=typeof t)throw new z(`Cannot pass non-string to C++ string type ${r}`);var i=o(t),s=ya(4+i+a);return w[s>>2]=i/a,n(t,s+4,i+a),null!==e&&e.push(wa,s),s},argPackAdvance:8,readValueFromPointer:Y,ha(e){wa(e)}})},s:(e,a,r,t,n,o)=>{x[e]={name:X(a),za:Ce(r,t),ja:Ce(n,o),Ca:[]}},j:(e,a,r,t,n,o,i,s,u,l)=>{x[e].Ca.push({Ga:X(a),La:r,Ja:Ce(t,n),Ka:o,Ra:i,Qa:Ce(s,u),Sa:l})},T:(e,a)=>{Z(e,{Ya:!0,name:a=X(a),argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},l:(e,a,r)=>(e=_e(e),a=Ye(a,"emval::as"),ea(a,r,e)),y:(e,a)=>(e=_e(e),(a=Ye(a,"emval::as")).toWireType(null,e)),V:(e,a,r,t)=>(e=aa[e])(null,a=_e(a),r,t),B:(e,a,r,t,n)=>(e=aa[e])(a=_e(a),a[r=ta(r)],t,n),b:Re,H:e=>0===e?Ue(na()):(e=ta(e),Ue(na()[e])),A:(e,a,r)=>{var t=((e,a)=>{for(var r=Array(e),t=0;t<e;++t)r[t]=Ye(w[a+4*t>>2],"parameter "+t);return r})(e,a),n=t.shift();e--;var o=Array(e);return a=`methodCaller<(${t.map((e=>e.name)).join(", ")}) => ${n.name}>`,(e=>{var a=aa.length;return aa.push(e),a})(fe(a,((a,i,s,u)=>{for(var l=0,c=0;c<e;++c)o[c]=t[c].readValueFromPointer(u+l),l+=t[c].argPackAdvance;return a=1===r?oa(i,o):i.apply(a,o),ea(n,s,a)})))},q:(e,a)=>(e=_e(e),a=_e(a),Ue(e[a])),h:e=>{9<e&&(Ie[e+1]+=1)},I:(e,a)=>(e=_e(e))instanceof _e(a),u:e=>"number"==typeof(e=_e(e)),x:e=>"string"==typeof(e=_e(e)),G:()=>Ue([]),p:e=>Ue(ta(e)),k:e=>{var a=_e(e);H(a),Re(e)},d:(e,a)=>(e=(e=Ye(e,"_emval_take_value")).readValueFromPointer(a),Ue(e)),z:e=>(e=_e(e),Ue(typeof e)),N:e=>{var a=v.length;if(2147483648<(e>>>=0))return!1;for(var r=1;4>=r;r*=2){var t=a*(1+.2/r);t=Math.min(t,e+100663296);var n=Math;t=Math.max(e,t);e:{n=(n.min.call(n,2147483648,t+(65536-t%65536)%65536)-d.buffer.byteLength+65535)/65536;try{d.grow(n),P();var o=1;break e}catch(e){}o=void 0}if(o)return!0}return!1},K:(e,a)=>{var r=0;return sa().forEach(((t,n)=>{var o=a+r;for(n=w[e+4*n>>2]=o,o=0;o<t.length;++o)p[n++]=t.charCodeAt(o);p[n]=0,r+=t.length+1})),0},L:(e,a)=>{var r=sa();w[e>>2]=r.length;var t=0;return r.forEach((e=>t+=e.length+1)),w[a>>2]=t,0},Q:()=>52,P:function(){return 70},O:(e,a,r,t)=>{for(var n=0,o=0;o<r;o++){var i=w[a>>2],s=w[a+4>>2];a+=8;for(var u=0;u<s;u++){var l=v[i+u],c=ua[e];0===l||10===l?((1===e?f:h)(Ne(c,0)),c.length=0):c.push(l)}n+=s}return w[t>>2]=n,0},J:(e,a,r,t)=>((e,a,r,t)=>{function n(e,a,r){for(e="number"==typeof e?e.toString():e||"";e.length<a;)e=r[0]+e;return e}function o(e,a){return n(e,a,"0")}function i(e,a){function r(e){return 0>e?-1:0<e?1:0}var t;return 0===(t=r(e.getFullYear()-a.getFullYear()))&&0===(t=r(e.getMonth()-a.getMonth()))&&(t=r(e.getDate()-a.getDate())),t}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function u(e){var a=e.na;for(e=new Date(new Date(e.oa+1900,0,1).getTime());0<a;){var r=e.getMonth(),t=(la(e.getFullYear())?ca:fa)[r];if(!(a>t-e.getDate())){e.setDate(e.getDate()+a);break}a-=t-e.getDate()+1,e.setDate(1),11>r?e.setMonth(r+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return r=new Date(e.getFullYear()+1,0,4),a=s(new Date(e.getFullYear(),0,4)),r=s(r),0>=i(a,e)?0>=i(r,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var l=w[t+40>>2];for(var c in t={Wa:y[t>>2],Va:y[t+4>>2],wa:y[t+8>>2],Aa:y[t+12>>2],xa:y[t+16>>2],oa:y[t+20>>2],ka:y[t+24>>2],na:y[t+28>>2],$a:y[t+32>>2],Ua:y[t+36>>2],Xa:l&&l?Ne(v,l):""},r=r?Ne(v,r):"",l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})r=r.replace(new RegExp(c,"g"),l[c]);var f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),h="January February March April May June July August September October November December".split(" ");for(c in l={"%a":e=>f[e.ka].substring(0,3),"%A":e=>f[e.ka],"%b":e=>h[e.xa].substring(0,3),"%B":e=>h[e.xa],"%C":e=>o((e.oa+1900)/100|0,2),"%d":e=>o(e.Aa,2),"%e":e=>n(e.Aa,2," "),"%g":e=>u(e).toString().substring(2),"%G":u,"%H":e=>o(e.wa,2),"%I":e=>(0==(e=e.wa)?e=12:12<e&&(e-=12),o(e,2)),"%j":e=>{for(var a=0,r=0;r<=e.xa-1;a+=(la(e.oa+1900)?ca:fa)[r++]);return o(e.Aa+a,3)},"%m":e=>o(e.xa+1,2),"%M":e=>o(e.Va,2),"%n":()=>"\n","%p":e=>0<=e.wa&&12>e.wa?"AM":"PM","%S":e=>o(e.Wa,2),"%t":()=>"\t","%u":e=>e.ka||7,"%U":e=>o(Math.floor((e.na+7-e.ka)/7),2),"%V":e=>{var a=Math.floor((e.na+7-(e.ka+6)%7)/7);if(2>=(e.ka+371-e.na-2)%7&&a++,a)53==a&&(4==(r=(e.ka+371-e.na)%7)||3==r&&la(e.oa)||(a=1));else{a=52;var r=(e.ka+7-e.na-1)%7;(4==r||5==r&&la(e.oa%400-1))&&a++}return o(a,2)},"%w":e=>e.ka,"%W":e=>o(Math.floor((e.na+7-(e.ka+6)%7)/7),2),"%y":e=>(e.oa+1900).toString().substring(2),"%Y":e=>e.oa+1900,"%z":e=>{var a=0<=(e=e.Ua);return e=Math.abs(e)/60,(a?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.Xa,"%%":()=>"%"},r=r.replace(/%%/g,"\0\0"),l)r.includes(c)&&(r=r.replace(new RegExp(c,"g"),l[c](t)));return(c=function(e){var a=Array(ze(e)+1);return Ve(e,a,0,a.length),a}(r=r.replace(/\0\0/g,"%"))).length>a?0:(p.set(c,e),c.length-1)})(e,a,r,t)},ga=function(){function e(e){return ga=e.exports,d=ga.W,P(),be=ga.$,O.unshift(ga.X),j--,o.monitorRunDependencies?.(j),0==j&&S&&(e=S,S=null,e()),ga}var a={a:va};if(j++,o.monitorRunDependencies?.(j),o.instantiateWasm)try{return o.instantiateWasm(a,e)}catch(e){h(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return M||=D("arcgis-knowledge-client-core-simd.wasm")?"arcgis-knowledge-client-core-simd.wasm":o.locateFile?o.locateFile("arcgis-knowledge-client-core-simd.wasm",l):l+"arcgis-knowledge-client-core-simd.wasm",function(e,a){var r=M;return c||"function"!=typeof WebAssembly.instantiateStreaming||D(r)||"function"!=typeof fetch?R(r,e,a):fetch(r,{credentials:"same-origin"}).then((t=>WebAssembly.instantiateStreaming(t,e).then(a,(function(t){return h(`wasm streaming compile failed: ${t}`),h("falling back to ArrayBuffer instantiation"),R(r,e,a)}))))}(a,(function(a){e(a.instance)})).catch(t),{}}(),ma=e=>(ma=ga.Y)(e),ya=e=>(ya=ga.Z)(e),wa=e=>(wa=ga._)(e);function ba(){function e(){if(!pa&&(pa=!0,o.calledRun=!0,!C)){if(_(O),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;){var e=o.postRun.shift();k.unshift(e)}_(k)}}if(!(0<j)){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)E();_(W),0<j||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e())}}if(S=function e(){pa||ba(),pa||(S=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);0<o.preInit.length;)o.preInit.pop()();return ba(),i},e.exports=r),o.exports;var e,a,r}()),s=Object.freeze(Object.defineProperty({__proto__:null,default:i},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3379],{87317:(e,t,s)=>{s.d(t,{a:()=>m,b:()=>c,c:()=>n,d:()=>f,e:()=>I,f:()=>g,g:()=>a,h:()=>p,j:()=>d,l:()=>x,n:()=>y,s:()=>r,t:()=>_});var i=s(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function r(e,t,s,i,n){return e[0]=t,e[1]=s,e[2]=i,e[3]=n,e}function a(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e[3]=t[3]+s[3],e}function o(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e[3]=t[3]-s[3],e}function l(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e[2]=t[2]*s[2],e[3]=t[3]*s[3],e}function h(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e[2]=t[2]/s[2],e[3]=t[3]/s[3],e}function c(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e}function u(e,t){const s=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],r=t[3]-e[3];return Math.sqrt(s*s+i*i+n*n+r*r)}function f(e,t){const s=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],r=t[3]-e[3];return s*s+i*i+n*n+r*r}function d(e){const t=e[0],s=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+s*s+i*i+n*n)}function g(e){const t=e[0],s=e[1],i=e[2],n=e[3];return t*t+s*s+i*i+n*n}function y(e,t){const s=t[0],i=t[1],n=t[2],r=t[3];let a=s*s+i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),e[0]=s*a,e[1]=i*a,e[2]=n*a,e[3]=r*a),e}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,s,i){const n=t[0],r=t[1],a=t[2],o=t[3];return e[0]=n+i*(s[0]-n),e[1]=r+i*(s[1]-r),e[2]=a+i*(s[2]-a),e[3]=o+i*(s[3]-o),e}function _(e,t,s){const i=t[0],n=t[1],r=t[2],a=t[3];return e[0]=s[0]*i+s[4]*n+s[8]*r+s[12]*a,e[1]=s[1]*i+s[5]*n+s[9]*r+s[13]*a,e[2]=s[2]*i+s[6]*n+s[10]*r+s[14]*a,e[3]=s[3]*i+s[7]*n+s[11]*r+s[15]*a,e}function m(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function I(e,t){const s=e[0],n=e[1],r=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,i.FD)();return Math.abs(s-o)<=u*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(n-l)<=u*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(r-h)<=u*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const b=o,M=l,w=h,k=u,T=f,P=d,A=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:k,distance:u,div:w,divide:h,dot:p,equals:I,exactEquals:m,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:P,length:d,lerp:x,max:function(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[1]),e[2]=Math.max(t[2],s[2]),e[3]=Math.max(t[3],s[3]),e},min:function(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e[2]=Math.min(t[2],s[2]),e[3]=Math.min(t[3],s[3]),e},mul:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:y,random:function(e,t=1){const s=i.Ov;let n,r,a,o,l,h;do{n=2*s()-1,r=2*s()-1,l=n*n+r*r}while(l>=1);do{a=2*s()-1,o=2*s()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*n,e[1]=t*r,e[2]=t*a*c,e[3]=t*o*c,e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:c,scaleAndAdd:function(e,t,s,i){return e[0]=t[0]+s[0]*i,e[1]=t[1]+s[1]*i,e[2]=t[2]+s[2]*i,e[3]=t[3]+s[3]*i,e},set:r,sqrDist:T,sqrLen:A,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:o,transformMat4:_,transformQuat:function(e,t,s){const i=t[0],n=t[1],r=t[2],a=s[0],o=s[1],l=s[2],h=s[3],c=h*i+o*r-l*n,u=h*n+l*i-a*r,f=h*r+a*n-o*i,d=-a*i-o*n-l*r;return e[0]=c*h+d*-a+u*-l-f*-o,e[1]=u*h+d*-o+f*-a-c*-l,e[2]=f*h+d*-l+c*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,s)=>{s.d(t,{TS:()=>r,Tf:()=>c,V6:()=>n,c4:()=>a,qh:()=>h,z$:()=>l});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return!!i[e]||!!i[e.toLowerCase()]}function r(e){return i[e]??i[e.toLowerCase()]}function a(e){return[...r(e)]}function o(e,t,s){s<0&&++s,s>1&&--s;const i=6*s;return i<1?e+(t-e)*i:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}function l(e,t,s,i=1){const n=(e%360+360)%360/360,r=s<=.5?s*(t+1):s+t-s*t,a=2*s-r;return[Math.round(255*o(a,r,n+1/3)),Math.round(255*o(a,r,n)),Math.round(255*o(a,r,n-1/3)),i]}function h(e){const t=e.length>5,s=t?8:4,i=(1<<s)-1,n=t?1:17,r=t?9===e.length:5===e.length;let a=Number("0x"+e.slice(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return r&&(l=a&i,a>>=s,o[3]=n*l/255),l=a&i,a>>=s,o[2]=n*l,l=a&i,a>>=s,o[1]=n*l,l=a&i,a>>=s,o[0]=n*l,o}const c=2.2},91829:(e,t,s)=>{function i(){return[0,0,0,0]}function n(e,t,s,i){return[e,t,s,i]}function r(e,t,s,i){return[e,t,s,i]}function a(e,t=[0,0,0,0]){const s=Math.min(4,e.length);for(let i=0;i<s;++i)t[i]=e[i];return t}function o(){return n(1,1,1,1)}function l(){return n(1,0,0,0)}function h(){return n(0,1,0,0)}function c(){return n(0,0,1,0)}function u(){return n(0,0,0,1)}s.d(t,{CN:()=>r,Un:()=>d,ci:()=>a,fA:()=>n,uY:()=>f,vt:()=>i});const f=[0,0,0,0],d=o(),g=l(),y=h(),p=c(),x=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_W:x,UNIT_X:g,UNIT_Y:y,UNIT_Z:p,ZEROS:f,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:i,createView:function(e,t){return new Float64Array(e,t,4)},freeze:r,fromArray:a,fromValues:n,ones:o,unitW:u,unitX:l,unitY:h,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},34304:(e,t,s)=>{s.d(t,{DF:()=>l,FD:()=>n,Ov:()=>r,ct:()=>h});let i=1e-6;function n(){return i}const r=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function h(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:r,equals:function(e,t){return Math.abs(e-t)<=i*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:n,setEpsilon:function(e){i=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},69397:(e,t,s)=>{s.d(t,{Qf:()=>l,Qh:()=>a,RS:()=>n,ez:()=>u,i5:()=>f,lM:()=>r,qK:()=>c,rq:()=>h});var i=s(34275);const n=16;function r(e){if(!e)return 0;let t=c;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s],!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 h(e,8);let s=u;for(let i=0;i<t;i++)s+=o(e[i]);return s}(e);let t=c;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce(((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+f:Array.isArray(t)?h(t,n):0:0)),0)}function h(e,t){return u+e.length*t}const c=32,u=16,f=145},51624:(e,t,s)=>{s.d(t,{A:()=>u});var i,n,r=s(44208),a=s(69397),o=s(93687);(n=i||(i={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const l=4294967296,h=new TextDecoder("utf-8"),c=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class u{constructor(e,t,s=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,s,n)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}get usedMemory(){return 64+(0,a.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*l;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*l;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,i){const n=this.getMessage(),r=e(n,t,s,i);return n.release(),r}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,i=0;if(this._end-t>=10)do{if(i=e[t++],s|=127&i,!(128&i))break;if(i=e[t++],s|=(127&i)<<7,!(128&i))break;if(i=e[t++],s|=(127&i)<<14,!(128&i))break;if(i=e[t++],s|=(127&i)<<21,!(128&i))break;if(i=e[t++],s+=268435456*(127&i),!(128&i))break;if(i=e[t++],s+=34359738368*(127&i),!(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),!(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),!(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),!(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),!(128&i))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(i=e[t],128&i);)++t,s+=(127&i)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*n}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const n=1&e[this._pos];if(i=e[this._pos++],s|=127&i,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>c){const i=e.subarray(t,s);return h.decode(i)}let i="",n="";for(let r=t;r<s;++r){const t=e[r];128&t?n+="%"+t.toString(16):(i+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(i+=decodeURIComponent(n)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}u.pool=new o.A(u,void 0,(e=>{e._data=null,e._dataView=null}))},11764:(e,t,s)=>{s.r(t),s.d(t,{default:()=>X});var i=s(74887),n=s(89640),r=s(6774),a=s(13195);function o(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function l(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function h(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function c(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=s(18989);const f=24;class d{constructor(e,t,s,i,n,r,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=s,this._letterSpacing=i,this._hAnchor=n,this._vAnchor=r,this._justify=a}getShaping(e,t,s){const i=this._letterSpacing,n=this._lineHeight,r=this._justify,a=this._maxWidth,u=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const n=s&&o(e);let r;for(const t of this._glyphItems)if(r=t[e],r)break;u.push({codePoint:e,x:f,y:d,vertical:n,glyphMosaicItem:r}),r&&(f+=r.metrics.advance+i)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const y=e.includes("​"),p=[],x=u.length;for(let e=0;e<x-1;e++){const t=u[e].codePoint,s=l(t);if(h(t)||s){let i=0;if(10===t)i-=1e4;else if(s&&y)i+=150;else{40!==t&&65288!==t||(i+=50);const s=u[e+1].codePoint;41!==s&&65289!==s||(i+=50)}p.push(this._buildBreak(e+1,u[e].x,g,p,i,!1))}}const _=this._optimalBreaks(this._buildBreak(x,f,g,p,0,!0));let m=0;const I=t?-n:n;let b=0;for(let e=0;e<_.length;e++){const t=_[e];let s=b;for(;s<t&&c(u[s].codePoint);)u[s].glyphMosaicItem=null,++s;let i=t-1;for(;i>s&&c(u[i].codePoint);)u[i].glyphMosaicItem=null,--i;if(s<=i){const e=u[s].x;for(let t=s;t<=i;t++)u[t].x-=e,u[t].y=d;let t=u[i].x;u[i].glyphMosaicItem&&(t+=u[i].glyphMosaicItem.metrics.advance),m=Math.max(t,m),r&&this._applyJustification(u,s,i)}b=t,d+=I}if(u.length>0){const e=_.length-1,s=(r-this._hAnchor)*m;let i=(-this._vAnchor*(e+1)+.5)*n;t&&e&&(i+=e*n);for(const e of u)e.x+=s,e.y+=i}return u.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let s=1/0,i=1/0,n=0,r=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,h=o+e,c=l+t;s=Math.min(s,o),n=Math.max(n,h),i=Math.min(i,l),r=Math.max(r,c)}return{x:s,y:i,width:n-s,height:r-i}}static getBox(e){if(!e.length)return null;let t=1/0,s=1/0,i=0,n=0;for(const r of e){const{height:e,left:a,top:o,width:l}=r.glyphMosaicItem.metrics,h=r.x,c=r.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),i=Math.max(i,u),s=Math.min(s,c),n=Math.max(n,f)}return{x:t,y:s,width:i-t,height:n-s}}static addDecoration(e,t){const s=e.length;if(0===s)return;let i=e[0].x+e[0].glyphMosaicItem.metrics.left,n=e[0].y;for(let r=1;r<s;r++){const s=e[r];if(s.y!==n){const a=e[r-1].x+e[r-1].glyphMosaicItem.metrics.left+e[r-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:a-i,height:8,left:0,top:0,advance:0},page:0,code:0}}),n=s.y,i=s.x+s.glyphMosaicItem.metrics.left}}const r=e[s-1].x+e[s-1].glyphMosaicItem.metrics.left+e[s-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:r-i,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,s,i){const n=(e-t)*(e-t);return i?e<t?n/2:2*n:n+Math.abs(s)*s}_buildBreak(e,t,s,i,n,r){let a=null,o=this._breakScore(t,s,n,r);for(const e of i){const i=t-e.x,l=this._breakScore(i,s,n,r)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,s){const i=e[s],n=i.vertical?f:i.glyphMosaicItem?i.glyphMosaicItem.metrics.advance:0,r=(i.x+n)*this._justify;for(let i=t;i<=s;i++)e[i].x-=r}}var g=s(4272);const y=.5;class p{constructor(e,t,s=0,i=-1,n=y){this.x=e,this.y=t,this.angle=s,this.segment=i,this.minzoom=n}}class x{constructor(e,t,s,i,n,r=y,o=a.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=s,this.page=i,this.alternateVerticalGlyph=n,this.minzoom=r,this.maxzoom=o}}class _{constructor(e,t,s,i,n,r,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=s,this.br=i,this.mosaicRect=n,this.labelAngle=r,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class m{constructor(e){this.shapes=e}}class I{getIconPlacement(e,t,s){const i=new r.bR(e.x,e.y),n=s.rotationAlignment===g.I5.MAP,o=s.keepUpright;let l=s.rotate*a.os;n&&(l+=e.angle);const h=new m([]);return s.allowOverlap&&s.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,i,t,s,l),n&&o&&this._addIconPlacement(h,i,t,s,l+a.Jo),h}_addIconPlacement(e,t,s,i,n){const o=s.rasterizationScale,l=s.width/o,h=s.height/o,c=i.offset;let u=c[0],f=c[1];switch(i.anchor){case g.KI.CENTER:u-=l/2,f-=h/2;break;case g.KI.LEFT:f-=h/2;break;case g.KI.RIGHT:u-=l,f-=h/2;break;case g.KI.TOP:u-=l/2;break;case g.KI.BOTTOM:u-=l/2,f-=h;break;case g.KI.TOP_LEFT:break;case g.KI.BOTTOM_LEFT:f-=h;break;case g.KI.TOP_RIGHT:u-=l;break;case g.KI.BOTTOM_RIGHT:u-=l,f-=h}const d=s.rect,p=2/o,x=u-p,m=f-p,I=x+d.width/o,b=m+d.height/o,M=new r.bR(x,m),w=new r.bR(I,b),k=new r.bR(x,b),T=new r.bR(I,m);if(0!==n){const e=Math.cos(n),t=Math.sin(n);M.rotate(e,t),w.rotate(e,t),k.rotate(e,t),T.rotate(e,t)}const P=new _(M,T,k,w,d,n,0,256,t,y,a.MG,0);if(e.shapes.push(P),!i.allowOverlap||!i.ignorePlacement){const s=i.size,r=i.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*s-r,dyPixels:f*s-r,hard:!i.optional,partIndex:0,width:l*s+2*r,height:h*s+2*r,angle:n,minLod:y,maxLod:a.MG};e.iconColliders.push(o)}}getTextPlacement(e,t,s,i){const n=new r.bR(e.x,e.y),o=i.rotate*a.os,l=i.rotationAlignment===g.I5.MAP,h=i.keepUpright,c=i.padding;let u=y;const p=l?e.angle:0,I=e.segment>=0&&l,b=i.allowOverlap&&i.ignorePlacement?null:[],M=[],w=!I;let k=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,P=k,A=T;const D=(I||l)&&h,L=i.size/f;let V=!1;for(const e of t)if(e.vertical){V=!0;break}let B,v=0,R=0;if(!I&&V){const e=d.getTextBox(t,i.lineHeight*f);switch(i.anchor){case g.KI.LEFT:v=e.height/2,R=-e.width/2;break;case g.KI.RIGHT:v=-e.height/2,R=e.width/2;break;case g.KI.TOP:v=e.height/2,R=e.width/2;break;case g.KI.BOTTOM:v=-e.height/2,R=-e.width/2;break;case g.KI.TOP_LEFT:v=e.height;break;case g.KI.BOTTOM_LEFT:R=-e.width;break;case g.KI.TOP_RIGHT:R=e.width;break;case g.KI.BOTTOM_RIGHT:v=-e.height}}v+=i.offset[0]*f,R+=i.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,g=t.metrics,m=t.page;if(b&&w){if(void 0!==B&&B!==f.y){let t,s,n,r;V?(t=-A+v,s=k+R,n=A-P,r=T-k):(t=k+v,s=P+R,n=T-k,r=A-P);const l={xTile:e.x,yTile:e.y,dxPixels:t*L-c,dyPixels:s*L-c,hard:!i.optional,partIndex:1,width:n*L+2*c,height:r*L+2*c,angle:o,minLod:y,maxLod:a.MG};b.push(l),k=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,P=k,A=T}B=f.y}const S=[];if(I){const i=.5*t.metrics.width,n=(f.x+g.left-4+i)*L*8;if(u=this._placeGlyph(e,u,n,s,e.segment,1,f.vertical,m,S),h&&(u=this._placeGlyph(e,u,n,s,e.segment,-1,f.vertical,m,S)),u>=2)break}else S.push(new x(n,p,p,m,!1)),l&&h&&S.push(new x(n,p+a.Jo,p+a.Jo,m,!1));const C=f.x+g.left,E=f.y-17-g.top,O=C+g.width,F=E+g.height;let U,N,z,G,K,q,H,W;if(!I&&V)if(f.vertical){const e=(C+O)/2-g.height/2,t=(E+F)/2+g.width/2;U=new r.bR(-t-4+v,e-4+R),N=new r.bR(U.x+d.width,U.y+d.height),z=new r.bR(U.x,N.y),G=new r.bR(N.x,U.y)}else U=new r.bR(4-E+v,C-4+R),N=new r.bR(U.x-d.height,U.y+d.width),z=new r.bR(N.x,U.y),G=new r.bR(U.x,N.y);else U=new r.bR(C-4+v,E-4+R),N=new r.bR(U.x+d.width,U.y+d.height),z=new r.bR(U.x,N.y),G=new r.bR(N.x,U.y);for(const t of S){let s,n,a,l;if(t.alternateVerticalGlyph){if(!K){const e=(E+F)/2+R;K=new r.bR((C+O)/2+v-g.height/2-4,e+g.width/2+4),q=new r.bR(K.x+d.height,K.y-d.width),H=new r.bR(q.x,K.y),W=new r.bR(K.x,q.y)}s=K,n=H,a=W,l=q}else s=U,n=z,a=G,l=N;const h=E,u=F,y=t.glyphAngle+o;if(0!==y){const e=Math.cos(y),t=Math.sin(y);s=s.clone(),n=n?.clone(),a=a?.clone(),l=l?.clone(),s.rotate(e,t),l?.rotate(e,t),n?.rotate(e,t),a?.rotate(e,t)}let p=0,x=256;if(I&&V?f.vertical?t.alternateVerticalGlyph?(p=32,x=96):(p=224,x=32):(p=224,x=96):(p=192,x=64),M.push(new _(s,a,n,l,d,t.labelAngle,p,x,t.anchor,t.minzoom,t.maxzoom,t.page)),b&&(!D||this._legible(t.labelAngle)))if(w)C<k&&(k=C),h<P&&(P=h),O>T&&(T=O),u>A&&(A=u);else if(t.minzoom<2){const s={xTile:e.x,yTile:e.y,dxPixels:(C+v)*L-c,dyPixels:(h+v)*L-c,hard:!i.optional,partIndex:1,width:(O-C)*L+2*c,height:(u-h)*L+2*c,angle:y,minLod:t.minzoom,maxLod:t.maxzoom};b.push(s)}}}if(u>=2)return null;if(b&&w){let t,s,n,r;V?(t=-A+v,s=k+R,n=A-P,r=T-k):(t=k+v,s=P+R,n=T-k,r=A-P);const l={xTile:e.x,yTile:e.y,dxPixels:t*L-c,dyPixels:s*L-c,hard:!i.optional,partIndex:1,width:n*L+2*c,height:r*L+2*c,angle:o,minLod:y,maxLod:a.MG};b.push(l)}const S=new m(M);return b&&b.length>0&&(S.textColliders=b),S}_legible(e){const t=(0,a.z0)(e);return t<65||t>=193}_placeGlyph(e,t,s,i,n,o,l,h,c){let u=o;const f=u<0?(0,a.Wh)(e.angle+a.Jo,a.pJ):e.angle;let d=0;s<0&&(u*=-1,s*=-1,d=a.Jo),u>0&&++n;let g=new r.bR(e.x,e.y),y=i[n],p=a.MG;if(i.length<=n)return p;for(;;){const e=y.x-g.x,r=y.y-g.y,o=Math.sqrt(e*e+r*r),_=Math.max(s/o,t),m=e/o,I=r/o,b=(0,a.Wh)(Math.atan2(I,m)+d,a.pJ);if(c.push(new x(g,f,b,h,!1,_,p)),l&&c.push(new x(g,f,b,h,!0,_,p)),_<=t)return _;g=y.clone();do{if(n+=u,i.length<=n||n<0)return _;y=i[n]}while(g.isEqual(y));let M=y.x-g.x,w=y.y-g.y;const k=Math.sqrt(M*M+w*w);M*=o/k,w*=o/k,g.x-=M,g.y-=w,p=_}}}var b,M,w=s(51624),k=s(15585);(M=b||(b={}))[M.moveTo=1]="moveTo",M[M.lineTo=2]="lineTo",M[M.close=7]="close";class T{constructor(e,t,s=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=s;const i=t.keys,n=t.values,r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:this.id=r.getUInt64();break;case 2:{const e=r.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),r=e.getUInt32();t[i[s]]=n[r]}e.release();break}case 3:this.type=r.getUInt32();break;case 4:this._pbfGeometry=r.getMessage();break;default:r.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let s,i;this._pbfGeometry=null,e?e.reset(this.type):s=[];let n,a=b.moveTo,o=0,l=0,h=0;for(;!t.empty();){if(0===o){const e=t.getUInt32();a=7&e,o=e>>3}switch(o--,a){case b.moveTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):s&&(i&&s.push(i),i=[],i.push(new r.bR(l,h)));break;case b.lineTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):i&&i.push(new r.bR(l,h));break;case b.close:e?e.close():i&&!i[0].equals(l,h)&&i.push(i[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?n=e.result():s&&(i&&s.push(i),n=s),t.release(),this._geometry=n,n}}var P=s(80081);class A extends P.A{constructor(){super(12)}add(e,t,s){const i=this.array;i.push(e),i.push(t),i.push(s)}}P.A;class D{constructor(e){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(D._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class L extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,o,l,h,c,u){const f=this.array;let d=P.A.i1616to32(e,t);f.push(d);const g=31;d=P.A.i8888to32(Math.round(g*s),Math.round(g*i),Math.round(g*n),Math.round(g*r)),f.push(d),d=P.A.i8888to32(Math.round(g*a),Math.round(g*o),Math.round(g*l),Math.round(g*h)),f.push(d),d=P.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class V extends P.A{constructor(e){super(e)}add(e,t,s){const i=this.array;i.push(P.A.i1616to32(e,t)),s&&i.push(...s)}}class B extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a){const o=this.array,l=this.index;let h=P.A.i1616to32(e,t);return o.push(h),h=P.A.i8888to32(Math.round(15*s),Math.round(15*i),n,r),o.push(h),a&&o.push(...a),l}}class v extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,o,l,h,c,u,f){const d=this.array;let g=P.A.i1616to32(e,t);d.push(g),g=P.A.i1616to32(Math.round(8*s),Math.round(8*i)),d.push(g),g=P.A.i8888to32(n/4,r/4,l,h),d.push(g),g=P.A.i8888to32(0,(0,a.z0)(o),10*c,Math.min(10*u,255)),d.push(g),f&&d.push(...f)}}class R extends P.A{constructor(e){super(e)}add(e,t,s,i,n){const r=this.array,a=P.A.i1616to32(2*e+s,2*t+i);r.push(a),n&&r.push(...n)}}class S{constructor(e,t,s){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=s,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,s){}}class C extends S{constructor(e,t,s,i,r){super(e,t,s),this.type=n.NP.CIRCLE,this._circleVertexBuffer=i,this._circleIndexBuffer=r}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,s=this._circleIndexBuffer;this._circleIndexStart=3*s.index,this._circleIndexCount=0;const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);for(const r of this._features){const a=r.getGeometry(e);if(!a)continue;const o=i.circleMaterial.encodeAttributes(r,n,i);for(const e of a)if(e)for(const i of e){const e=t.index;t.add(i.x,i.y,0,0,o),t.add(i.x,i.y,0,1,o),t.add(i.x,i.y,1,0,o),t.add(i.x,i.y,1,1,o),s.add(e,e+1,e+2),s.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._circleIndexStart,t[i++]=this._circleIndexCount,t[i++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)s[i++]=this._circleVertexBuffer.array[e];t[i++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[i++]=this._circleIndexBuffer.array[e];return t.buffer}}var E=s(98291),O=s(83349);class F extends S{constructor(e,t,s,i,r,a,o){super(e,t,s),this.type=n.NP.FILL,this._patternMap=new Map,this._fillVertexBuffer=i,this._fillIndexBuffer=r,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,s){const i=this.layer,n=this.zoom,r=i.getPaintProperty("fill-pattern");if(r)if(r.isDataDriven)for(const e of this._features)t(r.getValue(n,e),!0);else t(r.getValue(n),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,s=this.zoom,{fillMaterial:i,outlineMaterial:n,hasDataDrivenFill:r,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",s);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",s),i=t.getPaintValue("fill-opacity",s+1);e<1&&i<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",s),i=t.getPaintValue("fill-color",s+1);e[3]<1&&i[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const r=[];for(const l of c){const c=o.getValue(s,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=i.encodeAttributes(l,s,t,f),g=h&&a?n.encodeAttributes(l,s,t):[],y=l.getGeometry(e);r.push({ddFillAttributes:d,ddOutlineAttributes:g,page:f.page,geometry:y}),r.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:s,page:i,geometry:n}of r)this._processFeature(n,h,t.outlineUsesFillColor,e,s,u,i)}}else for(const o of c){const l=r?i.encodeAttributes(o,s,t):null,c=h&&a?n.encodeAttributes(o,s,t):null,f=o.getGeometry(e);this._processFeature(f,h,t.outlineUsesFillColor,l,c,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._fillIndexStart,t[i++]=this._fillIndexCount,t[i++]=this._outlineIndexStart,t[i++]=this._outlineIndexCount;const n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;t[i++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)s[i++]=this._fillVertexBuffer.array[e];t[i++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[i++]=this._fillIndexBuffer.array[e];t[i++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)s[i++]=this._outlineVertexBuffer.array[e];t[i++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[i++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s,i,n,r,a){if(!e)return;const o=e.length,l=!n||0===n.length;if(t&&(!s||l))for(let t=0;t<o;t++)this._processOutline(e[t],n);let h;for(let t=0;t<o;t++){const s=F._area(e[t]);s>32?(void 0!==h&&this._processFill(e,h,i,r,a),h=[t]):s<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,i,r,a)}_processOutline(e,t){const s=this._outlineVertexBuffer,i=this._outlineIndexBuffer,n=i.index;let a,o,l;const h=new r.bR(0,0),c=new r.bR(0,0),u=new r.bR(0,0);let f=-1,d=-1,g=-1,y=-1,p=-1,x=!1,_=e.length;if(_<2)return;const m=e[0];let I=e[_-1];for(;_&&I.isEqual(m);)--_,I=e[_-1];if(!(_-0<2)){for(let n=0;n<_;++n){0===n?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=n!==_-1?e[n+1]:e[0],h.assign(c));const r=this._isClipEdge(a,o);-1===y&&(x=r),c.assignSub(l,o),c.normalize(),c.rightPerpendicular();const m=h.x*c.y-h.y*c.x;u.assignAdd(h,c),u.normalize();const I=-u.x*-h.x+-u.y*-h.y;let b=Math.abs(0!==I?1/I:1);b>8&&(b=8),m>=0?(g=s.add(o.x,o.y,h.x,h.y,0,1,t),-1===y&&(y=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,b*-u.x,b*-u.y,0,-1,t),-1===p&&(p=d),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g)):(g=s.add(o.x,o.y,b*u.x,b*u.y,0,1,t),-1===y&&(y=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===p&&(p=d),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=s.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g))}f>=0&&d>=0&&y>=0&&!x&&i.add(f,d,y),f>=0&&y>=0&&p>=0&&!x&&i.add(f,p,y),this._outlineIndexCount+=3*(i.index-n)}}_processFill(e,t,s,i,n){let r;t.length>1&&(r=[]);let a=0;for(const s of t)0!==a&&r.push(a),a+=e[s].length;const o=2*a,l=E.A.acquire();for(const s of t){const t=e[s],i=t.length;for(let e=0;e<i;++e)l.push(t[e].x,t[e].y)}const h=(0,O.e)(l,r,2);if(O.e.deviation(l,r,2,h)>0){const i=t.map((t=>e[t].length)),{buffer:r,vertexCount:a}=(0,k.l)(l,i);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(r[2*e],r[2*e+1],s);for(let t=0;t<a;t+=3){const s=e+t;this._fillIndexBuffer.add(s,s+1,s+2)}if(void 0!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=a:e.set(n,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let i=0;for(;i<o;)this._fillVertexBuffer.add(l[i++],l[i++],s);let r=0;for(;r<e;)this._fillIndexBuffer.add(t+h[r++],t+h[r++],t+h[r++]);if(void 0!==n){const t=this._patternMap,s=t.get(n);s?s[1]+=e:t.set(n,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}E.A.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const s=e.length-1;for(let i=0;i<s;i++)t+=(e[i].x-e[i+1].x)*(e[i].y+e[i+1].y);return t+=(e[s].x-e[0].x)*(e[s].y+e[0].y),.5*t}}var U=s(83773);class N extends S{constructor(e,t,s,i,r){super(e,t,s),this.type=n.NP.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=i,this.tessellationProperties._lineIndexBuffer=r,this._lineTessellator=new U.i(z(this.tessellationProperties),G(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,s){const i=this.layer,n=this.zoom,r=i.getPaintProperty("line-pattern"),a=i.getPaintProperty("line-dasharray"),o=i.getLayoutProperty("line-cap");if(!r&&!a)return;const l=o?.getValue(n)||0,h=o?.isDataDriven,c=r?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?r.getValue(n,e):this._getDashArrayKey(e,n,i,a,h,o,l));else if(r)t(r.getValue(n));else if(a){const e=a.getValue(n);t(i.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,s=this.zoom,i=this._features,n=this._tessellationOptions,{hasDataDrivenLine:r,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),h=o?.isDataDriven,c=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",s),g=d||0,y=!!f;u=t.getLayoutProperty("line-join");const p=u?.isDataDriven?u:null,x=p?null:t.getLayoutValue("line-join",s);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",s);u=t.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,b=I?null:t.getLayoutValue("line-round-limit",s);u=t.getPaintProperty("line-width");const M=u?.isDataDriven?u:null,w=M?null:t.getPaintValue("line-width",s);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,T=k?null:t.getPaintValue("line-offset",s);if(h||c){const r=[];for(const n of i){const i=h?o.getValue(s,n):this._getDashArrayKey(n,s,t,l,y,f,g),c=this._spriteInfo[i];if(!c?.rect)continue;const u=a.encodeAttributes(n,s,t,c),P=n.getGeometry(e);r.push({ddAttributes:u,page:c.page,cap:f?f.getValue(s,n):d,join:p?p.getValue(s,n):x,miterLimit:_?_.getValue(s,n):m,roundLimit:I?I.getValue(s,n):b,halfWidth:.5*(M?M.getValue(s,n):w),offset:k?k.getValue(s,n):T,geometry:P})}r.sort(((e,t)=>e.page-t.page)),n.textured=!0;for(const{ddAttributes:e,page:t,cap:s,join:i,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of r)n.capType=s,n.joinType=i,n.miterLimit=a,n.roundLimit=o,n.halfWidth=l,n.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(s),t=this._spriteInfo[e];if(!t?.rect)return}n.textured=!(!o&&!l),n.capType=d,n.joinType=x,n.miterLimit=m,n.roundLimit=b,n.halfWidth=.5*w,n.offset=T;for(const o of i){const i=r?a.encodeAttributes(o,s,t):null;f&&(n.capType=f.getValue(s,o)),p&&(n.joinType=p.getValue(s,o)),_&&(n.miterLimit=_.getValue(s,o)),I&&(n.roundLimit=I.getValue(s,o)),M&&(n.halfWidth=.5*M.getValue(s,o)),k&&(n.offset=k.getValue(s,o));const l=o.getGeometry(e);this._processFeature(l,i)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._lineIndexStart,t[i++]=this._lineIndexCount;const n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;t[i++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)s[i++]=this.tessellationProperties._lineVertexBuffer.array[e];t[i++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[i++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s){if(!e)return;const i=e.length;for(let n=0;n<i;n++)this._processGeometry(e[n],t,s)}_processGeometry(e,t,s){if(e.length<2)return;let i,n,r=e[0],a=1;for(;a<e.length;)i=e[a].x-r.x,n=e[a].y-r.y,i*i+n*n<1e-6?e.splice(a,1):(r=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const h=3*o.index-l;if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=h:e.set(s,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,s,i,n,r,a){const o=n?r.getValue(t,e):a,l=i.getValue(t,e);return s.getDashKey(l,o)}}const z=e=>(t,s,i,n,r,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,s,o,l,i,n,r,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),G=e=>(t,s,i)=>{e._lineIndexBuffer.add(t,s,i)};var K,q=s(32488),H=s(97768),W=s(799),j=s(3057);function Y(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class J extends S{constructor(e,t,s,i,r,a,o,l,h){super(t,s,h.getSpriteItems()),this.type=n.NP.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=i,this._iconIndexBuffer=r,this._textVertexBuffer=a,this._textIndexBuffer=o,this._placementEngine=l,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,s){const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);const r=i.getLayoutProperty("icon-image"),a=i.getLayoutProperty("text-field");let o=i.getLayoutProperty("text-transform"),l=i.getLayoutProperty("text-font");const h=[];let c,u,f,d;r&&!r.isDataDriven&&(c=r.getValue(n)),a&&!a.isDataDriven&&(u=a.getValue(n)),o&&o.isDataDriven||(f=i.getLayoutValue("text-transform",n),o=null),l&&l.isDataDriven||(d=i.getLayoutValue("text-font",n),l=null);for(const y of this._features){const p=y.getGeometry(e);if(!p||0===p.length)continue;let x,_;r&&(x=r.isDataDriven?r.getValue(n,y):this._replaceKeys(c,y.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(n,y):this._replaceKeys(u,y.values),_)){switch(_=_.replaceAll("\\n","\n"),o&&(f=o.getValue(n,y)),f){case g.Ms.LOWERCASE:_=_.toLowerCase();break;case g.Ms.UPPERCASE:_=_.toUpperCase()}if(J._bidiEngine.hasBidiChar(_)){let e;e="rtl"===J._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=J._bidiEngine.bidiTransform(_,e,"VLYSN"),m=!0}if(_.length>0){l&&(d=l.getValue(n,y));for(const e of d){let t=s[e];t||(t=s[e]=new Set);for(const e of _){const s=e.codePointAt(0);null!=s&&t.add(s)}}}}if(!x&&!_)continue;const I=i.getLayoutValue("symbol-sort-key",n,y),b={feature:y,sprite:x,label:_,rtl:m,geometry:p,hash:(_?(0,W.Wm)(_):0)^(x?(0,W.Wm)(x):0),priority:I,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,s=this.zoom,i=t.getLayoutValue("symbol-placement",s),n=i!==g.kt.POINT,o=8*t.getLayoutValue("symbol-spacing",s),l=t.getLayoutProperty("icon-image"),h=t.getLayoutProperty("text-field"),c=l?new j.aR(t,s,n):null,u=h?new j.uU(t,s,n):null,y=this._workerTileHandler;let x;l&&(x=y.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const _=[];let m=1;u?.size&&(m=u.size/f);const I=u?u.maxAngle*a.os:0,b=u?8*u.size:0;for(const e of this._symbolFeatures){let t,a;c&&x&&e.sprite&&(t=x[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(s,e.feature);let l=0;const h=e.label;if(h){(0,H.Lw)(u),u.update(s,e.feature);const t=n&&u.rotationAlignment===g.I5.MAP?u.keepUpright:u.writingMode&&u.writingMode.includes(g.v9.VERTICAL);let i=.5;switch(u.anchor){case g.KI.TOP_LEFT:case g.KI.LEFT:case g.KI.BOTTOM_LEFT:i=0;break;case g.KI.TOP_RIGHT:case g.KI.RIGHT:case g.KI.BOTTOM_RIGHT:i=1}let r=.5;switch(u.anchor){case g.KI.TOP_LEFT:case g.KI.TOP:case g.KI.TOP_RIGHT:r=0;break;case g.KI.BOTTOM_LEFT:case g.KI.BOTTOM:case g.KI.BOTTOM_RIGHT:r=1}let o=.5;switch(u.justify){case g.O6.AUTO:o=i;break;case g.O6.LEFT:o=0;break;case g.O6.RIGHT:o=1}const c=u.letterSpacing*f,p=n?0:u.maxWidth*f,x=u.lineHeight*f,_=e.textFont.map((e=>y.getGlyphItems(e)));if(a=new d(_,p,x,c,i,r,o).getShaping(h,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const s of a)e=Math.min(e,s.x),t=Math.max(t,s.x);l=(t-e+48)*m*8}}for(let s of e.geometry){const h=[];if(i===g.kt.LINE){if(a?.length&&u?.size){const e=8*u.size*(2+Math.min(2,4*Math.abs(u.offset[1])));s=J._smoothVertices(s,e)}J._pushAnchors(h,s,o,l)}else i===g.kt.LINE_CENTER?J._pushCenterAnchor(h,s):e.feature.type===r.dC.Polygon?J._pushCentroid(h,s):h.push(new p(s[0].x,s[0].y));for(const i of h){if(i.x<0||i.x>4096||i.y<0||i.y>4096)continue;if(n&&l>0&&u?.rotationAlignment===g.I5.MAP&&!J._honorsTextMaxAngle(s,i,l,I,b))continue;const r={shaping:a,line:s,iconMosaicItem:t,anchor:i,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};_.push(r),this._processFeature(r,c,u)}}}_.sort(Y),this._addPlacedGlyphs(),this._symbolInstances=_}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=J._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),s=new Int32Array(t.buffer),i=new Float32Array(t.buffer),[n,r,a]=this._sourceTileKey.split("/");let o=0;t[o++]=this.type,t[o++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[o++]=this.layerUIDs[e];t[o++]=this._isIconSDF?1:0,t[o++]=parseFloat(n),t[o++]=parseFloat(r),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[s,i]]of this.markerPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this.glyphsPageMap.size;for(const[e,[s,i]]of this.glyphsPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=J.serializeSymbols(t,s,i,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)s[o++]=this._iconVertexBuffer.array[e];t[o++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[o++]=this._iconIndexBuffer.array[e];t[o++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)s[o++]=this._textVertexBuffer.array[e];t[o++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[o++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const s of e||[]){t+=5,t+=1;for(const e of s.textColliders)t+=10;for(const e of s.iconColliders)t+=10;t+=1,t+=2*s.textVertexRanges.length,t+=1,t+=2*s.iconVertexRanges.length}return t}static serializeSymbols(e,t,s,i,n){n=n||[],t[i++]=n.length;for(const e of n){t[i++]=e.anchor.x,t[i++]=e.anchor.y,t[i++]=e.symbolFeature.hash,t[i++]=e.symbolFeature.priority,t[i++]=e.symbolFeature.feature.featureIndex,t[i++]=e.textColliders.length+e.iconColliders.length;for(const n of e.textColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;for(const n of e.iconColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;t[i++]=e.textVertexRanges.length;for(const[s,n]of e.textVertexRanges)t[i++]=s,t[i++]=n;t[i++]=e.iconVertexRanges.length;for(const[s,n]of e.iconVertexRanges)t[i++]=s,t[i++]=n}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,s)=>s in t?t[s]:""))}_processFeature(e,t,s){const{line:i,iconMosaicItem:n,shaping:r,anchor:o}=e,l=this.zoom,h=this.layer,c=!!n;let u=!0;c&&(u=t?.optional||!n);const f=r&&r.length>0,d=!f||s?.optional;let y,p;if(c&&(y=this._placementEngine.getIconPlacement(o,n,t)),(y||u)&&(f&&(p=this._placementEngine.getTextPlacement(o,r,i,s)),p||d)){if(y&&p||(d||u?d||p?u||y||(p=null):y=null:(y=null,p=null)),p){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,p.shapes,l,s.rotationAlignment,t),p.textColliders){e.textColliders=p.textColliders;for(const e of p.textColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),y=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=y-g}}}}if(y){const s=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,y.shapes,l,n.page,t.rotationAlignment===g.I5.VIEWPORT,s),y.iconColliders){e.iconColliders=y.iconColliders;for(const e of y.iconColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),y=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=y-g}}}}}}_addPlacedIcons(e,t,s,i,n,r){const o=Math.max(s-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=n?0:Math.max(s+(0,a.p6)(u.minzoom),o),f=n?25:Math.min(s+(0,a.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,g=u.tr,y=u.bl,p=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,b=u.anchor,M=l.index,w=x.x,k=x.y,T=w+x.width,P=k+x.height,A=l.index;l.add(b.x,b.y,d.x,d.y,w,k,_,m,I,t,f,r),l.add(b.x,b.y,g.x,g.y,T,k,_,m,I,t,f,r),l.add(b.x,b.y,y.x,y.y,w,P,_,m,I,t,f,r),l.add(b.x,b.y,p.x,p.y,T,P,_,m,I,t,f,r),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===A?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([A,4]),h.add(M,M+1,M+2),h.add(M+1,M+2,M+3),c.has(i)?c.get(i)[1]+=6:c.set(i,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,s=this._glyphMap;for(const[i,n]of this._glyphBufferDataStorage)for(const r of n){const n=e.index,a=r.symbolInstance,o=r.ddAttributes,l=e.index;e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tl[0],r.tl[1],r.xmin,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tr[0],r.tr[1],r.xmax,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.bl[0],r.bl[1],r.xmin,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.br[0],r.br[1],r.xmax,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(n,n+1,n+2),t.add(n+1,n+2,n+3),s.has(i)?s.get(i)[1]+=6:s.set(i,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,s,i,n){const r=Math.max(s-1,0),o=i===g.I5.VIEWPORT;let l,h,c,u,f,d,y,p,x,_,m;for(const i of t)l=o?0:Math.max(s+(0,a.p6)(i.minzoom),r),h=o?25:Math.min(s+(0,a.p6)(i.maxzoom),25),h<=l||(c=i.tl,u=i.tr,f=i.bl,d=i.br,y=i.labelAngle,p=i.minAngle,x=i.maxAngle,_=i.anchor,m=i.mosaicRect,this._glyphBufferDataStorage.has(i.page)||this._glyphBufferDataStorage.set(i.page,[]),this._glyphBufferDataStorage.get(i.page).push({glyphAnchor:[_.x,_.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:m.x,ymin:m.y,xmax:m.x+m.width,ymax:m.y+m.height,labelAngle:y,minAngle:p,maxAngle:x,minLod:l,maxLod:h,placementLod:r,symbolInstance:e,ddAttributes:n}))}static _pushAnchors(e,t,s,i){s+=i;let n=0;const o=t.length-1;for(let e=0;e<o;e++)n+=r.bR.distance(t[e],t[e+1]);let l=i||s;if(l*=.5,n<=l)return;const h=l/n;let c=0,u=-(s=n/Math.max(Math.round(n/s),1))/2;const f=t.length-1;for(let i=0;i<f;i++){const n=t[i],r=t[i+1],o=r.x-n.x,l=r.y-n.y,f=Math.sqrt(o*o+l*l);let d;for(;u+s<c+f;){u+=s;const t=(u-c)/f,g=(0,a.GW)(n.x,r.x,t),y=(0,a.GW)(n.y,r.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new p(g,y,d,i,h))}c+=f}}static _pushCenterAnchor(e,t){let s=0;const i=t.length-1;for(let e=0;e<i;e++)s+=r.bR.distance(t[e],t[e+1]);const n=s/2;let o=0;const l=t.length-1;for(let s=0;s<l;s++){const i=t[s],r=t[s+1],l=r.x-i.x,h=r.y-i.y,c=Math.sqrt(l*l+h*h);if(n<o+c){const t=(n-o)/c,u=(0,a.GW)(i.x,r.x,t),f=(0,a.GW)(i.y,r.y,t),d=Math.atan2(h,l);return void e.push(new p(u,f,d,s,0))}o+=c}}static _deviation(e,t,s){const i=(t.x-e.x)*(s.x-t.x)+(t.y-e.y)*(s.y-t.y),n=(t.x-e.x)*(s.y-t.y)-(t.y-e.y)*(s.x-t.x);return Math.atan2(n,i)}static _honorsTextMaxAngle(e,t,s,i,n){let a=0;const o=s/2;let l=new r.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=r.bR.distance(e[h],l),l=e[h]}a+=r.bR.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let s,o=h;do{if(++o,o===f)return!1;s=e[o]}while(s.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(s));const g=this._deviation(t,s,l);for(c.push({deviation:g,distToAnchor:a}),u+=g;a-c[0].distToAnchor>n;)u-=c.shift().deviation;if(Math.abs(u)>i)return!1;a+=r.bR.distance(s,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let s=e.length;if(s<3)return e;const i=[];let n=0,a=0;i.push(0);for(let t=1;t<s;t++){const s=r.bR.distance(e[t],e[t-1]);s>0&&(n+=s,i.push(n),a++,a!==t&&(e[a]=e[t]))}if(s=a+1,s<3)return e;t=Math.min(t,.2*n);const o=e[0].x,l=e[0].y,h=e[s-1].x,c=e[s-1].y,u=r.bR.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[s-1],e[s-2]),u.normalize(),e[s-1].x+=t*u.x,e[s-1].y+=t*u.y,i[0]-=t,i[s-1]+=t;const f=[];f.push(new r.bR(o,l));const d=1e-6,g=.5*t;for(let n=1;n<s-1;n++){let a=0,o=0,l=0;for(let s=n-1;s>=0;s--){const r=g+i[s+1]-i[n];if(r<0)break;const h=i[s+1]-i[s],c=i[n]-i[s]<g?1:r/h;if(c<d)break;const u=c*c,f=c*r-.5*u*h,y=c*h/t,p=e[s+1],x=e[s].x-p.x,_=e[s].y-p.y;a+=y/f*(p.x*c*r+.5*u*(r*x-h*p.x)-u*c*h*x/3),o+=y/f*(p.y*c*r+.5*u*(r*_-h*p.y)-u*c*h*_/3),l+=y}for(let r=n+1;r<s;r++){const s=g-i[r-1]+i[n];if(s<0)break;const h=i[r]-i[r-1],c=i[r]-i[n]<g?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,y=c*h/t,p=e[r-1],x=e[r].x-p.x,_=e[r].y-p.y;a+=y/f*(p.x*c*s+.5*u*(s*x-h*p.x)-u*c*h*x/3),o+=y/f*(p.y*c*s+.5*u*(s*_-h*p.y)-u*c*h*_/3),l+=y}f.push(new r.bR(a/l,o/l))}return f.push(new r.bR(h,c)),e[0].x=o,e[0].y=l,e[s-1].x=h,e[s-1].y=c,f}static _pushCentroid(e,t){const s=4096,i=4096,n=t.length-1;let r=0,a=0,o=0,l=t[0].x,h=t[0].y;l>s&&(l=s),l<0&&(l=0),h>i&&(h=i),h<0&&(h=0);for(let e=1;e<n;e++){let n=t[e].x,c=t[e].y,u=t[e+1].x,f=t[e+1].y;n>s&&(n=s),n<0&&(n=0),c>i&&(c=i),c<0&&(c=0),u>s&&(u=s),u<0&&(u=0),f>i&&(f=i),f<0&&(f=0);const d=(n-l)*(f-h)-(u-l)*(c-h);r+=d*(l+n+u),a+=d*(h+c+f),o+=d}r/=3*o,a/=3*o,isNaN(r)||isNaN(a)||e.push(new p(r,a))}}J._bidiEngine=new q.A,function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(K||(K={}));class Z{constructor(e,t,s,i,n,o){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=t,this._sourceDataMaxLOD=i,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=n,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,a.IU)(this._level);for(const t of Object.keys(e)){const s=e[t];if(this._pbfTiles[t]=new w.A(new Uint8Array(s.protobuff),new DataView(s.protobuff)),s.refKey){const[e]=s.refKey.split("/").map(parseFloat),i=l-e;if(i>0){const e=(1<<i)-1,s=h&e,n=c&e;this._tileClippers[t]=new r.O3(i,s,n,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new r.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,k.F)(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const n=[],r=new Set,a=(e,t)=>{r.has(e)||(n.push({name:e,repeat:t}),r.add(e))},o={};for(const e of i)e.getResources(e.tileClipper,a,o);if(this._tile.status===K.INVALID)return[];const l=this._fetchResources(n,o,e);return Promise.all([...l,t]).then((()=>this._processFeatures(s.returnedBuckets)))}_initialize(e){const t=e?.signal;return{signal:t,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,zoom:s,layers:i,sourceNameToTileClipper:n,sourceNameToUniqueSourceLayerBuckets:r,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=i.length-1;e>=0;e--){const u=i[e];if(s<c){if(u.minzoom&&s<Math.floor(u.minzoom)||u.maxzoom&&s>=u.maxzoom)continue}else if(u.maxzoom&&s>=u.maxzoom)continue;if(u.type===g.Dc.BACKGROUND||!this._canParseStyleLayer(u.uid)||!t[u.source]||!n[u.source])continue;const f=t[u.source],d=n[u.source],y=u.sourceLayer,p=f[y];if(p){let e=a[u.source];if(e||(e=a[u.source]=new Set),e.add(u.sourceLayer),u.refLayerId)h.set(u.uid,u.refLayerId);else{const e=this._createBucket(u);if(e){e.layerUIDs=[u.uid],e.layerExtent=p.extent,e.tileClipper=d;let t=r[u.source];t||(t=r[u.source]={});let s=t[y];s||(s=t[y]=[]),s.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:s}=e;s.forEach(((e,s)=>{t[e]&&t[e].layerUIDs.push(s)}))}_filterFeatures(e){const{signal:t,sourceNameToTileData:s,sourceNameToUniqueSourceLayerBuckets:n,sourceNameToUniqueSourceLayers:r}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(r))r[e].forEach((t=>{l.push(t),h.push(e)}));for(let e=0;e<l.length;e++){const r=h[e],c=l[e];if(!s[r]||!n[r])continue;const u=s[r][c],f=n[r][c];if(!f||0===f.length)continue;if((0,i.G4)(t))return;let d=0;const g=u.getData();for(;g.nextTag(2);){const e=g.getMessage(),t=new T(e,u,d++);e.release();const s=t.values;if(s){const e=s._minzoom;if(e&&e>=o)continue;const t=s._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,s){const i=[],n=this._tile.getWorkerTileHandler();let r,a;e.length>0&&(r=n.fetchSprites(e,this._client,s),i.push(r));for(const e in t){const r=t[e];r.size>0&&(a=n.fetchGlyphs(this._tile.tileKey,e,r,this._client,s),i.push(a))}return i}_processFeatures(e){const t=e.filter((e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid)));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const s of Object.keys(e)){const i=e[s],n={};for(;i.next();)switch(i.tag()){case 3:{const e=i.getMessage(),t=new D(e);e.release(),n[t.name]=t;break}default:i.skip()}t[s]=n}return t}_createBucket(e){switch(e.type){case g.Dc.BACKGROUND:return null;case g.Dc.FILL:return this._createFillBucket(e);case g.Dc.LINE:return this._createLineBucket(e);case g.Dc.CIRCLE:return this._createCircleBucket(e);case g.Dc.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new F(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.fillMaterial.getStride()),new A,new B(e.outlineMaterial.getStride()),new A)}_createLineBucket(e){return new N(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new L(e.lineMaterial.getStride()),new A)}_createCircleBucket(e){return new C(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new R(e.circleMaterial.getStride()),new A)}_createSymbolBucket(e){const t=this._tile;return new J(t.tileKey,e,this._level,new v(e.iconMaterial.getStride()),new A,new v(e.textMaterial.getStride()),new A,t.placementEngine,t.getWorkerTileHandler())}}class ${constructor(e,t,s,i){this.status=K.INITIALIZED,this.placementEngine=new I,this.tileKey=e,this.refKeys=t,this._workerTileHandler=s,this._styleRepository=i}release(){this.tileKey="",this.refKeys=null,this.status=K.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const s=t?.signal;if(null!=s){const e=()=>{s.removeEventListener("abort",e),this.status=K.INVALID};s.addEventListener("abort",e)}let n;const r={bucketsWithData:[],emptyBuckets:null};try{n=await this._parse(e,t)}catch(e){if((0,i.zf)(e))throw e;return{result:r,transferList:[]}}this.status=K.READY;const a=r.bucketsWithData,o=[];for(const e of n)if(e.hasFeatures()){const t=e.serialize();a.push(t)}else o.push(e.layer.uid);const l=[...a];let h=null;return o.length>0&&(h=Uint32Array.from(o),l.push(h.buffer)),r.emptyBuckets=h,{result:r,transferList:l}}setObsolete(){this.status=K.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const s=e.sourceName2DataAndRefKey;return 0===Object.keys(s).length?[]:(this.status=K.MODIFIED,new Z(s,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var Q=s(45013);class X{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(e,t){const{key:s}=e,n={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const s=e.sourceName2DataAndRefKey[t];n[t]=s.refKey}const r=new $(s,n,this,this._styleRepository);try{return await r.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(r.setObsolete(),r.release(),!(0,i.zf)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const s of e){const e=s.type,i=s.data;switch(e){case n.$q.PAINTER_CHANGED:t.setPaintProperties(i.layer,i.paint);break;case n.$q.LAYOUT_CHANGED:t.setLayoutProperties(i.layer,i.layout);break;case n.$q.LAYER_REMOVED:t.deleteStyleLayer(i.layer);break;case n.$q.LAYER_CHANGED:t.setStyleLayer(i.layer,i.index);break;case n.$q.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:s}=e;this._styleRepository=new Q.A(t),this._sourceDataMaxLOD=s,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,s){const i=[],n=this._spriteInfo;for(const t of e)void 0===n[t.name]&&i.push(t);return 0===i.length?Promise.resolve():t.invoke("getSprites",i,{signal:s?.signal}).then((e=>{for(const t in e){const s=e[t];n[t]=s}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,s,i,n){const r=[];let a=this._glyphInfo[t];return a?s.forEach((e=>{a[e]||r.push(e)})):(a=this._glyphInfo[t]=[],s.forEach((e=>r.push(e)))),0===r.length?Promise.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:r},n).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5957],{68197:(e,t,r)=>{r.d(t,{A:()=>h});var n,s,o=r(40876),i=r(34727),a=r(56507);function l(e){return(0,i.qE)((0,a.Vr)(e),0,255)}function c(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function u(e,t){const r=e.toString(16).padStart(2,"0");return t?r.slice(0,1):r}class h{static blendColors(e,t,r,n=new h){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),h.fromArray(r,t)}return h.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return h.fromArray((0,o.z$)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new h){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),s=parseInt(e.slice(3,4),16),o=5===e.length?15:parseInt(e.slice(4),16);return h.fromArray([r+16*r,n+16*n,s+16*s,(o+16*o)/255],t)}case 7:case 9:{const r=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),s=parseInt(e.slice(5,7),16),o=7===e.length?255:parseInt(e.slice(7),16);return h.fromArray([r,n,s,o/255],t)}default:return null}}static fromArray(e,t=new h){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.V6)(e)?(0,o.TS)(e):null;return r&&h.fromArray(r,t)||h.fromRgb(e,t)||h.fromHex(e,t)}static fromJSON(e){return null!=e?new h([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?h.fromString(e,this):Array.isArray(e)?h.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,n=3===r||4===r,s=4===r||8===r,o=`#${u(this.r,n)}${u(this.g,n)}${u(this.b,n)}${s?u(Math.round(255*this.a),n):""}`;return t?o.toUpperCase():o}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=h.AlphaMode.ALWAYS){const t=l(this.r),r=l(this.g),n=l(this.b);return e===h.AlphaMode.ALWAYS||1!==this.a?[t,r,n,l(255*this.a)]:[t,r,n]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(c(this.r,0,255)),this.g=Math.round(c(this.g,0,255)),this.b=Math.round(c(this.b,0,255)),this.a=c(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}h.prototype.declaredClass="esri.Color",(s=(n=h).AlphaMode||(n.AlphaMode={}))[s.ALWAYS=0]="ALWAYS",s[s.UNLESS_OPAQUE=1]="UNLESS_OPAQUE"},73354:(e,t,r)=>{r.d(t,{a:()=>h,b:()=>a,c:()=>i,d:()=>s,e:()=>f,f:()=>u,l:()=>c,n:()=>d,t:()=>o});var n=r(40876);function s(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=3,s=n){if(e.length/n!==Math.ceil(t.length/s))return e;const o=e.length/n,i=r[0],a=r[1],l=r[2],c=r[4],u=r[5],h=r[6],f=r[8],d=r[9],g=r[10],m=r[12],p=r[13],b=r[14];let y=0,w=0;for(let r=0;r<o;r++){const r=t[y],o=t[y+1],_=t[y+2];e[w]=i*r+c*o+f*_+m,e[w+1]=a*r+u*o+d*_+p,e[w+2]=l*r+h*o+g*_+b,y+=s,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,s=n){if(e.length/n!==Math.ceil(t.length/s))return;const o=e.length/n,i=r[0],a=r[1],l=r[2],c=r[3],u=r[4],h=r[5],f=r[6],d=r[7],g=r[8];let m=0,p=0;for(let r=0;r<o;r++){const r=t[m],o=t[m+1],b=t[m+2];e[p]=i*r+c*o+f*b,e[p+1]=a*r+u*o+d*b,e[p+2]=l*r+h*o+g*b,m+=s,p+=n}}function l(e,t,r,n=3,s=n){const o=Math.min(e.length/n,t.length/s);let i=0,a=0;for(let l=0;l<o;l++)e[a]=r*t[i],e[a+1]=r*t[i+1],e[a+2]=r*t[i+2],i+=s,a+=n;return e}function c(e,t,r,n){u(e.typedBuffer,t.typedBuffer,r,n,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,s,o=3,i=o){const a=Math.min(e.length/o,t.length/i);let l=0,c=0;const u=1/n.Tf;for(let n=0;n<a;n++)e[c]=s*(r*t[l])**u,e[c+1]=s*(r*t[l+1])**u,e[c+2]=s*(r*t[l+2])**u,l+=i,c+=o}function h(e,t,r,n=3,s=n){const o=e.length/n;if(o!==Math.ceil(t.length/s))return e;let i=0,a=0;for(let l=0;l<o;l++)e[a]=t[i]+r[0],e[a+1]=t[i+1]+r[1],e[a+2]=t[i+2]+r[2],i+=s,a+=n;return e}function f(e,t){d(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r=3,n=r){const s=Math.min(e.length/r,t.length/n);let o=0,i=0;for(let a=0;a<s;a++){const s=t[o],a=t[o+1],l=t[o+2],c=s*s+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*s,e[i+1]=t*a,e[i+2]=t*l}o+=n,i+=r}}r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:d,normalizeView:f,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const n=Math.min(e.count,t.count),s=e.typedBuffer,o=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<n;e++)s[c]=i[l]>>r,s[c+1]=i[l+1]>>r,s[c+2]=i[l+2]>>r,l+=a,c+=o},transformMat3:a,transformMat3View:i,transformMat4:o,transformMat4View:s,translate:h},Symbol.toStringTag,{value:"Module"}))},10382:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(36563),s=(r(44208),r(74887)),o=r(9775),i=r(72457),a=r(52268),l=r(61322);class c{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,n)=>{let o=!0;const i=e=>{(0,s.Te)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const a=e[o];(0,s.$X)(a)?this._clientPromises[o]=a.then((e=>(this._clients[o]=new l.default(e,t,this._ongoingJobsQueue),i(r),this._clients[o])),(()=>(i(n),null))):(this._clients[o]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[o]=Promise.resolve(this._clients[o]),i(r))}}))}broadcast(e,t,r){const n=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const o=this._clientPromises[s];n[s]=o.then((n=>n?.invoke(e,t,r)))}return n}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,s.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,i.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const n=(0,s.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:n});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return n.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,n.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then((s=>{s&&(t[n]=s.openPort()),0==--r&&e(t)}))}))}get test(){}}},35982:(e,t,r)=>{r.d(t,{B:()=>l});var n=r(4576),s=r(36563),o=r(53966),i=r(74887),a=r(29953);class l{constructor(e,t,r,n,s={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,a.ho)(e,{...s,schedule:n}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,s.hA)((()=>{r.removed=!0,(0,n.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const n=this._transferLists[e],s=n?n(t):[];return this._thread.invoke(e,t,{transferList:s,signal:r})}return this._promise?this._promise.then((()=>((0,i.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},72457:(e,t,r)=>{r.d(t,{h:()=>o,k:()=>s});const n=new FinalizationRegistry((e=>{e.close()}));function s(e,t){n.register(e,t,t)}function o(e){n.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>J});var n=r(49186),s=r(44208),o=r(74887),i=r(10382),a=r(72457),l=r(61322),c=r(53966),u=r(97768),h=r(78888),f=r(84952);const d={async request(e,t){const r=e.options,n=r.responseType;r.signal=t?.signal,r.responseType="native"===n||"native-request-init"===n?"native-request-init":n&&["blob","json","text"].includes(n)&&(0,f.sC)(e.url)?.after?n:"array-buffer";const s=await(0,h.A)(e.url,r),o={data:s.data,httpStatus:s.httpStatus,ssl:s.ssl};switch(s.requestOptions?.responseType){case"native-request-init":return delete o.data.signal,o;case"blob":o.data=await o.data.arrayBuffer();break;case"json":o.data=(new TextEncoder).encode(JSON.stringify(o.data)).buffer;break;case"text":o.data=(new TextEncoder).encode(o.data).buffer}return{result:o,transferList:[o.data]}}};var g=r(8341),m=r(2741),p=r(92602),b=(r(47566),r(70333));const y={};var w=r(26390);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class A{constructor(){this._dispatcher=new _,this._workerPostMessage({type:g.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,w.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,w.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,g.VI)(e);if(t&&t.type===g.Go.OPEN){const{modulePath:e,jobId:r}=t;let n=await l.default.loadWorker(e);n||(n=await import(e));const s=l.default.connect(n);this._workerPostMessage({type:g.Go.OPENED,jobId:r,data:s})}}}var v=r(73444),k=r(18357);const E=()=>c.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:P}=g.Go;let M,S;const N="Failed to create Worker. Fallback to execute module in main thread";async function L(e){return new Promise((t=>{function r(s){const o=(0,g.VI)(s);o&&o.type===P&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),E().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new A).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let I=0;const{ABORT:C,INVOKE:O,OPEN:R,OPENED:U,RESPONSE:j}=g.Go;class B{static async create(e){const t=await async function(){if(!(0,s.A)("esri-workers"))return L(new A);if(!M&&!S)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=p.A.default){const t={...p.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(p.A));e.assetsPath=(0,f.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,f.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.JK)(),e.has={"esri-csp-restrictions":(0,s.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,s.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,s.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,s.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,s.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,s.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,s.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,s.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,s.A)("esri-atomics"),"esri-shared-array-buffer":(0,s.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,f.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,f.s2)(e.workers.workerPath):e.workers.workerPath=(0,f.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=p.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{...y.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=y.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,v.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={buildDate:k.$,fullVersion:b.ol,revision:k.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}());M=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){S=e||{}}let e;if(M)try{e=new Worker(M,{name:"esri-worker-"+I++})}catch(t){E().warn(N,S),e=new A}else E().warn(N,S),e=new A;return L(e)}();return new B(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,g.Jc)();return new Promise(((t,s)=>{const i={resolve:t,reject:s,abortHandle:(0,o.NY)(r,(()=>{this._outJobs.delete(n),this._post({type:C,jobId:n})}))};this._outJobs.set(n,i),this._post({type:R,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,g.VI)(e);if(t)switch(t.type){case U:this._onOpenedMessage(t);break;case j:this._onResponseMessage(t);break;case C:this._onAbortMessage(t);break;case O:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,i=s?new AbortController:null,a=this._inJobs,l=d[t];let c;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);c=l.call(null,n,{signal:i?i.signal:null})}catch(e){return void this._post({type:j,jobId:r,error:(0,g.mF)(e)})}(0,o.$X)(c)?(a.set(r,{controller:i,promise:c}),c.then((e=>{a.has(r)&&(a.delete(r),this._post({type:j,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.zf)(e)||this._post({type:j,jobId:r,error:(0,g.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:j,jobId:r},c)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,u.xt)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,u.xt)(o.abortHandle),r?o.reject(n.A.fromJSON(JSON.parse(r))):o.resolve(s))}_post(e,t,r){return(0,g.u1)(this.worker,e,t,r)}}const x=(0,s.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,s.A)("workers-pool-size")??8):0;let F=(0,s.A)("esri-mobile")?Math.min(x,3):x;F||(F=(0,s.A)("safari")&&(0,s.A)("mac")?7:2);let H=0;const T=[];async function $(e,t){const r=new i.A,{registryTarget:n,...s}=t;return await r.open(e,s),n&&(0,a.k)(n,r),r}async function J(e,t={}){if("string"!=typeof e)throw new n.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.A)("host-webworker")&&!(0,s.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,o.Te)(t.signal);const n=t.client||r;return $([l.default.connect(r,t.schedule)],{...t,client:n})}if(await async function(){if(V)return V;D=new AbortController;const e=[];for(let t=0;t<F;t++){const r=B.create(t).then((e=>(T[t]=e,e)));e.push(r)}return V=Promise.all(e),V}(),(0,o.Te)(t.signal),"dedicated"===r){const r=H++%F;return $([await T[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,F);if(r<F){const n=new Array(r);for(let s=0;s<r;++s){const r=H++%F;n[s]=T[r].open(e,t)}return $(n,t)}}return $(T.map((r=>r.open(e,t))),t)}let D,V=null},95696:(e,t,r)=>{r.d(t,{A:()=>h});var n,s=r(90237),o=r(69540),i=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(40608);let u=n=class extends(o.A.ClonableMixin(i.A)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};u.absolute=new n,(0,s._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,s._)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=n=(0,s._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u);const h=u},18251:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(90237),s=r(69540),o=r(25482),i=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),l=r(40608),c=r(51850);let u=class extends(s.A.ClonableMixin(o.A)){constructor(e){super(e),this.type="local",this.origin=(0,c.vt)()}};(0,n._)([(0,a.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,n._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,n._)([(0,l.$)("esri.geometry.support.MeshLocalVertexSpace")],u);const h=u},47566:(e,t,r)=>{r(97770),r(18047),r(71754),r(73444);var n=r(10838),s=r(78888),o=r(49186);async function i(e){if(null!=a.fetchBundleAsset)return a.fetchBundleAsset(e);const t=await(0,s.A)(e,{responseType:"text"});return JSON.parse(t.data)}const a={};var l,c=r(2741);(0,n.ao)((l={pattern:"esri/",location:c.s},new class{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let n;n="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=n,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const a=t.exec(r);if(!a)throw new o.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",c=a[2],u=(0,n.xO)(s),h=`${l}${c}.json`,f=u?`${l}${c}_${u}.json`:h;let d;try{d=await i(e(f))}catch(t){if(f===h)throw new o.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{d=await i(e(h))}catch(e){throw new o.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return d}(this.getAssetUrl,this.matcher,e,t)}}(l)))},18047:(e,t,r)=>{r.d(t,{ZV:()=>a});var n=r(73444);const s={ar:"ar-u-nu-latn"};let o=new WeakMap,i={};function a(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||i;if(!o.has(t)){const r=(0,n.JK)(),i=s[(0,n.JK)()]||r;o.set(t,new Intl.NumberFormat(i,e))}return o.get(t)}(t).format(e)}(0,n.Ml)((()=>{o=new WeakMap,i={}})),new Map},71754:(e,t,r)=>{r.d(t,{V:()=>c});var n=r(53966),s=r(93637),o=r(799),i=r(97770),a=r(18047);const l=()=>n.A.getLogger("esri.intl.substitute");function c(e,t,r={}){const{format:n={}}=r;return(0,o.HC)(e,(e=>function(e,t,r){let n,o;const i=e.indexOf(":");if(-1===i?n=e.trim():(n=e.slice(0,i).trim(),o=e.slice(i+1).trim()),!n)return"";const a=(0,s.wc)(n,t);if(null==a)return"";const l=(o?r?.[o]:null)??r?.[n];return l?u(a,l):o?h(a,o):f(a)}(e,t,n)))}function u(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return l().warn("missing format descriptor for key {key}"),f(e)}}function h(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return l().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}},36233:(e,t,r)=>{r.r(t),r.d(t,{destroyContext:()=>C,dracoDecompressPointCloudData:()=>P,filterObbsForModifications:()=>M,filterObbsForModificationsSync:()=>x,initialize:()=>T,interpretObbModificationResults:()=>B,process:()=>E,project:()=>L,setLegacySchema:()=>N,setModifications:()=>S,setModificationsSync:()=>U,test:()=>J,transformNormals:()=>I});var n,s,o=r(34727),i=r(16930),a=r(95696),l=r(18251),c=r(73354);!function(e){e[e.None=0]="None",e[e.Int16=1]="Int16",e[e.Int32=2]="Int32"}(n||(n={})),function(e){e[e.Replace=0]="Replace",e[e.Outside=1]="Outside",e[e.Inside=2]="Inside",e[e.Finished=3]="Finished"}(s||(s={}));var u=r(2741);function h(e){return(0,u.s)(`esri/libs/i3s/${e}`)}let f;r(53966);var d,g,m,p,b,y,w=r(3694),_=r(51850),A=r(35982);r(57251),r(27993);class v{constructor(e,t,r,n,s,o){this.layout=e,this.interleavedVertexData=t,this.indices=r,this.hasColors=n,this.hasModifications=s,this.positionData=o}}class k{constructor(e,t,r,n,s,o,i){this.componentOffsets=e,this.featureIds=t,this.anchorIds=r,this.anchors=n,this.transformedGeometry=s,this.globalTrafo=o,this.obb=i}}async function E(e){R=await $();const t=[e.geometryBuffer];return{result:j(R,e,t),transferList:t}}async function P(e){R=await $();const t=[e.geometryBuffer],{geometryBuffer:r}=e,n=r.byteLength,s=R._malloc(n),o=new Uint8Array(R.HEAPU8.buffer,s,n);o.set(new Uint8Array(r));const i=R.dracoDecompressPointCloudData(s,o.byteLength);if(R._free(s),i.error.length>0)throw new Error(`i3s.wasm: ${i.error}`);const a=i.featureIds?.length>0?i.featureIds.slice():null,l=i.positions.slice();return a&&t.push(a.buffer),t.push(l.buffer),{result:{positions:l,featureIds:a},transferList:t}}async function M(e){await $(),x(e);const t={buffer:e.buffer};return{result:t,transferList:[t.buffer]}}async function S(e){await $(),U(e)}async function N(e){R=await $(),R.setLegacySchema(e.context,e.jsonSchema)}async function L(e){const{localMatrix:t,origin:n,positions:s,vertexSpace:o}=e,c=i.A.fromJSON(e.inSpatialReference),u=i.A.fromJSON(e.outSpatialReference);let h;const[{projectBuffer:f},{initializeProjection:d}]=await Promise.all([Promise.resolve().then(r.bind(r,9762)),Promise.resolve().then(r.bind(r,57251))]);await d(c,u);const g=[0,0,0];if(!f(n,c,0,g,u,0))throw new Error("Failed to project");if("georeferenced"===o.type&&null==o.origin){if(h=new Float64Array(s.length),!f(s,c,0,h,u,0,h.length/3))throw new Error("Failed to project")}else{const e="georeferenced"===o.type?a.A.fromJSON(o):l.A.fromJSON(o),{projectMeshVertexPositions:n}=await Promise.all([r.e(3030),r.e(4594)]).then(r.bind(r,74594)),i=n({vertexAttributes:{position:s},transform:t?{localMatrix:t}:void 0,vertexSpace:e,spatialReference:c},u);if(!i)throw new Error("Failed to project");h=i}const m=h.length,[p,b,y]=g;for(let e=0;e<m;e+=3)h[e]-=p,h[e+1]-=b,h[e+2]-=y;return{result:{projected:h,original:s,projectedOrigin:g},transferList:[h.buffer,s.buffer]}}async function I({normalMatrix:e,normals:t}){const r=new Float32Array(t.length);return(0,c.b)(r,t,e),(0,o.or)(e)&&(0,c.n)(r,r),{result:{transformed:r,original:t},transferList:[r.buffer,t.buffer]}}function C(e){F(e)}let O,R;function U(e){if(!R)return;const t=e.modifications,r=R._malloc(8*t.length),n=new Float64Array(R.HEAPU8.buffer,r,t.length);for(let e=0;e<t.length;++e)n[e]=t[e];R.setModifications(e.context,r,t.length,e.isGeodetic),R._free(r)}function j(e,t,r){const{context:s,globalTrafo:o,mbs:i,obbData:a,elevationOffset:l,geometryBuffer:c,geometryDescriptor:u,indexToVertexProjector:h,vertexToRenderProjector:f}=t,d=e._malloc(c.byteLength),g=e._malloc(33*Float64Array.BYTES_PER_ELEMENT),m=new Uint8Array(e.HEAPU8.buffer,d,c.byteLength);m.set(new Uint8Array(c));const p=new Float64Array(e.HEAPU8.buffer,g,33);H(p,[NaN,NaN,NaN]);let b=p.byteOffset+3*p.BYTES_PER_ELEMENT,y=new Float64Array(p.buffer,b);H(y,o),b+=16*p.BYTES_PER_ELEMENT,y=new Float64Array(p.buffer,b),H(y,i),b+=4*p.BYTES_PER_ELEMENT,a&&(y=new Float64Array(p.buffer,b),H(y,a));const w=u,_={isDraco:!1,isLegacy:!1,color:t.layouts.some((e=>e.some((e=>"color"===e.name)))),normal:t.needNormals&&t.layouts.some((e=>e.some((e=>"normalCompressed"===e.name)))),uv0:t.layouts.some((e=>e.some((e=>"uv0"===e.name)))),uvRegion:t.layouts.some((e=>e.some((e=>"uvRegion"===e.name)))),featureIndex:w.featureIndex},A=e.process(s,!!t.obbData,d,m.byteLength,w,_,g,l,h,f,t.normalReferenceFrame);if(e._free(g),e._free(d),A.error.length>0)throw new Error(`i3s.wasm: ${A.error}`);if(A.discarded)return null;const E=A.componentOffsets.length>0?A.componentOffsets.slice():null,P=A.featureIds.length>0?A.featureIds.slice():null,M=A.anchorIds.length>0?Array.from(A.anchorIds):null,S=A.anchors.length>0?Array.from(A.anchors):null,N=A.interleavedVertedData.slice().buffer,L=A.indicesType===n.Int16?new Uint16Array(A.indices.buffer,A.indices.byteOffset,A.indices.byteLength/2).slice():new Uint32Array(A.indices.buffer,A.indices.byteOffset,A.indices.byteLength/4).slice(),I=A.positions.slice(),{buffer:C,byteOffset:O,byteLength:R}=A.positionIndices,U=A.positionIndicesType===n.Int16?new Uint16Array(C,O,R/2).slice():new Uint32Array(C,O,R/4).slice(),j=new v(t.layouts[0],N,L,A.hasColors,A.hasModifications,{data:I,indices:U});return P&&r.push(P.buffer),E&&r.push(E.buffer),r.push(N),r.push(L.buffer),r.push(I.buffer),r.push(U.buffer),new k(E,P,M,S,j,o,A.obb)}function B(e){return 0===e?g.Unmodified:1===e?g.PotentiallyModified:2===e?g.Culled:g.Unknown}function x(e){if(!R)return;const{context:t,buffer:r}=e,n=R._malloc(r.byteLength),s=r.byteLength/Float64Array.BYTES_PER_ELEMENT,o=new Float64Array(R.HEAPU8.buffer,n,s),i=new Float64Array(r);o.set(i),R.filterOBBs(t,n,s),i.set(o),R._free(n)}function F(e){R&&0===R.destroy(e)&&(R=null)}function H(e,t){for(let r=0;r<t.length;++r)e[r]=t[r]}async function T(){R||await $()}function $(){return R?Promise.resolve(R):(O||(O=(f||(f=new Promise((e=>r.e(2980).then(r.bind(r,82980)).then((e=>e.i)).then((({default:t})=>{const r=t({locateFile:h,onRuntimeInitialized:()=>e(r)});delete r.then})))).catch((e=>{throw e}))),f).then((e=>(R=e,O=null,R)))),O)}A.B,new w.A({deallocator:null}),(0,_.vt)(),r(91829),r(97937),r(4654),(y=d||(d={}))[y.Unmodified=0]="Unmodified",y[y.Culled=1]="Culled",y[y.NotChecked=2]="NotChecked",function(e){e[e.Unmodified=0]="Unmodified",e[e.PotentiallyModified=1]="PotentiallyModified",e[e.Culled=2]="Culled",e[e.Unknown=3]="Unknown",e[e.NotChecked=4]="NotChecked"}(g||(g={})),function(e){e[e.Unknown=0]="Unknown",e[e.Uncached=1]="Uncached",e[e.Cached=2]="Cached"}(m||(m={})),function(e){e[e.None=0]="None",e[e.MaxScreenThreshold=1]="MaxScreenThreshold",e[e.ScreenSpaceRelative=2]="ScreenSpaceRelative",e[e.RemovedFeatureDiameter=3]="RemovedFeatureDiameter",e[e.DistanceRangeFromDefaultCamera=4]="DistanceRangeFromDefaultCamera"}(p||(p={})),function(e){e[e.Hole=0]="Hole",e[e.Leaf=1]="Leaf"}(b||(b={}));const J={transform:(e,t)=>R&&j(R,e,t),destroy:F}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6781,7136],{67482:(e,t,n)=>{function s(e){return null!=a(e)||null!=o(e)}function r(e){return l.test(e)}function i(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!u.test(e[s]),s++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const n=t.groups,s=+n.year,r=+n.month-1,i=+n.day,o=+(n.hours??"0"),a=+(n.minutes??"0"),u=+(n.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const p=n.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(s,r,i,o,a,u,c);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,r,i,o,a,u,c)}return Number.isNaN(d)?null:d}n.d(t,{Br:()=>r,Cq:()=>s,_U:()=>i});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},14607:(e,t,n)=>{n.d(t,{B:()=>u,GP:()=>a,qg:()=>p});var s=n(799),r=n(73444);const i={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,r.JK)()){let t=(e=e.toLowerCase())in i;if(!t){const n=e.split("-");n.length>1&&n[0]in i&&(e=n[0],t=!0),t||(e="en")}const[n,s,o="#,##0.###"]=i[e];return{decimal:n,group:s,pattern:o}}function a(e,t){const n=o((t={...t}).locale);t.customs=n;const s=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,n){const s=(n=n||{}).customs.group,r=n.customs.decimal,i=t.split(";"),o=i[0];if((t=i[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(a,function(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const s=t.split("."),r="string"==typeof n.places&&n.places.indexOf(",");let i=n.places;r?i=n.places.slice(r+1):+i>=0||(i=(s[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(i))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(s[1]||n.places){r&&(n.places=n.places.slice(0,Math.max(0,r)));const e=void 0!==n.places?n.places:s[1]&&s[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+i<a.length&&(o[1]=a.slice(0,Math.max(0,Number(i))))}else o[1]&&o.pop();const l=s[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let p,c,d=s[0].lastIndexOf(",");if(-1!==d){p=s[0].length-d-1;const e=s[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(c=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-p;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",c&&(p=c,c=void 0)}return o[0]=f.reverse().join(n.group||","),o.join(n.decimal||".")}(e,u[0],{decimal:r,group:s,places:n.places,round:n.round}))}(e,s,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),n=e.pattern||t.pattern,r=t.group,i=t.decimal;let a=1;if(n.includes("%"))a/=100;else if(n.includes("‰"))a/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const u=n.split(";");1===u.length&&u.push("-"+u[0]);const p=d(u,(t=>(t="(?:"+(0,s.Cj)(t,".")+")").replace(l,(t=>{const n={signed:!1,separator:e.strict?r:[r,""],fractional:e.fractional,decimal:i,exponent:!1},s=t.split(".");let o=e.places;1===s.length&&1!==a&&(s[1]="###"),1===s.length||0===o?n.fractional=!1:(void 0===o&&(o=e.pattern?s[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(n.fractional=!0),!e.places&&+o<s[1].length&&(o+=","+s[1].length),n.places=o);const l=s[0].split(",");return l.length>1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=c(e),n=d(e.fractional,(t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n}),!0);let s=t+n;return n&&(s="(?:(?:"+s+")|(?:"+n+"))"),s+d(e.exponent,(t=>t?"([eE]"+c({signed:e.eSigned})+")":""))}(n)+")"}))),!0);return{regexp:p.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:r,decimal:i,factor:a}}function p(e,t){const n=u(t),s=new RegExp("^"+n.regexp+"$").exec(e);if(!s)return NaN;let r=s[1];if(!s[1]){if(!s[2])return NaN;r=s[2],n.factor*=-1}return r=r.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(r)*n.factor}function c(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,s.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const n=e.groupSize,r=e.groupSize2;if(r){const e="(?:0|[1-9]\\d{0,"+(r-1)+"}(?:["+t+"]\\d{"+r+"})*["+t+"]\\d{"+n+"})";return n-r>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*)"}),!0)}const d=(e,t,n)=>{if(!Array.isArray(e))return t(e);const s=[];for(let n=0;n<e.length;n++)s.push(t(e[n]));return f(s.join("|"),Boolean(n))},f=(e,t)=>"("+(t?"?:":"")+e+")"},17136:(e,t,n)=>{n.d(t,{O7:()=>A,el:()=>N});var s=n(92602),r=n(49186),i=n(53966),o=n(39829),a=n(82799),l=n(80754),u=n(21325),p=n(28735),c=(n(59456),n(78888)),d=n(65864),f=n(2272),h=n(84952),y=n(92300);const m=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function x(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new r.A(e)}const n=(0,l.r8)(e),s=[];for(const e of n){const n=[];s.push(n),n.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],i=e[s][1],o=e[s+1][0],a=e[s+1][1],l=Math.sqrt((o-r)*(o-r)+(a-i)*(a-i)),u=(a-i)/l,p=(o-r)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const s=e*t,o=p*s+r,a=u*s+i;n.push([o,a])}const e=(l+Math.floor(c-1)*t)/2,s=p*e+r,o=u*e+i;n.push([s,o])}n.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:s,spatialReference:e.spatialReference}):new a.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function F(e,t,n){if(Array.isArray(e)){const s=e[0];if(s>t){const n=(0,l.kd)(s,t);e[0]=s+n*(-2*t)}else if(s<n){const t=(0,l.kd)(s,n);e[0]=s+t*(-2*n)}}else{const s=e.x;if(s>t){const n=(0,l.kd)(s,t);e=e.clone().offset(n*(-2*t),0)}else if(s<n){const t=(0,l.kd)(s,n);e=e.clone().offset(t*(-2*n),0)}}return e}function w(e,t){let n=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],i=t.geometries[s],o=(0,l.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const s=t[e][0];n=s>n?s:n}n=Number(n.toFixed(9));const s=-360*(0,l.kd)(n,180);for(let n=0;n<t.length;n++){const t=i.getPoint(e,n);i.setPoint(e,n,t.clone().offset(s,0))}return!0}}))}if(r===n){if(g(e))for(const t of(0,l.r8)(i))e[r]=e[r].addRing(t);else if(S(e))for(const t of(0,l.r8)(i))e[r]=e[r].addPath(t)}else n=r,e[r]=i}return e}async function N(e,t,n){if(!Array.isArray(e))return N([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let i,g,S,A,b,I,T,C,_=0;const E=[],O=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,g=(0,u.Vp)(i),S=i.isWebMercator,I=S?102100:4326,A=l.j7[I].maxX,b=l.j7[I].minX,T=l.j7[I].plus180Line,C=l.j7[I].minus180Line),g)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(F(t.clone(),A,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,A,b))),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);O.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,l.kd)(e.xmin,b)*(2*A);let s=0===n?t.clone():(0,l.kS)(t.clone(),n);e.offset(n,0);let{xmin:r,xmax:i}=e;r=Number(r.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(T)&&i!==A?(_=i>_?i:_,s=x(s,S),E.push(s),O.push("cut")):e.intersects(C)&&r!==b?(_=i*(2*A)>_?i*(2*A):_,s=x(s,S,360),E.push(s),O.push("cut")):O.push(s)}else O.push(t.clone());else O.push(t);else O.push(t);let v=(0,l.kd)(_,A),R=-90;const q=v,M=new a.A;for(;v>0;){const e=360*v-180;M.addPath([[e,R],[e,-1*R]]),R*=-1,v--}if(E.length>0&&q>0){const t=w(E,await async function(e,t,n,s){const r=(0,f.Dl)(e),i=t[0].spatialReference,o={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(i),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,c.A)(r.path+"/cut",o),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=i,t}))}}(r,E,M,n)),s=[],i=[];for(let n=0;n<O.length;n++){const r=O[n];if("cut"!==r)i.push(r);else{const r=t.shift(),o=e[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&r.rings.length>=o.rings.length?(s.push(r),i.push("simplify")):i.push(S?(0,p.Gh)(r):r)}}if(!s.length)return i;const o=await async function(e,t,n){const s="string"==typeof e?(0,h.An)(e):e,r=t[0].spatialReference,i=(0,d.$B)(t[0]),o={...n,query:{...s.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,y.X)(t))}},{data:a}=await(0,c.A)(s.path+"/simplify",o);return(0,y.V)(a.geometries,i,r)}(r,s,n),a=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?a.push(t):a.push(S?(0,p.Gh)(o.shift()):o.shift())}return a}const k=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)k.push(t);else{const e=E.shift();k.push(!0===S?(0,p.Gh)(e):e)}}return k}function A(e,t,n){const s=(0,u.Vp)(n);if(null==s)return e;const[r,i]=s.valid,o=2*i;let a=0,l=0;t>i?a=Math.ceil(Math.abs(t-i)/o):t<r&&(a=-Math.ceil(Math.abs(t-r)/o)),e>i?l=Math.ceil(Math.abs(e-i)/o):e<r&&(l=-Math.ceil(Math.abs(e-r)/o));let p=e+(a-l)*o;const c=p-t;return c>i?p-=o:c<r&&(p+=o),p}},80754:(e,t,n)=>{n.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>u});var s=n(82799),r=n(16930),i=n(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},40752:(e,t,n)=>{n.r(t),n.d(t,{default:()=>H}),n(59456);var s=n(78888),r=n(60999),i=n(67482),o=n(49186),a=n(53966),l=n(74887),u=n(84952),p=n(57251),c=n(7320),d=n(21325),f=n(28735),h=n(43334),y=n(92722),m=n(58376),g=n(83221),S=n(31464),x=n(19730),F=n(14607),w=n(30524);function N(e,t,n){t=(0,w.rS)(t)?.toLowerCase(),n=(0,w.rS)(n)?.toLowerCase();const s=e.map((e=>e.toLowerCase())),r=t?e[s.indexOf(t)]:null,i=n?e[s.indexOf(n)]:null;return{longitudeFieldName:r||e[s.indexOf(b.find((e=>s.includes(e))))],latitudeFieldName:i||e[s.indexOf(A.find((e=>s.includes(e))))]}}const A=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],b=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],I=/^\s*"([\S\s]*)"\s*$/,T=/""/g,C=[","," ",";","|","\t"];function*_(e,t,n){let s=0;for(;s<=e.length;){const r=e.indexOf(t,s),i=e.slice(s,r>-1?r:void 0);s+=i.length+t.length,n&&!i.trim()||(yield i)}}function E(e){const t=e.includes("\r\n")?"\r\n":"\n";return _(e,t,!0)}function O(e,t){return _(e,t,!1)}function v(e,t,n){e=e.trim(),t=t?.trim();const s=[],r=Array.from(new Set([n?.delimiter,...C])).filter((e=>null!=e));for(const n of r){const r=M(e,n).length,i=M(t,n).length??r;r>1&&s.push({weight:Math.min(r,i),delimiter:n})}const i=s.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of i){const s=N(q(e,t).names,n?.longitudeField,n?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:i[0],locationInfo:null}}function*R(e,t,n,s=()=>Object.create(null)){const r=E(e);r.next();let i="",o="",a=0,l=s(),u=0;e:for(const e of r){const r=O(e,n);for(const e of r)if(i+=o+e,o="",a+=k(e),a%2==0){if(a>0){const e=I.exec(i);if(!e){l=s(),u=0,i="",a=0;continue e}l[t[u]]=e[1].replaceAll(T,'"'),u++}else l[t[u]]=i,u++;i="",a=0}else o=n;0===a?(yield l,l=s(),u=0):o="\n"}}function q(e,t){const n=M(e,t).filter((e=>null!=e)),s=n.map((e=>(0,w.rS)(e)));for(let e=s.length-1;e>=0;e--)s[e]||(s.splice(e,1),n.splice(e,1));return{names:s,aliases:n}}function M(e,t){if(!e?.length)return[];const n=[];let s="",r="",i=0;const o=O(e,t);for(const e of o)if(s+=r+e,r="",i+=k(e),i%2==0){if(i>0){const e=I.exec(s);e&&n.push(e[1].replaceAll(T,'"'))}else n.push(s);s="",i=0}else r=t;return n}function k(e){let t=0,n=0;for(n=e.indexOf('"',n);n>=0;)t++,n=e.indexOf('"',n+1);return t}function D(e,t,n,s,r){const i=[],o=R(e,n,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<n.length;e++){const t=n[e],o=s[e];if(t===r.longitudeFieldName||t===r.latitudeFieldName)i.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(j(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}i.push({name:t,type:e,alias:o,length:(0,w._b)(e)})}}return i}function j(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=B(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,i.Cq)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const B=function(){const e=(0,F.B)(),t=new RegExp("^"+e.regexp+"$"),n=new RegExp("["+e.group+"\\s\\xa0]","g"),s=e.factor;return r=>{const i=t.exec(r);if(e.factor=s,!i)return NaN;let o=i[1];if(!i[1]){if(!i[2])return NaN;o=i[2],e.factor*=-1}return o=o.replace(n,"").replace(e.decimal,"."),+o*e.factor}}();function z(e){return JSON.parse(JSON.stringify(e))}var L=n(64714),P=n(95466),V=n(54218),G=n(56400),Q=n(16930);const U=(0,L.F0)("esriGeometryPoint"),$=["csv"],J=[0,0];class W{constructor(e,t){this.x=e,this.y=t}}class H{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[n]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),s=function(e,t){const n=t.parsingOptions||{},s={delimiter:n.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:n.latitudeField,longitudeFieldName:n.longitudeField}},r=s.layerDefinition={name:(0,u.e7)(t.url,$)||"csv",dateFieldsTimeReference:{timeZoneIANA:G.n$},drawingInfo:U,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:n.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:n.spatialReference||{wkid:4326}}},i=E(e),a=i.next().value?.trim(),l=i.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:p,locationInfo:c}=v(a,l,n);if(!p)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:n});if(!c)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:n});s.locationInfo=c,s.delimiter=p;const{names:d,aliases:f}=q(a,p),h=D(e,s.delimiter,d,f,s.locationInfo);if(n.fields?.length){const e=new P.A(n.fields);for(const t of h){const n=e.get(t.name);n&&Object.assign(t,n)}}if(!h.some((e=>"esriFieldTypeOID"===e.type&&(r.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};r.objectIdField=e.name,h.unshift(e)}r.fields=h;const y=new P.A(r.fields);if(s.locationInfo&&(s.locationInfo.latitudeFieldName=y.get(s.locationInfo.latitudeFieldName).name,s.locationInfo.longitudeFieldName=y.get(s.locationInfo.longitudeFieldName).name),r.timeInfo){const e=r.timeInfo;if(e.startTimeField){const t=y.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=y.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=y.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(r.timeInfo=null)}return s}(n,e);this._locationInfo=s.locationInfo,this._delimiter=s.delimiter,this._queryEngine=this._createQueryEngine(s);const r=await this._createFeatures(n);this._queryEngine.featureStore.addMany(r);const{fullExtent:i,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(s.layerDefinition.extent=i,a){const{start:e,end:t}=a;s.layerDefinition.timeInfo.timeExtent=[e,t]}return s}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(V.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,m.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:n}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:n}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:n}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const r=(0,u.An)(t);return(await(0,s.A)(r.path,{query:{...r.query,...n},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:n,extent:s,timeInfo:r}=e.layerDefinition,i=new g.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new x.do({fieldsIndex:P.A.fromLayerJSON({fields:n,dateFieldsTimeReference:{timeZoneIANA:G.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:r,objectIdField:t,spatialReference:s.spatialReference||{wkid:4326},featureStore:i})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:n}=this._locationInfo,{objectIdField:s,fieldsIndex:r,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=r.fields.filter((e=>e.name!==s)).map((e=>e.name));let m=0;const g={};for(const e of r.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,w.lD)(e);void 0!==t&&(g[e.name]=t)}const S=R(e,u,this._delimiter,(0,L.Vx)(g,s));for(const e of S){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[n]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[n]=u;for(const s in e)if(s!==t&&s!==n)if(r.isDateField(s))e[s]=(0,i._U)(e[s]);else if(r.isNumericField(s)){const t=B(e[s]);isNaN(t)?e[s]=null:e[s]=t}else null!=e[s]&&(e[s]=z(e[s]));e[s]=m,m++,a.push(new W(u,o)),l.push(e)}}if(!(0,d.aI)({wkid:4326},o))if((0,d.K8)(o))for(const e of a)[e.x,e.y]=(0,f.je)(e.x,e.y,J);else a=(0,p.projectMany)(c.g,a,Q.A.WGS84,o,null,null);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:n}=a[e],r=l[e];r[s]=e+1,x.push(new h.Om(new y.A([],[t,n]),r,null,r[s]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=B(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,S.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714:(e,t,n)=>{n.d(t,{F0:()=>l,Vx:()=>c,e2:()=>f,f:()=>h});var s=n(44208),r=n(4718),i=n(99352),o=n(4071),a=n(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${d(t)} = null;`;for(const t in e)n+=`this${d(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new s}catch(n){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function f(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},4071:(e,t,n)=>{n.d(t,{$:()=>s,P:()=>r});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},92300:(e,t,n)=>{n.d(t,{V:()=>i,X:()=>r});var s=n(65864);function r(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,n){const r=(0,s.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}},2272:(e,t,n)=>{n.d(t,{Dl:()=>o,jV:()=>i,lF:()=>a}),n(92602),n(70333);var s=n(4718),r=n(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,r.An)(e):(0,s.o8)(e)}function a(e,t,n){const s={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))s[r]=i.map((e=>a(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(n?.[r]);s[r]=t?e:JSON.stringify(e)}else s[r]=t?i:JSON.stringify(i);else s[r]=i}return s}n(926)},93470:(e,t,n)=>{n.d(t,{Cb:()=>i,HW:()=>p,JR:()=>r,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>s,nC:()=>u,yM:()=>o});const s=[252,146,31,255],r=[153,153,153,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);