@arcgis/core 5.2.0-next.74 → 5.2.0-next.75

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 (196) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +1 -0
  3. package/assets/esri/core/workers/chunks/0d3b2d9a19383bb63f0a.js +1 -0
  4. package/assets/esri/core/workers/chunks/0d9fe49812554e7d7ba7.js +1 -0
  5. package/assets/esri/core/workers/chunks/0daaa89de339e8ea4b81.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1ca04ecf010e68863014.js → 0eb35e09765fd74eb698.js} +1 -1
  7. package/assets/esri/core/workers/chunks/12234a63d3fa4bc25e7e.js +1 -0
  8. package/assets/esri/core/workers/chunks/18e0e993c0c39c962e61.js +1 -0
  9. package/assets/esri/core/workers/chunks/{859dd86c921053bf03a1.js → 1c49c9472167a2e0c923.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{cf360767310fb45660a8.js → 1cf8fb704c48ac3d3b15.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{2e44978ee677aa23163d.js → 2435ef7d11f8dbb920b7.js} +1 -1
  12. package/assets/esri/core/workers/chunks/2501d9459f6d14c797e5.js +1 -0
  13. package/assets/esri/core/workers/chunks/2740f755c3a322cbd477.js +1 -0
  14. package/assets/esri/core/workers/chunks/27f574acf52f2c8bc2c9.js +1 -0
  15. package/assets/esri/core/workers/chunks/2b93888e61ca638490cf.js +1 -0
  16. package/assets/esri/core/workers/chunks/2f4ed8a63d57636a4ebe.js +1 -0
  17. package/assets/esri/core/workers/chunks/{31d19bb72a9e79b30070.js → 30818b5ff0ce51b25d6f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/3235e14fedb19dd94807.js +1 -0
  19. package/assets/esri/core/workers/chunks/36ec5b84e551ab08b24a.js +1 -0
  20. package/assets/esri/core/workers/chunks/3c28e2040cb4fb716eaa.js +1 -0
  21. package/assets/esri/core/workers/chunks/3c32471785bc8570e41c.js +1 -0
  22. package/assets/esri/core/workers/chunks/4046bd65d7d0677f4600.js +1 -0
  23. package/assets/esri/core/workers/chunks/4295822fa6ef743c76f1.js +1 -0
  24. package/assets/esri/core/workers/chunks/{35fd2f765d2cb3f59a22.js → 42d5ed44111bea77ec71.js} +115 -115
  25. package/assets/esri/core/workers/chunks/43713bc6f7eea07259d0.js +1 -0
  26. package/assets/esri/core/workers/chunks/{a0a1f0bd3648738354a6.js → 43a65cab888d43954564.js} +1 -1
  27. package/assets/esri/core/workers/chunks/44a786aba84918f2b247.js +1 -0
  28. package/assets/esri/core/workers/chunks/46873badbd6ce8ff4e1e.js +1 -0
  29. package/assets/esri/core/workers/chunks/4d7a3b3aaf876da0891b.js +1 -0
  30. package/assets/esri/core/workers/chunks/{509aecafbc629bee1c15.js → 4fe2cca405180af23364.js} +1 -1
  31. package/assets/esri/core/workers/chunks/50b08415e072a49bc572.js +1 -0
  32. package/assets/esri/core/workers/chunks/519af918050b47f93516.js +1 -0
  33. package/assets/esri/core/workers/chunks/{bd311c85437743cf7d2f.js → 53d165b4f30fd64e5d8a.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{1a3afee3ecd806b4aa81.js → 552d6aecc7d88d16227b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{bff75cc7413bf0d319db.js → 5627f562dea8bae2f346.js} +1 -1
  36. package/assets/esri/core/workers/chunks/5ba3a30b7cbfa9e3aa62.js +1 -0
  37. package/assets/esri/core/workers/chunks/{0e81c6d4f1c81f9b0a1b.js → 5e1d84e97de0e662aaa9.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{2baa16ec8559e77c226f.js → 64a1ffc221e5b63b43fb.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{9ca59077712e45ef4d56.js → 6743d726e45e7b660505.js} +1 -1
  40. package/assets/esri/core/workers/chunks/69b0dcd7bcd8ec42e2c3.js +1 -0
  41. package/assets/esri/core/workers/chunks/6b783f440c4a5d36e879.js +1 -0
  42. package/assets/esri/core/workers/chunks/6dddd3df31961b9fda12.js +1 -0
  43. package/assets/esri/core/workers/chunks/6fc3553c52af6ace926d.js +1 -0
  44. package/assets/esri/core/workers/chunks/702b2381acf4d1f90094.js +1 -0
  45. package/assets/esri/core/workers/chunks/{9e25f715cda59c686a4c.js → 792303e4090c0c70c4ff.js} +1 -1
  46. package/assets/esri/core/workers/chunks/7a24cc0f3b4eff2bdb8e.js +1 -0
  47. package/assets/esri/core/workers/chunks/7dc5aedc964eacd1be5a.js +1 -0
  48. package/assets/esri/core/workers/chunks/841c81c280114412c95b.js +1 -0
  49. package/assets/esri/core/workers/chunks/8a36b999cbd65dd2f16c.js +1 -0
  50. package/assets/esri/core/workers/chunks/8ae3a6ddc87bf8315583.js +1 -0
  51. package/assets/esri/core/workers/chunks/9cff18e6f751d1b3085e.js +1 -0
  52. package/assets/esri/core/workers/chunks/{b6d26d9738c0787acc38.js → a6a2a4a2bae0d327d7ed.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{c1a4d499a30f3d80567b.js → a7a7d3289d4ca95f545f.js} +1 -1
  54. package/assets/esri/core/workers/chunks/abb6c76d5dba3559a68e.js +1 -0
  55. package/assets/esri/core/workers/chunks/b14961a9f1f40028f141.js +1 -0
  56. package/assets/esri/core/workers/chunks/b6cd165d0e58598f28a5.js +1 -0
  57. package/assets/esri/core/workers/chunks/{f1727b4a32cb6f36a5e6.js → b78f509fd8e95f728178.js} +1 -1
  58. package/assets/esri/core/workers/chunks/b9d1bb106737a05290e1.js +1 -0
  59. package/assets/esri/core/workers/chunks/{faa55265020591fd2224.js → bc0395777c5c1adb1ddb.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{94368a097e6190ce3c7a.js → c37b28f200b704ae6002.js} +1 -1
  61. package/assets/esri/core/workers/chunks/cff6390b863361eaeeed.js +1 -0
  62. package/assets/esri/core/workers/chunks/d1c7c877edc6948f3801.js +1 -0
  63. package/assets/esri/core/workers/chunks/d2172583ee6e481a66aa.js +1 -0
  64. package/assets/esri/core/workers/chunks/{193aed69de2dec4f36b6.js → d633e98b0dfa0490e4de.js} +1 -1
  65. package/assets/esri/core/workers/chunks/d8eca13c127b443141b7.js +1 -0
  66. package/assets/esri/core/workers/chunks/ddd8f6154e265dbb6f9f.js +1 -0
  67. package/assets/esri/core/workers/chunks/de601f0d5a2a282d2efd.js +1 -0
  68. package/assets/esri/core/workers/chunks/{fdca9873914b9dbd9244.js → e59101f1d060d0a30a65.js} +1 -1
  69. package/assets/esri/core/workers/chunks/eb1a86159dbc098f06fe.js +1 -0
  70. package/assets/esri/core/workers/chunks/{b3b53cf0a3a30164d337.js → ee9eb381e675d2d01260.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{264fd750691d517ab1f3.js → f43a0edf58941e2ac78e.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{4abd54518e35050feb90.js → f78acff510ca615d42e4.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{01c92e68fb17cf2d0e08.js → f7a5c4d22a24e1ac433c.js} +1 -1
  74. package/chunks/GaussianSplat.glsl.js +8 -8
  75. package/chunks/GaussianSplatShadow.glsl.js +4 -5
  76. package/chunks/OccludedGeometryDepth.glsl.js +5 -0
  77. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  78. package/config.js +1 -1
  79. package/core/importUtils.js +2 -0
  80. package/geometry/operators/importUtils.js +2 -0
  81. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  82. package/geometry/support/normalizeUtils.d.ts +17 -15
  83. package/geometry/support/normalizeUtils.js +1 -1
  84. package/kernel.js +1 -1
  85. package/layers/FeatureLayer.d.ts +1 -1
  86. package/layers/graphics/data/QueryEngine.js +1 -1
  87. package/layers/graphics/data/queryUtils.js +1 -1
  88. package/layers/graphics/hydratedFeatures.js +1 -1
  89. package/package.json +1 -1
  90. package/portal/schemas/definitions.js +1 -1
  91. package/rest/geoprocessor/utils.js +1 -1
  92. package/rest/identify.js +1 -1
  93. package/rest/imageService.js +1 -1
  94. package/rest/query/operations/query.js +1 -1
  95. package/rest/query/operations/queryAttributeBins.js +1 -1
  96. package/rest/query/operations/queryPivot.js +1 -1
  97. package/rest/query/operations/queryTopFeatures.js +1 -1
  98. package/support/revision.js +1 -1
  99. package/symbols/cim/CIMEffects.js +1 -1
  100. package/symbols/cim/utils.js +1 -1
  101. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  102. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  103. package/views/2d/viewpointUtils.js +1 -1
  104. package/views/3d/environment/EnvironmentManager.js +1 -1
  105. package/views/3d/interactive/Manipulator3D.js +1 -1
  106. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  107. package/views/3d/interactive/manipulatorUtils.js +1 -1
  108. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  109. package/views/3d/support/hitTest.js +1 -1
  110. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +8 -3
  111. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
  112. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +2 -0
  113. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +2 -0
  114. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechnique.js +2 -0
  115. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechniqueConfiguration.js +2 -0
  116. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClear.glsl.js +2 -0
  117. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClearTechnique.js +2 -0
  118. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastMaskTechnique.js +2 -0
  119. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastRenderer.js +2 -0
  120. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualize.glsl.js +2 -0
  121. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechnique.js +2 -0
  122. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechniqueConfiguration.js +2 -0
  123. package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
  124. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  125. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  126. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  127. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  128. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +28 -21
  129. package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +2 -0
  130. package/views/3d/webgl-engine/shaders/OccludedGeometryDepthTechnique.js +2 -0
  131. package/views/selection/SelectionOperation.js +1 -1
  132. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  133. package/widgets/support/SelectionList/GroupLayerItem.d.ts +8 -1
  134. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  135. package/widgets/support/SelectionList/LayerItem.d.ts +8 -1
  136. package/widgets/support/SelectionList/LayerItem.js +1 -1
  137. package/widgets/support/SelectionList/SelectionListViewModel.d.ts +29 -1
  138. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  139. package/widgets/support/SelectionList.js +1 -1
  140. package/widgets/support/SelectionToolbar.js +1 -1
  141. package/assets/esri/core/workers/chunks/0dbf31a663b5220a3136.js +0 -1
  142. package/assets/esri/core/workers/chunks/0df660dfd941cff3ea1d.js +0 -1
  143. package/assets/esri/core/workers/chunks/1418c03c4ab87f7ab5f4.js +0 -1
  144. package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +0 -1
  145. package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +0 -1
  146. package/assets/esri/core/workers/chunks/2a2ed7bd44010f24c2dd.js +0 -1
  147. package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +0 -1
  148. package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +0 -1
  149. package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +0 -1
  150. package/assets/esri/core/workers/chunks/45ccca01db0027b9dc16.js +0 -1
  151. package/assets/esri/core/workers/chunks/4cf2b0558a4acc141429.js +0 -1
  152. package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +0 -1
  153. package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +0 -1
  154. package/assets/esri/core/workers/chunks/553be2bd69bd311477ea.js +0 -1
  155. package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +0 -1
  156. package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +0 -1
  157. package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +0 -1
  158. package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +0 -1
  159. package/assets/esri/core/workers/chunks/64176f7ae719289a2f79.js +0 -1
  160. package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +0 -1
  161. package/assets/esri/core/workers/chunks/76b573143d1a65fdbcb6.js +0 -1
  162. package/assets/esri/core/workers/chunks/7b5b66ae79e0287e3ade.js +0 -1
  163. package/assets/esri/core/workers/chunks/7e373d9c98ce910db9d2.js +0 -1
  164. package/assets/esri/core/workers/chunks/86a4057572755b403548.js +0 -1
  165. package/assets/esri/core/workers/chunks/877594b6db08da98acd7.js +0 -1
  166. package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +0 -1
  167. package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +0 -1
  168. package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +0 -1
  169. package/assets/esri/core/workers/chunks/a9053ad0f4e8c4705665.js +0 -1
  170. package/assets/esri/core/workers/chunks/b33d870cbfa238762c5e.js +0 -1
  171. package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +0 -1
  172. package/assets/esri/core/workers/chunks/b984b808d383974ca3d8.js +0 -1
  173. package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +0 -1
  174. package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +0 -1
  175. package/assets/esri/core/workers/chunks/c46f79d5b7712adbbd1c.js +0 -1
  176. package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +0 -1
  177. package/assets/esri/core/workers/chunks/c873383e7dae35dc1a61.js +0 -1
  178. package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +0 -1
  179. package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +0 -1
  180. package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +0 -1
  181. package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +0 -1
  182. package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +0 -1
  183. package/assets/esri/core/workers/chunks/ebfb3cdc0df15eb05d75.js +0 -1
  184. package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +0 -1
  185. package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +0 -1
  186. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +0 -2
  187. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +0 -2
  188. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +0 -2
  189. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +0 -2
  190. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +0 -2
  191. package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +0 -2
  192. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +0 -2
  193. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +0 -2
  194. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +0 -2
  195. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +0 -2
  196. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +0 -2
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3825],{32488(t,e,r){r.d(e,{A:()=>k});const i=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],n=["آ","أ","إ","ا"],s=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],c=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],h=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],m=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],d=["ء","ف"],g=["غ","ي"],p=[[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]],y=[[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]],S=10,M=11,C=12,b=18,_=["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"],x=[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],w=[[b,b,b,b,b,b,b,b,b,6,5,6,8,5,b,b,b,b,b,b,b,b,b,b,b,b,b,b,5,5,5,6,8,4,4,M,M,M,4,4,4,4,4,S,9,S,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,b,b,b,b,b,b,5,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,9,4,M,M,M,M,4,4,4,4,0,4,4,b,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,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,1,C,1,C,C,1,C,C,1,C,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,C,C,C,C,C,C,C,C,C,C,C,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,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,3,3,3,3,3,3,3,3,3,3,M,3,3,7,7,7,C,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,C,C,C,C,C,C,C,3,4,C,C,C,C,C,C,7,7,C,C,4,C,C,C,C,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,C,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,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,C,C,C,C,C,C,C,C,C,C,C,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,C,C,C,C,C,C,C,C,C,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,b,b,b,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,b,b,b,b,b,4,4,4,4,4,b,b,b,b,b,b,2,0,4,4,2,2,2,2,2,2,S,S,4,4,4,0,2,2,2,2,2,2,2,2,2,2,S,S,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,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,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,C,1,1,1,1,1,1,1,1,1,1,S,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],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,C,C,C,C,C,C,C,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,S,S,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,b],[4,4,4,M,M,M,4,4,4,4,4,S,9,S,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 k{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,r){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,r){Y=[],Z=[];for(let i=0;i<r;i++)t[i]=i,e[i]=i,Y[i]=i}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,r))return t;e=this.inputFormat,r=this.outputFormat;let i=t;const a=j,h=W(e.charAt(1)),f=W(r.charAt(1)),d=(e.startsWith("I")?"L":e.charAt(0))+h,g=(r.startsWith("I")?"L":r.charAt(0))+f,p=e.charAt(2)+r.charAt(2);a.defInFormat=d,a.defOutFormat=g,a.defSwap=p;const y=I(t,d,g,p,a);let S=!1;return"R"===r.charAt(1)?S=!0:"C"!==r.charAt(1)&&"D"!==r.charAt(1)||(S="rtl"===this.checkContextual(y)),this.sourceToTarget=Y,this.targetToSource=function(t){const e=new Array(t.length);for(let r=0;r<t.length;r++)e[t[r]]=r;return e}(this.sourceToTarget),q=this.targetToSource,i=e.charAt(3)===r.charAt(3)?y:"S"===r.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const r=(e=String(e)).split("");let i=0,n=1,a=r.length;t||(i=r.length-1,n=-1,a=1);const h=function(t,e,r,i){let n=0;const a=[];let h=0;for(let f=e;f*r<i;f+=r)if(A(t[f])||N(t[f])){if("ل"===t[f]&&E(t,f+r,r,i)){t[f]=V(t[f+r],0===n?s:o),f+=r,$(t,f,r,i),a[h]=f,h++,n=0;continue}const e=t[f];1===n?t[f]=F(t,f+r,r,i)?O(t[f]):H(t[f],c):!0===F(t,f+r,r,i)?t[f]=H(t[f],u):t[f]=H(t[f],l),N(e)||(n=1),!0===G(e)&&(n=0)}else n=0;return a}(r,i,n,a);let f="";for(let e=0;e<r.length;e++)v(h,h.length,e)>-1?(X(q,e,!t,-1),Y.splice(e,1)):f+=r[e];return f}(S,y):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let r="";const i=(t=String(t)).split("");for(let s=0;s<t.length;s++){let o=!1;if(i[s]>="ﹰ"&&i[s]<"\ufeff"){const a=t.charCodeAt(s);i[s]>="ﻵ"&&i[s]<="ﻼ"?(e?(s>0&&" "===i[s-1]?r=r.slice(0,-1)+"ل":(r+="ل",o=!0),r+=n[(a-65269)/2]):(r+=n[(a-65269)/2],r+="ل",s+1<t.length&&" "===i[s+1]?s++:o=!0),o&&(X(q,s,!0,1),Y.splice(s,0,Y[s]))):r+=m[a-65136]}else r+=i[s]}return r}(y,S),this.sourceToTarget=Y,this.targetToSource=q,this.levels=Z,i}_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=P(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return rt.test(t)}}function I(t,e,r,i,n){const s=function(t,e,r){if(void 0===e.inFormat&&(e.inFormat=r.defInFormat),void 0===e.outFormat&&(e.outFormat=r.defOutFormat),void 0===e.swap&&(e.swap=r.defSwap),e.inFormat===e.outFormat)return e;const i=e.inFormat.slice(0,1),n=e.outFormat.slice(0,1);let s,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(s=P(t),o="ltr"===s||"rtl"===s?s.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=i+o),a.startsWith("C")&&(s=P(t),"rtl"===s?a="RTL":"ltr"===s?(s=function(t){const e=t.split("");return e.reverse(),P(e.join(""))}(t),a=s.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=n+a),e}(t,{inFormat:e,outFormat:r,swap:i},n);if(s.inFormat===s.outFormat)return t;e=s.inFormat,r=s.outFormat,i=s.swap;const o=e.slice(0,1),a=e.slice(1,4),l=r.slice(0,1),c=r.slice(1,4);if(n.inFormat=e,n.outFormat=r,n.swap=i,"L"===o&&"VLTR"===r){if("LTR"===a)return n.dir=Q,L(t,n);if("RTL"===a)return n.dir=tt,L(t,n)}if("V"===o&&"V"===l)return n.dir="RTL"===a?tt:Q,z(t,n);if("L"===o&&"VRTL"===r)return"LTR"===a?(n.dir=Q,t=L(t,n)):(n.dir=tt,t=L(t,n)),z(t);if("VLTR"===e&&"LLTR"===r)return n.dir=Q,L(t,n);if("V"===o&&"L"===l&&a!==c)return t=z(t),"RTL"===a?I(t,"LLTR","VLTR",i,n):I(t,"LRTL","VRTL",i,n);if("VRTL"===e&&"LRTL"===r)return I(t,"LRTL","VRTL",i,n);if("L"===o&&"L"===l){const e=n.swap;return n.swap=e.slice(0,1)+"N","RTL"===a?(n.dir=tt,t=L(t,n),n.swap="N"+e.slice(1,3),n.dir=Q,t=L(t,n)):(n.dir=Q,t=L(t,n),n.swap="N"+e.slice(1,3),t=I(t,"VLTR","LRTL",n.swap,n)),t}return t}function P(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 L(t,e){const r=t.split(""),i=[];return T(r,i,e),function(t,e,r){if(0!==r.hiLevel&&r.swap[0]!==r.swap[1])for(let r=0;r<t.length;r++)1===e[r]&&(t[r]=U(t[r]))}(r,i,e),D(2,r,i,e),D(1,r,i,e),Z=i,r.join("")}function T(t,e,r){const i=t.length,n=r.dir?y:p;let s=0,o=-1;const a=[],l=[];r.hiLevel=r.dir,r.lastArabic=!1,r.hasUbatAl=!1,r.hasUbatB=!1,r.hasUbatS=!1;for(let e=0;e<i;e++)a[e]=R(t[e]);for(let c=0;c<i;c++){const i=s,h=B(t,a,l,c,r);l[c]=h,s=n[i][h];const u=240&s;s&=15;const f=n[s][J];if(e[c]=f,u>0)if(16===u){for(let t=o;t<c;t++)e[t]=1;o=-1}else o=-1;if(n[s][K])-1===o&&(o=c);else if(o>-1){for(let t=o;t<c;t++)e[t]=f;o=-1}5===a[c]&&(e[c]=0),r.hiLevel|=f}r.hasUbatS&&function(t,e,r,i){for(let n=0;n<r;n++)if(6===t[n]){e[n]=i.dir;for(let r=n-1;r>=0&&8===t[r];r--)e[r]=i.dir}}(a,e,i,r)}function R(t){const e=t.charCodeAt(0),r=x[e>>8];return r<100?r:w[r-100][255&e]}function z(t,e){const r=t.split("");if(e){const t=[];T(r,t,e),Z=t}return r.reverse(),Y.reverse(),r.join("")}function v(t,e,r){for(let i=0;i<e;i++)if(t[i]===r)return i;return-1}function A(t){for(let e=0;e<d.length;e++)if(t>=d[e]&&t<=g[e])return!0;return!1}function F(t,e,r,i){for(;e*r<i&&N(t[e]);)e+=r;return!!(e*r<i&&A(t[e]))}function E(t,e,r,i){for(;e*r<i&&N(t[e]);)e+=r;let s=" ";if(!(e*r<i))return!1;s=t[e];for(let t=0;t<n.length;t++)if(n[t]===s)return!0;return!1}function D(t,e,r,i){if(i.hiLevel<t)return;if(1===t&&i.dir===tt&&!i.hasUbatB)return e.reverse(),void Y.reverse();const n=e.length;let s,o,a,l,c,h=0;for(;h<n;){if(r[h]>=t){for(s=h+1;s<n&&r[s]>=t;)s++;for(o=h,a=s-1;o<a;o++,a--)l=e[o],e[o]=e[a],e[a]=l,c=Y[o],Y[o]=Y[a],Y[a]=c;h=s}h++}}function B(t,e,r,i,n){const s=e[i];return{UBAT_L:()=>(n.lastArabic=!1,0),UBAT_R:()=>(n.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>n.lastArabic?3:2,UBAT_AL:()=>(n.lastArabic=!0,n.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,s;return i<1||i+1>=e.length||2!==(t=r[i-1])&&3!==t||2!==(s=e[i+1])&&3!==s?4:(n.lastArabic&&(s=3),s===t?s:4)},UBAT_ES:()=>2===(i>0?r[i-1]:5)&&i+1<e.length&&2===e[i+1]?2:4,UBAT_ET:()=>{if(i>0&&2===r[i-1])return 2;if(n.lastArabic)return 4;let t=i+1;const s=e.length;for(;t<s&&11===e[t];)t++;return t<s&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===n.inFormat){const r=e.length;let n=i+1;for(;n<r&&12===e[n];)n++;if(n<r){const r=t[i].charCodeAt(0),s=r>=1425&&r<=2303||64286===r,o=e[n];if(s&&(1===o||7===o))return 1}}return i<1||5===e[i-1]?4:r[i-1]},UBAT_B:()=>(n.lastArabic=!0,n.hasUbatB=!0,n.dir),UBAT_S:()=>(n.hasUbatS=!0,4),UBAT_LRE:()=>(n.lastArabic=!1,4),UBAT_RLE:()=>(n.lastArabic=!1,4),UBAT_LRO:()=>(n.lastArabic=!1,4),UBAT_RLO:()=>(n.lastArabic=!1,4),UBAT_PDF:()=>(n.lastArabic=!1,4),UBAT_BN:()=>4}[_[s]]()}function U(t){let e,r=0,n=i.length-1;for(;r<=n;)if(e=Math.floor((r+n)/2),t<i[e][0])n=e-1;else{if(!(t>i[e][0]))return i[e][1];r=e+1}return t}function G(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function O(t){for(let e=0;e<a.length;e++)if(t===a[e])return h[e];return t}function H(t,e){for(let r=0;r<a.length;r++)if(t===a[r])return e[r];return t}function N(t){return t>="ً"&&t<="ٕ"}function W(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function $(t,e,r,i){for(;e*r<i&&N(t[e]);)e+=r;return e*r<i&&(t[e]=" ",!0)}function V(t,e){for(let r=0;r<n.length;r++)if(t===n[r])return e[r];return t}function X(t,e,r,i){for(let n=0;n<t.length;n++)(t[n]>e||!r&&t[n]===e)&&(t[n]+=i)}let Y=[],q=[],Z=[];const j={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},J=5,K=6,Q=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,rt=/[\u0591-\u06ff\ufb1d-\ufefc]/},6371(t,e,r){r.d(e,{y:()=>n});const i=new(r(32488).A);function n(t,e=!0){if(!i.hasBidiChar(t))return[t,!1,{...i}];let r;r="rtl"===i.checkContextual(t)?"IDNNN":"ICNNN";const n=e?"VLYSN":"VLYNN";return[i.bidiTransform(t,r,n),!0,{...i}]}},40804(t,e,r){function i(t,e=0){let r=0;for(let i=0;i<4;i++)r+=t[e+i]*n[i];return r}r(34727);const n=[1/256,1/65536,1/16777216,1/4294967296];i(new Uint8ClampedArray([255,255,255,255])),i(new Uint8ClampedArray([255,255,255,0]))},56512(t,e,r){function i(t){let e,r,i=[],n=!1;return function(...s){return n&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}(s,i)||(r=t.apply(this,s),e=this,i=s,n=!0),r}}r.d(e,{B:()=>i})},69397(t,e,r){r.d(e,{Qf:()=>a,Qh:()=>s,lM:()=>n});var i=r(34275);function n(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function s(t){if(!t)return 0;if("number"==typeof t[0])return a(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return l(t,8);let r=h;for(let i=0;i<e;i++)r+=o(t[i]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?s(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...t){return t.reduce((t,e)=>t+(e?(0,i.iu)(e)?e.byteLength+u:Array.isArray(e)?l(e,16):0:0),0)}function l(t,e){return h+t.length*e}const c=32,h=16,u=145},93146(t,e,r){r.d(e,{z:()=>n});class i{constructor(t){this._import=t,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async t=>(this.module=t,t))),this._promise}}function n(t){return new i(async()=>{const e=await t();return!1===e.isLoaded?.()&&await e.load(),e})}},31411(t,e,r){r.d(e,{GS:()=>w,gh:()=>I});var i=r(49186),n=r(56512),s=r(65864),o=r(4305),a=r(50954),l=r(52006),c=r(49663),h=r(46068),u=r(15507);const f=1e-6,m=[0,0];function d(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class g{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:r,maxSegmentsPerCurve:i,minSegmentsPerCurve:n}){const s=r*r,o=e*e,a=1/i,l=this.interpolate(0),c=this.interpolate(1);(0,u.kb)(this.curveStart,l)>f&&t.push(l),this.initialize(l,c);const h=1/n;for(let t=n-1;t>0;t--){const e=t*h;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<a||(0===s||!isFinite(s)||(0,u.kb)(this.arcStart,this.arcEnd)<s)&&(0===o||!isFinite(o)||this.getDeviation2()<o)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,u.kb)(this.curveEnd,c)>f&&t.push([...this.curveEnd]),t}}class p extends g{constructor(t,e){const[r,i,n]=e.b;super(t,r),this._controlPointsStack=[],this._curveControlPoints=[i,n],this._arcControlPoints=[i,n],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:r,tStart:i,tEnd:n}=this,[s,o]=this._arcControlPoints,a=(t-i)/(n-i),l=(0,u.RS)([],e,s,a),c=(0,u.RS)(m,s,o,a),h=(0,u.RS)([],o,r,a),f=(0,u.RS)([],l,c,a),d=(0,u.RS)([],c,h,a),g=(0,u.RS)([],f,d,a);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([d,h]),this.tEndStack.push(t),this.arcEndStack.push(g),this._arcControlPoints[0]=l,this._arcControlPoints[1]=f,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:r}=this,[i,n]=this._curveControlPoints;return(0,o.B4)(e,i,n,r,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[r,i]=this._arcControlPoints;return Math.max((0,u.yE)(r,t,e),(0,u.yE)(i,t,e))}}class y extends g{constructor(t,e){const[r]=e.a;super(t,r),this._derivedEllipse=(0,h.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,h.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,u.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function S(t,e,r,{cx:i,cy:n,radius:s,thetaStart:o,thetaEnd:a,isInvalid:l},{maxDeviation:c,maxSegmentLength:h,maxSegmentsPerCurve:m,minSegmentsPerCurve:d}){if(l)return t.push([...r]),t;const g=2*s,p=[i+s*Math.cos(o),n+s*Math.sin(o)],y=[i+s*Math.cos(a),n+s*Math.sin(a)];(0,u.kb)(e,p)>f&&t.push(p);const S=Math.abs(a-o),M=h>0&&h<g?2*Math.asin(h/g):S,C=c>0&&c<=s?2*Math.acos(1-c/s):S,b=Math.min(M,C),_=Math.min(m,Math.max(d,Math.ceil(Math.abs(S/b)))),x=1/_;for(let e=1;e<_;e++){const r=e*x,l=o*(1-r)+a*r;t.push([i+s*Math.cos(l),n+s*Math.sin(l)])}return t.push(y),(0,u.kb)(r,y)>f&&t.push([...r]),t}function M(t,e,r,i){return new p(e,r).densify(t,i)}function C(t,e,r,i){const n=(0,a.pM)(e,r),[s]=r.c;return S(t,e,s,n,i)}function b(t,e,r,i){const n=(0,c.io)(e,r),[s]=r.a;return S(t,e,s,n,i)}function _(t,e,r,i){const[n,s,o,a,l,c,h]=r.a;return 0===c||0===h?(t.push([...n]),t):new y(e,r).densify(t,i)}function x(t,e,r,i){return(0,l.Xq)(r)?(t.push([...r]),t):(0,l.n1)(r)?M(t,e,r,i):(0,l.aO)(r)?C(t,e,r,i):(0,l.DA)(r)?b(t,e,r,i):_(t,e,r,i)}function w(t,e={}){if(!(0,l.Ed)(t))return t;const r=d(e),i=(0,l.FD)(t),n=[];for(const t of i){const e=[];for(let i=0;i<t.length-1;i++){const n=i+1,s=[...(0,l.yP)(t[i])];0===i&&e.push(s),x(e,s,t[n],r)}n.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:n,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:n,spatialReference:t.spatialReference}}const k=(0,n.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(t,e,n){const o=new Set(e);return await async function(t,e,n){let s=null;for(const o of t)if(o&&(0,l.Ed)(o)&&null==o.spatialReference.xyTolerance&&(0,l.V8)(o,e)){const t=o.spatialReference;if(!t)throw new i.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=P(t);if(n.has(e))o.spatialReference=n.get(e);else{s||(s=await Promise.all([r.e(9187),r.e(8885),r.e(5756),r.e(3299),r.e(1550)]).then(r.bind(r,78125)));const a=s.fromSpatialReference(t),l=a?.getTolerance();if(null==l)throw new i.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=o.spatialReference.clone();c.read({xyTolerance:l}),o.spatialReference=c,n.set(e,c)}}}(t,o,n),t.map(t=>{if(!t||!(0,l.Ed)(t))return t;const r=t.spatialReference.xyTolerance;if(null==r)return t;const i=k(r);return(0,s.rS)(function(t,e,r){if(!(0,l.Ed)(t))return t;const i=new Set(e),n=d(r),s=(0,l.FD)(t),o=[];let a=!1;for(const t of s){const e=[];for(let r=0;r<t.length-1;r++){const s=r+1,o=[...(0,l.yP)(t[r])];0===r&&e.push(o);const c=t[s];(0,l.Xq)(c)?e.push([...c]):(0,l.n1)(c)&&!i.has("cubic-bezier")?M(e,o,c,n):(0,l.aO)(c)&&!i.has("circular-arc")?C(e,o,c,n):(0,l.DA)(c)&&!i.has("elliptic-arc")?b(e,o,c,n):(0,l.wY)(c)&&!i.has("elliptic-arc")?_(e,o,c,n):(e.push((0,l.tk)(c)),a=!0)}o.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...a?{curvePaths:o}:{paths:o}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...a?{curveRings:o}:{rings:o}}}(t,e,i))})}function P(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},92722(t,e,r){r.d(e,{A:()=>n});var i=r(69397);class n{constructor(t=[],e=[],r=!1,i=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=i}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:i}){return new n(t,e,r||!1,i||!1)}static fromRect([t,e,r,i]){const s=r-t,o=i-e;return new n([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,i.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 r of this.lengths){if(r<3)continue;const{stride:i}=this;let n=this.coords[i*e],s=this.coords[i*e+1];for(let o=1;o<r;o+=1){const r=i*(e+o),a=this.coords[r],l=this.coords[r+1];t+=-.5*(a-n)*(l+s),n=a,s=l}e+=r}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:r}=this;for(const i of this.lengths){for(let n=0;n<i;n++){const i=r*(e+n);t(this.coords[i],this.coords[i+1])}e+=i}}deltaDecode(){const t=this.clone(),{coords:e,lengths:r}=t;let i=0;const{stride:n}=this;for(const t of r){for(let r=1;r<t;r++){const t=n*(i+r);e[t]+=e[t-n],e[t+1]+=e[t+1-n]}i+=t}return t}clone(t){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:r,size:i}=this,s=this.coords.slice(0,i*r);return t?(t.set(s),new n(e,t,this.hasZ,this.hasM)):new n(e,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const r=new Array(e*t);for(let e=0,i=0;e<r.length;e+=t)r[i++]=this.coords[e],r[i++]=this.coords[e+1];return new n(this.lengths,r,!1,!1)}}},5427(t,e,r){r.r(e),r.d(e,{CIMSymbolHelper:()=>st,CIMSymbolInflatedSizeHelper:()=>nt,capTypeToEnum:()=>at,forEachSymbolLayer:()=>ot,slsDashToTemplateArray:()=>gt,symbolToCIM:()=>et});var i=r(6371),n=r(4718),s=r(53966),o=r(87811),a=r(90629),l=r(19419),c=r(537),h=r(52006),u=r(31411),f=r(11831),m=r(35833),d=r(98939),g=r(57582),p=(r(44208),r(34727)),y=r(93687),S=r(36745),M=r(12359),C=(r(12176),r(60408));class b{applyColorSubstitution(t,e){if(!e)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:r,height:i}=t,n=this._rasterizationCanvas,s=n.getContext("2d",{willReadFrequently:!0});t!==n&&(n.width=r,n.height=i,s.drawImage(t,0,0,r,i));const o=s.getImageData(0,0,r,i).data;if(e)for(const t of e)if(t&&t.oldColor&&4===t.oldColor.length&&t.newColor&&4===t.newColor.length){const[e,r,i,n]=t.oldColor,[s,a,l,c]=t.newColor;if(e===s&&r===a&&i===l&&n===c)continue;for(let t=0;t<o.length;t+=4)e===o[t]&&r===o[t+1]&&i===o[t+2]&&n===o[t+3]&&(o[t]=s,o[t+1]=a,o[t+2]=l,o[t+3]=c)}const a=new ImageData(o,r,i);return s.putImageData(a,0,0),n}tintImageData(t,e){if(!e||e.length<4)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:r,height:i}=t,n=this._rasterizationCanvas,s=n.getContext("2d",{willReadFrequently:!0});t!==n&&(n.width=r,n.height=i,s.drawImage(t,0,0,r,i));const o=s.getImageData(0,0,r,i),a=new Uint8Array(o.data),l=[e[0]/255,e[1]/255,e[2]/255,e[3]/255];for(let t=0;t<a.length;t+=4)a[t]*=l[0],a[t+1]*=l[1],a[t+2]*=l[2],a[t+3]*=l[3];const c=new ImageData(new Uint8ClampedArray(a.buffer),r,i);return s.putImageData(c,0,0),n}}var _=r(26937),x=r(28076);function w(t){const e=t.getFrame(0);if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement)return e;const r=document.createElement("canvas");r.width=t.width,r.height=t.height;const i=r.getContext("2d");return e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0),r}function k(t,e=0){if(0===e)return t;const r=Math.cos(e),i=Math.sin(e),[n,s]=t;return[n*r+s*-i,n*i+s*r]}var I=r(44589);class P{constructor(t=0,e=0,r=0,i=0){this.x=t,this.y=e,this.width=r,this.height=i}static fromExtent(t){return new P(t.xmin,-t.ymax,t.xmax-t.xmin,t.ymax-t.ymin)}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)}}var L=r(69754);function T(t){return`rgb(${t.slice(0,3).toString()})`}function R(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}r(5760);class z{constructor(t){t&&(this._textRasterizationCanvas=t)}rasterizeRichText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d",{willReadFrequently:!0}),n=this._layoutRichTextRuns(i,t,e);this._parameters=e,this._lineHeight=Math.max(...n.map(t=>t.height),this._measureLineHeight(e));const{decoration:s,weight:o}=e.font;this._lineThroughWidthOffset=s&&"line-through"===s?.1*this._lineHeight:0;const a=null!=e.backgroundColor||null!=e.borderLine,l=a?8:0,c=Math.max(...n.map(t=>t.width),0)+2*l,h=n.reduce((t,e)=>t+e.height,0)+2*l;if(r.width=c+2*this._lineThroughWidthOffset,r.height=h,0===r.width||0===r.height)return r.width=r.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:r};this._renderedWidth=c,this._renderedHeight=h,this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._lineThroughWidthOffset*=e.pixelRatio;const u=(e.outline&&e.outline.color)??[0,0,0,0],f=e.color??[0,0,0,0],m=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=R(f),this._outlineStyle=R(u),this._haloStyle=T(m);const d=this._renderedOutlineSize,g=this._renderedHaloSize;i.save(),i.clearRect(0,0,r.width,r.height);const p=l*e.pixelRatio,y=F("left",this._renderedWidth-2*p,g+d)+p,S=g+d+p;let M=this._lineThroughWidthOffset,C=0;if(a){i.save();const t=e.backgroundColor??[0,0,0,0],n=e.borderLine?.color??[0,0,0,0],s=2*(e.borderLine?.size??0);i.fillStyle=R(t),i.strokeStyle=R(n),i.lineWidth=s,i.fillRect(0,0,r.width,r.height),i.strokeRect(0,0,r.width,r.height),i.restore()}C+=S,M+=y,g>0&&this._renderRichTextOutline(i,n,M,C,e,this._renderedHaloSize+this._renderedOutlineSize),d>0&&this._renderRichTextOutline(i,n,M,C,e,this._renderedOutlineSize);for(const t of n){let r=M;"center"===e.horizontalAlignment?r+=(this._renderedWidth-2*p-t.width)/2:"right"===e.horizontalAlignment&&(r+=this._renderedWidth-2*p-t.width-g-d);let n=r;for(const e of t.segments)v(i,e.parameters,"left",e.characterSpacing),g>0&&(i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",this._renderRichTextSegment(i,e,n,C,"fill"),i.globalCompositeOperation="source-over"),i.fillStyle=R(e.parameters.color??f),this._renderRichTextSegment(i,e,n,C,"fill"),n+=e.width;if(s&&"none"!==s){const e=this._renderedWidth;this._renderedWidth=t.width,i.textAlign="left",this._renderDecoration(i,r,C,s,o),this._renderedWidth=e}C+=t.height}i.restore();const b=this._renderedWidth+2*this._lineThroughWidthOffset,_=this._renderedHeight,x=i.getImageData(0,0,b,_),w=new Uint8Array(x.data);if(e.premultiplyColors){let t;for(let e=0;e<w.length;e+=4)t=w[e+3]/255,w[e]=w[e]*t,w[e+1]=w[e+1]*t,w[e+2]=w[e+2]*t}let k,I;switch(e.horizontalAlignment){case"left":k=-.5;break;case"right":k=.5;break;default:k=0}switch(e.verticalAlignment){case"bottom":I=-.5;break;case"top":I=.5;break;case"baseline":I=-1/6;break;default:I=0}return{size:[b,_],image:new Uint32Array(w.buffer),sdf:!1,simplePattern:!1,anchorX:k,anchorY:I,canvas:r}}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d",{willReadFrequently:!0});v(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const{decoration:n,weight:s}=e.font;this._lineThroughWidthOffset=n&&"line-through"===n?.1*this._lineHeight:0;const o=null!=e.backgroundColor||null!=e.borderLine,a=o?8:0,l=this._computeTextWidth(i,e)+2*a,c=this._lineHeight*this._textLines.length+2*a;if(r.width=l+2*this._lineThroughWidthOffset,r.height=c,0===r.width||0===r.height)return r.width=r.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:r};this._renderedLineHeight=Math.round(this._lineHeight),this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._renderedWidth=l,this._renderedHeight=c,this._lineThroughWidthOffset*=e.pixelRatio;const h=(e.outline&&e.outline.color)??[0,0,0,0],u=e.color??[0,0,0,0],f=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=R(u),this._outlineStyle=R(h),this._haloStyle=T(f);const m=this._renderedLineHeight,d=this._renderedOutlineSize,g=this._renderedHaloSize;i.save(),i.clearRect(0,0,r.width,r.height),v(i,e);const p=a*e.pixelRatio,y=F(i.textAlign,this._renderedWidth-2*p,this._renderedHaloSize+this._renderedOutlineSize)+p,S=g+d+p,M=g>0;let C=this._lineThroughWidthOffset,b=0;if(o){i.save();const t=e.backgroundColor??[0,0,0,0],n=e.borderLine?.color??[0,0,0,0],s=2*(e.borderLine?.size??0);i.fillStyle=R(t),i.strokeStyle=R(n),i.lineWidth=s,i.fillRect(0,0,r.width,r.height),i.strokeRect(0,0,r.width,r.height),i.restore()}M&&this._renderHalo(i,y,S,C,b,e),d>0&&this._renderOutline(i,y,S,C,b,e),b+=S,C+=y;for(const t of this._textLines)M?(i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",i.fillText(t,C,b),i.globalCompositeOperation="source-over",i.fillStyle=this._fillStyle,i.fillText(t,C,b)):(i.fillStyle=this._fillStyle,i.fillText(t,C,b)),n&&"none"!==n&&this._renderDecoration(i,C,b,n,s),b+=m;i.restore();const _=this._renderedWidth+2*this._lineThroughWidthOffset,x=this._renderedHeight,w=i.getImageData(0,0,_,x),k=new Uint8Array(w.data);if(e.premultiplyColors){let t;for(let e=0;e<k.length;e+=4)t=k[e+3]/255,k[e]=k[e]*t,k[e+1]=k[e+1]*t,k[e+2]=k[e+2]*t}let I,P;switch(e.horizontalAlignment){case"left":I=-.5;break;case"right":I=.5;break;default:I=0}switch(e.verticalAlignment){case"bottom":P=-.5;break;case"top":P=.5;break;case"baseline":P=-1/6;break;default:P=0}return{size:[_,x],image:new Uint32Array(k.buffer),sdf:!1,simplePattern:!1,anchorX:I,anchorY:P,canvas:r}}_renderHalo(t,e,r,i,n,s){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,c=l.getContext("2d");c.clearRect(0,0,o,a),v(c,s);const{decoration:h,weight:u}=s.font;c.fillStyle=this._haloStyle,c.strokeStyle=this._haloStyle,c.lineJoin="round",this._renderOutlineNative(c,e,r,h,u,this._renderedHaloSize+this._renderedOutlineSize),t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,i,n,o,a),t.globalAlpha=1}_renderOutline(t,e,r,i,n,s){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,c=l.getContext("2d");c.clearRect(0,0,o,a),v(c,s);const{decoration:h,weight:u}=s.font;c.fillStyle=this._outlineStyle,c.strokeStyle=this._outlineStyle,c.lineJoin="round",this._renderOutlineNative(c,e,r,h,u,this._renderedOutlineSize),t.globalAlpha=this._parameters.outline.color[3],t.drawImage(l,0,0,o,a,i,n,o,a),t.globalAlpha=1}_renderOutlineNative(t,e,r,i,n,s){const o=this._renderedLineHeight;for(const a of this._textLines){const l=2*s,c=5,h=.1;for(let s=0;s<c;s++){const o=(1-(c-1)*h+s*h)*l;t.lineWidth=o,t.strokeText(a,e,r),i&&"none"!==i&&this._renderDecoration(t,e,r,i,n,o)}r+=o}}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas,i=r.getContext("2d");v(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const n=this._computeTextWidth(i,e),s=this._lineHeight*this._textLines.length;return r.width=n,r.height=s,[n*e.pixelRatio,s*e.pixelRatio]}computeRichTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const r=this._textRasterizationCanvas.getContext("2d"),i=this._layoutRichTextRuns(r,t,e),n=Math.max(...i.map(t=>t.width),0),s=i.reduce((t,e)=>t+e.height,0);return[n*e.pixelRatio,s*e.pixelRatio]}_renderRichTextOutline(t,e,r,i,n,s){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const l=this._outlineRasterizationCanvas,c=l.getContext("2d");c.clearRect(0,0,o,a),c.fillStyle=s===this._renderedOutlineSize?this._outlineStyle:this._haloStyle,c.strokeStyle=c.fillStyle,c.lineJoin="round";let h=i;for(const t of e){let e=r;"center"===n.horizontalAlignment?e+=(this._renderedWidth-t.width)/2:"right"===n.horizontalAlignment&&(e+=this._renderedWidth-t.width-this._renderedHaloSize-this._renderedOutlineSize);let i=e;for(const e of t.segments){v(c,e.parameters,"left",e.characterSpacing);const t=2*s,r=5,n=.1;for(let s=0;s<r;s++){const o=1-(r-1)*n+s*n;c.lineWidth=o*t,this._renderRichTextSegment(c,e,i,h,"stroke")}i+=e.width}if(n.font.decoration&&"none"!==n.font.decoration){const r=this._renderedWidth;this._renderedWidth=t.width,c.textAlign="left",this._renderDecoration(c,e,h,n.font.decoration,n.font.weight,2*s),this._renderedWidth=r}h+=t.height}s===this._renderedOutlineSize?t.globalAlpha=this._parameters.outline.color[3]:t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,this._lineThroughWidthOffset,0,o,a),t.globalAlpha=1}_layoutRichTextRuns(t,e,r){const i=[{segments:[],width:0,height:this._measureLineHeight(r)}];for(const n of e){const e=n.text.split(/\r?\n/),s=A(r,n);for(let o=0;o<e.length;o++){const a=e[o],l=i[i.length-1];if(a.length>0){const e=this._measureRichTextSegmentWidth(t,a,s,n.characterSpacing);l.segments.push({text:a,width:e,parameters:s,characterSpacing:n.characterSpacing}),l.width+=e,l.height=Math.max(l.height,this._measureLineHeight(s))}o<e.length-1&&i.push({segments:[],width:0,height:this._measureLineHeight(r)})}}return i}_measureTextWidthWithSpacing(t,e,r,i){const n=this._parameters,s=this._textLines;this._parameters=r,this._textLines=[e],v(t,r,"left",i);const o=this._computeTextWidth(t,r);return this._parameters=n,this._textLines=s,o}_measureRichTextSegmentWidth(t,e,r,i){return this._measureTextWidthWithSpacing(t,e,r,i)}_renderRichTextSegment(t,e,r,i,n){"fill"===n?t.fillText(e.text,r,i):t.strokeText(e.text,r,i)}_measureLineHeight(t){const e=this._parameters;this._parameters=t;const r=this._computeLineHeight();return this._parameters=e,r}_computeTextWidth(t,e){let r=0;for(const e of this._textLines)r=Math.max(r,t.measureText(e).width);const i=e.font;return("italic"===i.style||"oblique"===i.style||"string"==typeof i.weight&&("bold"===i.weight||"bolder"===i.weight)||"number"==typeof i.weight&&i.weight>600)&&(r+=.3*t.measureText("w").width),r+=2*(0,a.Lz)(this._parameters.halo.size),Math.round(r)}_computeLineHeightBase(){return 1.275*this._parameters.size}_computeLineHeight(){let t=this._computeLineHeightBase();const e=this._parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*(0,a.Lz)(this._parameters.halo.size))}_renderDecoration(t,e,r,i,n,s){let o=.9*this._lineHeight;const a="bold"===n?.06:"bolder"===n?.09:.04;switch(t.textAlign){case"center":e-=this._renderedWidth/2;break;case"right":e-=this._renderedWidth}const l=t.textBaseline;if("underline"===i)switch(o=.9*this._computeLineHeightBase(),l){case"top":r+=o;break;case"middle":r+=o/2}else if("line-through"===i)switch(l){case"top":r+=o/1.5;break;case"middle":r+=o/3}const c=s?1.5*s:Math.ceil(o*a);t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=c,t.moveTo(e-this._lineThroughWidthOffset,r),t.lineTo(e+this._renderedWidth+2*this._lineThroughWidthOffset,r),t.stroke(),t.restore()}}function v(t,e,r,i=0){const n=Math.max(e.size,.5),s=e.font,o=`${s.style} ${s.weight} ${(0,a.Lz)(n).toFixed(1)}px ${s.family}, sans-serif`;t.font=o,t.textBaseline="top",function(t,e){t.letterSpacing=e>0?`${e}em`:"0px"}(t,i);let l=r??"left";if(!r)switch(e.horizontalAlignment){case"left":default:l="left";break;case"right":l="right";break;case"center":l="center"}t.textAlign=l}function A(t,e){return{...t,color:e.color??t.color,font:{...t.font,family:e.font.family??t.font.family,style:e.font.style??t.font.style,weight:e.font.weight??t.font.weight},size:e.fontSize}}function F(t,e,r){return"center"===t?.5*e:"right"===t?e-r:r}var E=r(93397),D=r(75434),B=r(69221);const U=Math.PI/180,G=()=>s.A.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class O{constructor(t){this._t=t}static createIdentity(){return new O([1,0,0,0,1,0])}clone(){const t=this._t;return new O(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new O([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new O([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new O([e,-r,0,r,e,0])}rotate(t){return O.multiply(this,O.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const i=t._t,n=e._t,s=i[0]*n[0]+i[3]*n[1],o=i[1]*n[0]+i[4]*n[1],a=i[2]*n[0]+i[5]*n[1]+n[2],l=i[0]*n[3]+i[3]*n[4],c=i[1]*n[3]+i[4]*n[4],h=i[2]*n[3]+i[5]*n[4]+n[5],u=r._t;return u[0]=s,u[1]=o,u[2]=a,u[3]=l,u[4]=c,u[5]=h,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new O([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,i=(t[2]*t[3]-t[0]*t[5])*e,n=t[4]*e,s=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new O([n,s,r,o,a,i])}}class H{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._textScaling=[],this._geomUnitsPerPoint=1,this._placementPool=new y.A(()=>new d.W,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||O.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1),this._textScaling.push(1)}setTransform(t,e){this._transfos=[t||O.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)],this._textScaling=[1]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}scaleText(t){return t*this._textScaling[this._textScaling.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}reverseScaleText(t){return t/this._textScaling[this._textScaling.length-1]}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e=!1,r=1){const i=e?t.scaleRatio():1;O.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i),this._textScaling.push(this._textScaling[this._textScaling.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1),this._textScaling.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const i=t.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),i=(0,E.ll)(t);let n=new m.kT(S.z.fromJSONCIM(e));for(const s of t){const t=(0,_.A)(s);t&&(n=t.execute(n,s,{geomUnitsPerPoint:r,tileKey:null,maxInflateSize:i,scale:null,spatialReference:e.spatialReference,preventClipping:!1}))}return n}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const i=t[r];if(!i||!1===i.enable)continue;const n=i.effects;if(n&&n.length>0){const t=this.executeEffects(n,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=function(t,e,r){let i=(0,E.$w)(t.separation,x.D.CIMHatchFill.separation)*r,n=(0,E.$w)(t.rotation);if(0===i)return null;i<0&&(i=-i);let s=0;const o=.5*i;for(;s>o;)s-=i;for(;s<-o;)s+=i;const a=(0,l.vt)();(0,c.Rg)(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const h=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;n>180;)n-=180;for(;n<0;)n+=180;const u=Math.cos(n*U),f=Math.sin(n*U),m=-i*f,d=i*u;let g,p,y,S;s=(0,E.$w)(t.offsetX)*r*f-(0,E.$w)(t.offsetY)*r*u,g=y=Number.MAX_VALUE,p=S=-Number.MAX_VALUE;for(const t of h){const e=t[0],r=t[1],i=u*e+f*r,n=-f*e+u*r;g=Math.min(g,i),y=Math.min(y,n),p=Math.max(p,i),S=Math.max(S,n)}y=Math.floor(y/i)*i;let M=u*g-f*y-m*s/i,C=f*g+u*y-d*s/i,b=u*p-f*y-m*s/i,_=f*p+u*y-d*s/i;const w=1+Math.round((S-y)/i),k=[];for(let t=0;t<w;t++)M+=m,C+=d,b+=m,_+=d,k.push([[M,C],[b,_]]);return{paths:k}}(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const i=(0,_.c)(r);if(i){const n="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;n&&this.pushClipPath(e);const s=i.execute(S.z.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(s){let e=null;for(;(e=s.next())&&(this.drawMarker(t,e),!this._earlyReturn););}n&&this.popClipPath()}}else{const r=this._placementPool.acquire();if((0,C.fT)(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if((0,C.Bi)(e)){const i=(0,M.l8)(e);i&&([r.tx,r.ty]=i,this.drawMarker(t,r))}else if((0,C.Rg)(e)){for(const i of e.paths)for(const e of i)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const i of e.points)if(r.tx=i[0],r.ty=i[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),i=(0,E.$w)(t.size,x.D.CIMPictureMarker.size);if(null==r||i<=0)return;const n=r.width,s=r.height;if(!n||!s)return;const o=n/s,a=(0,E.$w)(t.scaleX,1),l=O.createIdentity(),c=t.anchorPoint;if(c){let e=c.x,r=c.y;"Absolute"!==t.anchorPointUnits&&(e*=i*o*a,r*=i),l.translate(-e,-r)}let h=(0,E.$w)(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&l.rotate(h*U);let u=(0,E.$w)(t.offsetX),f=(0,E.$w)(t.offsetY);if(u||f){if(this._mapRotation){const t=U*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=u*r+f*e;u=u*e-f*r,f=i}l.translate(u,f)}const m=this.geomUnitsPerPoint();1!==m&&l.scale(m,m);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l),this.drawImage(t,i),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const i=(0,E.$w)(t.size,x.D.CIMVectorMarker.size),n=t.frame,s=n?n.ymax-n.ymin:0,o=i&&s?i/s:1,a=O.createIdentity();n&&a.translate(.5*-(n.xmax+n.xmin),.5*-(n.ymax+n.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?n&&(e*=n.xmax-n.xmin,r*=n.ymax-n.ymin):(e/=o,r/=o),a.translate(-e,-r)}1!==o&&a.scale(o,o);let c=(0,E.$w)(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&a.rotate(c*U);let h=(0,E.$w)(t.offsetX),u=(0,E.$w)(t.offsetY);if(h||u){if(this._mapRotation){const t=U*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=h*r+u*e;h=h*e-u*r,u=i}a.translate(h,u)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const m=e.getAngle();m&&a.rotate(m),a.translate(e.tx,e.ty);const d=t.scaleSymbolsProportionally?1:o;this.push(a,t.scaleSymbolsProportionally,d);for(const t of r){t?.symbol&&t.geometry||G().error("Invalid marker graphic",t);let e=t.textString;if("number"==typeof e&&(e=e.toString()),this.drawSymbol(t.symbol,t.geometry,e),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!(0,C.fT)(e))return;if((0,E.$w)(t.height,x.D.CIMTextSymbol.height)<=0)return;const i=O.createIdentity();let n=(0,E.$w)(t.angle);n=-n,n&&i.rotate(n*U);const s=(0,E.$w)(t.offsetX),o=(0,E.$w)(t.offsetY);(s||o)&&i.translate(s,o);const a=this.geomUnitsPerPoint();1!==a&&i.scale(a,a),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}}class N extends H{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new P(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,l.fA)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,C.Bi)(t))this._processPath(t.rings,0);else if((0,C.Rg)(t))this._processPath(t.paths,0);else if((0,C.ZC)(t)){const e=V(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const i=Math.max(.5*this.transformSize((0,E.$w)(r,x.D.CIMSolidStroke.width)),.25);if((0,C.Bi)(t))this._processPath(t.rings,i);else if((0,C.Rg)(t))this._processPath(t.paths,i);else if((0,C.ZC)(t)){const e=V(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){(0,C.Bi)(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,i=(0,E.$w)(t.scaleX,1);let n=i*e,s=e;const o=this._resourceManager.getResource(r);if(null!=o){const t=o.height/o.width;n=i*(e?t>1?e:e/t:o.width),s=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-n/2,-s/2]),0),this._merge(this.transformPt([-n/2,s/2]),0),this._merge(this.transformPt([n/2,-s/2]),0),this._merge(this.transformPt([n/2,s/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new z);const r=X(t),i=(0,L.Z)({textString:e,font:r.font,symbol:t,supportsRichText:(0,L.q)(e)});let[n,s]=i?this._textRasterizer.computeRichTextSize(i,r):this._textRasterizer.computeTextSize(e,r);n=(0,a.PN)(n),s=(0,a.PN)(s);const o=this.transformSize(1)*this.reverseTransformScalar(1);n*=o,s*=o;const l=t.horizontalAlignment??x.D.CIMTextSymbol.horizontalalignment,c=t.verticalAlignment??x.D.CIMTextSymbol.verticalalignment;let h=0;switch(l){case"Left":h=n/2;break;case"Right":h=-n/2}let u=0;switch(c){case"Bottom":u=s/2;break;case"Top":u=-s/2;break;case"Baseline":u=s/6}this._merge(this.transformPt([-n/2+h,-s/2+u]),0),this._merge(this.transformPt([-n/2+h,s/2+u]),0),this._merge(this.transformPt([n/2+h,-s/2+u]),0),this._merge(this.transformPt([n/2+h,s/2+u]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let i=1;i<t;i++)this._merge(this.transformPt(r[i]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class W extends H{constructor(t,e,r,i){super(e,r),this._applyAdditionalRenderProps=i,this._colorSubstitutionHelper=new b,this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,C.Bi)(t))this._buildPath(t.rings,!0);else if((0,C.Rg)(t))this._buildPath(t.paths,!0);else if((0,C.ZC)(t))this._buildPath(V(t).rings,!0);else{if(!(0,C.U9)(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,i,n,s){if(!t||!e||0===r)return;if((0,C.Bi)(t))this._buildPath(t.rings,!0);else if((0,C.Rg)(t))this._buildPath(t.paths,!1);else{if(!(0,C.ZC)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(V(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(r),.5),this._setCapStyle(i),this._setJoinStyle(n),o.miterLimit=s,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,C.Bi)(t))this._buildPath(t.rings,!0);else if((0,C.Rg)(t))this._buildPath(t.paths,!0);else{if(!(0,C.ZC)(t))return;this._buildPath(V(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:i,tintColor:n}=t,s=(0,E.$w)(t.scaleX,1),o=this._resourceManager.getResource(i);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const c=(0,E.UE)(i)||"src"in o&&(0,E.UE)(o.src);let h="getFrame"in o?w(o):o;r&&(h=this._colorSubstitutionHelper.applyColorSubstitution(h,r)),this._applyAdditionalRenderProps&&!c&&n&&(h=this._colorSubstitutionHelper.tintImageData(h,n));const u=this.transformPt([0,0]),[f,m]=this.getTransformAngle(),d=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:s*d*f,m12:s*d*m,m21:-d*m,m22:d*f,m41:u[0],m42:u[1]}),g.drawImage(h,-a/2,-l/2,a,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new z);const r=X(t,this.transformSize((0,a.PN)(1))),i=(0,L.Z)({textString:e,font:r.font,symbol:t,supportsRichText:(0,L.q)(e)}),n=i?this._textRasterizer.rasterizeRichText(i,r):this._textRasterizer.rasterizeText(e,r);if(!n)return;const{size:s,anchorX:o,anchorY:l,canvas:c}=n,h=s[0]*(o+.5),u=s[1]*(l-.5),f=this._ctx,m=this.transformPt([0,0]),[d,g]=this.getTransformAngle();f.save(),f.setTransform({m11:1*d,m12:1*g,m21:-1*g,m22:1*d,m41:m[0]-1*h,m42:m[1]+1*u}),f.drawImage(c,0,0),f.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:i,offsetX:n,offsetY:s,rotation:o,scaleX:a,tintColor:l,url:c}=e;const h=this._resourceManager.getResource(c);if(null==h)return;if((0,C.Bi)(t))this._buildPath(t.rings,!0);else if((0,C.Rg)(t))this._buildPath(t.paths,!0);else if((0,C.ZC)(t))this._buildPath(V(t).rings,!0);else{if(!(0,C.U9)(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const u=this._ctx,f=(0,E.UE)(c)||"src"in h&&(0,E.UE)(h.src);let m,d="getFrame"in h?w(h):h;if(r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),m=u.createPattern(d,"repeat");const t=this.transformSize(1);o||(o=0),n?n*=t:n=0,s?s*=t:s=0,i&&(i*=t);const e=i?i/h.height:1,r=a&&i?a*i/h.width:1;if(0!==o||1!==e||1!==r||0!==n||0!==s){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(n,s).scaleSelf(r,e,1),m.setTransform(t)}}else m=u.createPattern(d,"repeat");u.save(),u.fillStyle=m,u.fill("evenodd"),u.restore()}drawPictureStroke(t,e){if(!t)return;let{colorSubstitutions:r,capStyle:i,joinStyle:s,miterLimit:o,tintColor:l,url:c,width:h}=e;const u=this._resourceManager.getResource(c);if(null==u)return;let f;if((0,C.Bi)(t))f=t.rings;else if((0,C.Rg)(t))f=t.paths;else{if(!(0,C.ZC)(t))return(0,C.U9)(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=V(t).rings}h||(h=u.width);const m=(0,E.UE)(c)||"src"in u&&(0,E.UE)(u.src);let d="getFrame"in u?w(u):u;r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps&&(m||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const g=Math.max(this.transformSize((0,a.Lz)(h)),.5),p=g/d.width,y=this._ctx,S=y.createPattern(d,"repeat-y");let M,b;y.save(),this._setCapStyle(i),this._setJoinStyle(s),void 0!==o&&(y.miterLimit=o),y.lineWidth=g;for(let t of f)if(t=(0,n.o8)(t),Y(t),t&&!(t.length<=1)){M=this.transformPt(t[0]);for(let e=1;e<t.length;e++){b=this.transformPt(t[e]);const r=$(M,b),i=new DOMMatrix;i.translateSelf(0,M[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-r),S.setTransform(i),y.strokeStyle=S,y.beginPath(),y.moveTo(M[0],M[1]),y.lineTo(b[0],b[1]),y.stroke(),M=b}}y.restore()}drawGradientFill(t,e){if(!t)return;let r;if((0,C.Bi)(t))r=t.rings;else if((0,C.Rg)(t))r=t.paths;else{if(!(0,C.ZC)(t))return void G().error("Unable to draw gradient fill");r=V(t).rings}this._buildPath(r,!0);const{angle:i,gradientMethod:n,gradientSize:s,gradientSizeUnits:o}=e,c=x.D.CIMGradientFill,h=e.gradientType??c.gradientType,u=-(0,p.kU)(i??0),f=(0,l.Ie)();for(const t of r){const e=t?t.length:0;if(e>1)for(let r=0;r<e;r++){let e=this.transformPt(t[r]);"Linear"!==n&&"Rectangular"!==n||(e=k(e,-u)),(0,l.tK)(f,e)}}const[m,d,g,y]=f,S=this._ctx;switch(S.save(),n){case"Buffered":G().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(d+y)/2,r="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,c.gradientSize)*(g-m),[i,n]="Discrete"===h?[g,g-r]:[m+r,m],l=k([i,t],u),f=k([n,t],u),p=S.createLinearGradient(l[0],l[1],f[0],f[1]);(0,I.AH)(p,e),S.fillStyle=p,S.fill("evenodd");break}case"Circular":{const t=(0,l.gX)(f),r=(0,l.ib)(f)/2,i="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,c.gradientSize)*r,[n,u]="Discrete"===h?[r,r-i]:[i,0],m=S.createRadialGradient(t[0],t[1],n,t[0],t[1],u);(0,I.AH)(m,e),S.fillStyle=m,S.fill("evenodd");break}case"Rectangular":{const r=(0,l.gX)(f),i=r[0],n=r[1],p=k(r,u),M=(r,i,n,s,o,a,l,c)=>{S.save(),this.pushClipPath(t);const h=k([o,a],u),f=k([l,c],u);S.beginPath(),S.moveTo(p[0],p[1]),S.lineTo(h[0],h[1]),S.lineTo(f[0],f[1]),S.lineTo(p[0],p[1]),S.clip();const m=k([r,i],u),d=k([n,s],u),g=S.createLinearGradient(m[0],m[1],d[0],d[1]);(0,I.AH)(g,e),S.fillStyle=g,S.fill("evenodd"),S.restore()};let C="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,c.gradientSize)*((0,l.VL)(f)/2),[b,_]="Discrete"===h?[g,g-C]:[i+C,i];M(b,n,_,n,g,d,g,y),[b,_]="Discrete"===h?[m,m+C]:[i-C,i],M(b,n,_,n,m,y,m,d),C="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,c.gradientSize)*((0,l.uJ)(f)/2);let[x,w]="Discrete"===h?[y,y-C]:[n+C,n];M(i,x,i,w,g,y,m,y),[x,w]="Discrete"===h?[d,d+C]:[n-C,n],M(i,x,i,w,m,d,g,d);break}}S.restore()}drawGradientStroke(t,e){const{capStyle:r,gradientMethod:i,gradientSize:s,gradientSizeUnits:o,joinStyle:l,miterLimit:c,width:h}=e;if(!t||0===h)return;let u;if((0,C.Bi)(t))u=t.rings;else if((0,C.Rg)(t))u=t.paths;else{if(!(0,C.ZC)(t))return void G().error("Unable to draw gradient stroke");u=V(t).rings}const f=e.gradientType??x.D.CIMGradientStroke.gradientType,m=Math.max(this.transformSize((0,a.Lz)(h)),.5),d=this._ctx;let g,p;d.save(),this._setCapStyle(r),this._setJoinStyle(l),void 0!==c&&(d.miterLimit=c),d.lineWidth=m;for(let t of u){if(t=(0,n.o8)(t),Y(t),!t||t.length<=1)continue;let r=0;g=this.transformPt(t[0]);for(let e=1;e<t.length;e++){p=this.transformPt(t[e]);const i=p[0]-g[0],n=p[1]-g[1];r+=Math.sqrt(i*i+n*n),g=p}const l="Absolute"===o?this.transformSize((0,a.Lz)(s)):(0,E.yX)(s,x.D.CIMGradientStroke.gradientSize)*("AcrossLine"===i?m:r);let c=0;g=this.transformPt(t[0]);for(let n=1;n<t.length;n++){p=this.transformPt(t[n]);const s=p[0]-g[0],o=p[1]-g[1],a=Math.sqrt(s*s+o*o);let h,u,y,S;switch(i){case"AcrossLine":{const[t,e]=k([s/a,o/a],-Math.PI/2),r=m/2,i="Discrete"===f?r:l-r;h=(g[0]+p[0])/2+t*i,u=(g[1]+p[1])/2+e*i,y=h-t*l,S=u-e*l;break}case"AlongLine":{const t=s/a,e=o/a;"Discrete"===f?(h=g[0]-t*c,u=g[1]-e*c,y=h+t*l,S=u+e*l):(y=g[0]+t*(r-c),S=g[1]+e*(r-c),h=y-t*l,u=S-e*l);break}default:return G().error("Unrecognized gradient method:",i),void d.restore()}const M=d.createLinearGradient(h,u,y,S);(0,I.AH)(M,e),d.strokeStyle=M,d.beginPath(),d.moveTo(g[0],g[1]),d.lineTo(p[0],p[1]),d.stroke(),c+=a,g=p}}d.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const i of t){const t=i?i.length:0;if(t>1){let n=this.transformPt(i[0]);r.moveTo(n[0],n[1]);for(let e=1;e<t;e++)n=this.transformPt(i[e]),r.lineTo(n[0],n[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function $(t,e){const r=e[0]-t[0],i=e[1]-t[1];return 180/Math.PI*Math.atan2(i,r)}const V=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null;function X(t,e=1){const r=(0,E.DW)(t),i=(0,E._d)(t.fontStyleName),n=t.fontFamilyName??g.Vb,{weight:s,style:o}=i,a=e*(t.height||5),l=(0,E.Bu)(t.horizontalAlignment),c=(0,E.Nl)(t.verticalAlignment),h=(0,E.pM)(t),u=(0,E.pM)(t.haloSymbol),f=null!=u?e*(t.haloSize??0):0,m=(0,E._1)(t.symbol),d=e*((0,E.xo)(t.symbol)||0),p="CIMBackgroundCallout"===t.callout?.type?t.callout.backgroundSymbol:null,y=(0,E.pM)(p),S=(0,E.xo)(p),M=(0,E._1)(p);return{color:h,size:a,horizontalAlignment:l,verticalAlignment:c,font:{family:n,style:(0,E.pV)(o),weight:(0,E.Kn)(s),decoration:r},outline:{size:d||0,color:m},halo:{size:f||0,color:u,style:o},backgroundColor:y,borderLine:null!=S&&null!=M?{size:S,color:M}:null,pixelRatio:1,premultiplyColors:!0}}function Y(t){let e,r,i,n,s,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],r=t[a][1]-o[1],n=0!==e?r/e:Math.PI/2,void 0!==i&&Math.abs(n-i)<=1e-4?(t.splice(a-1,1),o=s):(s=o,o=t[a],a++),i=n}var q=r(59868),Z=r(13195);const j=Math.PI,J=j/2,K=Math.PI/180,Q=96/72,tt=()=>s.A.getLogger("esri.symbols.cim.CIMSymbolHelper");function et(t){let e;switch(t.type){case"cim":return t.data;case"web-style":return t;case"simple-marker":{const r=st.fromSimpleMarker(t);if(!r)throw new Error("InternalError: Cannot convert symbol to CIM");e=r;break}case"picture-marker":e=st.fromPictureMarker(t);break;case"simple-line":e=st.fromSimpleLineSymbol(t);break;case"simple-fill":e=st.fromSimpleFillSymbol(t);break;case"picture-fill":e=st.fromPictureFillSymbol(t);break;case"text":e=st.fromTextSymbol(t)}return{type:"CIMSymbolReference",symbol:e}}function rt(t,e,r){switch(e.type){case"CIMSymbolReference":return rt(t,e.symbol,r);case"CIMPointSymbol":null==r&&(r={x:0,y:0}),t.drawSymbol(e,r);break;case"CIMLineSymbol":null==r&&(r={paths:[[[0,0],[10,0]]]}),t.drawSymbol(e,r);break;case"CIMPolygonSymbol":null==r&&(r={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]}),t.drawSymbol(e,r);break;case"CIMTextSymbol":{const r={x:0,y:0};t.drawSymbol(e,r);break}case"CIMVectorMarker":{const r=new d.W;t.drawMarker(e,r);break}}return t.envelope()}function it(t){if(!t)return 0;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(t.offset??0);default:return 0}}class nt{static getSymbolInflateSize(t,e,r,i,n){return t||(t=[0,0,0,0]),e?this._getInflateSize(t,e,r,i,n):t}static safeSize(t){const e=Math.max(Math.abs(t[0]),Math.abs(t[2])),r=Math.max(Math.abs(t[1]),Math.abs(t[3]));return Math.sqrt(e*e+r*r)}static _vectorMarkerBounds(t,e,r,i){let n=!0;const s=(0,l.vt)();if(e?.markerGraphics)for(const o of e.markerGraphics){const e=[0,0,0,0];o.geometry&&((0,c.Rg)(s,o.geometry),e[0]=0,e[1]=0,e[2]=0,e[3]=0,this.getSymbolInflateSize(e,o.symbol,r,0,i),s[0]+=e[0],s[1]+=e[1],s[2]+=e[2],s[3]+=e[3],n?(t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],n=!1):(t[0]=Math.min(t[0],s[0]),t[1]=Math.min(t[1],s[1]),t[2]=Math.max(t[2],s[2]),t[3]=Math.max(t[3],s[3])))}return t}static _getInflateSize(t,e,r,i,n){if(function(t){return void 0!==t.symbolLayers}(e)){const s=this._getLayersInflateSize(t,e.symbolLayers,r,i,n),o=(0,E.ll)(e.effects);return o>0&&(s[0]-=o,s[1]-=o,s[2]+=o,s[3]+=o),s}return this._getTextInflatedSize(t,e,n)}static _getLayersInflateSize(t,e,r,i,n){let s=!0;if(!e)return t;for(const o of e){if(!o)continue;let e=[0,0,0,0];switch(o.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=o;let r=t.width;null!=r&&("Square"===t.capStyle||"Miter"===t.joinStyle?r/=1.4142135623730951:r/=2,e[0]=-r,e[1]=-r,e[2]=r,e[3]=r);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const t=o;if("CIMVectorMarker"===o.type){const t=o;if(e=this._vectorMarkerBounds(e,t,r,n),t.frame){const r=(t.frame.xmin+t.frame.xmax)/2,i=(t.frame.ymin+t.frame.ymax)/2;if(e[0]-=r,e[1]-=i,e[2]-=r,e[3]-=i,null!=t.size){const r=t.size/(t.frame.ymax-t.frame.ymin);e[0]*=r,e[1]*=r,e[2]*=r,e[3]*=r}}}else if("CIMPictureMarker"===o.type){const i=o,n=r.getResource(i.url);let s=1;if(null!=n&&n.height&&(s=n.width/n.height),null!=t.size){const r=t.size/2,n=t.size*s*(i.scaleX??1)/2;e=[-n,-r,n,r]}}else if(null!=t.size){const r=t.size/2;e=[-r,-r,r,r]}if(t.anchorPoint){let r,i;"Absolute"===t.anchorPointUnits?(r=t.anchorPoint.x,i=t.anchorPoint.y):(r=t.anchorPoint.x*(e[2]-e[0]),i=t.anchorPoint.y*(e[3]-e[1]));const n=1.25*Math.sqrt(r*r+i*i);e[0]-=n,e[1]-=n,e[2]+=n,e[3]+=n}let s=(0,E.$w)(t.rotation);if(t.rotateClockwise&&(s=-s),i&&(s-=i),s){const t=K*s,r=Math.cos(t),i=Math.sin(t),n=(0,l.vt)([Z.MG,Z.MG,-Z.MG,-Z.MG]);(0,l.tK)(n,[e[0]*r-e[1]*i,e[0]*i+e[1]*r]),(0,l.tK)(n,[e[0]*r-e[3]*i,e[0]*i+e[3]*r]),(0,l.tK)(n,[e[2]*r-e[1]*i,e[2]*i+e[1]*r]),(0,l.tK)(n,[e[2]*r-e[3]*i,e[2]*i+e[3]*r]),e=n}let a=(0,E.$w)(t.offsetX),c=(0,E.$w)(t.offsetY);if(i){const t=K*i,e=Math.cos(t),r=Math.sin(t),n=a*r+c*e;a=a*e-c*r,c=n}e[0]+=a,e[1]+=c,e[2]+=a,e[3]+=c;const h=it(t.markerPlacement);h>0&&(e[0]-=h,e[1]-=h,e[2]+=h,e[3]+=h);break}}const a=(0,E.ll)(o.effects);a>0&&(e[0]-=a,e[1]-=a,e[2]+=a,e[3]+=a),s?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],s=!1):(t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]))}return t}static _getTextInflatedSize(t,e,r){const i=(0,B.hV)(e.height??x.D.CIMTextSymbol.height);if(t[0]=-i/2,t[1]=-i/2,t[2]=i/2,t[3]=i/2,!r)return t;const n=r.get(e);if(!n)return t;if(!function(t){return"glyphs"===t.type?t.glyphs.length>0:t.runs.some(t=>t.glyphs.glyphs.length>0)}(n.glyphMosaicItems))return t;const{lineGapType:s,lineGap:o}=e,a=s?((t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}})(s,o??0,i):0,l=e.horizontalAlignment??x.D.CIMTextSymbol.horizontalalignment,c=e.verticalAlignment??x.D.CIMTextSymbol.verticalalignment,h="CIMBackgroundCallout"===e.callout?.type,u=(0,D.tA)(n.glyphMosaicItems,{scale:i/24,angle:(0,E.$w)(e.angle),xOffset:(0,E.$w)(e.offsetX),yOffset:(0,E.$w)(e.offsetY),horizontalAlignment:l,verticalAlignment:c,maxLineWidth:(0,B.Lu)(e.lineWidth),lineHeight:29*Math.max(.25,Math.min(a||1,4)),decoration:e.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:h}).boundsT,f=Math.sqrt(u.width*u.width+u.height*u.height);return t[0]-=u.x+f,t[1]-=u.y-f,t[2]+=u.x+f,t[3]+=-u.y+f,t}}class st{static getEnvelope(t,e,r,i){if(!t)return null;const n=new N(r,i);if(Array.isArray(t)){let r;for(const i of t)r?r.union(rt(n,i,e)):r=rt(n,i,e);return r}return rt(n,t,e)}static getTextureInfo(t,e,r,i,n){const s=i??this.getEnvelope(t,null,e);if(!s)return[0,0,0,0,1];const o=Math.max(s.width,s.height)*Q;let a=null!=n?Math.max(n/o,1):1;a*=Q,s.x*=a,s.y*=a,s.width*=a,s.height*=a,s.width=Math.max(Math.ceil(s.x+s.width)-Math.floor(s.x),1)-1,s.height=Math.max(Math.ceil(s.y+s.height)-Math.floor(s.y),1)-1;let l=s.x+.5*s.width,c=s.y+.5*s.height;return l+=s.x-Math.floor(s.x),c+=s.y-Math.floor(s.y),i||(s.width+=r,s.height+=r,l+=r/2,c+=r/2),[s.width,s.height,l,c,a]}static getTextureAnchor(t,e,r){const[i,n,s,o,a]=this.getTextureInfo(t,e,2,null,r);return[-s/i,-o/n,n/a*Q]}static rasterize(t,e,r,i,n=!0,s){const[o,a,l,c,h]=this.getTextureInfo(e,i,2,r,s);t.width=o,t.height=a;const u=t.getContext("2d",{willReadFrequently:!0}),f=O.createScale(h,-h);f.translate(.5*o-l,.5*a+c);const m=new W(u,i,f);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};m.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new d.W;m.drawMarker(e,t);break}}const g=u.getImageData(0,0,t.width,t.height),p=new Uint8Array(g.data);if(n){let t;for(let e=0;e<p.length;e+=4)t=p[e+3]/255,p[e]=p[e]*t,p[e+1]=p[e+1]*t,p[e+2]=p[e+2]*t}return[p,t.width,t.height,-l/o,-c/a]}static fromTextSymbol(t){const{text:e}=t;return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:st.createCIMTextSymbolfromTextSymbol(t),textString:e}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:r,width:i,xoffset:n,xscale:s,yoffset:o,yscale:a}=t,l=[],c={type:"CIMPolygonSymbol",symbolLayers:l};if(r){const t=St(r);t&&l.push(t)}let h=t.url;"esriPFS"===t.type&&t.imageData&&(h=t.imageData);const u="angle"in t?t.angle??0:0,f=(i??0)*(s||1),m=(e??0)*(a||1);return l.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:h,height:m,width:f,offsetX:(0,E.$w)(n),offsetY:(0,E.$w)(o),rotation:(0,E.$w)(-u),colorSubstitutions:null}),c}static fromSimpleFillSymbol(t){const{color:e,style:r,outline:i}=t,s=[],o={type:"CIMPolygonSymbol",symbolLayers:s};if(i){const t=St(i);t&&s.push(t)}if(r&&"solid"!==r&&"none"!==r&&"esriSFSSolid"!==r&&"esriSFSNull"!==r){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:ut(e),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let i=0;const o=(0,a.PN)(yt(r)?8:10);switch(r){case"vertical":case"esriSFSVertical":i=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":i=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":i=45;break;case"cross":case"esriSFSCross":i=0}s.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:i,separation:o}),"cross"===r||"esriSFSCross"===r?s.push({type:"CIMHatchFill",lineSymbol:(0,n.o8)(t),offsetX:0,offsetY:0,rotation:90,separation:o}):"diagonal-cross"!==r&&"esriSFSDiagonalCross"!==r||s.push({type:"CIMHatchFill",lineSymbol:(0,n.o8)(t),offsetX:0,offsetY:0,rotation:45,separation:o})}else!r||"solid"!==r&&"esriSFSSolid"!==r||s.push({type:"CIMSolidFill",enable:!0,color:ut(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:r,join:i,marker:n,miterLimit:s,style:o,width:a}=t;let l=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(l=[{type:"CIMGeometricEffectDashes",dashTemplate:gt(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const c=[];if(n){let t;switch(n.placement){case"begin-end":t="Both";break;case"begin":t="JustBegin";break;case"end":t="JustEnd";break;default:t="None"}const e=st.fromSimpleMarker(n,a,r).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:t,offsetAlongLine:0},c.push(e)}return c.push({type:"CIMSolidStroke",color:"none"!==o&&"esriSLSNull"!==o?ut(r):[0,0,0,0],capStyle:at(e),joinStyle:lt(i),miterLimit:s,width:a,effects:l}),{type:"CIMLineSymbol",symbolLayers:c}}static fromPictureMarker(t){const{angle:e,height:r,width:i,xoffset:n,yoffset:s}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:r,width:i,offsetX:(0,E.$w)(n),offsetY:(0,E.$w)(s),rotation:(0,E.$w)(-e)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:e,color:r,font:n,haloColor:s,haloSize:o,horizontalAlignment:a,kerning:l,lineWidth:c,text:h,verticalAlignment:u,xoffset:f,yoffset:m,backgroundColor:d,borderLineColor:g,borderLineSize:p}=t;let y,S,M,C,b,_;n&&(y=n.family,S=n.style,M=n.weight,C=n.size,b=n.decoration);let x=!1;return h&&(x=(0,i.y)(h)[1]),(d||p)&&(_={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(d)},{type:"CIMSolidStroke",enable:!0,color:ut(g),width:p??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:e,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:y||"Arial",fontStyleName:ft(S,M),fontType:0,haloSize:o,height:C,hinting:1,horizontalAlignment:ct(a??"center"),kerning:l,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:c,offsetX:(0,E.$w)(f),offsetY:(0,E.$w)(m),strikethrough:"line-through"===b,underline:"underline"===b,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(r)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:ut(s)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:x?1:0,verticalAlignment:ht(u??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:_}}static createPictureMarkerRasterizationParam(t){const{angle:e,height:r,width:i,xoffset:n,yoffset:s}=t,o=t.url??t.source?.url??t.source?.imageData;return o?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:r,width:i,offsetX:(0,E.$w)(n),offsetY:(0,E.$w)(s),rotation:(0,E.$w)(-e)}}:null}static createPictureFillRasterizationParam(t){const{width:e,height:r,xoffset:i,yoffset:n,url:s}=t;return s?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:s,width:e,height:r,offsetX:(0,E.$w)(i),offsetY:(0,E.$w)(n),rotation:0}}:null}static fromSimpleMarker(t,e,r){const{style:i}=t,n=t.color??r;if("path"===i||"esriSMSPath"===i){const e=[];if("outline"in t&&t.outline){const r=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:r.width,color:ut(r.color),path:t.path})}e.push({type:"CIMSolidFill",enable:!0,color:ut(n),path:t.path});const[r,i]=pt("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-(0,E.$w)(t.angle),size:(0,E.$w)(t.size||6),offsetX:(0,E.$w)(t.xoffset),offsetY:(0,E.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:r,markerGraphics:[{type:"CIMMarkerGraphic",geometry:i,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const s=[];let o,a,l=t.size;if("outline"in t&&t.outline&&"none"!==t.outline.style&&"esriSLSNull"!==t.outline.style){const e=t.outline,r="solid"!==e.style&&"esriSLSSolid"!==e.style;[o,a]=r?pt(i,t.size):pt(i);const n=e.width??q.A7.width;if(r){const e=n/t.size,r=(o.xmax-o.xmin)*e/2,i=(o.ymax-o.ymin)*e/2;o.xmin-=r,o.xmax+=r,o.ymin-=i,o.ymax+=i,l&&(l+=n)}const c="cross"!==t.style&&"x"!==t.style||"dot"===t?.outline.style||"short-dot"===t?.outline.style?"HalfGap":"FullPattern",h=r?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:gt(e.style,null).map(t=>e.width&&e.width>0?t*e.width:t),lineDashEnding:c,controlPointEnding:"FullPattern"}]:void 0;s.push({type:"CIMSolidStroke",capStyle:r?"Round":"Butt",enable:!0,width:n,color:ut(e.color),effects:h})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style?[o,a]=pt(i):([o,a]=pt(i),s.push({type:"CIMSolidStroke",enable:!0,width:e,color:ut(n)}));s.push({type:"CIMSolidFill",enable:!0,color:ut(n)});const c={type:"CIMPolygonSymbol",symbolLayers:s};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,E.$w)(-t.angle),size:(0,E.$w)(l||6*e),offsetX:(0,E.$w)(t.xoffset),offsetY:(0,E.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:c}]}]}}static fromCIMHatchFill(t,e){const r=e*(t.separation??x.D.CIMHatchFill.separation),i=r/2,s=(0,n.o8)(t.lineSymbol);s.symbolLayers?.forEach(t=>{switch(t.type){case"CIMSolidStroke":null!=t.width&&(t.width*=e),t.effects?.forEach(t=>{if("CIMGeometricEffectDashes"===t.type){const r=t.dashTemplate;t.dashTemplate=r?.map(t=>t*e)}});break;case"CIMVectorMarker":{null!=t.size&&(t.size*=e);const r=t.markerPlacement;null!=r&&"placementTemplate"in r&&(r.placementTemplate=r.placementTemplate.map(t=>t*e));break}}});let o=this._getLineSymbolPeriod(s)||4;for(;o<4;)o*=2;const a=o/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-a,xmax:a,ymin:-i,ymax:i},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-a,0],[a,0]]]},symbol:s}],size:r}}static async normalizeSymbolAndFetchResources(t,e,r=null){if(!t)return;const i=[];if("effects"in t&&t.effects)for(const e of t.effects)i.push((0,m.ai)(e));async function n(t){if("CIMTextSymbol"!==t.type)return;const{fontFamilyName:r,fontStyleName:i}=t;if("calcitewebcoreicons"===r?.toLowerCase())return;const{style:n,weight:s}=(0,E._d)(i),o=(0,E.DW)(t),a=new f.A({family:r,style:n,weight:s,decoration:o});try{await e.loadFont(a)}catch{tt().error(`Unsupported font ${r} in CIM symbol`)}}i.push(n(t)),ot(t,t=>{if(t.effects)for(const e of t.effects)i.push((0,m.ai)(e));if("CIMVectorMarker"===t.type){for(const e of t.markerGraphics)(0,h.Ed)(e.geometry)&&(e.geometry=(0,u.GS)(e.geometry,{maxDeviation:.01}));t.markerPlacement&&i.push((0,m.g1)(t.markerPlacement))}"url"in t&&t.url&&i.push(e.fetchResource(t.url,{signal:r})),"symbol"in t&&i.push(n(t.symbol))}),await Promise.all(i)}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers)if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;switch(e.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=this._getPlacementRepeat(e.markerPlacement);if(t)return t}}}}return 0}static _getEffectsRepeat(t){if(t)for(const e of t)if(e)switch(e.type){case"CIMGeometricEffectDashes":{const t=e.dashTemplate;if(t&&t.length){let e=0;for(const r of t)e+=r;return 1&t.length&&(e*=2),e}break}case"CIMGeometricEffectWave":return e.period;default:tt().error(`unsupported geometric effect type ${e.type}`)}return 0}static _getPlacementRepeat(t){if(t)switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const e=t.placementTemplate;if(e&&e.length){let t=0;for(const r of e)t+=+r;return 1&e.length&&(t*=2),t}break}}return 0}static fromCIMInsidePolygon(t){const e=t.markerPlacement,r={...t};r.markerPlacement=null,r.anchorPoint=null;const i=Math.abs(e.stepX),n=Math.abs(e.stepY),s=(e.randomness??100)/100;let l,c,h,u;if("Random"===e.gridType){const t=(0,a.PN)(1024),r=Math.max(Math.floor(t/i),1),f=Math.max(Math.floor(t/n),1);l=r*i/2,c=f*n/2,h=2*c;const m=new o.A(e.seed),d=s*i/1.5,g=s*n/1.5;u=[];for(let t=0;t<r;t++)for(let e=0;e<f;e++){const r=t*i-l+d*(.5-m.getFloat()),s=e*n-c+g*(.5-m.getFloat());u.push({x:r,y:s}),0===t&&u.push({x:r+2*l,y:s}),0===e&&u.push({x:r,y:s+2*c})}}else!0===e.shiftOddRows?(l=i/2,c=n,h=2*n,u=[{x:-l,y:0},{x:l,y:0},{x:0,y:c},{x:0,y:-c}]):(l=i/2,c=n/2,h=n,u=[{x:-i,y:0},{x:0,y:-n},{x:-i,y:-n},{x:0,y:0},{x:i,y:0},{x:0,y:n},{x:i,y:n},{x:-i,y:n},{x:i,y:-n}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-l,xmax:l,ymin:-c,ymax:c},markerGraphics:u.map(t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[r]}})),size:h}}}function ot(t,e){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const r=t.symbolLayers;if(!r)return;for(const t of r)if(e(t),"CIMVectorMarker"===t.type){const r=t.markerGraphics;if(!r)continue;for(const t of r)if(t){const r=t.symbol;r&&ot(r,e)}}break}}}const at=t=>{if(!t)return"Butt";switch(t){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},lt=t=>{if(!t)return"Miter";switch(t){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},ct=t=>{if(null==t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center";case"justify":return"Justify"}},ht=t=>{if(null==t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},ut=t=>{if(!t)return[0,0,0,0];const{r:e,g:r,b:i,a:n}=t;return[e,r,i,255*n]},ft=(t,e)=>{const r=mt(e),i=dt(t);return r&&i?`${r}-${i}`:`${r}${i}`},mt=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},dt=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},gt=(t,e)=>{const r=.001,i="butt"===e;switch(t){case"dash":case"esriSLSDash":return i?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return i?[4,3,1,3]:[3,4,r,4];case"dot":case"esriSLSDot":return i?[1,3]:[r,4];case"long-dash":case"esriSLSLongDash":return i?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return i?[8,3,1,3]:[7,4,r,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return i?[8,3,1,3,1,3]:[7,4,r,4,r,4];case"short-dash":case"esriSLSShortDash":return i?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return i?[4,1,1,1]:[3,2,r,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return i?[4,1,1,1,1,1]:[3,2,r,2,r,2];case"short-dot":case"esriSLSShortDot":return i?[1,1]:[r,2];case"solid":case"esriSLSSolid":case"none":return tt().error("Unexpected: style does not require rasterization"),[0,0];default:return tt().error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},pt=(t,e=100)=>{const r=e/2;let i,n;const s=t;if("circle"===s||"esriSMSCircle"===s){const t=.25;let e=Math.acos(1-t/r),s=Math.ceil(j/e/4);0===s&&(s=1),e=J/s,s*=4;const o=[];o.push([r,0]);for(let t=1;t<s;t++)o.push([r*Math.cos(t*e),-r*Math.sin(t*e)]);o.push([r,0]),i={rings:[o]},n={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("cross"===s||"esriSMSCross"===s){const t=0;i={paths:[[[t,r],[t,-r]],[[r,t],[-r,t]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("diamond"===s||"esriSMSDiamond"===s)i={rings:[[[-r,0],[0,r],[r,0],[0,-r],[-r,0]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("square"===s||"esriSMSSquare"===s)i={rings:[[[-r,-r],[-r,r],[r,r],[r,-r],[-r,-r]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("x"===s||"esriSMSX"===s)i={paths:[[[r,r],[-r,-r]],[[r,-r],[-r,r]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("triangle"===s||"esriSMSTriangle"===s){const t=.5773502691896257*e,r=-t,s=2/3*e,o=s-e;i={rings:[[[r,o],[0,s],[t,o],[r,o]]]},n={xmin:r,ymin:o,xmax:t,ymax:s}}else"arrow"===s&&(i={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},n={xmin:-r,ymin:-r,xmax:r,ymax:r});return[n,i]},yt=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t;function St(t){if(!t)return null;let e=null;const{cap:r,color:i,join:n,miterLimit:s,style:o,width:a}=t;return"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(e=[{type:"CIMGeometricEffectDashes",dashTemplate:gt(o,r),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==o&&"none"!==o?ut(i):[0,0,0,0],capStyle:at(r),joinStyle:lt(n),miterLimit:s,width:a,effects:e}}},28076(t,e,r){var i=r(13337);const n={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:i.h.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:i.h.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCircularSector:{radius:25,startangle:0,endangle:45},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distancealong:100,movementtype:"Distance"}};r.d(e,["D",0,n])},44589(t,e,r){r.d(e,{AH:()=>a}),r(40804);var i=r(53966),n=(r(34727),r(35521),r(28076));const s=()=>i.A.getLogger("esri.symbols.cim.rasterizingUtils");let o;function a(t,e){const{colorRamp:r,gradientType:i}=e,s=l(r),a="CIMFixedColorRamp"===r.type;if("Continuous"===i&&!a)return c(t,s);const h=e.interval??n.D.CIMGradientFill.interval;if(a)return c(t,function(t,e){const r=[],i=(t.length-1)/(e-1);for(let n=0;n<e;n++){const s=t[Math.round(n*i)].color;r.push({offset:n/e,color:s}),r.push({offset:(n+1)/e,color:s})}return r}(s,h));const u=[];o??=document.createElement("canvas"),function(t,e,r,i,n){const s=r+2*n;t.width=s,t.height=i;const o=(n+1)/s,a=t.getContext("2d",{willReadFrequently:!0});if(e.length>0){const t=a.createLinearGradient(0,0,s,i);c(t,e,o),a.fillStyle=t}else a.fillStyle="rgba(128, 128, 128, 1)";a.fillRect(0,0,s,i)}(o,s,h,1,0);const f=o.getContext("2d").getImageData(0,0,h,1).data;for(let t=0,e=0;t<h;t++,e=4*t){const r=[f[e+0],f[e+1],f[e+2],f[e+3]];u.push({offset:t/h,color:r}),u.push({offset:(t+1)/h,color:r})}return c(t,u)}function l(t){const e=[];switch(t.type){case"CIMPolarContinuousColorRamp":case"CIMLinearContinuousColorRamp":{"CIMPolarContinuousColorRamp"===t.type&&s().warnOnce("CIMPolarContinuousColorRamp is currently unsupported. Falling back to CIMLinearContinuousColorRamp.");const r=t;e.push({offset:0,color:[r.fromColor[0],r.fromColor[1],r.fromColor[2],r.fromColor[3]/255]}),e.push({offset:1,color:[r.toColor[0],r.toColor[1],r.toColor[2],r.toColor[3]/255]});break}case"CIMFixedColorRamp":{const r=t,i=1/(r.colors.length-1);let n=0;for(const t of r.colors)e.push({offset:n,color:[t[0],t[1],t[2],t[3]/255]}),n+=i;break}case"CIMMultipartColorRamp":{const r=t,i=r.weights.reduce((t,e)=>t+e,0);let n=0;for(let t=0;t<r.colorRamps.length;t++){const s=r.colorRamps[t],o=r.weights[t],a=l(s);for(const t of a)e.push({offset:(n+t.offset*o)/i,color:t.color});n+=o}break}default:s().error(`Color ramp "${t.type}" currently unsupported.`)}return e}function c(t,e,r=0){for(const{offset:i,color:n}of e)t.addColorStop(Math.min(Math.max(i,r),1-r),`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]})`)}},13337(t,e,r){r.d(e,["h",0,{Relative:0,Absolute:1}])},93397(t,e,r){r.d(e,{Bu:()=>x,DW:()=>M,FH:()=>L,FM:()=>a,Kn:()=>y,Kq:()=>O,MM:()=>u,Nl:()=>w,O2:()=>k,YC:()=>R,YF:()=>I,_1:()=>b,_d:()=>S,_h:()=>o,bs:()=>T,e6:()=>c,gQ:()=>s,jn:()=>m,lW:()=>h,ll:()=>F,mA:()=>f,oI:()=>H,pM:()=>C,pV:()=>p,pk:()=>v,rB:()=>A,xo:()=>_,yX:()=>G,zb:()=>P,zr:()=>d});var i=r(28076);function n(t){let e=t.length;for(;e--;)if(!" /-,\n".includes(t.charAt(e)))return!1;return!0}function s(t,e){const r=[];let i=0,s=-1;do{if(s=t.indexOf("[",i),s>=i){if(s>i){const e=t.slice(i,s);r.push([e,null,n(e)])}if(i=s+1,s=t.indexOf("]",i),s>=i){if(s>i){const n=e[t.slice(i,s)];n&&r.push([null,n,!1])}i=s+1}}}while(-1!==s);if(i<t.length){const e=t.slice(i);r.push([e,null,n(e)])}return r}function o(t,e,r){let i="",n=null;for(const r of e){const[e,s,o]=r;if(null!=e&&""!==e)o?n=e:(null!=n&&(i+=n,n=null),i+=e);else{const e=t.readAttribute(s);null!=e&&""!==e&&(null!==n&&(i+=n,n=null),i+=e)}}return l(i,r)}function a(t,e,r,i){let n="",s=null;for(const i of e){const[e,o,a]=i;if(null!=e&&""!==e)a?s=e:(null!=s&&(n+=s,s=null),n+=e);else{let e=o;null!=r&&(e=z(o,r));const i=t.attributes[e];null!=i&&""!==i&&(null!=s&&(n+=s,s=null),n+=i)}}return l(n,i)}function l(t,e){switch("string"!=typeof t&&(t=String(t)),e){case"LowerCase":return t.toLowerCase();case"Allcaps":return t.toUpperCase();default:return t}}function c(t){return t?[t[0],t[1],t[2],t[3]/255]:[0,0,0,0]}function h(t){return t.data?.symbol??null}function u(t){return"CIMVectorMarker"===t.type||"CIMPictureMarker"===t.type||"CIMBarChartMarker"===t.type||"CIMCharacterMarker"===t.type||"CIMPieChartMarker"===t.type||"CIMStackedBarChartMarker"===t.type}function f(t){return"CIMGradientStroke"===t.type||"CIMPictureStroke"===t.type||"CIMSolidStroke"===t.type}function m(t){return null!=t&&("CIMGradientFill"===t.type||"CIMHatchFill"===t.type||"CIMPictureFill"===t.type||"CIMSolidFill"===t.type||"CIMWaterFill"===t.type)}function d(t){return null!=t&&("CIMMarkerPlacementAlongLineRandomSize"===t.type||"CIMMarkerPlacementAlongLineSameSize"===t.type||"CIMMarkerPlacementAlongLineVariableSize"===t.type||"CIMMarkerPlacementAtExtremities"===t.type||"CIMMarkerPlacementAtMeasuredUnits"===t.type||"CIMMarkerPlacementAtRatioPositions"===t.type||"CIMMarkerPlacementOnLine"===t.type||"CIMMarkerPlacementOnVertices"===t.type)}const g=(t,e=0)=>null==t||isNaN(t)?e:t;function p(t){if(!t)return"normal";switch(t.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function y(t){if(!t)return"normal";switch(t.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function S(t){let e="normal",r="normal";if(t){const i=t.toLowerCase();i.includes("italic")?e="italic":i.includes("oblique")&&(e="oblique"),i.includes("bold")?r="bold":i.includes("light")&&(r="lighter")}return{style:e,weight:r}}function M(t){return t.underline?"underline":t.strikethrough?"line-through":"none"}function C(t){if(!t)return null;switch(t.type){case"CIMPolygonSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=C(e);if(null!=t)return t}break;case"CIMTextSymbol":return C(t.symbol);case"CIMSolidFill":return t.color}return null}function b(t){if(t)switch(t.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const e=t.symbolLayers;if(e)for(const t of e){const e=b(t);if(null!=e)return e}break}case"CIMTextSymbol":return b(t.symbol);case"CIMSolidStroke":return t.color}}function _(t){if(t)switch(t.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=_(e);if(void 0!==t)return t}break;case"CIMTextSymbol":return _(t.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return t.width}}function x(t){switch(t){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function w(t){switch(t){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function k(t){return(t?Object.keys(t):[]).map(e=>({name:e,alias:e,type:"string"==typeof t[e]?"esriFieldTypeString":"esriFieldTypeDouble"}))}function I(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}function P(t,e,r,i,n,s,o=!0){const{infos:a}=s;let l=1,c=0,h=0,u=0,f=1;for(const{absoluteAnchorPoint:t,offsetX:e,offsetY:r,rotation:i,size:n,frameHeight:s,rotateClockWise:m,scaleSymbolsProportionally:d}of a)f=t?1:l,h=B(e,r,c,f,h),u=D(e,r,c,f,u),s&&(d||o)&&(l*=n/s),c=U(i,m,c);const m=B(i,n,c,f,h),d=D(i,n,c,f,u);return{size:t*l,rotation:U(e,r,c),offsetX:m,offsetY:d}}function L(t){return t?.dashTemplate&&(t.dashTemplate=function(t){return"string"==typeof t?function(t){return t.split(" ").map(t=>Number(t))}(t):t}(t.dashTemplate)),t}function T(t){if(null==t)return"Normal";switch(t.type){case"CIMTextSymbol":return t.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const e=t.symbolLayers;if(!e)return"Normal";for(const t of e)if("CIMVectorMarker"===t.type)return T(t)}break;case"CIMVectorMarker":{const e=t.markerGraphics;if(!e)return"Normal";for(const t of e)if(t.symbol)return T(t.symbol)}}return"Normal"}function R(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let e=0;if(t.symbolLayers)for(const r of t.symbolLayers)if(r)switch(r.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=r.size??i.D.CIMVectorMarker.size;t>e&&(e=t);break}}return e}case"CIMLineSymbol":case"CIMPolygonSymbol":{let e=0;if(t.symbolLayers)for(const r of t.symbolLayers)if(r)switch(r.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=r.width;null!=t&&t>e&&(e=t);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(r.markerPlacement&&d(r.markerPlacement)){const t=r.size??i.D.CIMVectorMarker.size;t>e&&(e=t)}break;case"CIMPictureFill":{const t=r.height;null!=t&&t>e&&(e=t)}}return e}}}function z(t,e){if(null!==e){const r=e.get(t);return r?r.name:t}return t}function v(t){return t.map(t=>({...t,propertyName:I(t.propertyName)}))}function A(t){const e={};for(const r in t){const i=t[r];e[I(r)]=i}return e}function F(t){if(!t)return 0;let e=0;for(const r of t)e+=E(r);return e}function E(t){if(!t)return 0;if(O(t))return t.inflateSize??256;switch(t.type){case"CIMGeometricEffectArrow":return Math.abs(.5*t.width);case"CIMGeometricEffectBuffer":return Math.abs(t.size);case"CIMGeometricEffectCircularSector":return Math.abs(t.radius??25);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(t.length);case"CIMGeometricEffectJog":return Math.abs(.5*t.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(g(t.offsetX)),Math.abs(g(t.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(t.offset);case"CIMGeometricEffectRadial":return Math.abs(t.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(t.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(t.fromWidth),Math.abs(t.toWidth));case"CIMGeometricEffectWave":return Math.abs(t.amplitude);case"CIMGeometricEffectDonut":return Math.abs(t.width)}}function D(t,e,r,i,n){const s=r*Math.PI/180;if(s){const r=Math.cos(s);return(Math.sin(s)*t+r*e)*i+n}return e*i+n}function B(t,e,r,i,n){const s=r*Math.PI/180;return s?(Math.cos(s)*t-Math.sin(s)*e)*i+n:t*i+n}function U(t,e,r){return e?r-t:r+t}function G(t,e){return Math.max(Math.min((t??e)/100,1),0)}function O(t){return t.type.startsWith("Private")}function H(t){return null!=t&&function(t){return"setControlPoint"in t&&"getControlPoint"in t&&"setControlPointAt"in t&&"getControlPointAt"in t}(t)?t:void 0}r.d(e,["$w",0,g,"UE",0,t=>t.includes("data:image/svg+xml")])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[737],{20737(e,t,r){r.r(t),r.d(t,{default:()=>z});var i=r(5482),s=r(37838),n=r(11254),o=r(69540),a=r(7762),l=r(49186),d=r(36563),u=r(25728),c=r(17676),h=r(36708),p=r(91429),y=r(16930),m=r(55156),b=r(60950),f=r(89808),g=r(99959);const v=Symbol("isAnnotationFeatureGraphicOrigin");var M;class C extends g.A{get[(M=v,b.ym)](){return this.layer}get[m.e](){return this.layer}get[f.Q](){return this.layer}constructor(e,t){super(),this[M]=!0,this.type="annotation-feature",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer?.subtypeCode??null}__`}}var F=r(4146),I=r(52136),S=r(18768),w=r(63074),A=r(69208),E=r(40775),Z=r(47685),T=r(10086),O=r(34287),x=r(8303),L=r(54310),j=r(25036),k=r(82935),_=r(4902),D=r(92474);let P=class extends((0,o.OU)((0,_.s)(D.x_))){constructor(e){super(e),this.parent=null,this.subtypeCode=null,this.type="annotation-feature-sublayer",this.visible=!0}get graphicOrigin(){return new C(this.parent,this)}get title(){return this.parent?.subtypes?.find(e=>e.code===this.subtypeCode)?.name??null}};(0,i.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],P.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({clonable:!1})],P.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({type:Number})],P.prototype,"subtypeCode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],P.prototype,"title",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],P.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],P.prototype,"visible",void 0),P=(0,i.Cg)([(0,p.$K)("esri.layers.support.AnnotationFeatureSublayer")],P);var V=r(60694),R=r(10873),q=r(15426),H=r(17036),$=r(30524),G=r(91908),U=r(97552),N=r(30291),B=r(36005);const J="annotation-feature-layer",Q=(0,H.p)(),W=a.A.ofType(P);let K=class extends((0,E.I)((0,T.j)((0,w.dM)((0,k.e)((0,Z.w6)((0,j.j)((0,L.J)((0,S.b)((0,O.q)((0,x.A)((0,u.M)((0,A.d)((0,I.p)((0,o.OU)(F.A))))))))))))))){constructor(e){super(e),this._sublayerLookup=new Map,this.barrierWeight="high",this.elementField="element",this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new C(this,null),this.operationalLayerType="ArcGISAnnotationLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.referenceScale=0,this.source=null,this.statusField="status",this.sublayers=new W,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Annotation Layer"]),this.symbolCollection=null,this.type="annotation-feature",this.unplacedAnnotationsVisible=!1,this.addHandles((0,h.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),h.OH))}destroy(){this.source?.destroy()}load(e){const t=e?.signal,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(c.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new l.A(`${J}:missing-url`,"AnnotationFeatureLayer must be created with a url");return Promise.all([this.loadDataElement(e).then(()=>{if(!this.symbolCollection)throw new l.A(`${J}:missing-symbol-collection`,"Invalid service with no symbol collection")}),this.initLayerProperties(await this.createGraphicsSource(t))])}).then(()=>(0,q.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readSublayers(e,t){const r=new W(t.subtypes.map(({code:e})=>new P({subtypeCode:e})).reverse());if(this.visibleLayers){const e=new Set(this.visibleLayers);r.forEach(t=>{t.visible=e.has(t.subtypeCode)})}return r}readTitleFromService(e,t){const{url:r}=this,i=t.name||(0,V.qg)(r)?.title;switch(this.sublayerTitleMode){case"item-title":if(r)return(0,V.yG)(r,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=(0,V.cr)(e),i?`${e} - ${(0,V.cr)(i)}`:e;break}}return i?(0,V.cr)(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get visibleLayers(){return 0===this.sublayers.length?this._get("visibleLayers")??null:Array.from(new Set(this.sublayers?.toArray().filter(e=>e.visible).map(e=>e.subtypeCode).sort((e,t)=>e-t)??null))}set visibleLayers(e){this._set("visibleLayers",e)}createPopupTemplate(e){return(0,N.tn)(this,e)}async createGraphicsSource(e){const t={stack:[],error:void 0,hasError:!1};try{const{default:s}=await(0,c.qr)(Promise.all([r.e(893),r.e(2656),r.e(9714)]).then(r.bind(r,65515)),e),n=new s({layer:this,supportedSourceTypes:this.supportedSourceTypes});return(0,i.mS)(t,(0,d.Bf)((0,c.u7)(e,()=>n.cancelLoad())??(0,d.hA)()),!1),await n.load({signal:e}),n}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}createQuery(){const e=(0,q.VZ)(this);return e.where=this.definitionExpression||"1=1",e}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return(0,q.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(U.A.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features){const t=this.findSublayerForFeature(e);e.origin=t?.graphicOrigin??this.graphicOrigin,e.layer=e.sourceLayer=this}return i}async queryObjectIds(e,t){const r=await this.load();return r.source.queryObjectIds(U.A.from(e)??r.createQuery(),t)}async queryFeatureCount(e,t){const r=await this.load();return r.source.queryFeatureCount(U.A.from(e)??r.createQuery(),t)}async queryExtent(e,t){const r=await this.load();return r.source.queryExtent(U.A.from(e)??r.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,G.D)(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),(0,$.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,q.jp)(this)}_verifySource(){if(this.version&&this.version<10.8)throw new l.A(J+":unsupported-version","The feature service must be version 10.8 or above.");const e=["ZOrder","AnnotationClassID","Element","SymbolID","Status"],t=e.filter(e=>!this.fieldsIndex.has(e));if(this.fieldsIndex.has("FeatureID")||this.fieldsIndex.has("FeatureGlobalID")||t.unshift("FeatureID","FeatureGlobalID"),t.length)throw new l.A(J+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return(0,n.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const r=[...t.layers||[],...t.tables||[]];return r.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}};(0,i.Cg)([(0,p.MZ)({type:y.A,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],K.prototype,"attributeSpatialReference",void 0),(0,i.Cg)([(0,p.MZ)(R.es)],K.prototype,"barrierWeight",void 0),(0,i.Cg)([(0,p.MZ)({json:{write:!0}})],K.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"elementField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)({...Q.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],K.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(Q.fieldsIndex)],K.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,p.MZ)(R.id)],K.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:["ArcGISAnnotationLayer"]})],K.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,p.MZ)(Q.outFields)],K.prototype,"outFields",void 0),(0,i.Cg)([(0,p.MZ)(R.M6)],K.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],K.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"referenceScale",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1,readOnly:!0})],K.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"statusField",void 0),(0,i.Cg)([(0,p.MZ)({type:W})],K.prototype,"sublayers",void 0),(0,i.Cg)([(0,B.w)("service","sublayers",["subtypes"])],K.prototype,"readSublayers",null),(0,i.Cg)([(0,p.MZ)({type:String})],K.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"symbolCollection",void 0),(0,i.Cg)([(0,B.w)("service","title",["name"])],K.prototype,"readTitleFromService",null),(0,i.Cg)([(0,B.w)("portal-item","title")],K.prototype,"readTitleFromPortalItem",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1},value:"annotation-feature",readOnly:!0})],K.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],K.prototype,"unplacedAnnotationsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[Number],json:{write:{ignoreOrigin:!0}}})],K.prototype,"visibleLayers",null),K=(0,i.Cg)([(0,p.$K)("esri.layers.AnnotationFeatureLayer")],K);const z=K},40775(e,t,r){var i=r(5482),s=r(11254),n=r(49186),o=r(84952),a=r(91429),l=r(95250);function d(e,t){const r=e.indexOf(t);if(-1!==r)return e[r+1]}function u(e,t){const r=d(e,t);return r&&"string"==typeof r?JSON.parse(r):null}function c(e){const t=d(e,"ReferenceScale")??0;return"string"!=typeof t?t:parseFloat(t)}function h(e){return u(e,"SymbolCollection")??void 0}function p(e){return u(e,"StyleCollection")??void 0}r.d(t,["I",0,e=>{const t=e;let r=class extends t{async loadDataElement(e){if(!this.url||null==this.layerId)throw new n.A("fetchDataElement:missing-url-or-layerId","The layer must have a url and a layerId to fetch the data element.");const t=(0,o.fj)(this.url,"queryDataElements"),r={f:"json",layers:this.layerId},{data:i}=await(0,s.A)(t,{...e,responseType:"json",query:r}),a=i.layerDataElements.find(e=>e.layerId===this.layerId)?.dataElement;if(!a)throw new n.A("fetchDataElement:not-available","A data element for this layer could not be retrieved.");const d=a.extensionProperties?.propertySetItems??[],u=c(d),y=(0,l.S)(h(d)),m=(0,l.S)(p(d));this.read({referenceScale:u,symbolCollection:y,styleCollection:m},{origin:"service"})}};return r=(0,i.Cg)([(0,a.$K)("esri.layers.mixins.DataElementMixin")],r),r}])},47685(e,t,r){r.d(t,{Mk:()=>p,Zk:()=>c});var i=r(5482),s=r(65529),n=r(4718),o=r(91429),a=r(20816);const l=new s.bk;function d(e){return l.on("apply-edits",new WeakRef(e))}function u(e){return l.on("update-moment",new WeakRef(e))}function c(e,t,r=null,i=!1){const s=Promise.withResolvers();return i=null==t||i,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const h=Symbol();function p(e){return null!=e&&"object"==typeof e&&h in e}function y(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,r){const i=new URL(e).host,s=a.Z3.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}r.d(t,["w6",0,e=>{var t;const r=e;let s=class extends r{static{t=h}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,d=null!=r&&this.relationships?.some(e=>e.relatedTableId===r),u=y(this),c=y(this)&&m(t,i,this.gdbVersion);if(!a||u&&!c||!l&&!d&&!s)return;const h=o.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){const{adds:t,updates:i,deletes:s}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));h.catch(()=>{}),this.emit("apply-edits",{result:h})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=y(this),o=y(this)&&m(t,r,this.gdbVersion),a=y(this)&&!m(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(d(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(u(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,a.w5)(e,t)}};return(0,i.Cg)([(0,o.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.EditBusLayer")],s),s}])},95250(e,t,r){function i(e){return s(e,{CIMRGBColor:n,CIMCharacterMarker:o})}function s(e,t){if(null==e)return e;if(Array.isArray(e))return e.map(e=>s(e,t));if("object"==typeof e){if("type"in e&&"string"==typeof e.type&&t[e.type])return t[e.type](e);const r={};for(const[i,n]of Object.entries(e))r[i]=s(n,t);return r}return e}function n(e){const[t,r,i,s]=e.values;return[t,r,i,255*s/100]}function o(){return{type:"CIMVectorMarker",enable:!0,size:40,colorLocked:!1,anchorPointUnits:"Relative",frame:{xmin:-10,ymin:-10,xmax:10,ymax:10},markerGraphics:[{type:"CIMMarkerGraphic",textString:"■",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",underline:!1,blockProgression:"TTB",depth3D:0,extrapolateBaselines:!0,flipAngle:90,fontEffects:"Normal",fontEncoding:"Unicode",haloSize:0,height:8,hinting:"Default",horizontalAlignment:"Center",kerning:!0,letterSpacing:10,letterWidth:100,ligatures:!1,lineGapType:"ExtraLeading",symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},symbol3DProperties:{type:"CIM3DSymbolProperties",dominantSizeAxis3D:"Z",rotationOrder3D:"XYZ",scaleZ:1,scaleY:1},textCase:"Normal",textDirection:"LTR",verticalAlignment:"Center",verticalGlyphOrientation:"Right",wordSpacing:100,billboardMode3D:"FaceNearPlane"}}],scaleSymbolsProportionally:!0,respectFrame:!0}}r.d(t,{S:()=>i})},20816(e,t,r){r.d(t,{We:()=>a,ZJ:()=>l,w5:()=>d});var i=r(11254);const s=(0,r(13069).vD)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(n,e,new i({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map,r.d(t,["TA",0,s,"Z3",0,n])}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[737],{20737(e,t,r){r.r(t),r.d(t,{default:()=>z});var i=r(5482),s=r(37838),n=r(11254),o=r(69540),a=r(7762),l=r(49186),d=r(36563),u=r(25728),c=r(17676),h=r(36708),p=r(91429),y=r(16930),m=r(55156),b=r(60950),f=r(89808),g=r(99959);const v=Symbol("isAnnotationFeatureGraphicOrigin");var M;class C extends g.A{get[(M=v,b.ym)](){return this.layer}get[m.e](){return this.layer}get[f.Q](){return this.layer}constructor(e,t){super(),this[M]=!0,this.type="annotation-feature",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer?.subtypeCode??null}__`}}var F=r(4146),I=r(52136),S=r(18768),w=r(63074),A=r(69208),E=r(40775),Z=r(47685),T=r(10086),O=r(34287),x=r(8303),L=r(54310),j=r(25036),k=r(82935),_=r(4902),D=r(92474);let P=class extends((0,o.OU)((0,_.s)(D.x_))){constructor(e){super(e),this.parent=null,this.subtypeCode=null,this.type="annotation-feature-sublayer",this.visible=!0}get graphicOrigin(){return new C(this.parent,this)}get title(){return this.parent?.subtypes?.find(e=>e.code===this.subtypeCode)?.name??null}};(0,i.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],P.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({clonable:!1})],P.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({type:Number})],P.prototype,"subtypeCode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],P.prototype,"title",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],P.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],P.prototype,"visible",void 0),P=(0,i.Cg)([(0,p.$K)("esri.layers.support.AnnotationFeatureSublayer")],P);var V=r(60694),R=r(10873),q=r(15426),H=r(17036),$=r(30524),G=r(91908),U=r(97552),N=r(30291),B=r(36005);const J="annotation-feature-layer",Q=(0,H.p)(),W=a.A.ofType(P);let K=class extends((0,E.I)((0,T.j)((0,w.dM)((0,k.e)((0,Z.w6)((0,j.j)((0,L.J)((0,S.b)((0,O.q)((0,x.A)((0,u.M)((0,A.d)((0,I.p)((0,o.OU)(F.A))))))))))))))){constructor(e){super(e),this._sublayerLookup=new Map,this.barrierWeight="high",this.elementField="element",this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new C(this,null),this.operationalLayerType="ArcGISAnnotationLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.referenceScale=0,this.source=null,this.statusField="status",this.sublayers=new W,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Annotation Layer"]),this.symbolCollection=null,this.type="annotation-feature",this.unplacedAnnotationsVisible=!1,this.addHandles((0,h.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),h.OH))}destroy(){this.source?.destroy()}load(e){const t=e?.signal,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(c.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new l.A(`${J}:missing-url`,"AnnotationFeatureLayer must be created with a url");return Promise.all([this.loadDataElement(e).then(()=>{if(!this.symbolCollection)throw new l.A(`${J}:missing-symbol-collection`,"Invalid service with no symbol collection")}),this.initLayerProperties(await this.createGraphicsSource(t))])}).then(()=>(0,q.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readSublayers(e,t){const r=new W(t.subtypes.map(({code:e})=>new P({subtypeCode:e})).reverse());if(this.visibleLayers){const e=new Set(this.visibleLayers);r.forEach(t=>{t.visible=e.has(t.subtypeCode)})}return r}readTitleFromService(e,t){const{url:r}=this,i=t.name||(0,V.qg)(r)?.title;switch(this.sublayerTitleMode){case"item-title":if(r)return(0,V.yG)(r,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=(0,V.cr)(e),i?`${e} - ${(0,V.cr)(i)}`:e;break}}return i?(0,V.cr)(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get visibleLayers(){return 0===this.sublayers.length?this._get("visibleLayers")??null:Array.from(new Set(this.sublayers?.toArray().filter(e=>e.visible).map(e=>e.subtypeCode).sort((e,t)=>e-t)??null))}set visibleLayers(e){this._set("visibleLayers",e)}createPopupTemplate(e){return(0,N.tn)(this,e)}async createGraphicsSource(e){const t={stack:[],error:void 0,hasError:!1};try{const{default:s}=await(0,c.qr)(Promise.all([r.e(893),r.e(7013),r.e(9714)]).then(r.bind(r,65515)),e),n=new s({layer:this,supportedSourceTypes:this.supportedSourceTypes});return(0,i.mS)(t,(0,d.Bf)((0,c.u7)(e,()=>n.cancelLoad())??(0,d.hA)()),!1),await n.load({signal:e}),n}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}createQuery(){const e=(0,q.VZ)(this);return e.where=this.definitionExpression||"1=1",e}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return(0,q.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(U.A.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features){const t=this.findSublayerForFeature(e);e.origin=t?.graphicOrigin??this.graphicOrigin,e.layer=e.sourceLayer=this}return i}async queryObjectIds(e,t){const r=await this.load();return r.source.queryObjectIds(U.A.from(e)??r.createQuery(),t)}async queryFeatureCount(e,t){const r=await this.load();return r.source.queryFeatureCount(U.A.from(e)??r.createQuery(),t)}async queryExtent(e,t){const r=await this.load();return r.source.queryExtent(U.A.from(e)??r.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,G.D)(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),(0,$.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,q.jp)(this)}_verifySource(){if(this.version&&this.version<10.8)throw new l.A(J+":unsupported-version","The feature service must be version 10.8 or above.");const e=["ZOrder","AnnotationClassID","Element","SymbolID","Status"],t=e.filter(e=>!this.fieldsIndex.has(e));if(this.fieldsIndex.has("FeatureID")||this.fieldsIndex.has("FeatureGlobalID")||t.unshift("FeatureID","FeatureGlobalID"),t.length)throw new l.A(J+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return(0,n.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const r=[...t.layers||[],...t.tables||[]];return r.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}};(0,i.Cg)([(0,p.MZ)({type:y.A,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],K.prototype,"attributeSpatialReference",void 0),(0,i.Cg)([(0,p.MZ)(R.es)],K.prototype,"barrierWeight",void 0),(0,i.Cg)([(0,p.MZ)({json:{write:!0}})],K.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"elementField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)({...Q.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],K.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(Q.fieldsIndex)],K.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,p.MZ)(R.id)],K.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:["ArcGISAnnotationLayer"]})],K.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,p.MZ)(Q.outFields)],K.prototype,"outFields",void 0),(0,i.Cg)([(0,p.MZ)(R.M6)],K.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],K.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"referenceScale",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1,readOnly:!0})],K.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"statusField",void 0),(0,i.Cg)([(0,p.MZ)({type:W})],K.prototype,"sublayers",void 0),(0,i.Cg)([(0,B.w)("service","sublayers",["subtypes"])],K.prototype,"readSublayers",null),(0,i.Cg)([(0,p.MZ)({type:String})],K.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"symbolCollection",void 0),(0,i.Cg)([(0,B.w)("service","title",["name"])],K.prototype,"readTitleFromService",null),(0,i.Cg)([(0,B.w)("portal-item","title")],K.prototype,"readTitleFromPortalItem",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1},value:"annotation-feature",readOnly:!0})],K.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],K.prototype,"unplacedAnnotationsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[Number],json:{write:{ignoreOrigin:!0}}})],K.prototype,"visibleLayers",null),K=(0,i.Cg)([(0,p.$K)("esri.layers.AnnotationFeatureLayer")],K);const z=K},40775(e,t,r){var i=r(5482),s=r(11254),n=r(49186),o=r(84952),a=r(91429),l=r(95250);function d(e,t){const r=e.indexOf(t);if(-1!==r)return e[r+1]}function u(e,t){const r=d(e,t);return r&&"string"==typeof r?JSON.parse(r):null}function c(e){const t=d(e,"ReferenceScale")??0;return"string"!=typeof t?t:parseFloat(t)}function h(e){return u(e,"SymbolCollection")??void 0}function p(e){return u(e,"StyleCollection")??void 0}r.d(t,["I",0,e=>{const t=e;let r=class extends t{async loadDataElement(e){if(!this.url||null==this.layerId)throw new n.A("fetchDataElement:missing-url-or-layerId","The layer must have a url and a layerId to fetch the data element.");const t=(0,o.fj)(this.url,"queryDataElements"),r={f:"json",layers:this.layerId},{data:i}=await(0,s.A)(t,{...e,responseType:"json",query:r}),a=i.layerDataElements.find(e=>e.layerId===this.layerId)?.dataElement;if(!a)throw new n.A("fetchDataElement:not-available","A data element for this layer could not be retrieved.");const d=a.extensionProperties?.propertySetItems??[],u=c(d),y=(0,l.S)(h(d)),m=(0,l.S)(p(d));this.read({referenceScale:u,symbolCollection:y,styleCollection:m},{origin:"service"})}};return r=(0,i.Cg)([(0,a.$K)("esri.layers.mixins.DataElementMixin")],r),r}])},47685(e,t,r){r.d(t,{Mk:()=>p,Zk:()=>c});var i=r(5482),s=r(65529),n=r(4718),o=r(91429),a=r(20816);const l=new s.bk;function d(e){return l.on("apply-edits",new WeakRef(e))}function u(e){return l.on("update-moment",new WeakRef(e))}function c(e,t,r=null,i=!1){const s=Promise.withResolvers();return i=null==t||i,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const h=Symbol();function p(e){return null!=e&&"object"==typeof e&&h in e}function y(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,r){const i=new URL(e).host,s=a.Z3.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}r.d(t,["w6",0,e=>{var t;const r=e;let s=class extends r{static{t=h}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,d=null!=r&&this.relationships?.some(e=>e.relatedTableId===r),u=y(this),c=y(this)&&m(t,i,this.gdbVersion);if(!a||u&&!c||!l&&!d&&!s)return;const h=o.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){const{adds:t,updates:i,deletes:s}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));h.catch(()=>{}),this.emit("apply-edits",{result:h})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=y(this),o=y(this)&&m(t,r,this.gdbVersion),a=y(this)&&!m(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(d(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(u(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,a.w5)(e,t)}};return(0,i.Cg)([(0,o.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.EditBusLayer")],s),s}])},95250(e,t,r){function i(e){return s(e,{CIMRGBColor:n,CIMCharacterMarker:o})}function s(e,t){if(null==e)return e;if(Array.isArray(e))return e.map(e=>s(e,t));if("object"==typeof e){if("type"in e&&"string"==typeof e.type&&t[e.type])return t[e.type](e);const r={};for(const[i,n]of Object.entries(e))r[i]=s(n,t);return r}return e}function n(e){const[t,r,i,s]=e.values;return[t,r,i,255*s/100]}function o(){return{type:"CIMVectorMarker",enable:!0,size:40,colorLocked:!1,anchorPointUnits:"Relative",frame:{xmin:-10,ymin:-10,xmax:10,ymax:10},markerGraphics:[{type:"CIMMarkerGraphic",textString:"■",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",underline:!1,blockProgression:"TTB",depth3D:0,extrapolateBaselines:!0,flipAngle:90,fontEffects:"Normal",fontEncoding:"Unicode",haloSize:0,height:8,hinting:"Default",horizontalAlignment:"Center",kerning:!0,letterSpacing:10,letterWidth:100,ligatures:!1,lineGapType:"ExtraLeading",symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},symbol3DProperties:{type:"CIM3DSymbolProperties",dominantSizeAxis3D:"Z",rotationOrder3D:"XYZ",scaleZ:1,scaleY:1},textCase:"Normal",textDirection:"LTR",verticalAlignment:"Center",verticalGlyphOrientation:"Right",wordSpacing:100,billboardMode3D:"FaceNearPlane"}}],scaleSymbolsProportionally:!0,respectFrame:!0}}r.d(t,{S:()=>i})},20816(e,t,r){r.d(t,{We:()=>a,ZJ:()=>l,w5:()=>d});var i=r(11254);const s=(0,r(13069).vD)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(n,e,new i({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map,r.d(t,["TA",0,s,"Z3",0,n])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2387],{69052(e,t,n){n.d(t,{hr:()=>o});var r=n(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return s(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return s(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(r)?n:r}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function s(e,t,n,r,o=0,s=!1){return(r-=o)<t?r+=i(e,t-r):r>n&&(r-=i(e,r-n)),s&&r===n&&(r=t),r+o}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const a=new o(0,2*Math.PI),l=(new o(-Math.PI,Math.PI),new o(0,360));n.d(t,["ie",0,l,"uC",0,a])},93146(e,t,n){n.d(t,{z:()=>o});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async e=>(this.module=e,e))),this._promise}}function o(e){return new r(async()=>{const t=await e();return!1===t.isLoaded?.()&&await t.load(),t})}},52039(e,t,n){n.d(t,{O7:()=>f,el:()=>l});var r=n(69052),o=(n(49186),n(17676)),s=(n(5443),n(39829),n(82799),n(16930)),i=n(93146),a=(n(80754),n(21325));async function l(e,t,n){Array.isArray(e)||(e=[e]),null!=t&&"object"==typeof t&&"authMode"in t&&(n=t);let r=null;for(const t of e)r??=t?.spatialReference;if(!r)return e;const s=(0,a.Vp)(r);if(!s)return e;const[i,l]=s.valid;let f=!1;for(const t of e){if(!t)continue;if("point"===t.type){f||=t.x>=l,f||=t.x<=i;continue}const{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=l,f||=e.xmin<=i,f||=e.xmax>=l,f||=e.xmax<=i}if(!f)return e;const[{foldInto360Range:p},m]=await(0,o.qr)(Promise.all([u.getImportPromise(),c.getImportPromise()]),n),y=m.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;const t=m.fromGeometry(e),n=m.toGeometry(p(t,y),r);return"extent"===e.type&&1===n?.rings.length?n.extent:n})}const u=(0,i.z)(()=>n.e(4144).then(n.bind(n,4144))),c=(0,i.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(5756),n.e(3299),n.e(1550)]).then(n.bind(n,78125)));function f(e,t,n){const r=(0,a.Vp)(n);if(null==r)return e;const[o,s]=r.valid,i=2*s;let l=0,u=0;t>s?l=Math.ceil(Math.abs(t-s)/i):t<o&&(l=-Math.ceil(Math.abs(t-o)/i)),e>s?u=Math.ceil(Math.abs(e-s)/i):e<o&&(u=-Math.ceil(Math.abs(e-o)/i));let c=e+(l-u)*i;const f=c-t;return f>s?c-=i:f<o&&(c+=i),c}function p(e){const t=(0,a.Vp)(e);if(null==t)return null;const[n,o]=t.valid;return new r.hr(n,o)}const m=p(s.A.WGS84);p(s.A.WebMercator),n.d(t,["Y_",0,m])},80754(e,t,n){n.d(t,{kS:()=>u,kd:()=>l});var r=n(82799),o=n(16930),s=n(60408),i=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,i.Ed)(e))for(const n of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,i.aO)(e)){const[n,r]=e.c;n[0]+=t,r[0]+=t;continue}if((0,i.FG)(e)){const[n,r]=e.a;n[0]+=t,r[0]+=t;continue}if((0,i.n1)(e)){const[n,r,o]=e.b;n[0]+=t,r[0]+=t,o[0]+=t;continue}e[0]+=t}for(const n of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(const e of n)e[0]+=t;return e}n.d(t,["j7",0,a])},41653(e,t,n){n.r(t),n.d(t,{queryModel:()=>g,queryModels:()=>d});var r=n(11254),o=n(4576),s=n(49186),i=n(91869),a=n(84952),l=n(5482),u=n(69622),c=n(91429);let f=class extends u.A{constructor(e){super(e),this.name="",this.size=0}arrayBuffer(e){return this.loadArrayBuffer(e)}};(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"flags",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"loadArrayBuffer",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"name",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"size",void 0),f=(0,l.Cg)([(0,c.$K)("esri.layers.scene.ModelFileInfo")],f);let p=class extends u.A{constructor(e){super(e),this.files=[],this.format="",this.isSource=!1,this.name="",this.size=0}};(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"files",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"format",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"isSource",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"name",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"size",void 0),p=(0,l.Cg)([(0,c.$K)("esri.layers.scene.ModelInfo")],p);var m=n(20557),y=n(99199),h=n(97552);async function d(e,t,n,r){const l=e.infoFor3D;if(!l)throw new s.A("scenelayer:query-models-not-available","Model queries are not available without 3D object metadata",{layer:e});const{objectIdField:u,globalIdField:c}=t;if(!u||!c)throw new s.A("scenelayer:query-models-not-available","Missing required fields for model queries",{layer:e});const f=function(e,t,n,r){const o=function(e,t){const n=h.A.from(t)?.clone()??e.createQuery();return n.outFields=null,n.formatOf3DObjects=null,n.returnGeometry=!1,n}(e,t);return o.outFields=[n,r],o.returnGeometry=!1,o}(e,n,u,c),p=await t.queryFeatures(f,r);return await async function(e){const{infoFor3D:t,associatedLayer:n,options:r}=e,s=n.globalIdField,l=n.parsedUrl;if(!s||!l)return new Map;const u=await async function(e){const{options:t,infoFor3D:n,featureInfos:r}=e,s=[...r.keys()];if(t?.requestedFormat){const e=(0,m.fE)(t.requestedFormat,n.supportedFormats);return e?[{formatId:e,objectIds:s}]:[]}const l=(0,o.Am)([...n.queryFormats,...n.editFormats]);return await async function({options:e,infoFor3D:t,featureInfos:n,requestQuery:r,associatedLayer:s},l){const u=t.assetMapFieldRoles.parentGlobalId,c=t.assetMapFieldRoles.assetType,f=t.assetMapFieldRoles.flags,p=new Map;for(const[e,{globalId:t}]of n)t&&p.set(e,t);const d=(0,o.Am)(p.values()),g=(0,m.JZ)(t);if(!g||!d.length)return[];const w=(0,a.fj)(s.parsedUrl?.path??"",`../${g.id}`),M=!!e?.sourceOnly,b=new h.A({where:`${u} IN (${d.map(x).join(",")})`,outFields:M?[u,c,f]:[u,c],returnDistinctValues:!0,returnGeometry:!1}),{features:F}=await(0,y.s)(w,b,{query:r,signal:e?.signal}),A=new Set(l),v=new Map;for(const e of F){const t=e.getAttribute(u),n=e.getAttribute(c),r=e.getAttribute(f)??0;n&&A.has(n)&&t&&!(1&r)&&(0,i.tE)(v,t,()=>new Set).add(n)}const q=new Map;for(const[e,t]of p)for(const n of v.get(t)??[])(0,i.tE)(q,n,()=>[]).push(e);return l.map(e=>({formatId:e,objectIds:q.get(e)??[]})).filter(({objectIds:e})=>e.length>0)}(e,l)}(e),c=new Map,f=await Promise.all(u.map(async({formatId:o,objectIds:i})=>{const a=(0,m.be)(o,t.supportedFormats),l=n.parsedUrl;if(null==a||!l||!i.length)return null;const u=(0,m._h)(o,t.supportedFormats),c=(0,m.qv)(u),f=n.createQuery();return f.objectIds=i,f.outFields=[s],f.formatOf3DObjects=o,f.returnGeometry=!0,{modelFormat:a,modelFileExtensions:c,featureSetJSON:await(0,y.e)(l.path,f,{query:e.requestQuery,signal:r?.signal},{uniqueIdFields:n.uniqueIdFields})}}));for(const t of f)t&&w(e,t.modelFormat,t.modelFileExtensions,t.featureSetJSON,c);return c}(new A(e,t,function(e){const t=new Map;for(const n of e.features){const e=n.getObjectId(),r=n.getGlobalId();null!=e&&null!=r&&t.set(e,{globalId:r})}return t}(p),l,r))}async function g(e,t,n,r){const o=r?.format;return((await d(e,t,{objectIds:[n]},{...r,requestedFormat:o,sourceOnly:null==o})).get(n)??[]).find(e=>o&&e.format===o||!o&&e.isSource)}function w({featureInfos:e,requestQuery:t,infoFor3D:n},r,o,s,a){const l=new Map;for(const e of s.assetMaps??[])(0,i.tE)(l,e.parentGlobalId,()=>[]).push(e);for(const[s,u]of e){const e=l.get(u.globalId);if(!e?.length)continue;const c=M(e,t,n);if(!c.length)continue;const f=c.reduce((e,t)=>e+t.size,0),m=F(c,o),y=!m.flags.includes("DERIVED");(0,i.tE)(a,s,()=>[]).push(new p({name:m.name,size:f,format:r,isSource:y,files:c}))}}function M(e,t,n){const r=new Map,o=({assetType:e})=>null!=(0,m.be)(e,n.supportedFormats),s=e.some(e=>o(e)&&!e.flags.includes("DERIVED"));for(const t of e)s&&o(t)&&t.flags.includes("DERIVED")||(0,i.tE)(r,t.assetName,()=>[]).push(t);const a=[];for(const[e,n]of r){n.sort((e,t)=>e.seqNo-t.seqNo);const r=n.reduce((e,t)=>e+t.size,0),o=n.map(({assetURL:e})=>e).filter(e=>!!e);o.length&&a.push(new f({name:e,size:r,flags:n[0].flags,loadArrayBuffer:e=>b(o,t,e)}))}return a}async function b(e,t,n){const o=await Promise.all(e.map(e=>(0,r.A)(e,{responseType:"array-buffer",query:t,signal:n?.signal}).then(({data:e})=>e)));return 1===o.length?o[0]:function(e){const t=e.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(new Uint8Array(t),r),r+=t.byteLength;return n.buffer}(o)}function F(e,t){return e.find(({name:e})=>t.some(t=>e.toLowerCase().endsWith(`.${t}`)))??e[0]}function x(e){return`'${e.replaceAll("'","''")}'`}class A{constructor(e,t,n,r,o){this.layer=e,this.associatedLayer=t,this.featureInfos=n,this.infoFor3D=r,this.options=o,this.requestQuery={...t.parsedUrl?.query,...e.customParameters,...e.apiKey?{token:e.apiKey}:{}}}}},99199(e,t,n){n.d(t,{e:()=>l,s:()=>a});var r=n(2272),o=n(80893),s=n(22671),i=n(97552);async function a(e,t,n,r){const o=await l(e,t,n,r);return s.A.fromJSON(o)}function l(e,t,n,s){const a=(0,r.Dl)(e),l={...n},u=i.A.from(t);return(0,o.eW)(a,u,u.sourceSpatialReference,l,s)}},22671(e,t,n){n.d(t,{A:()=>w});var r,o=n(5482),s=n(52106),i=n(66552),a=n(25482),l=n(4718),u=n(91429),c=n(16930),f=n(60408),p=n(65864),m=n(50498),y=n(20437),h=n(36005),d=n(43937);const g=new i.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=r=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,n,r){if(e)return void g.write(e,t,n,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,p.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=c.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(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 n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,o]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((o-e)/n));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,o],scale:[s,i]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const u=this._getHydrationFunction(e,e=>e*s+r,e=>o-e*i,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,n){const r=c.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],i=n.fromJSON(s),a=s.geometry?.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=r);const l=s.aggregateGeometries,u=i.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}o.push(i)}return o}_quantizePoints(e,t,n){let r,o;const s=[];for(let i=0,a=e.length;i<a;i++){const a=e[i];if(i>0){const e=t(a[0]),i=n(a[1]);e===r&&i===o||(s.push([e-r,i-o]),r=e,o=i)}else r=t(a[0]),o=n(a[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],i=this._quantizePoints(s,t,n);i&&o.push(i)}return o.length>0?((0,f.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let i,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(i+=o[0],a+=o[1]):(i=o[0],a=o[1]),o[0]=t(i),o[1]=n(a)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=o(n[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(i+=r[0],a+=r[1]):(i=r[0],a=r[1]),r[0]=t(i),r[1]=n(a)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],w.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],w.prototype,"readFeatures",null),(0,o.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,o.Cg)([(0,d.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o.Cg)([(0,d.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=r=(0,o.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},2272(e,t,n){n.d(t,{Dl:()=>u,gf:()=>f,jV:()=>l,lF:()=>c});var r=n(92602),o=n(70333),s=n(4718),i=n(84952),a=n(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,i.An)(e):(0,s.o8)(e)}function c(e,t,n){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[o]=s.map(e=>c(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}async function f(e,t,s){const i=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??o.id?.findCredential(e)?.token:null}(e,t);if(i)return i;!o.id&&r.A.request.useIdentity&&await Promise.all([n.e(7632),n.e(5683),n.e(148)]).then(n.bind(n,50148));const l=await o.id.getCredential(e,s);return l?.token}}}]);