@toon-protocol/connector 1.7.1

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 (458) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +421 -0
  3. package/dist/btp/btp-claim-types.d.ts +30 -0
  4. package/dist/btp/btp-claim-types.d.ts.map +1 -0
  5. package/dist/btp/btp-claim-types.js +103 -0
  6. package/dist/btp/btp-claim-types.js.map +1 -0
  7. package/dist/btp/btp-client-manager.d.ts +27 -0
  8. package/dist/btp/btp-client-manager.d.ts.map +1 -0
  9. package/dist/btp/btp-client-manager.js +138 -0
  10. package/dist/btp/btp-client-manager.js.map +1 -0
  11. package/dist/btp/btp-client.d.ts +55 -0
  12. package/dist/btp/btp-client.d.ts.map +1 -0
  13. package/dist/btp/btp-client.js +474 -0
  14. package/dist/btp/btp-client.js.map +1 -0
  15. package/dist/btp/btp-message-parser.d.ts +4 -0
  16. package/dist/btp/btp-message-parser.d.ts.map +1 -0
  17. package/dist/btp/btp-message-parser.js +211 -0
  18. package/dist/btp/btp-message-parser.js.map +1 -0
  19. package/dist/btp/btp-server.d.ts +30 -0
  20. package/dist/btp/btp-server.d.ts.map +1 -0
  21. package/dist/btp/btp-server.js +458 -0
  22. package/dist/btp/btp-server.js.map +1 -0
  23. package/dist/btp/btp-types.d.ts +43 -0
  24. package/dist/btp/btp-types.d.ts.map +1 -0
  25. package/dist/btp/btp-types.js +44 -0
  26. package/dist/btp/btp-types.js.map +1 -0
  27. package/dist/cli/index.d.ts +3 -0
  28. package/dist/cli/index.d.ts.map +1 -0
  29. package/dist/cli/index.js +175 -0
  30. package/dist/cli/index.js.map +1 -0
  31. package/dist/cli/onboarding-wizard.d.ts +7 -0
  32. package/dist/cli/onboarding-wizard.d.ts.map +1 -0
  33. package/dist/cli/onboarding-wizard.js +257 -0
  34. package/dist/cli/onboarding-wizard.js.map +1 -0
  35. package/dist/cli/types.d.ts +38 -0
  36. package/dist/cli/types.d.ts.map +1 -0
  37. package/dist/cli/types.js +3 -0
  38. package/dist/cli/types.js.map +1 -0
  39. package/dist/config/aptos-env-validator.d.ts +8 -0
  40. package/dist/config/aptos-env-validator.d.ts.map +1 -0
  41. package/dist/config/aptos-env-validator.js +25 -0
  42. package/dist/config/aptos-env-validator.js.map +1 -0
  43. package/dist/config/config-loader.d.ts +20 -0
  44. package/dist/config/config-loader.d.ts.map +1 -0
  45. package/dist/config/config-loader.js +269 -0
  46. package/dist/config/config-loader.js.map +1 -0
  47. package/dist/config/environment-validator.d.ts +4 -0
  48. package/dist/config/environment-validator.d.ts.map +1 -0
  49. package/dist/config/environment-validator.js +239 -0
  50. package/dist/config/environment-validator.js.map +1 -0
  51. package/dist/config/index.d.ts +2 -0
  52. package/dist/config/index.d.ts.map +1 -0
  53. package/dist/config/index.js +7 -0
  54. package/dist/config/index.js.map +1 -0
  55. package/dist/config/key-manager-config.d.ts +7 -0
  56. package/dist/config/key-manager-config.d.ts.map +1 -0
  57. package/dist/config/key-manager-config.js +209 -0
  58. package/dist/config/key-manager-config.js.map +1 -0
  59. package/dist/config/topology-validator.d.ts +14 -0
  60. package/dist/config/topology-validator.d.ts.map +1 -0
  61. package/dist/config/topology-validator.js +142 -0
  62. package/dist/config/topology-validator.js.map +1 -0
  63. package/dist/config/types.d.ts +210 -0
  64. package/dist/config/types.d.ts.map +1 -0
  65. package/dist/config/types.js +10 -0
  66. package/dist/config/types.js.map +1 -0
  67. package/dist/core/connector-node.d.ts +79 -0
  68. package/dist/core/connector-node.d.ts.map +1 -0
  69. package/dist/core/connector-node.js +1036 -0
  70. package/dist/core/connector-node.js.map +1 -0
  71. package/dist/core/local-delivery-client.d.ts +16 -0
  72. package/dist/core/local-delivery-client.d.ts.map +1 -0
  73. package/dist/core/local-delivery-client.js +176 -0
  74. package/dist/core/local-delivery-client.js.map +1 -0
  75. package/dist/core/packet-handler.d.ts +45 -0
  76. package/dist/core/packet-handler.d.ts.map +1 -0
  77. package/dist/core/packet-handler.js +606 -0
  78. package/dist/core/packet-handler.js.map +1 -0
  79. package/dist/core/payment-handler.d.ts +27 -0
  80. package/dist/core/payment-handler.d.ts.map +1 -0
  81. package/dist/core/payment-handler.js +115 -0
  82. package/dist/core/payment-handler.js.map +1 -0
  83. package/dist/discovery/index.d.ts +3 -0
  84. package/dist/discovery/index.d.ts.map +1 -0
  85. package/dist/discovery/index.js +6 -0
  86. package/dist/discovery/index.js.map +1 -0
  87. package/dist/discovery/peer-discovery-service.d.ts +29 -0
  88. package/dist/discovery/peer-discovery-service.d.ts.map +1 -0
  89. package/dist/discovery/peer-discovery-service.js +230 -0
  90. package/dist/discovery/peer-discovery-service.js.map +1 -0
  91. package/dist/discovery/types.d.ts +38 -0
  92. package/dist/discovery/types.d.ts.map +1 -0
  93. package/dist/discovery/types.js +3 -0
  94. package/dist/discovery/types.js.map +1 -0
  95. package/dist/encoding/oer-parser.d.ts +39 -0
  96. package/dist/encoding/oer-parser.d.ts.map +1 -0
  97. package/dist/encoding/oer-parser.js +154 -0
  98. package/dist/encoding/oer-parser.js.map +1 -0
  99. package/dist/explorer-ui/assets/EventDetailPanel-CnSaMk3V.js +6 -0
  100. package/dist/explorer-ui/assets/FilterBar-BEmAzBku.js +26 -0
  101. package/dist/explorer-ui/assets/chevron-right-BUT9VhYe.js +11 -0
  102. package/dist/explorer-ui/assets/index-BZ2INVgy.js +360 -0
  103. package/dist/explorer-ui/assets/index-Cemh6svI.css +1 -0
  104. package/dist/explorer-ui/index.html +14 -0
  105. package/dist/explorer-ui/vite.svg +1 -0
  106. package/dist/facilitator/index.d.ts +2 -0
  107. package/dist/facilitator/index.d.ts.map +1 -0
  108. package/dist/facilitator/index.js +7 -0
  109. package/dist/facilitator/index.js.map +1 -0
  110. package/dist/facilitator/spsp-client.d.ts +18 -0
  111. package/dist/facilitator/spsp-client.d.ts.map +1 -0
  112. package/dist/facilitator/spsp-client.js +95 -0
  113. package/dist/facilitator/spsp-client.js.map +1 -0
  114. package/dist/http/admin-api.d.ts +123 -0
  115. package/dist/http/admin-api.d.ts.map +1 -0
  116. package/dist/http/admin-api.js +1057 -0
  117. package/dist/http/admin-api.js.map +1 -0
  118. package/dist/http/admin-server.d.ts +41 -0
  119. package/dist/http/admin-server.d.ts.map +1 -0
  120. package/dist/http/admin-server.js +156 -0
  121. package/dist/http/admin-server.js.map +1 -0
  122. package/dist/http/health-server.d.ts +22 -0
  123. package/dist/http/health-server.d.ts.map +1 -0
  124. package/dist/http/health-server.js +192 -0
  125. package/dist/http/health-server.js.map +1 -0
  126. package/dist/http/ilp-send-handler.d.ts +19 -0
  127. package/dist/http/ilp-send-handler.d.ts.map +1 -0
  128. package/dist/http/ilp-send-handler.js +162 -0
  129. package/dist/http/ilp-send-handler.js.map +1 -0
  130. package/dist/http/types.d.ts +39 -0
  131. package/dist/http/types.d.ts.map +1 -0
  132. package/dist/http/types.js +3 -0
  133. package/dist/http/types.js.map +1 -0
  134. package/dist/index.d.ts +2 -0
  135. package/dist/index.d.ts.map +1 -0
  136. package/dist/index.js +5 -0
  137. package/dist/index.js.map +1 -0
  138. package/dist/lib.d.ts +22 -0
  139. package/dist/lib.d.ts.map +1 -0
  140. package/dist/lib.js +41 -0
  141. package/dist/lib.js.map +1 -0
  142. package/dist/main.d.ts +4 -0
  143. package/dist/main.d.ts.map +1 -0
  144. package/dist/main.js +79 -0
  145. package/dist/main.js.map +1 -0
  146. package/dist/routing/packet-processor.d.ts +36 -0
  147. package/dist/routing/packet-processor.d.ts.map +1 -0
  148. package/dist/routing/packet-processor.js +112 -0
  149. package/dist/routing/packet-processor.js.map +1 -0
  150. package/dist/routing/packet-worker.d.ts +10 -0
  151. package/dist/routing/packet-worker.d.ts.map +1 -0
  152. package/dist/routing/packet-worker.js +34 -0
  153. package/dist/routing/packet-worker.js.map +1 -0
  154. package/dist/routing/routing-table.d.ts +15 -0
  155. package/dist/routing/routing-table.d.ts.map +1 -0
  156. package/dist/routing/routing-table.js +63 -0
  157. package/dist/routing/routing-table.js.map +1 -0
  158. package/dist/routing/worker-pool.d.ts +43 -0
  159. package/dist/routing/worker-pool.d.ts.map +1 -0
  160. package/dist/routing/worker-pool.js +228 -0
  161. package/dist/routing/worker-pool.js.map +1 -0
  162. package/dist/security/alert-notifier.d.ts +34 -0
  163. package/dist/security/alert-notifier.d.ts.map +1 -0
  164. package/dist/security/alert-notifier.js +136 -0
  165. package/dist/security/alert-notifier.js.map +1 -0
  166. package/dist/security/audit-logger.d.ts +34 -0
  167. package/dist/security/audit-logger.d.ts.map +1 -0
  168. package/dist/security/audit-logger.js +132 -0
  169. package/dist/security/audit-logger.js.map +1 -0
  170. package/dist/security/backends/aws-kms-backend.d.ts +18 -0
  171. package/dist/security/backends/aws-kms-backend.d.ts.map +1 -0
  172. package/dist/security/backends/aws-kms-backend.js +130 -0
  173. package/dist/security/backends/aws-kms-backend.js.map +1 -0
  174. package/dist/security/backends/azure-kv-backend.d.ts +17 -0
  175. package/dist/security/backends/azure-kv-backend.d.ts.map +1 -0
  176. package/dist/security/backends/azure-kv-backend.js +121 -0
  177. package/dist/security/backends/azure-kv-backend.js.map +1 -0
  178. package/dist/security/backends/environment-backend.d.ts +15 -0
  179. package/dist/security/backends/environment-backend.d.ts.map +1 -0
  180. package/dist/security/backends/environment-backend.js +56 -0
  181. package/dist/security/backends/environment-backend.js.map +1 -0
  182. package/dist/security/backends/gcp-kms-backend.d.ts +17 -0
  183. package/dist/security/backends/gcp-kms-backend.d.ts.map +1 -0
  184. package/dist/security/backends/gcp-kms-backend.js +110 -0
  185. package/dist/security/backends/gcp-kms-backend.js.map +1 -0
  186. package/dist/security/backends/hsm-backend.d.ts +18 -0
  187. package/dist/security/backends/hsm-backend.d.ts.map +1 -0
  188. package/dist/security/backends/hsm-backend.js +187 -0
  189. package/dist/security/backends/hsm-backend.js.map +1 -0
  190. package/dist/security/fraud-detector.d.ts +79 -0
  191. package/dist/security/fraud-detector.d.ts.map +1 -0
  192. package/dist/security/fraud-detector.js +147 -0
  193. package/dist/security/fraud-detector.js.map +1 -0
  194. package/dist/security/key-manager-signer.d.ts +15 -0
  195. package/dist/security/key-manager-signer.d.ts.map +1 -0
  196. package/dist/security/key-manager-signer.js +91 -0
  197. package/dist/security/key-manager-signer.js.map +1 -0
  198. package/dist/security/key-manager.d.ts +69 -0
  199. package/dist/security/key-manager.d.ts.map +1 -0
  200. package/dist/security/key-manager.js +79 -0
  201. package/dist/security/key-manager.js.map +1 -0
  202. package/dist/security/key-rotation-manager.d.ts +27 -0
  203. package/dist/security/key-rotation-manager.d.ts.map +1 -0
  204. package/dist/security/key-rotation-manager.js +142 -0
  205. package/dist/security/key-rotation-manager.js.map +1 -0
  206. package/dist/security/rate-limit-config.d.ts +7 -0
  207. package/dist/security/rate-limit-config.d.ts.map +1 -0
  208. package/dist/security/rate-limit-config.js +57 -0
  209. package/dist/security/rate-limit-config.js.map +1 -0
  210. package/dist/security/rate-limiter.d.ts +46 -0
  211. package/dist/security/rate-limiter.d.ts.map +1 -0
  212. package/dist/security/rate-limiter.js +170 -0
  213. package/dist/security/rate-limiter.js.map +1 -0
  214. package/dist/security/reputation-tracker.d.ts +30 -0
  215. package/dist/security/reputation-tracker.d.ts.map +1 -0
  216. package/dist/security/reputation-tracker.js +111 -0
  217. package/dist/security/reputation-tracker.js.map +1 -0
  218. package/dist/security/rules/balance-manipulation-rule.d.ts +23 -0
  219. package/dist/security/rules/balance-manipulation-rule.d.ts.map +1 -0
  220. package/dist/security/rules/balance-manipulation-rule.js +70 -0
  221. package/dist/security/rules/balance-manipulation-rule.js.map +1 -0
  222. package/dist/security/rules/double-spend-detection-rule.d.ts +23 -0
  223. package/dist/security/rules/double-spend-detection-rule.d.ts.map +1 -0
  224. package/dist/security/rules/double-spend-detection-rule.js +61 -0
  225. package/dist/security/rules/double-spend-detection-rule.js.map +1 -0
  226. package/dist/security/rules/rapid-channel-closure-rule.d.ts +16 -0
  227. package/dist/security/rules/rapid-channel-closure-rule.d.ts.map +1 -0
  228. package/dist/security/rules/rapid-channel-closure-rule.js +57 -0
  229. package/dist/security/rules/rapid-channel-closure-rule.js.map +1 -0
  230. package/dist/security/rules/sudden-traffic-spike-rule.d.ts +18 -0
  231. package/dist/security/rules/sudden-traffic-spike-rule.d.ts.map +1 -0
  232. package/dist/security/rules/sudden-traffic-spike-rule.js +92 -0
  233. package/dist/security/rules/sudden-traffic-spike-rule.js.map +1 -0
  234. package/dist/security/rules/unusual-settlement-amount-rule.d.ts +12 -0
  235. package/dist/security/rules/unusual-settlement-amount-rule.d.ts.map +1 -0
  236. package/dist/security/rules/unusual-settlement-amount-rule.js +33 -0
  237. package/dist/security/rules/unusual-settlement-amount-rule.js.map +1 -0
  238. package/dist/security/token-bucket.d.ts +16 -0
  239. package/dist/security/token-bucket.d.ts.map +1 -0
  240. package/dist/security/token-bucket.js +49 -0
  241. package/dist/security/token-bucket.js.map +1 -0
  242. package/dist/security/violation-counter.d.ts +11 -0
  243. package/dist/security/violation-counter.d.ts.map +1 -0
  244. package/dist/security/violation-counter.js +61 -0
  245. package/dist/security/violation-counter.js.map +1 -0
  246. package/dist/settlement/account-id-generator.d.ts +4 -0
  247. package/dist/settlement/account-id-generator.d.ts.map +1 -0
  248. package/dist/settlement/account-id-generator.js +38 -0
  249. package/dist/settlement/account-id-generator.js.map +1 -0
  250. package/dist/settlement/account-manager.d.ts +47 -0
  251. package/dist/settlement/account-manager.d.ts.map +1 -0
  252. package/dist/settlement/account-manager.js +447 -0
  253. package/dist/settlement/account-manager.js.map +1 -0
  254. package/dist/settlement/account-metadata.d.ts +11 -0
  255. package/dist/settlement/account-metadata.d.ts.map +1 -0
  256. package/dist/settlement/account-metadata.js +40 -0
  257. package/dist/settlement/account-metadata.js.map +1 -0
  258. package/dist/settlement/aptos-channel-sdk.d.ts +66 -0
  259. package/dist/settlement/aptos-channel-sdk.d.ts.map +1 -0
  260. package/dist/settlement/aptos-channel-sdk.js +274 -0
  261. package/dist/settlement/aptos-channel-sdk.js.map +1 -0
  262. package/dist/settlement/aptos-claim-signer.d.ts +57 -0
  263. package/dist/settlement/aptos-claim-signer.d.ts.map +1 -0
  264. package/dist/settlement/aptos-claim-signer.js +200 -0
  265. package/dist/settlement/aptos-claim-signer.js.map +1 -0
  266. package/dist/settlement/aptos-client.d.ts +99 -0
  267. package/dist/settlement/aptos-client.d.ts.map +1 -0
  268. package/dist/settlement/aptos-client.js +474 -0
  269. package/dist/settlement/aptos-client.js.map +1 -0
  270. package/dist/settlement/channel-manager.d.ts +66 -0
  271. package/dist/settlement/channel-manager.d.ts.map +1 -0
  272. package/dist/settlement/channel-manager.js +214 -0
  273. package/dist/settlement/channel-manager.js.map +1 -0
  274. package/dist/settlement/claim-receiver-db-schema.d.ts +4 -0
  275. package/dist/settlement/claim-receiver-db-schema.d.ts.map +1 -0
  276. package/dist/settlement/claim-receiver-db-schema.js +25 -0
  277. package/dist/settlement/claim-receiver-db-schema.js.map +1 -0
  278. package/dist/settlement/claim-receiver.d.ts +31 -0
  279. package/dist/settlement/claim-receiver.d.ts.map +1 -0
  280. package/dist/settlement/claim-receiver.js +228 -0
  281. package/dist/settlement/claim-receiver.js.map +1 -0
  282. package/dist/settlement/claim-redemption-service.d.ts +39 -0
  283. package/dist/settlement/claim-redemption-service.d.ts.map +1 -0
  284. package/dist/settlement/claim-redemption-service.js +189 -0
  285. package/dist/settlement/claim-redemption-service.js.map +1 -0
  286. package/dist/settlement/claim-sender-db-schema.d.ts +3 -0
  287. package/dist/settlement/claim-sender-db-schema.d.ts.map +1 -0
  288. package/dist/settlement/claim-sender-db-schema.js +18 -0
  289. package/dist/settlement/claim-sender-db-schema.js.map +1 -0
  290. package/dist/settlement/claim-sender.d.ts +22 -0
  291. package/dist/settlement/claim-sender.d.ts.map +1 -0
  292. package/dist/settlement/claim-sender.js +108 -0
  293. package/dist/settlement/claim-sender.js.map +1 -0
  294. package/dist/settlement/eip712-helper.d.ts +13 -0
  295. package/dist/settlement/eip712-helper.d.ts.map +1 -0
  296. package/dist/settlement/eip712-helper.js +24 -0
  297. package/dist/settlement/eip712-helper.js.map +1 -0
  298. package/dist/settlement/in-memory-ledger-client.d.ts +40 -0
  299. package/dist/settlement/in-memory-ledger-client.d.ts.map +1 -0
  300. package/dist/settlement/in-memory-ledger-client.js +177 -0
  301. package/dist/settlement/in-memory-ledger-client.js.map +1 -0
  302. package/dist/settlement/ledger-client.d.ts +22 -0
  303. package/dist/settlement/ledger-client.d.ts.map +1 -0
  304. package/dist/settlement/ledger-client.js +3 -0
  305. package/dist/settlement/ledger-client.js.map +1 -0
  306. package/dist/settlement/metrics-collector.d.ts +29 -0
  307. package/dist/settlement/metrics-collector.d.ts.map +1 -0
  308. package/dist/settlement/metrics-collector.js +81 -0
  309. package/dist/settlement/metrics-collector.js.map +1 -0
  310. package/dist/settlement/payment-channel-sdk.d.ts +59 -0
  311. package/dist/settlement/payment-channel-sdk.d.ts.map +1 -0
  312. package/dist/settlement/payment-channel-sdk.js +677 -0
  313. package/dist/settlement/payment-channel-sdk.js.map +1 -0
  314. package/dist/settlement/per-packet-claim-service.d.ts +33 -0
  315. package/dist/settlement/per-packet-claim-service.d.ts.map +1 -0
  316. package/dist/settlement/per-packet-claim-service.js +177 -0
  317. package/dist/settlement/per-packet-claim-service.js.map +1 -0
  318. package/dist/settlement/settlement-api.d.ts +37 -0
  319. package/dist/settlement/settlement-api.d.ts.map +1 -0
  320. package/dist/settlement/settlement-api.js +172 -0
  321. package/dist/settlement/settlement-api.js.map +1 -0
  322. package/dist/settlement/settlement-coordinator.d.ts +47 -0
  323. package/dist/settlement/settlement-coordinator.d.ts.map +1 -0
  324. package/dist/settlement/settlement-coordinator.js +166 -0
  325. package/dist/settlement/settlement-coordinator.js.map +1 -0
  326. package/dist/settlement/settlement-executor.d.ts +44 -0
  327. package/dist/settlement/settlement-executor.d.ts.map +1 -0
  328. package/dist/settlement/settlement-executor.js +247 -0
  329. package/dist/settlement/settlement-executor.js.map +1 -0
  330. package/dist/settlement/settlement-monitor.d.ts +29 -0
  331. package/dist/settlement/settlement-monitor.d.ts.map +1 -0
  332. package/dist/settlement/settlement-monitor.js +172 -0
  333. package/dist/settlement/settlement-monitor.js.map +1 -0
  334. package/dist/settlement/tigerbeetle-batch-writer.d.ts +58 -0
  335. package/dist/settlement/tigerbeetle-batch-writer.d.ts.map +1 -0
  336. package/dist/settlement/tigerbeetle-batch-writer.js +162 -0
  337. package/dist/settlement/tigerbeetle-batch-writer.js.map +1 -0
  338. package/dist/settlement/tigerbeetle-client.d.ts +40 -0
  339. package/dist/settlement/tigerbeetle-client.d.ts.map +1 -0
  340. package/dist/settlement/tigerbeetle-client.js +279 -0
  341. package/dist/settlement/tigerbeetle-client.js.map +1 -0
  342. package/dist/settlement/tigerbeetle-errors.d.ts +23 -0
  343. package/dist/settlement/tigerbeetle-errors.d.ts.map +1 -0
  344. package/dist/settlement/tigerbeetle-errors.js +58 -0
  345. package/dist/settlement/tigerbeetle-errors.js.map +1 -0
  346. package/dist/settlement/types.d.ts +64 -0
  347. package/dist/settlement/types.d.ts.map +1 -0
  348. package/dist/settlement/types.js +42 -0
  349. package/dist/settlement/types.js.map +1 -0
  350. package/dist/settlement/unified-settlement-executor.d.ts +34 -0
  351. package/dist/settlement/unified-settlement-executor.d.ts.map +1 -0
  352. package/dist/settlement/unified-settlement-executor.js +145 -0
  353. package/dist/settlement/unified-settlement-executor.js.map +1 -0
  354. package/dist/settlement/xrp-channel-lifecycle.d.ts +41 -0
  355. package/dist/settlement/xrp-channel-lifecycle.d.ts.map +1 -0
  356. package/dist/settlement/xrp-channel-lifecycle.js +142 -0
  357. package/dist/settlement/xrp-channel-lifecycle.js.map +1 -0
  358. package/dist/settlement/xrp-channel-manager.d.ts +59 -0
  359. package/dist/settlement/xrp-channel-manager.d.ts.map +1 -0
  360. package/dist/settlement/xrp-channel-manager.js +160 -0
  361. package/dist/settlement/xrp-channel-manager.js.map +1 -0
  362. package/dist/settlement/xrp-channel-sdk.d.ts +30 -0
  363. package/dist/settlement/xrp-channel-sdk.d.ts.map +1 -0
  364. package/dist/settlement/xrp-channel-sdk.js +164 -0
  365. package/dist/settlement/xrp-channel-sdk.js.map +1 -0
  366. package/dist/settlement/xrp-claim-signer.d.ts +22 -0
  367. package/dist/settlement/xrp-claim-signer.d.ts.map +1 -0
  368. package/dist/settlement/xrp-claim-signer.js +122 -0
  369. package/dist/settlement/xrp-claim-signer.js.map +1 -0
  370. package/dist/settlement/xrpl-client.d.ts +104 -0
  371. package/dist/settlement/xrpl-client.d.ts.map +1 -0
  372. package/dist/settlement/xrpl-client.js +304 -0
  373. package/dist/settlement/xrpl-client.js.map +1 -0
  374. package/dist/test/testnet-config.d.ts +58 -0
  375. package/dist/test/testnet-config.d.ts.map +1 -0
  376. package/dist/test/testnet-config.js +89 -0
  377. package/dist/test/testnet-config.js.map +1 -0
  378. package/dist/test-utils/index.d.ts +3 -0
  379. package/dist/test-utils/index.d.ts.map +1 -0
  380. package/dist/test-utils/index.js +15 -0
  381. package/dist/test-utils/index.js.map +1 -0
  382. package/dist/test-utils/isolated-test-env.d.ts +31 -0
  383. package/dist/test-utils/isolated-test-env.d.ts.map +1 -0
  384. package/dist/test-utils/isolated-test-env.js +127 -0
  385. package/dist/test-utils/isolated-test-env.js.map +1 -0
  386. package/dist/test-utils/mock-factories-patch.d.ts +2 -0
  387. package/dist/test-utils/mock-factories-patch.d.ts.map +1 -0
  388. package/dist/test-utils/mock-factories-patch.js +3 -0
  389. package/dist/test-utils/mock-factories-patch.js.map +1 -0
  390. package/dist/test-utils/mock-factories.d.ts +22 -0
  391. package/dist/test-utils/mock-factories.d.ts.map +1 -0
  392. package/dist/test-utils/mock-factories.js +56 -0
  393. package/dist/test-utils/mock-factories.js.map +1 -0
  394. package/dist/utils/connection-pool.d.ts +42 -0
  395. package/dist/utils/connection-pool.d.ts.map +1 -0
  396. package/dist/utils/connection-pool.js +209 -0
  397. package/dist/utils/connection-pool.js.map +1 -0
  398. package/dist/utils/evm-rpc-connection-pool.d.ts +8 -0
  399. package/dist/utils/evm-rpc-connection-pool.d.ts.map +1 -0
  400. package/dist/utils/evm-rpc-connection-pool.js +40 -0
  401. package/dist/utils/evm-rpc-connection-pool.js.map +1 -0
  402. package/dist/utils/logger.d.ts +6 -0
  403. package/dist/utils/logger.d.ts.map +1 -0
  404. package/dist/utils/logger.js +58 -0
  405. package/dist/utils/logger.js.map +1 -0
  406. package/dist/utils/optional-require.d.ts +2 -0
  407. package/dist/utils/optional-require.d.ts.map +1 -0
  408. package/dist/utils/optional-require.js +54 -0
  409. package/dist/utils/optional-require.js.map +1 -0
  410. package/dist/utils/xrp-wss-connection-pool.d.ts +8 -0
  411. package/dist/utils/xrp-wss-connection-pool.d.ts.map +1 -0
  412. package/dist/utils/xrp-wss-connection-pool.js +42 -0
  413. package/dist/utils/xrp-wss-connection-pool.js.map +1 -0
  414. package/dist/wallet/audit-logger.d.ts +22 -0
  415. package/dist/wallet/audit-logger.d.ts.map +1 -0
  416. package/dist/wallet/audit-logger.js +120 -0
  417. package/dist/wallet/audit-logger.js.map +1 -0
  418. package/dist/wallet/fraud-detector-interface.d.ts +14 -0
  419. package/dist/wallet/fraud-detector-interface.d.ts.map +1 -0
  420. package/dist/wallet/fraud-detector-interface.js +3 -0
  421. package/dist/wallet/fraud-detector-interface.js.map +1 -0
  422. package/dist/wallet/key-manager.d.ts +6 -0
  423. package/dist/wallet/key-manager.d.ts.map +1 -0
  424. package/dist/wallet/key-manager.js +3 -0
  425. package/dist/wallet/key-manager.js.map +1 -0
  426. package/dist/wallet/placeholder-fraud-detector.d.ts +10 -0
  427. package/dist/wallet/placeholder-fraud-detector.d.ts.map +1 -0
  428. package/dist/wallet/placeholder-fraud-detector.js +10 -0
  429. package/dist/wallet/placeholder-fraud-detector.js.map +1 -0
  430. package/dist/wallet/rate-limiter.d.ts +26 -0
  431. package/dist/wallet/rate-limiter.d.ts.map +1 -0
  432. package/dist/wallet/rate-limiter.js +114 -0
  433. package/dist/wallet/rate-limiter.js.map +1 -0
  434. package/dist/wallet/suspicious-activity-detector.d.ts +25 -0
  435. package/dist/wallet/suspicious-activity-detector.d.ts.map +1 -0
  436. package/dist/wallet/suspicious-activity-detector.js +97 -0
  437. package/dist/wallet/suspicious-activity-detector.js.map +1 -0
  438. package/dist/wallet/treasury-wallet.d.ts +20 -0
  439. package/dist/wallet/treasury-wallet.d.ts.map +1 -0
  440. package/dist/wallet/treasury-wallet.js +151 -0
  441. package/dist/wallet/treasury-wallet.js.map +1 -0
  442. package/dist/wallet/wallet-authentication.d.ts +31 -0
  443. package/dist/wallet/wallet-authentication.d.ts.map +1 -0
  444. package/dist/wallet/wallet-authentication.js +102 -0
  445. package/dist/wallet/wallet-authentication.js.map +1 -0
  446. package/dist/wallet/wallet-db-schema.d.ts +11 -0
  447. package/dist/wallet/wallet-db-schema.d.ts.map +1 -0
  448. package/dist/wallet/wallet-db-schema.js +79 -0
  449. package/dist/wallet/wallet-db-schema.js.map +1 -0
  450. package/dist/wallet/wallet-security.d.ts +58 -0
  451. package/dist/wallet/wallet-security.d.ts.map +1 -0
  452. package/dist/wallet/wallet-security.js +148 -0
  453. package/dist/wallet/wallet-security.js.map +1 -0
  454. package/dist/wallet/wallet-seed-manager.d.ts +65 -0
  455. package/dist/wallet/wallet-seed-manager.d.ts.map +1 -0
  456. package/dist/wallet/wallet-seed-manager.js +418 -0
  457. package/dist/wallet/wallet-seed-manager.js.map +1 -0
  458. package/package.json +134 -0
@@ -0,0 +1,360 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilterBar-BEmAzBku.js","assets/chevron-right-BUT9VhYe.js","assets/EventDetailPanel-CnSaMk3V.js"])))=>i.map(i=>d[i]);
2
+ function Vy(t,r){for(var o=0;o<r.length;o++){const i=r[o];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in t)){const c=Object.getOwnPropertyDescriptor(i,l);c&&Object.defineProperty(t,l,c.get?c:{enumerable:!0,get:()=>i[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(l){if(l.ep)return;l.ep=!0;const c=o(l);fetch(l.href,c)}})();function zu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Dc={exports:{}},fs={},$c={exports:{}},Ce={};/**
3
+ * @license React
4
+ * react.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var yh;function Wy(){if(yh)return Ce;yh=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.iterator;function w(P){return P===null||typeof P!="object"?null:(P=x&&P[x]||P["@@iterator"],typeof P=="function"?P:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,b={};function N(P,K,se){this.props=P,this.context=K,this.refs=b,this.updater=se||C}N.prototype.isReactComponent={},N.prototype.setState=function(P,K){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,K,"setState")},N.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function S(){}S.prototype=N.prototype;function A(P,K,se){this.props=P,this.context=K,this.refs=b,this.updater=se||C}var _=A.prototype=new S;_.constructor=A,k(_,N.prototype),_.isPureReactComponent=!0;var I=Array.isArray,O=Object.prototype.hasOwnProperty,U={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function D(P,K,se){var le,ge={},ve=null,pe=null;if(K!=null)for(le in K.ref!==void 0&&(pe=K.ref),K.key!==void 0&&(ve=""+K.key),K)O.call(K,le)&&!M.hasOwnProperty(le)&&(ge[le]=K[le]);var Ee=arguments.length-2;if(Ee===1)ge.children=se;else if(1<Ee){for(var we=Array(Ee),Ae=0;Ae<Ee;Ae++)we[Ae]=arguments[Ae+2];ge.children=we}if(P&&P.defaultProps)for(le in Ee=P.defaultProps,Ee)ge[le]===void 0&&(ge[le]=Ee[le]);return{$$typeof:t,type:P,key:ve,ref:pe,props:ge,_owner:U.current}}function X(P,K){return{$$typeof:t,type:P.type,key:K,ref:P.ref,props:P.props,_owner:P._owner}}function V(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function H(P){var K={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(se){return K[se]})}var F=/\/+/g;function Y(P,K){return typeof P=="object"&&P!==null&&P.key!=null?H(""+P.key):K.toString(36)}function re(P,K,se,le,ge){var ve=typeof P;(ve==="undefined"||ve==="boolean")&&(P=null);var pe=!1;if(P===null)pe=!0;else switch(ve){case"string":case"number":pe=!0;break;case"object":switch(P.$$typeof){case t:case r:pe=!0}}if(pe)return pe=P,ge=ge(pe),P=le===""?"."+Y(pe,0):le,I(ge)?(se="",P!=null&&(se=P.replace(F,"$&/")+"/"),re(ge,K,se,"",function(Ae){return Ae})):ge!=null&&(V(ge)&&(ge=X(ge,se+(!ge.key||pe&&pe.key===ge.key?"":(""+ge.key).replace(F,"$&/")+"/")+P)),K.push(ge)),1;if(pe=0,le=le===""?".":le+":",I(P))for(var Ee=0;Ee<P.length;Ee++){ve=P[Ee];var we=le+Y(ve,Ee);pe+=re(ve,K,se,we,ge)}else if(we=w(P),typeof we=="function")for(P=we.call(P),Ee=0;!(ve=P.next()).done;)ve=ve.value,we=le+Y(ve,Ee++),pe+=re(ve,K,se,we,ge);else if(ve==="object")throw K=String(P),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return pe}function W(P,K,se){if(P==null)return P;var le=[],ge=0;return re(P,le,"","",function(ve){return K.call(se,ve,ge++)}),le}function G(P){if(P._status===-1){var K=P._result;K=K(),K.then(function(se){(P._status===0||P._status===-1)&&(P._status=1,P._result=se)},function(se){(P._status===0||P._status===-1)&&(P._status=2,P._result=se)}),P._status===-1&&(P._status=0,P._result=K)}if(P._status===1)return P._result.default;throw P._result}var ee={current:null},L={transition:null},Z={ReactCurrentDispatcher:ee,ReactCurrentBatchConfig:L,ReactCurrentOwner:U};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:W,forEach:function(P,K,se){W(P,function(){K.apply(this,arguments)},se)},count:function(P){var K=0;return W(P,function(){K++}),K},toArray:function(P){return W(P,function(K){return K})||[]},only:function(P){if(!V(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ce.Component=N,Ce.Fragment=o,Ce.Profiler=l,Ce.PureComponent=A,Ce.StrictMode=i,Ce.Suspense=h,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ce.act=Q,Ce.cloneElement=function(P,K,se){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var le=k({},P.props),ge=P.key,ve=P.ref,pe=P._owner;if(K!=null){if(K.ref!==void 0&&(ve=K.ref,pe=U.current),K.key!==void 0&&(ge=""+K.key),P.type&&P.type.defaultProps)var Ee=P.type.defaultProps;for(we in K)O.call(K,we)&&!M.hasOwnProperty(we)&&(le[we]=K[we]===void 0&&Ee!==void 0?Ee[we]:K[we])}var we=arguments.length-2;if(we===1)le.children=se;else if(1<we){Ee=Array(we);for(var Ae=0;Ae<we;Ae++)Ee[Ae]=arguments[Ae+2];le.children=Ee}return{$$typeof:t,type:P.type,key:ge,ref:ve,props:le,_owner:pe}},Ce.createContext=function(P){return P={$$typeof:d,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:c,_context:P},P.Consumer=P},Ce.createElement=D,Ce.createFactory=function(P){var K=D.bind(null,P);return K.type=P,K},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(P){return{$$typeof:f,render:P}},Ce.isValidElement=V,Ce.lazy=function(P){return{$$typeof:v,_payload:{_status:-1,_result:P},_init:G}},Ce.memo=function(P,K){return{$$typeof:g,type:P,compare:K===void 0?null:K}},Ce.startTransition=function(P){var K=L.transition;L.transition={};try{P()}finally{L.transition=K}},Ce.unstable_act=Q,Ce.useCallback=function(P,K){return ee.current.useCallback(P,K)},Ce.useContext=function(P){return ee.current.useContext(P)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(P){return ee.current.useDeferredValue(P)},Ce.useEffect=function(P,K){return ee.current.useEffect(P,K)},Ce.useId=function(){return ee.current.useId()},Ce.useImperativeHandle=function(P,K,se){return ee.current.useImperativeHandle(P,K,se)},Ce.useInsertionEffect=function(P,K){return ee.current.useInsertionEffect(P,K)},Ce.useLayoutEffect=function(P,K){return ee.current.useLayoutEffect(P,K)},Ce.useMemo=function(P,K){return ee.current.useMemo(P,K)},Ce.useReducer=function(P,K,se){return ee.current.useReducer(P,K,se)},Ce.useRef=function(P){return ee.current.useRef(P)},Ce.useState=function(P){return ee.current.useState(P)},Ce.useSyncExternalStore=function(P,K,se){return ee.current.useSyncExternalStore(P,K,se)},Ce.useTransition=function(){return ee.current.useTransition()},Ce.version="18.3.1",Ce}var wh;function Uu(){return wh||(wh=1,$c.exports=Wy()),$c.exports}/**
11
+ * @license React
12
+ * react-jsx-runtime.production.min.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var bh;function Ky(){if(bh)return fs;bh=1;var t=Uu(),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function d(f,h,g){var v,x={},w=null,C=null;g!==void 0&&(w=""+g),h.key!==void 0&&(w=""+h.key),h.ref!==void 0&&(C=h.ref);for(v in h)i.call(h,v)&&!c.hasOwnProperty(v)&&(x[v]=h[v]);if(f&&f.defaultProps)for(v in h=f.defaultProps,h)x[v]===void 0&&(x[v]=h[v]);return{$$typeof:r,type:f,key:w,ref:C,props:x,_owner:l.current}}return fs.Fragment=o,fs.jsx=d,fs.jsxs=d,fs}var Eh;function Gy(){return Eh||(Eh=1,Dc.exports=Ky()),Dc.exports}var u=Gy(),y=Uu();const bn=zu(y),Sl=Vy({__proto__:null,default:bn},[y]);var Vi={},Fc={exports:{}},vt={},Bc={exports:{}},zc={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Nh;function Yy(){return Nh||(Nh=1,(function(t){function r(L,Z){var Q=L.length;L.push(Z);e:for(;0<Q;){var P=Q-1>>>1,K=L[P];if(0<l(K,Z))L[P]=Z,L[Q]=K,Q=P;else break e}}function o(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var Z=L[0],Q=L.pop();if(Q!==Z){L[0]=Q;e:for(var P=0,K=L.length,se=K>>>1;P<se;){var le=2*(P+1)-1,ge=L[le],ve=le+1,pe=L[ve];if(0>l(ge,Q))ve<K&&0>l(pe,ge)?(L[P]=pe,L[ve]=Q,P=ve):(L[P]=ge,L[le]=Q,P=le);else if(ve<K&&0>l(pe,Q))L[P]=pe,L[ve]=Q,P=ve;else break e}}return Z}function l(L,Z){var Q=L.sortIndex-Z.sortIndex;return Q!==0?Q:L.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var h=[],g=[],v=1,x=null,w=3,C=!1,k=!1,b=!1,N=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(L){for(var Z=o(g);Z!==null;){if(Z.callback===null)i(g);else if(Z.startTime<=L)i(g),Z.sortIndex=Z.expirationTime,r(h,Z);else break;Z=o(g)}}function I(L){if(b=!1,_(L),!k)if(o(h)!==null)k=!0,G(O);else{var Z=o(g);Z!==null&&ee(I,Z.startTime-L)}}function O(L,Z){k=!1,b&&(b=!1,S(D),D=-1),C=!0;var Q=w;try{for(_(Z),x=o(h);x!==null&&(!(x.expirationTime>Z)||L&&!H());){var P=x.callback;if(typeof P=="function"){x.callback=null,w=x.priorityLevel;var K=P(x.expirationTime<=Z);Z=t.unstable_now(),typeof K=="function"?x.callback=K:x===o(h)&&i(h),_(Z)}else i(h);x=o(h)}if(x!==null)var se=!0;else{var le=o(g);le!==null&&ee(I,le.startTime-Z),se=!1}return se}finally{x=null,w=Q,C=!1}}var U=!1,M=null,D=-1,X=5,V=-1;function H(){return!(t.unstable_now()-V<X)}function F(){if(M!==null){var L=t.unstable_now();V=L;var Z=!0;try{Z=M(!0,L)}finally{Z?Y():(U=!1,M=null)}}else U=!1}var Y;if(typeof A=="function")Y=function(){A(F)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,W=re.port2;re.port1.onmessage=F,Y=function(){W.postMessage(null)}}else Y=function(){N(F,0)};function G(L){M=L,U||(U=!0,Y())}function ee(L,Z){D=N(function(){L(t.unstable_now())},Z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_continueExecution=function(){k||C||(k=!0,G(O))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_getFirstCallbackNode=function(){return o(h)},t.unstable_next=function(L){switch(w){case 1:case 2:case 3:var Z=3;break;default:Z=w}var Q=w;w=Z;try{return L()}finally{w=Q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,Z){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var Q=w;w=L;try{return Z()}finally{w=Q}},t.unstable_scheduleCallback=function(L,Z,Q){var P=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?P+Q:P):Q=P,L){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=Q+K,L={id:v++,callback:Z,priorityLevel:L,startTime:Q,expirationTime:K,sortIndex:-1},Q>P?(L.sortIndex=Q,r(g,L),o(h)===null&&L===o(g)&&(b?(S(D),D=-1):b=!0,ee(I,Q-P))):(L.sortIndex=K,r(h,L),k||C||(k=!0,G(O))),L},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(L){var Z=w;return function(){var Q=w;w=Z;try{return L.apply(this,arguments)}finally{w=Q}}}})(zc)),zc}var Ch;function Xy(){return Ch||(Ch=1,Bc.exports=Yy()),Bc.exports}/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var kh;function qy(){if(kh)return vt;kh=1;var t=Uu(),r=Xy();function o(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function c(e,n){d(e,n),d(e+"Capture",n)}function d(e,n){for(l[e]=n,e=0;e<n.length;e++)i.add(n[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},x={};function w(e){return h.call(x,e)?!0:h.call(v,e)?!1:g.test(e)?x[e]=!0:(v[e]=!0,!1)}function C(e,n,s,a){if(s!==null&&s.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function k(e,n,s,a){if(n===null||typeof n>"u"||C(e,n,s,a))return!0;if(a)return!1;if(s!==null)switch(s.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function b(e,n,s,a,p,m,E){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=p,this.mustUseProperty=s,this.propertyName=e,this.type=n,this.sanitizeURL=m,this.removeEmptyString=E}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];N[n]=new b(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new b(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){N[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function A(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(S,A);N[n]=new b(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(S,A);N[n]=new b(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(S,A);N[n]=new b(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function _(e,n,s,a){var p=N.hasOwnProperty(n)?N[n]:null;(p!==null?p.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(k(n,s,p,a)&&(s=null),a||p===null?w(n)&&(s===null?e.removeAttribute(n):e.setAttribute(n,""+s)):p.mustUseProperty?e[p.propertyName]=s===null?p.type===3?!1:"":s:(n=p.attributeName,a=p.attributeNamespace,s===null?e.removeAttribute(n):(p=p.type,s=p===3||p===4&&s===!0?"":""+s,a?e.setAttributeNS(a,n,s):e.setAttribute(n,s))))}var I=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),U=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),H=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ee=Symbol.for("react.offscreen"),L=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Object.assign,P;function K(e){if(P===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);P=n&&n[1]||""}return`
35
+ `+P+e}var se=!1;function le(e,n){if(!e||se)return"";se=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(z){var a=z}Reflect.construct(e,[],n)}else{try{n.call()}catch(z){a=z}e.call(n.prototype)}else{try{throw Error()}catch(z){a=z}e()}}catch(z){if(z&&a&&typeof z.stack=="string"){for(var p=z.stack.split(`
36
+ `),m=a.stack.split(`
37
+ `),E=p.length-1,j=m.length-1;1<=E&&0<=j&&p[E]!==m[j];)j--;for(;1<=E&&0<=j;E--,j--)if(p[E]!==m[j]){if(E!==1||j!==1)do if(E--,j--,0>j||p[E]!==m[j]){var T=`
38
+ `+p[E].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),T}while(1<=E&&0<=j);break}}}finally{se=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?K(e):""}function ge(e){switch(e.tag){case 5:return K(e.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return e=le(e.type,!1),e;case 11:return e=le(e.type.render,!1),e;case 1:return e=le(e.type,!0),e;default:return""}}function ve(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case U:return"Portal";case X:return"Profiler";case D:return"StrictMode";case Y:return"Suspense";case re:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case H:return(e.displayName||"Context")+".Consumer";case V:return(e._context.displayName||"Context")+".Provider";case F:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return n=e.displayName||null,n!==null?n:ve(e.type)||"Memo";case G:n=e._payload,e=e._init;try{return ve(e(n))}catch{}}return null}function pe(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ve(n);case 8:return n===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function we(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ae(e){var n=we(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),a=""+e[n];if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var p=s.get,m=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return p.call(this)},set:function(E){a=""+E,m.call(this,E)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(E){a=""+E},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ft(e){e._valueTracker||(e._valueTracker=Ae(e))}function tt(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),a="";return e&&(a=we(e)?e.checked?"true":"false":e.value),e=a,e!==s?(n.setValue(e),!0):!1}function Oe(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bt(e,n){var s=n.checked;return Q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function ar(e,n){var s=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;s=Ee(n.value!=null?n.value:s),e._wrapperState={initialChecked:a,initialValue:s,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function cr(e,n){n=n.checked,n!=null&&_(e,"checked",n,!1)}function So(e,n){cr(e,n);var s=Ee(n.value),a=n.type;if(s!=null)a==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?An(e,n.type,s):n.hasOwnProperty("defaultValue")&&An(e,n.type,Ee(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Ms(e,n,s){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,s||n===e.value||(e.value=n),e.defaultValue=n}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function An(e,n,s){(n!=="number"||Oe(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var jo=Array.isArray;function Lr(e,n,s,a){if(e=e.options,n){n={};for(var p=0;p<s.length;p++)n["$"+s[p]]=!0;for(s=0;s<e.length;s++)p=n.hasOwnProperty("$"+e[s].value),e[s].selected!==p&&(e[s].selected=p),p&&a&&(e[s].defaultSelected=!0)}else{for(s=""+Ee(s),n=null,p=0;p<e.length;p++){if(e[p].value===s){e[p].selected=!0,a&&(e[p].defaultSelected=!0);return}n!==null||e[p].disabled||(n=e[p])}n!==null&&(n.selected=!0)}}function Gl(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(o(91));return Q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ad(e,n){var s=n.value;if(s==null){if(s=n.children,n=n.defaultValue,s!=null){if(n!=null)throw Error(o(92));if(jo(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),s=n}e._wrapperState={initialValue:Ee(s)}}function Td(e,n){var s=Ee(n.value),a=Ee(n.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),n.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),a!=null&&(e.defaultValue=""+a)}function _d(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Pd(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Yl(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Pd(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Os,Rd=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,s,a,p){MSApp.execUnsafeLocalFunction(function(){return e(n,s,a,p)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Os=Os||document.createElement("div"),Os.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Os.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Ao(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}var To={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Yx=["Webkit","ms","Moz","O"];Object.keys(To).forEach(function(e){Yx.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),To[n]=To[e]})});function Id(e,n,s){return n==null||typeof n=="boolean"||n===""?"":s||typeof n!="number"||n===0||To.hasOwnProperty(e)&&To[e]?(""+n).trim():n+"px"}function Ld(e,n){e=e.style;for(var s in n)if(n.hasOwnProperty(s)){var a=s.indexOf("--")===0,p=Id(s,n[s],a);s==="float"&&(s="cssFloat"),a?e.setProperty(s,p):e[s]=p}}var Xx=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xl(e,n){if(n){if(Xx[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(o(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(o(61))}if(n.style!=null&&typeof n.style!="object")throw Error(o(62))}}function ql(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ql=null;function Zl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jl=null,Mr=null,Or=null;function Md(e){if(e=Qo(e)){if(typeof Jl!="function")throw Error(o(280));var n=e.stateNode;n&&(n=si(n),Jl(e.stateNode,e.type,n))}}function Od(e){Mr?Or?Or.push(e):Or=[e]:Mr=e}function Dd(){if(Mr){var e=Mr,n=Or;if(Or=Mr=null,Md(e),n)for(e=0;e<n.length;e++)Md(n[e])}}function $d(e,n){return e(n)}function Fd(){}var ea=!1;function Bd(e,n,s){if(ea)return e(n,s);ea=!0;try{return $d(e,n,s)}finally{ea=!1,(Mr!==null||Or!==null)&&(Fd(),Dd())}}function _o(e,n){var s=e.stateNode;if(s===null)return null;var a=si(s);if(a===null)return null;s=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,n,typeof s));return s}var ta=!1;if(f)try{var Po={};Object.defineProperty(Po,"passive",{get:function(){ta=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{ta=!1}function qx(e,n,s,a,p,m,E,j,T){var z=Array.prototype.slice.call(arguments,3);try{n.apply(s,z)}catch(J){this.onError(J)}}var Ro=!1,Ds=null,$s=!1,na=null,Qx={onError:function(e){Ro=!0,Ds=e}};function Zx(e,n,s,a,p,m,E,j,T){Ro=!1,Ds=null,qx.apply(Qx,arguments)}function Jx(e,n,s,a,p,m,E,j,T){if(Zx.apply(this,arguments),Ro){if(Ro){var z=Ds;Ro=!1,Ds=null}else throw Error(o(198));$s||($s=!0,na=z)}}function ur(e){var n=e,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s:null}function zd(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Ud(e){if(ur(e)!==e)throw Error(o(188))}function ev(e){var n=e.alternate;if(!n){if(n=ur(e),n===null)throw Error(o(188));return n!==e?null:e}for(var s=e,a=n;;){var p=s.return;if(p===null)break;var m=p.alternate;if(m===null){if(a=p.return,a!==null){s=a;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===s)return Ud(p),e;if(m===a)return Ud(p),n;m=m.sibling}throw Error(o(188))}if(s.return!==a.return)s=p,a=m;else{for(var E=!1,j=p.child;j;){if(j===s){E=!0,s=p,a=m;break}if(j===a){E=!0,a=p,s=m;break}j=j.sibling}if(!E){for(j=m.child;j;){if(j===s){E=!0,s=m,a=p;break}if(j===a){E=!0,a=m,s=p;break}j=j.sibling}if(!E)throw Error(o(189))}}if(s.alternate!==a)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:n}function Hd(e){return e=ev(e),e!==null?Vd(e):null}function Vd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Vd(e);if(n!==null)return n;e=e.sibling}return null}var Wd=r.unstable_scheduleCallback,Kd=r.unstable_cancelCallback,tv=r.unstable_shouldYield,nv=r.unstable_requestPaint,$e=r.unstable_now,rv=r.unstable_getCurrentPriorityLevel,ra=r.unstable_ImmediatePriority,Gd=r.unstable_UserBlockingPriority,Fs=r.unstable_NormalPriority,ov=r.unstable_LowPriority,Yd=r.unstable_IdlePriority,Bs=null,Qt=null;function sv(e){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Bs,e,void 0,(e.current.flags&128)===128)}catch{}}var $t=Math.clz32?Math.clz32:av,iv=Math.log,lv=Math.LN2;function av(e){return e>>>=0,e===0?32:31-(iv(e)/lv|0)|0}var zs=64,Us=4194304;function Io(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hs(e,n){var s=e.pendingLanes;if(s===0)return 0;var a=0,p=e.suspendedLanes,m=e.pingedLanes,E=s&268435455;if(E!==0){var j=E&~p;j!==0?a=Io(j):(m&=E,m!==0&&(a=Io(m)))}else E=s&~p,E!==0?a=Io(E):m!==0&&(a=Io(m));if(a===0)return 0;if(n!==0&&n!==a&&(n&p)===0&&(p=a&-a,m=n&-n,p>=m||p===16&&(m&4194240)!==0))return n;if((a&4)!==0&&(a|=s&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=a;0<n;)s=31-$t(n),p=1<<s,a|=e[s],n&=~p;return a}function cv(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uv(e,n){for(var s=e.suspendedLanes,a=e.pingedLanes,p=e.expirationTimes,m=e.pendingLanes;0<m;){var E=31-$t(m),j=1<<E,T=p[E];T===-1?((j&s)===0||(j&a)!==0)&&(p[E]=cv(j,n)):T<=n&&(e.expiredLanes|=j),m&=~j}}function oa(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Xd(){var e=zs;return zs<<=1,(zs&4194240)===0&&(zs=64),e}function sa(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function Lo(e,n,s){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-$t(n),e[n]=s}function dv(e,n){var s=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0<s;){var p=31-$t(s),m=1<<p;n[p]=0,a[p]=-1,e[p]=-1,s&=~m}}function ia(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var a=31-$t(s),p=1<<a;p&n|e[a]&n&&(e[a]|=n),s&=~p}}var je=0;function qd(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Qd,la,Zd,Jd,ef,aa=!1,Vs=[],Tn=null,_n=null,Pn=null,Mo=new Map,Oo=new Map,Rn=[],fv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function tf(e,n){switch(e){case"focusin":case"focusout":Tn=null;break;case"dragenter":case"dragleave":_n=null;break;case"mouseover":case"mouseout":Pn=null;break;case"pointerover":case"pointerout":Mo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oo.delete(n.pointerId)}}function Do(e,n,s,a,p,m){return e===null||e.nativeEvent!==m?(e={blockedOn:n,domEventName:s,eventSystemFlags:a,nativeEvent:m,targetContainers:[p]},n!==null&&(n=Qo(n),n!==null&&la(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,p!==null&&n.indexOf(p)===-1&&n.push(p),e)}function pv(e,n,s,a,p){switch(n){case"focusin":return Tn=Do(Tn,e,n,s,a,p),!0;case"dragenter":return _n=Do(_n,e,n,s,a,p),!0;case"mouseover":return Pn=Do(Pn,e,n,s,a,p),!0;case"pointerover":var m=p.pointerId;return Mo.set(m,Do(Mo.get(m)||null,e,n,s,a,p)),!0;case"gotpointercapture":return m=p.pointerId,Oo.set(m,Do(Oo.get(m)||null,e,n,s,a,p)),!0}return!1}function nf(e){var n=dr(e.target);if(n!==null){var s=ur(n);if(s!==null){if(n=s.tag,n===13){if(n=zd(s),n!==null){e.blockedOn=n,ef(e.priority,function(){Zd(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ws(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=ua(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var a=new s.constructor(s.type,s);Ql=a,s.target.dispatchEvent(a),Ql=null}else return n=Qo(s),n!==null&&la(n),e.blockedOn=s,!1;n.shift()}return!0}function rf(e,n,s){Ws(e)&&s.delete(n)}function hv(){aa=!1,Tn!==null&&Ws(Tn)&&(Tn=null),_n!==null&&Ws(_n)&&(_n=null),Pn!==null&&Ws(Pn)&&(Pn=null),Mo.forEach(rf),Oo.forEach(rf)}function $o(e,n){e.blockedOn===n&&(e.blockedOn=null,aa||(aa=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,hv)))}function Fo(e){function n(p){return $o(p,e)}if(0<Vs.length){$o(Vs[0],e);for(var s=1;s<Vs.length;s++){var a=Vs[s];a.blockedOn===e&&(a.blockedOn=null)}}for(Tn!==null&&$o(Tn,e),_n!==null&&$o(_n,e),Pn!==null&&$o(Pn,e),Mo.forEach(n),Oo.forEach(n),s=0;s<Rn.length;s++)a=Rn[s],a.blockedOn===e&&(a.blockedOn=null);for(;0<Rn.length&&(s=Rn[0],s.blockedOn===null);)nf(s),s.blockedOn===null&&Rn.shift()}var Dr=I.ReactCurrentBatchConfig,Ks=!0;function mv(e,n,s,a){var p=je,m=Dr.transition;Dr.transition=null;try{je=1,ca(e,n,s,a)}finally{je=p,Dr.transition=m}}function gv(e,n,s,a){var p=je,m=Dr.transition;Dr.transition=null;try{je=4,ca(e,n,s,a)}finally{je=p,Dr.transition=m}}function ca(e,n,s,a){if(Ks){var p=ua(e,n,s,a);if(p===null)ja(e,n,a,Gs,s),tf(e,a);else if(pv(p,e,n,s,a))a.stopPropagation();else if(tf(e,a),n&4&&-1<fv.indexOf(e)){for(;p!==null;){var m=Qo(p);if(m!==null&&Qd(m),m=ua(e,n,s,a),m===null&&ja(e,n,a,Gs,s),m===p)break;p=m}p!==null&&a.stopPropagation()}else ja(e,n,a,null,s)}}var Gs=null;function ua(e,n,s,a){if(Gs=null,e=Zl(a),e=dr(e),e!==null)if(n=ur(e),n===null)e=null;else if(s=n.tag,s===13){if(e=zd(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Gs=e,null}function of(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(rv()){case ra:return 1;case Gd:return 4;case Fs:case ov:return 16;case Yd:return 536870912;default:return 16}default:return 16}}var In=null,da=null,Ys=null;function sf(){if(Ys)return Ys;var e,n=da,s=n.length,a,p="value"in In?In.value:In.textContent,m=p.length;for(e=0;e<s&&n[e]===p[e];e++);var E=s-e;for(a=1;a<=E&&n[s-a]===p[m-a];a++);return Ys=p.slice(e,1<a?1-a:void 0)}function Xs(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function qs(){return!0}function lf(){return!1}function Et(e){function n(s,a,p,m,E){this._reactName=s,this._targetInst=p,this.type=a,this.nativeEvent=m,this.target=E,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(s=e[j],this[j]=s?s(m):m[j]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?qs:lf,this.isPropagationStopped=lf,this}return Q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=qs)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=qs)},persist:function(){},isPersistent:qs}),n}var $r={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fa=Et($r),Bo=Q({},$r,{view:0,detail:0}),xv=Et(Bo),pa,ha,zo,Qs=Q({},Bo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ga,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==zo&&(zo&&e.type==="mousemove"?(pa=e.screenX-zo.screenX,ha=e.screenY-zo.screenY):ha=pa=0,zo=e),pa)},movementY:function(e){return"movementY"in e?e.movementY:ha}}),af=Et(Qs),vv=Q({},Qs,{dataTransfer:0}),yv=Et(vv),wv=Q({},Bo,{relatedTarget:0}),ma=Et(wv),bv=Q({},$r,{animationName:0,elapsedTime:0,pseudoElement:0}),Ev=Et(bv),Nv=Q({},$r,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cv=Et(Nv),kv=Q({},$r,{data:0}),cf=Et(kv),Sv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Av={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tv(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Av[e])?!!n[e]:!1}function ga(){return Tv}var _v=Q({},Bo,{key:function(e){if(e.key){var n=Sv[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Xs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ga,charCode:function(e){return e.type==="keypress"?Xs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pv=Et(_v),Rv=Q({},Qs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uf=Et(Rv),Iv=Q({},Bo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ga}),Lv=Et(Iv),Mv=Q({},$r,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ov=Et(Mv),Dv=Q({},Qs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),$v=Et(Dv),Fv=[9,13,27,32],xa=f&&"CompositionEvent"in window,Uo=null;f&&"documentMode"in document&&(Uo=document.documentMode);var Bv=f&&"TextEvent"in window&&!Uo,df=f&&(!xa||Uo&&8<Uo&&11>=Uo),ff=" ",pf=!1;function hf(e,n){switch(e){case"keyup":return Fv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function zv(e,n){switch(e){case"compositionend":return mf(n);case"keypress":return n.which!==32?null:(pf=!0,ff);case"textInput":return e=n.data,e===ff&&pf?null:e;default:return null}}function Uv(e,n){if(Fr)return e==="compositionend"||!xa&&hf(e,n)?(e=sf(),Ys=da=In=null,Fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return df&&n.locale!=="ko"?null:n.data;default:return null}}var Hv={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gf(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Hv[e.type]:n==="textarea"}function xf(e,n,s,a){Od(a),n=ni(n,"onChange"),0<n.length&&(s=new fa("onChange","change",null,s,a),e.push({event:s,listeners:n}))}var Ho=null,Vo=null;function Vv(e){Mf(e,0)}function Zs(e){var n=Vr(e);if(tt(n))return e}function Wv(e,n){if(e==="change")return n}var vf=!1;if(f){var va;if(f){var ya="oninput"in document;if(!ya){var yf=document.createElement("div");yf.setAttribute("oninput","return;"),ya=typeof yf.oninput=="function"}va=ya}else va=!1;vf=va&&(!document.documentMode||9<document.documentMode)}function wf(){Ho&&(Ho.detachEvent("onpropertychange",bf),Vo=Ho=null)}function bf(e){if(e.propertyName==="value"&&Zs(Vo)){var n=[];xf(n,Vo,e,Zl(e)),Bd(Vv,n)}}function Kv(e,n,s){e==="focusin"?(wf(),Ho=n,Vo=s,Ho.attachEvent("onpropertychange",bf)):e==="focusout"&&wf()}function Gv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zs(Vo)}function Yv(e,n){if(e==="click")return Zs(n)}function Xv(e,n){if(e==="input"||e==="change")return Zs(n)}function qv(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Ft=typeof Object.is=="function"?Object.is:qv;function Wo(e,n){if(Ft(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),a=Object.keys(n);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var p=s[a];if(!h.call(n,p)||!Ft(e[p],n[p]))return!1}return!0}function Ef(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nf(e,n){var s=Ef(e);e=0;for(var a;s;){if(s.nodeType===3){if(a=e+s.textContent.length,e<=n&&a>=n)return{node:s,offset:n-e};e=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Ef(s)}}function Cf(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Cf(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function kf(){for(var e=window,n=Oe();n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=Oe(e.document)}return n}function wa(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Qv(e){var n=kf(),s=e.focusedElem,a=e.selectionRange;if(n!==s&&s&&s.ownerDocument&&Cf(s.ownerDocument.documentElement,s)){if(a!==null&&wa(s)){if(n=a.start,e=a.end,e===void 0&&(e=n),"selectionStart"in s)s.selectionStart=n,s.selectionEnd=Math.min(e,s.value.length);else if(e=(n=s.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var p=s.textContent.length,m=Math.min(a.start,p);a=a.end===void 0?m:Math.min(a.end,p),!e.extend&&m>a&&(p=a,a=m,m=p),p=Nf(s,m);var E=Nf(s,a);p&&E&&(e.rangeCount!==1||e.anchorNode!==p.node||e.anchorOffset!==p.offset||e.focusNode!==E.node||e.focusOffset!==E.offset)&&(n=n.createRange(),n.setStart(p.node,p.offset),e.removeAllRanges(),m>a?(e.addRange(n),e.extend(E.node,E.offset)):(n.setEnd(E.node,E.offset),e.addRange(n)))}}for(n=[],e=s;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<n.length;s++)e=n[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Zv=f&&"documentMode"in document&&11>=document.documentMode,Br=null,ba=null,Ko=null,Ea=!1;function Sf(e,n,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ea||Br==null||Br!==Oe(a)||(a=Br,"selectionStart"in a&&wa(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ko&&Wo(Ko,a)||(Ko=a,a=ni(ba,"onSelect"),0<a.length&&(n=new fa("onSelect","select",null,n,s),e.push({event:n,listeners:a}),n.target=Br)))}function Js(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}var zr={animationend:Js("Animation","AnimationEnd"),animationiteration:Js("Animation","AnimationIteration"),animationstart:Js("Animation","AnimationStart"),transitionend:Js("Transition","TransitionEnd")},Na={},jf={};f&&(jf=document.createElement("div").style,"AnimationEvent"in window||(delete zr.animationend.animation,delete zr.animationiteration.animation,delete zr.animationstart.animation),"TransitionEvent"in window||delete zr.transitionend.transition);function ei(e){if(Na[e])return Na[e];if(!zr[e])return e;var n=zr[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in jf)return Na[e]=n[s];return e}var Af=ei("animationend"),Tf=ei("animationiteration"),_f=ei("animationstart"),Pf=ei("transitionend"),Rf=new Map,If="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ln(e,n){Rf.set(e,n),c(n,[e])}for(var Ca=0;Ca<If.length;Ca++){var ka=If[Ca],Jv=ka.toLowerCase(),ey=ka[0].toUpperCase()+ka.slice(1);Ln(Jv,"on"+ey)}Ln(Af,"onAnimationEnd"),Ln(Tf,"onAnimationIteration"),Ln(_f,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(Pf,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Go="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ty=new Set("cancel close invalid load scroll toggle".split(" ").concat(Go));function Lf(e,n,s){var a=e.type||"unknown-event";e.currentTarget=s,Jx(a,n,void 0,e),e.currentTarget=null}function Mf(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var a=e[s],p=a.event;a=a.listeners;e:{var m=void 0;if(n)for(var E=a.length-1;0<=E;E--){var j=a[E],T=j.instance,z=j.currentTarget;if(j=j.listener,T!==m&&p.isPropagationStopped())break e;Lf(p,j,z),m=T}else for(E=0;E<a.length;E++){if(j=a[E],T=j.instance,z=j.currentTarget,j=j.listener,T!==m&&p.isPropagationStopped())break e;Lf(p,j,z),m=T}}}if($s)throw e=na,$s=!1,na=null,e}function _e(e,n){var s=n[Ia];s===void 0&&(s=n[Ia]=new Set);var a=e+"__bubble";s.has(a)||(Of(n,e,2,!1),s.add(a))}function Sa(e,n,s){var a=0;n&&(a|=4),Of(s,e,a,n)}var ti="_reactListening"+Math.random().toString(36).slice(2);function Yo(e){if(!e[ti]){e[ti]=!0,i.forEach(function(s){s!=="selectionchange"&&(ty.has(s)||Sa(s,!1,e),Sa(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ti]||(n[ti]=!0,Sa("selectionchange",!1,n))}}function Of(e,n,s,a){switch(of(n)){case 1:var p=mv;break;case 4:p=gv;break;default:p=ca}s=p.bind(null,n,s,e),p=void 0,!ta||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(p=!0),a?p!==void 0?e.addEventListener(n,s,{capture:!0,passive:p}):e.addEventListener(n,s,!0):p!==void 0?e.addEventListener(n,s,{passive:p}):e.addEventListener(n,s,!1)}function ja(e,n,s,a,p){var m=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var E=a.tag;if(E===3||E===4){var j=a.stateNode.containerInfo;if(j===p||j.nodeType===8&&j.parentNode===p)break;if(E===4)for(E=a.return;E!==null;){var T=E.tag;if((T===3||T===4)&&(T=E.stateNode.containerInfo,T===p||T.nodeType===8&&T.parentNode===p))return;E=E.return}for(;j!==null;){if(E=dr(j),E===null)return;if(T=E.tag,T===5||T===6){a=m=E;continue e}j=j.parentNode}}a=a.return}Bd(function(){var z=m,J=Zl(s),te=[];e:{var q=Rf.get(e);if(q!==void 0){var oe=fa,ae=e;switch(e){case"keypress":if(Xs(s)===0)break e;case"keydown":case"keyup":oe=Pv;break;case"focusin":ae="focus",oe=ma;break;case"focusout":ae="blur",oe=ma;break;case"beforeblur":case"afterblur":oe=ma;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=af;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=yv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=Lv;break;case Af:case Tf:case _f:oe=Ev;break;case Pf:oe=Ov;break;case"scroll":oe=xv;break;case"wheel":oe=$v;break;case"copy":case"cut":case"paste":oe=Cv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=uf}var de=(n&4)!==0,Fe=!de&&e==="scroll",$=de?q!==null?q+"Capture":null:q;de=[];for(var R=z,B;R!==null;){B=R;var ne=B.stateNode;if(B.tag===5&&ne!==null&&(B=ne,$!==null&&(ne=_o(R,$),ne!=null&&de.push(Xo(R,ne,B)))),Fe)break;R=R.return}0<de.length&&(q=new oe(q,ae,null,s,J),te.push({event:q,listeners:de}))}}if((n&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",oe=e==="mouseout"||e==="pointerout",q&&s!==Ql&&(ae=s.relatedTarget||s.fromElement)&&(dr(ae)||ae[dn]))break e;if((oe||q)&&(q=J.window===J?J:(q=J.ownerDocument)?q.defaultView||q.parentWindow:window,oe?(ae=s.relatedTarget||s.toElement,oe=z,ae=ae?dr(ae):null,ae!==null&&(Fe=ur(ae),ae!==Fe||ae.tag!==5&&ae.tag!==6)&&(ae=null)):(oe=null,ae=z),oe!==ae)){if(de=af,ne="onMouseLeave",$="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(de=uf,ne="onPointerLeave",$="onPointerEnter",R="pointer"),Fe=oe==null?q:Vr(oe),B=ae==null?q:Vr(ae),q=new de(ne,R+"leave",oe,s,J),q.target=Fe,q.relatedTarget=B,ne=null,dr(J)===z&&(de=new de($,R+"enter",ae,s,J),de.target=B,de.relatedTarget=Fe,ne=de),Fe=ne,oe&&ae)t:{for(de=oe,$=ae,R=0,B=de;B;B=Ur(B))R++;for(B=0,ne=$;ne;ne=Ur(ne))B++;for(;0<R-B;)de=Ur(de),R--;for(;0<B-R;)$=Ur($),B--;for(;R--;){if(de===$||$!==null&&de===$.alternate)break t;de=Ur(de),$=Ur($)}de=null}else de=null;oe!==null&&Df(te,q,oe,de,!1),ae!==null&&Fe!==null&&Df(te,Fe,ae,de,!0)}}e:{if(q=z?Vr(z):window,oe=q.nodeName&&q.nodeName.toLowerCase(),oe==="select"||oe==="input"&&q.type==="file")var fe=Wv;else if(gf(q))if(vf)fe=Xv;else{fe=Gv;var he=Kv}else(oe=q.nodeName)&&oe.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(fe=Yv);if(fe&&(fe=fe(e,z))){xf(te,fe,s,J);break e}he&&he(e,q,z),e==="focusout"&&(he=q._wrapperState)&&he.controlled&&q.type==="number"&&An(q,"number",q.value)}switch(he=z?Vr(z):window,e){case"focusin":(gf(he)||he.contentEditable==="true")&&(Br=he,ba=z,Ko=null);break;case"focusout":Ko=ba=Br=null;break;case"mousedown":Ea=!0;break;case"contextmenu":case"mouseup":case"dragend":Ea=!1,Sf(te,s,J);break;case"selectionchange":if(Zv)break;case"keydown":case"keyup":Sf(te,s,J)}var me;if(xa)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else Fr?hf(e,s)&&(xe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(xe="onCompositionStart");xe&&(df&&s.locale!=="ko"&&(Fr||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&Fr&&(me=sf()):(In=J,da="value"in In?In.value:In.textContent,Fr=!0)),he=ni(z,xe),0<he.length&&(xe=new cf(xe,e,null,s,J),te.push({event:xe,listeners:he}),me?xe.data=me:(me=mf(s),me!==null&&(xe.data=me)))),(me=Bv?zv(e,s):Uv(e,s))&&(z=ni(z,"onBeforeInput"),0<z.length&&(J=new cf("onBeforeInput","beforeinput",null,s,J),te.push({event:J,listeners:z}),J.data=me))}Mf(te,n)})}function Xo(e,n,s){return{instance:e,listener:n,currentTarget:s}}function ni(e,n){for(var s=n+"Capture",a=[];e!==null;){var p=e,m=p.stateNode;p.tag===5&&m!==null&&(p=m,m=_o(e,s),m!=null&&a.unshift(Xo(e,m,p)),m=_o(e,n),m!=null&&a.push(Xo(e,m,p))),e=e.return}return a}function Ur(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Df(e,n,s,a,p){for(var m=n._reactName,E=[];s!==null&&s!==a;){var j=s,T=j.alternate,z=j.stateNode;if(T!==null&&T===a)break;j.tag===5&&z!==null&&(j=z,p?(T=_o(s,m),T!=null&&E.unshift(Xo(s,T,j))):p||(T=_o(s,m),T!=null&&E.push(Xo(s,T,j)))),s=s.return}E.length!==0&&e.push({event:n,listeners:E})}var ny=/\r\n?/g,ry=/\u0000|\uFFFD/g;function $f(e){return(typeof e=="string"?e:""+e).replace(ny,`
39
+ `).replace(ry,"")}function ri(e,n,s){if(n=$f(n),$f(e)!==n&&s)throw Error(o(425))}function oi(){}var Aa=null,Ta=null;function _a(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Pa=typeof setTimeout=="function"?setTimeout:void 0,oy=typeof clearTimeout=="function"?clearTimeout:void 0,Ff=typeof Promise=="function"?Promise:void 0,sy=typeof queueMicrotask=="function"?queueMicrotask:typeof Ff<"u"?function(e){return Ff.resolve(null).then(e).catch(iy)}:Pa;function iy(e){setTimeout(function(){throw e})}function Ra(e,n){var s=n,a=0;do{var p=s.nextSibling;if(e.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"){if(a===0){e.removeChild(p),Fo(n);return}a--}else s!=="$"&&s!=="$?"&&s!=="$!"||a++;s=p}while(s);Fo(n)}function Mn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Bf(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(n===0)return e;n--}else s==="/$"&&n++}e=e.previousSibling}return null}var Hr=Math.random().toString(36).slice(2),Zt="__reactFiber$"+Hr,qo="__reactProps$"+Hr,dn="__reactContainer$"+Hr,Ia="__reactEvents$"+Hr,ly="__reactListeners$"+Hr,ay="__reactHandles$"+Hr;function dr(e){var n=e[Zt];if(n)return n;for(var s=e.parentNode;s;){if(n=s[dn]||s[Zt]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=Bf(e);e!==null;){if(s=e[Zt])return s;e=Bf(e)}return n}e=s,s=e.parentNode}return null}function Qo(e){return e=e[Zt]||e[dn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Vr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function si(e){return e[qo]||null}var La=[],Wr=-1;function On(e){return{current:e}}function Pe(e){0>Wr||(e.current=La[Wr],La[Wr]=null,Wr--)}function Te(e,n){Wr++,La[Wr]=e.current,e.current=n}var Dn={},st=On(Dn),pt=On(!1),fr=Dn;function Kr(e,n){var s=e.type.contextTypes;if(!s)return Dn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var p={},m;for(m in s)p[m]=n[m];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=p),p}function ht(e){return e=e.childContextTypes,e!=null}function ii(){Pe(pt),Pe(st)}function zf(e,n,s){if(st.current!==Dn)throw Error(o(168));Te(st,n),Te(pt,s)}function Uf(e,n,s){var a=e.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return s;a=a.getChildContext();for(var p in a)if(!(p in n))throw Error(o(108,pe(e)||"Unknown",p));return Q({},s,a)}function li(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dn,fr=st.current,Te(st,e),Te(pt,pt.current),!0}function Hf(e,n,s){var a=e.stateNode;if(!a)throw Error(o(169));s?(e=Uf(e,n,fr),a.__reactInternalMemoizedMergedChildContext=e,Pe(pt),Pe(st),Te(st,e)):Pe(pt),Te(pt,s)}var fn=null,ai=!1,Ma=!1;function Vf(e){fn===null?fn=[e]:fn.push(e)}function cy(e){ai=!0,Vf(e)}function $n(){if(!Ma&&fn!==null){Ma=!0;var e=0,n=je;try{var s=fn;for(je=1;e<s.length;e++){var a=s[e];do a=a(!0);while(a!==null)}fn=null,ai=!1}catch(p){throw fn!==null&&(fn=fn.slice(e+1)),Wd(ra,$n),p}finally{je=n,Ma=!1}}return null}var Gr=[],Yr=0,ci=null,ui=0,Tt=[],_t=0,pr=null,pn=1,hn="";function hr(e,n){Gr[Yr++]=ui,Gr[Yr++]=ci,ci=e,ui=n}function Wf(e,n,s){Tt[_t++]=pn,Tt[_t++]=hn,Tt[_t++]=pr,pr=e;var a=pn;e=hn;var p=32-$t(a)-1;a&=~(1<<p),s+=1;var m=32-$t(n)+p;if(30<m){var E=p-p%5;m=(a&(1<<E)-1).toString(32),a>>=E,p-=E,pn=1<<32-$t(n)+p|s<<p|a,hn=m+e}else pn=1<<m|s<<p|a,hn=e}function Oa(e){e.return!==null&&(hr(e,1),Wf(e,1,0))}function Da(e){for(;e===ci;)ci=Gr[--Yr],Gr[Yr]=null,ui=Gr[--Yr],Gr[Yr]=null;for(;e===pr;)pr=Tt[--_t],Tt[_t]=null,hn=Tt[--_t],Tt[_t]=null,pn=Tt[--_t],Tt[_t]=null}var Nt=null,Ct=null,Re=!1,Bt=null;function Kf(e,n){var s=Lt(5,null,null,0);s.elementType="DELETED",s.stateNode=n,s.return=e,n=e.deletions,n===null?(e.deletions=[s],e.flags|=16):n.push(s)}function Gf(e,n){switch(e.tag){case 5:var s=e.type;return n=n.nodeType!==1||s.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Nt=e,Ct=Mn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Nt=e,Ct=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(s=pr!==null?{id:pn,overflow:hn}:null,e.memoizedState={dehydrated:n,treeContext:s,retryLane:1073741824},s=Lt(18,null,null,0),s.stateNode=n,s.return=e,e.child=s,Nt=e,Ct=null,!0):!1;default:return!1}}function $a(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Fa(e){if(Re){var n=Ct;if(n){var s=n;if(!Gf(e,n)){if($a(e))throw Error(o(418));n=Mn(s.nextSibling);var a=Nt;n&&Gf(e,n)?Kf(a,s):(e.flags=e.flags&-4097|2,Re=!1,Nt=e)}}else{if($a(e))throw Error(o(418));e.flags=e.flags&-4097|2,Re=!1,Nt=e}}}function Yf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Nt=e}function di(e){if(e!==Nt)return!1;if(!Re)return Yf(e),Re=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!_a(e.type,e.memoizedProps)),n&&(n=Ct)){if($a(e))throw Xf(),Error(o(418));for(;n;)Kf(e,n),n=Mn(n.nextSibling)}if(Yf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(n===0){Ct=Mn(e.nextSibling);break e}n--}else s!=="$"&&s!=="$!"&&s!=="$?"||n++}e=e.nextSibling}Ct=null}}else Ct=Nt?Mn(e.stateNode.nextSibling):null;return!0}function Xf(){for(var e=Ct;e;)e=Mn(e.nextSibling)}function Xr(){Ct=Nt=null,Re=!1}function Ba(e){Bt===null?Bt=[e]:Bt.push(e)}var uy=I.ReactCurrentBatchConfig;function Zo(e,n,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(o(309));var a=s.stateNode}if(!a)throw Error(o(147,e));var p=a,m=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===m?n.ref:(n=function(E){var j=p.refs;E===null?delete j[m]:j[m]=E},n._stringRef=m,n)}if(typeof e!="string")throw Error(o(284));if(!s._owner)throw Error(o(290,e))}return e}function fi(e,n){throw e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function qf(e){var n=e._init;return n(e._payload)}function Qf(e){function n($,R){if(e){var B=$.deletions;B===null?($.deletions=[R],$.flags|=16):B.push(R)}}function s($,R){if(!e)return null;for(;R!==null;)n($,R),R=R.sibling;return null}function a($,R){for($=new Map;R!==null;)R.key!==null?$.set(R.key,R):$.set(R.index,R),R=R.sibling;return $}function p($,R){return $=Kn($,R),$.index=0,$.sibling=null,$}function m($,R,B){return $.index=B,e?(B=$.alternate,B!==null?(B=B.index,B<R?($.flags|=2,R):B):($.flags|=2,R)):($.flags|=1048576,R)}function E($){return e&&$.alternate===null&&($.flags|=2),$}function j($,R,B,ne){return R===null||R.tag!==6?(R=Pc(B,$.mode,ne),R.return=$,R):(R=p(R,B),R.return=$,R)}function T($,R,B,ne){var fe=B.type;return fe===M?J($,R,B.props.children,ne,B.key):R!==null&&(R.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===G&&qf(fe)===R.type)?(ne=p(R,B.props),ne.ref=Zo($,R,B),ne.return=$,ne):(ne=Oi(B.type,B.key,B.props,null,$.mode,ne),ne.ref=Zo($,R,B),ne.return=$,ne)}function z($,R,B,ne){return R===null||R.tag!==4||R.stateNode.containerInfo!==B.containerInfo||R.stateNode.implementation!==B.implementation?(R=Rc(B,$.mode,ne),R.return=$,R):(R=p(R,B.children||[]),R.return=$,R)}function J($,R,B,ne,fe){return R===null||R.tag!==7?(R=Er(B,$.mode,ne,fe),R.return=$,R):(R=p(R,B),R.return=$,R)}function te($,R,B){if(typeof R=="string"&&R!==""||typeof R=="number")return R=Pc(""+R,$.mode,B),R.return=$,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case O:return B=Oi(R.type,R.key,R.props,null,$.mode,B),B.ref=Zo($,null,R),B.return=$,B;case U:return R=Rc(R,$.mode,B),R.return=$,R;case G:var ne=R._init;return te($,ne(R._payload),B)}if(jo(R)||Z(R))return R=Er(R,$.mode,B,null),R.return=$,R;fi($,R)}return null}function q($,R,B,ne){var fe=R!==null?R.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return fe!==null?null:j($,R,""+B,ne);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return B.key===fe?T($,R,B,ne):null;case U:return B.key===fe?z($,R,B,ne):null;case G:return fe=B._init,q($,R,fe(B._payload),ne)}if(jo(B)||Z(B))return fe!==null?null:J($,R,B,ne,null);fi($,B)}return null}function oe($,R,B,ne,fe){if(typeof ne=="string"&&ne!==""||typeof ne=="number")return $=$.get(B)||null,j(R,$,""+ne,fe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case O:return $=$.get(ne.key===null?B:ne.key)||null,T(R,$,ne,fe);case U:return $=$.get(ne.key===null?B:ne.key)||null,z(R,$,ne,fe);case G:var he=ne._init;return oe($,R,B,he(ne._payload),fe)}if(jo(ne)||Z(ne))return $=$.get(B)||null,J(R,$,ne,fe,null);fi(R,ne)}return null}function ae($,R,B,ne){for(var fe=null,he=null,me=R,xe=R=0,Xe=null;me!==null&&xe<B.length;xe++){me.index>xe?(Xe=me,me=null):Xe=me.sibling;var Se=q($,me,B[xe],ne);if(Se===null){me===null&&(me=Xe);break}e&&me&&Se.alternate===null&&n($,me),R=m(Se,R,xe),he===null?fe=Se:he.sibling=Se,he=Se,me=Xe}if(xe===B.length)return s($,me),Re&&hr($,xe),fe;if(me===null){for(;xe<B.length;xe++)me=te($,B[xe],ne),me!==null&&(R=m(me,R,xe),he===null?fe=me:he.sibling=me,he=me);return Re&&hr($,xe),fe}for(me=a($,me);xe<B.length;xe++)Xe=oe(me,$,xe,B[xe],ne),Xe!==null&&(e&&Xe.alternate!==null&&me.delete(Xe.key===null?xe:Xe.key),R=m(Xe,R,xe),he===null?fe=Xe:he.sibling=Xe,he=Xe);return e&&me.forEach(function(Gn){return n($,Gn)}),Re&&hr($,xe),fe}function de($,R,B,ne){var fe=Z(B);if(typeof fe!="function")throw Error(o(150));if(B=fe.call(B),B==null)throw Error(o(151));for(var he=fe=null,me=R,xe=R=0,Xe=null,Se=B.next();me!==null&&!Se.done;xe++,Se=B.next()){me.index>xe?(Xe=me,me=null):Xe=me.sibling;var Gn=q($,me,Se.value,ne);if(Gn===null){me===null&&(me=Xe);break}e&&me&&Gn.alternate===null&&n($,me),R=m(Gn,R,xe),he===null?fe=Gn:he.sibling=Gn,he=Gn,me=Xe}if(Se.done)return s($,me),Re&&hr($,xe),fe;if(me===null){for(;!Se.done;xe++,Se=B.next())Se=te($,Se.value,ne),Se!==null&&(R=m(Se,R,xe),he===null?fe=Se:he.sibling=Se,he=Se);return Re&&hr($,xe),fe}for(me=a($,me);!Se.done;xe++,Se=B.next())Se=oe(me,$,xe,Se.value,ne),Se!==null&&(e&&Se.alternate!==null&&me.delete(Se.key===null?xe:Se.key),R=m(Se,R,xe),he===null?fe=Se:he.sibling=Se,he=Se);return e&&me.forEach(function(Hy){return n($,Hy)}),Re&&hr($,xe),fe}function Fe($,R,B,ne){if(typeof B=="object"&&B!==null&&B.type===M&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case O:e:{for(var fe=B.key,he=R;he!==null;){if(he.key===fe){if(fe=B.type,fe===M){if(he.tag===7){s($,he.sibling),R=p(he,B.props.children),R.return=$,$=R;break e}}else if(he.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===G&&qf(fe)===he.type){s($,he.sibling),R=p(he,B.props),R.ref=Zo($,he,B),R.return=$,$=R;break e}s($,he);break}else n($,he);he=he.sibling}B.type===M?(R=Er(B.props.children,$.mode,ne,B.key),R.return=$,$=R):(ne=Oi(B.type,B.key,B.props,null,$.mode,ne),ne.ref=Zo($,R,B),ne.return=$,$=ne)}return E($);case U:e:{for(he=B.key;R!==null;){if(R.key===he)if(R.tag===4&&R.stateNode.containerInfo===B.containerInfo&&R.stateNode.implementation===B.implementation){s($,R.sibling),R=p(R,B.children||[]),R.return=$,$=R;break e}else{s($,R);break}else n($,R);R=R.sibling}R=Rc(B,$.mode,ne),R.return=$,$=R}return E($);case G:return he=B._init,Fe($,R,he(B._payload),ne)}if(jo(B))return ae($,R,B,ne);if(Z(B))return de($,R,B,ne);fi($,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,R!==null&&R.tag===6?(s($,R.sibling),R=p(R,B),R.return=$,$=R):(s($,R),R=Pc(B,$.mode,ne),R.return=$,$=R),E($)):s($,R)}return Fe}var qr=Qf(!0),Zf=Qf(!1),pi=On(null),hi=null,Qr=null,za=null;function Ua(){za=Qr=hi=null}function Ha(e){var n=pi.current;Pe(pi),e._currentValue=n}function Va(e,n,s){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===s)break;e=e.return}}function Zr(e,n){hi=e,za=Qr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(mt=!0),e.firstContext=null)}function Pt(e){var n=e._currentValue;if(za!==e)if(e={context:e,memoizedValue:n,next:null},Qr===null){if(hi===null)throw Error(o(308));Qr=e,hi.dependencies={lanes:0,firstContext:e}}else Qr=Qr.next=e;return n}var mr=null;function Wa(e){mr===null?mr=[e]:mr.push(e)}function Jf(e,n,s,a){var p=n.interleaved;return p===null?(s.next=s,Wa(n)):(s.next=p.next,p.next=s),n.interleaved=s,mn(e,a)}function mn(e,n){e.lanes|=n;var s=e.alternate;for(s!==null&&(s.lanes|=n),s=e,e=e.return;e!==null;)e.childLanes|=n,s=e.alternate,s!==null&&(s.childLanes|=n),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Fn=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ep(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Bn(e,n,s){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ke&2)!==0){var p=a.pending;return p===null?n.next=n:(n.next=p.next,p.next=n),a.pending=n,mn(e,s)}return p=a.interleaved,p===null?(n.next=n,Wa(a)):(n.next=p.next,p.next=n),a.interleaved=n,mn(e,s)}function mi(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194240)!==0)){var a=n.lanes;a&=e.pendingLanes,s|=a,n.lanes=s,ia(e,s)}}function tp(e,n){var s=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var p=null,m=null;if(s=s.firstBaseUpdate,s!==null){do{var E={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};m===null?p=m=E:m=m.next=E,s=s.next}while(s!==null);m===null?p=m=n:m=m.next=n}else p=m=n;s={baseState:a.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:a.shared,effects:a.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}function gi(e,n,s,a){var p=e.updateQueue;Fn=!1;var m=p.firstBaseUpdate,E=p.lastBaseUpdate,j=p.shared.pending;if(j!==null){p.shared.pending=null;var T=j,z=T.next;T.next=null,E===null?m=z:E.next=z,E=T;var J=e.alternate;J!==null&&(J=J.updateQueue,j=J.lastBaseUpdate,j!==E&&(j===null?J.firstBaseUpdate=z:j.next=z,J.lastBaseUpdate=T))}if(m!==null){var te=p.baseState;E=0,J=z=T=null,j=m;do{var q=j.lane,oe=j.eventTime;if((a&q)===q){J!==null&&(J=J.next={eventTime:oe,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var ae=e,de=j;switch(q=n,oe=s,de.tag){case 1:if(ae=de.payload,typeof ae=="function"){te=ae.call(oe,te,q);break e}te=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,q=typeof ae=="function"?ae.call(oe,te,q):ae,q==null)break e;te=Q({},te,q);break e;case 2:Fn=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,q=p.effects,q===null?p.effects=[j]:q.push(j))}else oe={eventTime:oe,lane:q,tag:j.tag,payload:j.payload,callback:j.callback,next:null},J===null?(z=J=oe,T=te):J=J.next=oe,E|=q;if(j=j.next,j===null){if(j=p.shared.pending,j===null)break;q=j,j=q.next,q.next=null,p.lastBaseUpdate=q,p.shared.pending=null}}while(!0);if(J===null&&(T=te),p.baseState=T,p.firstBaseUpdate=z,p.lastBaseUpdate=J,n=p.shared.interleaved,n!==null){p=n;do E|=p.lane,p=p.next;while(p!==n)}else m===null&&(p.shared.lanes=0);vr|=E,e.lanes=E,e.memoizedState=te}}function np(e,n,s){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var a=e[n],p=a.callback;if(p!==null){if(a.callback=null,a=s,typeof p!="function")throw Error(o(191,p));p.call(a)}}}var Jo={},Jt=On(Jo),es=On(Jo),ts=On(Jo);function gr(e){if(e===Jo)throw Error(o(174));return e}function Ga(e,n){switch(Te(ts,n),Te(es,e),Te(Jt,Jo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Yl(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Yl(n,e)}Pe(Jt),Te(Jt,n)}function Jr(){Pe(Jt),Pe(es),Pe(ts)}function rp(e){gr(ts.current);var n=gr(Jt.current),s=Yl(n,e.type);n!==s&&(Te(es,e),Te(Jt,s))}function Ya(e){es.current===e&&(Pe(Jt),Pe(es))}var Ie=On(0);function xi(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Xa=[];function qa(){for(var e=0;e<Xa.length;e++)Xa[e]._workInProgressVersionPrimary=null;Xa.length=0}var vi=I.ReactCurrentDispatcher,Qa=I.ReactCurrentBatchConfig,xr=0,Le=null,Ve=null,Ge=null,yi=!1,ns=!1,rs=0,dy=0;function it(){throw Error(o(321))}function Za(e,n){if(n===null)return!1;for(var s=0;s<n.length&&s<e.length;s++)if(!Ft(e[s],n[s]))return!1;return!0}function Ja(e,n,s,a,p,m){if(xr=m,Le=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,vi.current=e===null||e.memoizedState===null?my:gy,e=s(a,p),ns){m=0;do{if(ns=!1,rs=0,25<=m)throw Error(o(301));m+=1,Ge=Ve=null,n.updateQueue=null,vi.current=xy,e=s(a,p)}while(ns)}if(vi.current=Ei,n=Ve!==null&&Ve.next!==null,xr=0,Ge=Ve=Le=null,yi=!1,n)throw Error(o(300));return e}function ec(){var e=rs!==0;return rs=0,e}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?Le.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function Rt(){if(Ve===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var n=Ge===null?Le.memoizedState:Ge.next;if(n!==null)Ge=n,Ve=e;else{if(e===null)throw Error(o(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},Ge===null?Le.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function os(e,n){return typeof n=="function"?n(e):n}function tc(e){var n=Rt(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var a=Ve,p=a.baseQueue,m=s.pending;if(m!==null){if(p!==null){var E=p.next;p.next=m.next,m.next=E}a.baseQueue=p=m,s.pending=null}if(p!==null){m=p.next,a=a.baseState;var j=E=null,T=null,z=m;do{var J=z.lane;if((xr&J)===J)T!==null&&(T=T.next={lane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),a=z.hasEagerState?z.eagerState:e(a,z.action);else{var te={lane:J,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null};T===null?(j=T=te,E=a):T=T.next=te,Le.lanes|=J,vr|=J}z=z.next}while(z!==null&&z!==m);T===null?E=a:T.next=j,Ft(a,n.memoizedState)||(mt=!0),n.memoizedState=a,n.baseState=E,n.baseQueue=T,s.lastRenderedState=a}if(e=s.interleaved,e!==null){p=e;do m=p.lane,Le.lanes|=m,vr|=m,p=p.next;while(p!==e)}else p===null&&(s.lanes=0);return[n.memoizedState,s.dispatch]}function nc(e){var n=Rt(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var a=s.dispatch,p=s.pending,m=n.memoizedState;if(p!==null){s.pending=null;var E=p=p.next;do m=e(m,E.action),E=E.next;while(E!==p);Ft(m,n.memoizedState)||(mt=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),s.lastRenderedState=m}return[m,a]}function op(){}function sp(e,n){var s=Le,a=Rt(),p=n(),m=!Ft(a.memoizedState,p);if(m&&(a.memoizedState=p,mt=!0),a=a.queue,rc(ap.bind(null,s,a,e),[e]),a.getSnapshot!==n||m||Ge!==null&&Ge.memoizedState.tag&1){if(s.flags|=2048,ss(9,lp.bind(null,s,a,p,n),void 0,null),Ye===null)throw Error(o(349));(xr&30)!==0||ip(s,n,p)}return p}function ip(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=Le.updateQueue,n===null?(n={lastEffect:null,stores:null},Le.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function lp(e,n,s,a){n.value=s,n.getSnapshot=a,cp(n)&&up(e)}function ap(e,n,s){return s(function(){cp(n)&&up(e)})}function cp(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!Ft(e,s)}catch{return!0}}function up(e){var n=mn(e,1);n!==null&&Vt(n,e,1,-1)}function dp(e){var n=en();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:e},n.queue=e,e=e.dispatch=hy.bind(null,Le,e),[n.memoizedState,e]}function ss(e,n,s,a){return e={tag:e,create:n,destroy:s,deps:a,next:null},n=Le.updateQueue,n===null?(n={lastEffect:null,stores:null},Le.updateQueue=n,n.lastEffect=e.next=e):(s=n.lastEffect,s===null?n.lastEffect=e.next=e:(a=s.next,s.next=e,e.next=a,n.lastEffect=e)),e}function fp(){return Rt().memoizedState}function wi(e,n,s,a){var p=en();Le.flags|=e,p.memoizedState=ss(1|n,s,void 0,a===void 0?null:a)}function bi(e,n,s,a){var p=Rt();a=a===void 0?null:a;var m=void 0;if(Ve!==null){var E=Ve.memoizedState;if(m=E.destroy,a!==null&&Za(a,E.deps)){p.memoizedState=ss(n,s,m,a);return}}Le.flags|=e,p.memoizedState=ss(1|n,s,m,a)}function pp(e,n){return wi(8390656,8,e,n)}function rc(e,n){return bi(2048,8,e,n)}function hp(e,n){return bi(4,2,e,n)}function mp(e,n){return bi(4,4,e,n)}function gp(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function xp(e,n,s){return s=s!=null?s.concat([e]):null,bi(4,4,gp.bind(null,n,e),s)}function oc(){}function vp(e,n){var s=Rt();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&Za(n,a[1])?a[0]:(s.memoizedState=[e,n],e)}function yp(e,n){var s=Rt();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&Za(n,a[1])?a[0]:(e=e(),s.memoizedState=[e,n],e)}function wp(e,n,s){return(xr&21)===0?(e.baseState&&(e.baseState=!1,mt=!0),e.memoizedState=s):(Ft(s,n)||(s=Xd(),Le.lanes|=s,vr|=s,e.baseState=!0),n)}function fy(e,n){var s=je;je=s!==0&&4>s?s:4,e(!0);var a=Qa.transition;Qa.transition={};try{e(!1),n()}finally{je=s,Qa.transition=a}}function bp(){return Rt().memoizedState}function py(e,n,s){var a=Vn(e);if(s={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null},Ep(e))Np(n,s);else if(s=Jf(e,n,s,a),s!==null){var p=dt();Vt(s,e,a,p),Cp(s,n,a)}}function hy(e,n,s){var a=Vn(e),p={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null};if(Ep(e))Np(n,p);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var E=n.lastRenderedState,j=m(E,s);if(p.hasEagerState=!0,p.eagerState=j,Ft(j,E)){var T=n.interleaved;T===null?(p.next=p,Wa(n)):(p.next=T.next,T.next=p),n.interleaved=p;return}}catch{}finally{}s=Jf(e,n,p,a),s!==null&&(p=dt(),Vt(s,e,a,p),Cp(s,n,a))}}function Ep(e){var n=e.alternate;return e===Le||n!==null&&n===Le}function Np(e,n){ns=yi=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function Cp(e,n,s){if((s&4194240)!==0){var a=n.lanes;a&=e.pendingLanes,s|=a,n.lanes=s,ia(e,s)}}var Ei={readContext:Pt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},my={readContext:Pt,useCallback:function(e,n){return en().memoizedState=[e,n===void 0?null:n],e},useContext:Pt,useEffect:pp,useImperativeHandle:function(e,n,s){return s=s!=null?s.concat([e]):null,wi(4194308,4,gp.bind(null,n,e),s)},useLayoutEffect:function(e,n){return wi(4194308,4,e,n)},useInsertionEffect:function(e,n){return wi(4,2,e,n)},useMemo:function(e,n){var s=en();return n=n===void 0?null:n,e=e(),s.memoizedState=[e,n],e},useReducer:function(e,n,s){var a=en();return n=s!==void 0?s(n):n,a.memoizedState=a.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=py.bind(null,Le,e),[a.memoizedState,e]},useRef:function(e){var n=en();return e={current:e},n.memoizedState=e},useState:dp,useDebugValue:oc,useDeferredValue:function(e){return en().memoizedState=e},useTransition:function(){var e=dp(!1),n=e[0];return e=fy.bind(null,e[1]),en().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,s){var a=Le,p=en();if(Re){if(s===void 0)throw Error(o(407));s=s()}else{if(s=n(),Ye===null)throw Error(o(349));(xr&30)!==0||ip(a,n,s)}p.memoizedState=s;var m={value:s,getSnapshot:n};return p.queue=m,pp(ap.bind(null,a,m,e),[e]),a.flags|=2048,ss(9,lp.bind(null,a,m,s,n),void 0,null),s},useId:function(){var e=en(),n=Ye.identifierPrefix;if(Re){var s=hn,a=pn;s=(a&~(1<<32-$t(a)-1)).toString(32)+s,n=":"+n+"R"+s,s=rs++,0<s&&(n+="H"+s.toString(32)),n+=":"}else s=dy++,n=":"+n+"r"+s.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},gy={readContext:Pt,useCallback:vp,useContext:Pt,useEffect:rc,useImperativeHandle:xp,useInsertionEffect:hp,useLayoutEffect:mp,useMemo:yp,useReducer:tc,useRef:fp,useState:function(){return tc(os)},useDebugValue:oc,useDeferredValue:function(e){var n=Rt();return wp(n,Ve.memoizedState,e)},useTransition:function(){var e=tc(os)[0],n=Rt().memoizedState;return[e,n]},useMutableSource:op,useSyncExternalStore:sp,useId:bp,unstable_isNewReconciler:!1},xy={readContext:Pt,useCallback:vp,useContext:Pt,useEffect:rc,useImperativeHandle:xp,useInsertionEffect:hp,useLayoutEffect:mp,useMemo:yp,useReducer:nc,useRef:fp,useState:function(){return nc(os)},useDebugValue:oc,useDeferredValue:function(e){var n=Rt();return Ve===null?n.memoizedState=e:wp(n,Ve.memoizedState,e)},useTransition:function(){var e=nc(os)[0],n=Rt().memoizedState;return[e,n]},useMutableSource:op,useSyncExternalStore:sp,useId:bp,unstable_isNewReconciler:!1};function zt(e,n){if(e&&e.defaultProps){n=Q({},n),e=e.defaultProps;for(var s in e)n[s]===void 0&&(n[s]=e[s]);return n}return n}function sc(e,n,s,a){n=e.memoizedState,s=s(a,n),s=s==null?n:Q({},n,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Ni={isMounted:function(e){return(e=e._reactInternals)?ur(e)===e:!1},enqueueSetState:function(e,n,s){e=e._reactInternals;var a=dt(),p=Vn(e),m=gn(a,p);m.payload=n,s!=null&&(m.callback=s),n=Bn(e,m,p),n!==null&&(Vt(n,e,p,a),mi(n,e,p))},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var a=dt(),p=Vn(e),m=gn(a,p);m.tag=1,m.payload=n,s!=null&&(m.callback=s),n=Bn(e,m,p),n!==null&&(Vt(n,e,p,a),mi(n,e,p))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=dt(),a=Vn(e),p=gn(s,a);p.tag=2,n!=null&&(p.callback=n),n=Bn(e,p,a),n!==null&&(Vt(n,e,a,s),mi(n,e,a))}};function kp(e,n,s,a,p,m,E){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,m,E):n.prototype&&n.prototype.isPureReactComponent?!Wo(s,a)||!Wo(p,m):!0}function Sp(e,n,s){var a=!1,p=Dn,m=n.contextType;return typeof m=="object"&&m!==null?m=Pt(m):(p=ht(n)?fr:st.current,a=n.contextTypes,m=(a=a!=null)?Kr(e,p):Dn),n=new n(s,m),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Ni,e.stateNode=n,n._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=p,e.__reactInternalMemoizedMaskedChildContext=m),n}function jp(e,n,s,a){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,a),n.state!==e&&Ni.enqueueReplaceState(n,n.state,null)}function ic(e,n,s,a){var p=e.stateNode;p.props=s,p.state=e.memoizedState,p.refs={},Ka(e);var m=n.contextType;typeof m=="object"&&m!==null?p.context=Pt(m):(m=ht(n)?fr:st.current,p.context=Kr(e,m)),p.state=e.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(sc(e,n,m,s),p.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(n=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),n!==p.state&&Ni.enqueueReplaceState(p,p.state,null),gi(e,s,p,a),p.state=e.memoizedState),typeof p.componentDidMount=="function"&&(e.flags|=4194308)}function eo(e,n){try{var s="",a=n;do s+=ge(a),a=a.return;while(a);var p=s}catch(m){p=`
40
+ Error generating stack: `+m.message+`
41
+ `+m.stack}return{value:e,source:n,stack:p,digest:null}}function lc(e,n,s){return{value:e,source:null,stack:s??null,digest:n??null}}function ac(e,n){try{console.error(n.value)}catch(s){setTimeout(function(){throw s})}}var vy=typeof WeakMap=="function"?WeakMap:Map;function Ap(e,n,s){s=gn(-1,s),s.tag=3,s.payload={element:null};var a=n.value;return s.callback=function(){_i||(_i=!0,Nc=a),ac(e,n)},s}function Tp(e,n,s){s=gn(-1,s),s.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var p=n.value;s.payload=function(){return a(p)},s.callback=function(){ac(e,n)}}var m=e.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(s.callback=function(){ac(e,n),typeof a!="function"&&(Un===null?Un=new Set([this]):Un.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})}),s}function _p(e,n,s){var a=e.pingCache;if(a===null){a=e.pingCache=new vy;var p=new Set;a.set(n,p)}else p=a.get(n),p===void 0&&(p=new Set,a.set(n,p));p.has(s)||(p.add(s),e=Ry.bind(null,e,n,s),n.then(e,e))}function Pp(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Rp(e,n,s,a,p){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(n=gn(-1,1),n.tag=2,Bn(s,n,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=p,e)}var yy=I.ReactCurrentOwner,mt=!1;function ut(e,n,s,a){n.child=e===null?Zf(n,null,s,a):qr(n,e.child,s,a)}function Ip(e,n,s,a,p){s=s.render;var m=n.ref;return Zr(n,p),a=Ja(e,n,s,a,m,p),s=ec(),e!==null&&!mt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~p,xn(e,n,p)):(Re&&s&&Oa(n),n.flags|=1,ut(e,n,a,p),n.child)}function Lp(e,n,s,a,p){if(e===null){var m=s.type;return typeof m=="function"&&!_c(m)&&m.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(n.tag=15,n.type=m,Mp(e,n,m,a,p)):(e=Oi(s.type,null,a,n,n.mode,p),e.ref=n.ref,e.return=n,n.child=e)}if(m=e.child,(e.lanes&p)===0){var E=m.memoizedProps;if(s=s.compare,s=s!==null?s:Wo,s(E,a)&&e.ref===n.ref)return xn(e,n,p)}return n.flags|=1,e=Kn(m,a),e.ref=n.ref,e.return=n,n.child=e}function Mp(e,n,s,a,p){if(e!==null){var m=e.memoizedProps;if(Wo(m,a)&&e.ref===n.ref)if(mt=!1,n.pendingProps=a=m,(e.lanes&p)!==0)(e.flags&131072)!==0&&(mt=!0);else return n.lanes=e.lanes,xn(e,n,p)}return cc(e,n,s,a,p)}function Op(e,n,s){var a=n.pendingProps,p=a.children,m=e!==null?e.memoizedState:null;if(a.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Te(no,kt),kt|=s;else{if((s&1073741824)===0)return e=m!==null?m.baseLanes|s:s,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Te(no,kt),kt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=m!==null?m.baseLanes:s,Te(no,kt),kt|=a}else m!==null?(a=m.baseLanes|s,n.memoizedState=null):a=s,Te(no,kt),kt|=a;return ut(e,n,p,s),n.child}function Dp(e,n){var s=n.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(n.flags|=512,n.flags|=2097152)}function cc(e,n,s,a,p){var m=ht(s)?fr:st.current;return m=Kr(n,m),Zr(n,p),s=Ja(e,n,s,a,m,p),a=ec(),e!==null&&!mt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~p,xn(e,n,p)):(Re&&a&&Oa(n),n.flags|=1,ut(e,n,s,p),n.child)}function $p(e,n,s,a,p){if(ht(s)){var m=!0;li(n)}else m=!1;if(Zr(n,p),n.stateNode===null)ki(e,n),Sp(n,s,a),ic(n,s,a,p),a=!0;else if(e===null){var E=n.stateNode,j=n.memoizedProps;E.props=j;var T=E.context,z=s.contextType;typeof z=="object"&&z!==null?z=Pt(z):(z=ht(s)?fr:st.current,z=Kr(n,z));var J=s.getDerivedStateFromProps,te=typeof J=="function"||typeof E.getSnapshotBeforeUpdate=="function";te||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(j!==a||T!==z)&&jp(n,E,a,z),Fn=!1;var q=n.memoizedState;E.state=q,gi(n,a,E,p),T=n.memoizedState,j!==a||q!==T||pt.current||Fn?(typeof J=="function"&&(sc(n,s,J,a),T=n.memoizedState),(j=Fn||kp(n,s,j,a,q,T,z))?(te||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(n.flags|=4194308)):(typeof E.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=T),E.props=a,E.state=T,E.context=z,a=j):(typeof E.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{E=n.stateNode,ep(e,n),j=n.memoizedProps,z=n.type===n.elementType?j:zt(n.type,j),E.props=z,te=n.pendingProps,q=E.context,T=s.contextType,typeof T=="object"&&T!==null?T=Pt(T):(T=ht(s)?fr:st.current,T=Kr(n,T));var oe=s.getDerivedStateFromProps;(J=typeof oe=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(j!==te||q!==T)&&jp(n,E,a,T),Fn=!1,q=n.memoizedState,E.state=q,gi(n,a,E,p);var ae=n.memoizedState;j!==te||q!==ae||pt.current||Fn?(typeof oe=="function"&&(sc(n,s,oe,a),ae=n.memoizedState),(z=Fn||kp(n,s,z,a,q,ae,T)||!1)?(J||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(a,ae,T),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(a,ae,T)),typeof E.componentDidUpdate=="function"&&(n.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof E.componentDidUpdate!="function"||j===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=ae),E.props=a,E.state=ae,E.context=T,a=z):(typeof E.componentDidUpdate!="function"||j===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),a=!1)}return uc(e,n,s,a,m,p)}function uc(e,n,s,a,p,m){Dp(e,n);var E=(n.flags&128)!==0;if(!a&&!E)return p&&Hf(n,s,!1),xn(e,n,m);a=n.stateNode,yy.current=n;var j=E&&typeof s.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,e!==null&&E?(n.child=qr(n,e.child,null,m),n.child=qr(n,null,j,m)):ut(e,n,j,m),n.memoizedState=a.state,p&&Hf(n,s,!0),n.child}function Fp(e){var n=e.stateNode;n.pendingContext?zf(e,n.pendingContext,n.pendingContext!==n.context):n.context&&zf(e,n.context,!1),Ga(e,n.containerInfo)}function Bp(e,n,s,a,p){return Xr(),Ba(p),n.flags|=256,ut(e,n,s,a),n.child}var dc={dehydrated:null,treeContext:null,retryLane:0};function fc(e){return{baseLanes:e,cachePool:null,transitions:null}}function zp(e,n,s){var a=n.pendingProps,p=Ie.current,m=!1,E=(n.flags&128)!==0,j;if((j=E)||(j=e!==null&&e.memoizedState===null?!1:(p&2)!==0),j?(m=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(p|=1),Te(Ie,p&1),e===null)return Fa(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(E=a.children,e=a.fallback,m?(a=n.mode,m=n.child,E={mode:"hidden",children:E},(a&1)===0&&m!==null?(m.childLanes=0,m.pendingProps=E):m=Di(E,a,0,null),e=Er(e,a,s,null),m.return=n,e.return=n,m.sibling=e,n.child=m,n.child.memoizedState=fc(s),n.memoizedState=dc,e):pc(n,E));if(p=e.memoizedState,p!==null&&(j=p.dehydrated,j!==null))return wy(e,n,E,a,j,p,s);if(m){m=a.fallback,E=n.mode,p=e.child,j=p.sibling;var T={mode:"hidden",children:a.children};return(E&1)===0&&n.child!==p?(a=n.child,a.childLanes=0,a.pendingProps=T,n.deletions=null):(a=Kn(p,T),a.subtreeFlags=p.subtreeFlags&14680064),j!==null?m=Kn(j,m):(m=Er(m,E,s,null),m.flags|=2),m.return=n,a.return=n,a.sibling=m,n.child=a,a=m,m=n.child,E=e.child.memoizedState,E=E===null?fc(s):{baseLanes:E.baseLanes|s,cachePool:null,transitions:E.transitions},m.memoizedState=E,m.childLanes=e.childLanes&~s,n.memoizedState=dc,a}return m=e.child,e=m.sibling,a=Kn(m,{mode:"visible",children:a.children}),(n.mode&1)===0&&(a.lanes=s),a.return=n,a.sibling=null,e!==null&&(s=n.deletions,s===null?(n.deletions=[e],n.flags|=16):s.push(e)),n.child=a,n.memoizedState=null,a}function pc(e,n){return n=Di({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Ci(e,n,s,a){return a!==null&&Ba(a),qr(n,e.child,null,s),e=pc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function wy(e,n,s,a,p,m,E){if(s)return n.flags&256?(n.flags&=-257,a=lc(Error(o(422))),Ci(e,n,E,a)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(m=a.fallback,p=n.mode,a=Di({mode:"visible",children:a.children},p,0,null),m=Er(m,p,E,null),m.flags|=2,a.return=n,m.return=n,a.sibling=m,n.child=a,(n.mode&1)!==0&&qr(n,e.child,null,E),n.child.memoizedState=fc(E),n.memoizedState=dc,m);if((n.mode&1)===0)return Ci(e,n,E,null);if(p.data==="$!"){if(a=p.nextSibling&&p.nextSibling.dataset,a)var j=a.dgst;return a=j,m=Error(o(419)),a=lc(m,a,void 0),Ci(e,n,E,a)}if(j=(E&e.childLanes)!==0,mt||j){if(a=Ye,a!==null){switch(E&-E){case 4:p=2;break;case 16:p=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(a.suspendedLanes|E))!==0?0:p,p!==0&&p!==m.retryLane&&(m.retryLane=p,mn(e,p),Vt(a,e,p,-1))}return Tc(),a=lc(Error(o(421))),Ci(e,n,E,a)}return p.data==="$?"?(n.flags|=128,n.child=e.child,n=Iy.bind(null,e),p._reactRetry=n,null):(e=m.treeContext,Ct=Mn(p.nextSibling),Nt=n,Re=!0,Bt=null,e!==null&&(Tt[_t++]=pn,Tt[_t++]=hn,Tt[_t++]=pr,pn=e.id,hn=e.overflow,pr=n),n=pc(n,a.children),n.flags|=4096,n)}function Up(e,n,s){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),Va(e.return,n,s)}function hc(e,n,s,a,p){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:p}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=a,m.tail=s,m.tailMode=p)}function Hp(e,n,s){var a=n.pendingProps,p=a.revealOrder,m=a.tail;if(ut(e,n,a.children,s),a=Ie.current,(a&2)!==0)a=a&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Up(e,s,n);else if(e.tag===19)Up(e,s,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Te(Ie,a),(n.mode&1)===0)n.memoizedState=null;else switch(p){case"forwards":for(s=n.child,p=null;s!==null;)e=s.alternate,e!==null&&xi(e)===null&&(p=s),s=s.sibling;s=p,s===null?(p=n.child,n.child=null):(p=s.sibling,s.sibling=null),hc(n,!1,p,s,m);break;case"backwards":for(s=null,p=n.child,n.child=null;p!==null;){if(e=p.alternate,e!==null&&xi(e)===null){n.child=p;break}e=p.sibling,p.sibling=s,s=p,p=e}hc(n,!0,s,null,m);break;case"together":hc(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function ki(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function xn(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),vr|=n.lanes,(s&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,s=Kn(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=Kn(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function by(e,n,s){switch(n.tag){case 3:Fp(n),Xr();break;case 5:rp(n);break;case 1:ht(n.type)&&li(n);break;case 4:Ga(n,n.stateNode.containerInfo);break;case 10:var a=n.type._context,p=n.memoizedProps.value;Te(pi,a._currentValue),a._currentValue=p;break;case 13:if(a=n.memoizedState,a!==null)return a.dehydrated!==null?(Te(Ie,Ie.current&1),n.flags|=128,null):(s&n.child.childLanes)!==0?zp(e,n,s):(Te(Ie,Ie.current&1),e=xn(e,n,s),e!==null?e.sibling:null);Te(Ie,Ie.current&1);break;case 19:if(a=(s&n.childLanes)!==0,(e.flags&128)!==0){if(a)return Hp(e,n,s);n.flags|=128}if(p=n.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Te(Ie,Ie.current),a)break;return null;case 22:case 23:return n.lanes=0,Op(e,n,s)}return xn(e,n,s)}var Vp,mc,Wp,Kp;Vp=function(e,n){for(var s=n.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},mc=function(){},Wp=function(e,n,s,a){var p=e.memoizedProps;if(p!==a){e=n.stateNode,gr(Jt.current);var m=null;switch(s){case"input":p=bt(e,p),a=bt(e,a),m=[];break;case"select":p=Q({},p,{value:void 0}),a=Q({},a,{value:void 0}),m=[];break;case"textarea":p=Gl(e,p),a=Gl(e,a),m=[];break;default:typeof p.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=oi)}Xl(s,a);var E;s=null;for(z in p)if(!a.hasOwnProperty(z)&&p.hasOwnProperty(z)&&p[z]!=null)if(z==="style"){var j=p[z];for(E in j)j.hasOwnProperty(E)&&(s||(s={}),s[E]="")}else z!=="dangerouslySetInnerHTML"&&z!=="children"&&z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(l.hasOwnProperty(z)?m||(m=[]):(m=m||[]).push(z,null));for(z in a){var T=a[z];if(j=p!=null?p[z]:void 0,a.hasOwnProperty(z)&&T!==j&&(T!=null||j!=null))if(z==="style")if(j){for(E in j)!j.hasOwnProperty(E)||T&&T.hasOwnProperty(E)||(s||(s={}),s[E]="");for(E in T)T.hasOwnProperty(E)&&j[E]!==T[E]&&(s||(s={}),s[E]=T[E])}else s||(m||(m=[]),m.push(z,s)),s=T;else z==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,j=j?j.__html:void 0,T!=null&&j!==T&&(m=m||[]).push(z,T)):z==="children"?typeof T!="string"&&typeof T!="number"||(m=m||[]).push(z,""+T):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&(l.hasOwnProperty(z)?(T!=null&&z==="onScroll"&&_e("scroll",e),m||j===T||(m=[])):(m=m||[]).push(z,T))}s&&(m=m||[]).push("style",s);var z=m;(n.updateQueue=z)&&(n.flags|=4)}},Kp=function(e,n,s,a){s!==a&&(n.flags|=4)};function is(e,n){if(!Re)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function lt(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,a=0;if(n)for(var p=e.child;p!==null;)s|=p.lanes|p.childLanes,a|=p.subtreeFlags&14680064,a|=p.flags&14680064,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)s|=p.lanes|p.childLanes,a|=p.subtreeFlags,a|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=a,e.childLanes=s,n}function Ey(e,n,s){var a=n.pendingProps;switch(Da(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(n),null;case 1:return ht(n.type)&&ii(),lt(n),null;case 3:return a=n.stateNode,Jr(),Pe(pt),Pe(st),qa(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(di(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Bt!==null&&(Sc(Bt),Bt=null))),mc(e,n),lt(n),null;case 5:Ya(n);var p=gr(ts.current);if(s=n.type,e!==null&&n.stateNode!=null)Wp(e,n,s,a,p),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!a){if(n.stateNode===null)throw Error(o(166));return lt(n),null}if(e=gr(Jt.current),di(n)){a=n.stateNode,s=n.type;var m=n.memoizedProps;switch(a[Zt]=n,a[qo]=m,e=(n.mode&1)!==0,s){case"dialog":_e("cancel",a),_e("close",a);break;case"iframe":case"object":case"embed":_e("load",a);break;case"video":case"audio":for(p=0;p<Go.length;p++)_e(Go[p],a);break;case"source":_e("error",a);break;case"img":case"image":case"link":_e("error",a),_e("load",a);break;case"details":_e("toggle",a);break;case"input":ar(a,m),_e("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!m.multiple},_e("invalid",a);break;case"textarea":Ad(a,m),_e("invalid",a)}Xl(s,m),p=null;for(var E in m)if(m.hasOwnProperty(E)){var j=m[E];E==="children"?typeof j=="string"?a.textContent!==j&&(m.suppressHydrationWarning!==!0&&ri(a.textContent,j,e),p=["children",j]):typeof j=="number"&&a.textContent!==""+j&&(m.suppressHydrationWarning!==!0&&ri(a.textContent,j,e),p=["children",""+j]):l.hasOwnProperty(E)&&j!=null&&E==="onScroll"&&_e("scroll",a)}switch(s){case"input":ft(a),Ms(a,m,!0);break;case"textarea":ft(a),_d(a);break;case"select":case"option":break;default:typeof m.onClick=="function"&&(a.onclick=oi)}a=p,n.updateQueue=a,a!==null&&(n.flags|=4)}else{E=p.nodeType===9?p:p.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Pd(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=E.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=E.createElement(s,{is:a.is}):(e=E.createElement(s),s==="select"&&(E=e,a.multiple?E.multiple=!0:a.size&&(E.size=a.size))):e=E.createElementNS(e,s),e[Zt]=n,e[qo]=a,Vp(e,n,!1,!1),n.stateNode=e;e:{switch(E=ql(s,a),s){case"dialog":_e("cancel",e),_e("close",e),p=a;break;case"iframe":case"object":case"embed":_e("load",e),p=a;break;case"video":case"audio":for(p=0;p<Go.length;p++)_e(Go[p],e);p=a;break;case"source":_e("error",e),p=a;break;case"img":case"image":case"link":_e("error",e),_e("load",e),p=a;break;case"details":_e("toggle",e),p=a;break;case"input":ar(e,a),p=bt(e,a),_e("invalid",e);break;case"option":p=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},p=Q({},a,{value:void 0}),_e("invalid",e);break;case"textarea":Ad(e,a),p=Gl(e,a),_e("invalid",e);break;default:p=a}Xl(s,p),j=p;for(m in j)if(j.hasOwnProperty(m)){var T=j[m];m==="style"?Ld(e,T):m==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&Rd(e,T)):m==="children"?typeof T=="string"?(s!=="textarea"||T!=="")&&Ao(e,T):typeof T=="number"&&Ao(e,""+T):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(l.hasOwnProperty(m)?T!=null&&m==="onScroll"&&_e("scroll",e):T!=null&&_(e,m,T,E))}switch(s){case"input":ft(e),Ms(e,a,!1);break;case"textarea":ft(e),_d(e);break;case"option":a.value!=null&&e.setAttribute("value",""+Ee(a.value));break;case"select":e.multiple=!!a.multiple,m=a.value,m!=null?Lr(e,!!a.multiple,m,!1):a.defaultValue!=null&&Lr(e,!!a.multiple,a.defaultValue,!0);break;default:typeof p.onClick=="function"&&(e.onclick=oi)}switch(s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return lt(n),null;case 6:if(e&&n.stateNode!=null)Kp(e,n,e.memoizedProps,a);else{if(typeof a!="string"&&n.stateNode===null)throw Error(o(166));if(s=gr(ts.current),gr(Jt.current),di(n)){if(a=n.stateNode,s=n.memoizedProps,a[Zt]=n,(m=a.nodeValue!==s)&&(e=Nt,e!==null))switch(e.tag){case 3:ri(a.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ri(a.nodeValue,s,(e.mode&1)!==0)}m&&(n.flags|=4)}else a=(s.nodeType===9?s:s.ownerDocument).createTextNode(a),a[Zt]=n,n.stateNode=a}return lt(n),null;case 13:if(Pe(Ie),a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Re&&Ct!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Xf(),Xr(),n.flags|=98560,m=!1;else if(m=di(n),a!==null&&a.dehydrated!==null){if(e===null){if(!m)throw Error(o(318));if(m=n.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[Zt]=n}else Xr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;lt(n),m=!1}else Bt!==null&&(Sc(Bt),Bt=null),m=!0;if(!m)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=s,n):(a=a!==null,a!==(e!==null&&e.memoizedState!==null)&&a&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Ie.current&1)!==0?We===0&&(We=3):Tc())),n.updateQueue!==null&&(n.flags|=4),lt(n),null);case 4:return Jr(),mc(e,n),e===null&&Yo(n.stateNode.containerInfo),lt(n),null;case 10:return Ha(n.type._context),lt(n),null;case 17:return ht(n.type)&&ii(),lt(n),null;case 19:if(Pe(Ie),m=n.memoizedState,m===null)return lt(n),null;if(a=(n.flags&128)!==0,E=m.rendering,E===null)if(a)is(m,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(E=xi(e),E!==null){for(n.flags|=128,is(m,!1),a=E.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),n.subtreeFlags=0,a=s,s=n.child;s!==null;)m=s,e=a,m.flags&=14680066,E=m.alternate,E===null?(m.childLanes=0,m.lanes=e,m.child=null,m.subtreeFlags=0,m.memoizedProps=null,m.memoizedState=null,m.updateQueue=null,m.dependencies=null,m.stateNode=null):(m.childLanes=E.childLanes,m.lanes=E.lanes,m.child=E.child,m.subtreeFlags=0,m.deletions=null,m.memoizedProps=E.memoizedProps,m.memoizedState=E.memoizedState,m.updateQueue=E.updateQueue,m.type=E.type,e=E.dependencies,m.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Te(Ie,Ie.current&1|2),n.child}e=e.sibling}m.tail!==null&&$e()>ro&&(n.flags|=128,a=!0,is(m,!1),n.lanes=4194304)}else{if(!a)if(e=xi(E),e!==null){if(n.flags|=128,a=!0,s=e.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),is(m,!0),m.tail===null&&m.tailMode==="hidden"&&!E.alternate&&!Re)return lt(n),null}else 2*$e()-m.renderingStartTime>ro&&s!==1073741824&&(n.flags|=128,a=!0,is(m,!1),n.lanes=4194304);m.isBackwards?(E.sibling=n.child,n.child=E):(s=m.last,s!==null?s.sibling=E:n.child=E,m.last=E)}return m.tail!==null?(n=m.tail,m.rendering=n,m.tail=n.sibling,m.renderingStartTime=$e(),n.sibling=null,s=Ie.current,Te(Ie,a?s&1|2:s&1),n):(lt(n),null);case 22:case 23:return Ac(),a=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(kt&1073741824)!==0&&(lt(n),n.subtreeFlags&6&&(n.flags|=8192)):lt(n),null;case 24:return null;case 25:return null}throw Error(o(156,n.tag))}function Ny(e,n){switch(Da(n),n.tag){case 1:return ht(n.type)&&ii(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Jr(),Pe(pt),Pe(st),qa(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Ya(n),null;case 13:if(Pe(Ie),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));Xr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Pe(Ie),null;case 4:return Jr(),null;case 10:return Ha(n.type._context),null;case 22:case 23:return Ac(),null;case 24:return null;default:return null}}var Si=!1,at=!1,Cy=typeof WeakSet=="function"?WeakSet:Set,ie=null;function to(e,n){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(a){De(e,n,a)}else s.current=null}function gc(e,n,s){try{s()}catch(a){De(e,n,a)}}var Gp=!1;function ky(e,n){if(Aa=Ks,e=kf(),wa(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var p=a.anchorOffset,m=a.focusNode;a=a.focusOffset;try{s.nodeType,m.nodeType}catch{s=null;break e}var E=0,j=-1,T=-1,z=0,J=0,te=e,q=null;t:for(;;){for(var oe;te!==s||p!==0&&te.nodeType!==3||(j=E+p),te!==m||a!==0&&te.nodeType!==3||(T=E+a),te.nodeType===3&&(E+=te.nodeValue.length),(oe=te.firstChild)!==null;)q=te,te=oe;for(;;){if(te===e)break t;if(q===s&&++z===p&&(j=E),q===m&&++J===a&&(T=E),(oe=te.nextSibling)!==null)break;te=q,q=te.parentNode}te=oe}s=j===-1||T===-1?null:{start:j,end:T}}else s=null}s=s||{start:0,end:0}}else s=null;for(Ta={focusedElem:e,selectionRange:s},Ks=!1,ie=n;ie!==null;)if(n=ie,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ie=e;else for(;ie!==null;){n=ie;try{var ae=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ae!==null){var de=ae.memoizedProps,Fe=ae.memoizedState,$=n.stateNode,R=$.getSnapshotBeforeUpdate(n.elementType===n.type?de:zt(n.type,de),Fe);$.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var B=n.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ne){De(n,n.return,ne)}if(e=n.sibling,e!==null){e.return=n.return,ie=e;break}ie=n.return}return ae=Gp,Gp=!1,ae}function ls(e,n,s){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var p=a=a.next;do{if((p.tag&e)===e){var m=p.destroy;p.destroy=void 0,m!==void 0&&gc(n,s,m)}p=p.next}while(p!==a)}}function ji(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var a=s.create;s.destroy=a()}s=s.next}while(s!==n)}}function xc(e){var n=e.ref;if(n!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof n=="function"?n(e):n.current=e}}function Yp(e){var n=e.alternate;n!==null&&(e.alternate=null,Yp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Zt],delete n[qo],delete n[Ia],delete n[ly],delete n[ay])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Xp(e){return e.tag===5||e.tag===3||e.tag===4}function qp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vc(e,n,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?s.nodeType===8?s.parentNode.insertBefore(e,n):s.insertBefore(e,n):(s.nodeType===8?(n=s.parentNode,n.insertBefore(e,s)):(n=s,n.appendChild(e)),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=oi));else if(a!==4&&(e=e.child,e!==null))for(vc(e,n,s),e=e.sibling;e!==null;)vc(e,n,s),e=e.sibling}function yc(e,n,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(yc(e,n,s),e=e.sibling;e!==null;)yc(e,n,s),e=e.sibling}var nt=null,Ut=!1;function zn(e,n,s){for(s=s.child;s!==null;)Qp(e,n,s),s=s.sibling}function Qp(e,n,s){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Bs,s)}catch{}switch(s.tag){case 5:at||to(s,n);case 6:var a=nt,p=Ut;nt=null,zn(e,n,s),nt=a,Ut=p,nt!==null&&(Ut?(e=nt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):nt.removeChild(s.stateNode));break;case 18:nt!==null&&(Ut?(e=nt,s=s.stateNode,e.nodeType===8?Ra(e.parentNode,s):e.nodeType===1&&Ra(e,s),Fo(e)):Ra(nt,s.stateNode));break;case 4:a=nt,p=Ut,nt=s.stateNode.containerInfo,Ut=!0,zn(e,n,s),nt=a,Ut=p;break;case 0:case 11:case 14:case 15:if(!at&&(a=s.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){p=a=a.next;do{var m=p,E=m.destroy;m=m.tag,E!==void 0&&((m&2)!==0||(m&4)!==0)&&gc(s,n,E),p=p.next}while(p!==a)}zn(e,n,s);break;case 1:if(!at&&(to(s,n),a=s.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=s.memoizedProps,a.state=s.memoizedState,a.componentWillUnmount()}catch(j){De(s,n,j)}zn(e,n,s);break;case 21:zn(e,n,s);break;case 22:s.mode&1?(at=(a=at)||s.memoizedState!==null,zn(e,n,s),at=a):zn(e,n,s);break;default:zn(e,n,s)}}function Zp(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new Cy),n.forEach(function(a){var p=Ly.bind(null,e,a);s.has(a)||(s.add(a),a.then(p,p))})}}function Ht(e,n){var s=n.deletions;if(s!==null)for(var a=0;a<s.length;a++){var p=s[a];try{var m=e,E=n,j=E;e:for(;j!==null;){switch(j.tag){case 5:nt=j.stateNode,Ut=!1;break e;case 3:nt=j.stateNode.containerInfo,Ut=!0;break e;case 4:nt=j.stateNode.containerInfo,Ut=!0;break e}j=j.return}if(nt===null)throw Error(o(160));Qp(m,E,p),nt=null,Ut=!1;var T=p.alternate;T!==null&&(T.return=null),p.return=null}catch(z){De(p,n,z)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Jp(n,e),n=n.sibling}function Jp(e,n){var s=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(n,e),tn(e),a&4){try{ls(3,e,e.return),ji(3,e)}catch(de){De(e,e.return,de)}try{ls(5,e,e.return)}catch(de){De(e,e.return,de)}}break;case 1:Ht(n,e),tn(e),a&512&&s!==null&&to(s,s.return);break;case 5:if(Ht(n,e),tn(e),a&512&&s!==null&&to(s,s.return),e.flags&32){var p=e.stateNode;try{Ao(p,"")}catch(de){De(e,e.return,de)}}if(a&4&&(p=e.stateNode,p!=null)){var m=e.memoizedProps,E=s!==null?s.memoizedProps:m,j=e.type,T=e.updateQueue;if(e.updateQueue=null,T!==null)try{j==="input"&&m.type==="radio"&&m.name!=null&&cr(p,m),ql(j,E);var z=ql(j,m);for(E=0;E<T.length;E+=2){var J=T[E],te=T[E+1];J==="style"?Ld(p,te):J==="dangerouslySetInnerHTML"?Rd(p,te):J==="children"?Ao(p,te):_(p,J,te,z)}switch(j){case"input":So(p,m);break;case"textarea":Td(p,m);break;case"select":var q=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!m.multiple;var oe=m.value;oe!=null?Lr(p,!!m.multiple,oe,!1):q!==!!m.multiple&&(m.defaultValue!=null?Lr(p,!!m.multiple,m.defaultValue,!0):Lr(p,!!m.multiple,m.multiple?[]:"",!1))}p[qo]=m}catch(de){De(e,e.return,de)}}break;case 6:if(Ht(n,e),tn(e),a&4){if(e.stateNode===null)throw Error(o(162));p=e.stateNode,m=e.memoizedProps;try{p.nodeValue=m}catch(de){De(e,e.return,de)}}break;case 3:if(Ht(n,e),tn(e),a&4&&s!==null&&s.memoizedState.isDehydrated)try{Fo(n.containerInfo)}catch(de){De(e,e.return,de)}break;case 4:Ht(n,e),tn(e);break;case 13:Ht(n,e),tn(e),p=e.child,p.flags&8192&&(m=p.memoizedState!==null,p.stateNode.isHidden=m,!m||p.alternate!==null&&p.alternate.memoizedState!==null||(Ec=$e())),a&4&&Zp(e);break;case 22:if(J=s!==null&&s.memoizedState!==null,e.mode&1?(at=(z=at)||J,Ht(n,e),at=z):Ht(n,e),tn(e),a&8192){if(z=e.memoizedState!==null,(e.stateNode.isHidden=z)&&!J&&(e.mode&1)!==0)for(ie=e,J=e.child;J!==null;){for(te=ie=J;ie!==null;){switch(q=ie,oe=q.child,q.tag){case 0:case 11:case 14:case 15:ls(4,q,q.return);break;case 1:to(q,q.return);var ae=q.stateNode;if(typeof ae.componentWillUnmount=="function"){a=q,s=q.return;try{n=a,ae.props=n.memoizedProps,ae.state=n.memoizedState,ae.componentWillUnmount()}catch(de){De(a,s,de)}}break;case 5:to(q,q.return);break;case 22:if(q.memoizedState!==null){nh(te);continue}}oe!==null?(oe.return=q,ie=oe):nh(te)}J=J.sibling}e:for(J=null,te=e;;){if(te.tag===5){if(J===null){J=te;try{p=te.stateNode,z?(m=p.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none"):(j=te.stateNode,T=te.memoizedProps.style,E=T!=null&&T.hasOwnProperty("display")?T.display:null,j.style.display=Id("display",E))}catch(de){De(e,e.return,de)}}}else if(te.tag===6){if(J===null)try{te.stateNode.nodeValue=z?"":te.memoizedProps}catch(de){De(e,e.return,de)}}else if((te.tag!==22&&te.tag!==23||te.memoizedState===null||te===e)&&te.child!==null){te.child.return=te,te=te.child;continue}if(te===e)break e;for(;te.sibling===null;){if(te.return===null||te.return===e)break e;J===te&&(J=null),te=te.return}J===te&&(J=null),te.sibling.return=te.return,te=te.sibling}}break;case 19:Ht(n,e),tn(e),a&4&&Zp(e);break;case 21:break;default:Ht(n,e),tn(e)}}function tn(e){var n=e.flags;if(n&2){try{e:{for(var s=e.return;s!==null;){if(Xp(s)){var a=s;break e}s=s.return}throw Error(o(160))}switch(a.tag){case 5:var p=a.stateNode;a.flags&32&&(Ao(p,""),a.flags&=-33);var m=qp(e);yc(e,m,p);break;case 3:case 4:var E=a.stateNode.containerInfo,j=qp(e);vc(e,j,E);break;default:throw Error(o(161))}}catch(T){De(e,e.return,T)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Sy(e,n,s){ie=e,eh(e)}function eh(e,n,s){for(var a=(e.mode&1)!==0;ie!==null;){var p=ie,m=p.child;if(p.tag===22&&a){var E=p.memoizedState!==null||Si;if(!E){var j=p.alternate,T=j!==null&&j.memoizedState!==null||at;j=Si;var z=at;if(Si=E,(at=T)&&!z)for(ie=p;ie!==null;)E=ie,T=E.child,E.tag===22&&E.memoizedState!==null?rh(p):T!==null?(T.return=E,ie=T):rh(p);for(;m!==null;)ie=m,eh(m),m=m.sibling;ie=p,Si=j,at=z}th(e)}else(p.subtreeFlags&8772)!==0&&m!==null?(m.return=p,ie=m):th(e)}}function th(e){for(;ie!==null;){var n=ie;if((n.flags&8772)!==0){var s=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:at||ji(5,n);break;case 1:var a=n.stateNode;if(n.flags&4&&!at)if(s===null)a.componentDidMount();else{var p=n.elementType===n.type?s.memoizedProps:zt(n.type,s.memoizedProps);a.componentDidUpdate(p,s.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var m=n.updateQueue;m!==null&&np(n,m,a);break;case 3:var E=n.updateQueue;if(E!==null){if(s=null,n.child!==null)switch(n.child.tag){case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}np(n,E,s)}break;case 5:var j=n.stateNode;if(s===null&&n.flags&4){s=j;var T=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&s.focus();break;case"img":T.src&&(s.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var z=n.alternate;if(z!==null){var J=z.memoizedState;if(J!==null){var te=J.dehydrated;te!==null&&Fo(te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}at||n.flags&512&&xc(n)}catch(q){De(n,n.return,q)}}if(n===e){ie=null;break}if(s=n.sibling,s!==null){s.return=n.return,ie=s;break}ie=n.return}}function nh(e){for(;ie!==null;){var n=ie;if(n===e){ie=null;break}var s=n.sibling;if(s!==null){s.return=n.return,ie=s;break}ie=n.return}}function rh(e){for(;ie!==null;){var n=ie;try{switch(n.tag){case 0:case 11:case 15:var s=n.return;try{ji(4,n)}catch(T){De(n,s,T)}break;case 1:var a=n.stateNode;if(typeof a.componentDidMount=="function"){var p=n.return;try{a.componentDidMount()}catch(T){De(n,p,T)}}var m=n.return;try{xc(n)}catch(T){De(n,m,T)}break;case 5:var E=n.return;try{xc(n)}catch(T){De(n,E,T)}}}catch(T){De(n,n.return,T)}if(n===e){ie=null;break}var j=n.sibling;if(j!==null){j.return=n.return,ie=j;break}ie=n.return}}var jy=Math.ceil,Ai=I.ReactCurrentDispatcher,wc=I.ReactCurrentOwner,It=I.ReactCurrentBatchConfig,ke=0,Ye=null,ze=null,rt=0,kt=0,no=On(0),We=0,as=null,vr=0,Ti=0,bc=0,cs=null,gt=null,Ec=0,ro=1/0,vn=null,_i=!1,Nc=null,Un=null,Pi=!1,Hn=null,Ri=0,us=0,Cc=null,Ii=-1,Li=0;function dt(){return(ke&6)!==0?$e():Ii!==-1?Ii:Ii=$e()}function Vn(e){return(e.mode&1)===0?1:(ke&2)!==0&&rt!==0?rt&-rt:uy.transition!==null?(Li===0&&(Li=Xd()),Li):(e=je,e!==0||(e=window.event,e=e===void 0?16:of(e.type)),e)}function Vt(e,n,s,a){if(50<us)throw us=0,Cc=null,Error(o(185));Lo(e,s,a),((ke&2)===0||e!==Ye)&&(e===Ye&&((ke&2)===0&&(Ti|=s),We===4&&Wn(e,rt)),xt(e,a),s===1&&ke===0&&(n.mode&1)===0&&(ro=$e()+500,ai&&$n()))}function xt(e,n){var s=e.callbackNode;uv(e,n);var a=Hs(e,e===Ye?rt:0);if(a===0)s!==null&&Kd(s),e.callbackNode=null,e.callbackPriority=0;else if(n=a&-a,e.callbackPriority!==n){if(s!=null&&Kd(s),n===1)e.tag===0?cy(sh.bind(null,e)):Vf(sh.bind(null,e)),sy(function(){(ke&6)===0&&$n()}),s=null;else{switch(qd(a)){case 1:s=ra;break;case 4:s=Gd;break;case 16:s=Fs;break;case 536870912:s=Yd;break;default:s=Fs}s=ph(s,oh.bind(null,e))}e.callbackPriority=n,e.callbackNode=s}}function oh(e,n){if(Ii=-1,Li=0,(ke&6)!==0)throw Error(o(327));var s=e.callbackNode;if(oo()&&e.callbackNode!==s)return null;var a=Hs(e,e===Ye?rt:0);if(a===0)return null;if((a&30)!==0||(a&e.expiredLanes)!==0||n)n=Mi(e,a);else{n=a;var p=ke;ke|=2;var m=lh();(Ye!==e||rt!==n)&&(vn=null,ro=$e()+500,wr(e,n));do try{_y();break}catch(j){ih(e,j)}while(!0);Ua(),Ai.current=m,ke=p,ze!==null?n=0:(Ye=null,rt=0,n=We)}if(n!==0){if(n===2&&(p=oa(e),p!==0&&(a=p,n=kc(e,p))),n===1)throw s=as,wr(e,0),Wn(e,a),xt(e,$e()),s;if(n===6)Wn(e,a);else{if(p=e.current.alternate,(a&30)===0&&!Ay(p)&&(n=Mi(e,a),n===2&&(m=oa(e),m!==0&&(a=m,n=kc(e,m))),n===1))throw s=as,wr(e,0),Wn(e,a),xt(e,$e()),s;switch(e.finishedWork=p,e.finishedLanes=a,n){case 0:case 1:throw Error(o(345));case 2:br(e,gt,vn);break;case 3:if(Wn(e,a),(a&130023424)===a&&(n=Ec+500-$e(),10<n)){if(Hs(e,0)!==0)break;if(p=e.suspendedLanes,(p&a)!==a){dt(),e.pingedLanes|=e.suspendedLanes&p;break}e.timeoutHandle=Pa(br.bind(null,e,gt,vn),n);break}br(e,gt,vn);break;case 4:if(Wn(e,a),(a&4194240)===a)break;for(n=e.eventTimes,p=-1;0<a;){var E=31-$t(a);m=1<<E,E=n[E],E>p&&(p=E),a&=~m}if(a=p,a=$e()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*jy(a/1960))-a,10<a){e.timeoutHandle=Pa(br.bind(null,e,gt,vn),a);break}br(e,gt,vn);break;case 5:br(e,gt,vn);break;default:throw Error(o(329))}}}return xt(e,$e()),e.callbackNode===s?oh.bind(null,e):null}function kc(e,n){var s=cs;return e.current.memoizedState.isDehydrated&&(wr(e,n).flags|=256),e=Mi(e,n),e!==2&&(n=gt,gt=s,n!==null&&Sc(n)),e}function Sc(e){gt===null?gt=e:gt.push.apply(gt,e)}function Ay(e){for(var n=e;;){if(n.flags&16384){var s=n.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var a=0;a<s.length;a++){var p=s[a],m=p.getSnapshot;p=p.value;try{if(!Ft(m(),p))return!1}catch{return!1}}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Wn(e,n){for(n&=~bc,n&=~Ti,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var s=31-$t(n),a=1<<s;e[s]=-1,n&=~a}}function sh(e){if((ke&6)!==0)throw Error(o(327));oo();var n=Hs(e,0);if((n&1)===0)return xt(e,$e()),null;var s=Mi(e,n);if(e.tag!==0&&s===2){var a=oa(e);a!==0&&(n=a,s=kc(e,a))}if(s===1)throw s=as,wr(e,0),Wn(e,n),xt(e,$e()),s;if(s===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,br(e,gt,vn),xt(e,$e()),null}function jc(e,n){var s=ke;ke|=1;try{return e(n)}finally{ke=s,ke===0&&(ro=$e()+500,ai&&$n())}}function yr(e){Hn!==null&&Hn.tag===0&&(ke&6)===0&&oo();var n=ke;ke|=1;var s=It.transition,a=je;try{if(It.transition=null,je=1,e)return e()}finally{je=a,It.transition=s,ke=n,(ke&6)===0&&$n()}}function Ac(){kt=no.current,Pe(no)}function wr(e,n){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,oy(s)),ze!==null)for(s=ze.return;s!==null;){var a=s;switch(Da(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&ii();break;case 3:Jr(),Pe(pt),Pe(st),qa();break;case 5:Ya(a);break;case 4:Jr();break;case 13:Pe(Ie);break;case 19:Pe(Ie);break;case 10:Ha(a.type._context);break;case 22:case 23:Ac()}s=s.return}if(Ye=e,ze=e=Kn(e.current,null),rt=kt=n,We=0,as=null,bc=Ti=vr=0,gt=cs=null,mr!==null){for(n=0;n<mr.length;n++)if(s=mr[n],a=s.interleaved,a!==null){s.interleaved=null;var p=a.next,m=s.pending;if(m!==null){var E=m.next;m.next=p,a.next=E}s.pending=a}mr=null}return e}function ih(e,n){do{var s=ze;try{if(Ua(),vi.current=Ei,yi){for(var a=Le.memoizedState;a!==null;){var p=a.queue;p!==null&&(p.pending=null),a=a.next}yi=!1}if(xr=0,Ge=Ve=Le=null,ns=!1,rs=0,wc.current=null,s===null||s.return===null){We=1,as=n,ze=null;break}e:{var m=e,E=s.return,j=s,T=n;if(n=rt,j.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var z=T,J=j,te=J.tag;if((J.mode&1)===0&&(te===0||te===11||te===15)){var q=J.alternate;q?(J.updateQueue=q.updateQueue,J.memoizedState=q.memoizedState,J.lanes=q.lanes):(J.updateQueue=null,J.memoizedState=null)}var oe=Pp(E);if(oe!==null){oe.flags&=-257,Rp(oe,E,j,m,n),oe.mode&1&&_p(m,z,n),n=oe,T=z;var ae=n.updateQueue;if(ae===null){var de=new Set;de.add(T),n.updateQueue=de}else ae.add(T);break e}else{if((n&1)===0){_p(m,z,n),Tc();break e}T=Error(o(426))}}else if(Re&&j.mode&1){var Fe=Pp(E);if(Fe!==null){(Fe.flags&65536)===0&&(Fe.flags|=256),Rp(Fe,E,j,m,n),Ba(eo(T,j));break e}}m=T=eo(T,j),We!==4&&(We=2),cs===null?cs=[m]:cs.push(m),m=E;do{switch(m.tag){case 3:m.flags|=65536,n&=-n,m.lanes|=n;var $=Ap(m,T,n);tp(m,$);break e;case 1:j=T;var R=m.type,B=m.stateNode;if((m.flags&128)===0&&(typeof R.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(Un===null||!Un.has(B)))){m.flags|=65536,n&=-n,m.lanes|=n;var ne=Tp(m,j,n);tp(m,ne);break e}}m=m.return}while(m!==null)}ch(s)}catch(fe){n=fe,ze===s&&s!==null&&(ze=s=s.return);continue}break}while(!0)}function lh(){var e=Ai.current;return Ai.current=Ei,e===null?Ei:e}function Tc(){(We===0||We===3||We===2)&&(We=4),Ye===null||(vr&268435455)===0&&(Ti&268435455)===0||Wn(Ye,rt)}function Mi(e,n){var s=ke;ke|=2;var a=lh();(Ye!==e||rt!==n)&&(vn=null,wr(e,n));do try{Ty();break}catch(p){ih(e,p)}while(!0);if(Ua(),ke=s,Ai.current=a,ze!==null)throw Error(o(261));return Ye=null,rt=0,We}function Ty(){for(;ze!==null;)ah(ze)}function _y(){for(;ze!==null&&!tv();)ah(ze)}function ah(e){var n=fh(e.alternate,e,kt);e.memoizedProps=e.pendingProps,n===null?ch(e):ze=n,wc.current=null}function ch(e){var n=e;do{var s=n.alternate;if(e=n.return,(n.flags&32768)===0){if(s=Ey(s,n,kt),s!==null){ze=s;return}}else{if(s=Ny(s,n),s!==null){s.flags&=32767,ze=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,ze=null;return}}if(n=n.sibling,n!==null){ze=n;return}ze=n=e}while(n!==null);We===0&&(We=5)}function br(e,n,s){var a=je,p=It.transition;try{It.transition=null,je=1,Py(e,n,s,a)}finally{It.transition=p,je=a}return null}function Py(e,n,s,a){do oo();while(Hn!==null);if((ke&6)!==0)throw Error(o(327));s=e.finishedWork;var p=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var m=s.lanes|s.childLanes;if(dv(e,m),e===Ye&&(ze=Ye=null,rt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||Pi||(Pi=!0,ph(Fs,function(){return oo(),null})),m=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||m){m=It.transition,It.transition=null;var E=je;je=1;var j=ke;ke|=4,wc.current=null,ky(e,s),Jp(s,e),Qv(Ta),Ks=!!Aa,Ta=Aa=null,e.current=s,Sy(s),nv(),ke=j,je=E,It.transition=m}else e.current=s;if(Pi&&(Pi=!1,Hn=e,Ri=p),m=e.pendingLanes,m===0&&(Un=null),sv(s.stateNode),xt(e,$e()),n!==null)for(a=e.onRecoverableError,s=0;s<n.length;s++)p=n[s],a(p.value,{componentStack:p.stack,digest:p.digest});if(_i)throw _i=!1,e=Nc,Nc=null,e;return(Ri&1)!==0&&e.tag!==0&&oo(),m=e.pendingLanes,(m&1)!==0?e===Cc?us++:(us=0,Cc=e):us=0,$n(),null}function oo(){if(Hn!==null){var e=qd(Ri),n=It.transition,s=je;try{if(It.transition=null,je=16>e?16:e,Hn===null)var a=!1;else{if(e=Hn,Hn=null,Ri=0,(ke&6)!==0)throw Error(o(331));var p=ke;for(ke|=4,ie=e.current;ie!==null;){var m=ie,E=m.child;if((ie.flags&16)!==0){var j=m.deletions;if(j!==null){for(var T=0;T<j.length;T++){var z=j[T];for(ie=z;ie!==null;){var J=ie;switch(J.tag){case 0:case 11:case 15:ls(8,J,m)}var te=J.child;if(te!==null)te.return=J,ie=te;else for(;ie!==null;){J=ie;var q=J.sibling,oe=J.return;if(Yp(J),J===z){ie=null;break}if(q!==null){q.return=oe,ie=q;break}ie=oe}}}var ae=m.alternate;if(ae!==null){var de=ae.child;if(de!==null){ae.child=null;do{var Fe=de.sibling;de.sibling=null,de=Fe}while(de!==null)}}ie=m}}if((m.subtreeFlags&2064)!==0&&E!==null)E.return=m,ie=E;else e:for(;ie!==null;){if(m=ie,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:ls(9,m,m.return)}var $=m.sibling;if($!==null){$.return=m.return,ie=$;break e}ie=m.return}}var R=e.current;for(ie=R;ie!==null;){E=ie;var B=E.child;if((E.subtreeFlags&2064)!==0&&B!==null)B.return=E,ie=B;else e:for(E=R;ie!==null;){if(j=ie,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:ji(9,j)}}catch(fe){De(j,j.return,fe)}if(j===E){ie=null;break e}var ne=j.sibling;if(ne!==null){ne.return=j.return,ie=ne;break e}ie=j.return}}if(ke=p,$n(),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Bs,e)}catch{}a=!0}return a}finally{je=s,It.transition=n}}return!1}function uh(e,n,s){n=eo(s,n),n=Ap(e,n,1),e=Bn(e,n,1),n=dt(),e!==null&&(Lo(e,1,n),xt(e,n))}function De(e,n,s){if(e.tag===3)uh(e,e,s);else for(;n!==null;){if(n.tag===3){uh(n,e,s);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Un===null||!Un.has(a))){e=eo(s,e),e=Tp(n,e,1),n=Bn(n,e,1),e=dt(),n!==null&&(Lo(n,1,e),xt(n,e));break}}n=n.return}}function Ry(e,n,s){var a=e.pingCache;a!==null&&a.delete(n),n=dt(),e.pingedLanes|=e.suspendedLanes&s,Ye===e&&(rt&s)===s&&(We===4||We===3&&(rt&130023424)===rt&&500>$e()-Ec?wr(e,0):bc|=s),xt(e,n)}function dh(e,n){n===0&&((e.mode&1)===0?n=1:(n=Us,Us<<=1,(Us&130023424)===0&&(Us=4194304)));var s=dt();e=mn(e,n),e!==null&&(Lo(e,n,s),xt(e,s))}function Iy(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),dh(e,s)}function Ly(e,n){var s=0;switch(e.tag){case 13:var a=e.stateNode,p=e.memoizedState;p!==null&&(s=p.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(o(314))}a!==null&&a.delete(n),dh(e,s)}var fh;fh=function(e,n,s){if(e!==null)if(e.memoizedProps!==n.pendingProps||pt.current)mt=!0;else{if((e.lanes&s)===0&&(n.flags&128)===0)return mt=!1,by(e,n,s);mt=(e.flags&131072)!==0}else mt=!1,Re&&(n.flags&1048576)!==0&&Wf(n,ui,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;ki(e,n),e=n.pendingProps;var p=Kr(n,st.current);Zr(n,s),p=Ja(null,n,a,e,p,s);var m=ec();return n.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ht(a)?(m=!0,li(n)):m=!1,n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,Ka(n),p.updater=Ni,n.stateNode=p,p._reactInternals=n,ic(n,a,e,s),n=uc(null,n,a,!0,m,s)):(n.tag=0,Re&&m&&Oa(n),ut(null,n,p,s),n=n.child),n;case 16:a=n.elementType;e:{switch(ki(e,n),e=n.pendingProps,p=a._init,a=p(a._payload),n.type=a,p=n.tag=Oy(a),e=zt(a,e),p){case 0:n=cc(null,n,a,e,s);break e;case 1:n=$p(null,n,a,e,s);break e;case 11:n=Ip(null,n,a,e,s);break e;case 14:n=Lp(null,n,a,zt(a.type,e),s);break e}throw Error(o(306,a,""))}return n;case 0:return a=n.type,p=n.pendingProps,p=n.elementType===a?p:zt(a,p),cc(e,n,a,p,s);case 1:return a=n.type,p=n.pendingProps,p=n.elementType===a?p:zt(a,p),$p(e,n,a,p,s);case 3:e:{if(Fp(n),e===null)throw Error(o(387));a=n.pendingProps,m=n.memoizedState,p=m.element,ep(e,n),gi(n,a,null,s);var E=n.memoizedState;if(a=E.element,m.isDehydrated)if(m={element:a,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){p=eo(Error(o(423)),n),n=Bp(e,n,a,s,p);break e}else if(a!==p){p=eo(Error(o(424)),n),n=Bp(e,n,a,s,p);break e}else for(Ct=Mn(n.stateNode.containerInfo.firstChild),Nt=n,Re=!0,Bt=null,s=Zf(n,null,a,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Xr(),a===p){n=xn(e,n,s);break e}ut(e,n,a,s)}n=n.child}return n;case 5:return rp(n),e===null&&Fa(n),a=n.type,p=n.pendingProps,m=e!==null?e.memoizedProps:null,E=p.children,_a(a,p)?E=null:m!==null&&_a(a,m)&&(n.flags|=32),Dp(e,n),ut(e,n,E,s),n.child;case 6:return e===null&&Fa(n),null;case 13:return zp(e,n,s);case 4:return Ga(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=qr(n,null,a,s):ut(e,n,a,s),n.child;case 11:return a=n.type,p=n.pendingProps,p=n.elementType===a?p:zt(a,p),Ip(e,n,a,p,s);case 7:return ut(e,n,n.pendingProps,s),n.child;case 8:return ut(e,n,n.pendingProps.children,s),n.child;case 12:return ut(e,n,n.pendingProps.children,s),n.child;case 10:e:{if(a=n.type._context,p=n.pendingProps,m=n.memoizedProps,E=p.value,Te(pi,a._currentValue),a._currentValue=E,m!==null)if(Ft(m.value,E)){if(m.children===p.children&&!pt.current){n=xn(e,n,s);break e}}else for(m=n.child,m!==null&&(m.return=n);m!==null;){var j=m.dependencies;if(j!==null){E=m.child;for(var T=j.firstContext;T!==null;){if(T.context===a){if(m.tag===1){T=gn(-1,s&-s),T.tag=2;var z=m.updateQueue;if(z!==null){z=z.shared;var J=z.pending;J===null?T.next=T:(T.next=J.next,J.next=T),z.pending=T}}m.lanes|=s,T=m.alternate,T!==null&&(T.lanes|=s),Va(m.return,s,n),j.lanes|=s;break}T=T.next}}else if(m.tag===10)E=m.type===n.type?null:m.child;else if(m.tag===18){if(E=m.return,E===null)throw Error(o(341));E.lanes|=s,j=E.alternate,j!==null&&(j.lanes|=s),Va(E,s,n),E=m.sibling}else E=m.child;if(E!==null)E.return=m;else for(E=m;E!==null;){if(E===n){E=null;break}if(m=E.sibling,m!==null){m.return=E.return,E=m;break}E=E.return}m=E}ut(e,n,p.children,s),n=n.child}return n;case 9:return p=n.type,a=n.pendingProps.children,Zr(n,s),p=Pt(p),a=a(p),n.flags|=1,ut(e,n,a,s),n.child;case 14:return a=n.type,p=zt(a,n.pendingProps),p=zt(a.type,p),Lp(e,n,a,p,s);case 15:return Mp(e,n,n.type,n.pendingProps,s);case 17:return a=n.type,p=n.pendingProps,p=n.elementType===a?p:zt(a,p),ki(e,n),n.tag=1,ht(a)?(e=!0,li(n)):e=!1,Zr(n,s),Sp(n,a,p),ic(n,a,p,s),uc(null,n,a,!0,e,s);case 19:return Hp(e,n,s);case 22:return Op(e,n,s)}throw Error(o(156,n.tag))};function ph(e,n){return Wd(e,n)}function My(e,n,s,a){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,n,s,a){return new My(e,n,s,a)}function _c(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oy(e){if(typeof e=="function")return _c(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F)return 11;if(e===W)return 14}return 2}function Kn(e,n){var s=e.alternate;return s===null?(s=Lt(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=n,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function Oi(e,n,s,a,p,m){var E=2;if(a=e,typeof e=="function")_c(e)&&(E=1);else if(typeof e=="string")E=5;else e:switch(e){case M:return Er(s.children,p,m,n);case D:E=8,p|=8;break;case X:return e=Lt(12,s,n,p|2),e.elementType=X,e.lanes=m,e;case Y:return e=Lt(13,s,n,p),e.elementType=Y,e.lanes=m,e;case re:return e=Lt(19,s,n,p),e.elementType=re,e.lanes=m,e;case ee:return Di(s,p,m,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:E=10;break e;case H:E=9;break e;case F:E=11;break e;case W:E=14;break e;case G:E=16,a=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return n=Lt(E,s,n,p),n.elementType=e,n.type=a,n.lanes=m,n}function Er(e,n,s,a){return e=Lt(7,e,a,n),e.lanes=s,e}function Di(e,n,s,a){return e=Lt(22,e,a,n),e.elementType=ee,e.lanes=s,e.stateNode={isHidden:!1},e}function Pc(e,n,s){return e=Lt(6,e,null,n),e.lanes=s,e}function Rc(e,n,s){return n=Lt(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Dy(e,n,s,a,p){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sa(0),this.expirationTimes=sa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sa(0),this.identifierPrefix=a,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function Ic(e,n,s,a,p,m,E,j,T){return e=new Dy(e,n,s,j,T),n===1?(n=1,m===!0&&(n|=8)):n=0,m=Lt(3,null,null,n),e.current=m,m.stateNode=e,m.memoizedState={element:a,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ka(m),e}function $y(e,n,s){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:U,key:a==null?null:""+a,children:e,containerInfo:n,implementation:s}}function hh(e){if(!e)return Dn;e=e._reactInternals;e:{if(ur(e)!==e||e.tag!==1)throw Error(o(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(ht(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(o(171))}if(e.tag===1){var s=e.type;if(ht(s))return Uf(e,s,n)}return n}function mh(e,n,s,a,p,m,E,j,T){return e=Ic(s,a,!0,e,p,m,E,j,T),e.context=hh(null),s=e.current,a=dt(),p=Vn(s),m=gn(a,p),m.callback=n??null,Bn(s,m,p),e.current.lanes=p,Lo(e,p,a),xt(e,a),e}function $i(e,n,s,a){var p=n.current,m=dt(),E=Vn(p);return s=hh(s),n.context===null?n.context=s:n.pendingContext=s,n=gn(m,E),n.payload={element:e},a=a===void 0?null:a,a!==null&&(n.callback=a),e=Bn(p,n,E),e!==null&&(Vt(e,p,E,m),mi(e,p,E)),E}function Fi(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function gh(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function Lc(e,n){gh(e,n),(e=e.alternate)&&gh(e,n)}function Fy(){return null}var xh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Mc(e){this._internalRoot=e}Bi.prototype.render=Mc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));$i(e,n,null,null)},Bi.prototype.unmount=Mc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;yr(function(){$i(null,e,null,null)}),n[dn]=null}};function Bi(e){this._internalRoot=e}Bi.prototype.unstable_scheduleHydration=function(e){if(e){var n=Jd();e={blockedOn:null,target:e,priority:n};for(var s=0;s<Rn.length&&n!==0&&n<Rn[s].priority;s++);Rn.splice(s,0,e),s===0&&nf(e)}};function Oc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vh(){}function By(e,n,s,a,p){if(p){if(typeof a=="function"){var m=a;a=function(){var z=Fi(E);m.call(z)}}var E=mh(n,a,e,0,null,!1,!1,"",vh);return e._reactRootContainer=E,e[dn]=E.current,Yo(e.nodeType===8?e.parentNode:e),yr(),E}for(;p=e.lastChild;)e.removeChild(p);if(typeof a=="function"){var j=a;a=function(){var z=Fi(T);j.call(z)}}var T=Ic(e,0,!1,null,null,!1,!1,"",vh);return e._reactRootContainer=T,e[dn]=T.current,Yo(e.nodeType===8?e.parentNode:e),yr(function(){$i(n,T,s,a)}),T}function Ui(e,n,s,a,p){var m=s._reactRootContainer;if(m){var E=m;if(typeof p=="function"){var j=p;p=function(){var T=Fi(E);j.call(T)}}$i(n,E,e,p)}else E=By(s,n,e,p,a);return Fi(E)}Qd=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var s=Io(n.pendingLanes);s!==0&&(ia(n,s|1),xt(n,$e()),(ke&6)===0&&(ro=$e()+500,$n()))}break;case 13:yr(function(){var a=mn(e,1);if(a!==null){var p=dt();Vt(a,e,1,p)}}),Lc(e,1)}},la=function(e){if(e.tag===13){var n=mn(e,134217728);if(n!==null){var s=dt();Vt(n,e,134217728,s)}Lc(e,134217728)}},Zd=function(e){if(e.tag===13){var n=Vn(e),s=mn(e,n);if(s!==null){var a=dt();Vt(s,e,n,a)}Lc(e,n)}},Jd=function(){return je},ef=function(e,n){var s=je;try{return je=e,n()}finally{je=s}},Jl=function(e,n,s){switch(n){case"input":if(So(e,s),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<s.length;n++){var a=s[n];if(a!==e&&a.form===e.form){var p=si(a);if(!p)throw Error(o(90));tt(a),So(a,p)}}}break;case"textarea":Td(e,s);break;case"select":n=s.value,n!=null&&Lr(e,!!s.multiple,n,!1)}},$d=jc,Fd=yr;var zy={usingClientEntryPoint:!1,Events:[Qo,Vr,si,Od,Dd,jc]},ds={findFiberByHostInstance:dr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Uy={bundleType:ds.bundleType,version:ds.version,rendererPackageName:ds.rendererPackageName,rendererConfig:ds.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hd(e),e===null?null:e.stateNode},findFiberByHostInstance:ds.findFiberByHostInstance||Fy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hi.isDisabled&&Hi.supportsFiber)try{Bs=Hi.inject(Uy),Qt=Hi}catch{}}return vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zy,vt.createPortal=function(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Oc(n))throw Error(o(200));return $y(e,n,null,s)},vt.createRoot=function(e,n){if(!Oc(e))throw Error(o(299));var s=!1,a="",p=xh;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),n=Ic(e,1,!1,null,null,s,!1,a,p),e[dn]=n.current,Yo(e.nodeType===8?e.parentNode:e),new Mc(n)},vt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=Hd(n),e=e===null?null:e.stateNode,e},vt.flushSync=function(e){return yr(e)},vt.hydrate=function(e,n,s){if(!zi(n))throw Error(o(200));return Ui(null,e,n,!0,s)},vt.hydrateRoot=function(e,n,s){if(!Oc(e))throw Error(o(405));var a=s!=null&&s.hydratedSources||null,p=!1,m="",E=xh;if(s!=null&&(s.unstable_strictMode===!0&&(p=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),n=mh(n,null,e,1,s??null,p,!1,m,E),e[dn]=n.current,Yo(e),a)for(e=0;e<a.length;e++)s=a[e],p=s._getVersion,p=p(s._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[s,p]:n.mutableSourceEagerHydrationData.push(s,p);return new Bi(n)},vt.render=function(e,n,s){if(!zi(n))throw Error(o(200));return Ui(null,e,n,!1,s)},vt.unmountComponentAtNode=function(e){if(!zi(e))throw Error(o(40));return e._reactRootContainer?(yr(function(){Ui(null,null,e,!1,function(){e._reactRootContainer=null,e[dn]=null})}),!0):!1},vt.unstable_batchedUpdates=jc,vt.unstable_renderSubtreeIntoContainer=function(e,n,s,a){if(!zi(s))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return Ui(e,n,s,!1,a)},vt.version="18.3.1-next-f1338f8080-20240426",vt}var Sh;function eg(){if(Sh)return Fc.exports;Sh=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Fc.exports=qy(),Fc.exports}var jh;function Qy(){if(jh)return Vi;jh=1;var t=eg();return Vi.createRoot=t.createRoot,Vi.hydrateRoot=t.hydrateRoot,Vi}var Zy=Qy();const Jy=zu(Zy),ew="modulepreload",tw=function(t){return"/"+t},Ah={},tg=function(r,o,i){let l=Promise.resolve();if(o&&o.length>0){let d=function(g){return Promise.all(g.map(v=>Promise.resolve(v).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));l=d(o.map(g=>{if(g=tw(g),g in Ah)return;Ah[g]=!0;const v=g.endsWith(".css"),x=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${x}`))return;const w=document.createElement("link");if(w.rel=v?"stylesheet":ew,v||(w.as="script"),w.crossOrigin="",w.href=g,h&&w.setAttribute("nonce",h),document.head.appendChild(w),v)return new Promise((C,k)=>{w.addEventListener("load",C),w.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${g}`)))})}))}function c(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return l.then(d=>{for(const f of d||[])f.status==="rejected"&&c(f.reason);return r().catch(c)})};var jl=eg();const nw=zu(jl);/**
42
+ * @remix-run/router v1.23.2
43
+ *
44
+ * Copyright (c) Remix Software Inc.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE.md file in the root directory of this source tree.
48
+ *
49
+ * @license MIT
50
+ */function ys(){return ys=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},ys.apply(this,arguments)}var tr;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(tr||(tr={}));const Th="popstate";function rw(t){t===void 0&&(t={});function r(i,l){let{pathname:c,search:d,hash:f}=i.location;return hu("",{pathname:c,search:d,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function o(i,l){return typeof l=="string"?l:ul(l)}return sw(r,o,null,t)}function Ue(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}function Hu(t,r){if(!t){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function ow(){return Math.random().toString(36).substr(2,8)}function _h(t,r){return{usr:t.state,key:t.key,idx:r}}function hu(t,r,o,i){return o===void 0&&(o=null),ys({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof r=="string"?yo(r):r,{state:o,key:r&&r.key||i||ow()})}function ul(t){let{pathname:r="/",search:o="",hash:i=""}=t;return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),i&&i!=="#"&&(r+=i.charAt(0)==="#"?i:"#"+i),r}function yo(t){let r={};if(t){let o=t.indexOf("#");o>=0&&(r.hash=t.substr(o),t=t.substr(0,o));let i=t.indexOf("?");i>=0&&(r.search=t.substr(i),t=t.substr(0,i)),t&&(r.pathname=t)}return r}function sw(t,r,o,i){i===void 0&&(i={});let{window:l=document.defaultView,v5Compat:c=!1}=i,d=l.history,f=tr.Pop,h=null,g=v();g==null&&(g=0,d.replaceState(ys({},d.state,{idx:g}),""));function v(){return(d.state||{idx:null}).idx}function x(){f=tr.Pop;let N=v(),S=N==null?null:N-g;g=N,h&&h({action:f,location:b.location,delta:S})}function w(N,S){f=tr.Push;let A=hu(b.location,N,S);g=v()+1;let _=_h(A,g),I=b.createHref(A);try{d.pushState(_,"",I)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;l.location.assign(I)}c&&h&&h({action:f,location:b.location,delta:1})}function C(N,S){f=tr.Replace;let A=hu(b.location,N,S);g=v();let _=_h(A,g),I=b.createHref(A);d.replaceState(_,"",I),c&&h&&h({action:f,location:b.location,delta:0})}function k(N){let S=l.location.origin!=="null"?l.location.origin:l.location.href,A=typeof N=="string"?N:ul(N);return A=A.replace(/ $/,"%20"),Ue(S,"No window.location.(origin|href) available to create URL for href: "+A),new URL(A,S)}let b={get action(){return f},get location(){return t(l,d)},listen(N){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(Th,x),h=N,()=>{l.removeEventListener(Th,x),h=null}},createHref(N){return r(l,N)},createURL:k,encodeLocation(N){let S=k(N);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:w,replace:C,go(N){return d.go(N)}};return b}var Ph;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Ph||(Ph={}));function iw(t,r,o){return o===void 0&&(o="/"),lw(t,r,o)}function lw(t,r,o,i){let l=typeof r=="string"?yo(r):r,c=Vu(l.pathname||"/",o);if(c==null)return null;let d=ng(t);aw(d);let f=null;for(let h=0;f==null&&h<d.length;++h){let g=ww(c);f=xw(d[h],g)}return f}function ng(t,r,o,i){r===void 0&&(r=[]),o===void 0&&(o=[]),i===void 0&&(i="");let l=(c,d,f)=>{let h={relativePath:f===void 0?c.path||"":f,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};h.relativePath.startsWith("/")&&(Ue(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let g=nr([i,h.relativePath]),v=o.concat(h);c.children&&c.children.length>0&&(Ue(c.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),ng(c.children,r,v,g)),!(c.path==null&&!c.index)&&r.push({path:g,score:mw(g,c.index),routesMeta:v})};return t.forEach((c,d)=>{var f;if(c.path===""||!((f=c.path)!=null&&f.includes("?")))l(c,d);else for(let h of rg(c.path))l(c,d,h)}),r}function rg(t){let r=t.split("/");if(r.length===0)return[];let[o,...i]=r,l=o.endsWith("?"),c=o.replace(/\?$/,"");if(i.length===0)return l?[c,""]:[c];let d=rg(i.join("/")),f=[];return f.push(...d.map(h=>h===""?c:[c,h].join("/"))),l&&f.push(...d),f.map(h=>t.startsWith("/")&&h===""?"/":h)}function aw(t){t.sort((r,o)=>r.score!==o.score?o.score-r.score:gw(r.routesMeta.map(i=>i.childrenIndex),o.routesMeta.map(i=>i.childrenIndex)))}const cw=/^:[\w-]+$/,uw=3,dw=2,fw=1,pw=10,hw=-2,Rh=t=>t==="*";function mw(t,r){let o=t.split("/"),i=o.length;return o.some(Rh)&&(i+=hw),r&&(i+=dw),o.filter(l=>!Rh(l)).reduce((l,c)=>l+(cw.test(c)?uw:c===""?fw:pw),i)}function gw(t,r){return t.length===r.length&&t.slice(0,-1).every((i,l)=>i===r[l])?t[t.length-1]-r[r.length-1]:0}function xw(t,r,o){let{routesMeta:i}=t,l={},c="/",d=[];for(let f=0;f<i.length;++f){let h=i[f],g=f===i.length-1,v=c==="/"?r:r.slice(c.length)||"/",x=vw({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},v),w=h.route;if(!x)return null;Object.assign(l,x.params),d.push({params:l,pathname:nr([c,x.pathname]),pathnameBase:kw(nr([c,x.pathnameBase])),route:w}),x.pathnameBase!=="/"&&(c=nr([c,x.pathnameBase]))}return d}function vw(t,r){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[o,i]=yw(t.path,t.caseSensitive,t.end),l=r.match(o);if(!l)return null;let c=l[0],d=c.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:i.reduce((g,v,x)=>{let{paramName:w,isOptional:C}=v;if(w==="*"){let b=f[x]||"";d=c.slice(0,c.length-b.length).replace(/(.)\/+$/,"$1")}const k=f[x];return C&&!k?g[w]=void 0:g[w]=(k||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:t}}function yw(t,r,o){r===void 0&&(r=!1),o===void 0&&(o=!0),Hu(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,h)=>(i.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,r?void 0:"i"),i]}function ww(t){try{return t.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Hu(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+r+").")),t}}function Vu(t,r){if(r==="/")return t;if(!t.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,i=t.charAt(o);return i&&i!=="/"?null:t.slice(o)||"/"}const bw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ew=t=>bw.test(t);function Nw(t,r){r===void 0&&(r="/");let{pathname:o,search:i="",hash:l=""}=typeof t=="string"?yo(t):t,c;if(o)if(Ew(o))c=o;else{if(o.includes("//")){let d=o;o=o.replace(/\/\/+/g,"/"),Hu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+o))}o.startsWith("/")?c=Ih(o.substring(1),"/"):c=Ih(o,r)}else c=r;return{pathname:c,search:Sw(i),hash:jw(l)}}function Ih(t,r){let o=r.replace(/\/+$/,"").split("/");return t.split("/").forEach(l=>{l===".."?o.length>1&&o.pop():l!=="."&&o.push(l)}),o.length>1?o.join("/"):"/"}function Uc(t,r,o,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+r+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+o+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Cw(t){return t.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function og(t,r){let o=Cw(t);return r?o.map((i,l)=>l===o.length-1?i.pathname:i.pathnameBase):o.map(i=>i.pathnameBase)}function sg(t,r,o,i){i===void 0&&(i=!1);let l;typeof t=="string"?l=yo(t):(l=ys({},t),Ue(!l.pathname||!l.pathname.includes("?"),Uc("?","pathname","search",l)),Ue(!l.pathname||!l.pathname.includes("#"),Uc("#","pathname","hash",l)),Ue(!l.search||!l.search.includes("#"),Uc("#","search","hash",l)));let c=t===""||l.pathname==="",d=c?"/":l.pathname,f;if(d==null)f=o;else{let x=r.length-1;if(!i&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),x-=1;l.pathname=w.join("/")}f=x>=0?r[x]:"/"}let h=Nw(l,f),g=d&&d!=="/"&&d.endsWith("/"),v=(c||d===".")&&o.endsWith("/");return!h.pathname.endsWith("/")&&(g||v)&&(h.pathname+="/"),h}const nr=t=>t.join("/").replace(/\/\/+/g,"/"),kw=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Sw=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,jw=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Aw(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const ig=["post","put","patch","delete"];new Set(ig);const Tw=["get",...ig];new Set(Tw);/**
51
+ * React Router v6.30.3
52
+ *
53
+ * Copyright (c) Remix Software Inc.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE.md file in the root directory of this source tree.
57
+ *
58
+ * @license MIT
59
+ */function ws(){return ws=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},ws.apply(this,arguments)}const Wu=y.createContext(null),_w=y.createContext(null),Pr=y.createContext(null),Al=y.createContext(null),Rr=y.createContext({outlet:null,matches:[],isDataRoute:!1}),lg=y.createContext(null);function Pw(t,r){let{relative:o}=r===void 0?{}:r;As()||Ue(!1);let{basename:i,navigator:l}=y.useContext(Pr),{hash:c,pathname:d,search:f}=cg(t,{relative:o}),h=d;return i!=="/"&&(h=d==="/"?i:nr([i,d])),l.createHref({pathname:h,search:f,hash:c})}function As(){return y.useContext(Al)!=null}function Tl(){return As()||Ue(!1),y.useContext(Al).location}function ag(t){y.useContext(Pr).static||y.useLayoutEffect(t)}function Rw(){let{isDataRoute:t}=y.useContext(Rr);return t?Ww():Iw()}function Iw(){As()||Ue(!1);let t=y.useContext(Wu),{basename:r,future:o,navigator:i}=y.useContext(Pr),{matches:l}=y.useContext(Rr),{pathname:c}=Tl(),d=JSON.stringify(og(l,o.v7_relativeSplatPath)),f=y.useRef(!1);return ag(()=>{f.current=!0}),y.useCallback(function(g,v){if(v===void 0&&(v={}),!f.current)return;if(typeof g=="number"){i.go(g);return}let x=sg(g,JSON.parse(d),c,v.relative==="path");t==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:nr([r,x.pathname])),(v.replace?i.replace:i.push)(x,v.state,v)},[r,i,d,c,t])}function cg(t,r){let{relative:o}=r===void 0?{}:r,{future:i}=y.useContext(Pr),{matches:l}=y.useContext(Rr),{pathname:c}=Tl(),d=JSON.stringify(og(l,i.v7_relativeSplatPath));return y.useMemo(()=>sg(t,JSON.parse(d),c,o==="path"),[t,d,c,o])}function Lw(t,r){return Mw(t,r)}function Mw(t,r,o,i){As()||Ue(!1);let{navigator:l}=y.useContext(Pr),{matches:c}=y.useContext(Rr),d=c[c.length-1],f=d?d.params:{};d&&d.pathname;let h=d?d.pathnameBase:"/";d&&d.route;let g=Tl(),v;if(r){var x;let N=typeof r=="string"?yo(r):r;h==="/"||(x=N.pathname)!=null&&x.startsWith(h)||Ue(!1),v=N}else v=g;let w=v.pathname||"/",C=w;if(h!=="/"){let N=h.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(N.length).join("/")}let k=iw(t,{pathname:C}),b=Bw(k&&k.map(N=>Object.assign({},N,{params:Object.assign({},f,N.params),pathname:nr([h,l.encodeLocation?l.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?h:nr([h,l.encodeLocation?l.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),c,o,i);return r&&b?y.createElement(Al.Provider,{value:{location:ws({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:tr.Pop}},b):b}function Ow(){let t=Vw(),r=Aw(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),o=t instanceof Error?t.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},r),o?y.createElement("pre",{style:l},o):null,null)}const Dw=y.createElement(Ow,null);class $w extends y.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,o){return o.location!==r.location||o.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:o.error,location:o.location,revalidation:r.revalidation||o.revalidation}}componentDidCatch(r,o){console.error("React Router caught the following error during render",r,o)}render(){return this.state.error!==void 0?y.createElement(Rr.Provider,{value:this.props.routeContext},y.createElement(lg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fw(t){let{routeContext:r,match:o,children:i}=t,l=y.useContext(Wu);return l&&l.static&&l.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=o.route.id),y.createElement(Rr.Provider,{value:r},i)}function Bw(t,r,o,i){var l;if(r===void 0&&(r=[]),o===void 0&&(o=null),i===void 0&&(i=null),t==null){var c;if(!o)return null;if(o.errors)t=o.matches;else if((c=i)!=null&&c.v7_partialHydration&&r.length===0&&!o.initialized&&o.matches.length>0)t=o.matches;else return null}let d=t,f=(l=o)==null?void 0:l.errors;if(f!=null){let v=d.findIndex(x=>x.route.id&&(f==null?void 0:f[x.route.id])!==void 0);v>=0||Ue(!1),d=d.slice(0,Math.min(d.length,v+1))}let h=!1,g=-1;if(o&&i&&i.v7_partialHydration)for(let v=0;v<d.length;v++){let x=d[v];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(g=v),x.route.id){let{loaderData:w,errors:C}=o,k=x.route.loader&&w[x.route.id]===void 0&&(!C||C[x.route.id]===void 0);if(x.route.lazy||k){h=!0,g>=0?d=d.slice(0,g+1):d=[d[0]];break}}}return d.reduceRight((v,x,w)=>{let C,k=!1,b=null,N=null;o&&(C=f&&x.route.id?f[x.route.id]:void 0,b=x.route.errorElement||Dw,h&&(g<0&&w===0?(Kw("route-fallback"),k=!0,N=null):g===w&&(k=!0,N=x.route.hydrateFallbackElement||null)));let S=r.concat(d.slice(0,w+1)),A=()=>{let _;return C?_=b:k?_=N:x.route.Component?_=y.createElement(x.route.Component,null):x.route.element?_=x.route.element:_=v,y.createElement(Fw,{match:x,routeContext:{outlet:v,matches:S,isDataRoute:o!=null},children:_})};return o&&(x.route.ErrorBoundary||x.route.errorElement||w===0)?y.createElement($w,{location:o.location,revalidation:o.revalidation,component:b,error:C,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):A()},null)}var ug=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(ug||{}),dg=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(dg||{});function zw(t){let r=y.useContext(Wu);return r||Ue(!1),r}function Uw(t){let r=y.useContext(_w);return r||Ue(!1),r}function Hw(t){let r=y.useContext(Rr);return r||Ue(!1),r}function fg(t){let r=Hw(),o=r.matches[r.matches.length-1];return o.route.id||Ue(!1),o.route.id}function Vw(){var t;let r=y.useContext(lg),o=Uw(),i=fg();return r!==void 0?r:(t=o.errors)==null?void 0:t[i]}function Ww(){let{router:t}=zw(ug.UseNavigateStable),r=fg(dg.UseNavigateStable),o=y.useRef(!1);return ag(()=>{o.current=!0}),y.useCallback(function(l,c){c===void 0&&(c={}),o.current&&(typeof l=="number"?t.navigate(l):t.navigate(l,ws({fromRouteId:r},c)))},[t,r])}const Lh={};function Kw(t,r,o){Lh[t]||(Lh[t]=!0)}function Gw(t,r){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function pg(t){Ue(!1)}function Yw(t){let{basename:r="/",children:o=null,location:i,navigationType:l=tr.Pop,navigator:c,static:d=!1,future:f}=t;As()&&Ue(!1);let h=r.replace(/^\/*/,"/"),g=y.useMemo(()=>({basename:h,navigator:c,static:d,future:ws({v7_relativeSplatPath:!1},f)}),[h,f,c,d]);typeof i=="string"&&(i=yo(i));let{pathname:v="/",search:x="",hash:w="",state:C=null,key:k="default"}=i,b=y.useMemo(()=>{let N=Vu(v,h);return N==null?null:{location:{pathname:N,search:x,hash:w,state:C,key:k},navigationType:l}},[h,v,x,w,C,k,l]);return b==null?null:y.createElement(Pr.Provider,{value:g},y.createElement(Al.Provider,{children:o,value:b}))}function Xw(t){let{children:r,location:o}=t;return Lw(mu(r),o)}new Promise(()=>{});function mu(t,r){r===void 0&&(r=[]);let o=[];return y.Children.forEach(t,(i,l)=>{if(!y.isValidElement(i))return;let c=[...r,l];if(i.type===y.Fragment){o.push.apply(o,mu(i.props.children,c));return}i.type!==pg&&Ue(!1),!i.props.index||!i.props.children||Ue(!1);let d={id:i.props.id||c.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=mu(i.props.children,c)),o.push(d)}),o}/**
60
+ * React Router DOM v6.30.3
61
+ *
62
+ * Copyright (c) Remix Software Inc.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE.md file in the root directory of this source tree.
66
+ *
67
+ * @license MIT
68
+ */function gu(){return gu=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},gu.apply(this,arguments)}function qw(t,r){if(t==null)return{};var o={},i=Object.keys(t),l,c;for(c=0;c<i.length;c++)l=i[c],!(r.indexOf(l)>=0)&&(o[l]=t[l]);return o}function Qw(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Zw(t,r){return t.button===0&&(!r||r==="_self")&&!Qw(t)}const Jw=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],e1="6";try{window.__reactRouterVersion=e1}catch{}const t1="startTransition",Mh=Sl[t1];function n1(t){let{basename:r,children:o,future:i,window:l}=t,c=y.useRef();c.current==null&&(c.current=rw({window:l,v5Compat:!0}));let d=c.current,[f,h]=y.useState({action:d.action,location:d.location}),{v7_startTransition:g}=i||{},v=y.useCallback(x=>{g&&Mh?Mh(()=>h(x)):h(x)},[h,g]);return y.useLayoutEffect(()=>d.listen(v),[d,v]),y.useEffect(()=>Gw(i),[i]),y.createElement(Yw,{basename:r,children:o,location:f.location,navigationType:f.action,navigator:d,future:i})}const r1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",o1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,s1=y.forwardRef(function(r,o){let{onClick:i,relative:l,reloadDocument:c,replace:d,state:f,target:h,to:g,preventScrollReset:v,viewTransition:x}=r,w=qw(r,Jw),{basename:C}=y.useContext(Pr),k,b=!1;if(typeof g=="string"&&o1.test(g)&&(k=g,r1))try{let _=new URL(window.location.href),I=g.startsWith("//")?new URL(_.protocol+g):new URL(g),O=Vu(I.pathname,C);I.origin===_.origin&&O!=null?g=O+I.search+I.hash:b=!0}catch{}let N=Pw(g,{relative:l}),S=i1(g,{replace:d,state:f,target:h,preventScrollReset:v,relative:l,viewTransition:x});function A(_){i&&i(_),_.defaultPrevented||S(_)}return y.createElement("a",gu({},w,{href:k||N,onClick:b||c?i:A,ref:o,target:h}))});var Oh;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Oh||(Oh={}));var Dh;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Dh||(Dh={}));function i1(t,r){let{target:o,replace:i,state:l,preventScrollReset:c,relative:d,viewTransition:f}=r===void 0?{}:r,h=Rw(),g=Tl(),v=cg(t,{relative:d});return y.useCallback(x=>{if(Zw(x,o)){x.preventDefault();let w=i!==void 0?i:ul(g)===ul(v);h(t,{replace:w,state:l,preventScrollReset:c,relative:d,viewTransition:f})}},[g,h,v,i,l,o,t,c,d,f])}const $h={eventTypes:[],timeRange:{},direction:"all",searchText:""},l1=["all","sent","received","internal"],a1=["1m","5m","1h","24h","custom"];function hg(t){const r=Date.now();switch(t){case"1m":return{since:r-60*1e3,preset:t};case"5m":return{since:r-300*1e3,preset:t};case"1h":return{since:r-3600*1e3,preset:t};case"24h":return{since:r-1440*60*1e3,preset:t};case"custom":default:return{preset:t}}}function c1(){try{const t=new URLSearchParams(window.location.search),r={},o=t.get("eventTypes");o&&(r.eventTypes=o.split(",").filter(Boolean));const i=t.get("direction");i&&l1.includes(i)&&(r.direction=i);const l=t.get("search");l&&(r.searchText=l);const c=t.get("timeRange"),d=t.get("timeStart"),f=t.get("timeEnd");if(c&&a1.includes(c)&&c!=="custom")r.timeRange=hg(c);else if(d||f){const h={preset:"custom"};if(d){const g=new Date(d).getTime();isNaN(g)||(h.since=g)}if(f){const g=new Date(f).getTime();isNaN(g)||(h.until=g)}(h.since!==void 0||h.until!==void 0)&&(r.timeRange=h)}return r}catch{return{}}}function Fh(t){try{const r=new URLSearchParams;t.eventTypes.length>0&&r.set("eventTypes",t.eventTypes.join(",")),t.direction!=="all"&&r.set("direction",t.direction),t.searchText&&r.set("search",t.searchText),t.timeRange.preset&&t.timeRange.preset!=="custom"?r.set("timeRange",t.timeRange.preset):t.timeRange.preset==="custom"&&(t.timeRange.since!==void 0&&r.set("timeStart",new Date(t.timeRange.since).toISOString()),t.timeRange.until!==void 0&&r.set("timeEnd",new Date(t.timeRange.until).toISOString()));const o=r.toString(),i=o?`${window.location.pathname}?${o}`:window.location.pathname;window.history.replaceState(null,"",i)}catch{}}function u1(t={}){const{initialFilters:r={}}=t,[o,i]=y.useState(()=>{const k=c1();return{...$h,...r,...k}}),l=y.useRef(!0);y.useEffect(()=>{if(l.current){l.current=!1,Fh(o);return}Fh(o)},[o]);const c=y.useCallback(k=>{i(b=>({...b,...k}))},[]),d=y.useCallback(k=>{i(b=>({...b,eventTypes:k}))},[]),f=y.useCallback(k=>{i(b=>({...b,timeRange:k}))},[]),h=y.useCallback(k=>{const b=hg(k);i(N=>({...N,timeRange:b}))},[]),g=y.useCallback(k=>{i(b=>({...b,direction:k}))},[]),v=y.useCallback(k=>{i(b=>({...b,searchText:k}))},[]),x=y.useCallback(()=>{i($h);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},[]),w=o.eventTypes.length>0||o.timeRange.preset!==void 0||o.timeRange.since!==void 0||o.timeRange.until!==void 0||o.direction!=="all"||o.searchText!=="";let C=0;return o.eventTypes.length>0&&C++,(o.timeRange.preset!==void 0||o.timeRange.since!==void 0||o.timeRange.until!==void 0)&&C++,o.direction!=="all"&&C++,o.searchText!==""&&C++,{filters:o,setFilters:c,setEventTypes:d,setTimeRange:f,setTimeRangePreset:h,setDirection:g,setSearchText:v,resetFilters:x,hasActiveFilters:w,activeFilterCount:C}}const d1=1e3,f1=1e3,p1=10;function h1(t,r){if(r.eventTypes.length>0&&!r.eventTypes.includes(t.type)||r.direction!=="all"&&t.direction!==r.direction)return!1;if(r.searchText){const o=r.searchText.toLowerCase(),i=(t.destination||"").toLowerCase(),l=(t.peerId||"").toLowerCase(),c=(t.packetId||"").toLowerCase(),d=i.includes(o),f=l.includes(o),h=c.includes(o);if(!d&&!f&&!h)return!1}return!0}function m1(t={}){const{maxEvents:r=d1,reconnectDelay:o=f1,maxReconnectAttempts:i=p1,filters:l}=t,[c,d]=y.useState([]),[f,h]=y.useState("connecting"),[g,v]=y.useState(null),x=y.useRef(null),w=y.useRef(0),C=y.useRef(null),k=y.useRef([]),b=y.useRef(null),N=y.useCallback(()=>{b.current=null;const O=k.current;O.length!==0&&(k.current=[],d(U=>{const M=[...O.reverse(),...U];return M.length>r?M.slice(0,r):M}))},[r]),S=y.useCallback(()=>{x.current&&x.current.close(),h("connecting"),v(null);const O=window.location.protocol==="https:"?"wss:":"ws:",U=window.location.host,M=`${O}//${U}/ws`,D=new WebSocket(M);D.onopen=()=>{h("connected"),v(null),w.current=0},D.onmessage=X=>{try{const V=JSON.parse(X.data);k.current.push(V),b.current===null&&(b.current=requestAnimationFrame(N))}catch{}},D.onerror=()=>{v("WebSocket connection error")},D.onclose=()=>{if(h("disconnected"),x.current=null,w.current<i){const X=o*Math.pow(2,w.current);w.current++,C.current=setTimeout(()=>{S()},X)}else h("error"),v("Max reconnect attempts reached")},x.current=D},[N,o,i]),A=y.useCallback(()=>{d([])},[]),_=y.useCallback(()=>{w.current=0,S()},[S]);y.useEffect(()=>(S(),()=>{if(x.current&&x.current.close(),C.current&&clearTimeout(C.current),b.current!==null&&cancelAnimationFrame(b.current),k.current.length>0){const O=k.current;k.current=[],d(U=>{const M=[...O.reverse(),...U];return M.length>r?M.slice(0,r):M})}}),[S,r]);const I=y.useMemo(()=>l?c.filter(O=>h1(O,l)):c,[c,l]);return{events:c,filteredEvents:I,status:f,error:g,clearEvents:A,reconnect:_}}const g1=50;function x1(t){return{...t.payload,type:t.event_type,timestamp:t.timestamp,nodeId:t.node_id,peerId:t.peer_id||void 0,direction:t.direction||void 0,destination:t.destination||void 0,amount:t.amount||void 0,packetId:t.packet_id||void 0}}function v1(t){const r=new URLSearchParams;return t.eventTypes&&t.eventTypes.length>0&&r.set("types",t.eventTypes.join(",")),t.since!==void 0&&r.set("since",t.since.toString()),t.until!==void 0&&r.set("until",t.until.toString()),t.peerId&&r.set("peerId",t.peerId),t.packetId&&r.set("packetId",t.packetId),t.direction&&r.set("direction",t.direction),t.limit!==void 0&&r.set("limit",t.limit.toString()),t.offset!==void 0&&r.set("offset",t.offset.toString()),r.toString()}function y1(t={}){const{initialFilters:r={},autoFetch:o=!0,pageSize:i=g1}=t,[l,c]=y.useState([]),[d,f]=y.useState(0),[h,g]=y.useState(!1),[v,x]=y.useState(null),[w,C]=y.useState(0),k=y.useRef(r),b=y.useRef(null),N=y.useCallback(async(O,U=!1)=>{b.current&&b.current.abort(),b.current=new AbortController,g(!0),x(null);try{const M=v1({...O,limit:O.limit??i}),D=await fetch(`/api/events?${M}`,{signal:b.current.signal});if(!D.ok){const H=await D.text();throw new Error(`API error: ${D.status} - ${H}`)}const X=await D.json(),V=X.events.map(x1);c(U?H=>[...H,...V]:V),f(X.total),C(X.offset+X.events.length)}catch(M){if(M instanceof Error&&M.name==="AbortError")return;const D=M instanceof Error?M.message:"Failed to fetch events";x(D)}finally{g(!1)}},[i]),S=y.useCallback(async()=>{const O={...k.current,offset:0};k.current=O,C(0),await N(O,!1)},[N]),A=y.useCallback(async()=>{const O={...k.current,offset:w};await N(O,!0)},[N,w]),_=y.useCallback(async O=>{k.current={...O,offset:0},C(0),await N(k.current,!1)},[N]);y.useEffect(()=>(o&&N({...r,offset:0},!1),()=>{b.current&&b.current.abort()}),[]);const I=w<d;return{events:l,total:d,loading:h,error:v,offset:w,fetchMore:A,refresh:S,updateFilters:_,hasMore:I}}function w1(t){const r={};return t.eventTypes.length>0&&(r.eventTypes=t.eventTypes),t.timeRange.since!==void 0&&(r.since=t.timeRange.since),t.timeRange.until!==void 0&&(r.until=t.timeRange.until),t.direction!=="all"&&(r.direction=t.direction),r}function b1(t,r){if(!r)return t;const o=r.toLowerCase();return t.filter(i=>{const l=(i.destination||"").toLowerCase(),c=(i.peerId||"").toLowerCase(),d=(i.packetId||"").toLowerCase();return l.includes(o)||c.includes(o)||d.includes(o)})}function E1(t={}){const{initialMode:r="live",filters:o,pageSize:i=50,maxLiveEvents:l=1e3}=t,[c,d]=y.useState(r),{filteredEvents:f,status:h,error:g,clearEvents:v,reconnect:x}=m1({maxEvents:l,filters:o}),w=y.useMemo(()=>o?w1(o):{},[o]),{events:C,total:k,loading:b,error:N,fetchMore:S,refresh:A,updateFilters:_,hasMore:I}=y1({initialFilters:w,autoFetch:c==="history",pageSize:i}),O=y.useMemo(()=>o!=null&&o.searchText?b1(C,o.searchText):C,[C,o==null?void 0:o.searchText]),U=y.useCallback(re=>{d(re),re==="history"&&_(w)},[w,_]);y.useEffect(()=>{c==="history"&&_(w)},[c,w,_]);const M=y.useCallback(()=>{d("live"),v(),x()},[v,x]),D=y.useCallback(()=>{c==="live"?(v(),x()):A()},[c,v,x,A]),X=y.useCallback(async()=>{c==="history"&&await S()},[c,S]),V=c==="live"?f:O,H=c==="live"?f.length:k;return{mode:c,setMode:U,events:V,total:H,loading:c==="history"?b:!1,error:c==="live"?g:N,connectionStatus:h,loadMore:X,hasMore:c==="history"?I:!1,refresh:D,jumpToLive:M}}function so(t,r,o){let i=o.initialDeps??[],l,c=!0;function d(){var f,h,g;let v;o.key&&((f=o.debug)!=null&&f.call(o))&&(v=Date.now());const x=t();if(!(x.length!==i.length||x.some((k,b)=>i[b]!==k)))return l;i=x;let C;if(o.key&&((h=o.debug)!=null&&h.call(o))&&(C=Date.now()),l=r(...x),o.key&&((g=o.debug)!=null&&g.call(o))){const k=Math.round((Date.now()-v)*100)/100,b=Math.round((Date.now()-C)*100)/100,N=b/16,S=(A,_)=>{for(A=String(A);A.length<_;)A=" "+A;return A};console.info(`%c⏱ ${S(b,5)} /${S(k,5)} ms`,`
69
+ font-size: .6rem;
70
+ font-weight: bold;
71
+ color: hsl(${Math.max(0,Math.min(120-120*N,120))}deg 100% 31%);`,o==null?void 0:o.key)}return o!=null&&o.onChange&&!(c&&o.skipInitialOnChange)&&o.onChange(l),c=!1,l}return d.updateDeps=f=>{i=f},d}function Bh(t,r){if(t===void 0)throw new Error("Unexpected undefined");return t}const N1=(t,r)=>Math.abs(t-r)<1.01,C1=(t,r,o)=>{let i;return function(...l){t.clearTimeout(i),i=t.setTimeout(()=>r.apply(this,l),o)}},zh=t=>{const{offsetWidth:r,offsetHeight:o}=t;return{width:r,height:o}},k1=t=>t,S1=t=>{const r=Math.max(t.startIndex-t.overscan,0),o=Math.min(t.endIndex+t.overscan,t.count-1),i=[];for(let l=r;l<=o;l++)i.push(l);return i},j1=(t,r)=>{const o=t.scrollElement;if(!o)return;const i=t.targetWindow;if(!i)return;const l=d=>{const{width:f,height:h}=d;r({width:Math.round(f),height:Math.round(h)})};if(l(zh(o)),!i.ResizeObserver)return()=>{};const c=new i.ResizeObserver(d=>{const f=()=>{const h=d[0];if(h!=null&&h.borderBoxSize){const g=h.borderBoxSize[0];if(g){l({width:g.inlineSize,height:g.blockSize});return}}l(zh(o))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(f):f()});return c.observe(o,{box:"border-box"}),()=>{c.unobserve(o)}},Uh={passive:!0},Hh=typeof window>"u"?!0:"onscrollend"in window,A1=(t,r)=>{const o=t.scrollElement;if(!o)return;const i=t.targetWindow;if(!i)return;let l=0;const c=t.options.useScrollendEvent&&Hh?()=>{}:C1(i,()=>{r(l,!1)},t.options.isScrollingResetDelay),d=v=>()=>{const{horizontal:x,isRtl:w}=t.options;l=x?o.scrollLeft*(w&&-1||1):o.scrollTop,c(),r(l,v)},f=d(!0),h=d(!1);o.addEventListener("scroll",f,Uh);const g=t.options.useScrollendEvent&&Hh;return g&&o.addEventListener("scrollend",h,Uh),()=>{o.removeEventListener("scroll",f),g&&o.removeEventListener("scrollend",h)}},T1=(t,r,o)=>{if(r!=null&&r.borderBoxSize){const i=r.borderBoxSize[0];if(i)return Math.round(i[o.options.horizontal?"inlineSize":"blockSize"])}return t[o.options.horizontal?"offsetWidth":"offsetHeight"]},_1=(t,{adjustments:r=0,behavior:o},i)=>{var l,c;const d=t+r;(c=(l=i.scrollElement)==null?void 0:l.scrollTo)==null||c.call(l,{[i.options.horizontal?"left":"top"]:d,behavior:o})};class P1{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const i=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(l=>{l.forEach(c=>{const d=()=>{this._measureElement(c.target,c)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(d):d()})}));return{disconnect:()=>{var l;(l=i())==null||l.disconnect(),o=null},observe:l=>{var c;return(c=i())==null?void 0:c.observe(l,{box:"border-box"})},unobserve:l=>{var c;return(c=i())==null?void 0:c.unobserve(l)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([i,l])=>{typeof l>"u"&&delete o[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:k1,rangeExtractor:S1,onChange:()=>{},measureElement:T1,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...o}},this.notify=o=>{var i,l;(l=(i=this.options).onChange)==null||l.call(i,this,o)},this.maybeNotify=so(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,c)=>{this.scrollAdjustments=0,this.scrollDirection=c?this.getScrollOffset()<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=c,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,i)=>{const l=new Map,c=new Map;for(let d=i-1;d>=0;d--){const f=o[d];if(l.has(f.lane))continue;const h=c.get(f.lane);if(h==null||f.end>h.end?c.set(f.lane,f):f.end<h.end&&l.set(f.lane,!0),l.size===this.options.lanes)break}return c.size===this.options.lanes?Array.from(c.values()).sort((d,f)=>d.end===f.end?d.index-f.index:d.end-f.end)[0]:void 0},this.getMeasurementOptions=so(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(o,i,l,c,d,f)=>(this.prevLanes!==void 0&&this.prevLanes!==f&&(this.lanesChangedFlag=!0),this.prevLanes=f,this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:i,scrollMargin:l,getItemKey:c,enabled:d,lanes:f}),{key:!1}),this.getMeasurements=so(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:i,scrollMargin:l,getItemKey:c,enabled:d,lanes:f},h)=>{if(!d)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>o)for(const w of this.laneAssignments.keys())w>=o&&this.laneAssignments.delete(w);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(w=>{this.itemSizeCache.set(w.key,w.size)}));const g=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===o&&(this.lanesSettling=!1);const v=this.measurementsCache.slice(0,g),x=new Array(f).fill(void 0);for(let w=0;w<g;w++){const C=v[w];C&&(x[C.lane]=w)}for(let w=g;w<o;w++){const C=c(w),k=this.laneAssignments.get(w);let b,N;if(k!==void 0&&this.options.lanes>1){b=k;const I=x[b],O=I!==void 0?v[I]:void 0;N=O?O.end+this.options.gap:i+l}else{const I=this.options.lanes===1?v[w-1]:this.getFurthestMeasurement(v,w);N=I?I.end+this.options.gap:i+l,b=I?I.lane:w%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(w,b)}const S=h.get(C),A=typeof S=="number"?S:this.options.estimateSize(w),_=N+A;v[w]={index:w,start:N,size:A,end:_,key:C,lane:b},x[b]=w}return this.measurementsCache=v,v},{key:!1,debug:()=>this.options.debug}),this.calculateRange=so(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,i,l,c)=>this.range=o.length>0&&i>0?R1({measurements:o,outerSize:i,scrollOffset:l,lanes:c}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=so(()=>{let o=null,i=null;const l=this.calculateRange();return l&&(o=l.startIndex,i=l.endIndex),this.maybeNotify.updateDeps([this.isScrolling,o,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,o,i]},(o,i,l,c,d)=>c===null||d===null?[]:o({startIndex:c,endIndex:d,overscan:i,count:l}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const i=this.options.indexAttribute,l=o.getAttribute(i);return l?parseInt(l,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(o,i)=>{const l=this.indexFromElement(o),c=this.measurementsCache[l];if(!c)return;const d=c.key,f=this.elementsCache.get(d);f!==o&&(f&&this.observer.unobserve(f),this.observer.observe(o),this.elementsCache.set(d,o)),o.isConnected&&this.resizeItem(l,this.options.measureElement(o,i,this))},this.resizeItem=(o,i)=>{const l=this.measurementsCache[o];if(!l)return;const c=this.itemSizeCache.get(l.key)??l.size,d=i-c;d!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(l,d,this):l.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=d,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(l.index),this.itemSizeCache=new Map(this.itemSizeCache.set(l.key,i)),this.notify(!1))},this.measureElement=o=>{if(!o){this.elementsCache.forEach((i,l)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(l))});return}this._measureElement(o,void 0)},this.getVirtualItems=so(()=>[this.getVirtualIndexes(),this.getMeasurements()],(o,i)=>{const l=[];for(let c=0,d=o.length;c<d;c++){const f=o[c],h=i[f];l.push(h)}return l},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const i=this.getMeasurements();if(i.length!==0)return Bh(i[mg(0,i.length-1,l=>Bh(i[l]).start,o)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const o=this.scrollElement.document.documentElement;return this.options.horizontal?o.scrollWidth-this.scrollElement.innerWidth:o.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(o,i,l=0)=>{if(!this.scrollElement)return 0;const c=this.getSize(),d=this.getScrollOffset();i==="auto"&&(i=o>=d+c?"end":"start"),i==="center"?o+=(l-c)/2:i==="end"&&(o-=c);const f=this.getMaxScrollOffset();return Math.max(Math.min(f,o),0)},this.getOffsetForIndex=(o,i="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const l=this.measurementsCache[o];if(!l)return;const c=this.getSize(),d=this.getScrollOffset();if(i==="auto")if(l.end>=d+c-this.options.scrollPaddingEnd)i="end";else if(l.start<=d+this.options.scrollPaddingStart)i="start";else return[d,i];if(i==="end"&&o===this.options.count-1)return[this.getMaxScrollOffset(),i];const f=i==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(f,i,l.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(o,{align:i="start",behavior:l}={})=>{l==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,i),{adjustments:void 0,behavior:l})},this.scrollToIndex=(o,{align:i="auto",behavior:l}={})=>{l==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o=Math.max(0,Math.min(o,this.options.count-1)),this.currentScrollToIndex=o;let c=0;const d=10,f=g=>{if(!this.targetWindow)return;const v=this.getOffsetForIndex(o,g);if(!v){console.warn("Failed to get offset for index:",o);return}const[x,w]=v;this._scrollToOffset(x,{adjustments:void 0,behavior:l}),this.targetWindow.requestAnimationFrame(()=>{const C=()=>{if(this.currentScrollToIndex!==o)return;const k=this.getScrollOffset(),b=this.getOffsetForIndex(o,w);if(!b){console.warn("Failed to get offset for index:",o);return}N1(b[0],k)||h(w)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(C):C()})},h=g=>{this.targetWindow&&this.currentScrollToIndex===o&&(c++,c<d?this.targetWindow.requestAnimationFrame(()=>f(g)):console.warn(`Failed to scroll to index ${o} after ${d} attempts.`))};f(i)},this.scrollBy=(o,{behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:i})},this.getTotalSize=()=>{var o;const i=this.getMeasurements();let l;if(i.length===0)l=this.options.paddingStart;else if(this.options.lanes===1)l=((o=i[i.length-1])==null?void 0:o.end)??0;else{const c=Array(this.options.lanes).fill(null);let d=i.length-1;for(;d>=0&&c.some(f=>f===null);){const f=i[d];c[f.lane]===null&&(c[f.lane]=f.end),d--}l=Math.max(...c.filter(f=>f!==null))}return Math.max(l-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(o,{adjustments:i,behavior:l})=>{this.options.scrollToFn(o,{behavior:l,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(r)}}const mg=(t,r,o,i)=>{for(;t<=r;){const l=(t+r)/2|0,c=o(l);if(c<i)t=l+1;else if(c>i)r=l-1;else return l}return t>0?t-1:0};function R1({measurements:t,outerSize:r,scrollOffset:o,lanes:i}){const l=t.length-1,c=h=>t[h].start;if(t.length<=i)return{startIndex:0,endIndex:l};let d=mg(0,l,c,o),f=d;if(i===1)for(;f<l&&t[f].end<o+r;)f++;else if(i>1){const h=Array(i).fill(0);for(;f<l&&h.some(v=>v<o+r);){const v=t[f];h[v.lane]=v.end,f++}const g=Array(i).fill(o+r);for(;d>=0&&g.some(v=>v>=o);){const v=t[d];g[v.lane]=v.start,d--}d=Math.max(0,d-d%i),f=Math.min(l,f+(i-1-f%i))}return{startIndex:d,endIndex:f}}const Vh=typeof document<"u"?y.useLayoutEffect:y.useEffect;function I1({useFlushSync:t=!0,...r}){const o=y.useReducer(()=>({}),{})[1],i={...r,onChange:(c,d)=>{var f;t&&d?jl.flushSync(o):o(),(f=r.onChange)==null||f.call(r,c,d)}},[l]=y.useState(()=>new P1(i));return l.setOptions(i),Vh(()=>l._didMount(),[]),Vh(()=>l._willUpdate()),l}function L1(t){return I1({observeElementRect:j1,observeElementOffset:A1,scrollToFn:_1,...t})}const M1={prepare:"bg-cyan-500",fulfill:"bg-emerald-500",reject:"bg-rose-500"};function bs(t){if("packet_type"in t&&typeof t.packet_type=="string"&&t.packet_type){const o=t.packet_type.toLowerCase();if(o==="prepare"||o==="fulfill"||o==="reject")return o}if("packetType"in t&&typeof t.packetType=="string"){const o=t.packetType.toLowerCase();if(o==="prepare"||o==="fulfill"||o==="reject")return o}const r="type"in t?t.type:"event_type"in t?t.event_type:null;return r==="PACKET_RECEIVED"||r==="PACKET_FORWARDED"?"prepare":r==="PACKET_FULFILLED"?"fulfill":r==="PACKET_REJECTED"?"reject":null}const dT=["PACKET_RECEIVED","PACKET_FORWARDED","PACKET_FULFILLED","PACKET_REJECTED","AGENT_CHANNEL_PAYMENT_SENT"],Wh={NODE_STATUS:"bg-gray-500",PACKET_RECEIVED:"bg-blue-400",PACKET_FORWARDED:"bg-blue-600",PACKET_FULFILLED:"bg-green-500",PACKET_REJECTED:"bg-red-500",ACCOUNT_BALANCE:"bg-blue-500",SETTLEMENT_TRIGGERED:"bg-yellow-500",SETTLEMENT_COMPLETED:"bg-green-500",AGENT_BALANCE_CHANGED:"bg-purple-500",AGENT_WALLET_FUNDED:"bg-indigo-500",AGENT_WALLET_STATE_CHANGED:"bg-cyan-500",FUNDING_RATE_LIMIT_EXCEEDED:"bg-amber-500",FUNDING_TRANSACTION_CONFIRMED:"bg-lime-500",FUNDING_TRANSACTION_FAILED:"bg-rose-500",PAYMENT_CHANNEL_OPENED:"bg-emerald-500",PAYMENT_CHANNEL_BALANCE_UPDATE:"bg-teal-500",PAYMENT_CHANNEL_SETTLED:"bg-green-600",XRP_CHANNEL_OPENED:"bg-orange-500",XRP_CHANNEL_CLAIMED:"bg-orange-400",XRP_CHANNEL_CLOSED:"bg-orange-600",AGENT_CHANNEL_OPENED:"bg-violet-500",AGENT_CHANNEL_PAYMENT_SENT:"bg-violet-400",AGENT_CHANNEL_BALANCE_UPDATE:"bg-violet-500",AGENT_CHANNEL_CLOSED:"bg-violet-600",CLAIM_SENT:"bg-fuchsia-500",CLAIM_RECEIVED:"bg-fuchsia-400",CLAIM_REDEEMED:"bg-fuchsia-600",WALLET_BALANCE_MISMATCH:"bg-red-500",SUSPICIOUS_ACTIVITY_DETECTED:"bg-red-600",RATE_LIMIT_EXCEEDED:"bg-red-400"};function Ku(t){const o=Date.now()-t;return o<1e3?"just now":o<6e4?`${Math.floor(o/1e3)}s ago`:o<36e5?`${Math.floor(o/6e4)}m ago`:o<864e5?`${Math.floor(o/36e5)}h ago`:new Date(t).toLocaleString()}const fT=["ACCOUNT_BALANCE","SETTLEMENT_TRIGGERED","SETTLEMENT_COMPLETED","PAYMENT_CHANNEL_OPENED","PAYMENT_CHANNEL_BALANCE_UPDATE","PAYMENT_CHANNEL_SETTLED","XRP_CHANNEL_OPENED","XRP_CHANNEL_CLAIMED","XRP_CHANNEL_CLOSED","AGENT_CHANNEL_OPENED","AGENT_CHANNEL_BALANCE_UPDATE","AGENT_CHANNEL_CLOSED","CLAIM_SENT","CLAIM_RECEIVED","CLAIM_REDEEMED"];function O1(t){if(typeof t.blockchain=="string"){const r=t.blockchain.toLowerCase();if(r==="xrp"||r==="evm"||r==="aptos")return r}return null}function D1(t){return typeof t.amount=="string"?t.amount:null}function Kh(t){return typeof t.success=="boolean"?t.success:null}function $1(t){return typeof t.verified=="boolean"?t.verified:null}function F1(t){return typeof t.messageId=="string"?t.messageId:null}function pT(t){return typeof t.channelId=="string"?t.channelId:null}function B1(t,r){const o=BigInt(t);switch(r){case"xrp":return`${(Number(o)/1e6).toFixed(6)} XRP`;case"evm":return`${(Number(o)/1e18).toFixed(6)} ETH`;case"aptos":return`${(Number(o)/1e8).toFixed(6)} APT`}}function z1(t){switch(t){case"xrp":return"bg-orange-100 text-orange-800 border-orange-300";case"evm":return"bg-blue-100 text-blue-800 border-blue-300";case"aptos":return"bg-green-100 text-green-800 border-green-300"}}const U1={aptos:{testnet:"https://explorer.aptoslabs.com",mainnet:"https://explorer.aptoslabs.com"},evm:{testnet:"https://sepolia.basescan.org",mainnet:"https://etherscan.io"},xrp:{testnet:"https://testnet.xrpl.org",mainnet:"https://livenet.xrpl.org"}};function gg(t){if(!t||typeof t!="string")return"unknown";const r=t.trim();return/^0x[0-9a-fA-F]{64}$/.test(r)?"aptos":/^0x[0-9a-fA-F]{40}$/.test(r)?"evm":/^r[1-9A-HJ-NP-Za-km-z]{24,34}$/.test(r)?"xrp":"unknown"}function on(t,r="address",o,i="testnet"){if(!t||typeof t!="string")return null;const l=gg(t);if(l==="unknown")return null;const c=U1[l][i];switch(l){case"aptos":return r==="tx"?`${c}/txn/${t}?network=${i}`:`${c}/account/${t}?network=${i}`;case"evm":return r==="tx"?`${c}/tx/${t}`:`${c}/address/${t}`;case"xrp":return r==="tx"?`${c}/transactions/${t}`:`${c}/accounts/${t}`;default:return null}}function Gh(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Ts(...t){return r=>{let o=!1;const i=t.map(l=>{const c=Gh(l,r);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let l=0;l<i.length;l++){const c=i[l];typeof c=="function"?c():Gh(t[l],null)}}}}function wt(...t){return y.useCallback(Ts(...t),t)}var H1=Symbol.for("react.lazy"),dl=Sl[" use ".trim().toString()];function V1(t){return typeof t=="object"&&t!==null&&"then"in t}function xg(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===H1&&"_payload"in t&&V1(t._payload)}function vg(t){const r=W1(t),o=y.forwardRef((i,l)=>{let{children:c,...d}=i;xg(c)&&typeof dl=="function"&&(c=dl(c._payload));const f=y.Children.toArray(c),h=f.find(G1);if(h){const g=h.props.children,v=f.map(x=>x===h?y.Children.count(g)>1?y.Children.only(null):y.isValidElement(g)?g.props.children:null:x);return u.jsx(r,{...d,ref:l,children:y.isValidElement(g)?y.cloneElement(g,void 0,v):null})}return u.jsx(r,{...d,ref:l,children:c})});return o.displayName=`${t}.Slot`,o}var yg=vg("Slot");function W1(t){const r=y.forwardRef((o,i)=>{let{children:l,...c}=o;if(xg(l)&&typeof dl=="function"&&(l=dl(l._payload)),y.isValidElement(l)){const d=X1(l),f=Y1(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Ts(i,d):d),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var K1=Symbol("radix.slottable");function G1(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===K1}function Y1(t,r){const o={...r};for(const i in r){const l=t[i],c=r[i];/^on[A-Z]/.test(i)?l&&c?o[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(o[i]=l):i==="style"?o[i]={...l,...c}:i==="className"&&(o[i]=[l,c].filter(Boolean).join(" "))}return{...t,...o}}function X1(t){var i,l;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}function wg(t){var r,o,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(r=0;r<l;r++)t[r]&&(o=wg(t[r]))&&(i&&(i+=" "),i+=o)}else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}function bg(){for(var t,r,o=0,i="",l=arguments.length;o<l;o++)(t=arguments[o])&&(r=wg(t))&&(i&&(i+=" "),i+=r);return i}const Yh=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Xh=bg,Gu=(t,r)=>o=>{var i;if((r==null?void 0:r.variants)==null)return Xh(t,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:l,defaultVariants:c}=r,d=Object.keys(l).map(g=>{const v=o==null?void 0:o[g],x=c==null?void 0:c[g];if(v===null)return null;const w=Yh(v)||Yh(x);return l[g][w]}),f=o&&Object.entries(o).reduce((g,v)=>{let[x,w]=v;return w===void 0||(g[x]=w),g},{}),h=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((g,v)=>{let{class:x,className:w,...C}=v;return Object.entries(C).every(k=>{let[b,N]=k;return Array.isArray(N)?N.includes({...c,...f}[b]):{...c,...f}[b]===N})?[...g,x,w]:g},[]);return Xh(t,d,h,o==null?void 0:o.class,o==null?void 0:o.className)},q1=(t,r)=>{const o=new Array(t.length+r.length);for(let i=0;i<t.length;i++)o[i]=t[i];for(let i=0;i<r.length;i++)o[t.length+i]=r[i];return o},Q1=(t,r)=>({classGroupId:t,validator:r}),Eg=(t=new Map,r=null,o)=>({nextPart:t,validators:r,classGroupId:o}),fl="-",qh=[],Z1="arbitrary..",J1=t=>{const r=tb(t),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return eb(d);const f=d.split(fl),h=f[0]===""&&f.length>1?1:0;return Ng(f,h,r)},getConflictingClassGroupIds:(d,f)=>{if(f){const h=i[d],g=o[d];return h?g?q1(g,h):h:g||qh}return o[d]||qh}}},Ng=(t,r,o)=>{if(t.length-r===0)return o.classGroupId;const l=t[r],c=o.nextPart.get(l);if(c){const g=Ng(t,r+1,c);if(g)return g}const d=o.validators;if(d===null)return;const f=r===0?t.join(fl):t.slice(r).join(fl),h=d.length;for(let g=0;g<h;g++){const v=d[g];if(v.validator(f))return v.classGroupId}},eb=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=t.slice(1,-1),o=r.indexOf(":"),i=r.slice(0,o);return i?Z1+i:void 0})(),tb=t=>{const{theme:r,classGroups:o}=t;return nb(o,r)},nb=(t,r)=>{const o=Eg();for(const i in t){const l=t[i];Yu(l,o,i,r)}return o},Yu=(t,r,o,i)=>{const l=t.length;for(let c=0;c<l;c++){const d=t[c];rb(d,r,o,i)}},rb=(t,r,o,i)=>{if(typeof t=="string"){ob(t,r,o);return}if(typeof t=="function"){sb(t,r,o,i);return}ib(t,r,o,i)},ob=(t,r,o)=>{const i=t===""?r:Cg(r,t);i.classGroupId=o},sb=(t,r,o,i)=>{if(lb(t)){Yu(t(i),r,o,i);return}r.validators===null&&(r.validators=[]),r.validators.push(Q1(o,t))},ib=(t,r,o,i)=>{const l=Object.entries(t),c=l.length;for(let d=0;d<c;d++){const[f,h]=l[d];Yu(h,Cg(r,f),o,i)}},Cg=(t,r)=>{let o=t;const i=r.split(fl),l=i.length;for(let c=0;c<l;c++){const d=i[c];let f=o.nextPart.get(d);f||(f=Eg(),o.nextPart.set(d,f)),o=f}return o},lb=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,ab=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),i=Object.create(null);const l=(c,d)=>{o[c]=d,r++,r>t&&(r=0,i=o,o=Object.create(null))};return{get(c){let d=o[c];if(d!==void 0)return d;if((d=i[c])!==void 0)return l(c,d),d},set(c,d){c in o?o[c]=d:l(c,d)}}},xu="!",Qh=":",cb=[],Zh=(t,r,o,i,l)=>({modifiers:t,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:i,isExternal:l}),ub=t=>{const{prefix:r,experimentalParseClassName:o}=t;let i=l=>{const c=[];let d=0,f=0,h=0,g;const v=l.length;for(let b=0;b<v;b++){const N=l[b];if(d===0&&f===0){if(N===Qh){c.push(l.slice(h,b)),h=b+1;continue}if(N==="/"){g=b;continue}}N==="["?d++:N==="]"?d--:N==="("?f++:N===")"&&f--}const x=c.length===0?l:l.slice(h);let w=x,C=!1;x.endsWith(xu)?(w=x.slice(0,-1),C=!0):x.startsWith(xu)&&(w=x.slice(1),C=!0);const k=g&&g>h?g-h:void 0;return Zh(c,C,w,k)};if(r){const l=r+Qh,c=i;i=d=>d.startsWith(l)?c(d.slice(l.length)):Zh(cb,!1,d,void 0,!0)}if(o){const l=i;i=c=>o({className:c,parseClassName:l})}return i},db=t=>{const r=new Map;return t.orderSensitiveModifiers.forEach((o,i)=>{r.set(o,1e6+i)}),o=>{const i=[];let l=[];for(let c=0;c<o.length;c++){const d=o[c],f=d[0]==="[",h=r.has(d);f||h?(l.length>0&&(l.sort(),i.push(...l),l=[]),i.push(d)):l.push(d)}return l.length>0&&(l.sort(),i.push(...l)),i}},fb=t=>({cache:ab(t.cacheSize),parseClassName:ub(t),sortModifiers:db(t),...J1(t)}),pb=/\s+/,hb=(t,r)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:l,sortModifiers:c}=r,d=[],f=t.trim().split(pb);let h="";for(let g=f.length-1;g>=0;g-=1){const v=f[g],{isExternal:x,modifiers:w,hasImportantModifier:C,baseClassName:k,maybePostfixModifierPosition:b}=o(v);if(x){h=v+(h.length>0?" "+h:h);continue}let N=!!b,S=i(N?k.substring(0,b):k);if(!S){if(!N){h=v+(h.length>0?" "+h:h);continue}if(S=i(k),!S){h=v+(h.length>0?" "+h:h);continue}N=!1}const A=w.length===0?"":w.length===1?w[0]:c(w).join(":"),_=C?A+xu:A,I=_+S;if(d.indexOf(I)>-1)continue;d.push(I);const O=l(S,N);for(let U=0;U<O.length;++U){const M=O[U];d.push(_+M)}h=v+(h.length>0?" "+h:h)}return h},mb=(...t)=>{let r=0,o,i,l="";for(;r<t.length;)(o=t[r++])&&(i=kg(o))&&(l&&(l+=" "),l+=i);return l},kg=t=>{if(typeof t=="string")return t;let r,o="";for(let i=0;i<t.length;i++)t[i]&&(r=kg(t[i]))&&(o&&(o+=" "),o+=r);return o},gb=(t,...r)=>{let o,i,l,c;const d=h=>{const g=r.reduce((v,x)=>x(v),t());return o=fb(g),i=o.cache.get,l=o.cache.set,c=f,f(h)},f=h=>{const g=i(h);if(g)return g;const v=hb(h,o);return l(h,v),v};return c=d,(...h)=>c(mb(...h))},xb=[],Ke=t=>{const r=o=>o[t]||xb;return r.isThemeGetter=!0,r},Sg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vb=/^\d+\/\d+$/,yb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Eb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,io=t=>vb.test(t),Ne=t=>!!t&&!Number.isNaN(Number(t)),Yn=t=>!!t&&Number.isInteger(Number(t)),Hc=t=>t.endsWith("%")&&Ne(t.slice(0,-1)),yn=t=>yb.test(t),Cb=()=>!0,kb=t=>wb.test(t)&&!bb.test(t),Ag=()=>!1,Sb=t=>Eb.test(t),jb=t=>Nb.test(t),Ab=t=>!ce(t)&&!ue(t),Tb=t=>wo(t,Pg,Ag),ce=t=>Sg.test(t),Nr=t=>wo(t,Rg,kb),Vc=t=>wo(t,Lb,Ne),Jh=t=>wo(t,Tg,Ag),_b=t=>wo(t,_g,jb),Wi=t=>wo(t,Ig,Sb),ue=t=>jg.test(t),ps=t=>bo(t,Rg),Pb=t=>bo(t,Mb),em=t=>bo(t,Tg),Rb=t=>bo(t,Pg),Ib=t=>bo(t,_g),Ki=t=>bo(t,Ig,!0),wo=(t,r,o)=>{const i=Sg.exec(t);return i?i[1]?r(i[1]):o(i[2]):!1},bo=(t,r,o=!1)=>{const i=jg.exec(t);return i?i[1]?r(i[1]):o:!1},Tg=t=>t==="position"||t==="percentage",_g=t=>t==="image"||t==="url",Pg=t=>t==="length"||t==="size"||t==="bg-size",Rg=t=>t==="length",Lb=t=>t==="number",Mb=t=>t==="family-name",Ig=t=>t==="shadow",Ob=()=>{const t=Ke("color"),r=Ke("font"),o=Ke("text"),i=Ke("font-weight"),l=Ke("tracking"),c=Ke("leading"),d=Ke("breakpoint"),f=Ke("container"),h=Ke("spacing"),g=Ke("radius"),v=Ke("shadow"),x=Ke("inset-shadow"),w=Ke("text-shadow"),C=Ke("drop-shadow"),k=Ke("blur"),b=Ke("perspective"),N=Ke("aspect"),S=Ke("ease"),A=Ke("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...I(),ue,ce],U=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[ue,ce,h],X=()=>[io,"full","auto",...D()],V=()=>[Yn,"none","subgrid",ue,ce],H=()=>["auto",{span:["full",Yn,ue,ce]},Yn,ue,ce],F=()=>[Yn,"auto",ue,ce],Y=()=>["auto","min","max","fr",ue,ce],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...D()],ee=()=>[io,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],L=()=>[t,ue,ce],Z=()=>[...I(),em,Jh,{position:[ue,ce]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",Rb,Tb,{size:[ue,ce]}],K=()=>[Hc,ps,Nr],se=()=>["","none","full",g,ue,ce],le=()=>["",Ne,ps,Nr],ge=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[Ne,Hc,em,Jh],Ee=()=>["","none",k,ue,ce],we=()=>["none",Ne,ue,ce],Ae=()=>["none",Ne,ue,ce],ft=()=>[Ne,ue,ce],tt=()=>[io,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[yn],breakpoint:[yn],color:[Cb],container:[yn],"drop-shadow":[yn],ease:["in","out","in-out"],font:[Ab],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[yn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[yn],shadow:[yn],spacing:["px",Ne],text:[yn],"text-shadow":[yn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",io,ce,ue,N]}],container:["container"],columns:[{columns:[Ne,ce,ue,f]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{start:X()}],end:[{end:X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[Yn,"auto",ue,ce]}],basis:[{basis:[io,"full","auto",f,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,io,"auto","initial","none",ce]}],grow:[{grow:["",Ne,ue,ce]}],shrink:[{shrink:["",Ne,ue,ce]}],order:[{order:[Yn,"first","last","none",ue,ce]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[f,"screen",...ee()]}],"min-w":[{"min-w":[f,"screen","none",...ee()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[d]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",o,ps,Nr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ue,Vc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hc,ce]}],"font-family":[{font:[Pb,ce,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,ue,ce]}],"line-clamp":[{"line-clamp":[Ne,"none",ue,Vc]}],leading:[{leading:[c,...D()]}],"list-image":[{"list-image":["none",ue,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",ue,Nr]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Ne,"auto",ue,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yn,ue,ce],radial:["",ue,ce],conic:[Yn,ue,ce]},Ib,_b]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,ue,ce]}],"outline-w":[{outline:["",Ne,ps,Nr]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",v,Ki,Wi]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",x,Ki,Wi]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Ne,Nr]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",w,Ki,Wi]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Ne,ue,ce]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[ue,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,ce]}],filter:[{filter:["","none",ue,ce]}],blur:[{blur:Ee()}],brightness:[{brightness:[Ne,ue,ce]}],contrast:[{contrast:[Ne,ue,ce]}],"drop-shadow":[{"drop-shadow":["","none",C,Ki,Wi]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Ne,ue,ce]}],"hue-rotate":[{"hue-rotate":[Ne,ue,ce]}],invert:[{invert:["",Ne,ue,ce]}],saturate:[{saturate:[Ne,ue,ce]}],sepia:[{sepia:["",Ne,ue,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,ce]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,ue,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,ue,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,ue,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,ue,ce]}],"backdrop-invert":[{"backdrop-invert":["",Ne,ue,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,ue,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,ue,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,ue,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",ue,ce]}],ease:[{ease:["linear","initial",S,ue,ce]}],delay:[{delay:[Ne,ue,ce]}],animate:[{animate:["none",A,ue,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ue,ce]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:ft()}],"skew-x":[{"skew-x":ft()}],"skew-y":[{"skew-y":ft()}],transform:[{transform:[ue,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:tt()}],"translate-x":[{"translate-x":tt()}],"translate-y":[{"translate-y":tt()}],"translate-z":[{"translate-z":tt()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue,ce]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Ne,ps,Nr,Vc]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Db=gb(Ob);function ye(...t){return Db(bg(t))}const $b=Gu("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function et({className:t,variant:r="default",asChild:o=!1,...i}){const l=o?yg:"span";return u.jsx(l,{"data-slot":"badge","data-variant":r,className:ye($b({variant:r}),t),...i})}function Fb(){const t=document.activeElement;if(!t)return!1;const r=t.tagName.toUpperCase();return!!(r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||t.isContentEditable||t.getAttribute("contenteditable")==="true")}function Bb({events:t,onEventClick:r,scrollToIndex:o,enabled:i=!0}){const[l,c]=y.useState(null),d=y.useRef(t);d.current=t,y.useEffect(()=>{c(null)},[t]);const f=y.useCallback(h=>{if(!i||Fb())return;const g=d.current;if(g.length!==0)switch(h.key){case"j":case"ArrowDown":{h.preventDefault(),c(v=>{const x=v===null?0:Math.min(v+1,g.length-1);return o(x),x});break}case"k":case"ArrowUp":{h.preventDefault(),c(v=>{const x=v===null?0:Math.max(v-1,0);return o(x),x});break}case"Enter":{c(v=>(v!==null&&v>=0&&v<g.length&&r(g[v]),v));break}}},[i,r,o]);return y.useEffect(()=>(document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)),[f]),{selectedIndex:l}}/**
72
+ * @license lucide-react v0.563.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const Lg=(...t)=>t.filter((r,o,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===o).join(" ").trim();/**
77
+ * @license lucide-react v0.563.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const zb=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
82
+ * @license lucide-react v0.563.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Ub=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,i)=>i?i.toUpperCase():o.toLowerCase());/**
87
+ * @license lucide-react v0.563.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const tm=t=>{const r=Ub(t);return r.charAt(0).toUpperCase()+r.slice(1)};/**
92
+ * @license lucide-react v0.563.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */var Hb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
97
+ * @license lucide-react v0.563.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Vb=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
102
+ * @license lucide-react v0.563.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const Wb=y.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:l="",children:c,iconNode:d,...f},h)=>y.createElement("svg",{ref:h,...Hb,width:r,height:r,stroke:t,strokeWidth:i?Number(o)*24/Number(r):o,className:Lg("lucide",l),...!c&&!Vb(f)&&{"aria-hidden":"true"},...f},[...d.map(([g,v])=>y.createElement(g,v)),...Array.isArray(c)?c:[c]]));/**
107
+ * @license lucide-react v0.563.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const be=(t,r)=>{const o=y.forwardRef(({className:i,...l},c)=>y.createElement(Wb,{ref:c,iconNode:r,className:Lg(`lucide-${zb(tm(t))}`,`lucide-${t}`,i),...l}));return o.displayName=tm(t),o};/**
112
+ * @license lucide-react v0.563.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const Kb=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Mg=be("activity",Kb);/**
117
+ * @license lucide-react v0.563.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const Gb=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],Og=be("arrow-down-left",Gb);/**
122
+ * @license lucide-react v0.563.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const Yb=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],Xb=be("arrow-right-left",Yb);/**
127
+ * @license lucide-react v0.563.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const qb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Qb=be("arrow-right",qb);/**
132
+ * @license lucide-react v0.563.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const Zb=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Dg=be("arrow-up-right",Zb);/**
137
+ * @license lucide-react v0.563.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const Jb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_l=be("check",Jb);/**
142
+ * @license lucide-react v0.563.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const eE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],vu=be("circle-alert",eE);/**
147
+ * @license lucide-react v0.563.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const tE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Xu=be("circle-check",tE);/**
152
+ * @license lucide-react v0.563.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const nE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Es=be("circle",nE);/**
157
+ * @license lucide-react v0.563.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const rE=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],oE=be("clock",rE);/**
162
+ * @license lucide-react v0.563.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const sE=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],iE=be("coins",sE);/**
167
+ * @license lucide-react v0.563.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const lE=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],qu=be("copy",lE);/**
172
+ * @license lucide-react v0.563.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const aE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Qu=be("external-link",aE);/**
177
+ * @license lucide-react v0.563.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const cE=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],uE=be("eye-off",cE);/**
182
+ * @license lucide-react v0.563.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const dE=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fE=be("eye",dE);/**
187
+ * @license lucide-react v0.563.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const pE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],hE=be("globe",pE);/**
192
+ * @license lucide-react v0.563.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const mE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],gE=be("history",mE);/**
197
+ * @license lucide-react v0.563.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const xE=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],rl=be("key",xE);/**
202
+ * @license lucide-react v0.563.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const vE=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],yE=be("keyboard",vE);/**
207
+ * @license lucide-react v0.563.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const wE=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],bE=be("layers",wE);/**
212
+ * @license lucide-react v0.563.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const EE=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],NE=be("layout-dashboard",EE);/**
217
+ * @license lucide-react v0.563.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const CE=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Pl=be("link-2",CE);/**
222
+ * @license lucide-react v0.563.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const kE=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],$g=be("list-tree",kE);/**
227
+ * @license lucide-react v0.563.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const SE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],jE=be("lock",SE);/**
232
+ * @license lucide-react v0.563.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const AE=[["path",{d:"M5 12h14",key:"1ays0h"}]],TE=be("minus",AE);/**
237
+ * @license lucide-react v0.563.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const _E=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Zu=be("network",_E);/**
242
+ * @license lucide-react v0.563.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const PE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],nm=be("plus",PE);/**
247
+ * @license lucide-react v0.563.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const RE=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],vs=be("radio",RE);/**
252
+ * @license lucide-react v0.563.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const IE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],yu=be("refresh-cw",IE);/**
257
+ * @license lucide-react v0.563.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const LE=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],ME=be("search-x",LE);/**
262
+ * @license lucide-react v0.563.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const OE=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],DE=be("trash-2",OE);/**
267
+ * @license lucide-react v0.563.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const $E=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],FE=be("trending-down",$E);/**
272
+ * @license lucide-react v0.563.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const BE=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],pl=be("trending-up",BE);/**
277
+ * @license lucide-react v0.563.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const zE=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Fg=be("triangle-alert",zE);/**
282
+ * @license lucide-react v0.563.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const UE=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],rm=be("upload",UE);/**
287
+ * @license lucide-react v0.563.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const HE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ju=be("users",HE);/**
292
+ * @license lucide-react v0.563.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const VE=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],_s=be("wallet",VE);/**
297
+ * @license lucide-react v0.563.0 - ISC
298
+ *
299
+ * This source code is licensed under the ISC license.
300
+ * See the LICENSE file in the root directory of this source tree.
301
+ */const WE=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Bg=be("wifi-off",WE);/**
302
+ * @license lucide-react v0.563.0 - ISC
303
+ *
304
+ * This source code is licensed under the ISC license.
305
+ * See the LICENSE file in the root directory of this source tree.
306
+ */const KE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zg=be("x",KE);/**
307
+ * @license lucide-react v0.563.0 - ISC
308
+ *
309
+ * This source code is licensed under the ISC license.
310
+ * See the LICENSE file in the root directory of this source tree.
311
+ */const GE=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ed=be("zap",GE),YE=Gu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ze({className:t,variant:r="default",size:o="default",asChild:i=!1,...l}){const c=i?yg:"button";return u.jsx(c,{"data-slot":"button","data-variant":r,"data-size":o,className:ye(YE({variant:r,size:o,className:t})),...l})}function Me(t,r,{checkForDefaultPrevented:o=!0}={}){return function(l){if(t==null||t(l),o===!1||!l.defaultPrevented)return r==null?void 0:r(l)}}function XE(t,r){const o=y.createContext(r),i=c=>{const{children:d,...f}=c,h=y.useMemo(()=>f,Object.values(f));return u.jsx(o.Provider,{value:h,children:d})};i.displayName=t+"Provider";function l(c){const d=y.useContext(o);if(d)return d;if(r!==void 0)return r;throw new Error(`\`${c}\` must be used within \`${t}\``)}return[i,l]}function Eo(t,r=[]){let o=[];function i(c,d){const f=y.createContext(d),h=o.length;o=[...o,d];const g=x=>{var S;const{scope:w,children:C,...k}=x,b=((S=w==null?void 0:w[t])==null?void 0:S[h])||f,N=y.useMemo(()=>k,Object.values(k));return u.jsx(b.Provider,{value:N,children:C})};g.displayName=c+"Provider";function v(x,w){var b;const C=((b=w==null?void 0:w[t])==null?void 0:b[h])||f,k=y.useContext(C);if(k)return k;if(d!==void 0)return d;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[g,v]}const l=()=>{const c=o.map(d=>y.createContext(d));return function(f){const h=(f==null?void 0:f[t])||c;return y.useMemo(()=>({[`__scope${t}`]:{...f,[t]:h}}),[f,h])}};return l.scopeName=t,[i,qE(l,...r)]}function qE(...t){const r=t[0];if(t.length===1)return r;const o=()=>{const i=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const d=i.reduce((f,{useScope:h,scopeName:g})=>{const x=h(c)[`__scope${g}`];return{...f,...x}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return o.scopeName=r.scopeName,o}function QE(t){const r=ZE(t),o=y.forwardRef((i,l)=>{const{children:c,...d}=i,f=y.Children.toArray(c),h=f.find(eN);if(h){const g=h.props.children,v=f.map(x=>x===h?y.Children.count(g)>1?y.Children.only(null):y.isValidElement(g)?g.props.children:null:x);return u.jsx(r,{...d,ref:l,children:y.isValidElement(g)?y.cloneElement(g,void 0,v):null})}return u.jsx(r,{...d,ref:l,children:c})});return o.displayName=`${t}.Slot`,o}function ZE(t){const r=y.forwardRef((o,i)=>{const{children:l,...c}=o;if(y.isValidElement(l)){const d=nN(l),f=tN(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Ts(i,d):d),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var JE=Symbol("radix.slottable");function eN(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===JE}function tN(t,r){const o={...r};for(const i in r){const l=t[i],c=r[i];/^on[A-Z]/.test(i)?l&&c?o[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(o[i]=l):i==="style"?o[i]={...l,...c}:i==="className"&&(o[i]=[l,c].filter(Boolean).join(" "))}return{...t,...o}}function nN(t){var i,l;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var rN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=rN.reduce((t,r)=>{const o=QE(`Primitive.${r}`),i=y.forwardRef((l,c)=>{const{asChild:d,...f}=l,h=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(h,{...f,ref:c})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function oN(t,r){t&&jl.flushSync(()=>t.dispatchEvent(r))}function Sr(t){const r=y.useRef(t);return y.useEffect(()=>{r.current=t}),y.useMemo(()=>(...o)=>{var i;return(i=r.current)==null?void 0:i.call(r,...o)},[])}function sN(t,r=globalThis==null?void 0:globalThis.document){const o=Sr(t);y.useEffect(()=>{const i=l=>{l.key==="Escape"&&o(l)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[o,r])}var iN="DismissableLayer",wu="dismissableLayer.update",lN="dismissableLayer.pointerDownOutside",aN="dismissableLayer.focusOutside",om,Ug=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),td=y.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,onDismiss:f,...h}=t,g=y.useContext(Ug),[v,x]=y.useState(null),w=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=y.useState({}),k=wt(r,M=>x(M)),b=Array.from(g.layers),[N]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(N),A=v?b.indexOf(v):-1,_=g.layersWithOutsidePointerEventsDisabled.size>0,I=A>=S,O=dN(M=>{const D=M.target,X=[...g.branches].some(V=>V.contains(D));!I||X||(l==null||l(M),d==null||d(M),M.defaultPrevented||f==null||f())},w),U=fN(M=>{const D=M.target;[...g.branches].some(V=>V.contains(D))||(c==null||c(M),d==null||d(M),M.defaultPrevented||f==null||f())},w);return sN(M=>{A===g.layers.size-1&&(i==null||i(M),!M.defaultPrevented&&f&&(M.preventDefault(),f()))},w),y.useEffect(()=>{if(v)return o&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(om=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(v)),g.layers.add(v),sm(),()=>{o&&g.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=om)}},[v,w,o,g]),y.useEffect(()=>()=>{v&&(g.layers.delete(v),g.layersWithOutsidePointerEventsDisabled.delete(v),sm())},[v,g]),y.useEffect(()=>{const M=()=>C({});return document.addEventListener(wu,M),()=>document.removeEventListener(wu,M)},[]),u.jsx(He.div,{...h,ref:k,style:{pointerEvents:_?I?"auto":"none":void 0,...t.style},onFocusCapture:Me(t.onFocusCapture,U.onFocusCapture),onBlurCapture:Me(t.onBlurCapture,U.onBlurCapture),onPointerDownCapture:Me(t.onPointerDownCapture,O.onPointerDownCapture)})});td.displayName=iN;var cN="DismissableLayerBranch",uN=y.forwardRef((t,r)=>{const o=y.useContext(Ug),i=y.useRef(null),l=wt(r,i);return y.useEffect(()=>{const c=i.current;if(c)return o.branches.add(c),()=>{o.branches.delete(c)}},[o.branches]),u.jsx(He.div,{...t,ref:l})});uN.displayName=cN;function dN(t,r=globalThis==null?void 0:globalThis.document){const o=Sr(t),i=y.useRef(!1),l=y.useRef(()=>{});return y.useEffect(()=>{const c=f=>{if(f.target&&!i.current){let h=function(){Hg(lN,o,g,{discrete:!0})};const g={originalEvent:f};f.pointerType==="touch"?(r.removeEventListener("click",l.current),l.current=h,r.addEventListener("click",l.current,{once:!0})):h()}else r.removeEventListener("click",l.current);i.current=!1},d=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(d),r.removeEventListener("pointerdown",c),r.removeEventListener("click",l.current)}},[r,o]),{onPointerDownCapture:()=>i.current=!0}}function fN(t,r=globalThis==null?void 0:globalThis.document){const o=Sr(t),i=y.useRef(!1);return y.useEffect(()=>{const l=c=>{c.target&&!i.current&&Hg(aN,o,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",l),()=>r.removeEventListener("focusin",l)},[r,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function sm(){const t=new CustomEvent(wu);document.dispatchEvent(t)}function Hg(t,r,o,{discrete:i}){const l=o.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:o});r&&l.addEventListener(t,r,{once:!0}),i?oN(l,c):l.dispatchEvent(c)}var rr=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},pN=Sl[" useId ".trim().toString()]||(()=>{}),hN=0;function fo(t){const[r,o]=y.useState(pN());return rr(()=>{o(i=>i??String(hN++))},[t]),r?`radix-${r}`:""}const mN=["top","right","bottom","left"],or=Math.min,St=Math.max,hl=Math.round,Gi=Math.floor,an=t=>({x:t,y:t}),gN={left:"right",right:"left",bottom:"top",top:"bottom"},xN={start:"end",end:"start"};function bu(t,r,o){return St(t,or(r,o))}function Nn(t,r){return typeof t=="function"?t(r):t}function Cn(t){return t.split("-")[0]}function No(t){return t.split("-")[1]}function nd(t){return t==="x"?"y":"x"}function rd(t){return t==="y"?"height":"width"}const vN=new Set(["top","bottom"]);function ln(t){return vN.has(Cn(t))?"y":"x"}function od(t){return nd(ln(t))}function yN(t,r,o){o===void 0&&(o=!1);const i=No(t),l=od(t),c=rd(l);let d=l==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(d=ml(d)),[d,ml(d)]}function wN(t){const r=ml(t);return[Eu(t),r,Eu(r)]}function Eu(t){return t.replace(/start|end/g,r=>xN[r])}const im=["left","right"],lm=["right","left"],bN=["top","bottom"],EN=["bottom","top"];function NN(t,r,o){switch(t){case"top":case"bottom":return o?r?lm:im:r?im:lm;case"left":case"right":return r?bN:EN;default:return[]}}function CN(t,r,o,i){const l=No(t);let c=NN(Cn(t),o==="start",i);return l&&(c=c.map(d=>d+"-"+l),r&&(c=c.concat(c.map(Eu)))),c}function ml(t){return t.replace(/left|right|bottom|top/g,r=>gN[r])}function kN(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vg(t){return typeof t!="number"?kN(t):{top:t,right:t,bottom:t,left:t}}function gl(t){const{x:r,y:o,width:i,height:l}=t;return{width:i,height:l,top:o,left:r,right:r+i,bottom:o+l,x:r,y:o}}function am(t,r,o){let{reference:i,floating:l}=t;const c=ln(r),d=od(r),f=rd(d),h=Cn(r),g=c==="y",v=i.x+i.width/2-l.width/2,x=i.y+i.height/2-l.height/2,w=i[f]/2-l[f]/2;let C;switch(h){case"top":C={x:v,y:i.y-l.height};break;case"bottom":C={x:v,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:x};break;case"left":C={x:i.x-l.width,y:x};break;default:C={x:i.x,y:i.y}}switch(No(r)){case"start":C[d]-=w*(o&&g?-1:1);break;case"end":C[d]+=w*(o&&g?-1:1);break}return C}const SN=async(t,r,o)=>{const{placement:i="bottom",strategy:l="absolute",middleware:c=[],platform:d}=o,f=c.filter(Boolean),h=await(d.isRTL==null?void 0:d.isRTL(r));let g=await d.getElementRects({reference:t,floating:r,strategy:l}),{x:v,y:x}=am(g,i,h),w=i,C={},k=0;for(let b=0;b<f.length;b++){const{name:N,fn:S}=f[b],{x:A,y:_,data:I,reset:O}=await S({x:v,y:x,initialPlacement:i,placement:w,strategy:l,middlewareData:C,rects:g,platform:d,elements:{reference:t,floating:r}});v=A??v,x=_??x,C={...C,[N]:{...C[N],...I}},O&&k<=50&&(k++,typeof O=="object"&&(O.placement&&(w=O.placement),O.rects&&(g=O.rects===!0?await d.getElementRects({reference:t,floating:r,strategy:l}):O.rects),{x:v,y:x}=am(g,w,h)),b=-1)}return{x:v,y:x,placement:w,strategy:l,middlewareData:C}};async function Ns(t,r){var o;r===void 0&&(r={});const{x:i,y:l,platform:c,rects:d,elements:f,strategy:h}=t,{boundary:g="clippingAncestors",rootBoundary:v="viewport",elementContext:x="floating",altBoundary:w=!1,padding:C=0}=Nn(r,t),k=Vg(C),N=f[w?x==="floating"?"reference":"floating":x],S=gl(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(N)))==null||o?N:N.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:g,rootBoundary:v,strategy:h})),A=x==="floating"?{x:i,y:l,width:d.floating.width,height:d.floating.height}:d.reference,_=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),I=await(c.isElement==null?void 0:c.isElement(_))?await(c.getScale==null?void 0:c.getScale(_))||{x:1,y:1}:{x:1,y:1},O=gl(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:A,offsetParent:_,strategy:h}):A);return{top:(S.top-O.top+k.top)/I.y,bottom:(O.bottom-S.bottom+k.bottom)/I.y,left:(S.left-O.left+k.left)/I.x,right:(O.right-S.right+k.right)/I.x}}const jN=t=>({name:"arrow",options:t,async fn(r){const{x:o,y:i,placement:l,rects:c,platform:d,elements:f,middlewareData:h}=r,{element:g,padding:v=0}=Nn(t,r)||{};if(g==null)return{};const x=Vg(v),w={x:o,y:i},C=od(l),k=rd(C),b=await d.getDimensions(g),N=C==="y",S=N?"top":"left",A=N?"bottom":"right",_=N?"clientHeight":"clientWidth",I=c.reference[k]+c.reference[C]-w[C]-c.floating[k],O=w[C]-c.reference[C],U=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let M=U?U[_]:0;(!M||!await(d.isElement==null?void 0:d.isElement(U)))&&(M=f.floating[_]||c.floating[k]);const D=I/2-O/2,X=M/2-b[k]/2-1,V=or(x[S],X),H=or(x[A],X),F=V,Y=M-b[k]-H,re=M/2-b[k]/2+D,W=bu(F,re,Y),G=!h.arrow&&No(l)!=null&&re!==W&&c.reference[k]/2-(re<F?V:H)-b[k]/2<0,ee=G?re<F?re-F:re-Y:0;return{[C]:w[C]+ee,data:{[C]:W,centerOffset:re-W-ee,...G&&{alignmentOffset:ee}},reset:G}}}),AN=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var o,i;const{placement:l,middlewareData:c,rects:d,initialPlacement:f,platform:h,elements:g}=r,{mainAxis:v=!0,crossAxis:x=!0,fallbackPlacements:w,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:b=!0,...N}=Nn(t,r);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const S=Cn(l),A=ln(f),_=Cn(f)===f,I=await(h.isRTL==null?void 0:h.isRTL(g.floating)),O=w||(_||!b?[ml(f)]:wN(f)),U=k!=="none";!w&&U&&O.push(...CN(f,b,k,I));const M=[f,...O],D=await Ns(r,N),X=[];let V=((i=c.flip)==null?void 0:i.overflows)||[];if(v&&X.push(D[S]),x){const re=yN(l,d,I);X.push(D[re[0]],D[re[1]])}if(V=[...V,{placement:l,overflows:X}],!X.every(re=>re<=0)){var H,F;const re=(((H=c.flip)==null?void 0:H.index)||0)+1,W=M[re];if(W&&(!(x==="alignment"?A!==ln(W):!1)||V.every(L=>ln(L.placement)===A?L.overflows[0]>0:!0)))return{data:{index:re,overflows:V},reset:{placement:W}};let G=(F=V.filter(ee=>ee.overflows[0]<=0).sort((ee,L)=>ee.overflows[1]-L.overflows[1])[0])==null?void 0:F.placement;if(!G)switch(C){case"bestFit":{var Y;const ee=(Y=V.filter(L=>{if(U){const Z=ln(L.placement);return Z===A||Z==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Z=>Z>0).reduce((Z,Q)=>Z+Q,0)]).sort((L,Z)=>L[1]-Z[1])[0])==null?void 0:Y[0];ee&&(G=ee);break}case"initialPlacement":G=f;break}if(l!==G)return{reset:{placement:G}}}return{}}}};function cm(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function um(t){return mN.some(r=>t[r]>=0)}const TN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:o}=r,{strategy:i="referenceHidden",...l}=Nn(t,r);switch(i){case"referenceHidden":{const c=await Ns(r,{...l,elementContext:"reference"}),d=cm(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:um(d)}}}case"escaped":{const c=await Ns(r,{...l,altBoundary:!0}),d=cm(c,o.floating);return{data:{escapedOffsets:d,escaped:um(d)}}}default:return{}}}}},Wg=new Set(["left","top"]);async function _N(t,r){const{placement:o,platform:i,elements:l}=t,c=await(i.isRTL==null?void 0:i.isRTL(l.floating)),d=Cn(o),f=No(o),h=ln(o)==="y",g=Wg.has(d)?-1:1,v=c&&h?-1:1,x=Nn(r,t);let{mainAxis:w,crossAxis:C,alignmentAxis:k}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return f&&typeof k=="number"&&(C=f==="end"?k*-1:k),h?{x:C*v,y:w*g}:{x:w*g,y:C*v}}const PN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var o,i;const{x:l,y:c,placement:d,middlewareData:f}=r,h=await _N(r,t);return d===((o=f.offset)==null?void 0:o.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:l+h.x,y:c+h.y,data:{...h,placement:d}}}}},RN=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:o,y:i,placement:l}=r,{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:N=>{let{x:S,y:A}=N;return{x:S,y:A}}},...h}=Nn(t,r),g={x:o,y:i},v=await Ns(r,h),x=ln(Cn(l)),w=nd(x);let C=g[w],k=g[x];if(c){const N=w==="y"?"top":"left",S=w==="y"?"bottom":"right",A=C+v[N],_=C-v[S];C=bu(A,C,_)}if(d){const N=x==="y"?"top":"left",S=x==="y"?"bottom":"right",A=k+v[N],_=k-v[S];k=bu(A,k,_)}const b=f.fn({...r,[w]:C,[x]:k});return{...b,data:{x:b.x-o,y:b.y-i,enabled:{[w]:c,[x]:d}}}}}},IN=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:o,y:i,placement:l,rects:c,middlewareData:d}=r,{offset:f=0,mainAxis:h=!0,crossAxis:g=!0}=Nn(t,r),v={x:o,y:i},x=ln(l),w=nd(x);let C=v[w],k=v[x];const b=Nn(f,r),N=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(h){const _=w==="y"?"height":"width",I=c.reference[w]-c.floating[_]+N.mainAxis,O=c.reference[w]+c.reference[_]-N.mainAxis;C<I?C=I:C>O&&(C=O)}if(g){var S,A;const _=w==="y"?"width":"height",I=Wg.has(Cn(l)),O=c.reference[x]-c.floating[_]+(I&&((S=d.offset)==null?void 0:S[x])||0)+(I?0:N.crossAxis),U=c.reference[x]+c.reference[_]+(I?0:((A=d.offset)==null?void 0:A[x])||0)-(I?N.crossAxis:0);k<O?k=O:k>U&&(k=U)}return{[w]:C,[x]:k}}}},LN=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var o,i;const{placement:l,rects:c,platform:d,elements:f}=r,{apply:h=()=>{},...g}=Nn(t,r),v=await Ns(r,g),x=Cn(l),w=No(l),C=ln(l)==="y",{width:k,height:b}=c.floating;let N,S;x==="top"||x==="bottom"?(N=x,S=w===(await(d.isRTL==null?void 0:d.isRTL(f.floating))?"start":"end")?"left":"right"):(S=x,N=w==="end"?"top":"bottom");const A=b-v.top-v.bottom,_=k-v.left-v.right,I=or(b-v[N],A),O=or(k-v[S],_),U=!r.middlewareData.shift;let M=I,D=O;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(D=_),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(M=A),U&&!w){const V=St(v.left,0),H=St(v.right,0),F=St(v.top,0),Y=St(v.bottom,0);C?D=k-2*(V!==0||H!==0?V+H:St(v.left,v.right)):M=b-2*(F!==0||Y!==0?F+Y:St(v.top,v.bottom))}await h({...r,availableWidth:D,availableHeight:M});const X=await d.getDimensions(f.floating);return k!==X.width||b!==X.height?{reset:{rects:!0}}:{}}}};function Rl(){return typeof window<"u"}function Co(t){return Kg(t)?(t.nodeName||"").toLowerCase():"#document"}function jt(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function un(t){var r;return(r=(Kg(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Kg(t){return Rl()?t instanceof Node||t instanceof jt(t).Node:!1}function Kt(t){return Rl()?t instanceof Element||t instanceof jt(t).Element:!1}function cn(t){return Rl()?t instanceof HTMLElement||t instanceof jt(t).HTMLElement:!1}function dm(t){return!Rl()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof jt(t).ShadowRoot}const MN=new Set(["inline","contents"]);function Ps(t){const{overflow:r,overflowX:o,overflowY:i,display:l}=Gt(t);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&!MN.has(l)}const ON=new Set(["table","td","th"]);function DN(t){return ON.has(Co(t))}const $N=[":popover-open",":modal"];function Il(t){return $N.some(r=>{try{return t.matches(r)}catch{return!1}})}const FN=["transform","translate","scale","rotate","perspective"],BN=["transform","translate","scale","rotate","perspective","filter"],zN=["paint","layout","strict","content"];function sd(t){const r=id(),o=Kt(t)?Gt(t):t;return FN.some(i=>o[i]?o[i]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!r&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!r&&(o.filter?o.filter!=="none":!1)||BN.some(i=>(o.willChange||"").includes(i))||zN.some(i=>(o.contain||"").includes(i))}function UN(t){let r=sr(t);for(;cn(r)&&!go(r);){if(sd(r))return r;if(Il(r))return null;r=sr(r)}return null}function id(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const HN=new Set(["html","body","#document"]);function go(t){return HN.has(Co(t))}function Gt(t){return jt(t).getComputedStyle(t)}function Ll(t){return Kt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function sr(t){if(Co(t)==="html")return t;const r=t.assignedSlot||t.parentNode||dm(t)&&t.host||un(t);return dm(r)?r.host:r}function Gg(t){const r=sr(t);return go(r)?t.ownerDocument?t.ownerDocument.body:t.body:cn(r)&&Ps(r)?r:Gg(r)}function Cs(t,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const l=Gg(t),c=l===((i=t.ownerDocument)==null?void 0:i.body),d=jt(l);if(c){const f=Nu(d);return r.concat(d,d.visualViewport||[],Ps(l)?l:[],f&&o?Cs(f):[])}return r.concat(l,Cs(l,[],o))}function Nu(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yg(t){const r=Gt(t);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const l=cn(t),c=l?t.offsetWidth:o,d=l?t.offsetHeight:i,f=hl(o)!==c||hl(i)!==d;return f&&(o=c,i=d),{width:o,height:i,$:f}}function ld(t){return Kt(t)?t:t.contextElement}function po(t){const r=ld(t);if(!cn(r))return an(1);const o=r.getBoundingClientRect(),{width:i,height:l,$:c}=Yg(r);let d=(c?hl(o.width):o.width)/i,f=(c?hl(o.height):o.height)/l;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const VN=an(0);function Xg(t){const r=jt(t);return!id()||!r.visualViewport?VN:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function WN(t,r,o){return r===void 0&&(r=!1),!o||r&&o!==jt(t)?!1:r}function jr(t,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const l=t.getBoundingClientRect(),c=ld(t);let d=an(1);r&&(i?Kt(i)&&(d=po(i)):d=po(t));const f=WN(c,o,i)?Xg(c):an(0);let h=(l.left+f.x)/d.x,g=(l.top+f.y)/d.y,v=l.width/d.x,x=l.height/d.y;if(c){const w=jt(c),C=i&&Kt(i)?jt(i):i;let k=w,b=Nu(k);for(;b&&i&&C!==k;){const N=po(b),S=b.getBoundingClientRect(),A=Gt(b),_=S.left+(b.clientLeft+parseFloat(A.paddingLeft))*N.x,I=S.top+(b.clientTop+parseFloat(A.paddingTop))*N.y;h*=N.x,g*=N.y,v*=N.x,x*=N.y,h+=_,g+=I,k=jt(b),b=Nu(k)}}return gl({width:v,height:x,x:h,y:g})}function Ml(t,r){const o=Ll(t).scrollLeft;return r?r.left+o:jr(un(t)).left+o}function qg(t,r){const o=t.getBoundingClientRect(),i=o.left+r.scrollLeft-Ml(t,o),l=o.top+r.scrollTop;return{x:i,y:l}}function KN(t){let{elements:r,rect:o,offsetParent:i,strategy:l}=t;const c=l==="fixed",d=un(i),f=r?Il(r.floating):!1;if(i===d||f&&c)return o;let h={scrollLeft:0,scrollTop:0},g=an(1);const v=an(0),x=cn(i);if((x||!x&&!c)&&((Co(i)!=="body"||Ps(d))&&(h=Ll(i)),cn(i))){const C=jr(i);g=po(i),v.x=C.x+i.clientLeft,v.y=C.y+i.clientTop}const w=d&&!x&&!c?qg(d,h):an(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-h.scrollLeft*g.x+v.x+w.x,y:o.y*g.y-h.scrollTop*g.y+v.y+w.y}}function GN(t){return Array.from(t.getClientRects())}function YN(t){const r=un(t),o=Ll(t),i=t.ownerDocument.body,l=St(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),c=St(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let d=-o.scrollLeft+Ml(t);const f=-o.scrollTop;return Gt(i).direction==="rtl"&&(d+=St(r.clientWidth,i.clientWidth)-l),{width:l,height:c,x:d,y:f}}const fm=25;function XN(t,r){const o=jt(t),i=un(t),l=o.visualViewport;let c=i.clientWidth,d=i.clientHeight,f=0,h=0;if(l){c=l.width,d=l.height;const v=id();(!v||v&&r==="fixed")&&(f=l.offsetLeft,h=l.offsetTop)}const g=Ml(i);if(g<=0){const v=i.ownerDocument,x=v.body,w=getComputedStyle(x),C=v.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,k=Math.abs(i.clientWidth-x.clientWidth-C);k<=fm&&(c-=k)}else g<=fm&&(c+=g);return{width:c,height:d,x:f,y:h}}const qN=new Set(["absolute","fixed"]);function QN(t,r){const o=jr(t,!0,r==="fixed"),i=o.top+t.clientTop,l=o.left+t.clientLeft,c=cn(t)?po(t):an(1),d=t.clientWidth*c.x,f=t.clientHeight*c.y,h=l*c.x,g=i*c.y;return{width:d,height:f,x:h,y:g}}function pm(t,r,o){let i;if(r==="viewport")i=XN(t,o);else if(r==="document")i=YN(un(t));else if(Kt(r))i=QN(r,o);else{const l=Xg(t);i={x:r.x-l.x,y:r.y-l.y,width:r.width,height:r.height}}return gl(i)}function Qg(t,r){const o=sr(t);return o===r||!Kt(o)||go(o)?!1:Gt(o).position==="fixed"||Qg(o,r)}function ZN(t,r){const o=r.get(t);if(o)return o;let i=Cs(t,[],!1).filter(f=>Kt(f)&&Co(f)!=="body"),l=null;const c=Gt(t).position==="fixed";let d=c?sr(t):t;for(;Kt(d)&&!go(d);){const f=Gt(d),h=sd(d);!h&&f.position==="fixed"&&(l=null),(c?!h&&!l:!h&&f.position==="static"&&!!l&&qN.has(l.position)||Ps(d)&&!h&&Qg(t,d))?i=i.filter(v=>v!==d):l=f,d=sr(d)}return r.set(t,i),i}function JN(t){let{element:r,boundary:o,rootBoundary:i,strategy:l}=t;const d=[...o==="clippingAncestors"?Il(r)?[]:ZN(r,this._c):[].concat(o),i],f=d[0],h=d.reduce((g,v)=>{const x=pm(r,v,l);return g.top=St(x.top,g.top),g.right=or(x.right,g.right),g.bottom=or(x.bottom,g.bottom),g.left=St(x.left,g.left),g},pm(r,f,l));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function e2(t){const{width:r,height:o}=Yg(t);return{width:r,height:o}}function t2(t,r,o){const i=cn(r),l=un(r),c=o==="fixed",d=jr(t,!0,c,r);let f={scrollLeft:0,scrollTop:0};const h=an(0);function g(){h.x=Ml(l)}if(i||!i&&!c)if((Co(r)!=="body"||Ps(l))&&(f=Ll(r)),i){const C=jr(r,!0,c,r);h.x=C.x+r.clientLeft,h.y=C.y+r.clientTop}else l&&g();c&&!i&&l&&g();const v=l&&!i&&!c?qg(l,f):an(0),x=d.left+f.scrollLeft-h.x-v.x,w=d.top+f.scrollTop-h.y-v.y;return{x,y:w,width:d.width,height:d.height}}function Wc(t){return Gt(t).position==="static"}function hm(t,r){if(!cn(t)||Gt(t).position==="fixed")return null;if(r)return r(t);let o=t.offsetParent;return un(t)===o&&(o=o.ownerDocument.body),o}function Zg(t,r){const o=jt(t);if(Il(t))return o;if(!cn(t)){let l=sr(t);for(;l&&!go(l);){if(Kt(l)&&!Wc(l))return l;l=sr(l)}return o}let i=hm(t,r);for(;i&&DN(i)&&Wc(i);)i=hm(i,r);return i&&go(i)&&Wc(i)&&!sd(i)?o:i||UN(t)||o}const n2=async function(t){const r=this.getOffsetParent||Zg,o=this.getDimensions,i=await o(t.floating);return{reference:t2(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function r2(t){return Gt(t).direction==="rtl"}const o2={convertOffsetParentRelativeRectToViewportRelativeRect:KN,getDocumentElement:un,getClippingRect:JN,getOffsetParent:Zg,getElementRects:n2,getClientRects:GN,getDimensions:e2,getScale:po,isElement:Kt,isRTL:r2};function Jg(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function s2(t,r){let o=null,i;const l=un(t);function c(){var f;clearTimeout(i),(f=o)==null||f.disconnect(),o=null}function d(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),c();const g=t.getBoundingClientRect(),{left:v,top:x,width:w,height:C}=g;if(f||r(),!w||!C)return;const k=Gi(x),b=Gi(l.clientWidth-(v+w)),N=Gi(l.clientHeight-(x+C)),S=Gi(v),_={rootMargin:-k+"px "+-b+"px "+-N+"px "+-S+"px",threshold:St(0,or(1,h))||1};let I=!0;function O(U){const M=U[0].intersectionRatio;if(M!==h){if(!I)return d();M?d(!1,M):i=setTimeout(()=>{d(!1,1e-7)},1e3)}M===1&&!Jg(g,t.getBoundingClientRect())&&d(),I=!1}try{o=new IntersectionObserver(O,{..._,root:l.ownerDocument})}catch{o=new IntersectionObserver(O,_)}o.observe(t)}return d(!0),c}function i2(t,r,o,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,g=ld(t),v=l||c?[...g?Cs(g):[],...Cs(r)]:[];v.forEach(S=>{l&&S.addEventListener("scroll",o,{passive:!0}),c&&S.addEventListener("resize",o)});const x=g&&f?s2(g,o):null;let w=-1,C=null;d&&(C=new ResizeObserver(S=>{let[A]=S;A&&A.target===g&&C&&(C.unobserve(r),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var _;(_=C)==null||_.observe(r)})),o()}),g&&!h&&C.observe(g),C.observe(r));let k,b=h?jr(t):null;h&&N();function N(){const S=jr(t);b&&!Jg(b,S)&&o(),b=S,k=requestAnimationFrame(N)}return o(),()=>{var S;v.forEach(A=>{l&&A.removeEventListener("scroll",o),c&&A.removeEventListener("resize",o)}),x==null||x(),(S=C)==null||S.disconnect(),C=null,h&&cancelAnimationFrame(k)}}const l2=PN,a2=RN,c2=AN,u2=LN,d2=TN,mm=jN,f2=IN,p2=(t,r,o)=>{const i=new Map,l={platform:o2,...o},c={...l.platform,_c:i};return SN(t,r,{...l,platform:c})};var h2=typeof document<"u",m2=function(){},ol=h2?y.useLayoutEffect:m2;function xl(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let o,i,l;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==r.length)return!1;for(i=o;i--!==0;)if(!xl(t[i],r[i]))return!1;return!0}if(l=Object.keys(t),o=l.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(r,l[i]))return!1;for(i=o;i--!==0;){const c=l[i];if(!(c==="_owner"&&t.$$typeof)&&!xl(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}function e0(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function gm(t,r){const o=e0(t);return Math.round(r*o)/o}function Kc(t){const r=y.useRef(t);return ol(()=>{r.current=t}),r}function g2(t){t===void 0&&(t={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l,elements:{reference:c,floating:d}={},transform:f=!0,whileElementsMounted:h,open:g}=t,[v,x]=y.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[w,C]=y.useState(i);xl(w,i)||C(i);const[k,b]=y.useState(null),[N,S]=y.useState(null),A=y.useCallback(L=>{L!==U.current&&(U.current=L,b(L))},[]),_=y.useCallback(L=>{L!==M.current&&(M.current=L,S(L))},[]),I=c||k,O=d||N,U=y.useRef(null),M=y.useRef(null),D=y.useRef(v),X=h!=null,V=Kc(h),H=Kc(l),F=Kc(g),Y=y.useCallback(()=>{if(!U.current||!M.current)return;const L={placement:r,strategy:o,middleware:w};H.current&&(L.platform=H.current),p2(U.current,M.current,L).then(Z=>{const Q={...Z,isPositioned:F.current!==!1};re.current&&!xl(D.current,Q)&&(D.current=Q,jl.flushSync(()=>{x(Q)}))})},[w,r,o,H,F]);ol(()=>{g===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,x(L=>({...L,isPositioned:!1})))},[g]);const re=y.useRef(!1);ol(()=>(re.current=!0,()=>{re.current=!1}),[]),ol(()=>{if(I&&(U.current=I),O&&(M.current=O),I&&O){if(V.current)return V.current(I,O,Y);Y()}},[I,O,Y,V,X]);const W=y.useMemo(()=>({reference:U,floating:M,setReference:A,setFloating:_}),[A,_]),G=y.useMemo(()=>({reference:I,floating:O}),[I,O]),ee=y.useMemo(()=>{const L={position:o,left:0,top:0};if(!G.floating)return L;const Z=gm(G.floating,v.x),Q=gm(G.floating,v.y);return f?{...L,transform:"translate("+Z+"px, "+Q+"px)",...e0(G.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:Z,top:Q}},[o,f,G.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:Y,refs:W,elements:G,floatingStyles:ee}),[v,Y,W,G,ee])}const x2=t=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:t,fn(o){const{element:i,padding:l}=typeof t=="function"?t(o):t;return i&&r(i)?i.current!=null?mm({element:i.current,padding:l}).fn(o):{}:i?mm({element:i,padding:l}).fn(o):{}}}},v2=(t,r)=>({...l2(t),options:[t,r]}),y2=(t,r)=>({...a2(t),options:[t,r]}),w2=(t,r)=>({...f2(t),options:[t,r]}),b2=(t,r)=>({...c2(t),options:[t,r]}),E2=(t,r)=>({...u2(t),options:[t,r]}),N2=(t,r)=>({...d2(t),options:[t,r]}),C2=(t,r)=>({...x2(t),options:[t,r]});var k2="Arrow",t0=y.forwardRef((t,r)=>{const{children:o,width:i=10,height:l=5,...c}=t;return u.jsx(He.svg,{...c,ref:r,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?o:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});t0.displayName=k2;var S2=t0;function j2(t){const[r,o]=y.useState(void 0);return rr(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const c=l[0];let d,f;if("borderBoxSize"in c){const h=c.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,f=g.blockSize}else d=t.offsetWidth,f=t.offsetHeight;o({width:d,height:f})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else o(void 0)},[t]),r}var ad="Popper",[n0,r0]=Eo(ad),[A2,o0]=n0(ad),s0=t=>{const{__scopePopper:r,children:o}=t,[i,l]=y.useState(null);return u.jsx(A2,{scope:r,anchor:i,onAnchorChange:l,children:o})};s0.displayName=ad;var i0="PopperAnchor",l0=y.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:i,...l}=t,c=o0(i0,o),d=y.useRef(null),f=wt(r,d),h=y.useRef(null);return y.useEffect(()=>{const g=h.current;h.current=(i==null?void 0:i.current)||d.current,g!==h.current&&c.onAnchorChange(h.current)}),i?null:u.jsx(He.div,{...l,ref:f})});l0.displayName=i0;var cd="PopperContent",[T2,_2]=n0(cd),a0=y.forwardRef((t,r)=>{var pe,Ee,we,Ae,ft,tt;const{__scopePopper:o,side:i="bottom",sideOffset:l=0,align:c="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:v=0,sticky:x="partial",hideWhenDetached:w=!1,updatePositionStrategy:C="optimized",onPlaced:k,...b}=t,N=o0(cd,o),[S,A]=y.useState(null),_=wt(r,Oe=>A(Oe)),[I,O]=y.useState(null),U=j2(I),M=(U==null?void 0:U.width)??0,D=(U==null?void 0:U.height)??0,X=i+(c!=="center"?"-"+c:""),V=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},H=Array.isArray(g)?g:[g],F=H.length>0,Y={padding:V,boundary:H.filter(R2),altBoundary:F},{refs:re,floatingStyles:W,placement:G,isPositioned:ee,middlewareData:L}=g2({strategy:"fixed",placement:X,whileElementsMounted:(...Oe)=>i2(...Oe,{animationFrame:C==="always"}),elements:{reference:N.anchor},middleware:[v2({mainAxis:l+D,alignmentAxis:d}),h&&y2({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?w2():void 0,...Y}),h&&b2({...Y}),E2({...Y,apply:({elements:Oe,rects:bt,availableWidth:ar,availableHeight:cr})=>{const{width:So,height:Ms}=bt.reference,An=Oe.floating.style;An.setProperty("--radix-popper-available-width",`${ar}px`),An.setProperty("--radix-popper-available-height",`${cr}px`),An.setProperty("--radix-popper-anchor-width",`${So}px`),An.setProperty("--radix-popper-anchor-height",`${Ms}px`)}}),I&&C2({element:I,padding:f}),I2({arrowWidth:M,arrowHeight:D}),w&&N2({strategy:"referenceHidden",...Y})]}),[Z,Q]=d0(G),P=Sr(k);rr(()=>{ee&&(P==null||P())},[ee,P]);const K=(pe=L.arrow)==null?void 0:pe.x,se=(Ee=L.arrow)==null?void 0:Ee.y,le=((we=L.arrow)==null?void 0:we.centerOffset)!==0,[ge,ve]=y.useState();return rr(()=>{S&&ve(window.getComputedStyle(S).zIndex)},[S]),u.jsx("div",{ref:re.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:ee?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(Ae=L.transformOrigin)==null?void 0:Ae.x,(ft=L.transformOrigin)==null?void 0:ft.y].join(" "),...((tt=L.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:u.jsx(T2,{scope:o,placedSide:Z,onArrowChange:O,arrowX:K,arrowY:se,shouldHideArrow:le,children:u.jsx(He.div,{"data-side":Z,"data-align":Q,...b,ref:_,style:{...b.style,animation:ee?void 0:"none"}})})})});a0.displayName=cd;var c0="PopperArrow",P2={top:"bottom",right:"left",bottom:"top",left:"right"},u0=y.forwardRef(function(r,o){const{__scopePopper:i,...l}=r,c=_2(c0,i),d=P2[c.placedSide];return u.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:u.jsx(S2,{...l,ref:o,style:{...l.style,display:"block"}})})});u0.displayName=c0;function R2(t){return t!==null}var I2=t=>({name:"transformOrigin",options:t,fn(r){var N,S,A;const{placement:o,rects:i,middlewareData:l}=r,d=((N=l.arrow)==null?void 0:N.centerOffset)!==0,f=d?0:t.arrowWidth,h=d?0:t.arrowHeight,[g,v]=d0(o),x={start:"0%",center:"50%",end:"100%"}[v],w=(((S=l.arrow)==null?void 0:S.x)??0)+f/2,C=(((A=l.arrow)==null?void 0:A.y)??0)+h/2;let k="",b="";return g==="bottom"?(k=d?x:`${w}px`,b=`${-h}px`):g==="top"?(k=d?x:`${w}px`,b=`${i.floating.height+h}px`):g==="right"?(k=`${-h}px`,b=d?x:`${C}px`):g==="left"&&(k=`${i.floating.width+h}px`,b=d?x:`${C}px`),{data:{x:k,y:b}}}});function d0(t){const[r,o="center"]=t.split("-");return[r,o]}var L2=s0,M2=l0,O2=a0,D2=u0,$2="Portal",ud=y.forwardRef((t,r)=>{var f;const{container:o,...i}=t,[l,c]=y.useState(!1);rr(()=>c(!0),[]);const d=o||l&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return d?nw.createPortal(u.jsx(He.div,{...i,ref:r}),d):null});ud.displayName=$2;function F2(t,r){return y.useReducer((o,i)=>r[o][i]??o,t)}var Ir=t=>{const{present:r,children:o}=t,i=B2(r),l=typeof o=="function"?o({present:i.isPresent}):y.Children.only(o),c=wt(i.ref,z2(l));return typeof o=="function"||i.isPresent?y.cloneElement(l,{ref:c}):null};Ir.displayName="Presence";function B2(t){const[r,o]=y.useState(),i=y.useRef(null),l=y.useRef(t),c=y.useRef("none"),d=t?"mounted":"unmounted",[f,h]=F2(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const g=Yi(i.current);c.current=f==="mounted"?g:"none"},[f]),rr(()=>{const g=i.current,v=l.current;if(v!==t){const w=c.current,C=Yi(g);t?h("MOUNT"):C==="none"||(g==null?void 0:g.display)==="none"?h("UNMOUNT"):h(v&&w!==C?"ANIMATION_OUT":"UNMOUNT"),l.current=t}},[t,h]),rr(()=>{if(r){let g;const v=r.ownerDocument.defaultView??window,x=C=>{const b=Yi(i.current).includes(CSS.escape(C.animationName));if(C.target===r&&b&&(h("ANIMATION_END"),!l.current)){const N=r.style.animationFillMode;r.style.animationFillMode="forwards",g=v.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=N)})}},w=C=>{C.target===r&&(c.current=Yi(i.current))};return r.addEventListener("animationstart",w),r.addEventListener("animationcancel",x),r.addEventListener("animationend",x),()=>{v.clearTimeout(g),r.removeEventListener("animationstart",w),r.removeEventListener("animationcancel",x),r.removeEventListener("animationend",x)}}else h("ANIMATION_END")},[r,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:y.useCallback(g=>{i.current=g?getComputedStyle(g):null,o(g)},[])}}function Yi(t){return(t==null?void 0:t.animationName)||"none"}function z2(t){var i,l;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var U2=Symbol("radix.slottable");function H2(t){const r=({children:o})=>u.jsx(u.Fragment,{children:o});return r.displayName=`${t}.Slottable`,r.__radixId=U2,r}var V2=Sl[" useInsertionEffect ".trim().toString()]||rr;function Ol({prop:t,defaultProp:r,onChange:o=()=>{},caller:i}){const[l,c,d]=W2({defaultProp:r,onChange:o}),f=t!==void 0,h=f?t:l;{const v=y.useRef(t!==void 0);y.useEffect(()=>{const x=v.current;x!==f&&console.warn(`${i} is changing from ${x?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=f},[f,i])}const g=y.useCallback(v=>{var x;if(f){const w=K2(v)?v(t):v;w!==t&&((x=d.current)==null||x.call(d,w))}else c(v)},[f,t,c,d]);return[h,g]}function W2({defaultProp:t,onChange:r}){const[o,i]=y.useState(t),l=y.useRef(o),c=y.useRef(r);return V2(()=>{c.current=r},[r]),y.useEffect(()=>{var d;l.current!==o&&((d=c.current)==null||d.call(c,o),l.current=o)},[o,l]),[o,i,c]}function K2(t){return typeof t=="function"}var G2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Y2="VisuallyHidden",f0=y.forwardRef((t,r)=>u.jsx(He.span,{...t,ref:r,style:{...G2,...t.style}}));f0.displayName=Y2;var X2=f0,[Dl]=Eo("Tooltip",[r0]),$l=r0(),p0="TooltipProvider",q2=700,Cu="tooltip.open",[Q2,dd]=Dl(p0),h0=t=>{const{__scopeTooltip:r,delayDuration:o=q2,skipDelayDuration:i=300,disableHoverableContent:l=!1,children:c}=t,d=y.useRef(!0),f=y.useRef(!1),h=y.useRef(0);return y.useEffect(()=>{const g=h.current;return()=>window.clearTimeout(g)},[]),u.jsx(Q2,{scope:r,isOpenDelayedRef:d,delayDuration:o,onOpen:y.useCallback(()=>{window.clearTimeout(h.current),d.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:y.useCallback(g=>{f.current=g},[]),disableHoverableContent:l,children:c})};h0.displayName=p0;var ks="Tooltip",[Z2,Rs]=Dl(ks),m0=t=>{const{__scopeTooltip:r,children:o,open:i,defaultOpen:l,onOpenChange:c,disableHoverableContent:d,delayDuration:f}=t,h=dd(ks,t.__scopeTooltip),g=$l(r),[v,x]=y.useState(null),w=fo(),C=y.useRef(0),k=d??h.disableHoverableContent,b=f??h.delayDuration,N=y.useRef(!1),[S,A]=Ol({prop:i,defaultProp:l??!1,onChange:M=>{M?(h.onOpen(),document.dispatchEvent(new CustomEvent(Cu))):h.onClose(),c==null||c(M)},caller:ks}),_=y.useMemo(()=>S?N.current?"delayed-open":"instant-open":"closed",[S]),I=y.useCallback(()=>{window.clearTimeout(C.current),C.current=0,N.current=!1,A(!0)},[A]),O=y.useCallback(()=>{window.clearTimeout(C.current),C.current=0,A(!1)},[A]),U=y.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{N.current=!0,A(!0),C.current=0},b)},[b,A]);return y.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]),u.jsx(L2,{...g,children:u.jsx(Z2,{scope:r,contentId:w,open:S,stateAttribute:_,trigger:v,onTriggerChange:x,onTriggerEnter:y.useCallback(()=>{h.isOpenDelayedRef.current?U():I()},[h.isOpenDelayedRef,U,I]),onTriggerLeave:y.useCallback(()=>{k?O():(window.clearTimeout(C.current),C.current=0)},[O,k]),onOpen:I,onClose:O,disableHoverableContent:k,children:o})})};m0.displayName=ks;var ku="TooltipTrigger",g0=y.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,l=Rs(ku,o),c=dd(ku,o),d=$l(o),f=y.useRef(null),h=wt(r,f,l.onTriggerChange),g=y.useRef(!1),v=y.useRef(!1),x=y.useCallback(()=>g.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),u.jsx(M2,{asChild:!0,...d,children:u.jsx(He.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:h,onPointerMove:Me(t.onPointerMove,w=>{w.pointerType!=="touch"&&!v.current&&!c.isPointerInTransitRef.current&&(l.onTriggerEnter(),v.current=!0)}),onPointerLeave:Me(t.onPointerLeave,()=>{l.onTriggerLeave(),v.current=!1}),onPointerDown:Me(t.onPointerDown,()=>{l.open&&l.onClose(),g.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:Me(t.onFocus,()=>{g.current||l.onOpen()}),onBlur:Me(t.onBlur,l.onClose),onClick:Me(t.onClick,l.onClose)})})});g0.displayName=ku;var fd="TooltipPortal",[J2,eC]=Dl(fd,{forceMount:void 0}),x0=t=>{const{__scopeTooltip:r,forceMount:o,children:i,container:l}=t,c=Rs(fd,r);return u.jsx(J2,{scope:r,forceMount:o,children:u.jsx(Ir,{present:o||c.open,children:u.jsx(ud,{asChild:!0,container:l,children:i})})})};x0.displayName=fd;var xo="TooltipContent",v0=y.forwardRef((t,r)=>{const o=eC(xo,t.__scopeTooltip),{forceMount:i=o.forceMount,side:l="top",...c}=t,d=Rs(xo,t.__scopeTooltip);return u.jsx(Ir,{present:i||d.open,children:d.disableHoverableContent?u.jsx(y0,{side:l,...c,ref:r}):u.jsx(tC,{side:l,...c,ref:r})})}),tC=y.forwardRef((t,r)=>{const o=Rs(xo,t.__scopeTooltip),i=dd(xo,t.__scopeTooltip),l=y.useRef(null),c=wt(r,l),[d,f]=y.useState(null),{trigger:h,onClose:g}=o,v=l.current,{onPointerInTransitChange:x}=i,w=y.useCallback(()=>{f(null),x(!1)},[x]),C=y.useCallback((k,b)=>{const N=k.currentTarget,S={x:k.clientX,y:k.clientY},A=iC(S,N.getBoundingClientRect()),_=lC(S,A),I=aC(b.getBoundingClientRect()),O=uC([..._,...I]);f(O),x(!0)},[x]);return y.useEffect(()=>()=>w(),[w]),y.useEffect(()=>{if(h&&v){const k=N=>C(N,v),b=N=>C(N,h);return h.addEventListener("pointerleave",k),v.addEventListener("pointerleave",b),()=>{h.removeEventListener("pointerleave",k),v.removeEventListener("pointerleave",b)}}},[h,v,C,w]),y.useEffect(()=>{if(d){const k=b=>{const N=b.target,S={x:b.clientX,y:b.clientY},A=(h==null?void 0:h.contains(N))||(v==null?void 0:v.contains(N)),_=!cC(S,d);A?w():_&&(w(),g())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[h,v,d,g,w]),u.jsx(y0,{...t,ref:c})}),[nC,rC]=Dl(ks,{isInside:!1}),oC=H2("TooltipContent"),y0=y.forwardRef((t,r)=>{const{__scopeTooltip:o,children:i,"aria-label":l,onEscapeKeyDown:c,onPointerDownOutside:d,...f}=t,h=Rs(xo,o),g=$l(o),{onClose:v}=h;return y.useEffect(()=>(document.addEventListener(Cu,v),()=>document.removeEventListener(Cu,v)),[v]),y.useEffect(()=>{if(h.trigger){const x=w=>{const C=w.target;C!=null&&C.contains(h.trigger)&&v()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[h.trigger,v]),u.jsx(td,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:x=>x.preventDefault(),onDismiss:v,children:u.jsxs(O2,{"data-state":h.stateAttribute,...g,...f,ref:r,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(oC,{children:i}),u.jsx(nC,{scope:o,isInside:!0,children:u.jsx(X2,{id:h.contentId,role:"tooltip",children:l||i})})]})})});v0.displayName=xo;var w0="TooltipArrow",sC=y.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,l=$l(o);return rC(w0,o).isInside?null:u.jsx(D2,{...l,...i,ref:r})});sC.displayName=w0;function iC(t,r){const o=Math.abs(r.top-t.y),i=Math.abs(r.bottom-t.y),l=Math.abs(r.right-t.x),c=Math.abs(r.left-t.x);switch(Math.min(o,i,l,c)){case c:return"left";case l:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function lC(t,r,o=5){const i=[];switch(r){case"top":i.push({x:t.x-o,y:t.y+o},{x:t.x+o,y:t.y+o});break;case"bottom":i.push({x:t.x-o,y:t.y-o},{x:t.x+o,y:t.y-o});break;case"left":i.push({x:t.x+o,y:t.y-o},{x:t.x+o,y:t.y+o});break;case"right":i.push({x:t.x-o,y:t.y-o},{x:t.x-o,y:t.y+o});break}return i}function aC(t){const{top:r,right:o,bottom:i,left:l}=t;return[{x:l,y:r},{x:o,y:r},{x:o,y:i},{x:l,y:i}]}function cC(t,r){const{x:o,y:i}=t;let l=!1;for(let c=0,d=r.length-1;c<r.length;d=c++){const f=r[c],h=r[d],g=f.x,v=f.y,x=h.x,w=h.y;v>i!=w>i&&o<(x-g)*(i-v)/(w-v)+g&&(l=!l)}return l}function uC(t){const r=t.slice();return r.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),dC(r)}function dC(t){if(t.length<=1)return t.slice();const r=[];for(let i=0;i<t.length;i++){const l=t[i];for(;r.length>=2;){const c=r[r.length-1],d=r[r.length-2];if((c.x-d.x)*(l.y-d.y)>=(c.y-d.y)*(l.x-d.x))r.pop();else break}r.push(l)}r.pop();const o=[];for(let i=t.length-1;i>=0;i--){const l=t[i];for(;o.length>=2;){const c=o[o.length-1],d=o[o.length-2];if((c.x-d.x)*(l.y-d.y)>=(c.y-d.y)*(l.x-d.x))o.pop();else break}o.push(l)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var fC=h0,pC=m0,hC=g0,mC=x0,gC=v0;function b0({delayDuration:t=0,...r}){return u.jsx(fC,{"data-slot":"tooltip-provider",delayDuration:t,...r})}function Su({...t}){return u.jsx(b0,{children:u.jsx(pC,{"data-slot":"tooltip",...t})})}function ju({...t}){return u.jsx(hC,{"data-slot":"tooltip-trigger",...t})}function Au({className:t,sideOffset:r=4,children:o,...i}){return u.jsx(mC,{children:u.jsx(gC,{"data-slot":"tooltip-content",sideOffset:r,className:ye("bg-popover text-popover-foreground z-50 w-fit origin-[var(--radix-tooltip-content-transform-origin)] rounded-md border px-3 py-1.5 text-xs shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...i,children:o})})}const xC=48;function E0(t){return t.type==="CLAIM_SENT"||t.type==="CLAIM_RECEIVED"||t.type==="CLAIM_REDEEMED"}function vC(t){const r=bs(t);if(r){const o=M1[r]||"bg-gray-500";let i="none",l="none";return t.type==="PACKET_RECEIVED"?(i="incoming",l="incoming"):(t.type==="PACKET_FORWARDED"||t.type==="AGENT_CHANNEL_PAYMENT_SENT")&&(i="outgoing",l="outgoing"),{label:r.toUpperCase(),colorClass:o,isIlpPacket:!0,direction:i,icon:l}}return t.type==="ACCOUNT_BALANCE"?{label:"BALANCE",colorClass:Wh[t.type]||"bg-blue-500",isIlpPacket:!1,direction:"internal",icon:"balance"}:{label:t.type.replace(/_/g," "),colorClass:Wh[t.type]||"bg-gray-500",isIlpPacket:!1,direction:"none",icon:"none"}}function ho(t){if(!t||t==="-")return null;if(gg(t)==="evm"){const o=on(t,"address")||void 0;return{display:`${t.slice(0,6)}...${t.slice(-4)}`,full:t,type:"wallet",explorerUrl:o}}return t.startsWith("g.")?{display:t.length>20?`${t.slice(0,12)}...${t.slice(-6)}`:t,full:t,type:"ilp"}:/^peer\d+$/i.test(t)?{display:t,full:`g.${t}`,type:"peer"}:{display:t.length>16?`${t.slice(0,8)}...${t.slice(-4)}`:t,full:t,type:"unknown"}}function yC(t){if(t.type==="ACCOUNT_BALANCE"){const r="nodeId"in t&&typeof t.nodeId=="string"?t.nodeId:null;return r?{display:r,full:r.startsWith("g.")?r:`g.${r}`,type:"peer"}:null}if("from"in t&&typeof t.from=="string"&&t.from)return ho(t.from);if("fromAddress"in t&&typeof t.fromAddress=="string")return ho(t.fromAddress);if(t.type==="PACKET_RECEIVED"&&"peerId"in t&&typeof t.peerId=="string"){const r=t.peerId;return{display:r,full:r.startsWith("g.")?r:`g.${r}`,type:"peer"}}return"agentId"in t&&typeof t.agentId=="string"?ho(t.agentId):null}function wC(t){if(t.type==="ACCOUNT_BALANCE"){const r="peerId"in t&&typeof t.peerId=="string"?t.peerId:null;return r?{display:r,full:r.startsWith("g.")?r:`g.${r}`,type:"peer"}:null}if("to"in t&&typeof t.to=="string"&&t.to)return ho(t.to);if("toAddress"in t&&typeof t.toAddress=="string")return ho(t.toAddress);if(t.type==="PACKET_FORWARDED"&&"peerId"in t&&typeof t.peerId=="string"){const r=t.peerId;return{display:r,full:r.startsWith("g.")?r:`g.${r}`,type:"peer"}}return"peerId"in t&&typeof t.peerId=="string"?ho(t.peerId):null}function bC(t){const r=["amount","settledAmount","netBalance","change","claimAmount","finalBalance"];for(const o of r)if(o in t&&t[o])return t[o];return null}function EC(t){try{const r=BigInt(t);return r>BigInt(1e18)?`${(Number(r)/1e18).toFixed(4)} ETH`:r>BigInt(1e12)?`${(Number(r)/1e12).toFixed(2)}T`:r>BigInt(1e9)?`${(Number(r)/1e9).toFixed(2)}B`:r>BigInt(1e6)?`${(Number(r)/1e6).toFixed(2)}M`:r>BigInt(1e3)?`${(Number(r)/1e3).toFixed(2)}K`:t}catch{return t}}function N0(t){return typeof t=="number"?t:new Date(t).getTime()}function NC(t){if(t.type==="ACCOUNT_BALANCE"){const o="tokenId"in t&&typeof t.tokenId=="string"?t.tokenId:null,i="settlementState"in t&&typeof t.settlementState=="string"?t.settlementState:null;return o?i&&i!=="IDLE"?`${o} (${i})`:`${o} Account`:"Balance Update"}const r=["destination","destinationAddress","to","toAddress"];for(const o of r)if(o in t&&typeof t[o]=="string")return t[o];return null}function CC(t){return t.length<=30?t:`${t.slice(0,20)}...${t.slice(-8)}`}function kC(t){const r=new Map;for(const o of t){const i=bs(o);if(!i)continue;const l=C0(o);l&&(i==="fulfill"?r.set(l,"success"):i==="reject"&&r.set(l,"failure"))}return r}function C0(t){return"packetId"in t&&typeof t.packetId=="string"?t.packetId:null}function SC(t,r){const o=t.type,i=bs(t);if(i){if(i==="fulfill")return"success";if(i==="reject")return"failure";if(i==="prepare")return r||"pending"}if(E0(t)){if(o==="CLAIM_SENT"){const f=Kh(t);return f===!0?"success":f===!1?"failure":"neutral"}if(o==="CLAIM_RECEIVED"){const f=$1(t);return f===!0?"success":f===!1?"failure":"neutral"}if(o==="CLAIM_REDEEMED"){const f=Kh(t);return f===!0?"success":f===!1?"failure":"neutral"}}const l=["PACKET_FORWARDED","SETTLEMENT_COMPLETED","FUNDING_TRANSACTION_CONFIRMED","PAYMENT_CHANNEL_SETTLED","XRP_CHANNEL_CLAIMED","AGENT_WALLET_FUNDED","PAYMENT_CHANNEL_OPENED","XRP_CHANNEL_OPENED","AGENT_CHANNEL_OPENED"],c=["FUNDING_TRANSACTION_FAILED","WALLET_BALANCE_MISMATCH","SUSPICIOUS_ACTIVITY_DETECTED","RATE_LIMIT_EXCEEDED","FUNDING_RATE_LIMIT_EXCEEDED"],d=["SETTLEMENT_TRIGGERED"];return l.includes(o)?"success":c.includes(o)?"failure":d.includes(o)?"pending":"neutral"}function jC(t){switch(t){case"success":return{icon:u.jsx(_l,{className:"h-4 w-4"}),text:"Success",className:"text-emerald-500"};case"failure":return{icon:u.jsx(zg,{className:"h-4 w-4"}),text:"Failed",className:"text-rose-500"};case"pending":return{icon:u.jsx(Es,{className:"h-4 w-4 animate-pulse"}),text:"Pending",className:"text-cyan-500"};default:return{icon:u.jsx(Es,{className:"h-4 w-4"}),text:"N/A",className:"text-muted-foreground"}}}const xm=y.memo(function({address:r,showIcon:o=!0}){if(!r)return u.jsx("span",{className:"text-muted-foreground",children:"—"});const i=c=>{c.stopPropagation(),r.explorerUrl&&window.open(r.explorerUrl,"_blank","noopener,noreferrer")},l=o?r.type==="wallet"?u.jsx(_s,{className:"h-3 w-3 shrink-0 text-emerald-500"}):r.type==="ilp"||r.type==="peer"?u.jsx(hE,{className:"h-3 w-3 shrink-0 text-cyan-500"}):null:null;return r.explorerUrl?u.jsxs(Su,{children:[u.jsx(ju,{asChild:!0,children:u.jsxs("button",{onClick:i,className:"inline-flex items-center gap-1 text-blue-400 hover:text-blue-300 hover:underline focus:outline-none focus:ring-1 focus:ring-blue-400 rounded font-mono text-xs",children:[l,u.jsx("span",{children:r.display}),u.jsx(Qu,{className:"h-3 w-3 shrink-0 opacity-50"})]})}),u.jsxs(Au,{side:"top",className:"max-w-xs",children:[u.jsx("p",{className:"font-mono text-xs break-all",children:r.full}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Click to view on explorer"})]})]}):r.full!==r.display?u.jsxs(Su,{children:[u.jsx(ju,{asChild:!0,children:u.jsxs("span",{className:"inline-flex items-center gap-1 font-mono text-xs cursor-default",children:[l,u.jsx("span",{children:r.display})]})}),u.jsx(Au,{side:"top",className:"max-w-xs",children:u.jsx("p",{className:"font-mono text-xs break-all",children:r.full})})]}):u.jsxs("span",{className:"inline-flex items-center gap-1 font-mono text-xs",title:r.full,children:[l,u.jsx("span",{children:r.display})]})}),AC=y.memo(function({icon:r}){switch(r){case"incoming":return u.jsx(Og,{className:"h-3.5 w-3.5 text-cyan-400"});case"outgoing":return u.jsx(Dg,{className:"h-3.5 w-3.5 text-emerald-400"});case"balance":return u.jsx(_s,{className:"h-3.5 w-3.5 text-blue-400"});default:return null}}),TC=y.memo(function({event:r,onSelect:o,index:i,style:l,resolvedStatus:c,isSelected:d,isNew:f}){const h=y.useCallback(()=>{o==null||o(i)},[o,i]),g=vC(r),v=yC(r),x=wC(r),w=bC(r),C=N0(r.timestamp),k=NC(r),b=SC(r,c),N=jC(b),S=E0(r),A=S?O1(r):null,_=S?F1(r):null,I=S?D1(r):null;return u.jsxs("div",{className:`flex items-center border-b border-border cursor-pointer hover:bg-muted/50 ${d?"bg-muted/50 ring-1 ring-primary":""} ${f?"animate-fadeIn":""}`,style:l,onClick:h,children:[u.jsx("div",{className:"w-[10%] min-w-[70px] px-2 font-mono text-xs text-muted-foreground truncate",children:Ku(C)}),u.jsx("div",{className:"w-[14%] min-w-[110px] px-2",children:u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(AC,{icon:g.icon}),u.jsx(et,{variant:"secondary",className:`${g.colorClass} text-white text-[10px] font-semibold px-1.5 py-0`,children:g.label}),S&&A&&u.jsx(et,{variant:"outline",className:`text-[10px] border px-1 py-0 ${z1(A)}`,children:A.toUpperCase()})]})}),u.jsx("div",{className:"w-[18%] min-w-[120px] px-2 truncate",children:u.jsx(xm,{address:v})}),u.jsxs("div",{className:"w-[18%] min-w-[120px] px-2 flex items-center gap-1",children:[v&&x&&u.jsx(Qb,{className:"h-3 w-3 text-muted-foreground shrink-0"}),u.jsx("div",{className:"truncate",children:u.jsx(xm,{address:x})})]}),u.jsx("div",{className:"hidden lg:block w-[18%] min-w-[130px] px-2 font-mono text-xs truncate",title:k||void 0,children:S&&_?u.jsxs("span",{className:"text-muted-foreground",children:["msg:",_.slice(0,8),"..."]}):k?u.jsx("span",{className:"cursor-default",children:CC(k)}):u.jsx("span",{className:"text-muted-foreground",children:"—"})}),u.jsx("div",{className:"hidden md:block w-[10%] min-w-[70px] px-2 font-mono text-xs truncate text-right",children:S&&I&&A?B1(I,A):w?EC(w):u.jsx("span",{className:"text-muted-foreground",children:"—"})}),u.jsx("div",{className:`w-[12%] min-w-[80px] px-2 text-xs ${N.className} flex items-center gap-1`,children:u.jsxs("span",{title:N.text,className:"flex items-center gap-1",children:[N.icon,u.jsx("span",{className:"hidden md:inline",children:N.text})]})})]})});function _C({events:t,onEventClick:r,loading:o,showPagination:i,total:l,onLoadMore:c,onScrollStateChange:d,...f}){const{connectionStatus:h,hasActiveFilters:g,onClearFilters:v}=f,x=y.useRef(null),w=y.useRef(t);w.current=t;const C=y.useMemo(()=>kC(t),[t]),k=y.useRef(t.length),b=y.useRef(0),N=!i;y.useEffect(()=>{const M=k.current,D=t.length;if(N&&D>M){b.current=D-M;const X=setTimeout(()=>{b.current=0},500);return k.current=D,()=>clearTimeout(X)}k.current=D},[t.length,N]);const S=y.useCallback(M=>{r==null||r(w.current[M])},[r]),A=L1({count:t.length,getScrollElement:()=>x.current,estimateSize:()=>xC,overscan:10}),_=y.useCallback(M=>{A.scrollToIndex(M,{align:"auto"})},[A]),{selectedIndex:I}=Bb({events:t,onEventClick:r||(()=>{}),scrollToIndex:_}),O=y.useRef(!0);y.useEffect(()=>{const M=x.current;if(!M||!d)return;const D=()=>{const X=M.scrollTop<=10;X!==O.current&&(O.current=X,d(X))};return M.addEventListener("scroll",D,{passive:!0}),()=>M.removeEventListener("scroll",D)},[d]);const U=A.getVirtualItems();return u.jsx(b0,{children:u.jsxs("div",{className:"flex flex-col h-[calc(100vh-280px)]",children:[u.jsxs("div",{className:"flex items-center border-b border-border bg-muted/50 h-10 shrink-0 min-w-0 shadow-sm",children:[u.jsx("div",{className:"w-[10%] min-w-[70px] px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Time"}),u.jsx("div",{className:"w-[14%] min-w-[110px] px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Type"}),u.jsx("div",{className:"w-[18%] min-w-[120px] px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"From"}),u.jsx("div",{className:"w-[18%] min-w-[120px] px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"To"}),u.jsx("div",{className:"hidden lg:block w-[18%] min-w-[130px] px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Destination"}),u.jsx("div",{className:"hidden md:block w-[10%] min-w-[70px] px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground text-right",children:"Amount"}),u.jsx("div",{className:"w-[12%] min-w-[80px] px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Status"})]}),u.jsx("div",{ref:x,className:"flex-1 overflow-auto",children:o?u.jsx("div",{className:"w-full",children:Array.from({length:8}).map((M,D)=>u.jsxs("div",{className:"flex items-center border-b border-border h-12",children:[u.jsx("div",{className:"w-[10%] min-w-[70px] px-2",children:u.jsx("div",{className:"h-3 w-14 bg-muted animate-pulse rounded"})}),u.jsx("div",{className:"w-[14%] min-w-[110px] px-2",children:u.jsx("div",{className:"h-5 w-20 bg-muted animate-pulse rounded"})}),u.jsx("div",{className:"w-[18%] min-w-[120px] px-2",children:u.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"})}),u.jsx("div",{className:"w-[18%] min-w-[120px] px-2",children:u.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"})}),u.jsx("div",{className:"hidden lg:block w-[18%] min-w-[130px] px-2",children:u.jsx("div",{className:"h-3 w-28 bg-muted animate-pulse rounded"})}),u.jsx("div",{className:"hidden md:block w-[10%] min-w-[70px] px-2",children:u.jsx("div",{className:"h-3 w-12 bg-muted animate-pulse rounded ml-auto"})}),u.jsx("div",{className:"w-[12%] min-w-[80px] px-2",children:u.jsx("div",{className:"h-3 w-14 bg-muted animate-pulse rounded"})})]},D))}):h==="disconnected"||h==="error"?u.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground gap-3",children:[u.jsx(Bg,{className:"h-12 w-12 text-muted-foreground/50"}),u.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Disconnected"}),u.jsx("p",{className:"text-sm",children:"Unable to connect to agent. Attempting to reconnect..."})]}):t.length===0&&g?u.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground gap-3",children:[u.jsx(ME,{className:"h-12 w-12 text-muted-foreground/50"}),u.jsx("h3",{className:"text-lg font-medium text-foreground",children:"No packets match your filters"}),u.jsx("p",{className:"text-sm",children:"Try adjusting or clearing your filters"}),v&&u.jsx(Ze,{variant:"outline",size:"sm",onClick:v,className:"mt-2",children:"Clear filters"})]}):t.length===0?u.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground gap-3",children:[u.jsx(vs,{className:"h-12 w-12 text-cyan-500 animate-pulse"}),u.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Waiting for packet activity..."}),u.jsx("p",{className:"text-sm",children:"Packets will appear here when your node receives or forwards ILP traffic"})]}):u.jsx("div",{style:{height:`${A.getTotalSize()}px`,width:"100%",position:"relative"},children:U.map(M=>{const D=t[M.index],X=N0(D.timestamp),V=C0(D),H=V?C.get(V):void 0;return u.jsx(TC,{event:D,onSelect:S,index:M.index,resolvedStatus:H,isSelected:I===M.index,isNew:N&&M.index<b.current,style:{position:"absolute",top:0,left:0,width:"100%",height:`${M.size}px`,transform:`translateY(${M.start}px)`}},`${X}-${M.index}`)})})}),i&&l!==void 0&&u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-border shrink-0",children:[u.jsxs("span",{className:"text-sm text-muted-foreground",children:["Showing ",t.length," of ",l.toLocaleString()," events"]}),t.length<l&&c&&u.jsx("button",{onClick:c,className:"px-4 py-2 text-sm font-medium text-primary bg-primary/10 rounded-md hover:bg-primary/20 transition-colors focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background",children:"Load More"})]})]})})}function At({className:t,...r}){return u.jsx("div",{"data-slot":"card",className:ye("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...r})}function Yt({className:t,...r}){return u.jsx("div",{"data-slot":"card-header",className:ye("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...r})}function Xt({className:t,...r}){return u.jsx("div",{"data-slot":"card-title",className:ye("leading-none font-semibold",t),...r})}function Ar({className:t,...r}){return u.jsx("div",{"data-slot":"card-description",className:ye("text-muted-foreground text-sm",t),...r})}function vm({className:t,...r}){return u.jsx("div",{"data-slot":"card-action",className:ye("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),...r})}function Dt({className:t,...r}){return u.jsx("div",{"data-slot":"card-content",className:ye("px-6",t),...r})}const PC=1e4;function k0(){const[t,r]=y.useState([]),[o,i]=y.useState(!0),[l,c]=y.useState(null),d=y.useCallback(async()=>{try{const f=await fetch("/api/peers");if(f.status===404){i(!1);return}if(!f.ok)throw new Error(`HTTP ${f.status}`);const h=await f.json();r(h.peers??[]),c(null)}catch(f){c(f instanceof Error?f.message:"Failed to fetch peers")}finally{i(!1)}},[]);return y.useEffect(()=>{d();const f=setInterval(d,PC);return()=>clearInterval(f)},[d]),{peers:t,loading:o,error:l,refresh:d}}const ym={evm:{symbol:"ETH",decimals:18},xrp:{symbol:"XRP",decimals:6},aptos:{symbol:"APT",decimals:8},unknown:{symbol:"M2M",decimals:18},usdc:{symbol:"USDC",decimals:6},m2m:{symbol:"M2M",decimals:18}};function RC(t){if(!t)return"unknown";const r=!!t.evmAddress,o=!!t.xrpAddress;return r&&!o?"evm":o&&!r?"xrp":r&&o?"evm":"unknown"}function Gc(t,r){try{if(t===0n)return`0 ${r.symbol}`;const o=10**r.decimals,i=Number(t)/o;if(i>=1e6)return`${(i/1e6).toFixed(2)}M ${r.symbol}`;if(i>=1e3)return`${(i/1e3).toFixed(2)}K ${r.symbol}`;if(i>=1)return`${i.toFixed(4)} ${r.symbol}`;if(i>=1e-4)return`${i.toFixed(6)} ${r.symbol}`;const l=r.decimals===18?"wei":r.decimals===6?"drops":r.decimals===8?"octas":"units";return`${t.toString()} ${l}`}catch{return`${t.toString()} ${r.symbol}`}}function IC(t){const r="payload"in t,o=r?t.payload:t,i=r?t.event_type:o.type;if(i==="PACKET_RECEIVED"){const l=o.packetId,c=o.from,d=o.amount,f=o.timestamp;if(l&&c&&d)return{received:{packetId:l,peerId:c,amount:BigInt(d),timestamp:typeof f=="number"?f:Date.parse(f)}}}if(i==="PACKET_FORWARDED"){const l=o.packetId,c=o.to,d=o.amount,f=o.timestamp;if(l&&c&&d)return{forwarded:{packetId:l,peerId:c,amount:BigInt(d),timestamp:typeof f=="number"?f:Date.parse(f)}}}return null}function LC(t,r,o){return y.useMemo(()=>{const i=ym.m2m,l=new Map;for(const x of r)l.set(x.peerId,x);const c=new Map,d=new Map;for(const x of t){const w=IC(x);w&&(w.received&&c.set(w.received.packetId,w.received),w.forwarded&&d.set(w.forwarded.packetId,w.forwarded))}const f=new Map;f.set("evm",{totalFees:0n,packetCount:0}),f.set("xrp",{totalFees:0n,packetCount:0}),f.set("aptos",{totalFees:0n,packetCount:0}),f.set("unknown",{totalFees:0n,packetCount:0});for(const[x,w]of c){const C=d.get(x);if(!C)continue;const k=w.amount-C.amount;if(k<=0n)continue;const b=l.get(w.peerId),N=RC(b),S=f.get(N);S.totalFees+=k,S.packetCount+=1}const h=[];let g=0n,v=0;for(const[x,w]of f)if(w.packetCount>0){const C=ym[x]||i,k=w.totalFees/BigInt(w.packetCount);h.push({network:x,totalFees:w.totalFees,totalFeesFormatted:Gc(w.totalFees,C),packetCount:w.packetCount,averageFee:k,averageFeeFormatted:Gc(k,C),tokenConfig:C}),g+=w.totalFees,v+=w.packetCount}return h.sort((x,w)=>w.totalFees>x.totalFees?1:-1),{stats:h,grandTotal:g,grandTotalFormatted:Gc(g,i),totalPackets:v,loading:!1,tokenConfig:i}},[t,r,o])}function MC(t){switch(t){case"evm":return"EVM (Base)";case"xrp":return"XRP Ledger";case"aptos":return"Aptos";default:return"Unknown"}}function OC(t){switch(t){case"evm":return"bg-blue-500/20 text-blue-400 border-blue-500/30";case"xrp":return"bg-orange-500/20 text-orange-400 border-orange-500/30";case"aptos":return"bg-teal-500/20 text-teal-400 border-teal-500/30";default:return"bg-gray-500/20 text-gray-400 border-gray-500/30"}}function DC(t){switch(t){case"evm":return"text-blue-400";case"xrp":return"text-orange-400";case"aptos":return"text-teal-400";default:return"text-gray-400"}}function $C(t){switch(t){case"evm":return"bg-blue-500";case"xrp":return"bg-orange-500";case"aptos":return"bg-teal-500";default:return"bg-gray-500"}}const FC=({stat:t,maxFees:r})=>{const o=r>0n?Number(t.totalFees*100n/r):0;return u.jsxs(At,{className:"w-full border-border bg-card/50 backdrop-blur-sm hover:bg-card/70 transition-colors",children:[u.jsxs(Yt,{className:"pb-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Xt,{className:"text-lg flex items-center gap-2",children:[u.jsx(iE,{className:`h-5 w-5 ${DC(t.network)}`}),MC(t.network)]}),u.jsx(et,{variant:"outline",className:`text-xs border ${OC(t.network)}`,children:t.network.toUpperCase()})]}),u.jsx(Ar,{children:"Fees collected from packet routing"})]}),u.jsxs(Dt,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Total Fees"}),u.jsx("p",{className:"text-3xl font-bold font-mono tabular-nums",children:t.totalFeesFormatted})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-xs text-muted-foreground",children:"Packets"}),u.jsx("p",{className:"text-xl font-semibold",children:t.packetCount.toLocaleString()})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-xs text-muted-foreground",children:"Avg Fee"}),u.jsx("p",{className:"text-xl font-semibold font-mono",children:t.averageFeeFormatted})]})]}),u.jsxs("div",{className:"pt-2 border-t border-border",children:[u.jsxs("div",{className:"flex items-center justify-between mb-1",children:[u.jsx("span",{className:"text-xs text-muted-foreground",children:"Share of Total"}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.toFixed(1),"%"]})]}),u.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:u.jsx("div",{className:`h-2 rounded-full transition-all ${$C(t.network)}`,style:{width:`${o}%`}})})]})]})]})};function BC({stats:t,grandTotal:r,totalPackets:o,tokenSymbol:i="M2M"}){const l=t.reduce((c,d)=>d.totalFees>c?d.totalFees:c,0n);return u.jsxs("div",{className:"w-full space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"p-2 rounded-lg bg-emerald-500/10 border border-emerald-500/20",children:u.jsx(pl,{className:"h-5 w-5 text-emerald-500"})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("h3",{className:"text-lg font-semibold",children:"Fees Collected by Network"}),u.jsx(et,{variant:"outline",className:"text-xs bg-emerald-500/10 text-emerald-400 border-emerald-500/30",children:i})]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Revenue from packet routing across blockchains"})]})]}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs("div",{className:"text-right",children:[u.jsx("p",{className:"text-xs text-muted-foreground uppercase",children:"Total Fees"}),u.jsx("p",{className:"text-xl font-bold font-mono",children:r})]}),u.jsxs("div",{className:"text-right border-l border-border pl-4",children:[u.jsx("p",{className:"text-xs text-muted-foreground uppercase",children:"Packets"}),u.jsx("p",{className:"text-xl font-bold",children:o.toLocaleString()})]})]})]}),t.length>0?u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map(c=>u.jsx(FC,{stat:c,maxFees:l},c.network))}):u.jsx(At,{className:"border-border bg-card/50",children:u.jsx(Dt,{className:"py-12",children:u.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[u.jsx(bE,{className:"h-12 w-12 text-muted-foreground/30 mb-3"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"No fee data available yet"}),u.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Fees will appear as packets are routed through the connector"})]})})})]})}function Xi({title:t,value:r,subtitle:o,icon:i,trend:l,pulse:c,variant:d="default",staggerClass:f}){const h={default:"border-border bg-card status-transition",success:"border-emerald-500/30 bg-emerald-950/20 status-transition",warning:"border-yellow-500/30 bg-yellow-950/20 status-transition",error:"border-rose-500/30 bg-rose-950/20 status-transition"};return u.jsxs(At,{className:ye("relative overflow-hidden hover-elevate fade-in-up",h[d],f),children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-transparent via-transparent to-white/5 pointer-events-none"}),u.jsxs(Yt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[u.jsx(Xt,{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:t}),u.jsx("div",{className:ye("relative",c&&"animate-pulse"),children:i})]}),u.jsx(Dt,{children:u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-3xl font-bold font-mono tabular-nums tracking-tight",children:r}),o&&u.jsx("p",{className:"text-xs text-muted-foreground",children:o}),l&&u.jsxs("div",{className:ye("flex items-center gap-1 text-xs font-medium",l.value>=0?"text-emerald-500":"text-rose-500"),children:[l.value>=0?u.jsx(pl,{className:"h-3 w-3"}):u.jsx(pl,{className:"h-3 w-3 rotate-180"}),u.jsxs("span",{children:[Math.abs(l.value),"%"]}),u.jsx("span",{className:"text-muted-foreground",children:l.label})]})]})})]})}function zC({events:t}){const r=t.slice(0,10),o=l=>{switch(l){case"prepare":return"bg-cyan-500/20 border-cyan-500/50 text-cyan-400";case"fulfill":return"bg-emerald-500/20 border-emerald-500/50 text-emerald-400";case"reject":return"bg-rose-500/20 border-rose-500/50 text-rose-400"}},i=l=>{switch(l){case"prepare":return"bg-cyan-500";case"fulfill":return"bg-emerald-500";case"reject":return"bg-rose-500"}};return u.jsxs(At,{className:"border-border bg-card/50 backdrop-blur-sm",children:[u.jsx(Yt,{children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Xt,{className:"text-lg font-semibold",children:"Live Packet Flow"}),u.jsx(Ar,{children:"Real-time ILP packet routing activity"})]}),u.jsxs(et,{variant:"outline",className:"border-emerald-500/30 text-emerald-400",children:[u.jsx(Es,{className:"h-2 w-2 mr-1.5 fill-emerald-500 animate-pulse"}),"Live"]})]})}),u.jsx(Dt,{children:u.jsx("div",{className:"space-y-2",children:r.length===0?u.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[u.jsx(Mg,{className:"h-12 w-12 text-muted-foreground/30 mb-3"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Waiting for packet activity..."})]}):r.map((l,c)=>u.jsxs("div",{className:"group relative flex items-center gap-3 p-3 rounded-lg border border-border bg-card/50 hover:bg-card transition-all animate-in fade-in slide-in-from-left-2",style:{animationDelay:`${c*50}ms`},children:[u.jsx("div",{className:ye("h-2 w-2 rounded-full shrink-0",i(l.type))}),u.jsxs("div",{className:"flex-1 min-w-0 grid grid-cols-[auto_1fr_auto_1fr] gap-x-3 gap-y-1 items-center text-sm",children:[u.jsx(et,{className:ye("text-xs uppercase font-mono",o(l.type)),children:l.type}),u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx(Dg,{className:"h-3 w-3 text-muted-foreground shrink-0"}),u.jsx("span",{className:"font-mono text-xs truncate",children:l.from})]}),u.jsx(Og,{className:"h-3 w-3 text-muted-foreground shrink-0"}),u.jsx("span",{className:"font-mono text-xs truncate",children:l.to})]}),l.amount&&u.jsx("div",{className:"text-xs font-mono text-muted-foreground shrink-0",children:UC(l.amount)}),u.jsx("div",{className:"text-xs text-muted-foreground/60 shrink-0",children:HC(l.timestamp)})]},l.id))})})]})}function UC(t){try{const r=BigInt(t);return r>BigInt(1e18)?`${(Number(r)/1e18).toFixed(4)} ETH`:r>BigInt(1e12)?`${(Number(r)/1e12).toFixed(2)}T`:r>BigInt(1e9)?`${(Number(r)/1e9).toFixed(2)}B`:r>BigInt(1e6)?`${(Number(r)/1e6).toFixed(2)}M`:t}catch{return t}}function HC(t){const o=Date.now()-t;return o<1e3?"now":o<6e4?`${Math.floor(o/1e3)}s`:o<36e5?`${Math.floor(o/6e4)}m`:new Date(t).toLocaleTimeString()}function VC({events:t,connectionStatus:r}){const[o,i]=y.useState({totalPackets:0,prepareCount:0,fulfillCount:0,rejectCount:0,successRate:0,avgResponseTime:0,activeChannels:0,totalVolume:BigInt(0)}),{peers:l}=k0(),c=LC(t,l),d=y.useMemo(()=>{const f=[];let h=0;for(const g of t){const v=bs(g);if(v){const x="from"in g&&typeof g.from=="string"?g.from:"unknown",w="to"in g&&typeof g.to=="string"?g.to:"unknown",C="destination"in g&&typeof g.destination=="string"?g.destination:void 0,k="amount"in g&&typeof g.amount=="string"?g.amount:void 0,b=typeof g.timestamp=="number"?g.timestamp:new Date(g.timestamp).getTime();f.push({id:`${b}-${x}-${w}-${h++}`,type:v,from:x,to:w,destination:C,amount:k,timestamp:b})}}return f.sort((g,v)=>v.timestamp-g.timestamp)},[t]);return y.useEffect(()=>{let f=0,h=0,g=0,v=BigInt(0);for(const C of t){const k=bs(C);if(k==="prepare"?f++:k==="fulfill"?h++:k==="reject"&&g++,"amount"in C&&typeof C.amount=="string")try{v+=BigInt(C.amount)}catch{}}const x=f+h+g,w=f>0?h/f*100:0;i({totalPackets:x,prepareCount:f,fulfillCount:h,rejectCount:g,successRate:w,avgResponseTime:0,activeChannels:0,totalVolume:v})},[t]),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[u.jsx(Xi,{title:"Total Packets",value:o.totalPackets.toLocaleString(),subtitle:"All-time routed",icon:u.jsx(Mg,{className:"h-4 w-4 text-muted-foreground"}),pulse:r==="connected",staggerClass:"stagger-1"}),u.jsx(Xi,{title:"Success Rate",value:`${o.successRate.toFixed(1)}%`,subtitle:`${o.fulfillCount} fulfilled / ${o.rejectCount} rejected`,icon:u.jsx(ed,{className:"h-4 w-4 text-emerald-500"}),variant:o.successRate>90?"success":o.successRate>70?"warning":"error",staggerClass:"stagger-2"}),u.jsx(Xi,{title:"Active Channels",value:o.activeChannels,subtitle:"Payment channels open",icon:u.jsx(_s,{className:"h-4 w-4 text-cyan-500"}),staggerClass:"stagger-3"}),u.jsx(Xi,{title:"Routing Status",value:r==="connected"?"Active":"Inactive",subtitle:r==="connected"?"Accepting packets":"Waiting...",icon:u.jsx(Zu,{className:"h-4 w-4 text-muted-foreground"}),variant:r==="connected"?"success":"warning",pulse:r==="connected",staggerClass:"stagger-4"})]}),u.jsxs(At,{className:"border-border bg-card/50 backdrop-blur-sm",children:[u.jsxs(Yt,{children:[u.jsx(Xt,{className:"text-lg font-semibold",children:"Packet Distribution"}),u.jsx(Ar,{children:"ILP packet types by volume"})]}),u.jsx(Dt,{children:u.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"h-3 w-3 rounded-full bg-cyan-500"}),u.jsx("span",{className:"text-sm font-medium",children:"PREPARE"})]}),u.jsx("span",{className:"text-lg font-mono font-bold",children:o.prepareCount})]}),u.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full bg-cyan-500 progress-smooth",style:{width:`${o.totalPackets>0?o.prepareCount/o.totalPackets*100:0}%`}})})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"h-3 w-3 rounded-full bg-emerald-500"}),u.jsx("span",{className:"text-sm font-medium",children:"FULFILL"})]}),u.jsx("span",{className:"text-lg font-mono font-bold",children:o.fulfillCount})]}),u.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full bg-emerald-500 progress-smooth",style:{width:`${o.totalPackets>0?o.fulfillCount/o.totalPackets*100:0}%`}})})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"h-3 w-3 rounded-full bg-rose-500"}),u.jsx("span",{className:"text-sm font-medium",children:"REJECT"})]}),u.jsx("span",{className:"text-lg font-mono font-bold",children:o.rejectCount})]}),u.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full bg-rose-500 progress-smooth",style:{width:`${o.totalPackets>0?o.rejectCount/o.totalPackets*100:0}%`}})})]})]})})]}),u.jsx(BC,{stats:c.stats,grandTotal:c.grandTotalFormatted,totalPackets:c.totalPackets,tokenSymbol:c.tokenConfig.symbol}),u.jsx(zC,{events:d})]})}const WC=y.memo(function({status:r,eventCount:o,onHelpOpen:i}){const[l,c]=y.useState(null),[d,f]=y.useState(new Date);y.useEffect(()=>{const x=async()=>{try{const C=await fetch("/api/health");if(C.ok){const k=await C.json();c(k)}}catch{}};x();const w=setInterval(x,3e4);return()=>clearInterval(w)},[]),y.useEffect(()=>{const x=setInterval(()=>{f(new Date)},1e3);return()=>clearInterval(x)},[]);const h=()=>{switch(r){case"connected":return"text-emerald-500";case"connecting":return"text-yellow-500";case"disconnected":return"text-gray-500";case"error":return"text-rose-500";default:return"text-gray-500"}},g=()=>{switch(r){case"connected":return"bg-emerald-500";case"connecting":return"bg-yellow-500";case"disconnected":return"bg-gray-500";case"error":return"bg-rose-500";default:return"bg-gray-500"}},v=x=>{const w=Math.floor(x/3600),C=Math.floor(x%3600/60);return`${w}h ${C}m`};return u.jsxs("header",{className:"relative border-b border-border/50 bg-gradient-to-r from-background via-card/30 to-background px-4 md:px-6 py-3 md:py-4 backdrop-blur-sm",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-white/[0.02] to-transparent pointer-events-none"}),u.jsxs("div",{className:"relative flex items-center justify-between gap-4 flex-wrap",children:[u.jsxs("div",{className:"flex items-center gap-3 md:gap-6 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("div",{className:"relative",children:[u.jsx(ed,{className:"h-6 w-6 md:h-7 md:w-7 text-cyan-500"}),r==="connected"&&u.jsx(Es,{className:"absolute -top-1 -right-1 h-2.5 w-2.5 fill-emerald-500 text-emerald-500 animate-pulse"})]}),u.jsxs("div",{children:[u.jsx("h1",{className:"text-lg md:text-xl font-bold tracking-tight font-mono",children:"ILP CONNECTOR"}),u.jsx("p",{className:"text-xs text-muted-foreground/80 uppercase tracking-wider",children:"Network Operations"})]})]}),l&&u.jsxs("div",{className:"hidden lg:flex items-center gap-3 pl-6 border-l border-border/50",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-muted-foreground/60 uppercase tracking-wider",children:"Node ID"}),u.jsx("p",{className:"text-sm font-mono font-medium",children:l.nodeId})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-muted-foreground/60 uppercase tracking-wider",children:"Uptime"}),u.jsx("p",{className:"text-sm font-mono font-medium",children:v(l.uptime)})]})]})]}),u.jsxs("div",{className:"flex items-center gap-3 md:gap-4",children:[u.jsxs(et,{variant:"outline",className:"font-mono tabular-nums border-border/50 bg-card/50",children:[u.jsx("span",{className:"text-muted-foreground mr-1.5",children:"Events"}),u.jsx("span",{className:"font-bold",children:o.toLocaleString()})]}),u.jsxs("div",{className:"hidden sm:flex items-center gap-2 px-3 py-1.5 rounded-md border border-border/50 bg-card/50",children:[u.jsx("div",{className:ye("w-2 h-2 rounded-full transition-all duration-300",g(),r==="connected"&&"animate-pulse")}),u.jsx("span",{className:ye("text-xs font-medium uppercase tracking-wider",h()),children:r})]}),u.jsxs("div",{className:"hidden md:block text-right",children:[u.jsx("p",{className:"text-xs text-muted-foreground/60 uppercase tracking-wider",children:"System Time"}),u.jsx("p",{className:"text-sm font-mono font-medium tabular-nums",children:d.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0})})]}),i&&u.jsx(Ze,{variant:"ghost",size:"icon",onClick:i,title:"Keyboard shortcuts (?)",className:"h-9 w-9 border border-border/50 hover:border-border hover:bg-card/50",children:u.jsx(yE,{className:"h-4 w-4"})})]})]})]})});function KC({visible:t,connectionStatus:r,onClick:o}){return t?r==="connecting"?u.jsx("div",{className:"fixed bottom-6 right-6 z-50",children:u.jsxs(Ze,{variant:"secondary",size:"lg",disabled:!0,className:"shadow-lg animate-pulse",children:[u.jsx(vs,{className:"h-4 w-4 mr-2"}),"Reconnecting..."]})}):r==="error"||r==="disconnected"?u.jsx("div",{className:"fixed bottom-6 right-6 z-50",children:u.jsxs(Ze,{variant:"destructive",size:"lg",onClick:o,className:"shadow-lg",children:[u.jsx(vs,{className:"h-4 w-4 mr-2"}),"Reconnect to Live"]})}):u.jsx("div",{className:"fixed bottom-6 right-6 z-50",children:u.jsxs(Ze,{variant:"default",size:"lg",onClick:o,className:"shadow-lg bg-green-600 hover:bg-green-700",children:[u.jsx(vs,{className:"h-4 w-4 mr-2 animate-pulse"}),"Jump to Live"]})}):null}const GC=20,YC=1e3,XC=10;function qi(t){return t.type==="ACCOUNT_BALANCE"}function wm(t,r){return`${t}:${r}`}function qC(t={}){const{maxHistoryEntries:r=GC,reconnectDelay:o=YC,maxReconnectAttempts:i=XC}=t,[l,c]=y.useState(new Map),[d,f]=y.useState("hydrating"),[h,g]=y.useState(null),v=y.useRef(null),x=y.useRef(0),w=y.useRef(null),C=y.useRef(!1),k=y.useRef([]),b=y.useRef(null),N=y.useCallback((V,H)=>{const F=wm(H.peerId,H.tokenId),Y=V.get(F),re=typeof H.timestamp=="string"?new Date(H.timestamp).getTime():H.timestamp,W=BigInt(H.debitBalance),G=BigInt(H.creditBalance),ee=BigInt(H.netBalance),L=H.creditLimit?BigInt(H.creditLimit):void 0,Z=H.settlementThreshold?BigInt(H.settlementThreshold):void 0,Q={timestamp:re,balance:ee},P=Y?[...Y.balanceHistory,Q].slice(-r):[Q];V.set(F,{peerId:H.peerId,tokenId:H.tokenId,debitBalance:W,creditBalance:G,netBalance:ee,creditLimit:L,settlementThreshold:Z,settlementState:H.settlementState,balanceHistory:P,hasActiveChannel:Y==null?void 0:Y.hasActiveChannel,channelType:Y==null?void 0:Y.channelType,lastUpdated:re})},[r]),S=y.useCallback((V,H)=>{const F=H.peerId,Y="AGENT",re=wm(F,Y),W=V.get(re),G=typeof H.timestamp=="string"?new Date(H.timestamp).getTime():H.timestamp,ee=BigInt(H.amount||"0"),L=(W==null?void 0:W.debitBalance)??0n,Z=(W==null?void 0:W.creditBalance)??0n,P=H.packetType==="fulfill"?L+ee:L,K=Z,se=K-P,le={timestamp:G,balance:se},ge=W?[...W.balanceHistory,le].slice(-r):[le];V.set(re,{peerId:F,tokenId:Y,debitBalance:P,creditBalance:K,netBalance:se,settlementThreshold:1000n,settlementState:"IDLE",balanceHistory:ge,hasActiveChannel:!0,channelType:"evm",lastUpdated:G})},[r]),A=y.useCallback(()=>{b.current=null;const V=k.current;V.length!==0&&(k.current=[],c(H=>{const F=new Map(H);for(const Y of V)qi(Y)?N(F,Y):Y.type==="AGENT_CHANNEL_PAYMENT_SENT"&&S(F,Y);return F}))},[N,S]),_=y.useCallback(()=>{v.current&&v.current.close(),f("connecting"),g(null);const V=window.location.protocol==="https:"?"wss:":"ws:",H=window.location.host,F=`${V}//${H}/ws`,Y=new WebSocket(F);Y.onopen=()=>{f("connected"),g(null),x.current=0},Y.onmessage=re=>{try{const W=JSON.parse(re.data);(qi(W)||W.type==="AGENT_CHANNEL_PAYMENT_SENT")&&(k.current.push(W),b.current===null&&(b.current=requestAnimationFrame(A)))}catch{}},Y.onerror=()=>{g("WebSocket connection error")},Y.onclose=()=>{if(f("disconnected"),v.current=null,x.current<i){const re=o*Math.pow(2,x.current);x.current++,w.current=setTimeout(()=>{_()},re)}else f("error"),g("Max reconnect attempts reached")},v.current=Y},[A,o,i]),I=y.useCallback(()=>{c(new Map)},[]),O=y.useCallback(()=>{x.current=0,_()},[_]),U=y.useCallback(async()=>{if(C.current){_();return}f("hydrating");try{const H=`${`${window.location.protocol}//${window.location.host}`}/api/accounts/events?types=ACCOUNT_BALANCE,AGENT_CHANNEL_PAYMENT_SENT&limit=5000`,F=await fetch(H);if(!F.ok)throw new Error(`HTTP ${F.status}`);const re=(await F.json()).events;re.length>0&&c(()=>{const W=new Map;for(const G of re){const ee=G.payload;qi(ee)?N(W,ee):ee.type==="AGENT_CHANNEL_PAYMENT_SENT"&&S(W,ee)}return W})}catch{}C.current=!0,_()},[_,N,S]);y.useEffect(()=>(U(),()=>{if(v.current&&v.current.close(),w.current&&clearTimeout(w.current),b.current!==null&&cancelAnimationFrame(b.current),k.current.length>0){const V=k.current;k.current=[],c(H=>{const F=new Map(H);for(const Y of V)qi(Y)?N(F,Y):Y.type==="AGENT_CHANNEL_PAYMENT_SENT"&&S(F,Y);return F})}}),[U,N,S]);const M=y.useMemo(()=>Array.from(l.values()).sort((V,H)=>V.netBalance>H.netBalance?-1:V.netBalance<H.netBalance?1:0),[l]),D=l.size,X=y.useMemo(()=>Array.from(l.values()).filter(V=>!V.settlementThreshold||V.settlementThreshold===0n?!1:Number(V.creditBalance*100n/V.settlementThreshold)>=70).length,[l]);return{accounts:M,accountsMap:l,status:d,error:h,totalAccounts:D,nearThresholdCount:X,clearAccounts:I,reconnect:O}}const QC=1e3,ZC=10;function JC(t={}){const{reconnectDelay:r=QC,maxReconnectAttempts:o=ZC}=t,[i,l]=y.useState(new Map),[c,d]=y.useState("hydrating"),[f,h]=y.useState(null),g=y.useRef(null),v=y.useRef(0),x=y.useRef(null),w=y.useRef(!1),C=y.useRef([]),k=y.useRef(null),b=y.useMemo(()=>new Set(["PAYMENT_CHANNEL_OPENED","PAYMENT_CHANNEL_BALANCE_UPDATE","PAYMENT_CHANNEL_SETTLED","XRP_CHANNEL_OPENED","XRP_CHANNEL_CLAIMED","XRP_CHANNEL_CLOSED","AGENT_CHANNEL_OPENED","AGENT_CHANNEL_BALANCE_UPDATE","AGENT_CHANNEL_CLOSED"]),[]),N=y.useCallback((X,V)=>{const H=typeof V.timestamp=="string"?V.timestamp:new Date(V.timestamp).toISOString();switch(V.type){case"PAYMENT_CHANNEL_OPENED":{const F=V;X.set(F.channelId,{channelId:F.channelId,nodeId:F.nodeId||"",peerId:F.peerId||"",participants:F.participants,tokenAddress:F.tokenAddress,tokenSymbol:F.tokenSymbol,settlementTimeout:F.settlementTimeout,deposits:F.initialDeposits,myNonce:0,theirNonce:0,myTransferred:"0",theirTransferred:"0",status:"active",openedAt:H,lastActivityAt:H,settlementMethod:"evm"});break}case"PAYMENT_CHANNEL_BALANCE_UPDATE":{const F=V,Y=X.get(F.channelId);Y&&X.set(F.channelId,{...Y,myNonce:F.myNonce,theirNonce:F.theirNonce,myTransferred:F.myTransferred,theirTransferred:F.theirTransferred,lastActivityAt:H});break}case"PAYMENT_CHANNEL_SETTLED":{const F=V,Y=X.get(F.channelId);Y&&X.set(F.channelId,{...Y,status:"settled",settledAt:H,lastActivityAt:H,deposits:F.finalBalances});break}case"XRP_CHANNEL_OPENED":{const F=V;X.set(F.channelId,{channelId:F.channelId,nodeId:F.nodeId||"",peerId:F.peerId||"",participants:[F.account,F.destination],tokenAddress:"XRP",tokenSymbol:"XRP",settlementTimeout:F.settleDelay,deposits:{[F.account]:F.amount},myNonce:0,theirNonce:0,myTransferred:"0",theirTransferred:"0",status:"active",openedAt:H,lastActivityAt:H,settlementMethod:"xrp",xrpAccount:F.account,xrpDestination:F.destination,xrpAmount:F.amount,xrpBalance:"0",xrpSettleDelay:F.settleDelay,xrpPublicKey:F.publicKey});break}case"XRP_CHANNEL_CLAIMED":{const F=V,Y=X.get(F.channelId);Y&&X.set(F.channelId,{...Y,xrpBalance:F.balance,lastActivityAt:H});break}case"XRP_CHANNEL_CLOSED":{const F=V,Y=X.get(F.channelId);Y&&X.set(F.channelId,{...Y,status:"settled",settledAt:H,lastActivityAt:H});break}case"AGENT_CHANNEL_OPENED":{const F=V,Y=F.chain==="xrp";X.set(F.channelId,{channelId:F.channelId,nodeId:F.nodeId||F.agentId||"",peerId:F.peerId||"",participants:[F.agentId||"",F.peerId],tokenAddress:Y?"XRP":"AGENT",tokenSymbol:Y?"XRP":"AGENT",settlementTimeout:0,deposits:{[F.agentId||""]:F.amount},myNonce:0,theirNonce:0,myTransferred:"0",theirTransferred:"0",status:"active",openedAt:H,lastActivityAt:H,settlementMethod:Y?"xrp":"evm",...Y&&{xrpAccount:F.agentId||"",xrpDestination:F.peerId,xrpAmount:F.amount,xrpBalance:"0"}});break}case"AGENT_CHANNEL_BALANCE_UPDATE":{const F=V,Y=X.get(F.channelId);if(Y){const re=F.direction==="outgoing"?F.newBalance:Y.myTransferred,W=F.direction==="incoming"?F.newBalance:Y.theirTransferred;X.set(F.channelId,{...Y,myTransferred:re,theirTransferred:W,lastActivityAt:H})}break}case"AGENT_CHANNEL_CLOSED":{const F=V,Y=X.get(F.channelId);Y&&X.set(F.channelId,{...Y,status:"settled",settledAt:H,lastActivityAt:H});break}}},[]),S=y.useCallback(()=>{k.current=null;const X=C.current;X.length!==0&&(C.current=[],l(V=>{const H=new Map(V);for(const F of X)N(H,F);return H}))},[N]),A=y.useCallback(()=>{g.current&&g.current.close(),d("connecting"),h(null);const X=window.location.protocol==="https:"?"wss:":"ws:",V=window.location.host,H=`${X}//${V}/ws`,F=new WebSocket(H);F.onopen=()=>{d("connected"),h(null),v.current=0},F.onmessage=Y=>{try{const re=JSON.parse(Y.data);b.has(re.type)&&(C.current.push(re),k.current===null&&(k.current=requestAnimationFrame(S)))}catch{}},F.onerror=()=>{h("WebSocket connection error")},F.onclose=()=>{if(d("disconnected"),g.current=null,v.current<o){const Y=r*Math.pow(2,v.current);v.current++,x.current=setTimeout(()=>{A()},Y)}else d("error"),h("Max reconnect attempts reached")},g.current=F},[b,S,r,o]),_=y.useCallback(()=>{l(new Map)},[]),I=y.useCallback(()=>{v.current=0,A()},[A]),O=y.useCallback(async()=>{if(w.current){A();return}d("hydrating");try{const X=`${window.location.protocol}//${window.location.host}`,V=["PAYMENT_CHANNEL_OPENED","PAYMENT_CHANNEL_BALANCE_UPDATE","PAYMENT_CHANNEL_SETTLED","XRP_CHANNEL_OPENED","XRP_CHANNEL_CLAIMED","XRP_CHANNEL_CLOSED","AGENT_CHANNEL_OPENED","AGENT_CHANNEL_BALANCE_UPDATE","AGENT_CHANNEL_CLOSED"].join(","),H=`${X}/api/accounts/events?types=${V}&limit=5000`,F=await fetch(H);if(!F.ok)throw new Error(`HTTP ${F.status}`);const re=(await F.json()).events;re.length>0&&l(()=>{const W=new Map;for(const G of re)N(W,G.payload);return W})}catch{}w.current=!0,A()},[A,N]);y.useEffect(()=>(O(),()=>{if(g.current&&g.current.close(),x.current&&clearTimeout(x.current),k.current!==null&&cancelAnimationFrame(k.current),C.current.length>0){const X=C.current;C.current=[],l(V=>{const H=new Map(V);for(const F of X)N(H,F);return H})}}),[O,N]);const U=y.useMemo(()=>Array.from(i.values()).sort((X,V)=>new Date(V.lastActivityAt).getTime()-new Date(X.lastActivityAt).getTime()),[i]),M=i.size,D=y.useMemo(()=>Array.from(i.values()).filter(X=>X.status==="active").length,[i]);return{channels:U,channelsMap:i,status:c,error:f,totalChannels:M,activeChannelCount:D,clearChannels:_,reconnect:I}}const ek=1e4;function tk(){const[t,r]=y.useState(null),[o,i]=y.useState(!0),[l,c]=y.useState(null),[d,f]=y.useState(null),h=y.useCallback(async()=>{try{const g=await fetch("/api/balances");if(g.status===404){i(!1);return}if(!g.ok)throw new Error(`HTTP ${g.status}`);const v=await g.json();r(v),c(null),f(Date.now())}catch(g){c(g instanceof Error?g.message:"Failed to fetch balances")}finally{i(!1)}},[]);return y.useEffect(()=>{h();const g=setInterval(h,ek);return()=>clearInterval(g)},[h]),{data:t,loading:o,error:l,lastUpdated:d,refresh:h}}function nk(t,r=[]){let o=[];function i(c,d){const f=y.createContext(d);f.displayName=c+"Context";const h=o.length;o=[...o,d];const g=x=>{var S;const{scope:w,children:C,...k}=x,b=((S=w==null?void 0:w[t])==null?void 0:S[h])||f,N=y.useMemo(()=>k,Object.values(k));return u.jsx(b.Provider,{value:N,children:C})};g.displayName=c+"Provider";function v(x,w){var b;const C=((b=w==null?void 0:w[t])==null?void 0:b[h])||f,k=y.useContext(C);if(k)return k;if(d!==void 0)return d;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[g,v]}const l=()=>{const c=o.map(d=>y.createContext(d));return function(f){const h=(f==null?void 0:f[t])||c;return y.useMemo(()=>({[`__scope${t}`]:{...f,[t]:h}}),[f,h])}};return l.scopeName=t,[i,rk(l,...r)]}function rk(...t){const r=t[0];if(t.length===1)return r;const o=()=>{const i=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const d=i.reduce((f,{useScope:h,scopeName:g})=>{const x=h(c)[`__scope${g}`];return{...f,...x}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return o.scopeName=r.scopeName,o}var ok=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],S0=ok.reduce((t,r)=>{const o=vg(`Primitive.${r}`),i=y.forwardRef((l,c)=>{const{asChild:d,...f}=l,h=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(h,{...f,ref:c})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{}),pd="Progress",hd=100,[sk]=nk(pd),[ik,lk]=sk(pd),j0=y.forwardRef((t,r)=>{const{__scopeProgress:o,value:i=null,max:l,getValueLabel:c=ak,...d}=t;(l||l===0)&&!bm(l)&&console.error(ck(`${l}`,"Progress"));const f=bm(l)?l:hd;i!==null&&!Em(i,f)&&console.error(uk(`${i}`,"Progress"));const h=Em(i,f)?i:null,g=vl(h)?c(h,f):void 0;return u.jsx(ik,{scope:o,value:h,max:f,children:u.jsx(S0.div,{"aria-valuemax":f,"aria-valuemin":0,"aria-valuenow":vl(h)?h:void 0,"aria-valuetext":g,role:"progressbar","data-state":_0(h,f),"data-value":h??void 0,"data-max":f,...d,ref:r})})});j0.displayName=pd;var A0="ProgressIndicator",T0=y.forwardRef((t,r)=>{const{__scopeProgress:o,...i}=t,l=lk(A0,o);return u.jsx(S0.div,{"data-state":_0(l.value,l.max),"data-value":l.value??void 0,"data-max":l.max,...i,ref:r})});T0.displayName=A0;function ak(t,r){return`${Math.round(t/r*100)}%`}function _0(t,r){return t==null?"indeterminate":t===r?"complete":"loading"}function vl(t){return typeof t=="number"}function bm(t){return vl(t)&&!isNaN(t)&&t>0}function Em(t,r){return vl(t)&&!isNaN(t)&&t<=r&&t>=0}function ck(t,r){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${hd}\`.`}function uk(t,r){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${r}\`. The \`value\` prop must be:
312
+ - a positive number
313
+ - less than the value passed to \`max\` (or ${hd} if no \`max\` prop is set)
314
+ - \`null\` or \`undefined\` if the progress is indeterminate.
315
+
316
+ Defaulting to \`null\`.`}var dk=j0,fk=T0;function pk({className:t,value:r,...o}){return u.jsx(dk,{"data-slot":"progress",className:ye("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...o,children:u.jsx(fk,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(r||0)}%)`}})})}function Nm(t){const r=t<0n?-t:t,o=t<0n?"-":"";return r>=1000000000n?`${o}${(Number(r)/1e9).toFixed(1)}B`:r>=1000000n?`${o}${(Number(r)/1e6).toFixed(1)}M`:r>=1000n?`${o}${(Number(r)/1e3).toFixed(1)}K`:t.toString()}function hk(t){if(t.length<2)return"stable";const r=t.slice(-5);if(r.length<2)return"stable";const o=r[0].balance,i=r[r.length-1].balance;return i>o?"up":i<o?"down":"stable"}function mk({history:t,maxBars:r=20}){const{bars:o,trend:i,hasZeroCrossing:l,zeroLinePosition:c}=y.useMemo(()=>{if(t.length===0)return{bars:[],trend:"stable",hasZeroCrossing:!1,zeroLinePosition:0};const g=t.slice(-r);let v=g[0].balance,x=g[0].balance;for(const A of g)A.balance<v&&(v=A.balance),A.balance>x&&(x=A.balance);const w=v<0n&&x>0n;let C=0;if(w){const A=x-v;C=Number((0n-v)*100n/A)}const k=x-v,b=k!==0n,N=g.map((A,_)=>{const I=b?Number((A.balance-v)*100n/k):50;let O="neutral";if(_>0){const M=g[_-1].balance;A.balance>M?O="up":A.balance<M&&(O="down")}const U=A.balance>=0n;return{timestamp:A.timestamp,balance:A.balance,height:Math.max(5,Math.min(100,I)),changeType:O,isPositive:U}}),S=hk(g);return{bars:N,trend:S,hasZeroCrossing:w,zeroLinePosition:C}},[t,r]);if(o.length===0)return null;const d=i==="up"?pl:i==="down"?FE:TE,f=i==="up"?"text-emerald-500":i==="down"?"text-rose-500":"text-muted-foreground",h=i==="up"?"Increasing":i==="down"?"Decreasing":"Stable";return u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[u.jsx("span",{children:"Balance History"}),u.jsxs("span",{className:`flex items-center gap-1 ${f}`,children:[u.jsx(d,{className:"h-3 w-3"}),h]})]}),u.jsxs("div",{className:"relative flex items-end gap-px h-12 bg-muted/10 rounded px-1 py-1",role:"img","aria-label":`Balance history chart showing ${o.length} data points`,children:[l&&u.jsx("div",{className:"absolute left-0 right-0 h-px bg-muted-foreground/30",style:{bottom:`${c}%`},"aria-hidden":"true"}),o.map((g,v)=>u.jsxs(Su,{children:[u.jsx(ju,{asChild:!0,children:u.jsx("div",{className:`flex-1 min-w-[2px] max-w-[6px] rounded-t transition-all cursor-pointer ${g.isPositive?"bg-gradient-to-t from-emerald-500/50 to-emerald-500":"bg-gradient-to-t from-rose-500/50 to-rose-500"}`,style:{height:`${g.height}%`},"aria-label":`Balance: ${Nm(g.balance)} at ${new Date(g.timestamp).toLocaleString()}`})}),u.jsx(Au,{children:u.jsxs("div",{className:"text-xs font-mono",children:[u.jsx("div",{className:g.isPositive?"text-emerald-400":"text-rose-400",children:Nm(g.balance)}),u.jsx("div",{className:"text-muted-foreground",children:new Date(g.timestamp).toLocaleString()})]})})]},v))]}),u.jsx("div",{className:"flex justify-between text-xs text-muted-foreground",children:u.jsxs("span",{children:[o.length," changes"]})})]})}function hs(t){const r=t<0n?-t:t,o=t<0n?"-":"";return r>=1000000000n?`${o}${(Number(r)/1e9).toFixed(1)}B`:r>=1000000n?`${o}${(Number(r)/1e6).toFixed(1)}M`:r>=1000n?`${o}${(Number(r)/1e3).toFixed(1)}K`:t.toLocaleString()}function gk(t){return t>0n?"text-emerald-500":t<0n?"text-rose-500":"text-muted-foreground"}function xk(t){switch(t){case"IDLE":return{variant:"secondary",label:"Idle",className:"bg-gray-500"};case"SETTLEMENT_PENDING":return{variant:"default",label:"Pending",className:"bg-yellow-500"};case"SETTLEMENT_IN_PROGRESS":return{variant:"default",label:"In Progress",className:"bg-cyan-500 animate-pulse"}}}function vk(t,r){if(!r||r===0n)return 0;const o=Number(t*100n/r);return Math.min(100,Math.max(0,o))}const yk=y.memo(function({peerId:r,tokenId:o,debitBalance:i,creditBalance:l,netBalance:c,settlementThreshold:d,settlementState:f,balanceHistory:h,hasActiveChannel:g,channelType:v}){const x=vk(l,d),w=xk(f);return u.jsxs(At,{className:"py-4 bg-card/80 border-border/50 hover:border-cyan-500/30 hover-elevate",children:[u.jsxs(Yt,{className:"pb-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(Xt,{className:"text-sm font-mono font-medium truncate",title:r,children:r}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[g&&u.jsxs(et,{variant:"outline",className:`text-xs ${v==="evm"?"border-emerald-500 text-emerald-500":v==="aptos"?"border-green-500 text-green-500":"border-orange-500 text-orange-500"}`,children:[u.jsx(Pl,{className:"h-3 w-3 mr-1"}),v==="evm"?"EVM":v==="aptos"?"Aptos":"XRP"]}),u.jsx(et,{variant:"outline",className:"text-xs",children:o})]})]}),u.jsx(Ar,{className:"flex items-center gap-2",children:u.jsx(et,{className:`text-xs text-white ${w.className}`,children:w.label})})]}),u.jsxs(Dt,{className:"space-y-3",children:[u.jsxs("div",{className:"text-center mb-4",children:[u.jsx("div",{className:`text-3xl font-bold font-mono tabular-nums ${gk(c)}`,children:hs(c)}),u.jsx("div",{className:"text-xs text-muted-foreground",children:"Net Balance"})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4 text-xs",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"We Owe (Debit)"}),u.jsx("div",{className:"font-mono font-medium text-rose-400",children:hs(i)})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"They Owe (Credit)"}),u.jsx("div",{className:"font-mono font-medium text-emerald-400",children:hs(l)})]})]}),d&&d>0n?u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"flex items-center justify-between text-xs",children:[u.jsxs("span",{className:"text-muted-foreground flex items-center gap-1",children:[u.jsx(ed,{className:"h-3 w-3"}),"Settlement Threshold"]}),u.jsxs("span",{className:"font-mono tabular-nums",children:[x.toFixed(0),"%"]})]}),u.jsx(pk,{value:x,className:`h-1.5 ${x>=90?"[&>div]:bg-rose-500":x>=70?"[&>div]:bg-yellow-500":""}`}),u.jsxs("div",{className:"text-xs text-muted-foreground text-right font-mono tabular-nums",children:[hs(l)," / ",hs(d)]})]}):u.jsx("div",{className:"text-xs text-muted-foreground italic",children:"No threshold set"}),h.length>0&&u.jsx(mk,{history:h})]})]})});function Yc(t){return t.length<=12?t:`${t.slice(0,6)}...${t.slice(-4)}`}function wk(t){switch(t){case"opening":return{label:"Opening",className:"bg-yellow-500"};case"active":return{label:"Active",className:"bg-green-500"};case"closing":return{label:"Closing",className:"bg-orange-500"};case"settling":return{label:"Settling",className:"bg-blue-500 animate-pulse"};case"settled":return{label:"Settled",className:"bg-gray-500"}}}function Qi(t){const r=BigInt(t);return r>=1000000000n?`${(Number(r)/1e9).toFixed(2)}B`:r>=1000000n?`${(Number(r)/1e6).toFixed(2)}M`:r>=1000n?`${(Number(r)/1e3).toFixed(2)}K`:r.toLocaleString()}const bk=y.memo(function({channel:r,onClick:o}){const i=wk(r.status),l=r.settlementMethod==="xrp",c=new Date(r.lastActivityAt).getTime();return u.jsxs(At,{className:"py-4 cursor-pointer hover:border-primary/50 transition-colors",onClick:o,children:[u.jsxs(Yt,{className:"pb-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Xt,{className:"text-sm font-medium flex items-center gap-2",children:[u.jsx(Pl,{className:"h-4 w-4"}),u.jsx("span",{className:"truncate",title:r.channelId,children:Yc(r.channelId)})]}),u.jsx(et,{className:`text-xs text-white ${l?"bg-orange-500":"bg-emerald-500"}`,children:l?"XRP":"EVM"})]}),u.jsxs(Ar,{className:"flex items-center gap-2",children:[u.jsx(et,{className:`text-xs text-white ${i.className}`,children:i.label}),u.jsx("span",{className:"text-xs",children:r.tokenSymbol})]})]}),u.jsxs(Dt,{className:"space-y-3",children:[u.jsxs("div",{className:"text-xs",children:[u.jsx("div",{className:"text-muted-foreground mb-1",children:"Participants"}),u.jsxs("div",{className:"flex items-center gap-2 font-mono",children:[u.jsx("span",{title:r.participants[0],children:Yc(r.participants[0])}),u.jsx(Xb,{className:"h-3 w-3 text-muted-foreground"}),u.jsx("span",{title:r.participants[1],children:Yc(r.participants[1])})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground",children:"My Transferred"}),u.jsx("div",{className:"font-mono text-green-500",children:Qi(r.myTransferred)})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground",children:"Their Transferred"}),u.jsx("div",{className:"font-mono text-blue-400",children:Qi(r.theirTransferred)})]})]}),l&&r.xrpAmount&&u.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground",children:"XRP Amount"}),u.jsxs("div",{className:"font-mono",children:[Qi(r.xrpAmount)," drops"]})]}),r.xrpBalance&&u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground",children:"XRP Claimed"}),u.jsxs("div",{className:"font-mono",children:[Qi(r.xrpBalance)," drops"]})]})]}),u.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[u.jsx(oE,{className:"h-3 w-3"}),"Last activity ",Ku(c)]})]})]})});function sl({className:t,...r}){return u.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:u.jsx("table",{"data-slot":"table",className:ye("w-full caption-bottom text-sm",t),...r})})}function il({className:t,...r}){return u.jsx("thead",{"data-slot":"table-header",className:ye("[&_tr]:border-b",t),...r})}function ll({className:t,...r}){return u.jsx("tbody",{"data-slot":"table-body",className:ye("[&_tr:last-child]:border-0",t),...r})}function er({className:t,...r}){return u.jsx("tr",{"data-slot":"table-row",className:ye("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...r})}function qe({className:t,...r}){return u.jsx("th",{"data-slot":"table-head",className:ye("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...r})}function Qe({className:t,...r}){return u.jsx("td",{"data-slot":"table-cell",className:ye("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...r})}function Ek(t=1500){const[r,o]=y.useState(!1),[i,l]=y.useState(null),c=y.useRef(null);y.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const d=y.useCallback(async h=>{c.current&&clearTimeout(c.current);try{if(!navigator.clipboard)throw new Error("Clipboard API not available");return await navigator.clipboard.writeText(h),o(!0),l(null),c.current=setTimeout(()=>{o(!1)},t),!0}catch(g){const v=g instanceof Error?g.message:"Failed to copy to clipboard";l(v),o(!1);try{const x=document.createElement("textarea");x.value=h,x.style.position="fixed",x.style.left="-9999px",x.style.top="-9999px",document.body.appendChild(x),x.focus(),x.select();const w=document.execCommand("copy");if(document.body.removeChild(x),w)return o(!0),l(null),c.current=setTimeout(()=>{o(!1)},t),!0}catch{}return!1}},[t]),f=y.useCallback(()=>{o(!1),l(null),c.current&&(clearTimeout(c.current),c.current=null)},[]);return{copy:d,copied:r,error:i,reset:f}}function Nk({className:t}){return u.jsxs("svg",{viewBox:"0 0 256 417",className:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{d:"M127.961 0L125.166 9.5V285.168L127.961 287.958L255.923 212.32L127.961 0Z",fill:"#687DE3"}),u.jsx("path",{d:"M127.962 0L0 212.32L127.962 287.958V154.158V0Z",fill:"#A4B0F4"}),u.jsx("path",{d:"M127.961 312.187L126.386 314.107V412.306L127.961 416.905L255.999 236.587L127.961 312.187Z",fill:"#687DE3"}),u.jsx("path",{d:"M127.962 416.905V312.187L0 236.587L127.962 416.905Z",fill:"#A4B0F4"}),u.jsx("path",{d:"M127.961 287.958L255.922 212.32L127.961 154.159V287.958Z",fill:"#4E5DA0"}),u.jsx("path",{d:"M0 212.32L127.962 287.958V154.159L0 212.32Z",fill:"#687DE3"})]})}function Ck({className:t}){return u.jsxs("svg",{viewBox:"0 0 24 24",className:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("circle",{cx:"12",cy:"12",r:"11",stroke:"#A855F7",strokeWidth:"2"}),u.jsx("text",{x:"12",y:"16",textAnchor:"middle",fontSize:"12",fontWeight:"bold",fill:"#A855F7",children:"A"})]})}function kk({className:t}){return u.jsxs("svg",{viewBox:"0 0 256 256",className:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{d:"M59.5 26h30.3l38 39.3L166 26h30.5L145 80.5l-17 17.5-17-17.5L59.5 26Z",fill:"#F97316"}),u.jsx("path",{d:"M196.5 230h-30.3l-38-39.3L90 230H59.5L111 175.5l17-17.5 17 17.5L196.5 230Z",fill:"#F97316"})]})}function Sk({className:t}){return u.jsx("svg",{viewBox:"0 0 100 100",className:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M71.4 36.5h-9.8c-.8 0-1.6.4-2.1 1l-4.5 5.5c-.7.9-2.1.9-2.8 0l-4.5-5.5c-.5-.6-1.3-1-2.1-1h-17c-.9 0-1.4 1-.8 1.7l7.8 9.5c.5.6.5 1.5 0 2.1l-7.8 9.5c-.6.7-.1 1.7.8 1.7h17c.8 0 1.6-.4 2.1-1l4.5-5.5c.7-.9 2.1-.9 2.8 0l4.5 5.5c.5.6 1.3 1 2.1 1h9.8c.9 0 1.4-1 .8-1.7l-12.3-15c-.5-.6-.5-1.5 0-2.1l12.3-15c.6-.7.1-1.7-.8-1.7z",fill:"#10B981"})})}function Cm(t){return t.length<=12?t:`${t.slice(0,6)}...${t.slice(-4)}`}function wn({address:t,explorerUrl:r}){const{copy:o,copied:i}=Ek();return r?u.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 font-mono text-xs text-blue-500 hover:text-blue-700 hover:underline transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded",onClick:l=>{l.preventDefault(),window.open(r,"_blank","noopener,noreferrer")},title:t,"aria-label":"View on blockchain explorer",children:[Cm(t),u.jsx(Qu,{className:"h-3 w-3"})]}):u.jsxs("button",{onClick:()=>o(t),className:"inline-flex items-center gap-1 font-mono text-xs text-muted-foreground hover:text-foreground transition-colors",title:t,children:[Cm(t),i?u.jsx(_l,{className:"h-3 w-3 text-green-500"}):u.jsx(qu,{className:"h-3 w-3"})]})}function Xc({status:t}){const r=t==="opened"||t==="open"||t==="active"?"default":t==="settled"||t==="closed"?"secondary":"outline";return u.jsx(et,{variant:r,children:t})}const jk=y.memo(function({data:r,lastUpdated:o,onRefresh:i}){return u.jsxs(At,{children:[u.jsxs(Yt,{className:"pb-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Xt,{className:"text-sm font-medium flex items-center gap-2",children:[u.jsx(Pl,{className:"h-4 w-4"}),"On-Chain Wallet"]}),u.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[o&&u.jsxs("span",{children:["Updated ",Ku(o)]}),u.jsx("button",{onClick:i,className:"hover:text-foreground transition-colors",title:"Refresh balances",children:u.jsx(yu,{className:"h-3.5 w-3.5"})})]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground mt-1",children:[u.jsxs("span",{children:["Agent: ",u.jsx("span",{className:"font-medium text-foreground",children:r.agentId})]}),u.jsxs("span",{children:["EVM:"," ",u.jsx(wn,{address:r.evmAddress,explorerUrl:on(r.evmAddress,"address")??void 0})]}),r.xrpAddress&&u.jsxs("span",{children:["XRP:"," ",u.jsx(wn,{address:r.xrpAddress,explorerUrl:on(r.xrpAddress,"address")??void 0})]}),r.aptosAddress&&u.jsxs("span",{children:["Aptos:"," ",u.jsx(wn,{address:r.aptosAddress,explorerUrl:on(r.aptosAddress,"address")??void 0})]})]})]}),u.jsxs(Dt,{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[u.jsxs("div",{className:"rounded-lg border p-3",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-blue-500 mb-1",children:[u.jsx(Nk,{className:"h-3.5 w-3.5"}),"ETH"]}),u.jsx("div",{className:"text-lg font-bold font-mono",children:r.ethBalance!=null?Number(r.ethBalance).toLocaleString(void 0,{maximumFractionDigits:4}):"—"})]}),u.jsxs("div",{className:"rounded-lg border p-3",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-purple-500 mb-1",children:[u.jsx(Ck,{className:"h-3.5 w-3.5"}),"AGENT Token"]}),u.jsx("div",{className:"text-lg font-bold font-mono",children:r.agentTokenBalance!=null?Number(r.agentTokenBalance).toLocaleString(void 0,{maximumFractionDigits:2}):"—"})]}),u.jsxs("div",{className:"rounded-lg border p-3",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-orange-500 mb-1",children:[u.jsx(kk,{className:"h-3.5 w-3.5"}),"XRP"]}),u.jsx("div",{className:"text-lg font-bold font-mono",children:r.xrpBalance!=null?Number(r.xrpBalance).toLocaleString(void 0,{maximumFractionDigits:2}):"—"})]}),u.jsxs("div",{className:"rounded-lg border p-3",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-emerald-500 mb-1",children:[u.jsx(Sk,{className:"h-3.5 w-3.5"}),"APT"]}),u.jsx("div",{className:"text-lg font-bold font-mono",children:r.aptBalance!=null?Number(r.aptBalance).toLocaleString(void 0,{maximumFractionDigits:4}):"—"})]})]}),r.evmChannels.length>0&&u.jsxs("div",{children:[u.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:["EVM Channels (",r.evmChannels.length,")"]}),u.jsxs(sl,{children:[u.jsx(il,{children:u.jsxs(er,{children:[u.jsx(qe,{className:"w-[20%]",children:"Channel"}),u.jsx(qe,{className:"w-[20%]",children:"Peer"}),u.jsx(qe,{className:"w-[25%] text-right",children:"Deposit"}),u.jsx(qe,{className:"w-[25%] text-right",children:"Transferred"}),u.jsx(qe,{className:"w-[10%] text-right",children:"Status"})]})}),u.jsx(ll,{children:r.evmChannels.map(l=>u.jsxs(er,{children:[u.jsx(Qe,{children:u.jsx(wn,{address:l.channelId,explorerUrl:on(l.channelId,"address")??void 0})}),u.jsx(Qe,{children:u.jsx(wn,{address:l.peerAddress,explorerUrl:on(l.peerAddress,"address")??void 0})}),u.jsx(Qe,{className:"text-right font-mono text-xs",children:Number(l.deposit).toLocaleString(void 0,{maximumFractionDigits:4})}),u.jsx(Qe,{className:"text-right font-mono text-xs",children:Number(l.transferredAmount).toLocaleString(void 0,{maximumFractionDigits:4})}),u.jsx(Qe,{className:"text-right",children:u.jsx(Xc,{status:l.status})})]},l.channelId))})]})]}),r.xrpChannels.length>0&&u.jsxs("div",{children:[u.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:["XRP Channels (",r.xrpChannels.length,")"]}),u.jsxs(sl,{children:[u.jsx(il,{children:u.jsxs(er,{children:[u.jsx(qe,{className:"w-[20%]",children:"Channel"}),u.jsx(qe,{className:"w-[20%]",children:"Dest"}),u.jsx(qe,{className:"w-[25%] text-right",children:"Amount"}),u.jsx(qe,{className:"w-[25%] text-right",children:"Balance"}),u.jsx(qe,{className:"w-[10%] text-right",children:"Status"})]})}),u.jsx(ll,{children:r.xrpChannels.map(l=>u.jsxs(er,{children:[u.jsx(Qe,{children:u.jsx(wn,{address:l.channelId,explorerUrl:r.xrpAddress?on(r.xrpAddress,"address")??void 0:void 0})}),u.jsx(Qe,{children:u.jsx(wn,{address:l.destination,explorerUrl:on(l.destination,"address")??void 0})}),u.jsx(Qe,{className:"text-right font-mono text-xs",children:Number(l.amount).toLocaleString(void 0,{maximumFractionDigits:2})}),u.jsx(Qe,{className:"text-right font-mono text-xs",children:Number(l.balance).toLocaleString(void 0,{maximumFractionDigits:2})}),u.jsx(Qe,{className:"text-right",children:u.jsx(Xc,{status:l.status})})]},l.channelId))})]})]}),r.aptosChannels&&r.aptosChannels.length>0&&u.jsxs("div",{children:[u.jsxs("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:["Aptos Channels (",r.aptosChannels.length,")"]}),u.jsxs(sl,{children:[u.jsx(il,{children:u.jsxs(er,{children:[u.jsx(qe,{className:"w-[20%]",children:"Channel"}),u.jsx(qe,{className:"w-[20%]",children:"Peer"}),u.jsx(qe,{className:"w-[25%] text-right",children:"Deposit"}),u.jsx(qe,{className:"w-[25%] text-right",children:"Transferred"}),u.jsx(qe,{className:"w-[10%] text-right",children:"Status"})]})}),u.jsx(ll,{children:r.aptosChannels.map(l=>u.jsxs(er,{children:[u.jsx(Qe,{children:u.jsx(wn,{address:l.channelId,explorerUrl:on(l.channelId,"address")??void 0})}),u.jsx(Qe,{children:u.jsx(wn,{address:l.peerAddress,explorerUrl:on(l.peerAddress,"address")??void 0})}),u.jsx(Qe,{className:"text-right font-mono text-xs",children:Number(l.deposit).toLocaleString(void 0,{maximumFractionDigits:4})}),u.jsx(Qe,{className:"text-right font-mono text-xs",children:Number(l.transferredAmount).toLocaleString(void 0,{maximumFractionDigits:4})}),u.jsx(Qe,{className:"text-right",children:u.jsx(Xc,{status:l.status})})]},l.channelId))})]})]}),r.evmChannels.length===0&&r.xrpChannels.length===0&&(!r.aptosChannels||r.aptosChannels.length===0)&&u.jsx("p",{className:"text-xs text-muted-foreground text-center py-2",children:"No payment channels open yet."})]})]})}),Ak=y.memo(function(){const{accounts:r,status:o,totalAccounts:i,nearThresholdCount:l}=qC(),{channels:c,status:d,activeChannelCount:f}=JC(),{data:h,loading:g,lastUpdated:v,refresh:x}=tk(),w=y.useMemo(()=>r.map(k=>{const b=c.filter(A=>A.peerId===k.peerId&&A.status==="active"),N=b.length>0,S=N?b[0].settlementMethod||"evm":void 0;return{...k,hasActiveChannel:N,channelType:S}}),[r,c]),C=o==="hydrating"||o==="connecting"||d==="hydrating"||d==="connecting";return i===0&&c.length===0&&!h?C?u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Array.from({length:3}).map((k,b)=>u.jsx("div",{className:"rounded-lg border border-border bg-card pl-0 overflow-hidden",children:u.jsxs("div",{className:"flex items-stretch",children:[u.jsx("div",{className:"w-1 bg-muted animate-pulse shrink-0"}),u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx("div",{className:"h-5 w-5 bg-muted animate-pulse rounded"}),u.jsxs("div",{children:[u.jsx("div",{className:"h-7 w-10 bg-muted animate-pulse rounded mb-1"}),u.jsx("div",{className:"h-3 w-20 bg-muted animate-pulse rounded"})]})]})]})},b))}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:3}).map((k,b)=>u.jsxs("div",{className:"rounded-lg border border-border bg-card p-4 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"h-4 w-28 bg-muted animate-pulse rounded"}),u.jsx("div",{className:"h-5 w-12 bg-muted animate-pulse rounded"})]}),u.jsx("div",{className:"h-4 w-16 bg-muted animate-pulse rounded"}),u.jsx("div",{className:"grid grid-cols-3 gap-2",children:Array.from({length:3}).map((N,S)=>u.jsxs("div",{className:"text-center space-y-1",children:[u.jsx("div",{className:"h-3 w-12 bg-muted animate-pulse rounded mx-auto"}),u.jsx("div",{className:"h-4 w-10 bg-muted animate-pulse rounded mx-auto"})]},S))})]},b))})]}):o==="error"?u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground",children:[u.jsx(Bg,{className:"h-12 w-12 text-rose-500 mb-4"}),u.jsx("p",{className:"text-lg font-medium",children:"Connection Lost"}),u.jsx("p",{className:"text-sm mt-1",children:"Failed to connect to event stream. Please check the connector is running."})]}):u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground",children:[u.jsx(_s,{className:"h-12 w-12 text-cyan-500 mb-4 animate-pulse"}),u.jsx("p",{className:"text-lg font-medium",children:"No peer accounts yet"}),u.jsx("p",{className:"text-sm mt-1 max-w-md text-center",children:"Balance events will appear as packets flow through the connector. Send ILP packets to see account balances update in real-time."})]}):u.jsxs("div",{className:"space-y-6",children:[g&&!h?u.jsxs("div",{className:"rounded-lg border border-border bg-card p-4 space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"h-4 w-32 bg-muted animate-pulse rounded"}),u.jsx("div",{className:"h-3 w-20 bg-muted animate-pulse rounded"})]}),u.jsx("div",{className:"h-3 w-48 bg-muted animate-pulse rounded"}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:Array.from({length:3}).map((k,b)=>u.jsxs("div",{className:"rounded-lg border p-3 space-y-2",children:[u.jsx("div",{className:"h-3 w-12 bg-muted animate-pulse rounded"}),u.jsx("div",{className:"h-6 w-24 bg-muted animate-pulse rounded"})]},b))})]}):h?u.jsx(jk,{data:h,lastUpdated:v,onRefresh:x}):null,u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsx("div",{className:"rounded-lg border border-border bg-card pl-0 overflow-hidden hover:border-primary/30 transition-colors",children:u.jsxs("div",{className:"flex items-stretch",children:[u.jsx("div",{className:"w-1 bg-blue-500 shrink-0"}),u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx(Ju,{className:"h-5 w-5 text-blue-500 shrink-0"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold leading-tight",children:i}),u.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:"Total Accounts"})]})]})]})}),u.jsx("div",{className:"rounded-lg border border-border bg-card pl-0 overflow-hidden hover:border-primary/30 transition-colors",children:u.jsxs("div",{className:"flex items-stretch",children:[u.jsx("div",{className:`w-1 shrink-0 ${l>0?"bg-yellow-500":"bg-yellow-500/50"}`}),u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx(Fg,{className:`h-5 w-5 shrink-0 ${l>0?"text-yellow-500":"text-yellow-500/50"}`}),u.jsxs("div",{children:[u.jsx("div",{className:`text-2xl font-bold leading-tight ${l>0?"text-yellow-500":""}`,children:l}),u.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:"Near Threshold"})]})]})]})}),u.jsx("div",{className:"rounded-lg border border-border bg-card pl-0 overflow-hidden hover:border-primary/30 transition-colors",children:u.jsxs("div",{className:"flex items-stretch",children:[u.jsx("div",{className:`w-1 shrink-0 ${f>0?"bg-emerald-500":"bg-emerald-500/50"}`}),u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx(Pl,{className:`h-5 w-5 shrink-0 ${f>0?"text-emerald-500":"text-emerald-500/50"}`}),u.jsxs("div",{children:[u.jsx("div",{className:`text-2xl font-bold leading-tight ${f>0?"text-emerald-500":""}`,children:f}),u.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:"Active Channels"})]})]})]})})]}),w.length>0&&u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Peer Accounts"}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:w.map(k=>u.jsx(yk,{peerId:k.peerId,tokenId:k.tokenId,debitBalance:k.debitBalance,creditBalance:k.creditBalance,netBalance:k.netBalance,creditLimit:k.creditLimit,settlementThreshold:k.settlementThreshold,settlementState:k.settlementState,balanceHistory:k.balanceHistory,hasActiveChannel:k.hasActiveChannel,channelType:k.channelType},`${k.peerId}:${k.tokenId}`))})]}),c.length>0&&u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Payment Channels"}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:c.map(k=>u.jsx(bk,{channel:k},k.channelId))})]})]})}),Tk=3e4;function _k(){const[t,r]=y.useState([]),[o,i]=y.useState(!0),[l,c]=y.useState(null),d=y.useCallback(async()=>{try{const f=await fetch("/api/routes");if(f.status===404){i(!1);return}if(!f.ok)throw new Error(`HTTP ${f.status}`);const h=await f.json();r(h.routes??[]),c(null)}catch(f){c(f instanceof Error?f.message:"Failed to fetch routes")}finally{i(!1)}},[]);return y.useEffect(()=>{d();const f=setInterval(d,Tk);return()=>clearInterval(f)},[d]),{routes:t,loading:o,error:l,refresh:d}}const Pk={evm:{name:"Base Sepolia",url:t=>`https://sepolia.basescan.org/address/${t}`},xrp:{name:"XRPL Testnet",url:t=>`https://testnet.xrpl.org/accounts/${t}`}};function P0(t){return t.length<=17?t:`${t.slice(0,8)}...${t.slice(-6)}`}function km({text:t}){const[r,o]=y.useState(!1),i=y.useCallback(async()=>{try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),1500)}catch{}},[t]);return u.jsx("button",{onClick:i,className:"inline-flex items-center text-muted-foreground hover:text-foreground transition-colors",title:`Copy: ${t}`,children:r?u.jsx(_l,{className:"h-3 w-3 text-green-500"}):u.jsx(qu,{className:"h-3 w-3"})})}function Sm({address:t,type:r}){const o=Pk[r],i=P0(t);return u.jsxs("a",{href:o.url(t),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 font-mono text-xs text-cyan-500 hover:text-cyan-400 hover:underline",title:`View on ${o.name}: ${t}`,children:[i,u.jsx(Qu,{className:"h-3 w-3"})]})}const Rk=y.memo(function({peers:r,routes:o}){const i=y.useMemo(()=>r.filter(l=>l.connected).length,[r]);return u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsx("div",{className:"rounded-lg border border-border bg-card pl-0 overflow-hidden hover:border-primary/30 transition-colors",children:u.jsxs("div",{className:"flex items-stretch",children:[u.jsx("div",{className:"w-1 bg-blue-500 shrink-0"}),u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx(Ju,{className:"h-5 w-5 text-blue-500 shrink-0"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold font-mono tabular-nums leading-tight",children:r.length}),u.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:"Total Peers"})]})]})]})}),u.jsx("div",{className:"rounded-lg border border-border bg-card pl-0 overflow-hidden hover:border-primary/30 transition-colors",children:u.jsxs("div",{className:"flex items-stretch",children:[u.jsx("div",{className:ye("w-1 shrink-0",i>0?"bg-emerald-500":"bg-gray-500")}),u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx(Xu,{className:ye("h-5 w-5 shrink-0",i>0?"text-emerald-500":"text-gray-500")}),u.jsxs("div",{children:[u.jsx("div",{className:ye("text-2xl font-bold font-mono tabular-nums leading-tight",i>0?"text-emerald-500":""),children:i}),u.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:"Connected"})]})]})]})}),u.jsx("div",{className:"rounded-lg border border-border bg-card pl-0 overflow-hidden hover:border-primary/30 transition-colors",children:u.jsxs("div",{className:"flex items-stretch",children:[u.jsx("div",{className:ye("w-1 shrink-0",o.length>0?"bg-cyan-500":"bg-cyan-500/50")}),u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx(Zu,{className:ye("h-5 w-5 shrink-0",o.length>0?"text-cyan-500":"text-cyan-500/50")}),u.jsxs("div",{children:[u.jsx("div",{className:"text-2xl font-bold font-mono tabular-nums leading-tight",children:o.length}),u.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:"Total Routes"})]})]})]})})]})}),Ik=y.memo(function({peer:r,id:o}){return u.jsxs(At,{id:o,className:"rounded-lg border border-border bg-card/80 border-border/50 p-4 space-y-3 hover:border-primary/50 transition-colors",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:ye("w-2 h-2 rounded-full shrink-0",r.connected?"bg-emerald-500":"bg-gray-500")}),u.jsx("span",{className:"font-mono text-sm font-medium truncate",children:r.petname||r.peerId})]}),u.jsx(et,{variant:"outline",className:ye("text-xs",r.connected?"border-emerald-500 text-emerald-500 bg-emerald-500/10":"border-gray-500 text-gray-500 bg-gray-500/10"),children:r.connected?u.jsxs(u.Fragment,{children:[u.jsx(Xu,{className:"h-3 w-3 mr-1"}),"Connected"]}):u.jsxs(u.Fragment,{children:[u.jsx(Es,{className:"h-3 w-3 mr-1"}),"Disconnected"]})})]}),r.ilpAddress&&u.jsxs("div",{className:"space-y-0.5",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"ILP Address"}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx("span",{className:"font-mono text-xs text-cyan-500 break-all",children:r.ilpAddress}),u.jsx(km,{text:r.ilpAddress})]})]}),r.evmAddress&&u.jsxs("div",{className:"space-y-0.5",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"EVM Address"}),u.jsx(Sm,{address:r.evmAddress,type:"evm"})]}),r.xrpAddress&&u.jsxs("div",{className:"space-y-0.5",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"XRP Address"}),u.jsx(Sm,{address:r.xrpAddress,type:"xrp"})]}),r.btpUrl&&u.jsxs("div",{className:"space-y-0.5",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"BTP URL"}),u.jsx("span",{className:"font-mono text-xs text-muted-foreground break-all",children:r.btpUrl})]}),r.pubkey&&u.jsxs("div",{className:"space-y-0.5",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"Pubkey"}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx("span",{className:"font-mono text-xs",title:r.pubkey,children:P0(r.pubkey)}),u.jsx(km,{text:r.pubkey})]})]})]})}),Lk=y.memo(function({routes:r,onPeerClick:o}){const i=y.useMemo(()=>[...r].sort((l,c)=>l.prefix.localeCompare(c.prefix)),[r]);return i.length===0?u.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No routing entries configured"}):u.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:u.jsxs(sl,{children:[u.jsx(il,{children:u.jsxs(er,{children:[u.jsx(qe,{className:"w-[50%]",children:"Prefix"}),u.jsx(qe,{className:"w-[35%]",children:"Next Hop"}),u.jsx(qe,{className:"w-[15%] text-right",children:"Priority"})]})}),u.jsx(ll,{children:i.map((l,c)=>u.jsxs(er,{children:[u.jsx(Qe,{className:"font-mono text-xs text-cyan-500",children:l.prefix}),u.jsx(Qe,{children:u.jsx("button",{className:"font-mono text-xs text-blue-400 hover:text-blue-300 hover:underline transition-colors",onClick:()=>o(l.nextHop),children:l.nextHop})}),u.jsx(Qe,{className:"text-right",children:l.priority!==void 0?u.jsx(et,{variant:"outline",className:"text-xs",children:l.priority}):u.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})})]},`${l.prefix}-${c}`))})]})})}),Mk=y.memo(function(){const{peers:r,loading:o,error:i,refresh:l}=k0(),{routes:c,loading:d,refresh:f}=_k(),h=o||d,g=y.useCallback(v=>{const x=document.getElementById(`peer-card-${v}`);x&&(x.scrollIntoView({behavior:"smooth",block:"center"}),x.classList.add("ring-2","ring-primary"),setTimeout(()=>x.classList.remove("ring-2","ring-primary"),2e3))},[]);return h&&r.length===0&&c.length===0?u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Array.from({length:3}).map((v,x)=>u.jsx("div",{className:"rounded-lg border border-border bg-card pl-0 overflow-hidden",children:u.jsxs("div",{className:"flex items-stretch",children:[u.jsx("div",{className:"w-1 bg-muted animate-pulse shrink-0"}),u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx("div",{className:"h-5 w-5 bg-muted animate-pulse rounded"}),u.jsxs("div",{children:[u.jsx("div",{className:"h-7 w-10 bg-muted animate-pulse rounded mb-1"}),u.jsx("div",{className:"h-3 w-20 bg-muted animate-pulse rounded"})]})]})]})},x))}),u.jsxs("div",{children:[u.jsx("div",{className:"h-4 w-32 bg-muted animate-pulse rounded mb-3"}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:3}).map((v,x)=>u.jsxs("div",{className:"rounded-lg border border-border bg-card p-4 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"h-2 w-2 bg-muted animate-pulse rounded-full"}),u.jsx("div",{className:"h-4 w-24 bg-muted animate-pulse rounded"})]}),u.jsx("div",{className:"h-5 w-16 bg-muted animate-pulse rounded"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"h-3 w-12 bg-muted animate-pulse rounded"}),u.jsx("div",{className:"h-3 w-40 bg-muted animate-pulse rounded"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"h-3 w-16 bg-muted animate-pulse rounded"}),u.jsx("div",{className:"h-3 w-28 bg-muted animate-pulse rounded"})]})]},x))})]}),u.jsxs("div",{children:[u.jsx("div",{className:"h-4 w-28 bg-muted animate-pulse rounded mb-3"}),u.jsx("div",{className:"rounded-lg border border-border p-4 space-y-2",children:Array.from({length:3}).map((v,x)=>u.jsx("div",{className:"h-4 w-full bg-muted animate-pulse rounded"},x))})]})]}):r.length===0&&c.length===0?u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground",children:[u.jsx(Ju,{className:"h-12 w-12 text-cyan-500 mb-4 animate-pulse"}),u.jsx("p",{className:"text-lg font-medium",children:"No peers connected"}),u.jsx("p",{className:"text-sm mt-1 max-w-md text-center",children:"Peers will appear when BTP connections are established. Configure peer connections in your connector configuration file."}),i&&u.jsx("p",{className:"text-xs mt-4 text-destructive",children:"Failed to fetch peer data. Please check the connector is running."})]}):u.jsxs("div",{className:"space-y-6",children:[u.jsx(Rk,{peers:r,routes:c}),u.jsxs(At,{className:"bg-card/80 border-border/50",children:[u.jsxs(Yt,{children:[u.jsxs(Xt,{className:"text-sm font-medium text-muted-foreground",children:["Connected Peers (",r.length,")"]}),u.jsx(vm,{children:u.jsx(Ze,{variant:"ghost",size:"icon",onClick:l,"aria-label":"Refresh peers",className:"h-8 w-8",children:u.jsx(yu,{className:"h-4 w-4"})})})]}),u.jsx(Dt,{children:r.length===0?u.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No peers connected"}):u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(v=>u.jsx(Ik,{peer:v,id:`peer-card-${v.petname||v.peerId}`},v.peerId))})})]}),u.jsxs(At,{className:"bg-card/80 border-border/50",children:[u.jsxs(Yt,{children:[u.jsxs(Xt,{className:"text-sm font-medium text-muted-foreground",children:["Routing Table (",c.length," entries)"]}),u.jsx(vm,{children:u.jsx(Ze,{variant:"ghost",size:"icon",onClick:f,"aria-label":"Refresh routes",className:"h-8 w-8",children:u.jsx(yu,{className:"h-4 w-4"})})})]}),u.jsx(Dt,{children:u.jsx(Lk,{routes:c,onPeerClick:g})})]})]})});function jm(t){const r=Ok(t),o=y.forwardRef((i,l)=>{const{children:c,...d}=i,f=y.Children.toArray(c),h=f.find($k);if(h){const g=h.props.children,v=f.map(x=>x===h?y.Children.count(g)>1?y.Children.only(null):y.isValidElement(g)?g.props.children:null:x);return u.jsx(r,{...d,ref:l,children:y.isValidElement(g)?y.cloneElement(g,void 0,v):null})}return u.jsx(r,{...d,ref:l,children:c})});return o.displayName=`${t}.Slot`,o}function Ok(t){const r=y.forwardRef((o,i)=>{const{children:l,...c}=o;if(y.isValidElement(l)){const d=Bk(l),f=Fk(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Ts(i,d):d),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Dk=Symbol("radix.slottable");function $k(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Dk}function Fk(t,r){const o={...r};for(const i in r){const l=t[i],c=r[i];/^on[A-Z]/.test(i)?l&&c?o[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(o[i]=l):i==="style"?o[i]={...l,...c}:i==="className"&&(o[i]=[l,c].filter(Boolean).join(" "))}return{...t,...o}}function Bk(t){var i,l;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}function zk(t){const r=t+"CollectionProvider",[o,i]=Eo(r),[l,c]=o(r,{collectionRef:{current:null},itemMap:new Map}),d=b=>{const{scope:N,children:S}=b,A=bn.useRef(null),_=bn.useRef(new Map).current;return u.jsx(l,{scope:N,itemMap:_,collectionRef:A,children:S})};d.displayName=r;const f=t+"CollectionSlot",h=jm(f),g=bn.forwardRef((b,N)=>{const{scope:S,children:A}=b,_=c(f,S),I=wt(N,_.collectionRef);return u.jsx(h,{ref:I,children:A})});g.displayName=f;const v=t+"CollectionItemSlot",x="data-radix-collection-item",w=jm(v),C=bn.forwardRef((b,N)=>{const{scope:S,children:A,..._}=b,I=bn.useRef(null),O=wt(N,I),U=c(v,S);return bn.useEffect(()=>(U.itemMap.set(I,{ref:I,..._}),()=>void U.itemMap.delete(I))),u.jsx(w,{[x]:"",ref:O,children:A})});C.displayName=v;function k(b){const N=c(t+"CollectionConsumer",b);return bn.useCallback(()=>{const A=N.collectionRef.current;if(!A)return[];const _=Array.from(A.querySelectorAll(`[${x}]`));return Array.from(N.itemMap.values()).sort((U,M)=>_.indexOf(U.ref.current)-_.indexOf(M.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:d,Slot:g,ItemSlot:C},k,i]}var Uk=y.createContext(void 0);function R0(t){const r=y.useContext(Uk);return t||r||"ltr"}var qc="rovingFocusGroup.onEntryFocus",Hk={bubbles:!1,cancelable:!0},Is="RovingFocusGroup",[Tu,I0,Vk]=zk(Is),[Wk,L0]=Eo(Is,[Vk]),[Kk,Gk]=Wk(Is),M0=y.forwardRef((t,r)=>u.jsx(Tu.Provider,{scope:t.__scopeRovingFocusGroup,children:u.jsx(Tu.Slot,{scope:t.__scopeRovingFocusGroup,children:u.jsx(Yk,{...t,ref:r})})}));M0.displayName=Is;var Yk=y.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:l=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:v=!1,...x}=t,w=y.useRef(null),C=wt(r,w),k=R0(c),[b,N]=Ol({prop:d,defaultProp:f??null,onChange:h,caller:Is}),[S,A]=y.useState(!1),_=Sr(g),I=I0(o),O=y.useRef(!1),[U,M]=y.useState(0);return y.useEffect(()=>{const D=w.current;if(D)return D.addEventListener(qc,_),()=>D.removeEventListener(qc,_)},[_]),u.jsx(Kk,{scope:o,orientation:i,dir:k,loop:l,currentTabStopId:b,onItemFocus:y.useCallback(D=>N(D),[N]),onItemShiftTab:y.useCallback(()=>A(!0),[]),onFocusableItemAdd:y.useCallback(()=>M(D=>D+1),[]),onFocusableItemRemove:y.useCallback(()=>M(D=>D-1),[]),children:u.jsx(He.div,{tabIndex:S||U===0?-1:0,"data-orientation":i,...x,ref:C,style:{outline:"none",...t.style},onMouseDown:Me(t.onMouseDown,()=>{O.current=!0}),onFocus:Me(t.onFocus,D=>{const X=!O.current;if(D.target===D.currentTarget&&X&&!S){const V=new CustomEvent(qc,Hk);if(D.currentTarget.dispatchEvent(V),!V.defaultPrevented){const H=I().filter(G=>G.focusable),F=H.find(G=>G.active),Y=H.find(G=>G.id===b),W=[F,Y,...H].filter(Boolean).map(G=>G.ref.current);$0(W,v)}}O.current=!1}),onBlur:Me(t.onBlur,()=>A(!1))})})}),O0="RovingFocusGroupItem",D0=y.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:l=!1,tabStopId:c,children:d,...f}=t,h=fo(),g=c||h,v=Gk(O0,o),x=v.currentTabStopId===g,w=I0(o),{onFocusableItemAdd:C,onFocusableItemRemove:k,currentTabStopId:b}=v;return y.useEffect(()=>{if(i)return C(),()=>k()},[i,C,k]),u.jsx(Tu.ItemSlot,{scope:o,id:g,focusable:i,active:l,children:u.jsx(He.span,{tabIndex:x?0:-1,"data-orientation":v.orientation,...f,ref:r,onMouseDown:Me(t.onMouseDown,N=>{i?v.onItemFocus(g):N.preventDefault()}),onFocus:Me(t.onFocus,()=>v.onItemFocus(g)),onKeyDown:Me(t.onKeyDown,N=>{if(N.key==="Tab"&&N.shiftKey){v.onItemShiftTab();return}if(N.target!==N.currentTarget)return;const S=Qk(N,v.orientation,v.dir);if(S!==void 0){if(N.metaKey||N.ctrlKey||N.altKey||N.shiftKey)return;N.preventDefault();let _=w().filter(I=>I.focusable).map(I=>I.ref.current);if(S==="last")_.reverse();else if(S==="prev"||S==="next"){S==="prev"&&_.reverse();const I=_.indexOf(N.currentTarget);_=v.loop?Zk(_,I+1):_.slice(I+1)}setTimeout(()=>$0(_))}}),children:typeof d=="function"?d({isCurrentTabStop:x,hasTabStop:b!=null}):d})})});D0.displayName=O0;var Xk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qk(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Qk(t,r,o){const i=qk(t.key,o);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Xk[i]}function $0(t,r=!1){const o=document.activeElement;for(const i of t)if(i===o||(i.focus({preventScroll:r}),document.activeElement!==o))return}function Zk(t,r){return t.map((o,i)=>t[(r+i)%t.length])}var Jk=M0,eS=D0,Fl="Tabs",[tS]=Eo(Fl,[L0]),F0=L0(),[nS,md]=tS(Fl),B0=y.forwardRef((t,r)=>{const{__scopeTabs:o,value:i,onValueChange:l,defaultValue:c,orientation:d="horizontal",dir:f,activationMode:h="automatic",...g}=t,v=R0(f),[x,w]=Ol({prop:i,onChange:l,defaultProp:c??"",caller:Fl});return u.jsx(nS,{scope:o,baseId:fo(),value:x,onValueChange:w,orientation:d,dir:v,activationMode:h,children:u.jsx(He.div,{dir:v,"data-orientation":d,...g,ref:r})})});B0.displayName=Fl;var z0="TabsList",U0=y.forwardRef((t,r)=>{const{__scopeTabs:o,loop:i=!0,...l}=t,c=md(z0,o),d=F0(o);return u.jsx(Jk,{asChild:!0,...d,orientation:c.orientation,dir:c.dir,loop:i,children:u.jsx(He.div,{role:"tablist","aria-orientation":c.orientation,...l,ref:r})})});U0.displayName=z0;var H0="TabsTrigger",V0=y.forwardRef((t,r)=>{const{__scopeTabs:o,value:i,disabled:l=!1,...c}=t,d=md(H0,o),f=F0(o),h=G0(d.baseId,i),g=Y0(d.baseId,i),v=i===d.value;return u.jsx(eS,{asChild:!0,...f,focusable:!l,active:v,children:u.jsx(He.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":g,"data-state":v?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:h,...c,ref:r,onMouseDown:Me(t.onMouseDown,x=>{!l&&x.button===0&&x.ctrlKey===!1?d.onValueChange(i):x.preventDefault()}),onKeyDown:Me(t.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&d.onValueChange(i)}),onFocus:Me(t.onFocus,()=>{const x=d.activationMode!=="manual";!v&&!l&&x&&d.onValueChange(i)})})})});V0.displayName=H0;var W0="TabsContent",K0=y.forwardRef((t,r)=>{const{__scopeTabs:o,value:i,forceMount:l,children:c,...d}=t,f=md(W0,o),h=G0(f.baseId,i),g=Y0(f.baseId,i),v=i===f.value,x=y.useRef(v);return y.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),u.jsx(Ir,{present:l||v,children:({present:w})=>u.jsx(He.div,{"data-state":v?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":h,hidden:!w,id:g,tabIndex:0,...d,ref:r,style:{...t.style,animationDuration:x.current?"0s":void 0},children:w&&c})})});K0.displayName=W0;function G0(t,r){return`${t}-trigger-${r}`}function Y0(t,r){return`${t}-content-${r}`}var rS=B0,oS=U0,sS=V0,iS=K0;function lS({className:t,orientation:r="horizontal",...o}){return u.jsx(rS,{"data-slot":"tabs","data-orientation":r,orientation:r,className:ye("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",t),...o})}const aS=Gu("rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function cS({className:t,variant:r="default",...o}){return u.jsx(oS,{"data-slot":"tabs-list","data-variant":r,className:ye(aS({variant:r}),t),...o})}function ms({className:t,...r}){return u.jsx(sS,{"data-slot":"tabs-trigger",className:ye('focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4',"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",t),...r})}function hT({className:t,...r}){return u.jsx(iS,{"data-slot":"tabs-content",className:ye("flex-1 outline-none",t),...r})}var Qc="focusScope.autoFocusOnMount",Zc="focusScope.autoFocusOnUnmount",Am={bubbles:!1,cancelable:!0},uS="FocusScope",X0=y.forwardRef((t,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...d}=t,[f,h]=y.useState(null),g=Sr(l),v=Sr(c),x=y.useRef(null),w=wt(r,b=>h(b)),C=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let b=function(_){if(C.paused||!f)return;const I=_.target;f.contains(I)?x.current=I:Jn(x.current,{select:!0})},N=function(_){if(C.paused||!f)return;const I=_.relatedTarget;I!==null&&(f.contains(I)||Jn(x.current,{select:!0}))},S=function(_){if(document.activeElement===document.body)for(const O of _)O.removedNodes.length>0&&Jn(f)};document.addEventListener("focusin",b),document.addEventListener("focusout",N);const A=new MutationObserver(S);return f&&A.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",N),A.disconnect()}}},[i,f,C.paused]),y.useEffect(()=>{if(f){_m.add(C);const b=document.activeElement;if(!f.contains(b)){const S=new CustomEvent(Qc,Am);f.addEventListener(Qc,g),f.dispatchEvent(S),S.defaultPrevented||(dS(gS(q0(f)),{select:!0}),document.activeElement===b&&Jn(f))}return()=>{f.removeEventListener(Qc,g),setTimeout(()=>{const S=new CustomEvent(Zc,Am);f.addEventListener(Zc,v),f.dispatchEvent(S),S.defaultPrevented||Jn(b??document.body,{select:!0}),f.removeEventListener(Zc,v),_m.remove(C)},0)}}},[f,g,v,C]);const k=y.useCallback(b=>{if(!o&&!i||C.paused)return;const N=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,S=document.activeElement;if(N&&S){const A=b.currentTarget,[_,I]=fS(A);_&&I?!b.shiftKey&&S===I?(b.preventDefault(),o&&Jn(_,{select:!0})):b.shiftKey&&S===_&&(b.preventDefault(),o&&Jn(I,{select:!0})):S===A&&b.preventDefault()}},[o,i,C.paused]);return u.jsx(He.div,{tabIndex:-1,...d,ref:w,onKeyDown:k})});X0.displayName=uS;function dS(t,{select:r=!1}={}){const o=document.activeElement;for(const i of t)if(Jn(i,{select:r}),document.activeElement!==o)return}function fS(t){const r=q0(t),o=Tm(r,t),i=Tm(r.reverse(),t);return[o,i]}function q0(t){const r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const l=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||l?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function Tm(t,r){for(const o of t)if(!pS(o,{upTo:r}))return o}function pS(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function hS(t){return t instanceof HTMLInputElement&&"select"in t}function Jn(t,{select:r=!1}={}){if(t&&t.focus){const o=document.activeElement;t.focus({preventScroll:!0}),t!==o&&hS(t)&&r&&t.select()}}var _m=mS();function mS(){let t=[];return{add(r){const o=t[0];r!==o&&(o==null||o.pause()),t=Pm(t,r),t.unshift(r)},remove(r){var o;t=Pm(t,r),(o=t[0])==null||o.resume()}}}function Pm(t,r){const o=[...t],i=o.indexOf(r);return i!==-1&&o.splice(i,1),o}function gS(t){return t.filter(r=>r.tagName!=="A")}var Jc=0;function xS(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Rm()),document.body.insertAdjacentElement("beforeend",t[1]??Rm()),Jc++,()=>{Jc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Jc--}},[])}function Rm(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var sn=function(){return sn=Object.assign||function(r){for(var o,i=1,l=arguments.length;i<l;i++){o=arguments[i];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(r[c]=o[c])}return r},sn.apply(this,arguments)};function Q0(t,r){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(o[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(t);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(t,i[l])&&(o[i[l]]=t[i[l]]);return o}function vS(t,r,o){if(o||arguments.length===2)for(var i=0,l=r.length,c;i<l;i++)(c||!(i in r))&&(c||(c=Array.prototype.slice.call(r,0,i)),c[i]=r[i]);return t.concat(c||Array.prototype.slice.call(r))}var al="right-scroll-bar-position",cl="width-before-scroll-bar",yS="with-scroll-bars-hidden",wS="--removed-body-scroll-bar-size";function eu(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function bS(t,r){var o=y.useState(function(){return{value:t,callback:r,facade:{get current(){return o.value},set current(i){var l=o.value;l!==i&&(o.value=i,o.callback(i,l))}}}})[0];return o.callback=r,o.facade}var ES=typeof window<"u"?y.useLayoutEffect:y.useEffect,Im=new WeakMap;function NS(t,r){var o=bS(null,function(i){return t.forEach(function(l){return eu(l,i)})});return ES(function(){var i=Im.get(o);if(i){var l=new Set(i),c=new Set(t),d=o.current;l.forEach(function(f){c.has(f)||eu(f,null)}),c.forEach(function(f){l.has(f)||eu(f,d)})}Im.set(o,t)},[t]),o}function CS(t){return t}function kS(t,r){r===void 0&&(r=CS);var o=[],i=!1,l={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:t},useMedium:function(c){var d=r(c,i);return o.push(d),function(){o=o.filter(function(f){return f!==d})}},assignSyncMedium:function(c){for(i=!0;o.length;){var d=o;o=[],d.forEach(c)}o={push:function(f){return c(f)},filter:function(){return o}}},assignMedium:function(c){i=!0;var d=[];if(o.length){var f=o;o=[],f.forEach(c),d=o}var h=function(){var v=d;d=[],v.forEach(c)},g=function(){return Promise.resolve().then(h)};g(),o={push:function(v){d.push(v),g()},filter:function(v){return d=d.filter(v),o}}}};return l}function SS(t){t===void 0&&(t={});var r=kS(null);return r.options=sn({async:!0,ssr:!1},t),r}var Z0=function(t){var r=t.sideCar,o=Q0(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,sn({},o))};Z0.isSideCarExport=!0;function jS(t,r){return t.useMedium(r),Z0}var J0=SS(),tu=function(){},Bl=y.forwardRef(function(t,r){var o=y.useRef(null),i=y.useState({onScrollCapture:tu,onWheelCapture:tu,onTouchMoveCapture:tu}),l=i[0],c=i[1],d=t.forwardProps,f=t.children,h=t.className,g=t.removeScrollBar,v=t.enabled,x=t.shards,w=t.sideCar,C=t.noRelative,k=t.noIsolation,b=t.inert,N=t.allowPinchZoom,S=t.as,A=S===void 0?"div":S,_=t.gapMode,I=Q0(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=w,U=NS([o,r]),M=sn(sn({},I),l);return y.createElement(y.Fragment,null,v&&y.createElement(O,{sideCar:J0,removeScrollBar:g,shards:x,noRelative:C,noIsolation:k,inert:b,setCallbacks:c,allowPinchZoom:!!N,lockRef:o,gapMode:_}),d?y.cloneElement(y.Children.only(f),sn(sn({},M),{ref:U})):y.createElement(A,sn({},M,{className:h,ref:U}),f))});Bl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bl.classNames={fullWidth:cl,zeroRight:al};var AS=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function TS(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=AS();return r&&t.setAttribute("nonce",r),t}function _S(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function PS(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var RS=function(){var t=0,r=null;return{add:function(o){t==0&&(r=TS())&&(_S(r,o),PS(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},IS=function(){var t=RS();return function(r,o){y.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&o])}},ex=function(){var t=IS(),r=function(o){var i=o.styles,l=o.dynamic;return t(i,l),null};return r},LS={left:0,top:0,right:0,gap:0},nu=function(t){return parseInt(t||"",10)||0},MS=function(t){var r=window.getComputedStyle(document.body),o=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],l=r[t==="padding"?"paddingRight":"marginRight"];return[nu(o),nu(i),nu(l)]},OS=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return LS;var r=MS(t),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-o+r[2]-r[0])}},DS=ex(),mo="data-scroll-locked",$S=function(t,r,o,i){var l=t.left,c=t.top,d=t.right,f=t.gap;return o===void 0&&(o="margin"),`
317
+ .`.concat(yS,` {
318
+ overflow: hidden `).concat(i,`;
319
+ padding-right: `).concat(f,"px ").concat(i,`;
320
+ }
321
+ body[`).concat(mo,`] {
322
+ overflow: hidden `).concat(i,`;
323
+ overscroll-behavior: contain;
324
+ `).concat([r&&"position: relative ".concat(i,";"),o==="margin"&&`
325
+ padding-left: `.concat(l,`px;
326
+ padding-top: `).concat(c,`px;
327
+ padding-right: `).concat(d,`px;
328
+ margin-left:0;
329
+ margin-top:0;
330
+ margin-right: `).concat(f,"px ").concat(i,`;
331
+ `),o==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
332
+ }
333
+
334
+ .`).concat(al,` {
335
+ right: `).concat(f,"px ").concat(i,`;
336
+ }
337
+
338
+ .`).concat(cl,` {
339
+ margin-right: `).concat(f,"px ").concat(i,`;
340
+ }
341
+
342
+ .`).concat(al," .").concat(al,` {
343
+ right: 0 `).concat(i,`;
344
+ }
345
+
346
+ .`).concat(cl," .").concat(cl,` {
347
+ margin-right: 0 `).concat(i,`;
348
+ }
349
+
350
+ body[`).concat(mo,`] {
351
+ `).concat(wS,": ").concat(f,`px;
352
+ }
353
+ `)},Lm=function(){var t=parseInt(document.body.getAttribute(mo)||"0",10);return isFinite(t)?t:0},FS=function(){y.useEffect(function(){return document.body.setAttribute(mo,(Lm()+1).toString()),function(){var t=Lm()-1;t<=0?document.body.removeAttribute(mo):document.body.setAttribute(mo,t.toString())}},[])},BS=function(t){var r=t.noRelative,o=t.noImportant,i=t.gapMode,l=i===void 0?"margin":i;FS();var c=y.useMemo(function(){return OS(l)},[l]);return y.createElement(DS,{styles:$S(c,!r,l,o?"":"!important")})},_u=!1;if(typeof window<"u")try{var Zi=Object.defineProperty({},"passive",{get:function(){return _u=!0,!0}});window.addEventListener("test",Zi,Zi),window.removeEventListener("test",Zi,Zi)}catch{_u=!1}var lo=_u?{passive:!1}:!1,zS=function(t){return t.tagName==="TEXTAREA"},tx=function(t,r){if(!(t instanceof Element))return!1;var o=window.getComputedStyle(t);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!zS(t)&&o[r]==="visible")},US=function(t){return tx(t,"overflowY")},HS=function(t){return tx(t,"overflowX")},Mm=function(t,r){var o=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var l=nx(t,i);if(l){var c=rx(t,i),d=c[1],f=c[2];if(d>f)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},VS=function(t){var r=t.scrollTop,o=t.scrollHeight,i=t.clientHeight;return[r,o,i]},WS=function(t){var r=t.scrollLeft,o=t.scrollWidth,i=t.clientWidth;return[r,o,i]},nx=function(t,r){return t==="v"?US(r):HS(r)},rx=function(t,r){return t==="v"?VS(r):WS(r)},KS=function(t,r){return t==="h"&&r==="rtl"?-1:1},GS=function(t,r,o,i,l){var c=KS(t,window.getComputedStyle(r).direction),d=c*i,f=o.target,h=r.contains(f),g=!1,v=d>0,x=0,w=0;do{if(!f)break;var C=rx(t,f),k=C[0],b=C[1],N=C[2],S=b-N-c*k;(k||S)&&nx(t,f)&&(x+=S,w+=k);var A=f.parentNode;f=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!h&&f!==document.body||h&&(r.contains(f)||r===f));return(v&&Math.abs(x)<1||!v&&Math.abs(w)<1)&&(g=!0),g},Ji=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Om=function(t){return[t.deltaX,t.deltaY]},Dm=function(t){return t&&"current"in t?t.current:t},YS=function(t,r){return t[0]===r[0]&&t[1]===r[1]},XS=function(t){return`
354
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
355
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
356
+ `)},qS=0,ao=[];function QS(t){var r=y.useRef([]),o=y.useRef([0,0]),i=y.useRef(),l=y.useState(qS++)[0],c=y.useState(ex)[0],d=y.useRef(t);y.useEffect(function(){d.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(l));var b=vS([t.lockRef.current],(t.shards||[]).map(Dm),!0).filter(Boolean);return b.forEach(function(N){return N.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),b.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(l))})}}},[t.inert,t.lockRef.current,t.shards]);var f=y.useCallback(function(b,N){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!d.current.allowPinchZoom;var S=Ji(b),A=o.current,_="deltaX"in b?b.deltaX:A[0]-S[0],I="deltaY"in b?b.deltaY:A[1]-S[1],O,U=b.target,M=Math.abs(_)>Math.abs(I)?"h":"v";if("touches"in b&&M==="h"&&U.type==="range")return!1;var D=window.getSelection(),X=D&&D.anchorNode,V=X?X===U||X.contains(U):!1;if(V)return!1;var H=Mm(M,U);if(!H)return!0;if(H?O=M:(O=M==="v"?"h":"v",H=Mm(M,U)),!H)return!1;if(!i.current&&"changedTouches"in b&&(_||I)&&(i.current=O),!O)return!0;var F=i.current||O;return GS(F,N,b,F==="h"?_:I)},[]),h=y.useCallback(function(b){var N=b;if(!(!ao.length||ao[ao.length-1]!==c)){var S="deltaY"in N?Om(N):Ji(N),A=r.current.filter(function(O){return O.name===N.type&&(O.target===N.target||N.target===O.shadowParent)&&YS(O.delta,S)})[0];if(A&&A.should){N.cancelable&&N.preventDefault();return}if(!A){var _=(d.current.shards||[]).map(Dm).filter(Boolean).filter(function(O){return O.contains(N.target)}),I=_.length>0?f(N,_[0]):!d.current.noIsolation;I&&N.cancelable&&N.preventDefault()}}},[]),g=y.useCallback(function(b,N,S,A){var _={name:b,delta:N,target:S,should:A,shadowParent:ZS(S)};r.current.push(_),setTimeout(function(){r.current=r.current.filter(function(I){return I!==_})},1)},[]),v=y.useCallback(function(b){o.current=Ji(b),i.current=void 0},[]),x=y.useCallback(function(b){g(b.type,Om(b),b.target,f(b,t.lockRef.current))},[]),w=y.useCallback(function(b){g(b.type,Ji(b),b.target,f(b,t.lockRef.current))},[]);y.useEffect(function(){return ao.push(c),t.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:w}),document.addEventListener("wheel",h,lo),document.addEventListener("touchmove",h,lo),document.addEventListener("touchstart",v,lo),function(){ao=ao.filter(function(b){return b!==c}),document.removeEventListener("wheel",h,lo),document.removeEventListener("touchmove",h,lo),document.removeEventListener("touchstart",v,lo)}},[]);var C=t.removeScrollBar,k=t.inert;return y.createElement(y.Fragment,null,k?y.createElement(c,{styles:XS(l)}):null,C?y.createElement(BS,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function ZS(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const JS=jS(J0,QS);var ox=y.forwardRef(function(t,r){return y.createElement(Bl,sn({},t,{ref:r,sideCar:JS}))});ox.classNames=Bl.classNames;var ej=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},co=new WeakMap,el=new WeakMap,tl={},ru=0,sx=function(t){return t&&(t.host||sx(t.parentNode))},tj=function(t,r){return r.map(function(o){if(t.contains(o))return o;var i=sx(o);return i&&t.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",t,". Doing nothing"),null)}).filter(function(o){return!!o})},nj=function(t,r,o,i){var l=tj(r,Array.isArray(t)?t:[t]);tl[o]||(tl[o]=new WeakMap);var c=tl[o],d=[],f=new Set,h=new Set(l),g=function(x){!x||f.has(x)||(f.add(x),g(x.parentNode))};l.forEach(g);var v=function(x){!x||h.has(x)||Array.prototype.forEach.call(x.children,function(w){if(f.has(w))v(w);else try{var C=w.getAttribute(i),k=C!==null&&C!=="false",b=(co.get(w)||0)+1,N=(c.get(w)||0)+1;co.set(w,b),c.set(w,N),d.push(w),b===1&&k&&el.set(w,!0),N===1&&w.setAttribute(o,"true"),k||w.setAttribute(i,"true")}catch(S){console.error("aria-hidden: cannot operate on ",w,S)}})};return v(r),f.clear(),ru++,function(){d.forEach(function(x){var w=co.get(x)-1,C=c.get(x)-1;co.set(x,w),c.set(x,C),w||(el.has(x)||x.removeAttribute(i),el.delete(x)),C||x.removeAttribute(o)}),ru--,ru||(co=new WeakMap,co=new WeakMap,el=new WeakMap,tl={})}},rj=function(t,r,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),l=ej(t);return l?(i.push.apply(i,Array.from(l.querySelectorAll("[aria-live], script"))),nj(i,l,o,"aria-hidden")):function(){return null}};function oj(t){const r=sj(t),o=y.forwardRef((i,l)=>{const{children:c,...d}=i,f=y.Children.toArray(c),h=f.find(lj);if(h){const g=h.props.children,v=f.map(x=>x===h?y.Children.count(g)>1?y.Children.only(null):y.isValidElement(g)?g.props.children:null:x);return u.jsx(r,{...d,ref:l,children:y.isValidElement(g)?y.cloneElement(g,void 0,v):null})}return u.jsx(r,{...d,ref:l,children:c})});return o.displayName=`${t}.Slot`,o}function sj(t){const r=y.forwardRef((o,i)=>{const{children:l,...c}=o;if(y.isValidElement(l)){const d=cj(l),f=aj(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Ts(i,d):d),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var ij=Symbol("radix.slottable");function lj(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===ij}function aj(t,r){const o={...r};for(const i in r){const l=t[i],c=r[i];/^on[A-Z]/.test(i)?l&&c?o[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(o[i]=l):i==="style"?o[i]={...l,...c}:i==="className"&&(o[i]=[l,c].filter(Boolean).join(" "))}return{...t,...o}}function cj(t){var i,l;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var zl="Dialog",[ix]=Eo(zl),[uj,qt]=ix(zl),lx=t=>{const{__scopeDialog:r,children:o,open:i,defaultOpen:l,onOpenChange:c,modal:d=!0}=t,f=y.useRef(null),h=y.useRef(null),[g,v]=Ol({prop:i,defaultProp:l??!1,onChange:c,caller:zl});return u.jsx(uj,{scope:r,triggerRef:f,contentRef:h,contentId:fo(),titleId:fo(),descriptionId:fo(),open:g,onOpenChange:v,onOpenToggle:y.useCallback(()=>v(x=>!x),[v]),modal:d,children:o})};lx.displayName=zl;var ax="DialogTrigger",dj=y.forwardRef((t,r)=>{const{__scopeDialog:o,...i}=t,l=qt(ax,o),c=wt(r,l.triggerRef);return u.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":vd(l.open),...i,ref:c,onClick:Me(t.onClick,l.onOpenToggle)})});dj.displayName=ax;var gd="DialogPortal",[fj,cx]=ix(gd,{forceMount:void 0}),ux=t=>{const{__scopeDialog:r,forceMount:o,children:i,container:l}=t,c=qt(gd,r);return u.jsx(fj,{scope:r,forceMount:o,children:y.Children.map(i,d=>u.jsx(Ir,{present:o||c.open,children:u.jsx(ud,{asChild:!0,container:l,children:d})}))})};ux.displayName=gd;var yl="DialogOverlay",dx=y.forwardRef((t,r)=>{const o=cx(yl,t.__scopeDialog),{forceMount:i=o.forceMount,...l}=t,c=qt(yl,t.__scopeDialog);return c.modal?u.jsx(Ir,{present:i||c.open,children:u.jsx(hj,{...l,ref:r})}):null});dx.displayName=yl;var pj=oj("DialogOverlay.RemoveScroll"),hj=y.forwardRef((t,r)=>{const{__scopeDialog:o,...i}=t,l=qt(yl,o);return u.jsx(ox,{as:pj,allowPinchZoom:!0,shards:[l.contentRef],children:u.jsx(He.div,{"data-state":vd(l.open),...i,ref:r,style:{pointerEvents:"auto",...i.style}})})}),Tr="DialogContent",fx=y.forwardRef((t,r)=>{const o=cx(Tr,t.__scopeDialog),{forceMount:i=o.forceMount,...l}=t,c=qt(Tr,t.__scopeDialog);return u.jsx(Ir,{present:i||c.open,children:c.modal?u.jsx(mj,{...l,ref:r}):u.jsx(gj,{...l,ref:r})})});fx.displayName=Tr;var mj=y.forwardRef((t,r)=>{const o=qt(Tr,t.__scopeDialog),i=y.useRef(null),l=wt(r,o.contentRef,i);return y.useEffect(()=>{const c=i.current;if(c)return rj(c)},[]),u.jsx(px,{...t,ref:l,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Me(t.onCloseAutoFocus,c=>{var d;c.preventDefault(),(d=o.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Me(t.onPointerDownOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0;(d.button===2||f)&&c.preventDefault()}),onFocusOutside:Me(t.onFocusOutside,c=>c.preventDefault())})}),gj=y.forwardRef((t,r)=>{const o=qt(Tr,t.__scopeDialog),i=y.useRef(!1),l=y.useRef(!1);return u.jsx(px,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var d,f;(d=t.onCloseAutoFocus)==null||d.call(t,c),c.defaultPrevented||(i.current||(f=o.triggerRef.current)==null||f.focus(),c.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:c=>{var h,g;(h=t.onInteractOutside)==null||h.call(t,c),c.defaultPrevented||(i.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=c.target;((g=o.triggerRef.current)==null?void 0:g.contains(d))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})}),px=y.forwardRef((t,r)=>{const{__scopeDialog:o,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:c,...d}=t,f=qt(Tr,o),h=y.useRef(null),g=wt(r,h);return xS(),u.jsxs(u.Fragment,{children:[u.jsx(X0,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:c,children:u.jsx(td,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":vd(f.open),...d,ref:g,onDismiss:()=>f.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(xj,{titleId:f.titleId}),u.jsx(yj,{contentRef:h,descriptionId:f.descriptionId})]})]})}),xd="DialogTitle",hx=y.forwardRef((t,r)=>{const{__scopeDialog:o,...i}=t,l=qt(xd,o);return u.jsx(He.h2,{id:l.titleId,...i,ref:r})});hx.displayName=xd;var mx="DialogDescription",gx=y.forwardRef((t,r)=>{const{__scopeDialog:o,...i}=t,l=qt(mx,o);return u.jsx(He.p,{id:l.descriptionId,...i,ref:r})});gx.displayName=mx;var xx="DialogClose",vx=y.forwardRef((t,r)=>{const{__scopeDialog:o,...i}=t,l=qt(xx,o);return u.jsx(He.button,{type:"button",...i,ref:r,onClick:Me(t.onClick,()=>l.onOpenChange(!1))})});vx.displayName=xx;function vd(t){return t?"open":"closed"}var yx="DialogTitleWarning",[mT,wx]=XE(yx,{contentName:Tr,titleName:xd,docsSlug:"dialog"}),xj=({titleId:t})=>{const r=wx(yx),o=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
357
+
358
+ If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
359
+
360
+ For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(o))},[o,t]),null},vj="DialogDescriptionWarning",yj=({contentRef:t,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wx(vj).contentName}}.`;return y.useEffect(()=>{var c;const l=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");r&&l&&(document.getElementById(r)||console.warn(i))},[i,t,r]),null},wj=lx,bj=ux,Ej=dx,Nj=fx,Cj=hx,kj=gx,Sj=vx;function jj({...t}){return u.jsx(wj,{"data-slot":"dialog",...t})}function Aj({...t}){return u.jsx(bj,{"data-slot":"dialog-portal",...t})}function Tj({className:t,...r}){return u.jsx(Ej,{"data-slot":"dialog-overlay",className:ye("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...r})}function _j({className:t,children:r,...o}){return u.jsxs(Aj,{children:[u.jsx(Tj,{}),u.jsxs(Nj,{"data-slot":"dialog-content",className:ye("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",t),...o,children:[r,u.jsxs(Sj,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[u.jsx(zg,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Pj({className:t,...r}){return u.jsx("div",{"data-slot":"dialog-header",className:ye("flex flex-col gap-2 text-center sm:text-left",t),...r})}function Rj({className:t,...r}){return u.jsx(Cj,{"data-slot":"dialog-title",className:ye("text-lg leading-none font-semibold",t),...r})}function Ij({className:t,...r}){return u.jsx(kj,{"data-slot":"dialog-description",className:ye("text-muted-foreground text-sm",t),...r})}const Lj=[{key:"j / ↓",action:"Move selection down",context:"Events tab"},{key:"k / ↑",action:"Move selection up",context:"Events tab"},{key:"Enter",action:"Open event detail panel",context:"Events tab"},{key:"Escape",action:"Close detail panel",context:"Detail panel open"},{key:"1",action:"Switch to Events tab",context:"Global"},{key:"2",action:"Switch to Accounts tab",context:"Global"},{key:"3",action:"Switch to Peers tab",context:"Global"},{key:"/",action:"Focus search input",context:"Global"},{key:"?",action:"Show this help",context:"Global"}];function Mj({open:t,onOpenChange:r}){return u.jsx(jj,{open:t,onOpenChange:r,children:u.jsxs(_j,{className:"sm:max-w-md",children:[u.jsxs(Pj,{children:[u.jsx(Rj,{children:"Keyboard Shortcuts"}),u.jsx(Ij,{children:"Navigate the Agent Explorer using keyboard shortcuts."})]}),u.jsx("div",{className:"mt-2",children:u.jsxs("table",{className:"w-full text-sm",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"border-b border-border",children:[u.jsx("th",{className:"text-left py-2 pr-4 font-medium text-muted-foreground",children:"Key"}),u.jsx("th",{className:"text-left py-2 pr-4 font-medium text-muted-foreground",children:"Action"}),u.jsx("th",{className:"text-left py-2 font-medium text-muted-foreground",children:"Context"})]})}),u.jsx("tbody",{children:Lj.map(o=>u.jsxs("tr",{className:"border-b border-border/50",children:[u.jsx("td",{className:"py-2 pr-4",children:u.jsx("kbd",{className:"inline-flex items-center px-2 py-0.5 rounded bg-muted text-xs font-mono font-medium",children:o.key})}),u.jsx("td",{className:"py-2 pr-4",children:o.action}),u.jsx("td",{className:"py-2 text-muted-foreground text-xs",children:o.context})]},o.key))})]})})]})})}function $m(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function bx(t,...r){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(r.length>0&&!r.includes(t.length))throw new Error(`Expected Uint8Array of length ${r}, not of length=${t.length}`)}function Oj(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");$m(t.outputLen),$m(t.blockLen)}function wl(t,r=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(r&&t.finished)throw new Error("Hash#digest() has already been called")}function Dj(t,r){bx(t);const o=r.outputLen;if(t.length<o)throw new Error(`digestInto() expects output buffer of length at least ${o}`)}const ou=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ex=t=>t instanceof Uint8Array,su=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),nn=(t,r)=>t<<32-r|t>>>r,$j=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!$j)throw new Error("Non little-endian hardware is not supported");function Fj(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function yd(t){if(typeof t=="string"&&(t=Fj(t)),!Ex(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function Bj(...t){const r=new Uint8Array(t.reduce((i,l)=>i+l.length,0));let o=0;return t.forEach(i=>{if(!Ex(i))throw new Error("Uint8Array expected");r.set(i,o),o+=i.length}),r}let Nx=class{clone(){return this._cloneInto()}};function zj(t){const r=i=>t().update(yd(i)).digest(),o=t();return r.outputLen=o.outputLen,r.blockLen=o.blockLen,r.create=()=>t(),r}function Cx(t=32){if(ou&&typeof ou.getRandomValues=="function")return ou.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}function Uj(t,r,o,i){if(typeof t.setBigUint64=="function")return t.setBigUint64(r,o,i);const l=BigInt(32),c=BigInt(4294967295),d=Number(o>>l&c),f=Number(o&c),h=i?4:0,g=i?0:4;t.setUint32(r+h,d,i),t.setUint32(r+g,f,i)}let Hj=class extends Nx{constructor(r,o,i,l){super(),this.blockLen=r,this.outputLen=o,this.padOffset=i,this.isLE=l,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(r),this.view=su(this.buffer)}update(r){wl(this);const{view:o,buffer:i,blockLen:l}=this;r=yd(r);const c=r.length;for(let d=0;d<c;){const f=Math.min(l-this.pos,c-d);if(f===l){const h=su(r);for(;l<=c-d;d+=l)this.process(h,d);continue}i.set(r.subarray(d,d+f),this.pos),this.pos+=f,d+=f,this.pos===l&&(this.process(o,0),this.pos=0)}return this.length+=r.length,this.roundClean(),this}digestInto(r){wl(this),Dj(r,this),this.finished=!0;const{buffer:o,view:i,blockLen:l,isLE:c}=this;let{pos:d}=this;o[d++]=128,this.buffer.subarray(d).fill(0),this.padOffset>l-d&&(this.process(i,0),d=0);for(let x=d;x<l;x++)o[x]=0;Uj(i,l-8,BigInt(this.length*8),c),this.process(i,0);const f=su(r),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=h/4,v=this.get();if(g>v.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x<g;x++)f.setUint32(4*x,v[x],c)}digest(){const{buffer:r,outputLen:o}=this;this.digestInto(r);const i=r.slice(0,o);return this.destroy(),i}_cloneInto(r){r||(r=new this.constructor),r.set(...this.get());const{blockLen:o,buffer:i,length:l,finished:c,destroyed:d,pos:f}=this;return r.length=l,r.pos=f,r.finished=c,r.destroyed=d,l%o&&r.buffer.set(i),r}};const Vj=(t,r,o)=>t&r^~t&o,Wj=(t,r,o)=>t&r^t&o^r&o,Kj=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Xn=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),qn=new Uint32Array(64);let Gj=class extends Hj{constructor(){super(64,32,8,!1),this.A=Xn[0]|0,this.B=Xn[1]|0,this.C=Xn[2]|0,this.D=Xn[3]|0,this.E=Xn[4]|0,this.F=Xn[5]|0,this.G=Xn[6]|0,this.H=Xn[7]|0}get(){const{A:r,B:o,C:i,D:l,E:c,F:d,G:f,H:h}=this;return[r,o,i,l,c,d,f,h]}set(r,o,i,l,c,d,f,h){this.A=r|0,this.B=o|0,this.C=i|0,this.D=l|0,this.E=c|0,this.F=d|0,this.G=f|0,this.H=h|0}process(r,o){for(let x=0;x<16;x++,o+=4)qn[x]=r.getUint32(o,!1);for(let x=16;x<64;x++){const w=qn[x-15],C=qn[x-2],k=nn(w,7)^nn(w,18)^w>>>3,b=nn(C,17)^nn(C,19)^C>>>10;qn[x]=b+qn[x-7]+k+qn[x-16]|0}let{A:i,B:l,C:c,D:d,E:f,F:h,G:g,H:v}=this;for(let x=0;x<64;x++){const w=nn(f,6)^nn(f,11)^nn(f,25),C=v+w+Vj(f,h,g)+Kj[x]+qn[x]|0,b=(nn(i,2)^nn(i,13)^nn(i,22))+Wj(i,l,c)|0;v=g,g=h,h=f,f=d+C|0,d=c,c=l,l=i,i=C+b|0}i=i+this.A|0,l=l+this.B|0,c=c+this.C|0,d=d+this.D|0,f=f+this.E|0,h=h+this.F|0,g=g+this.G|0,v=v+this.H|0,this.set(i,l,c,d,f,h,g,v)}roundClean(){qn.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Pu=zj(()=>new Gj);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Yj=BigInt(1),Xj=BigInt(2),Ul=t=>t instanceof Uint8Array,qj=Array.from({length:256},(t,r)=>r.toString(16).padStart(2,"0"));function vo(t){if(!Ul(t))throw new Error("Uint8Array expected");let r="";for(let o=0;o<t.length;o++)r+=qj[t[o]];return r}function wd(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function Ss(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const r=t.length;if(r%2)throw new Error("padded hex string expected, got unpadded hex of length "+r);const o=new Uint8Array(r/2);for(let i=0;i<o.length;i++){const l=i*2,c=t.slice(l,l+2),d=Number.parseInt(c,16);if(Number.isNaN(d)||d<0)throw new Error("Invalid byte sequence");o[i]=d}return o}function yt(t){return wd(vo(t))}function bd(t){if(!Ul(t))throw new Error("Uint8Array expected");return wd(vo(Uint8Array.from(t).reverse()))}function ir(t,r){return Ss(t.toString(16).padStart(r*2,"0"))}function Ed(t,r){return ir(t,r).reverse()}function ct(t,r,o){let i;if(typeof r=="string")try{i=Ss(r)}catch(c){throw new Error(`${t} must be valid hex string, got "${r}". Cause: ${c}`)}else if(Ul(r))i=Uint8Array.from(r);else throw new Error(`${t} must be hex string or Uint8Array`);const l=i.length;if(typeof o=="number"&&l!==o)throw new Error(`${t} expected ${o} bytes, got ${l}`);return i}function _r(...t){const r=new Uint8Array(t.reduce((i,l)=>i+l.length,0));let o=0;return t.forEach(i=>{if(!Ul(i))throw new Error("Uint8Array expected");r.set(i,o),o+=i.length}),r}const Nd=t=>(Xj<<BigInt(t-1))-Yj,iu=t=>new Uint8Array(t),Fm=t=>Uint8Array.from(t);function kx(t,r,o){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof r!="number"||r<2)throw new Error("qByteLen must be a number");if(typeof o!="function")throw new Error("hmacFn must be a function");let i=iu(t),l=iu(t),c=0;const d=()=>{i.fill(1),l.fill(0),c=0},f=(...x)=>o(l,i,...x),h=(x=iu())=>{l=f(Fm([0]),x),i=f(),x.length!==0&&(l=f(Fm([1]),x),i=f())},g=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let x=0;const w=[];for(;x<r;){i=f();const C=i.slice();w.push(C),x+=i.length}return _r(...w)};return(x,w)=>{d(),h(x);let C;for(;!(C=w(g()));)h();return d(),C}}const Qj={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,r)=>r.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Ls(t,r,o={}){const i=(l,c,d)=>{const f=Qj[c];if(typeof f!="function")throw new Error(`Invalid validator "${c}", expected function`);const h=t[l];if(!(d&&h===void 0)&&!f(h,t))throw new Error(`Invalid param ${String(l)}=${h} (${typeof h}), expected ${c}`)};for(const[l,c]of Object.entries(r))i(l,c,!1);for(const[l,c]of Object.entries(o))i(l,c,!0);return t}const Zj=Object.freeze(Object.defineProperty({__proto__:null,bitMask:Nd,bytesToHex:vo,bytesToNumberBE:yt,bytesToNumberLE:bd,concatBytes:_r,createHmacDrbg:kx,ensureBytes:ct,hexToBytes:Ss,hexToNumber:wd,numberToBytesBE:ir,numberToBytesLE:Ed,validateObject:Ls},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Je=BigInt(0),Be=BigInt(1),Cr=BigInt(2),Jj=BigInt(3),Ru=BigInt(4),Bm=BigInt(5),zm=BigInt(8);BigInt(9);BigInt(16);function ot(t,r){const o=t%r;return o>=Je?o:r+o}function eA(t,r,o){if(o<=Je||r<Je)throw new Error("Expected power/modulo > 0");if(o===Be)return Je;let i=Be;for(;r>Je;)r&Be&&(i=i*t%o),t=t*t%o,r>>=Be;return i}function Mt(t,r,o){let i=t;for(;r-- >Je;)i*=i,i%=o;return i}function Iu(t,r){if(t===Je||r<=Je)throw new Error(`invert: expected positive integers, got n=${t} mod=${r}`);let o=ot(t,r),i=r,l=Je,c=Be;for(;o!==Je;){const f=i/o,h=i%o,g=l-c*f;i=o,o=h,l=c,c=g}if(i!==Be)throw new Error("invert: does not exist");return ot(l,r)}function tA(t){const r=(t-Be)/Cr;let o,i,l;for(o=t-Be,i=0;o%Cr===Je;o/=Cr,i++);for(l=Cr;l<t&&eA(l,r,t)!==t-Be;l++);if(i===1){const d=(t+Be)/Ru;return function(h,g){const v=h.pow(g,d);if(!h.eql(h.sqr(v),g))throw new Error("Cannot find square root");return v}}const c=(o+Be)/Cr;return function(f,h){if(f.pow(h,r)===f.neg(f.ONE))throw new Error("Cannot find square root");let g=i,v=f.pow(f.mul(f.ONE,l),o),x=f.pow(h,c),w=f.pow(h,o);for(;!f.eql(w,f.ONE);){if(f.eql(w,f.ZERO))return f.ZERO;let C=1;for(let b=f.sqr(w);C<g&&!f.eql(b,f.ONE);C++)b=f.sqr(b);const k=f.pow(v,Be<<BigInt(g-C-1));v=f.sqr(k),x=f.mul(x,k),w=f.mul(w,v),g=C}return x}}function nA(t){if(t%Ru===Jj){const r=(t+Be)/Ru;return function(i,l){const c=i.pow(l,r);if(!i.eql(i.sqr(c),l))throw new Error("Cannot find square root");return c}}if(t%zm===Bm){const r=(t-Bm)/zm;return function(i,l){const c=i.mul(l,Cr),d=i.pow(c,r),f=i.mul(l,d),h=i.mul(i.mul(f,Cr),d),g=i.mul(f,i.sub(h,i.ONE));if(!i.eql(i.sqr(g),l))throw new Error("Cannot find square root");return g}}return tA(t)}const rA=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function oA(t){const r={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},o=rA.reduce((i,l)=>(i[l]="function",i),r);return Ls(t,o)}function sA(t,r,o){if(o<Je)throw new Error("Expected power > 0");if(o===Je)return t.ONE;if(o===Be)return r;let i=t.ONE,l=r;for(;o>Je;)o&Be&&(i=t.mul(i,l)),l=t.sqr(l),o>>=Be;return i}function iA(t,r){const o=new Array(r.length),i=r.reduce((c,d,f)=>t.is0(d)?c:(o[f]=c,t.mul(c,d)),t.ONE),l=t.inv(i);return r.reduceRight((c,d,f)=>t.is0(d)?c:(o[f]=t.mul(c,o[f]),t.mul(c,d)),l),o}function Sx(t,r){const o=r!==void 0?r:t.toString(2).length,i=Math.ceil(o/8);return{nBitLength:o,nByteLength:i}}function lA(t,r,o=!1,i={}){if(t<=Je)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:l,nByteLength:c}=Sx(t,r);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const d=nA(t),f=Object.freeze({ORDER:t,BITS:l,BYTES:c,MASK:Nd(l),ZERO:Je,ONE:Be,create:h=>ot(h,t),isValid:h=>{if(typeof h!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof h}`);return Je<=h&&h<t},is0:h=>h===Je,isOdd:h=>(h&Be)===Be,neg:h=>ot(-h,t),eql:(h,g)=>h===g,sqr:h=>ot(h*h,t),add:(h,g)=>ot(h+g,t),sub:(h,g)=>ot(h-g,t),mul:(h,g)=>ot(h*g,t),pow:(h,g)=>sA(f,h,g),div:(h,g)=>ot(h*Iu(g,t),t),sqrN:h=>h*h,addN:(h,g)=>h+g,subN:(h,g)=>h-g,mulN:(h,g)=>h*g,inv:h=>Iu(h,t),sqrt:i.sqrt||(h=>d(f,h)),invertBatch:h=>iA(f,h),cmov:(h,g,v)=>v?g:h,toBytes:h=>o?Ed(h,c):ir(h,c),fromBytes:h=>{if(h.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${h.length}`);return o?bd(h):yt(h)}});return Object.freeze(f)}function jx(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const r=t.toString(2).length;return Math.ceil(r/8)}function Ax(t){const r=jx(t);return r+Math.ceil(r/2)}function aA(t,r,o=!1){const i=t.length,l=jx(r),c=Ax(r);if(i<16||i<c||i>1024)throw new Error(`expected ${c}-1024 bytes of input, got ${i}`);const d=o?yt(t):bd(t),f=ot(d,r-Be)+Be;return o?Ed(f,l):ir(f,l)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const cA=BigInt(0),lu=BigInt(1);function uA(t,r){const o=(l,c)=>{const d=c.negate();return l?d:c},i=l=>{const c=Math.ceil(r/l)+1,d=2**(l-1);return{windows:c,windowSize:d}};return{constTimeNegate:o,unsafeLadder(l,c){let d=t.ZERO,f=l;for(;c>cA;)c&lu&&(d=d.add(f)),f=f.double(),c>>=lu;return d},precomputeWindow(l,c){const{windows:d,windowSize:f}=i(c),h=[];let g=l,v=g;for(let x=0;x<d;x++){v=g,h.push(v);for(let w=1;w<f;w++)v=v.add(g),h.push(v);g=v.double()}return h},wNAF(l,c,d){const{windows:f,windowSize:h}=i(l);let g=t.ZERO,v=t.BASE;const x=BigInt(2**l-1),w=2**l,C=BigInt(l);for(let k=0;k<f;k++){const b=k*h;let N=Number(d&x);d>>=C,N>h&&(N-=w,d+=lu);const S=b,A=b+Math.abs(N)-1,_=k%2!==0,I=N<0;N===0?v=v.add(o(_,c[S])):g=g.add(o(I,c[A]))}return{p:g,f:v}},wNAFCached(l,c,d,f){const h=l._WINDOW_SIZE||1;let g=c.get(l);return g||(g=this.precomputeWindow(l,h),h!==1&&c.set(l,f(g))),this.wNAF(h,g,d)}}}function Tx(t){return oA(t.Fp),Ls(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Sx(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function dA(t){const r=Tx(t);Ls(r,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:o,Fp:i,a:l}=r;if(o){if(!i.eql(l,i.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof o!="object"||typeof o.beta!="bigint"||typeof o.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...r})}const{bytesToNumberBE:fA,hexToBytes:pA}=Zj,kr={Err:class extends Error{constructor(r=""){super(r)}},_parseInt(t){const{Err:r}=kr;if(t.length<2||t[0]!==2)throw new r("Invalid signature integer tag");const o=t[1],i=t.subarray(2,o+2);if(!o||i.length!==o)throw new r("Invalid signature integer: wrong length");if(i[0]&128)throw new r("Invalid signature integer: negative");if(i[0]===0&&!(i[1]&128))throw new r("Invalid signature integer: unnecessary leading zero");return{d:fA(i),l:t.subarray(o+2)}},toSig(t){const{Err:r}=kr,o=typeof t=="string"?pA(t):t;if(!(o instanceof Uint8Array))throw new Error("ui8a expected");let i=o.length;if(i<2||o[0]!=48)throw new r("Invalid signature tag");if(o[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:l,l:c}=kr._parseInt(o.subarray(2)),{d,l:f}=kr._parseInt(c);if(f.length)throw new r("Invalid signature: left bytes after parsing");return{r:l,s:d}},hexFromSig(t){const r=g=>Number.parseInt(g[0],16)&8?"00"+g:g,o=g=>{const v=g.toString(16);return v.length&1?`0${v}`:v},i=r(o(t.s)),l=r(o(t.r)),c=i.length/2,d=l.length/2,f=o(c),h=o(d);return`30${o(d+c+4)}02${h}${l}02${f}${i}`}},En=BigInt(0),Ot=BigInt(1);BigInt(2);const Um=BigInt(3);BigInt(4);function hA(t){const r=dA(t),{Fp:o}=r,i=r.toBytes||((k,b,N)=>{const S=b.toAffine();return _r(Uint8Array.from([4]),o.toBytes(S.x),o.toBytes(S.y))}),l=r.fromBytes||(k=>{const b=k.subarray(1),N=o.fromBytes(b.subarray(0,o.BYTES)),S=o.fromBytes(b.subarray(o.BYTES,2*o.BYTES));return{x:N,y:S}});function c(k){const{a:b,b:N}=r,S=o.sqr(k),A=o.mul(S,k);return o.add(o.add(A,o.mul(k,b)),N)}if(!o.eql(o.sqr(r.Gy),c(r.Gx)))throw new Error("bad generator point: equation left != right");function d(k){return typeof k=="bigint"&&En<k&&k<r.n}function f(k){if(!d(k))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function h(k){const{allowedPrivateKeyLengths:b,nByteLength:N,wrapPrivateKey:S,n:A}=r;if(b&&typeof k!="bigint"){if(k instanceof Uint8Array&&(k=vo(k)),typeof k!="string"||!b.includes(k.length))throw new Error("Invalid key");k=k.padStart(N*2,"0")}let _;try{_=typeof k=="bigint"?k:yt(ct("private key",k,N))}catch{throw new Error(`private key must be ${N} bytes, hex or bigint, not ${typeof k}`)}return S&&(_=ot(_,A)),f(_),_}const g=new Map;function v(k){if(!(k instanceof x))throw new Error("ProjectivePoint expected")}class x{constructor(b,N,S){if(this.px=b,this.py=N,this.pz=S,b==null||!o.isValid(b))throw new Error("x required");if(N==null||!o.isValid(N))throw new Error("y required");if(S==null||!o.isValid(S))throw new Error("z required")}static fromAffine(b){const{x:N,y:S}=b||{};if(!b||!o.isValid(N)||!o.isValid(S))throw new Error("invalid affine point");if(b instanceof x)throw new Error("projective point not allowed");const A=_=>o.eql(_,o.ZERO);return A(N)&&A(S)?x.ZERO:new x(N,S,o.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(b){const N=o.invertBatch(b.map(S=>S.pz));return b.map((S,A)=>S.toAffine(N[A])).map(x.fromAffine)}static fromHex(b){const N=x.fromAffine(l(ct("pointHex",b)));return N.assertValidity(),N}static fromPrivateKey(b){return x.BASE.multiply(h(b))}_setWindowSize(b){this._WINDOW_SIZE=b,g.delete(this)}assertValidity(){if(this.is0()){if(r.allowInfinityPoint&&!o.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:b,y:N}=this.toAffine();if(!o.isValid(b)||!o.isValid(N))throw new Error("bad point: x or y not FE");const S=o.sqr(N),A=c(b);if(!o.eql(S,A))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:b}=this.toAffine();if(o.isOdd)return!o.isOdd(b);throw new Error("Field doesn't support isOdd")}equals(b){v(b);const{px:N,py:S,pz:A}=this,{px:_,py:I,pz:O}=b,U=o.eql(o.mul(N,O),o.mul(_,A)),M=o.eql(o.mul(S,O),o.mul(I,A));return U&&M}negate(){return new x(this.px,o.neg(this.py),this.pz)}double(){const{a:b,b:N}=r,S=o.mul(N,Um),{px:A,py:_,pz:I}=this;let O=o.ZERO,U=o.ZERO,M=o.ZERO,D=o.mul(A,A),X=o.mul(_,_),V=o.mul(I,I),H=o.mul(A,_);return H=o.add(H,H),M=o.mul(A,I),M=o.add(M,M),O=o.mul(b,M),U=o.mul(S,V),U=o.add(O,U),O=o.sub(X,U),U=o.add(X,U),U=o.mul(O,U),O=o.mul(H,O),M=o.mul(S,M),V=o.mul(b,V),H=o.sub(D,V),H=o.mul(b,H),H=o.add(H,M),M=o.add(D,D),D=o.add(M,D),D=o.add(D,V),D=o.mul(D,H),U=o.add(U,D),V=o.mul(_,I),V=o.add(V,V),D=o.mul(V,H),O=o.sub(O,D),M=o.mul(V,X),M=o.add(M,M),M=o.add(M,M),new x(O,U,M)}add(b){v(b);const{px:N,py:S,pz:A}=this,{px:_,py:I,pz:O}=b;let U=o.ZERO,M=o.ZERO,D=o.ZERO;const X=r.a,V=o.mul(r.b,Um);let H=o.mul(N,_),F=o.mul(S,I),Y=o.mul(A,O),re=o.add(N,S),W=o.add(_,I);re=o.mul(re,W),W=o.add(H,F),re=o.sub(re,W),W=o.add(N,A);let G=o.add(_,O);return W=o.mul(W,G),G=o.add(H,Y),W=o.sub(W,G),G=o.add(S,A),U=o.add(I,O),G=o.mul(G,U),U=o.add(F,Y),G=o.sub(G,U),D=o.mul(X,W),U=o.mul(V,Y),D=o.add(U,D),U=o.sub(F,D),D=o.add(F,D),M=o.mul(U,D),F=o.add(H,H),F=o.add(F,H),Y=o.mul(X,Y),W=o.mul(V,W),F=o.add(F,Y),Y=o.sub(H,Y),Y=o.mul(X,Y),W=o.add(W,Y),H=o.mul(F,W),M=o.add(M,H),H=o.mul(G,W),U=o.mul(re,U),U=o.sub(U,H),H=o.mul(re,F),D=o.mul(G,D),D=o.add(D,H),new x(U,M,D)}subtract(b){return this.add(b.negate())}is0(){return this.equals(x.ZERO)}wNAF(b){return C.wNAFCached(this,g,b,N=>{const S=o.invertBatch(N.map(A=>A.pz));return N.map((A,_)=>A.toAffine(S[_])).map(x.fromAffine)})}multiplyUnsafe(b){const N=x.ZERO;if(b===En)return N;if(f(b),b===Ot)return this;const{endo:S}=r;if(!S)return C.unsafeLadder(this,b);let{k1neg:A,k1:_,k2neg:I,k2:O}=S.splitScalar(b),U=N,M=N,D=this;for(;_>En||O>En;)_&Ot&&(U=U.add(D)),O&Ot&&(M=M.add(D)),D=D.double(),_>>=Ot,O>>=Ot;return A&&(U=U.negate()),I&&(M=M.negate()),M=new x(o.mul(M.px,S.beta),M.py,M.pz),U.add(M)}multiply(b){f(b);let N=b,S,A;const{endo:_}=r;if(_){const{k1neg:I,k1:O,k2neg:U,k2:M}=_.splitScalar(N);let{p:D,f:X}=this.wNAF(O),{p:V,f:H}=this.wNAF(M);D=C.constTimeNegate(I,D),V=C.constTimeNegate(U,V),V=new x(o.mul(V.px,_.beta),V.py,V.pz),S=D.add(V),A=X.add(H)}else{const{p:I,f:O}=this.wNAF(N);S=I,A=O}return x.normalizeZ([S,A])[0]}multiplyAndAddUnsafe(b,N,S){const A=x.BASE,_=(O,U)=>U===En||U===Ot||!O.equals(A)?O.multiplyUnsafe(U):O.multiply(U),I=_(this,N).add(_(b,S));return I.is0()?void 0:I}toAffine(b){const{px:N,py:S,pz:A}=this,_=this.is0();b==null&&(b=_?o.ONE:o.inv(A));const I=o.mul(N,b),O=o.mul(S,b),U=o.mul(A,b);if(_)return{x:o.ZERO,y:o.ZERO};if(!o.eql(U,o.ONE))throw new Error("invZ was invalid");return{x:I,y:O}}isTorsionFree(){const{h:b,isTorsionFree:N}=r;if(b===Ot)return!0;if(N)return N(x,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:b,clearCofactor:N}=r;return b===Ot?this:N?N(x,this):this.multiplyUnsafe(r.h)}toRawBytes(b=!0){return this.assertValidity(),i(x,this,b)}toHex(b=!0){return vo(this.toRawBytes(b))}}x.BASE=new x(r.Gx,r.Gy,o.ONE),x.ZERO=new x(o.ZERO,o.ONE,o.ZERO);const w=r.nBitLength,C=uA(x,r.endo?Math.ceil(w/2):w);return{CURVE:r,ProjectivePoint:x,normPrivateKeyToScalar:h,weierstrassEquation:c,isWithinCurveOrder:d}}function mA(t){const r=Tx(t);return Ls(r,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...r})}function gA(t){const r=mA(t),{Fp:o,n:i}=r,l=o.BYTES+1,c=2*o.BYTES+1;function d(W){return En<W&&W<o.ORDER}function f(W){return ot(W,i)}function h(W){return Iu(W,i)}const{ProjectivePoint:g,normPrivateKeyToScalar:v,weierstrassEquation:x,isWithinCurveOrder:w}=hA({...r,toBytes(W,G,ee){const L=G.toAffine(),Z=o.toBytes(L.x),Q=_r;return ee?Q(Uint8Array.from([G.hasEvenY()?2:3]),Z):Q(Uint8Array.from([4]),Z,o.toBytes(L.y))},fromBytes(W){const G=W.length,ee=W[0],L=W.subarray(1);if(G===l&&(ee===2||ee===3)){const Z=yt(L);if(!d(Z))throw new Error("Point is not on curve");const Q=x(Z);let P=o.sqrt(Q);const K=(P&Ot)===Ot;return(ee&1)===1!==K&&(P=o.neg(P)),{x:Z,y:P}}else if(G===c&&ee===4){const Z=o.fromBytes(L.subarray(0,o.BYTES)),Q=o.fromBytes(L.subarray(o.BYTES,2*o.BYTES));return{x:Z,y:Q}}else throw new Error(`Point of length ${G} was invalid. Expected ${l} compressed bytes or ${c} uncompressed bytes`)}}),C=W=>vo(ir(W,r.nByteLength));function k(W){const G=i>>Ot;return W>G}function b(W){return k(W)?f(-W):W}const N=(W,G,ee)=>yt(W.slice(G,ee));class S{constructor(G,ee,L){this.r=G,this.s=ee,this.recovery=L,this.assertValidity()}static fromCompact(G){const ee=r.nByteLength;return G=ct("compactSignature",G,ee*2),new S(N(G,0,ee),N(G,ee,2*ee))}static fromDER(G){const{r:ee,s:L}=kr.toSig(ct("DER",G));return new S(ee,L)}assertValidity(){if(!w(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!w(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(G){return new S(this.r,this.s,G)}recoverPublicKey(G){const{r:ee,s:L,recovery:Z}=this,Q=M(ct("msgHash",G));if(Z==null||![0,1,2,3].includes(Z))throw new Error("recovery id invalid");const P=Z===2||Z===3?ee+r.n:ee;if(P>=o.ORDER)throw new Error("recovery id 2 or 3 invalid");const K=(Z&1)===0?"02":"03",se=g.fromHex(K+C(P)),le=h(P),ge=f(-Q*le),ve=f(L*le),pe=g.BASE.multiplyAndAddUnsafe(se,ge,ve);if(!pe)throw new Error("point at infinify");return pe.assertValidity(),pe}hasHighS(){return k(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,f(-this.s),this.recovery):this}toDERRawBytes(){return Ss(this.toDERHex())}toDERHex(){return kr.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Ss(this.toCompactHex())}toCompactHex(){return C(this.r)+C(this.s)}}const A={isValidPrivateKey(W){try{return v(W),!0}catch{return!1}},normPrivateKeyToScalar:v,randomPrivateKey:()=>{const W=Ax(r.n);return aA(r.randomBytes(W),r.n)},precompute(W=8,G=g.BASE){return G._setWindowSize(W),G.multiply(BigInt(3)),G}};function _(W,G=!0){return g.fromPrivateKey(W).toRawBytes(G)}function I(W){const G=W instanceof Uint8Array,ee=typeof W=="string",L=(G||ee)&&W.length;return G?L===l||L===c:ee?L===2*l||L===2*c:W instanceof g}function O(W,G,ee=!0){if(I(W))throw new Error("first arg must be private key");if(!I(G))throw new Error("second arg must be public key");return g.fromHex(G).multiply(v(W)).toRawBytes(ee)}const U=r.bits2int||function(W){const G=yt(W),ee=W.length*8-r.nBitLength;return ee>0?G>>BigInt(ee):G},M=r.bits2int_modN||function(W){return f(U(W))},D=Nd(r.nBitLength);function X(W){if(typeof W!="bigint")throw new Error("bigint expected");if(!(En<=W&&W<D))throw new Error(`bigint expected < 2^${r.nBitLength}`);return ir(W,r.nByteLength)}function V(W,G,ee=H){if(["recovered","canonical"].some(we=>we in ee))throw new Error("sign() legacy options not supported");const{hash:L,randomBytes:Z}=r;let{lowS:Q,prehash:P,extraEntropy:K}=ee;Q==null&&(Q=!0),W=ct("msgHash",W),P&&(W=ct("prehashed msgHash",L(W)));const se=M(W),le=v(G),ge=[X(le),X(se)];if(K!=null){const we=K===!0?Z(o.BYTES):K;ge.push(ct("extraEntropy",we))}const ve=_r(...ge),pe=se;function Ee(we){const Ae=U(we);if(!w(Ae))return;const ft=h(Ae),tt=g.BASE.multiply(Ae).toAffine(),Oe=f(tt.x);if(Oe===En)return;const bt=f(ft*f(pe+Oe*le));if(bt===En)return;let ar=(tt.x===Oe?0:2)|Number(tt.y&Ot),cr=bt;return Q&&k(bt)&&(cr=b(bt),ar^=1),new S(Oe,cr,ar)}return{seed:ve,k2sig:Ee}}const H={lowS:r.lowS,prehash:!1},F={lowS:r.lowS,prehash:!1};function Y(W,G,ee=H){const{seed:L,k2sig:Z}=V(W,G,ee),Q=r;return kx(Q.hash.outputLen,Q.nByteLength,Q.hmac)(L,Z)}g.BASE._setWindowSize(8);function re(W,G,ee,L=F){var tt;const Z=W;if(G=ct("msgHash",G),ee=ct("publicKey",ee),"strict"in L)throw new Error("options.strict was renamed to lowS");const{lowS:Q,prehash:P}=L;let K,se;try{if(typeof Z=="string"||Z instanceof Uint8Array)try{K=S.fromDER(Z)}catch(Oe){if(!(Oe instanceof kr.Err))throw Oe;K=S.fromCompact(Z)}else if(typeof Z=="object"&&typeof Z.r=="bigint"&&typeof Z.s=="bigint"){const{r:Oe,s:bt}=Z;K=new S(Oe,bt)}else throw new Error("PARSE");se=g.fromHex(ee)}catch(Oe){if(Oe.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Q&&K.hasHighS())return!1;P&&(G=r.hash(G));const{r:le,s:ge}=K,ve=M(G),pe=h(ge),Ee=f(ve*pe),we=f(le*pe),Ae=(tt=g.BASE.multiplyAndAddUnsafe(se,Ee,we))==null?void 0:tt.toAffine();return Ae?f(Ae.x)===le:!1}return{CURVE:r,getPublicKey:_,getSharedSecret:O,sign:Y,verify:re,ProjectivePoint:g,Signature:S,utils:A}}class _x extends Nx{constructor(r,o){super(),this.finished=!1,this.destroyed=!1,Oj(r);const i=yd(o);if(this.iHash=r.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const l=this.blockLen,c=new Uint8Array(l);c.set(i.length>l?r.create().update(i).digest():i);for(let d=0;d<c.length;d++)c[d]^=54;this.iHash.update(c),this.oHash=r.create();for(let d=0;d<c.length;d++)c[d]^=106;this.oHash.update(c),c.fill(0)}update(r){return wl(this),this.iHash.update(r),this}digestInto(r){wl(this),bx(r,this.outputLen),this.finished=!0,this.iHash.digestInto(r),this.oHash.update(r),this.oHash.digestInto(r),this.destroy()}digest(){const r=new Uint8Array(this.oHash.outputLen);return this.digestInto(r),r}_cloneInto(r){r||(r=Object.create(Object.getPrototypeOf(this),{}));const{oHash:o,iHash:i,finished:l,destroyed:c,blockLen:d,outputLen:f}=this;return r=r,r.finished=l,r.destroyed=c,r.blockLen=d,r.outputLen=f,r.oHash=o._cloneInto(r.oHash),r.iHash=i._cloneInto(r.iHash),r}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Px=(t,r,o)=>new _x(t,r).update(o).digest();Px.create=(t,r)=>new _x(t,r);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function xA(t){return{hash:t,hmac:(r,...o)=>Px(t,r,Bj(...o)),randomBytes:Cx}}function vA(t,r){const o=i=>gA({...t,...xA(i)});return Object.freeze({...o(r),create:o})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Hl=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),bl=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Rx=BigInt(1),El=BigInt(2),Hm=(t,r)=>(t+r/El)/r;function Ix(t){const r=Hl,o=BigInt(3),i=BigInt(6),l=BigInt(11),c=BigInt(22),d=BigInt(23),f=BigInt(44),h=BigInt(88),g=t*t*t%r,v=g*g*t%r,x=Mt(v,o,r)*v%r,w=Mt(x,o,r)*v%r,C=Mt(w,El,r)*g%r,k=Mt(C,l,r)*C%r,b=Mt(k,c,r)*k%r,N=Mt(b,f,r)*b%r,S=Mt(N,h,r)*N%r,A=Mt(S,f,r)*b%r,_=Mt(A,o,r)*v%r,I=Mt(_,d,r)*k%r,O=Mt(I,i,r)*g%r,U=Mt(O,El,r);if(!Lu.eql(Lu.sqr(U),t))throw new Error("Cannot find square root");return U}const Lu=lA(Hl,void 0,void 0,{sqrt:Ix}),Cd=vA({a:BigInt(0),b:BigInt(7),Fp:Lu,n:bl,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const r=bl,o=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),i=-Rx*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),l=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),c=o,d=BigInt("0x100000000000000000000000000000000"),f=Hm(c*t,r),h=Hm(-i*t,r);let g=ot(t-f*o-h*l,r),v=ot(-f*i-h*c,r);const x=g>d,w=v>d;if(x&&(g=r-g),w&&(v=r-v),g>d||v>d)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:x,k1:g,k2neg:w,k2:v}}}},Pu),Vl=BigInt(0),Lx=t=>typeof t=="bigint"&&Vl<t&&t<Hl,yA=t=>typeof t=="bigint"&&Vl<t&&t<bl,Vm={};function Nl(t,...r){let o=Vm[t];if(o===void 0){const i=Pu(Uint8Array.from(t,l=>l.charCodeAt(0)));o=_r(i,i),Vm[t]=o}return Pu(_r(o,...r))}const kd=t=>t.toRawBytes(!0).slice(1),Mu=t=>ir(t,32),au=t=>ot(t,Hl),js=t=>ot(t,bl),Sd=Cd.ProjectivePoint,wA=(t,r,o)=>Sd.BASE.multiplyAndAddUnsafe(t,r,o);function Ou(t){let r=Cd.utils.normPrivateKeyToScalar(t),o=Sd.fromPrivateKey(r);return{scalar:o.hasEvenY()?r:js(-r),bytes:kd(o)}}function Mx(t){if(!Lx(t))throw new Error("bad x: need 0 < x < p");const r=au(t*t),o=au(r*t+BigInt(7));let i=Ix(o);i%El!==Vl&&(i=au(-i));const l=new Sd(t,i,Rx);return l.assertValidity(),l}function Ox(...t){return js(yt(Nl("BIP0340/challenge",...t)))}function bA(t){return Ou(t).bytes}function EA(t,r,o=Cx(32)){const i=ct("message",t),{bytes:l,scalar:c}=Ou(r),d=ct("auxRand",o,32),f=Mu(c^yt(Nl("BIP0340/aux",d))),h=Nl("BIP0340/nonce",f,l,i),g=js(yt(h));if(g===Vl)throw new Error("sign failed: k is zero");const{bytes:v,scalar:x}=Ou(g),w=Ox(v,l,i),C=new Uint8Array(64);if(C.set(v,0),C.set(Mu(js(x+w*c)),32),!Dx(C,i,l))throw new Error("sign: Invalid signature produced");return C}function Dx(t,r,o){const i=ct("signature",t,64),l=ct("message",r),c=ct("publicKey",o,32);try{const d=Mx(yt(c)),f=yt(i.subarray(0,32));if(!Lx(f))return!1;const h=yt(i.subarray(32,64));if(!yA(h))return!1;const g=Ox(Mu(f),kd(d),l),v=wA(d,h,js(-g));return!(!v||!v.hasEvenY()||v.toAffine().x!==f)}catch{return!1}}const gs={getPublicKey:bA,sign:EA,verify:Dx,utils:{randomPrivateKey:Cd.utils.randomPrivateKey,lift_x:Mx,pointToBytes:kd,numberToBytesBE:ir,bytesToNumberBE:yt,taggedHash:Nl,mod:ot}};/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const $x=t=>t instanceof Uint8Array,cu=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),rn=(t,r)=>t<<32-r|t>>>r,NA=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!NA)throw new Error("Non little-endian hardware is not supported");const CA=Array.from({length:256},(t,r)=>r.toString(16).padStart(2,"0"));function Wt(t){if(!$x(t))throw new Error("Uint8Array expected");let r="";for(let o=0;o<t.length;o++)r+=CA[t[o]];return r}function kA(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const r=t.length;if(r%2)throw new Error("padded hex string expected, got unpadded hex of length "+r);const o=new Uint8Array(r/2);for(let i=0;i<o.length;i++){const l=i*2,c=t.slice(l,l+2),d=Number.parseInt(c,16);if(Number.isNaN(d)||d<0)throw new Error("Invalid byte sequence");o[i]=d}return o}function SA(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Fx(t){if(typeof t=="string"&&(t=SA(t)),!$x(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class jA{clone(){return this._cloneInto()}}function Bx(t){const r=i=>t().update(Fx(i)).digest(),o=t();return r.outputLen=o.outputLen,r.blockLen=o.blockLen,r.create=()=>t(),r}function Du(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function AA(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}function zx(t,...r){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(r.length>0&&!r.includes(t.length))throw new Error(`Expected Uint8Array of length ${r}, not of length=${t.length}`)}function TA(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Du(t.outputLen),Du(t.blockLen)}function _A(t,r=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(r&&t.finished)throw new Error("Hash#digest() has already been called")}function PA(t,r){zx(t);const o=r.outputLen;if(t.length<o)throw new Error(`digestInto() expects output buffer of length at least ${o}`)}const uu={number:Du,bool:AA,bytes:zx,hash:TA,exists:_A,output:PA};function RA(t,r,o,i){if(typeof t.setBigUint64=="function")return t.setBigUint64(r,o,i);const l=BigInt(32),c=BigInt(4294967295),d=Number(o>>l&c),f=Number(o&c),h=i?4:0,g=i?0:4;t.setUint32(r+h,d,i),t.setUint32(r+g,f,i)}class IA extends jA{constructor(r,o,i,l){super(),this.blockLen=r,this.outputLen=o,this.padOffset=i,this.isLE=l,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(r),this.view=cu(this.buffer)}update(r){uu.exists(this);const{view:o,buffer:i,blockLen:l}=this;r=Fx(r);const c=r.length;for(let d=0;d<c;){const f=Math.min(l-this.pos,c-d);if(f===l){const h=cu(r);for(;l<=c-d;d+=l)this.process(h,d);continue}i.set(r.subarray(d,d+f),this.pos),this.pos+=f,d+=f,this.pos===l&&(this.process(o,0),this.pos=0)}return this.length+=r.length,this.roundClean(),this}digestInto(r){uu.exists(this),uu.output(r,this),this.finished=!0;const{buffer:o,view:i,blockLen:l,isLE:c}=this;let{pos:d}=this;o[d++]=128,this.buffer.subarray(d).fill(0),this.padOffset>l-d&&(this.process(i,0),d=0);for(let x=d;x<l;x++)o[x]=0;RA(i,l-8,BigInt(this.length*8),c),this.process(i,0);const f=cu(r),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=h/4,v=this.get();if(g>v.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x<g;x++)f.setUint32(4*x,v[x],c)}digest(){const{buffer:r,outputLen:o}=this;this.digestInto(r);const i=r.slice(0,o);return this.destroy(),i}_cloneInto(r){r||(r=new this.constructor),r.set(...this.get());const{blockLen:o,buffer:i,length:l,finished:c,destroyed:d,pos:f}=this;return r.length=l,r.pos=f,r.finished=c,r.destroyed=d,l%o&&r.buffer.set(i),r}}const LA=(t,r,o)=>t&r^~t&o,MA=(t,r,o)=>t&r^t&o^r&o,OA=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Qn=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Zn=new Uint32Array(64);class Ux extends IA{constructor(){super(64,32,8,!1),this.A=Qn[0]|0,this.B=Qn[1]|0,this.C=Qn[2]|0,this.D=Qn[3]|0,this.E=Qn[4]|0,this.F=Qn[5]|0,this.G=Qn[6]|0,this.H=Qn[7]|0}get(){const{A:r,B:o,C:i,D:l,E:c,F:d,G:f,H:h}=this;return[r,o,i,l,c,d,f,h]}set(r,o,i,l,c,d,f,h){this.A=r|0,this.B=o|0,this.C=i|0,this.D=l|0,this.E=c|0,this.F=d|0,this.G=f|0,this.H=h|0}process(r,o){for(let x=0;x<16;x++,o+=4)Zn[x]=r.getUint32(o,!1);for(let x=16;x<64;x++){const w=Zn[x-15],C=Zn[x-2],k=rn(w,7)^rn(w,18)^w>>>3,b=rn(C,17)^rn(C,19)^C>>>10;Zn[x]=b+Zn[x-7]+k+Zn[x-16]|0}let{A:i,B:l,C:c,D:d,E:f,F:h,G:g,H:v}=this;for(let x=0;x<64;x++){const w=rn(f,6)^rn(f,11)^rn(f,25),C=v+w+LA(f,h,g)+OA[x]+Zn[x]|0,b=(rn(i,2)^rn(i,13)^rn(i,22))+MA(i,l,c)|0;v=g,g=h,h=f,f=d+C|0,d=c,c=l,l=i,i=C+b|0}i=i+this.A|0,l=l+this.B|0,c=c+this.C|0,d=d+this.D|0,f=f+this.E|0,h=h+this.F|0,g=g+this.G|0,v=v+this.H|0,this.set(i,l,c,d,f,h,g,v)}roundClean(){Zn.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class DA extends Ux{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const $A=Bx(()=>new Ux);Bx(()=>new DA);var uo=Symbol("verified"),FA=t=>t instanceof Object;function BA(t){if(!FA(t)||typeof t.kind!="number"||typeof t.content!="string"||typeof t.created_at!="number"||typeof t.pubkey!="string"||!t.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(t.tags))return!1;for(let r=0;r<t.tags.length;r++){let o=t.tags[r];if(!Array.isArray(o))return!1;for(let i=0;i<o.length;i++)if(typeof o[i]!="string")return!1}return!0}new TextDecoder("utf-8");var zA=new TextEncoder,UA=class{generateSecretKey(){return gs.utils.randomPrivateKey()}getPublicKey(t){return Wt(gs.getPublicKey(t))}finalizeEvent(t,r){const o=t;return o.pubkey=Wt(gs.getPublicKey(r)),o.id=du(o),o.sig=Wt(gs.sign(du(o),r)),o[uo]=!0,o}verifyEvent(t){if(typeof t[uo]=="boolean")return t[uo];const r=du(t);if(r!==t.id)return t[uo]=!1,!1;try{const o=gs.verify(t.sig,r,t.pubkey);return t[uo]=o,o}catch{return t[uo]=!1,!1}}};function HA(t){if(!BA(t))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,t.pubkey,t.created_at,t.kind,t.tags,t.content])}function du(t){let r=$A(zA.encode(HA(t)));return Wt(r)}var Wl=new UA,VA=Wl.generateSecretKey,fu=Wl.getPublicKey;Wl.finalizeEvent;Wl.verifyEvent;/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ko(t){if(!Number.isSafeInteger(t))throw new Error(`Wrong integer: ${t}`)}function kn(...t){const r=(l,c)=>d=>l(c(d)),o=Array.from(t).reverse().reduce((l,c)=>l?r(l,c.encode):c.encode,void 0),i=t.reduce((l,c)=>l?r(l,c.decode):c.decode,void 0);return{encode:o,decode:i}}function Sn(t){return{encode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return r.map(o=>{if(ko(o),o<0||o>=t.length)throw new Error(`Digit index outside alphabet: ${o} (alphabet: ${t.length})`);return t[o]})},decode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("alphabet.decode input should be array of strings");return r.map(o=>{if(typeof o!="string")throw new Error(`alphabet.decode: not string element=${o}`);const i=t.indexOf(o);if(i===-1)throw new Error(`Unknown letter: "${o}". Allowed: ${t}`);return i})}}}function jn(t=""){if(typeof t!="string")throw new Error("join separator should be string");return{encode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("join.encode input should be array of strings");for(let o of r)if(typeof o!="string")throw new Error(`join.encode: non-string input=${o}`);return r.join(t)},decode:r=>{if(typeof r!="string")throw new Error("join.decode input should be string");return r.split(t)}}}function Kl(t,r="="){if(ko(t),typeof r!="string")throw new Error("padding chr should be string");return{encode(o){if(!Array.isArray(o)||o.length&&typeof o[0]!="string")throw new Error("padding.encode input should be array of strings");for(let i of o)if(typeof i!="string")throw new Error(`padding.encode: non-string input=${i}`);for(;o.length*t%8;)o.push(r);return o},decode(o){if(!Array.isArray(o)||o.length&&typeof o[0]!="string")throw new Error("padding.encode input should be array of strings");for(let l of o)if(typeof l!="string")throw new Error(`padding.decode: non-string input=${l}`);let i=o.length;if(i*t%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;i>0&&o[i-1]===r;i--)if(!((i-1)*t%8))throw new Error("Invalid padding: string has too much padding");return o.slice(0,i)}}}function Hx(t){if(typeof t!="function")throw new Error("normalize fn should be function");return{encode:r=>r,decode:r=>t(r)}}function Wm(t,r,o){if(r<2)throw new Error(`convertRadix: wrong from=${r}, base cannot be less than 2`);if(o<2)throw new Error(`convertRadix: wrong to=${o}, base cannot be less than 2`);if(!Array.isArray(t))throw new Error("convertRadix: data should be array");if(!t.length)return[];let i=0;const l=[],c=Array.from(t);for(c.forEach(d=>{if(ko(d),d<0||d>=r)throw new Error(`Wrong integer: ${d}`)});;){let d=0,f=!0;for(let h=i;h<c.length;h++){const g=c[h],v=r*d+g;if(!Number.isSafeInteger(v)||r*d/r!==d||v-g!==r*d)throw new Error("convertRadix: carry overflow");if(d=v%o,c[h]=Math.floor(v/o),!Number.isSafeInteger(c[h])||c[h]*o+d!==v)throw new Error("convertRadix: carry overflow");if(f)c[h]?f=!1:i=h;else continue}if(l.push(d),f)break}for(let d=0;d<t.length-1&&t[d]===0;d++)l.push(0);return l.reverse()}const Vx=(t,r)=>r?Vx(r,t%r):t,Cl=(t,r)=>t+(r-Vx(t,r));function $u(t,r,o,i){if(!Array.isArray(t))throw new Error("convertRadix2: data should be array");if(r<=0||r>32)throw new Error(`convertRadix2: wrong from=${r}`);if(o<=0||o>32)throw new Error(`convertRadix2: wrong to=${o}`);if(Cl(r,o)>32)throw new Error(`convertRadix2: carry overflow from=${r} to=${o} carryBits=${Cl(r,o)}`);let l=0,c=0;const d=2**o-1,f=[];for(const h of t){if(ko(h),h>=2**r)throw new Error(`convertRadix2: invalid data word=${h} from=${r}`);if(l=l<<r|h,c+r>32)throw new Error(`convertRadix2: carry overflow pos=${c} from=${r}`);for(c+=r;c>=o;c-=o)f.push((l>>c-o&d)>>>0);l&=2**c-1}if(l=l<<o-c&d,!i&&c>=r)throw new Error("Excess padding");if(!i&&l)throw new Error(`Non-zero padding: ${l}`);return i&&c>0&&f.push(l>>>0),f}function WA(t){return ko(t),{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return Wm(Array.from(r),2**8,t)},decode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(Wm(r,t,2**8))}}}function lr(t,r=!1){if(ko(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(Cl(8,t)>32||Cl(t,8)>32)throw new Error("radix2: carry overflow");return{encode:o=>{if(!(o instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return $u(Array.from(o),8,t,!r)},decode:o=>{if(!Array.isArray(o)||o.length&&typeof o[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from($u(o,t,8,r))}}}function Km(t){if(typeof t!="function")throw new Error("unsafeWrapper fn should be function");return function(...r){try{return t.apply(null,r)}catch{}}}const KA=kn(lr(4),Sn("0123456789ABCDEF"),jn("")),GA=kn(lr(5),Sn("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Kl(5),jn(""));kn(lr(5),Sn("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Kl(5),jn(""));kn(lr(5),Sn("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),jn(""),Hx(t=>t.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const YA=kn(lr(6),Sn("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Kl(6),jn("")),XA=kn(lr(6),Sn("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Kl(6),jn("")),jd=t=>kn(WA(58),Sn(t),jn("")),Fu=jd("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");jd("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ");jd("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const Gm=[0,2,3,5,6,7,9,10,11],qA={encode(t){let r="";for(let o=0;o<t.length;o+=8){const i=t.subarray(o,o+8);r+=Fu.encode(i).padStart(Gm[i.length],"1")}return r},decode(t){let r=[];for(let o=0;o<t.length;o+=11){const i=t.slice(o,o+11),l=Gm.indexOf(i.length),c=Fu.decode(i);for(let d=0;d<c.length-l;d++)if(c[d]!==0)throw new Error("base58xmr: wrong padding");r=r.concat(Array.from(c.slice(c.length-l)))}return Uint8Array.from(r)}},Bu=kn(Sn("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),jn("")),Ym=[996825010,642813549,513874426,1027748829,705979059];function xs(t){const r=t>>25;let o=(t&33554431)<<5;for(let i=0;i<Ym.length;i++)(r>>i&1)===1&&(o^=Ym[i]);return o}function Xm(t,r,o=1){const i=t.length;let l=1;for(let c=0;c<i;c++){const d=t.charCodeAt(c);if(d<33||d>126)throw new Error(`Invalid prefix (${t})`);l=xs(l)^d>>5}l=xs(l);for(let c=0;c<i;c++)l=xs(l)^t.charCodeAt(c)&31;for(let c of r)l=xs(l)^c;for(let c=0;c<6;c++)l=xs(l);return l^=o,Bu.encode($u([l%2**30],30,5,!1))}function Wx(t){const r=t==="bech32"?1:734539939,o=lr(5),i=o.decode,l=o.encode,c=Km(i);function d(v,x,w=90){if(typeof v!="string")throw new Error(`bech32.encode prefix should be string, not ${typeof v}`);if(!Array.isArray(x)||x.length&&typeof x[0]!="number")throw new Error(`bech32.encode words should be array of numbers, not ${typeof x}`);const C=v.length+7+x.length;if(w!==!1&&C>w)throw new TypeError(`Length ${C} exceeds limit ${w}`);return v=v.toLowerCase(),`${v}1${Bu.encode(x)}${Xm(v,x,r)}`}function f(v,x=90){if(typeof v!="string")throw new Error(`bech32.decode input should be string, not ${typeof v}`);if(v.length<8||x!==!1&&v.length>x)throw new TypeError(`Wrong string length: ${v.length} (${v}). Expected (8..${x})`);const w=v.toLowerCase();if(v!==w&&v!==v.toUpperCase())throw new Error("String must be lowercase or uppercase");v=w;const C=v.lastIndexOf("1");if(C===0||C===-1)throw new Error('Letter "1" must be present between prefix and data only');const k=v.slice(0,C),b=v.slice(C+1);if(b.length<6)throw new Error("Data must be at least 6 characters long");const N=Bu.decode(b).slice(0,-6),S=Xm(k,N,r);if(!b.endsWith(S))throw new Error(`Invalid checksum in ${v}: expected "${S}"`);return{prefix:k,words:N}}const h=Km(f);function g(v){const{prefix:x,words:w}=f(v,!1);return{prefix:x,words:w,bytes:i(w)}}return{encode:d,decode:f,decodeToBytes:g,decodeUnsafe:h,fromWords:i,fromWordsUnsafe:c,toWords:l}}const kl=Wx("bech32");Wx("bech32m");const QA={encode:t=>new TextDecoder().decode(t),decode:t=>new TextEncoder().encode(t)},ZA=kn(lr(4),Sn("0123456789abcdef"),jn(""),Hx(t=>{if(typeof t!="string"||t.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof t} with length ${t.length}`);return t.toLowerCase()})),JA={utf8:QA,hex:ZA,base16:KA,base32:GA,base64:YA,base64url:XA,base58:Fu,base58xmr:qA};`${Object.keys(JA).join(", ")}`;var nl=new TextDecoder("utf-8");new TextEncoder;var Kx=5e3;function qm(t){var l,c,d,f,h,g,v;let{prefix:r,words:o}=kl.decode(t,Kx),i=new Uint8Array(kl.fromWords(o));switch(r){case"nprofile":{let x=pu(i);if(!((l=x[0])!=null&&l[0]))throw new Error("missing TLV 0 for nprofile");if(x[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Wt(x[0][0]),relays:x[1]?x[1].map(w=>nl.decode(w)):[]}}}case"nevent":{let x=pu(i);if(!((c=x[0])!=null&&c[0]))throw new Error("missing TLV 0 for nevent");if(x[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");if(x[2]&&x[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(x[3]&&x[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Wt(x[0][0]),relays:x[1]?x[1].map(w=>nl.decode(w)):[],author:(d=x[2])!=null&&d[0]?Wt(x[2][0]):void 0,kind:(f=x[3])!=null&&f[0]?parseInt(Wt(x[3][0]),16):void 0}}}case"naddr":{let x=pu(i);if(!((h=x[0])!=null&&h[0]))throw new Error("missing TLV 0 for naddr");if(!((g=x[2])!=null&&g[0]))throw new Error("missing TLV 2 for naddr");if(x[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(!((v=x[3])!=null&&v[0]))throw new Error("missing TLV 3 for naddr");if(x[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:nl.decode(x[0][0]),pubkey:Wt(x[2][0]),kind:parseInt(Wt(x[3][0]),16),relays:x[1]?x[1].map(w=>nl.decode(w)):[]}}}case"nsec":return{type:r,data:i};case"npub":case"note":return{type:r,data:Wt(i)};default:throw new Error(`unknown prefix ${r}`)}}function pu(t){let r={},o=t;for(;o.length>0;){let i=o[0],l=o[1],c=o.slice(2,2+l);if(o=o.slice(2+l),c.length<l)throw new Error(`not enough data to read on TLV ${i}`);r[i]=r[i]||[],r[i].push(c)}return r}function Qm(t){return Gx("nsec",t)}function eT(t){return Gx("npub",kA(t))}function tT(t,r){let o=kl.toWords(r);return kl.encode(t,o,Kx)}function Gx(t,r){return tT(t,r)}function nT(){const[t,r]=y.useState(null),[o,i]=y.useState(null);y.useEffect(()=>{const f=localStorage.getItem("nostr-private-key");if(f)try{const h=qm(f);h.type==="nsec"&&(r(h.data),i(fu(h.data)))}catch(h){console.error("Failed to load stored key:",h),localStorage.removeItem("nostr-private-key")}},[]);const l=y.useCallback(()=>{const f=VA(),h=Qm(f);localStorage.setItem("nostr-private-key",h),r(f),i(fu(f))},[]),c=y.useCallback(f=>{const h=qm(f);if(h.type==="nsec")localStorage.setItem("nostr-private-key",f),r(h.data),i(fu(h.data));else throw new Error("Invalid nsec format")},[]),d=y.useCallback(()=>{localStorage.removeItem("nostr-private-key"),r(null),i(null)},[]);return{privateKey:t,publicKey:o,npub:o?eT(o):null,nsec:t?Qm(t):null,generateNewKey:l,importKey:c,clearKey:d}}function rT({className:t,type:r,...o}){return u.jsx("input",{type:r,"data-slot":"input",className:ye("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...o})}function Zm({hasKey:t,hasError:r}){return r?u.jsxs(et,{variant:"outline",className:"border-rose-500 text-rose-500 bg-rose-500/10","data-testid":"key-status-error",children:[u.jsx(vu,{className:"h-3 w-3 mr-1"}),"Error"]}):t?u.jsxs(et,{variant:"outline",className:"border-emerald-500 text-emerald-500 bg-emerald-500/10","data-testid":"key-status-configured",children:[u.jsx(Xu,{className:"h-3 w-3 mr-1"}),"Configured"]}):u.jsxs(et,{variant:"outline",className:"border-yellow-500 text-yellow-500 bg-yellow-500/10","data-testid":"key-status-not-set",children:[u.jsx(Fg,{className:"h-3 w-3 mr-1"}),"Not Set"]})}function Jm({text:t,label:r}){const[o,i]=y.useState(!1),l=y.useCallback(async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},[t]);return u.jsx(Ze,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:l,"aria-label":r||"Copy to clipboard","data-testid":"copy-button",children:o?u.jsx(_l,{className:"h-3 w-3 text-emerald-500","data-testid":"copy-check"}):u.jsx(qu,{className:"h-3 w-3"})})}function oT(){return u.jsxs("div",{className:"grid grid-cols-3 gap-4 pt-4 border-t border-border/50","data-testid":"key-metadata",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-xs text-muted-foreground uppercase",children:"Type"}),u.jsx("div",{className:"text-sm font-medium mt-1",children:"Nostr"})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-xs text-muted-foreground uppercase",children:"Created"}),u.jsx("div",{className:"text-sm font-medium mt-1",children:"Locally"})]}),u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-xs text-muted-foreground uppercase",children:"Channels"}),u.jsx("div",{className:"text-sm font-medium mt-1 font-mono",children:"0"})]})]})}function sT(){const{npub:t,nsec:r,generateNewKey:o,importKey:i,clearKey:l}=nT(),[c,d]=y.useState(!1),[f,h]=y.useState(!1),[g,v]=y.useState(null),[x,w]=y.useState(!1),[C,k]=y.useState(""),[b,N]=y.useState(!1),S=y.useCallback(async()=>{h(!0),v(null);try{await new Promise(I=>setTimeout(I,100)),o()}catch(I){v(I instanceof Error?I.message:"Failed to generate key")}finally{h(!1)}},[o]),A=y.useCallback(()=>{v(null);try{if(!C.trim()){v("Please enter a private key");return}i(C.trim()),k(""),w(!1)}catch(I){v(I instanceof Error?I.message:"Failed to import key")}},[i,C]),_=y.useCallback(()=>{b?(l(),N(!1),v(null)):(N(!0),setTimeout(()=>N(!1),3e3))},[b,l]);return!t&&!x?u.jsxs(At,{className:"w-full bg-card/80 border-border/50","data-testid":"key-manager-card",children:[u.jsxs(Yt,{className:"pb-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Xt,{className:"flex items-center gap-2 text-base",children:[u.jsx(rl,{className:"h-4 w-4"}),"Identity Key"]}),u.jsx(Zm,{hasKey:!1,hasError:!!g})]}),u.jsx(Ar,{className:"text-xs",children:"Nostr keypair for agent identity"})]}),u.jsxs(Dt,{className:"space-y-4",children:[g&&u.jsxs("div",{className:"flex items-center gap-2 p-3 bg-rose-500/10 border border-rose-500/50 rounded-lg",children:[u.jsx(vu,{className:"h-4 w-4 text-rose-500"}),u.jsx("span",{className:"text-sm text-rose-500",children:g})]}),u.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground","data-testid":"empty-state",children:[u.jsx("div",{"data-testid":"empty-state-icon",className:"h-12 w-12 text-cyan-500 mb-4 animate-pulse",children:u.jsx(rl,{className:"h-12 w-12"})}),u.jsx("p",{className:"text-lg font-medium",children:"No identity key configured"}),u.jsx("p",{className:"text-sm mt-1 max-w-md text-center",children:"Generate a new keypair or import an existing one to establish your node's identity."})]}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[u.jsxs(Ze,{variant:"outline",onClick:S,disabled:f,className:"flex-1","data-testid":"generate-button",children:[u.jsx(nm,{className:"h-4 w-4 mr-2"}),f?"Generating...":"Generate New Key"]}),u.jsxs(Ze,{variant:"outline",onClick:()=>w(!0),className:"flex-1","data-testid":"import-button",children:[u.jsx(rm,{className:"h-4 w-4 mr-2"}),"Import Key"]})]})]})]}):u.jsxs(At,{className:"w-full bg-card/80 border-border/50","data-testid":"key-manager-card",children:[u.jsxs(Yt,{className:"pb-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Xt,{className:"flex items-center gap-2 text-base",children:[u.jsx(rl,{className:"h-4 w-4"}),"Identity Key"]}),u.jsx(Zm,{hasKey:!!t,hasError:!!g})]}),u.jsx(Ar,{className:"text-xs",children:"Nostr keypair for agent identity"})]}),u.jsxs(Dt,{className:"space-y-4",children:[g&&u.jsxs("div",{className:"flex items-center gap-2 p-3 bg-rose-500/10 border border-rose-500/50 rounded-lg",children:[u.jsx(vu,{className:"h-4 w-4 text-rose-500"}),u.jsx("span",{className:"text-sm text-rose-500",children:g})]}),x&&u.jsxs("div",{className:"border border-border/50 rounded-lg p-4 space-y-3 bg-muted/30",children:[u.jsx("h3",{className:"font-medium",children:"Import Private Key"}),u.jsx(rT,{placeholder:"nsec1...",value:C,onChange:I=>k(I.target.value),className:"font-mono text-sm","data-testid":"import-input"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Ze,{onClick:A,className:"flex-1","data-testid":"confirm-import-button",children:"Import"}),u.jsx(Ze,{variant:"outline",onClick:()=>{w(!1),k(""),v(null)},className:"flex-1","data-testid":"cancel-import-button",children:"Cancel"})]})]}),t&&!x&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"space-y-1","data-testid":"npub-section",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"Public Key (npub)"}),u.jsx(Jm,{text:t,label:"Copy public key"})]}),u.jsx("div",{className:"p-3 rounded-md bg-muted/50 border border-border/50",children:u.jsx("code",{className:"font-mono text-sm break-all tabular-nums","data-testid":"npub-value",children:t})})]}),u.jsxs("div",{className:"space-y-1","data-testid":"nsec-section",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"Private Key (nsec)"}),u.jsxs("div",{className:"flex items-center gap-1",children:[r&&c&&u.jsx(Jm,{text:r,label:"Copy private key"}),u.jsx(Ze,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>d(!c),disabled:!r,"aria-label":"Toggle private key visibility","data-testid":"toggle-nsec-visibility",children:c?u.jsx(uE,{className:"h-3 w-3"}):u.jsx(fE,{className:"h-3 w-3"})})]})]}),u.jsx("div",{className:"p-3 rounded-md bg-muted/50 border border-border/50",children:u.jsx("code",{className:"font-mono text-sm break-all tabular-nums","data-testid":"nsec-value",children:c?r:"•".repeat(63)})})]}),u.jsxs("div",{className:"flex items-center gap-2 p-3 bg-emerald-500/10 border border-emerald-500/50 rounded-lg","data-testid":"security-indicator",children:[u.jsx(jE,{className:"h-4 w-4 text-emerald-500"}),u.jsx("span",{className:"text-sm text-emerald-500",children:"Key never leaves your browser"})]}),u.jsx(oT,{}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[u.jsxs(Ze,{variant:"outline",onClick:S,disabled:f,className:"flex-1","data-testid":"regenerate-button",children:[u.jsx(nm,{className:"h-4 w-4 mr-2"}),f?"Generating...":"Generate New Key"]}),u.jsxs(Ze,{variant:"outline",onClick:()=>w(!0),className:"flex-1","data-testid":"import-new-button",children:[u.jsx(rm,{className:"h-4 w-4 mr-2"}),"Import Key"]}),u.jsxs(Ze,{variant:"outline",onClick:_,className:ye("flex-1",b&&"border-rose-500 text-rose-500 hover:bg-rose-500/10"),"data-testid":"clear-button",children:[u.jsx(DE,{className:"h-4 w-4 mr-2"}),b?"Confirm Clear":"Clear Key"]})]})]})]})]})}const iT=y.lazy(()=>tg(()=>import("./FilterBar-BEmAzBku.js"),__vite__mapDeps([0,1])).then(t=>({default:t.FilterBar}))),lT=y.lazy(()=>tg(()=>import("./EventDetailPanel-CnSaMk3V.js"),__vite__mapDeps([2,1])).then(t=>({default:t.EventDetailPanel})));function aT(){return u.jsx("nav",{className:"border-b border-border px-4 py-2",children:u.jsx("div",{className:"flex items-center gap-4",children:u.jsxs(s1,{to:"/",className:"flex items-center gap-2 px-3 py-2 rounded-md transition-colors bg-secondary text-secondary-foreground",children:[u.jsx($g,{className:"h-4 w-4"}),"Explorer"]})})})}function cT(){const{filters:t,setFilters:r,resetFilters:o,hasActiveFilters:i,activeFilterCount:l}=u1(),{mode:c,setMode:d,events:f,total:h,loading:g,error:v,connectionStatus:x,loadMore:w,hasMore:C,jumpToLive:k}=E1({filters:t,pageSize:50,maxLiveEvents:1e3}),[b,N]=y.useState(null),[S,A]=y.useState("dashboard"),[_,I]=y.useState(!1),O=y.useCallback(V=>{},[]);y.useEffect(()=>{const V=H=>{const F=document.activeElement;if(F){const Y=F.tagName.toUpperCase();if(Y==="INPUT"||Y==="TEXTAREA"||Y==="SELECT"||F.isContentEditable||F.getAttribute("contenteditable")==="true")return}switch(H.key){case"1":A("dashboard");break;case"2":A("events");break;case"3":A("accounts");break;case"4":A("peers");break;case"5":A("keys");break;case"/":{H.preventDefault();const Y=document.getElementById("explorer-search-input");Y&&Y.focus();break}case"?":I(!0);break}};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[]);const U=y.useCallback(V=>{N(V)},[]),M=y.useCallback(()=>{N(null)},[]),D=y.useCallback(V=>{N(V)},[]),X=y.useCallback(V=>{d(V)},[d]);return u.jsxs("div",{className:"dark",children:[u.jsx(WC,{status:x,eventCount:f.length,onHelpOpen:()=>I(!0)}),u.jsxs("div",{className:"flex items-center gap-2 px-4 md:px-6 py-2 border-b border-border flex-wrap",children:[u.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"View:"}),u.jsxs(Ze,{variant:c==="live"?"secondary":"ghost",size:"sm",onClick:()=>X("live"),className:`gap-2 ${c==="live"?"border border-green-500/30":""}`,children:[c==="live"&&u.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),u.jsx(vs,{className:`h-4 w-4 ${c==="live"?"text-green-500":""}`}),"Live"]}),u.jsxs(Ze,{variant:c==="history"?"secondary":"ghost",size:"sm",onClick:()=>X("history"),className:`gap-2 ${c==="history"?"border border-muted-foreground/30":""}`,children:[u.jsx(gE,{className:`h-4 w-4 ${c==="history"?"text-muted-foreground":""}`}),"History"]}),c==="live"&&x==="connected"&&u.jsxs("span",{className:"ml-2 text-xs text-green-500 flex items-center gap-1",children:[u.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),"Streaming"]}),c==="live"&&x==="connecting"&&u.jsxs("span",{className:"ml-2 text-xs text-yellow-500 flex items-center gap-1",children:[u.jsx("span",{className:"w-2 h-2 rounded-full bg-yellow-500 animate-pulse"}),"Connecting..."]}),c==="history"&&u.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:[h.toLocaleString()," total events"]})]}),u.jsx("div",{className:"px-4 md:px-6 py-2 border-b border-border bg-card/30",children:u.jsx(lS,{value:S,onValueChange:V=>A(V),children:u.jsxs(cS,{children:[u.jsxs(ms,{value:"dashboard",className:"gap-2",children:[u.jsx(NE,{className:"h-4 w-4"}),"Dashboard"]}),u.jsxs(ms,{value:"events",className:"gap-2",children:[u.jsx($g,{className:"h-4 w-4"}),"Packets"]}),u.jsxs(ms,{value:"accounts",className:"gap-2",children:[u.jsx(_s,{className:"h-4 w-4"}),"Accounts"]}),u.jsxs(ms,{value:"peers",className:"gap-2",children:[u.jsx(Zu,{className:"h-4 w-4"}),"Peers"]}),u.jsxs(ms,{value:"keys",className:"gap-2",children:[u.jsx(rl,{className:"h-4 w-4"}),"Keys"]})]})})}),S==="events"&&u.jsx(y.Suspense,{fallback:null,children:u.jsx(iT,{filters:t,onFilterChange:r,onReset:o,activeFilterCount:l})}),u.jsxs("main",{className:"px-4 md:px-6 py-4",children:[v&&u.jsx("div",{className:"mb-4 p-4 border border-destructive rounded-md bg-destructive/10 text-destructive",children:v}),S==="dashboard"?u.jsx(VC,{events:f,connectionStatus:x}):S==="events"?u.jsx(_C,{events:f,onEventClick:U,loading:g,showPagination:c==="history",total:h,onLoadMore:C?w:void 0,connectionStatus:x,hasActiveFilters:i,onClearFilters:o,onScrollStateChange:O}):S==="accounts"?u.jsx(Ak,{}):S==="peers"?u.jsx(Mk,{}):u.jsx("div",{className:"max-w-2xl mx-auto",children:u.jsx(sT,{})})]}),u.jsx(KC,{visible:c==="history"&&S==="events",connectionStatus:x,onClick:k}),S==="events"&&u.jsx(y.Suspense,{fallback:null,children:u.jsx(lT,{event:b,onClose:M,onEventSelect:D})}),u.jsx(Mj,{open:_,onOpenChange:I})]})}function uT(){return u.jsx(n1,{children:u.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[u.jsx(aT,{}),u.jsx(Xw,{children:u.jsx(pg,{path:"/",element:u.jsx(cT,{})})})]})})}Jy.createRoot(document.getElementById("root")).render(u.jsx(bn.StrictMode,{children:u.jsx(uT,{})}));export{B1 as $,M2 as A,Ze as B,O2 as C,td as D,et as E,X0 as F,Wh as G,wj as H,dT as I,Nj as J,Sj as K,kj as L,bj as M,qu as N,Ej as O,He as P,Qu as Q,L2 as R,fT as S,Cj as T,vg as U,G2 as V,_s as W,zg as X,z1 as Y,ed as Z,Ku as _,Ts as a,jj as a0,_j as a1,Pj as a2,Rj as a3,Ij as a4,O1 as a5,D1 as a6,pT as a7,lS as a8,cS as a9,ms as aa,hT as ab,fo as b,be as c,wt as d,Me as e,Ir as f,ud as g,r0 as h,rj as i,u as j,ox as k,Eo as l,xS as m,D2 as n,ye as o,R0 as p,rr as q,y as r,jl as s,zk as t,Ol as u,Sr as v,_l as w,bn as x,YE as y,rT as z};