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

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 (307) 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/1a614bac5db42c6263f8.js +1 -0
  10. package/assets/esri/core/workers/chunks/{99a0a434ea2162166754.js → 2095f220dc2b8f8f62db.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5daa9429808ca31279f2.js → 216a239142dfe1306c6c.js} +1 -1
  12. package/assets/esri/core/workers/chunks/25c3be410d1c03f8f39d.js +1 -0
  13. package/assets/esri/core/workers/chunks/294276ed397023dcda44.js +1 -0
  14. package/assets/esri/core/workers/chunks/2a2a4650dd9b953d317c.js +1 -0
  15. package/assets/esri/core/workers/chunks/2b6684d057d9ad17ac13.js +1 -0
  16. package/assets/esri/core/workers/chunks/{ad96132bc89671e595f3.js → 2d3e0e4442dbc6ec6def.js} +1 -1
  17. package/assets/esri/core/workers/chunks/2d83ba260dd6bbe38206.js +1 -0
  18. package/assets/esri/core/workers/chunks/{69d5f8ef78b9b8b3d33d.js → 3286cf2afeb7f48564d9.js} +1 -1
  19. package/assets/esri/core/workers/chunks/3321cb0d4cb68b2ec8bf.js +1 -0
  20. package/assets/esri/core/workers/chunks/{e99c8c71c757bb161d87.js → 3636c2ac9b77950776d6.js} +1 -1
  21. package/assets/esri/core/workers/chunks/367b2f25cfe37847a48d.js +1 -0
  22. package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +1 -0
  23. package/assets/esri/core/workers/chunks/3c881b1adc8a5dea9a90.js +1 -0
  24. package/assets/esri/core/workers/chunks/{6a2562cc00727155fc01.js → 4024becaf4012c1f15a7.js} +1 -1
  25. package/assets/esri/core/workers/chunks/435ad7e6ed326da2b969.js +1 -0
  26. package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +1 -0
  27. package/assets/esri/core/workers/chunks/46f0510846a309a390ca.js +1 -0
  28. package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +1 -0
  29. package/assets/esri/core/workers/chunks/509a74e9334f31b931d4.js +1 -0
  30. package/assets/esri/core/workers/chunks/50e8943d2c0b96fab2c1.js +1 -0
  31. package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +1 -0
  32. package/assets/esri/core/workers/chunks/546f5f57c9249627bb89.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/8d86b0cb0e004ad72040.js +1 -0
  51. package/assets/esri/core/workers/chunks/{76196c414e48834f7b92.js → 8f008eedb11685ee2048.js} +1 -1
  52. package/assets/esri/core/workers/chunks/98760040f0c9d47c718d.js +1 -0
  53. package/assets/esri/core/workers/chunks/{4b99b4cf729881e616bc.js → 98d1efb6f2439c6344cf.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{18f20fd43ec9ce03cef1.js → 9e04703ee5f5ec47db43.js} +1 -1
  55. package/assets/esri/core/workers/chunks/9e0b0262dec496451762.js +1 -0
  56. package/assets/esri/core/workers/chunks/{23fd4de56de352f63e2d.js → a2196a49f89d57a0a1c7.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{89c8b0f684c1f27d149e.js → a2f0894218e665780a21.js} +1 -1
  58. package/assets/esri/core/workers/chunks/a79cae328e866272754a.js +1 -0
  59. package/assets/esri/core/workers/chunks/a85cdafbaf1848bb924b.js +1 -0
  60. package/assets/esri/core/workers/chunks/b01688ccc29d33bfc82d.js +1 -0
  61. package/assets/esri/core/workers/chunks/b0a612d8ffa5c46d7db4.js +1 -0
  62. package/assets/esri/core/workers/chunks/b5eff28cf482d920b9ea.js +1 -0
  63. package/assets/esri/core/workers/chunks/b70885deebc6106597ad.js +1 -0
  64. package/assets/esri/core/workers/chunks/bedaa5e64ed81803829a.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/form/elements/inputs/DynamicChoiceInput.d.ts +2 -2
  141. package/geometry/operators/containsOperator.d.ts +1 -1
  142. package/geometry/operators/densifyOperator.d.ts +1 -1
  143. package/geometry/operators/differenceOperator.d.ts +6 -4
  144. package/geometry/operators/distanceOperator.d.ts +1 -1
  145. package/geometry/operators/geodesicProximityOperator.d.ts +8 -8
  146. package/geometry/operators/graphicBufferOperator.d.ts +6 -6
  147. package/geometry/operators/integrateOperator.d.ts +2 -2
  148. package/geometry/operators/intersectsOperator.d.ts +3 -3
  149. package/geometry/operators/linesToPolygonsOperator.d.ts +2 -2
  150. package/geometry/operators/locateBetweenOperator.d.ts +2 -2
  151. package/geometry/operators/minimumBoundingCircleOperator.d.ts +1 -1
  152. package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
  153. package/geometry/operators/polygonSlicerOperator.d.ts +2 -2
  154. package/geometry/operators/projectOperator.d.ts +2 -2
  155. package/geometry/operators/proximityOperator.d.ts +15 -15
  156. package/geometry/operators/shapePreservingProjectOperator.d.ts +2 -2
  157. package/geometry/operators/simplifyOperator.d.ts +2 -2
  158. package/geometry/operators/support/GeographicTransformationStep.d.ts +3 -3
  159. package/geometry/operators/support/Transformation.d.ts +8 -8
  160. package/geometry/operators/support/geographicTransformationUtils.d.ts +3 -3
  161. package/geometry/operators/symmetricDifferenceOperator.d.ts +2 -2
  162. package/geometry/operators/withinOperator.d.ts +3 -3
  163. package/graphic/MapNotesGraphicOrigin.d.ts +1 -0
  164. package/kernel.js +1 -1
  165. package/layers/ElevationLayer.d.ts +6 -2
  166. package/layers/GeospatialPDFLayer.d.ts +2 -2
  167. package/layers/ParquetLayer.d.ts +1 -1
  168. package/layers/VectorTileLayer.d.ts +10 -1
  169. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  170. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  171. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  172. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  173. package/layers/orientedImagery/transformations/rotationUtils.js +2 -0
  174. package/layers/orientedImagery/transformations/utils.js +1 -1
  175. package/package.json +2 -2
  176. package/popup/FeaturesModel.js +1 -1
  177. package/popup/support/featureUtils.js +1 -1
  178. package/rest/featureService/FeatureService.d.ts +0 -5
  179. package/rest/networks/support/TraceLocation.d.ts +2 -1
  180. package/rest/networks/support/TraceResult.d.ts +0 -4
  181. package/rest/support/OutDistance.d.ts +0 -1
  182. package/smartMapping/statistics/histogramForTimeSeries.js +1 -1
  183. package/smartMapping/statistics/summaryStatisticsForTimeSeries.js +1 -1
  184. package/support/BasemapStyle.d.ts +2 -2
  185. package/symbols/cim/types.d.ts +7 -9
  186. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  187. package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
  188. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
  189. package/views/2d/layers/features/FeatureContainer.js +1 -1
  190. package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
  191. package/views/3d/environment/SunLighting.d.ts +15 -2
  192. package/views/3d/environment/VirtualLighting.d.ts +15 -2
  193. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  194. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  195. package/views/draw/DrawOperation.js +1 -1
  196. package/views/draw/DrawScreenTool.js +1 -1
  197. package/views/input/types.d.ts +2 -4
  198. package/views/interactive/options/LabelOptions.d.ts +5 -5
  199. package/views/interactive/options/SnappingOptions.d.ts +2 -2
  200. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +0 -1
  201. package/widgets/Editor/VisibleElements.d.ts +4 -0
  202. package/widgets/Editor.d.ts +2 -0
  203. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  204. package/widgets/FeatureTable.js +1 -1
  205. package/widgets/Features/FeaturesViewModel.js +1 -1
  206. package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
  207. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  208. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  209. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  210. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  211. package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +2 -0
  212. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  213. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  214. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  215. package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
  216. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  217. package/widgets/OrientedImageryViewer.js +2 -2
  218. package/widgets/PanoramicViewer/utils.js +1 -1
  219. package/widgets/Search/LayerSearchSource.d.ts +1 -1
  220. package/widgets/Sketch/VisibleElements.d.ts +4 -0
  221. package/widgets/Sketch.d.ts +2 -0
  222. package/widgets/support/iconUtils.js +1 -1
  223. package/assets/esri/core/workers/chunks/010f57ec7fdbedf78d02.js +0 -1
  224. package/assets/esri/core/workers/chunks/02e10f44edf911832c2a.js +0 -1
  225. package/assets/esri/core/workers/chunks/07f7177bfaf9de73bc25.js +0 -1
  226. package/assets/esri/core/workers/chunks/090adefe20412e8a5084.js +0 -1
  227. package/assets/esri/core/workers/chunks/0d9c4c6c571ce26d356b.js +0 -1
  228. package/assets/esri/core/workers/chunks/1201b8c5852830836eac.js +0 -1
  229. package/assets/esri/core/workers/chunks/151e5799ede763a03ee2.js +0 -1
  230. package/assets/esri/core/workers/chunks/168a523bdc3653081f8a.js +0 -1
  231. package/assets/esri/core/workers/chunks/175c268e64ccd01f8c25.js +0 -1
  232. package/assets/esri/core/workers/chunks/18787aa685524b958561.js +0 -1
  233. package/assets/esri/core/workers/chunks/1e1c45f75020d5e05dc3.js +0 -1
  234. package/assets/esri/core/workers/chunks/28104681ba161967039f.js +0 -1
  235. package/assets/esri/core/workers/chunks/2a36fe3f3f257a779a1b.js +0 -1
  236. package/assets/esri/core/workers/chunks/30af63b3b750142faadb.js +0 -1
  237. package/assets/esri/core/workers/chunks/3dddae78286d05eb10fc.js +0 -1
  238. package/assets/esri/core/workers/chunks/3f946c13ad97fbed867b.js +0 -1
  239. package/assets/esri/core/workers/chunks/40d803584eeade4df433.js +0 -1
  240. package/assets/esri/core/workers/chunks/41773d858e212468db88.js +0 -1
  241. package/assets/esri/core/workers/chunks/426b4eb500fdfe9df325.js +0 -1
  242. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +0 -1
  243. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +0 -1
  244. package/assets/esri/core/workers/chunks/4932773663469919d10a.js +0 -1
  245. package/assets/esri/core/workers/chunks/49b967d89d2841cea675.js +0 -1
  246. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +0 -1
  247. package/assets/esri/core/workers/chunks/4cb751dc8d00bdaeb04c.js +0 -1
  248. package/assets/esri/core/workers/chunks/4d3d7ec407ee5cd5f036.js +0 -1
  249. package/assets/esri/core/workers/chunks/4fd0d9688df6fcc0d0b8.js +0 -1
  250. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +0 -1
  251. package/assets/esri/core/workers/chunks/548b8f74a6883e364931.js +0 -1
  252. package/assets/esri/core/workers/chunks/5af8fb4ec2c72697e35b.js +0 -1
  253. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +0 -1
  254. package/assets/esri/core/workers/chunks/5dc604e3691f36f03959.js +0 -1
  255. package/assets/esri/core/workers/chunks/611e3cdf67283c11576f.js +0 -1
  256. package/assets/esri/core/workers/chunks/61552b4b8111a8624d84.js +0 -1
  257. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +0 -1
  258. package/assets/esri/core/workers/chunks/632fdf1d95ad69109427.js +0 -1
  259. package/assets/esri/core/workers/chunks/652faf4359ac072c5dde.js +0 -1
  260. package/assets/esri/core/workers/chunks/6b9961261241fdce0e94.js +0 -1
  261. package/assets/esri/core/workers/chunks/710b8251a59884aee31e.js +0 -1
  262. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +0 -29
  263. package/assets/esri/core/workers/chunks/7393f63043a1da3d05a6.js +0 -1
  264. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +0 -1
  265. package/assets/esri/core/workers/chunks/771dd92cb3e6a3427f66.js +0 -1
  266. package/assets/esri/core/workers/chunks/7748c2886d0122b40eeb.js +0 -1
  267. package/assets/esri/core/workers/chunks/78c4e43cfa1eda06b4d9.js +0 -1
  268. package/assets/esri/core/workers/chunks/7e0f04a5038e2a4f6e4b.js +0 -1
  269. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +0 -1
  270. package/assets/esri/core/workers/chunks/7f16ae01ccd9b6114d1c.js +0 -1
  271. package/assets/esri/core/workers/chunks/82a022cc21364c9a8539.js +0 -1
  272. package/assets/esri/core/workers/chunks/8924e2f3b7d03afb3a6a.js +0 -1
  273. package/assets/esri/core/workers/chunks/90153b5230b3a4985c14.js +0 -1
  274. package/assets/esri/core/workers/chunks/9189dfe19a2a2ccd5173.js +0 -1
  275. package/assets/esri/core/workers/chunks/9215b59c5ccecf9add58.js +0 -1
  276. package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +0 -1
  277. package/assets/esri/core/workers/chunks/967b4992b400517ee712.js +0 -1
  278. package/assets/esri/core/workers/chunks/9dd1fc56eb1ea6eb705e.js +0 -1
  279. package/assets/esri/core/workers/chunks/a163c6005aba3378edaa.js +0 -1
  280. package/assets/esri/core/workers/chunks/a53823cf03dbdce1aecd.js +0 -1
  281. package/assets/esri/core/workers/chunks/a62c12925303ff802c3d.js +0 -1
  282. package/assets/esri/core/workers/chunks/acb265a22be5e12f38e5.js +0 -1
  283. package/assets/esri/core/workers/chunks/acdfd275dbf8533a67f3.js +0 -1
  284. package/assets/esri/core/workers/chunks/ace802483484519658f3.js +0 -1
  285. package/assets/esri/core/workers/chunks/b3007aedbf731dacaff1.js +0 -1
  286. package/assets/esri/core/workers/chunks/b4334713bacdfe40ce3d.js +0 -1
  287. package/assets/esri/core/workers/chunks/b83cef2d3f528726d492.js +0 -1
  288. package/assets/esri/core/workers/chunks/be97a629e2ae4d13ceb3.js +0 -1
  289. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +0 -1
  290. package/assets/esri/core/workers/chunks/c47d095434d09b5f10c6.js +0 -1
  291. package/assets/esri/core/workers/chunks/c4b7111dcedd9d6e1c2a.js +0 -1
  292. package/assets/esri/core/workers/chunks/c5d85be6e16bc895e7fb.js +0 -1
  293. package/assets/esri/core/workers/chunks/c8d6bb5cca49926a0214.js +0 -1
  294. package/assets/esri/core/workers/chunks/cb4be68cc5085d421615.js +0 -1
  295. package/assets/esri/core/workers/chunks/cb4db5489388559d6bd9.js +0 -1
  296. package/assets/esri/core/workers/chunks/cc794bb94ebc1cb66024.js +0 -1
  297. package/assets/esri/core/workers/chunks/cc94bf05b235e65291fc.js +0 -1
  298. package/assets/esri/core/workers/chunks/d4af9faa5d901274fad2.js +0 -1
  299. package/assets/esri/core/workers/chunks/d77c68e0fc3b259bf4f9.js +0 -1
  300. package/assets/esri/core/workers/chunks/daf9b691817e83a11f3c.js +0 -1
  301. package/assets/esri/core/workers/chunks/de0f335f702ae85a1df3.js +0 -1
  302. package/assets/esri/core/workers/chunks/e11159e3dc3353b27c57.js +0 -1
  303. package/assets/esri/core/workers/chunks/f8379cd45f750f28a3d8.js +0 -1
  304. package/assets/esri/core/workers/chunks/f905f1a1aa4c123cbe83.js +0 -1
  305. package/assets/esri/core/workers/chunks/fd4635410b27bcedb752.js +0 -1
  306. package/assets/esri/core/workers/chunks/fda83bcb8e40e8044c24.js +0 -1
  307. package/assets/esri/core/workers/chunks/feb4f8c807bb0dca488f.js +0 -1
@@ -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([[9301],{99301(e,t,r){r.r(t),r.d(t,{applyTextFormattingHTML:()=>ee,createFieldInfoMap:()=>B,findRelatedLayer:()=>de,findUtilityNetwork:()=>pe,fixTokens:()=>z,formatAttributes:()=>re,formatEditInfo:()=>W,formatValueToFieldInfo:()=>P,getAllFieldInfos:()=>K,getConfigurableFieldsContainer:()=>A,getFieldFormat:()=>U,getFieldInfo:()=>_,getFieldInfoLabel:()=>E,getFixedFieldName:()=>R,getFixedFieldNames:()=>M,getPopupLayer:()=>v,getSourceLayer:()=>Z,graphicCallback:()=>q,htmlEntities:()=>X,isAssociatedFeatureSupportedLayer:()=>Q,isExpressionField:()=>x,isFeatureSupportedLayer:()=>H,isGraphicForRelatableFeatureSupportedLayer:()=>Y,isRelatableFeatureSupportedLayer:()=>G,isRelatableLayer:()=>J,isRelatedField:()=>le,preLayerQueryCallback:()=>fe,preRequestCallback:()=>se,querySourceLayer:()=>ne,queryUpdatedFeature:()=>ie,shouldOpenInNewTab:()=>k,substituteAttributes:()=>$,substituteFieldsInLinksAndAttributes:()=>D});var n=r(53966),i=r(799),l=r(77548),a=r(97770),o=r(18047),u=r(15426),f=r(39663),s=r(30524),d=r(4560),p=r(43668),y=r(56400);const c=()=>n.A.getLogger("esri.popup.support.featureUtils"),m=/href=(""|'')/gi,g=/(\{([^{\r\n]+)\})/g,h=/'/g,b=/^\s*expression\//i,I=/(\n)/gi,F=/[\u00A0-\u9999<>&]/gim,T=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,w=/^(?:mailto:|tel:)/,C="relationships/",N=(0,a.J2)("short-date-short-time");function Z(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}const L=new Set(["building","knowledge-graph","link-chart","map-image","map-notes","subtype-group","tile"]);function v(e){let t=e?.origin;return(null==t?void 0:L.has(t.type??"")?t.sublayer:t.layer)??e?.layer}async function q({type:e,value:t,event:r}){try{return"function"==typeof t?t(r):await t}catch(n){return void c().error("error",`An error occurred when calling the "${e}" function`,{error:n,graphic:r.graphic,value:t})}}function k(e=""){if(e)return!w.test(e.trim().toLowerCase())}function x(e){return!!e&&b.test(e)}function A(e){let{fieldInfo:t,graphic:r,layer:n}=e;return function({fieldInfo:e,graphic:t}){return!(!e?.fieldName||x(e.fieldName)||le(e.fieldName)||t?.popupTemplate)}({fieldInfo:t,graphic:r})?(0,l.p2)(n,{graphic:r}):null}function E({expressionInfos:e,fieldInfo:t,graphic:r,isContentFieldInfos:n,layer:i}){if(!t?.fieldName)return null;let l=function(e,t){if(!t||!x(t)||!e)return;let r=t.replace(b,"").toLowerCase();return e.find(({name:e})=>e.toLowerCase()===r)}(e,t.fieldName);if(l)return l.title||null;let a=A({fieldInfo:t,graphic:r,layer:i});if(a){let e=a.getFieldAlias(t.fieldName);return n?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function U(e){let{configurableFieldsContainer:t,fieldInfo:r,isContentFieldInfos:n}=e;if(!r?.fieldName)return null;let i=t.popupTemplate||t.fieldConfigurations?t.getFieldConfiguration(r.fieldName)?.fieldFormat:(0,f.iu)(r,t.getField(r.fieldName));return n&&r.fieldFormat||i}function R(e,t){let r=j(t,e);return r?r.name:e}function M(e,t){return e&&e.map(e=>R(e,t))}function j(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function S(e){return`${e}`.trim()}function D({attributes:e,globalAttributes:t,layer:r,text:n,expressionAttributes:i,fieldInfoMap:l}){return n?$({formattedAttributes:t,template:O(n,{...t,...i,...e},r),fieldInfoMap:l}):""}function $({formattedAttributes:e,template:t,fieldInfoMap:r}){return S(function(e){return e.replaceAll(m,"")}((0,i.HC)((0,i.HC)(t,e=>function(e,t){return`{${t.get(e.toLowerCase())?.fieldName||e}}`}(e,r)),e)))}function z(e,t){return e.replaceAll(g,(e,r,n)=>{let i=j(t,n);return i?`{${i.name}}`:r})}function O(e,t,r){let n=z(e,r);return n&&n.replaceAll(T,(e,r,n)=>function(e,t,r){let n=(t=S(t))&&!t.startsWith("{");return(0,i.HC)(e,function(e,t=!1){let r={...e};return Object.keys(r).forEach(e=>function(e,t,r=!1){let n=t[e];"string"==typeof n&&(t[e]=(r?encodeURIComponent(n):n).replaceAll(h,"%27"))}(e,r,t)),r}(r,n||!1))}(e,r||n,t))}function H(e){return"object"==typeof e&&!!e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-group"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function J(e){return"object"==typeof e&&!!e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function G(e){return H(e)&&J(e)}function Q(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function Y(e){return!(!e||"object"!=typeof e)&&G(function(e){let t=(r=e.origin)&&"layer"in r?r.layer:void 0;var r;return(0,l.F2)(t)?t=t.findSublayerForFeature(e):((0,l.Qz)(t)||(0,l.cM)(t))&&(0,l.UC)(e.sourceLayer)&&(t=e.sourceLayer),t??e.sourceLayer??e.layer}(e))}function P(e,t){let{fieldInfos:r,fieldName:n,graphic:i,isContentFieldInfos:l,layer:a,preventPlacesFormatting:u,timeZone:f}=t,p=_(r,n),y=A({fieldInfo:p,graphic:i,layer:a}),c=j(y||a,n),m=y?null:p?.format,g=y?U({configurableFieldsContainer:y,fieldInfo:p,isContentFieldInfos:l}):null,h="number"===g?.type;if(p&&!(0,s.JL)(n)){let t=c?.type,r="date-time"===g?.type,n=m?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||r||n)return(0,d.i0)(e,{format:r?void 0:n,fieldFormat:r?g:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:f,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a)||!a.datesInUnknownTimezone)}})}if("string"==typeof e&&(0,s.JL)(n)&&m)return function(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?V(e,",",", ",t):e.includes(";")?V(e,";","; ",t):e.includes(" ")?V(e," "," ",t):(0,o.ZV)(Number(e),(0,o.yx)(t))}(e,m);if(e=function(e,t){let r="number"===t?.fieldFormat?.type||t?.format&&null==t.format.dateFormat&&(null!=t.format.places||null!=t.format.digitSeparator);if("string"==typeof e&&r){let t=Number(e);if(!isNaN(t))return t}return e}(e,{format:h?void 0:m,fieldFormat:h?g:void 0}),"string"==typeof e||null==e||null==m&&null==g)return ee(e);let b=h?(0,o.Up)(g):m?(0,o.yx)(m):void 0;return u?(0,o.ZV)(e,{...b,minimumFractionDigits:0,maximumFractionDigits:20}):(0,o.ZV)(e,b)}function V(e,t,r,n){return e.trim().split(t).map(e=>(0,o.ZV)(Number(e),(0,o.yx)(n))).join(r)}function _(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function W(e,t,r,n){let{creatorField:i,creationDateField:l,editorField:o,editDateField:u}=e;if(!t)return;let f=(0,y.hv)(n&&"preferredTimeZone"in n?n.preferredTimeZone:null,!(!n||!("datesInUnknownTimezone"in n)||!n.datesInUnknownTimezone),r,N,"date"),s={...N,...f},d=t[u];if("number"==typeof d){let e=t[o];return{type:"edit",date:(0,a.Yq)(d,s),user:e}}let p=t[l];if("number"==typeof p){let e=t[i];return{type:"create",date:(0,a.Yq)(p,s),user:e}}return null}function B(e,t){let r=new Map;if(!e)return r;for(let n of e){if(!n.fieldName)continue;let e=R(n.fieldName,t);n.fieldName=e,r.set(e.toLowerCase(),n)}return r}function K(e){let t=[];if(!e)return t;let{fieldInfos:r,content:n}=e;return r&&t.push(...r),!n||!Array.isArray(n)||n.forEach(e=>{if("fields"===e.type){let r=e?.fieldInfos;r&&t.push(...r)}}),t}function X(e){return e.replaceAll(F,e=>`&#${e.charCodeAt(0)};`)}function ee(e){return"string"==typeof e?e.replaceAll(I,'<br class="esri-text-new-line" />'):e}function te(e){let{fieldInfoMap:t,fieldInfos:r,fieldName:n,graphic:i,isContentFieldInfos:l,layer:a,timeZone:o,value:f}=e;if(null==f)return"";let p=function({fieldName:e,value:t,graphic:r,layer:n}){if(le(e)||!n||"function"!=typeof n.getFieldDomain)return null;let i=r&&n.getFieldDomain(e,{feature:r});return i&&"coded-value"===i.type?i.getName(t):null}({fieldName:n,value:f,graphic:i,layer:a});if(p)return p;let y=a?.types&&(0,u.uU)(a.types)?function({fieldName:e,graphic:t,layer:r}){if(le(e)||!r||"function"!=typeof r.getFeatureType)return null;let{typeIdField:n}=r;if(!n||e!==n)return null;let i=r.getFeatureType(t);return i?i.name:null}({fieldName:n,graphic:i,layer:a}):null;if(y)return y;if(t.get(n.toLowerCase()))return P(f,{fieldInfos:r||Array.from(t.values()),fieldName:n,graphic:i,isContentFieldInfos:l,layer:a,timeZone:o});let c=a?.fieldsIndex?.get(n);return c&&((0,d.fs)(c)||(0,s.OH)(c))?(0,d.i0)(f,{fieldType:c.type,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:o,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a)||!a.datesInUnknownTimezone)}}):ee(f)}function re({attributes:e,fieldInfoMap:t,fieldInfos:r,graphic:n,isContentFieldInfos:i,layer:l,relatedInfos:a,timeZone:o}){let u={};return a?.forEach(e=>function({attributes:e,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:l}){e&&t&&(t.relatedFeatures?.forEach(a=>ae({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:l})),t.relatedStatsFeatures?.forEach(a=>ae({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:l})))}({attributes:u,relatedInfo:e,fieldInfoMap:t,fieldInfos:r,layer:l,timeZone:o})),e&&Object.keys(e).forEach(a=>{let f=e[a];u[a]=te({fieldInfoMap:t,fieldInfos:r,fieldName:a,graphic:n,isContentFieldInfos:i,layer:l,timeZone:o,value:f})}),u}async function ne(e,t){let{layer:r,graphic:n,outFields:i,objectIds:a,returnGeometry:o,spatialReference:u}=e,f=a[0];if("number"!=typeof f&&"string"!=typeof f){let e={layer:r,graphic:n,objectId:f,requiredFields:i};return c().warn("Could not query required fields for the specified feature. The feature's ID is invalid.",e),null}if(!(0,l.BR)(r)?.operations?.supportsQuery){let e={layer:r,graphic:n,requiredFields:i,returnGeometry:o};return c().warn("The specified layer cannot be queried. The following fields will not be available.",e),null}let s=r.createQuery();return s.objectIds=a,s.outFields=i?.length?i:[r.objectIdField],s.returnGeometry=!!o,s.returnZ=!!o,s.returnM=!!o,s.outSpatialReference=u,(await r.queryFeatures(s,t)).features[0]}async function ie({graphic:e,popupTemplate:t,layer:r,spatialReference:n},i){if(!r||!t||("function"==typeof r.load&&await r.load(i),!e.attributes))return;let l=r.objectIdField,a=e.attributes[l];if(null==a)return;let o=[a],u=new Set(await t.getRequiredFields(r.fieldsIndex));null!=r.timeInfo?.trackIdField&&!u.has(r.timeInfo.trackIdField)&&await async function(e){if(!e.expressionInfos?.length)return!1;let{arcadeUtils:{requiresTrack:t}}=await(0,p.l)();return t(e)}(t)&&u.add(r.timeInfo.trackIdField);let f=(0,s.Kl)(e,u),d=f?[]:u.has(l)?[...u]:[...u,l],y=t.returnGeometry||await async function(e){if(!e.expressionInfos?.length)return!1;let{arcadeUtils:{hasGeometryFunctions:t}}=await(0,p.l)();return t(e)}(t);if(f&&!y)return;let c=await ne({layer:r,graphic:e,outFields:d,objectIds:o,returnGeometry:y,spatialReference:n},i);c&&(c.geometry&&(e.geometry=c.geometry),c.attributes&&(e.attributes={...e.attributes,...c.attributes}))}function le(e=""){return!!e&&e.includes(C)}function ae({attributes:e,graphic:t,relatedInfo:r,fieldInfos:n,fieldInfoMap:i,layer:l,timeZone:a}){e&&t&&r&&Object.keys(t.attributes).forEach(o=>{let u=function(e){return e?`${C}${e.layerId}/${e.fieldName}`:""}({layerId:r.relation.id.toString(),fieldName:o}),f=t.attributes[o];e[u]=te({fieldName:u,fieldInfos:n,fieldInfoMap:i,layer:l,value:f,graphic:t,timeZone:a})})}const oe=e=>{if(!e)return!1;let t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},ue=({layer:e,method:t,query:r,definitionExpression:n})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;let i=null==r.where?null:r.where,l=null==r.geometry?null:r.geometry;e.capabilities.query.supportsCacheHint&&!oe(n)&&!oe(i)&&"extent"!==l?.type&&"tile"!==r.resultType&&(r.cacheHint=!0)},fe=({query:e,layer:t,method:r})=>{ue({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},se=({queryPayload:e,layer:t,method:r})=>{ue({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function de(e,t,r){return e&&t&&r?"sublayer"===t.type?ce({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:r})||ce({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:r}):ce({layers:e.allLayers,map:e,relatedLayer:t,relationship:r})||ce({layers:e.allTables,map:e,relatedLayer:t,relationship:r}):null}function pe(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find(e=>e.isUtilityLayer(t)):null}function ye(e,t){return e?.allTables.find(e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url)}function ce({map:e,relationship:t,relationship:{relatedTableId:r},relatedLayer:n,layers:i}){if(!i)return null;for(let l of i){if("map-image"===l.type){let r=ce({layers:l.sublayers,map:e,relatedLayer:n,relationship:t})||ce({layers:l.subtables,map:e,relatedLayer:n,relationship:t});if(r)return r;continue}if(!G(l))continue;if("sublayer"===n.type){if(l!==n&&l.id===r)return l.isTable?ye(e,l):l;continue}let i="scene"===n.type&&n.associatedLayer?n.associatedLayer.url:n.url;if(!i)return null;if("sublayer"!==l.type){if(l!==n&&l.url===i&&l.layerId===r)return l}else if(l!==n&&l.layer?.url===i&&l.id===r)return l.isTable?ye(e,l):l}return null}},4560(e,t,r){r.d(t,{i0:()=>f,j4:()=>u,fs:()=>o});var n=r(97770),i=r(30524);r(7762),r(84952),r(27865),r(43281),r(98623);var l=r(56400);let a;function o(e){return(0,i.vE)(e)||(0,i.zD)(e)||(0,i.Ah)(e)}async function u(e,t){return e?(a||=new(await Promise.all([r.e(9696),r.e(2867)]).then(()=>r(44123)).then(e=>e.WhereClauseCache))(50,500),a.get(e,t)):null}function f(e,t){let r,i,{format:a,fieldFormat:o,timeZoneOptions:u,fieldType:f}=t??{},s=o?(0,n._m)(o):null;if(u&&({timeZone:r,timeZoneName:i}=(0,l.hv)(u.layerTimeZone,u.datesInUnknownTimezone,u.viewTimeZone,s||(0,n.J2)(a||"short-date-short-time"),f)),"string"==typeof e&&isNaN(Date.parse("time-only"===f?`1970-01-01T${e}Z`:e)))return e;switch(f){case"date-only":{let t=s||(0,n.J2)(a||"short-date");return"string"==typeof e?(0,n.iS)(e,{...t}):(0,n.Yq)(e,{...t,timeZone:"UTC"})}case"time-only":{let t=s||(0,n.J2)(a||"short-time");return"string"==typeof e?(0,n.F8)(e,t):(0,n.Yq)(e,{...t,timeZone:"UTC"})}case"timestamp-offset":{let t=a||s||u?s||(0,n.J2)(a||"short-date-short-time"):void 0,l=t?{...t,timeZone:r,timeZoneName:i}:void 0;return"string"==typeof e?(0,n.Ey)(e,l):(0,n.Yq)(e,l)}default:{let t=a||s||u?s||(0,n.J2)(a||"short-date-short-time"):void 0;return(0,n.Yq)("string"==typeof e?new Date(e):e,t?{...t,timeZone:r,timeZoneName:i}:void 0)}}}new Set(["integer","small-integer"])}}]);
@@ -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)}}}}]);