@arcgis/core 5.2.0-next.95 → 5.2.0-next.96

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 (530) hide show
  1. package/applications/WebEditor/geometryUtils.d.ts +1 -1
  2. package/arcade/arcadeAsyncRuntime.js +1 -1
  3. package/arcade/arcadeCompiler.js +1 -1
  4. package/arcade/arcadeRuntime.js +1 -1
  5. package/arcade/containerUtils.js +1 -1
  6. package/arcade/functions/track.js +1 -1
  7. package/arcgisGlobal.d.ts +2 -0
  8. package/assets/components/assets/icon/aiAgent16.json +1 -0
  9. package/assets/components/assets/icon/aiAgent24.json +1 -0
  10. package/assets/components/assets/icon/aiAgent32.json +1 -0
  11. package/assets/components/assets/icon/aiAgents16.json +1 -0
  12. package/assets/components/assets/icon/aiAgents24.json +1 -0
  13. package/assets/components/assets/icon/aiAgents32.json +1 -0
  14. package/assets/components/assets/icon/explodeGeometry16.json +1 -0
  15. package/assets/components/assets/icon/explodeGeometry24.json +1 -0
  16. package/assets/components/assets/icon/explodeGeometry32.json +1 -0
  17. package/assets/components/assets/icon/integration16.json +1 -0
  18. package/assets/components/assets/icon/integration24.json +1 -0
  19. package/assets/components/assets/icon/integration32.json +1 -0
  20. package/assets/components/assets/icon/spatiotemporalCatalog16.json +1 -0
  21. package/assets/components/assets/icon/spatiotemporalCatalog24.json +1 -0
  22. package/assets/components/assets/icon/spatiotemporalCatalog32.json +1 -0
  23. package/assets/components/assets/input-time-zone/t9n/messages.de.json +1 -1
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/000f91a18c22377f8525.js +1 -0
  26. package/assets/esri/core/workers/chunks/{05662a663f761dd3dea5.js → 006146ad6d4a5cbf1a1f.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{bd1a7e95a797e1ed4a7b.js → 013c17e07756fa465845.js} +1 -1
  28. package/assets/esri/core/workers/chunks/014eaccf2c2d357981f0.js +1 -0
  29. package/assets/esri/core/workers/chunks/{f253875feb11883deb84.js → 04d4cd66485b622403d0.js} +1 -1
  30. package/assets/esri/core/workers/chunks/05eb064f9b543890ae24.js +1 -0
  31. package/assets/esri/core/workers/chunks/05fbd1f373cfa3724f0c.js +1 -0
  32. package/assets/esri/core/workers/chunks/{26737d061c7cfbbab95c.js → 0809a55a2f9be07cc5a9.js} +1 -1
  33. package/assets/esri/core/workers/chunks/0930738f43ce09b2ed2d.js +1 -0
  34. package/assets/esri/core/workers/chunks/{691434d4c6a38e63d819.js → 0a242e76bc293b0ad04b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/0a4092578dc7578bcf76.js +1 -0
  36. package/assets/esri/core/workers/chunks/0e11bee9b56a7f51b012.js +1 -0
  37. package/assets/esri/core/workers/chunks/0e65869a5dd5a3917da7.js +1 -0
  38. package/assets/esri/core/workers/chunks/0ffb5a1275d07dcd9115.js +1 -0
  39. package/assets/esri/core/workers/chunks/{e370a3337b3c90240e73.js → 105da965fc90604eb6bf.js} +1 -1
  40. package/assets/esri/core/workers/chunks/1082bb0858585bd4fa21.js +2 -0
  41. package/assets/esri/core/workers/chunks/{5235b9c21ac4156c2375.js → 10f4c5533f50c3693318.js} +1 -1
  42. package/assets/esri/core/workers/chunks/1201bb22a2bfd7d7ecba.js +1 -0
  43. package/assets/esri/core/workers/chunks/16f55c5d642a23c2547e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{09e01fd1c199be0c8e03.js → 16ffbe484f6cd4736f79.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{1bf967c68d0c795d3fb4.js → 19a4907fc93ae8b817e9.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{f74c7cbe4bd12f73ae90.js → 19d7339f20f3008c4893.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{a8aa8cb60b30f0983e7e.js → 1a9f17781e0a3bc5106f.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{bf7875fda48b15271a10.js → 1bef7097fe5e402539ea.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{fa377112ef3b78f6ed18.js → 1de1cc0ed0f169a58aff.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{0549e2badf511e27aa54.js → 1e3b07cf0e608431a277.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{2e51764c8aa31096cb2a.js → 20feca2fdd304b3e9664.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{4c73c2f4331351e2a50c.js → 22ff018342860249b3eb.js} +1 -1
  53. package/assets/esri/core/workers/chunks/248df6fda489a9de5852.js +1 -0
  54. package/assets/esri/core/workers/chunks/279b16727d4b515eca44.js +1 -0
  55. package/assets/esri/core/workers/chunks/2b10d6597af3eeec5396.js +1 -0
  56. package/assets/esri/core/workers/chunks/2bd4b536e329112591c4.js +1 -0
  57. package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +1 -0
  58. package/assets/esri/core/workers/chunks/2e2349387a2b9903f13c.js +2 -0
  59. package/assets/esri/core/workers/chunks/{4d700cb028f6306b163e.js → 32aa1529e84b839d051d.js} +1 -1
  60. package/assets/esri/core/workers/chunks/33041e50ea02d99480b0.js +1 -0
  61. package/assets/esri/core/workers/chunks/{5d7a5aa608ed6192b016.js → 349982635e921e838030.js} +1 -1
  62. package/assets/esri/core/workers/chunks/35d0a7597473d46866de.js +1 -0
  63. package/assets/esri/core/workers/chunks/374d726fdd0a9848cea5.js +1 -0
  64. package/assets/esri/core/workers/chunks/379f5ca5372d834af497.js +1 -0
  65. package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +1 -0
  66. package/assets/esri/core/workers/chunks/{05393b23ab24126d4236.js → 38bc5d09ae07f486d457.js} +1 -1
  67. package/assets/esri/core/workers/chunks/3bafa01ca01a67d09432.js +1 -0
  68. package/assets/esri/core/workers/chunks/3c7901ea007c9615ba54.js +1 -0
  69. package/assets/esri/core/workers/chunks/4047208f9559e06d7102.js +1 -0
  70. package/assets/esri/core/workers/chunks/4049e9b86c8e27a7ff12.js +1 -0
  71. package/assets/esri/core/workers/chunks/411bbdecba340df11d95.js +2 -0
  72. package/assets/esri/core/workers/chunks/42b5533f94ebcdc4befe.js +1 -0
  73. package/assets/esri/core/workers/chunks/44ca13c874b5aa0ed5a0.js +1 -0
  74. package/assets/esri/core/workers/chunks/4717831effb1ac6d5f5d.js +1 -0
  75. package/assets/esri/core/workers/chunks/{5edf77618ca51819d7c4.js → 476535cfb06ced74d611.js} +2 -2
  76. package/assets/esri/core/workers/chunks/486f1277fe834c0fc4c1.js +1 -0
  77. package/assets/esri/core/workers/chunks/48ade66f1685a1aaffba.js +1 -0
  78. package/assets/esri/core/workers/chunks/4d13c1a04788e5222678.js +1 -0
  79. package/assets/esri/core/workers/chunks/{cc3186dcbbf5edff8b9e.js → 4d7f6c92041d52cc8732.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{595edbc1e9bba47d5676.js → 4f89da01b67b66a92c01.js} +1 -1
  81. package/assets/esri/core/workers/chunks/507bbcde2b39321b50a4.js +1 -0
  82. package/assets/esri/core/workers/chunks/{9b8e33985310f281f084.js → 56a5b65961e722f5cae9.js} +1 -1
  83. package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +1 -0
  84. package/assets/esri/core/workers/chunks/{b102ae764c14d8b32ace.js → 58a52adc42fbe5cd12c6.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{b0e25ccb5a1e57a82628.js → 58b93f13316196d2e97d.js} +1 -1
  86. package/assets/esri/core/workers/chunks/58f98bd89b644cfdafae.js +1 -0
  87. package/assets/esri/core/workers/chunks/5a8658e4ef5163e8ab3b.js +1 -0
  88. package/assets/esri/core/workers/chunks/5aa3e1e9c701c7fef6e4.js +1 -0
  89. package/assets/esri/core/workers/chunks/5bb8d9d887dd4211afd2.js +1 -0
  90. package/assets/esri/core/workers/chunks/5d7625eb9997cd0dff09.js +1 -0
  91. package/assets/esri/core/workers/chunks/5e56a004b4407b8066eb.js +1 -0
  92. package/assets/esri/core/workers/chunks/5efc66be4576c6f67064.js +1 -0
  93. package/assets/esri/core/workers/chunks/60b1af54e7fc20fd9588.js +1 -0
  94. package/assets/esri/core/workers/chunks/6134a2c6983792787184.js +1 -0
  95. package/assets/esri/core/workers/chunks/6319413b89e23f671487.js +1 -0
  96. package/assets/esri/core/workers/chunks/{1b311ff39dede07865df.js → 633454b27c34f9ec7940.js} +1 -1
  97. package/assets/esri/core/workers/chunks/63c43ebf46964c283b4d.js +1 -0
  98. package/assets/esri/core/workers/chunks/65d3638ded62c5606ae3.js +1 -0
  99. package/assets/esri/core/workers/chunks/{aa0ef4493a7e9bed159f.js → 662f4b39ec44c68e0733.js} +1 -1
  100. package/assets/esri/core/workers/chunks/680bef5e8237cc3bdd84.js +1 -0
  101. package/assets/esri/core/workers/chunks/6835f959952f70972fce.js +1 -0
  102. package/assets/esri/core/workers/chunks/{ddf284648a73b6993737.js → 68d823697c298122ee08.js} +1 -1
  103. package/assets/esri/core/workers/chunks/6aaefd61505027267c9b.js +1 -0
  104. package/assets/esri/core/workers/chunks/6ceb17eada151230abf7.js +1 -0
  105. package/assets/esri/core/workers/chunks/6df29716f75696434807.js +1 -0
  106. package/assets/esri/core/workers/chunks/6e804bd6bb4b0ee44fa9.js +1 -0
  107. package/assets/esri/core/workers/chunks/{ee77999df3785468b2b6.js → 6f6e8b7e6e2c856e4ed1.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{8ea28a4b1afe8bb2d313.js → 7091bbdc36f1f03f14b3.js} +1 -1
  109. package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +1 -0
  110. package/assets/esri/core/workers/chunks/{4b6f433022a6822706cb.js → 762817d30474c15142b4.js} +1 -1
  111. package/assets/esri/core/workers/chunks/762e9a15b2638475a2b4.js +1 -0
  112. package/assets/esri/core/workers/chunks/79088d5c9c2e6a780929.js +1 -0
  113. package/assets/esri/core/workers/chunks/{f3d57c5b9dffd12e45b4.js → 7c3a89c12ea32a071ad4.js} +1 -1
  114. package/assets/esri/core/workers/chunks/7c67596c0792282afdfc.js +1 -0
  115. package/assets/esri/core/workers/chunks/7cef6e5f39137e74bbc3.js +1 -0
  116. package/assets/esri/core/workers/chunks/{87e0ceb1a64ab08e679a.js → 7fd54fa2f91cdab44ab3.js} +1 -1
  117. package/assets/esri/core/workers/chunks/822a5020afbca21df7f7.js +1 -0
  118. package/assets/esri/core/workers/chunks/8599d2f2eb0fbb4a8bf5.js +1 -0
  119. package/assets/esri/core/workers/chunks/862f7090ba4a56c07093.js +1 -0
  120. package/assets/esri/core/workers/chunks/{97c7dfd29ad4c2966cb4.js → 88252899a5291ad29710.js} +1 -1
  121. package/assets/esri/core/workers/chunks/8837fbcc0d484659b79c.js +1 -0
  122. package/assets/esri/core/workers/chunks/8dcc7749de3391710864.js +1 -0
  123. package/assets/esri/core/workers/chunks/900dad076347443b3ad9.js +1 -0
  124. package/assets/esri/core/workers/chunks/{f8f7b86bbd62106bc3d4.js → 925f83be3c1eb4b5c6af.js} +1 -1
  125. package/assets/esri/core/workers/chunks/{a4a22149077c7780481c.js → 9378ce457b02717304e6.js} +1 -1
  126. package/assets/esri/core/workers/chunks/93a7cf23f73b23fc7802.js +1 -0
  127. package/assets/esri/core/workers/chunks/93c1d1e7c0935242071e.js +1 -0
  128. package/assets/esri/core/workers/chunks/{fddcb8be714ad18ad0c8.js → 970b33947bf61fccd461.js} +1 -1
  129. package/assets/esri/core/workers/chunks/97aaff86e06380a68df8.js +1 -0
  130. package/assets/esri/core/workers/chunks/9bc7df2b8ae0ed443d13.js +1 -0
  131. package/assets/esri/core/workers/chunks/9cc14a41d4a90f6d626e.js +1 -0
  132. package/assets/esri/core/workers/chunks/9e514a58b1165e273202.js +1 -0
  133. package/assets/esri/core/workers/chunks/9fe1db0762ab3326eab4.js +1 -0
  134. package/assets/esri/core/workers/chunks/{a5bb19d2b7d7db22222b.js → a10188c4d1904965898a.js} +1 -1
  135. package/assets/esri/core/workers/chunks/a2288d44cba34d947613.js +1 -0
  136. package/assets/esri/core/workers/chunks/a26916de4c105859621e.js +1 -0
  137. package/assets/esri/core/workers/chunks/a322afbb48898ce35851.js +1 -0
  138. package/assets/esri/core/workers/chunks/a34cadd486e7fcc79063.js +1 -0
  139. package/assets/esri/core/workers/chunks/{cefb70d633c220cbedf9.js → a4dc1a80ed6604d71722.js} +1 -1
  140. package/assets/esri/core/workers/chunks/{6baae3e856d904fef9b1.js → a8f70cece5ce2b095cdd.js} +1 -1
  141. package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +1 -0
  142. package/assets/esri/core/workers/chunks/{777f2fdf1f4b9f243893.js → ab3a6ce7bc2a27b92469.js} +1 -1
  143. package/assets/esri/core/workers/chunks/abd2f8fae6b918fbdd6d.js +1 -0
  144. package/assets/esri/core/workers/chunks/{b13d2da33ec07e9d41ff.js → b0da2b089a89d643df1e.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{65f4ca7201e7267bfc81.js → b5fcf4165ac72654742d.js} +1 -1
  146. package/assets/esri/core/workers/chunks/b82b523b6837ed1f28d3.js +2 -0
  147. package/assets/esri/core/workers/chunks/{527b87fddf33bb5d519e.js → ba77a8892cb23c7a297d.js} +1 -1
  148. package/assets/esri/core/workers/chunks/bb8089929ded0613d8e7.js +1 -0
  149. package/assets/esri/core/workers/chunks/bc7ca87d3bfe8a4aec81.js +1 -0
  150. package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +1 -0
  151. package/assets/esri/core/workers/chunks/{2d07d5a9ec67c39ef10c.js → bd4f29d2681e5596591a.js} +1 -1
  152. package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +1 -0
  153. package/assets/esri/core/workers/chunks/{903c7bd079888f65fef1.js → c3fbd81bb5820e48038f.js} +1 -1
  154. package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +1 -0
  155. package/assets/esri/core/workers/chunks/ca8061e0a6d78d646ebf.js +1 -0
  156. package/assets/esri/core/workers/chunks/cc73ac8404615dc392d2.js +1 -0
  157. package/assets/esri/core/workers/chunks/{e823c9ccb7bc348d8824.js → ccb26860518dce6d01c0.js} +1 -1
  158. package/assets/esri/core/workers/chunks/cded34b161fcc790e672.js +1 -0
  159. package/assets/esri/core/workers/chunks/{1bf5c0a4bc5a960a3fa2.js → d1d4979e9dcabe5e4619.js} +1 -1
  160. package/assets/esri/core/workers/chunks/d2865c604849ce79183f.js +1 -0
  161. package/assets/esri/core/workers/chunks/{9b81bd62a2c72f592db1.js → d826f6d32b4c5885276a.js} +1 -1
  162. package/assets/esri/core/workers/chunks/d92540d3ffc4af980dd8.js +1 -0
  163. package/assets/esri/core/workers/chunks/dc7853795439ae77ace9.js +1 -0
  164. package/assets/esri/core/workers/chunks/{1f047dd747e7c1916dc7.js → dd55737fba0a8fe68101.js} +3 -3
  165. package/assets/esri/core/workers/chunks/dd8d19eb6b8e955c8067.js +1 -0
  166. package/assets/esri/core/workers/chunks/dda269a088275c823b40.js +1 -0
  167. package/assets/esri/core/workers/chunks/{7b70d6fdfa7a19ffffb0.js → de95dee8db92cf8f796f.js} +1 -1
  168. package/assets/esri/core/workers/chunks/e1c8767143f9f9d1f049.js +1 -0
  169. package/assets/esri/core/workers/chunks/{2cf2f2842c19be84ab4d.js → e6cb31c727f799c1297c.js} +1 -1
  170. package/assets/esri/core/workers/chunks/e934ef66d130c212c05b.js +1 -0
  171. package/assets/esri/core/workers/chunks/{7c56446184abcd14678b.js → ea77654c8964cc39b9a6.js} +1 -1
  172. package/assets/esri/core/workers/chunks/eb167f9f6132a6348d2e.js +1 -0
  173. package/assets/esri/core/workers/chunks/ed5ac1efd3cba49be756.js +1 -0
  174. package/assets/esri/core/workers/chunks/ef24fd6c0322e5de9fdf.js +2 -0
  175. package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +1 -0
  176. package/assets/esri/core/workers/chunks/fbf2d90240d36f8b423f.js +1 -0
  177. package/assets/esri/core/workers/chunks/{4ee99e654dad6f09abee.js → fc042b9936686785c39e.js} +1 -1
  178. package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +1 -0
  179. package/assets/esri/core/workers/chunks/{af6b9fd77b1792fbb66e.js → fd4d124c5bf810d9e352.js} +1 -1
  180. package/assets/esri/core/workers/chunks/ffa35ecc681ec1c4739a.js +1 -0
  181. package/assets/esri/core/workers/chunks/ffca0b2333e760b66d3a.js +1 -0
  182. package/config.js +1 -1
  183. package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
  184. package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
  185. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  186. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  187. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  188. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +1 -1
  189. package/geometry/Polygon.js +1 -1
  190. package/geometry/geometryEngine.d.ts +36 -36
  191. package/geometry/operators/affineTransformOperator.d.ts +30 -1
  192. package/geometry/operators/affineTransformOperator.js +1 -1
  193. package/geometry/operators/alphaShapeOperator.d.ts +49 -5
  194. package/geometry/operators/alphaShapeOperator.js +1 -1
  195. package/geometry/operators/areaOperator.d.ts +28 -4
  196. package/geometry/operators/areaOperator.js +1 -1
  197. package/geometry/operators/autoCompleteOperator.d.ts +25 -2
  198. package/geometry/operators/autoCompleteOperator.js +1 -1
  199. package/geometry/operators/boundaryOperator.d.ts +40 -2
  200. package/geometry/operators/boundaryOperator.js +1 -1
  201. package/geometry/operators/bufferOperator.d.ts +51 -6
  202. package/geometry/operators/bufferOperator.js +1 -1
  203. package/geometry/operators/centroidOperator.d.ts +23 -2
  204. package/geometry/operators/centroidOperator.js +1 -1
  205. package/geometry/operators/clipOperator.d.ts +34 -2
  206. package/geometry/operators/clipOperator.js +1 -1
  207. package/geometry/operators/containsOperator.d.ts +32 -2
  208. package/geometry/operators/containsOperator.js +1 -1
  209. package/geometry/operators/convexHullOperator.d.ts +47 -4
  210. package/geometry/operators/convexHullOperator.js +1 -1
  211. package/geometry/operators/crossesOperator.d.ts +35 -2
  212. package/geometry/operators/crossesOperator.js +1 -1
  213. package/geometry/operators/cutOperator.d.ts +23 -2
  214. package/geometry/operators/cutOperator.js +1 -1
  215. package/geometry/operators/densifyOperator.d.ts +61 -6
  216. package/geometry/operators/densifyOperator.js +1 -1
  217. package/geometry/operators/differenceOperator.d.ts +34 -2
  218. package/geometry/operators/differenceOperator.js +1 -1
  219. package/geometry/operators/disjointOperator.d.ts +33 -2
  220. package/geometry/operators/disjointOperator.js +1 -1
  221. package/geometry/operators/distanceOperator.d.ts +29 -4
  222. package/geometry/operators/distanceOperator.js +1 -1
  223. package/geometry/operators/equalsOperator.d.ts +32 -2
  224. package/geometry/operators/equalsOperator.js +1 -1
  225. package/geometry/operators/extendOperator.d.ts +29 -3
  226. package/geometry/operators/extendOperator.js +1 -1
  227. package/geometry/operators/generalizeOperator.d.ts +46 -5
  228. package/geometry/operators/generalizeOperator.js +1 -1
  229. package/geometry/operators/geodesicBufferOperator.d.ts +71 -7
  230. package/geometry/operators/geodesicBufferOperator.js +1 -1
  231. package/geometry/operators/geodesicProximityOperator.d.ts +106 -14
  232. package/geometry/operators/geodesicProximityOperator.js +1 -1
  233. package/geometry/operators/geodeticAreaOperator.d.ts +51 -5
  234. package/geometry/operators/geodeticAreaOperator.js +1 -1
  235. package/geometry/operators/geodeticDensifyOperator.d.ts +65 -6
  236. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  237. package/geometry/operators/geodeticDistanceOperator.d.ts +52 -5
  238. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  239. package/geometry/operators/geodeticLengthOperator.d.ts +51 -5
  240. package/geometry/operators/geodeticLengthOperator.js +1 -1
  241. package/geometry/operators/geodeticUtilsOperator.d.ts +79 -9
  242. package/geometry/operators/geodeticUtilsOperator.js +1 -1
  243. package/geometry/operators/graphicBufferOperator.d.ts +47 -4
  244. package/geometry/operators/graphicBufferOperator.js +1 -1
  245. package/geometry/operators/integrateOperator.d.ts +24 -2
  246. package/geometry/operators/integrateOperator.js +1 -1
  247. package/geometry/operators/intersectionOperator.d.ts +88 -3
  248. package/geometry/operators/intersectionOperator.js +1 -1
  249. package/geometry/operators/intersectsOperator.d.ts +32 -2
  250. package/geometry/operators/intersectsOperator.js +1 -1
  251. package/geometry/operators/isNearOperator.d.ts +31 -4
  252. package/geometry/operators/isNearOperator.js +1 -1
  253. package/geometry/operators/json/bufferOperator.js +1 -1
  254. package/geometry/operators/json/containsOperator.js +1 -1
  255. package/geometry/operators/json/convexHullOperator.js +1 -1
  256. package/geometry/operators/json/crossesOperator.js +1 -1
  257. package/geometry/operators/json/disjointOperator.js +1 -1
  258. package/geometry/operators/json/generalizeOperator.js +1 -1
  259. package/geometry/operators/json/geodesicBufferOperator.js +1 -1
  260. package/geometry/operators/json/graphicBufferOperator.js +1 -1
  261. package/geometry/operators/json/intersectionOperator.js +1 -1
  262. package/geometry/operators/json/intersectsOperator.js +1 -1
  263. package/geometry/operators/json/lengthOperator.js +1 -1
  264. package/geometry/operators/json/offsetOperator.js +1 -1
  265. package/geometry/operators/json/overlapsOperator.js +1 -1
  266. package/geometry/operators/json/projectOperator.js +1 -1
  267. package/geometry/operators/json/simplifyOperator.js +1 -1
  268. package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
  269. package/geometry/operators/json/touchesOperator.js +1 -1
  270. package/geometry/operators/json/unionOperator.js +1 -1
  271. package/geometry/operators/json/withinOperator.js +1 -1
  272. package/geometry/operators/labelPointOperator.d.ts +32 -2
  273. package/geometry/operators/labelPointOperator.js +1 -1
  274. package/geometry/operators/lengthOperator.d.ts +28 -4
  275. package/geometry/operators/lengthOperator.js +1 -1
  276. package/geometry/operators/linesToPolygonsOperator.d.ts +23 -2
  277. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  278. package/geometry/operators/locateBetweenOperator.d.ts +28 -2
  279. package/geometry/operators/locateBetweenOperator.js +1 -1
  280. package/geometry/operators/minimumBoundingCircleOperator.d.ts +38 -4
  281. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  282. package/geometry/operators/multiPartToSinglePartOperator.d.ts +33 -4
  283. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  284. package/geometry/operators/offsetOperator.d.ts +50 -5
  285. package/geometry/operators/offsetOperator.js +1 -1
  286. package/geometry/operators/overlapsOperator.d.ts +33 -2
  287. package/geometry/operators/overlapsOperator.js +1 -1
  288. package/geometry/operators/polygonOverlayOperator.d.ts +31 -5
  289. package/geometry/operators/polygonOverlayOperator.js +1 -1
  290. package/geometry/operators/polygonSlicerOperator.d.ts +72 -10
  291. package/geometry/operators/polygonSlicerOperator.js +1 -1
  292. package/geometry/operators/projectOperator.d.ts +63 -3
  293. package/geometry/operators/projectOperator.js +1 -1
  294. package/geometry/operators/proximityOperator.d.ts +71 -9
  295. package/geometry/operators/proximityOperator.js +1 -1
  296. package/geometry/operators/relateOperator.d.ts +41 -2
  297. package/geometry/operators/relateOperator.js +1 -1
  298. package/geometry/operators/reshapeOperator.d.ts +28 -2
  299. package/geometry/operators/reshapeOperator.js +1 -1
  300. package/geometry/operators/shapePreservingProjectOperator.d.ts +64 -6
  301. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  302. package/geometry/operators/simplifyOGCOperator.d.ts +72 -6
  303. package/geometry/operators/simplifyOGCOperator.js +1 -1
  304. package/geometry/operators/simplifyOperator.d.ts +72 -4
  305. package/geometry/operators/simplifyOperator.js +1 -1
  306. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  307. package/geometry/operators/support/Transformation.d.ts +17 -11
  308. package/geometry/operators/support/jsonConverter.js +1 -1
  309. package/geometry/operators/symmetricDifferenceOperator.d.ts +33 -2
  310. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  311. package/geometry/operators/touchesOperator.d.ts +32 -2
  312. package/geometry/operators/touchesOperator.js +1 -1
  313. package/geometry/operators/types.d.ts +4 -1
  314. package/geometry/operators/unionOperator.d.ts +33 -2
  315. package/geometry/operators/unionOperator.js +1 -1
  316. package/geometry/operators/withinOperator.d.ts +32 -2
  317. package/geometry/operators/withinOperator.js +1 -1
  318. package/geometry/projectionUtils.js +1 -1
  319. package/geometry/support/geometryUtils.js +1 -1
  320. package/geometry/support/normalizeUtils.d.ts +5 -3
  321. package/geometry/support/normalizeUtils.js +1 -1
  322. package/interfaces.d.ts +202 -202
  323. package/kernel.js +1 -1
  324. package/layers/graphics/data/QueryEngineResult.js +1 -1
  325. package/layers/graphics/data/queryUtils.js +1 -1
  326. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  327. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  328. package/layers/mixins/ArcGISImageService.js +1 -1
  329. package/layers/mixins/TiledImagery.js +1 -1
  330. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  331. package/layers/raster/datasets/FunctionRaster.js +1 -1
  332. package/layers/raster/datasets/pixelReader.js +1 -1
  333. package/layers/raster/functions/clipUtils.js +1 -1
  334. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  335. package/layers/support/Sublayer.js +1 -1
  336. package/layers/video/videoUtils.js +1 -1
  337. package/package.json +4 -4
  338. package/popup/FeatureContentCollection.d.ts +3 -3
  339. package/popup/FeatureContentCollection.js +1 -1
  340. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  341. package/support/revision.js +1 -1
  342. package/support/tests/serviceMockDependencies.js +1 -1
  343. package/support/tests/setupServiceMocksMesh.js +1 -1
  344. package/symbols/cim/CIMEffects.js +1 -1
  345. package/symbols/cim/effects/EffectBuffer.js +1 -1
  346. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  347. package/symbols/cim/effects/EffectDonut.js +1 -1
  348. package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
  349. package/symbols/cim/effects/EffectOffset.js +1 -1
  350. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  351. package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +1 -1
  352. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementController.js +1 -1
  353. package/views/2d/engine/webgl/Overlay.js +1 -1
  354. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  355. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  356. package/views/2d/layers/TileLayerView2D.js +1 -1
  357. package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
  358. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  359. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +1 -1
  360. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  361. package/views/3d/layers/ElevationLayerView3DModifications.js +1 -1
  362. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  363. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  364. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  365. package/views/MapView.d.ts +3 -3
  366. package/views/VideoView.js +1 -1
  367. package/views/View2D.d.ts +22 -22
  368. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  369. package/views/draw/DrawTool.js +1 -1
  370. package/views/draw/support/createUtils.js +1 -1
  371. package/views/layers/SceneLayerView.js +1 -1
  372. package/views/support/GeometryWorker.js +1 -1
  373. package/views/support/imageReprojection.js +1 -1
  374. package/views/video/VideoOperationalDataView.js +1 -1
  375. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  376. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  377. package/widgets/BatchAttributeForm/expressions/expressionUtils.js +1 -1
  378. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  379. package/widgets/BatchAttributeForm/templates/FieldElementTemplate.js +1 -1
  380. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  381. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  382. package/widgets/Editor/support/mergeFeaturesUtils.js +1 -1
  383. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  384. package/widgets/ElevationProfile/support/ElevationProfileView.js +1 -1
  385. package/widgets/ElevationProfile/support/InputRepresentation2D.js +1 -1
  386. package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
  387. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  388. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  389. package/widgets/Features/FeaturesViewModel.js +1 -1
  390. package/widgets/Features.js +1 -1
  391. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  392. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  393. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  394. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  395. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  396. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  397. package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
  398. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  399. package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
  400. package/widgets/Print.js +1 -1
  401. package/widgets/Search/SearchViewModel.js +1 -1
  402. package/widgets/Search/support/layerSearchUtils.js +1 -1
  403. package/widgets/Search/support/locatorUtils.js +1 -1
  404. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  405. package/widgets/support/FilterBuilder/FilterBuilderViewModel.d.ts +104 -0
  406. package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
  407. package/widgets/support/FilterBuilder.js +1 -1
  408. package/widgets/support/FilterCondition/FilterConditionViewModel.d.ts +145 -0
  409. package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
  410. package/widgets/support/FilterCondition/types.d.ts +20 -0
  411. package/widgets/support/ItemList.js +1 -1
  412. package/widgets/support/SelectionList/FeatureItem.d.ts +17 -68
  413. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  414. package/widgets/support/SelectionList/GroupLayerItem.d.ts +12 -50
  415. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  416. package/widgets/support/SelectionList/ItemBase.d.ts +14 -44
  417. package/widgets/support/SelectionList/ItemBase.js +1 -1
  418. package/widgets/support/SelectionList/LayerItem.d.ts +10 -56
  419. package/widgets/support/SelectionList/LayerItem.js +1 -1
  420. package/widgets/support/SelectionList/types.d.ts +4 -4
  421. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  422. package/assets/esri/core/workers/chunks/090ea7a131f8f60203ed.js +0 -1
  423. package/assets/esri/core/workers/chunks/0b4a7209b99227a842ad.js +0 -1
  424. package/assets/esri/core/workers/chunks/0be98adfef79fc5036f0.js +0 -1
  425. package/assets/esri/core/workers/chunks/0d2e2d90a4e4a28e2c0c.js +0 -1
  426. package/assets/esri/core/workers/chunks/0d7763d39a5a8586a0ae.js +0 -1
  427. package/assets/esri/core/workers/chunks/0d95f72e1c07ab867d21.js +0 -1
  428. package/assets/esri/core/workers/chunks/0dbbac7a2378728571a7.js +0 -1
  429. package/assets/esri/core/workers/chunks/0df9864ecebe6a2b973f.js +0 -1
  430. package/assets/esri/core/workers/chunks/104d74bc36c28c519396.js +0 -1
  431. package/assets/esri/core/workers/chunks/1670e9867efde4d7a6d6.js +0 -1
  432. package/assets/esri/core/workers/chunks/1c803eef9a8fdabc61e3.js +0 -2
  433. package/assets/esri/core/workers/chunks/1e192ac0533a5c0b5a7a.js +0 -1
  434. package/assets/esri/core/workers/chunks/1fe077f57a087c0e9119.js +0 -1
  435. package/assets/esri/core/workers/chunks/20f7b5fe64a217cb3d3d.js +0 -1
  436. package/assets/esri/core/workers/chunks/212222b64039d436b9a6.js +0 -1
  437. package/assets/esri/core/workers/chunks/24944b625ed8dcd904f0.js +0 -1
  438. package/assets/esri/core/workers/chunks/2b6d261fe79fe186fb22.js +0 -1
  439. package/assets/esri/core/workers/chunks/2bc3e7f394386fa75447.js +0 -1
  440. package/assets/esri/core/workers/chunks/30af0f7c4cfa541c9efd.js +0 -1
  441. package/assets/esri/core/workers/chunks/30d816bdeea00f6fa1ca.js +0 -1
  442. package/assets/esri/core/workers/chunks/35d46c2f658a8e92d913.js +0 -1
  443. package/assets/esri/core/workers/chunks/36e35a8067b18f59cc05.js +0 -1
  444. package/assets/esri/core/workers/chunks/3869dca884d7ca6488f5.js +0 -1
  445. package/assets/esri/core/workers/chunks/3f5234120d3a14186c1c.js +0 -1
  446. package/assets/esri/core/workers/chunks/45c1c90ac6c14657f3ff.js +0 -1
  447. package/assets/esri/core/workers/chunks/4a40b894ec89b0a4f9bf.js +0 -1
  448. package/assets/esri/core/workers/chunks/5165d367328ac7badf47.js +0 -1
  449. package/assets/esri/core/workers/chunks/5168bd8ab6233dc9c32a.js +0 -1
  450. package/assets/esri/core/workers/chunks/545bec045167c433af8f.js +0 -1
  451. package/assets/esri/core/workers/chunks/5782c0362a1799ceef41.js +0 -1
  452. package/assets/esri/core/workers/chunks/59598023c0aea62a6297.js +0 -1
  453. package/assets/esri/core/workers/chunks/59f0a2bd40b033ce77e4.js +0 -1
  454. package/assets/esri/core/workers/chunks/5af16937904c06fb06f6.js +0 -1
  455. package/assets/esri/core/workers/chunks/5b8591486f33627f5389.js +0 -1
  456. package/assets/esri/core/workers/chunks/6057a79c68c33ee4a193.js +0 -1
  457. package/assets/esri/core/workers/chunks/607acd9f615f87e14075.js +0 -1
  458. package/assets/esri/core/workers/chunks/62ee6c247f783acabb74.js +0 -1
  459. package/assets/esri/core/workers/chunks/63127e3b22e7eac6003d.js +0 -2
  460. package/assets/esri/core/workers/chunks/6564f17c4700dc8d9c0e.js +0 -2
  461. package/assets/esri/core/workers/chunks/678585509706755c0434.js +0 -2
  462. package/assets/esri/core/workers/chunks/691e9cc541cfaebe1776.js +0 -1
  463. package/assets/esri/core/workers/chunks/6a2d890640b2cd6c5ccb.js +0 -1
  464. package/assets/esri/core/workers/chunks/6b84982dfaf084a61b93.js +0 -1
  465. package/assets/esri/core/workers/chunks/6cbc30b31f0bb39c73ca.js +0 -1
  466. package/assets/esri/core/workers/chunks/6f01bd01b13662eb3bd7.js +0 -1
  467. package/assets/esri/core/workers/chunks/74cd9df85c4560bb8e52.js +0 -1
  468. package/assets/esri/core/workers/chunks/75bddfe2be64379db8fd.js +0 -1
  469. package/assets/esri/core/workers/chunks/7cf903db44f3647c8fd4.js +0 -1
  470. package/assets/esri/core/workers/chunks/7ddb5800777fbecee3a8.js +0 -1
  471. package/assets/esri/core/workers/chunks/7eae9053065d3d38e54e.js +0 -1
  472. package/assets/esri/core/workers/chunks/80f38ab2b7ae61e6f301.js +0 -1
  473. package/assets/esri/core/workers/chunks/854f42f16fdb40000aae.js +0 -1
  474. package/assets/esri/core/workers/chunks/87094044458b0ea5cb0f.js +0 -2
  475. package/assets/esri/core/workers/chunks/88f03352a4dc6184ea1f.js +0 -1
  476. package/assets/esri/core/workers/chunks/909ee7d2a0eec773037a.js +0 -1
  477. package/assets/esri/core/workers/chunks/91ac9328afff8a51bd96.js +0 -1
  478. package/assets/esri/core/workers/chunks/9246e2468528650bdc7c.js +0 -1
  479. package/assets/esri/core/workers/chunks/92a6559a6999b26362d7.js +0 -1
  480. package/assets/esri/core/workers/chunks/94ddfe165ac25aef8229.js +0 -1
  481. package/assets/esri/core/workers/chunks/9509bef285929c52c244.js +0 -1
  482. package/assets/esri/core/workers/chunks/99966339b061eb9945b8.js +0 -1
  483. package/assets/esri/core/workers/chunks/99f627938dbf0152fc02.js +0 -1
  484. package/assets/esri/core/workers/chunks/9df38cadebf8e6fd746c.js +0 -1
  485. package/assets/esri/core/workers/chunks/9e2b3754a76e0dd4a94a.js +0 -1
  486. package/assets/esri/core/workers/chunks/a0565137027c83108953.js +0 -1
  487. package/assets/esri/core/workers/chunks/a0eb882a5a81d25b9153.js +0 -1
  488. package/assets/esri/core/workers/chunks/a785e827f0215a73103d.js +0 -1
  489. package/assets/esri/core/workers/chunks/abe7670db06b27c0c8c8.js +0 -1
  490. package/assets/esri/core/workers/chunks/b19cff0e43fab2632660.js +0 -1
  491. package/assets/esri/core/workers/chunks/b333de4dea14c5db0a4d.js +0 -1
  492. package/assets/esri/core/workers/chunks/b6af90be328ebda26b8d.js +0 -1
  493. package/assets/esri/core/workers/chunks/b7c0da9d255d5e48320d.js +0 -1
  494. package/assets/esri/core/workers/chunks/bd7d87d175ba933ab2ce.js +0 -1
  495. package/assets/esri/core/workers/chunks/be0417df35a7d99af675.js +0 -1
  496. package/assets/esri/core/workers/chunks/c30b6bbabd05e4976fba.js +0 -1
  497. package/assets/esri/core/workers/chunks/c35553d07ad169910742.js +0 -1
  498. package/assets/esri/core/workers/chunks/c5c2fed38e0ccf84f1fa.js +0 -1
  499. package/assets/esri/core/workers/chunks/c88bfa51d2a8a024fc24.js +0 -1
  500. package/assets/esri/core/workers/chunks/ca36d85a47179d95f2fc.js +0 -1
  501. package/assets/esri/core/workers/chunks/d0cf9ff48f051adbd455.js +0 -1
  502. package/assets/esri/core/workers/chunks/d1304d414b1fa725168a.js +0 -1
  503. package/assets/esri/core/workers/chunks/d24125a791247019e2ca.js +0 -1
  504. package/assets/esri/core/workers/chunks/d26be8313526ecea9c68.js +0 -1
  505. package/assets/esri/core/workers/chunks/d2cb3d5ef0a9285afb78.js +0 -1
  506. package/assets/esri/core/workers/chunks/d4b0012ae1d3b8a9ba01.js +0 -1
  507. package/assets/esri/core/workers/chunks/e018cbd97e6e0e4ca5c4.js +0 -1
  508. package/assets/esri/core/workers/chunks/e39bccc000c768120a32.js +0 -1
  509. package/assets/esri/core/workers/chunks/e4380706b629729f2212.js +0 -1
  510. package/assets/esri/core/workers/chunks/ea1877ce00da3b585a30.js +0 -1
  511. package/assets/esri/core/workers/chunks/ea5ee1b12b43594592a0.js +0 -1
  512. package/assets/esri/core/workers/chunks/ea91c57a0b31f3f65ee5.js +0 -1
  513. package/assets/esri/core/workers/chunks/eafc591e1a98000d54ef.js +0 -1
  514. package/assets/esri/core/workers/chunks/ef851a2cff76fd211c07.js +0 -1
  515. package/assets/esri/core/workers/chunks/f3e53be08ab9dbdf17ae.js +0 -1
  516. package/assets/esri/core/workers/chunks/f53010adb70463b75bb9.js +0 -1
  517. package/assets/esri/core/workers/chunks/f5a058a0ce006bce2a2a.js +0 -1
  518. package/assets/esri/core/workers/chunks/f5f5b54cab722abe88e0.js +0 -1
  519. package/assets/esri/core/workers/chunks/f60ed579981913d44675.js +0 -1
  520. package/assets/esri/core/workers/chunks/f6f56f3e011dcef90bbb.js +0 -1
  521. package/assets/esri/core/workers/chunks/f83c3597e9332bd991eb.js +0 -1
  522. package/assets/esri/core/workers/chunks/f9a4387f850d85c44ca5.js +0 -1
  523. package/assets/esri/core/workers/chunks/fdd0e6d9927d3c43b0d3.js +0 -1
  524. package/geometry/operators/importUtils.js +0 -2
  525. /package/assets/esri/core/workers/chunks/{1c803eef9a8fdabc61e3.js.LICENSE.txt → 1082bb0858585bd4fa21.js.LICENSE.txt} +0 -0
  526. /package/assets/esri/core/workers/chunks/{87094044458b0ea5cb0f.js.LICENSE.txt → 2e2349387a2b9903f13c.js.LICENSE.txt} +0 -0
  527. /package/assets/esri/core/workers/chunks/{678585509706755c0434.js.LICENSE.txt → 411bbdecba340df11d95.js.LICENSE.txt} +0 -0
  528. /package/assets/esri/core/workers/chunks/{5edf77618ca51819d7c4.js.LICENSE.txt → 476535cfb06ced74d611.js.LICENSE.txt} +0 -0
  529. /package/assets/esri/core/workers/chunks/{6564f17c4700dc8d9c0e.js.LICENSE.txt → b82b523b6837ed1f28d3.js.LICENSE.txt} +0 -0
  530. /package/assets/esri/core/workers/chunks/{63127e3b22e7eac6003d.js.LICENSE.txt → ef24fd6c0322e5de9fdf.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,9304],{96685(e,t,r){r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>B,constructFeatureSet:()=>P,constructFeatureSetFromPortalItem:()=>z,constructFeatureSetFromRelationship:()=>G,constructFeatureSetFromUrl:()=>E,convertToFeatureSet:()=>$,createFeatureSetCollectionFromMap:()=>V,createFeatureSetCollectionFromService:()=>K,initialiseMetaDataCache:()=>Z});var i=r(11254);class a{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection"}castToText(e=!1){return"object, FeatureSetCollection"}}var s=r(78878),n=r(35704),l=r(70333),o=r(48938),u=r(61454),d=r(67862),c=r(87449),y=r(11221),h=r(33325),p=r(80609),f=r(50145),m=r(4576),_=r(80200),g=r(39516),w=r(89696),F=r(18589),b=r(17126),S=r(54546),I=r(97552),T=r(7562);function v(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new c.dr("NeverReach");const t=[];for(let r=0;r<e.length;r++){const i=e[r],a=[`"${i.name.replaceAll('"','""')}" ${i.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];a.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(a.join(" AND "))}const r=t.join(" OR ");return w.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const i=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[i]}}class C extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return 1e3}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,h.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new I.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?y.An:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,i=null,a=!1;null!=e.orderBy&&(t.supportsOrderBy?(i=e.orderBy.toOrderByFields(),a=!0):r=!1);const s=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,s),l=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=o.includes("*")?this._layer.fields.length:o.length,d=(this.isTable()||!l?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),c=u<=50?1:u<=100?.5:u<=200?.25:.125,h=Math.max(Math.ceil(d*c),t.maxRecordCount??this._maxQueryRate());let f=this._maxQueryRate();const m=this._layer.capabilities?.query.maxRecordCount;null!=m&&m<f&&(f=m);const _=this._createQuery();if(_.where=(0,g.mA)(_.where,n),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);_.spatialRelationship=t.spatialRelationship,_.relationParameter=t.relationParameter,_.geometry=e.spatialFilter.geometry}return _.orderByFields=i,_.outFields=o,_.returnGeometry=l,_.outSpatialReference=this.spatialReference,_.resultType="standard",{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(_,h,f,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,i,a){e.start=0;let s,n=null!=i?i:1/0;do{(0,c.dZ)(a),e.num=Math.max(r,Math.min(n,t)),s=await this.executeQuery(e,"execute"),e.start+=e.num,n-=s.features.length,yield*(0,m.Ho)(s.features,this._maxQueryRate())}while(n>0&&!0===s.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,i=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),i=!0):t=!1);const a=await this.databaseType(),s=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,a),n=this._createQuery();if(n.where=(0,g.mA)(n.where,s),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);n.spatialRelationship=t.spatialRelationship,n.relationParameter=t.relationParameter,n.geometry=e.spatialFilter.geometry}n.orderByFields=r,n.outSpatialReference=this.spatialReference,n.num=t?e.limit:null;const l=await this.executeQuery(n,"executeForIds");if((0,c.dZ)(e.abortSignal),null==l||l.length<=0)return y.An;let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=this._createQuery();return n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(d,l,o,e.abortSignal)}}async*_traverseIdSet(e,t,r,i){for(let a=0;a<t.length;a+=r){e.objectIds=t.slice(a,a+r),(0,c.dZ)(i);const s=await this.executeQuery(e,"execute");yield s.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,i=!!t?.supportsStatistics,a=!!t?.supportsDistinct,s=(0,f.Dp)(e.stat);if("count"===s)return a?this._queryCount(e):{calculated:!1};const n=e.field;if(null==n)return{calculated:!1};if(!1===i||!1===(0,p.DA)(n)&&!1===r||!1===n.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,n,e.limit??1e3,e.abortSignal);if("distinct"===s)return!1===a?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,n,e.limit??1e3,e.abortSignal):{calculated:!1};const l=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const o=this._createQuery();if(o.where=(0,g.mA)(o.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,l)),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);o.spatialRelationship=t.spatialRelationship,o.relationParameter=t.relationParameter,o.geometry=e.spatialFilter.geometry}const u=new T.A;u.statisticType=s,u.onStatisticField=(0,p.YY)(n,l),u.outStatisticFieldName="ARCADE_STAT_RESULT",o.returnGeometry=!1;let d="ARCADE_STAT_RESULT";o.outStatistics=[u];const h=await this.executeQuery(o,"execute");if(!h.hasOwnProperty("features")||0===h.features.length)throw new c.dr("InvalidStatResponse");let m=!1;const _=h.fields??[];for(const e of _)if("ARCADE_STAT_RESULT"===e.name.toUpperCase()){d=e.name,"esriFieldTypeDate"===e.type&&(m=!0);break}const w=h.features[0].attributes[d];return{calculated:!0,result:m&&null!=w?new Date(w):w}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();if(r.where=(0,g.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t)),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);r.spatialRelationship=t.spatialRelationship,r.relationParameter=t.relationParameter,r.geometry=e.spatialFilter.geometry}return r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,i=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const r of e.statistics)(!1===r.workingexpr?.isStandardized||!1===(0,p.DA)(r.workingexpr)&&!1===i)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return y.An;const t=await this.databaseType(),r=e.groupBy,i=e.orderBy;let a=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();a={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==i||1===i._directions[r]}))}}let s=null,n=!1;null!=i&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==a||(0,m.MJ)(r,0,r.length,i._fields,0,Math.min(i._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=i.toOrderByFields(),n=!0),null==s&&(s=r.slice());const l=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,p.YY)(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t),c=this._createQuery();if(c.where=(0,g.mA)(c.where,d),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);c.spatialRelationship=t.spatialRelationship,c.relationParameter=t.relationParameter,c.geometry=e.spatialFilter.geometry}return c.orderByFields=s,c.outFields=["*"],c.outStatistics=l,c.groupByFieldsForStatistics=r,c.returnGeometry=!1,null==a?{filterApplied:!0,spatialFilterApplied:!0,ordered:n,features:this._queryPaginated(c,o,o,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:n,features:this._queryKeysetPaginated(c,a,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const i=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new c.dr("NotImplemented");e.where=(0,g.mA)(i,(0,p.YY)(t.clause,await this.databaseType()))}const a=await this.executeQuery(e,"execute");if((0,c.dZ)(r),!a.hasOwnProperty("features"))throw new c.dr("InvalidStatResponse");if(yield a.features,0===a.features.length||!0!==a.exceededTransferLimit)break;v(t,a.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return(0,y.Rn)(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let i=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);i=this._recentlyUsedQueries.getFromCache(t),null===i&&(i=r(e),this._recentlyUsedQueries.addToCache(t,i),i=i.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===i&&(i=r(e)),i}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}static create(e,t,r,i,a){const s=new F.default({url:e,outFields:null===t?["*"]:t});return new C({layer:s,spatialReference:r,lrucache:i,interceptor:a})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,h.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,i,a){const s=this._layer;if(!function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s))return[];const n=new S.A({objectIds:[e],returnMetadata:a});(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(n.attachmentTypes=i),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:n,method:"attachments"});const l=await s.queryAttachments(n);return l?.[e]?l[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let i=null;return a&&t.exifInfo&&(i=(0,d.Tg)(t.exifInfo)),new u.A(t.id,t.name,t.contentType,t.size,r,i,t.keywords??null)}):[]}async queryRelatedFeatures(e){const t=(0,b.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,i.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference,i=!0===t.exceededTransferLimit;for(const a of t.relatedRecordGroups)(0,y.Rn)(a.relatedRecords,r),e[a.objectId]={features:a.relatedRecords,exceededTransferLimit:i}}return e}throw new c.dr("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,g.mA)(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await this._layer.source.queryFeaturesJSON(r);return 1===i.features.length?((0,y.Rn)(i.features,i.spatialReference??this.spatialReference.toJSON()),i.features[0]):null}async getIdentityUser(){await this.load();const e=l.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=l.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl??"";let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,i.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new C({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const a=await(0,i.A)(r,{responseType:"json",query:{f:"json"}});e=a?.data?.name??null,t=a?.data?.serviceItemId??null}const a=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:a?this._layer.id??null:null,webMapLayerTitle:a?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}var A=r(30235);const R=new FinalizationRegistry(e=>{e.abort()});class L extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerParquet",this._outFields=null,this._returnGeometry=!0,this._ignoreDefinitionExpression=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.objectIdField=this._layer.objectIdField,null!==this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{const e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this._databaseType=0}getDataSourceFeatureSet(){const e=new L({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._outFields??void 0,includeGeometry:this._returnGeometry});return e._ignoreDefinitionExpression=!0,e}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this._ignoreDefinitionExpression&&(e.where=null),e}isTable(){return this._layer.isTable}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return y.An;const t={type:"arcade",returnGeometry:this._returnGeometry,returnZ:this.hasZ,returnM:this.hasM,outSpatialReference:(this.spatialReference??this._layer.spatialReference).toJSON(),outFields:Array.from(new Set(this._outFields??this._layer.fields.map(e=>e.name))),where:(0,g.mA)(this._ignoreDefinitionExpression?null:this._layer.definitionExpression,e.where?(0,p.YY)(e.where,0):null),extent:null};if(null!=e.spatialFilter)switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":{const r=e.spatialFilter.geometry.extent;null!=r&&(t.extent=r.toJSON());break}}return{filterApplied:!0,spatialFilterApplied:!1,ordered:!1,features:await this._queryParquetStream(t,e.abortSignal)}}async _queryParquetStream(e,t){const r=new AbortController,i=await this._layer.source._queryStream(e,{signal:r.signal}),a=this._iterateParquetStream(i,r,t);return R.register(a,r,r),a}async*_iterateParquetStream(e,t,r){try{for(;;){const i=await this._layer.source._getStreamNextFeatures(e,{signal:t.signal});if(r.aborted&&(t.abort(),(0,c.dZ)(r)),null==i)break;(0,y.Rn)(i.features,i.spatialReference??this.spatialReference.toJSON()),yield i.features}}finally{R.unregister(t)}}async isEmpty(){return this._totalCount>=0?0===this._totalCount:(this._totalCount=await this._layer.queryFeatureCount(this._createQuery()),this._totalCount<=0)}async queryStat(e){await this._ensureLoaded();const t=(0,f.Dp)(e.stat);if("count"===t)return this._queryCount(e);const r=e.field;if(null==r)throw new c.dr("NeverReach");if(!0!==this._layer.capabilities?.query.supportsStatistics)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,r,e.limit??1e3,e.abortSignal);if("distinct"===t)return{calculated:!1};if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const i=this._createQuery();if(i.returnGeometry=!1,i.where=(0,g.mA)(i.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);i.spatialRelationship=t.spatialRelationship,i.relationParameter=t.relationParameter,i.geometry=e.spatialFilter.geometry}const a=new T.A;a.statisticType=t,a.onStatisticField=(0,p.YY)(r,0);const s="ARCADE_STAT_RESULT";a.outStatisticFieldName=s,i.outStatistics=[a];const n=await this._layer.source.queryFeaturesJSON(i);if(n.features.length<=0)throw new c.dr("InvalidStatResponse");const l=n.features[0].attributes[s];return{calculated:!0,result:"esriFieldTypeDate"===n.fields?.find(e=>e.name===s)?.type&&null!=l?new Date(l):l}}async _queryCount(e){if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const t=this._createQuery();if(t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){const r=(0,y.rj)(e.spatialFilter.relation);t.spatialRelationship=r.spatialRelationship,t.relationParameter=r.relationParameter,t.geometry=e.spatialFilter.geometry}return t.returnGeometry=!1,{calculated:!0,result:await this._layer.queryFeatureCount(t)}}async canQueryAggregate(e){await this._ensureLoaded();const t=this._layer.capabilities?.query;return!0===t?.supportsStatistics&&null==e.spatialFilter}async queryAggregate(e){await this._ensureLoaded();const t=this._createQuery();return t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),t.orderByFields=e.orderBy?.toOrderByFields(),t.outFields=["*"],t.outStatistics=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,p.YY)(e.workingexpr,0):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),t.groupByFieldsForStatistics=e.groupBy,t.returnGeometry=!1,{filterApplied:!0,spatialFilterApplied:!0,ordered:null!=e.orderBy,features:async function*(){const r=await this._layer.source.queryFeaturesJSON(t);(0,c.dZ)(e.abortSignal);for(const e of(0,m.Ho)(r.features,this._maxQueryRate()))(0,y.Rn)(e,r.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new c.dr("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return null}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}var M=r(26591);class q extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._removeGeometry=!1,this._overrideFields=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),this._findObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return this._databaseType=await this._relatedLayer.databaseType(),this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return y.An;const t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return y.An;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r=null,i=!1;null!=e.orderBy&&t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.toOrderByFields(),i=!0);const a=new M.default;return a.objectIds=[this._findObjectId],a.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),a.relationshipId=this.relationship.id,a.where="1=1",a.returnGeometry=!0!==this._removeGeometry,a.outSpatialReference=this.spatialReference,a.orderByFields=r,{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:i,features:async function*(){const r=await t.source.queryRelatedFeatures(a);(0,c.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r=null==t.where&&null==t.spatialFilter,i=null,a=!1;const s=this._layer.nativeCapabilities();null!=t.orderBy&&(s.capabilities?.queryRelated.supportsOrderBy?(i=t.orderBy.toOrderByFields(),a=!0):r=!1),await this.databaseType();let n=this._maxQueryRate();const l=s.capabilities?.query.maxRecordCount;null!=l&&l<n&&(n=l);const o=new M.default;return o.relationshipId=this.relationship.id,o.objectIds=[this._findObjectId],o.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),o.where="1=1",o.orderByFields=i,o.returnGeometry=!0!==this._removeGeometry,o.outSpatialReference=this.spatialReference,{filterApplied:null==t.where,spatialFilterApplied:null==t.spatialFilter,ordered:a,features:this._queryPaginated(e,o,n,r?t.limit:null,t.abortSignal)}}async*_queryPaginated(e,t,r,i,a){let s;t.num=null!=i?Math.min(i,r):r,t.start=0;do{(0,c.dZ)(a),s=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield s.features,t.start+=s.features.length,t.num=null!=i?Math.min(i-t.start,r):r}while(!0===s.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new c.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetadata(){return this._relatedLayer.relationshipMetadata()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,a){return this._relatedLayer.queryAttachments(e,t,r,i,a)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer.editFieldsInfo??null}get timeInfo(){return this._relatedLayer.timeInfo??null}getFeatureSetInfo(){return this._relatedLayer.getFeatureSetInfo()}}var O=r(23732),N=r(92474),k=r(4146),j=r(99680),D=r(89160),x=r(80812);function Z(){null===O.A.applicationCache&&(O.A.applicationCache=new O.A)}async function U(e,t,r){if(O.A.applicationCache){const r=O.A.applicationCache.getLayerInfo(e);if(r){const i=await r;return new F.default({url:e,outFields:t,sourceJSON:i})}const i=new F.default({url:e,outFields:t}),a=(async()=>(await i.load(),i.sourceJSON))();if(O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,a);try{return await a,i}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return await a,i}if(null!=r){const i=r.getCachedLayerMetadata(e);if(i){const r=await i;return new F.default({url:e,outFields:t,sourceJSON:r})}const a=new F.default({url:e,outFields:t}),s=(async()=>(await a.load(),a.sourceJSON))();r.setCachedLayerMetadata(e,s);try{return await s,a}catch(t){throw r.removeCachedLayerMetadata(e,s),t}}return new F.default({url:e,outFields:t})}async function E(e,t,r,i,a,s=null){return P(await U(e,["*"],a),t,r,i,a,s)}function P(e,t=null,r=null,i=!0,a=null,s=null){switch(e.type){case"catalog-footprint":return P(e.parent,t,r,i,a,s);case"subtype-sublayer":{const l=P(e.parent,t,r,i,a,s);return new n.A({parentfeatureset:l,whereclause:w.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new A.A({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:a,interceptor:s});case"parquet":return new L({layer:e,spatialReference:t,outFields:r,includeGeometry:i});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const n={layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:a,interceptor:s};return!e.url&&e.source?new A.A(n):new C(n)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function Q(e,t){if(null!==O.A.applicationCache){const t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(i){throw t.removeCachedServiceMetadata(e,r),i}}return r}async function B(e,t,r){const a={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await Q(e,null);if(a.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)a.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)a.layerNameLkp[e.id]=e.name;const l=s.controllerDatasetLayers.utilityNetworkLayerId;a.networkId=l;const o=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==O.A.applicationCache){const e=O.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const a=(async()=>{const r=await(0,i.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new c.dr("DataElementsNotFound")})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(r,a);try{return await a}catch(e){throw O.A.applicationCache.clearLayerInfo(r),e}}return a}(e,l);if(o){a.queryelem=o,a.queryelem?.dataElement&&void 0!==a.queryelem.dataElement.schemaGeneration&&(a.unVersion=a.queryelem.dataElement.schemaGeneration),a.lkp={},a.queryelem.dataElement.domainNetworks||(a.queryelem.dataElement.domainNetworks=[]);for(const e of a.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:a.layerNameLkp[t.layerId]??null};a.layerIdLookup.set(e.layerId,e),a.sourceIdLookup.set(e.sourceId,e),e.className&&(a.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:a.layerNameLkp[t.layerId]??null};a.layerIdLookup.set(e.layerId,e),a.sourceIdLookup.set(e.sourceId,e),e.className&&(a.lkp[e.className]=e)}}if(a.queryelem.dataElement.terminalConfigurations)for(const e of a.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)a.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==O.A.applicationCache){const t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+l);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let i=null;if(r&&a.unVersion<8){const r=[];a.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),i=await E(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await i.load(),a.unVersion>=4&&(i=new n.A({parentfeatureset:i,whereclause:w.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC})}),await i.load())}return{lkp:a.lkp,associations:i,unVersion:a.unVersion,terminals:a.terminals,layerIdLookup:a.layerIdLookup,sourceIdLookup:a.sourceIdLookup}}return{associations:null,unVersion:a.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:a.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:a.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function G(e,t,r,i=null,a=null,s=!0,n=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await E(o,i,a,s,n,l);return new q({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:i,outFields:a,includeGeometry:s,lrucache:n,interceptor:l})}class J extends a{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const i=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async listAll(){(0,N.Zm)(this._map)&&!this._map.loaded&&await this._map.load();const e=this._map.allLayers.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,r=null){if((0,N.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const a=this._instantLayers[r];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===i)return this._instantLayers[r].featureset}const a=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,N.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const a=this._instantLayers[r];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===i)return this._instantLayers[r].featureset}const a=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.id===e);if(a)return this._makeAndAddFeatureSet(a,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,h.eB)(t)&&t.id===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}}class Y extends a{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const i=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async _loadMetaData(){const e=await Q(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new Y(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){const e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const a=this._instantLayers[r];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===i)return this._instantLayers[r].featureset}const a=await this._loadMetaData();let s=null;for(const t of a.layers??[])t.name===e&&(s=t);if(!s)for(const t of a.tables??[])t.name===e&&(s=t);if(s){const e=await U(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const a=this._instantLayers[r];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===i)return this._instantLayers[r].featureset}const a=await this._loadMetaData();let s=null;for(const t of a.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of a.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await U(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function V(e,t,r=null,i=null){return new J(e,t,r,i)}function K(e,t,r=null,i=null){return new Y(e,t,r,i)}function $(e,t,r,i,a){if(null===e)return null;if((0,s.k)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof k.A&&(0,h.eB)(e)){switch(t){case"datasource":return P(e,a,"outFields"in e?e.outFields:null,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return P(e,a,"outFields"in e?e.outFields:null,!0,r,i)}return null}if((0,s.a4)(e)){switch(t){case"datasource":return P(e.parent,a,e.parent.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return P(e,a,e.parent.outFields,!0,r,i)}return null}return null}async function z(e,t,r,i,a,s,n,l=null){if(O.A.applicationCache){const o=O.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return H(await o,t,r,i,a,n,l)}if(null!=n){const o=n.getCachedPortalItem(s.url,e);if(null!=o)return await H(await o,t,r,i,a,n,l)}const o=new x.default({id:e,portal:s}).load();O.A.applicationCache?O.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=n&&n.setCachedPortalItem(s.url,e,o);try{return await H(await o,t,r,i,a,n,l)}catch(t){throw O.A.applicationCache&&O.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=n&&n.removeCachedPortalItem(s.url,e,o),t}}const W=new Set(["Apache Parquet","Parquet layer","Parquet Layer","Parquet feature layer","Parquet Feature Layer"]);async function H(e,t,r,i,a,s,n){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await U((0,h.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=W.has(e.type)?Promise.resolve(new j.default({data:new D.A({portalItem:e})})):k.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=W.has(e.type)?new j.default({data:new D.A({portalItem:e})}):await k.A.fromPortalItem(e)}return P(l,r,i,a,s,n)}},35704(e,t,r){r.d(t,{A:()=>o});var i=r(48938),a=r(87449),s=r(11221),n=(r(33325),r(80609)),l=r(89696);class o extends s.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof l.A?(this._whereClause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereClause=null)}_initialiseFeatureSet(){this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes}async _queryAll(){return(await this.query({abortSignal:i._})).features}async query(e){let t=e.where,r=!0;null!==this._whereClauseFunction?r=!1:null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,await this._ensureLoaded();const i=await this._parent.query({...e,where:t,limit:r?e.limit:null});return(0,a.dZ)(e.abortSignal),i.filterApplied&&null==this._whereClauseFunction?i:{...i,features:this._applyFilter(i.features,e.abortSignal)}}async*_applyFilter(e,t){for await(const r of e)if((0,a.dZ)(t),null!=this._whereClause){const e=r.filter(e=>this._whereClause.testFeature(e));e.length>0&&(yield e)}else if(null!=this._whereClauseFunction){const e=[];for(const t of r)await this._whereClauseFunction(t)&&e.push(t);e.length>0&&(yield e)}else yield r}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1};let t=this._whereClause;null!=e.where&&null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,e.where));const r=await this._parent.queryStat({...e,where:t});return r.calculated?r:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,this._parent.queryAggregate({...e,where:t})}getFieldsIndex(){return this._parent.getFieldsIndex()}}},30235(e,t,r){r.d(t,{A:()=>h});var i=r(48938),a=r(87449),s=r(11221),n=(r(33325),r(80609)),l=r(4576),o=r(39516),u=r(91075),d=r(18589),c=r(33143),y=r(20437);class h extends s.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||this._layer.objectIdField===r||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:i._})).features}_queryLayerFeaturesJSON(e){return"queryFeaturesJSON"in this._layer?this._layer.queryFeaturesJSON(e):this._layer.source.queryFeaturesJSON(e)}async query(e){await this._ensureLoaded();let t=null,r=!1;if(null!=e.orderBy&&(t=e.orderBy.toOrderByFields(),r=!0),this.isTable()&&null!=e.spatialFilter)return s.An;const i=this._createQuery();return i.where=(0,o.mA)(i.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,n.YY)(e.where,0)),null!=e.spatialFilter&&(i.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),i.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),i.geometry=e.spatialFilter.geometry),i.outSpatialReference=this.spatialReference,i.orderByFields=t,i.num=e.limit,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){const t=await this._queryLayerFeaturesJSON(i);(0,a.dZ)(e.abortSignal);for(const e of(0,l.Ho)(t.features,this._maxQueryRate()))(0,s.Rn)(e,t.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new a.dr("NeverReach")}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetadata(){return[]}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const i=e.layerDefinition.typeIdField??"",a=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)a.push(c.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let n=e.featureSet.features;if(!r){let t=!1;for(const i of e.layerDefinition.fields)if("oid"===i.type||"esriFieldTypeOID"===i.type){r=i.name,t=!0;break}if(!1===t){let t="FID",i=!0,a=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(a++,t="FID"+a.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let r=0;r<n.length;r++)s.push({geometry:e.featureSet.features[r].geometry,attributes:{...e.featureSet.features[r].attributes,[t]:r}});n=s,r=t}}const l=[];for(const t of e.layerDefinition.fields)t instanceof y.A?l.push(t):l.push(y.A.fromJSON(t));let o=s;switch(o||(o=""),o){case"esriGeometryPoint":o="point";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryEnvelope":o="extent";break;case"esriGeometryMultipoint":o="multipoint";break;case"":case"esriGeometryNull":o="esriGeometryNull"}if("esriGeometryNull"!==o){const e=t.toJSON();for(const t of n)t.geometry&&t.geometry instanceof u.A==0&&(t.geometry.type=o,void 0===t.geometry.spatialReference&&(t.geometry.spatialReference=e))}else for(const e of n)e.geometry&&(e.geometry=null);const p={outFields:["*"],source:n,fields:l,hasZ:!0===e.layerDefinition.hasZ||!0===e.featureSet.hasZ,hasM:!0===e.layerDefinition.hasM||!0===e.featureSet.hasM,types:a,typeIdField:i,objectIdField:r,spatialReference:t},f="esriGeometryNull"===o||null===o;f||(p.geometryType=o);const m=new d.default(p);return e.layerDefinition.subtypeField&&e.layerDefinition.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new h({layer:m,spatialReference:t,isTable:f})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._queryLayerFeaturesJSON(t);return 1===r.features.length?((0,s.Rn)(r.features,r.spatialReference??this.spatialReference.toJSON()),r.features[0]):null}serviceUrl(){return""}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return"timeInfo"in this._layer?this._layer.timeInfo:null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},88930(e,t,r){r.d(t,{S1:()=>l,VW:()=>o,lL:()=>u,rb:()=>d,t:()=>c});var i=r(97770),a=(r(98623),r(34747));const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function l(e,t,r,s="system"){if("unknown"===r)return e;const n=new a.oh((0,i.wj)(s)),l=a.c9.fromJSDate(e,{zone:n}),o="decades"===r||"centuries"===r?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[o]:t}).toJSDate()}function o(e,t,r="milliseconds"){const i=e.getTime(),a=c(t,r,"milliseconds");return new Date(i+a)}function u(e,t,r="system"){const{unit:s}=t,n=Math.max(1,Math.trunc(t.value)),l=new a.oh((0,i.wj)(r)),o=a.c9.fromJSDate(e,{zone:l}),u=e=>e-e%n;switch(s){case"milliseconds":return o.startOf("second").plus({millisecond:u(o.millisecond)}).toJSDate();case"seconds":return o.startOf("minute").plus({second:u(o.second)}).toJSDate();case"minutes":return o.startOf("hour").plus({minute:u(o.minute)}).toJSDate();case"hours":return o.startOf("day").plus({hour:u(o.hour)}).toJSDate();case"days":return o.startOf("month").plus({day:u(o.day-1)}).toJSDate();case"weeks":{const e=o.startOf("year").startOf("week"),t=Math.floor(o.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return o.startOf("year").plus({month:u(o.month-1)}).toJSDate();case"years":case"decades":case"centuries":{const e=o.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*n,r=e.year-e.year%t;return e.set({year:r}).toJSDate()}case"unknown":return e}}function d(e){const t=s.exec(e);if(!t)return null;const{hh:r,mm:i,ss:a,ms:l}=t.groups;return Number(r)*n.hours+Number(i)*n.minutes+Number(a||0)*n.seconds+Number(l||0)}function c(e,t,r){return 0===e?0:e*n[t]/n[r]}},4146(e,t,r){r.d(t,{A:()=>g});var i=r(32198),a=r(11254),s=r(49186),n=r(65529),l=r(4902),o=r(92474),u=r(53966),d=r(17676),c=r(84952),y=r(91429),h=r(5443),p=r(16930),f=r(92602),m=r(79677);let _=0,g=class extends((0,n.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,p.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=p.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(9917),r.e(812),r.e(8559)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",a=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+a+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,d.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,a.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,y.MZ)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"effectiveVisible",null),(0,i.Cg)([(0,y.MZ)({type:h.A})],g.prototype,"fullExtent",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,i.Cg)([(0,y.MZ)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,i.Cg)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,i.Cg)([(0,y.MZ)({clonable:!1})],g.prototype,"parent",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],g.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,y.MZ)({type:p.A})],g.prototype,"spatialReference",void 0),(0,i.Cg)([(0,y.MZ)({type:String})],g.prototype,"title",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)()],g.prototype,"url",void 0),(0,i.Cg)([(0,y.MZ)({type:m.A})],g.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,i.Cg)([(0,y.$K)("esri.layers.Layer")],g)},52136(e,t,r){var i=r(32198),a=r(91429);r.d(t,["p",0,e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,a.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,a.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},28032(e,t,r){r.d(t,{A:()=>o});var i=r(32198),a=r(69540),s=r(25482),n=r(91429),l=r(56400);let o=class extends((0,a.OU)(s.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,i.Cg)([(0,n.MZ)()],o.prototype,"creatorField",void 0),(0,i.Cg)([(0,n.MZ)()],o.prototype,"creationDateField",void 0),(0,i.Cg)([(0,n.MZ)()],o.prototype,"editorField",void 0),(0,i.Cg)([(0,n.MZ)()],o.prototype,"editDateField",void 0),(0,i.Cg)([(0,n.MZ)()],o.prototype,"realm",void 0),(0,i.Cg)([(0,n.MZ)((0,l.P6)("dateFieldsTimeReference",!0))],o.prototype,"timeZone",void 0),o=(0,i.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],o)},33143(e,t,r){r.d(t,{A:()=>c});var i=r(32198),a=r(69540),s=r(25482),n=r(91429),l=r(8631),o=r(29005),u=r(36005),d=r(43937);let c=class extends((0,a.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],c.prototype,"readDomains",null),(0,i.Cg)([(0,d.K)("domains")],c.prototype,"writeDomains",null),(0,i.Cg)([(0,n.MZ)({type:[o.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i.Cg)([(0,n.$K)("esri.layers.support.FeatureType")],c)},37352(e,t,r){r.d(t,{A:()=>o});var i,a=r(32198),s=r(7762),n=r(25482),l=r(91429);let o=i=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,a.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],o.prototype,"floorField",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllMode",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllLevelIds",void 0),o=i=(0,a.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],o)},45067(e,t,r){r.d(t,{A:()=>d});var i=r(32198),a=r(69540),s=r(66552),n=r(25482),l=r(91429);const o=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,a.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:o.read,write:o.write}})],d.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"role",void 0),d=(0,i.Cg)([(0,l.$K)("esri.layers.support.Relationship")],d)},41560(e,t,r){r.d(t,{Ch:()=>n,mW:()=>s});var i=r(34727),a=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],d(r)),t[1]=Math.min(t[1],c(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const n=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const a=d(e.at(0)?.minScale),s=c(e.at(-1)?.maxScale);if((0,i.ZH)(a,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],a=e[t+1];if((0,i.ZH)(d(a.minScale),c(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,a.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)o(i.minScale,i.maxScale,t,r)&&(yield i)}}function o(e,t,r,a){return e=d(e),r=d(r),t=c(t),!(!(0,i.Sp)(r,e)&&(a??r)>e||(0,i.Hx)(t,r)||void 0!==a&&(0,i.Sp)(a,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function d(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},77548(e,t,r){r.d(t,{Gh:()=>q,tk:()=>C,BR:()=>v,p2:()=>I,qd:()=>A,wI:()=>T,G$:()=>L,$x:()=>R,Ov:()=>w,cM:()=>y,UC:()=>h,Qz:()=>p,OP:()=>M,TU:()=>g,F2:()=>f,XX:()=>_,Qi:()=>F,jy:()=>b});var i=r(70333),a=r(11254),s=r(7762),n=(r(84952),r(36563)),l=r(36708),o=r(4146);const u=new WeakMap;function d(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof o.A)&&("catalog-dynamic-group"===t.type||d(t))},t=>u.set(e,t),l.pc),(0,n.hA)(()=>u.delete(e))]),u.get(e))}function c(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function y(e){return c(e,"knowledge-graph")&&"layers"in e}function h(e){return c(e,"knowledge-graph-sublayer")}function p(e){return c(e,"link-chart")&&"layers"in e}function f(e){return c(e,"subtype-group")&&"sublayers"in e}function m(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const _={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function g(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function F(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function b(e){return function(e){return c(e,"catalog-footprint")}(e)||function(e){return c(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return c(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function S(e){const t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!b(e))return;const r=t?.graphic,i="featureReduction"in e?e.featureReduction:null;if(r){if(r.isAggregate){const e=r.origin;return e&&"featureReductionProvider"in e&&i?S(i)?i:null:void 0}return e}return t?.checkFeatureReduction&&i?S(i)?i:null:e}async function T(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const n=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,a.A)(n,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function v(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"dimension-feature":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"parquet":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function C(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function A(e){const t=new s.A;for(const r of e.allLayers.concat(e.allTables))d(r)||m(r)||"annotation-feature"===r.type||"dimension-feature"===r.type||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function R(e,t){return null}function L(e){return null}function M(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function q(e,t){if(!t||!M(e))return;const r=(e.url,null);r&&(e.url=r)}},73133(e,t,r){const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});r.d(t,["j",0,i])},10536(e,t,r){function i(e){const t={};for(const r in e){if("declaredClass"===r)continue;const a=e[r];if(null!=a&&"function"!=typeof a)if(Array.isArray(a)){t[r]=[];for(let e=0;e<a.length;e++)t[r][e]=i(a[e])}else"object"==typeof a?a.toJSON&&(t[r]=JSON.stringify(a)):t[r]=a}return t}r.d(t,{z:()=>i})},17126(e,t,r){r.d(t,{dw:()=>n,qD:()=>l,qW:()=>o});var i=r(11254),a=r(21325),s=r(10536);function n(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!t?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=(0,a.YX)(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function l(e,t,r){const i=await u(e,t,r),a=i.data,s=a.geometryType,n=a.spatialReference,l={};for(const e of a.relatedRecordGroups){const t={fields:void 0,geometryType:s,spatialReference:n,hasZ:!!a.hasZ,hasM:!!a.hasM,features:e.relatedRecords};if(null!=e.objectId)l[e.objectId]=t;else for(const r of Object.keys(e))"relatedRecords"!==r&&(l[e[r]]=t)}return{...i,data:l}}async function o(e,t,r){const i=await u(e,t,r,{returnCountOnly:!0}),a=i.data,s={};for(const e of a.relatedRecordGroups)null!=e.objectId&&(s[e.objectId]=e.count);return{...i,data:s}}async function u(e,t,r={},a){const l=(0,s.z)({...e.query,f:"json",...a,...n(t,a)});return(0,i.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...l}})}},16215(e,t,r){r.d(t,{S:()=>a});const i=Symbol("BasemapInstance");function a(e){return null!=e&&"object"==typeof e&&i in e}r.d(t,["Y",0,i])},79677(e,t,r){r.d(t,{A:()=>c});var i,a=r(32198),s=r(25482),n=r(88930),l=r(91429),o=(r(98623),r(10184)),u=r(36005),d=r(43937);let c=class extends s.o{static{i=this}static get allTime(){return y}static get empty(){return h}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,a=e.end?.getTime()??e.end;return t===i&&r===a}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&(r=(0,n.lL)(r,new o.A({value:1,unit:e}),t));let a=this.end;if(a){const r=(0,n.lL)(a,new o.A({value:1,unit:e}),t);a=a.getTime()===r.getTime()?r:(0,n.S1)(r,1,e,t)}return new i({start:r,end:a})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,a=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let n,l;return a>=t&&a<=r?n=a:t>=a&&t<=s&&(n=t),r>=a&&r<=s?l=r:s>=t&&s<=r&&(l=s),null==n||null==l||isNaN(n)||isNaN(l)?i.empty:new i({start:n===-1/0?null:new Date(n),end:l===1/0?null:new Date(l)})}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const a=new i,{start:s,end:l}=this;return null!=s&&(a.start=(0,n.S1)(s,e,t,r)),null!=l&&(a.end=(0,n.S1)(l,e,t,r)),a}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,a.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,a.Cg)([(0,u.w)("end")],c.prototype,"readEnd",null),(0,a.Cg)([(0,d.K)("end")],c.prototype,"writeEnd",null),(0,a.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,a.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,a.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,a.Cg)([(0,u.w)("start")],c.prototype,"readStart",null),(0,a.Cg)([(0,d.K)("start")],c.prototype,"writeStart",null),c=i=(0,a.Cg)([(0,l.$K)("esri.time.TimeExtent")],c);const y=new c,h=new c({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>d});var i=r(32198),a=r(69540),s=r(25482),n=r(88930),l=r(91429),o=r(73133),u=r(93223);let d=class extends((0,a.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,u.e)(o.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,i.Cg)([(0,l.$K)("esri.time.TimeInterval")],d)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,9304],{96685(e,t,r){r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>B,constructFeatureSet:()=>P,constructFeatureSetFromPortalItem:()=>z,constructFeatureSetFromRelationship:()=>G,constructFeatureSetFromUrl:()=>E,convertToFeatureSet:()=>$,createFeatureSetCollectionFromMap:()=>V,createFeatureSetCollectionFromService:()=>K,initialiseMetaDataCache:()=>Z});var a=r(11254);class i{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection"}castToText(e=!1){return"object, FeatureSetCollection"}}var s=r(78878),n=r(35704),l=r(70333),o=r(48938),u=r(61454),d=r(67862),c=r(87449),y=r(11221),h=r(33325),p=r(80609),f=r(50145),m=r(4576),_=r(80200),g=r(39516),w=r(89696),F=r(18589),b=r(17126),S=r(54546),I=r(97552),T=r(7562);function v(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new c.dr("NeverReach");const t=[];for(let r=0;r<e.length;r++){const a=e[r],i=[`"${a.name.replaceAll('"','""')}" ${a.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}const r=t.join(" OR ");return w.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class C extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return 1e3}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,h.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new I.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?y.An:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);const s=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,s),l=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=o.includes("*")?this._layer.fields.length:o.length,d=(this.isTable()||!l?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),c=u<=50?1:u<=100?.5:u<=200?.25:.125,h=Math.max(Math.ceil(d*c),t.maxRecordCount??this._maxQueryRate());let f=this._maxQueryRate();const m=this._layer.capabilities?.query.maxRecordCount;null!=m&&m<f&&(f=m);const _=this._createQuery();if(_.where=(0,g.mA)(_.where,n),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);_.spatialRelationship=t.spatialRelationship,_.relationParameter=t.relationParameter,_.geometry=e.spatialFilter.geometry}return _.orderByFields=a,_.outFields=o,_.returnGeometry=l,_.outSpatialReference=this.spatialReference,_.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(_,h,f,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a,i){e.start=0;let s,n=null!=a?a:1/0;do{(0,c.dZ)(i),e.num=Math.max(r,Math.min(n,t)),s=await this.executeQuery(e,"execute"),e.start+=e.num,n-=s.features.length,yield*(0,m.Ho)(s.features,this._maxQueryRate())}while(n>0&&!0===s.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);const i=await this.databaseType(),s=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,i),n=this._createQuery();if(n.where=(0,g.mA)(n.where,s),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);n.spatialRelationship=t.spatialRelationship,n.relationParameter=t.relationParameter,n.geometry=e.spatialFilter.geometry}n.orderByFields=r,n.outSpatialReference=this.spatialReference,n.num=t?e.limit:null;const l=await this.executeQuery(n,"executeForIds");if((0,c.dZ)(e.abortSignal),null==l||l.length<=0)return y.An;let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=this._createQuery();return n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(d,l,o,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r){e.objectIds=t.slice(i,i+r),(0,c.dZ)(a);const s=await this.executeQuery(e,"execute");yield s.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,s=(0,f.Dp)(e.stat);if("count"===s)return i?this._queryCount(e):{calculated:!1};const n=e.field;if(null==n)return{calculated:!1};if(!1===a||!1===(0,p.DA)(n)&&!1===r||!1===n.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,n,e.limit??1e3,e.abortSignal);if("distinct"===s)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,n,e.limit??1e3,e.abortSignal):{calculated:!1};const l=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const o=this._createQuery();if(o.where=(0,g.mA)(o.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,l)),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);o.spatialRelationship=t.spatialRelationship,o.relationParameter=t.relationParameter,o.geometry=e.spatialFilter.geometry}const u=new T.A;u.statisticType=s,u.onStatisticField=(0,p.YY)(n,l),u.outStatisticFieldName="ARCADE_STAT_RESULT",o.returnGeometry=!1;let d="ARCADE_STAT_RESULT";o.outStatistics=[u];const h=await this.executeQuery(o,"execute");if(!h.hasOwnProperty("features")||0===h.features.length)throw new c.dr("InvalidStatResponse");let m=!1;const _=h.fields??[];for(const e of _)if("ARCADE_STAT_RESULT"===e.name.toUpperCase()){d=e.name,"esriFieldTypeDate"===e.type&&(m=!0);break}const w=h.features[0].attributes[d];return{calculated:!0,result:m&&null!=w?new Date(w):w}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();if(r.where=(0,g.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t)),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);r.spatialRelationship=t.spatialRelationship,r.relationParameter=t.relationParameter,r.geometry=e.spatialFilter.geometry}return r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const r of e.statistics)(!1===r.workingexpr?.isStandardized||!1===(0,p.DA)(r.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return y.An;const t=await this.databaseType(),r=e.groupBy,a=e.orderBy;let i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let s=null,n=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||(0,m.MJ)(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=a.toOrderByFields(),n=!0),null==s&&(s=r.slice());const l=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,p.YY)(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t),c=this._createQuery();if(c.where=(0,g.mA)(c.where,d),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);c.spatialRelationship=t.spatialRelationship,c.relationParameter=t.relationParameter,c.geometry=e.spatialFilter.geometry}return c.orderByFields=s,c.outFields=["*"],c.outStatistics=l,c.groupByFieldsForStatistics=r,c.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:n,features:this._queryPaginated(c,o,o,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:n,features:this._queryKeysetPaginated(c,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new c.dr("NotImplemented");e.where=(0,g.mA)(a,(0,p.YY)(t.clause,await this.databaseType()))}const i=await this.executeQuery(e,"execute");if((0,c.dZ)(r),!i.hasOwnProperty("features"))throw new c.dr("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;v(t,i.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return(0,y.Rn)(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let a=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}static create(e,t,r,a,i){const s=new F.default({url:e,outFields:null===t?["*"]:t});return new C({layer:s,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,h.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,a,i){const s=this._layer;if(!function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s))return[];const n=new S.A({objectIds:[e],returnMetadata:i});(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),a&&a.length>0&&(n.attachmentTypes=a),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:n,method:"attachments"});const l=await s.queryAttachments(n);return l?.[e]?l[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let a=null;return i&&t.exifInfo&&(a=(0,d.Tg)(t.exifInfo)),new u.A(t.id,t.name,t.contentType,t.size,r,a,t.keywords??null)}):[]}async queryRelatedFeatures(e){const t=(0,b.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,a.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference,a=!0===t.exceededTransferLimit;for(const i of t.relatedRecordGroups)(0,y.Rn)(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new c.dr("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,g.mA)(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?((0,y.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();const e=l.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=l.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl??"";let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,a.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new C({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const i=await(0,a.A)(r,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,t=i?.data?.serviceItemId??null}const i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}var A=r(30235);const R=new FinalizationRegistry(e=>{e.abort()});class L extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerParquet",this._outFields=null,this._returnGeometry=!0,this._ignoreDefinitionExpression=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.objectIdField=this._layer.objectIdField,null!==this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{const e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this._databaseType=0}getDataSourceFeatureSet(){const e=new L({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._outFields??void 0,includeGeometry:this._returnGeometry});return e._ignoreDefinitionExpression=!0,e}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this._ignoreDefinitionExpression&&(e.where=null),e}isTable(){return this._layer.isTable}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return y.An;const t={type:"arcade",returnGeometry:this._returnGeometry,returnZ:this.hasZ,returnM:this.hasM,outSpatialReference:(this.spatialReference??this._layer.spatialReference).toJSON(),outFields:Array.from(new Set(this._outFields??this._layer.fields.map(e=>e.name))),where:(0,g.mA)(this._ignoreDefinitionExpression?null:this._layer.definitionExpression,e.where?(0,p.YY)(e.where,0):null),extent:null};if(null!=e.spatialFilter)switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":{const r=e.spatialFilter.geometry.extent;null!=r&&(t.extent=r.toJSON());break}}return{filterApplied:!0,spatialFilterApplied:!1,ordered:!1,features:await this._queryParquetStream(t,e.abortSignal)}}async _queryParquetStream(e,t){const r=new AbortController,a=await this._layer.source._queryStream(e,{signal:r.signal}),i=this._iterateParquetStream(a,r,t);return R.register(i,r,r),i}async*_iterateParquetStream(e,t,r){try{for(;;){const a=await this._layer.source._getStreamNextFeatures(e,{signal:t.signal});if(r.aborted&&(t.abort(),(0,c.dZ)(r)),null==a)break;(0,y.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),yield a.features}}finally{R.unregister(t)}}async isEmpty(){return this._totalCount>=0?0===this._totalCount:(this._totalCount=await this._layer.queryFeatureCount(this._createQuery()),this._totalCount<=0)}async queryStat(e){await this._ensureLoaded();const t=(0,f.Dp)(e.stat);if("count"===t)return this._queryCount(e);const r=e.field;if(null==r)throw new c.dr("NeverReach");if(!0!==this._layer.capabilities?.query.supportsStatistics)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,r,e.limit??1e3,e.abortSignal);if("distinct"===t)return{calculated:!1};if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const a=this._createQuery();if(a.returnGeometry=!1,a.where=(0,g.mA)(a.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);a.spatialRelationship=t.spatialRelationship,a.relationParameter=t.relationParameter,a.geometry=e.spatialFilter.geometry}const i=new T.A;i.statisticType=t,i.onStatisticField=(0,p.YY)(r,0);const s="ARCADE_STAT_RESULT";i.outStatisticFieldName=s,a.outStatistics=[i];const n=await this._layer.source.queryFeaturesJSON(a);if(n.features.length<=0)throw new c.dr("InvalidStatResponse");const l=n.features[0].attributes[s];return{calculated:!0,result:"esriFieldTypeDate"===n.fields?.find(e=>e.name===s)?.type&&null!=l?new Date(l):l}}async _queryCount(e){if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const t=this._createQuery();if(t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){const r=(0,y.rj)(e.spatialFilter.relation);t.spatialRelationship=r.spatialRelationship,t.relationParameter=r.relationParameter,t.geometry=e.spatialFilter.geometry}return t.returnGeometry=!1,{calculated:!0,result:await this._layer.queryFeatureCount(t)}}async canQueryAggregate(e){await this._ensureLoaded();const t=this._layer.capabilities?.query;return!0===t?.supportsStatistics&&null==e.spatialFilter}async queryAggregate(e){await this._ensureLoaded();const t=this._createQuery();return t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),t.orderByFields=e.orderBy?.toOrderByFields(),t.outFields=["*"],t.outStatistics=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,p.YY)(e.workingexpr,0):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),t.groupByFieldsForStatistics=e.groupBy,t.returnGeometry=!1,{filterApplied:!0,spatialFilterApplied:!0,ordered:null!=e.orderBy,features:async function*(){const r=await this._layer.source.queryFeaturesJSON(t);(0,c.dZ)(e.abortSignal);for(const e of(0,m.Ho)(r.features,this._maxQueryRate()))(0,y.Rn)(e,r.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new c.dr("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return null}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}var M=r(26591);class q extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._removeGeometry=!1,this._overrideFields=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),this._findObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return this._databaseType=await this._relatedLayer.databaseType(),this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return y.An;const t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return y.An;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r=null,a=!1;null!=e.orderBy&&t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.toOrderByFields(),a=!0);const i=new M.default;return i.objectIds=[this._findObjectId],i.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),i.relationshipId=this.relationship.id,i.where="1=1",i.returnGeometry=!0!==this._removeGeometry,i.outSpatialReference=this.spatialReference,i.orderByFields=r,{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:a,features:async function*(){const r=await t.source.queryRelatedFeatures(i);(0,c.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r=null==t.where&&null==t.spatialFilter,a=null,i=!1;const s=this._layer.nativeCapabilities();null!=t.orderBy&&(s.capabilities?.queryRelated.supportsOrderBy?(a=t.orderBy.toOrderByFields(),i=!0):r=!1),await this.databaseType();let n=this._maxQueryRate();const l=s.capabilities?.query.maxRecordCount;null!=l&&l<n&&(n=l);const o=new M.default;return o.relationshipId=this.relationship.id,o.objectIds=[this._findObjectId],o.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),o.where="1=1",o.orderByFields=a,o.returnGeometry=!0!==this._removeGeometry,o.outSpatialReference=this.spatialReference,{filterApplied:null==t.where,spatialFilterApplied:null==t.spatialFilter,ordered:i,features:this._queryPaginated(e,o,n,r?t.limit:null,t.abortSignal)}}async*_queryPaginated(e,t,r,a,i){let s;t.num=null!=a?Math.min(a,r):r,t.start=0;do{(0,c.dZ)(i),s=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield s.features,t.start+=s.features.length,t.num=null!=a?Math.min(a-t.start,r):r}while(!0===s.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new c.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetadata(){return this._relatedLayer.relationshipMetadata()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,a,i){return this._relatedLayer.queryAttachments(e,t,r,a,i)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer.editFieldsInfo??null}get timeInfo(){return this._relatedLayer.timeInfo??null}getFeatureSetInfo(){return this._relatedLayer.getFeatureSetInfo()}}var O=r(23732),N=r(92474),k=r(4146),j=r(99680),D=r(89160),x=r(80812);function Z(){null===O.A.applicationCache&&(O.A.applicationCache=new O.A)}async function U(e,t,r){if(O.A.applicationCache){const r=O.A.applicationCache.getLayerInfo(e);if(r){const a=await r;return new F.default({url:e,outFields:t,sourceJSON:a})}const a=new F.default({url:e,outFields:t}),i=(async()=>(await a.load(),a.sourceJSON))();if(O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,i);try{return await i,a}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return await i,a}if(null!=r){const a=r.getCachedLayerMetadata(e);if(a){const r=await a;return new F.default({url:e,outFields:t,sourceJSON:r})}const i=new F.default({url:e,outFields:t}),s=(async()=>(await i.load(),i.sourceJSON))();r.setCachedLayerMetadata(e,s);try{return await s,i}catch(t){throw r.removeCachedLayerMetadata(e,s),t}}return new F.default({url:e,outFields:t})}async function E(e,t,r,a,i,s=null){return P(await U(e,["*"],i),t,r,a,i,s)}function P(e,t=null,r=null,a=!0,i=null,s=null){switch(e.type){case"catalog-footprint":return P(e.parent,t,r,a,i,s);case"subtype-sublayer":{const l=P(e.parent,t,r,a,i,s);return new n.A({parentfeatureset:l,whereclause:w.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new A.A({layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:s});case"parquet":return new L({layer:e,spatialReference:t,outFields:r,includeGeometry:a});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const n={layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:s};return!e.url&&e.source?new A.A(n):new C(n)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function Q(e,t){if(null!==O.A.applicationCache){const t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,a.A)(e,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(a){throw t.removeCachedServiceMetadata(e,r),a}}return r}async function B(e,t,r){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await Q(e,null);if(i.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)i.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)i.layerNameLkp[e.id]=e.name;const l=s.controllerDatasetLayers.utilityNetworkLayerId;i.networkId=l;const o=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==O.A.applicationCache){const e=O.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const i=(async()=>{const r=await(0,a.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new c.dr("DataElementsNotFound")})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(r,i);try{return await i}catch(e){throw O.A.applicationCache.clearLayerInfo(r),e}}return i}(e,l);if(o){i.queryelem=o,i.queryelem?.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(const e of i.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(const e of i.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==O.A.applicationCache){const t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,a.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+l);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let a=null;if(r&&i.unVersion<8){const r=[];i.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),a=await E(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await a.load(),i.unVersion>=4&&(a=new n.A({parentfeatureset:a,whereclause:w.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:a.getFieldsIndex(),timeZone:a.dateFieldsTimeZoneDefaultUTC})}),await a.load())}return{lkp:i.lkp,associations:a,unVersion:i.unVersion,terminals:i.terminals,layerIdLookup:i.layerIdLookup,sourceIdLookup:i.sourceIdLookup}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function G(e,t,r,a=null,i=null,s=!0,n=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await E(o,a,i,s,n,l);return new q({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:a,outFields:i,includeGeometry:s,lrucache:n,interceptor:l})}class J extends i{constructor(e,t=null,r=null,a=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async listAll(){(0,N.Zm)(this._map)&&!this._map.loaded&&await this._map.load();const e=this._map.allLayers.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,r=null){if((0,N.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){const a=this._map.allTables.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,N.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.id===e);if(i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){const a=this._map.allTables.find(t=>(0,h.eB)(t)&&t.id===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}}class Y extends i{constructor(e,t=null,r=null,a=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async _loadMetaData(){const e=await Q(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new Y(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){const e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=await this._loadMetaData();let s=null;for(const t of i.layers??[])t.name===e&&(s=t);if(!s)for(const t of i.tables??[])t.name===e&&(s=t);if(s){const e=await U(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=await this._loadMetaData();let s=null;for(const t of i.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of i.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await U(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function V(e,t,r=null,a=null){return new J(e,t,r,a)}function K(e,t,r=null,a=null){return new Y(e,t,r,a)}function $(e,t,r,a,i){if(null===e)return null;if((0,s.k)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof k.A&&(0,h.eB)(e)){switch(t){case"datasource":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a)}return null}if((0,s.a4)(e)){switch(t){case"datasource":return P(e.parent,i,e.parent.outFields,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,e.parent.outFields,!0,r,a)}return null}return null}async function z(e,t,r,a,i,s,n,l=null){if(O.A.applicationCache){const o=O.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return H(await o,t,r,a,i,n,l)}if(null!=n){const o=n.getCachedPortalItem(s.url,e);if(null!=o)return await H(await o,t,r,a,i,n,l)}const o=new x.default({id:e,portal:s}).load();O.A.applicationCache?O.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=n&&n.setCachedPortalItem(s.url,e,o);try{return await H(await o,t,r,a,i,n,l)}catch(t){throw O.A.applicationCache&&O.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=n&&n.removeCachedPortalItem(s.url,e,o),t}}const W=new Set(["Apache Parquet","Parquet layer","Parquet Layer","Parquet feature layer","Parquet Feature Layer"]);async function H(e,t,r,a,i,s,n){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await U((0,h.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=W.has(e.type)?Promise.resolve(new j.default({data:new D.A({portalItem:e})})):k.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=W.has(e.type)?new j.default({data:new D.A({portalItem:e})}):await k.A.fromPortalItem(e)}return P(l,r,a,i,s,n)}},35704(e,t,r){r.d(t,{A:()=>o});var a=r(48938),i=r(87449),s=r(11221),n=(r(33325),r(80609)),l=r(89696);class o extends s.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof l.A?(this._whereClause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereClause=null)}_initialiseFeatureSet(){this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes}async _queryAll(){return(await this.query({abortSignal:a._})).features}async query(e){let t=e.where,r=!0;null!==this._whereClauseFunction?r=!1:null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,await this._ensureLoaded();const a=await this._parent.query({...e,where:t,limit:r?e.limit:null});return(0,i.dZ)(e.abortSignal),a.filterApplied&&null==this._whereClauseFunction?a:{...a,features:this._applyFilter(a.features,e.abortSignal)}}async*_applyFilter(e,t){for await(const r of e)if((0,i.dZ)(t),null!=this._whereClause){const e=r.filter(e=>this._whereClause.testFeature(e));e.length>0&&(yield e)}else if(null!=this._whereClauseFunction){const e=[];for(const t of r)await this._whereClauseFunction(t)&&e.push(t);e.length>0&&(yield e)}else yield r}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1};let t=this._whereClause;null!=e.where&&null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,e.where));const r=await this._parent.queryStat({...e,where:t});return r.calculated?r:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,this._parent.queryAggregate({...e,where:t})}getFieldsIndex(){return this._parent.getFieldsIndex()}}},30235(e,t,r){r.d(t,{A:()=>h});var a=r(48938),i=r(87449),s=r(11221),n=(r(33325),r(80609)),l=r(4576),o=r(39516),u=r(91075),d=r(18589),c=r(33143),y=r(20437);class h extends s.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||this._layer.objectIdField===r||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:a._})).features}_queryLayerFeaturesJSON(e){return"queryFeaturesJSON"in this._layer?this._layer.queryFeaturesJSON(e):this._layer.source.queryFeaturesJSON(e)}async query(e){await this._ensureLoaded();let t=null,r=!1;if(null!=e.orderBy&&(t=e.orderBy.toOrderByFields(),r=!0),this.isTable()&&null!=e.spatialFilter)return s.An;const a=this._createQuery();return a.where=(0,o.mA)(a.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,n.YY)(e.where,0)),null!=e.spatialFilter&&(a.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),a.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),a.geometry=e.spatialFilter.geometry),a.outSpatialReference=this.spatialReference,a.orderByFields=t,a.num=e.limit,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){const t=await this._queryLayerFeaturesJSON(a);(0,i.dZ)(e.abortSignal);for(const e of(0,l.Ho)(t.features,this._maxQueryRate()))(0,s.Rn)(e,t.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new i.dr("NeverReach")}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetadata(){return[]}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const a=e.layerDefinition.typeIdField??"",i=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)i.push(c.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let n=e.featureSet.features;if(!r){let t=!1;for(const a of e.layerDefinition.fields)if("oid"===a.type||"esriFieldTypeOID"===a.type){r=a.name,t=!0;break}if(!1===t){let t="FID",a=!0,i=0;for(;a;){let r=!0;for(const a of e.layerDefinition.fields)if(a.name===t){r=!1;break}!0===r?a=!1:(i++,t="FID"+i.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let r=0;r<n.length;r++)s.push({geometry:e.featureSet.features[r].geometry,attributes:{...e.featureSet.features[r].attributes,[t]:r}});n=s,r=t}}const l=[];for(const t of e.layerDefinition.fields)t instanceof y.A?l.push(t):l.push(y.A.fromJSON(t));let o=s;switch(o||(o=""),o){case"esriGeometryPoint":o="point";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryEnvelope":o="extent";break;case"esriGeometryMultipoint":o="multipoint";break;case"":case"esriGeometryNull":o="esriGeometryNull"}if("esriGeometryNull"!==o){const e=t.toJSON();for(const t of n)t.geometry&&t.geometry instanceof u.A==0&&(t.geometry.type=o,void 0===t.geometry.spatialReference&&(t.geometry.spatialReference=e))}else for(const e of n)e.geometry&&(e.geometry=null);const p={outFields:["*"],source:n,fields:l,hasZ:!0===e.layerDefinition.hasZ||!0===e.featureSet.hasZ,hasM:!0===e.layerDefinition.hasM||!0===e.featureSet.hasM,types:i,typeIdField:a,objectIdField:r,spatialReference:t},f="esriGeometryNull"===o||null===o;f||(p.geometryType=o);const m=new d.default(p);return e.layerDefinition.subtypeField&&e.layerDefinition.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new h({layer:m,spatialReference:t,isTable:f})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._queryLayerFeaturesJSON(t);return 1===r.features.length?((0,s.Rn)(r.features,r.spatialReference??this.spatialReference.toJSON()),r.features[0]):null}serviceUrl(){return""}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return"timeInfo"in this._layer?this._layer.timeInfo:null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},88930(e,t,r){r.d(t,{S1:()=>l,VW:()=>o,lL:()=>u,rb:()=>d,t:()=>c});var a=r(97770),i=(r(98623),r(34747));const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function l(e,t,r,s="system"){if("unknown"===r)return e;const n=new i.oh((0,a.wj)(s)),l=i.c9.fromJSDate(e,{zone:n}),o="decades"===r||"centuries"===r?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[o]:t}).toJSDate()}function o(e,t,r="milliseconds"){const a=e.getTime(),i=c(t,r,"milliseconds");return new Date(a+i)}function u(e,t,r="system"){const{unit:s}=t,n=Math.max(1,Math.trunc(t.value)),l=new i.oh((0,a.wj)(r)),o=i.c9.fromJSDate(e,{zone:l}),u=e=>e-e%n;switch(s){case"milliseconds":return o.startOf("second").plus({millisecond:u(o.millisecond)}).toJSDate();case"seconds":return o.startOf("minute").plus({second:u(o.second)}).toJSDate();case"minutes":return o.startOf("hour").plus({minute:u(o.minute)}).toJSDate();case"hours":return o.startOf("day").plus({hour:u(o.hour)}).toJSDate();case"days":return o.startOf("month").plus({day:u(o.day-1)}).toJSDate();case"weeks":{const e=o.startOf("year").startOf("week"),t=Math.floor(o.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return o.startOf("year").plus({month:u(o.month-1)}).toJSDate();case"years":case"decades":case"centuries":{const e=o.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*n,r=e.year-e.year%t;return e.set({year:r}).toJSDate()}case"unknown":return e}}function d(e){const t=s.exec(e);if(!t)return null;const{hh:r,mm:a,ss:i,ms:l}=t.groups;return Number(r)*n.hours+Number(a)*n.minutes+Number(i||0)*n.seconds+Number(l||0)}function c(e,t,r){return 0===e?0:e*n[t]/n[r]}},4146(e,t,r){r.d(t,{A:()=>g});var a=r(32198),i=r(11254),s=r(49186),n=r(65529),l=r(4902),o=r(92474),u=r(53966),d=r(17676),c=r(84952),y=r(91429),h=r(5443),p=r(16930),f=r(92602),m=r(79677);let _=0,g=class extends((0,n.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,p.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=p.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(()=>r(27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:a}=await Promise.all([r.e(9917),r.e(812),r.e(8559)]).then(()=>r(45613));try{return await a(t)}catch(e){const r=t?.portalItem,a=r?.id||"unset",i=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+a+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,d.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,a.Cg)([(0,y.MZ)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"effectiveVisible",null),(0,a.Cg)([(0,y.MZ)({type:h.A})],g.prototype,"fullExtent",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,a.Cg)([(0,y.MZ)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,a.Cg)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,a.Cg)([(0,y.MZ)({clonable:!1})],g.prototype,"parent",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],g.prototype,"persistenceEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,a.Cg)([(0,y.MZ)({type:p.A})],g.prototype,"spatialReference",void 0),(0,a.Cg)([(0,y.MZ)({type:String})],g.prototype,"title",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,a.Cg)([(0,y.MZ)()],g.prototype,"url",void 0),(0,a.Cg)([(0,y.MZ)({type:m.A})],g.prototype,"visibilityTimeExtent",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,a.Cg)([(0,y.$K)("esri.layers.Layer")],g)},52136(e,t,r){var a=r(32198),i=r(91429);r.d(t,["p",0,e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,a.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,a.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},28032(e,t,r){r.d(t,{A:()=>o});var a=r(32198),i=r(69540),s=r(25482),n=r(91429),l=r(56400);let o=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,a.Cg)([(0,n.MZ)()],o.prototype,"creatorField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"creationDateField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"editorField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"editDateField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"realm",void 0),(0,a.Cg)([(0,n.MZ)((0,l.P6)("dateFieldsTimeReference",!0))],o.prototype,"timeZone",void 0),o=(0,a.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],o)},33143(e,t,r){r.d(t,{A:()=>c});var a=r(32198),i=r(69540),s=r(25482),n=r(91429),l=r(8631),o=r(29005),u=r(36005),d=r(43937);let c=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,a.Cg)([(0,u.w)("domains")],c.prototype,"readDomains",null),(0,a.Cg)([(0,d.K)("domains")],c.prototype,"writeDomains",null),(0,a.Cg)([(0,n.MZ)({type:[o.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,a.Cg)([(0,n.$K)("esri.layers.support.FeatureType")],c)},37352(e,t,r){r.d(t,{A:()=>o});var a,i=r(32198),s=r(7762),n=r(25482),l=r(91429);let o=a=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new a({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],o.prototype,"floorField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllLevelIds",void 0),o=a=(0,i.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],o)},45067(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),s=r(66552),n=r(25482),l=r(91429);const o=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,i.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,a.Cg)([(0,l.MZ)({json:{read:o.read,write:o.write}})],d.prototype,"cardinality",void 0),(0,a.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"role",void 0),d=(0,a.Cg)([(0,l.$K)("esri.layers.support.Relationship")],d)},41560(e,t,r){r.d(t,{Ch:()=>n,mW:()=>s});var a=r(34727),i=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:a}of e.filters)t[0]=Math.max(t[0],d(r)),t[1]=Math.min(t[1],c(a));return t}(e);if(s&&((0,a.gg)(t,s[0])||(0,a.ZH)(r,s[1])))return"";const n=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const i=d(e.at(0)?.minScale),s=c(e.at(-1)?.maxScale);if((0,a.ZH)(i,t)||(0,a.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,a.ZH)(d(i.minScale),c(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const a of e.filters)o(a.minScale,a.maxScale,t,r)&&(yield a)}}function o(e,t,r,i){return e=d(e),r=d(r),t=c(t),!(!(0,a.Sp)(r,e)&&(i??r)>e||(0,a.Hx)(t,r)||void 0!==i&&(0,a.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function d(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},77548(e,t,r){r.d(t,{Gh:()=>q,tk:()=>C,BR:()=>v,p2:()=>I,qd:()=>A,wI:()=>T,G$:()=>L,$x:()=>R,Ov:()=>w,cM:()=>y,UC:()=>h,Qz:()=>p,OP:()=>M,TU:()=>g,F2:()=>f,XX:()=>_,Qi:()=>F,jy:()=>b});var a=r(70333),i=r(11254),s=r(7762),n=(r(84952),r(36563)),l=r(36708),o=r(4146);const u=new WeakMap;function d(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof o.A)&&("catalog-dynamic-group"===t.type||d(t))},t=>u.set(e,t),l.pc),(0,n.hA)(()=>u.delete(e))]),u.get(e))}function c(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function y(e){return c(e,"knowledge-graph")&&"layers"in e}function h(e){return c(e,"knowledge-graph-sublayer")}function p(e){return c(e,"link-chart")&&"layers"in e}function f(e){return c(e,"subtype-group")&&"sublayers"in e}function m(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const _={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function g(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function F(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function b(e){return function(e){return c(e,"catalog-footprint")}(e)||function(e){return c(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return c(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function S(e){const t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!b(e))return;const r=t?.graphic,a="featureReduction"in e?e.featureReduction:null;if(r){if(r.isAggregate){const e=r.origin;return e&&"featureReductionProvider"in e&&a?S(a)?a:null:void 0}return e}return t?.checkFeatureReduction&&a?S(a)?a:null:e}async function T(e,t){const r=a.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const n=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,i.A)(n,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function v(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"dimension-feature":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"parquet":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function C(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function A(e){const t=new s.A;for(const r of e.allLayers.concat(e.allTables))d(r)||m(r)||"annotation-feature"===r.type||"dimension-feature"===r.type||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function R(e,t){return null}function L(e){return null}function M(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function q(e,t){if(!t||!M(e))return;const r=(e.url,null);r&&(e.url=r)}},73133(e,t,r){const a=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});r.d(t,["j",0,a])},10536(e,t,r){function a(e){const t={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[r]=[];for(let e=0;e<i.length;e++)t[r][e]=a(i[e])}else"object"==typeof i?i.toJSON&&(t[r]=JSON.stringify(i)):t[r]=i}return t}r.d(t,{z:()=>a})},17126(e,t,r){r.d(t,{dw:()=>n,qD:()=>l,qW:()=>o});var a=r(11254),i=r(21325),s=r(10536);function n(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!t?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=(0,i.YX)(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function l(e,t,r){const a=await u(e,t,r),i=a.data,s=i.geometryType,n=i.spatialReference,l={};for(const e of i.relatedRecordGroups){const t={fields:void 0,geometryType:s,spatialReference:n,hasZ:!!i.hasZ,hasM:!!i.hasM,features:e.relatedRecords};if(null!=e.objectId)l[e.objectId]=t;else for(const r of Object.keys(e))"relatedRecords"!==r&&(l[e[r]]=t)}return{...a,data:l}}async function o(e,t,r){const a=await u(e,t,r,{returnCountOnly:!0}),i=a.data,s={};for(const e of i.relatedRecordGroups)null!=e.objectId&&(s[e.objectId]=e.count);return{...a,data:s}}async function u(e,t,r={},i){const l=(0,s.z)({...e.query,f:"json",...i,...n(t,i)});return(0,a.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...l}})}},16215(e,t,r){r.d(t,{S:()=>i});const a=Symbol("BasemapInstance");function i(e){return null!=e&&"object"==typeof e&&a in e}r.d(t,["Y",0,a])},79677(e,t,r){r.d(t,{A:()=>c});var a,i=r(32198),s=r(25482),n=r(88930),l=r(91429),o=(r(98623),r(10184)),u=r(36005),d=r(43937);let c=class extends s.o{static{a=this}static get allTime(){return y}static get empty(){return h}static fromArray(e){return new a({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(a.allTime)}get isEmpty(){return this.equals(a.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new a({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,a=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===a&&r===i}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&(r=(0,n.lL)(r,new o.A({value:1,unit:e}),t));let i=this.end;if(i){const r=(0,n.lL)(i,new o.A({value:1,unit:e}),t);i=i.getTime()===r.getTime()?r:(0,n.S1)(r,1,e,t)}return new a({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return a.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let n,l;return i>=t&&i<=r?n=i:t>=i&&t<=s&&(n=t),r>=i&&r<=s?l=r:s>=t&&s<=r&&(l=s),null==n||null==l||isNaN(n)||isNaN(l)?a.empty:new a({start:n===-1/0?null:new Date(n),end:l===1/0?null:new Date(l)})}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const i=new a,{start:s,end:l}=this;return null!=s&&(i.start=(0,n.S1)(s,e,t,r)),null!=l&&(i.end=(0,n.S1)(l,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new a({start:t,end:r})}};(0,i.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i.Cg)([(0,u.w)("end")],c.prototype,"readEnd",null),(0,i.Cg)([(0,d.K)("end")],c.prototype,"writeEnd",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i.Cg)([(0,u.w)("start")],c.prototype,"readStart",null),(0,i.Cg)([(0,d.K)("start")],c.prototype,"writeStart",null),c=a=(0,i.Cg)([(0,l.$K)("esri.time.TimeExtent")],c);const y=new c,h=new c({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),s=r(25482),n=r(88930),l=r(91429),o=r(73133),u=r(93223);let d=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.t)(this.value,this.unit,"milliseconds")}};(0,a.Cg)([(0,u.e)(o.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,a.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,a.Cg)([(0,l.$K)("esri.time.TimeInterval")],d)}}]);
@@ -0,0 +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(32198),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),f=r(60950),g=r(89808),b=r(99959);const v=Symbol("isAnnotationFeatureGraphicOrigin");var M;class C extends b.A{get[(M=v,f.ym)](){return this.layer}get[m.e](){return this.layer}get[g.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 S=r(4146),F=r(52136),I=r(18768),w=r(63074),A=r(69208),E=r(40775),Z=r(47685),x=r(10086),T=r(34287),O=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.maxScale=0,this.minScale=0,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)()],P.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)()],P.prototype,"minScale",void 0),(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,x.j)((0,w.dM)((0,k.e)((0,Z.w6)((0,j.j)((0,L.J)((0,I.b)((0,T.q)((0,O.A)((0,u.M)((0,A.d)((0,F.p)((0,o.OU)(S.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(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(32198),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(32198),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(32186)),r.e(2558).then(()=>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 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1550,1666,1948,6671,7992,8125,9397],{61691(t,e,r){r.d(e,{G:()=>s});class s{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}},76061(t,e,r){r.d(e,{S:()=>n});var s=r(61691);class n extends s.G{m_aGeoms;m_iGeom=-1;constructor(t){super(),this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},69397(t,e,r){r.d(e,{Qf:()=>o,Qh:()=>i,lM:()=>n});var s=r(34275);function n(t){if(!t)return 0;let e=u;for(const r in t)t.hasOwnProperty(r)&&(e+=a(t[r],!1));return e}function i(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let r=c;for(let s=0;s<e;s++)r+=a(t[s]);return r}(t);let e=u;for(const r in t)t.hasOwnProperty(r)&&(e+=a(t[r]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?i(t):u;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+l:Array.isArray(e)?h(e,16):0:0),0)}function h(t,e){return c+t.length*e}const u=32,c=16,l=145},87992(t,e,r){r.d(e,{JR:()=>V,ME:()=>M,MY:()=>Z,NO:()=>C,Nh:()=>P,V2:()=>S,_s:()=>_,e6:()=>b,gh:()=>E,tr:()=>I,uX:()=>p});var s=r(32198),n=r(16930),i=r(19419),a=r(60408),o=r(21325),h=r(513),u=r(50954),c=r(79567),l=r(52006),f=r(49663),m=r(46068),g=r(92722);class p{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:h,segmentFlags:u,segmentIndices:c,segmentParams:l,segmentCountArc:f,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=h,this.segmentFlags=u,this.segmentIndices=c,this.segmentParams=l,this.segmentCountArc=f,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?64+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){const{type:t,vertexCount:e,partCount:r,hasZ:s,hasM:n,segmentCountArc:i,segmentCountBezier:a}=this,o=S(t,e,r,s,n,this.hasCurves(),i,a);o.spatialReference=this.spatialReference;const{vertexXY:h,vertexZ:u,vertexM:c}=this;if(o.vertexXY.set(h.subarray(0,2*e),0),o.vertexZ?.set(u.subarray(0,e),0),o.vertexM?.set(c.subarray(0,e),0),this.isMultipart()){const{partOffsets:t,partFlags:e}=this;o.partFlags.set(e.subarray(0,r+1)),o.partOffsets.set(t.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:t,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(t.subarray(0,e),0),o.segmentIndices.set(r.subarray(0,e),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!(0,o.aI)(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let e=0;e<this.vertexCount;++e)if(r(this.vertexXY[2*e],t.vertexXY[2*e])||r(this.vertexXY[2*e+1],t.vertexXY[2*e+1]))return!1;if(this.hasZ)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexZ[e],t.vertexZ[e]))return!1;if(this.hasM)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexM[e],t.vertexM[e]))return!1;for(let e=0;e<this.partCount;++e)if(this.partFlags[e]!==t.partFlags[e]||this.partOffsets[e]!==t.partOffsets[e])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new x(this):[][Symbol.iterator]()}}class x{constructor(t){this.geometry=t,this.value=new y(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class y{constructor(t){this.geometry=t,this.index=-1,this._readVertex=A(t),this._segments=new d(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class d{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new v(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class v{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=A(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[r++],s=e[r++],n=e[r++],i=e[r++];return{b:[this.end,[t,s],[n,i]]}}const s=e[r++],n=e[r++],i=e[r++],a=e[r++],o=e[r++],h=e[r++];r++,r++;const u=e[r++],c=e[r++];if(!Boolean(4&s)&&1===i)return{c:[this.end,[u,c]]};const l=2&s?0:1,f=1&s?0:1;return{a:[this.end,[o,h],l,f,a,n,i]}}}function C(t,e){const r={stack:[],error:void 0,hasError:!1};try{return e??=(0,i.Ie)(),(0,s.mS)(r,new R(t,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(e,function(t){let e;const{vertexCount:r,vertexXY:n,vertexZ:a,vertexM:o}=t,h=w(t);if(t.hasCurves()){const r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,new R(t,["vertexZ","vertexM"]),!1);const n=(0,i.Ie)();for(const e of t.parts){let t=e.startVertex;for(const{curve:r}of e.segments)(0,c.e)(n,t,r),t=(0,l.yP)(r)}const[a,o,u,f]=n;e={xmin:a,ymin:o,xmax:u,ymax:f,spatialReference:h}}catch(t){r.error=t,r.hasError=!0}finally{(0,s.hk)(r)}}else{let t,s,i,a;t=s=1/0,i=a=-1/0;for(let e=0;e<r;++e){const r=n[2*e],o=n[2*e+1];t=Math.min(t,r),i=Math.max(i,r),s=Math.min(s,o),a=Math.max(a,o)}e={xmin:t,ymin:s,xmax:i,ymax:a,spatialReference:h}}if(a){let t=1/0,r=-1/0;for(const e of a)t=Math.min(t,e),r=Math.max(r,e);e.zmin=t,e.zmax=r}if(o){let t=1/0,r=-1/0;for(const e of o)t=Math.min(t,e),r=Math.max(r,e);e.mmin=t,e.mmax=r}return e}(t)),e}catch(t){r.error=t,r.hasError=!0}finally{(0,s.hk)(r)}}function M(t){let e,r,s;if((0,a.fT)(t)){s="point";const{x:n,y:i,z:a,m:o}=t,h=[n,i];null!=a&&h.push(a),null!=o&&h.push(o),r=[[h]],e=1}else(0,a.U9)(t)?(s="multipoint",r=[t.points],e=t.points.length):(0,a.Rg)(t)?(s="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(s="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>(0===e.length||(t+=e.length,O(e[0],(0,l.yP)(e.at(-1)))&&--t),t),0));const n=S(s,e,s.includes("point")?0:r.length,(0,a.Pv)(t),(0,a.W0)(t),(0,l.Ed)(t)),{hasZ:i,hasM:o,vertexXY:h,vertexZ:u,vertexM:c}=n;function f(t){h[2*g]=t[0],h[2*g+1]=t[1],i&&(u[g]=t[2]),o&&(c[g]=t[m]),++g}n.spatialReference=t.spatialReference??void 0;const m=n.hasZ?3:2;let g=0;if(!n.isMultipart()){if(!i&&!o){for(const[t,e]of r[0])h[2*g]=t,h[2*g+1]=e,++g;return n}for(const t of r[0])f(t);return n}const p="polygon"===s,{partOffsets:x}=n;let y=0;if(!(0,l.Ed)(t)){for(const t of r){if(x[y++]=g,0===t.length)continue;let e=t.length;if(p&&O(t[0],t.at(-1))&&--e,i||o)for(let r=0;r<e;++r)f(t[r]);else for(let r=0;r<e;++r){const[e,s]=t[r];h[2*g]=e,h[2*g+1]=s,++g}}return x[y]=g,n}function d(t){const e=v+t;if(e<=(n.segmentParams?.length??0))return;let r=e*F;r=20*Math.ceil(r/20);const s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let v=0;for(const t of r){if(n.partOffsets[y++]=g,0===t.length)continue;const e=t[0];let r=e;for(let e=1;e<t.length;++e){const s=t[e];f(r);const i=g-1;(0,l.wY)(s)?(d(10),++n.segmentCountArc,v=_(r,s,n,i,v),r=s.a[0]):(0,l.DA)(s)?(d(10),++n.segmentCountArc,v=Y(r,s,n,i,v),r=s.a[0]):(0,l.aO)(s)?(d(10),++n.segmentCountArc,v=b(r,s,n,i,v),r=s.c[0]):(0,l.n1)(s)?(d(4),++n.segmentCountBezier,v=I(0,s,n,i,v),r=s.b[0]):r=s}p&&O(e,r)||f(r)}return n.partOffsets[y]=g,n}function E(t){const e=A(t),{vertexCount:r,partCount:s,hasZ:n,hasM:i}=t,a=w(t);if("point"===t.type){const[e,r]=t.vertexXY,s=t.vertexZ?.[0],n=t.vertexM?.[0];return{x:e,y:r,z:s,m:n,spatialReference:a}}let o=0;if("multipoint"===t.type){const t=[];for(;o<r;)t.push(e(o++));return{points:t,spatialReference:a,hasZ:n,hasM:i}}const h="polygon"===t.type;if(!t.hasCurves()){const r=new Array;for(let n=0;n<s;++n){const s=t.partOffsets[n+1],i=new Array;for(;o<s;)i.push(e(o++));h&&i.length>0&&i.push(i[0]),r.push(i)}return h?{rings:r,hasZ:n,hasM:i,spatialReference:a}:{paths:r,hasZ:n,hasM:i,spatialReference:a}}const u=new Array;for(const{segments:e,startVertex:r}of t.parts){const t=[r];for(const{curve:r}of e)t.push(r);u.push(t)}return h?{rings:[],curveRings:u,hasZ:n,hasM:i,spatialReference:a}:{paths:[],curvePaths:u,hasZ:n,hasM:i,spatialReference:a}}function P(t,{lengths:e,coords:r,hasZ:s,hasM:n},i){const a=t.includes("point")?0:e.length,o="polygon"===t,h="point"===t?1:e.reduce((t,e)=>t+e,0)-(o?a:0);s??=!1,n??=!1;const u=S(t,h,a,s,n,!1,0,0);if(u.spatialReference=i??void 0,!u.isMultipart()){for(let t=0,e=0;t<h;++t)u.vertexXY[2*t]=r[e++],u.vertexXY[2*t+1]=r[e++],s&&(u.vertexZ[t]=r[e++]),n&&(u.vertexM[t]=r[e++]);return u}const c=2+Number(s)+Number(n);let l=0,f=0;u.partOffsets[0]=0;for(const t of e){const e=u.partOffsets[f],i=e+t-Number(o);u.partOffsets[++f]=i;for(let t=e;t<i;++t)u.vertexXY[2*t]=r[l++],u.vertexXY[2*t+1]=r[l++],s&&(u.vertexZ[t]=r[l++]),n&&(u.vertexM[t]=r[l++]);o&&(l+=c)}return u}function V({type:t,vertexCount:e,vertexXY:r,vertexZ:s,vertexM:n,partCount:i,partOffsets:a,hasZ:o,hasM:h}){const u=new g.A([],[],o,h);i=Math.max(i,1);const c="polygon"===t;let l=0;for(let t=0;t<i;++t){const i=a?.[t+1]??e,f=u.coords.length;for(let t=l;t<i;++t)u.coords.push(r[2*t],r[2*t+1]),o&&u.coords.push(s[t]),h&&u.coords.push(n[t]);if(c){const t=l;u.coords.push(r[2*t],r[2*t+1]),o&&u.coords.push(s[t]),h&&u.coords.push(n[t])}u.lengths.push((u.coords.length-f)/u.stride),l=i}return"point"===t&&(u.lengths.length=0),u}function Z(t,e){return"getSpatialReference"in t&&(e=function(t){if(null==t)return;const e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let s=t.getLatestID();(s<=0||s===r)&&(s=void 0);const n=t.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:e};const i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:e};let a=t.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:e,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}(t.getSpatialReference()),t=t.getGeometry()),new p({...t.toFlatGeometry(),spatialReference:e})}class R{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function w({spatialReference:t}){return t instanceof n.A?t.toJSON():t}function A({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?s=>[t[2*s],t[2*s+1],e[s],r[s]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function O(t,e){return t.every((t,r)=>t===e[r])}function S(t,e,r,s,n,i,a,o){a??=0,o??=0;const h=new p({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o});let u=2*Float64Array.BYTES_PER_ELEMENT*e;s&&(u+=Float64Array.BYTES_PER_ELEMENT*e),n&&(u+=Float64Array.BYTES_PER_ELEMENT*e),h.isMultipart()&&(u+=(r+1)*Int32Array.BYTES_PER_ELEMENT,u+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(u+=e*Int8Array.BYTES_PER_ELEMENT,u+=e*Int32Array.BYTES_PER_ELEMENT,u+=h.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const c=new ArrayBuffer(u);let l=0;return h.vertexXY=new Float64Array(c,l,2*e),l+=h.vertexXY.byteLength,s&&(h.vertexZ=new Float64Array(c,l,e),l+=h.vertexZ.byteLength),n&&(h.vertexM=new Float64Array(c,l,e),l+=h.vertexM.byteLength),i&&(h.segmentParams=new Float64Array(c,l,h.segmentParamCount),l+=h.segmentParams.byteLength,h.segmentIndices=new Int32Array(c,l,e),h.segmentIndices.fill(X),l+=h.segmentIndices.byteLength),h.isMultipart()&&(h.partOffsets=new Int32Array(c,l,r+1),l+=h.partOffsets.byteLength,h.partFlags=new Int8Array(c,l,r+1),l+=h.partFlags.byteLength,"polygon"===h.type&&h.partFlags.subarray(0,r).fill(1)),i&&(h.segmentFlags=new Int8Array(c,l,e),h.segmentFlags.fill(1),l+=h.segmentFlags.byteLength),h}function _(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;const[o,[h,u],c,l,f,g,p]=e.a;let x=4;l||(x|=1),c||(x|=2);const y=(0,m.SW)(t,e),[d,v]=(0,m.Uk)(y,.5);return n[a++]=x,n[a++]=g,n[a++]=p,n[a++]=f,n[a++]=h,n[a++]=u,n[a++]=y.u2-y.u1,n[a++]=y.u1,n[a++]=d,n[a++]=v,a}function Y(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;const o=(0,f.io)(t,e);return G(o,4,...(0,h.mq)(o,.5),n,a)}function b(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){return r[i]=4,s[i]=a,G((0,u.pM)(t,e),0,...e.c[1],n,a)}function G(t,e,r,s,n,i){const{cx:a,cy:o,thetaStart:h,thetaEnd:u,radius:c}=t;return h>u||(e|=1),Math.abs(u-h)<=Math.PI||(e|=2),n[i++]=e,n[i++]=c,n[i++]=1,n[i++]=0,n[i++]=a,n[i++]=o,n[i++]=u-h,n[i++]=h,n[i++]=r,n[i++]=s,i}function I(t,{b:[e,[r,s],[n,i]]},{segmentFlags:a,segmentIndices:o,segmentParams:h},u,c){return a[u]=2,o[u]=c,h[c++]=r,h[c++]=s,h[c++]=n,h[c++]=i,c}const F=1.61803,X=-1},30912(t,e,r){r.r(e),r.d(e,{accelerateGeometry:()=>a,execute:()=>o});var s=r(39117),n=r(78125);const i=new s.x;function a(t){const e=(0,n.getSpatialReference)(t);return i.accelerateGeometry((0,n.fromGeometry)(t),(0,n.fromSpatialReference)(e),1)}function o(t,e){return i.execute((0,n.fromGeometry)(t),(0,n.fromGeometry)(e),(0,n.fromSpatialReference)(t.spatialReference),null)}const h=i.supportsCurves();r.d(e,["supportsCurves",0,h])},78125(t,e,r){r.r(e),r.d(e,{fromExtent:()=>x,fromGeometry:()=>p,fromMultipoint:()=>y,fromPoint:()=>d,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>M,fromSpatialReference:()=>E,getSpatialReference:()=>g,toExtent:()=>V,toGeometry:()=>P,toMultipoint:()=>Z,toPoint:()=>R,toPolygon:()=>w,toPolyline:()=>A});var s=r(83661),n=r(55537),i=r(95213),a=r(88885),o=r(5443),h=r(48526),u=r(86738),c=r(39829),l=r(82799),f=(r(90293),r(83299));const m="_gxVersion";function g(t){return Array.isArray(t)?t[0].spatialReference:t.spatialReference}function p(t){switch(t.type){case"point":return d(t);case"multipoint":return y(t);case"polyline":return C(t);case"polygon":return v(t);case"extent":return x(t);default:throw new Error(`Unsupported geometry type: ${t.type}`)}}function x(t){if(!t.getCacheValue(m)){const e=new i.E;e.setCoords(t.xmin,t.ymin,t.xmax,t.ymax),t.hasM&&e.setInterval(2,0,t.mmin,t.mmax),t.hasZ&&e.setInterval(1,0,t.zmin,t.zmax),t.setCacheValue(m,e)}return t.getCacheValue(m)}function y(t){if(!t.getCacheValue(m)){const e=new a.M,r=new i.P,s=t.points,n=t.hasM,o=t.hasZ,h=o?3:2;for(let t=0,i=s.length;t<i;t++){const i=s[t];r.setXYCoords(i[0],i[1]),o&&r.setZ(i[2]??0),n&&r.setM(i[h]??NaN),e.add(r)}t.setCacheValue(m,e)}return t.getCacheValue(m)}function d(t){if(!t.getCacheValue(m)){const e=new i.P;e.setXYCoords(t.x,t.y),t.hasM&&e.setM(t.m),t.hasZ&&e.setZ(t.z),t.setCacheValue(m,e)}return t.getCacheValue(m)}function v(t){if(!t.getCacheValue(m)){const{curveRings:e,hasM:r,hasZ:s,rings:n}=t,i=(0,f.fromGeometryToGXGeometry)({curveRings:e,hasM:r,hasZ:s,rings:n});t.setCacheValue(m,i)}return t.getCacheValue(m)}function C(t){if(!t.getCacheValue(m)){const{curvePaths:e,hasM:r,hasZ:s,paths:n}=t,i=(0,f.fromGeometryToGXGeometry)({curvePaths:e,hasM:r,hasZ:s,paths:n});t.setCacheValue(m,i)}return t.getCacheValue(m)}function M(t){if(!t.getCacheValue(m)){const{curvePaths:e,hasM:r,hasZ:s,paths:n}=t,i=(0,f.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:e,hasM:r,hasZ:s,paths:n});t.setCacheValue(m,i)}return t.getCacheValue(m)}function E(t){return t.cache?(t.cache[m]??=(0,f.fromSpatialReference)(t),t.cache[m]):(0,f.fromSpatialReference)(t)}function P(t,e){if(t)switch(t.getGeometryType()){case n.G.enumPoint:return R(t,e);case n.G.enumEnvelope:return V(t,e);case n.G.enumMultiPoint:return Z(t,e);case n.G.enumPolyline:return A(t,e);case n.G.enumPolygon:return w(t,e)}return null}function V(t,e){if(t.isEmpty())return null;const r=new o.A({xmin:t.getXMin(),ymin:t.getYMin(),xmax:t.getXMax(),ymax:t.getYMax(),spatialReference:e}),s=t.getDescription();if(s.hasM()){const e=t.queryInterval(2,0);r.mmin=e.vmin,r.mmax=e.vmax}if(s.hasZ()){const e=t.queryInterval(1,0);r.zmin=e.vmin,r.zmax=e.vmax}return r.setCacheValue(m,t),r}function Z(t,e){if(t.isEmpty())return null;const r=t.getDescription(),s=r.hasM(),n=r.hasZ(),a=[],o=new i.P;for(let e=0,r=t.getPointCount();e<r;e++){t.getPointByVal(e,o);const r=[o.getX(),o.getY()];n&&r.push(o.getZ()),s&&r.push(o.getM()),a.push(r)}const u=new h.A({hasM:s,hasZ:n,points:a,spatialReference:e});return u.setCacheValue(m,t),u}function R(t,e){if(t instanceof s.P)return new u.A({x:t.x,y:t.y,spatialReference:e});if(t.isEmpty())return null;const r=new u.A({x:t.getX(),y:t.getY(),spatialReference:e}),n=t.getDescription();return n.hasM()&&(r.m=t.getM()),n.hasZ()&&(r.z=t.getZ()),r.setCacheValue(m,t),r}function w(t,e){if(t.isEmpty())return null;const r=c.A.fromJSON({...(0,f.toGeometry)(t,null),spatialReference:e});return r.setCacheValue(m,t),r}function A(t,e){if(t.isEmpty())return null;const r=l.A.fromJSON({...(0,f.toGeometry)(t,null),spatialReference:e});return r.setCacheValue(m,t),r}},92722(t,e,r){r.d(e,{A:()=>n});var s=r(69397);class n{constructor(t=[],e=[],r=!1,s=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:s}){return new n(t,e,r||!1,s||!1)}static fromRect([t,e,r,s]){const i=r-t,a=s-e;return new n([5],[t,e,i,0,0,a,-i,0,0,-a])}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,s.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:s}=this;let n=this.coords[s*e],i=this.coords[s*e+1];for(let a=1;a<r;a+=1){const r=s*(e+a),o=this.coords[r],h=this.coords[r+1];t+=-.5*(o-n)*(h+i),n=o,i=h}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 s of this.lengths){for(let n=0;n<s;n++){const s=r*(e+n);t(this.coords[s],this.coords[s+1])}e+=s}}deltaDecode(){const t=this.clone(),{coords:e,lengths:r}=t;let s=0;const{stride:n}=this;for(const t of r){for(let r=1;r<t;r++){const t=n*(s+r);e[t]+=e[t-n],e[t+1]+=e[t+1-n]}s+=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:s}=this,i=this.coords.slice(0,s*r);return t?(t.set(i),new n(e,t,this.hasZ,this.hasM)):new n(e,Array.from(i),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,s=0;e<r.length;e+=t)r[s++]=this.coords[e],r[s++]=this.coords[e+1];return new n(this.lengths,r,!1,!1)}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1550,1666,1948,6671,7992,8125,9397],{61691(t,e,r){r.d(e,{G:()=>s});class s{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}},76061(t,e,r){r.d(e,{S:()=>n});var s=r(61691);class n extends s.G{m_aGeoms;m_iGeom=-1;constructor(t){super(),this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},69397(t,e,r){r.d(e,{Qf:()=>o,Qh:()=>i,lM:()=>n});var s=r(34275);function n(t){if(!t)return 0;let e=u;for(const r in t)t.hasOwnProperty(r)&&(e+=a(t[r],!1));return e}function i(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let r=c;for(let s=0;s<e;s++)r+=a(t[s]);return r}(t);let e=u;for(const r in t)t.hasOwnProperty(r)&&(e+=a(t[r]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?i(t):u;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+l:Array.isArray(e)?h(e,16):0:0),0)}function h(t,e){return c+t.length*e}const u=32,c=16,l=145},87992(t,e,r){r.d(e,{JR:()=>V,ME:()=>M,MY:()=>Z,NO:()=>C,Nh:()=>P,V2:()=>S,_s:()=>_,e6:()=>b,gh:()=>E,tr:()=>F,uX:()=>p});var s=r(32198),n=r(16930),i=r(19419),a=r(60408),o=r(21325),h=r(513),u=r(50954),c=r(79567),l=r(52006),f=r(49663),g=r(46068),m=r(92722);class p{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:h,segmentFlags:u,segmentIndices:c,segmentParams:l,segmentCountArc:f,segmentCountBezier:g}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=h,this.segmentFlags=u,this.segmentIndices=c,this.segmentParams=l,this.segmentCountArc=f,this.segmentCountBezier=g}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?64+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){const{type:t,vertexCount:e,partCount:r,hasZ:s,hasM:n,segmentCountArc:i,segmentCountBezier:a}=this,o=S(t,e,r,s,n,this.hasCurves(),i,a);o.spatialReference=this.spatialReference;const{vertexXY:h,vertexZ:u,vertexM:c}=this;if(o.vertexXY.set(h.subarray(0,2*e),0),o.vertexZ?.set(u.subarray(0,e),0),o.vertexM?.set(c.subarray(0,e),0),this.isMultipart()){const{partOffsets:t,partFlags:e}=this;o.partFlags.set(e.subarray(0,r+1)),o.partOffsets.set(t.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:t,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(t.subarray(0,e),0),o.segmentIndices.set(r.subarray(0,e),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!(0,o.aI)(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let e=0;e<this.vertexCount;++e)if(r(this.vertexXY[2*e],t.vertexXY[2*e])||r(this.vertexXY[2*e+1],t.vertexXY[2*e+1]))return!1;if(this.hasZ)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexZ[e],t.vertexZ[e]))return!1;if(this.hasM)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexM[e],t.vertexM[e]))return!1;for(let e=0;e<this.partCount;++e)if(this.partFlags[e]!==t.partFlags[e]||this.partOffsets[e]!==t.partOffsets[e])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new x(this):[][Symbol.iterator]()}}class x{constructor(t){this.geometry=t,this.value=new y(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class y{constructor(t){this.geometry=t,this.index=-1,this._readVertex=R(t),this._segments=new d(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class d{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new v(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class v{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=R(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[r++],s=e[r++],n=e[r++],i=e[r++];return{b:[this.end,[t,s],[n,i]]}}const s=e[r++],n=e[r++],i=e[r++],a=e[r++],o=e[r++],h=e[r++];r++,r++;const u=e[r++],c=e[r++];if(!Boolean(4&s)&&1===i)return{c:[this.end,[u,c]]};const l=2&s?0:1,f=1&s?0:1;return{a:[this.end,[o,h],l,f,a,n,i]}}}function C(t,e){const r={stack:[],error:void 0,hasError:!1};try{return e??=(0,i.Ie)(),(0,s.mS)(r,new w(t,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(e,function(t){let e;const{vertexCount:r,vertexXY:n,vertexZ:a,vertexM:o}=t,h=A(t);if(t.hasCurves()){const r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,new w(t,["vertexZ","vertexM"]),!1);const n=(0,i.Ie)();for(const e of t.parts){let t=e.startVertex;for(const{curve:r}of e.segments)(0,c.e)(n,t,r),t=(0,l.yP)(r)}const[a,o,u,f]=n;e={xmin:a,ymin:o,xmax:u,ymax:f,spatialReference:h}}catch(t){r.error=t,r.hasError=!0}finally{(0,s.hk)(r)}}else{let t,s,i,a;t=s=1/0,i=a=-1/0;for(let e=0;e<r;++e){const r=n[2*e],o=n[2*e+1];t=Math.min(t,r),i=Math.max(i,r),s=Math.min(s,o),a=Math.max(a,o)}e={xmin:t,ymin:s,xmax:i,ymax:a,spatialReference:h}}if(a){let t=1/0,r=-1/0;for(const e of a)t=Math.min(t,e),r=Math.max(r,e);e.zmin=t,e.zmax=r}if(o){let t=1/0,r=-1/0;for(const e of o)t=Math.min(t,e),r=Math.max(r,e);e.mmin=t,e.mmax=r}return e}(t)),e}catch(t){r.error=t,r.hasError=!0}finally{(0,s.hk)(r)}}function M(t){let e,r,s;if((0,a.fT)(t)){s="point";const{x:n,y:i,z:a,m:o}=t,h=[n,i];null!=a&&h.push(a),null!=o&&h.push(o),r=[[h]],e=1}else(0,a.U9)(t)?(s="multipoint",r=[t.points],e=t.points.length):(0,a.Rg)(t)?(s="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(s="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>(0===e.length||(t+=e.length,O(e[0],(0,l.yP)(e.at(-1)))&&--t),t),0));const n=S(s,e,s.includes("point")?0:r.length,(0,a.Pv)(t),(0,a.W0)(t),(0,l.Ed)(t)),{hasZ:i,hasM:o,vertexXY:h,vertexZ:u,vertexM:c}=n;function f(t){h[2*m]=t[0],h[2*m+1]=t[1],i&&(u[m]=t[2]),o&&(c[m]=t[g]),++m}n.spatialReference=t.spatialReference??void 0;const g=n.hasZ?3:2;let m=0;if(!n.isMultipart()){if(!i&&!o){for(const[t,e]of r[0])h[2*m]=t,h[2*m+1]=e,++m;return n}for(const t of r[0])f(t);return n}const p="polygon"===s,{partOffsets:x}=n;let y=0;if(!(0,l.Ed)(t)){for(const t of r){if(x[y++]=m,0===t.length)continue;let e=t.length;if(p&&O(t[0],t.at(-1))&&--e,i||o)for(let r=0;r<e;++r)f(t[r]);else for(let r=0;r<e;++r){const[e,s]=t[r];h[2*m]=e,h[2*m+1]=s,++m}}return x[y]=m,n}function d(t){const e=v+t;if(e<=(n.segmentParams?.length??0))return;let r=e*G;r=20*Math.ceil(r/20);const s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let v=0;for(const t of r){if(n.partOffsets[y++]=m,0===t.length)continue;const e=t[0];let r=e;for(let e=1;e<t.length;++e){const s=t[e];f(r);const i=m-1;(0,l.wY)(s)?(d(10),++n.segmentCountArc,v=_(r,s,n,i,v),r=s.a[0]):(0,l.DA)(s)?(d(10),++n.segmentCountArc,v=Y(r,s,n,i,v),r=s.a[0]):(0,l.aO)(s)?(d(10),++n.segmentCountArc,v=b(r,s,n,i,v),r=s.c[0]):(0,l.n1)(s)?(d(4),++n.segmentCountBezier,v=F(0,s,n,i,v),r=s.b[0]):r=s}p&&O(e,r)||f(r)}return n.partOffsets[y]=m,n}function E(t){const e=R(t),{vertexCount:r,partCount:s,hasZ:n,hasM:i}=t,a=A(t);if("point"===t.type){const[e,r]=t.vertexXY,s=t.vertexZ?.[0],n=t.vertexM?.[0];return{x:e,y:r,z:s,m:n,spatialReference:a}}let o=0;if("multipoint"===t.type){const t=[];for(;o<r;)t.push(e(o++));return{points:t,spatialReference:a,hasZ:n,hasM:i}}const h="polygon"===t.type;if(!t.hasCurves()){const r=new Array;for(let n=0;n<s;++n){const s=t.partOffsets[n+1],i=new Array;for(;o<s;)i.push(e(o++));h&&i.length>0&&i.push(i[0]),r.push(i)}return h?{rings:r,hasZ:n,hasM:i,spatialReference:a}:{paths:r,hasZ:n,hasM:i,spatialReference:a}}const u=new Array;for(const{segments:e,startVertex:r}of t.parts){const t=[r];for(const{curve:r}of e)t.push(r);u.push(t)}return h?{rings:[],curveRings:u,hasZ:n,hasM:i,spatialReference:a}:{paths:[],curvePaths:u,hasZ:n,hasM:i,spatialReference:a}}function P(t,{lengths:e,coords:r,hasZ:s,hasM:n},i){const a=t.includes("point")?0:e.length,o="polygon"===t,h="point"===t?1:e.reduce((t,e)=>t+e,0)-(o?a:0);s??=!1,n??=!1;const u=S(t,h,a,s,n,!1,0,0);if(u.spatialReference=i??void 0,!u.isMultipart()){for(let t=0,e=0;t<h;++t)u.vertexXY[2*t]=r[e++],u.vertexXY[2*t+1]=r[e++],s&&(u.vertexZ[t]=r[e++]),n&&(u.vertexM[t]=r[e++]);return u}const c=2+Number(s)+Number(n);let l=0,f=0;u.partOffsets[0]=0;for(const t of e){const e=u.partOffsets[f],i=e+t-Number(o);u.partOffsets[++f]=i;for(let t=e;t<i;++t)u.vertexXY[2*t]=r[l++],u.vertexXY[2*t+1]=r[l++],s&&(u.vertexZ[t]=r[l++]),n&&(u.vertexM[t]=r[l++]);o&&(l+=c)}return u}function V({type:t,vertexCount:e,vertexXY:r,vertexZ:s,vertexM:n,partCount:i,partOffsets:a,hasZ:o,hasM:h}){const u=new m.A([],[],o,h);i=Math.max(i,1);const c="polygon"===t;let l=0;for(let t=0;t<i;++t){const i=a?.[t+1]??e,f=u.coords.length;for(let t=l;t<i;++t)u.coords.push(r[2*t],r[2*t+1]),o&&u.coords.push(s[t]),h&&u.coords.push(n[t]);if(c){const t=l;u.coords.push(r[2*t],r[2*t+1]),o&&u.coords.push(s[t]),h&&u.coords.push(n[t])}u.lengths.push((u.coords.length-f)/u.stride),l=i}return"point"===t&&(u.lengths.length=0),u}function Z(t,e){return"getSpatialReference"in t&&(e=function(t){if(null==t)return;const e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let s=t.getLatestID();(s<=0||s===r)&&(s=void 0);const n=t.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:e};const i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:e};let a=t.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:e,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}(t.getSpatialReference()),t=t.getGeometry()),new p({...t.toFlatGeometry(),spatialReference:e})}class w{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function A({spatialReference:t}){return t instanceof n.A?t.toJSON():t}function R({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?s=>[t[2*s],t[2*s+1],e[s],r[s]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function O(t,e){return t.every((t,r)=>t===e[r])}function S(t,e,r,s,n,i,a,o){a??=0,o??=0;const h=new p({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o});let u=2*Float64Array.BYTES_PER_ELEMENT*e;s&&(u+=Float64Array.BYTES_PER_ELEMENT*e),n&&(u+=Float64Array.BYTES_PER_ELEMENT*e),h.isMultipart()&&(u+=(r+1)*Int32Array.BYTES_PER_ELEMENT,u+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(u+=e*Int8Array.BYTES_PER_ELEMENT,u+=e*Int32Array.BYTES_PER_ELEMENT,u+=h.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const c=new ArrayBuffer(u);let l=0;return h.vertexXY=new Float64Array(c,l,2*e),l+=h.vertexXY.byteLength,s&&(h.vertexZ=new Float64Array(c,l,e),l+=h.vertexZ.byteLength),n&&(h.vertexM=new Float64Array(c,l,e),l+=h.vertexM.byteLength),i&&(h.segmentParams=new Float64Array(c,l,h.segmentParamCount),l+=h.segmentParams.byteLength,h.segmentIndices=new Int32Array(c,l,e),h.segmentIndices.fill(X),l+=h.segmentIndices.byteLength),h.isMultipart()&&(h.partOffsets=new Int32Array(c,l,r+1),l+=h.partOffsets.byteLength,h.partFlags=new Int8Array(c,l,r+1),l+=h.partFlags.byteLength,"polygon"===h.type&&h.partFlags.subarray(0,r).fill(1)),i&&(h.segmentFlags=new Int8Array(c,l,e),h.segmentFlags.fill(1),l+=h.segmentFlags.byteLength),h}function _(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;const[o,[h,u],c,l,f,m,p]=e.a;let x=4;l||(x|=1),c||(x|=2);const y=(0,g.SW)(t,e),[d,v]=(0,g.Uk)(y,.5);return n[a++]=x,n[a++]=m,n[a++]=p,n[a++]=f,n[a++]=h,n[a++]=u,n[a++]=y.u2-y.u1,n[a++]=y.u1,n[a++]=d,n[a++]=v,a}function Y(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;const o=(0,f.io)(t,e);return I(o,4,...(0,h.mq)(o,.5),n,a)}function b(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){return r[i]=4,s[i]=a,I((0,u.pM)(t,e),0,...e.c[1],n,a)}function I(t,e,r,s,n,i){const{cx:a,cy:o,thetaStart:h,thetaEnd:u,radius:c}=t;return h>u||(e|=1),Math.abs(u-h)<=Math.PI||(e|=2),n[i++]=e,n[i++]=c,n[i++]=1,n[i++]=0,n[i++]=a,n[i++]=o,n[i++]=u-h,n[i++]=h,n[i++]=r,n[i++]=s,i}function F(t,{b:[e,[r,s],[n,i]]},{segmentFlags:a,segmentIndices:o,segmentParams:h},u,c){return a[u]=2,o[u]=c,h[c++]=r,h[c++]=s,h[c++]=n,h[c++]=i,c}const G=1.61803,X=-1},30912(t,e,r){r.d(e,{containsExecute:()=>a});var s=r(39117),n=(r(51447),r(53966),r(78125));const i=new s.x;function a(t,e){return i.execute((0,n.fromGeometry)(t),(0,n.fromGeometry)(e),(0,n.fromSpatialReference)(t.spatialReference),null)}const o=i.supportsCurves();Boolean(o)},78125(t,e,r){r.r(e),r.d(e,{fromExtent:()=>x,fromGeometry:()=>p,fromMultipoint:()=>y,fromPoint:()=>d,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>M,fromSpatialReference:()=>E,getSpatialReference:()=>m,toExtent:()=>V,toGeometry:()=>P,toMultipoint:()=>Z,toPoint:()=>w,toPolygon:()=>A,toPolyline:()=>R});var s=r(83661),n=r(55537),i=r(95213),a=r(88885),o=r(5443),h=r(48526),u=r(86738),c=r(39829),l=r(82799),f=(r(90293),r(83299));const g="_gxVersion";function m(t){return Array.isArray(t)?t[0].spatialReference:t.spatialReference}function p(t){switch(t.type){case"point":return d(t);case"multipoint":return y(t);case"polyline":return C(t);case"polygon":return v(t);case"extent":return x(t);default:throw new Error(`Unsupported geometry type: ${t.type}`)}}function x(t){if(!t.getCacheValue(g)){const e=new i.E;e.setCoords(t.xmin,t.ymin,t.xmax,t.ymax),t.hasM&&e.setInterval(2,0,t.mmin,t.mmax),t.hasZ&&e.setInterval(1,0,t.zmin,t.zmax),t.setCacheValue(g,e)}return t.getCacheValue(g)}function y(t){if(!t.getCacheValue(g)){const e=new a.M,r=new i.P,s=t.points,n=t.hasM,o=t.hasZ,h=o?3:2;for(let t=0,i=s.length;t<i;t++){const i=s[t];r.setXYCoords(i[0],i[1]),o&&r.setZ(i[2]??0),n&&r.setM(i[h]??NaN),e.add(r)}t.setCacheValue(g,e)}return t.getCacheValue(g)}function d(t){if(!t.getCacheValue(g)){const e=new i.P;e.setXYCoords(t.x,t.y),t.hasM&&e.setM(t.m),t.hasZ&&e.setZ(t.z),t.setCacheValue(g,e)}return t.getCacheValue(g)}function v(t){if(!t.getCacheValue(g)){const{curveRings:e,hasM:r,hasZ:s,rings:n}=t,i=(0,f.fromGeometryToGXGeometry)({curveRings:e,hasM:r,hasZ:s,rings:n});t.setCacheValue(g,i)}return t.getCacheValue(g)}function C(t){if(!t.getCacheValue(g)){const{curvePaths:e,hasM:r,hasZ:s,paths:n}=t,i=(0,f.fromGeometryToGXGeometry)({curvePaths:e,hasM:r,hasZ:s,paths:n});t.setCacheValue(g,i)}return t.getCacheValue(g)}function M(t){if(!t.getCacheValue(g)){const{curvePaths:e,hasM:r,hasZ:s,paths:n}=t,i=(0,f.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:e,hasM:r,hasZ:s,paths:n});t.setCacheValue(g,i)}return t.getCacheValue(g)}function E(t){return t.cache?(t.cache[g]??=(0,f.fromSpatialReference)(t),t.cache[g]):(0,f.fromSpatialReference)(t)}function P(t,e){if(t)switch(t.getGeometryType()){case n.G.enumPoint:return w(t,e);case n.G.enumEnvelope:return V(t,e);case n.G.enumMultiPoint:return Z(t,e);case n.G.enumPolyline:return R(t,e);case n.G.enumPolygon:return A(t,e)}return null}function V(t,e){if(t.isEmpty())return null;const r=new o.A({xmin:t.getXMin(),ymin:t.getYMin(),xmax:t.getXMax(),ymax:t.getYMax(),spatialReference:e}),s=t.getDescription();if(s.hasM()){const e=t.queryInterval(2,0);r.mmin=e.vmin,r.mmax=e.vmax}if(s.hasZ()){const e=t.queryInterval(1,0);r.zmin=e.vmin,r.zmax=e.vmax}return r.setCacheValue(g,t),r}function Z(t,e){if(t.isEmpty())return null;const r=t.getDescription(),s=r.hasM(),n=r.hasZ(),a=[],o=new i.P;for(let e=0,r=t.getPointCount();e<r;e++){t.getPointByVal(e,o);const r=[o.getX(),o.getY()];n&&r.push(o.getZ()),s&&r.push(o.getM()),a.push(r)}const u=new h.A({hasM:s,hasZ:n,points:a,spatialReference:e});return u.setCacheValue(g,t),u}function w(t,e){if(t instanceof s.P)return new u.A({x:t.x,y:t.y,spatialReference:e});if(t.isEmpty())return null;const r=new u.A({x:t.getX(),y:t.getY(),spatialReference:e}),n=t.getDescription();return n.hasM()&&(r.m=t.getM()),n.hasZ()&&(r.z=t.getZ()),r.setCacheValue(g,t),r}function A(t,e){if(t.isEmpty())return null;const r=c.A.fromJSON({...(0,f.toGeometry)(t,null),spatialReference:e});return r.setCacheValue(g,t),r}function R(t,e){if(t.isEmpty())return null;const r=l.A.fromJSON({...(0,f.toGeometry)(t,null),spatialReference:e});return r.setCacheValue(g,t),r}},92722(t,e,r){r.d(e,{A:()=>n});var s=r(69397);class n{constructor(t=[],e=[],r=!1,s=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:s}){return new n(t,e,r||!1,s||!1)}static fromRect([t,e,r,s]){const i=r-t,a=s-e;return new n([5],[t,e,i,0,0,a,-i,0,0,-a])}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,s.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:s}=this;let n=this.coords[s*e],i=this.coords[s*e+1];for(let a=1;a<r;a+=1){const r=s*(e+a),o=this.coords[r],h=this.coords[r+1];t+=-.5*(o-n)*(h+i),n=o,i=h}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 s of this.lengths){for(let n=0;n<s;n++){const s=r*(e+n);t(this.coords[s],this.coords[s+1])}e+=s}}deltaDecode(){const t=this.clone(),{coords:e,lengths:r}=t;let s=0;const{stride:n}=this;for(const t of r){for(let r=1;r<t;r++){const t=n*(s+r);e[t]+=e[t-n],e[t+1]+=e[t+1-n]}s+=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:s}=this,i=this.coords.slice(0,s*r);return t?(t.set(i),new n(e,t,this.hasZ,this.hasM)):new n(e,Array.from(i),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,s=0;e<r.length;e+=t)r[s++]=this.coords[e],r[s++]=this.coords[e+1];return new n(this.lengths,r,!1,!1)}}}}]);