@arcgis/core 5.2.0-next.167 → 5.2.0-next.168

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 (245) hide show
  1. package/Map.d.ts +6 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/057f245d70e57a1bcb46.js +1 -0
  4. package/assets/esri/core/workers/chunks/{1419bf346978b81b08cc.js → 094eb9677cdebfaa9e1b.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0d52e1b6d38f2670658c.js +1 -0
  6. package/assets/esri/core/workers/chunks/0f7455dbe8c2ee464194.js +1 -0
  7. package/assets/esri/core/workers/chunks/10878932826ddb60fac4.js +1 -0
  8. package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +1 -0
  9. package/assets/esri/core/workers/chunks/{3dddae78286d05eb10fc.js → 181b58bbbbfe4557ab5d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1a614bac5db42c6263f8.js +1 -0
  11. package/assets/esri/core/workers/chunks/{99a0a434ea2162166754.js → 2095f220dc2b8f8f62db.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{5daa9429808ca31279f2.js → 216a239142dfe1306c6c.js} +1 -1
  13. package/assets/esri/core/workers/chunks/25c3be410d1c03f8f39d.js +1 -0
  14. package/assets/esri/core/workers/chunks/294276ed397023dcda44.js +1 -0
  15. package/assets/esri/core/workers/chunks/2a2a4650dd9b953d317c.js +1 -0
  16. package/assets/esri/core/workers/chunks/2b6684d057d9ad17ac13.js +1 -0
  17. package/assets/esri/core/workers/chunks/{ad96132bc89671e595f3.js → 2d3e0e4442dbc6ec6def.js} +1 -1
  18. package/assets/esri/core/workers/chunks/2d83ba260dd6bbe38206.js +1 -0
  19. package/assets/esri/core/workers/chunks/{69d5f8ef78b9b8b3d33d.js → 3286cf2afeb7f48564d9.js} +1 -1
  20. package/assets/esri/core/workers/chunks/3321cb0d4cb68b2ec8bf.js +1 -0
  21. package/assets/esri/core/workers/chunks/{e99c8c71c757bb161d87.js → 3636c2ac9b77950776d6.js} +1 -1
  22. package/assets/esri/core/workers/chunks/367b2f25cfe37847a48d.js +1 -0
  23. package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +1 -0
  24. package/assets/esri/core/workers/chunks/3c881b1adc8a5dea9a90.js +1 -0
  25. package/assets/esri/core/workers/chunks/{6a2562cc00727155fc01.js → 4024becaf4012c1f15a7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/435ad7e6ed326da2b969.js +1 -0
  27. package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +1 -0
  28. package/assets/esri/core/workers/chunks/46f0510846a309a390ca.js +1 -0
  29. package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +1 -0
  30. package/assets/esri/core/workers/chunks/509a74e9334f31b931d4.js +1 -0
  31. package/assets/esri/core/workers/chunks/50e8943d2c0b96fab2c1.js +1 -0
  32. package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +1 -0
  33. package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d90a3bfd45b5ed4092e0.js → 590fe0f56bc4c33a50e7.js} +1 -1
  35. package/assets/esri/core/workers/chunks/5d42f0898bf30ae940ea.js +1 -0
  36. package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +29 -0
  37. package/assets/esri/core/workers/chunks/{5d2f043ebe1051326c56.js → 63b5418a1c3fe0a97a86.js} +1 -1
  38. package/assets/esri/core/workers/chunks/63c3a573dfe703056f8f.js +1 -0
  39. package/assets/esri/core/workers/chunks/673c61c964524150d9bc.js +1 -0
  40. package/assets/esri/core/workers/chunks/692f0093c444fcc752b5.js +1 -0
  41. package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +1 -0
  42. package/assets/esri/core/workers/chunks/{e6d10136bc08aef255ff.js → 712559f121f76c4e71ab.js} +1 -1
  43. package/assets/esri/core/workers/chunks/71a51795f715332fb4fe.js +1 -0
  44. package/assets/esri/core/workers/chunks/735c1dffc3439bdba3cc.js +1 -0
  45. package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +1 -0
  46. package/assets/esri/core/workers/chunks/{44d5508042cacdfcac47.js → 7d2be06dfbd92c8b9484.js} +1 -1
  47. package/assets/esri/core/workers/chunks/7f5b887a753bb67c8486.js +1 -0
  48. package/assets/esri/core/workers/chunks/822f83d7c09ef0a9bbdf.js +1 -0
  49. package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +1 -0
  50. package/assets/esri/core/workers/chunks/{76196c414e48834f7b92.js → 8f008eedb11685ee2048.js} +1 -1
  51. package/assets/esri/core/workers/chunks/98760040f0c9d47c718d.js +1 -0
  52. package/assets/esri/core/workers/chunks/{4b99b4cf729881e616bc.js → 98d1efb6f2439c6344cf.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{18f20fd43ec9ce03cef1.js → 9e04703ee5f5ec47db43.js} +1 -1
  54. package/assets/esri/core/workers/chunks/9e0b0262dec496451762.js +1 -0
  55. package/assets/esri/core/workers/chunks/{23fd4de56de352f63e2d.js → a2196a49f89d57a0a1c7.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{89c8b0f684c1f27d149e.js → a2f0894218e665780a21.js} +1 -1
  57. package/assets/esri/core/workers/chunks/a79cae328e866272754a.js +1 -0
  58. package/assets/esri/core/workers/chunks/a85cdafbaf1848bb924b.js +1 -0
  59. package/assets/esri/core/workers/chunks/b01688ccc29d33bfc82d.js +1 -0
  60. package/assets/esri/core/workers/chunks/b0a612d8ffa5c46d7db4.js +1 -0
  61. package/assets/esri/core/workers/chunks/b5eff28cf482d920b9ea.js +1 -0
  62. package/assets/esri/core/workers/chunks/b70885deebc6106597ad.js +1 -0
  63. package/assets/esri/core/workers/chunks/bedaa5e64ed81803829a.js +1 -0
  64. package/assets/esri/core/workers/chunks/c0a956d57fa28fd31052.js +1 -0
  65. package/assets/esri/core/workers/chunks/{a88f346786b04bd194dc.js → c0b38f8c808d434af5f6.js} +1 -1
  66. package/assets/esri/core/workers/chunks/c1cf3edce15f09648eb4.js +1 -0
  67. package/assets/esri/core/workers/chunks/c249a91dd23104723fab.js +1 -0
  68. package/assets/esri/core/workers/chunks/c45edd0a7d57263bb7d6.js +1 -0
  69. package/assets/esri/core/workers/chunks/c4bbe4707e90b7cd0379.js +1 -0
  70. package/assets/esri/core/workers/chunks/c52466eb1f3c33ae1f5a.js +1 -0
  71. package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +1 -0
  72. package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +1 -0
  73. package/assets/esri/core/workers/chunks/c7699edd14497d174445.js +1 -0
  74. package/assets/esri/core/workers/chunks/c80a3b039e510c118399.js +1 -0
  75. package/assets/esri/core/workers/chunks/{196979cc6a765be3c5cd.js → c88a70f68c8ce8c30e9b.js} +1 -1
  76. package/assets/esri/core/workers/chunks/c9feffb9884cfed52c4b.js +1 -0
  77. package/assets/esri/core/workers/chunks/caaf6306cc73f618d27d.js +1 -0
  78. package/assets/esri/core/workers/chunks/{b704f489d0f072a0bfcd.js → ccd19c490ca24db6ffb1.js} +1 -1
  79. package/assets/esri/core/workers/chunks/cdacc3e42f01c3b852d6.js +1 -0
  80. package/assets/esri/core/workers/chunks/d1d6154b4af1c9cc497b.js +1 -0
  81. package/assets/esri/core/workers/chunks/d20dcd4ce4b0111d924f.js +1 -0
  82. package/assets/esri/core/workers/chunks/{784a2fba3e18286958d1.js → d56fdf5ce5ff53dc0e69.js} +1 -1
  83. package/assets/esri/core/workers/chunks/d7cf32a8c6060a208f06.js +1 -0
  84. package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +1 -0
  85. package/assets/esri/core/workers/chunks/dd08dff19a2ffd36f284.js +1 -0
  86. package/assets/esri/core/workers/chunks/de3f140058aa0b907b65.js +1 -0
  87. package/assets/esri/core/workers/chunks/df375d1b0dab5ecbd1be.js +1 -0
  88. package/assets/esri/core/workers/chunks/{e2775b4b753306dc8477.js → df7603ef7d2a7cbeaaa2.js} +1 -1
  89. package/assets/esri/core/workers/chunks/e9cdb0b0f074583edebd.js +1 -0
  90. package/assets/esri/core/workers/chunks/eaab787a5f2445be5e5a.js +1 -0
  91. package/assets/esri/core/workers/chunks/edd36a1fc80b1d29907e.js +1 -0
  92. package/assets/esri/core/workers/chunks/{444e5f214abce3d607cd.js → eeb068c265bd3a22a8c1.js} +1 -1
  93. package/assets/esri/core/workers/chunks/f2cfee8a761ae91f7a3e.js +1 -0
  94. package/assets/esri/core/workers/chunks/f3fdf75843ade0ca591e.js +1 -0
  95. package/assets/esri/core/workers/chunks/f5cc78291b53931b91e8.js +1 -0
  96. package/assets/esri/core/workers/chunks/f9dc38761b314d33890f.js +1 -0
  97. package/assets/esri/core/workers/chunks/feb6e041dd0aa1c59c31.js +1 -0
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ar.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bg.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bs.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ca.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.cs.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.da.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.de.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.el.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.es.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.et.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fi.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fr.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.he.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hr.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hu.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.id.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.it.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ja.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ko.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lt.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lv.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.nl.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.no.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pl.json +1 -1
  122. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-BR.json +1 -1
  123. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-PT.json +1 -1
  124. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ro.json +1 -1
  125. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ru.json +1 -1
  126. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sk.json +1 -1
  127. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sl.json +1 -1
  128. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sr.json +1 -1
  129. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sv.json +1 -1
  130. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.th.json +1 -1
  131. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.tr.json +1 -1
  132. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.uk.json +1 -1
  133. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.vi.json +1 -1
  134. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-CN.json +1 -1
  135. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-HK.json +1 -1
  136. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-TW.json +1 -1
  137. package/config.js +1 -1
  138. package/core/workers/workers.js +2 -2
  139. package/core/workers.d.ts +1 -1
  140. package/graphic/MapNotesGraphicOrigin.d.ts +1 -0
  141. package/kernel.js +1 -1
  142. package/layers/ElevationLayer.d.ts +6 -2
  143. package/layers/VectorTileLayer.d.ts +10 -1
  144. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  145. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  146. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  147. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  148. package/layers/orientedImagery/transformations/rotationUtils.js +2 -0
  149. package/layers/orientedImagery/transformations/utils.js +1 -1
  150. package/package.json +2 -2
  151. package/support/BasemapStyle.d.ts +2 -2
  152. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
  153. package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
  154. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  155. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  156. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  157. package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +2 -0
  158. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  159. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  160. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  161. package/widgets/OrientedImageryViewer.js +2 -2
  162. package/assets/esri/core/workers/chunks/010f57ec7fdbedf78d02.js +0 -1
  163. package/assets/esri/core/workers/chunks/02e10f44edf911832c2a.js +0 -1
  164. package/assets/esri/core/workers/chunks/07f7177bfaf9de73bc25.js +0 -1
  165. package/assets/esri/core/workers/chunks/090adefe20412e8a5084.js +0 -1
  166. package/assets/esri/core/workers/chunks/0d9c4c6c571ce26d356b.js +0 -1
  167. package/assets/esri/core/workers/chunks/1201b8c5852830836eac.js +0 -1
  168. package/assets/esri/core/workers/chunks/151e5799ede763a03ee2.js +0 -1
  169. package/assets/esri/core/workers/chunks/168a523bdc3653081f8a.js +0 -1
  170. package/assets/esri/core/workers/chunks/175c268e64ccd01f8c25.js +0 -1
  171. package/assets/esri/core/workers/chunks/18787aa685524b958561.js +0 -1
  172. package/assets/esri/core/workers/chunks/1e1c45f75020d5e05dc3.js +0 -1
  173. package/assets/esri/core/workers/chunks/28104681ba161967039f.js +0 -1
  174. package/assets/esri/core/workers/chunks/2a36fe3f3f257a779a1b.js +0 -1
  175. package/assets/esri/core/workers/chunks/30af63b3b750142faadb.js +0 -1
  176. package/assets/esri/core/workers/chunks/3f946c13ad97fbed867b.js +0 -1
  177. package/assets/esri/core/workers/chunks/40d803584eeade4df433.js +0 -1
  178. package/assets/esri/core/workers/chunks/41773d858e212468db88.js +0 -1
  179. package/assets/esri/core/workers/chunks/426b4eb500fdfe9df325.js +0 -1
  180. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +0 -1
  181. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +0 -1
  182. package/assets/esri/core/workers/chunks/4932773663469919d10a.js +0 -1
  183. package/assets/esri/core/workers/chunks/49b967d89d2841cea675.js +0 -1
  184. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +0 -1
  185. package/assets/esri/core/workers/chunks/4cb751dc8d00bdaeb04c.js +0 -1
  186. package/assets/esri/core/workers/chunks/4d3d7ec407ee5cd5f036.js +0 -1
  187. package/assets/esri/core/workers/chunks/4fd0d9688df6fcc0d0b8.js +0 -1
  188. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +0 -1
  189. package/assets/esri/core/workers/chunks/548b8f74a6883e364931.js +0 -1
  190. package/assets/esri/core/workers/chunks/5af8fb4ec2c72697e35b.js +0 -1
  191. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +0 -1
  192. package/assets/esri/core/workers/chunks/5dc604e3691f36f03959.js +0 -1
  193. package/assets/esri/core/workers/chunks/611e3cdf67283c11576f.js +0 -1
  194. package/assets/esri/core/workers/chunks/61552b4b8111a8624d84.js +0 -1
  195. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +0 -1
  196. package/assets/esri/core/workers/chunks/632fdf1d95ad69109427.js +0 -1
  197. package/assets/esri/core/workers/chunks/652faf4359ac072c5dde.js +0 -1
  198. package/assets/esri/core/workers/chunks/6b9961261241fdce0e94.js +0 -1
  199. package/assets/esri/core/workers/chunks/710b8251a59884aee31e.js +0 -1
  200. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +0 -29
  201. package/assets/esri/core/workers/chunks/7393f63043a1da3d05a6.js +0 -1
  202. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +0 -1
  203. package/assets/esri/core/workers/chunks/771dd92cb3e6a3427f66.js +0 -1
  204. package/assets/esri/core/workers/chunks/7748c2886d0122b40eeb.js +0 -1
  205. package/assets/esri/core/workers/chunks/78c4e43cfa1eda06b4d9.js +0 -1
  206. package/assets/esri/core/workers/chunks/7e0f04a5038e2a4f6e4b.js +0 -1
  207. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +0 -1
  208. package/assets/esri/core/workers/chunks/7f16ae01ccd9b6114d1c.js +0 -1
  209. package/assets/esri/core/workers/chunks/82a022cc21364c9a8539.js +0 -1
  210. package/assets/esri/core/workers/chunks/8924e2f3b7d03afb3a6a.js +0 -1
  211. package/assets/esri/core/workers/chunks/90153b5230b3a4985c14.js +0 -1
  212. package/assets/esri/core/workers/chunks/9189dfe19a2a2ccd5173.js +0 -1
  213. package/assets/esri/core/workers/chunks/9215b59c5ccecf9add58.js +0 -1
  214. package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +0 -1
  215. package/assets/esri/core/workers/chunks/967b4992b400517ee712.js +0 -1
  216. package/assets/esri/core/workers/chunks/9dd1fc56eb1ea6eb705e.js +0 -1
  217. package/assets/esri/core/workers/chunks/a163c6005aba3378edaa.js +0 -1
  218. package/assets/esri/core/workers/chunks/a53823cf03dbdce1aecd.js +0 -1
  219. package/assets/esri/core/workers/chunks/a62c12925303ff802c3d.js +0 -1
  220. package/assets/esri/core/workers/chunks/acb265a22be5e12f38e5.js +0 -1
  221. package/assets/esri/core/workers/chunks/acdfd275dbf8533a67f3.js +0 -1
  222. package/assets/esri/core/workers/chunks/ace802483484519658f3.js +0 -1
  223. package/assets/esri/core/workers/chunks/b3007aedbf731dacaff1.js +0 -1
  224. package/assets/esri/core/workers/chunks/b4334713bacdfe40ce3d.js +0 -1
  225. package/assets/esri/core/workers/chunks/b83cef2d3f528726d492.js +0 -1
  226. package/assets/esri/core/workers/chunks/be97a629e2ae4d13ceb3.js +0 -1
  227. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +0 -1
  228. package/assets/esri/core/workers/chunks/c47d095434d09b5f10c6.js +0 -1
  229. package/assets/esri/core/workers/chunks/c4b7111dcedd9d6e1c2a.js +0 -1
  230. package/assets/esri/core/workers/chunks/c5d85be6e16bc895e7fb.js +0 -1
  231. package/assets/esri/core/workers/chunks/c8d6bb5cca49926a0214.js +0 -1
  232. package/assets/esri/core/workers/chunks/cb4be68cc5085d421615.js +0 -1
  233. package/assets/esri/core/workers/chunks/cb4db5489388559d6bd9.js +0 -1
  234. package/assets/esri/core/workers/chunks/cc794bb94ebc1cb66024.js +0 -1
  235. package/assets/esri/core/workers/chunks/cc94bf05b235e65291fc.js +0 -1
  236. package/assets/esri/core/workers/chunks/d4af9faa5d901274fad2.js +0 -1
  237. package/assets/esri/core/workers/chunks/d77c68e0fc3b259bf4f9.js +0 -1
  238. package/assets/esri/core/workers/chunks/daf9b691817e83a11f3c.js +0 -1
  239. package/assets/esri/core/workers/chunks/de0f335f702ae85a1df3.js +0 -1
  240. package/assets/esri/core/workers/chunks/e11159e3dc3353b27c57.js +0 -1
  241. package/assets/esri/core/workers/chunks/f8379cd45f750f28a3d8.js +0 -1
  242. package/assets/esri/core/workers/chunks/f905f1a1aa4c123cbe83.js +0 -1
  243. package/assets/esri/core/workers/chunks/fd4635410b27bcedb752.js +0 -1
  244. package/assets/esri/core/workers/chunks/fda83bcb8e40e8044c24.js +0 -1
  245. package/assets/esri/core/workers/chunks/feb4f8c807bb0dca488f.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6553,9229],{56512(e,t,i){function r(e){let t,i,r=[],o=!1;return function(...n){return o&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(n,r)||(i=e.apply(this,n),t=this,r=n,o=!0),i}}i.d(t,{B:()=>r})},76553(e,t,i){function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{H:()=>r})},13069(e,t,i){i.d(t,{AG:()=>l,lk:()=>o,vD:()=>s,yS:()=>n});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o().toUpperCase()}}`}function s(){return`{${o()}}`}function l(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},65806(e,t,i){i.d(t,{g:()=>s});var r=i(51850),o=i(99917),n=i(9762);function s(e,t,i,r){if((0,o.canProjectWithoutEngine)(e.spatialReference,i))return l[0]=e.x,l[1]=e.y,l[2]=e.z??0,(0,n.projectBuffer)(l,e.spatialReference,0,t,i,0);let s=(0,o.tryProject)(e,i,r);return!!s&&(t[0]=s.x,t[1]=s.y,t[2]=s.z??0,!0)}const l=(0,r.vt)()},27993(e,t,i){i.d(t,{F:()=>l});var r=i(99917),o=i(16930),n=i(9762),s=i(65806);function l(e,t,i,o){return!(null==t||null==o||e.length<2)&&((0,r.canProjectWithoutEngine)(t,o)?(0,n.projectBuffer)(e,t,0,i,o,0,1):(a.x=e[0],a.y=e[1],a.z=e[2],a.spatialReference=t,(0,s.g)(a,i,o)))}const a={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},80754(e,t,i){i.d(t,{kS:()=>u,kd:()=>a});var r=i(82799),o=i(16930),n=i(60408),s=i(52006);const l={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let i of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of i){if((0,s.aO)(e)){let[i,r]=e.c;i[0]+=t,r[0]+=t;continue}if((0,s.FG)(e)){let[i,r]=e.a;i[0]+=t,r[0]+=t;continue}if((0,s.n1)(e)){let[i,r,o]=e.b;i[0]+=t,r[0]+=t,o[0]+=t;continue}e[0]+=t}for(let i of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of i)e[0]+=t;return e}i.d(t,["j7",0,l])},61528(e,t,i){i.r(t);var r=i(32198),o=i(56507),n=i(69540),s=i(49186),l=i(44208),a=i(53966),u=i(25728),p=i(17676),c=i(36708),h=i(91429),d=i(87024),f=i(5443),y=i(16930),g=i(4146),m=i(52136),v=i(18768),S=i(69208),_=i(34287),C=i(8303),M=i(25036),A=i(10873),w=i(58325),R=i(88546),x=i(20655),T=i(24212),E=i(80215),b=i(97159),Z=i(16215),k=i(72772),I=i(98697),G=i(36005);let P=class extends((0,v.b)((0,_.q)((0,C.A)((0,M.j)((0,u.M)((0,S.d)((0,m.p)((0,n.OU)(g.A))))))))){readModifications(e,t,i){this._modificationsSource={url:(0,b.f)(e,i),context:i}}initialize(){this.addHandles([(0,c.on)(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},c.OH),(0,c.wB)(()=>this.modifications,()=>this._modificationsGeneration++)])}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=R.Zx,this.fullExtent=R.zq,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null,this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null,this._modificationsGeneration=0,this._simulateGoogleUrl=!1}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[y.A.WGS84,this.esriCrsSpatialReference]:[y.A.WGS84]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[R.zq,this.esriCrsFullExtent]:[R.zq]}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){let t=[e];for(;t?.length>0;){let e=t.pop();if(!e)return;for(let[i,r]of Object.entries(e)){if("uri"===i)try{let e=new URL("https://tmp"+r).searchParams.get("session");if(e)return e}catch{}"object"==typeof r&&r&&t.push(r)}}return null}async requestRootAndSession(e){let t=(e,t)=>new s.A("3dtiles-init:"+e,t);return this._rootRequestPromise||=new Promise((i,r)=>{this.url||r(t("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null,new Promise((e,i)=>{if(this.replacesTerrain&&!this._key){let r=this.portalItem?.portal||this.parent?.portalItem?.portal||x.A.getDefault();r.signIn().then(()=>{r.g3dTilesEnabled?(0,o.A)(r.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>i(t("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):i(t("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+r.url))},()=>i(t("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{(0,o.A)(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(e){return void r(t("root-parse-failed","Error parsing root tile, details: "+e))}this._rootTilesetJSON?(this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=(0,R.uB)(this._rootTilesetJSON),(0,R._8)(this._rootTilesetJSON)&&(this.esriCrsFullExtent=(0,R.uB)(this._rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference),i(),this._rootRequestPromise=null):r(t("root-is-null","Root tile is null."))},e=>{(0,p.QP)(e),r(t("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,a.A.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>r(e))}),this._rootRequestPromise}_haveWGS84ZModifications(e){for(let t of e)if(!t.geometry?.spatialReference||115700===t.geometry?.spatialReference.vcsWkid&&4326===t.geometry?.spatialReference.wkid)return!0;return!1}async _doLoad(e){let t=null==e?null:e.signal;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(e){(0,p.QP)(e)}if(null!=this._modificationsSource){let t=await w.A.fromUrl(this._modificationsSource.url,this.spatialReference,e,!0);if(this._haveWGS84ZModifications(t)){await(0,k.initialize)();try{let e=(0,I.Ir)(null,t.toArray(),y.A.WGS84),i=(0,k.switchMeshModificationPolygonVCSSync)({modifications:e,inVCS:115700});i.success&&i.modifications&&(0,I.H1)(i.modifications,t)}catch(e){a.A.getLogger(this).error("convert-mesh-modification-z-error","Error when converting:",e)}}this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}async beforeSave(){if(null==this._modificationsSource){let{modifications:e}=this;return void(e&&e.length>0&&await(0,k.initialize)())}await this.load().then(()=>{},()=>{})}get memoizedElevationQueryDependencies(){return[this.loadStatus,null!=this.queryElevationCallback,(0,T.M7)(this.elevationInfo),this._modificationsGeneration]}get hasAttributionData(){return!1}_validateElevationInfo(e){let t="Integrated mesh 3d tiles layers";(0,T.XF)(a.A.getLogger(this),(0,T.B)(t,"absolute-height",e)),(0,T.XF)(a.A.getLogger(this),(0,T.tW)(t,e))}get replacesTerrain(){return this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return(0,l.A)("enable-feature:im-as-ground")?(0,Z.S)(this.parent)||(0,E.Q)(this.parent):(0,Z.S)(this.parent)}get hasGoogleUrl(){return this._simulateGoogleUrl||!!this.url?.match(/.+\.googleapis.com/)}get test(){}};(0,r.Cg)([(0,h.MZ)({type:["IntegratedMesh3DTilesLayer"]})],P.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,h.MZ)({type:w.A,clonable:e=>e?.clone()??null}),(0,d.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],P.prototype,"modifications",void 0),(0,r.Cg)([(0,h.MZ)({clonable:e=>e?{...e}:null})],P.prototype,"_modificationsSource",void 0),(0,r.Cg)([(0,G.w)(["web-scene","portal-item"],"modifications")],P.prototype,"readModifications",null),(0,r.Cg)([(0,h.MZ)({type:y.A})],P.prototype,"spatialReference",void 0),(0,r.Cg)([(0,h.MZ)({type:f.A})],P.prototype,"fullExtent",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],P.prototype,"supportedSpatialReferences",null),(0,r.Cg)([(0,h.MZ)({type:[f.A]})],P.prototype,"fullExtents",null),(0,r.Cg)([(0,h.MZ)(A.Yj)],P.prototype,"elevationInfo",null),(0,r.Cg)([(0,h.MZ)({type:["show","hide"]})],P.prototype,"listMode",void 0),(0,r.Cg)([(0,h.MZ)(A.OZ)],P.prototype,"url",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],P.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],P.prototype,"path",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],P.prototype,"minScale",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],P.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.MZ)()],P.prototype,"queryElevationCallback",void 0),(0,r.Cg)([(0,h.MZ)()],P.prototype,"_modificationsGeneration",void 0),(0,r.Cg)([(0,h.MZ)()],P.prototype,"memoizedElevationQueryDependencies",null),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],P.prototype,"hasAttributionData",null),(0,r.Cg)([(0,h.MZ)()],P.prototype,"replacesTerrain",null),(0,r.Cg)([(0,h.MZ)()],P.prototype,"isUsedAsGroundLayer",null),(0,r.Cg)([(0,h.MZ)()],P.prototype,"hasGoogleUrl",null),(0,r.Cg)([(0,h.MZ)()],P.prototype,"_simulateGoogleUrl",void 0),P=(0,r.Cg)([(0,h.$K)("esri.layers.IntegratedMesh3DTilesLayer")],P);const O=P;i.d(t,["default",0,O])},52136(e,t,i){var r=i(32198),o=i(91429);i.d(t,["p",0,e=>{let t=e,i=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._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,r.Cg)([(0,o.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,o.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},24212(e,t,i){i.d(t,{$7:()=>a,B:()=>l,M7:()=>c,XF:()=>p,tW:()=>u,w7:()=>s});var r=i(56512),o=i(86211),n=i(16271);function s(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?h:d}(e).mode}(null==e||(e.hasZ??!1),t)}function l(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function a(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function u(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function p(e,t){t&&e.warn(".elevationInfo=",t)}function c(e){return(e?.offset??0)*(0,n.Ao)(e?.unit)}(0,r.B)((e,t,i)=>{if(!e||"decimal-degrees"===t)return 0;let r="unknown"!==t&&t?t:"meters",n=(0,o.mq)(i);return n?(0,o.oU)(e,r,n):0});const h={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[118],{83349(e,t,n){n.d(t,{e:()=>o});const r=new Set;let i=!1;function o(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length;r.size&&r.clear();let l=s(e,0,o,n,!0),u=[];if(!l||l.next===l.prev)return u;let c=0,h=0,f=0;if(i&&(l=g(e,t,l,n)),e.length>80*n){c=e[0],h=e[1];let t=c,r=h;for(let i=n;i<o;i+=n){let n=e[i],o=e[i+1];n<c&&(c=n),o<h&&(h=o),n>t&&(t=n),o>r&&(r=o)}f=Math.max(t-c,r-h),f=0===f?0:32767/f}return a(l,u,c,h,f),u}function s(e,t,n,r,i){let o=null;if(i===k(e,t,n,r)>0)for(let i=t;i<n;i+=r)o=D(i/r|0,e[i],e[i+1],o);else for(let i=n-r;i>=t;i-=r)o=D(i/r|0,e[i],e[i+1],o);return o&&P(o,o.next)&&($(o),o=o.next),o}function l(e,t=e){let n,o=t===e,s=e;do{n=!1,s===s.next||0!==r.size&&r.has(s)||!P(s,s.next)&&0!==O(s.prev,s,s.next)?(o||s!==t)&&(s=s.next,n=!o):((o||s===t)&&(t=s.prev),i=!0,$(s),s=s.prev,n=!0)}while(n||s!==t);return t}function a(e,t,n,r,o){o&&function(e,t,n,r){let i=e,o=0;do{i.z=I(i.x,i.y,t,n,r),T[o++]=i,i=i.next}while(i!==e);!function(e){if(e<=32)for(let t=1;t<e;t++){let e=T[t],n=e.z,r=t-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=e}else{S.length<e&&(S=new Uint32Array(e),E=new Uint32Array(e),R=Array(e));for(let t=0;t<e;t++)S[t]=T[t].z;U(e,T,S,R,E,0),U(e,R,E,T,S,8),U(e,T,S,R,E,16),U(e,R,E,T,S,24)}}(o);let s=null;for(let e=0;e<o;e++){let t=T[e];t.prevZ=s,s&&(s.nextZ=t),s=t}s.nextZ=null,T.fill(null,0,o),R.fill(null,0,o)}(e,n,r,o);let s=e,a=!1;for(;e.prev!==e.next;){let p=e.prev,g=e.next;if(O(p,e,g)<0&&(o?c(e,n,r,o):u(e)))t.push(p.i,e.i,g.i),$(e),e=g,s=g;else if((e=g)===s){if(i=!1,e=l(e),i){s=e;continue}if(!a){s=e=h(e,t),a=!0;continue}f(e,t,n,r,o);break}}}function u(e){let t=e.prev,n=e,r=e.next,i=t.x,o=n.x,s=r.x,l=t.y,a=n.y,u=r.y,c=Math.min(i,o,s),h=Math.min(l,a,u),f=Math.max(i,o,s),p=Math.max(l,a,u),g=r.next;for(;g!==t;){if(g.x>=c&&g.x<=f&&g.y>=h&&g.y<=p&&(i!==g.x||l!==g.y)&&_(i,l,o,a,s,u,g.x,g.y)&&O(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function c(e,t,n,r){let i=e.prev,o=e,s=e.next,l=i.x,a=o.x,u=s.x,c=i.y,h=o.y,f=s.y,p=Math.min(l,a,u),g=Math.min(c,h,f),d=Math.max(l,a,u),y=Math.max(c,h,f),m=I(p,g,t,n,r),x=I(d,y,t,n,r),v=e.prevZ;for(;v&&v.z>=m;){if(v.x>=p&&v.x<=d&&v.y>=g&&v.y<=y&&v!==s&&(l!==v.x||c!==v.y)&&_(l,c,a,h,u,f,v.x,v.y)&&O(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let w=e.nextZ;for(;w&&w.z<=x;){if(w.x>=p&&w.x<=d&&w.y>=g&&w.y<=y&&w!==s&&(l!==w.x||c!==w.y)&&_(l,c,a,h,u,f,w.x,w.y)&&O(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function h(e,t){let n=e,r=!1;do{let i=n.prev,o=n.next.next;j(i,n,n.next,o,!1)&&B(i,o)&&B(o,i)&&(t.push(i.i,n.i,o.i),$(n),$(n.next),n=e=o,r=!0),n=n.next}while(n!==e);return r?l(n):n}function f(e,t,n,r,i){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&N(o,e)){let s=z(o,e);return o=l(o,o.next),s=l(s,s.next),a(o,t,n,r,i),void a(s,t,n,r,i)}e=e.next}o=o.next}while(o!==e)}let p=!1;function g(e,t,n,i){let o=[];for(let n=0,l=t.length;n<l;n++){let a=s(e,t[n]*i,n<l-1?t[n+1]*i:e.length,i,!1);a===a.next&&r.add(a),o.push(Z(a))}o.sort(d),function(e,t){let n=Math.ceil((e+2*t)/16)+t+2;m.length<4*n&&(m=new Float64Array(4*n)),x=0}(e.length/i,t.length),A(n,n),p=!0;for(let e=0;e<o.length;e++)n=y(o[e],n);return p=!1,l(n)}function d(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function y(e,t){let n=function(e,t){let n,r=t,i=e.x,o=e.y,s=-1/0;if(P(e,r))return r;for(let t=0,l=0;t<x;t++,l+=4){if(o<m[l+1]||o>m[l+3]||m[l]>i||m[l+2]<=s)continue;let a=b(t);r=M(t);do{if(r.prev.next===r){if(P(e,r.next))return r.next;if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){let e=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>s&&(s=e,n=r.x<r.next.x?r:r.next,e===i))return n}}r=r.next}while(r!==a)}if(!n)return null;let l=n.x,a=n.y,u=Math.min(o,a),c=Math.max(o,a),h=1/0;for(let t=0,f=0;t<x;t++,f+=4){if(m[f+2]<l||m[f]>i||m[f+3]<u||m[f+1]>c)continue;let p=b(t);r=M(t);do{if(r.prev.next===r&&i>=r.x&&r.x>=l&&i!==r.x&&_(o<a?i:s,o,l,a,o<a?s:i,o,r.x,r.y)){let t=Math.abs(o-r.y)/(i-r.x);(B(r,e)||r.y===o&&r.next.y===o&&r.next.x>i)&&(t<h||t===h&&(r.x>n.x||r.x===n.x&&C(n,r)))&&(n=r,h=t)}r=r.next}while(r!==p)}return n}(e,t);if(!n)return t;let r=z(n,e);return A(n,r.next.next),l(r,r.next),l(n,n.next)}let m=new Float64Array,x=0;const v=[],w=[];function A(e,t){let n=e;do{let e=x++;v[e]=n;let r=1/0,i=1/0,o=-1/0,s=-1/0,l=0;do{let t=n.next;n.z=e,n.x<r&&(r=n.x),n.x>o&&(o=n.x),n.y<i&&(i=n.y),n.y>s&&(s=n.y),t.x<r&&(r=t.x),t.x>o&&(o=t.x),t.y<i&&(i=t.y),t.y>s&&(s=t.y),n=t}while(++l<16&&n!==t);w[e]=n;let a=4*e;m[a]=r,m[a+1]=i,m[a+2]=o,m[a+3]=s}while(n!==t)}function b(e){let t=w[e];for(;t.prev.next!==t;)t=t.next;return w[e]=t,t}function M(e){let t=v[e];for(;t.prev.next!==t;)t=t.next;return v[e]=t,t}function C(e,t){return O(e.prev,e,t.prev)<0&&O(t.next,e,e.next)<0}const T=[];let R=[],S=new Uint32Array,E=new Uint32Array;const L=new Uint32Array(256);function U(e,t,n,r,i,o){L.fill(0);for(let t=0;t<e;t++)L[n[t]>>>o&255]++;let s=0;for(let e=0;e<256;e++){let t=L[e];L[e]=s,s+=t}for(let s=0;s<e;s++){let e=n[s],l=L[e>>>o&255]++;r[l]=t[s],i[l]=e}}function I(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Z(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function _(e,t,n,r,i,o,s,l){return(i-s)*(t-l)>=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function N(e,t){let n=P(e,t)&&O(e.prev,e,e.next)>0&&O(t.prev,t,t.next)>0;return e.next.i!==t.i&&(n||B(e,t)&&B(t,e)&&(0!==O(e.prev,e,t.prev)||0!==O(e,t.prev,t)))&&!function(e,t){let n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=e;do{let l=s.next;if(s.x>r&&l.x>r||s.x<n&&l.x<n||s.y>o&&l.y>o||s.y<i&&l.y<i)s=l;else{if(s.i!==e.i&&l.i!==e.i&&s.i!==t.i&&l.i!==t.i&&j(s,l,e,t))return!0;s=l}}while(s!==e);return!1}(e,t)&&(n||function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{let e=n.next;n.y>o!=e.y>o&&i<(e.x-n.x)*(o-n.y)/(e.y-n.y)+n.x&&(r=!r),n=e}while(n!==e);return r}(e,t))}function O(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function P(e,t){return e.x===t.x&&e.y===t.y}function j(e,t,n,r,i=!0){let o=O(e,t,n),s=O(e,t,r),l=O(n,r,e),a=O(n,r,t);return(o>0&&s<0||o<0&&s>0)&&(l>0&&a<0||l<0&&a>0)||!!i&&!!(0===o&&F(e,n,t)||0===s&&F(e,r,t)||0===l&&F(n,e,r)||0===a&&F(n,t,r))}function F(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function B(e,t){return O(e.prev,e,e.next)<0?O(e,t,e.next)>=0&&O(e,e.prev,t)>=0:O(e,t,e.prev)<0||O(e,e.next,t)<0}function z(e,t){let n=H(e.i,e.x,e.y),r=H(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function D(e,t,n,r){let i=H(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function $(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),p&&function(e,t){let n=4*e.z;t.x<m[n]&&(m[n]=t.x),t.y<m[n+1]&&(m[n+1]=t.y),t.x>m[n+2]&&(m[n+2]=t.x),t.y>m[n+3]&&(m[n+3]=t.y)}(e.prev,e.next)}function H(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function k(e,t,n,r){let i=0;for(let o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}let G,V,Y,K,W,q=0,J=0;function Q(e,t,n,r,i,o){return(n-e)*(o-t)-(r-t)*(i-e)}function X(e,t,n,r,i,o,s,l){let a=e-s,u=t-l,c=n-s,h=r-l,f=i-s,p=o-l,g=a*a+u*u,d=c*c+h*h,y=f*f+p*p,m=g+d+y;return a*(h*y-d*p)-u*(c*y-d*f)+g*(c*p-h*f)<=1e-13*m*m}function ee(e){return e-e%3+(e+1)%3}o.deviation=function(e,t,n,r){let i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(k(e,0,o,n));if(i)for(let r=0,i=t.length;r<i;r++){let o=t[r]*n,l=r<i-1?t[r+1]*n:e.length;s-=Math.abs(k(e,o,l,n))}let l=0;for(let t=0;t<r.length;t+=3){let i=r[t]*n,o=r[t+1]*n,s=r[t+2]*n;l+=Math.abs((e[i]-e[s])*(e[o+1]-e[i+1])-(e[i]-e[o])*(e[s+1]-e[i+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},o.flatten=function(e){let t=[],n=[],r=e[0][0].length,i=0,o=0;for(let s of e){for(let e of s)for(let n=0;n<r;n++)t.push(e[n]);o&&(i+=o,n.push(i)),o=s.length}return{vertices:t,holes:n,dimensions:r}},o.refine=function(e,t,n=2){let r=e,i=r.length;if(i<6)return;(function(e){(!G||G.length<e)&&(G=new Int32Array(e)),(!V||V.length<e)&&(V=new Int32Array(e)),(!W||W.length<e)&&(W=new Uint8Array(e));let t=1;for(;t<4*e;)t<<=1;(!Y||Y.length<t)&&(Y=new Int32Array(t),K=new Uint32Array(t)),q=t-1})(i),J++,V.fill(-1,0,i);let o=0;for(let e=0;e<i;e++){let t=r[e],n=r[ee(e)],i=t<n?t:n,s=t<n?n:t,l=(Math.imul(i,2654435761)^Math.imul(s,2246822507))&q;for(;K[l]===J;){let t=Y[l];if(-1!==t){let n=r[t],a=r[ee(t)];if(n===i&&a===s||n===s&&a===i){V[e]=t,V[t]=e,Y[l]=-1,W[t]=1,G[o++]=t;break}}l=l+1&q}K[l]!==J&&(Y[l]=e,K[l]=J)}for(;o>0;){let e=G[--o];W[e]=0;let i=V[e];if(-1===i)continue;let s=e-e%3,l=i-i%3,a=s+(e+2)%3,u=s+(e+1)%3,c=l+(i+2)%3,h=l+(i+1)%3,f=r[a],p=r[e],g=r[u],d=r[c],y=t[f*n],m=t[f*n+1],x=t[p*n],v=t[p*n+1],w=t[g*n],A=t[g*n+1],b=t[d*n],M=t[d*n+1];if(!X(y,m,x,v,w,A,b,M)&&Q(y,m,x,v,b,M)>0&&Q(y,m,b,M,w,A)>0){r[e]=d,r[i]=f;let t=V[c],n=V[a];V[e]=t,-1!==t&&(V[t]=e),V[i]=n,-1!==n&&(V[n]=i),V[a]=c,V[c]=a,-1!==t&&0===W[e]&&(W[e]=1,G[o++]=e),-1!==n&&0===W[i]&&(W[i]=1,G[o++]=i),-1!==V[u]&&0===W[u]&&(W[u]=1,G[o++]=u),-1!==V[h]&&0===W[h]&&(W[h]=1,G[o++]=h)}}}},21287(e,t,n){n.d(t,{M5:()=>h,eV:()=>c});var r=n(56507),i=n(49186),o=n(17676),s=n(84952),l=n(26306);let a=null,u=!0;function c(e,t,n,r){if(!t||!n)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch{u=!1}let i=function(e,t,n){return n||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,l.M)(n.data),mediaType:n.mediaType};let i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(()=>n(10820));if(e(a))return r(a,t)}if(c){let{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(()=>n(22390));if(e(a))return r(a,t)}return async function(e,t){let n=window.URL.createObjectURL(e);try{let{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new i.A("invalid-image",`Could not fetch requested image at ${n}`)}finally{window.URL.revokeObjectURL(n)}}(new Blob([a],{type:u}),t)}},83300(e,t,n){n.r(t),n.d(t,{default:()=>Ee});var r=n(32198),i=n(69540),o=n(92474),s=n(53966),l=n(61893),a=n(17676),u=n(36708),c=n(91429),h=n(51850),f=n(91075),p=n(86738),g=n(39829),d=n(70328),y=n(24770),m=n(16939),x=n(49186);const v="Expected location to be a Point instance";class w extends x.A{constructor(){super("invalid-input:location",v)}}var A=n(95696),b=n(18251),M=n(73836),C=n(1193),T=n(27615),R=n(35522),S=n(65806);function E(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}var L=n(22141),U=n(72258);const I=()=>s.A.getLogger("esri.geometry.support.meshUtils.centerAt");const Z=(0,h.vt)(),_=(0,h.vt)(),N=(0,h.vt)();var O=n(9093),P=n(5443),j=n(99917),F=n(98764),B=n(48353),z=n(9762),D=n(4197),$=n(73354);const H=(0,O.vt)(),k=(0,D.jh)(24);var G=n(84952);function V(e){let t=(0,G.nM)(e.url);return n=>{let r=(0,G.V1)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function Y(e){return ee.fromBlob(e,te(e.name,e.type))}const K=/^model\/gltf\+json$/,W=/^model\/gltf-binary$/,q=/\.gltf$/i,J=/\.glb$/i;function Q({mimeType:e,source:t,name:n}){return K.test(e)||q.test(n)?{url:t.url,type:"gltf"}:W.test(e)||J.test(n)?{url:t.url,type:"glb"}:null}function X(e){let t=new Map,n=null,r=null;for(let i of e){let{source:e,name:o}=i;n??=Q(i),"ESRI3DO_NORM.glb"===o&&(r=Q(i)),t.set(o,e.url),e.files.forEach((e,n)=>t.set(n,e))}let i=r??n;if(null==i)throw new x.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new ee(i.url,()=>e.forEach(({source:e})=>e.dispose()),t,i.type)}class ee{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){let n=URL.createObjectURL(e);return new ee(n,()=>URL.revokeObjectURL(n),void 0,t)}}function te(e,t){return K.test(t)||q.test(e)?"gltf":W.test(t)||q.test(e)?"glb":void 0}var ne=n(66895),re=n(29461),ie=n(15070),oe=n(77690),se=n(29242),le=n(58083),ae=n(67026),ue=n(82534);const ce=()=>s.A.getLogger("esri.geometry.support.meshUtils.rotate");function he(e,t,n,r=h.uY){if(null!=e){(0,le.$0)(de,(0,y.$I)(t),(0,y.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)fe[n]=e[t+n]-r[n];(0,R.Z0)(fe,fe,de);for(let n=0;n<3;n++)e[t+n]=fe[n]+r[n]}}}const fe=(0,h.vt)(),pe=(0,O.vt)(),ge=(0,y.vt)(),de=(0,O.vt)(),ye=(0,se.vt)(),me=(0,h.vt)(),xe=(0,ue.vt)(),ve=()=>s.A.getLogger("esri.geometry.support.meshUtils.scale");function we(e,t,n=h.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Ae[t]=e[r+t]-n[t];(0,R.hs)(Ae,Ae,t);for(let t=0;t<3;t++)e[r+t]=Ae[t]+n[t]}}const Ae=(0,h.vt)(),be=(0,h.vt)(),Me=(0,O.vt)(),Ce=(0,h.vt)();var Te,Re=n(41618);const Se={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.A,local:b.A}};let Ee=Te=class extends((0,i.OU)((0,o.WV)((0,l.g)(f.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.A,this.transform=null,this.metadata=new re.O,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C.default,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,u.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){let{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,i=(0,d.gE)(r,k);if((0,T.Hq)(n)&&e.transform&&(0,$.t)(i,i,e.transform.localMatrix),"georeferenced"===n.type){let e=n.origin;return e&&(0,$.a)(i,i,e),(0,d.w1)((0,d.vY)(i),t)}let o=(0,F.lO)(t),s=n.origin;if(!(0,j.canProjectWithoutEngine)(o,t)){let[e,n,r]=s;return new P.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,B.l)(t,s,H,o),(0,$.t)(i,i,H),(0,z.projectBuffer)(i,o,0,i,t,0),(0,d.w1)((0,d.vY)(i),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,d.vt)(d.v_):(0,d.vY)(e)}get origin(){let e=(0,T.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;let{center:t,zmin:n}=this._transformedExtent;return new p.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||=[],this.components.push(m.default.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){let t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,y.AU)(e,t,n,Le),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;let{spatialReference:r,vertexSpace:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=fe;if(u.equals(n))(0,R.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ce(),n.spatialReference,o,L.JP);(0,ae.x8)(xe,(0,y.yo)(t),(0,y.$I)(t));let f=(0,le.O7)(pe,xe,h.uY,h.Un,c),{localMatrix:g}=i,d=(0,le.lw)(pe,f,g);i.scale=(0,le.X_)((0,h.vt)(),d),(0,le.hs)(d,d,(0,R.DI)(fe,i.scale));let m=i.rotationAxis;i.rotation=(0,y.ui)(d),0===i.rotationAngle&&(i.rotationAxis=m),i.translation=(0,le.sC)((0,h.vt)(),d)}(e,t,o):E(i,r)?function(e,t,n){let r=e.spatialReference,i=(0,F.lO)(r),o=me;if(!(0,S.g)(n,o,i)&&((0,L.CN)(ce(),n.spatialReference,i,"Falling back to mesh origin"),!(0,S.g)(e.origin,o,i)))return void(0,L.CN)(ce(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),h=null==a?null:new Float32Array(a.length);(0,B.l)(i,o,de,i),(0,oe.z0)(ye,de);let f=ge;(0,R.ei)((0,y.yo)(ge),(0,y.yo)(t),ye),f[3]=t[3],!(0,L.gr)(s,r,u,i)||null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=h&&!(0,L.xA)(a,s,r,u,i,h)?(0,L.CN)(ce(),r,i):(he(u,f,3,o),!(0,L.$5)(u,i,s,r)||null!=l&&null!=c&&(he(c,f,3),!(0,L.si)(c,s,r,u,i,l))||null!=a&&null!=h&&(he(h,f,4),!(0,L.Mv)(h,s,r,u,i,a))?(0,L.CN)(ce(),i,r):e.vertexAttributesChanged())}(e,t,o):function(e,t,n){let r=me;if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(ce(),n.spatialReference,e.spatialReference,L.JP)}he(e.vertexAttributes.position,t,3,r),he(e.vertexAttributes.normal,t,3),he(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}(this,Le,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;let{vertexSpace:r,vertexAttributes:i}=this,o=i?.position;if(!o)return this;if((0,T.Hq)(r)){let[i,o,s]=r.origin;r.origin=(0,h.fA)(i+e,o+t,s+n)}else{for(let r=0;r<o.length;r+=3)o[r]+=e,o[r+1]+=t,o[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r,spatialReference:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=Ae;if(u.equals(n))(0,R.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ve(),n.spatialReference,o,L.JP);let f=(0,R.hZ)(be,t,t,t),g=(0,le.O7)(Me,ue.zK,h.uY,f,c),{localMatrix:d}=i,m=(0,le.lw)(Me,g,d);i.scale=(0,le.X_)((0,h.vt)(),m),(0,le.hs)(m,m,(0,R.DI)(Ae,i.scale));let x=i.rotationAxis;i.rotation=(0,y.ui)(m),0===i.rotationAngle&&(i.rotationAxis=x),i.translation=(0,le.sC)((0,h.vt)(),m)}(e,t,o):E(r,i)?function(e,t,n){let r=e.spatialReference,i=(0,F.lO)(r),o=Ce;if(!(0,S.g)(n,o,i)&&((0,L.CN)(ve(),n.spatialReference,i,"Falling back to mesh origin"),!(0,S.g)(e.origin,o,i)))return void(0,L.CN)(ve(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),h=null==a?null:new Float32Array(a.length);!(0,L.gr)(s,r,u,i)||null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=h&&!(0,L.xA)(a,s,r,u,i,h)?(0,L.CN)(ve(),r,i):(we(u,t,o),!(0,L.$5)(u,i,s,r)||null!=l&&null!=c&&!(0,L.si)(c,s,r,u,i,l)||null!=a&&null!=h&&!(0,L.Mv)(h,s,r,u,i,a)?(0,L.CN)(ve(),i,r):e.vertexAttributesChanged())}(e,t,o):function(e,t,n){let r=Ce;if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(ve(),n.spatialReference,e.spatialReference,L.JP)}we(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,o)}(this,e,t),this}centerAt(e,t){return this._checkIfLoaded("centerAt()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r}=e,i=n?.origin??e.origin;(0,T.Hq)(r)?function(e,t,n){let{vertexSpace:r}=e;if(!(0,T.Hq)(r))return;let i=_,o=Z;if(!(0,S.g)(t,o,e.spatialReference))return void(0,L.CN)(I(),t.spatialReference,e.spatialReference,L.JP);if(!(0,S.g)(n,i,e.spatialReference))return void(0,L.CN)(I(),n.spatialReference,e.spatialReference,L.JP);let s=(0,R.Re)(N,o,i);r.origin=(0,R.WQ)((0,h.vt)(),r.origin,s)}(e,t,i):E(r,i.spatialReference)?function(e,t,n){let r=(0,h.fA)(n.x,n.y,n.z??0),i=(0,U.UR)(e,new b.A({origin:r}));if(!i)return;let o=(0,h.fA)(t.x,t.y,t.z??0),s=(0,U.UR)({vertexAttributes:i,spatialReference:e.spatialReference,vertexSpace:new b.A({origin:o})},A.A.absolute);if(!s)return;let{position:l,normal:a,tangent:u}=s;e.vertexAttributes.position=l,e.vertexAttributes.normal=a,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,i):function(e,t,n){let r=_,i=Z;if((0,S.g)(t,i,e.spatialReference)){if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(I(),n.spatialReference,e.spatialReference,L.JP)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,i,r),e.vertexAttributesChanged()}else(0,L.CN)(I(),t.spatialReference,e.spatialReference,L.JP)}(e,t,i)}(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){switch(t.source.type){case"client":case"service":return async function(e,t,r){let{source:i}=t,{loadGLTFMesh:o}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r),s=await async function(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");return X(e.map(e=>({name:e.name,mimeType:e.type,source:Y(e)})))}(e.files):Y(e.files);case"service":return async function(e,t){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");let n=await(0,a.nA)(e.map(async e=>{let n=await async function(e,t){let{parts:n,assetMimeType:r,assetName:i}=e;if(1===n.length)return new ee(n[0].partUrl);let o=await e.toBlob(t);return(0,a.Te)(t),ee.fromBlob(o,te(i,r))}(e);return(0,a.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}}));if((0,a.G4)(t))throw n.forEach(e=>e.source.dispose()),(0,a.NK)();return X(n)}(e.assets,t);default:throw new x.A("mesh-load-external:invalid-source","Invalid source type")}}(i,r);(0,a.Te)(r);let{mesh:{vertexAttributes:l,components:u},meta:{isDracoDecompressed:c}}=await o(new p.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:V(s),signal:r?.signal,expectedType:s.type,unitConversionDisabled:t.unitConversionDisabled}).finally(()=>s.dispose());if(c)throw new x.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=l,e.components=u}(e,t,r);case"loadable":return t.source.load(e,r);default:t.source}}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,ne.WO)((0,ne.QN)(e)))}cloneShallow(){return new Te({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){let[{toBinaryGLTF:t}]=await Promise.all([n.e(4038).then(()=>n(84038)),this.load(e)]);return(0,a.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(s.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createBox()",v),null;let n=new Te((0,ie.UG)((0,ie.H8)(),e,t));return t?.imageFace&&"all"!==t.imageFace?(0,ie.bQ)(n,t.imageFace):n}static createSphere(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.Dk)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.ai)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createPlane()",v),null;let n=t?.facing??"up",r=(0,ie.uF)(n,t?.size);return new Te((0,ie.UG)((0,ie.Uh)(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof g.A))return s.A.getLogger(this.prototype).error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;let n=(0,Re.uM)(e,{method:"earcut"}),r=(0,a.$X)(n)?null:n,i=r?.positions??[],o=r?.polygonIndices??[];return new Te({vertexAttributes:new C.default({position:i}),components:[new m.default({faces:o,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.A})}static async createFromGLTF(e,t,r){if(!(e instanceof p.A)){let e=new w;throw s.A.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}let{loadGLTFMesh:i}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r);return new Te((await i(e,t,r)).mesh)}};(0,r.Cg)([(0,c.MZ)({type:[m.default],json:{write:!0}})],Ee.prototype,"components",void 0),(0,r.Cg)([(0,c.MZ)({nonNullable:!0,types:Se,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexSpace??e.clone(t)})],Ee.prototype,"vertexSpace",void 0),(0,r.Cg)([(0,c.MZ)({type:M.A,clonable:(e,t)=>{let n=(0,ne.o2)(t);return n&&"transform"in n?n.transform:e?.clone()??e},json:{write:!0}})],Ee.prototype,"transform",void 0),(0,r.Cg)([(0,c.MZ)({constructOnly:!0,type:re.O,clonable:(e,t)=>(0,ne.o2)(t)?.metadata??e.clone()})],Ee.prototype,"metadata",void 0),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"hasExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_transformedExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_untransformedBounds",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"origin",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"extent",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ee.prototype,"hasZ",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ee.prototype,"hasM",void 0),(0,r.Cg)([(0,c.MZ)({type:C.default,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexAttributes??e.clone(t)})],Ee.prototype,"vertexAttributes",void 0),Ee=Te=(0,r.Cg)([(0,c.$K)("esri.geometry.Mesh")],Ee);const Le=(0,y.vt)()},15585(e,t,n){n.d(t,{If:()=>p,O5:()=>m,O9:()=>d,QT:()=>y,l3:()=>g});var r=n(32198),i=n(2741),o=n(49186),s=n(44208),l=n(34727);let a=null,u=null,c=null,h=null;const f=(new Float32Array,new Uint32Array,new Uint32Array,new Uint32Array,{vertices:new Float64Array,indices:new Uint32Array,outlineIndices:new Uint32Array,outlineRingLengths:new Uint32Array,vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function p(){return a??=async function(){c=await(await n.e(2997).then(()=>n(42997))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),a}async function g(){return u??=async function(){h=await(await n.e(9134).then(()=>n(99134))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),u}function d(){return null!==h}function y(e,t,n=2){let i={stack:[],error:void 0,hasError:!1};try{let l=c;if(!l)throw new o.A("libtess:not-loaded","libtessF32 not loaded");let a=(0,r.mS)(i,A.from(l,e),!1),u=(0,r.mS)(i,M.from(l,t),!1),h=e.length/n*4,f=(0,r.mS)(i,new A(l,h*n),!1),p=l.triangulate(a.ptr,u.ptr,u.size,n,f.ptr,h);if((0,s.A)("esri-tessellation-debug")){let e=l.getError();0!==e&&console.warn("libtess:triangulation",C(e))}return{buffer:f.slice(0,p*n),vertexCount:p}}catch(e){i.error=e,i.hasError=!0}finally{(0,r.hk)(i)}}function m(e,t,n=2,i=!0){let a={stack:[],error:void 0,hasError:!1};try{let u=h;if(!u)throw new o.A("libtess:not-loaded","libtessF64 not loaded");let c=(0,r.mS)(a,b.from(u,e),!1),p=(0,r.mS)(a,M.from(u,t),!1),g=(0,r.mS)(a,new M(u,1),!1),d=(0,r.mS)(a,new M(u,1),!1),y=(0,r.mS)(a,new M(u,1),!1),m=(0,r.mS)(a,new M(u,1),!1),{maxVertexCount:x,maxIndexCount:v,maxOutlineIndexCount:A,maxOutlineRingCount:T}=function(e,t){let n=e.reduce((e,t)=>e+t,0),r=e.length,i=Math.max(0,e.length-1),o=Math.max(0,n+2*i-2),s=Math.max(0,Math.ceil(2*n)),a=Math.max(0,Math.ceil(3*o*2)),u=(0,l.mP)(a,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,h=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:s,maxIndexCount:u,maxOutlineIndexCount:t?Math.max(0,n+r+c):0,maxOutlineRingCount:t?Math.max(0,r+h):0}}(t,i),R=0,S=0,E=0,L=0,U=0;{let e={stack:[],error:void 0,hasError:!1};try{let t=(0,r.mS)(e,new b(u,x*n),!1),o=(0,r.mS)(e,new M(u,v),!1),s=(0,r.mS)(e,i?new M(u,A):null,!1),l=(0,r.mS)(e,i?new M(u,T):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,t.ptr,x,n,o.ptr,v,g.ptr,d.ptr,s?.ptr??0,A,l?.ptr??0,T,y.ptr,m.ptr),U=u.getError(),R=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],S=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],E=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],L=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT],0===U)return{vertices:t.slice(0,R*n),indices:o.slice(0,S),outlineIndices:i&&s?s.slice(0,E):f.outlineIndices,outlineRingLengths:i&&l?l.slice(0,L):f.outlineRingLengths,vertexCount:R,indexCount:S,outlineIndexCount:i?E:0,outlineRingCount:i?L:0}}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}if(100903!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),f;let I=(0,r.mS)(a,new b(u,R*n),!1),Z=(0,r.mS)(a,new M(u,S),!1),_=(0,r.mS)(a,i?new M(u,E):null,!1),N=(0,r.mS)(a,i?new M(u,L):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,I.ptr,R,n,Z.ptr,S,g.ptr,d.ptr,_?.ptr??0,i?E:0,N?.ptr??0,i?L:0,y.ptr,m.ptr),U=u.getError(),0!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),f;let O=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],P=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],j=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],F=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT];return{vertices:I.slice(0,O*n),indices:Z.slice(0,P),outlineIndices:i&&_?_.slice(0,j):f.outlineIndices,outlineRingLengths:i&&N?N.slice(0,F):f.outlineRingLengths,vertexCount:O,indexCount:P,outlineIndexCount:i?j:0,outlineRingCount:i?F:0}}catch(e){a.error=e,a.hasError=!0}finally{(0,r.hk)(a)}}function x(e){return e.HEAPF64}function v(e){return e.HEAPF32}function w(e){return e.HEAP32}class A{static from(e,t){let n=new A(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(e){v(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return v(this._libtess).slice(n+e,n+t)}}class b{static from(e,t){let n=new b(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(e){x(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return x(this._libtess).slice(n+e,n+t)}}class M{static from(e,t){let n=new M(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateLengthsArray(t)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(e){w(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return function(e){let t=w(e);return new Uint32Array(t.buffer,t.byteOffset,t.length)}(this._libtess).slice(n+e,n+t)}}function C(e){switch(e){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${e}`}}},97146(e,t,n){n.d(t,{Dg:()=>o,lC:()=>l,my:()=>s,tM:()=>h,uW:()=>i});var r=n(34275);function i(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let n=!0,i=!0;return e.some((e,t)=>(n&&=0===e,i&&=e===t,!n&&!i)),n?function(e){if(1===e)return u;if(e<1024)return Array(e).fill(0);if(e>p.length){let t=Math.max(2*p.length,e);p=new Uint8Array(t)}return new Uint8Array(p.buffer,0,e)}(e.length):i?h(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function l(e,t,n){if(0===t.length)return e.slice();if(0===e.length)return t.slice();let r=s(e.length+t.length,n);for(let t=0;t<e.length;++t)r[t]=e[t];for(let n=0;n<t.length;++n)r[e.length+n]=t[n];return r}let a=f(131072);const u=[0],c=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function h(e){return 1===e?u:e<1024?function(e){let t=Array(e).fill(0);for(let n=0;n<e;n++)t[n]=n;return t}(e):e<c.length?new Uint16Array(c.buffer,0,e):(e>a.length&&(a=f(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function f(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let p=new Uint8Array(65536)},16939(e,t,n){n.r(t),n.d(t,{default:()=>p});var r,i=n(32198),o=n(69540),s=n(25482),l=n(53966),a=n(91429),u=n(78888),c=n(19211),h=n(80882),f=n(31199);let p=r=class extends((0,o.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}get faces(){return this._get("faces")??null}set faces(e){this._set("faces",(0,f.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},l.A.getLogger(this)))}castMaterial(e){return e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?(0,u.PZ)(h.A,e):(0,u.PZ)(c.default,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i.Cg)([(0,a.MZ)({json:{write:f.B}})],p.prototype,"faces",null),(0,i.Cg)([(0,a.MZ)({type:c.default,json:{write:!0}})],p.prototype,"material",void 0),(0,i.Cg)([(0,a.wg)("material")],p.prototype,"castMaterial",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"shading",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"trustSourceNormals",void 0),p=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshComponent")],p)},95696(e,t,n){n.d(t,{A:()=>u});var r,i=n(32198),o=n(69540),s=n(25482),l=n(91429),a=n(93223);let u=class extends((0,o.OU)(s.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,a.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,i.Cg)([(0,l.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},18251(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(69540),o=n(25482),s=n(91429),l=n(51850),a=n(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="local",this.origin=(0,l.vt)()}};(0,r.Cg)([(0,a.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211(e,t,n){n.r(t),n.d(t,{default:()=>h});var r=n(32198),i=n(68197),o=n(69540),s=n(25482),l=n(91429),a=n(35063),u=n(51147),c=n(66895);let h=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:a.default.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:a.default.from(e))}clone(e){let t=(0,c.hz)(e),n=t?.materialMap?.get(this);if(n)return n;let r=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,r),r}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null==this.color?0:16,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null==this.colorTextureTransform?0:20,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null==this.normalTextureTransform?0:20,e}};(0,r.Cg)([(0,l.MZ)({type:i.A,json:{write:!0}})],h.prototype,"color",void 0),(0,r.Cg)([(0,l.MZ)({type:a.default,json:{write:!0},value:null})],h.prototype,"colorTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({type:a.default,json:{write:!0},value:null})],h.prototype,"normalTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=(0,r.Cg)([(0,l.$K)("esri.geometry.support.MeshMaterial")],h)},80882(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(68197),o=n(91429),s=n(19211),l=n(35063),a=n(51147);let u=class extends s.default{constructor(e){super(e),this.emissiveColor=null,this.emissiveStrength=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0,this.unlit=!1}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:l.default.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:l.default.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:l.default.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null==this.emissiveColor?0:16,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null==this.emissiveTextureTransform?0:20,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null==this.occlusionTextureTransform?0:20,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null==this.metallicRoughnessTextureTransform?0:20,e}};(0,r.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"emissiveStrength",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,nonNullable:!0,json:{write:!0}})],u.prototype,"unlit",void 0),u=(0,r.Cg)([(0,o.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},35063(e,t,n){n.r(t),n.d(t,{default:()=>y});var r,i=n(32198),o=n(69540),s=n(21287),l=n(25482),a=n(91429),u=n(78888),c=n(66895),h=n(97159),f=n(43937),p=n(36005);const g=new WeakMap;let d=0,y=class extends((0,o.OU)(l.o)){static{r=this}constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){e instanceof HTMLImageElement?t[n]={type:"image-element",src:(0,h.t)(e.src,r),crossOrigin:e.crossOrigin}:e instanceof HTMLCanvasElement?t[n]={type:"canvas-element",imageData:m(e.getContext("2d").getImageData(0,0,e.width,e.height))}:e instanceof HTMLVideoElement?t[n]={type:"video-element",src:(0,h.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload}:e instanceof ImageData&&(t[n]={type:"image-data",imageData:m(e)})}readData(e){switch(e.type){case"image-element":{let t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{let t=x(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return x(e.imageData);case"video-element":{let t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){let{data:e,url:t}=this,n=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!!(t&&n(t)||e instanceof HTMLImageElement&&n(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){let e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null==this.url?null==this.data?t():this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++d),t(g.get(this.data))):t(this.url)}get memoryUsage(){let e=0;if(e+=null==this.url?0:this.url.length,null!=this.data){let t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){let t=(0,c.$N)(e),n=t?.textureMap?.get(this);if(n)return n;let r=super.clone(e);return t?.textureMap?.set(this,r),r}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,u.PZ)(r,e)}};function m(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}function x(e){let t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,s.eV)(n,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,i.Cg)([(0,a.MZ)({type:String,json:{write:h.w}})],y.prototype,"url",null),(0,i.Cg)([(0,a.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],y.prototype,"data",null),(0,i.Cg)([(0,f.K)("data")],y.prototype,"writeData",null),(0,i.Cg)([(0,p.w)("data")],y.prototype,"readData",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"contentHash",null),y=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshTexture")],y)},51147(e,t,n){n.d(t,{A:()=>l});var r=n(32198),i=n(69540),o=n(25482),s=n(91429);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],l)},1193(e,t,n){n.r(t),n.d(t,{default:()=>h});var r,i=n(32198),o=n(69540),s=n(25482),l=n(4718),a=n(53966),u=n(91429),c=n(31199);let h=r=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array,this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&a.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.A.getLogger(this))}clonePositional(){let e={position:(0,l.o8)(this.position),normal:(0,l.o8)(this.normal),tangent:(0,l.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"color",void 0),(0,i.Cg)([(0,u.wg)("color")],h.prototype,"castColor",null),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],h.prototype,"position",void 0),(0,i.Cg)([(0,u.wg)("position")],h.prototype,"castPosition",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"uv",void 0),(0,i.Cg)([(0,u.wg)("uv")],h.prototype,"castUv",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"normal",void 0),(0,i.Cg)([(0,u.wg)("normal")],h.prototype,"castNormal",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"tangent",void 0),(0,i.Cg)([(0,u.wg)("tangent")],h.prototype,"castTangent",null),h=r=(0,i.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],h)},31199(e,t,n){function r(e,t,n,r){let{loggerTag:i,stride:o}=t;return e.length%o===0?e:(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([]))}function i(e,t,n,i,o){if(!e)return e;if(e instanceof t)return r(e,i,t,o);for(let s of n)if(e instanceof s)return r(new t(e),i,t,o);if(Array.isArray(e))return r(new t(e),i,t,o);{let r=n.map(e=>`'${e.name}'`);return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function o(e,t,n){t[n]=function(e){let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}n.d(t,{B:()=>o,b:()=>i})},40118(e,t,n){n.d(t,{H5:()=>h,wh:()=>u,createWithExternalSource:()=>c});var r=n(49186),i=(n(17676),n(83300)),o=(n(16939),n(95696),n(73836)),s=(n(1193),n(27615));n(53966),n(35522),n(51850),n(66895),n(72258);var l=n(29461),a=n(15070);function u(e,t){return new i.default((0,a.UG)((0,a.Dk)(t?.densificationFactor||0),e,t))}function c(e,t,n){let r=n?.extent??null,{spatialReference:a}=e,u=n?.transform?.clone()??new o.A,c=(0,s.TE)(e,n),h={source:t,extent:r,unitConversionDisabled:n?.unitConversionDisabled},f=new l.O;return f.externalSources.push(h),new i.default({metadata:f,transform:u,vertexSpace:c,spatialReference:a})}function h(e,t){let{spatialReference:n}=e,l=t?.transform?.clone()??new o.A,a=(0,s.TE)(e,t),u=new i.default({transform:l,vertexSpace:a,spatialReference:n});return u.addResolvingPromise(Promise.reject(new r.A("mesh-incomplete","Mesh resources are not complete"))),u}n(41618)},63579(e,t,n){n.d(t,{Bq:()=>a,Qp:()=>l,WN:()=>y,dK:()=>m,eN:()=>p,fH:()=>d,in:()=>g,yr:()=>u});var r=n(56507),i=n(4576),o=n(17676),s=n(20557);class l{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let n=await Promise.all(t.map(t=>t.toBlob(e)));return(0,o.Te)(e),new Blob(n)}}class a{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,o.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(f):f(e.files);case"service":return e.assets.some(f);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,h=/\.(gltf|glb)/i;function f(e){if(e instanceof File){let{type:t,name:n}=e;return c.test(t)||h.test(n)}return c.test(e.assetMimeType)||h.test(e.assetName)}function p(e,t){if(!e)return!1;let{source:n}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(n,t)}function g(e,t){if(e===t)return!0;let{source:n}=e,{source:r}=t;if(n===r)return!0;if("service"===n.type&&"service"===r.type){if(n.assets.length!==r.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...n.assets].sort(e),i=[...r.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function d(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function y(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function m(e){return!!e.original}},29461(e,t,n){n.d(t,{O:()=>u});var r=n(32198),i=n(69540),o=n(7762),s=n(36708),l=n(91429),a=n(63579);let u=class extends i.Pw{constructor(e){super(e),this.externalSources=new o.A,this._explicitDisplaySource=null,this.addHandles((0,s.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,a.yr)(e))throw Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,a.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,a.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(a.yr)}};(0,r.Cg)([(0,l.MZ)()],u.prototype,"externalSources",void 0),(0,r.Cg)([(0,l.MZ)()],u.prototype,"displaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_implicitDisplaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_explicitDisplaySource",void 0),u=(0,r.Cg)([(0,l.$K)("esri.geometry.support.meshUtils.Metadata")],u)},66895(e,t,n){n.d(t,{$N:()=>c,Lz:()=>o,QN:()=>h,WO:()=>a,hz:()=>l,o2:()=>i});const r=Symbol("meshContext");function i(e){return e&&"object"==typeof e&&r in e?e[r]:void 0}function o(e,t){let n=i(e);return{...e,[r]:{...n,...t}}}const s=Symbol("meshMaterialContext");function l(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function a(e){if(l(e)?.materialMap)return e;let t={materialMap:new Map};return{...e,[s]:t}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function h(e){if(c(e)?.textureMap)return e;let t={textureMap:new Map};return{...e,[u]:t}}},15070(e,t,n){n.d(t,{Dk:()=>f,H8:()=>c,UG:()=>m,Uh:()=>d,ai:()=>p,bQ:()=>h,uF:()=>g});var r=n(29242),i=n(35522),o=n(51850),s=n(16939),l=n(1193),a=n(27615),u=n(72258);function c(){let{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=x,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array(2*e.length*3),a=0,u=0,c=0,h=0;for(let r=0;r<e.length;r++){let f=e[r],p=a/3;for(let e of t)l[h++]=p+e;let g=f.corners;for(let e=0;e<4;e++){let t=g[e],r=0;s[c++]=.25*n[e][0]+f.uvOrigin[0],s[c++]=f.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0===f.axis[e]?(i[a++]=.5*t[r++],o[u++]=0):(i[a++]=.5*f.axis[e],o[u++]=f.axis[e])}}return{position:i,normal:o,uv:s,faces:l}}function h(e,t){let n=e.components[0],r=n.faces,i=v[t],o=6*i,l=[,,,,,,],a=Array(r.length-6),u=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?l[u++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){let t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new s.default({faces:l,material:n.material}),new s.default({faces:a})],e}function f(e=0){let t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array((t-1)*n*2*3),a=0,u=0,c=0,h=0;for(let e=0;e<=t;e++){let r=e/t*Math.PI+.5*Math.PI,f=Math.cos(r);w[2]=Math.sin(r);let p=0===e||e===t,g=p?n-1:n;for(let r=0;r<=g;r++){let d=r/g*2*Math.PI;w[0]=-Math.sin(d)*f,w[1]=Math.cos(d)*f;for(let e=0;e<3;e++)i[a]=.5*w[e],o[a]=w[e],++a;s[u++]=(r+(p?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(l[c++]=h,l[c++]=h+1,l[c++]=h-n),1!==e&&(l[c++]=h,l[c++]=h-n,l[c++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:l}}function p(e=0){let t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3),l=0,a=0,u=0,c=0,h=0;for(let e=0;e<=5;e++){let n=0===e||5===e,f=e<=1||e>=4,p=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){let y=d/g*2*Math.PI,m=n?0:.5;w[0]=m*Math.sin(y),w[1]=m*-Math.cos(y),w[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[l++]=w[t],i[a++]=f?2===t?e<=1?1:-1:0:2===t?0:w[t]/m;o[u++]=(d+(n?.5:0))/t,o[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,!p&&0!==e&&d!==t&&(5!==e&&(s[c++]=h,s[c++]=h+1,s[c++]=h-t),1!==e&&(s[c++]=h,s[c++]=h-t,s[c++]=h-t-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}function g(e,t){let n="number"==typeof t?t:null==t?1:t.width,r="number"==typeof t?t:null==t?1:t.height;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}function d(e){let t=y.facingAxisOrderSwap[e],n=y.position,r=y.normal,i=new Float64Array(n.length),o=new Float32Array(r.length),s=0;for(let e=0;e<4;e++){let e=s;for(let l=0;l<3;l++){let a=t[l],u=Math.abs(a)-1,c=a>=0?1:-1;i[s]=n[e+u]*c,o[s]=r[e+u]*c,s++}}return{position:i,normal:o,uv:new Float32Array(y.uv),faces:new Uint32Array(y.faces),isPlane:!0}}const y={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function m(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){A[0]=t[0],A[4]=t[1],A[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)w[n]=e.position[t+n];(0,i.ei)(w,w,A);for(let n=0;n<3;n++)e.position[t+n]=w[n]}if(t[0]!==t[1]||t[1]!==t[2]){A[0]=1/t[0],A[4]=1/t[1],A[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)w[n]=e.normal[t+n];(0,i.ei)(w,w,A),(0,i.S8)(w,w);for(let n=0;n<3;n++)e.normal[t+n]=w[n]}}}}(e,function(e,t,n){let r=(0,u.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){let t=e*r;return[t,t,t]}return[null==e.width?r:e.width*r,null==e.depth?r:e.depth*r,null==e.height?r:e.height*r]}(n?.size,n?.unit,t.spatialReference));let r=(0,a.TE)(t,n),o=t.spatialReference.isGeographic?(0,a.TE)(t):r,c=(0,u.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new l.default({...c,uv:e.uv}),vertexSpace:r,components:[new s.default({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const x={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},v={south:0,east:1,north:2,west:3,up:4,down:5},w=(0,o.vt)(),A=(0,r.vt)()},27615(e,t,n){n.d(t,{CK:()=>a,Hq:()=>l,MW:()=>u,TE:()=>c,yJ:()=>h});var r=n(35522),i=n(86738),o=n(95696),s=n(18251);function l(e){return null!=e.origin}function a(e){return l(e.vertexSpace)}function u(e,t){if(!l(e))return null;let[n,r,o]=e.origin;return new i.A({x:n,y:r,z:o,spatialReference:t})}function c(e,t){let{x:n,y:r,z:i,spatialReference:l}=e,a=[n,r,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(l))?new s.A({origin:a}):new o.A({origin:a})}function h(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.t2)(e.origin,t.origin))}},41618(e,t,n){n.d(t,{uM:()=>P});var r=n(17676),i=(n(9762),n(4197)),o=(n(58083),n(9093)),s=n(51850);n(48353),(0,o.vt)(),new class{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}},(0,s.vt)(),n(44208),n(53966);var l=n(62788),a=n(95488),u=n(83349),c=n(15585),h=n(95108),f=n(97146),p=n(34727),g=n(86211),d=n(35522),y=n(27921);function m(e,t,n){let r=function(e,t,n,r){let i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=(0,g.GA)(r)/(0,g.G9)(r);return(0,y.lU)(e,(e,t)=>(0,d.hZ)(e,i(t,0)*o,i(t,1)*o,i(t,2)),n)}(x,e,t,n)?(0,y.Qj)(x):[0,0,1];return Math.abs(r[2])>Math.cos((0,p.kU)(80))?2:+(Math.abs(r[1])>Math.abs(r[0]))}const x=(0,y.vt)(),v="auto",w=void 0,A=void 0,b=void 0;function M(e,t,n){if(!t)return 2;let r=null;for(let i of e){let e=Z(i,t),o=e<3?2:m(i,e,n);if(r??=o,o!==r)return 2}return r??2}function C(e,t,n){if(!t)return!(0,h.$3)(e);if(e.length<3)return!1;switch(n){case 0:return!(0,h.$3)(e,1,2);case 1:return!(0,h.$3)(e,0,2);case 2:return!(0,h.$3)(e,0,1)}}const T=new a.I;let R=new WeakSet;function S(e,t){if(!(0,c.O9)())return _("libtess-not-loaded");let n=null!=t.outlines,{positions:r,mergedPathLengths:o}=function(e){let t=function(e){let t=e.reduce((e,t)=>e+t.pathLengths.length,0),n=Array(t),r=0;for(let t=0;t<e.length;t++){let i=e[t].pathLengths;for(let e=0;e<i.length;e++)n[r++]=i[e]}return n}(e.polygons),n=3*e.polygonVertexCount;return n===e.positions.length?{positions:e.positions,mergedPathLengths:t}:{positions:(0,i.l5)(e.positions,0,n),mergedPathLengths:t}}(e),s=performance.now(),{vertices:l,indices:a,outlineIndices:u,outlineRingLengths:h}=(0,c.O5)(r,o,3,n),p=performance.now()-s;if(null!=t.owner&&p>250&&R.add(t.owner),l.length%3!=0)return _("positions-not-multiple-of-3");let{positions:g,outlineIndexBuffer:d,mergedOutlineRingLengths:y}=n?function(e,t,n,r,o){let s=e.polygonVertexCount,l=n.length/3,a=(t??[]).values().filter(e=>e.index>=s).map(e=>({index:l+e.index-s,count:e.count})).toArray();if(0===a.length)return{positions:n,outlineIndexBuffer:r,mergedOutlineRingLengths:o};let u=3*s,c=(0,i.l5)(e.positions,u,e.positions.length-u),h=(0,i.yH)(n,c),{outlineIndexBuffer:p,outlineRingLengths:g}=L(a,h);return{positions:h,outlineIndexBuffer:(0,f.lC)(r,p,h.length/3),mergedOutlineRingLengths:(0,f.lC)(o,g,o.length+g.length)}}(e,t.outlines,l,u,h):{positions:l,outlineIndexBuffer:void 0,mergedOutlineRingLengths:void 0};return{succeeded:!0,positions:g,indices:a,outlineIndexBuffer:d,outlineRingLengths:y,vertexCount:g.length/3,method:"libtess"}}function E(e,t,n){for(let r=0;r<e.length;r+=3){let i=e[r+t];e[r+t]=e[r+n],e[r+n]=i}}function L(e,t){let n=(0,f.my)(e.length),r=0;for(let i=0;i<e.length;i++){let o=e[i],s=o.count;if(s<=0){n[i]=0;continue}let l=3*o.index,a=3*(o.index+s-1),u=s>1&&t[l]===t[a]&&t[l+1]===t[a+1]&&t[l+2]===t[a+2]?s-1:s,c=u>0?u+1:0;n[i]=c,r+=c}let i=(0,f.my)(r,t.length/3),o=0;for(let t=0;t<e.length;t++){let r=n[t];if(0===r)continue;let s=e[t].index,l=r-1;for(let e=0;e<l;e++)i[o++]=s+e;i[o++]=s}return{outlineIndexBuffer:i,outlineRingLengths:n}}function U(e,{index:t,count:n}){let r=3*t,o=3*n;return(0,i.l5)(e,r,o)}function I(e,t,n,r,i,o){let s=o?e.length-1:0,l=o?-1:1;n*=3;for(let o=0;o<r;++o){let r=e[s];t[n++]=r[0],t[n++]=r[1],t[n++]=i&&null!=r[2]?r[2]:0,s+=l}return n/3}function Z(e,t){return function(e,t){let n=e.length;if(n<2)return!1;let r=e[0],i=e[n-1];return r[0]===i[0]&&r[1]===i[1]&&(!t||r[2]===i[2])}(e,t)?e.length-1:e.length}function _(e){return{succeeded:!1,message:e}}class N{constructor(e,t,n,r){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=r,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=F(e.outlineIndices[n]);return t}get outlineSegmentCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=F(e.outlineIndices[n]);return t}}class O extends N{}function P(e,t){let{projectIfNearlyVertical:n=!1,outlineOutput:o="none",method:s,owner:a}=t??{},h="tessellated-indices"===o,p=M(e.rings,!!e.hasZ,e.spatialReference),g=function(e,t){let{hasZ:n,ccwRingsAsHoles:r,spatialReference:o}=t,s=t.axis??M(e,n,o),l=e.length,a=[],u=[],c=[],h=[],f=e.reduce((e,t)=>e+t.length,0),p=0,g=(0,i.jh)(3*f),d=0,y=r&&e[0]&&C(e[0],n,s);for(let t=l-1;t>=0;t--){let i=e[t],o=Z(i,n);if(o<3){o>1&&h.push(i);continue}let l=!!r&&C(i,n,s);if(y?!l:l)a[p++]=i;else{let e=i.length;for(let t=0;t<p;++t)e+=a[t].length;let t={index:d,pathLengths:Array(p+1),count:e,holeIndices:Array(p)};t.pathLengths[0]=i.length,i.length>0&&c.push({index:d,count:i.length}),d=I(i,g,d,i.length,n,y);for(let e=0;e<p;++e){let r=a[e];t.holeIndices[e]=d,t.pathLengths[e+1]=r.length,r.length>0&&c.push({index:d,count:r.length}),d=I(r,g,d,r.length,n,y)}p=0,t.count>0&&u.push(t)}}let m=d;for(let e of h)c.push({index:d,count:e.length}),d=I(e,g,d,e.length,n,y);return{positions:3*d===g.length?g:(0,i.l5)(g,0,3*d),polygonVertexCount:m,polygons:u,outlines:c}}(e.rings,{hasZ:!!e.hasZ,ccwRingsAsHoles:!0,spatialReference:e.spatialReference,axis:p}),d=function(e,t){let n=function(e,t){let n={method:t?.method??v,projectionAxis:t?.projectionAxis??w,outlines:t?.outlines??A,owner:t?.owner??b},{projectionAxis:r}=n,i=null!=r&&2!==r;i&&E(e.positions,r,2);let o=function(e,t){if("libtess"===t.method)return S(e,t);let n=function(e,t){let n=null!=t.owner&&R.has(t.owner);return"auto"===t.method&&!(n&&e.polygonVertexCount>=1e4)}(e,t),r=[],i=0,o=0;for(let s of e.polygons){let l=U(e.positions,s),a=(s.holeIndices??[]).map(e=>e-s.index),c=a.length>0?a:null,h=(0,u.e)(l,c,3),f=u.e.deviation(l,a,3,h);if(n&&f>1e-5)return S(e,t);r.push({indices:h,index:s.index}),i+=h.length,o=Math.max(o,f)}let s=(0,f.my)(i,e.positions.length/3),l=0;for(let e of r)for(let t=0;t<e.indices.length;t++)s[l++]=e.indices[t]+e.index;let{outlineIndexBuffer:a,outlineRingLengths:c}=null==t.outlines?{outlineIndexBuffer:void 0,outlineRingLengths:void 0}:L(t.outlines,e.positions);return{succeeded:!0,positions:e.positions,indices:(0,f.uW)(s),outlineIndexBuffer:a,outlineRingLengths:c,vertexCount:e.positions.length/3,method:"earcut",deviation:o}}(e,n);if(i){let t=o.succeeded?o.positions:null;null!=t&&t!==e.positions&&E(t,2,r),E(e.positions,2,r)}return o}(e,t);return n.succeeded||"libtess-not-loaded"!==n.message?n:((0,l.gc)(T),async function(){try{await(0,c.l3)(),T.notify()}catch(e){throw e}}())}(g,{projectionAxis:n?p:void 0,outlines:h?g.outlines:void 0,method:s,owner:a});if((0,r.$X)(d))return d;if(!d.succeeded)return null;let y={output:"none"};if("vertex-data"===o){let e=d.positions===g.positions?g.positions.slice():g.positions;y={output:"vertex-data",outlines:j(g.outlines,e)}}else"tessellated-indices"===o&&(y=function(e){let{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};let r=Array(n.length),i=0;for(let e=0;e<n.length;e++){let o=n[e],s=t.slice(i,i+o);r[e]=s,i+=o}return{output:"tessellated-indices",outlineIndices:r}}(d));return new O(d.positions,d.indices,y,!0)}function j(e,t,n=null){return e.values().filter(({count:e})=>e>1).map(({index:e,count:r})=>{let o=3*e,s=3*r;return null==n?new B(e,r,(0,i.l5)(t,o,s)):new z(e,r,(0,i.l5)(t,o,s),(0,i.l5)(n,o,s))}).toArray()}function F(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class B{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class z extends B{constructor(e,t,n,r){super(e,t,n),this.mapPositions=r}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,2938,3312,5853],{52106(e,t,r){r.d(t,{A:()=>M});var i,n,o=r(32198),l=r(40124),s=r(69540),a=r(51447),u=r(25482),p=r(53966),c=r(36708),d=r(24326),y=r(91429),g=r(12195),f=r(65864),h=r(50498),m=r(55156),b=r(60950),v=r(54339),w=r(94128),x=r(33910);const S=Symbol("meshGeometryHandles");function C(e){if(null==e)return null;let t={};for(let r in e){let i=e[r];i&&(t[r]=i.toJSON())}return 0===Object.keys(t).length?null:t}let M=class extends((0,s.OU)(u.o)){static{i=w.Z}static{n=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,m.I)(this.origin);if(e)return(0,v.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){let e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:C(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,g.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.removeHandles(S);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,c.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],S)}};(0,o.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let r in e){let i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0===Object.keys(t).length?null:t}}})],M.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,y.MZ)({value:null})],M.prototype,"attributes",null),(0,o.Cg)([(0,y.MZ)({value:null,types:h.yR,json:{read:f.rS}})],M.prototype,"geometry",null),(0,o.Cg)([(0,y.MZ)()],M.prototype,"distance",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,o.Cg)([(0,y.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,o.Cg)([(0,y.MZ)({type:l.A,value:null})],M.prototype,"popupTemplate",null),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],M.prototype,"statisticsAggregatedIds",void 0),(0,o.Cg)([(0,y.MZ)({value:null,types:x.Es})],M.prototype,"symbol",null),(0,o.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=n=(0,o.Cg)([(0,y.$K)("esri.Graphic")],M)},19334(e,t,r){r.d(t,{e:()=>l});var i=r(54639),n=r(14112);class o{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function l(e){if(null==e)return null;switch(e.type){case"point":if((0,n.e6)(e))return null;break;case"polygon":if((0,n.Wq)(e))return null;break;case"polyline":if((0,n.IY)(e))return null;break;case"multipoint":if((0,n.DG)(e))return null;break;case"extent":if((0,n.As)(e))return null;break;default:return null}let t=i.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new o(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>u,p:()=>p});var i=r(54639),n=r(14112),o=r(16930),l=r(60408),s=r(65864);class a{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){let t=(0,s.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if("object"!=typeof e||!e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof o.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new o.A,r.read(e.spatialReference))),null==r)throw Error("Spatial reference required");return(0,l.fT)(e)?p("point",e,r):(0,l.Rg)(e)?p("polyline",e,r):(0,l.Bi)(e)?p("polygon",e,r):(0,l.U9)(e)?p("multipoint",e,r):(0,l.ZC)(e)?p("extent",e,r):null}function p(e,t,r){if(null==t)return null;let o=!1,l=!1;switch(e){case"point":if((0,n.e6)(t))return null;o=void 0!==t.z,l=void 0!==t.m;break;case"polygon":if((0,n.Wq)(t))return null;o=!0===t.hasZ,l=!0===t.hasM;break;case"polyline":if((0,n.IY)(t))return null;o=!0===t.hasZ,l=!0===t.hasM;break;case"multipoint":if((0,n.DG)(t))return null;o=!0===t.hasZ,l=!0===t.hasM;break;case"extent":if((0,n.As)(t))return null;o=null!=t.zmin&&null!=t.zmax,l=null!=t.mmin&&null!=t.mmax;break;default:throw Error("Unsupported geometry type: "+t.type)}return i.R.of(e,r,o,l,new a(t))}},14112(e,t,r){function i(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function n(e){if(0===(e.curveRings??e.rings).length)return!0;for(let t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function o(e){if(0===(e.curvePaths??e.paths).length)return!0;for(let t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function l(e){return 0===e.points.length}function s(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>s,DG:()=>l,IY:()=>o,Wq:()=>n,e6:()=>i})},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){let[r,o]=e.split("."),l=/^\s*\d+\s*$/;if(!r?.match||!l.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!o?.match||!l.test(o)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new n(parseInt(r,10),parseInt(o,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>d});var i=r(69622),n=r(7762),o=r(88620);const l=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function s(e){return e instanceof i.A}function a(e){return e instanceof n.A?Object.keys(e.items):s(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=a(e),n=a(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let o=n.filter(e=>!i.includes(e)),d=i.filter(e=>!n.includes(e)),y=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(o,d).sort(),g=p(e);if(g&&l.has(g)&&y.length)return{type:"complete",oldValue:e,newValue:t};let f,h=s(e)&&s(t);for(let i of y){let n,o=u(e,i),l=u(t,i);if((h||"function"!=typeof o&&"function"!=typeof l)&&o!==l&&(null!=o||null!=l)){if(r&&r[i]&&"function"==typeof r[i])n=r[i]?.(o,l);else if(o instanceof Date&&l instanceof Date){if(o.getTime()===l.getTime())continue;n={type:"complete",oldValue:o,newValue:l}}else n="object"==typeof o&&"object"==typeof l&&p(o)===p(l)?c(o,l):{type:"complete",oldValue:o,newValue:l};null!=n&&(null==f?f={type:"partial",diff:{[i]:n}}:f.diff[i]=n)}}return f}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},13069(e,t,r){r.d(t,{AG:()=>s,lk:()=>n,vD:()=>l,yS:()=>o});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function l(){return`{${n()}}`}function s(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},55156(e,t,r){r.d(t,{I:()=>n});const i=Symbol("idFieldsProviderSymbol");function n(e){return(t=e)&&i in t?e[i]:void 0;var t}r.d(t,["e",0,i])},54339(e,t,r){function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let r=[];for(let i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>n})},52136(e,t,r){var i=r(32198),n=r(91429);r.d(t,["p",0,e=>{let t=e,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._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},32756(e,t,r){r.d(t,{Rr:()=>s});var i=r(32198),n=r(93637),o=r(91429),l=r(91880);function s(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let n=new l.A;return n.read(i,r),[n]}const a={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:s},write:{writer:function(e,t,r,i){let o=e.find(e=>!!e.field);o&&(0,n.sM)(r,[o.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,o.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},28032(e,t,r){r.d(t,{A:()=>a});var i=r(32198),n=r(69540),o=r(25482),l=r(91429),s=r(56400);let a=class extends((0,n.OU)(o.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,l.MZ)()],a.prototype,"creatorField",void 0),(0,i.Cg)([(0,l.MZ)()],a.prototype,"creationDateField",void 0),(0,i.Cg)([(0,l.MZ)()],a.prototype,"editorField",void 0),(0,i.Cg)([(0,l.MZ)()],a.prototype,"editDateField",void 0),(0,i.Cg)([(0,l.MZ)()],a.prototype,"realm",void 0),(0,i.Cg)([(0,l.MZ)((0,s.P6)("dateFieldsTimeReference",!0))],a.prototype,"timeZone",void 0),a=(0,i.Cg)([(0,l.$K)("esri.layers.support.EditFieldsInfo")],a)},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(69540),o=r(66552),l=r(25482),s=r(91429);const a=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,n.OU)(l.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>c});var i=r(32198),n=r(69540),o=r(25482),l=r(91429),s=r(8631),a=r(29005),u=r(36005),p=r(43937);let c=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,s.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],c.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,i.Cg)([(0,l.MZ)({type:[a.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureType")],c)},46499(e,t,r){r.d(t,{A:()=>M});var i,n,o=r(32198),l=(r(44208),r(66552)),s=r(25482),a=r(4718),u=r(90629),p=r(91429),c=r(90360),d=r(73913),y=r(32730),g=r(77548),f=r(59868),h=r(73838),m=r(33910),b=r(36005),v=r(43937);const w=new l.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function x(e,t,r){return{enabled:!(0,g.TU)(r?.layer)}}function S(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function C(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let M=class extends s.o{static{i=y.vK}static{n=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),n=i[3],o=r(t[i[4]],i[5],i[6]);switch(n){case"AND":return e&&o;case"OR":return e||o}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=f.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&S(i))e=new d.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let n=e.toJSON(i);n.expression&&(t[r]=n)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new n({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],M.prototype,"name",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:x}}}}})],M.prototype,"allowOverrun",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:x}}}}})],M.prototype,"deconflictionStrategy",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&C(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],M.prototype,"labelExpression",void 0),(0,o.Cg)([(0,b.w)("labelExpression")],M.prototype,"readLabelExpression",null),(0,o.Cg)([(0,v.K)("labelExpression")],M.prototype,"writeLabelExpression",null),(0,o.Cg)([(0,p.MZ)({type:d.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return S(e)||C(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],M.prototype,"labelExpressionInfo",void 0),(0,o.Cg)([(0,v.K)("labelExpressionInfo")],M.prototype,"writeLabelExpressionInfo",null),(0,o.Cg)([(0,p.MZ)({type:w.apiValues,json:{type:w.jsonValues,read:w.read,write:w.write}})],M.prototype,"labelPlacement",void 0),(0,o.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],M.prototype,"offsetDistance",void 0),(0,o.Cg)([(0,p.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],M.prototype,"labelPosition",void 0),(0,o.Cg)([(0,p.MZ)({type:Number})],M.prototype,"maxScale",void 0),(0,o.Cg)([(0,v.K)("maxScale")],M.prototype,"writeMaxScale",null),(0,o.Cg)([(0,p.MZ)({type:Number})],M.prototype,"minScale",void 0),(0,o.Cg)([(0,v.K)("minScale")],M.prototype,"writeMinScale",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],M.prototype,"repeatLabel",void 0),(0,o.Cg)([(0,p.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],M.prototype,"repeatLabelDistance",null),(0,o.Cg)([(0,p.MZ)({types:m.em,json:{types:m.em,origins:{"portal-item":{types:m.em,read:{reader:(0,c.C)({types:m.em})},default:null},"web-scene":{types:m.Rv,read:{reader:(0,c.C)({types:m.Rv})},write:h.oO,default:null}},write:h.oO,default:null}})],M.prototype,"symbol",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"useCodedValues",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],M.prototype,"where",void 0),M=n=(0,o.Cg)([(0,p.$K)("esri.layers.support.LabelClass")],M)},73913(e,t,r){r.d(t,{A:()=>p});var i,n=r(32198),o=r(25482),l=r(91429),s=r(32730),a=r(36005),u=r(43937);let p=class extends o.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,s.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,s.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"name",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"expression",void 0),(0,n.Cg)([(0,a.w)("expression",["expression","value"])],p.prototype,"readExpression",null),(0,n.Cg)([(0,u.K)("expression")],p.prototype,"writeExpression",null),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"title",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"value",void 0),p=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.LabelExpressionInfo")],p)},37352(e,t,r){r.d(t,{A:()=>a});var i,n=r(32198),o=r(7762),l=r(25482),s=r(91429);let a=i=class extends l.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,n.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=i=(0,n.Cg)([(0,s.$K)("esri.layers.support.LayerFloorInfo")],a)},91880(e,t,r){r.d(t,{A:()=>u});var i,n=r(32198),o=r(66552),l=r(25482),s=r(91429);const a=new o.J({asc:"ascending",desc:"descending"});let u=class extends l.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n.Cg)([(0,s.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=i=(0,n.Cg)([(0,s.$K)("esri.layers.support.OrderByInfo")],u)},45067(e,t,r){r.d(t,{A:()=>p});var i=r(32198),n=r(69540),o=r(66552),l=r(25482),s=r(91429);const a=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,n.OU)(l.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,s.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"cardinality",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"role",void 0),p=(0,i.Cg)([(0,s.$K)("esri.layers.support.Relationship")],p)},41560(e,t,r){r.d(t,{Ch:()=>l,mW:()=>o});var i=r(34727),n=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function l(e,t,r){let o=function(e){if("manual"===u(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],c(i));return t}(e);if(o&&((0,i.gg)(t,o[0])||(0,i.ZH)(r,o[1])))return"";let l=Array.from(s(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;let n=p(e.at(0)?.minScale),o=c(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],n=e[t+1];if((0,i.ZH)(p(n.minScale),c(r.maxScale)))return!0}return!1}(l,t,r)?"1=1":l.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*s(e,t,r){if("manual"===u(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,n){return e=p(e),r=p(r),t=c(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||1/0}function c(e){return e||0}},32730(e,t,r){r.d(t,{BI:()=>c,D3:()=>u,XJ:()=>p,lc:()=>a,mX:()=>y,rU:()=>d,tH:()=>b,zA:()=>w});var i=r(799);const n=RegExp("__begin__","ig"),o=RegExp("__end__","ig"),l=RegExp("^__begin__","i"),s=RegExp("__end__$","i");function a(e){return e.replaceAll(RegExp("\\[","g"),"{").replaceAll(RegExp("\\]","g"),"}")}function u(e){return e.replaceAll(RegExp("\\{","g"),"[").replaceAll(RegExp("\\}","g"),"]")}function p(e){let t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=a(e.labelExpression),t.type="conventional"),t}function c(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function d(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return function(e){return(e?.match(g))?.[1].trim()||null}(t.expression);case"arcade":return b(t.expression)}return null}function y(e){let t;return e?(t=(0,i.HC)(e,e=>'__begin__$feature["'+e+'"]__end__'),t=l.test(t)?t.replace(l,""):'"'+t,t=s.test(t)?t.replace(s,""):t+'"',t=t.replaceAll(n,'" + ').replaceAll(o,' + "')):t='""',t}const g=/^\s*\{([^}]+)\}\s*$/i,f=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,h=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,m=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function b(e){if(!e)return null;let t=f.exec(e)||h.exec(e);return t?t[1]||t[3]:(t=m.exec(e),t?t[2]:null)}const v=Symbol("LabelClassInstance");function w(e){return"object"==typeof e&&!!e&&v in e}r.d(t,["vK",0,v])},39383(e,t,r){r.d(t,{w:()=>a,z:()=>c});var i=r(49186),n=r(53966),o=r(46499);const l=()=>n.A.getLogger("esri.layers.support.labelingInfo"),s=/\[([^[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{let i=new o.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(s,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],p={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function c(e,t){let r=[];for(let n of e){let e=n.labelPlacement,o=p[t];if(!n.symbol)return l().warn("No ILabelClass symbol specified."),[];if(!o)return l().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(o.includes(e))r.push(n);else{let i=o[0];e&&l().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let s=n.clone();s.labelPlacement=i,r.push(s)}}return r}},73681(e,t,r){r.d(t,{n:()=>a});var i=r(49186),n=r(53966),o=r(46140),l=r(95466),s=r(55674);class a{static async from(e,t,r){let l=e.dictionary_version?o.A.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(let e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);let d=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))d.delete(e);d.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});let y=await(0,s.xR)(e.expression,null,c);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let g=!l||!l.greaterEqual(4,0);g&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:l});let f=new u(r,g);return new a(g,p,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new l.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new l.A(t)}}class u extends s.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},22671(e,t,r){r.d(t,{A:()=>b});var i,n=r(32198),o=r(52106),l=r(66552),s=r(25482),a=r(4718),u=r(91429),p=r(16930),c=r(60408),d=r(65864),y=r(50498),g=r(20437),f=r(36005),h=r(43937);const m=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends s.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);let{features:n}=this;if(n)for(let e of n)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,d.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,n]}=e,o=this.features,l=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=o.length;e<t;e++)l?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,n],scale:[o,l]}=r,s=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;s=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*o+i,e=>n-e*l,s,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=p.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){let o=e[t],l=r.fromJSON(o),s=o.geometry?.spatialReference;null!=l.geometry&&!s&&(l.geometry.spatialReference=i);let a=o.aggregateGeometries,u=l.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}n.push(l)}return n}_quantizePoints(e,t,r){let i,n,o=[];for(let l=0,s=e.length;l<s;l++){let s=e[l];if(l>0){let e=t(s[0]),l=r(s[1]);(e!==i||l!==n)&&(o.push([e-i,l-n]),i=e,n=l)}else i=t(s[0]),n=r(s[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,c.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){let o=i[e],l=this._quantizePoints(o,t,r);l&&n.push(l)}return n.length>0?((0,c.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let o,l,s=(0,c.Bi)(e)?e.rings:e.paths;for(let e=0,i=s.length;e<i;e++){let i=s[e];for(let e=0,n=i.length;e<n;e++){let n=i[e];e>0?(o+=n[0],l+=n[1]):(o=n[0],l=n[1]),n[0]=t(o),n[1]=r(l)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{let o,l,s=e.points;for(let e=0,i=s.length;e<i;e++){let i=s[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&n)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],b.prototype,"features",void 0),(0,n.Cg)([(0,f.w)("features")],b.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[g.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],b.prototype,"geometryType",void 0),(0,n.Cg)([(0,h.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,f.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,n.Cg)([(0,h.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var i=r(32198),n=r(66552),o=r(53966),l=r(91429),s=r(93223);const a=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";r.d(t,["K",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&u||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===p||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,l.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,s.e)(a,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,l.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,a])},93470(e,t,r){const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,n,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,o])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3312],{52106(e,t,i){i.d(t,{A:()=>w});var r,l,o=i(32198),n=i(40124),s=i(69540),a=i(51447),u=i(25482),p=i(53966),d=i(36708),g=i(24326),y=i(91429),c=i(12195),h=i(65864),f=i(50498),m=i(55156),b=i(60950),v=i(54339),M=i(94128),S=i(33910);const C=Symbol("meshGeometryHandles");function _(e){if(null==e)return null;let t={};for(let i in e){let r=e[i];r&&(t[i]=r.toJSON())}return 0===Object.keys(t).length?null:t}let w=class extends((0,s.OU)(u.o)){static{r=M.Z}static{l=this}constructor(e){super(e),this[r]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,g.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new l({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,m.I)(this.origin);if(e)return(0,v.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){let e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:_(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,c.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let l={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(l.action=r),"attributes"===e&&(l.attributeName=r),this.layer.graphicChanged(l)}_watchMeshGeometryChanges(){this.removeHandles(C);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,d.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,d.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],C)}};(0,o.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let i in e){let r=(0,h.rS)(e[i]);r&&(t[i]=r)}return 0===Object.keys(t).length?null:t}}})],w.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,y.MZ)({value:null})],w.prototype,"attributes",null),(0,o.Cg)([(0,y.MZ)({value:null,types:f.yR,json:{read:h.rS}})],w.prototype,"geometry",null),(0,o.Cg)([(0,y.MZ)()],w.prototype,"distance",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean})],w.prototype,"isAggregate",void 0),(0,o.Cg)([(0,y.MZ)({clonable:!1})],w.prototype,"layer",void 0),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],w.prototype,"origin",void 0),(0,o.Cg)([(0,y.MZ)({type:n.A,value:null})],w.prototype,"popupTemplate",null),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],w.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],w.prototype,"statisticsAggregatedIds",void 0),(0,o.Cg)([(0,y.MZ)({value:null,types:S.Es})],w.prototype,"symbol",null),(0,o.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],w.prototype,"_version",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean,value:!0})],w.prototype,"visible",null),w=l=(0,o.Cg)([(0,y.$K)("esri.Graphic")],w)},6797(e,t,i){i.d(t,{Ui:()=>g});var r=i(69622),l=i(7762),o=i(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function s(e){return e instanceof r.A}function a(e){return e instanceof l.A?Object.keys(e.items):s(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof l.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){let i=e.diff;if(i&&"function"==typeof i)return i(e,t);let r=a(e),l=a(t);if(0===r.length&&0===l.length)return;if(!r.length||!l.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let o=l.filter(e=>!r.includes(e)),g=r.filter(e=>!l.includes(e)),y=r.filter(i=>l.includes(i)&&u(e,i)!==u(t,i)).concat(o,g).sort(),c=p(e);if(c&&n.has(c)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h,f=s(e)&&s(t);for(let r of y){let l,o=u(e,r),n=u(t,r);if((f||"function"!=typeof o&&"function"!=typeof n)&&o!==n&&(null!=o||null!=n)){if(i&&i[r]&&"function"==typeof i[r])l=i[r]?.(o,n);else if(o instanceof Date&&n instanceof Date){if(o.getTime()===n.getTime())continue;l={type:"complete",oldValue:o,newValue:n}}else l="object"==typeof o&&"object"==typeof n&&p(o)===p(n)?d(o,n):{type:"complete",oldValue:o,newValue:n};null!=l&&(null==h?h={type:"partial",diff:{[r]:l}}:h.diff[r]=l)}}return h}function g(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},13069(e,t,i){i.d(t,{AG:()=>s,lk:()=>l,vD:()=>n,yS:()=>o});const r="randomUUID"in crypto;function l(){if(r)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${l().toUpperCase()}}`}function n(){return`{${l()}}`}function s(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},55156(e,t,i){i.d(t,{I:()=>l});const r=Symbol("idFieldsProviderSymbol");function l(e){return(t=e)&&r in t?e[r]:void 0;var t}i.d(t,["e",0,r])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function l(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>l})},52136(e,t,i){var r=i(32198),l=i(91429);i.d(t,["p",0,e=>{let t=e,i=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._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},28032(e,t,i){i.d(t,{A:()=>a});var r=i(32198),l=i(69540),o=i(25482),n=i(91429),s=i(56400);let a=class extends((0,l.OU)(o.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,r.Cg)([(0,n.MZ)()],a.prototype,"creatorField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"creationDateField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"editorField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"editDateField",void 0),(0,r.Cg)([(0,n.MZ)()],a.prototype,"realm",void 0),(0,r.Cg)([(0,n.MZ)((0,s.P6)("dateFieldsTimeReference",!0))],a.prototype,"timeZone",void 0),a=(0,r.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],a)},37352(e,t,i){i.d(t,{A:()=>a});var r,l=i(32198),o=i(7762),n=i(25482),s=i(91429);let a=r=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,l.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,l.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,l.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=r=(0,l.Cg)([(0,s.$K)("esri.layers.support.LayerFloorInfo")],a)},45067(e,t,i){i.d(t,{A:()=>p});var r=i(32198),l=i(69540),o=i(66552),n=i(25482),s=i(91429);const a=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,l.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,r.Cg)([(0,s.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"cardinality",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"role",void 0),p=(0,r.Cg)([(0,s.$K)("esri.layers.support.Relationship")],p)},32730(e,t,i){i.d(t,{BI:()=>d,D3:()=>u,XJ:()=>p,lc:()=>a,mX:()=>y,rU:()=>g,tH:()=>b,zA:()=>M});var r=i(799);const l=RegExp("__begin__","ig"),o=RegExp("__end__","ig"),n=RegExp("^__begin__","i"),s=RegExp("__end__$","i");function a(e){return e.replaceAll(RegExp("\\[","g"),"{").replaceAll(RegExp("\\]","g"),"}")}function u(e){return e.replaceAll(RegExp("\\{","g"),"[").replaceAll(RegExp("\\}","g"),"]")}function p(e){let t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=a(e.labelExpression),t.type="conventional"),t}function d(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function g(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return function(e){return(e?.match(c))?.[1].trim()||null}(t.expression);case"arcade":return b(t.expression)}return null}function y(e){let t;return e?(t=(0,r.HC)(e,e=>'__begin__$feature["'+e+'"]__end__'),t=n.test(t)?t.replace(n,""):'"'+t,t=s.test(t)?t.replace(s,""):t+'"',t=t.replaceAll(l,'" + ').replaceAll(o,' + "')):t='""',t}const c=/^\s*\{([^}]+)\}\s*$/i,h=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,f=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,m=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function b(e){if(!e)return null;let t=h.exec(e)||f.exec(e);return t?t[1]||t[3]:(t=m.exec(e),t?t[2]:null)}const v=Symbol("LabelClassInstance");function M(e){return"object"==typeof e&&!!e&&v in e}i.d(t,["vK",0,v])},41366(e,t,i){var r=i(32198),l=i(66552),o=i(53966),n=i(91429),s=i(93223);const a=(0,l.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";i.d(t,["K",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&p||i&&u||null,t&&i&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===p||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,s.e)(a,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,n.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i},"Q",0,a])},93470(e,t,i){const r=[252,146,31,255],l={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r};i.d(t,["Cb",0,l,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,r,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,o])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9696],{74639(e,t,r){r.d(t,{M:()=>s,s:()=>u});var n=r(44729),a=r(1262),i=r(55612),o=r(15032),l=r(34747);function u(e,t){let r=c[e.toLowerCase()];if(null==r)throw new a.L("FunctionNotRecognized");if(t.length<r.minParams||t.length>r.maxParams)throw new a.L("InvalidParameterCount",{name:e.toUpperCase()});return r.evaluate(t)}function s(e,t){let r=c[e.toLowerCase()];return null!=r&&t>=r.minParams&&t<=r.maxParams}const c={min:{minParams:1,maxParams:1,evaluate:e=>p(e[0],"min")},max:{minParams:1,maxParams:1,evaluate:e=>p(e[0],"max")},avg:{minParams:1,maxParams:1,evaluate:e=>f(e[0])},sum:{minParams:1,maxParams:1,evaluate:e=>function(e){if(null===e||0===e.length)return null;let t=0;for(let r=0;r<e.length;r++){let n=e[r];if(null!==n){if(!d(n))throw new a.L("InvalidValueForAggregateFunction");t+=n}}return t}(e[0])},stddev:{minParams:1,maxParams:1,evaluate:e=>function(e){if(null===e)return null;let t=m(e);return null===t?null:Math.sqrt(t)}(e[0])},count:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].filter(e=>null!==e).length},var:{minParams:1,maxParams:1,evaluate:e=>m(e[0])}};function f(e){if(null===e)return null;let t=0,r=0;for(let n=0;n<e.length;n++){let i=e[n];if(null!==i){if(!d(i))throw new a.L("InvalidValueForAggregateFunction");r++,t+=i}}return 0===r?null:t/r}function d(e){return"number"==typeof e}function p(e,t){if(null===e)return null;let r=null,a=null;for(let u of e){let e=u;e=n.n.isDateOnly(u)||o.k.isTimeOnly(u)?u.toNumber():l.c9.isDateTime(u)?u.toMillis():i.g.isTimestampOffset(u)?u.toMilliseconds():u,(null===r||"max"===t&&null!==a&&null!==e&&a<=e||"min"===t&&null!==a&&null!==e&&a>=e)&&(r=u,a=e)}return r}function m(e){if(null===e||0===(e=e.filter(e=>null!==e)).length)return null;let t=f(e);if(null===t)return null;let r=0;for(let n of e){if(!d(n))throw new a.L("InvalidValueForAggregateFunction");r+=(t-n)**2}return r/(e.length-1)}},55612(e,t,r){r.d(t,{g:()=>o});var n=r(34747);function a(e){return Number.isNaN(e)||0===e?e:Math.trunc(e)}const i="esri.core.sql.SqlTimeStampOffset";class o{constructor(e){this._timeStampOffset=e,this.declaredRootClass=i,this._millis=null,this._date=null}static isTimestampOffset(e){return"object"==typeof e&&!!e&&"declaredRootClass"in e&&e.declaredRootClass===i}toDateTime(){return this._date??=n.c9.fromISO(this._timeStampOffset,{setZone:!0}),this._date}toMilliseconds(){return null==this._millis?(null!=this._date&&(this._millis??=this._date.toMillis()),this._millis??=Date.parse(this._timeStampOffset)):this._millis}get isValid(){return this.toDateTime().isValid}get timezoneOffsetHour(){return a(this.toDateTime().offset/60)}get timezoneOffsetMinutes(){return a(this.toDateTime().offset%60)}get hour(){return this.toDateTime().hour}get minute(){return this.toDateTime().minute}get second(){return this.toDateTime().second}get day(){return this.toDateTime().day}get month(){return this.toDateTime().month}get year(){return this.toDateTime().year}startOfDay(){return o.fromDateTime(this.toDateTime().startOf("day"))}static fromJSDate(e){return new o(n.c9.fromJSDate(e).toISO({includeOffset:!0}))}static fromDateTime(e){return new o(e.toISO({includeOffset:!0}))}static fromParts(e,t,r=0,n=0,a=0,i=0,l=0,u=!1,s=0,c=0){let f=`${e.toString().padStart(4,"0")}-${t.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}`,d="";i<10&&(d="0");let p=`${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${d+i.toString()}`;0!==l&&(p+="."+l.toString().padStart(3,"0"));let m=`${u?"-":"+"}${s.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`;return new o(f+"T"+p+m)}toStorageFormat(){return this._timeStampOffset}toString(){return this._timeStampOffset}toSQLValue(){let e=this.toDateTime().toSQL({includeOffset:!0,includeOffsetSpace:!0});return e&&=e.replace(".000",""),e}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}addMilliseconds(e){let t=this.toDateTime().plus(e);return o.fromDateTime(t)}}},89696(e,t,r){r.d(t,{A:()=>pe});var n=r(44208),a=r(5479),i=r(74639),o=r(44729),l=r(1262);function u(e){if(null!==e.precision||null!==e.secondary)throw new l.L("PrimarySecondaryQualifiers")}function s(e,t){if(t.includes(".")){let r=t.split(".");e.second=parseFloat(r[0]),e.millis=parseInt(r[1],10)}else e.second=parseFloat(t)}const c="esri.core.sql.SqlInterval";class f{constructor(){this.declaredRootClass=c,this.op="+",this.day=0,this.second=0,this.hour=0,this.month=0,this.year=0,this.minute=0,this.millis=0}static isInterval(e){return"object"==typeof e&&!!e&&"declaredRootClass"in e&&e.declaredRootClass===c}static createFromMilliseconds(e){let t=new f;return t.second=e/1e3,t}static createFromValueAndQualifier(e,t,r){let n=null,a=new f;if(a.op="-"===r?"-":"+","interval-period"===t.type){u(t);let r=RegExp("^[0-9]{1,}$");if("year"===t.period||"month"===t.period)throw new l.L("YearMonthIntervals");if("second"===t.period){if(!/^[0-9]{1,}(\.[0-9]{1,}){0,1}$/.test(e))throw new l.L("IllegalInterval");s(a,e)}else{if(!r.test(e))throw new l.L("IllegalInterval");a[t.period]=parseFloat(e)}}else{if(u(t.start),u(t.end),"year"===t.start.period||"month"===t.start.period||"year"===t.end.period||"month"===t.end.period)throw new l.L("YearMonthIntervals");switch(t.start.period){case"day":switch(t.end.period){case"hour":if(n=RegExp("^[0-9]{1,} [0-9]{1,}$"),!n.test(e))throw new l.L("IllegalInterval");a[t.start.period]=parseFloat(e.split(" ")[0]),a[t.end.period]=parseFloat(e.split(" ")[1]);break;case"minute":if(n=RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,}$"),!n.test(e))throw new l.L("IllegalInterval");{a[t.start.period]=parseFloat(e.split(" ")[0]);let r=e.split(" ")[1].split(":");a.hour=parseFloat(r[0]),a.minute=parseFloat(r[1])}break;case"second":if(n=RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,}(\\.[0-9]{1,}){0,1}$"),!n.test(e))throw new l.L("IllegalInterval");{a[t.start.period]=parseFloat(e.split(" ")[0]);let r=e.split(" ")[1].split(":");a.hour=parseFloat(r[0]),a.minute=parseFloat(r[1]),s(a,r[2])}break;default:throw new l.L("IllegalInterval")}break;case"hour":switch(t.end.period){case"minute":if(n=RegExp("^[0-9]{1,}:[0-9]{1,}$"),!n.test(e))throw new l.L("IllegalInterval");a.hour=parseFloat(e.split(":")[0]),a.minute=parseFloat(e.split(":")[1]);break;case"second":if(n=RegExp("^[0-9]{1,}:[0-9]{1,2}:[0-9]{1,}(\\.[0-9]{1,}){0,1}$"),!n.test(e))throw new l.L("IllegalInterval");{let t=e.split(":");a.hour=parseFloat(t[0]),a.minute=parseFloat(t[1]),s(a,t[2])}break;default:throw new l.L("IllegalInterval")}break;case"minute":if("second"!==t.end.period)throw new l.L("IllegalInterval");if(n=RegExp("^[0-9]{1,}:[0-9]{1,}(\\.[0-9]{1,}){0,1}$"),!n.test(e))throw new l.L("IllegalInterval");{let t=e.split(":");a.minute=parseFloat(t[0]),s(a,t[1])}break;default:throw new l.L("IllegalInterval")}}return a}valueInMilliseconds(){return("-"===this.op?-1:1)*(this.millis+1e3*this.second+60*this.minute*1e3+60*this.hour*60*1e3+24*this.day*60*60*1e3+this.month*(365/12)*24*60*60*1e3+365*this.year*24*60*60*1e3)}}var d=r(55612),p=r(15032),m=r(3330),h=r(34747);const v=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/,w=/^(\d{1,2}):(\d{1,2})$/,g=/^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/,I=/^(\d{4})-(\d{1,2})-(\d{1,2})$/,y=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$/,L=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)? {0,1}(\+|-)(\d{1,2}):(\d{1,2})$/,T=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})? {0,1}(\+|-)(\d{1,2}):(\d{1,2})$/,N=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/;function O(e,t){if(t instanceof h.bo)return t===m.GB.instance?h.c9.fromMillis(e.getTime(),{zone:m.GB.instance}):h.c9.fromJSDate(e,{zone:t});switch(t){case"system":case"local":case null:return h.c9.fromJSDate(e);default:return"unknown"===t?.toLowerCase()?h.c9.fromMillis(e.getTime(),{zone:m.GB.instance}):h.c9.fromJSDate(e,{zone:t})}}function E(e){return f.isInterval(e)}function S(e){return h.c9.isDateTime(e)}function x(e){return o.n.isDateOnly(e)}function C(e){return p.k.isTimeOnly(e)}function _(e){return d.g.isTimestampOffset(e)}function D(e){let t=v.exec(e);if(null!==t){let[,e,r,n]=t,a=p.k.fromParts(parseInt(e,10),parseInt(r,10),parseInt(n,10),0);if(null!==a)return a;throw new l.L("InvalidTime")}if(t=w.exec(e),null!==t){let[,e,r]=t,n=p.k.fromParts(parseInt(e,10),parseInt(r,10),0,0);if(null!==n)return n;throw new l.L("InvalidTime")}if(t=g.exec(e),null!==t){let[,e,r,n,a]=t,i=p.k.fromParts(parseInt(e,10),parseInt(r,10),parseInt(n,10),parseInt(a,10));if(null!==i)return i;throw new l.L("InvalidTime")}throw new l.L("InvalidTime")}function M(e,t){let r=y.exec(e);if(null!==r){let[,e,n,a,i,o,u,s]=r,c=h.c9.fromObject({year:parseInt(e,10),month:parseInt(n,10),day:parseInt(a,10),hour:parseInt(i,10),minute:parseInt(o,10),second:parseInt(u,10),millisecond:s?parseInt(s.replace(".",""),10):0},{zone:(0,m.Qo)(t)});if(!1===c.isValid)throw new l.L("InvalidTimeStamp");return c}if(r=L.exec(e),null!==r){let[,e,t,n,a,i,o,u,s,c,f]=r,p=d.g.fromParts(parseInt(e,10),parseInt(t,10),parseInt(n,10),parseInt(a,10),parseInt(i,10),parseInt(o,10),u?parseInt(u.replace(".",""),10):0,"-"===s,parseInt(c,10),parseInt(f,10));if(!1===p.isValid)throw new l.L("InvalidTimeStamp");return p}if(r=T.exec(e),null!==r){let[,e,t,n,a,i,o,u,s]=r,c=d.g.fromParts(parseInt(e,10),parseInt(t,10),parseInt(n,10),parseInt(a,10),parseInt(i,10),0,0,"-"===o,parseInt(u,10),parseInt(s,10));if(!1===c.isValid)throw new l.L("InvalidTimeStamp");return c}if(r=N.exec(e),null!==r){let[,e,n,a,i,o]=r,u=h.c9.fromObject({year:parseInt(e,10),month:parseInt(n,10),day:parseInt(a,10),hour:parseInt(i,10),minute:parseInt(o,10),second:0},{zone:(0,m.Qo)(t)});if(!1===u.isValid)throw new l.L("InvalidTimeStamp");return u}if(r=I.exec(e),null!==r){let[,e,n,a]=r,i=h.c9.fromObject({year:parseInt(e,10),month:parseInt(n,10),day:parseInt(a,10),hour:0,minute:0,second:0},{zone:(0,m.Qo)(t)});if(!1===i.isValid)throw new l.L("InvalidTimeStamp");return i}throw new l.L("InvalidTimeStamp")}function b(e,t){let r=I.exec(e);if(null===r)try{return M(e,t)}catch{throw new l.L("InvalidDate")}let[,n,a,i]=r,u=o.n.fromParts(parseInt(n,10),parseInt(a,10),parseInt(i,10));if(null===u)throw new l.L("InvalidDate");return u}var P=r(34727),A=r(799),F=r(54218);function $(e){return!(!S(e)&&!_(e))}function R(e){return!!(S(e)||x(e)||_(e)||C(e))}function U(e){if(S(e))return e.toMillis();if(x(e))return e.toNumber();if(_(e))return e.toMilliseconds();throw new l.L("InvalidDataType")}function k(e,t,r){if(null==e||null==t)return null;if((0,F.Et)(e)){if((0,F.Et)(t))return V(e,t,r);if((0,F.Kg)(t))return function(e,t,r){let n=parseFloat(t);if(!isNaN(n))return V(e,n,r);let a=e.toString();switch(r){case"<>":return a!==t;case"=":return a===t;case">":return a>t;case"<":return a<t;case">=":return a>=t;case"<=":return a<=t}}(e,t,r);if(R(t)||x(t))throw new l.L("InvalidOperator")}else if((0,F.Kg)(e)){if((0,F.Et)(t))return function(e,t,r){let n=parseFloat(e);if(!isNaN(n))return V(n,t,r);let a=t.toString();switch(r){case"<>":return e!==a;case"=":return e===a;case">":return e>a;case"<":return e<a;case">=":return e>=a;case"<=":return e<=a}}(e,t,r);if((0,F.Kg)(t))return function(e,t,r){switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}(e,t,r);if(S(t)||x(t)||C(t)||_(t))throw new l.L("InvalidOperator")}else if(S(e)){if($(t)){if((0,m.Y4)(e.zone)){if(S(t)&&!(0,m.Y4)(t.zone)||_(t))return z(e,t,r)}else if(S(t)&&(0,m.Y4)(t.zone))return z(e,t,r);return V(U(e),U(t),r)}if((0,F.Kg)(t))throw new l.L("InvalidOperator");if(x(t))return function(e,t,r){let n=t.toDateTimeLuxon(e.zone);return V((e=e.startOf("day")).toMillis(),n.toMillis(),r)}(e,t,r);if(C(t)||(0,F.Et)(t))throw new l.L("InvalidOperator")}else if(x(e)){if(_(t))return function(e,t,r){let n=e.toDateTimeLuxon(t.toDateTime().zone);return t=t.startOfDay(),V(n.toMillis(),t.toMilliseconds(),r)}(e,t,r);if(S(t))return function(e,t,r){let n=e.toDateTimeLuxon(t.zone);return t=t.startOf("day"),V(n.toMillis(),t.toMillis(),r)}(e,t,r);if((0,F.Kg)(t))throw new l.L("InvalidOperator");if(x(t))return function(e,t,r){let n=e.compare(t);switch(r){case"<>":return 0!==n;case"=":return 0===n;case">":return n>0;case"<":return n<0;case">=":return n>=0;case"<=":return n<=0}}(e,t,r);if(C(t)||(0,F.Et)(t))throw new l.L("InvalidOperator")}else if(C(e)){if(C(t))return V(e.toNumber(),t.toNumber(),r);if((0,F.Kg)(t)||(0,F.Et)(t)||x(t)||$(t))throw new l.L("InvalidOperator")}else if(_(e)){if($(t))return h.c9.isDateTime(t)&&(0,m.Y4)(t.zone)?z(e,t,r):V(U(e),U(t),r);if((0,F.Kg)(t))throw new l.L("InvalidOperator");if(x(t))return function(e,t,r){let n=t.toDateTimeLuxon(e.toDateTime().zone);return V((e=e.startOfDay()).toMilliseconds(),n.toMillis(),r)}(e,t,r);if(C(t)||(0,F.Et)(t))throw new l.L("InvalidOperator")}switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}function V(e,t,r){switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}function z(e,t,r){d.g.isTimestampOffset(e)&&(e=e.toDateTime()),d.g.isTimestampOffset(t)&&(t=t.toDateTime());let n=H(e),a=H(t);switch(r){case"<>":return n!==a;case"=":return n===a;case">":return n>a;case"<":return n<a;case">=":return n>=a;case"<=":return n<=a}}function H(e){return 321408e5*e.year+26784e5*e.month+864e5*e.day+36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}function q(e,t,r){let n=j[e.toLowerCase()];if(null==n)throw new l.L("FunctionNotRecognized");if(t.length<n.minParams||t.length>n.maxParams)throw new l.L("InvalidParameterCount",{name:e.toUpperCase()});return n.evaluate(t,r)}function K(e,t){let r=j[e.toLowerCase()];return null!=r&&t>=r.minParams&&t<=r.maxParams}function Z(e){return!((0,F.$P)(e)||x(e)||S(e)||C(e)||_(e))}function Y(e){return x(e)||C(e)?e.toString():_(e)?e.toSQLValue():S(e)?0===e.millisecond?e.toFormat("yyyy-LL-dd HH:mm:ss"):e.toSQL({includeOffset:!1}):(0,F.$P)(e)?Y(h.c9.fromJSDate(e)):e.toString()}const j={extract:{minParams:2,maxParams:2,evaluate:([e,t])=>{if(null==t)return null;if((0,F.$P)(t))switch(e.toUpperCase()){case"SECOND":return t.getSeconds();case"MINUTE":return t.getMinutes();case"HOUR":return t.getHours();case"DAY":return t.getDate();case"MONTH":return t.getMonth()+1;case"YEAR":return t.getFullYear();case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":return 0;case"DOW":return h.c9.fromJSDate(t,{zone:"system"}).weekday;case"DOY":return h.c9.fromJSDate(t,{zone:"system"}).ordinal;case"WEEK":return h.c9.fromJSDate(t,{zone:"system"}).weekNumber}else if(S(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour;case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new l.L("InvalidFunctionParameters",{function:"EXTRACT"});case"DOW":return t.weekday;case"DOY":return t.ordinal;case"WEEK":return t.weekNumber}else if(x(t))switch(e.toUpperCase()){case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new l.L("InvalidFunctionParameters",{function:"EXTRACT"});case"DOW":return t.toDateTime("unknown").weekday;case"DOY":return t.toDateTime("unknown").ordinal;case"WEEK":return t.toDateTime("unknown").weekNumber}else if(C(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour}else if(_(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour;case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":return t.timezoneOffsetHour;case"TIMEZONE_MINUTE":return t.timezoneOffsetMinutes;case"DOW":return t.toDateTime().weekday;case"DOY":return t.toDateTime().ordinal;case"WEEK":return t.toDateTime().weekNumber}throw new l.L("InvalidFunctionParameters",{function:"EXTRACT"})}},substring:{minParams:2,maxParams:3,evaluate:e=>{if(2===e.length){let[t,r]=e;return null==t||null==r?null:t.toString().substring(r-1)}if(3===e.length){let[t,r,n]=e;return null==t||null==r||null==n?null:n<=0?"":t.toString().substring(r-1,r+n-1)}}},position:{minParams:2,maxParams:2,evaluate:([e,t])=>null==e||null==t?null:t.indexOf(e)+1},trim:{minParams:2,maxParams:3,evaluate:e=>{let t=3===e.length,r=t?e[1]:" ",n=t?e[2]:e[1];if(null==r||null==n)return null;let a=`(${(0,A.Cj)(r)})`;switch(e[0]){case"BOTH":return n.replaceAll(RegExp(`^${a}*|${a}*$`,"g"),"");case"LEADING":return n.replaceAll(RegExp(`^${a}*`,"g"),"");case"TRAILING":return n.replaceAll(RegExp(`${a}*$`,"g"),"")}throw new l.L("InvalidFunctionParameters",{function:"TRIM"})}},abs:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.abs(e[0])},ceiling:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.ceil(e[0])},floor:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.floor(e[0])},log:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.log(e[0])},log10:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.log(e[0])*Math.LOG10E},sin:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.sin(e[0])},cos:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.cos(e[0])},tan:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.tan(e[0])},asin:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.asin(e[0])},acos:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.acos(e[0])},atan:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.atan(e[0])},sign:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0]>0?1:e[0]<0?-1:0},power:{minParams:2,maxParams:2,evaluate:e=>null==e[0]||null==e[1]?null:e[0]**e[1]},mod:{minParams:2,maxParams:2,evaluate:e=>null==e[0]||null==e[1]?null:e[0]%e[1]},round:{minParams:1,maxParams:2,evaluate:e=>{let t=e[0],r=2===e.length?10**e[1]:1;return null==t?null:Math.round(t*r)/r}},truncate:{minParams:1,maxParams:2,evaluate:e=>null==e[0]?null:1===e.length||0===e[1]?Math.trunc(e[0]):(0,P.pF)("trunc",e[0],-Number(e[1]))},char_length:{minParams:1,maxParams:1,evaluate:e=>(0,F.Kg)(e[0])?e[0].length:0},concat:{minParams:1,maxParams:1/0,evaluate:e=>{let t="";for(let r=0;r<e.length;r++){if(null==e[r])return null;t+=e[r].toString()}return t}},lower:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].toString().toLowerCase()},upper:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].toString().toUpperCase()},coalesce:{minParams:1,maxParams:1/0,evaluate:e=>{for(let t of e)if(null!==t)return t;return null}},cosh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.cosh(e[0])},sinh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.sinh(e[0])},tanh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.tanh(e[0])},nullif:{minParams:2,maxParams:2,evaluate:e=>k(e[0],e[1],"=")?null:e[0]},cast:{minParams:2,maxParams:2,evaluate:(e,t)=>{let r=e[0],n=e[1];if(null===r)return null;switch(n.type){case"integer":{if(!Z(r))throw new l.L("CannotCastValue");let e=parseInt(r,10);if(isNaN(e))throw new l.L("CannotCastValue");return e}case"smallint":{if(!Z(r))throw new l.L("CannotCastValue");let e=parseInt(r,10);if(isNaN(e)||e>32767||e<-32767)throw new l.L("CannotCastValue");return e}case"float":case"real":{if(!Z(r))throw new l.L("CannotCastValue");let e=parseFloat(r);if(isNaN(e))throw new l.L("CannotCastValue");return e}case"time":return function(e){if((0,F.$P)(e))return p.k.fromDateJS(e);if(S(e))return p.k.fromDateTime(e);if(x(e))throw new l.L("CannotCastValue");if(C(e))return e;if(_(e))return p.k.fromSqlTimeStampOffset(e);if((0,F.Kg)(e))return D(e);throw new l.L("CannotCastValue")}(r);case"date":return function(e){if((0,F.$P)(e))return o.n.fromDateJS(e);if(S(e))return o.n.fromParts(e.year,e.month,e.day);if(x(e))return e;if(C(e)||_(e)&&null===o.n.fromParts(e.year,e.month,e.day))throw new l.L("CannotCastValue");if((0,F.Kg)(e)){let t=o.n.fromReader(e);if(null!==t&&t.isValid)return t}throw new l.L("CannotCastValue")}(r);case"timestamp":return function(e,t){if((0,F.$P)(e))return O(e,t);if(S(e))return e;if(x(e))return e.toDateTimeLuxon("unknown");if(C(e))throw new l.L("CannotCastValue");if(_(e))return e;if((0,F.Kg)(e))return M(e,"unknown");throw new l.L("CannotCastValue")}(r,t);case"varchar":{let e=Y(r);if(e.length>n.size)throw new l.L("CannotCastValue");return e}default:throw new l.L("InvalidDataType")}}}};function W(e,t,r,n){if("||"===e)return q("concat",[t,r],n);if(null===t||null===r)return null;if((0,F.Et)(t)){if((0,F.Et)(r))return J(t,r,e);if(E(r))return function(e,t,r){switch(r){case"+":return f.createFromMilliseconds(e+t.valueInMilliseconds());case"-":return f.createFromMilliseconds(e-t.valueInMilliseconds());case"*":return f.createFromMilliseconds(e*t.valueInMilliseconds());case"/":return f.createFromMilliseconds(e/t.valueInMilliseconds())}throw new l.L("InvalidOperator")}(t,r,e);if(C(r))return function(){throw new l.L("InvalidOperator")}();if(x(r))return function(){throw new l.L("InvalidOperator")}();if(_(r))return function(){throw new l.L("InvalidOperator")}();if(S(r))return function(){throw new l.L("InvalidOperator")}();if((0,F.Kg)(r))return function(e,t,r){let n=parseFloat(t);if(isNaN(n))throw new l.L("InvalidOperator");return J(e,n,r)}(t,r,e);throw new l.L("InvalidOperator")}if(x(t)){if((0,F.Et)(r))return function(e,t,r){let n=1e3*t*24*60*60;switch(r){case"+":return e.plus("milliseconds",n);case"-":return e.plus("milliseconds",-1*n)}throw new l.L("InvalidOperator")}(t,r,e);if(E(r))return function(e,t,r){switch(r){case"+":return e.plus("milliseconds",t.valueInMilliseconds());case"-":return e.plus("milliseconds",-1*t.valueInMilliseconds())}throw new l.L("InvalidOperator")}(t,r,e);if(C(r))return function(){throw new l.L("InvalidOperator")}();if(x(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon("UTC").diff(t.toDateTimeLuxon("UTC")).as("days");throw new l.L("InvalidOperator")}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon(t.toDateTime().zone).diff(t.toDateTime()).as("days");throw new l.L("InvalidOperator")}(t,r,e);if(S(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon(t.zone).diff(t).as("days");throw new l.L("InvalidOperator")}(t,r,e);if((0,F.Kg)(r))return function(){throw new l.L("InvalidOperator")}();throw new l.L("InvalidOperator")}if(C(t)){if((0,F.Et)(r))return function(e,t,r){let n=1e3*t*24*60*60;switch(r){case"+":return e.plus("milliseconds",n);case"-":return e.plus("milliseconds",-1*n)}throw new l.L("InvalidOperator")}(t,r,e);if(E(r))return function(e,t,r){switch(r){case"+":return e.plus("milliseconds",t.valueInMilliseconds());case"-":return e.plus("milliseconds",-1*t.valueInMilliseconds())}throw new l.L("InvalidOperator")}(t,r,e);if(C(r))return function(){throw new l.L("InvalidOperator")}();if(x(r))return function(){throw new l.L("InvalidOperator")}();if(_(r))return function(){throw new l.L("InvalidOperator")}();if(S(r))return function(){throw new l.L("InvalidOperator")}();if((0,F.Kg)(r))return function(){throw new l.L("InvalidOperator")}();throw new l.L("InvalidOperator")}if(E(t)){if((0,F.Et)(r))return function(e,t,r){switch(r){case"+":return f.createFromMilliseconds(e.valueInMilliseconds()+t);case"-":return f.createFromMilliseconds(e.valueInMilliseconds()-t);case"*":return f.createFromMilliseconds(e.valueInMilliseconds()*t);case"/":return f.createFromMilliseconds(e.valueInMilliseconds()/t)}throw new l.L("InvalidOperator")}(t,r,e);if(E(r))return function(e,t,r){switch(r){case"+":return f.createFromMilliseconds(e.valueInMilliseconds()+t.valueInMilliseconds());case"-":return f.createFromMilliseconds(e.valueInMilliseconds()-t.valueInMilliseconds());case"*":return f.createFromMilliseconds(e.valueInMilliseconds()*t.valueInMilliseconds());case"/":return f.createFromMilliseconds(e.valueInMilliseconds()/t.valueInMilliseconds())}throw new l.L("InvalidOperator")}(t,r,e);if(C(r))return function(e,t,r){if("+"===r)return t.plus("milliseconds",e.valueInMilliseconds());throw new l.L("InvalidOperator")}(t,r,e);if(x(r))return function(e,t,r){if("+"===r)return t.plus("milliseconds",e.valueInMilliseconds());throw new l.L("InvalidOperator")}(t,r,e);if(_(r))return function(e,t,r){if("+"===r)return t.addMilliseconds(e.valueInMilliseconds());throw new l.L("InvalidOperator")}(t,r,e);if(S(r))return function(e,t,r){switch(r){case"+":return t.plus({milliseconds:e.valueInMilliseconds()});case"-":return e.valueInMilliseconds()-t.toMillis()}throw new l.L("InvalidOperator")}(t,r,e);if((0,F.Kg)(r))return function(){throw new l.L("InvalidOperator")}();throw new l.L("InvalidOperator")}if(S(t)){if((0,F.Et)(r))return function(e,t,r){let n=1e3*t*24*60*60;switch(r){case"+":return e.plus({milliseconds:n});case"-":return e.minus({milliseconds:n})}throw new l.L("InvalidOperator")}(t,r,e);if(E(r))return function(e,t,r){switch(r){case"+":return e.plus({milliseconds:t.valueInMilliseconds()});case"-":return e.minus({milliseconds:t.valueInMilliseconds()})}throw new l.L("InvalidOperator")}(t,r,e);if(C(r))return function(){throw new l.L("InvalidOperator")}();if(x(r))return function(e,t,r){if("-"===r)return e.diff(t.toDateTimeLuxon(e.zone)).as("days");throw new l.L("InvalidOperator")}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.diff(t.toDateTime()).as("days");throw new l.L("InvalidOperator")}(t,r,e);if(S(r))return function(e,t,r){if("-"===r)return e.diff(t).as("days");throw new l.L("InvalidOperator")}(t,r,e);if((0,F.Kg)(r))return function(){throw new l.L("InvalidOperator")}();throw new l.L("InvalidOperator")}if(_(t)){if((0,F.Et)(r))return function(e,t,r){let n=1e3*t*24*60*60;switch(r){case"+":return e.addMilliseconds(n);case"-":return e.addMilliseconds(-1*n)}throw new l.L("InvalidOperator")}(t,r,e);if(E(r))return function(e,t,r){switch(r){case"+":return e.addMilliseconds(t.valueInMilliseconds());case"-":return e.addMilliseconds(-1*t.valueInMilliseconds())}throw new l.L("InvalidOperator")}(t,r,e);if(C(r))return function(){throw new l.L("InvalidOperator")}();if(x(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t.toDateTimeLuxon(e.toDateTime().zone)).as("days");throw new l.L("InvalidOperator")}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t.toDateTime()).as("days");throw new l.L("InvalidOperator")}(t,r,e);if(S(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t).as("days");throw new l.L("InvalidOperator")}(t,r,e);if((0,F.Kg)(r))return function(){throw new l.L("InvalidOperator")}();throw new l.L("InvalidOperator")}if((0,F.Kg)(t)){if((0,F.Et)(r))return function(e,t,r){let n=parseFloat(e);if(isNaN(n))throw new l.L("InvalidOperator");return J(n,t,r)}(t,r,e);if(E(r))return function(){throw new l.L("InvalidOperator")}();if(C(r))return function(){throw new l.L("InvalidOperator")}();if(x(r))return function(){throw new l.L("InvalidOperator")}();if(_(r))return function(){throw new l.L("InvalidOperator")}();if(S(r))return function(){throw new l.L("InvalidOperator")}();if((0,F.Kg)(r))return function(e,t,r){if("+"===r)return e+t;throw new l.L("InvalidOperator")}(t,r,e);throw new l.L("InvalidOperator")}throw new l.L("InvalidOperator")}function J(e,t,r){switch(r){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return e/t}throw new l.L("InvalidOperator")}function*Q(e){if(null==e)return;let t=[e];for(;t.length;){let e=t.pop();switch(yield e,e.type){case"when-clause":t.push(e.value),t.push(e.operand);break;case"case-expression":{let r=[];for(let t of e.clauses)r.push(t);"simple"===e.format&&r.push(e.operand),null!=e.else&&r.push(e.else);for(let e=r.length-1;e>=0;e--)t.push(r[e]);break}case"expression-list":for(let r=e.value.length-1;r>=0;r--)t.push(e.value[r]);break;case"unary-expression":t.push(e.expr);break;case"binary-expression":t.push(e.right),t.push(e.left);break;case"function":t.push(e.args);break;case"interval":t.push(e.qualifier),t.push(e.value);break;case"interval-qualifier":t.push(e.end),t.push(e.start)}}}class B extends SyntaxError{constructor(e,t,r,n){super(e),this.expected=t,this.found=r,this.location=n,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null,n=e.find(e=>e.source===this.location.source);n&&(r=n.text.split(/\r\n|\n|\r/g));let a=this.location.start,i=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(a):a,o=this.location.source+":"+i.line+":"+i.column;if(r){let e=this.location.end,n="".padEnd(i.line.toString().length," "),l=r[a.line-1],u=(a.line===e.line?e.column:l.length+1)-a.column||1;t+="\n --\x3e "+o+"\n"+n+" |\n"+i.line+" | "+l+"\n"+n+" | "+"".padEnd(a.column-1," ")+"".padEnd(u,"^")}else t+="\n at "+o}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}let n=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function a(e){return n?e.replace(n,e=>"\\u{"+r(e)+"}"):e}function i(e){return a(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function o(e){return a(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}let l={literal:e=>'"'+i(e.text)+'"',class(e){let t=e.parts.map(e=>Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function u(e){return l[e.type](e)}return"Expected "+function(e){let t=e.map(u);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."}}function G(e,t){let r={},n=(t=void 0===t?{}:t).grammarSource,a={start:st},i=st,o=/^[<-=]/,l=/^[+\-]/,u=/^[*\/]/,s=/^[A-Za-z_\x80-\uFFFF]/,c=/^[A-Za-z0-9_]/,f=/^[A-Za-z0-9_.\x80-\uFFFF]/,d=/^["]/,p=/^[^']/,m=/^[0-9]/,h=/^[eE]/,v=/^[ \t\n\r]/,w=/^[^`]/,g=at("!",!1),I=at("=",!1),y=at(">=",!1),L=at(">",!1),T=at("<=",!1),N=at("<>",!1),O=it([["<","="]],!1,!1,!1),E=at("!=",!1),S=it(["+","-"],!1,!1,!1),x=at("||",!1),C=it(["*","/"],!1,!1,!1),_=it([["A","Z"],["a","z"],"_",["€","￿"]],!1,!1,!1),D=it([["A","Z"],["a","z"],["0","9"],"_"],!1,!1,!1),M=it([["A","Z"],["a","z"],["0","9"],"_",".",["€","￿"]],!1,!1,!1),b=it(['"'],!1,!1,!1),P=at("@",!1),A=at("'",!1),F=at("N'",!1),$=at("''",!1),R=it(["'"],!0,!1,!1),U=at(".",!1),k=it([["0","9"]],!1,!1,!1),V=it(["e","E"],!1,!1,!1),z=at("NULL",!0),H=at("TRUE",!0),q=at("FALSE",!0),K=at("IN",!0),Z=at("IS",!0),Y=at("LIKE",!0),j=at("ESCAPE",!0),W=at("NOT",!0),J=at("AND",!0),Q=at("OR",!0),G=at("BETWEEN",!0),X=at("FROM",!0),ee=at("FOR",!0),te=at("SUBSTRING",!0),re=at("EXTRACT",!0),ne=at("TRIM",!0),ae=at("POSITION",!0),ie=at("TIMESTAMP",!0),oe=at("DATE",!0),le=at("TIME",!0),ue=at("LEADING",!0),se=at("TRAILING",!0),ce=at("BOTH",!0),fe=at("CAST",!0),de=at("AS",!0),pe=at("INTEGER",!0),me=at("INT",!0),he=at("SMALLINT",!0),ve=at("FLOAT",!0),we=at("REAL",!0),ge=at("VARCHAR",!0),Ie=at("TO",!0),ye=at("INTERVAL",!0),Le=at("YEAR",!0),Te=at("TIMEZONE_HOUR",!0),Ne=at("TIMEZONE_MINUTE",!0),Oe=at("MONTH",!0),Ee=at("DAY",!0),Se=at("HOUR",!0),xe=at("MINUTE",!0),Ce=at("SECOND",!0),_e=at("DOW",!0),De=at("DOY",!0),Me=at("WEEK",!0),be=at("CASE",!0),Pe=at("END",!0),Ae=at("WHEN",!0),Fe=at("THEN",!0),$e=at("ELSE",!0),Re=at(",",!1),Ue=at("(",!1),ke=at(")",!1),Ve=it([" ","\t","\n","\r"],!1,!1,!1),ze=at("`",!1),He=it(["`"],!0,!1,!1);function qe(e,t,r){return{op:t,expr:r,location:rt()}}function Ke(e,t,r){return{op:t,expr:r,location:rt()}}function Ze(e,t){return{op:e,expr:t,location:rt()}}function Ye(e,t,r){return{op:t,expr:r,location:rt()}}function je(e,t,r){return{op:t,expr:r,location:rt()}}function We(){return"'"}let Je,Qe=0|t.peg$currPos,Be=Qe,Ge=[{line:1,column:1}],Xe=Qe,et=t.peg$maxFailExpected||[],tt=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in a))throw Error("Can't start parsing from rule \""+t.startRule+'".');i=a[t.startRule]}function rt(){return lt(Be,Qe)}function nt(e,t){throw function(e,t){return new B(e,null,null,t)}(e,t=void 0===t?lt(Be,Qe):t)}function at(e,t){return{type:"literal",text:e,ignoreCase:t}}function it(e,t,r,n){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:n}}function ot(t){let r,n=Ge[t];if(n)return n;if(t>=Ge.length)r=Ge.length-1;else for(r=t;!Ge[--r];);for(n=Ge[r],n={line:n.line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Ge[t]=n,n}function lt(e,t,r){let a=ot(e),i=ot(t);return{source:n,start:{offset:e,line:a.line,column:a.column},end:{offset:t,line:i.line,column:i.column}}}function ut(e){Qe<Xe||(Qe>Xe&&(Xe=Qe,et=[]),et.push(e))}function st(){let e,t;return e=Qe,Yr(),t=ft(),t===r?(Qe=e,e=r):(Yr(),Be=e,e=t),e}function ct(){let e,t,n,a,i,o,l,u;if(e=Qe,t=Kr(),t!==r){for(Yr(),n=[],a=ft();a!==r;)n.push(a),a=Qe,i=Qe,o=Yr(),l=qr(),l===r?(Qe=i,i=r):(u=Yr(),o=[o,l,u],i=o),i===r?a=i:(i=ft(),i===r?(Qe=a,a=r):a=i);a=Yr(),i=Zr(),i===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"expression-list",location:rt(),value:e}}(n))}else Qe=e,e=r;return e}function ft(){let e,t,n,a,i,o;if(e=Qe,t=dt(),t!==r){for(n=[],a=Qe,Yr(),i=nr(),i===r?(Qe=a,a=r):(Yr(),o=dt(),o===r?(Qe=a,a=r):(Be=a,a=qe(0,i,o)));a!==r;)n.push(a),a=Qe,Yr(),i=nr(),i===r?(Qe=a,a=r):(Yr(),o=dt(),o===r?(Qe=a,a=r):(Be=a,a=qe(0,i,o)));Be=e,e=function(e,t){return Br(e,t)}(t,n)}else Qe=e,e=r;return e}function dt(){let e,t,n,a,i,o;if(e=Qe,t=pt(),t!==r){for(n=[],a=Qe,Yr(),i=rr(),i===r?(Qe=a,a=r):(Yr(),o=pt(),o===r?(Qe=a,a=r):(Be=a,a=Ke(0,i,o)));a!==r;)n.push(a),a=Qe,Yr(),i=rr(),i===r?(Qe=a,a=r):(Yr(),o=pt(),o===r?(Qe=a,a=r):(Be=a,a=Ke(0,i,o)));Be=e,e=function(e,t){return Br(e,t)}(t,n)}else Qe=e,e=r;return e}function pt(){let t,n,a,i,o;return t=Qe,n=tr(),n===r&&(n=Qe,33===e.charCodeAt(Qe)?(a="!",Qe++):(a=r,0===tt&&ut(g)),a===r?(Qe=n,n=r):(i=Qe,tt++,61===e.charCodeAt(Qe)?(o="=",Qe++):(o=r,0===tt&&ut(I)),tt--,o===r?i=void 0:(Qe=i,i=r),i===r?(Qe=n,n=r):(a=[a,i],n=a))),n===r?(Qe=t,t=r):(a=Yr(),i=pt(),i===r?(Qe=t,t=r):(Be=t,t=function(e){return function(e,t,r){return{type:"unary-expression",location:r,operator:"NOT",expr:t}}(0,e,rt())}(i))),t===r&&(t=function(){let e,t,n,a;return e=Qe,t=wt(),t===r?(Qe=e,e=r):(n=Qe,Yr(),a=function(){let e;return e=function(){let e,t,n,a,i;if(e=Qe,t=[],n=Qe,Yr(),a=mt(),a===r?(Qe=n,n=r):(Yr(),i=wt(),i===r?(Qe=n,n=r):(Be=n,n=Ze(a,i))),n!==r)for(;n!==r;)t.push(n),n=Qe,Yr(),a=mt(),a===r?(Qe=n,n=r):(Yr(),i=wt(),i===r?(Qe=n,n=r):(Be=n,n=Ze(a,i)));else t=r;return t!==r&&(Be=e,t=function(e){return{type:"arithmetic",tail:e}}(t)),e=t,e}(),e===r&&(e=function(){let e,t,n;return e=Qe,t=vt(),t===r?(Qe=e,e=r):(Yr(),n=ct(),n===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{op:e,right:t}}(t,n))),e===r&&(e=Qe,t=vt(),t===r?(Qe=e,e=r):(Yr(),n=Ct(),n===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{op:e,right:t}}(t,n)))),e}(),e===r&&(e=function(){let e,t,n,a,i,o,l,u;return e=Qe,t=tr(),t===r?(Qe=e,e=r):(Yr(),n=ar(),n===r?(Qe=e,e=r):(a=Yr(),i=Qe,o=wt(),o===r?(Qe=i,i=r):(Yr(),l=rr(),l===r?(Qe=i,i=r):(Yr(),u=wt(),u===r?(Qe=i,i=r):(Be=i,i=function(e,t,r){return Qr(rt(),t,r)}(0,o,u)))),i===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{op:"NOT"+e,right:t}}(n,i)))),e===r&&(e=Qe,t=ar(),t===r?(Qe=e,e=r):(Yr(),n=Qe,a=wt(),a===r?(Qe=n,n=r):(i=Yr(),o=rr(),o===r?(Qe=n,n=r):(Yr(),l=wt(),l===r?(Qe=n,n=r):(Be=n,n=function(e,t,r){return Qr(rt(),t,r)}(0,a,l)))),n===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{op:e,right:t}}(t,n)))),e}(),e===r&&(e=function(){let e,t,n,a;return e=Qe,t=Gt(),t===r?(Qe=e,e=r):(Yr(),n=tr(),n===r?(Qe=e,e=r):(Yr(),a=wt(),a===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{op:e+"NOT",right:t}}(t,a)))),e===r&&(e=Qe,t=Gt(),t===r?(Qe=e,e=r):(Yr(),n=wt(),n===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{op:e,right:t}}(t,n)))),e}(),e===r&&(e=function(){let e,t,n,a,i;return e=Qe,t=ht(),t===r?(Qe=e,e=r):(Yr(),n=wt(),n===r?(Qe=e,e=r):(Yr(),a=er(),a===r?(Qe=e,e=r):(Yr(),i=Ut(),i===r?(Qe=e,e=r):(Be=e,e=function(e,t,r){return{op:e,right:t,escape:r.value}}(t,n,i))))),e===r&&(e=Qe,t=ht(),t===r?(Qe=e,e=r):(Yr(),n=wt(),n===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{op:e,right:t,escape:""}}(t,n)))),e}())))),e}(),a===r?(Qe=n,n=r):n=a,n===r&&(n=null),Be=e,e=function(e,t){return""==t||null==t||null==t?e:"arithmetic"==t.type?Br(e,t.tail):Jr(t.op,e,t.right,t.escape,rt())}(t,n)),e}()),t}function mt(){let t;return">="===e.substr(Qe,2)?(t=">=",Qe+=2):(t=r,0===tt&&ut(y)),t===r&&(62===e.charCodeAt(Qe)?(t=">",Qe++):(t=r,0===tt&&ut(L)),t===r&&("<="===e.substr(Qe,2)?(t="<=",Qe+=2):(t=r,0===tt&&ut(T)),t===r&&("<>"===e.substr(Qe,2)?(t="<>",Qe+=2):(t=r,0===tt&&ut(N)),t===r&&(t=e.charAt(Qe),o.test(t)?Qe++:(t=r,0===tt&&ut(O)),t===r&&("!="===e.substr(Qe,2)?(t="!=",Qe+=2):(t=r,0===tt&&ut(E))))))),t}function ht(){let e,t,n,a,i;return e=Qe,t=Qe,n=tr(),n===r?(Qe=t,t=r):(a=Yr(),i=Xt(),i===r?(Qe=t,t=r):(n=[n,a,i],t=n)),t!==r&&(Be=e,t=function(e){return e[0]+" "+e[2]}(t)),e=t,e===r&&(e=Xt()),e}function vt(){let e,t,n,a,i;return e=Qe,t=Qe,n=tr(),n===r?(Qe=t,t=r):(a=Yr(),i=Bt(),i===r?(Qe=t,t=r):(n=[n,a,i],t=n)),t!==r&&(Be=e,t=function(e){return e[0]+" "+e[2]}(t)),e=t,e===r&&(e=Bt()),e}function wt(){let e,t,n,a,i,o;if(e=Qe,t=It(),t!==r){for(n=[],a=Qe,Yr(),i=gt(),i===r?(Qe=a,a=r):(Yr(),o=It(),o===r?(Qe=a,a=r):(Be=a,a=Ye(0,i,o)));a!==r;)n.push(a),a=Qe,Yr(),i=gt(),i===r?(Qe=a,a=r):(Yr(),o=It(),o===r?(Qe=a,a=r):(Be=a,a=Ye(0,i,o)));Be=e,e=function(e,t){return Br(e,t)}(t,n)}else Qe=e,e=r;return e}function gt(){let t;return t=e.charAt(Qe),l.test(t)?Qe++:(t=r,0===tt&&ut(S)),t===r&&("||"===e.substr(Qe,2)?(t="||",Qe+=2):(t=r,0===tt&&ut(x))),t}function It(){let e,t,n,a,i,o;if(e=Qe,t=Lt(),t!==r){for(n=[],a=Qe,Yr(),i=yt(),i===r?(Qe=a,a=r):(Yr(),o=Lt(),o===r?(Qe=a,a=r):(Be=a,a=je(0,i,o)));a!==r;)n.push(a),a=Qe,Yr(),i=yt(),i===r?(Qe=a,a=r):(Yr(),o=Lt(),o===r?(Qe=a,a=r):(Be=a,a=je(0,i,o)));Be=e,e=function(e,t){return Br(e,t)}(t,n)}else Qe=e,e=r;return e}function yt(){let t;return t=e.charAt(Qe),u.test(t)?Qe++:(t=r,0===tt&&ut(C)),t}function Lt(){let e,t,n,a;return e=function(){let e;return e=Ut(),e===r&&(e=function(){let e,t,n,a;return e=Qe,t=function(){let e,t,n,a;return e=Qe,t=Ht(),t===r?(Qe=e,e=r):(n=qt(),n===r?(Qe=e,e=r):(a=Kt(),a===r?(Qe=e,e=r):(Be=e,e=function(e,t,r){return parseFloat(e+t+r)}(t,n,a)))),e===r&&(e=Qe,t=Ht(),t===r?(Qe=e,e=r):(n=qt(),n===r?(Qe=e,e=r):(Be=e,e=function(e,t){return parseFloat(e+t)}(t,n))),e===r&&(e=Qe,t=Ht(),t===r?(Qe=e,e=r):(n=Kt(),n===r?(Qe=e,e=r):(Be=e,e=function(e,t){return parseFloat(e+t)}(t,n))),e===r&&(e=Qe,t=Ht(),t!==r&&(Be=e,t=function(e){return parseFloat(e)}(t)),e=t))),e}(),t===r?(Qe=e,e=r):(n=Qe,tt++,a=Nt(),tt--,a===r?n=void 0:(Qe=n,n=r),n===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"number",location:rt(),value:e}}(t))),e}(),e===r&&(e=function(){let e,t;return e=Qe,t=Jt(),t!==r&&(Be=e,t={type:"boolean",location:rt(),value:!0}),e=t,e===r&&(e=Qe,t=Qt(),t!==r&&(Be=e,t={type:"boolean",location:rt(),value:!1}),e=t),e}(),e===r&&(e=function(){let e,t;return e=Qe,t=Wt(),t!==r&&(Be=e,t={type:"null",location:rt(),value:null}),e=t,e}(),e===r&&(e=function(){let e,t,n;return e=Qe,t=dr(),t===r?(Qe=e,e=r):(Yr(),n=Rt(),n===r?(Qe=e,e=r):(Be=e,e=function(e){return"string"===e.type&&function(e){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(e)&&nt("Date literal is invalid")}(e.value),{type:"date",location:rt(),value:e.value}}(n))),e}(),e===r&&(e=function(){let e,t,n;return e=Qe,t=fr(),t===r?(Qe=e,e=r):(Yr(),n=Rt(),n===r?(Qe=e,e=r):(Be=e,e=function(e){return"string"===e.type&&function(e){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(e)&&nt("Timestamp literal is invalid")}(e.value),{type:"timestamp",location:rt(),value:e.value}}(n))),e}(),e===r&&(e=bt(),e===r&&(e=function(){let e,t,n;return e=Qe,t=pr(),t===r?(Qe=e,e=r):(Yr(),n=Rt(),n===r?(Qe=e,e=r):(Be=e,e=function(e){return"string"===e.type&&function(e){!0!==/^(\d{1,2}):(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/.test(e)&&nt("Time literal is invalid")}(e.value),{type:"time",location:rt(),value:e.value}}(n))),e}()))))))),e}(),e===r&&(e=function(){let e,t,n,a,i,o,l,u;return e=Qe,t=ur(),t===r?(Qe=e,e=r):(Yr(),n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=Mt(),i===r?(Qe=n,n=r):(Yr(),o=ir(),o===r?(Qe=n,n=r):(Yr(),l=ft(),l===r?(Qe=n,n=r):(Yr(),u=Zr(),u===r?(Qe=n,n=r):(Be=n,n=function(e,t){return Qr(rt(),e,t)}(i,l)))))),n===r&&(n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=Mt(),i===r?(Qe=n,n=r):(Yr(),o=qr(),o===r?(Qe=n,n=r):(Yr(),l=ft(),l===r?(Qe=n,n=r):(Yr(),u=Zr(),u===r?(Qe=n,n=r):(Be=n,n=function(e,t){return Qr(rt(),e,t)}(i,l))))))),n===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"function",location:rt(),name:"extract",args:e}}(n))),e}(),e===r&&(e=function(){let e,t,n,a,i,o,l,u,s,c,f;return e=Qe,t=lr(),t===r?(Qe=e,e=r):(Yr(),n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=ft(),i===r?(Qe=n,n=r):(Yr(),o=ir(),o===r?(Qe=n,n=r):(Yr(),l=ft(),l===r?(Qe=n,n=r):(Yr(),u=Qe,s=or(),s===r?(Qe=u,u=r):(c=Yr(),f=ft(),f===r?(Qe=u,u=r):(Yr(),u=f)),u===r&&(u=null),s=Zr(),s===r?(Qe=n,n=r):(Be=n,n=function(e,t,r){return Qr(rt(),e,t,...r?[r]:[])}(i,l,u)))))),n===r&&(n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=ft(),i===r?(Qe=n,n=r):(Yr(),o=qr(),o===r?(Qe=n,n=r):(Yr(),l=ft(),l===r?(Qe=n,n=r):(Yr(),u=qr(),u===r?(Qe=n,n=r):(s=Yr(),c=ft(),c===r?(Qe=n,n=r):(f=Zr(),f===r?(Qe=n,n=r):(Be=n,n=function(e,t,r){return Qr(rt(),e,t,r)}(i,l,c))))))))),n===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"function",location:rt(),name:"substring",args:e}}(n))),e}(),e===r&&(e=function(){let e,t,n,a,i,o,l,u,s;return e=Qe,t=sr(),t===r?(Qe=e,e=r):(Yr(),n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=Dt(),Yr(),o=ft(),o===r?(Qe=n,n=r):(Yr(),l=ir(),l===r?(Qe=n,n=r):(Yr(),u=ft(),u===r?(Qe=n,n=r):(Yr(),s=Zr(),s===r?(Qe=n,n=r):(Be=n,n=function(e,t,r){return Qr(rt(),e,t,r)}(i,o,u)))))),n===r&&(n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=Dt(),Yr(),o=ft(),o===r?(Qe=n,n=r):(Yr(),l=Zr(),l===r?(Qe=n,n=r):(Be=n,n=function(e,t){return Qr(rt(),e,t)}(i,o))))),n===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"function",location:rt(),name:"trim",args:e}}(n))),e}(),e===r&&(e=function(){let e,t,n,a,i,o,l,u;return e=Qe,t=cr(),t===r?(Qe=e,e=r):(Yr(),n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=ft(),i===r?(Qe=n,n=r):(Yr(),o=Bt(),o===r?(Qe=n,n=r):(Yr(),l=ft(),l===r?(Qe=n,n=r):(Yr(),u=Zr(),u===r?(Qe=n,n=r):(Be=n,n=function(e,t){return Qr(rt(),e,t)}(i,l)))))),n===r&&(n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=ft(),i===r?(Qe=n,n=r):(Yr(),o=qr(),o===r?(Qe=n,n=r):(Yr(),l=ft(),l===r?(Qe=n,n=r):(Yr(),u=Zr(),u===r?(Qe=n,n=r):(Be=n,n=function(e,t){return Qr(rt(),e,t)}(i,l))))))),n===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"function",location:rt(),name:"position",args:e}}(n))),e}(),e===r&&(e=function(){let e,t,n,a,i,o,l,u;return e=Qe,t=wr(),t===r?(Qe=e,e=r):(Yr(),n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=ft(),i===r?(Qe=n,n=r):(Yr(),o=gr(),o===r?(Qe=n,n=r):(Yr(),l=_t(),l===r?(Qe=n,n=r):(Yr(),u=Zr(),u===r?(Qe=n,n=r):(Be=n,n=function(e,t){return Qr(rt(),e,t)}(i,l)))))),n===r&&(n=Qe,a=Kr(),a===r?(Qe=n,n=r):(Yr(),i=ft(),i===r?(Qe=n,n=r):(Yr(),o=qr(),o===r?(Qe=n,n=r):(Yr(),l=_t(),l===r?(Qe=n,n=r):(Yr(),u=Zr(),u===r?(Qe=n,n=r):(Be=n,n=function(e,t){return Qr(rt(),e,t)}(i,l))))))),n===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"function",location:rt(),name:"cast",args:e}}(n))),e}(),e===r&&(e=function(){let e,t,n,a;return e=Qe,t=Qe,tt++,n=ur(),tt--,n===r?t=void 0:(Qe=t,t=r),t===r?(Qe=e,e=r):(n=Wr(),n===r?(Qe=e,e=r):(Yr(),a=ct(),a===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"function",location:rt(),name:e,args:t}}(n,a)))),e}(),e===r&&(e=function(){let e;return e=function(){let e,t,n,a,i,o,l;if(e=Qe,t=Ur(),t!==r)if(Yr(),n=ft(),n!==r){for(Yr(),a=[],i=Qe,o=Vt(),o===r?(Qe=i,i=r):(l=Yr(),i=o);i!==r;)a.push(i),i=Qe,o=Vt(),o===r?(Qe=i,i=r):(l=Yr(),i=o);i=kr(),i===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"case-expression",location:rt(),format:"simple",operand:e,clauses:t,else:null,elseLocation:null}}(n,a))}else Qe=e,e=r;else Qe=e,e=r;if(e===r)if(e=Qe,t=Ur(),t!==r)if(Yr(),n=ft(),n!==r){for(Yr(),a=[],i=Qe,o=Vt(),o===r?(Qe=i,i=r):(l=Yr(),i=o);i!==r;)a.push(i),i=Qe,o=Vt(),o===r?(Qe=i,i=r):(l=Yr(),i=o);i=zt(),i===r?(Qe=e,e=r):(o=Yr(),l=kr(),l===r?(Qe=e,e=r):(Be=e,e=function(e,t,r){return{type:"case-expression",location:rt(),format:"simple",operand:e,clauses:t,else:r.value,elseLocation:r.location}}(n,a,i)))}else Qe=e,e=r;else Qe=e,e=r;return e}(),e===r&&(e=function(){let e,t,n,a,i,o;if(e=Qe,t=Ur(),t!==r){for(Yr(),n=[],a=Qe,i=kt(),i===r?(Qe=a,a=r):(o=Yr(),a=i);a!==r;)n.push(a),a=Qe,i=kt(),i===r?(Qe=a,a=r):(o=Yr(),a=i);a=kr(),a===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"case-expression",location:rt(),format:"searched",clauses:e,else:null,elseLocation:null}}(n))}else Qe=e,e=r;if(e===r)if(e=Qe,t=Ur(),t!==r){for(Yr(),n=[],a=Qe,i=kt(),i===r?(Qe=a,a=r):(o=Yr(),a=i);a!==r;)n.push(a),a=Qe,i=kt(),i===r?(Qe=a,a=r):(o=Yr(),a=i);a=zt(),a===r?(Qe=e,e=r):(i=Yr(),o=kr(),o===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"case-expression",location:rt(),format:"searched",clauses:e,else:t.value,elseLocation:t.location}}(n,a)))}else Qe=e,e=r;return e}()),e}(),e===r&&(e=function(){let e,t;return e=Qe,t=function(){let e,t;return e=Qe,t=function(){let e,t,n,a;if(e=Qe,t=Nt(),t!==r){for(n=[],a=Et();a!==r;)n.push(a),a=Et();Be=e,e=function(e,t){return e+t.join("")}(t,n)}else Qe=e,e=r;return e}(),t!==r&&(Be=e),e=t,e}(),t!==r&&(Be=e,t=function(e){return/^CURRENT_DATE$/i.test(e)?{type:"current-time",location:rt(),mode:"date"}:/^CURRENT_TIMESTAMP$/i.test(e)?{type:"current-time",location:rt(),mode:"timestamp"}:/^CURRENT_TIME$/i.test(e)?{type:"current-time",location:rt(),mode:"time"}:/^CURRENT_USER$/i.test(e)?{type:"current-user",location:rt()}:{type:"column-reference",location:rt(),table:"",column:e}}(t)),e=t,e===r&&(e=Qe,t=function(){let e,t,n,a;return e=Qe,t=xt(),t===r?(Qe=e,e=r):(n=function(){let e,t,n;for(e=Qe,t=[],n=St();n!==r;)t.push(n),n=St();return Be=e,t=function(e){return e.join("")}(t),e=t,e}(),a=xt(),a===r?(Qe=e,e=r):(Be=e,e=n)),e}(),t!==r&&(Be=e,t=function(e){return{type:"column-reference",location:rt(),table:"",column:e,delimited:!0}}(t)),e=t),e}(),e===r&&(e=Ct(),e===r&&(e=Qe,t=Kr(),t===r?(Qe=e,e=r):(Yr(),n=ft(),n===r?(Qe=e,e=r):(Yr(),a=Zr(),a===r?(Qe=e,e=r):(Be=e,e=function(e){return e.paren=!0,e}(n)))))))))))))),e}function Tt(){let e,t,n,a;if(e=Qe,t=Nt(),t!==r){for(n=[],a=Ot();a!==r;)n.push(a),a=Ot();Be=e,e=function(e,t){return e+t.join("")}(t,n)}else Qe=e,e=r;return e}function Nt(){let t;return t=e.charAt(Qe),s.test(t)?Qe++:(t=r,0===tt&&ut(_)),t}function Ot(){let t;return t=e.charAt(Qe),c.test(t)?Qe++:(t=r,0===tt&&ut(D)),t}function Et(){let t;return t=e.charAt(Qe),f.test(t)?Qe++:(t=r,0===tt&&ut(M)),t}function St(){let t;return t=function(){let t;return t=e.charAt(Qe),f.test(t)?Qe++:(t=r,0===tt&&ut(M)),t}(),t===r&&(t=function(){let e,t,n;return e=Qe,t=xt(),t===r?(Qe=e,e=r):(n=xt(),n===r?(Qe=e,e=r):(Be=e,e='"')),e}()),t}function xt(){let t;return t=e.charAt(Qe),d.test(t)?Qe++:(t=r,0===tt&&ut(b)),t}function Ct(){let t,n,a,i;return t=Qe,n=Qe,64===e.charCodeAt(Qe)?(a="@",Qe++):(a=r,0===tt&&ut(P)),a===r?(Qe=n,n=r):(i=Tt(),i===r?(Qe=n,n=r):(a=[a,i],n=a)),n!==r&&(Be=t,n=function(e){return{type:"parameter",location:rt(),value:e[1]}}(n)),t=n,t}function _t(){let e,t,n,a,i;return e=Qe,t=Ir(),t===r&&(t=yr()),t!==r&&(Be=e,t={type:"data-type",location:rt(),value:{type:"integer"}}),e=t,e===r&&(e=Qe,t=Lr(),t!==r&&(Be=e,t={type:"data-type",location:rt(),value:{type:"smallint"}}),e=t,e===r&&(e=Qe,t=Tr(),t!==r&&(Be=e,t={type:"data-type",location:rt(),value:{type:"float"}}),e=t,e===r&&(e=Qe,t=Nr(),t!==r&&(Be=e,t={type:"data-type",location:rt(),value:{type:"real"}}),e=t,e===r&&(e=Qe,t=dr(),t!==r&&(Be=e,t={type:"data-type",location:rt(),value:{type:"date"}}),e=t,e===r&&(e=Qe,t=fr(),t!==r&&(Be=e,t={type:"data-type",location:rt(),value:{type:"timestamp"}}),e=t,e===r&&(e=Qe,t=pr(),t!==r&&(Be=e,t={type:"data-type",location:rt(),value:{type:"time"}}),e=t,e===r&&(e=Qe,t=Or(),t===r?(Qe=e,e=r):(Yr(),n=Kr(),n===r?(Qe=e,e=r):(Yr(),a=Zt(),a===r?(Qe=e,e=r):(Yr(),i=Zr(),i===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"data-type",location:rt(),value:{type:"varchar",size:parseInt(e)}}}(a)))))))))))),e}function Dt(){let e,t;return e=Qe,t=mr(),t===r&&(t=hr(),t===r&&(t=vr())),t===r&&(t=null),Be=e,t=function(e){return{type:"string",location:rt(),value:e??"BOTH"}}(t),e=t,e}function Mt(){let e,t;return e=Qe,t=xr(),t===r&&(t=Dr(),t===r&&(t=Mr(),t===r&&(t=br(),t===r&&(t=Pr(),t===r&&(t=Ar(),t===r&&(t=Cr(),t===r&&(t=_r(),t===r&&(t=Fr(),t===r&&(t=$r(),t===r&&(t=Rr())))))))))),t!==r&&(Be=e,t=function(e){return{type:"string",location:rt(),value:e}}(t)),e=t,e}function bt(){let t,n,a,i,o;return t=Qe,n=Sr(),n===r?(Qe=t,t=r):(Yr(),a=e.charAt(Qe),l.test(a)?Qe++:(a=r,0===tt&&ut(S)),a===r?(Qe=t,t=r):(Yr(),i=Rt(),i===r?(Qe=t,t=r):(Yr(),o=Pt(),o===r?(Qe=t,t=r):(Be=t,t=function(e,t,r){return{type:"interval",location:rt(),value:t,qualifier:r,op:e}}(a,i,o))))),t===r&&(t=Qe,n=Sr(),n===r?(Qe=t,t=r):(Yr(),a=Rt(),a===r?(Qe=t,t=r):(Yr(),i=Pt(),i===r?(Qe=t,t=r):(Be=t,t=function(e,t){return{type:"interval",location:rt(),value:e,qualifier:t,op:""}}(a,i))))),t}function Pt(){let e,t,n,a;return e=Qe,t=function(){let e,t,n,a,i;return e=Qe,t=At(),t===r?(Qe=e,e=r):(Yr(),n=Kr(),n===r?(Qe=e,e=r):(Yr(),a=$t(),a===r?(Qe=e,e=r):(Yr(),i=Zr(),i===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"interval-period",location:rt(),period:e.value,precision:t,secondary:null}}(t,a))))),e===r&&(e=Qe,t=At(),t!==r&&(Be=e,t=function(e){return{type:"interval-period",location:rt(),period:e.value,precision:null,secondary:null}}(t)),e=t),e}(),t===r?(Qe=e,e=r):(Yr(),n=Er(),n===r?(Qe=e,e=r):(Yr(),a=function(){let e,t,n,a,i,o,l;return e=Qe,t=At(),t!==r&&(Be=e,t=function(e){return{type:"interval-period",location:rt(),period:e.value,precision:null,secondary:null}}(t)),e=t,e===r&&(e=Qe,t=Ar(),t===r?(Qe=e,e=r):(Yr(),n=Kr(),n===r?(Qe=e,e=r):(Yr(),a=$t(),a===r?(Qe=e,e=r):(Yr(),i=qr(),i===r?(Qe=e,e=r):(Yr(),o=Ft(),o===r?(Qe=e,e=r):(Yr(),l=Zr(),l===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"interval-period",location:rt(),period:"second",precision:e,secondary:t}}(a,o))))))),e===r&&(e=Qe,t=Ar(),t===r?(Qe=e,e=r):(Yr(),n=Kr(),n===r?(Qe=e,e=r):(Yr(),a=$t(),a===r?(Qe=e,e=r):(Yr(),i=Zr(),i===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"interval-period",location:rt(),period:"second",precision:e,secondary:null}}(a))))),e===r&&(e=Qe,t=Ar(),t!==r&&(Be=e,t={type:"interval-period",location:rt(),period:"second",precision:null,secondary:null}),e=t))),e}(),a===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"interval-qualifier",location:rt(),start:e,end:t}}(t,a)))),e===r&&(e=function(){let e,t,n,a,i,o,l;return e=Qe,t=At(),t===r?(Qe=e,e=r):(Yr(),n=Kr(),n===r?(Qe=e,e=r):(Yr(),a=Ft(),a===r?(Qe=e,e=r):(Yr(),i=Zr(),i===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"interval-period",location:rt(),period:e.value,precision:t,secondary:null}}(t,a))))),e===r&&(e=Qe,t=At(),t!==r&&(Be=e,t=function(e){return{type:"interval-period",location:rt(),period:e.value,precision:null,secondary:null}}(t)),e=t,e===r&&(e=Qe,t=Ar(),t===r?(Qe=e,e=r):(Yr(),n=Kr(),n===r?(Qe=e,e=r):(Yr(),a=$t(),a===r?(Qe=e,e=r):(Yr(),i=qr(),i===r?(Qe=e,e=r):(Yr(),o=Ft(),o===r?(Qe=e,e=r):(Yr(),l=Zr(),l===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"interval-period",location:rt(),period:"second",precision:e,secondary:t}}(a,o))))))),e===r&&(e=Qe,t=Ar(),t===r?(Qe=e,e=r):(Yr(),n=Kr(),n===r?(Qe=e,e=r):(Yr(),a=Ft(),a===r?(Qe=e,e=r):(Yr(),i=Zr(),i===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"interval-period",location:rt(),period:"second",precision:e,secondary:null}}(a))))),e===r&&(e=Qe,t=Ar(),t!==r&&(Be=e,t={type:"interval-period",location:rt(),period:"second",precision:null,secondary:null}),e=t)))),e}()),e}function At(){let e,t;return e=Qe,t=Mr(),t!==r&&(Be=e,t={type:"string",location:rt(),value:"day"}),e=t,e===r&&(e=Qe,t=br(),t!==r&&(Be=e,t={type:"string",location:rt(),value:"hour"}),e=t,e===r&&(e=Qe,t=Pr(),t!==r&&(Be=e,t={type:"string",location:rt(),value:"minute"}),e=t,e===r&&(e=Qe,t=Dr(),t!==r&&(Be=e,t={type:"string",location:rt(),value:"month"}),e=t,e===r&&(e=Qe,t=xr(),t!==r&&(Be=e,t={type:"string",location:rt(),value:"year"}),e=t)))),e}function Ft(){let e,t;return e=Qe,t=Zt(),t!==r&&(Be=e,t=function(e){return parseFloat(e)}(t)),e=t,e}function $t(){let e,t;return e=Qe,t=Zt(),t!==r&&(Be=e,t=function(e){return parseFloat(e)}(t)),e=t,e}function Rt(){let e;return e=Ut(),e===r&&(e=Ct()),e}function Ut(){let t,n,a,i,o;if(t=Qe,39===e.charCodeAt(Qe)?(n="'",Qe++):(n=r,0===tt&&ut(A)),n===r&&("N'"===e.substr(Qe,2)?(n="N'",Qe+=2):(n=r,0===tt&&ut(F))),n!==r){for(a=[],i=Qe,"''"===e.substr(Qe,2)?(o="''",Qe+=2):(o=r,0===tt&&ut($)),o!==r&&(Be=i,o="'"),i=o,i===r&&(i=e.charAt(Qe),p.test(i)?Qe++:(i=r,0===tt&&ut(R)));i!==r;)a.push(i),i=Qe,"''"===e.substr(Qe,2)?(o="''",Qe+=2):(o=r,0===tt&&ut($)),o!==r&&(Be=i,o=We()),i=o,i===r&&(i=e.charAt(Qe),p.test(i)?Qe++:(i=r,0===tt&&ut(R)));39===e.charCodeAt(Qe)?(i="'",Qe++):(i=r,0===tt&&ut(A)),i===r?(Qe=t,t=r):(Be=t,t=function(e){return{type:"string",location:rt(),value:e.join("")}}(a))}else Qe=t,t=r;return t}function kt(){let e,t,n,a,i;return e=Qe,t=Vr(),t===r?(Qe=e,e=r):(Yr(),n=ft(),n===r?(Qe=e,e=r):(Yr(),a=zr(),a===r?(Qe=e,e=r):(Yr(),i=ft(),i===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"when-clause",location:rt(),operand:e,value:t}}(n,i))))),e}function Vt(){let e,t,n,a,i;return e=Qe,t=Vr(),t===r?(Qe=e,e=r):(Yr(),n=ft(),n===r?(Qe=e,e=r):(Yr(),a=zr(),a===r?(Qe=e,e=r):(Yr(),i=ft(),i===r?(Qe=e,e=r):(Be=e,e=function(e,t){return{type:"when-clause",location:rt(),operand:e,value:t}}(n,i))))),e}function zt(){let e,t,n;return e=Qe,t=Hr(),t===r?(Qe=e,e=r):(Yr(),n=ft(),n===r?(Qe=e,e=r):(Be=e,e=function(e){return{type:"else-clause",location:rt(),value:e}}(n))),e}function Ht(){let t,n,a;return t=Zt(),t===r&&(t=Qe,n=e.charAt(Qe),l.test(n)?Qe++:(n=r,0===tt&&ut(S)),n===r?(Qe=t,t=r):(a=Zt(),a===r?(Qe=t,t=r):(Be=t,t=function(e,t){return e[0]+t}(n,a)))),t}function qt(){let t,n,a;return t=Qe,46===e.charCodeAt(Qe)?(n=".",Qe++):(n=r,0===tt&&ut(U)),n===r?(Qe=t,t=r):(a=Zt(),a===r&&(a=null),Be=t,t=function(e){return"."+(e??"")}(a)),t}function Kt(){let e,t,n;return e=Qe,t=jt(),t===r?(Qe=e,e=r):(n=Zt(),n===r?(Qe=e,e=r):(Be=e,e=function(e,t){return e+t}(t,n))),e}function Zt(){let e,t,n;if(e=Qe,t=[],n=Yt(),n!==r)for(;n!==r;)t.push(n),n=Yt();else t=r;return t!==r&&(Be=e,t=function(e){return e.join("")}(t)),e=t,e}function Yt(){let t;return t=e.charAt(Qe),m.test(t)?Qe++:(t=r,0===tt&&ut(k)),t}function jt(){let t,n,a;return t=Qe,n=e.charAt(Qe),h.test(n)?Qe++:(n=r,0===tt&&ut(V)),n===r?(Qe=t,t=r):(a=e.charAt(Qe),l.test(a)?Qe++:(a=r,0===tt&&ut(S)),a===r&&(a=null),Be=t,t=function(e,t){return"e"+(null===t?"":t)}(0,a)),t}function Wt(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"null"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(z)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(n=[n,a],t=n)),t}function Jt(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"true"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(H)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(n=[n,a],t=n)),t}function Qt(){let t,n,a,i;return t=Qe,n=e.substr(Qe,5),"false"===n.toLowerCase()?Qe+=5:(n=r,0===tt&&ut(q)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(n=[n,a],t=n)),t}function Bt(){let t,n,a,i;return t=Qe,n=e.substr(Qe,2),"in"===n.toLowerCase()?Qe+=2:(n=r,0===tt&&ut(K)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="IN")),t}function Gt(){let t,n,a,i;return t=Qe,n=e.substr(Qe,2),"is"===n.toLowerCase()?Qe+=2:(n=r,0===tt&&ut(Z)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="IS")),t}function Xt(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"like"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(Y)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="LIKE")),t}function er(){let t,n,a,i;return t=Qe,n=e.substr(Qe,6),"escape"===n.toLowerCase()?Qe+=6:(n=r,0===tt&&ut(j)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="ESCAPE")),t}function tr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,3),"not"===n.toLowerCase()?Qe+=3:(n=r,0===tt&&ut(W)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="NOT")),t}function rr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,3),"and"===n.toLowerCase()?Qe+=3:(n=r,0===tt&&ut(J)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="AND")),t}function nr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,2),"or"===n.toLowerCase()?Qe+=2:(n=r,0===tt&&ut(Q)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="OR")),t}function ar(){let t,n,a,i;return t=Qe,n=e.substr(Qe,7),"between"===n.toLowerCase()?Qe+=7:(n=r,0===tt&&ut(G)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="BETWEEN")),t}function ir(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"from"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(X)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="FROM")),t}function or(){let t,n,a,i;return t=Qe,n=e.substr(Qe,3),"for"===n.toLowerCase()?Qe+=3:(n=r,0===tt&&ut(ee)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="FOR")),t}function lr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,9),"substring"===n.toLowerCase()?Qe+=9:(n=r,0===tt&&ut(te)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="SUBSTRING")),t}function ur(){let t,n,a,i;return t=Qe,n=e.substr(Qe,7),"extract"===n.toLowerCase()?Qe+=7:(n=r,0===tt&&ut(re)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="EXTRACT")),t}function sr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"trim"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(ne)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="TRIM")),t}function cr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,8),"position"===n.toLowerCase()?Qe+=8:(n=r,0===tt&&ut(ae)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="POSITION")),t}function fr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,9),"timestamp"===n.toLowerCase()?Qe+=9:(n=r,0===tt&&ut(ie)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="TIMESTAMP")),t}function dr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"date"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(oe)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="DATE")),t}function pr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"time"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(le)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="TIME")),t}function mr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,7),"leading"===n.toLowerCase()?Qe+=7:(n=r,0===tt&&ut(ue)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="LEADING")),t}function hr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,8),"trailing"===n.toLowerCase()?Qe+=8:(n=r,0===tt&&ut(se)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="TRAILING")),t}function vr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"both"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(ce)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="BOTH")),t}function wr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"cast"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(fe)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="CAST")),t}function gr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,2),"as"===n.toLowerCase()?Qe+=2:(n=r,0===tt&&ut(de)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="AS")),t}function Ir(){let t,n,a,i;return t=Qe,n=e.substr(Qe,7),"integer"===n.toLowerCase()?Qe+=7:(n=r,0===tt&&ut(pe)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="INTEGER")),t}function yr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,3),"int"===n.toLowerCase()?Qe+=3:(n=r,0===tt&&ut(me)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="INT")),t}function Lr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,8),"smallint"===n.toLowerCase()?Qe+=8:(n=r,0===tt&&ut(he)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="SMALLINT")),t}function Tr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,5),"float"===n.toLowerCase()?Qe+=5:(n=r,0===tt&&ut(ve)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="FLOAT")),t}function Nr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"real"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(we)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="REAL")),t}function Or(){let t,n,a,i;return t=Qe,n=e.substr(Qe,7),"varchar"===n.toLowerCase()?Qe+=7:(n=r,0===tt&&ut(ge)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="VARCHAR")),t}function Er(){let t,n,a,i;return t=Qe,n=e.substr(Qe,2),"to"===n.toLowerCase()?Qe+=2:(n=r,0===tt&&ut(Ie)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="TO")),t}function Sr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,8),"interval"===n.toLowerCase()?Qe+=8:(n=r,0===tt&&ut(ye)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="INTERVAL")),t}function xr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"year"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(Le)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="YEAR")),t}function Cr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,13),"timezone_hour"===n.toLowerCase()?Qe+=13:(n=r,0===tt&&ut(Te)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="TIMEZONE_HOUR")),t}function _r(){let t,n,a,i;return t=Qe,n=e.substr(Qe,15),"timezone_minute"===n.toLowerCase()?Qe+=15:(n=r,0===tt&&ut(Ne)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="TIMEZONE_MINUTE")),t}function Dr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,5),"month"===n.toLowerCase()?Qe+=5:(n=r,0===tt&&ut(Oe)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="MONTH")),t}function Mr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,3),"day"===n.toLowerCase()?Qe+=3:(n=r,0===tt&&ut(Ee)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="DAY")),t}function br(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"hour"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(Se)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="HOUR")),t}function Pr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,6),"minute"===n.toLowerCase()?Qe+=6:(n=r,0===tt&&ut(xe)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="MINUTE")),t}function Ar(){let t,n,a,i;return t=Qe,n=e.substr(Qe,6),"second"===n.toLowerCase()?Qe+=6:(n=r,0===tt&&ut(Ce)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="SECOND")),t}function Fr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,3),"dow"===n.toLowerCase()?Qe+=3:(n=r,0===tt&&ut(_e)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="DOW")),t}function $r(){let t,n,a,i;return t=Qe,n=e.substr(Qe,3),"doy"===n.toLowerCase()?Qe+=3:(n=r,0===tt&&ut(De)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="DOY")),t}function Rr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"week"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(Me)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="WEEK")),t}function Ur(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"case"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(be)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="CASE")),t}function kr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,3),"end"===n.toLowerCase()?Qe+=3:(n=r,0===tt&&ut(Pe)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="END")),t}function Vr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"when"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(Ae)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="WHEN")),t}function zr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"then"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut(Fe)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="THEN")),t}function Hr(){let t,n,a,i;return t=Qe,n=e.substr(Qe,4),"else"===n.toLowerCase()?Qe+=4:(n=r,0===tt&&ut($e)),n===r?(Qe=t,t=r):(a=Qe,tt++,i=Ot(),tt--,i===r?a=void 0:(Qe=a,a=r),a===r?(Qe=t,t=r):(Be=t,t="ELSE")),t}function qr(){let t;return 44===e.charCodeAt(Qe)?(t=",",Qe++):(t=r,0===tt&&ut(Re)),t}function Kr(){let t;return 40===e.charCodeAt(Qe)?(t="(",Qe++):(t=r,0===tt&&ut(Ue)),t}function Zr(){let t;return 41===e.charCodeAt(Qe)?(t=")",Qe++):(t=r,0===tt&&ut(ke)),t}function Yr(){let e,t;for(e=[],t=jr();t!==r;)e.push(t),t=jr();return e}function jr(){let t;return t=e.charAt(Qe),v.test(t)?Qe++:(t=r,0===tt&&ut(Ve)),t}function Wr(){let t,n,a,i;if(t=Qe,n=Tt(),n!==r&&(Be=t),t=n,t===r)if(t=Qe,96===e.charCodeAt(Qe)?(n="`",Qe++):(n=r,0===tt&&ut(ze)),n!==r){if(a=[],i=e.charAt(Qe),w.test(i)?Qe++:(i=r,0===tt&&ut(He)),i!==r)for(;i!==r;)a.push(i),i=e.charAt(Qe),w.test(i)?Qe++:(i=r,0===tt&&ut(He));else a=r;a===r?(Qe=t,t=r):(96===e.charCodeAt(Qe)?(i="`",Qe++):(i=r,0===tt&&ut(ze)),i===r?(Qe=t,t=r):(Be=t,t=function(e){return e.join("")}(a)))}else Qe=t,t=r;return t}function Jr(e,t,r,n,a){let i={type:"binary-expression",location:a,operator:e,left:t,right:r};return void 0!==n&&(i.escape=n),i}function Qr(e,...t){return{type:"expression-list",location:e,value:t}}function Br(e,t){let r=e;for(let{op:e,expr:n,location:{end:a}}of t)r=Jr(e,r,n,void 0,{...r.location,end:a});return r}Je=i();let Gr=Je!==r&&Qe===e.length;function Xr(){throw Je!==r&&Qe<e.length&&ut({type:"end"}),function(e,t,r){return new B(B.buildMessage(e,t),e,t,r)}(et,Xe<e.length?function(t=Qe){let r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(Xe):null,Xe<e.length?lt(Xe,Xe+1):lt(Xe,Xe))}return t.peg$library?{peg$result:Je,peg$currPos:Qe,peg$FAILED:r,peg$maxFailExpected:et,peg$maxFailPos:Xe,peg$success:Gr,peg$throw:Gr?void 0:Xr}:Gr?Je:void Xr()}class X{static parse(e){return G(e)}}var ee=r(56400);const te=new Set(["current_timestamp","current_date","current_time"]);class re{constructor(e){this.staticData=e}makeBool(e){return me(e)}featureValue(e,t,r,n){return Se(e,t,r,n)}equalsNull(e){return null===e}applyLike(e,t,r){return Oe(e,t,r)}ensureArray(e){return he(e)}applyIn(e,t){return Ie(e,t)}currentTimestamp(e){return ye(e)}currentDate(e){return Le(e)}currentTime(e){return Te(e)}makeSqlInterval(e,t,r){return f.createFromValueAndQualifier(e,t,r)}convertInterval(e){return f.isInterval(e)?e.valueInMilliseconds():e}compare(e,t,r){return k(t,r,e)}calculate(e,t,r,n){return W(e,t,r,n)}evaluateTime(e){return D(e)}evaluateTimestamp(e,t){return M(e,t)}evaluateDate(e,t){return b(e,t)}evaluateFunction(e,t,r){return q(e,t,r)}lookup(e,t){let r=t[e];return void 0===r?null:r}between(e,t){return null==e||null==t[0]||null==t[1]?null:k(e,t[0],">=")&&k(e,t[1],"<=")}notbetween(e,t){return null==e||null==t[0]||null==t[1]?null:k(e,t[0],"<")||k(e,t[1],">")}ternaryNot(e){return ve(e)}ternaryAnd(e,t){return we(e,t)}ternaryOr(e,t){return ge(e,t)}}function ne(e,...t){return`this.${e}(${t.join(", ")})`}function ae(e){return void 0===e?"void 0":JSON.stringify(e)}function ie({type:e,period:t,precision:r,secondary:n}){return JSON.stringify({type:e,period:t,precision:r,secondary:n})}const oe="feature",le="lookups",ue="attributeAdapter",se="fieldsIndex",ce="timeZone",fe="currentUser";class de{constructor(e,t){this._parseTree=e,this._fieldsIndex=t,this._staticData=Object.create(null),this._nextStaticDataId=0,this._tempVars=new Set,this._nextTempVarId=0}compile(){let e=this._compileNode(this._parseTree),t=`\n ${this._tempVars.size>0?`var ${Array.from(this._tempVars).join(", ")};`:""}\n return this.convertInterval(${e});\n `;return Function(oe,le,ue,se,ce,fe,t).bind(new re(this._staticData))}_storeStaticData(e){let t="static$"+this._nextStaticDataId++;return this._staticData[t]=e,t}_compileRefStaticData(e){return`this.staticData[${ae(e)}]`}_generateTempVar(){let e="temp$"+this._nextTempVarId++;return this._tempVars.add(e),e}_compileSimpleCase(e){let t=this._compileNode(e.operand),r=this._generateTempVar(),n=[];for(let t of e.clauses){let e=ne("compare",ae("="),r,this._compileNode(t.operand)),a=this._compileNode(t.value);n.push(`${e} ? (${a}) :`)}return null==e.else?n.push(ae(null)):n.push(this._compileNode(e.else)),`(${r} = ${t}, ${n.join(" ")})`}_compileSearchedCase(e){let t=[];for(let r of e.clauses){let e=ne("makeBool",this._compileNode(r.operand)),n=this._compileNode(r.value);t.push(`${e} ? (${n}) :`)}return null==e.else?t.push(ae(null)):t.push(this._compileNode(e.else)),t.join(" ")}_compileInExpr(e,t){let r=new Set,n=[];for(let e of t.value)"number"===e.type||"string"===e.type?r.add(e.value):n.push(e);let a=this._compileNode(e),i=ne("ensureArray",this._compileNode({type:"expression-list",location:t.location,value:n}));if(r.size>0){let e=this._compileRefStaticData(this._storeStaticData(r)),t=this._generateTempVar();return n.length>0?`(${t} = ${a}, ${e}.has(${t}) || ${ne("applyIn",t,i)})`:`(${t} = ${a}, ${t} == null ? null : ${e}.has(${t}))`}return ne("applyIn",a,i)}_compileNode(e){switch(e.type){case"interval":return ne("makeSqlInterval",this._compileNode(e.value),"interval-qualifier"===e.qualifier.type?function({type:e,start:t,end:r}){return`{type: ${ae(e)}, start: ${ie(t)}, end: ${ie(r)}}`}(e.qualifier):ie(e.qualifier),ae(e.op));case"case-expression":return"simple"===e.format?this._compileSimpleCase(e):this._compileSearchedCase(e);case"parameter":return ne("lookup",ae(e.value.toLowerCase()),le);case"expression-list":return`[${e.value.map(e=>this._compileNode(e)).join(", ")}]`;case"unary-expression":return ne("ternaryNot",this._compileNode(e.expr));case"binary-expression":switch(e.operator){case"AND":return ne("ternaryAnd",this._compileNode(e.left),this._compileNode(e.right));case"OR":return ne("ternaryOr",this._compileNode(e.left),this._compileNode(e.right));case"IS":if("null"!==e.right.type)throw new l.L("UnsupportedIsRhs");return ne("equalsNull",this._compileNode(e.left));case"ISNOT":if("null"!==e.right.type)throw new l.L("UnsupportedIsRhs");return`!${ne("equalsNull",this._compileNode(e.left))}`;case"IN":return this._compileInExpr(e.left,e.right);case"NOT IN":return ne("ternaryNot",this._compileInExpr(e.left,e.right));case"BETWEEN":return ne("between",this._compileNode(e.left),this._compileNode(e.right));case"NOTBETWEEN":return ne("notbetween",this._compileNode(e.left),this._compileNode(e.right));case"LIKE":return ne("applyLike",this._compileNode(e.left),this._compileNode(e.right),ae(e.escape));case"NOT LIKE":return ne("ternaryNot",ne("applyLike",this._compileNode(e.left),this._compileNode(e.right),ae(e.escape)));case"<>":case"<":case">":case">=":case"<=":case"=":if(Ee(e,e.operator,this._fieldsIndex)){let t=e.comparisonData;return ne("compare",ae(t.op),ne("featureValue",oe,ae(t.fieldName),ae(null),ue),this._compileRefStaticData(this._storeStaticData(t.comparisonEpochMs)))}return ne("compare",ae(e.operator),this._compileNode(e.left),this._compileNode(e.right));case"*":case"-":case"+":case"/":case"||":return ne("calculate",ae(e.operator),this._compileNode(e.left),this._compileNode(e.right),ce);default:throw new l.L("UnsupportedOperator",{operator:e.operator})}case"null":case"boolean":case"string":case"number":return ae(e.value);case"time":try{return this._compileRefStaticData(this._storeStaticData(D(e.value)))}catch{return ne("evaluateTime",ae(e.value))}case"date":try{return this._compileRefStaticData(this._storeStaticData(b(e.value,"unknown")))}catch{return ne("evaluateDate",ae(e.value),ae("unknown"))}case"timestamp":try{return this._compileRefStaticData(this._storeStaticData(M(e.value,"unknown")))}catch{return ne("evaluateTimestamp",ae(e.value),ae("unknown"))}case"current-time":return"date"===e.mode?ne("currentDate",ce):"time"===e.mode?ne("currentTime",ce):ne("currentTimestamp",ce);case"current-user":return fe;case"column-reference":return ne("featureValue",oe,ae(e.column),se,ue);case"data-type":return function({type:e,size:t,withtimezone:r}){return JSON.stringify({type:e,size:t,withtimezone:r})}(e.value);case"function":return ne("evaluateFunction",ae(e.name),this._compileNode(e.args),ce)}throw new l.L("UnsupportedSyntax",{node:e.type})}}class pe{static create(e,t={}){return new pe(e,t.fieldsIndex,t.timeZone??void 0,t.currentUser)}constructor(e,t,r="UTC",n=null){this.fieldsIndex=t,this.timeZone=r,this.currentUser=n,this.parameters={},this._compiledExecutor=null,this._hasDateFunctions=void 0,this.parseTree=X.parse(e);let{isStandardized:a,isAggregate:i,currentUserRequired:o,referencedFieldNames:l}=this._extractExpressionInfo(t);this._referencedFieldNames=l,this.isStandardized=a,this.isAggregate=i,this.currentUserRequired=o}static convertValueToStorageFormat(e,t=null){if(null===t)return(0,F.$P)(e)?e.getTime():S(e)?e.toMillis():_(e)?e.toStorageFormat():C(e)?e.toStorageString():x(e)?e.toStorageFormat():e;switch(t){case"date":return(0,F.$P)(e)?e.getTime():S(e)?e.toMillis():_(e)?e.toMilliseconds():x(e)?e.toNumber():e;case"date-only":return(0,F.$P)(e)?o.n.fromDateJS(e).toString():_(e)?o.n.fromSqlTimeStampOffset(e).toString():S(e)?o.n.fromDateTime(e).toString():e;case"time-only":return(0,F.$P)(e)?p.k.fromDateJS(e).toStorageString():S(e)?p.k.fromDateTime(e).toStorageString():_(e)?p.k.fromSqlTimeStampOffset(e).toStorageString():C(e)?e.toStorageString():e;case"timestamp-offset":if((0,F.$P)(e))return d.g.fromJSDate(e).toStorageFormat();if(S(e))return d.g.fromDateTime(e).toStorageFormat();if(_(e))return e.toStorageFormat()}return e}get fieldNames(){return this._referencedFieldNames}testSet(e,t=xe,r=this.currentUser){return!!this._evaluateNode(this.parseTree,null,t,e,r)}calculateValue(e,t=xe,r=this.currentUser){let n=this._evaluateNode(this.parseTree,e,t,null,r);return f.isInterval(n)?n.valueInMilliseconds()/864e5:n}tryGetCompiledExecutor(){if(null!=this._compiledExecutor)return this._compiledExecutor;if((0,n.A)("esri-csp-restrictions"))return null;let e=new de(this.parseTree,this.fieldsIndex);return this._compiledExecutor=e.compile(),this._compiledExecutor}calculateValueCompiled(e,t=xe,r=this.currentUser){let n=this.tryGetCompiledExecutor();return null==n?this.calculateValue(e,t):n(e,this.parameters,t,this.fieldsIndex,this.timeZone,r??null)}testFeature(e,t=xe,r=this.currentUser){return!!this._evaluateNode(this.parseTree,e,t,null,r)}testFeatureCompiled(e,t=xe,r=this.currentUser){let n=this.tryGetCompiledExecutor();return null==n?this.testFeature(e,t):!!n(e,this.parameters,t,this.fieldsIndex,this.timeZone,r??null)}get hasDateFunctions(){return this._hasDateFunctions??=(0,a.zN)(Q(this.parseTree),e=>"current-time"===e.type||"function"===e.type&&te.has(e.name.toLowerCase())),this._hasDateFunctions}getFunctions(){let e=new Set;for(let t of Q(this.parseTree))"function"===t.type&&e.add(t.name.toLowerCase());return Array.from(e)}getExpressions(){let e=new Map;for(let t of Q(this.parseTree))if("function"===t.type){let r=t.name.toLowerCase(),n=t.args.value[0];if("column-reference"===n.type){let t=n.column,a=`${r}-${t}`;e.has(a)||e.set(a,{aggregateType:r,field:t})}}return Array.from(e.values())}getVariables(){let e=new Set;for(let t of Q(this.parseTree))"parameter"===t.type&&e.add(t.value.toLowerCase());return Array.from(e)}_extractExpressionInfo(e){let t=[],r=new Set,n=!0,a=!1,o=!1;for(let l of Q(this.parseTree))switch(l.type){case"column-reference":{let n,a,i=e?.get(l.column);i?n=a=i.name??"":(a=l.column,n=a.toLowerCase()),r.has(n)||(r.add(n),t.push(a)),l.column=a;break}case"current-user":o=!0;break;case"function":{let{name:e,args:t}=l,r=t.value.length;n&&=K(e,r),!1===a&&(a=(0,i.M)(e,r));break}}return{referencedFieldNames:Array.from(t),isStandardized:n,isAggregate:a,currentUserRequired:o}}_evaluateNode(e,t,r,n,a){let o;switch(e.type){case"interval":{let i=this._evaluateNode(e.value,t,r,n,a);return f.createFromValueAndQualifier(i,e.qualifier,e.op)}case"case-expression":if("simple"===e.format){let i=this._evaluateNode(e.operand,t,r,n,a);for(let o=0;o<e.clauses.length;o++)if(k(i,this._evaluateNode(e.clauses[o].operand,t,r,n,a),"="))return this._evaluateNode(e.clauses[o].value,t,r,n,a);if(null!==e.else)return this._evaluateNode(e.else,t,r,n,a)}else{for(let i=0;i<e.clauses.length;i++)if(me(this._evaluateNode(e.clauses[i].operand,t,r,n,a)))return this._evaluateNode(e.clauses[i].value,t,r,n,a);if(null!==e.else)return this._evaluateNode(e.else,t,r,n,a)}return null;case"parameter":return o=this.parameters[e.value.toLowerCase()],(0,F.$P)(o)?h.c9.fromJSDate(o):"object"==typeof o&&o&&"toDateTime"in o?o.toDateTime():o;case"expression-list":{let i=[];for(let o of e.value)i.push(this._evaluateNode(o,t,r,n,a));return i}case"unary-expression":return ve(this._evaluateNode(e.expr,t,r,n,a));case"binary-expression":switch(e.operator){case"AND":return we(this._evaluateNode(e.left,t,r,n,a),this._evaluateNode(e.right,t,r,n,a));case"OR":return ge(this._evaluateNode(e.left,t,r,n,a),this._evaluateNode(e.right,t,r,n,a));case"IS":if("null"!==e.right.type)throw new l.L("UnsupportedIsRhs");return null===this._evaluateNode(e.left,t,r,n,a);case"ISNOT":if("null"!==e.right.type)throw new l.L("UnsupportedIsRhs");return null!==this._evaluateNode(e.left,t,r,n,a);case"IN":{let i=he(this._evaluateNode(e.right,t,r,n,a));return Ie(this._evaluateNode(e.left,t,r,n,a),i)}case"NOT IN":{let i=he(this._evaluateNode(e.right,t,r,n,a));return ve(Ie(this._evaluateNode(e.left,t,r,n,a),i))}case"BETWEEN":{let i=this._evaluateNode(e.left,t,r,n,a),o=this._evaluateNode(e.right,t,r,n,a);return null==i||null==o[0]||null==o[1]?null:k(i,o[0],">=")&&k(i,o[1],"<=")}case"NOTBETWEEN":{let i=this._evaluateNode(e.left,t,r,n,a),o=this._evaluateNode(e.right,t,r,n,a);return null==i||null==o[0]||null==o[1]?null:k(i,o[0],"<")||k(i,o[1],">")}case"LIKE":return Oe(this._evaluateNode(e.left,t,r,n,a),this._evaluateNode(e.right,t,r,n,a),e.escape);case"NOT LIKE":return ve(Oe(this._evaluateNode(e.left,t,r,n,a),this._evaluateNode(e.right,t,r,n,a),e.escape));case"<>":case"<":case">":case">=":case"<=":case"=":if(Ee(e,e.operator,this.fieldsIndex)){let n=e.comparisonData;return k(Se(t,n.fieldName,null,r),n.comparisonEpochMs,n.op)}return k(this._evaluateNode(e.left,t,r,n,a),this._evaluateNode(e.right,t,r,n,a),e.operator);case"-":case"+":case"*":case"/":case"||":return W(e.operator,this._evaluateNode(e.left,t,r,n,a),this._evaluateNode(e.right,t,r,n,a),this.timeZone)}case"null":case"boolean":case"string":case"number":return e.value;case"date":return e.parsedValue??=b(e.value,"unknown"),e.parsedValue;case"timestamp":return e.parsedValue??=M(e.value,"unknown"),e.parsedValue;case"time":return e.parsedValue??=D(e.value),e.parsedValue;case"current-time":return"date"===e.mode?Le(this.timeZone):"time"===e.mode?Te(this.timeZone):ye(this.timeZone);case"current-user":return a??null;case"column-reference":return Se(t,e.column,this.fieldsIndex,r);case"data-type":return e.value;case"function":{if(this.isAggregate&&(0,i.M)(e.name,e.args.value.length)){let t=[];for(let i of e.args?.value||[]){let e=[];for(let t of n||[])e.push(this._evaluateNode(i,t,r,null,a));t.push(e)}return(0,i.s)(e.name,t)}let o=this._evaluateNode(e.args,t,r,n,a);return q(e.name,o,this.timeZone)}}throw new l.L("UnsupportedSyntax",{node:e.type})}}function me(e){return!0===e}function he(e){return Array.isArray(e)?e:[e]}function ve(e){return null===e?null:!0!==e}function we(e,t){return null!=e&&null!=t?!0===e&&!0===t:!1!==e&&!1!==t&&null}function ge(e,t){return null!=e&&null!=t?!0===e||!0===t:!0===e||!0===t||null}function Ie(e,t){if(null==e)return null;let r=!1;for(let n of t)if(null==n)r=null;else{if(e===n){r=!0;break}if(R(e)&&R(n)&&(r=k(e,n,"="),r))break}return r}function ye(e){return O(new Date,e)}function Le(e){return o.n.fromNow(e)}function Te(e){let t=O(new Date,e);return p.k.fromDateTime(t)}const Ne="-[]/{}()*+?.\\^$|";function Oe(e,t,r){return null==e?null:function(e,t){let r=t,n="",a=0;for(let t=0;t<e.length;t++){let i=e.charAt(t);switch(a){case 0:i===r?a=1:Ne.includes(i)?n+="\\"+i:n+="%"===i?".*":"_"===i?".":i;break;case 1:Ne.includes(i)?n+="\\"+i:n+=i,a=0}}return RegExp("^"+n+"$","m")}(t,r).test(e)}function Ee(e,t,r){if("comparisonData"in e)return null!=e.comparisonData;try{if(null==r)return!1;let n,a;if("column-reference"===e.left.type&&"timestamp"===e.right.type)n=e.left,a=e.right;else{if("timestamp"!==e.left.type||"column-reference"!==e.right.type)return!1;n=e.right,a=e.left,t=function(e){switch(e){case"<>":case"=":return e;case"<":return">";case">":return"<";case"<=":return">=";case">=":return"<=";default:throw new l.L("UnsupportedOperator",{operator:e})}}(t)}let i=r.get(n.column);if("esriFieldTypeDate"!==i?.type&&"date"!==i?.type)return!1;let o=r.getTimeZone(i.name),u=null==o?h.mQ.utcInstance:(0,ee.S3)(o);return!!u.isUniversal&&(e.comparisonData=function(e,t,r,n){let a,i=M(n,t);if(d.g.isTimestampOffset(i))if((0,m.Y4)(t)){let e=i.toDateTime();a=h.c9.fromObject({year:e.year,month:e.month,day:e.day,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond},{zone:t}).toMillis()}else a=i.toMilliseconds();else a=i.toMillis();return{fieldName:e,op:r,comparisonEpochMs:a}}(i.name,u,t,a.value),!0)}finally{"comparisonData"in e||(e.comparisonData=null)}}function Se(e,t,r,n){if("getAttributeSQL"in n)return n.getAttributeSQL(e,t);let a=n.getAttribute(e,t);if(null==a)return a;let i=r?.get(t);switch(i?.type){case"esriFieldTypeDate":case"date":{let e=r?.getTimeZone(i.name);return O(new Date(a),null==e?h.mQ.utcInstance:(0,ee.S3)(e))}case"esriFieldTypeDateOnly":case"date-only":return o.n.fromReader(a);case"esriFieldTypeTimeOnly":case"time-only":return p.k.fromReader(a);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return new d.g(a)}return a}const xe={getAttribute:(e,t)=>(function(e){return e&&"object"==typeof e.attributes}(e)?e.attributes:e)[t]}},1262(e,t,r){r.d(t,{L:()=>i});var n=r(799);const a={InvalidValueForAggregateFunction:"Invalid value used in aggregate function",MissingStatisticParameters:"Statistic does not have 1 or 0 Parameters",InvalidFunctionParameters:"Invalid parameters for call to {function}",UnsupportedIsLhs:"Unsupported left hand expression in is statement",UnsupportedIsRhs:"Unsupported right hand expression in is statement",UnsupportedOperator:"Unsupported operator - {operator}",UnsupportedSyntax:"Unsupported syntax - {node}",UnsupportedSqlFunction:"Sql function not found = {function}",InvalidDataType:"Invalid sql data type",InvalidDate:"Invalid date encountered",InvalidOperator:"Invalid operator encountered",InvalidTime:"Invalid time encountered",IllegalInterval:"Illegal interval",FunctionNotRecognized:"Function not recognized",InvalidTimeStamp:"Invalid timestamp encountered",InvalidParameterCount:"Invalid parameter count for call to {name}",PrimarySecondaryQualifiers:"Primary and Secondary SqlInterval qualifiers not supported",YearMonthIntervals:"Year-Month Intervals not supported",CannotCastValue:"Cannot cast value to the required data type"};class i extends Error{constructor(e,t){super((0,n.HC)(a[e],t)),this.declaredRootClass="esri.arcade.featureset.support.sqlerror",Error.captureStackTrace&&Error.captureStackTrace(this,i)}}}}]);