@arcgis/core 5.2.0-next.124 → 5.2.0-next.126

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 (417) hide show
  1. package/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +3 -2
  2. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -0
  3. package/arcade/functions/string.js +1 -1
  4. package/arcgisGlobal.d.ts +2 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/05afa8c2b5929ce0545a.js +1 -0
  7. package/assets/esri/core/workers/chunks/0a20f84b5f004a77a9f9.js +1 -0
  8. package/assets/esri/core/workers/chunks/{97cd4145c016cf379120.js → 0a2b7c691a577cb3d189.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0ccd4200c5a2a5de6e16.js +1 -0
  10. package/assets/esri/core/workers/chunks/{064445e6f9512817ac87.js → 12b5a645c0987a0efe54.js} +2 -2
  11. package/assets/esri/core/workers/chunks/{bdf012e591a8476db467.js → 1406a884241809b62bff.js} +1 -1
  12. package/assets/esri/core/workers/chunks/168b45c5d8233f23793e.js +2 -0
  13. package/assets/esri/core/workers/chunks/17218d714cb07b607c2f.js +1 -0
  14. package/assets/esri/core/workers/chunks/1d040aa8951fff3141d9.js +1 -0
  15. package/assets/esri/core/workers/chunks/{ce08e3369641da0d7a27.js → 1dbb3e25e005a8220779.js} +2 -2
  16. package/assets/esri/core/workers/chunks/{c39ebd8d469f1e8bb61e.js → 25e212fe9a2ea37c9e81.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{216d8cb86548e92a8196.js → 2e3fd81653dc0d86456c.js} +1 -1
  18. package/assets/esri/core/workers/chunks/30604a29df320d7a4c6b.js +1 -0
  19. package/assets/esri/core/workers/chunks/3a40146568e6dd0b1828.js +1 -0
  20. package/assets/esri/core/workers/chunks/3ef367c9b7bf1588307d.js +1 -0
  21. package/assets/esri/core/workers/chunks/4327d2c39a660bd89da7.js +1 -0
  22. package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +1 -0
  23. package/assets/esri/core/workers/chunks/{45d87af48a21644590c2.js → 4716693eca44e8f89f5c.js} +1 -1
  24. package/assets/esri/core/workers/chunks/474d9541d387b31ad275.js +1 -0
  25. package/assets/esri/core/workers/chunks/{20e4277a4a6c57957202.js → 4d18451e0ea6ca54101a.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{26bc509a031788bfa678.js → 4f464047c6f6c9486efd.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{58528ccb7f72ae76d52b.js → 540f60e31b19d85e9371.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{44857a76be2c0ac65bb9.js → 55a560fd872f7463b33d.js} +1 -1
  29. package/assets/esri/core/workers/chunks/56acda1eed3a013430e2.js +1 -0
  30. package/assets/esri/core/workers/chunks/56e97b98dcb8a3f2bcb7.js +1 -0
  31. package/assets/esri/core/workers/chunks/{eb7f45736c852725b0bb.js → 57ab87e70ef85b9405f9.js} +122 -122
  32. package/assets/esri/core/workers/chunks/{59cd139712d919e6a738.js → 5adf2792416b22cd602f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/5fe5ef5ccf480634d159.js +1 -0
  34. package/assets/esri/core/workers/chunks/67678054342178b601cf.js +1 -0
  35. package/assets/esri/core/workers/chunks/67dcf9b873cb037b2647.js +1 -0
  36. package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +1 -0
  37. package/assets/esri/core/workers/chunks/6e8187a77846239ed112.js +2 -0
  38. package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +1 -0
  39. package/assets/esri/core/workers/chunks/{52744dfd430cd0c0edfb.js → 78abd6c42f39e6f6ffbb.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{5993db944b9e7825e0bc.js → 7926faab76a721a2e1c4.js} +1 -1
  41. package/assets/esri/core/workers/chunks/7d6da4e89aa951e6523f.js +1 -0
  42. package/assets/esri/core/workers/chunks/7dd94567833386dc74de.js +1 -0
  43. package/assets/esri/core/workers/chunks/{dc0816f064be576a2fa6.js → 7fcee3a1b900ddc9a5e3.js} +1 -1
  44. package/assets/esri/core/workers/chunks/806f96ad09e882be41af.js +1 -0
  45. package/assets/esri/core/workers/chunks/8190fcb1dd10ad20feed.js +1 -0
  46. package/assets/esri/core/workers/chunks/84db05e872dbf35c80a2.js +1 -0
  47. package/assets/esri/core/workers/chunks/85739ed6af0f0a3cb302.js +1 -0
  48. package/assets/esri/core/workers/chunks/{b22de8bf4a4a739bc36d.js → 97602019a1ccad22a03a.js} +1 -1
  49. package/assets/esri/core/workers/chunks/9ca98fffd43e63d5ade3.js +1 -0
  50. package/assets/esri/core/workers/chunks/9d6a96e4c7ccedcb0c13.js +1 -0
  51. package/assets/esri/core/workers/chunks/9ec04faad97be55309b8.js +1 -0
  52. package/assets/esri/core/workers/chunks/a08385ebf1715414c1a6.js +1 -0
  53. package/assets/esri/core/workers/chunks/{e22a013ec38989caf9de.js → a790fc6b22acf651574b.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{2f52ad525744b8793d49.js → a8258636096416c837a2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{770ca70d363184e39d60.js → ab8a1140bf31f46f8ebf.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{813dd84933b407c8fe86.js → b34305474a861aaf6ccb.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{dc923e50958b68a50014.js → b96358d475dc98034aa4.js} +1 -1
  58. package/assets/esri/core/workers/chunks/ba435cc73956d9c64a11.js +1 -0
  59. package/assets/esri/core/workers/chunks/c5b733c3a5b2680042a2.js +1 -0
  60. package/assets/esri/core/workers/chunks/{f0709c48daca93e759c8.js → c692e583e87af58f6d91.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{39985c51465b79ff0910.js → c77496c350004ee66eb2.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{9e5b30b907102bc0c201.js → cb7cb7d57c4e7f76600f.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{58a17fb3c0dd07c63d57.js → cfaba0470619786e1ef8.js} +2 -2
  64. package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +1 -0
  65. package/assets/esri/core/workers/chunks/d5f0fed415b5b155d57c.js +1 -0
  66. package/assets/esri/core/workers/chunks/{d3d48401462ef3bf0ad9.js → d5f72670634e73c0b53a.js} +1 -1
  67. package/assets/esri/core/workers/chunks/d6e914f6ed45ea59034e.js +1 -0
  68. package/assets/esri/core/workers/chunks/{5afc12671a9a1bb6c56c.js → dc52e036547612949d32.js} +1 -1
  69. package/assets/esri/core/workers/chunks/e0894a308c84d5c158b0.js +1 -0
  70. package/assets/esri/core/workers/chunks/e1ae83ff3e0225708d4d.js +1 -0
  71. package/assets/esri/core/workers/chunks/e35eb93c0fb1f6de8db0.js +1 -0
  72. package/assets/esri/core/workers/chunks/{df79c00b5ddbef7148a0.js → eaa7cb3ffa8c11706a09.js} +1 -1
  73. package/assets/esri/core/workers/chunks/eebbc86a15ae3adb5f38.js +1 -0
  74. package/assets/esri/core/workers/chunks/{eb780f2dafa14f776166.js → f71ec8a260405ed07958.js} +1 -1
  75. package/assets/esri/core/workers/chunks/fdbda3d2afea25142b86.js +1 -0
  76. package/assets/esri/libs/pdfjs/pdf.worker.mjs +4 -63051
  77. package/assets/esri/themes/base/_FocusRegionOverlayItem.scss +18 -0
  78. package/assets/esri/themes/base/_View.scss +4 -0
  79. package/assets/esri/themes/base/_core.scss +1 -0
  80. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -0
  81. package/assets/esri/themes/dark/main.css +1 -1
  82. package/assets/esri/themes/light/main.css +1 -1
  83. package/assets/esri/themes/light/view.css +1 -1
  84. package/assets/esri/widgets/Editor/t9n/messages.ar.json +1 -1
  85. package/assets/esri/widgets/Editor/t9n/messages.bg.json +1 -1
  86. package/assets/esri/widgets/Editor/t9n/messages.bs.json +1 -1
  87. package/assets/esri/widgets/Editor/t9n/messages.ca.json +1 -1
  88. package/assets/esri/widgets/Editor/t9n/messages.cs.json +1 -1
  89. package/assets/esri/widgets/Editor/t9n/messages.da.json +1 -1
  90. package/assets/esri/widgets/Editor/t9n/messages.de.json +1 -1
  91. package/assets/esri/widgets/Editor/t9n/messages.el.json +1 -1
  92. package/assets/esri/widgets/Editor/t9n/messages.en.json +1 -1
  93. package/assets/esri/widgets/Editor/t9n/messages.es.json +1 -1
  94. package/assets/esri/widgets/Editor/t9n/messages.et.json +1 -1
  95. package/assets/esri/widgets/Editor/t9n/messages.fi.json +1 -1
  96. package/assets/esri/widgets/Editor/t9n/messages.fr.json +1 -1
  97. package/assets/esri/widgets/Editor/t9n/messages.he.json +1 -1
  98. package/assets/esri/widgets/Editor/t9n/messages.hr.json +1 -1
  99. package/assets/esri/widgets/Editor/t9n/messages.hu.json +1 -1
  100. package/assets/esri/widgets/Editor/t9n/messages.id.json +1 -1
  101. package/assets/esri/widgets/Editor/t9n/messages.it.json +1 -1
  102. package/assets/esri/widgets/Editor/t9n/messages.ja.json +1 -1
  103. package/assets/esri/widgets/Editor/t9n/messages.ko.json +1 -1
  104. package/assets/esri/widgets/Editor/t9n/messages.lt.json +1 -1
  105. package/assets/esri/widgets/Editor/t9n/messages.lv.json +1 -1
  106. package/assets/esri/widgets/Editor/t9n/messages.nl.json +1 -1
  107. package/assets/esri/widgets/Editor/t9n/messages.no.json +1 -1
  108. package/assets/esri/widgets/Editor/t9n/messages.pl.json +1 -1
  109. package/assets/esri/widgets/Editor/t9n/messages.pt-BR.json +1 -1
  110. package/assets/esri/widgets/Editor/t9n/messages.pt-PT.json +1 -1
  111. package/assets/esri/widgets/Editor/t9n/messages.ro.json +1 -1
  112. package/assets/esri/widgets/Editor/t9n/messages.ru.json +1 -1
  113. package/assets/esri/widgets/Editor/t9n/messages.sk.json +1 -1
  114. package/assets/esri/widgets/Editor/t9n/messages.sl.json +1 -1
  115. package/assets/esri/widgets/Editor/t9n/messages.sr.json +1 -1
  116. package/assets/esri/widgets/Editor/t9n/messages.sv.json +1 -1
  117. package/assets/esri/widgets/Editor/t9n/messages.th.json +1 -1
  118. package/assets/esri/widgets/Editor/t9n/messages.tr.json +1 -1
  119. package/assets/esri/widgets/Editor/t9n/messages.uk.json +1 -1
  120. package/assets/esri/widgets/Editor/t9n/messages.vi.json +1 -1
  121. package/assets/esri/widgets/Editor/t9n/messages.zh-CN.json +1 -1
  122. package/assets/esri/widgets/Editor/t9n/messages.zh-HK.json +1 -1
  123. package/assets/esri/widgets/Editor/t9n/messages.zh-TW.json +1 -1
  124. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ar.json +1 -1
  125. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.bg.json +1 -1
  126. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.bs.json +1 -1
  127. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ca.json +1 -1
  128. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.cs.json +1 -1
  129. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.da.json +1 -1
  130. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.de.json +1 -1
  131. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.el.json +1 -1
  132. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.es.json +1 -1
  133. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.et.json +1 -1
  134. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.fi.json +1 -1
  135. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.fr.json +1 -1
  136. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.he.json +1 -1
  137. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.hr.json +1 -1
  138. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.hu.json +1 -1
  139. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.id.json +1 -1
  140. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.it.json +1 -1
  141. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ja.json +1 -1
  142. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ko.json +1 -1
  143. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.lt.json +1 -1
  144. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.lv.json +1 -1
  145. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.nl.json +1 -1
  146. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.no.json +1 -1
  147. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pl.json +1 -1
  148. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pt-BR.json +1 -1
  149. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pt-PT.json +1 -1
  150. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ro.json +1 -1
  151. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ru.json +1 -1
  152. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sk.json +1 -1
  153. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sl.json +1 -1
  154. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sr.json +1 -1
  155. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sv.json +1 -1
  156. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.th.json +1 -1
  157. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.tr.json +1 -1
  158. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.uk.json +1 -1
  159. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.vi.json +1 -1
  160. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-CN.json +1 -1
  161. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-HK.json +1 -1
  162. package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-TW.json +1 -1
  163. package/chunks/GaussianSplatColorComposition.glsl.js +2 -0
  164. package/chunks/GaussianSplatEmissionComposition.glsl.js +11 -0
  165. package/chunks/GlobalIllumination.glsl.js +9 -9
  166. package/chunks/GlobalIlluminationBlur.glsl.js +8 -8
  167. package/chunks/HeatmapDensity.glsl.js +5 -5
  168. package/chunks/Pattern.glsl.js +30 -30
  169. package/chunks/RibbonLine.glsl.js +19 -19
  170. package/chunks/earcut.js +1 -1
  171. package/chunks/portal.js +1 -1
  172. package/config.js +1 -1
  173. package/core/accessorSupport/types.d.ts +5 -1
  174. package/graphic/MapImageGraphicOrigin.js +1 -1
  175. package/graphic/TileGraphicOrigin.js +1 -1
  176. package/interfaces.d.ts +8 -0
  177. package/kernel.js +1 -1
  178. package/layers/OrientedImageryLayer.js +1 -1
  179. package/layers/ParquetLayer.d.ts +3 -2
  180. package/layers/ParquetLayer.js +1 -1
  181. package/layers/SceneLayer.js +1 -1
  182. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  183. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +2 -2
  184. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  185. package/layers/geospatialPDF/LGIDictMapFrame.js +1 -1
  186. package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
  187. package/layers/geospatialPDF/geospatialPDFParserUtils.js +2 -0
  188. package/layers/geospatialPDF/projectionToWKTUtils.js +2 -0
  189. package/layers/geospatialPDF/renderExtentUtils.js +1 -1
  190. package/layers/geospatialPDF/sharedUtils.js +1 -1
  191. package/layers/mixins/ArcGISImageService.js +1 -1
  192. package/layers/mixins/TemporalLayer.js +1 -1
  193. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  194. package/layers/orientedImagery/transformations/utils.js +1 -1
  195. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  196. package/layers/raster/types.d.ts +6 -0
  197. package/layers/support/TimeInfo.js +1 -1
  198. package/layers/support/TimeSeriesCalculation.d.ts +32 -0
  199. package/layers/support/TimeSeriesCalculation.js +2 -0
  200. package/layers/support/TimeSeriesInfo.d.ts +19 -0
  201. package/layers/support/TimeSeriesInfo.js +1 -1
  202. package/layers/support/commonProperties.js +1 -1
  203. package/layers/support/layersMapping.js +1 -1
  204. package/layers/support/timeSeriesUtils.d.ts +25 -1
  205. package/layers/support/timeSeriesUtils.js +1 -1
  206. package/layers/types.d.ts +1 -0
  207. package/package.json +2 -2
  208. package/popup/FeatureContentCollection.d.ts +12 -2
  209. package/popup/FeatureContentCollection.js +1 -1
  210. package/popup/types.d.ts +14 -3
  211. package/portal/schemas/definitions.js +1 -1
  212. package/portal/schemas/sceneLayerItem.js +1 -1
  213. package/renderers/support/AuthoringInfo.d.ts +8 -1
  214. package/renderers/support/AuthoringInfo.js +1 -1
  215. package/renderers/support/AuthoringInfoVisualVariable.d.ts +8 -1
  216. package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
  217. package/rest/imageService/fetchRasterInfo.js +1 -1
  218. package/rest/knowledgeGraph/DataModel.js +1 -1
  219. package/smartMapping/renderers/color.d.ts +12 -0
  220. package/smartMapping/renderers/color.js +1 -1
  221. package/smartMapping/renderers/opacity.d.ts +6 -0
  222. package/smartMapping/renderers/opacity.js +1 -1
  223. package/smartMapping/renderers/size.d.ts +12 -0
  224. package/smartMapping/renderers/size.js +1 -1
  225. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  226. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  227. package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
  228. package/smartMapping/renderers/type.d.ts +6 -0
  229. package/smartMapping/renderers/type.js +1 -1
  230. package/smartMapping/renderers/univariateColorSize.d.ts +6 -0
  231. package/smartMapping/renderers/univariateColorSize.js +1 -1
  232. package/support/revision.js +1 -1
  233. package/symbols/support/gfxUtils.js +1 -1
  234. package/symbols/support/previewSymbol3D.js +1 -1
  235. package/symbols/support/svgUtils.js +1 -1
  236. package/time/timeZoneUtils.js +1 -1
  237. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  238. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +8 -0
  239. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  240. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  241. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +8 -0
  242. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
  243. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +3 -2
  244. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  245. package/views/3d/analysis/Dimension/DimensionController.js +1 -1
  246. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  247. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +3 -2
  248. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  249. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  250. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  251. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  252. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  253. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  254. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -0
  255. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  256. package/views/3d/input/handlers/DragRotate.js +1 -1
  257. package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
  258. package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
  259. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  260. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  261. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  262. package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +2 -0
  263. package/views/3d/navigation/Navigation3D.d.ts +7 -0
  264. package/views/3d/navigation/Navigation3D.js +1 -1
  265. package/views/3d/navigation/modes/navigationModeUtils.d.ts +32 -0
  266. package/views/3d/navigation/modes/navigationModeUtils.js +2 -0
  267. package/views/3d/state/Constraints.js +1 -1
  268. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  269. package/views/3d/state/controllers/RotateController.js +1 -1
  270. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  271. package/views/3d/support/engineContent/line.js +1 -1
  272. package/views/3d/support/planarDistanceToGroundRatio.js +2 -0
  273. package/views/3d/terrain/OverlayManager.js +1 -1
  274. package/views/3d/terrain/OverlayRenderer.js +1 -1
  275. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +13 -13
  276. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +2 -2
  277. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  278. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  279. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  280. package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +1 -1
  281. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  282. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  283. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  284. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  285. package/views/3d/webgl-engine/shaders/GaussianSplatColorComposition.glsl.js +2 -0
  286. package/views/3d/webgl-engine/shaders/GaussianSplatColorCompositionTechnique.js +2 -0
  287. package/views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js +1 -1
  288. package/views/3d/webgl-engine/shaders/{GaussianSplatComposition.glsl.js → GaussianSplatEmissionComposition.glsl.js} +1 -1
  289. package/views/3d/webgl-engine/shaders/GaussianSplatEmissionCompositionTechnique.js +2 -0
  290. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  291. package/views/DOMContainer.d.ts +27 -0
  292. package/views/DOMContainer.js +1 -1
  293. package/views/PopupView.d.ts +1 -1
  294. package/views/View.d.ts +10 -1
  295. package/views/View.js +1 -1
  296. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  297. package/views/analysis/LengthDimensionResult.d.ts +4 -1
  298. package/views/draw/support/managers/TooltipManager.js +1 -1
  299. package/views/input/types.d.ts +46 -0
  300. package/views/interactive/options/SnappingOptions.d.ts +4 -2
  301. package/views/interactive/options/SnappingOptions.js +1 -1
  302. package/views/interactive/options/ViewOptions.d.ts +18 -0
  303. package/views/interactive/options/bindViewToolOptions.js +2 -0
  304. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  305. package/views/interactive/snapping/allLayerSnapping.js +1 -1
  306. package/views/overlay/FocusRegionOverlayItem.js +2 -0
  307. package/views/selection/SelectionOperation.d.ts +27 -1
  308. package/views/selection/types.d.ts +8 -20
  309. package/views/webgl/renderState.js +1 -1
  310. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -0
  311. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  312. package/widgets/AreaMeasurement2D.js +1 -1
  313. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
  314. package/widgets/BasemapLayerList.d.ts +1 -0
  315. package/widgets/BatchAttributeForm/expressions/types.d.ts +1 -0
  316. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -0
  317. package/widgets/BatchAttributeForm/types.d.ts +5 -1
  318. package/widgets/BatchAttributeForm.d.ts +1 -0
  319. package/widgets/Bookmarks/BookmarksViewModel.d.ts +1 -0
  320. package/widgets/Bookmarks.d.ts +1 -0
  321. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +1 -0
  322. package/widgets/CatalogLayerList.d.ts +1 -0
  323. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -0
  324. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  325. package/widgets/DistanceMeasurement2D.js +1 -1
  326. package/widgets/Editor.d.ts +1 -0
  327. package/widgets/Editor.js +1 -1
  328. package/widgets/FeatureForm.d.ts +1 -0
  329. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +37 -1
  330. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  331. package/widgets/FeatureTable/support/FeatureStore.d.ts +26 -2
  332. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  333. package/widgets/FeatureTable.d.ts +12 -1
  334. package/widgets/FeatureTable.js +1 -1
  335. package/widgets/FeatureTemplates.d.ts +1 -0
  336. package/widgets/Features/FeaturesViewModel.d.ts +1 -0
  337. package/widgets/Features.d.ts +2 -1
  338. package/widgets/HistogramRangeSlider.d.ts +1 -0
  339. package/widgets/Home/HomeViewModel.d.ts +1 -0
  340. package/widgets/Home.d.ts +1 -0
  341. package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
  342. package/widgets/LayerList.d.ts +1 -0
  343. package/widgets/Locate/LocateViewModel.d.ts +1 -0
  344. package/widgets/Locate.d.ts +1 -0
  345. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  346. package/widgets/OrientedImageryViewer/components/Alert.js +1 -1
  347. package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
  348. package/widgets/OrientedImageryViewer/types.d.ts +4 -1
  349. package/widgets/OrientedImageryViewer.d.ts +4 -1
  350. package/widgets/OrientedImageryViewer.js +1 -1
  351. package/widgets/Popup/types.d.ts +7 -0
  352. package/widgets/Popup.d.ts +1 -0
  353. package/widgets/Print/PrintViewModel.d.ts +1 -0
  354. package/widgets/Print.d.ts +1 -0
  355. package/widgets/Search.d.ts +1 -0
  356. package/widgets/Sketch.d.ts +1 -0
  357. package/widgets/Slider.d.ts +4 -0
  358. package/widgets/TimeSlider.d.ts +1 -0
  359. package/widgets/Track/TrackViewModel.d.ts +1 -0
  360. package/widgets/Track.d.ts +1 -0
  361. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +1 -0
  362. package/widgets/UtilityNetworkTrace.d.ts +1 -0
  363. package/widgets/ValuePicker/types.d.ts +1 -0
  364. package/widgets/ValuePicker.d.ts +1 -0
  365. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +1 -0
  366. package/widgets/support/SelectionList/types.d.ts +2 -0
  367. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +2 -1
  368. package/assets/esri/core/workers/chunks/0148cb611bf7c8c5fe8a.js +0 -1
  369. package/assets/esri/core/workers/chunks/033debcbf6b3683dc4fe.js +0 -2
  370. package/assets/esri/core/workers/chunks/0acc754907395e83bbc6.js +0 -1
  371. package/assets/esri/core/workers/chunks/1c38ce72160d5a4e4b3d.js +0 -1
  372. package/assets/esri/core/workers/chunks/1e46703cb566c25458ad.js +0 -1
  373. package/assets/esri/core/workers/chunks/23279303cd7698314c56.js +0 -1
  374. package/assets/esri/core/workers/chunks/25c90092def215949db9.js +0 -1
  375. package/assets/esri/core/workers/chunks/29ae19206bbeb480be0f.js +0 -1
  376. package/assets/esri/core/workers/chunks/2f829321bfbd3bacd64f.js +0 -1
  377. package/assets/esri/core/workers/chunks/38890ac5917942374ab8.js +0 -1
  378. package/assets/esri/core/workers/chunks/463d69f596d1d34ef275.js +0 -2
  379. package/assets/esri/core/workers/chunks/475906b079f4f1ddacf2.js +0 -1
  380. package/assets/esri/core/workers/chunks/49affbed22e201f7c32b.js +0 -1
  381. package/assets/esri/core/workers/chunks/4c4ba466e23159991322.js +0 -1
  382. package/assets/esri/core/workers/chunks/4f58e0322707f63f5bf2.js +0 -1
  383. package/assets/esri/core/workers/chunks/606ac9358f508bda94f2.js +0 -1
  384. package/assets/esri/core/workers/chunks/724ea2e2843e6dac0a90.js +0 -1
  385. package/assets/esri/core/workers/chunks/7285a37cd5359aa4bac5.js +0 -1
  386. package/assets/esri/core/workers/chunks/753d1ff177ecee8e2377.js +0 -1
  387. package/assets/esri/core/workers/chunks/781fa83e8063b8f685dc.js +0 -1
  388. package/assets/esri/core/workers/chunks/78c1b75b1a8937eaa3cd.js +0 -1
  389. package/assets/esri/core/workers/chunks/7ff536284942c5284a16.js +0 -1
  390. package/assets/esri/core/workers/chunks/83c7c4218bc6ba2f16ee.js +0 -1
  391. package/assets/esri/core/workers/chunks/8984d02c0ce828fd223a.js +0 -1
  392. package/assets/esri/core/workers/chunks/8e102a2e134ce6ce0724.js +0 -1
  393. package/assets/esri/core/workers/chunks/92c852700ad1006f1e76.js +0 -1
  394. package/assets/esri/core/workers/chunks/9af36ee6a0df224859bc.js +0 -1
  395. package/assets/esri/core/workers/chunks/a3ab53b534e2872131be.js +0 -1
  396. package/assets/esri/core/workers/chunks/ac7af417ebf7721d7400.js +0 -1
  397. package/assets/esri/core/workers/chunks/aed479c14d93955f4798.js +0 -1
  398. package/assets/esri/core/workers/chunks/bb5ed2a796a45c41b0b4.js +0 -1
  399. package/assets/esri/core/workers/chunks/be52c319a0a81ce1ba36.js +0 -1
  400. package/assets/esri/core/workers/chunks/c0ec87800faf99cbd8bd.js +0 -1
  401. package/assets/esri/core/workers/chunks/c3008b20cb5fd38bd900.js +0 -1
  402. package/assets/esri/core/workers/chunks/ca5a4f62b09cc8579dc0.js +0 -1
  403. package/assets/esri/core/workers/chunks/d090baaa974e1e83fa44.js +0 -1
  404. package/assets/esri/core/workers/chunks/d25210574168ead2f813.js +0 -1
  405. package/assets/esri/core/workers/chunks/e4e1db4e9e5f13167401.js +0 -1
  406. package/assets/esri/core/workers/chunks/e9f8325a4cf89ae816cc.js +0 -1
  407. package/assets/esri/core/workers/chunks/ed7d4e8725aaa0ca4589.js +0 -1
  408. package/chunks/GaussianSplatComposition.glsl.js +0 -22
  409. package/layers/geospatialPDF/GeospatialPDFParserUtils.js +0 -2
  410. package/layers/geospatialPDF/Projection.js +0 -2
  411. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechnique.js +0 -2
  412. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +0 -2
  413. /package/assets/esri/core/workers/chunks/{064445e6f9512817ac87.js.LICENSE.txt → 12b5a645c0987a0efe54.js.LICENSE.txt} +0 -0
  414. /package/assets/esri/core/workers/chunks/{033debcbf6b3683dc4fe.js.LICENSE.txt → 168b45c5d8233f23793e.js.LICENSE.txt} +0 -0
  415. /package/assets/esri/core/workers/chunks/{463d69f596d1d34ef275.js.LICENSE.txt → 1dbb3e25e005a8220779.js.LICENSE.txt} +0 -0
  416. /package/assets/esri/core/workers/chunks/{ce08e3369641da0d7a27.js.LICENSE.txt → 6e8187a77846239ed112.js.LICENSE.txt} +0 -0
  417. /package/assets/esri/core/workers/chunks/{58a17fb3c0dd07c63d57.js.LICENSE.txt → cfaba0470619786e1ef8.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7320],{6797(e,t,r){r.d(t,{Ui:()=>y});var i=r(69622),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),y=i.filter(e=>!n.includes(e)),d=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,y).sort(),h=c(e);if(h&&o.has(h)&&d.length)return{type:"complete",oldValue:e,newValue:t};let g;const f=a(e)&&a(t);for(const i of d){const n=u(e,i),s=u(t,i);let o;if((f||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?p(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=g?g.diff[i]=o:g={type:"partial",diff:{[i]:o}})}}return g}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},44794(e,t,r){r.d(t,{v:()=>a});var i=r(4718),n=r(62788),s=r(95488);class o{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=i.gh){return new o(e,t)}},99680(e,t,r){r.r(t),r.d(t,{default:()=>ae});var i=r(32198),n=r(37838),s=r(69540),o=r(7762),a=r(51447),l=r(49186),u=r(44208),c=r(53966),p=r(25728),y=r(93637),d=r(36708),h=r(84952),g=r(10107),f=r(64108),m=r(43937),w=r(5443),v=r(16930),b=r(55156),_=r(60950),C=r(89808),x=r(99959);const P=Symbol("isParquetGraphicOrigin");var S;class M extends x.A{get[(S=P,_.ym)](){return this.layer}get[b.e](){return this.layer}get[C.Q](){return this.layer}constructor(e){super(),this[S]=!0,this.type="parquet",this.layer=e}get id(){return this.layer.id}}var A=r(4146),R=r(65529),q=r(92474),F=r(17676),E=r(83027),L=r(42760),T=r(22671);let I=class extends((0,R.Zt)(q.x_)){constructor(e){super(e),this.type="parquet"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._initialize(t)),this.addHandles([(0,d.wB)(()=>this.layer.data,async e=>{if(e)try{await this._proxy.updateFileProvider(await(0,L.Dt)(e))}catch{}}),(0,d.wB)(()=>this.layer.customParameters,e=>this._setCustomParameters(e))]),Promise.resolve(this)}async reload(e){const t=await this._createLoadParameters(e);return this._proxy.reload(t)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async getDiagnosticsSnapshot(){return await this.load(),this._proxy.getDiagnosticsSnapshot()}async getColumnIndex(e){return await this.load(),this._proxy.getColumnIndex(e)}async getOffsetIndex(e){return await this.load(),this._proxy.getOffsetIndex(e)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._proxy.queryFeatures(e.toJSON(),{signal:t?.signal})}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,{signal:t?.signal});return T.A.fromJSON(r)}async queryObjectIds(e,t){return await this._proxy.queryObjectIds(e.toJSON(),{signal:t?.signal})}async queryFeatureCount(e,t){return this._proxy.queryFeatureCount(e.toJSON(),{signal:t?.signal})}async queryExtent(e,t){if(null==this.layer.geometryEncoding)return c.A.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(e.toJSON(),{signal:t?.signal});return{count:r.count,extent:w.A.fromJSON(r.extent)}}async _initialize(e){const t={onSourceChange:()=>this.emit("source-changed"),onRangeRead:e=>this.emit("range-read",e)};this._connection=await(0,E.h)("ParquetSourceWorker",{strategy:"dedicated",signal:e,registryTarget:this,client:t}),(0,F.Te)(e),this._proxy=this._connection.createInvokeProxy();const r=await this._createLoadParameters(e),{layerDefinition:i,capabilities:n}=await this._proxy.load(r);(0,F.Te)(e),this.sourceJSON=i,this.capabilities=n}async _createLoadParameters(e){if(!this.layer.data)throw new l.A("parquet:missing-data","A data source must be specified",this.layer);const t=await(0,L.Dt)(this.layer.data,{signal:e});return(0,F.Te)(e),{provider:t,fields:this.layer.fields?.map(e=>e.toJSON()),geometryType:this.layer.geometryType?(0,L.sA)(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters}}_setCustomParameters(e){this._proxy.setCustomParameters(e).catch(()=>{c.A.getLogger(this).warn("Failed to update customParameters")})}_queryStream(e,t){return this._proxy.queryStream(e,t)}_getStreamNextFeatures(e,t){return this._proxy.getStreamNextFeatures(e,t)}};(0,i.Cg)([(0,g.MZ)()],I.prototype,"type",void 0),(0,i.Cg)([(0,g.MZ)({constructOnly:!0})],I.prototype,"layer",void 0),(0,i.Cg)([(0,g.MZ)()],I.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,g.MZ)()],I.prototype,"capabilities",void 0),I=(0,i.Cg)([(0,f.$)("esri.layers.graphics.sources.ParquetSource")],I);var O=r(63074),Z=r(69208),j=r(10497),N=r(87718),z=r(56658),U=r(34287),D=r(32756),V=r(54310),$=r(25036),J=r(10873),G=r(29005),B=r(20437),k=r(17036),K=r(30524),Q=r(9075),W=r(34582),H=r(46499),X=r(39383),Y=r(56370),ee=r(89160),te=r(41214),re=r(97552),ie=r(30291);const ne=(0,k.p)(),se="__OBJECTID",oe={types:{key:"type",base:null,typeMap:{wkb:W.A,location:Q.A}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let ae=class extends((0,z.J)((0,N.F)((0,O.dM)((0,D.fY)((0,j.z)((0,$.j)((0,V.J)((0,U.q)((0,p.M)((0,Z.d)((0,s.OU)(A.A)))))))))))){constructor(e){super(e),this._emptyUrls=new o.A,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new M(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=se,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!(0,u.A)("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type="parquet",this.data=null}initialize(){this.addHandles((0,d.on)(()=>this.source,"source-changed",()=>{this.emit("refresh",{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,i){const n=e.filter(e=>!(e.name===se&&"oid"===e.type)).map(e=>e.toJSON(i));(0,y.sM)(r,n,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){(0,K.yp)(e,this.fieldsIndex),this._set("renderer",e)}get title(){let e=this._get("title");if(e&&"defaults"!==this.originOf("title"))return e;switch(this.data?.type){case"files":{const t=this.data.urls?.at(0);e=t?(0,h.e7)(t,["parquet"]):null;break}case"portal-item":e=this.data.portalItem?.title}return e||"Parquet"}set title(e){this._set("title",e)}writeData(e,t,r,i){if(!e)return;if("portal-item"===e.type&&"Parquet Feature Layer"!==e.portalItem?.type)return void i.messages?.push(new l.A("parquet-layer:unsupported-data",`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));const n=e.write({},i);n&&(t.source=n)}get urls(){return"files"===this.data?.type?this.data.urls:this._emptyUrls}set urls(e){(0,a.Lx)(c.A.getLogger(this),"urls",{replacement:"data",version:"5.1",warnOnce:!0}),this.data=new Y.A({urls:this._normalizeUrls(e)})}createPopupTemplate(e){return(0,ie.tn)(this,e)}createQuery(){const e=new re.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){const t=new I({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),i=this.graphicOrigin;if(r?.features)for(const e of r.features)e.layer=e.sourceLayer=this,e.origin=i;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async hasDataChanged(){if("portal-item"===this.data?.type){const e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return re.A.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new o.A(e):e??new o.A}async _load(e){"portal-item"===this.data?.type&&await this.data.portalItem.load();const t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),(0,K.yp)(this.renderer,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=v.A.WGS84)}};(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1,write:!1}})],ae.prototype,"capabilities",null),(0,i.Cg)([(0,g.MZ)({type:String})],ae.prototype,"copyright",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ae.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ae.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,g.MZ)({type:Boolean})],ae.prototype,"returnM",void 0),(0,i.Cg)([(0,g.MZ)({type:Boolean})],ae.prototype,"returnZ",void 0),(0,i.Cg)([(0,g.MZ)()],ae.prototype,"displayOptimization",void 0),(0,i.Cg)([(0,g.MZ)({type:[B.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],ae.prototype,"fields",void 0),(0,i.Cg)([(0,m.K)("fields")],ae.prototype,"writeFields",null),(0,i.Cg)([(0,g.MZ)(ne.fieldsIndex)],ae.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,g.MZ)(oe)],ae.prototype,"geometryEncoding",void 0),(0,i.Cg)([(0,g.MZ)({type:w.A,json:{name:"extent"}})],ae.prototype,"fullExtent",void 0),(0,i.Cg)([(0,g.MZ)({type:L.ye.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:L.ye.read},write:{writer:L.ye.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:L.ye.read}}}}})],ae.prototype,"geometryType",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,clonable:!1})],ae.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,g.MZ)(J.kF)],ae.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,g.MZ)({type:[H.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:X.w},write:!0}})],ae.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,g.MZ)(J.fV)],ae.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,g.MZ)()],ae.prototype,"file",void 0),(0,i.Cg)([(0,g.MZ)({type:String,readOnly:!0})],ae.prototype,"objectIdField",void 0),(0,i.Cg)([(0,g.MZ)({type:["ParquetLayer"]})],ae.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,g.MZ)(ne.outFields)],ae.prototype,"outFields",void 0),(0,i.Cg)([(0,g.MZ)(J.M6)],ae.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,g.MZ)({types:te.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],ae.prototype,"renderer",null),(0,i.Cg)([(0,g.MZ)({type:I,readOnly:!0,cast:null,json:{read:!1}})],ae.prototype,"source",void 0),(0,i.Cg)([(0,g.MZ)({type:v.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],ae.prototype,"spatialReference",void 0),(0,i.Cg)([(0,g.MZ)({type:[G.A]})],ae.prototype,"templates",void 0),(0,i.Cg)([(0,g.MZ)()],ae.prototype,"title",null),(0,i.Cg)([(0,g.MZ)({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),(0,i.Cg)([(0,g.MZ)({types:{key:"type",base:null,typeMap:{files:Y.A,"portal-item":ee.A}},json:{name:"source",origins:{"web-map":{write:{target:"source",ignoreOrigin:!0}}}}})],ae.prototype,"data",void 0),(0,i.Cg)([(0,m.K)("web-map","data")],ae.prototype,"writeData",null),(0,i.Cg)([(0,g.MZ)({type:o.A.ofType(String),json:{read:!1,write:!1}})],ae.prototype,"urls",null),ae=(0,i.Cg)([(0,f.$)("esri.layers.ParquetLayer")],ae)},24460(e,t,r){function i(e){const{minValue:t,maxValue:r,numValues:i,nullCount:n,distinctCount:s}=e;return null!=i&&n===i?{type:"null-only",nullCount:n,distinctCount:s}:"number"==typeof t&&Number.isFinite(t)&&"number"==typeof r&&Number.isFinite(r)&&t<=r?{type:"bounds",minValue:t,maxValue:r,nullCount:n,distinctCount:s}:null!=t||null!=r||null!=s||null!=n?{type:"unknown",nullCount:n,distinctCount:s}:null}function n(e){const t=new Map;for(const r of e.files){const e=s(r);t.set(r.name,e)}return t}function s(e){const t=new Map;for(const r of e.statistics??[]){const e=r.column.at(-1);if(null==e)continue;const n=i({minValue:r.minValue,maxValue:r.maxValue,numValues:null,nullCount:r.nullCount??0,distinctCount:r.distinctCount??null});null!=n&&t.set(e,n)}return new a(0,0,t)}function o(e){const t=e.minValue(),r=e.maxValue(),n=e.numValues(),s=e.distinctCount()??null;return i({minValue:t,maxValue:r,numValues:n,nullCount:e.nullCount()??null,distinctCount:s})}r.d(t,{Hk:()=>o,MB:()=>a,t8:()=>n});class a{static fromFile(e){const t=e.numRows(),r=e.byteLength(),i=new Map;for(const t of e.getColumnDescriptors()){const e=o(t);null!=e&&i.set(t.name(),e),t.free()}return new a(t,r,i)}constructor(e,t,r){this.rowCount=e,this.byteSize=t,this.statistics=r}}},95031(e,t,r){r.d(t,{M:()=>x});var i=r(56507),n=r(32198),s=r(49186),o=r(65529),a=r(44208),l=r(563),u=r(84952),c=r(53929),p=r(24460);class y{static async create(e,t,r,i,n){if(!n){const n=await(0,c.DV)(r,{geometryInfo:e,provider:t}),s=p.MB.fromFile(n);return new y(e,t,r,i,s,Promise.resolve(n))}return new y(e,t,r,i,n,null)}constructor(e,t,r,i,n,s){this._geometryInfo=e,this._provider=t,this.url=r,this.id=i,this.statistics=n,this._file=s}destroy(){null!=this._file&&this._file.then(e=>e.free())}get file(){return null==this._file&&(this._file=(0,c.DV)(this.url,{geometryInfo:this._geometryInfo,provider:this._provider})),this._file}async getDiagnosticsSnapshot(){return{...(await this.file).diagnosticsSnapshot(),fileId:this.id,fileName:this.url}}async getColumnIndex(e,t){return(await this.file).columnIndex(e,t)}async getOffsetIndex(e,t){return(await this.file).offsetIndex(e,t)}}const d="_spatial.json",h=new l.QueueProcessor({concurrency:12,process:async e=>{const{data:t}=await(0,i.A)(e.url,e.options);return t}});let g=1;class f{constructor(e,t=()=>{}){this._geometryInfo=e,this._getCustomParameters=t,this.events=new o.bk}async destroy(){await this.clear()}async clear(){if(this._infos){const e=await this._infos;for(const t of e.values())t.destroy();e.clear(),this._infos=null}}async getMetadata(){const e={stack:[],error:void 0,hasError:!1};try{const t=(await this._getParquetFileNames()).at(0);if(!t)return null;const r=(0,n.mS)(e,await(0,c.DV)(t,{provider:this}),!1);return(0,c._6)(r)}catch(t){e.error=t,e.hasError=!0}finally{(0,n.hk)(e)}}getGeometryInfo(){return this._geometryInfo}async getFiles(){const e=await this._getInfoMap();return Array.from(e.values())}async updateGeometryInfo(e){if(this._geometryInfo)throw new Error("GeometryInfo already set");await this.clear(),this._geometryInfo=e}async fetchLength(e){const{byteLength:t,cacheTag:r}=await this._fetchLengthAndTag(e);if(!(0,a.A)("parquetlayer-cache-enabled"))return t;try{await this._createOrResetCache(e,r)}catch(e){}return t}async fetchRange(e,t,r,i){const n={fileId:e,requestId:g++,range:{start:t,end:r+1}};this.events.emit("rangeRead",{...n,phase:"start"});try{const s=await this._fetchRangeWithCache(e,t,r,i);return this.events.emit("rangeRead",{...n,phase:"complete"}),s}catch(e){throw this.events.emit("rangeRead",{...n,phase:"error"}),e}}_getCacheFileName(e){return e}async _requestStatistics(e){const{data:t}=await(0,i.A)(e,{responseType:"json",query:this._getCustomParameters()});return t}async _fetchRange(e,t,r,i){const n={url:e,options:{responseType:"array-buffer",query:this._getCustomParameters()??{},cacheMode:"no-store",useQueue:!0,headers:{range:`bytes=${t}-${r}`}}},o=await h.push(n),a=r-t+1;if(o.byteLength!==a)throw new s.A("InvalidRangeRequest",`request returned ${o.byteLength} bytes for range ${t}-${r}, expected ${a}.`);return o}async _fetchLengthAndTag(e){if((0,u.w8)(e)){const{data:t}=await(0,i.A)(e,{responseType:"blob"});return{byteLength:t.size,cacheTag:null}}const t=await this._requestHead(e),r=t.headers.get("Content-Length");if(null==r)throw new Error("Unable to parse content length");const n=t.headers.get("etag")??t.headers.get("Last-Modified");return{byteLength:parseInt(r,10),cacheTag:n}}async _getInfoMap(){return this._infos||(this._infos=this._fetchParquetFiles()),this._infos}async _updateParquetFileInfos(e){const t=await this._getInfoMap(),r=new Set(e);for(const e of r)if(!t.get(e)){const r=t.size,i=await y.create(this.getGeometryInfo(),this,e,r,null);t.set(e,i)}for(const e of t.keys())if(!r.has(e))throw new Error("Deletion not supported")}async _getFileStatistics(e){this._statistics||(this._statistics=this._fetchStatistics());const t=await this._statistics,r=function(e){return e.split(/[?#]/)[0].split("/").at(-1)??e}(e);return t.get(r)}async _fetchParquetFiles(){const e=(await this._getParquetFileNames()).map(async(e,t)=>{const r=t,i=await this._getFileStatistics(e);return y.create(this.getGeometryInfo(),this,e,r,i)}),t=await Promise.all(e),r=new Map;for(const e of t)r.set(e.url,e);return r}async _fetchStatistics(){const e=await this._getStatisticsFileName();if(null==e)return new Map;const t=await this._resolveFileUrl(e),r=await this._requestStatistics(t);return(0,p.t8)(r)}async _requestHead(e){const{data:t}=await(0,i.A)(e,{responseType:"native",method:"head",query:this._getCustomParameters()});return t}async _openCache(e){return caches.open(this._getCacheName(e))}async _fetchRangeWithCache(e,t,r,i){if(!(0,a.A)("parquetlayer-cache-enabled"))return this._fetchRange(e,t,r,i);const n=new URL(this._getCacheFileName(e));n.searchParams.append("range",`${t}-${r}`);try{const s=await this._openCache(e),o=await s.match(n);if(o)return await o.arrayBuffer();const a=await this._fetchRange(e,t,r,i);return await s.put(n,new Response(a,{headers:{"Content-Type":"application/octet-stream","Content-Length":a.byteLength.toString()}})),a}catch(n){return this._fetchRange(e,t,r,i)}}_getCacheName(e){return`parquet.v1:${this._getCacheFileName(e)}`}async _createOrResetCache(e,t){const r=this._getCacheName(e),i=new URL(this._getCacheFileName(e));if(i.searchParams.append("metadata","true"),null==t)return void await caches.delete(r);let n=await caches.open(r);const s=await n.match(i),o=await(s?.json());o?.tag!==t&&(await caches.delete(r),n=await caches.open(r));const a=JSON.stringify({tag:t});await n.put(i,new Response(a,{headers:{"Content-Type":"application/json","Content-Length":a.length.toString()}}))}}function m(e){const t=e.split(/[?#]/)[0];return t===d||t.endsWith(d)}var w=r(39131);class v extends f{constructor(e,t,r){super(t,r),this._schema=e,this._isAgol=!!(0,w.py)(this._schema.itemUrl)}async update(e){throw new Error("Unsupported")}async _getParquetFileNames(){return[`${this._baseUrl}/data`]}async _getStatisticsFileName(){return null}_getCacheFileName(e){return`${this._baseUrl}/data`}async _resolveFileUrl(e){return this._resolvedUrl||(this._resolvedUrl=this._fetchResolvedUrl()),this._resolvedUrl}async _fetchLengthAndTag(e){const t=await super._fetchLengthAndTag(e);return t.cacheTag=this._schema.modified.getTime().toString(),t}async _fetchRange(e,t,r,i){try{const n=await this._resolveFileUrl(e);return await super._fetchRange(n,t,r,i)}catch{this._resolvedUrl=null}const n=await this._resolveFileUrl(e);return super._fetchRange(n,t,r,i)}get _baseUrl(){return this._schema.itemCdnUrl??this._schema.itemUrl}async _fetchResolvedUrl(){return this._isAgol?(await(0,i.A)(`${this._baseUrl}/data`,{query:{signedurl:!0,expiration:9,f:"json"}})).data.signedUrl:`${this._baseUrl}/data`}}var b=r(47828);class _ extends f{constructor(e,t,r){super(t,r),this._schema=e,this._directoryChanged=!1}get _baseUrl(){return this._schema.itemCdnUrl??this._schema.itemUrl}async update(e){throw new Error("Unsupported")}async _getParquetFileNames(){const e=await this._getResources();return Array.from(e.keys()).filter(e=>e.endsWith(".parquet"))}async _getStatisticsFileName(){const e=await this._getResources();return Array.from(e.keys()).find(m)??null}_getCacheFileName(e){return`${this._baseUrl}/resources/${e}`}async _resolveFileUrl(e){const t=await this._getResource(e);return t.signedUrl?t.signedUrl:`${this._baseUrl}/resources/${e}`}async _fetchLengthAndTag(e){const t=await this._getResource(e),r=this._schema.itemMetadata.modified.getTime().toString();return{byteLength:t.size,cacheTag:r}}async _fetchRange(e,t,r,i){if(this._directoryChanged)throw(0,b.O)();try{const n=await this._resolveFileUrl(e);return await super._fetchRange(n,t,r,i)}catch{if("directory-changed"===await this._refetchResources())throw(0,b.O)()}const n=await this._resolveFileUrl(e);return super._fetchRange(n,t,r,i)}_refetchResources(){return this._directoryChanged?Promise.resolve("directory-changed"):(this._updateResourcesPromise||(this._updateResourcesPromise=this._executeRefetchResources().finally(()=>{this._updateResourcesPromise=null})),this._updateResourcesPromise)}async _executeRefetchResources(){return await this._refetchPortalItemMetadata()?(this.events.emit("sourceChanged"),this._directoryChanged=!0,"directory-changed"):(this._resources=this._fetchResources(),"ok")}async _refetchPortalItemMetadata(){const e=this._schema.itemMetadata.url,t=await(0,i.A)(this._schema.itemUrl,{responseType:"json",query:{f:"json"}}),{modified:r,url:n}=t.data;if(null==n)throw new Error("Portal item metadata must have a url defined.");if(null==r)throw new Error("Portal item metadata must have a modified timestamp defined.");return this._schema.itemMetadata={modified:new Date(r),url:n},e!==n}async _getResources(){return this._resources||(this._resources=this._fetchResources()),await this._resources}async _getResource(e){const t=(await this._getResources()).get(e);if(!t)throw new Error(`Resource ${e} not found.`);return t}async _fetchResources(){const e=new Map;let t=1;const r=function(e){const t=e.split("/").filter(Boolean),r=t.indexOf("resources");if(-1===r||r===t.length-1)throw new Error(`URL does not contain a resources directory name: ${e}`);return`${t.slice(r+1).map(e=>decodeURIComponent(e)).join("/")}/`}(this._schema.itemMetadata.url);for(;-1!==t;){const n=await(0,i.A)(`${this._baseUrl}/resources`,{query:{f:"json",start:t,num:100}});for(const t of n.data.resources)t.resource.startsWith(r)&&e.set(t.resource,t);t=n.data.nextStart}return e}}class C extends f{constructor(e,t=null,r=()=>{}){super(t,r),this._schema=e}async update(e){await this._updateParquetFileInfos(await this._getParquetFileNames()),this._schema=e}async _resolveFileUrl(e){return e}async _getParquetFileNames(){return this._schema.urls.filter(e=>!e.endsWith(".json"))}async _getStatisticsFileName(){return this._schema.urls.find(m)??null}}function x(e,t,r){switch(e.type){case"urls":return new C(e,t,r);case"portal-parquet-file":return new v(e,t,r);case"portal-parquet-layer":return new _(e,t,r)}}},32756(e,t,r){r.d(t,{Rr:()=>a});var i=r(32198),n=r(93637),s=r(91429),o=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new o.A;return n.read(i,r),[n]}const l={type:[o.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}};r.d(t,["fY",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(l)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,l])},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(69540),s=r(66552),o=r(25482),a=r(91429);const l=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],u)},34582(e,t,r){r.d(t,{A:()=>a});var i=r(32198),n=r(69540),s=r(25482),o=r(91429);let a=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.type="wkb",this.field=null}};(0,i.Cg)([(0,o.MZ)({type:["wkb"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:["counter-clockwise"],json:{write:!0}})],a.prototype,"orientation",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0),a=(0,i.Cg)([(0,o.$K)("esri.layers.support.GeometryEncodingWkb")],a)},46499(e,t,r){r.d(t,{A:()=>P});var i,n,s=r(32198),o=(r(44208),r(66552)),a=r(25482),l=r(4718),u=r(90629),c=r(91429),p=r(90360),y=r(73913),d=r(32730),h=r(77548),g=r(59868),f=r(73838),m=r(33910),w=r(36005),v=r(43937);const b=new o.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function _(e,t,r){return{enabled:!(0,h.TU)(r?.layer)}}function C(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let P=class extends a.o{static{i=d.vK}static{n=this}static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){const e=r(t[i[0]],i[1],i[2]),n=i[3],s=r(t[i[4]],i[5],i[6]);switch(n){case"AND":return e&&s;case"OR":return e||s}}return!1}catch(e){}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=g.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,d.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,d.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&C(i))e=new y.A({expression:this.getLabelExpressionArcade()});else if(!e)return;const n=e.toJSON(i);n.expression&&(t[r]=n)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,d.XJ)(this)}getLabelExpressionArcade(){return(0,d.BI)(this)}getLabelExpressionSingleField(){return(0,d.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new n({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,s.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],P.prototype,"name",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:_}}}}})],P.prototype,"allowOverrun",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:_}}}}})],P.prototype,"deconflictionStrategy",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],P.prototype,"labelExpression",void 0),(0,s.Cg)([(0,w.w)("labelExpression")],P.prototype,"readLabelExpression",null),(0,s.Cg)([(0,v.K)("labelExpression")],P.prototype,"writeLabelExpression",null),(0,s.Cg)([(0,c.MZ)({type:y.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return C(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],P.prototype,"labelExpressionInfo",void 0),(0,s.Cg)([(0,v.K)("labelExpressionInfo")],P.prototype,"writeLabelExpressionInfo",null),(0,s.Cg)([(0,c.MZ)({type:b.apiValues,json:{type:b.jsonValues,read:b.read,write:b.write}})],P.prototype,"labelPlacement",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],P.prototype,"offsetDistance",void 0),(0,s.Cg)([(0,c.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],P.prototype,"labelPosition",void 0),(0,s.Cg)([(0,c.MZ)({type:Number})],P.prototype,"maxScale",void 0),(0,s.Cg)([(0,v.K)("maxScale")],P.prototype,"writeMaxScale",null),(0,s.Cg)([(0,c.MZ)({type:Number})],P.prototype,"minScale",void 0),(0,s.Cg)([(0,v.K)("minScale")],P.prototype,"writeMinScale",null),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:_}}}}})],P.prototype,"repeatLabel",void 0),(0,s.Cg)([(0,c.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:_}}}}})],P.prototype,"repeatLabelDistance",null),(0,s.Cg)([(0,c.MZ)({types:m.em,json:{types:m.em,origins:{"portal-item":{types:m.em,read:{reader:(0,p.C)({types:m.em})},default:null},"web-scene":{types:m.Rv,read:{reader:(0,p.C)({types:m.Rv})},write:f.oO,default:null}},write:f.oO,default:null}})],P.prototype,"symbol",void 0),(0,s.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],P.prototype,"useCodedValues",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],P.prototype,"where",void 0),P=n=(0,s.Cg)([(0,c.$K)("esri.layers.support.LabelClass")],P)},73913(e,t,r){r.d(t,{A:()=>c});var i,n=r(32198),s=r(25482),o=r(91429),a=r(32730),l=r(36005),u=r(43937);let c=class extends s.o{static{i=this}constructor(e){super(e),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,a.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,a.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({expression:this.expression,title:this.title,value:this.value})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],c.prototype,"expression",void 0),(0,n.Cg)([(0,l.w)("expression",["expression","value"])],c.prototype,"readExpression",null),(0,n.Cg)([(0,u.K)("expression")],c.prototype,"writeExpression",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],c.prototype,"title",void 0),(0,n.Cg)([(0,o.MZ)({json:{read:!1,write:!1}})],c.prototype,"value",void 0),c=i=(0,n.Cg)([(0,o.$K)("esri.layers.support.LabelExpressionInfo")],c)},91880(e,t,r){r.d(t,{A:()=>u});var i,n=r(32198),s=r(66552),o=r(25482),a=r(91429);const l=new s.J({asc:"ascending",desc:"descending"});let u=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],u.prototype,"order",void 0),u=i=(0,n.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],u)},56370(e,t,r){r.d(t,{A:()=>y});var i=r(32198),n=r(69540),s=r(7762),o=r(49186),a=r(25482),l=r(91429),u=r(64108),c=r(97159),p=r(43937);let y=class extends((0,a.T)(n.Pw)){constructor(e){super(e),this.type="files",this.urls=new s.A}writeUrls(e,t,r,i){const n=e.toArray().map(e=>(0,c.t)(e,i)).filter(e=>!!e);n.length?t.urls=n:i.messages?.push(new o.A("parquet-layer:missing-urls","Missing or empty 'urls'",{data:this}))}};(0,i.Cg)([(0,l.MZ)({type:["files"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],y.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:s.A.ofType(String),json:{write:{isRequired:!0}}})],y.prototype,"urls",void 0),(0,i.Cg)([(0,p.K)("urls")],y.prototype,"writeUrls",null),y=(0,i.Cg)([(0,u.$)("esri.layers.support.ParquetFilesData")],y)},89160(e,t,r){r.d(t,{A:()=>p});var i=r(32198),n=r(69540),s=r(25482),o=r(91429),a=r(64108),l=r(80812),u=r(36005),c=r(43937);let p=class extends((0,s.T)(n.Pw)){constructor(e){super(e),this.type="portal-item"}readPortalItem(e,t,r){if(t.itemId)return new l.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}};(0,i.Cg)([(0,o.MZ)({type:["portal-item"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],p.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:l.default,json:{write:{isRequired:!0}}})],p.prototype,"portalItem",void 0),(0,i.Cg)([(0,u.w)("portalItem",["itemId"])],p.prototype,"readPortalItem",null),(0,i.Cg)([(0,c.K)("portalItem",{itemId:{type:String}})],p.prototype,"writePortalItem",null),p=(0,i.Cg)([(0,a.$)("esri.layers.support.ParquetPortalItemData")],p)},39383(e,t,r){r.d(t,{w:()=>l,z:()=>p});var i=r(49186),n=r(53966),s=r(46499);const o=()=>n.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function l(e,t,r){return e?e.map(e=>{const i=new s.A;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,(t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],c={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function p(e,t){const r=[];for(const n of e){const e=n.labelPlacement,s=c[t];if(!n.symbol)return o().warn("No ILabelClass symbol specified."),[];if(!s)return o().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(s.includes(e))r.push(n);else{const i=s[0];e&&o().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);const a=n.clone();a.labelPlacement=i,r.push(a)}}return r}},50639(e,t,r){r.d(t,{G:()=>s});var i=r(9075),n=r(34582);function s(e){switch(e.type){case"wkb":return n.A.fromJSON(e);case"location":return i.A.fromJSON(e)}}},42760(e,t,r){r.d(t,{Dt:()=>h,hG:()=>y,nc:()=>d,sA:()=>p}),r(7762);var i=r(49186),n=r(44208),s=r(66552),o=r(16930),a=(r(95031),r(20437)),l=r(30524),u=r(50639);r(56370);const c=new s.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function p(e){return c.toJSON(e)}function y(e){return c.fromJSON(e)}async function d(e,t){if(t.geometryType&&t.spatialReference&&t.geometryEncoding&&t.fields&&t.displayOptimization)return t;if(!e)throw new i.A("parquet:bad-input","No metadata found");const r={...t},s=e.fields.map(e=>a.A.fromJSON(e));if(null==r.fields)r.fields=s;else{const e=new Set(r.fields.map(e=>e.name));if(!(0,n.A)("parquetlayer-legacy-field-overrides-enabled"))for(const t of s)e.has(t.name)||r.fields.push(t)}if(null!=r.geometryEncoding){const e=r.geometryEncoding;switch(e.type){case"wkb":{const t=s.find(t=>t.name===e.field);if(!t)throw new i.A("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==t.type)throw new i.A("parquet:unsupported",`Invalid field type for geometry encoding. Found ${t.type} but expected 'blob'`);break}case"location":for(const t of[e.xField,e.yField])if(null!=t){const e=s.find(e=>e.name===t);if(!e)throw new i.A("parquet:unsupported",`Geometry encoding references field ${t} which does not exist`);if(!(0,l.WA)(e))throw new i.A("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}return null==r.geometryEncoding&&(r.geometryEncoding=e.geometryEncoding?(0,u.G)(e.geometryEncoding):null),r.fields=function(e,t){const r=t.geoMetadata;if(null==r)return e;const i=new Set(Object.keys(r.columns));return e.filter(e=>!i.has(e.name))}(r.fields,e),!r.displayOptimization&&e.displayOptimization&&(r.displayOptimization=e.displayOptimization),!r.geometryType&&e.geometryType&&(r.geometryType=y(e.geometryType)),!r.spatialReference&&e.spatialReference&&(r.spatialReference=o.A.fromJSON(e.spatialReference)),r}async function h(e,t){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const r=await e.portalItem.load(t);switch(r.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:r.itemUrl,itemCdnUrl:r.itemCdnUrl,modified:r.modified,size:r.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!r.url)throw new i.A("parquet:bad-item",`Item of type ${r.type} must have a url defined`,r);return{type:"portal-parquet-layer",itemUrl:r.itemUrl,itemCdnUrl:r.itemCdnUrl,itemMetadata:{modified:r.modified,url:r.url}};default:throw new i.A("parquet:bad-item",`Item of type ${r.type} is not supported`,r)}}}}r.d(t,["ye",0,c])},22671(e,t,r){r.d(t,{A:()=>w});var i,n=r(32198),s=r(52106),o=r(66552),a=r(25482),l=r(4718),u=r(91429),c=r(16930),p=r(60408),y=r(65864),d=r(50498),h=r(20437),g=r(36005),f=r(43937);const m=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=c.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*o,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=c.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),a=s.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=i);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,p.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,p.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,p.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],w.prototype,"features",void 0),(0,n.Cg)([(0,g.w)("features")],w.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[h.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],w.prototype,"geometryType",void 0),(0,n.Cg)([(0,f.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:d.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,g.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n.Cg)([(0,f.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var i=r(32198),n=r(66552),s=r(53966),o=r(91429),a=r(93223);const l=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field";r.d(t,["K",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&c||r&&u||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,o.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,l])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4907],{26887(e,t,i){function n(){return[1,0,0,1,0,0]}function r(e,t,i,n,r,o){return[e,t,i,n,r,o]}i.d(t,{fA:()=>r,vt:()=>n});Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:[1,0,0,1,0,0],clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5]]},create:n,fromValues:r},Symbol.toStringTag,{value:"Module"}))},4144(e,t,i){i.r(t),i.d(t,{clipToSpatialReference:()=>l,execute:()=>c,executeMany:()=>u,foldInto360Range:()=>h,foldInto360RangeGeodetic:()=>p,isLoaded:()=>s,load:()=>a,normalizeGeometry:()=>d,supportsCurves:()=>f,transform:()=>g});var n=i(76061),r=i(83290);let o;function s(){return!!o&&(0,r.i)()}async function a(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(9192)]).then(()=>i(9192)),Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(5756)]).then(()=>i(15756)).then(({injectPe:e})=>e),(0,r.l)()]);o=new e.OperatorProject,t(r.p)}}function l(e,t,i){return o.clipToSpatialReference(e,t,null,i)}function c(e,t){return o.execute(e,t,null)}function u(e,t){const i=o.executeMany(new n.S(e),t,null);return Array.from(i)}function h(e,t){return o.foldInto360Range(e,t)}function p(e,t,i){return o.foldInto360RangeGeodetic(e,t,i)}function d(e,t,i){return o.normalizeGeometry(e,t,i)}function f(){return o.supportsCurves()}function g(e,t,i,n,r){return o.transform(e,t,i,n,r)}},83276(e,t,i){i.r(t),i.d(t,{execute:()=>y,executeMany:()=>x,isLoaded:()=>f,load:()=>m,projectExecute:()=>_,projectExecuteMany:()=>w,projectIsLoaded:()=>d,projectLoad:()=>g,projectSupportsCurves:()=>h,supportsCurves:()=>p});var n=i(4144),r=i(85036),o=i(17499);let s,a,l,c,u,h,p;function d(){return!!s&&(0,n.isLoaded)()}function f(){return(0,r.Q)("projectOperator","isLoaded","projectIsLoaded"),d()}async function g(){if(!d()){const[e,t]=await Promise.all([Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(9567),i.e(9829),i.e(1666)]).then(()=>i(78125)),Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(6129)]).then(()=>i(86129)),(0,n.load)()]);s=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=e.toGeometry,u=t.createProjectionTransformation,h=(0,n.supportsCurves)(),p=h}}function m(){return(0,r.Q)("projectOperator","load","projectLoad"),g()}function _(e,t,i){const r=l(e),h=u(a(r),a(t),i),p=c((0,n.execute)(s(e),h),t);return!i?.zConversionDisabled&&p?.hasZ&&(0,o.g)([p],r,t),p}function y(e,t,i){return(0,r.Q)("projectOperator","execute","projectExecute"),_(e,t,i)}function w(e,t,i){const r=e.map(s),h=l(e),p=u(a(h),a(t),i),d=(0,n.executeMany)(r,p).map(e=>c(e,t));return!i?.zConversionDisabled&&d&&(0,o.g)(d,h,t),d}function x(e,t,i){return(0,r.Q)("projectOperator","executeMany","projectExecuteMany"),w(e,t,i)}},17499(e,t,i){i.d(t,{g:()=>o});var n=i(60408),r=i(62815);function o(e,t,i){let o;for(const s of e)if(s&&(0,n.Pv)(s)&&!("vertexAttributes"in s)){if(!o){const e="type"in s?s.type:(0,n.$B)(s);if(o=(0,r.N)(e,t,i),!o)return}o(s)}}},62815(e,t,i){i.d(t,{N:()=>a,d:()=>l});var n=i(86211),r=i(73941),o=i(21325),s=i(52006);function a(e,t,i){const n=l(t,i);if(1!==n)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,n);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const i of e.curvePaths)for(const e of i){const i=(0,s.yP)(e);i.length>2&&(i[2]*=t)}if(e.paths)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}}(e,n);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const i of e.curveRings)for(const e of i){const i=(0,s.yP)(e);i.length>2&&(i[2]*=t)}if(e.rings)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}}(e,n);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,n);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,n);default:return}}function l(e,t){return null==e||null==t||(0,o.aI)(e,t)||(0,r.xP)(e)||(0,r.xP)(t)?1:(0,n.G9)(e)/(0,n.G9)(t)}},44907(e,t,i){i.r(t),i.d(t,{default:()=>Pe});var n=i(32198),r=i(49186),o=i(53966),s=i(25728),a=i(17676),l=i(91429),c=i(16930),u=i(21325),h=i(4146),p=i(63074),d=i(8303),f=i(72545),g=i(25036),m=i(86738),_=i(92474),y=i(83027),w=i(48163),x=i(37585),P=i(5443),A=i(39829),M=i(88411),v=i(83276);class R{constructor(e){this.ctm=e.ctm,this.spatialReference=e.toSpatialReference(),this.pairedNeatline=e.pairedNeatline,this.outerExtentMediabox=this._getExtentFromArray(e.outerExtentMediaBox),this.geoControlPoints=e.geoControlPoints,this.outerMediaBox=e.outerExtentMediaBox,this.sourceMediaBoxPolygon=this.createSourceMediaBoxPolygon(),this.sourceNeatlinePolygon=this.createSourceNeatlinePolygon()}createSourceMediaBoxPolygon(){const e=[];for(const[t,i]of this.outerMediaBox){const n=T(this.ctm,t,i);e.push([n[0],n[1]])}return new A.A({rings:[e],spatialReference:this.spatialReference})}createSourceNeatlinePolygon(){const e=[];for(const[t,i]of this.pairedNeatline){const n=T(this.ctm,t,i);e.push([n[0],n[1]])}return new A.A({rings:[e],spatialReference:this.spatialReference})}createProjectedPolygon(e,t,i){(0,a.Te)(i);const n=e;if(n.spatialReference.equals(t))return n;if(!n||!n.extent)throw new r.A("geospatial-pdf-layer:load","Could not project neatline");const o=Math.max(n.extent.width,n.extent.height)/256,s=(0,M.densifyExecute)(n,o);return(0,v.projectExecute)(s,t)}toExtent(){return this._getExtentFromArray(this.pairedNeatline)}_getExtentFromArray(e){let t=1/0,i=1/0,n=-1/0,r=-1/0;for(let o=0;o<e.length;o++){const s=T(this.ctm,e[o][0],e[o][1]);t=Math.min(t,s[0]),i=Math.min(i,s[1]),n=Math.max(n,s[0]),r=Math.max(r,s[1])}return new P.A({xmin:t,ymin:i,xmax:n,ymax:r,spatialReference:this.spatialReference})}}function T(e,t,i){const[n,r,o,s,a,l]=e,c=(0,w.vt)();return(0,x.hZ)(c,n*t+o*i+a,r*t+s*i+l),c}i(44208);var C=i(26887),F=i(48237);function S(e,t,i,n){const r=Math.min(e.length,t.length,3),o=e.slice(0,r).map((e,n)=>({sourcePoint:{x:e[0],y:e[1]},mapPoint:new m.A({x:t[n][0],y:t[n][1],spatialReference:i})}));return new F.A({controlPoints:o,width:n.xmax-n.xmin,height:n.ymax-n.ymin})}function E(e){if(!e?.transform||e.transform.length<6)throw new r.A("geospatial-pdf-layer:georefrencer","created georeferencer does not have valid transform");return e.transform}function b(e){return(0,C.fA)(e[0],-e[1],-e[3],e[4],e[2],e[5])}function D(e){return[[e[0],e[1]],[e[0],e[3]],[e[2],e[3]],[e[2],e[1]]]}class G{constructor(e){const t=this.inputValidation(e);this._registration=t.registration,this._projection=t.projection,this._neatline=t.neatline,this.pairedNeatline=this._pairNeatline(),this.outerExtentMediaBox=D(t.mediaBox),this.geoControlPoints=this._getRegistrationPoints("geo"),this.ctm=t.ctm??this._buildCTMFromRegistration(),this.outputValidation()}inputValidation(e){const{ctm:t,registration:i,projection:n,display:o,neatline:s,mediaBox:a}=e;if(t&&6!==t.length)throw new r.A("geospatial-pdf-layer:invalid-frame","LGIDict has invalid CTM.");if(!t&&(!i||i.length<3))throw new r.A("geospatial-pdf-layer:invalid-frame","LGIDict missing CTM and minimum registration points");if(!a||4!==a.length)throw new r.A("geospatial-pdf-layer:invalid-frame","LGIDict missing or invalid MediaBox.");if(!s||s.length<4||s.length%2!=0)throw new r.A("geospatial-pdf-layer:invalid-frame","LGIDict missing or invalid amount of neatline points");return{ctm:t?(0,C.fA)(t[0],t[1],t[2],t[3],t[4],t[5]):void 0,registration:i??[],projection:n,display:o,neatline:s,mediaBox:a}}outputValidation(){if(6!==this.ctm.length)throw new r.A("geospatial-pdf-layer:invalid-frame","LGIDict missing or invalid CTM");if(this.pairedNeatline.length<4)throw new r.A("geospatial-pdf-layer:invalid-frame","Map Frame should have at least 4 neatline points.");if(4!==this.outerExtentMediaBox.length)throw new r.A("geospatial-pdf-layer:invalid-frame","Failed to generate outerextent from mediaBox.");if(!this.ctm&&this.geoControlPoints.length<2)throw new r.A("geospatial-pdf-layer:invalid-frame","Map Frame should have at least 2 geoControlPoints if defaulting.")}toSpatialReference(){return this._projection}_buildCTMFromRegistration(){const e=[],t=[];for(const i of this._registration)i.length<4||(e.push((0,w.fA)(i[0],i[1])),t.push((0,w.fA)(i[2],i[3])));const i=this._getSourceRect();return b(E(S(e,t,this.toSpatialReference(),i)))}_extentFromArray(e){let t=1/0,i=1/0,n=-1/0,o=-1/0;for(let r=0;r<e.length;r++){const s=e[r];t=Math.min(t,s[0]),i=Math.min(i,s[1]),n=Math.max(n,s[0]),o=Math.max(o,s[1])}if(!(Number.isFinite(t)&&Number.isFinite(i)&&Number.isFinite(n)&&Number.isFinite(o)))throw new r.A("geospatial-pdf-layer: invalid-frame","Failed to compute extent from registration.");return{xmin:t,ymin:i,xmax:n,ymax:o}}_getSourceRect(){if(4===this.outerExtentMediaBox?.length)return this._extentFromArray(this.outerExtentMediaBox);if(this._neatline.length>=6)return this._extentFromArray(this.pairedNeatline);const e=this._getRegistrationPoints("page");if(e.length>=2)return this._extentFromArray(e);throw new r.A("geospatial-pdf-layer: invalid-frame","Cannot build source rectangle from Neatline or Registration points.")}_getRegistrationPoints(e){const[t,i]="page"===e?[0,1]:[2,3];return this._registration.filter(e=>e.length>i).map(e=>[e[t],e[i]])}_pairNeatline(){const e=[];for(let t=0;t<this._neatline.length;t+=2){const i=this._neatline[t],n=this._neatline[t+1];Number.isFinite(i)&&Number.isFinite(n)&&e.push([i,n])}return 2===e.length&&(e.splice(1,0,[e[1][0],e[0][1]]),e.push([e[0][0],e[2][1]])),e}}const N={OriginLatitude:"Origin_Latitude",CentralMeridian:"Central_Meridian",ScaleFactor:"Scale_Factor",FalseEasting:"False_Easting",FalseNorthing:"False_Northing",Zone:"Zone",Hemisphere:"Hemisphere",StandardParallelOne:"Standard_Parallel_One",StandardParallelTwo:"Standard_Parallel_Two"},j=/^(?:NAD83|NORTH AMERICAN 1983|NAR(?:-[A-Z])?)$/i,L=/^(?:NAD27|NORTH AMERICAN 1927|NAS(?:-[A-Z])?)$/i,O=/^(?:WGS84|WGS 84|WGE)$/i;function I(e){const t=function(e){return function(e){const t=function(e){switch(e){case"Projection":case"Display":return e;default:return}}(e.Type),i=function(e){switch(e){case"TC":case"PH":case"UT":case"AC":case"LE":case"SPCS":return e;default:return}}(e.Projection_Type);let n;if(i||(n="Projection is missing or has unsupported ProjectionType"),t||(n="Projection dictionary is missing or has invalid Type. Expected Projection or Display."),e.Datum||(n="Projection is missing a Datum"),n)throw new r.A("geospatial-pdf-layer:invalid-projection",n);return z(e,i),{kind:"projected",dictionaryType:t,projectionType:i,datum:e.Datum}}(e)}(e);if("projected"===t.kind){const{projectionType:i,datum:n}=t;return"SPCS"===i?function(e,t){const i=B(t);if(2800===e.Zone&&i&&Z(i))return new c.A({wkid:32110});throw new r.A("geospatial-pdf-layer:invalid-projection",`Unsupported State Plane projection: datum ${t.name}, zone ${e.Zone}`)}(e,n):new c.A({wkt:$(e,i,n)})}}function z(e,t){const i=function(e){switch(e){case"TC":return["OriginLatitude","CentralMeridian","ScaleFactor","FalseEasting","FalseNorthing"];case"PH":return["OriginLatitude","CentralMeridian","FalseEasting","FalseNorthing"];case"UT":return["Zone","Hemisphere"];case"AC":case"LE":return["OriginLatitude","CentralMeridian","StandardParallelOne","StandardParallelTwo","FalseEasting","FalseNorthing"];case"SPCS":return["Zone"]}}(t);for(const n of i){const i=e[N[n]];if(void 0===i||""===i)throw new r.A("geospatial-pdf-layer:invalid-projection",`Projection ${t} missing required parameter ${n}.`)}}function $(e,t,i){const n=function(e,t,i){const n=function(e){const t=B(e);return t?Z(t)?"NAD_1983":H(t)?"NAD_1927":k(t)?"WGS_1984":"geospatialPDF":"geospatialPDF"}(i);switch(t){case"TC":return`${n}_GeospatialPDF_Transverse_Mercator`;case"PH":return`${n}_GeospatialPDF_Polyconic`;case"UT":return`${n}_GeospatialPDF_UTM_Zone_${e.Zone}_${e.Hemisphere}`;case"AC":return`${n}_GeospatialPDF_Albers_Equal_Area`;case"LE":return`${n}_GeospatialPDF_Lambert_Conformal_Conic`}}(e,t,i),o=function(e){switch(e){case"TC":case"UT":return"Transverse_Mercator";case"PH":return"Polyconic";case"AC":return"Albers";case"LE":return"Lambert_Conformal_Conic"}}(t),s=function(e){if("definition"===e.kind){const t=e.ellipsoid;if(!t?.semi_Major_Axis)throw new r.A("geospatial-pdf-layer:invalid-Datum","Datum definition requires semi-major axis");const i=function(e){if(null!=e.inverse_Flattening)return e.inverse_Flattening;const t=e.semi_Major_Axis,i=e.semi_Minor_Axis;if(null==t||null==i)throw new r.A("geospatial-pdf-layer:invalid-Datum","Ellipsoid definition missing InvFlattening or SemiMinorAxis.");return t===i?0:t/(t-i)}(t),n=e.name??"GeospatialPDF_Datum",o=`SPHEROID["${t.description??"GeospatialPDF_Spheroid"}",${t.semi_Major_Axis},${i}]`,s=e.to_WGS84;return`DATUM["${n}",${o}${s?`,TOWGS84[${s.dx??0},${s.dy??0},${s.dz??0},${s.rx??0},${s.ry??0},${s.rz??0},${s.sf??0}]`:""}]`}if(e.name){const t=e.name.toUpperCase();if(Z(t))return'DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]]';if(H(t))return'DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]]';if(k(t))return'DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]]'}throw new r.A("geospatial-pdf-layer:invalid-Datum","Unsupported datum "+e.name)}(i),a=function(e){const t=e.toLowerCase();return["m","meter","meters","metre","metres"].includes(t)?'UNIT["Meter",1.0]':["ft","foot","feet"].includes(t)?'UNIT["Foot",0.3048]':`UNIT["${e}",1.0]`}(e.Units??"M"),l=function(e,t){switch(t){case"TC":return[`PARAMETER["False_Easting",${e.False_Easting}]`,`PARAMETER["False_Northing",${e.False_Northing}]`,`PARAMETER["Central_Meridian",${e.Central_Meridian}]`,`PARAMETER["Latitude_Of_Origin",${e.Origin_Latitude}]`,`PARAMETER["Scale_Factor",${e.Scale_Factor}]`];case"PH":return[`PARAMETER["False_Easting",${e.False_Easting}]`,`PARAMETER["False_Northing",${e.False_Northing}]`,`PARAMETER["Central_Meridian",${e.Central_Meridian}]`,`PARAMETER["Latitude_Of_Origin",${e.Origin_Latitude}]`];case"AC":case"LE":return[`PARAMETER["False_Easting",${e.False_Easting}]`,`PARAMETER["False_Northing",${e.False_Northing}]`,`PARAMETER["Central_Meridian",${e.Central_Meridian}]`,`PARAMETER["Latitude_Of_Origin",${e.Origin_Latitude}]`,`PARAMETER["Standard_Parallel_1",${e.Standard_Parallel_One}]`,`PARAMETER["Standard_Parallel_2",${e.Standard_Parallel_Two}]`];case"UT":return function(e){if(!e.Zone)throw new r.A("geospatial-pdf-layer:invalid-projection","No zone found for projection code UT");const t=6*e.Zone-183;return['PARAMETER["False_Easting",500000]',`PARAMETER["False_Northing",${/^s/i.test(e.Hemisphere??"")?1e7:0}]`,`PARAMETER["Central_Meridian",${t}]`,'PARAMETER["Latitude_Of_Origin",0]','PARAMETER["Scale_Factor",0.9996]']}(e)}}(e,t);return`PROJCS["${n}",GEOGCS["${function(e){const t=B(e);return t?Z(t)?"GCS_North_American_1983":H(t)?"GCS_North_American_1927":k(t)?"GCS_WGS_1984":"GCS_GeospatialPDF":"GCS_GeospatialPDF"}(i)}",${s},PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]],PROJECTION["${o}"],${l.join(",\n ")},${a}]`}function B(e){return e.name?function(e){return e.trim().toUpperCase().replace(/_/g," ").replace(/\s+/g," ")}(e.name):null}function Z(e){return j.test(e)}function H(e){return L.test(e)}function k(e){return O.test(e)}class V{constructor(e){const{bbox:t,bounds:i,gpts:n,lpts:r,gcs:o,mediaBox:s}=this.inputValidation(e);this._bbox=t,this._bounds=i,this._gpts=n,this._lpts=r,this._gcs=o,this.outerExtentMediaBox=D(s),this.geoControlPoints=this._getProjectedGeoControlPoints().map(e=>[e[0],e[1]]);const a=this._getBoundsPolygonPage()??this._getPageControlPoints();this.pairedNeatline=a.map(e=>[e[0],e[1]]),this.neatLine=this.pairedNeatline.flat(),this._georeference=this._createControlPointsGeoreference();const l=E(this._georeference);this.ctm=b(l),this.outputValidation()}toSpatialReference(){return new c.A({wkt:this._gcs.WKT})}inputValidation(e){const{bbox:t,bounds:i,gpts:n,lpts:o,gcs:s,mediaBox:a}=e;if(!t||4!==t.length)throw new r.A("geospatial-pdf-layer:invalid-frame","Viewport missing or invalid BBox.");if(!a||4!==a.length)throw new r.A("geospatial-pdf-layer:invalid-frame","Viewport missing or invalid MediaBox.");if(!n||n.length<6||n.length%2!=0)throw new r.A("geospatial-pdf-layer:invalid-frame","MeasureFrame missing or invalid GPTS.");if(!o||o.length<6||o.length%2!=0)throw new r.A("geospatial-pdf-layer:invalid-frame","MeasureFrame missing or invalid LPTS.");if(o.length!==n.length)throw new r.A("geospatial-pdf-layer: invalid-frame","MeasureFrame LPTS and GPTS must be same length");if(!s?.WKT)throw new r.A("geospatial-pdf-layer:invalid-frame","MeasureFrame missing or invalid WKT.");return{bbox:t,bounds:i,gpts:n,lpts:o,gcs:{WKT:s.WKT},mediaBox:a}}outputValidation(){if(4!==this.outerExtentMediaBox.length)throw new r.A("geospatial-pdf-layer:invalid-frame","Failed to generate outer extent from mediaBox.");if(this.geoControlPoints.length<2)throw new r.A("geospatial-pdf-layer:invalid-frame","Map Frame should have at least 2 geoControlPoints.");if(this.pairedNeatline.length<4)throw new r.A("geospatial-pdf-layer:invalid-frame","Map Frame should have at least 4 neatline points.");if(!this.ctm||6!==this.ctm.length)throw new r.A("geospatial-pdf-layer:invalid-frame","Missing or invalid Map Frame CTM")}_createControlPointsGeoreference(){const e=this._getPageControlPoints(),t=this._getProjectedGeoControlPoints(),i=this._getViewportRect();return S(e,t,this.toSpatialReference(),i)}_getBoundsPolygonLocal(){if(!this._bounds||this._bounds.length<8||this._bounds.length%2!=0)return null;const e=[];for(let t=0;t<this._bounds.length;t+=2)e.push({u:this._bounds[t],v:this._bounds[t+1]});return e}_getBoundsPolygonPage(){const e=this._getBoundsPolygonLocal();return e?.map(e=>this._localToPage(e.u,e.v))??null}_getPageControlPoints(){const e=[];for(let t=0;t<this._lpts.length;t+=2){const i=this._lpts[t],n=this._lpts[t+1];e.push(this._localToPage(i,n))}return e}_getProjectedGeoControlPoints(){const e=this.toSpatialReference(),t=[];for(let i=0;i<this._gpts.length;i+=2){const n=this._gpts[i],r=this._gpts[i+1],o=new m.A({x:r,y:n}),s=(0,v.projectExecute)(o,e);t.push((0,w.fA)(s.x,s.y))}return t}_getViewportRect(){const[e,t,i,n]=this._bbox;return{xmin:Math.min(e,i),ymin:Math.min(t,n),xmax:Math.max(e,i),ymax:Math.max(t,n)}}_localToPage(e,t){const[i,n,r,o]=this._bbox;return(0,w.fA)(i+e*(r-i),n+t*(o-n))}}function J(e){const t=oe(e,"LGIDict map frame must be an object.");return{CTM:Y(t.CTM),Registration:ee(t.Registration),Neatline:Y(t.Neatline),Projection:K(t.Projection),Display:K(t.Display)}}function U(e){const t=oe(e,"Viewport frame must be an object."),i=function(e){if(re(e))return{Bounds:Y(e.Bounds),GPTS:Y(e.GPTS),LPTS:Y(e.LPTS),GCS:W(e.GCS)}}(t.Measure);return{BBox:Y(t.BBox),Measure_Raw:t.Measure,Measure:i,Raw:t}}function W(e){if(re(e))return{WKT:te(e.WKT)}}function K(e){if(re(e))return{Type:ie(e.Type),Units:ie(e.Units),Datum:q(e.Datum),Projection_Type:ie(e.ProjectionType),Central_Meridian:ne(e.CentralMeridian),False_Easting:ne(e.FalseEasting),False_Northing:ne(e.FalseNorthing),Height:ne(e.Height),Hemisphere:ie(e.Hemisphere),Latitude_One:ne(e.LatitudeOne),Latitude_Two:ne(e.LatitudeTwo),Latitude_Of_True_Scale:ne(e.LatitudeOfTrueScale),Longitude_One:ne(e.LongitudeOne),Longitude_Two:ne(e.LongitudeTwo),Longitude_Down_From_Pole:ne(e.LongitudeDownFromPole),Orientation:ie(e.Orientation),Origin_Height:ne(e.OriginHeight),Origin_Latitude:ne(e.OriginLatitude),Origin_Longitude:ne(e.OriginLongitude),Scale_Factor:ne(e.ScaleFactor),Standard_Parallel:ne(e.StandardParallel),Standard_Parallel_One:ne(e.StandardParallelOne),Standard_Parallel_Two:ne(e.StandardParallelTwo),Zone:ne(e.Zone),Description:ie(e.Description),raw:e}}function q(e){return null==e?null:"string"==typeof e?{kind:"name",name:ie(e),ellipsoid:null,to_WGS84:null,raw:e}:re(e)?{kind:"definition",name:ie(e.Description),ellipsoid:Q(e.Ellipsoid),to_WGS84:X(e.ToWGS84),raw:e}:{kind:"unknown",name:ie(e),ellipsoid:null,to_WGS84:null,raw:e}}function Q(e){if(re(e))return{semi_Major_Axis:ne(e.SemiMajorAxis),inverse_Flattening:ne(e.InvFlattening),semi_Minor_Axis:ne(e.SemiMinorAxis),description:ie(e.Description)}}function X(e){if(re(e))return{dx:ne(e.dx)??0,dy:ne(e.dy)??0,dz:ne(e.dz)??0,rx:ne(e.rx)??0,ry:ne(e.ry)??0,rz:ne(e.rz)??0,sf:ne(e.sf)??0}}function Y(e){if(!Array.isArray(e))return;const t=[];for(const i of e){const e=ne(i);if(void 0===e)return;t.push(e)}return t}function ee(e){if(Array.isArray(e))return e.filter(e=>Array.isArray(e)).map(e=>e.map(e=>ne(e)).filter(e=>void 0!==e))}function te(e){if(null!=e)return"string"==typeof e?e:String(e)}function ie(e){const t=te(e);if(void 0!==t)return t.trim()}function ne(e){if(null==e)return;if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"!=typeof e)return;const t=e.trim();if(""===t)return;const i=Number(t);return Number.isFinite(i)?i:void 0}function re(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function oe(e,t){if(!re(e))throw new r.A("geospatial-pdf-layer:parse",t);return e}let se=class extends _.x_{constructor(){super(...arguments),this._connection=null,this._workerHandler=null}load(e){const t=(0,y.h)("GeospatialPDFLayerWorker",{...e,strategy:"dedicated",registryTarget:this}).then(e=>{this._connection=e,this._workerHandler=this._connection.createInvokeProxy()});return this.addResolvingPromise(t),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null,this._workerHandler=null,super.destroy()}async loadPDF(e,t={}){await this.load(t);const{geospatialMetadata:i}=await this._workerHandler.loadPDF(e,t),n=function(e,t=0){const i={mediaBox:Y(e.MediaBox),rotate:ne(e.Rotate),hasLGIDict:null!=e.LGIDict,hasVP:null!=e.VP},n=function(e,t){return function(e){return null==e?[]:Array.isArray(e)?e.map(e=>J(e)):[J(e)]}(e)[t]}(e.LGIDict,t);if(n){if(!n.Projection)throw new r.A("geospatial-pdf-layer:parse","LGIDict map frame missing Projection.");const t=I(n.Projection);let o;try{o=n.Display?I(n.Display):void 0}catch{o=t}return{result:i,lgiDictFrame:new G({ctm:n.CTM,registration:n.Registration,projection:t,display:o,neatline:n.Neatline,mediaBox:Y(e.MediaBox)})}}const o=function(e,t){return function(e){return null==e?[]:Array.isArray(e)?e.map(e=>U(e)):[U(e)]}(e)[t]}(e.VP,t);return o?{result:i,vpFrame:new V({bbox:o.BBox,bounds:o.Measure?.Bounds,gpts:o.Measure?.GPTS,lpts:o.Measure?.LPTS,gcs:o.Measure?.GCS,mediaBox:Y(e.MediaBox)})}:{result:i}}(i,0),o=n.lgiDictFrame??n.vpFrame;if(!o)throw new r.A("geospatial-pdf-layer:load","pdf does not contain supported LGIDict or VP/Measure.");const s=new R(o),a=s.spatialReference.toJSON();return{frame:s,sourceSpatialReference:a,fullExtent:s.toExtent()}}async render(e,t,i,n,r,o){const s={sourceExtentAsJSON:e.toJSON(),width:t,height:i,ctm:n,currentRing:r};return this._workerHandler.renderPDF(s,o)}};se=(0,n.Cg)([(0,l.$K)("esri.layers.geospatialPDF.GeospatialPDFWorkerClient")],se);var ae=i(49859),le=i(14140),ce=i(87186);let ue=class extends ae.A{constructor(){super(...arguments),this._workerClient=new se,this._extent=null,this._ctm=null,this._neatlineRing=[],this._width=0,this._height=0,this._tileSize=512,this.datasetFormat="PDF",this.frame=null,this.neatlineExtent=null,this.page=1,this.tileType="Raster"}destroy(){this._workerClient.destroy(),this.neatlineExtent=null,this._extent=null,this._ctm=null,this._neatlineRing=[]}async fetchRawTile(e,t,i,n={}){const r=this._extent,o=this._ctm,s=this.getTileExtentPDF(e,t,i);return s.intersects(r)?function(e){return new le.A({width:e.width,height:e.height,pixelType:"u8",pixels:[e.red,e.green,e.blue],mask:e.mask})}(await this._workerClient.render(s,this._tileSize,this._tileSize,o,this._neatlineRing,n)):null}async _open(e){if(!this.url)throw new r.A("geospatial-pdf-raster:open","GeospatialPDFRaster requires a url.");const t=await this._workerClient.loadPDF({url:this.url,page:this.page},e);this.frame=t.frame;const i=this.frame.outerExtentMediabox;if(!i)throw new r.A("geospatial-pdf-raster:open","Failed to compute Geospatial PDF extent.");this.neatlineExtent=t.fullExtent,this._extent=i,this._ctm=this.frame.ctm,this._neatlineRing=this.frame.sourceMediaBoxPolygon.rings[0];const n=function(e,t){const[i,n,o,s]=e,a=i*s-n*o;if(!Number.isFinite(a)||0===a)throw new r.A("geospatial-pdf-raster:open","Failed to derive raster dimensions from an invalid PDF CTM.");const l=10*Math.hypot(s,n)/Math.abs(a),c=10*Math.hypot(o,i)/Math.abs(a),u=Math.max(1,Math.ceil(t.width*l)),h=Math.max(1,Math.ceil(t.height*c));if(!Number.isFinite(u)||!Number.isFinite(h))throw new r.A("geospatial-pdf-raster:open","PDF CTM produced invalid raster dimensions.");return[u,h]}(this.frame.ctm,this._extent);this._width=n[0],this._height=n[1];const o={x:i.width/this._width,y:i.height/this._height},s=new ce.A({width:this._width,height:this._height,pixelType:"u8",extent:i,pixelSize:o,spatialReference:i.spatialReference,bandCount:3,keyProperties:{DataType:"Processed"}});this.createRemoteDatasetStorageInfo(s,this._tileSize,this._tileSize),this._set("rasterInfo",s),this.updateTileInfo()}getTileExtentPDF(e,t,i){const n=this._extent,r=2**e,o=n.width/this._width*r,s=n.height/this._height*r,a=new m.A({x:n.xmin,y:n.ymax});return this.getTileExtent({x:o,y:s},t,i,a,n.spatialReference,[512,512])}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],ue.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,l.MZ)({constructOnly:!0})],ue.prototype,"page",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],ue.prototype,"tileType",void 0),ue=(0,n.Cg)([(0,l.$K)("esri.layers.raster.datasets.GeospatialPDFRaster")],ue);var he=i(34930),pe=i(60694),de=i(13868),fe=i(87045),ge=i(36280),me=i(12711),_e=i(85676),ye=i(93223);let we=class extends((0,p.dM)((0,g.j)((0,d.A)((0,f.G)((0,s.M)(h.A)))))){constructor(e){super(e),this.interpolation="bilinear",this.renderer=null,this.serviceRasterInfo=null,this.symbolizer=null,this._frame=null,this.clippedToNeatline=!0,this.neatlineVisible=!0,this.raster=null,this.spatialReference=null,this.type="geospatial-pdf"}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["PDF"],supportsData:!1},e).catch(a.QP).then(()=>this._openRaster(e?.signal))),Promise.resolve(this)}destroy(){this._shutdownJobHandler(),this.raster?.destroy()}get fullExtent(){return this.serviceRasterInfo?.extent}set url(e){this._set("url",(0,pe.Jf)(e,o.A.getLogger(this)))}async fetchImageBitmapTile(){throw new r.A("geospatial-pdf-layer:fetch-image-bitmap-tile","GeospatialPDFLayer does not expose pre-rendered image tile URLs.")}async fetchPixels(e,t,i,n={}){return xe(this),await this._initJobHandler(),this.raster.fetchPixels(e,Math.round(t),Math.round(i),n)}async fetchTile(e,t,i,n={}){if(xe(this),n.requestAsImageElement)throw new r.A("geospatial-pdf-layer:fetch-tile","GeospatialPDFLayer does not support requestAsImageElement.");await this._initJobHandler();const o=await this.raster.fetchTile(e,t,i,n);return this.clippedToNeatline&&o.pixelBlock&&this._frame&&o.srcExtent&&(o.pixelBlock=await(0,he.$Q)(o.pixelBlock,o.srcExtent,this._frame.sourceNeatlinePolygon)),o}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const n=(0,u.Vp)(e);return fe.A.create({size:256,spatialReference:e,origin:n?{x:n.origin[0],y:n.origin[1]}:{x:t.xmin,y:t.ymax}})}getRawDisplayBandIds(){return xe(this),[0,1,2]}_configDefaultSettings(){this._configPDFSymbolizer()}_configPDFSymbolizer(){xe(this);const{rasterInfo:e}=this.raster,t=new ge.A({stretchType:"none",useGamma:!1}),i=(0,me.$P)(t.toJSON());this._set("renderer",t),this.symbolizer?(this.symbolizer.rendererJSON=i,this.symbolizer.rasterInfo=e):this.symbolizer=new _e.A({rendererJSON:i,rasterInfo:e});const n=this.symbolizer.bind();n.success||o.A.getLogger(this).warn("geospatial-pdf-layer",n.error||"The fixed GeospatialPDFLayer renderer is not supported.")}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(()=>{this._rasterJobHandler&&(xe(this),this.raster.rasterJobHandler=this._rasterJobHandler)}).catch(()=>{})}async _openRaster(e){const t=new ue({url:this.url});if(await t.open({signal:e}),!t.rasterInfo)throw t.destroy(),new r.A("geospatialpdf-layer:load","cannot load resources on "+this.url);const{rasterInfo:i}=t;this._set("serviceRasterInfo",i),this.setAtOrigin("spatialReference",i.spatialReference,"service"),this.setAtOrigin("tileInfo",t.rasterInfo.storageInfo.tileInfo,"service"),this._frame=t.frame,this.raster=t,this._configDefaultSettings()}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}};function xe(e){if(!e.raster||!e.serviceRasterInfo)throw new r.A("imagery-tile","no raster")}(0,n.Cg)([(0,ye.e)(de.SZ)],we.prototype,"interpolation",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,clonable:!1,json:{read:!1}})],we.prototype,"renderer",void 0),(0,n.Cg)([(0,l.MZ)()],we.prototype,"serviceRasterInfo",void 0),(0,n.Cg)([(0,l.MZ)({clonable:!1})],we.prototype,"symbolizer",void 0),(0,n.Cg)([(0,l.MZ)({clonable:!1})],we.prototype,"_compatibleFullExtent",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean})],we.prototype,"clippedToNeatline",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1}})],we.prototype,"fullExtent",null),(0,n.Cg)([(0,l.MZ)({type:Boolean})],we.prototype,"neatlineVisible",void 0),(0,n.Cg)([(0,l.MZ)()],we.prototype,"raster",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,type:c.A,json:{read:!1}})],we.prototype,"spatialReference",void 0),(0,n.Cg)([(0,l.MZ)({type:fe.A})],we.prototype,"tileInfo",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,value:"geospatial-pdf"})],we.prototype,"type",void 0),(0,n.Cg)([(0,l.MZ)()],we.prototype,"url",null),we=(0,n.Cg)([(0,l.$K)("esri.layers.GeospatialPDFLayer")],we);const Pe=we},91806(e,t,i){i.d(t,{A:()=>l});var n,r=i(32198),o=i(25482),s=i(91429),a=i(78888);let l=class extends o.o{static{n=this}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 n({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),(0,r.Cg)([(0,s.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),(0,r.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),(0,r.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=n=(0,r.Cg)([(0,s.$K)("esri.layers.support.LOD")],l)},87045(e,t,i){i.d(t,{A:()=>w});var n,r=i(32198),o=i(66552),s=i(25482),a=i(86211),l=i(91429),c=i(78888),u=i(86738),h=i(16930),p=i(21325),d=i(28735),f=i(91806),g=i(72802),m=i(36005),_=i(43937);const y=new o.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 w=class extends s.o{static{n=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:o=h.A.WebMercator,numLODs:s=24}=e;if(!(0,p.fn)(o)){const e=[];if(i)for(let t=0;t<i.length;t++){const n=i[t];e.push(new f.A({level:t,scale:n,resolution:n}))}else{let t=5e-4;for(let i=s-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new n({dpi:96,lods:e,origin:new u.A(0,0,o),size:[r,r],spatialReference:o})}const l=(0,p.Vp)(o),c=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:o}):new u.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:o}:{x:0,y:0,spatialReference:o}),d=1/(39.37*(0,a.GA)(o)*96),g=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],n=t*d;g.push(new f.A({level:e,scale:t,resolution:n}))}else{let e=(0,p.EA)(o)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(s/t);g.push(new f.A({level:0,scale:e,resolution:e*d}));for(let n=1;n<i;n++){const i=e/2**t,r=i*d;g.push(new f.A({level:n,scale:i,resolution:r})),e=i}}return new n({dpi:96,lods:g,origin:c,size:[r,r],spatialReference:o})}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 i=(0,p.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const n=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{n.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e})),this._set("scales",n),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 i=Math.floor(e),n=i+1;return t[i]/(t[i]/t[n])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let n=0;for(;n<i;n++){const i=t[n],r=t[n+1];if(i<=e)return n;if(r===e)return n+1;if(i>e&&r<e)return n+Math.log(i/e)/Math.log(i/r)}return n}tileAt(e,t,i,n){const r=this.lodAt(e);if(!r)return null;let o,s;if("number"==typeof t)o=t,s=i;else if((0,p.aI)(t.spatialReference,this.spatialReference))o=t.x,s=t.y,n=i;else{const e=(0,d.Cv)(t,this.spatialReference);if(null==e)return null;o=e.x,s=e.y,n=i}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return n??=new g.U(0,0,0),n.level=e,n.row=Math.floor((this.origin.y-s)/l+.001),n.col=Math.floor((o-this.origin.x)/a+.001),this.updateTileInfo(n),n}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const n=e.level-i.level,r=i.resolution*this.size[0]/2**n,o=i.resolution*this.size[1]/2**n;return e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o,!0}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 i=this.lodAt(t.level);if(null==i)return null;const{resolution:n}=i,r=n*this.size[0],o=n*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*o,e[2]=e[0]+r,e[3]=e[1]+o,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return n.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 i=[],r=this.lods.length-t;for(let e=0;e<r;e++){const n=e+t,{scale:r,resolution:o}=n>=0?this.lods[n]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new f.A({level:e,scale:r,resolution:o}))}return new n({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const n=e[i];this._upsampleLevels[n.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/n.resolution:0},t=n}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:y.read,write:y.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,r.Cg)([(0,m.w)("origin")],w.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[f.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,r.Cg)([(0,m.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,r.Cg)([(0,_.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],w.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=n=(0,r.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],w)},72802(e,t,i){i.d(t,{U:()=>r});var n=i(19419);class r{constructor(e,t,i,r=(0,n.vt)()){this._level=e,this._row=t,this._col=i,this.extent=r}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new r(e.level,e.row,e.col,e.extent)}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3981],{83349(t,e,n){n.d(e,{e:()=>s});const r=new Set;let i=!1;function s(t,e,n=2){const i=e&&e.length,s=i?e[0]*n:t.length;r.size&&r.clear();let a=o(t,0,s,n,!0);const l=[];if(!a||a.next===a.prev)return l;let c=0,u=0,f=0;if(i&&(a=x(t,e,a,n)),t.length>80*n){c=t[0],u=t[1];let e=c,r=u;for(let i=n;i<s;i+=n){const n=t[i],s=t[i+1];n<c&&(c=n),s<u&&(u=s),n>e&&(e=n),s>r&&(r=s)}f=Math.max(e-c,r-u),f=0!==f?32767/f:0}return h(a,l,c,u,f),l}function o(t,e,n,r,i){let s=null;if(i===Y(t,e,n,r)>0)for(let i=e;i<n;i+=r)s=O(i/r|0,t[i],t[i+1],s);else for(let i=n-r;i>=e;i-=r)s=O(i/r|0,t[i],t[i+1],s);return s&&R(s,s.next)&&(G(s),s=s.next),s}function a(t,e=t){const n=e===t;let s,o=t;do{s=!1,o===o.next||0!==r.size&&r.has(o)||!R(o,o.next)&&0!==C(o.prev,o,o.next)?(n||o!==e)&&(o=o.next,s=!n):((n||o===e)&&(e=o.prev),i=!0,G(o),o=o.prev,s=!0)}while(s||o!==e);return e}function h(t,e,n,r,s){s&&function(t,e,n,r){let i=t,s=0;do{i.z=N(i.x,i.y,e,n,r),T[s++]=i,i=i.next}while(i!==t);!function(t){if(t<=32)for(let e=1;e<t;e++){const t=T[e],n=t.z;let r=e-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=t}else{A.length<t&&(A=new Uint32Array(t),S=new Uint32Array(t),v=new Array(t));for(let e=0;e<t;e++)A[e]=T[e].z;k(t,T,A,v,S,0),k(t,v,S,T,A,8),k(t,T,A,v,S,16),k(t,v,S,T,A,24)}}(s);let o=null;for(let t=0;t<s;t++){const e=T[t];e.prevZ=o,o&&(o.nextZ=e),o=e}o.nextZ=null,T.fill(null,0,s),v.fill(null,0,s)}(t,n,r,s);let o=t,h=!1;for(;t.prev!==t.next;){const d=t.prev,x=t.next;if(C(d,t,x)<0&&(s?c(t,n,r,s):l(t)))e.push(d.i,t.i,x.i),G(t),t=x,o=x;else if((t=x)===o){if(i=!1,t=a(t),i){o=t;continue}if(!h){o=t=u(t,e),h=!0;continue}f(t,e,n,r,s);break}}}function l(t){const e=t.prev,n=t,r=t.next,i=e.x,s=n.x,o=r.x,a=e.y,h=n.y,l=r.y,c=Math.min(i,s,o),u=Math.min(a,h,l),f=Math.max(i,s,o),d=Math.max(a,h,l);let x=r.next;for(;x!==e;){if(x.x>=c&&x.x<=f&&x.y>=u&&x.y<=d&&(i!==x.x||a!==x.y)&&V(i,a,s,h,o,l,x.x,x.y)&&C(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function c(t,e,n,r){const i=t.prev,s=t,o=t.next,a=i.x,h=s.x,l=o.x,c=i.y,u=s.y,f=o.y,d=Math.min(a,h,l),x=Math.min(c,u,f),y=Math.max(a,h,l),g=Math.max(c,u,f),p=N(d,x,e,n,r),_=N(y,g,e,n,r);let m=t.prevZ;for(;m&&m.z>=p;){if(m.x>=d&&m.x<=y&&m.y>=x&&m.y<=g&&m!==o&&(a!==m.x||c!==m.y)&&V(a,c,h,u,l,f,m.x,m.y)&&C(m.prev,m,m.next)>=0)return!1;m=m.prevZ}let I=t.nextZ;for(;I&&I.z<=_;){if(I.x>=d&&I.x<=y&&I.y>=x&&I.y<=g&&I!==o&&(a!==I.x||c!==I.y)&&V(a,c,h,u,l,f,I.x,I.y)&&C(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function u(t,e){let n=t,r=!1;do{const i=n.prev,s=n.next.next;E(i,n,n.next,s,!1)&&F(i,s)&&F(s,i)&&(e.push(i.i,n.i,s.i),G(n),G(n.next),n=t=s,r=!0),n=n.next}while(n!==t);return r?a(n):n}function f(t,e,n,r,i){let s=t;do{let t=s.next.next;for(;t!==s.prev;){if(s.i!==t.i&&z(s,t)){let o=U(s,t);return s=a(s,s.next),o=a(o,o.next),h(s,e,n,r,i),void h(o,e,n,r,i)}t=t.next}s=s.next}while(s!==t)}let d=!1;function x(t,e,n,i){const s=[];for(let n=0,a=e.length;n<a;n++){const h=o(t,e[n]*i,n<a-1?e[n+1]*i:t.length,i,!1);h===h.next&&r.add(h),s.push(B(h))}s.sort(y),function(t,e){const n=Math.ceil((t+2*e)/16)+e+2;p.length<4*n&&(p=new Float64Array(4*n)),_=0}(t.length/i,e.length),w(n,n),d=!0;for(let t=0;t<s.length;t++)n=g(s[t],n);return d=!1,a(n)}function y(t,e){return t.x-e.x||t.y-e.y||(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}function g(t,e){const n=function(t,e){let n=e;const r=t.x,i=t.y;let s,o=-1/0;if(R(t,n))return n;for(let e=0,a=0;e<_;e++,a+=4){if(i<p[a+1]||i>p[a+3]||p[a]>r||p[a+2]<=o)continue;const h=b(e);n=P(e);do{if(n.prev.next===n){if(R(t,n.next))return n.next;if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const t=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>o&&(o=t,s=n.x<n.next.x?n:n.next,t===r))return s}}n=n.next}while(n!==h)}if(!s)return null;const a=s.x,h=s.y,l=Math.min(i,h),c=Math.max(i,h);let u=1/0;for(let e=0,f=0;e<_;e++,f+=4){if(p[f+2]<a||p[f]>r||p[f+3]<l||p[f+1]>c)continue;const d=b(e);n=P(e);do{if(n.prev.next===n&&r>=n.x&&n.x>=a&&r!==n.x&&V(i<h?r:o,i,a,h,i<h?o:r,i,n.x,n.y)){const e=Math.abs(i-n.y)/(r-n.x);(F(n,t)||n.y===i&&n.next.y===i&&n.next.x>r)&&(e<u||e===u&&(n.x>s.x||n.x===s.x&&M(s,n)))&&(s=n,u=e)}n=n.next}while(n!==d)}return s}(t,e);if(!n)return e;const r=U(n,t);return w(n,r.next.next),a(r,r.next),a(n,n.next)}let p=new Float64Array(0),_=0;const m=[],I=[];function w(t,e){let n=t;do{const t=_++;m[t]=n;let r=1/0,i=1/0,s=-1/0,o=-1/0,a=0;do{const e=n.next;n.z=t,n.x<r&&(r=n.x),n.x>s&&(s=n.x),n.y<i&&(i=n.y),n.y>o&&(o=n.y),e.x<r&&(r=e.x),e.x>s&&(s=e.x),e.y<i&&(i=e.y),e.y>o&&(o=e.y),n=e}while(++a<16&&n!==e);I[t]=n;const h=4*t;p[h]=r,p[h+1]=i,p[h+2]=s,p[h+3]=o}while(n!==e)}function b(t){let e=I[t];for(;e.prev.next!==e;)e=e.next;return I[t]=e,e}function P(t){let e=m[t];for(;e.prev.next!==e;)e=e.next;return m[t]=e,e}function M(t,e){return C(t.prev,t,e.prev)<0&&C(e.next,t,t.next)<0}const T=[];let v=[],A=new Uint32Array(0),S=new Uint32Array(0);const L=new Uint32Array(256);function k(t,e,n,r,i,s){L.fill(0);for(let e=0;e<t;e++)L[n[e]>>>s&255]++;let o=0;for(let t=0;t<256;t++){const e=L[t];L[t]=o,o+=e}for(let o=0;o<t;o++){const t=n[o],a=L[t>>>s&255]++;r[a]=e[o],i[a]=t}}function N(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function B(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function V(t,e,n,r,i,s,o,a){return(i-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(r-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(i-o)*(r-a)}function z(t,e){const n=R(t,e)&&C(t.prev,t,t.next)>0&&C(e.prev,e,e.next)>0;return t.next.i!==e.i&&(n||F(t,e)&&F(e,t)&&(0!==C(t.prev,t,e.prev)||0!==C(t,e.prev,e)))&&!function(t,e){const n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),s=Math.max(t.y,e.y);let o=t;do{const a=o.next;if(o.x>r&&a.x>r||o.x<n&&a.x<n||o.y>s&&a.y>s||o.y<i&&a.y<i)o=a;else{if(o.i!==t.i&&a.i!==t.i&&o.i!==e.i&&a.i!==e.i&&E(o,a,t,e))return!0;o=a}}while(o!==t);return!1}(t,e)&&(n||function(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,s=(t.y+e.y)/2;do{const t=n.next;n.y>s!=t.y>s&&i<(t.x-n.x)*(s-n.y)/(t.y-n.y)+n.x&&(r=!r),n=t}while(n!==t);return r}(t,e))}function C(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function R(t,e){return t.x===e.x&&t.y===e.y}function E(t,e,n,r,i=!0){const s=C(t,e,n),o=C(t,e,r),a=C(n,r,t),h=C(n,r,e);return(s>0&&o<0||s<0&&o>0)&&(a>0&&h<0||a<0&&h>0)||!!i&&(!(0!==s||!D(t,n,e))||!(0!==o||!D(t,r,e))||!(0!==a||!D(n,t,r))||!(0!==h||!D(n,e,r)))}function D(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function F(t,e){return C(t.prev,t,t.next)<0?C(t,e,t.next)>=0&&C(t,t.prev,e)>=0:C(t,e,t.prev)<0||C(t,t.next,e)<0}function U(t,e){const n=Z(t.i,t.x,t.y),r=Z(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function O(t,e,n,r){const i=Z(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function G(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),d&&function(t,e){const n=4*t.z;e.x<p[n]&&(p[n]=e.x),e.y<p[n+1]&&(p[n+1]=e.y),e.x>p[n+2]&&(p[n+2]=e.x),e.y>p[n+3]&&(p[n+3]=e.y)}(t.prev,t.next)}function Z(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Y(t,e,n,r){let i=0;for(let s=e,o=n-r;s<n;s+=r)i+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return i}let W,q,j,K,J,H=0,$=0;function Q(t,e,n,r,i,s){return(n-t)*(s-e)-(r-e)*(i-t)}function X(t,e,n,r,i,s,o,a){const h=t-o,l=e-a,c=n-o,u=r-a,f=i-o,d=s-a,x=h*h+l*l,y=c*c+u*u,g=f*f+d*d,p=x+y+g;return h*(u*g-y*d)-l*(c*g-y*f)+x*(c*d-u*f)<=1e-13*p*p}function tt(t){return t-t%3+(t+1)%3}s.deviation=function(t,e,n,r){const i=e&&e.length,s=i?e[0]*n:t.length;let o=Math.abs(Y(t,0,s,n));if(i)for(let r=0,i=e.length;r<i;r++){const s=e[r]*n,a=r<i-1?e[r+1]*n:t.length;o-=Math.abs(Y(t,s,a,n))}let a=0;for(let e=0;e<r.length;e+=3){const i=r[e]*n,s=r[e+1]*n,o=r[e+2]*n;a+=Math.abs((t[i]-t[o])*(t[s+1]-t[i+1])-(t[i]-t[s])*(t[o+1]-t[i+1]))}return 0===o&&0===a?0:Math.abs((a-o)/o)},s.flatten=function(t){const e=[],n=[],r=t[0][0].length;let i=0,s=0;for(const o of t){for(const t of o)for(let n=0;n<r;n++)e.push(t[n]);s&&(i+=s,n.push(i)),s=o.length}return{vertices:e,holes:n,dimensions:r}},s.refine=function(t,e,n=2){const r=t,i=r.length;if(i<6)return;(function(t){(!W||W.length<t)&&(W=new Int32Array(t)),(!q||q.length<t)&&(q=new Int32Array(t)),(!J||J.length<t)&&(J=new Uint8Array(t));let e=1;for(;e<4*t;)e<<=1;(!j||j.length<e)&&(j=new Int32Array(e),K=new Uint32Array(e)),H=e-1})(i),$++,q.fill(-1,0,i);let s=0;for(let t=0;t<i;t++){const e=r[t],n=r[tt(t)],i=e<n?e:n,o=e<n?n:e;let a=(Math.imul(i,2654435761)^Math.imul(o,2246822507))&H;for(;K[a]===$;){const e=j[a];if(-1!==e){const n=r[e],h=r[tt(e)];if(n===i&&h===o||n===o&&h===i){q[t]=e,q[e]=t,j[a]=-1,J[e]=1,W[s++]=e;break}}a=a+1&H}K[a]!==$&&(j[a]=t,K[a]=$)}for(;s>0;){const t=W[--s];J[t]=0;const i=q[t];if(-1===i)continue;const o=t-t%3,a=i-i%3,h=o+(t+2)%3,l=o+(t+1)%3,c=a+(i+2)%3,u=a+(i+1)%3,f=r[h],d=r[t],x=r[l],y=r[c],g=e[f*n],p=e[f*n+1],_=e[d*n],m=e[d*n+1],I=e[x*n],w=e[x*n+1],b=e[y*n],P=e[y*n+1];if(!X(g,p,_,m,I,w,b,P)&&Q(g,p,_,m,b,P)>0&&Q(g,p,b,P,I,w)>0){r[t]=y,r[i]=f;const e=q[c],n=q[h];q[t]=e,-1!==e&&(q[e]=t),q[i]=n,-1!==n&&(q[n]=i),q[h]=c,q[c]=h,-1!==e&&0===J[t]&&(J[t]=1,W[s++]=t),-1!==n&&0===J[i]&&(J[i]=1,W[s++]=i),-1!==q[l]&&0===J[l]&&(J[l]=1,W[s++]=l),-1!==q[u]&&0===J[u]&&(J[u]=1,W[s++]=u)}}}},32488(t,e,n){n.d(e,{A:()=>T});const r=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],i=["آ","أ","إ","ا"],s=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],h=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],l=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],c=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],d=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],x=["ء","ف"],y=["غ","ي"],g=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_=10,m=11,I=12,w=18,b=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],P=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],M=[[w,w,w,w,w,w,w,w,w,6,5,6,8,5,w,w,w,w,w,w,w,w,w,w,w,w,w,w,5,5,5,6,8,4,4,m,m,m,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,w,w,w,w,w,w,5,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,9,4,m,m,m,m,4,4,4,4,0,4,4,w,4,4,m,m,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,1,I,1,I,I,1,I,I,1,I,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,m,m,7,9,7,4,4,I,I,I,I,I,I,I,I,I,I,I,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,3,3,3,3,3,3,3,3,3,3,m,3,3,7,7,7,I,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,3,4,I,I,I,I,I,I,7,7,I,I,4,I,I,I,I,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,I,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,I,I,I,I,I,I,I,I,I,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,w,w,w,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,m,m,m,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,w,w,w,w,w,4,4,4,4,4,w,w,w,w,w,w,2,0,4,4,2,2,2,2,2,2,_,_,4,4,4,0,2,2,2,2,2,2,2,2,2,2,_,_,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,I,1,1,1,1,1,1,1,1,1,1,_,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,m,4,4,_,_,4,4,4,4,4,m,m,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,w],[4,4,4,m,m,m,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,m,m,4,4,4,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class T{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,n){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,n){j=[],J=[];for(let r=0;r<n;r++)t[r]=r,e[r]=r,j[r]=r}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,n))return t;e=this.inputFormat,n=this.outputFormat;let r=t;const a=H,c=Z(e.charAt(1)),f=Z(n.charAt(1)),x=(e.startsWith("I")?"L":e.charAt(0))+c,y=(n.startsWith("I")?"L":n.charAt(0))+f,g=e.charAt(2)+n.charAt(2);a.defInFormat=x,a.defOutFormat=y,a.defSwap=g;const p=v(t,x,y,g,a);let _=!1;return"R"===n.charAt(1)?_=!0:"C"!==n.charAt(1)&&"D"!==n.charAt(1)||(_="rtl"===this.checkContextual(p)),this.sourceToTarget=j,this.targetToSource=function(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[t[n]]=n;return e}(this.sourceToTarget),K=this.targetToSource,r=e.charAt(3)===n.charAt(3)?p:"S"===n.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const n=(e=String(e)).split("");let r=0,i=1,a=n.length;t||(r=n.length-1,i=-1,a=1);const c=function(t,e,n,r){let i=0;const a=[];let c=0;for(let f=e;f*n<r;f+=n)if(V(t[f])||G(t[f])){if("ل"===t[f]&&C(t,f+n,n,r)){t[f]=W(t[f+n],0===i?s:o),f+=n,Y(t,f,n,r),a[c]=f,c++,i=0;continue}const e=t[f];1===i?t[f]=z(t,f+n,n,r)?U(t[f]):O(t[f],l):!0===z(t,f+n,n,r)?t[f]=O(t[f],u):t[f]=O(t[f],h),G(e)||(i=1),!0===F(e)&&(i=0)}else i=0;return a}(n,r,i,a);let f="";for(let e=0;e<n.length;e++)B(c,c.length,e)>-1?(q(K,e,!t,-1),j.splice(e,1)):f+=n[e];return f}(_,p):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let n="";const r=(t=String(t)).split("");for(let s=0;s<t.length;s++){let o=!1;if(r[s]>="ﹰ"&&r[s]<"\ufeff"){const a=t.charCodeAt(s);r[s]>="ﻵ"&&r[s]<="ﻼ"?(e?(s>0&&" "===r[s-1]?n=n.slice(0,-1)+"ل":(n+="ل",o=!0),n+=i[(a-65269)/2]):(n+=i[(a-65269)/2],n+="ل",s+1<t.length&&" "===r[s+1]?s++:o=!0),o&&(q(K,s,!0,1),j.splice(s,0,j[s]))):n+=d[a-65136]}else n+=r[s]}return n}(p,_),this.sourceToTarget=j,this.targetToSource=K,this.levels=J,r}_inputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=A(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return nt.test(t)}}function v(t,e,n,r,i){const s=function(t,e,n){if(void 0===e.inFormat&&(e.inFormat=n.defInFormat),void 0===e.outFormat&&(e.outFormat=n.defOutFormat),void 0===e.swap&&(e.swap=n.defSwap),e.inFormat===e.outFormat)return e;const r=e.inFormat.slice(0,1),i=e.outFormat.slice(0,1);let s,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(s=A(t),o="ltr"===s||"rtl"===s?s.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=r+o),a.startsWith("C")&&(s=A(t),"rtl"===s?a="RTL":"ltr"===s?(s=function(t){const e=t.split("");return e.reverse(),A(e.join(""))}(t),a=s.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=i+a),e}(t,{inFormat:e,outFormat:n,swap:r},i);if(s.inFormat===s.outFormat)return t;e=s.inFormat,n=s.outFormat,r=s.swap;const o=e.slice(0,1),a=e.slice(1,4),h=n.slice(0,1),l=n.slice(1,4);if(i.inFormat=e,i.outFormat=n,i.swap=r,"L"===o&&"VLTR"===n){if("LTR"===a)return i.dir=X,S(t,i);if("RTL"===a)return i.dir=tt,S(t,i)}if("V"===o&&"V"===h)return i.dir="RTL"===a?tt:X,N(t,i);if("L"===o&&"VRTL"===n)return"LTR"===a?(i.dir=X,t=S(t,i)):(i.dir=tt,t=S(t,i)),N(t);if("VLTR"===e&&"LLTR"===n)return i.dir=X,S(t,i);if("V"===o&&"L"===h&&a!==l)return t=N(t),"RTL"===a?v(t,"LLTR","VLTR",r,i):v(t,"LRTL","VRTL",r,i);if("VRTL"===e&&"LRTL"===n)return v(t,"LRTL","VRTL",r,i);if("L"===o&&"L"===h){const e=i.swap;return i.swap=e.slice(0,1)+"N","RTL"===a?(i.dir=tt,t=S(t,i),i.swap="N"+e.slice(1,3),i.dir=X,t=S(t,i)):(i.dir=X,t=S(t,i),i.swap="N"+e.slice(1,3),t=v(t,"VLTR","LRTL",i.swap,i)),t}return t}function A(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function S(t,e){const n=t.split(""),r=[];return L(n,r,e),function(t,e,n){if(0!==n.hiLevel&&n.swap[0]!==n.swap[1])for(let n=0;n<t.length;n++)1===e[n]&&(t[n]=D(t[n]))}(n,r,e),R(2,n,r,e),R(1,n,r,e),J=r,n.join("")}function L(t,e,n){const r=t.length,i=n.dir?p:g;let s=0,o=-1;const a=[],h=[];n.hiLevel=n.dir,n.lastArabic=!1,n.hasUbatAl=!1,n.hasUbatB=!1,n.hasUbatS=!1;for(let e=0;e<r;e++)a[e]=k(t[e]);for(let l=0;l<r;l++){const r=s,c=E(t,a,h,l,n);h[l]=c,s=i[r][c];const u=240&s;s&=15;const f=i[s][$];if(e[l]=f,u>0)if(16===u){for(let t=o;t<l;t++)e[t]=1;o=-1}else o=-1;if(i[s][Q])-1===o&&(o=l);else if(o>-1){for(let t=o;t<l;t++)e[t]=f;o=-1}5===a[l]&&(e[l]=0),n.hiLevel|=f}n.hasUbatS&&function(t,e,n,r){for(let i=0;i<n;i++)if(6===t[i]){e[i]=r.dir;for(let n=i-1;n>=0&&8===t[n];n--)e[n]=r.dir}}(a,e,r,n)}function k(t){const e=t.charCodeAt(0),n=P[e>>8];return n<100?n:M[n-100][255&e]}function N(t,e){const n=t.split("");if(e){const t=[];L(n,t,e),J=t}return n.reverse(),j.reverse(),n.join("")}function B(t,e,n){for(let r=0;r<e;r++)if(t[r]===n)return r;return-1}function V(t){for(let e=0;e<x.length;e++)if(t>=x[e]&&t<=y[e])return!0;return!1}function z(t,e,n,r){for(;e*n<r&&G(t[e]);)e+=n;return!!(e*n<r&&V(t[e]))}function C(t,e,n,r){for(;e*n<r&&G(t[e]);)e+=n;let s=" ";if(!(e*n<r))return!1;s=t[e];for(let t=0;t<i.length;t++)if(i[t]===s)return!0;return!1}function R(t,e,n,r){if(r.hiLevel<t)return;if(1===t&&r.dir===tt&&!r.hasUbatB)return e.reverse(),void j.reverse();const i=e.length;let s,o,a,h,l,c=0;for(;c<i;){if(n[c]>=t){for(s=c+1;s<i&&n[s]>=t;)s++;for(o=c,a=s-1;o<a;o++,a--)h=e[o],e[o]=e[a],e[a]=h,l=j[o],j[o]=j[a],j[a]=l;c=s}c++}}function E(t,e,n,r,i){const s=e[r];return{UBAT_L:()=>(i.lastArabic=!1,0),UBAT_R:()=>(i.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>i.lastArabic?3:2,UBAT_AL:()=>(i.lastArabic=!0,i.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,s;return r<1||r+1>=e.length||2!==(t=n[r-1])&&3!==t||2!==(s=e[r+1])&&3!==s?4:(i.lastArabic&&(s=3),s===t?s:4)},UBAT_ES:()=>2===(r>0?n[r-1]:5)&&r+1<e.length&&2===e[r+1]?2:4,UBAT_ET:()=>{if(r>0&&2===n[r-1])return 2;if(i.lastArabic)return 4;let t=r+1;const s=e.length;for(;t<s&&11===e[t];)t++;return t<s&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===i.inFormat){const n=e.length;let i=r+1;for(;i<n&&12===e[i];)i++;if(i<n){const n=t[r].charCodeAt(0),s=n>=1425&&n<=2303||64286===n,o=e[i];if(s&&(1===o||7===o))return 1}}return r<1||5===e[r-1]?4:n[r-1]},UBAT_B:()=>(i.lastArabic=!0,i.hasUbatB=!0,i.dir),UBAT_S:()=>(i.hasUbatS=!0,4),UBAT_LRE:()=>(i.lastArabic=!1,4),UBAT_RLE:()=>(i.lastArabic=!1,4),UBAT_LRO:()=>(i.lastArabic=!1,4),UBAT_RLO:()=>(i.lastArabic=!1,4),UBAT_PDF:()=>(i.lastArabic=!1,4),UBAT_BN:()=>4}[b[s]]()}function D(t){let e,n=0,i=r.length-1;for(;n<=i;)if(e=Math.floor((n+i)/2),t<r[e][0])i=e-1;else{if(!(t>r[e][0]))return r[e][1];n=e+1}return t}function F(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function U(t){for(let e=0;e<a.length;e++)if(t===a[e])return c[e];return t}function O(t,e){for(let n=0;n<a.length;n++)if(t===a[n])return e[n];return t}function G(t){return t>="ً"&&t<="ٕ"}function Z(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function Y(t,e,n,r){for(;e*n<r&&G(t[e]);)e+=n;return e*n<r&&(t[e]=" ",!0)}function W(t,e){for(let n=0;n<i.length;n++)if(t===i[n])return e[n];return t}function q(t,e,n,r){for(let i=0;i<t.length;i++)(t[i]>e||!n&&t[i]===e)&&(t[i]+=r)}let j=[],K=[],J=[];const H={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},$=5,Q=6,X=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,nt=/[\u0591-\u06ff\ufb1d-\ufefc]/},95488(t,e,n){n.d(e,{I:()=>i});var r=n(11406);class i extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},34304(t,e,n){n.d(e,{DF:()=>h,FD:()=>i,ct:()=>l});let r=1e-6;function i(){return r}const s=Math.random,o=Math.PI/180,a=180/Math.PI;function h(t){return t*o}function l(t){return t*a}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:s,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:h},Symbol.toStringTag,{value:"Module"})),n.d(e,["Ov",0,s])},51624(t,e,n){n.d(e,{A:()=>l});var r=n(44208),i=n(69397),s=n(93687);const o=4294967296,a=new TextDecoder("utf-8"),h=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class l{constructor(t,e,n=0,r=t?.byteLength??0){this._tag=0,this._dataType=99,this._init(t,e,n,r)}[Symbol.dispose](){this.release()}_init(t,e,n,r){this._data=t,this._dataView=e,this._pos=n,this._end=r}get usedMemory(){return 64+(0,i.Qf)(this._data)}asUnsafe(){return this}clone(){return new l(this._data,this._dataView,this._pos,this._end)}clonePooled(){return l.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(t,e,n=0,r=t?.byteLength??0){const i=l.pool.acquire();return i._init(t,e,n,r),i}pos(){return this._pos}move(t){this._pos=t}nextTag(t){for(;;){if(this._pos===this._end)return!1;const e=this._decodeVarint();if(this._tag=e>>3,this._dataType=7&e,!t||t===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const t=this._decodeVarint();return this._tag=t>>3,this._dataType=7&t,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let t=4294967295;if(t=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return t;throw new Error("Varint overflow")}getPackedEnd(){const t=this.getUInt32();return this._pos+t}getUInt64(){return this._decodeVarint()}getSInt32(){const t=this.getUInt32();return t>>>1^-(1&t)}getSInt64(){return this._decodeSVarint()}getBool(){const t=0!==this._data[this._pos];return this._skip(1),t}getEnum(){return this._decodeVarint()}getFixed64(){const t=this._dataView,e=this._pos,n=t.getUint32(e,!0)+t.getUint32(e+4,!0)*o;return this._skip(8),n}getSFixed64(){const t=this._dataView,e=this._pos,n=t.getUint32(e,!0)+t.getInt32(e+4,!0)*o;return this._skip(8),n}getDouble(){const t=this._dataView.getFloat64(this._pos,!0);return this._skip(8),t}getFixed32(){const t=this._dataView.getUint32(this._pos,!0);return this._skip(4),t}getSFixed32(){const t=this._dataView.getInt32(this._pos,!0);return this._skip(4),t}getFloat(){const t=this._dataView.getFloat32(this._pos,!0);return this._skip(4),t}getString(){const t=this._getLength(),e=this._pos,n=this._toString(this._data,e,e+t);return this._skip(t),n}getBytes(){const t=this._getLength(),e=this._pos,n=this._toBytes(this._data,e,e+t);return this._skip(t),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(t,e,n,r){const i=this.getMessage(),s=t(i,e,n,r);return i.release(),s}processMessage(t){const e=this.getMessage(),n=t(e);return e.release(),n}getMessage(){const t=this._getLength(),e=l.pool.acquire();return e._init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),e}release(){l.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(t){this._skip(t)}_skip(t){if(this._pos+t>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=t}_decodeVarint(){const t=this._data;let e=this._pos,n=0,r=0;if(this._end-e>=10)do{if(r=t[e++],n|=127&r,!(128&r))break;if(r=t[e++],n|=(127&r)<<7,!(128&r))break;if(r=t[e++],n|=(127&r)<<14,!(128&r))break;if(r=t[e++],n|=(127&r)<<21,!(128&r))break;if(r=t[e++],n+=268435456*(127&r),!(128&r))break;if(r=t[e++],n+=34359738368*(127&r),!(128&r))break;if(r=t[e++],n+=4398046511104*(127&r),!(128&r))break;if(r=t[e++],n+=562949953421312*(127&r),!(128&r))break;if(r=t[e++],n+=72057594037927940*(127&r),!(128&r))break;if(r=t[e++],n+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;e!==this._end&&(r=t[e],128&r);)++e,n+=(127&r)*i,i*=128;if(e===this._end)throw new Error("Varint overrun!");++e,n+=r*i}return this._pos=e,n}_decodeSVarint(){const t=this._data;let e,n=0,r=0;const i=1&t[this._pos];if(r=t[this._pos++],n|=127&r,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<7,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<14,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<21,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=268435456*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=34359738368*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=4398046511104*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(e=BigInt(n),r=t[this._pos++],e+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);if(r=t[this._pos++],e+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);if(r=t[this._pos++],e+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(t,e,n){if((n=Math.min(this._end,n))-e>h){const r=t.subarray(e,n);return a.decode(r)}let r="",i="";for(let s=e;s<n;++s){const e=t[s];128&e?i+="%"+e.toString(16):(r+=decodeURIComponent(i)+String.fromCharCode(e),i="")}return i.length&&(r+=decodeURIComponent(i)),r}_toBytes(t,e,n){return n=Math.min(this._end,n),new Uint8Array(t.buffer,e,n-e)}static{this.pool=new s.A(()=>new l(null,null),void 0,t=>{t._data=null,t._dataView=null})}}},36745(t,e,n){n.d(e,{z:()=>a});var r=n(4718),i=n(51118),s=n(60408),o=n(92722);class a{static fromOptimized(t,e,n=1){return(new h).initialize(t,e,n)}static fromJSON(t){const[e,n]=c(t),r=(0,s.Pv)(t),i=(0,s.W0)(t);return(new u).initialize(e,n,r,i,1)}static fromOptimizedCIM(t,e,n=1){return(new f).initialize(t,e,n)}static fromJSONCIM(t,e=1){const[n,r]=c(t),i=(0,s.Pv)(t),o=(0,s.W0)(t);return(new d).initialize(n,r,i,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),n=t.geometryType;return e&&n?this.fromOptimized(e,n):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),n=t.geometryType;return e&&n?this.fromOptimizedCIM(e,n):null}static createEmptyOptimized(t,e=!1,n=!1,r=1){return(new f).initialize(new o.A([],[],e,n),t,r)}static createEmptyJSON(t,e=!1,n=!1){return(new u).initialize([],t,e,n,1)}static createEmptyOptimizedCIM(t,e=!1,n=!1,r=1){return(new f).initialize(new o.A([],[],e,n),t,r)}static createEmptyJSONCIM(t,e=!1,n=!1,r=1){return(new d).initialize([],t,e,n,r)}asJSON(){const t=(0,i.x)(this),{hasZ:e,hasM:n}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:n}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:n?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:n}:{paths:t,hasZ:e,hasM:n}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,n=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const r=t,i=e;for(;this.nextPoint();)n+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return n+=(t-r)*(e+i),-.5*n}invertY(){this.yFactor*=-1}}class h extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,n){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=n,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,n=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],e.slice(n,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,n=this._geometry.coords;let r=0;for(let i=this._pathOffset+e;i<t;i+=e){const t=n[i-e],s=n[i-e+1],o=n[i]-t,a=n[i+1]-s;r+=Math.sqrt(o*o+a*a)}return r}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,n=this._end-this._stride;for(let r=0;r<this._stride;r++)if(t[e+r]!==t[n+r])return!1;return!0}clone(){return(new h).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function c(t){return(0,s.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,s.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,s.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,s.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,s.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class u extends a{initialize(t,e,n,r,i){return this._paths=t,this.geometryType=e,this.hasZ=n,this.hasM=r,this._pathIndex=this._pointIndex=-1,this.yFactor=i,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let n=0;for(let r=1;r<t;r++){const t=e[r-1],i=e[r],s=t[0],o=t[1],a=i[0]-s,h=i[1]-o;n+=Math.sqrt(a*a+h*h)}return n}startPath(){this._paths.push([])}getCurrentPath(){return(new u).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,i.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,n=new o.A([],[],t,e),{coords:r,lengths:i}=n;if("esriGeometryPoint"===this.geometryType)r.push(...this._paths[0][0]),i.length=0;else for(const n of this._paths){for(const i of n)r.push(i[0]),r.push(i[1]*this.yFactor),t&&r.push(i[2]),e&&r.push(i[this._mIndex]);i.push(n.length)}return n}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}clone(){return(new u).initialize((0,r.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class f extends h{initialize(t,e,n){return super.initialize(t,e,n),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new f).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends u{initialize(t,e,n,r,i){return super.initialize(t,e,n,r,i)}clone(){return(new d).initialize((0,r.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},51118(t,e,n){function r(t){const e=[];for(t.reset();t.nextPath();){const n=[];for(;t.nextPoint();){const e=[t.x,t.y];t.hasZ&&e.push(t.z),t.hasM&&e.push(t.m),n.push(e)}e.push(n)}return t.reset(),e}function i(t){const e=[];for(;t.nextPoint();)e.push([t.x,t.y]);return t.seekPathStart(),e}n.d(e,{A:()=>i,x:()=>r})},15585(t,e,n){n.d(e,{If:()=>d,O5:()=>p,O9:()=>y,QT:()=>g,l3:()=>x});var r=n(32198),i=n(2741),s=n(49186),o=n(44208),a=n(34727);let h=null,l=null,c=null,u=null;const f=(new Float32Array(0),new Uint32Array(0),new Uint32Array(0),new Uint32Array(0),{vertices:new Float64Array(0),indices:new Uint32Array(0),outlineIndices:new Uint32Array(0),outlineRingLengths:new Uint32Array(0),vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function d(){return h??=async function(){const t=await n.e(2997).then(()=>n(42997)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});c=e}(),h}async function x(){return l??=async function(){const t=await n.e(9134).then(()=>n(99134)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});u=e}(),l}function y(){return null!==u}function g(t,e,n=2){const i={stack:[],error:void 0,hasError:!1};try{const a=c;if(!a)throw new s.A("libtess:not-loaded","libtessF32 not loaded");const h=(0,r.mS)(i,w.from(a,t),!1),l=(0,r.mS)(i,P.from(a,e),!1),u=t.length/n*4,f=(0,r.mS)(i,new w(a,u*n),!1),d=a.triangulate(h.ptr,l.ptr,l.size,n,f.ptr,u);if((0,o.A)("esri-tessellation-debug")){const t=a.getError();0!==t&&console.warn("libtess:triangulation",M(t))}return{buffer:f.slice(0,d*n),vertexCount:d}}catch(t){i.error=t,i.hasError=!0}finally{(0,r.hk)(i)}}function p(t,e,n=2,i=!0){const h={stack:[],error:void 0,hasError:!1};try{const l=u;if(!l)throw new s.A("libtess:not-loaded","libtessF64 not loaded");const c=(0,r.mS)(h,b.from(l,t),!1),d=(0,r.mS)(h,P.from(l,e),!1),x=(0,r.mS)(h,new P(l,1),!1),y=(0,r.mS)(h,new P(l,1),!1),g=(0,r.mS)(h,new P(l,1),!1),p=(0,r.mS)(h,new P(l,1),!1),{maxVertexCount:_,maxIndexCount:m,maxOutlineIndexCount:w,maxOutlineRingCount:T}=function(t,e){const n=t.reduce((t,e)=>t+e,0),r=t.length,i=Math.max(0,t.length-1),s=Math.max(0,n+2*i-2),o=Math.max(0,Math.ceil(2*n)),h=Math.max(0,Math.ceil(3*s*2)),l=(0,a.mP)(h,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,u=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:o,maxIndexCount:l,maxOutlineIndexCount:e?Math.max(0,n+r+c):0,maxOutlineRingCount:e?Math.max(0,r+u):0}}(e,i);let v=0,A=0,S=0,L=0,k=0;{const t={stack:[],error:void 0,hasError:!1};try{const e=(0,r.mS)(t,new b(l,_*n),!1),s=(0,r.mS)(t,new P(l,m),!1),o=(0,r.mS)(t,i?new P(l,w):null,!1),a=(0,r.mS)(t,i?new P(l,T):null,!1);if(l.triangulateIndexed(c.ptr,d.ptr,d.size,n,e.ptr,_,n,s.ptr,m,x.ptr,y.ptr,o?.ptr??0,w,a?.ptr??0,T,g.ptr,p.ptr),k=l.getError(),v=I(l)[x.ptr/Int32Array.BYTES_PER_ELEMENT],A=I(l)[y.ptr/Int32Array.BYTES_PER_ELEMENT],S=I(l)[g.ptr/Int32Array.BYTES_PER_ELEMENT],L=I(l)[p.ptr/Int32Array.BYTES_PER_ELEMENT],0===k){const t=e.slice(0,v*n);return{vertices:t,indices:s.slice(0,A),outlineIndices:i&&o?o.slice(0,S):f.outlineIndices,outlineRingLengths:i&&a?a.slice(0,L):f.outlineRingLengths,vertexCount:v,indexCount:A,outlineIndexCount:i?S:0,outlineRingCount:i?L:0}}}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}if(100903!==k)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",M(k)),f;const N=(0,r.mS)(h,new b(l,v*n),!1),B=(0,r.mS)(h,new P(l,A),!1),V=(0,r.mS)(h,i?new P(l,S):null,!1),z=(0,r.mS)(h,i?new P(l,L):null,!1);if(l.triangulateIndexed(c.ptr,d.ptr,d.size,n,N.ptr,v,n,B.ptr,A,x.ptr,y.ptr,V?.ptr??0,i?S:0,z?.ptr??0,i?L:0,g.ptr,p.ptr),k=l.getError(),0!==k)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",M(k)),f;const C=I(l)[x.ptr/Int32Array.BYTES_PER_ELEMENT],R=I(l)[y.ptr/Int32Array.BYTES_PER_ELEMENT],E=I(l)[g.ptr/Int32Array.BYTES_PER_ELEMENT],D=I(l)[p.ptr/Int32Array.BYTES_PER_ELEMENT],F=N.slice(0,C*n);return{vertices:F,indices:B.slice(0,R),outlineIndices:i&&V?V.slice(0,E):f.outlineIndices,outlineRingLengths:i&&z?z.slice(0,D):f.outlineRingLengths,vertexCount:C,indexCount:R,outlineIndexCount:i?E:0,outlineRingCount:i?D:0}}catch(t){h.error=t,h.hasError=!0}finally{(0,r.hk)(h)}}function _(t){return t.HEAPF64}function m(t){return t.HEAPF32}function I(t){return t.HEAP32}class w{static from(t,e){const n=new w(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(t){m(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return m(this._libtess).slice(n+t,n+e)}}class b{static from(t,e){const n=new b(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(t){_(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return _(this._libtess).slice(n+t,n+e)}}class P{static from(t,e){const n=new P(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateLengthsArray(e)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(t){I(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return function(t){const e=I(t);return new Uint32Array(e.buffer,e.byteOffset,e.length)}(this._libtess).slice(n+t,n+e)}}function M(t){switch(t){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${t}`}}},537(t,e,n){n.d(e,{B$:()=>g,LJ:()=>p,Pj:()=>I,Rg:()=>x,Yz:()=>_,z8:()=>y});var r=n(19419),i=n(79567),s=n(52006);function o(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function a(t){return void 0!==t.points}function h(t){return void 0!==t.x&&void 0!==t.y}function l(t){return void 0!==t.paths}function c(t){return void 0!==t.rings}function u(t){return function(e,n){return null==e?n:null==n?e:t(e,n)}}const f=u(Math.min),d=u(Math.max);function x(t,e){return l(e)?_(t,e.curvePaths??e.paths,!1,!1)??t:c(e)?_(t,e.curveRings??e.rings,!1,!1)??t:a(e)?I(t,e.points,!1,!1,!1,!1):o(e)?m(t,e):(h(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.x,t[3]=e.y),t)}function y(t){let e,n,i,s;for(t.reset(),e=i=1/0,n=s=-1/0;t.nextPath();){const r=g(t);e=Math.min(r[0],e),i=Math.min(r[1],i),n=Math.max(r[2],n),s=Math.max(r[3],s)}return(0,r.vt)([e,i,n,s])}function g(t){let e,n,i,s;for(e=i=1/0,n=s=-1/0;t.nextPoint();)e=Math.min(t.x,e),i=Math.min(t.y,i),n=Math.max(t.x,n),s=Math.max(t.y,s);return(0,r.vt)([e,i,n,s])}function p(t,e){return l(e)?_(t,e.curvePaths??e.paths,!0,!1)??t:c(e)?_(t,e.curveRings??e.rings,!0,!1)??t:a(e)?I(t,e.points,!0,!1,!0,!1):o(e)?m(t,e,0,0,!0,!1):(h(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.x,t[4]=e.y,t[5]=e.z),t)}function _(t,e,n,o){const a=n?3:2;if(!e.length||!e[0].length)return null;let h,l,c,u,[x,y]=(0,s.yP)(e[0][0]),g=x,p=y;for(let t=0;t<e.length;t++){const _=e[t];for(let t=0;t<_.length;t++){const e=(0,s.yP)(_[t]),[m,I]=e;if(x=f(x,m),y=f(y,I),g=d(g,m),p=d(p,I),n&&e.length>2){const t=e[2];h=f(h,t),l=d(l,t)}if(o&&e.length>a){const t=e[a];c=f(c,t),u=d(u,t)}const w=_[t];if((0,s.Xq)(w)||t<1)continue;const b=(0,s.yP)(_[t-1]),P=(0,r.fA)(x,y,g,p);[x,y,g,p]=(0,i.e)(P,b,w)}}return n?o?(t[0]=x,t[1]=y,t[2]=h,t[3]=c,t[4]=g,t[5]=p,t[6]=l,t[7]=u,t.length=8,t):(t[0]=x,t[1]=y,t[2]=h,t[3]=g,t[4]=p,t[5]=l,t.length=6,t):o?(t[0]=x,t[1]=y,t[2]=c,t[3]=g,t[4]=p,t[5]=u,t.length=6,t):(t[0]=x,t[1]=y,t[2]=g,t[3]=p,t.length=4,t)}function m(t,e,n,r,i,s){const o=e.xmin,a=e.xmax,h=e.ymin,l=e.ymax;let c=e.zmin,u=e.zmax,f=e.mmin,d=e.mmax;return i?(c=c||0,u=u||0,s?(f=f||0,d=d||0,t[0]=o,t[1]=h,t[2]=c,t[3]=f,t[4]=a,t[5]=l,t[6]=u,t[7]=d,t):(t[0]=o,t[1]=h,t[2]=c,t[3]=a,t[4]=l,t[5]=u,t)):s?(f=f||0,d=d||0,t[0]=o,t[1]=h,t[2]=f,t[3]=a,t[4]=l,t[5]=d,t):(t[0]=o,t[1]=h,t[2]=a,t[3]=l,t)}function I(t,e,n,r,i,s){const o=n?3:2,a=r&&s,h=n&&i;if(!e.length||!e[0].length)return null;let l,c,u,x,[y,g]=e[0],[p,_]=e[0];for(let t=0;t<e.length;t++){const n=e[t],[r,i]=n;if(y=f(y,r),g=f(g,i),p=d(p,r),_=d(_,i),h&&n.length>2){const t=n[2];l=f(l,t),c=d(c,t)}if(a&&n.length>o){const t=n[o];u=f(l,t),x=d(c,t)}}return i?(l=l||0,c=c||0,s?(u=u||0,x=x||0,t[0]=y,t[1]=g,t[2]=l,t[3]=u,t[4]=p,t[5]=_,t[6]=c,t[7]=x,t):(t[0]=y,t[1]=g,t[2]=l,t[3]=p,t[4]=_,t[5]=c,t)):s?(u=u||0,x=x||0,t[0]=y,t[1]=g,t[2]=u,t[3]=p,t[4]=_,t[5]=x,t):(t[0]=y,t[1]=g,t[2]=p,t[3]=_,t)}},12359(t,e,n){n.d(e,{IK:()=>c,TP:()=>u,Ve:()=>a,Z4:()=>s,l8:()=>o,w2:()=>l});var r=n(51118),i=n(95108);function s({xmin:t,xmax:e,ymin:n,ymax:r,zmin:i,zmax:s,hasZ:o}){const a=[(t+e)/2,(n+r)/2];return o&&a.push((i+s)/2),a}function o(t){return function(t,e){if(!t?.length)return null;const n=[],r=[],s=e?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let n=0,i=t.length;n<i;n++){const i=h(t[n],e,s);i&&r.push(i)}if(r.sort((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r}),r.length&&(n[0]=r[0][0],n[1]=r[0][1],e&&(n[2]=r[0][3]),(n[0]<s[0]||n[0]>s[1]||n[1]<s[2]||n[1]>s[3]||e&&(n[2]<s[4]||n[2]>s[5]))&&(n.length=0)),!n.length){const r=t[0]&&t[0].length?function(t,e){const n=e?[0,0,0]:[0,0],r=e?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;for(let l=0,c=t.length;l<c-1;l++){const c=t[l],u=t[l+1];if(c&&u){n[0]=c[0],n[1]=c[1],r[0]=u[0],r[1]=u[1],e&&c.length>2&&u.length>2&&(n[2]=c[2],r[2]=u[2]);const t=(0,i.R3)(n,r);if(t){s+=t;const n=(0,i.t9)(c,u);o+=t*n[0],a+=t*n[1],e&&n.length>2&&(h+=t*n[2])}}}return s>0?e?[o/s,a/s,h/s]:[o/s,a/s]:t.length?t[0]:null}(t[0],e):null;if(!r)return null;n[0]=r[0],n[1]=r[1],e&&r.length>2&&(n[2]=r[2])}return n}(t.rings,t.hasZ??!1)}function a(t){const e=o(t);if(!e)return null;const{hasZ:n,spatialReference:r}=t,[i,s,a]=e;return isNaN(i)||isNaN(s)||n&&isNaN(a)?null:{x:i,y:s,z:n?a:void 0,spatialReference:r}}function h(t,e,n){let r=0,i=0,s=0,o=0,a=0;const h=t.length?t[0][0]:0,l=t.length?t[0][1]:0,c=t.length&&e?t[0][2]:0;for(let u=0;u<t.length;u++){const f=t[u],d=t[(u+1)%t.length],[x,y,g]=f,p=x-h,_=y-l,[m,I,w]=d,b=m-h,P=I-l,M=p*P-b*_;if(o+=M,r+=(p+b)*M,i+=(_+P)*M,e&&f.length>2&&d.length>2){const t=g-c,e=w-c,n=p*e-b*t;s+=(t+e)*n,a+=n}x<n[0]&&(n[0]=x),x>n[1]&&(n[1]=x),y<n[2]&&(n[2]=y),y>n[3]&&(n[3]=y),e&&(g<n[4]&&(n[4]=g),g>n[5]&&(n[5]=g))}if(o>0&&(o*=-1),a>0&&(a*=-1),!o)return null;o*=.5,a*=.5;const u=[r/(6*o)+h,i/(6*o)+l,o];return e&&(n[4]===n[5]||0===a?(u[3]=(n[4]+n[5])/2,u[4]=0):(u[3]=s/(6*a)+c,u[4]=a)),u}function l(t,e){let n=0,r=0,i=0;t.nextPoint();const s=t.pathSize?t.x:0,o=t.pathSize?t.y:0;for(let a=0;a<t.pathSize;a++){t.seekInPath(a);const h=[t.x,t.y];t.seekInPath((a+1)%t.pathSize);const l=[t.x,t.y],[c,u]=h,f=c-s,d=u-o,[x,y]=l,g=x-s,p=y-o,_=f*p-g*d;i+=_,n+=(f+g)*_,r+=(d+p)*_,c<e[0]&&(e[0]=c),c>e[1]&&(e[1]=c),u<e[2]&&(e[2]=u),u>e[3]&&(e[3]=u)}return i>0&&(i*=-1),i?(i*=.5,[n/(6*i)+s,r/(6*i)+o,i]):null}function c(t){const{hasZ:e,totalSize:n}=t;if(0===n)return null;const s=[],o=[],a=e?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const e=h((0,r.A)(t),t.hasZ,a);e&&o.push(e)}if(o.sort((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r}),o.length&&(s[0]=o[0][0],s[1]=o[0][1],e&&(s[2]=o[0][3]),(s[0]<a[0]||s[0]>a[1]||s[1]<a[2]||s[1]>a[3]||e&&(s[2]<a[4]||s[2]>a[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const n=t.pathSize?function(t){const{hasZ:e}=t,n=e?[0,0,0]:[0,0],r=e?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;if(t.nextPoint()){let l=t.x,c=t.y,u=t.z;for(;t.nextPoint();){const f=t.x,d=t.y,x=t.z;n[0]=l,n[1]=c,r[0]=f,r[1]=d,e&&(n[2]=u,r[2]=x);const y=(0,i.R3)(n,r);if(y){s+=y;const t=(0,i.t9)(n,r);o+=y*t[0],a+=y*t[1],e&&t.length>2&&(h+=y*t[2])}l=f,c=d,u=x}}return s>0?e?[o/s,a/s,h/s]:[o/s,a/s]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!n)return null;s[0]=n[0],s[1]=n[1],e&&n.length>2&&(s[2]=n[2])}return s}function u(t){let e=0;for(t.reset();t.nextPath();)e+=t.getCurrentRingArea();if(e<1e-6){const e=c(t);return e?[e[0],e[1]]:null}const n=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const r=[t.x,t.y];for(t.reset();t.nextPath();)d(n,r,t);return n[0]*=1/e,n[1]*=1/e,n[0]+=r[0],n[1]+=r[1],n}const f=1/3;function d(t,e,n){if(!t||!n||n.pathSize<3)return null;n.nextPoint();const r=n.x,i=n.y;n.nextPoint();let s,o=n.x-r,a=n.y-i,h=0,l=0;for(;n.nextPoint();)h=n.x-r,l=n.y-i,s=.5*f*(h*a-l*o),t[0]+=s*(o+h),t[1]+=s*(a+l),o=h,a=l;const c=n.getCurrentRingArea(),u=[r,i];return u[0]-=e[0],u[1]-=e[1],u[0]*=c,u[1]*=c,t[0]+=u[0],t[1]+=u[1],t}},95108(t,e,n){n.d(e,{$3:()=>c,Ng:()=>a,R3:()=>i,Xf:()=>o,Yl:()=>l,gR:()=>s,m3:()=>f,t9:()=>h});var r=n(4576);function i(t,e){const n=e[0]-t[0],r=e[1]-t[1];if(t.length>2&&e.length>2){const i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}return Math.sqrt(n*n+r*r)}function s(t,e,n,r){const[i,s]=e,[o,a]=n,[h,l]=r,c=h-o,u=l-a,f=c*c+u*u,d=(i-o)*c+(s-a)*u,x=Math.min(1,Math.max(0,d/f));return t[0]=o+c*x,t[1]=a+u*x,t}function o(t,e,n){let r,i,s,o,h=!1,l=1/0;for(n.reset();n.nextPath();)if(n.nextPoint())for(r=n.x,i=n.y;n.nextPoint();)s=n.x,o=n.y,i>e!=o>e&&t<(s-r)*(e-i)/(o-i)+r&&(h=!h),l=Math.min(l,a(t,e,r,i,s,o)),r=s,i=o;return 0===l?0:(h?1:-1)*Math.sqrt(l)}function a(t,e,n,r,i,s){let o=n,a=r,h=i-o,l=s-a;if(0!==h||0!==l){const n=((t-o)*h+(e-a)*l)/(h*h+l*l);n>1?(o=i,a=s):n>0&&(o+=h*n,a+=l*n)}return h=t-o,l=e-a,h*h+l*l}function h(t,e){return function(t,e,n){const r=t[0]+n*(e[0]-t[0]),i=t[1]+n*(e[1]-t[1]);return t.length>2&&e.length>2?[r,i,t[2]+n*(e[2]-t[2])]:[r,i]}(t,e,.5)}function l(t){const e=t.length;let n=0;for(let r=0;r<e-1;++r)n+=i(t[r],t[r+1]);return n}function c(t,e=0,n=1){let r=0;const i=t.length;let s=t[0];for(let o=1;o<i;o++){const i=t[o];r+=(i[e]-s[e])*(i[n]+s[n]),s=i}if(u(t)){const i=t[0];r+=(i[e]-s[e])*(i[n]+s[n])}return r>=0}function u(t){const e=t.length;return e>0&&!(0,r.aI)(t[0],t[e-1])}function f(t){if("rings"in t)for(const e of t.rings)u(e)&&e.push(e[0].slice())}n(52006)},52006(t,e,n){function r(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function i(t){return"curveRings"in t?t.curveRings:t.curvePaths}function s(t){return"b"in t}function o(t){return"c"in t}function a(t){return Array.isArray(t)}function h(t){return"a"in t}function l(t){return"a"in t&&4===t.a.length}function c(t){return"a"in t&&7===t.a.length}function u(t,e){return i(t).flat().some(t=>function(t,e){return!(a(t)||(s(t)?e.has("cubic-bezier"):o(t)?e.has("circular-arc"):!l(t)&&!c(t)||e.has("elliptic-arc")))}(t,e))}function f(t){return a(t)?t:s(t)?t.b[0]:o(t)?t.c[0]:t.a[0]}function d(t){if(s(t)){const[e,n,r]=t.b;return{b:[[...e],[...n],[...r]]}}if(o(t)){const[e,n]=t.c;return{c:[[...e],[...n]]}}if(a(t))return[...t];if(l(t)){const[e,n,r,i]=t.a;return{a:[[...e],[...n],r,i]}}if(c(t)){const[e,n,r,i,s,o,a]=t.a;return{a:[[...e],[...n],r,i,s,o,a]}}return t}n.d(e,{DA:()=>l,Ed:()=>r,FD:()=>i,FG:()=>h,V8:()=>u,Xq:()=>a,aO:()=>o,n1:()=>s,tk:()=>d,wY:()=>c,yP:()=>f}),n(4576)},78957(t,e,n){n.d(e,{d:()=>c,R:()=>w});class r{constructor(t=i){this._data=[],this._compare=t}get size(){return this._data.length}enqueue(t){if(null==t)return;const{_data:e,_compare:n}=this;e.push(t);let r=e.length-1>>>0;const i=e[r];for(;r>0;){const t=r-1>>1,s=e[t];if(!(n(s,i)<=0))break;e[t]=i,e[r]=s,r=t}}dequeue(){const{_data:t,_compare:e}=this,n=t[0],r=t.pop();if(0===t.length)return n;t[0]=r;let i=0;const s=t.length,o=t[0];let a,h,l=null;for(;;){const n=2*i+1,r=2*i+2;if(l=null,n<s&&(a=t[n],e(a,o)>0&&(l=n)),r<s&&(h=t[r],(null===l&&e(h,o)<=0||null!==l&&e(h,a)<=0)&&(l=r)),null===l)break;t[i]=t[l],t[l]=o,i=l}return n}}const i=(t,e)=>t<e?-1:t>e?1:0;var s=n(19419),o=n(537),a=n(12359),h=n(95108),l=n(12176);function c(t){if(0===t.totalSize)return null;const e=(0,o.z8)(t);if(!e)return null;const n=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let r=0,i=0;t.reset();for(let e=0;t.nextPath();e++){const n=t.getCurrentRingArea();n>i&&(i=n,r=e)}if(t.seekPath(r),0===t.pathSize)return null;t.seekPathStart();const h=(0,o.B$)(t);if(Math.abs(i)<=2*n*n)return[(h[0]+h[2])/2,(h[1]+h[3])/2];t.seekPathStart();const l=(0,a.w2)(t,(0,s.vt)());if(null===l)return null;if(t.totalPoints<4)return l;const c=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],x=[NaN,NaN,NaN,NaN],y=[NaN,NaN,NaN,NaN];let g=!1,I=f(l,t,!0);0===I.distance&&(g=!0,c[0][0]=l[0],c[0][1]=l[1],I=f(l,t,!1)),x[0]=I.distance,y[0]=0;const w=[NaN,NaN];let b=!1,P=.25,M=-1,T=NaN;do{if(T=NaN,c[1]=d(t,p(h[0],h[2],P),0,e),isNaN(c[1][0])||isNaN(c[1][1])||(I=f(c[1],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[1],t))b=!0,x[1]=T,y[1]=_(c[1],l);else if(!isNaN(T)&&T>M&&(M=T,w[0]=c[1][0],w[1]=c[1][1]),P-=.01,P<.1){if(!(M>=0))break;b=!0,x[1]=M,c[1][0]=w[0],c[1][1]=w[1],y[1]=_(c[1],l)}}while(!b);b=!1,P=.5,M=-1;let v=.01,A=1;do{if(T=NaN,c[2]=d(t,p(h[0],h[2],P),0,e),isNaN(c[2][0])||isNaN(c[2][1])||(I=f(c[2],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[2],t))b=!0,x[2]=T,y[2]=_(c[2],l);else if(!isNaN(T)&&T>M)M=T,w[0]=c[2][0],w[1]=c[2][1];else if(T>M&&(M=T,w[0]=c[2][0],w[1]=c[2][1]),P=.5+v*A,v+=.01,A*=-1,P<.3||P>.7){if(!(M>=0))break;b=!0,x[2]=M,c[2][0]=w[0],c[2][1]=w[1],y[2]=_(c[2],l)}}while(!b);b=!1,P=.75,M=-1;do{if(T=NaN,c[3]=d(t,p(h[0],h[2],P),0,e),isNaN(c[3][0])||isNaN(c[3][1])||(I=f(c[3],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[3],t))b=!0,x[3]=T,y[3]=_(c[3],l);else if(T>M&&(M=T,w[0]=c[3][0],w[1]=c[3][1]),P+=.01,P>.9){if(!(M>=0))break;b=!0,x[3]=M,c[3][0]=w[0],c[3][1]=w[1],y[3]=_(c[3],l)}}while(!b);const S=[0,1,2,3],L=g?0:1;let k;for(let t=L;t<4;t++)for(let t=L;t<3;t++){const e=y[t],n=y[t+1];m(e,n)>0&&(k=S[t],S[t]=S[t+1],S[t+1]=k,y[t]=n,y[t+1]=e)}let N=L,B=0,V=0;for(let t=L;t<4;t++){switch(t){case 0:V=2*x[S[t]];break;case 1:V=1.66666666*x[S[t]];break;case 2:V=1.33333333*x[S[t]];break;case 3:V=x[S[t]]}V>B&&(B=V,N=S[t])}return c[N]}function u(t,e){let n,r,i,s,o=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(n=e.x,r=e.y;e.nextPoint();n=i,r=s)i=e.x,s=e.y,r>t[1]!=s>t[1]&&((i-n)*(t[1]-r)-(s-r)*(t[0]-n)>0?o++:o--);return 0!==o}function f(t,e,n){if(n&&u(t,e))return{coord:t,distance:0};let r=1/0,i=0,s=0,o=[0,0],a=[0,0];const l=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(o[0]=e.x,o[1]=e.y;e.nextPoint();o=a){a=[e.x,e.y],(0,h.gR)(l,t,o,a);const n=_(t,l);n<r&&(r=n,i=l[0],s=l[1])}return{coord:[i,s],distance:Math.sqrt(r)}}function d(t,e,n,r){const i=[e,0];let o=1/0,a=1/0,h=!1,c=!1;const u=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],d=[0,0],g=[0,0],p=[[0,0],[0,0]],_=(0,s.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(p[0][0]=t.x,p[0][1]=t.y;t.nextPoint();p[0][0]=p[1][0],p[0][1]=p[1][1]){if(p[1][0]=t.x,p[1][1]=t.y,null===x(_,p))continue;if(d[0]=u[0][0],d[1]=u[0][1],g[0]=u[1][0],g[1]=u[1][1],0===y(_,d,g))continue;if(!(0,l.Ql)(u[0],u[1],p[0],p[1],f))continue;const e=f[1];o>a?e<o&&(o=e,h=!0):e<a&&(a=e,c=!0)}return h&&c?i[1]=(o+a)/2:i[0]=i[1]=NaN,i}function x(t,e){if(e.length<2)return null;t||(t=(0,s.vt)());const[n,r]=e[0],[i,o]=e[1];return t[0]=Math.min(n,i),t[1]=Math.min(r,o),t[2]=Math.max(n,i),t[3]=Math.max(r,o),t}function y(t,e,n){let r=g(e,t),i=g(n,t);const s=t[0],o=t[1],a=t[2],h=t[3];if(r&i)return 0;if(!(r|i))return 4;const l=(r?1:0)|(i?2:0);do{const l=n[0]-e[0],c=n[1]-e[1];if(l>c)3&r?(1&r?(e[1]+=c*(s-e[0])/l,e[0]=s):(e[1]+=c*(a-e[0])/l,e[0]=a),r=g(e,t)):3&i?(1&i?(n[1]+=c*(s-n[0])/l,n[0]=s):(n[1]+=c*(a-n[0])/l,n[0]=a),i=g(n,t)):r?(4&r?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),r=g(e,t)):(4&i?(n[0]+=l*(o-n[1])/c,n[1]=o):(n[0]+=l*(h-n[1])/c,n[1]=h),i=g(n,t));else if(12&r?(4&r?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),r=g(e,t)):12&i?(4&i?(n[0]+=l*(o-n[1])/c,n[1]=o):(n[0]+=l*(h-n[1])/c,n[1]=h),i=g(n,t)):r?(1&r?(e[1]+=c*(s-e[0])/l,e[0]=s):(e[1]+=c*(a-e[0])/l,e[0]=a),r=g(e,t)):(1&i?(n[1]+=c*(s-n[0])/l,n[0]=s):(n[1]+=c*(a-n[0])/l,n[0]=a),i=g(n,t)),r&i)return 0}while(r|i);return l}function g(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function p(t,e,n){return t+(e-t)*n}function _(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function m(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const n=isNaN(t),r=isNaN(e);return n<r?-1:n>r?1:0}class I{constructor(t,e,n,r){this.x=t,this.y=e,this.cellSize=n,this.distancefromCellCenter=(0,h.Xf)(t,e,r),this.maxDistanceToPolygon=this.distancefromCellCenter+this.cellSize*Math.SQRT2}}function w(t){if(!t.nextPath()||!t.pathSize)return null;const e=(0,o.B$)(t),n=e[2]-e[0],i=e[3]-e[1];if(0===n||0===i)return[e[0]+n/2,e[1]+i/2];const s=Math.max(Math.min(n,i)/100,1),h=new r((t,e)=>e.maxDistanceToPolygon-t.maxDistanceToPolygon),l=Math.min(n,i);let c=l/2,u=0,f=0;for(u=e[0];u<e[2];u+=l)for(f=e[1];f<e[3];f+=l)h.enqueue(new I(u+c,f+c,c,t));t.reset(),t.nextPath();const d=(0,a.IK)(t);if(null===d)return null;let x,y=new I(d[0],d[1],0,t);for(;h.size>0;)x=h.dequeue(),x.distancefromCellCenter>y.distancefromCellCenter&&(y=x),x.maxDistanceToPolygon-y.distancefromCellCenter<=s||(c=x.cellSize/2,h.enqueue(new I(x.x-c,x.y-c,c,t)),h.enqueue(new I(x.x+c,x.y-c,c,t)),h.enqueue(new I(x.x-c,x.y+c,c,t)),h.enqueue(new I(x.x+c,x.y+c,c,t)));return[y.x,y.y]}},97770(t,e,n){n.d(e,{Ey:()=>B,F8:()=>N,J2:()=>A,Yq:()=>L,_m:()=>S,iS:()=>k,wj:()=>V});var r=n(66552),i=n(73444),s=n(98623),o=n(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},h={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},l={timeZone:"UTC"},c={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},f={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},x={hour:"numeric",minute:"numeric"},y={...x,second:"numeric"},g={hourCycle:"h23"},p={...x,...g},_={...y,...g},m={"short-date":c,"short-date-short-time":{...c,...x},"short-date-short-time-24":{...c,...p},"short-date-long-time":{...c,...y},"short-date-long-time-24":{...c,..._},"short-date-le":c,"short-date-le-short-time":{...c,...x},"short-date-le-short-time-24":{...c,...p},"short-date-le-long-time":{...c,...y},"short-date-le-long-time-24":{...c,..._},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...x},"long-month-day-year-short-time-24":{...u,...p},"long-month-day-year-long-time":{...u,...y},"long-month-day-year-long-time-24":{...u,..._},"day-short-month-year":f,"day-short-month-year-short-time":{...f,...x},"day-short-month-year-short-time-24":{...f,...p},"day-short-month-year-long-time":{...f,...y},"day-short-month-year-long-time-24":{...f,..._},"long-date":d,"long-date-short-time":{...d,...x},"long-date-short-time-24":{...d,...p},"long-date-long-time":{...d,...y},"long-date-long-time-24":{...d,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":x,"long-time":y},I=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),w={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},b=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),P=b.find(({type:t})=>"month"===t)?.value.toLowerCase();function M(){const t=(0,i.lR)();return(t&&w[t])??(0,i.QC)()}"mart"!==P&&(w.bs="sr-Latn-CS");let T=new WeakMap;const v=m["short-date-short-time"];function A(t){return m[t]}function S(t){const{dateStyle:e,timeStyle:n,hour12:r,year:i,month:s}=t,o={};return e?o.dateStyle=e:i&&(o.year=i,o.month=s||void 0),n&&!o.year&&(o.timeStyle=n,o.hour12="auto"===r?void 0:"always"===r),o}function L(t,e=v){return function(t){let e=T.get(t);if(!e){const n=M(),r=V(t.timeZone??"system"),i={...t,timeZone:r};e=new Intl.DateTimeFormat(n,i),T.set(t,e)}return e}(e).format(t)}function k(t,e=v){return L(new Date(t),{...e,...l,...h})}function N(t,e=v){return L(new Date(`1970-01-01T${t}Z`),{...e,...l,...a})}function B(t,e=v){const n=o.c9.fromISO(t,{setZone:!0});if(!n.isValid)return t;if(e.timeZone)return L(n.toJSDate(),e);const r=0===n.offset?"UTC":e.timeZone,i={...e,timeZone:r};return n.toLocaleString(i,{locale:M()})}function V(t){switch(t){case"system":return s.N;case s.L:return"UTC";default:return t}}(0,i.Ml)(()=>{T=new WeakMap}),n.d(e,["_v",0,I])},73444(t,e,n){n.d(e,{JK:()=>h,Ml:()=>g,QC:()=>u,lR:()=>c,oQ:()=>x});var r=n(36563);let i;n(44208);const s=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){const t=o?.getAttribute("lang"),e=globalThis.navigator?.language;return s??t??e??"en"}function h(){return void 0===i&&(i=a()),i}const l=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function c(t=h()){return f(t)?.language}function u(t=h()){const e=f(t);return e?.language&&e?.extlang?t.replace(`${e.language}-`,""):t}function f(t=h()){return l.exec(t)?.groups}const d=[];function x(t){return d.push(t),(0,r.hA)(()=>{d.splice(d.indexOf(t),1)})}new Map;const y=[];function g(t){return y.push(t),(0,r.hA)(()=>y.splice(y.indexOf(t),1))}function p(){const t=a();i!==t&&([...y].forEach(e=>e(t)),i=t,[...d].forEach(e=>e(t)))}globalThis.addEventListener?.("languagechange",p),o&&new MutationObserver(()=>{p()}).observe(o,{attributeFilter:["lang"]})},92722(t,e,n){n.d(e,{A:()=>i});var r=n(69397);class i{constructor(t=[],e=[],n=!1,r=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=n,this.hasM=r}static fromJSON({lengths:t,coords:e,hasZ:n,hasM:r}){return new i(t,e,n||!1,r||!1)}static fromRect([t,e,n,r]){const s=n-t,o=r-e;return new i([5],[t,e,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const n of this.lengths){if(n<3)continue;const{stride:r}=this;let i=this.coords[r*e],s=this.coords[r*e+1];for(let o=1;o<n;o+=1){const n=r*(e+o),a=this.coords[n],h=this.coords[n+1];t+=-.5*(a-i)*(h+s),i=a,s=h}e+=n}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:n}=this;for(const r of this.lengths){for(let i=0;i<r;i++){const r=n*(e+i);t(this.coords[r],this.coords[r+1])}e+=r}}deltaDecode(){const t=this.clone(),{coords:e,lengths:n}=t;let r=0;const{stride:i}=this;for(const t of n){for(let n=1;n<t;n++){const t=i*(r+n);e[t]+=e[t-i],e[t+1]+=e[t+1-i]}r+=t}return t}clone(t){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:n,size:r}=this,s=this.coords.slice(0,r*n);return t?(t.set(s),new i(e,t,this.hasZ,this.hasM)):new i(e,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const n=new Array(e*t);for(let e=0,r=0;e<n.length;e+=t)n[r++]=this.coords[e],n[r++]=this.coords[e+1];return new i(this.lengths,n,!1,!1)}}},98623(t,e,n){const r=Intl.DateTimeFormat().resolvedOptions().timeZone;n.d(e,["L",0,"unknown","N",0,r])},36984(t,e,n){n.r(e),n.d(e,{default:()=>X});var r=n(17676),i=n(29953),s=n(6774),o=n(13195);function a(t){return 746===t||747===t||!(t<4352)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103&&!(t>=65097&&t<=65103)||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351&&!(t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=12592&&t<=12687||t>=43360&&t<=43391||t>=55216&&t<=55295||t>=4352&&t<=4607||t>=44032&&t<=55215||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12688&&t<=12703||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543&&12540!==t||t>=65280&&t<=65519&&!(65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||t>=65104&&t<=65135&&!(t>=65112&&t<=65118||t>=65123&&t<=65126)||t>=5120&&t<=5759||t>=6320&&t<=6399||t>=65040&&t<=65055||t>=19904&&t<=19967||t>=40960&&t<=42127||t>=42128&&t<=42191)}function h(t){return!(t<11904)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=65280&&t<=65519||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543||t>=65040&&t<=65055||t>=42128&&t<=42191||t>=40960&&t<=42127)}function l(t){switch(t){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(t){switch(t){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(18989);class f{constructor(t,e,n,r,i,s,o){this._glyphItems=t,this._maxWidth=e,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=i,this._vAnchor=s,this._justify=o}getShaping(t,e,n){const r=this._letterSpacing,i=this._lineHeight,s=this._justify,o=this._maxWidth,u=[];let f=0,d=0;for(const e of t){const t=e.codePointAt(0);if(null==t)continue;const i=n&&a(t);let s;for(const e of this._glyphItems)if(s=e[t],s)break;u.push({codePoint:t,x:f,y:d,vertical:i,glyphItem:s}),s&&(f+=s.shaping.xAdvance+r)}let x=f;o>0&&(x=f/Math.max(1,Math.ceil(f/o)));const y=t.includes("​"),g=[],p=u.length;for(let t=0;t<p-1;t++){const e=u[t].codePoint,n=h(e);if(l(e)||n){let r=0;if(10===e)r-=1e4;else if(n&&y)r+=150;else{40!==e&&65288!==e||(r+=50);const n=u[t+1].codePoint;41!==n&&65289!==n||(r+=50)}g.push(this._buildBreak(t+1,u[t].x,x,g,r,!1))}}const _=this._optimalBreaks(this._buildBreak(p,f,x,g,0,!0));let m=0;const I=e?-i:i;let w=0;for(let t=0;t<_.length;t++){const e=_[t];let n=w;for(;n<e&&c(u[n].codePoint);)u[n].glyphItem=null,++n;let r=e-1;for(;r>n&&c(u[r].codePoint);)u[r].glyphItem=null,--r;if(n<=r){const t=u[n].x;for(let e=n;e<=r;e++)u[e].x-=t,u[e].y=d;let e=u[r].x;u[r].glyphItem&&(e+=u[r].glyphItem.shaping.xAdvance),m=Math.max(e,m),s&&this._applyJustification(u,n,r)}w=e,d+=I}if(u.length>0){const t=_.length-1,n=(s-this._hAnchor)*m;let r=(-this._vAnchor*(t+1)+.5)*i;e&&t&&(r+=t*i);for(const t of u)t.x+=n,t.y+=r}return u.filter(t=>t.glyphItem)}static getTextBox(t,e){if(!t.length)return null;let n=1/0,r=1/0,i=0,s=0;for(const o of t){const t=o.glyphItem.shaping.xAdvance,a=o.x,h=o.y-17,l=a+t,c=h+e;n=Math.min(n,a),i=Math.max(i,l),r=Math.min(r,h),s=Math.max(s,c)}return{x:n,y:r,width:i-n,height:s-r}}static getBox(t){if(!t.length)return null;let e=1/0,n=1/0,r=0,i=0;for(const s of t){const{height:t,left:o,top:a,width:h}=s.glyphItem.rect,l=s.x,c=s.y-(t-Math.abs(a)),u=l+h+o,f=c+t;e=Math.min(e,l),r=Math.max(r,u),n=Math.min(n,c),i=Math.max(i,f)}return{x:e,y:n,width:r-e,height:i-n}}static addDecoration(t,e){const n=t.length;if(0===n)return;const r={rect:new u.A(4,0,4,8),sdf:!0,page:0};let i=t[0].x+t[0].glyphItem.rect.left,s=t[0].y;for(let o=1;o<n;o++){const n=t[o];if(n.y!==s){const a=t[o-1].x+t[o-1].glyphItem.rect.left+t[o-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:r,rect:{width:a-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}}),s=n.y,i=n.x+n.glyphItem.rect.left}}const o=t[n-1].x+t[n-1].glyphItem.rect.left+t[n-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:r,rect:{width:o-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}})}_breakScore(t,e,n,r){const i=(t-e)*(t-e);return r?t<e?i/2:2*i:i+Math.abs(n)*n}_buildBreak(t,e,n,r,i,s){let o=null,a=this._breakScore(e,n,i,s);for(const t of r){const r=e-t.x,h=this._breakScore(r,n,i,s)+t.score;h<=a&&(o=t,a=h)}return{index:t,x:e,score:a,previousBreak:o}}_optimalBreaks(t){return t?this._optimalBreaks(t.previousBreak).concat(t.index):[]}_applyJustification(t,e,n){const r=t[n],i=r.vertical?24:r.glyphItem?r.glyphItem.shaping.xAdvance:0,s=(r.x+i)*this._justify;for(let r=e;r<=n;r++)t[r].x-=s}}const d=.5;class x{constructor(t,e,n=0,r=-1,i=d){this.x=t,this.y=e,this.angle=n,this.segment=r,this.minzoom=i}}class y{constructor(t,e,n,r,i,s=d,a=o.MG){this.anchor=t,this.labelAngle=e,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=i,this.minzoom=s,this.maxzoom=a}}class g{constructor(t,e,n,r,i,s,o,a,h,l,c,u){this.tl=t,this.tr=e,this.bl=n,this.br=r,this.mosaicRect=i,this.labelAngle=s,this.minAngle=o,this.maxAngle=a,this.anchor=h,this.minzoom=l,this.maxzoom=c,this.page=u}}class p{constructor(t){this.shapes=t}}class _{getIconPlacement(t,e,n){const r=new s.bR(t.x,t.y),i=0===n.rotationAlignment,a=n.keepUpright;let h=n.rotate*o.os;i&&(h+=t.angle);const l=new p([]);return l.iconColliders=[],this._addIconPlacement(l,r,e,n,h),i&&a&&this._addIconPlacement(l,r,e,n,h+o.Jo),l}_addIconPlacement(t,e,n,r,i){const a=n.rasterizationScale,h=n.width/a,l=n.height/a,c=r.offset;let u=c[0],f=c[1];switch(r.anchor){case 0:u-=h/2,f-=l/2;break;case 1:f-=l/2;break;case 2:u-=h,f-=l/2;break;case 3:u-=h/2;break;case 4:u-=h/2,f-=l;break;case 5:break;case 7:f-=l;break;case 6:u-=h;break;case 8:u-=h,f-=l}const x=n.rect,y=2/a,p=u-y,_=f-y,m=p+x.width/a,I=_+x.height/a,w=new s.bR(p,_),b=new s.bR(m,I),P=new s.bR(p,I),M=new s.bR(m,_);if(0!==i){const t=Math.cos(i),e=Math.sin(i);w.rotate(t,e),b.rotate(t,e),P.rotate(t,e),M.rotate(t,e)}const T=new g(w,M,P,b,x,i,0,256,e,d,o.MG,0);t.shapes.push(T);{const n=r.size,s=r.padding,a={xTile:e.x,yTile:e.y,dxPixels:u*n-s,dyPixels:f*n-s,hard:!r.optional,partIndex:0,width:h*n+2*s,height:l*n+2*s,angle:i,minLod:d,maxLod:o.MG};t.iconColliders.push(a)}}getTextPlacement(t,e,n,r){const i=new s.bR(t.x,t.y),{keepUpright:a,rotate:h,rotationAlignment:l,size:c}=r,u=h*o.os,x=0===l,_=a,m=r.padding;let I=d;const w=x?t.angle:0,b=t.segment>=0&&x,P=[],M=[],T=!b;let v=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,S=v,L=A;const k=(b||x)&&_,N=c/24;let B=!1;for(const t of e)if(t.vertical){B=!0;break}let V,z=0,C=0;if(!b&&B){const t=f.getTextBox(e,24*r.lineHeight);switch(r.anchor){case 1:z=t.height/2,C=-t.width/2;break;case 2:z=-t.height/2,C=t.width/2;break;case 3:z=t.height/2,C=t.width/2;break;case 4:z=-t.height/2,C=-t.width/2;break;case 5:z=t.height;break;case 7:C=-t.width;break;case 6:C=t.width;break;case 8:z=-t.height}}z+=24*r.offset[0],C+=24*r.offset[1];for(const a of e){const e=a.glyphItem?.mosaicItem,h=a.glyphItem?.rect;if(!e||e.rect.isEmpty)continue;const l=e.rect,c=e.page;if(P&&T){if(void 0!==V&&V!==a.y){let e,n,i,s;B?(e=-L+z,n=v+C,i=L-S,s=A-v):(e=v+z,n=S+C,i=A-v,s=L-S);const a={xTile:t.x,yTile:t.y,dxPixels:e*N-m,dyPixels:n*N-m,hard:!r.optional,partIndex:1,width:i*N+2*m,height:s*N+2*m,angle:u,minLod:d,maxLod:o.MG};P.push(a),v=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,S=v,L=A}V=a.y}const f=[];if(b){const e=.5*h.width,r=(a.x+h.left-3+e)*N*8;if(I=this._placeGlyph(t,I,r,n,t.segment,1,a.vertical,c,f),_&&(I=this._placeGlyph(t,I,r,n,t.segment,-1,a.vertical,c,f)),I>=2)break}else f.push(new y(i,w,w,c,!1)),x&&_&&f.push(new y(i,w+o.Jo,w+o.Jo,c,!1));const p=a.x+h.left,R=a.y-17-h.top,E=p+h.width,D=R+h.height;let F,U,O,G,Z,Y,W,q;if(!b&&B)if(a.vertical){const t=(p+E)/2-h.height/2,e=(R+D)/2+h.width/2;F=new s.bR(-e-3+z,t-3+C),U=new s.bR(F.x+l.width,F.y+l.height),O=new s.bR(F.x,U.y),G=new s.bR(U.x,F.y)}else F=new s.bR(3-R+z,p-3+C),U=new s.bR(F.x-l.height,F.y+l.width),O=new s.bR(U.x,F.y),G=new s.bR(F.x,U.y);else F=new s.bR(p-3+z,R-3+C),U=new s.bR(F.x+l.width,F.y+l.height),O=new s.bR(F.x,U.y),G=new s.bR(U.x,F.y);for(const e of f){let n,i,o,c;if(e.alternateVerticalGlyph){if(!Z){const t=(R+D)/2+C;Z=new s.bR((p+E)/2+z-h.height/2-3,t+h.width/2+3),Y=new s.bR(Z.x+l.height,Z.y-l.width),W=new s.bR(Y.x,Z.y),q=new s.bR(Z.x,Y.y)}n=Z,i=W,o=q,c=Y}else n=F,i=O,o=G,c=U;const f=R,d=D,x=e.glyphAngle+u;if(0!==x){const t=Math.cos(x),e=Math.sin(x);n=n.clone(),i=i?.clone(),o=o?.clone(),c=c?.clone(),n.rotate(t,e),c?.rotate(t,e),i?.rotate(t,e),o?.rotate(t,e)}let y=0,_=256;if(b&&B?a.vertical?e.alternateVerticalGlyph?(y=32,_=96):(y=224,_=32):(y=224,_=96):(y=192,_=64),M.push(new g(n,o,i,c,l,e.labelAngle,y,_,e.anchor,e.minzoom,e.maxzoom,e.page)),P&&(!k||this._legible(e.labelAngle)))if(T)p<v&&(v=p),f<S&&(S=f),E>A&&(A=E),d>L&&(L=d);else if(e.minzoom<2){const n={xTile:t.x,yTile:t.y,dxPixels:(p+z)*N-m,dyPixels:(f+z)*N-m,hard:!r.optional,partIndex:1,width:(E-p)*N+2*m,height:(d-f)*N+2*m,angle:x,minLod:e.minzoom,maxLod:e.maxzoom};P.push(n)}}}if(I>=2)return null;if(P&&T){let e,n,i,s;B?(e=-L+z,n=v+C,i=L-S,s=A-v):(e=v+z,n=S+C,i=A-v,s=L-S);const a={xTile:t.x,yTile:t.y,dxPixels:e*N-m,dyPixels:n*N-m,hard:!r.optional,partIndex:1,width:i*N+2*m,height:s*N+2*m,angle:u,minLod:d,maxLod:o.MG};P.push(a)}const R=new p(M);return P&&P.length>0&&(R.textColliders=P),R}_legible(t){const e=(0,o.z0)(t);return e<65||e>=193}_placeGlyph(t,e,n,r,i,a,h,l,c){let u=a;const f=u<0?(0,o.Wh)(t.angle+o.Jo,o.pJ):t.angle;let d=0;n<0&&(u*=-1,n*=-1,d=o.Jo),u>0&&++i;let x=new s.bR(t.x,t.y),g=r[i],p=o.MG;if(r.length<=i)return p;for(;;){const t=g.x-x.x,s=g.y-x.y,a=Math.sqrt(t*t+s*s),_=Math.max(n/a,e),m=t/a,I=s/a,w=(0,o.Wh)(Math.atan2(I,m)+d,o.pJ);if(c.push(new y(x,f,w,l,!1,_,p)),h&&c.push(new y(x,f,w,l,!0,_,p)),_<=e)return _;x=g.clone();do{if(i+=u,r.length<=i||i<0)return _;g=r[i]}while(x.isEqual(g));let b=g.x-x.x,P=g.y-x.y;const M=Math.sqrt(b*b+P*P);b*=a/M,P*=a/M,x.x-=b,x.y-=P,p=_}}}var m=n(51624),I=n(15585);class w{constructor(t,e,n=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=n;const r=e.keys,i=e.values,s=t.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const t=s.getMessage().asUnsafe(),e=this.values;for(;!t.empty();){const n=t.getUInt32(),s=t.getUInt32();e[r[n]]=i[s]}t.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(t){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const e=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,t?t.reset(this.type):n=[];let i,o=1,a=0,h=0,l=0;for(;!e.empty();){if(0===a){const t=e.getUInt32();o=7&t,a=t>>3}switch(a--,o){case 1:h+=e.getSInt32(),l+=e.getSInt32(),t?t.moveTo(h,l):n&&(r&&n.push(r),r=[],r.push(new s.bR(h,l)));break;case 2:h+=e.getSInt32(),l+=e.getSInt32(),t?t.lineTo(h,l):r&&r.push(new s.bR(h,l));break;case 7:t?t.close():r&&!r[0].equals(h,l)&&r.push(r[0].clone());break;default:throw e.release(),new Error("Invalid path operation")}}return t?i=t.result():n&&(r&&n.push(r),i=n),e.release(),this._geometry=i,i}}n(44208);class b{constructor(t){this._array=[],this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}}class P extends b{constructor(){super(12)}add(t,e,n){const r=this.array;r.push(t),r.push(e),r.push(n)}}class M{constructor(t){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=t.clone();const e=t.asUnsafe();for(;e.next();)switch(e.tag()){case 1:this.name=e.getString();break;case 3:this.keys.push(e.getString());break;case 4:this.values.push(e.processMessage(M._parseValue));break;case 5:this.extent=e.getUInt32();break;default:e.skip()}}getData(){return this._pbfLayer}static _parseValue(t){for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getInt64();case 5:return t.getUInt64();case 6:return t.getSInt64();case 7:return t.getBool();default:t.skip()}return null}}var T=n(89518);class v extends b{constructor(t){super(t)}add(t,e,n,r,i,s,o,a,h,l,c,u){const f=this.array;let d=(0,T.M9)(t,e);f.push(d);const x=31;d=(0,T.Ss)(Math.round(x*n),Math.round(x*r),Math.round(x*i),Math.round(x*s)),f.push(d),d=(0,T.Ss)(Math.round(x*o),Math.round(x*a),Math.round(x*h),Math.round(x*l)),f.push(d),d=(0,T.M9)(c,0),f.push(d),u&&f.push(...u)}}class A extends b{constructor(t){super(t)}add(t,e,n){const r=this.array;r.push((0,T.M9)(t,e)),n&&r.push(...n)}}class S extends b{constructor(t){super(t)}add(t,e,n,r,i,s,o){const a=this.array,h=this.index;let l=(0,T.M9)(t,e);return a.push(l),l=(0,T.Ss)(Math.round(15*n),Math.round(15*r),i,s),a.push(l),o&&a.push(...o),h}}class L extends b{constructor(t){super(t)}add(t,e,n,r,i,s,a,h,l,c,u,f){const d=this.array;let x=(0,T.M9)(t,e);d.push(x),x=(0,T.M9)(Math.round(8*n),Math.round(8*r)),d.push(x),x=(0,T.M9)((0,T.ws)(i/4,s/4),(0,T.ws)(h,l)),d.push(x),x=(0,T.M9)((0,T.ws)(0,(0,o.z0)(a)),(0,T.ws)(10*c,Math.min(10*u,255))),d.push(x),f&&d.push(...f)}}class k extends b{constructor(t){super(t)}add(t,e,n,r,i){const s=this.array,o=(0,T.M9)(2*t+n,2*e+r);s.push(o),i&&s.push(...i)}}class N{constructor(t,e,n){this.layerExtent=4096,this._features=[],this.layer=t,this.zoom=e,this._spriteInfo=n,this._filter=t.getFeatureFilter()}pushFeature(t){this._filter&&!this._filter.filter(t,this.zoom)||this._features.push(t)}hasFeatures(){return this._features.length>0}getResources(t,e,n){}}class B extends N{constructor(t,e,n,r,i){super(t,e,n),this.type=4,this._circleVertexBuffer=r,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(t){const e=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);for(const s of this._features){const o=s.getGeometry(t);if(!o)continue;const a=r.circleMaterial.encodeAttributes(s,i,r);for(const t of o)if(t)for(const r of t){const t=e.index;e.add(r.x,r.y,0,0,a),e.add(r.x,r.y,0,1,a),e.add(r.x,r.y,1,0,a),e.add(r.x,r.y,1,1,a),n.add(t,t+1,t+2),n.add(t+1,t+2,t+3),this._circleIndexCount+=6}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this._circleVertexBuffer.array.length,t+=this._circleIndexBuffer.array.length;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._circleIndexStart,e[r++]=this._circleIndexCount,e[r++]=this._circleVertexBuffer.array.length;for(let t=0;t<this._circleVertexBuffer.array.length;t++)n[r++]=this._circleVertexBuffer.array[t];e[r++]=this._circleIndexBuffer.array.length;for(let t=0;t<this._circleIndexBuffer.array.length;t++)e[r++]=this._circleIndexBuffer.array[t];return e.buffer}}var V=n(98291),z=n(83349);class C extends N{constructor(t,e,n,r,i,s,o){super(t,e,n),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=i,this._outlineVertexBuffer=s,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(t,e,n){const r=this.layer,i=this.zoom,s=r.getPaintProperty("fill-pattern");if(s)if(s.isDataDriven)for(const t of this._features)e(s.getValue(i,t),!0);else e(s.getValue(i),!0)}processFeatures(t){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const e=this.layer,n=this.zoom,{fillMaterial:r,outlineMaterial:i,hasDataDrivenFill:s,hasDataDrivenOutline:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("fill-pattern"),h=a?.isDataDriven;let l=!a&&e.getPaintValue("fill-antialias",n);if(e.outlineUsesFillColor){if(l&&!e.hasDataDrivenOpacity){const t=e.getPaintValue("fill-opacity",n),r=e.getPaintValue("fill-opacity",n+1);t<1&&r<1&&(l=!1)}if(l&&!e.hasDataDrivenColor){const t=e.getPaintValue("fill-color",n),r=e.getPaintValue("fill-color",n+1);t[3]<1&&r[3]<1&&(l=!1)}}const c=this._features,u=t?.validateTessellation;if(h){const s=[];for(const h of c){const c=a.getValue(n,h),u=this._spriteInfo[c];if(!u?.rect)continue;const f=r.encodeAttributes(h,n,e,u),d=l&&o?i.encodeAttributes(h,n,e):[],x=h.getGeometry(t);s.push({ddFillAttributes:f,ddOutlineAttributes:d,page:u.page,geometry:x}),s.sort((t,e)=>t.page-e.page)}for(const{ddFillAttributes:t,ddOutlineAttributes:n,page:r,geometry:i}of s)this._processFeature(i,l,e.outlineUsesFillColor,t,n,u,r)}else for(const a of c){const h=s?r.encodeAttributes(a,n,e):null,c=l&&o?i.encodeAttributes(a,n,e):null,f=a.getGeometry(t);this._processFeature(f,l,e.outlineUsesFillColor,h,c,u)}}serialize(){let t=10;t+=this.layerUIDs.length,t+=this._fillVertexBuffer.array.length,t+=this._fillIndexBuffer.array.length,t+=this._outlineVertexBuffer.array.length,t+=this._outlineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._fillIndexStart,e[r++]=this._fillIndexCount,e[r++]=this._outlineIndexStart,e[r++]=this._outlineIndexCount;const i=this._patternMap,s=i.size;if(e[r++]=s,s>0)for(const[t,[n,s]]of i)e[r++]=t,e[r++]=n,e[r++]=s;e[r++]=this._fillVertexBuffer.array.length;for(let t=0;t<this._fillVertexBuffer.array.length;t++)n[r++]=this._fillVertexBuffer.array[t];e[r++]=this._fillIndexBuffer.array.length;for(let t=0;t<this._fillIndexBuffer.array.length;t++)e[r++]=this._fillIndexBuffer.array[t];e[r++]=this._outlineVertexBuffer.array.length;for(let t=0;t<this._outlineVertexBuffer.array.length;t++)n[r++]=this._outlineVertexBuffer.array[t];e[r++]=this._outlineIndexBuffer.array.length;for(let t=0;t<this._outlineIndexBuffer.array.length;t++)e[r++]=this._outlineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,n,r,i,s,o){if(!t)return;const a=t.length,h=!i||0===i.length;if(e&&(!n||h))for(let e=0;e<a;e++)this._processOutline(t[e],i);let l;for(let e=0;e<a;e++){const n=C._area(t[e]);n>32?(void 0!==l&&this._processFill(t,l,r,s,o),l=[e]):n<-32&&void 0!==l&&l.push(e)}void 0!==l&&this._processFill(t,l,r,s,o)}_processOutline(t,e){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,i=r.index;let o,a,h;const l=new s.bR(0,0),c=new s.bR(0,0),u=new s.bR(0,0);let f=-1,d=-1,x=-1,y=-1,g=-1,p=!1,_=t.length;if(_<2)return;const m=t[0];let I=t[_-1];for(;_&&I.isEqual(m);)--_,I=t[_-1];if(!(_-0<2)){for(let i=0;i<_;++i){0===i?(o=t[_-1],a=t[0],h=t[1],l.assignSub(a,o),l.normalize(),l.rightPerpendicular()):(o=a,a=h,h=i!==_-1?t[i+1]:t[0],l.assign(c));const s=this._isClipEdge(o,a);-1===y&&(p=s),c.assignSub(h,a),c.normalize(),c.rightPerpendicular();const m=l.x*c.y-l.y*c.x;u.assignAdd(l,c),u.normalize();const I=-u.x*-l.x+-u.y*-l.y;let w=Math.abs(0!==I?1/I:1);w>8&&(w=8),m>=0?(x=n.add(a.x,a.y,l.x,l.y,0,1,e),-1===y&&(y=x),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,w*-u.x,w*-u.y,0,-1,e),-1===g&&(g=d),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=d,d=x,x=n.add(a.x,a.y,u.x,u.y,0,1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,c.x,c.y,0,1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x)):(x=n.add(a.x,a.y,w*u.x,w*u.y,0,1,e),-1===y&&(y=x),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,-l.x,-l.y,0,-1,e),-1===g&&(g=d),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=d,d=x,x=n.add(a.x,a.y,-u.x,-u.y,0,-1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=n.add(a.x,a.y,-c.x,-c.y,0,-1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x))}f>=0&&d>=0&&y>=0&&!p&&r.add(f,d,y),f>=0&&y>=0&&g>=0&&!p&&r.add(f,g,y),this._outlineIndexCount+=3*(r.index-i)}}_processFill(t,e,n,r,i){let s;e.length>1&&(s=[]);let o=0;for(const n of e)0!==o&&s.push(o),o+=t[n].length;const a=2*o,h=V.A.acquire();for(const n of e){const e=t[n],r=e.length;for(let t=0;t<r;++t)h.push(e[t].x,e[t].y)}const l=(0,z.e)(h,s,2);if(z.e.deviation(h,s,2,l)>0){const r=e.map(e=>t[e].length),{buffer:s,vertexCount:o}=(0,I.QT)(h,r);if(o>0){const t=this._fillVertexBuffer.index;for(let t=0;t<o;t++)this._fillVertexBuffer.add(s[2*t],s[2*t+1],n);for(let e=0;e<o;e+=3){const n=t+e;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==i){const t=this._patternMap,e=t.get(i);e?e[1]+=o:t.set(i,[this._fillIndexStart+this._fillIndexCount,o])}this._fillIndexCount+=o}}else{const t=l.length;if(t>0){const e=this._fillVertexBuffer.index;let r=0;for(;r<a;)this._fillVertexBuffer.add(h[r++],h[r++],n);let s=0;for(;s<t;)this._fillIndexBuffer.add(e+l[s++],e+l[s++],e+l[s++]);if(void 0!==i){const e=this._patternMap,n=e.get(i);n?n[1]+=t:e.set(i,[this._fillIndexStart+this._fillIndexCount,t])}this._fillIndexCount+=t}}V.A.release(h)}_isClipEdge(t,e){return t.x===e.x?t.x<=-64||t.x>=4160:t.y===e.y&&(t.y<=-64||t.y>=4160)}static _area(t){let e=0;const n=t.length-1;for(let r=0;r<n;r++)e+=(t[r].x-t[r+1].x)*(t[r].y+t[r+1].y);return e+=(t[n].x-t[0].x)*(t[n].y+t[0].y),.5*e}}var R=n(83773);class E extends N{constructor(t,e,n,r,i){super(t,e,n),this.type=2,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=r,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new R.i(D(this.tessellationProperties),F(this.tessellationProperties),t.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(t,e,n){const r=this.layer,i=this.zoom,s=r.getPaintProperty("line-pattern"),o=r.getPaintProperty("line-dasharray"),a=r.getLayoutProperty("line-cap");if(!s&&!o)return;const h=a?.getValue(i)||0,l=a?.isDataDriven,c=s?.isDataDriven,u=o?.isDataDriven;if(c||u)for(const t of this._features)e(c?s.getValue(i,t):this._getDashArrayKey(t,i,r,o,l,a,h));else if(s)e(s.getValue(i));else if(o){const t=o.getValue(i);e(r.getDashKey(t,h))}}processFeatures(t){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const e=this.layer,n=this.zoom,r=this._features,i=this._tessellationOptions,{hasDataDrivenLine:s,lineMaterial:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("line-pattern"),h=e.getPaintProperty("line-dasharray"),l=a?.isDataDriven,c=h?.isDataDriven;let u;u=e.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:e.getLayoutValue("line-cap",n),x=d||0,y=!!f;u=e.getLayoutProperty("line-join");const g=u?.isDataDriven?u:null,p=g?null:e.getLayoutValue("line-join",n);u=e.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:e.getLayoutValue("line-miter-limit",n);u=e.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,w=I?null:e.getLayoutValue("line-round-limit",n);u=e.getPaintProperty("line-width");const b=u?.isDataDriven?u:null,P=b?null:e.getPaintValue("line-width",n);u=e.getPaintProperty("line-offset");const M=u?.isDataDriven?u:null,T=M?null:e.getPaintValue("line-offset",n);if(l||c){const s=[];for(const i of r){const r=l?a.getValue(n,i):this._getDashArrayKey(i,n,e,h,y,f,x),c=this._spriteInfo[r];if(!c?.rect)continue;const u=o.encodeAttributes(i,n,e,c),v=i.getGeometry(t);s.push({ddAttributes:u,page:c.page,cap:f?f.getValue(n,i):d,join:g?g.getValue(n,i):p,miterLimit:_?_.getValue(n,i):m,roundLimit:I?I.getValue(n,i):w,halfWidth:.5*(b?b.getValue(n,i):P),offset:M?M.getValue(n,i):T,geometry:v})}s.sort((t,e)=>t.page-e.page),i.textured=!0;for(const{ddAttributes:t,page:e,cap:n,join:r,miterLimit:o,roundLimit:a,halfWidth:h,offset:l,geometry:c}of s)i.capType=n,i.joinType=r,i.miterLimit=o,i.roundLimit=a,i.halfWidth=h,i.offset=l,this._processFeature(c,t,e)}else{if(a){const t=a.getValue(n),e=this._spriteInfo[t];if(!e?.rect)return}i.textured=!(!a&&!h),i.capType=d,i.joinType=p,i.miterLimit=m,i.roundLimit=w,i.halfWidth=.5*P,i.offset=T;for(const a of r){const r=s?o.encodeAttributes(a,n,e):null;f&&(i.capType=f.getValue(n,a)),g&&(i.joinType=g.getValue(n,a)),_&&(i.miterLimit=_.getValue(n,a)),I&&(i.roundLimit=I.getValue(n,a)),b&&(i.halfWidth=.5*b.getValue(n,a)),M&&(i.offset=M.getValue(n,a));const h=a.getGeometry(t);this._processFeature(h,r)}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this.tessellationProperties._lineVertexBuffer.array.length,t+=this.tessellationProperties._lineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._lineIndexStart,e[r++]=this._lineIndexCount;const i=this._patternMap,s=i.size;if(e[r++]=s,s>0)for(const[t,[n,s]]of i)e[r++]=t,e[r++]=n,e[r++]=s;e[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineVertexBuffer.array.length;t++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[t];e[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineIndexBuffer.array.length;t++)e[r++]=this.tessellationProperties._lineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,n){if(!t)return;const r=t.length;for(let i=0;i<r;i++)this._processGeometry(t[i],e,n)}_processGeometry(t,e,n){if(t.length<2)return;let r,i,s=t[0],o=1;for(;o<t.length;)r=t[o].x-s.x,i=t[o].y-s.y,r*r+i*i<1e-6?t.splice(o,1):(s=t[o],++o);if(t.length<2)return;const a=this.tessellationProperties._lineIndexBuffer,h=3*a.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=e,this._lineTessellator.tessellate(t,this._tessellationOptions);const l=3*a.index-h;if(void 0!==n){const t=this._patternMap,e=t.get(n);e?e[1]+=l:t.set(n,[h+this._lineIndexCount,l])}this._lineIndexCount+=l}_getDashArrayKey(t,e,n,r,i,s,o){const a=i?s.getValue(e,t):o,h=r.getValue(e,t);return n.getDashKey(h,a)}}const D=t=>(e,n,r,i,s,o,a,h,l,c,u)=>(t._lineVertexBuffer.add(e,n,a,h,r,i,s,o,l,c,u,t._ddValues),t._lineVertexBuffer.index-1),F=t=>(e,n,r)=>{t._lineIndexBuffer.add(e,n,r)};var U=n(32488),O=n(97768),G=n(799),Z=n(36745),Y=n(78957),W=n(92722);function q(t){let e=0;for(let n=0,r=t.length-1;n<t.length;r=n++)e+=(t[r].x-t[n].x)*(t[n].y+t[r].y);return.5*e}var j=n(4264);function K(t,e){return t.iconMosaicItem&&e.iconMosaicItem?t.iconMosaicItem.page===e.iconMosaicItem.page?0:t.iconMosaicItem.page-e.iconMosaicItem.page:t.iconMosaicItem&&!e.iconMosaicItem?1:!t.iconMosaicItem&&e.iconMosaicItem?-1:0}class J extends N{constructor(t,e,n,r,i,s,o,a,h){super(e,n,h.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=t,this._iconVertexBuffer=r,this._iconIndexBuffer=i,this._textVertexBuffer=s,this._textIndexBuffer=o,this._placementEngine=a,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new U.A}getResources(t,e,n){const r=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);const s=r.getLayoutProperty("icon-image"),o=r.getLayoutProperty("text-field");let a=r.getLayoutProperty("text-transform"),h=r.getLayoutProperty("text-font");const l=[];let c,u,f,d;s&&!s.isDataDriven&&(c=s.getValue(i)),o&&!o.isDataDriven&&(u=o.getValue(i)),a&&a.isDataDriven||(f=r.getLayoutValue("text-transform",i),a=null),h&&h.isDataDriven||(d=r.getLayoutValue("text-font",i),h=null);for(const x of this._features){const y=x.getGeometry(t);if(!y||0===y.length)continue;let g,p;s&&(g=s.isDataDriven?s.getValue(i,x):this._replaceKeys(c,x.values),g&&e(g));let _=!1;if(o&&(p=o.isDataDriven?o.getValue(i,x):this._replaceKeys(u,x.values),p)){switch(p=p.replaceAll("\\n","\n"),a&&(f=a.getValue(i,x)),f){case 2:p=p.toLowerCase();break;case 1:p=p.toUpperCase()}if(J._bidiEngine.hasBidiChar(p)){let t;t="rtl"===J._bidiEngine.checkContextual(p)?"IDNNN":"ICNNN",p=J._bidiEngine.bidiTransform(p,t,"VLYSN"),_=!0}if(p.length>0){h&&(d=h.getValue(i,x));for(const t of d){let e=n[t];e||(e=n[t]=new Set);for(const t of p){const n=t.codePointAt(0);null!=n&&e.add(n)}}}}if(!g&&!p)continue;const m=r.getLayoutValue("symbol-sort-key",i,x),I={feature:x,sprite:g,label:p,rtl:_,geometry:y,hash:(p?(0,G.Wm)(p):0)^(g?(0,G.Wm)(g):0),priority:m,textFont:d};l.push(I)}this._symbolFeatures=l}processFeatures(t){t&&t.setExtent(this.layerExtent);const e=this.layer,n=this.zoom,r=e.getLayoutValue("symbol-placement",n),i=0!==r,s=8*e.getLayoutValue("symbol-spacing",n),a=e.getLayoutProperty("icon-image"),h=e.getLayoutProperty("text-field"),l=a?new j.aR(e,n,i):null,c=h?new j.uU(e,n,i):null,u=this._workerTileHandler;let d;a&&(d=u.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 y=[];let g=1;c?.size&&(g=c.size/24);const p=c?c.maxAngle*o.os:0,_=c?8*c.size:0;for(const t of this._symbolFeatures){let o,a;l&&d&&t.sprite&&(o=d[t.sprite],o&&o.sdf&&(this._isIconSDF=!0)),o&&l.update(n,t.feature);let h=0;const m=t.label;if(m){(0,O.Lw)(c),c.update(n,t.feature);const e=i&&0===c.rotationAlignment?c.keepUpright:c.writingMode&&c.writingMode.includes(1);let r=.5;switch(c.anchor){case 5:case 1:case 7:r=0;break;case 6:case 2:case 8:r=1}let s=.5;switch(c.anchor){case 5:case 3:case 6:s=0;break;case 7:case 4:case 8:s=1}let o=.5;switch(c.justify){case 0:o=r;break;case 1:o=0;break;case 3:o=1}const l=24*c.letterSpacing,d=i?0:24*c.maxWidth,x=24*c.lineHeight,y=t.textFont.map(t=>u.getGlyphItems(t));if(a=new f(y,d,x,l,r,s,o).getShaping(m,t.rtl,e),a&&a.length>0){let t=1e30,e=-1e30;for(const n of a)t=Math.min(t,n.x),e=Math.max(e,n.x);h=(e-t+48)*g*8}}const I=J._getPlacementCandidates(e,r,t.feature,t.geometry);for(const e of I){let{vertices:n}=e;const u=[];if(1===r){if(a?.length&&c?.size){const t=8*c.size*(2+Math.min(2,4*Math.abs(c.offset[1])));n=J._smoothVertices(n,t)}J._pushAnchors(u,n,s,h)}else 2===r?J._pushCenterAnchor(u,n):3===t.feature.type?e.anchor?u.push(e.anchor):J._pushCentroid(u,n):u.push(new x(n[0].x,n[0].y));for(const e of u){if(e.x<0||e.x>4096||e.y<0||e.y>4096)continue;if(i&&h>0&&0===c?.rotationAlignment&&!J._honorsTextMaxAngle(n,e,h,p,_))continue;const r={shaping:a,line:n,iconMosaicItem:o,anchor:e,symbolFeature:t,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};y.push(r),this._processFeature(r,l,c)}}}y.sort(K),this._addPlacedGlyphs(),this._symbolInstances=y}serialize(){let t=14;t+=this.layerUIDs.length,t+=3*this.markerPageMap.size,t+=3*this.glyphsPageMap.size,t+=J._symbolsSerializationLength(this._symbolInstances),t+=this._iconVertexBuffer.array.length,t+=this._iconIndexBuffer.array.length,t+=this._textVertexBuffer.array.length,t+=this._textIndexBuffer.array.length;const e=new Uint32Array(t),n=new Int32Array(e.buffer),r=new Float32Array(e.buffer),[i,s,o]=this._sourceTileKey.split("/");let a=0;e[a++]=this.type,e[a++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[a++]=this.layerUIDs[t];e[a++]=this._isIconSDF?1:0,e[a++]=parseFloat(i),e[a++]=parseFloat(s),e[a++]=parseFloat(o),e[a++]=this.markerPageMap.size;for(const[t,[n,r]]of this.markerPageMap)e[a++]=t,e[a++]=n,e[a++]=r;e[a++]=this.glyphsPageMap.size;for(const[t,[n,r]]of this.glyphsPageMap)e[a++]=t,e[a++]=n,e[a++]=r;e[a++]=this._iconVertexBuffer.index/4,e[a++]=this._textVertexBuffer.index/4,a=J.serializeSymbols(e,n,r,a,this._symbolInstances),e[a++]=this._iconVertexBuffer.array.length;for(let t=0;t<this._iconVertexBuffer.array.length;t++)n[a++]=this._iconVertexBuffer.array[t];e[a++]=this._iconIndexBuffer.array.length;for(let t=0;t<this._iconIndexBuffer.array.length;t++)e[a++]=this._iconIndexBuffer.array[t];e[a++]=this._textVertexBuffer.array.length;for(let t=0;t<this._textVertexBuffer.array.length;t++)n[a++]=this._textVertexBuffer.array[t];e[a++]=this._textIndexBuffer.array.length;for(let t=0;t<this._textIndexBuffer.array.length;t++)e[a++]=this._textIndexBuffer.array[t];return e.buffer}static _symbolsSerializationLength(t){let e=0;e+=1;for(const n of t||[]){e+=5,e+=1;for(const t of n.textColliders)e+=10;for(const t of n.iconColliders)e+=10;e+=1,e+=2*n.textVertexRanges.length,e+=1,e+=2*n.iconVertexRanges.length}return e}static serializeSymbols(t,e,n,r,i){i=i||[],e[r++]=i.length;for(const t of i){e[r++]=t.anchor.x,e[r++]=t.anchor.y,e[r++]=t.symbolFeature.hash,e[r++]=t.symbolFeature.priority,e[r++]=t.symbolFeature.feature.featureIndex,e[r++]=t.textColliders.length+t.iconColliders.length;for(const i of t.textColliders)e[r++]=i.xTile,e[r++]=i.yTile,e[r++]=i.dxPixels,e[r++]=i.dyPixels,e[r++]=i.hard?1:0,e[r++]=i.partIndex,n[r++]=i.minLod,n[r++]=i.maxLod,e[r++]=i.width,e[r++]=i.height;for(const i of t.iconColliders)e[r++]=i.xTile,e[r++]=i.yTile,e[r++]=i.dxPixels,e[r++]=i.dyPixels,e[r++]=i.hard?1:0,e[r++]=i.partIndex,n[r++]=i.minLod,n[r++]=i.maxLod,e[r++]=i.width,e[r++]=i.height;e[r++]=t.textVertexRanges.length;for(const[n,i]of t.textVertexRanges)e[r++]=n,e[r++]=i;e[r++]=t.iconVertexRanges.length;for(const[n,i]of t.iconVertexRanges)e[r++]=n,e[r++]=i}return r}_replaceKeys(t,e){return t.replaceAll(/{([^{}]+)}/g,(t,n)=>n in e?e[n]:"")}_processFeature(t,e,n){const{line:r,iconMosaicItem:i,shaping:s,anchor:a}=t,h=this.zoom,l=this.layer,c=!!i;let u=!0;c&&(u=e?.optional||!i);const f=s&&s.length>0,d=!f||n?.optional;let x,y;if(c&&(x=this._placementEngine.getIconPlacement(a,i,e)),(x||u)&&(f&&(y=this._placementEngine.getTextPlacement(a,s,r,n)),y||d)){if(x&&y||(d||u?d||y?u||x||(y=null):x=null:(x=null,y=null)),y){const e=l.hasDataDrivenText?l.textMaterial.encodeAttributes(t.symbolFeature.feature,h,l):null;if(this._storePlacedGlyphs(t,y.shapes,h,n.rotationAlignment,e),y.textColliders){t.textColliders=y.textColliders;for(const t of y.textColliders){t.minLod=Math.max(h+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(h+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const n=Math.cos(e),r=Math.sin(e),i=t.dxPixels*n-t.dyPixels*r,s=t.dxPixels*r+t.dyPixels*n,o=(t.dxPixels+t.width)*n-t.dyPixels*r,a=(t.dxPixels+t.width)*r+t.dyPixels*n,h=t.dxPixels*n-(t.dyPixels+t.height)*r,l=t.dxPixels*r+(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n-(t.dyPixels+t.height)*r,u=(t.dxPixels+t.width)*r+(t.dyPixels+t.height)*n,f=Math.min(i,o,h,c),d=Math.max(i,o,h,c),x=Math.min(s,a,l,u),y=Math.max(s,a,l,u);t.dxPixels=f,t.dyPixels=x,t.width=d-f,t.height=y-x}}}}if(x){const n=l.hasDataDrivenIcon?l.iconMaterial.encodeAttributes(t.symbolFeature.feature,h,l):null;if(this._addPlacedIcons(t,x.shapes,h,i.page,1===e.rotationAlignment,n),x.iconColliders){t.iconColliders=x.iconColliders;for(const t of x.iconColliders){t.minLod=Math.max(h+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(h+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const n=Math.cos(e),r=Math.sin(e),i=t.dxPixels*n-t.dyPixels*r,s=t.dxPixels*r+t.dyPixels*n,o=(t.dxPixels+t.width)*n-t.dyPixels*r,a=(t.dxPixels+t.width)*r+t.dyPixels*n,h=t.dxPixels*n-(t.dyPixels+t.height)*r,l=t.dxPixels*r+(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n-(t.dyPixels+t.height)*r,u=(t.dxPixels+t.width)*r+(t.dyPixels+t.height)*n,f=Math.min(i,o,h,c),d=Math.max(i,o,h,c),x=Math.min(s,a,l,u),y=Math.max(s,a,l,u);t.dxPixels=f,t.dyPixels=x,t.width=d-f,t.height=y-x}}}}}}_addPlacedIcons(t,e,n,r,i,s){const a=Math.max(n-1,0),h=this._iconVertexBuffer,l=this._iconIndexBuffer,c=this._markerMap;for(const u of e){const e=i?0:Math.max(n+(0,o.p6)(u.minzoom),a),f=i?25:Math.min(n+(0,o.p6)(u.maxzoom),25);if(f<=e)continue;const d=u.tl,x=u.tr,y=u.bl,g=u.br,p=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,w=u.anchor,b=h.index,P=p.x,M=p.y,T=P+p.width,v=M+p.height,A=h.index;h.add(w.x,w.y,d.x,d.y,P,M,_,m,I,e,f,s),h.add(w.x,w.y,x.x,x.y,T,M,_,m,I,e,f,s),h.add(w.x,w.y,y.x,y.y,P,v,_,m,I,e,f,s),h.add(w.x,w.y,g.x,g.y,T,v,_,m,I,e,f,s),t.iconVertexRanges.length>0&&t.iconVertexRanges[0][0]+t.iconVertexRanges[0][1]===A?t.iconVertexRanges[0][1]+=4:t.iconVertexRanges.push([A,4]),l.add(b,b+1,b+2),l.add(b+1,b+2,b+3),c.has(r)?c.get(r)[1]+=6:c.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const t=this._textVertexBuffer,e=this._textIndexBuffer,n=this._glyphMap;for(const[r,i]of this._glyphBufferDataStorage)for(const s of i){const i=t.index,o=s.symbolInstance,a=s.ddAttributes,h=t.index;t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tl[0],s.tl[1],s.xmin,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tr[0],s.tr[1],s.xmax,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.bl[0],s.bl[1],s.xmin,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.br[0],s.br[1],s.xmax,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),o.textVertexRanges.length>0&&o.textVertexRanges[0][0]+o.textVertexRanges[0][1]===h?o.textVertexRanges[0][1]+=4:o.textVertexRanges.push([h,4]),e.add(i,i+1,i+2),e.add(i+1,i+2,i+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(t,e,n,r,i){const s=Math.max(n-1,0),a=1===r;let h,l,c,u,f,d,x,y,g,p,_;for(const r of e)h=a?0:Math.max(n+(0,o.p6)(r.minzoom),s),l=a?25:Math.min(n+(0,o.p6)(r.maxzoom),25),l<=h||(c=r.tl,u=r.tr,f=r.bl,d=r.br,x=r.labelAngle,y=r.minAngle,g=r.maxAngle,p=r.anchor,_=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[p.x,p.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:x,minAngle:y,maxAngle:g,minLod:h,maxLod:l,placementLod:s,symbolInstance:t,ddAttributes:i}))}static _pushAnchors(t,e,n,r){n+=r;let i=0;const a=e.length-1;for(let t=0;t<a;t++)i+=s.bR.distance(e[t],e[t+1]);let h=r||n;if(h*=.5,i<=h)return;const l=h/i;let c=0,u=-(n=i/Math.max(Math.round(i/n),1))/2;const f=e.length-1;for(let r=0;r<f;r++){const i=e[r],s=e[r+1],a=s.x-i.x,h=s.y-i.y,f=Math.sqrt(a*a+h*h);let d;for(;u+n<c+f;){u+=n;const e=(u-c)/f,y=(0,o.GW)(i.x,s.x,e),g=(0,o.GW)(i.y,s.y,e);void 0===d&&(d=Math.atan2(h,a)),t.push(new x(y,g,d,r,l))}c+=f}}static _pushCenterAnchor(t,e){let n=0;const r=e.length-1;for(let t=0;t<r;t++)n+=s.bR.distance(e[t],e[t+1]);const i=n/2;let a=0;const h=e.length-1;for(let n=0;n<h;n++){const r=e[n],s=e[n+1],h=s.x-r.x,l=s.y-r.y,c=Math.sqrt(h*h+l*l);if(i<a+c){const e=(i-a)/c,u=(0,o.GW)(r.x,s.x,e),f=(0,o.GW)(r.y,s.y,e),d=Math.atan2(l,h);return void t.push(new x(u,f,d,n,0))}a+=c}}static _deviation(t,e,n){const r=(e.x-t.x)*(n.x-e.x)+(e.y-t.y)*(n.y-e.y),i=(e.x-t.x)*(n.y-e.y)-(e.y-t.y)*(n.x-e.x);return Math.atan2(i,r)}static _honorsTextMaxAngle(t,e,n,r,i){let o=0;const a=n/2;let h=new s.bR(e.x,e.y),l=e.segment+1;for(;o>-a;){if(--l,l<0)return!1;o-=s.bR.distance(t[l],h),h=t[l]}o+=s.bR.distance(t[l],t[l+1]);const c=[];let u=0;const f=t.length;for(;o<a;){const e=t[l];let n,a=l;do{if(++a,a===f)return!1;n=t[a]}while(n.isEqual(e));let h,d=a;do{if(++d,d===f)return!1;h=t[d]}while(h.isEqual(n));const x=this._deviation(e,n,h);for(c.push({deviation:x,distToAnchor:o}),u+=x;o-c[0].distToAnchor>i;)u-=c.shift().deviation;if(Math.abs(u)>r)return!1;o+=s.bR.distance(n,h),l=a}return!0}static _smoothVertices(t,e){if(e<=0)return t;let n=t.length;if(n<3)return t;const r=[];let i=0,o=0;r.push(0);for(let e=1;e<n;e++){const n=s.bR.distance(t[e],t[e-1]);n>0&&(i+=n,r.push(i),o++,o!==e&&(t[o]=t[e]))}if(n=o+1,n<3)return t;e=Math.min(e,.2*i);const a=t[0].x,h=t[0].y,l=t[n-1].x,c=t[n-1].y,u=s.bR.sub(t[0],t[1]);u.normalize(),t[0].x+=e*u.x,t[0].y+=e*u.y,u.assignSub(t[n-1],t[n-2]),u.normalize(),t[n-1].x+=e*u.x,t[n-1].y+=e*u.y,r[0]-=e,r[n-1]+=e;const f=[];f.push(new s.bR(a,h));const d=1e-6,x=.5*e;for(let i=1;i<n-1;i++){let o=0,a=0,h=0;for(let n=i-1;n>=0;n--){const s=x+r[n+1]-r[i];if(s<0)break;const l=r[n+1]-r[n],c=r[i]-r[n]<x?1:s/l;if(c<d)break;const u=c*c,f=c*s-.5*u*l,y=c*l/e,g=t[n+1],p=t[n].x-g.x,_=t[n].y-g.y;o+=y/f*(g.x*c*s+.5*u*(s*p-l*g.x)-u*c*l*p/3),a+=y/f*(g.y*c*s+.5*u*(s*_-l*g.y)-u*c*l*_/3),h+=y}for(let s=i+1;s<n;s++){const n=x-r[s-1]+r[i];if(n<0)break;const l=r[s]-r[s-1],c=r[s]-r[i]<x?1:n/l;if(c<d)break;const u=c*c,f=c*n-.5*u*l,y=c*l/e,g=t[s-1],p=t[s].x-g.x,_=t[s].y-g.y;o+=y/f*(g.x*c*n+.5*u*(n*p-l*g.x)-u*c*l*p/3),a+=y/f*(g.y*c*n+.5*u*(n*_-l*g.y)-u*c*l*_/3),h+=y}f.push(new s.bR(o/h,a/h))}return f.push(new s.bR(l,c)),t[0].x=a,t[0].y=h,t[n-1].x=l,t[n-1].y=c,f}static _getPlacementCandidates(t,e,n,r){if(0!==e||3!==n.type||"geojson"!==t.sourceType)return r.map(t=>({anchor:null,vertices:t}));const i=function(t){let e=null,n=0,r=[],i=0;for(const s of t){const t=q(s);t>0?(i>n&&(n=i,e=r),r=[s],i=t):t<0&&r.length>0&&(r.push(s),i+=t)}if(i>n&&(e=r),!e)return null;const s=e.map(t=>t.length),o=[];for(const t of e)for(const e of t)o.push(e.x,e.y);const a=Z.z.fromOptimized(new W.A(s,o),"esriGeometryPolygon"),h=(0,Y.R)(a);return h?{x:h[0],y:h[1],vertices:e[0]}:null}(r);return i?[{anchor:new x(i.x,i.y),vertices:i.vertices}]:[]}static _pushCentroid(t,e){const n=4096,r=4096,i=e.length-1;let s=0,o=0,a=0,h=e[0].x,l=e[0].y;h>n&&(h=n),h<0&&(h=0),l>r&&(l=r),l<0&&(l=0);for(let t=1;t<i;t++){let i=e[t].x,c=e[t].y,u=e[t+1].x,f=e[t+1].y;i>n&&(i=n),i<0&&(i=0),c>r&&(c=r),c<0&&(c=0),u>n&&(u=n),u<0&&(u=0),f>r&&(f=r),f<0&&(f=0);const d=(i-h)*(f-l)-(u-h)*(c-l);s+=d*(h+i+u),o+=d*(l+c+f),a+=d}s/=3*a,o/=3*a,isNaN(s)||isNaN(o)||t.push(new x(s,o))}}class H{constructor(t,e,n,r,i,a,h){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=e,this._sourceDataMaxLOD=r,this._baseUrl=h,a){this._styleLayerUIDs=new Set;for(const t of a)this._styleLayerUIDs.add(t)}this._styleRepository=i,this._layers=this._styleRepository?.layers??[];const[l,c,u]=e.tileKey.split("/").map(parseFloat);this._level=l;const f=(0,o.IU)(this._level);for(const e of Object.keys(t)){const n=t[e];if(this._pbfTiles[e]=new m.A(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[t]=n.refKey.split("/").map(parseFloat),r=l-t;if(r>0){const t=(1<<r)-1,n=c&t,i=u&t;this._tileClippers[e]=new s.O3(r,n,i,8,f)}}this._tileClippers[e]||(this._tileClippers[e]=new s.Ox)}}_canParseStyleLayer(t){return!this._styleLayerUIDs||this._styleLayerUIDs.has(t)}async parse(t){const e=(0,I.If)(),n=this._initialize(t),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const i=[],s=new Set,o=(t,e)=>{s.has(t)||(i.push({name:t,repeat:e}),s.add(t))},a={};for(const t of r)t.getResources(t.tileClipper,o,a);if(4===this._tile.status)return[];const h=this._fetchResources(i,a,t);return Promise.all([...h,e]).then(()=>this._processFeatures(n.returnedBuckets))}_initialize(t){const e=t?.signal;return{signal:e,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(t){const{sourceNameToTileData:e,zoom:n,layers:r,sourceNameToTileClipper:i,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:o,returnedBuckets:a,layerIdToBucket:h,referencerUIDToReferencedId:l}=t,c=this._sourceDataMaxLOD;for(let t=r.length-1;t>=0;t--){const u=r[t];if(n<c){if(u.minzoom&&n<Math.floor(u.minzoom)||u.maxzoom&&n>=u.maxzoom)continue}else if(u.maxzoom&&n>=u.maxzoom)continue;if(0===u.type||!this._canParseStyleLayer(u.uid)||!e[u.source]||!i[u.source])continue;const f=e[u.source],d=i[u.source],x=u.sourceLayer,y=f[x];if(y){let t=o[u.source];if(t||(t=o[u.source]=new Set),t.add(u.sourceLayer),u.refLayerId)l.set(u.uid,u.refLayerId);else{const t=this._createBucket(u);if(t){t.layerUIDs=[u.uid],t.layerExtent=y.extent,t.tileClipper=d;let e=s[u.source];e||(e=s[u.source]={});let n=e[x];n||(n=e[x]=[]),n.push(t),a.push(t),h[u.id]=t}}}}}_linkReferences(t){const{layerIdToBucket:e,referencerUIDToReferencedId:n}=t;n.forEach((t,n)=>{e[t]&&e[t].layerUIDs.push(n)})}_filterFeatures(t){const{signal:e,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:s}=t,o=10*this._level,a=10*(this._level+1),h=[],l=[];for(const t of Object.keys(s))s[t].forEach(e=>{h.push(e),l.push(t)});for(let t=0;t<h.length;t++){const s=l[t],c=h[t];if(!n[s]||!i[s])continue;const u=n[s][c],f=i[s][c];if(!f||0===f.length)continue;if((0,r.G4)(e))return;let d=0;const x=u.getData();for(;x.nextTag(2);){const t=x.getMessage(),e=new w(t,u,d++);t.release();const n=e.values;if(n){const t=n._minzoom;if(t&&t>=a)continue;const e=n._maxzoom;if(e&&e<=o)continue}for(const t of f)t.pushFeature(e)}}}_fetchResources(t,e,n){const r=[],i=this._tile.getWorkerTileHandler();let s,o;t.length>0&&(s=i.fetchSprites(t,this._client,n),r.push(s));for(const t in e){const s=e[t];s.size>0&&(o=i.fetchGlyphs(this._baseUrl,t,s,n),r.push(o))}return r}_processFeatures(t){const e=t.filter(t=>t.hasFeatures()||this._canParseStyleLayer(t.layer.uid));for(const t of e)t.processFeatures(t.tileClipper);return e}_parseTileData(t){const e={};for(const n of Object.keys(t)){const r=t[n],i={};for(;r.next();)switch(r.tag()){case 3:{const t=r.getMessage(),e=new M(t);t.release(),i[e.name]=e;break}default:r.skip()}e[n]=i}return e}_createBucket(t){switch(t.type){case 0:return null;case 1:return this._createFillBucket(t);case 2:return this._createLineBucket(t);case 4:return this._createCircleBucket(t);case 3:return this._createSymbolBucket(t)}}_createFillBucket(t){return new C(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new A(t.fillMaterial.getStride()),new P,new S(t.outlineMaterial.getStride()),new P)}_createLineBucket(t){return new E(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new v(t.lineMaterial.getStride()),new P)}_createCircleBucket(t){return new B(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new k(t.circleMaterial.getStride()),new P)}_createSymbolBucket(t){const e=this._tile;return new J(e.tileKey,t,this._level,new L(t.iconMaterial.getStride()),new P,new L(t.textMaterial.getStride()),new P,e.placementEngine,e.getWorkerTileHandler())}}class ${constructor(t,e,n,r){this.status=0,this.placementEngine=new _,this.tileKey=t,this.refKeys=e,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(t,e){const n=e?.signal;if(null!=n){const t=()=>{n.removeEventListener("abort",t),this.status=4};n.addEventListener("abort",t)}let i;const s={bucketsWithData:[],emptyBuckets:null};try{i=await this._parse(t,e)}catch(t){if((0,r.zf)(t))throw t;return{result:s,transferList:[]}}this.status=2;const o=s.bucketsWithData,a=[];for(const t of i)if(t.hasFeatures()){const e=t.serialize();o.push(e)}else a.push(t.layer.uid);const h=[...o];let l=null;return a.length>0&&(l=Uint32Array.from(a),h.push(l.buffer)),s.emptyBuckets=l,{result:s,transferList:h}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(t,e){const n=t.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=3,new H(n,this,e.client,t.sourceDataMaxLOD,this._styleRepository,t.styleLayerUIDs,t.baseUrl).parse(e))}}var Q=n(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(t,e){const{key:n}=t,i={};for(const e of Object.keys(t.sourceName2DataAndRefKey)){const n=t.sourceName2DataAndRefKey[e];i[e]=n.refKey}const s=new $(n,i,this,this._styleRepository);this.initializeGlyphWorker(void 0,e);try{return await s.parse({...t,sourceDataMaxLOD:this._sourceDataMaxLOD},e)}catch(t){if(s.setObsolete(),s.release(),!(0,r.zf)(t))throw t;return null}}initializeGlyphWorker(t,e){return this._loaded??=(async()=>{const t=await e.client.invoke("openGlyphPorts"),n=await(0,i.N1)(t,{maxNumberOfConcurrentJobs:20});this._glyphWorker=n.createInvokeProxy()})()}updateStyle(t){if(!t||0===t.length||!this._styleRepository)return;const e=this._styleRepository;for(const n of t){const t=n.type,r=n.data;switch(t){case 0:e.setPaintProperties(r.layer,r.paint);break;case 1:e.setLayoutProperties(r.layer,r.layout);break;case 3:e.deleteStyleLayer(r.layer);break;case 2:e.setStyleLayer(r.layer,r.index);break;case 4:this._spriteInfo={}}}}setStyle(t){const{style:e,sourceDataMaxLOD:n}=t;this._styleRepository=new Q.A(e),this._sourceDataMaxLOD=n,this._spriteInfo={},this._glyphInfo={}}fetchSprites(t,e,n){const r=[],i=this._spriteInfo;for(const e of t)void 0===i[e.name]&&r.push(e);return 0===r.length?Promise.resolve():e.invoke("getSprites",r,{signal:n?.signal}).then(t=>{for(const e in t){const n=t[e];i[e]=n}})}getSpriteItems(){return this._spriteInfo}async fetchGlyphs(t,e,n,r){const i=[];let s=this._glyphInfo[e];if(s?n.forEach(t=>{s[t]||i.push(t)}):(s=this._glyphInfo[e]=[],n.forEach(t=>i.push(t))),0===i.length)return;if(await this._loaded,!this._glyphWorker)return void console.error("Failed to fetch glyphs: no worker connection");const o=String.fromCodePoint(...i),a=await this._glyphWorker.getGlyphItems(o,!1,t,e,!0,r);if(a)for(const t of a.glyphs)s[t.code]=t}getGlyphItems(t){return this._glyphInfo[t]}}},18989(t,e,n){n.d(e,{A:()=>r});class r{constructor(t=0,e=0,n=0,r=0){this.x=t,this.y=e,this.width=n,this.height=r}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}},83773(t,e,n){function r(t,e){return t.x===e.x&&t.y===e.y}function i(t){if(!t)return;const e=t.length;if(e<=1)return;let n=0;for(let i=1;i<e;i++)r(t[i],t[n])||++n===i||(t[n]=t[i]);t.length=n+1}function s(t,e){return t.x=e.y,t.y=-e.x,t}function o(t,e){return t.x=-e.y,t.y=e.x,t}function a(t,e){return t.x=e.x,t.y=e.y,t}function h(t,e){return t.x=-e.x,t.y=-e.y,t}function l(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function c(t,e){return t.x*e.y-t.y*e.x}function u(t,e){return t.x*e.x+t.y*e.y}function f(t,e,n,r){return t.x=e.x*n+e.y*r,t.y=e.x*r-e.y*n,t}n.d(e,{i:()=>d});class d{constructor(t,e,n){this._writeVertex=t,this._writeTriangle=e,this._canUseThinTessellation=n,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(t,e,n=this._canUseThinTessellation){i(t),n&&e.halfWidth<1.05&&!e.offset?this._tessellateThin(t,e):this._tessellate(t,e)}_tessellateThin(t,e){if(t.length<2)return;const n=e.wrapDistance||65535;let r=e.initialDistance||0,i=!1,s=t[0].x,o=t[0].y;const a=t.length;for(let e=1;e<a;++e){i&&(i=!1,r=0);let a=t[e].x,h=t[e].y,l=a-s,c=h-o,u=Math.sqrt(l*l+c*c);if(l/=u,c/=u,r+u>n){i=!0;const t=(n-r)/u;u=n-r,a=(1-t)*s+t*a,h=(1-t)*o+t*h,--e}const f=this._writeVertex(s,o,0,0,l,c,c,-l,0,-1,r),d=this._writeVertex(s,o,0,0,l,c,-c,l,0,1,r);r+=u;const x=this._writeVertex(a,h,0,0,l,c,c,-l,0,-1,r),y=this._writeVertex(a,h,0,0,l,c,-c,l,0,1,r);this._writeTriangle(f,d,x),this._writeTriangle(d,x,y),s=a,o=h}}_tessellate(t,e){const n=t[0],i=t[t.length-1],d=r(n,i),x=d?3:2;if(t.length<x)return;const y=e.pixelCoordRatio,g=null!=e.capType?e.capType:0,p=null!=e.joinType?e.joinType:2,_=null!=e.miterLimit?Math.min(e.miterLimit,4):2,m=null!=e.roundLimit?Math.min(e.roundLimit,1.05):1.05,I=null!=e.halfWidth?e.halfWidth:2,w=!!e.textured;let b,P,M,T=null;const v=this._prevNormal,A=this._nextNormal;let S=-1,L=-1;const k=this._joinNormal;let N,B;const V=this._textureNormalLeft,z=this._textureNormalRight,C=this._textureNormal;let R=-1,E=-1;const D=e.wrapDistance||65535;let F=e.initialDistance||0;const U=this._writeVertex,O=this._writeTriangle,G=(t,e,n,r,i,s)=>{const o=U(P,M,N,B,n,r,t,e,i,s,F);return R>=0&&E>=0&&o>=0&&O(R,E,o),R=E,E=o,o};d&&(b=t[t.length-2],A.x=i.x-b.x,A.y=i.y-b.y,L=l(A),A.x/=L,A.y/=L);let Z=!1;for(let e=0;e<t.length;++e){if(Z&&(Z=!1,F=0),b&&(v.x=-A.x,v.y=-A.y,S=L,F+S>D&&(Z=!0)),Z){const n=(D-F)/S;S=D-F,b={x:(1-n)*b.x+n*t[e].x,y:(1-n)*b.y+n*t[e].y},--e}else b=t[e];P=b.x,M=b.y;const n=e<=0&&!Z,r=e===t.length-1;if(n||(F+=S),T=r?d?t[1]:null:t[e+1],T?(A.x=T.x-P,A.y=T.y-M,L=l(A),A.x/=L,A.y/=L):(A.x=void 0,A.y=void 0),!d){if(n){o(k,A),N=k.x,B=k.y,2===g&&(G(-A.y-A.x,A.x-A.y,A.x,A.y,0,-1),G(A.y-A.x,-A.x-A.y,A.x,A.y,0,1)),1===g&&(G(-A.y-A.x,A.x-A.y,A.x,A.y,-1,-1),G(A.y-A.x,-A.x-A.y,A.x,A.y,-1,1)),1!==g&&0!==g||(G(-A.y,A.x,A.x,A.y,0,-1),G(A.y,-A.x,A.x,A.y,0,1));continue}if(r){s(k,v),N=k.x,B=k.y,1!==g&&0!==g||(G(v.y,-v.x,-v.x,-v.y,0,-1),G(-v.y,v.x,-v.x,-v.y,0,1)),2===g&&(G(v.y-v.x,-v.x-v.y,-v.x,-v.y,0,-1),G(-v.y-v.x,v.x-v.y,-v.x,-v.y,0,1)),1===g&&(G(v.y-v.x,-v.x-v.y,-v.x,-v.y,1,-1),G(-v.y-v.x,v.x-v.y,-v.x,-v.y,1,1));continue}}let i,x,U=-c(v,A);if(Math.abs(U)<.01)u(v,A)>0?(k.x=v.x,k.y=v.y,U=1,i=Number.MAX_VALUE,x=!0):(o(k,A),U=1,i=1,x=!1);else{k.x=(v.x+A.x)/U,k.y=(v.y+A.y)/U,i=l(k);const t=(i-1)*I*y;x=i>4||t>S&&t>L}N=k.x,B=k.y;let O=p;switch(p){case 0:i<1.05&&(O=2);break;case 1:i<m&&(O=2);break;case 2:i>_&&(O=0)}switch(O){case 2:if(G(k.x,k.y,-v.x,-v.y,0,-1),G(-k.x,-k.y,-v.x,-v.y,0,1),r)break;if(w){const t=Z?0:F;R=this._writeVertex(P,M,N,B,A.x,A.y,k.x,k.y,0,-1,t),E=this._writeVertex(P,M,N,B,A.x,A.y,-k.x,-k.y,0,1,t)}break;case 0:{const t=U<0;let e,n,i,l;if(t){const t=R;R=E,E=t,e=V,n=z}else e=z,n=V;if(x)i=t?o(this._innerPrev,v):s(this._innerPrev,v),l=t?s(this._innerNext,A):o(this._innerNext,A);else{const e=t?h(this._inner,k):a(this._inner,k);i=e,l=e}const c=t?s(this._bevelStart,v):o(this._bevelStart,v);G(i.x,i.y,-v.x,-v.y,e.x,e.y);const u=G(c.x,c.y,-v.x,-v.y,n.x,n.y);if(r)break;const d=t?o(this._bevelEnd,A):s(this._bevelEnd,A);if(x){const t=this._writeVertex(P,M,N,B,-v.x,-v.y,0,0,0,0,F);R=this._writeVertex(P,M,N,B,A.x,A.y,l.x,l.y,e.x,e.y,F),E=this._writeVertex(P,M,N,B,A.x,A.y,d.x,d.y,n.x,n.y,F),this._writeTriangle(u,t,E)}else{if(w){const t=this._bevelMiddle;t.x=(c.x+d.x)/2,t.y=(c.y+d.y)/2,f(C,t,-v.x,-v.y),G(t.x,t.y,-v.x,-v.y,C.x,C.y),f(C,t,A.x,A.y),R=this._writeVertex(P,M,N,B,A.x,A.y,t.x,t.y,C.x,C.y,F),E=this._writeVertex(P,M,N,B,A.x,A.y,l.x,l.y,e.x,e.y,F)}else{const t=R;R=E,E=t}G(d.x,d.y,A.x,A.y,n.x,n.y)}if(t){const t=R;R=E,E=t}break}case 1:{const t=U<0;let e,n;if(t){const t=R;R=E,E=t,e=V,n=z}else e=z,n=V;const l=t?h(this._inner,k):a(this._inner,k);let c,d;x?(c=t?o(this._innerPrev,v):s(this._innerPrev,v),d=t?s(this._innerNext,A):o(this._innerNext,A)):(c=l,d=l);const y=t?s(this._roundStart,v):o(this._roundStart,v),g=t?o(this._roundEnd,A):s(this._roundEnd,A),p=G(c.x,c.y,-v.x,-v.y,e.x,e.y),_=G(y.x,y.y,-v.x,-v.y,n.x,n.y);if(r)break;const m=this._writeVertex(P,M,N,B,-v.x,-v.y,0,0,0,0,F);x||this._writeTriangle(R,E,m);const I=h(this._outer,l),b=this._writeVertex(P,M,N,B,A.x,A.y,g.x,g.y,n.x,n.y,F);let T,S;const L=i>2;if(L){let e;i!==Number.MAX_VALUE?(I.x/=i,I.y/=i,e=u(v,I),e=(i*(e*e-1)+1)/e):e=-1,T=t?s(this._startBreak,v):o(this._startBreak,v),T.x+=v.x*e,T.y+=v.y*e,S=t?o(this._endBreak,A):s(this._endBreak,A),S.x+=A.x*e,S.y+=A.y*e}f(C,I,-v.x,-v.y);const D=this._writeVertex(P,M,N,B,-v.x,-v.y,I.x,I.y,C.x,C.y,F);f(C,I,A.x,A.y);const O=w?this._writeVertex(P,M,N,B,A.x,A.y,I.x,I.y,C.x,C.y,F):D,Z=m,Y=w?this._writeVertex(P,M,N,B,A.x,A.y,0,0,0,0,F):m;let W=-1,q=-1;if(L&&(f(C,T,-v.x,-v.y),W=this._writeVertex(P,M,N,B,-v.x,-v.y,T.x,T.y,C.x,C.y,F),f(C,S,A.x,A.y),q=this._writeVertex(P,M,N,B,A.x,A.y,S.x,S.y,C.x,C.y,F)),w?L?(this._writeTriangle(Z,_,W),this._writeTriangle(Z,W,D),this._writeTriangle(Y,O,q),this._writeTriangle(Y,q,b)):(this._writeTriangle(Z,_,D),this._writeTriangle(Y,O,b)):L?(this._writeTriangle(m,_,W),this._writeTriangle(m,W,q),this._writeTriangle(m,q,b)):(this._writeTriangle(m,_,D),this._writeTriangle(m,O,b)),x?(R=this._writeVertex(P,M,N,B,A.x,A.y,d.x,d.y,e.x,e.y,F),E=b):(R=w?this._writeVertex(P,M,N,B,A.x,A.y,d.x,d.y,e.x,e.y,F):p,this._writeTriangle(R,Y,b),E=b),t){const t=R;R=E,E=t}break}}}}}}}]);