@ouro.bot/cli 0.1.0-alpha.56 → 0.1.0-alpha.561

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 (396) hide show
  1. package/README.md +127 -23
  2. package/RepairGuide.ouro/agent.json +5 -0
  3. package/RepairGuide.ouro/psyche/IDENTITY.md +19 -0
  4. package/RepairGuide.ouro/psyche/SOUL.md +55 -0
  5. package/RepairGuide.ouro/skills/diagnose-broken-remote.md +63 -0
  6. package/RepairGuide.ouro/skills/diagnose-stacked-typed-issues.md +35 -0
  7. package/RepairGuide.ouro/skills/diagnose-sync-blocked.md +54 -0
  8. package/RepairGuide.ouro/skills/diagnose-vault-expired.md +60 -0
  9. package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/agent.json +4 -2
  10. package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/SOUL.md +2 -2
  11. package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/the-serpent.md +1 -1
  12. package/changelog.json +3604 -0
  13. package/dist/arc/attention-types.js +8 -0
  14. package/dist/arc/cares.js +140 -0
  15. package/dist/arc/episodes.js +117 -0
  16. package/dist/arc/intentions.js +133 -0
  17. package/dist/arc/json-store.js +117 -0
  18. package/dist/arc/obligations.js +237 -0
  19. package/dist/arc/packets.js +193 -0
  20. package/dist/arc/presence.js +185 -0
  21. package/dist/arc/task-lifecycle.js +65 -0
  22. package/dist/heart/active-work.js +837 -26
  23. package/dist/heart/agent-entry.js +58 -3
  24. package/dist/heart/attachments/image-normalize.js +194 -0
  25. package/dist/heart/attachments/materialize.js +97 -0
  26. package/dist/heart/attachments/originals.js +88 -0
  27. package/dist/heart/attachments/render.js +29 -0
  28. package/dist/heart/attachments/sources/adapter.js +2 -0
  29. package/dist/heart/attachments/sources/bluebubbles.js +156 -0
  30. package/dist/heart/attachments/sources/cli-local-file.js +78 -0
  31. package/dist/heart/attachments/sources/index.js +16 -0
  32. package/dist/heart/attachments/store.js +103 -0
  33. package/dist/heart/attachments/types.js +93 -0
  34. package/dist/heart/auth/auth-flow.js +479 -0
  35. package/dist/heart/background-operations.js +281 -0
  36. package/dist/heart/bundle-state.js +168 -0
  37. package/dist/heart/commitments.js +111 -0
  38. package/dist/heart/config-registry.js +322 -0
  39. package/dist/heart/config.js +114 -118
  40. package/dist/heart/core.js +913 -246
  41. package/dist/heart/cross-chat-delivery.js +3 -18
  42. package/dist/heart/daemon/agent-config-check.js +419 -0
  43. package/dist/heart/daemon/agent-discovery.js +102 -3
  44. package/dist/heart/daemon/agent-service.js +522 -0
  45. package/dist/heart/daemon/agentic-repair.js +547 -0
  46. package/dist/heart/daemon/bluebubbles-health-diagnostics.js +122 -0
  47. package/dist/heart/daemon/boot-sync-probe.js +197 -0
  48. package/dist/heart/daemon/cadence.js +70 -0
  49. package/dist/heart/daemon/cli-defaults.js +776 -0
  50. package/dist/heart/daemon/cli-exec.js +7457 -0
  51. package/dist/heart/daemon/cli-help.js +498 -0
  52. package/dist/heart/daemon/cli-parse.js +1592 -0
  53. package/dist/heart/daemon/cli-render-doctor.js +57 -0
  54. package/dist/heart/daemon/cli-render.js +763 -0
  55. package/dist/heart/daemon/cli-types.js +8 -0
  56. package/dist/heart/daemon/connect-bay.js +323 -0
  57. package/dist/heart/daemon/daemon-cli.js +29 -1698
  58. package/dist/heart/daemon/daemon-entry.js +387 -2
  59. package/dist/heart/daemon/daemon-health.js +176 -0
  60. package/dist/heart/daemon/daemon-rollup.js +57 -0
  61. package/dist/heart/daemon/daemon-runtime-sync.js +88 -13
  62. package/dist/heart/daemon/daemon-tombstone.js +236 -0
  63. package/dist/heart/daemon/daemon.js +796 -71
  64. package/dist/heart/daemon/dns-workflow.js +394 -0
  65. package/dist/heart/daemon/doctor-types.js +8 -0
  66. package/dist/heart/daemon/doctor.js +826 -0
  67. package/dist/heart/daemon/health-monitor.js +122 -1
  68. package/dist/heart/daemon/hooks/agent-config-v2.js +33 -0
  69. package/dist/heart/daemon/hooks/bundle-meta.js +115 -1
  70. package/dist/heart/daemon/http-health-probe.js +80 -0
  71. package/dist/heart/daemon/human-command-screens.js +234 -0
  72. package/dist/heart/daemon/human-readiness.js +114 -0
  73. package/dist/heart/daemon/inner-status.js +89 -0
  74. package/dist/heart/daemon/interactive-repair.js +394 -0
  75. package/dist/heart/daemon/launchd.js +37 -8
  76. package/dist/heart/daemon/log-tailer.js +82 -12
  77. package/dist/heart/daemon/logs-prune.js +110 -0
  78. package/dist/heart/daemon/mcp-canary.js +297 -0
  79. package/dist/heart/daemon/message-router.js +2 -2
  80. package/dist/heart/daemon/os-cron-deps.js +135 -0
  81. package/dist/heart/daemon/os-cron.js +14 -12
  82. package/dist/heart/daemon/ouro-bot-entry.js +4 -2
  83. package/dist/heart/daemon/ouro-entry.js +3 -1
  84. package/dist/heart/daemon/process-manager.js +375 -33
  85. package/dist/heart/daemon/provider-discovery.js +137 -0
  86. package/dist/heart/daemon/provider-ping-progress.js +83 -0
  87. package/dist/heart/daemon/pulse.js +475 -0
  88. package/dist/heart/daemon/readiness-repair.js +365 -0
  89. package/dist/heart/daemon/run-hooks.js +2 -0
  90. package/dist/heart/daemon/runtime-logging.js +67 -16
  91. package/dist/heart/daemon/runtime-metadata.js +3 -31
  92. package/dist/heart/daemon/safe-mode.js +161 -0
  93. package/dist/heart/daemon/sense-manager.js +389 -38
  94. package/dist/heart/daemon/session-id-resolver.js +131 -0
  95. package/dist/heart/daemon/skill-management-installer.js +94 -0
  96. package/dist/heart/daemon/socket-client.js +158 -11
  97. package/dist/heart/daemon/stale-bundle-prune.js +96 -0
  98. package/dist/heart/daemon/startup-tui.js +330 -0
  99. package/dist/heart/daemon/task-scheduler.js +3 -25
  100. package/dist/heart/daemon/terminal-ui.js +499 -0
  101. package/dist/heart/daemon/thoughts.js +162 -17
  102. package/dist/heart/daemon/up-progress.js +366 -0
  103. package/dist/heart/daemon/vault-items.js +56 -0
  104. package/dist/heart/delegation.js +1 -1
  105. package/dist/heart/habits/habit-migration.js +189 -0
  106. package/dist/heart/habits/habit-parser.js +140 -0
  107. package/dist/heart/habits/habit-runtime-state.js +100 -0
  108. package/dist/heart/habits/habit-scheduler.js +372 -0
  109. package/dist/heart/{daemon → hatch}/hatch-flow.js +32 -56
  110. package/dist/heart/{daemon → hatch}/hatch-specialist.js +6 -8
  111. package/dist/heart/{daemon → hatch}/specialist-prompt.js +12 -9
  112. package/dist/heart/{daemon → hatch}/specialist-tools.js +35 -12
  113. package/dist/heart/identity.js +203 -57
  114. package/dist/heart/kept-notes.js +357 -0
  115. package/dist/heart/kicks.js +1 -1
  116. package/dist/heart/machine-identity.js +161 -0
  117. package/dist/heart/mail-import-discovery.js +353 -0
  118. package/dist/heart/mailbox/mailbox-http-hooks.js +66 -0
  119. package/dist/heart/mailbox/mailbox-http-response.js +7 -0
  120. package/dist/heart/mailbox/mailbox-http-routes.js +246 -0
  121. package/dist/heart/mailbox/mailbox-http-static.js +103 -0
  122. package/dist/heart/mailbox/mailbox-http-transport.js +116 -0
  123. package/dist/heart/mailbox/mailbox-http.js +99 -0
  124. package/dist/heart/mailbox/mailbox-read.js +31 -0
  125. package/dist/heart/mailbox/mailbox-types.js +27 -0
  126. package/dist/heart/mailbox/mailbox-view.js +195 -0
  127. package/dist/heart/mailbox/readers/agent-machine.js +382 -0
  128. package/dist/heart/mailbox/readers/continuity-readers.js +338 -0
  129. package/dist/heart/mailbox/readers/mail.js +362 -0
  130. package/dist/heart/mailbox/readers/runtime-readers.js +651 -0
  131. package/dist/heart/mailbox/readers/sessions.js +232 -0
  132. package/dist/heart/mailbox/readers/shared.js +111 -0
  133. package/dist/heart/mcp/mcp-server.js +683 -0
  134. package/dist/heart/migrate-config.js +100 -0
  135. package/dist/heart/model-capabilities.js +19 -0
  136. package/dist/heart/platform.js +81 -0
  137. package/dist/heart/provider-attempt.js +134 -0
  138. package/dist/heart/provider-binding-resolver.js +267 -0
  139. package/dist/heart/provider-credentials.js +425 -0
  140. package/dist/heart/provider-failover.js +301 -0
  141. package/dist/heart/provider-models.js +81 -0
  142. package/dist/heart/provider-ping.js +262 -0
  143. package/dist/heart/provider-readiness-cache.js +40 -0
  144. package/dist/heart/provider-visibility.js +188 -0
  145. package/dist/heart/providers/anthropic-token.js +131 -0
  146. package/dist/heart/providers/anthropic.js +139 -52
  147. package/dist/heart/providers/azure.js +97 -13
  148. package/dist/heart/providers/error-classification.js +127 -0
  149. package/dist/heart/providers/github-copilot.js +145 -0
  150. package/dist/heart/providers/minimax-vlm.js +189 -0
  151. package/dist/heart/providers/minimax.js +26 -8
  152. package/dist/heart/providers/openai-codex.js +55 -40
  153. package/dist/heart/runtime-capability-check.js +170 -0
  154. package/dist/heart/runtime-credentials.js +367 -0
  155. package/dist/heart/runtime-cwd.js +87 -0
  156. package/dist/heart/sense-truth.js +13 -4
  157. package/dist/heart/session-activity.js +43 -22
  158. package/dist/heart/session-events.js +1149 -0
  159. package/dist/heart/session-playback-cli-main.js +5 -0
  160. package/dist/heart/session-playback-cli.js +36 -0
  161. package/dist/heart/session-playback.js +231 -0
  162. package/dist/heart/session-stats-cli-main.js +5 -0
  163. package/dist/heart/session-stats.js +182 -0
  164. package/dist/heart/session-transcript.js +243 -0
  165. package/dist/heart/start-of-turn-packet.js +345 -0
  166. package/dist/heart/streaming.js +44 -27
  167. package/dist/heart/sync-classification.js +176 -0
  168. package/dist/heart/sync.js +449 -0
  169. package/dist/heart/target-resolution.js +9 -5
  170. package/dist/heart/tempo.js +93 -0
  171. package/dist/heart/temporal-view.js +41 -0
  172. package/dist/heart/timeouts.js +101 -0
  173. package/dist/heart/tool-activity-callbacks.js +59 -0
  174. package/dist/heart/tool-description.js +139 -0
  175. package/dist/heart/tool-friction.js +55 -0
  176. package/dist/heart/tool-loop.js +200 -0
  177. package/dist/heart/turn-context.js +389 -0
  178. package/dist/heart/{daemon → versioning}/ouro-bot-global-installer.js +6 -5
  179. package/dist/heart/{daemon → versioning}/ouro-bot-wrapper.js +1 -1
  180. package/dist/heart/versioning/ouro-path-installer.js +426 -0
  181. package/dist/heart/versioning/ouro-version-manager.js +295 -0
  182. package/dist/heart/{daemon → versioning}/staged-restart.js +40 -8
  183. package/dist/heart/{daemon → versioning}/update-checker.js +6 -1
  184. package/dist/heart/{daemon → versioning}/update-hooks.js +63 -59
  185. package/dist/mailbox-ui/assets/index-B-461hes.js +61 -0
  186. package/dist/mailbox-ui/assets/index-BPr5vNuM.css +1 -0
  187. package/dist/mailbox-ui/index.html +15 -0
  188. package/dist/mailroom/attention.js +167 -0
  189. package/dist/mailroom/autonomy.js +209 -0
  190. package/dist/mailroom/blob-store.js +674 -0
  191. package/dist/mailroom/body-cache.js +61 -0
  192. package/dist/mailroom/core.js +720 -0
  193. package/dist/mailroom/entry.js +160 -0
  194. package/dist/mailroom/file-store.js +430 -0
  195. package/dist/mailroom/mbox-import.js +383 -0
  196. package/dist/mailroom/outbound.js +380 -0
  197. package/dist/mailroom/policy.js +263 -0
  198. package/dist/mailroom/reader.js +233 -0
  199. package/dist/mailroom/search-cache.js +256 -0
  200. package/dist/mailroom/search-relevance.js +319 -0
  201. package/dist/mailroom/smtp-ingress.js +176 -0
  202. package/dist/mailroom/source-state.js +176 -0
  203. package/dist/mailroom/thread.js +109 -0
  204. package/dist/mailroom/travel-extract.js +89 -0
  205. package/dist/mind/bundle-manifest.js +7 -1
  206. package/dist/mind/context.js +165 -101
  207. package/dist/mind/diary-integrity.js +60 -0
  208. package/dist/mind/{memory.js → diary.js} +62 -75
  209. package/dist/mind/embedding-provider.js +60 -0
  210. package/dist/mind/file-state.js +179 -0
  211. package/dist/mind/friends/channel.js +39 -0
  212. package/dist/mind/friends/resolver.js +54 -2
  213. package/dist/mind/friends/store-file.js +39 -3
  214. package/dist/mind/friends/types.js +2 -2
  215. package/dist/mind/journal-index.js +161 -0
  216. package/dist/mind/note-search.js +268 -0
  217. package/dist/mind/obligation-steering.js +221 -0
  218. package/dist/mind/pending.js +4 -0
  219. package/dist/mind/prompt-refresh.js +3 -2
  220. package/dist/mind/prompt.js +1011 -123
  221. package/dist/mind/provenance-trust.js +26 -0
  222. package/dist/mind/scrutiny.js +173 -0
  223. package/dist/nerves/cli-logging.js +7 -1
  224. package/dist/nerves/coverage/audit-rules.js +15 -6
  225. package/dist/nerves/coverage/audit.js +28 -2
  226. package/dist/nerves/coverage/cli.js +1 -1
  227. package/dist/nerves/coverage/contract.js +5 -5
  228. package/dist/nerves/coverage/file-completeness.js +129 -5
  229. package/dist/nerves/coverage/run-artifacts.js +1 -1
  230. package/dist/nerves/event-buffer.js +111 -0
  231. package/dist/nerves/index.js +224 -4
  232. package/dist/nerves/observation.js +20 -0
  233. package/dist/nerves/redact.js +79 -0
  234. package/dist/nerves/review/cli-main.js +5 -0
  235. package/dist/nerves/review/cli.js +156 -0
  236. package/dist/nerves/review/core.js +152 -0
  237. package/dist/nerves/runtime.js +5 -1
  238. package/dist/repertoire/ado-client.js +15 -56
  239. package/dist/repertoire/ado-semantic.js +11 -10
  240. package/dist/repertoire/api-client.js +97 -0
  241. package/dist/repertoire/bitwarden-store.js +963 -0
  242. package/dist/repertoire/bundle-templates.js +72 -0
  243. package/dist/repertoire/bw-installer.js +180 -0
  244. package/dist/repertoire/coding/codex-jsonl.js +64 -0
  245. package/dist/repertoire/coding/context-pack.js +330 -0
  246. package/dist/repertoire/coding/feedback.js +197 -30
  247. package/dist/repertoire/coding/manager.js +158 -9
  248. package/dist/repertoire/coding/spawner.js +55 -9
  249. package/dist/repertoire/coding/tools.js +170 -7
  250. package/dist/repertoire/commerce-errors.js +109 -0
  251. package/dist/repertoire/commerce-self-test.js +156 -0
  252. package/dist/repertoire/credential-access.js +178 -0
  253. package/dist/repertoire/duffel-client.js +185 -0
  254. package/dist/repertoire/github-client.js +14 -55
  255. package/dist/repertoire/graph-client.js +11 -52
  256. package/dist/repertoire/guardrails.js +396 -0
  257. package/dist/repertoire/mcp-client.js +295 -0
  258. package/dist/repertoire/mcp-manager.js +362 -0
  259. package/dist/repertoire/mcp-tools.js +63 -0
  260. package/dist/repertoire/shell-sessions.js +133 -0
  261. package/dist/repertoire/skills.js +15 -24
  262. package/dist/repertoire/stripe-client.js +131 -0
  263. package/dist/repertoire/tasks/board.js +31 -5
  264. package/dist/repertoire/tasks/fix.js +182 -0
  265. package/dist/repertoire/tasks/index.js +16 -4
  266. package/dist/repertoire/tasks/lifecycle.js +2 -2
  267. package/dist/repertoire/tasks/parser.js +3 -2
  268. package/dist/repertoire/tasks/scanner.js +194 -37
  269. package/dist/repertoire/tasks/transitions.js +16 -78
  270. package/dist/repertoire/tool-results.js +29 -0
  271. package/dist/repertoire/tools-attachments.js +317 -0
  272. package/dist/repertoire/tools-base.js +47 -1075
  273. package/dist/repertoire/tools-bluebubbles.js +1 -0
  274. package/dist/repertoire/tools-bridge.js +142 -0
  275. package/dist/repertoire/tools-bundle.js +984 -0
  276. package/dist/repertoire/tools-config.js +185 -0
  277. package/dist/repertoire/tools-continuity.js +248 -0
  278. package/dist/repertoire/tools-credential.js +381 -0
  279. package/dist/repertoire/tools-files.js +342 -0
  280. package/dist/repertoire/tools-flight.js +224 -0
  281. package/dist/repertoire/tools-flow.js +119 -0
  282. package/dist/repertoire/tools-github.js +1 -7
  283. package/dist/repertoire/tools-mail.js +1857 -0
  284. package/dist/repertoire/tools-notes.js +421 -0
  285. package/dist/repertoire/tools-session.js +750 -0
  286. package/dist/repertoire/tools-shell.js +120 -0
  287. package/dist/repertoire/tools-stripe.js +180 -0
  288. package/dist/repertoire/tools-surface.js +243 -0
  289. package/dist/repertoire/tools-teams.js +9 -39
  290. package/dist/repertoire/tools-travel.js +125 -0
  291. package/dist/repertoire/tools-trip.js +604 -0
  292. package/dist/repertoire/tools-user-profile.js +144 -0
  293. package/dist/repertoire/tools-vault.js +40 -0
  294. package/dist/repertoire/tools.js +108 -100
  295. package/dist/repertoire/travel-api-client.js +360 -0
  296. package/dist/repertoire/user-profile.js +131 -0
  297. package/dist/repertoire/vault-setup.js +246 -0
  298. package/dist/repertoire/vault-unlock.js +594 -0
  299. package/dist/scripts/claude-code-hook.js +41 -0
  300. package/dist/scripts/claude-code-stop-hook.js +47 -0
  301. package/dist/senses/attention-queue.js +116 -0
  302. package/dist/senses/bluebubbles/active-turns.js +216 -0
  303. package/dist/senses/bluebubbles/attachment-cache.js +53 -0
  304. package/dist/senses/bluebubbles/attachment-download.js +137 -0
  305. package/dist/senses/{bluebubbles-client.js → bluebubbles/client.js} +219 -18
  306. package/dist/senses/bluebubbles/entry.js +77 -0
  307. package/dist/senses/{bluebubbles-inbound-log.js → bluebubbles/inbound-log.js} +20 -3
  308. package/dist/senses/bluebubbles/index.js +2305 -0
  309. package/dist/senses/{bluebubbles-media.js → bluebubbles/media.js} +121 -70
  310. package/dist/senses/{bluebubbles-model.js → bluebubbles/model.js} +33 -12
  311. package/dist/senses/{bluebubbles-mutation-log.js → bluebubbles/mutation-log.js} +3 -3
  312. package/dist/senses/bluebubbles/processed-log.js +133 -0
  313. package/dist/senses/bluebubbles/replay.js +137 -0
  314. package/dist/senses/{bluebubbles-runtime-state.js → bluebubbles/runtime-state.js} +30 -2
  315. package/dist/senses/{bluebubbles-session-cleanup.js → bluebubbles/session-cleanup.js} +1 -1
  316. package/dist/senses/cli/bracketed-paste.js +82 -0
  317. package/dist/senses/cli/image-paste.js +287 -0
  318. package/dist/senses/cli/image-ref-navigation.js +75 -0
  319. package/dist/senses/cli/ink-app.js +156 -0
  320. package/dist/senses/cli/inline-diff.js +64 -0
  321. package/dist/senses/cli/input-keys.js +174 -0
  322. package/dist/senses/cli/kill-ring.js +86 -0
  323. package/dist/senses/cli/message-list.js +51 -0
  324. package/dist/senses/cli/ouro-tui.js +607 -0
  325. package/dist/senses/cli/spinner-imperative.js +135 -0
  326. package/dist/senses/cli/spinner.js +101 -0
  327. package/dist/senses/cli/status-line.js +60 -0
  328. package/dist/senses/cli/streaming-markdown.js +526 -0
  329. package/dist/senses/cli/tool-display.js +85 -0
  330. package/dist/senses/cli/tool-render.js +85 -0
  331. package/dist/senses/cli/tui-store.js +240 -0
  332. package/dist/senses/cli/virtual-list.js +35 -0
  333. package/dist/senses/cli-entry.js +60 -8
  334. package/dist/senses/cli-layout.js +187 -0
  335. package/dist/senses/cli.js +520 -209
  336. package/dist/senses/commands.js +66 -3
  337. package/dist/senses/habit-turn-message.js +108 -0
  338. package/dist/senses/inner-dialog-worker.js +175 -21
  339. package/dist/senses/inner-dialog.js +330 -27
  340. package/dist/senses/mail-entry.js +66 -0
  341. package/dist/senses/mail.js +379 -0
  342. package/dist/senses/pipeline.js +549 -181
  343. package/dist/senses/proactive-content-guard.js +51 -0
  344. package/dist/senses/shared-turn.js +251 -0
  345. package/dist/senses/surface-tool.js +68 -0
  346. package/dist/senses/teams-entry.js +60 -8
  347. package/dist/senses/teams.js +387 -98
  348. package/dist/senses/trust-gate.js +100 -5
  349. package/dist/senses/voice/audio-routing.js +119 -0
  350. package/dist/senses/voice/elevenlabs.js +178 -0
  351. package/dist/senses/voice/golden-path.js +116 -0
  352. package/dist/senses/voice/index.js +26 -0
  353. package/dist/senses/voice/meeting.js +113 -0
  354. package/dist/senses/voice/playback.js +139 -0
  355. package/dist/senses/voice/transcript.js +70 -0
  356. package/dist/senses/voice/turn.js +85 -0
  357. package/dist/senses/voice/types.js +2 -0
  358. package/dist/senses/voice/whisper.js +161 -0
  359. package/dist/senses/voice-entry.js +80 -0
  360. package/dist/trips/core.js +138 -0
  361. package/dist/trips/store.js +146 -0
  362. package/package.json +38 -7
  363. package/skills/agent-commerce.md +106 -0
  364. package/skills/browser-navigation.md +117 -0
  365. package/skills/commerce-setup-guide.md +116 -0
  366. package/skills/commerce-setup.md +84 -0
  367. package/skills/configure-dev-tools.md +101 -0
  368. package/skills/travel-planning.md +138 -0
  369. package/dist/heart/daemon/auth-flow.js +0 -351
  370. package/dist/heart/daemon/ouro-path-installer.js +0 -178
  371. package/dist/heart/daemon/subagent-installer.js +0 -166
  372. package/dist/heart/session-recall.js +0 -116
  373. package/dist/mind/associative-recall.js +0 -209
  374. package/dist/senses/bluebubbles-entry.js +0 -13
  375. package/dist/senses/bluebubbles.js +0 -1177
  376. package/dist/senses/debug-activity.js +0 -148
  377. package/subagents/README.md +0 -86
  378. package/subagents/work-doer.md +0 -237
  379. package/subagents/work-merger.md +0 -618
  380. package/subagents/work-planner.md +0 -390
  381. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/basilisk.md +0 -0
  382. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/jafar.md +0 -0
  383. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/jormungandr.md +0 -0
  384. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/kaa.md +0 -0
  385. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/medusa.md +0 -0
  386. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/monty.md +0 -0
  387. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/nagini.md +0 -0
  388. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/ouroboros.md +0 -0
  389. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/python.md +0 -0
  390. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/quetzalcoatl.md +0 -0
  391. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/sir-hiss.md +0 -0
  392. /package/{AdoptionSpecialist.ouro → SerpentGuide.ouro}/psyche/identities/the-snake.md +0 -0
  393. /package/dist/heart/{daemon → hatch}/hatch-animation.js +0 -0
  394. /package/dist/heart/{daemon → hatch}/specialist-orchestrator.js +0 -0
  395. /package/dist/heart/{daemon → versioning}/ouro-uti.js +0 -0
  396. /package/dist/heart/{daemon → versioning}/wrapper-publish-guard.js +0 -0
@@ -0,0 +1,61 @@
1
+ function x2(n,a){for(var s=0;s<a.length;s++){const r=a[s];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in n)){const d=Object.getOwnPropertyDescriptor(r,o);d&&Object.defineProperty(n,o,d.get?d:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function s(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=s(o);fetch(o.href,d)}})();function y2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var uf={exports:{}},Qs={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var cv;function b2(){if(cv)return Qs;cv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var p in o)p!=="key"&&(d[p]=o[p])}else d=o;return o=d.ref,{$$typeof:n,type:r,key:h,ref:o!==void 0?o:null,props:d}}return Qs.Fragment=a,Qs.jsx=s,Qs.jsxs=s,Qs}var fv;function S2(){return fv||(fv=1,uf.exports=b2()),uf.exports}var f=S2(),cf={exports:{}},fe={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var dv;function w2(){if(dv)return fe;dv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function w(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function z(A,G,K){this.props=A,this.context=G,this.refs=C,this.updater=K||j}z.prototype.isReactComponent={},z.prototype.setState=function(A,G){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,G,"setState")},z.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function D(){}D.prototype=z.prototype;function R(A,G,K){this.props=A,this.context=G,this.refs=C,this.updater=K||j}var k=R.prototype=new D;k.constructor=R,E(k,z.prototype),k.isPureReactComponent=!0;var U=Array.isArray;function P(){}var F={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function re(A,G,K){var I=K.ref;return{$$typeof:n,type:A,key:G,ref:I!==void 0?I:null,props:K}}function B(A,G){return re(A.type,G,A.props)}function Z(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function ie(A){var G={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(K){return G[K]})}var le=/\/+/g;function Se(A,G){return typeof A=="object"&&A!==null&&A.key!=null?ie(""+A.key):G.toString(36)}function De(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(P,P):(A.status="pending",A.then(function(G){A.status==="pending"&&(A.status="fulfilled",A.value=G)},function(G){A.status==="pending"&&(A.status="rejected",A.reason=G)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function $(A,G,K,I,ue){var pe=typeof A;(pe==="undefined"||pe==="boolean")&&(A=null);var Te=!1;if(A===null)Te=!0;else switch(pe){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(A.$$typeof){case n:case a:Te=!0;break;case x:return Te=A._init,$(Te(A._payload),G,K,I,ue)}}if(Te)return ue=ue(A),Te=I===""?"."+Se(A,0):I,U(ue)?(K="",Te!=null&&(K=Te.replace(le,"$&/")+"/"),$(ue,G,K,"",function(ns){return ns})):ue!=null&&(Z(ue)&&(ue=B(ue,K+(ue.key==null||A&&A.key===ue.key?"":(""+ue.key).replace(le,"$&/")+"/")+Te)),G.push(ue)),1;Te=0;var Ze=I===""?".":I+":";if(U(A))for(var Le=0;Le<A.length;Le++)I=A[Le],pe=Ze+Se(I,Le),Te+=$(I,G,K,pe,ue);else if(Le=w(A),typeof Le=="function")for(A=Le.call(A),Le=0;!(I=A.next()).done;)I=I.value,pe=Ze+Se(I,Le++),Te+=$(I,G,K,pe,ue);else if(pe==="object"){if(typeof A.then=="function")return $(De(A),G,K,I,ue);throw G=String(A),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(A,G,K){if(A==null)return A;var I=[],ue=0;return $(A,I,"","",function(pe){return G.call(K,pe,ue++)}),I}function J(A){if(A._status===-1){var G=A._result;G=G(),G.then(function(K){(A._status===0||A._status===-1)&&(A._status=1,A._result=K)},function(K){(A._status===0||A._status===-1)&&(A._status=2,A._result=K)}),A._status===-1&&(A._status=0,A._result=G)}if(A._status===1)return A._result.default;throw A._result}var oe=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},me={map:Q,forEach:function(A,G,K){Q(A,function(){G.apply(this,arguments)},K)},count:function(A){var G=0;return Q(A,function(){G++}),G},toArray:function(A){return Q(A,function(G){return G})||[]},only:function(A){if(!Z(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return fe.Activity=y,fe.Children=me,fe.Component=z,fe.Fragment=s,fe.Profiler=o,fe.PureComponent=R,fe.StrictMode=r,fe.Suspense=m,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,fe.__COMPILER_RUNTIME={__proto__:null,c:function(A){return F.H.useMemoCache(A)}},fe.cache=function(A){return function(){return A.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(A,G,K){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var I=E({},A.props),ue=A.key;if(G!=null)for(pe in G.key!==void 0&&(ue=""+G.key),G)!W.call(G,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&G.ref===void 0||(I[pe]=G[pe]);var pe=arguments.length-2;if(pe===1)I.children=K;else if(1<pe){for(var Te=Array(pe),Ze=0;Ze<pe;Ze++)Te[Ze]=arguments[Ze+2];I.children=Te}return re(A.type,ue,I)},fe.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},fe.createElement=function(A,G,K){var I,ue={},pe=null;if(G!=null)for(I in G.key!==void 0&&(pe=""+G.key),G)W.call(G,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ue[I]=G[I]);var Te=arguments.length-2;if(Te===1)ue.children=K;else if(1<Te){for(var Ze=Array(Te),Le=0;Le<Te;Le++)Ze[Le]=arguments[Le+2];ue.children=Ze}if(A&&A.defaultProps)for(I in Te=A.defaultProps,Te)ue[I]===void 0&&(ue[I]=Te[I]);return re(A,pe,ue)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(A){return{$$typeof:p,render:A}},fe.isValidElement=Z,fe.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:J}},fe.memo=function(A,G){return{$$typeof:g,type:A,compare:G===void 0?null:G}},fe.startTransition=function(A){var G=F.T,K={};F.T=K;try{var I=A(),ue=F.S;ue!==null&&ue(K,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(P,oe)}catch(pe){oe(pe)}finally{G!==null&&K.types!==null&&(G.types=K.types),F.T=G}},fe.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},fe.use=function(A){return F.H.use(A)},fe.useActionState=function(A,G,K){return F.H.useActionState(A,G,K)},fe.useCallback=function(A,G){return F.H.useCallback(A,G)},fe.useContext=function(A){return F.H.useContext(A)},fe.useDebugValue=function(){},fe.useDeferredValue=function(A,G){return F.H.useDeferredValue(A,G)},fe.useEffect=function(A,G){return F.H.useEffect(A,G)},fe.useEffectEvent=function(A){return F.H.useEffectEvent(A)},fe.useId=function(){return F.H.useId()},fe.useImperativeHandle=function(A,G,K){return F.H.useImperativeHandle(A,G,K)},fe.useInsertionEffect=function(A,G){return F.H.useInsertionEffect(A,G)},fe.useLayoutEffect=function(A,G){return F.H.useLayoutEffect(A,G)},fe.useMemo=function(A,G){return F.H.useMemo(A,G)},fe.useOptimistic=function(A,G){return F.H.useOptimistic(A,G)},fe.useReducer=function(A,G,K){return F.H.useReducer(A,G,K)},fe.useRef=function(A){return F.H.useRef(A)},fe.useState=function(A){return F.H.useState(A)},fe.useSyncExternalStore=function(A,G,K){return F.H.useSyncExternalStore(A,G,K)},fe.useTransition=function(){return F.H.useTransition()},fe.version="19.2.4",fe}var hv;function Mo(){return hv||(hv=1,cf.exports=w2()),cf.exports}var T=Mo();const ce=y2(T),mv=x2({__proto__:null,default:ce},[T]);var ff={exports:{}},Ps={},df={exports:{}},hf={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var pv;function T2(){return pv||(pv=1,(function(n){function a($,Q){var J=$.length;$.push(Q);e:for(;0<J;){var oe=J-1>>>1,me=$[oe];if(0<o(me,Q))$[oe]=Q,$[J]=me,J=oe;else break e}}function s($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var Q=$[0],J=$.pop();if(J!==Q){$[0]=J;e:for(var oe=0,me=$.length,A=me>>>1;oe<A;){var G=2*(oe+1)-1,K=$[G],I=G+1,ue=$[I];if(0>o(K,J))I<me&&0>o(ue,K)?($[oe]=ue,$[I]=J,oe=I):($[oe]=K,$[G]=J,oe=G);else if(I<me&&0>o(ue,J))$[oe]=ue,$[I]=J,oe=I;else break e}}return Q}function o($,Q){var J=$.sortIndex-Q.sortIndex;return J!==0?J:$.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var m=[],g=[],x=1,y=null,S=3,w=!1,j=!1,E=!1,C=!1,z=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function k($){for(var Q=s(g);Q!==null;){if(Q.callback===null)r(g);else if(Q.startTime<=$)r(g),Q.sortIndex=Q.expirationTime,a(m,Q);else break;Q=s(g)}}function U($){if(E=!1,k($),!j)if(s(m)!==null)j=!0,P||(P=!0,ie());else{var Q=s(g);Q!==null&&De(U,Q.startTime-$)}}var P=!1,F=-1,W=5,re=-1;function B(){return C?!0:!(n.unstable_now()-re<W)}function Z(){if(C=!1,P){var $=n.unstable_now();re=$;var Q=!0;try{e:{j=!1,E&&(E=!1,D(F),F=-1),w=!0;var J=S;try{t:{for(k($),y=s(m);y!==null&&!(y.expirationTime>$&&B());){var oe=y.callback;if(typeof oe=="function"){y.callback=null,S=y.priorityLevel;var me=oe(y.expirationTime<=$);if($=n.unstable_now(),typeof me=="function"){y.callback=me,k($),Q=!0;break t}y===s(m)&&r(m),k($)}else r(m);y=s(m)}if(y!==null)Q=!0;else{var A=s(g);A!==null&&De(U,A.startTime-$),Q=!1}}break e}finally{y=null,S=J,w=!1}Q=void 0}}finally{Q?ie():P=!1}}}var ie;if(typeof R=="function")ie=function(){R(Z)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,Se=le.port2;le.port1.onmessage=Z,ie=function(){Se.postMessage(null)}}else ie=function(){z(Z,0)};function De($,Q){F=z(function(){$(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function($){$.callback=null},n.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<$?Math.floor(1e3/$):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function($){switch(S){case 1:case 2:case 3:var Q=3;break;default:Q=S}var J=S;S=Q;try{return $()}finally{S=J}},n.unstable_requestPaint=function(){C=!0},n.unstable_runWithPriority=function($,Q){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var J=S;S=$;try{return Q()}finally{S=J}},n.unstable_scheduleCallback=function($,Q,J){var oe=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?oe+J:oe):J=oe,$){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=J+me,$={id:x++,callback:Q,priorityLevel:$,startTime:J,expirationTime:me,sortIndex:-1},J>oe?($.sortIndex=J,a(g,$),s(m)===null&&$===s(g)&&(E?(D(F),F=-1):E=!0,De(U,J-oe))):($.sortIndex=me,a(m,$),j||w||(j=!0,P||(P=!0,ie()))),$},n.unstable_shouldYield=B,n.unstable_wrapCallback=function($){var Q=S;return function(){var J=S;S=Q;try{return $.apply(this,arguments)}finally{S=J}}}})(hf)),hf}var gv;function j2(){return gv||(gv=1,df.exports=T2()),df.exports}var mf={exports:{}},ht={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var vv;function E2(){if(vv)return ht;vv=1;var n=Mo();function a(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(a(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal");function d(m,g,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:m,containerInfo:g,implementation:x}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ht.createPortal=function(m,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return d(m,g,null,x)},ht.flushSync=function(m){var g=h.T,x=r.p;try{if(h.T=null,r.p=2,m)return m()}finally{h.T=g,r.p=x,r.d.f()}},ht.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(m,g))},ht.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},ht.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var x=g.as,y=p(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?r.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:w}):x==="script"&&r.d.X(m,{crossOrigin:y,integrity:S,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ht.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=p(g.as,g.crossOrigin);r.d.M(m,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(m)},ht.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,y=p(x,g.crossOrigin);r.d.L(m,x,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ht.preloadModule=function(m,g){if(typeof m=="string")if(g){var x=p(g.as,g.crossOrigin);r.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(m)},ht.requestFormReset=function(m){r.d.r(m)},ht.unstable_batchedUpdates=function(m,g){return m(g)},ht.useFormState=function(m,g,x){return h.H.useFormState(m,g,x)},ht.useFormStatus=function(){return h.H.useHostTransitionStatus()},ht.version="19.2.4",ht}var xv;function sx(){if(xv)return mf.exports;xv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),mf.exports=E2(),mf.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var yv;function N2(){if(yv)return Ps;yv=1;var n=j2(),a=Mo(),s=sx();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(d(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var i=e,l=t;;){var u=i.return;if(u===null)break;var c=u.alternate;if(c===null){if(l=u.return,l!==null){i=l;continue}break}if(u.child===c.child){for(c=u.child;c;){if(c===i)return m(u),e;if(c===l)return m(u),t;c=c.sibling}throw Error(r(188))}if(i.return!==l.return)i=u,l=c;else{for(var v=!1,b=u.child;b;){if(b===i){v=!0,i=u,l=c;break}if(b===l){v=!0,l=u,i=c;break}b=b.sibling}if(!v){for(b=c.child;b;){if(b===i){v=!0,i=c,l=u;break}if(b===l){v=!0,l=c,i=u;break}b=b.sibling}if(!v)throw Error(r(189))}}if(i.alternate!==l)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),R=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function Se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case z:return"Profiler";case C:return"StrictMode";case U:return"Suspense";case P:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case R:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:Se(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}var De=Array.isArray,$=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},oe=[],me=-1;function A(e){return{current:e}}function G(e){0>me||(e.current=oe[me],oe[me]=null,me--)}function K(e,t){me++,oe[me]=e.current,e.current=t}var I=A(null),ue=A(null),pe=A(null),Te=A(null);function Ze(e,t){switch(K(pe,t),K(ue,e),K(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?zg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=zg(t),e=kg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(I),K(I,e)}function Le(){G(I),G(ue),G(pe)}function ns(e){e.memoizedState!==null&&K(Te,e);var t=I.current,i=kg(t,e.type);t!==i&&(K(ue,e),K(I,i))}function Dl(e){ue.current===e&&(G(I),G(ue)),Te.current===e&&(G(Te),Xs._currentValue=J)}var Go,uh;function wa(e){if(Go===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Go=t&&t[1]||"",uh=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Go+e+uh}var Xo=!1;function Ko(e,t){if(!e||Xo)return"";Xo=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(H){var _=H}Reflect.construct(e,[],X)}else{try{X.call()}catch(H){_=H}e.call(X.prototype)}}else{try{throw Error()}catch(H){_=H}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(H){if(H&&_&&typeof H.stack=="string")return[H.stack,_.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),v=c[0],b=c[1];if(v&&b){var N=v.split(`
44
+ `),V=b.split(`
45
+ `);for(u=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;u<V.length&&!V[u].includes("DetermineComponentFrameRoot");)u++;if(l===N.length||u===V.length)for(l=N.length-1,u=V.length-1;1<=l&&0<=u&&N[l]!==V[u];)u--;for(;1<=l&&0<=u;l--,u--)if(N[l]!==V[u]){if(l!==1||u!==1)do if(l--,u--,0>u||N[l]!==V[u]){var q=`
46
+ `+N[l].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=l&&0<=u);break}}}finally{Xo=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?wa(i):""}function Qb(e,t){switch(e.tag){case 26:case 27:case 5:return wa(e.type);case 16:return wa("Lazy");case 13:return e.child!==t&&t!==null?wa("Suspense Fallback"):wa("Suspense");case 19:return wa("SuspenseList");case 0:case 15:return Ko(e.type,!1);case 11:return Ko(e.type.render,!1);case 1:return Ko(e.type,!0);case 31:return wa("Activity");default:return""}}function ch(e){try{var t="",i=null;do t+=Qb(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var Fo=Object.prototype.hasOwnProperty,Zo=n.unstable_scheduleCallback,Qo=n.unstable_cancelCallback,Pb=n.unstable_shouldYield,Jb=n.unstable_requestPaint,Ct=n.unstable_now,Wb=n.unstable_getCurrentPriorityLevel,fh=n.unstable_ImmediatePriority,dh=n.unstable_UserBlockingPriority,Ol=n.unstable_NormalPriority,Ib=n.unstable_LowPriority,hh=n.unstable_IdlePriority,e1=n.log,t1=n.unstable_setDisableYieldValue,as=null,Mt=null;function Bn(e){if(typeof e1=="function"&&t1(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(as,e)}catch{}}var Dt=Math.clz32?Math.clz32:i1,n1=Math.log,a1=Math.LN2;function i1(e){return e>>>=0,e===0?32:31-(n1(e)/a1|0)|0}var Rl=256,zl=262144,kl=4194304;function Ta(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ll(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var u=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~c,l!==0?u=Ta(l):(v&=b,v!==0?u=Ta(v):i||(i=b&~e,i!==0&&(u=Ta(i))))):(b=l&~c,b!==0?u=Ta(b):v!==0?u=Ta(v):i||(i=l&~e,i!==0&&(u=Ta(i)))),u===0?0:t!==0&&t!==u&&(t&c)===0&&(c=u&-u,i=t&-t,c>=i||c===32&&(i&4194048)!==0)?t:u}function is(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function s1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mh(){var e=kl;return kl<<=1,(kl&62914560)===0&&(kl=4194304),e}function Po(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ss(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function l1(e,t,i,l,u,c){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,N=e.expirationTimes,V=e.hiddenUpdates;for(i=v&~i;0<i;){var q=31-Dt(i),X=1<<q;b[q]=0,N[q]=-1;var _=V[q];if(_!==null)for(V[q]=null,q=0;q<_.length;q++){var H=_[q];H!==null&&(H.lane&=-536870913)}i&=~X}l!==0&&ph(e,l,0),c!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=c&~(v&~t))}function ph(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Dt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function gh(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Dt(i),u=1<<l;u&t|e[l]&t&&(e[l]|=t),i&=~u}}function vh(e,t){var i=t&-t;return i=(i&42)!==0?1:Jo(i),(i&(e.suspendedLanes|t))!==0?0:i}function Jo(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Wo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function xh(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:av(e.type))}function yh(e,t){var i=Q.p;try{return Q.p=e,t()}finally{Q.p=i}}var Hn=Math.random().toString(36).slice(2),st="__reactFiber$"+Hn,yt="__reactProps$"+Hn,ni="__reactContainer$"+Hn,Io="__reactEvents$"+Hn,r1="__reactListeners$"+Hn,o1="__reactHandles$"+Hn,bh="__reactResources$"+Hn,ls="__reactMarker$"+Hn;function eu(e){delete e[st],delete e[yt],delete e[Io],delete e[r1],delete e[o1]}function ai(e){var t=e[st];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ni]||i[st]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=$g(e);e!==null;){if(i=e[st])return i;e=$g(e)}return t}e=i,i=e.parentNode}return null}function ii(e){if(e=e[st]||e[ni]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function si(e){var t=e[bh];return t||(t=e[bh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[ls]=!0}var Sh=new Set,wh={};function ja(e,t){li(e,t),li(e+"Capture",t)}function li(e,t){for(wh[e]=t,e=0;e<t.length;e++)Sh.add(t[e])}var u1=RegExp("^[: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]*$"),Th={},jh={};function c1(e){return Fo.call(jh,e)?!0:Fo.call(Th,e)?!1:u1.test(e)?jh[e]=!0:(Th[e]=!0,!1)}function Vl(e,t,i){if(c1(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function _l(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function vn(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}function Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function f1(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(v){i=""+v,c.call(this,v)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tu(e){if(!e._valueTracker){var t=Eh(e)?"checked":"value";e._valueTracker=f1(e,t,""+e[t])}}function Nh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=Eh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function Ul(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}}var d1=/[\n"\\]/g;function Ht(e){return e.replace(d1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nu(e,t,i,l,u,c,v,b){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?au(e,v,Bt(t)):i!=null?au(e,v,Bt(i)):l!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Bt(b):e.removeAttribute("name")}function Ah(e,t,i,l,u,c,v,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||i!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){tu(e);return}i=i!=null?""+Bt(i):"",t=t!=null?""+Bt(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=b?e.checked:!!l,e.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),tu(e)}function au(e,t,i){t==="number"&&Ul(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ri(e,t,i,l){if(e=e.options,t){t={};for(var u=0;u<i.length;u++)t["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=t.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Bt(i),t=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Ch(e,t,i){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Bt(i):""}function Mh(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(r(92));if(De(l)){if(1<l.length)throw Error(r(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=Bt(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),tu(e)}function oi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var h1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Dh(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||h1.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Oh(e,t,i){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in t)l=t[u],t.hasOwnProperty(u)&&i[u]!==l&&Dh(e,u,l)}else for(var c in t)t.hasOwnProperty(c)&&Dh(e,c,t[c])}function iu(e){if(e.indexOf("-")===-1)return!1;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 m1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),p1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bl(e){return p1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xn(){}var su=null;function lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,ci=null;function Rh(e){var t=ii(e);if(t&&(e=t.stateNode)){var i=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(nu(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var u=l[yt]||null;if(!u)throw Error(r(90));nu(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&Nh(l)}break e;case"textarea":Ch(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ri(e,!!i.multiple,t,!1)}}}var ru=!1;function zh(e,t,i){if(ru)return e(t,i);ru=!0;try{var l=e(t);return l}finally{if(ru=!1,(ui!==null||ci!==null)&&(Nr(),ui&&(t=ui,e=ci,ci=ui=null,Rh(t),e)))for(t=0;t<e.length;t++)Rh(e[t])}}function os(e,t){var i=e.stateNode;if(i===null)return null;var l=i[yt]||null;if(l===null)return null;i=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,t,typeof i));return i}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ou=!1;if(yn)try{var us={};Object.defineProperty(us,"passive",{get:function(){ou=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{ou=!1}var $n=null,uu=null,Hl=null;function kh(){if(Hl)return Hl;var e,t=uu,i=t.length,l,u="value"in $n?$n.value:$n.textContent,c=u.length;for(e=0;e<i&&t[e]===u[e];e++);var v=i-e;for(l=1;l<=v&&t[i-l]===u[c-l];l++);return Hl=u.slice(e,1<l?1-l:void 0)}function $l(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ql(){return!0}function Lh(){return!1}function bt(e){function t(i,l,u,c,v){this._reactName=i,this._targetInst=u,this.type=l,this.nativeEvent=c,this.target=v,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ql:Lh,this.isPropagationStopped=Lh,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yl=bt(Ea),cs=y({},Ea,{view:0,detail:0}),g1=bt(cs),cu,fu,fs,Gl=y({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==fs&&(fs&&e.type==="mousemove"?(cu=e.screenX-fs.screenX,fu=e.screenY-fs.screenY):fu=cu=0,fs=e),cu)},movementY:function(e){return"movementY"in e?e.movementY:fu}}),Vh=bt(Gl),v1=y({},Gl,{dataTransfer:0}),x1=bt(v1),y1=y({},cs,{relatedTarget:0}),du=bt(y1),b1=y({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),S1=bt(b1),w1=y({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),T1=bt(w1),j1=y({},Ea,{data:0}),_h=bt(j1),E1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N1={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"},A1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=A1[e])?!!t[e]:!1}function hu(){return C1}var M1=y({},cs,{key:function(e){if(e.key){var t=E1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$l(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?N1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?$l(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$l(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),D1=bt(M1),O1=y({},Gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uh=bt(O1),R1=y({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),z1=bt(R1),k1=y({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),L1=bt(k1),V1=y({},Gl,{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}),_1=bt(V1),U1=y({},Ea,{newState:0,oldState:0}),B1=bt(U1),H1=[9,13,27,32],mu=yn&&"CompositionEvent"in window,ds=null;yn&&"documentMode"in document&&(ds=document.documentMode);var $1=yn&&"TextEvent"in window&&!ds,Bh=yn&&(!mu||ds&&8<ds&&11>=ds),Hh=" ",$h=!1;function qh(e,t){switch(e){case"keyup":return H1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function q1(e,t){switch(e){case"compositionend":return Yh(t);case"keypress":return t.which!==32?null:($h=!0,Hh);case"textInput":return e=t.data,e===Hh&&$h?null:e;default:return null}}function Y1(e,t){if(fi)return e==="compositionend"||!mu&&qh(e,t)?(e=kh(),Hl=uu=$n=null,fi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bh&&t.locale!=="ko"?null:t.data;default:return null}}var G1={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 Gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!G1[e.type]:t==="textarea"}function Xh(e,t,i,l){ui?ci?ci.push(l):ci=[l]:ui=l,t=zr(t,"onChange"),0<t.length&&(i=new Yl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var hs=null,ms=null;function X1(e){Ag(e,0)}function Xl(e){var t=rs(e);if(Nh(t))return e}function Kh(e,t){if(e==="change")return t}var Fh=!1;if(yn){var pu;if(yn){var gu="oninput"in document;if(!gu){var Zh=document.createElement("div");Zh.setAttribute("oninput","return;"),gu=typeof Zh.oninput=="function"}pu=gu}else pu=!1;Fh=pu&&(!document.documentMode||9<document.documentMode)}function Qh(){hs&&(hs.detachEvent("onpropertychange",Ph),ms=hs=null)}function Ph(e){if(e.propertyName==="value"&&Xl(ms)){var t=[];Xh(t,ms,e,lu(e)),zh(X1,t)}}function K1(e,t,i){e==="focusin"?(Qh(),hs=t,ms=i,hs.attachEvent("onpropertychange",Ph)):e==="focusout"&&Qh()}function F1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xl(ms)}function Z1(e,t){if(e==="click")return Xl(t)}function Q1(e,t){if(e==="input"||e==="change")return Xl(t)}function P1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:P1;function ps(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var u=i[l];if(!Fo.call(t,u)||!Ot(e[u],t[u]))return!1}return!0}function Jh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wh(e,t){var i=Jh(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Jh(i)}}function Ih(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ih(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function em(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ul(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Ul(e.document)}return t}function vu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var J1=yn&&"documentMode"in document&&11>=document.documentMode,di=null,xu=null,gs=null,yu=!1;function tm(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;yu||di==null||di!==Ul(l)||(l=di,"selectionStart"in l&&vu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),gs&&ps(gs,l)||(gs=l,l=zr(xu,"onSelect"),0<l.length&&(t=new Yl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=di)))}function Na(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var hi={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionrun:Na("Transition","TransitionRun"),transitionstart:Na("Transition","TransitionStart"),transitioncancel:Na("Transition","TransitionCancel"),transitionend:Na("Transition","TransitionEnd")},bu={},nm={};yn&&(nm=document.createElement("div").style,"AnimationEvent"in window||(delete hi.animationend.animation,delete hi.animationiteration.animation,delete hi.animationstart.animation),"TransitionEvent"in window||delete hi.transitionend.transition);function Aa(e){if(bu[e])return bu[e];if(!hi[e])return e;var t=hi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in nm)return bu[e]=t[i];return e}var am=Aa("animationend"),im=Aa("animationiteration"),sm=Aa("animationstart"),W1=Aa("transitionrun"),I1=Aa("transitionstart"),eS=Aa("transitioncancel"),lm=Aa("transitionend"),rm=new Map,Su="abort auxClick beforeToggle 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(" ");Su.push("scrollEnd");function Wt(e,t){rm.set(e,t),ja(t,[e])}var Kl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},$t=[],mi=0,wu=0;function Fl(){for(var e=mi,t=wu=mi=0;t<e;){var i=$t[t];$t[t++]=null;var l=$t[t];$t[t++]=null;var u=$t[t];$t[t++]=null;var c=$t[t];if($t[t++]=null,l!==null&&u!==null){var v=l.pending;v===null?u.next=u:(u.next=v.next,v.next=u),l.pending=u}c!==0&&om(i,u,c)}}function Zl(e,t,i,l){$t[mi++]=e,$t[mi++]=t,$t[mi++]=i,$t[mi++]=l,wu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Tu(e,t,i,l){return Zl(e,t,i,l),Ql(e)}function Ca(e,t){return Zl(e,null,null,t),Ql(e)}function om(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var u=!1,c=e.return;c!==null;)c.childLanes|=i,l=c.alternate,l!==null&&(l.childLanes|=i),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(u=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,u&&t!==null&&(u=31-Dt(i),e=c.hiddenUpdates,l=e[u],l===null?e[u]=[t]:l.push(t),t.lane=i|536870912),c):null}function Ql(e){if(50<Us)throw Us=0,Rc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function tS(e,t,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rt(e,t,i,l){return new tS(e,t,i,l)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bn(e,t){var i=e.alternate;return i===null?(i=Rt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function um(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Pl(e,t,i,l,u,c){var v=0;if(l=e,typeof e=="function")ju(e)&&(v=1);else if(typeof e=="string")v=l2(e,i,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=Rt(31,i,t,u),e.elementType=re,e.lanes=c,e;case E:return Ma(i.children,u,c,t);case C:v=8,u|=24;break;case z:return e=Rt(12,i,t,u|2),e.elementType=z,e.lanes=c,e;case U:return e=Rt(13,i,t,u),e.elementType=U,e.lanes=c,e;case P:return e=Rt(19,i,t,u),e.elementType=P,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:v=10;break e;case D:v=9;break e;case k:v=11;break e;case F:v=14;break e;case W:v=16,l=null;break e}v=29,i=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Rt(v,i,t,u),t.elementType=e,t.type=l,t.lanes=c,t}function Ma(e,t,i,l){return e=Rt(7,e,l,t),e.lanes=i,e}function Eu(e,t,i){return e=Rt(6,e,null,t),e.lanes=i,e}function cm(e){var t=Rt(18,null,null,0);return t.stateNode=e,t}function Nu(e,t,i){return t=Rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fm=new WeakMap;function qt(e,t){if(typeof e=="object"&&e!==null){var i=fm.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ch(t)},fm.set(e,t),t)}return{value:e,source:t,stack:ch(t)}}var gi=[],vi=0,Jl=null,vs=0,Yt=[],Gt=0,qn=null,ln=1,rn="";function Sn(e,t){gi[vi++]=vs,gi[vi++]=Jl,Jl=e,vs=t}function dm(e,t,i){Yt[Gt++]=ln,Yt[Gt++]=rn,Yt[Gt++]=qn,qn=e;var l=ln;e=rn;var u=32-Dt(l)-1;l&=~(1<<u),i+=1;var c=32-Dt(t)+u;if(30<c){var v=u-u%5;c=(l&(1<<v)-1).toString(32),l>>=v,u-=v,ln=1<<32-Dt(t)+u|i<<u|l,rn=c+e}else ln=1<<c|i<<u|l,rn=e}function Au(e){e.return!==null&&(Sn(e,1),dm(e,1,0))}function Cu(e){for(;e===Jl;)Jl=gi[--vi],gi[vi]=null,vs=gi[--vi],gi[vi]=null;for(;e===qn;)qn=Yt[--Gt],Yt[Gt]=null,rn=Yt[--Gt],Yt[Gt]=null,ln=Yt[--Gt],Yt[Gt]=null}function hm(e,t){Yt[Gt++]=ln,Yt[Gt++]=rn,Yt[Gt++]=qn,ln=t.id,rn=t.overflow,qn=e}var lt=null,Ue=null,we=!1,Yn=null,Xt=!1,Mu=Error(r(519));function Gn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xs(qt(t,e)),Mu}function mm(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[st]=e,t[yt]=l,i){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(i=0;i<Hs.length;i++)ve(Hs[i],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),Ah(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),Mh(t,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||Og(t.textContent,i)?(l.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),l.onScroll!=null&&ve("scroll",t),l.onScrollEnd!=null&&ve("scrollend",t),l.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||Gn(e,!0)}function pm(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:lt=lt.return}}function xi(e){if(e!==lt)return!1;if(!we)return pm(e),we=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Fc(e.type,e.memoizedProps)),i=!i),i&&Ue&&Gn(e),pm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=Hg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=Hg(e)}else t===27?(t=Ue,ia(e.type)?(e=Wc,Wc=null,Ue=e):Ue=t):Ue=lt?Ft(e.stateNode.nextSibling):null;return!0}function Da(){Ue=lt=null,we=!1}function Du(){var e=Yn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),Yn=null),e}function xs(e){Yn===null?Yn=[e]:Yn.push(e)}var Ou=A(null),Oa=null,wn=null;function Xn(e,t,i){K(Ou,t._currentValue),t._currentValue=i}function Tn(e){e._currentValue=Ou.current,G(Ou)}function Ru(e,t,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===i)break;e=e.return}}function zu(e,t,i,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var c=u.dependencies;if(c!==null){var v=u.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=u;for(var N=0;N<t.length;N++)if(b.context===t[N]){c.lanes|=i,b=c.alternate,b!==null&&(b.lanes|=i),Ru(c.return,i,e),l||(v=null);break e}c=b.next}}else if(u.tag===18){if(v=u.return,v===null)throw Error(r(341));v.lanes|=i,c=v.alternate,c!==null&&(c.lanes|=i),Ru(v,i,e),v=null}else v=u.child;if(v!==null)v.return=u;else for(v=u;v!==null;){if(v===e){v=null;break}if(u=v.sibling,u!==null){u.return=v.return,v=u;break}v=v.return}u=v}}function yi(e,t,i,l){e=null;for(var u=t,c=!1;u!==null;){if(!c){if((u.flags&524288)!==0)c=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var v=u.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var b=u.type;Ot(u.pendingProps.value,v.value)||(e!==null?e.push(b):e=[b])}}else if(u===Te.current){if(v=u.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Xs):e=[Xs])}u=u.return}e!==null&&zu(t,e,i,l),t.flags|=262144}function Wl(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ra(e){Oa=e,wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rt(e){return gm(Oa,e)}function Il(e,t){return Oa===null&&Ra(e),gm(e,t)}function gm(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},wn===null){if(e===null)throw Error(r(308));wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wn=wn.next=t;return i}var nS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},aS=n.unstable_scheduleCallback,iS=n.unstable_NormalPriority,Qe={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ku(){return{controller:new nS,data:new Map,refCount:0}}function ys(e){e.refCount--,e.refCount===0&&aS(iS,function(){e.controller.abort()})}var bs=null,Lu=0,bi=0,Si=null;function sS(e,t){if(bs===null){var i=bs=[];Lu=0,bi=Uc(),Si={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Lu++,t.then(vm,vm),t}function vm(){if(--Lu===0&&bs!==null){Si!==null&&(Si.status="fulfilled");var e=bs;bs=null,bi=0,Si=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function lS(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var u=0;u<i.length;u++)(0,i[u])(t)},function(u){for(l.status="rejected",l.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),l}var xm=$.S;$.S=function(e,t){tg=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sS(e,t),xm!==null&&xm(e,t)};var za=A(null);function Vu(){var e=za.current;return e!==null?e:Ve.pooledCache}function er(e,t){t===null?K(za,za.current):K(za,t.pool)}function ym(){var e=Vu();return e===null?null:{parent:Qe._currentValue,pool:e}}var wi=Error(r(460)),_u=Error(r(474)),tr=Error(r(542)),nr={then:function(){}};function bm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sm(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(xn,xn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Tm(e),e;default:if(typeof t.status=="string")t.then(xn,xn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=l}},function(l){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Tm(e),e}throw La=t,wi}}function ka(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(La=i,wi):i}}var La=null;function wm(){if(La===null)throw Error(r(459));var e=La;return La=null,e}function Tm(e){if(e===wi||e===tr)throw Error(r(483))}var Ti=null,Ss=0;function ar(e){var t=Ss;return Ss+=1,Ti===null&&(Ti=[]),Sm(Ti,e,t)}function ws(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ir(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jm(e){function t(O,M){if(e){var L=O.deletions;L===null?(O.deletions=[M],O.flags|=16):L.push(M)}}function i(O,M){if(!e)return null;for(;M!==null;)t(O,M),M=M.sibling;return null}function l(O){for(var M=new Map;O!==null;)O.key!==null?M.set(O.key,O):M.set(O.index,O),O=O.sibling;return M}function u(O,M){return O=bn(O,M),O.index=0,O.sibling=null,O}function c(O,M,L){return O.index=L,e?(L=O.alternate,L!==null?(L=L.index,L<M?(O.flags|=67108866,M):L):(O.flags|=67108866,M)):(O.flags|=1048576,M)}function v(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,M,L,Y){return M===null||M.tag!==6?(M=Eu(L,O.mode,Y),M.return=O,M):(M=u(M,L),M.return=O,M)}function N(O,M,L,Y){var ae=L.type;return ae===E?q(O,M,L.props.children,Y,L.key):M!==null&&(M.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===W&&ka(ae)===M.type)?(M=u(M,L.props),ws(M,L),M.return=O,M):(M=Pl(L.type,L.key,L.props,null,O.mode,Y),ws(M,L),M.return=O,M)}function V(O,M,L,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==L.containerInfo||M.stateNode.implementation!==L.implementation?(M=Nu(L,O.mode,Y),M.return=O,M):(M=u(M,L.children||[]),M.return=O,M)}function q(O,M,L,Y,ae){return M===null||M.tag!==7?(M=Ma(L,O.mode,Y,ae),M.return=O,M):(M=u(M,L),M.return=O,M)}function X(O,M,L){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Eu(""+M,O.mode,L),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case w:return L=Pl(M.type,M.key,M.props,null,O.mode,L),ws(L,M),L.return=O,L;case j:return M=Nu(M,O.mode,L),M.return=O,M;case W:return M=ka(M),X(O,M,L)}if(De(M)||ie(M))return M=Ma(M,O.mode,L,null),M.return=O,M;if(typeof M.then=="function")return X(O,ar(M),L);if(M.$$typeof===R)return X(O,Il(O,M),L);ir(O,M)}return null}function _(O,M,L,Y){var ae=M!==null?M.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ae!==null?null:b(O,M,""+L,Y);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case w:return L.key===ae?N(O,M,L,Y):null;case j:return L.key===ae?V(O,M,L,Y):null;case W:return L=ka(L),_(O,M,L,Y)}if(De(L)||ie(L))return ae!==null?null:q(O,M,L,Y,null);if(typeof L.then=="function")return _(O,M,ar(L),Y);if(L.$$typeof===R)return _(O,M,Il(O,L),Y);ir(O,L)}return null}function H(O,M,L,Y,ae){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(L)||null,b(M,O,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return O=O.get(Y.key===null?L:Y.key)||null,N(M,O,Y,ae);case j:return O=O.get(Y.key===null?L:Y.key)||null,V(M,O,Y,ae);case W:return Y=ka(Y),H(O,M,L,Y,ae)}if(De(Y)||ie(Y))return O=O.get(L)||null,q(M,O,Y,ae,null);if(typeof Y.then=="function")return H(O,M,L,ar(Y),ae);if(Y.$$typeof===R)return H(O,M,L,Il(M,Y),ae);ir(M,Y)}return null}function ee(O,M,L,Y){for(var ae=null,je=null,ne=M,he=M=0,be=null;ne!==null&&he<L.length;he++){ne.index>he?(be=ne,ne=null):be=ne.sibling;var Ee=_(O,ne,L[he],Y);if(Ee===null){ne===null&&(ne=be);break}e&&ne&&Ee.alternate===null&&t(O,ne),M=c(Ee,M,he),je===null?ae=Ee:je.sibling=Ee,je=Ee,ne=be}if(he===L.length)return i(O,ne),we&&Sn(O,he),ae;if(ne===null){for(;he<L.length;he++)ne=X(O,L[he],Y),ne!==null&&(M=c(ne,M,he),je===null?ae=ne:je.sibling=ne,je=ne);return we&&Sn(O,he),ae}for(ne=l(ne);he<L.length;he++)be=H(ne,O,he,L[he],Y),be!==null&&(e&&be.alternate!==null&&ne.delete(be.key===null?he:be.key),M=c(be,M,he),je===null?ae=be:je.sibling=be,je=be);return e&&ne.forEach(function(ua){return t(O,ua)}),we&&Sn(O,he),ae}function se(O,M,L,Y){if(L==null)throw Error(r(151));for(var ae=null,je=null,ne=M,he=M=0,be=null,Ee=L.next();ne!==null&&!Ee.done;he++,Ee=L.next()){ne.index>he?(be=ne,ne=null):be=ne.sibling;var ua=_(O,ne,Ee.value,Y);if(ua===null){ne===null&&(ne=be);break}e&&ne&&ua.alternate===null&&t(O,ne),M=c(ua,M,he),je===null?ae=ua:je.sibling=ua,je=ua,ne=be}if(Ee.done)return i(O,ne),we&&Sn(O,he),ae;if(ne===null){for(;!Ee.done;he++,Ee=L.next())Ee=X(O,Ee.value,Y),Ee!==null&&(M=c(Ee,M,he),je===null?ae=Ee:je.sibling=Ee,je=Ee);return we&&Sn(O,he),ae}for(ne=l(ne);!Ee.done;he++,Ee=L.next())Ee=H(ne,O,he,Ee.value,Y),Ee!==null&&(e&&Ee.alternate!==null&&ne.delete(Ee.key===null?he:Ee.key),M=c(Ee,M,he),je===null?ae=Ee:je.sibling=Ee,je=Ee);return e&&ne.forEach(function(v2){return t(O,v2)}),we&&Sn(O,he),ae}function ze(O,M,L,Y){if(typeof L=="object"&&L!==null&&L.type===E&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case w:e:{for(var ae=L.key;M!==null;){if(M.key===ae){if(ae=L.type,ae===E){if(M.tag===7){i(O,M.sibling),Y=u(M,L.props.children),Y.return=O,O=Y;break e}}else if(M.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===W&&ka(ae)===M.type){i(O,M.sibling),Y=u(M,L.props),ws(Y,L),Y.return=O,O=Y;break e}i(O,M);break}else t(O,M);M=M.sibling}L.type===E?(Y=Ma(L.props.children,O.mode,Y,L.key),Y.return=O,O=Y):(Y=Pl(L.type,L.key,L.props,null,O.mode,Y),ws(Y,L),Y.return=O,O=Y)}return v(O);case j:e:{for(ae=L.key;M!==null;){if(M.key===ae)if(M.tag===4&&M.stateNode.containerInfo===L.containerInfo&&M.stateNode.implementation===L.implementation){i(O,M.sibling),Y=u(M,L.children||[]),Y.return=O,O=Y;break e}else{i(O,M);break}else t(O,M);M=M.sibling}Y=Nu(L,O.mode,Y),Y.return=O,O=Y}return v(O);case W:return L=ka(L),ze(O,M,L,Y)}if(De(L))return ee(O,M,L,Y);if(ie(L)){if(ae=ie(L),typeof ae!="function")throw Error(r(150));return L=ae.call(L),se(O,M,L,Y)}if(typeof L.then=="function")return ze(O,M,ar(L),Y);if(L.$$typeof===R)return ze(O,M,Il(O,L),Y);ir(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,M!==null&&M.tag===6?(i(O,M.sibling),Y=u(M,L),Y.return=O,O=Y):(i(O,M),Y=Eu(L,O.mode,Y),Y.return=O,O=Y),v(O)):i(O,M)}return function(O,M,L,Y){try{Ss=0;var ae=ze(O,M,L,Y);return Ti=null,ae}catch(ne){if(ne===wi||ne===tr)throw ne;var je=Rt(29,ne,null,O.mode);return je.lanes=Y,je.return=O,je}finally{}}}var Va=jm(!0),Em=jm(!1),Kn=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,t=Ql(e),om(e,null,i),t}return Zl(e,l,t,i),Ql(e)}function Ts(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,gh(e,i)}}function Hu(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var u=null,c=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};c===null?u=c=v:c=c.next=v,i=i.next}while(i!==null);c===null?u=c=t:c=c.next=t}else u=c=t;i={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var $u=!1;function js(){if($u){var e=Si;if(e!==null)throw e}}function Es(e,t,i,l){$u=!1;var u=e.updateQueue;Kn=!1;var c=u.firstBaseUpdate,v=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var N=b,V=N.next;N.next=null,v===null?c=V:v.next=V,v=N;var q=e.alternate;q!==null&&(q=q.updateQueue,b=q.lastBaseUpdate,b!==v&&(b===null?q.firstBaseUpdate=V:b.next=V,q.lastBaseUpdate=N))}if(c!==null){var X=u.baseState;v=0,q=V=N=null,b=c;do{var _=b.lane&-536870913,H=_!==b.lane;if(H?(ye&_)===_:(l&_)===_){_!==0&&_===bi&&($u=!0),q!==null&&(q=q.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ee=e,se=b;_=t;var ze=i;switch(se.tag){case 1:if(ee=se.payload,typeof ee=="function"){X=ee.call(ze,X,_);break e}X=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=se.payload,_=typeof ee=="function"?ee.call(ze,X,_):ee,_==null)break e;X=y({},X,_);break e;case 2:Kn=!0}}_=b.callback,_!==null&&(e.flags|=64,H&&(e.flags|=8192),H=u.callbacks,H===null?u.callbacks=[_]:H.push(_))}else H={lane:_,tag:b.tag,payload:b.payload,callback:b.callback,next:null},q===null?(V=q=H,N=X):q=q.next=H,v|=_;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;H=b,b=H.next,H.next=null,u.lastBaseUpdate=H,u.shared.pending=null}}while(!0);q===null&&(N=X),u.baseState=N,u.firstBaseUpdate=V,u.lastBaseUpdate=q,c===null&&(u.shared.lanes=0),In|=v,e.lanes=v,e.memoizedState=X}}function Nm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Am(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Nm(i[e],t)}var ji=A(null),sr=A(0);function Cm(e,t){e=Rn,K(sr,e),K(ji,t),Rn=e|t.baseLanes}function qu(){K(sr,Rn),K(ji,ji.current)}function Yu(){Rn=sr.current,G(ji),G(sr)}var zt=A(null),Kt=null;function Qn(e){var t=e.alternate;K(Xe,Xe.current&1),K(zt,e),Kt===null&&(t===null||ji.current!==null||t.memoizedState!==null)&&(Kt=e)}function Gu(e){K(Xe,Xe.current),K(zt,e),Kt===null&&(Kt=e)}function Mm(e){e.tag===22?(K(Xe,Xe.current),K(zt,e),Kt===null&&(Kt=e)):Pn()}function Pn(){K(Xe,Xe.current),K(zt,zt.current)}function kt(e){G(zt),Kt===e&&(Kt=null),G(Xe)}var Xe=A(0);function lr(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Pc(i)||Jc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jn=0,de=null,Oe=null,Pe=null,rr=!1,Ei=!1,_a=!1,or=0,Ns=0,Ni=null,rS=0;function qe(){throw Error(r(321))}function Xu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ot(e[i],t[i]))return!1;return!0}function Ku(e,t,i,l,u,c){return jn=c,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?dp:rc,_a=!1,c=i(l,u),_a=!1,Ei&&(c=Om(t,i,l,u)),Dm(e),c}function Dm(e){$.H=Ms;var t=Oe!==null&&Oe.next!==null;if(jn=0,Pe=Oe=de=null,rr=!1,Ns=0,Ni=null,t)throw Error(r(300));e===null||Je||(e=e.dependencies,e!==null&&Wl(e)&&(Je=!0))}function Om(e,t,i,l){de=e;var u=0;do{if(Ei&&(Ni=null),Ns=0,Ei=!1,25<=u)throw Error(r(301));if(u+=1,Pe=Oe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}$.H=hp,c=t(i,l)}while(Ei);return c}function oS(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?As(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(de.flags|=1024),t}function Fu(){var e=or!==0;return or=0,e}function Zu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Qu(e){if(rr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}rr=!1}jn=0,Pe=Oe=de=null,Ei=!1,Ns=or=0,Ni=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?de.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function Ke(){if(Oe===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Pe===null?de.memoizedState:Pe.next;if(t!==null)Pe=t,Oe=e;else{if(e===null)throw de.alternate===null?Error(r(467)):Error(r(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Pe===null?de.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function ur(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function As(e){var t=Ns;return Ns+=1,Ni===null&&(Ni=[]),e=Sm(Ni,e,t),t=de,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?dp:rc),e}function cr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return As(e);if(e.$$typeof===R)return rt(e)}throw Error(r(438,String(e)))}function Pu(e){var t=null,i=de.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=de.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ur(),de.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=B;return t.index++,i}function En(e,t){return typeof t=="function"?t(e):t}function fr(e){var t=Ke();return Ju(t,Oe,e)}function Ju(e,t,i){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=i;var u=e.baseQueue,c=l.pending;if(c!==null){if(u!==null){var v=u.next;u.next=c.next,c.next=v}t.baseQueue=u=c,l.pending=null}if(c=e.baseState,u===null)e.memoizedState=c;else{t=u.next;var b=v=null,N=null,V=t,q=!1;do{var X=V.lane&-536870913;if(X!==V.lane?(ye&X)===X:(jn&X)===X){var _=V.revertLane;if(_===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),X===bi&&(q=!0);else if((jn&_)===_){V=V.next,_===bi&&(q=!0);continue}else X={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},N===null?(b=N=X,v=c):N=N.next=X,de.lanes|=_,In|=_;X=V.action,_a&&i(c,X),c=V.hasEagerState?V.eagerState:i(c,X)}else _={lane:X,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},N===null?(b=N=_,v=c):N=N.next=_,de.lanes|=X,In|=X;V=V.next}while(V!==null&&V!==t);if(N===null?v=c:N.next=b,!Ot(c,e.memoizedState)&&(Je=!0,q&&(i=Si,i!==null)))throw i;e.memoizedState=c,e.baseState=v,e.baseQueue=N,l.lastRenderedState=c}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Wu(e){var t=Ke(),i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var l=i.dispatch,u=i.pending,c=t.memoizedState;if(u!==null){i.pending=null;var v=u=u.next;do c=e(c,v.action),v=v.next;while(v!==u);Ot(c,t.memoizedState)||(Je=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),i.lastRenderedState=c}return[c,l]}function Rm(e,t,i){var l=de,u=Ke(),c=we;if(c){if(i===void 0)throw Error(r(407));i=i()}else i=t();var v=!Ot((Oe||u).memoizedState,i);if(v&&(u.memoizedState=i,Je=!0),u=u.queue,tc(Lm.bind(null,l,u,e),[e]),u.getSnapshot!==t||v||Pe!==null&&Pe.memoizedState.tag&1){if(l.flags|=2048,Ai(9,{destroy:void 0},km.bind(null,l,u,i,t),null),Ve===null)throw Error(r(349));c||(jn&127)!==0||zm(l,t,i)}return i}function zm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=de.updateQueue,t===null?(t=ur(),de.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function km(e,t,i,l){t.value=i,t.getSnapshot=l,Vm(t)&&_m(e)}function Lm(e,t,i){return i(function(){Vm(t)&&_m(e)})}function Vm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function _m(e){var t=Ca(e,2);t!==null&&Et(t,e,2)}function Iu(e){var t=mt();if(typeof e=="function"){var i=e;if(e=i(),_a){Bn(!0);try{i()}finally{Bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:e},t}function Um(e,t,i,l){return e.baseState=i,Ju(e,Oe,typeof l=="function"?l:En)}function uS(e,t,i,l,u){if(mr(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){c.listeners.push(v)}};$.T!==null?i(!0):c.isTransition=!1,l(c),i=t.pending,i===null?(c.next=t.pending=c,Bm(t,c)):(c.next=i.next,t.pending=i.next=c)}}function Bm(e,t){var i=t.action,l=t.payload,u=e.state;if(t.isTransition){var c=$.T,v={};$.T=v;try{var b=i(u,l),N=$.S;N!==null&&N(v,b),Hm(e,t,b)}catch(V){ec(e,t,V)}finally{c!==null&&v.types!==null&&(c.types=v.types),$.T=c}}else try{c=i(u,l),Hm(e,t,c)}catch(V){ec(e,t,V)}}function Hm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){$m(e,t,l)},function(l){return ec(e,t,l)}):$m(e,t,i)}function $m(e,t,i){t.status="fulfilled",t.value=i,qm(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Bm(e,i)))}function ec(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,qm(t),t=t.next;while(t!==l)}e.action=null}function qm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ym(e,t){return t}function Gm(e,t){if(we){var i=Ve.formState;if(i!==null){e:{var l=de;if(we){if(Ue){t:{for(var u=Ue,c=Xt;u.nodeType!==8;){if(!c){u=null;break t}if(u=Ft(u.nextSibling),u===null){u=null;break t}}c=u.data,u=c==="F!"||c==="F"?u:null}if(u){Ue=Ft(u.nextSibling),l=u.data==="F!";break e}}Gn(l)}l=!1}l&&(t=i[0])}}return i=mt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ym,lastRenderedState:t},i.queue=l,i=up.bind(null,de,l),l.dispatch=i,l=Iu(!1),c=lc.bind(null,de,!1,l.queue),l=mt(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,i=uS.bind(null,de,u,c,i),u.dispatch=i,l.memoizedState=e,[t,i,!1]}function Xm(e){var t=Ke();return Km(t,Oe,e)}function Km(e,t,i){if(t=Ju(e,t,Ym)[0],e=fr(En)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=As(t)}catch(v){throw v===wi?tr:v}else l=t;t=Ke();var u=t.queue,c=u.dispatch;return i!==t.memoizedState&&(de.flags|=2048,Ai(9,{destroy:void 0},cS.bind(null,u,i),null)),[l,c,e]}function cS(e,t){e.action=t}function Fm(e){var t=Ke(),i=Oe;if(i!==null)return Km(t,i,e);Ke(),t=t.memoizedState,i=Ke();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Ai(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=de.updateQueue,t===null&&(t=ur(),de.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Zm(){return Ke().memoizedState}function dr(e,t,i,l){var u=mt();de.flags|=e,u.memoizedState=Ai(1|t,{destroy:void 0},i,l===void 0?null:l)}function hr(e,t,i,l){var u=Ke();l=l===void 0?null:l;var c=u.memoizedState.inst;Oe!==null&&l!==null&&Xu(l,Oe.memoizedState.deps)?u.memoizedState=Ai(t,c,i,l):(de.flags|=e,u.memoizedState=Ai(1|t,c,i,l))}function Qm(e,t){dr(8390656,8,e,t)}function tc(e,t){hr(2048,8,e,t)}function fS(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=ur(),de.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Pm(e){var t=Ke().memoizedState;return fS({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jm(e,t){return hr(4,2,e,t)}function Wm(e,t){return hr(4,4,e,t)}function Im(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ep(e,t,i){i=i!=null?i.concat([e]):null,hr(4,4,Im.bind(null,t,e),i)}function nc(){}function tp(e,t){var i=Ke();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&Xu(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function np(e,t){var i=Ke();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&Xu(t,l[1]))return l[0];if(l=e(),_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[l,t],l}function ac(e,t,i){return i===void 0||(jn&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=ag(),de.lanes|=e,In|=e,i)}function ap(e,t,i,l){return Ot(i,t)?i:ji.current!==null?(e=ac(e,i,l),Ot(e,t)||(Je=!0),e):(jn&42)===0||(jn&1073741824)!==0&&(ye&261930)===0?(Je=!0,e.memoizedState=i):(e=ag(),de.lanes|=e,In|=e,t)}function ip(e,t,i,l,u){var c=Q.p;Q.p=c!==0&&8>c?c:8;var v=$.T,b={};$.T=b,lc(e,!1,t,i);try{var N=u(),V=$.S;if(V!==null&&V(b,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var q=lS(N,l);Cs(e,t,q,_t(e))}else Cs(e,t,l,_t(e))}catch(X){Cs(e,t,{then:function(){},status:"rejected",reason:X},_t())}finally{Q.p=c,v!==null&&b.types!==null&&(v.types=b.types),$.T=v}}function dS(){}function ic(e,t,i,l){if(e.tag!==5)throw Error(r(476));var u=sp(e).queue;ip(e,u,t,J,i===null?dS:function(){return lp(e),i(l)})}function sp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function lp(e){var t=sp(e);t.next===null&&(t=e.alternate.memoizedState),Cs(e,t.next.queue,{},_t())}function sc(){return rt(Xs)}function rp(){return Ke().memoizedState}function op(){return Ke().memoizedState}function hS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_t();e=Fn(i);var l=Zn(t,e,i);l!==null&&(Et(l,t,i),Ts(l,t,i)),t={cache:ku()},e.payload=t;return}t=t.return}}function mS(e,t,i){var l=_t();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},mr(e)?cp(t,i):(i=Tu(e,t,i,l),i!==null&&(Et(i,e,l),fp(i,t,l)))}function up(e,t,i){var l=_t();Cs(e,t,i,l)}function Cs(e,t,i,l){var u={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(mr(e))cp(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var v=t.lastRenderedState,b=c(v,i);if(u.hasEagerState=!0,u.eagerState=b,Ot(b,v))return Zl(e,t,u,0),Ve===null&&Fl(),!1}catch{}finally{}if(i=Tu(e,t,u,l),i!==null)return Et(i,e,l),fp(i,t,l),!0}return!1}function lc(e,t,i,l){if(l={lane:2,revertLane:Uc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},mr(e)){if(t)throw Error(r(479))}else t=Tu(e,i,l,2),t!==null&&Et(t,e,2)}function mr(e){var t=e.alternate;return e===de||t!==null&&t===de}function cp(e,t){Ei=rr=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function fp(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,gh(e,i)}}var Ms={readContext:rt,use:cr,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useLayoutEffect:qe,useInsertionEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useSyncExternalStore:qe,useId:qe,useHostTransitionStatus:qe,useFormState:qe,useActionState:qe,useOptimistic:qe,useMemoCache:qe,useCacheRefresh:qe};Ms.useEffectEvent=qe;var dp={readContext:rt,use:cr,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:Qm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,dr(4194308,4,Im.bind(null,t,e),i)},useLayoutEffect:function(e,t){return dr(4194308,4,e,t)},useInsertionEffect:function(e,t){dr(4,2,e,t)},useMemo:function(e,t){var i=mt();t=t===void 0?null:t;var l=e();if(_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=mt();if(i!==void 0){var u=i(t);if(_a){Bn(!0);try{i(t)}finally{Bn(!1)}}}else u=t;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=mS.bind(null,de,e),[l.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Iu(e);var t=e.queue,i=up.bind(null,de,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:nc,useDeferredValue:function(e,t){var i=mt();return ac(i,e,t)},useTransition:function(){var e=Iu(!1);return e=ip.bind(null,de,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=de,u=mt();if(we){if(i===void 0)throw Error(r(407));i=i()}else{if(i=t(),Ve===null)throw Error(r(349));(ye&127)!==0||zm(l,t,i)}u.memoizedState=i;var c={value:i,getSnapshot:t};return u.queue=c,Qm(Lm.bind(null,l,c,e),[e]),l.flags|=2048,Ai(9,{destroy:void 0},km.bind(null,l,c,i,t),null),i},useId:function(){var e=mt(),t=Ve.identifierPrefix;if(we){var i=rn,l=ln;i=(l&~(1<<32-Dt(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=or++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=rS++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:sc,useFormState:Gm,useActionState:Gm,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=lc.bind(null,de,!0,i),i.dispatch=t,[e,t]},useMemoCache:Pu,useCacheRefresh:function(){return mt().memoizedState=hS.bind(null,de)},useEffectEvent:function(e){var t=mt(),i={impl:e};return t.memoizedState=i,function(){if((Ne&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},rc={readContext:rt,use:cr,useCallback:tp,useContext:rt,useEffect:tc,useImperativeHandle:ep,useInsertionEffect:Jm,useLayoutEffect:Wm,useMemo:np,useReducer:fr,useRef:Zm,useState:function(){return fr(En)},useDebugValue:nc,useDeferredValue:function(e,t){var i=Ke();return ap(i,Oe.memoizedState,e,t)},useTransition:function(){var e=fr(En)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:Rm,useId:rp,useHostTransitionStatus:sc,useFormState:Xm,useActionState:Xm,useOptimistic:function(e,t){var i=Ke();return Um(i,Oe,e,t)},useMemoCache:Pu,useCacheRefresh:op};rc.useEffectEvent=Pm;var hp={readContext:rt,use:cr,useCallback:tp,useContext:rt,useEffect:tc,useImperativeHandle:ep,useInsertionEffect:Jm,useLayoutEffect:Wm,useMemo:np,useReducer:Wu,useRef:Zm,useState:function(){return Wu(En)},useDebugValue:nc,useDeferredValue:function(e,t){var i=Ke();return Oe===null?ac(i,e,t):ap(i,Oe.memoizedState,e,t)},useTransition:function(){var e=Wu(En)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:Rm,useId:rp,useHostTransitionStatus:sc,useFormState:Fm,useActionState:Fm,useOptimistic:function(e,t){var i=Ke();return Oe!==null?Um(i,Oe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:op};hp.useEffectEvent=Pm;function oc(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:y({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var uc={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=_t(),u=Fn(l);u.payload=t,i!=null&&(u.callback=i),t=Zn(e,u,l),t!==null&&(Et(t,e,l),Ts(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=_t(),u=Fn(l);u.tag=1,u.payload=t,i!=null&&(u.callback=i),t=Zn(e,u,l),t!==null&&(Et(t,e,l),Ts(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),l=Fn(i);l.tag=2,t!=null&&(l.callback=t),t=Zn(e,l,i),t!==null&&(Et(t,e,i),Ts(t,e,i))}};function mp(e,t,i,l,u,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,v):t.prototype&&t.prototype.isPureReactComponent?!ps(i,l)||!ps(u,c):!0}function pp(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=y({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}function gp(e){Kl(e)}function vp(e){console.error(e)}function xp(e){Kl(e)}function pr(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function yp(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function cc(e,t,i){return i=Fn(i),i.tag=3,i.payload={element:null},i.callback=function(){pr(e,t)},i}function bp(e){return e=Fn(e),e.tag=3,e}function Sp(e,t,i,l){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var c=l.value;e.payload=function(){return u(c)},e.callback=function(){yp(t,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){yp(t,i,l),typeof u!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function pS(e,t,i,l,u){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&yi(t,i,u,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?Ar():i.alternate===null&&Ye===0&&(Ye=3),i.flags&=-257,i.flags|=65536,i.lanes=u,l===nr?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Lc(e,l,u)),!1;case 22:return i.flags|=65536,l===nr?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),Lc(e,l,u)),!1}throw Error(r(435,i.tag))}return Lc(e,l,u),Ar(),!1}if(we)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,l!==Mu&&(e=Error(r(422),{cause:l}),xs(qt(e,i)))):(l!==Mu&&(t=Error(r(423),{cause:l}),xs(qt(t,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=qt(l,i),u=cc(e.stateNode,l,u),Hu(e,u),Ye!==4&&(Ye=2)),!1;var c=Error(r(520),{cause:l});if(c=qt(c,i),_s===null?_s=[c]:_s.push(c),Ye!==4&&(Ye=2),t===null)return!0;l=qt(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=cc(i.stateNode,l,e),Hu(i,e),!1;case 1:if(t=i.type,c=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ea===null||!ea.has(c))))return i.flags|=65536,u&=-u,i.lanes|=u,u=bp(u),Sp(u,e,i,l),Hu(i,u),!1}i=i.return}while(i!==null);return!1}var fc=Error(r(461)),Je=!1;function ot(e,t,i,l){t.child=e===null?Em(t,null,i,l):Va(t,e.child,i,l)}function wp(e,t,i,l,u){i=i.render;var c=t.ref;if("ref"in l){var v={};for(var b in l)b!=="ref"&&(v[b]=l[b])}else v=l;return Ra(t),l=Ku(e,t,i,v,c,u),b=Fu(),e!==null&&!Je?(Zu(e,t,u),Nn(e,t,u)):(we&&b&&Au(t),t.flags|=1,ot(e,t,l,u),t.child)}function Tp(e,t,i,l,u){if(e===null){var c=i.type;return typeof c=="function"&&!ju(c)&&c.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=c,jp(e,t,c,l,u)):(e=Pl(i.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yc(e,u)){var v=c.memoizedProps;if(i=i.compare,i=i!==null?i:ps,i(v,l)&&e.ref===t.ref)return Nn(e,t,u)}return t.flags|=1,e=bn(c,l),e.ref=t.ref,e.return=t,t.child=e}function jp(e,t,i,l,u){if(e!==null){var c=e.memoizedProps;if(ps(c,l)&&e.ref===t.ref)if(Je=!1,t.pendingProps=l=c,yc(e,u))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,Nn(e,t,u)}return dc(e,t,i,l,u)}function Ep(e,t,i,l){var u=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|i:i,e!==null){for(l=t.child=e.child,u=0;l!==null;)u=u|l.lanes|l.childLanes,l=l.sibling;l=u&~c}else l=0,t.child=null;return Np(e,t,c,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&er(t,c!==null?c.cachePool:null),c!==null?Cm(t,c):qu(),Mm(t);else return l=t.lanes=536870912,Np(e,t,c!==null?c.baseLanes|i:i,i,l)}else c!==null?(er(t,c.cachePool),Cm(t,c),Pn(),t.memoizedState=null):(e!==null&&er(t,null),qu(),Pn());return ot(e,t,u,i),t.child}function Ds(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Np(e,t,i,l,u){var c=Vu();return c=c===null?null:{parent:Qe._currentValue,pool:c},t.memoizedState={baseLanes:i,cachePool:c},e!==null&&er(t,null),qu(),Mm(t),e!==null&&yi(e,t,l,!0),t.childLanes=u,null}function gr(e,t){return t=xr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ap(e,t,i){return Va(t,e.child,null,i),e=gr(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function gS(e,t,i){var l=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(l.mode==="hidden")return e=gr(t,l),t.lanes=536870912,Ds(null,e);if(Gu(t),(e=Ue)?(e=Bg(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:ln,overflow:rn}:null,retryLane:536870912,hydrationErrors:null},i=cm(e),i.return=t,t.child=i,lt=t,Ue=null)):e=null,e===null)throw Gn(t);return t.lanes=536870912,null}return gr(t,l)}var c=e.memoizedState;if(c!==null){var v=c.dehydrated;if(Gu(t),u)if(t.flags&256)t.flags&=-257,t=Ap(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Je||yi(e,t,i,!1),u=(i&e.childLanes)!==0,Je||u){if(l=Ve,l!==null&&(v=vh(l,i),v!==0&&v!==c.retryLane))throw c.retryLane=v,Ca(e,v),Et(l,e,v),fc;Ar(),t=Ap(e,t,i)}else e=c.treeContext,Ue=Ft(v.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&hm(t,e),t=gr(t,l),t.flags|=4096;return t}return e=bn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vr(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function dc(e,t,i,l,u){return Ra(t),i=Ku(e,t,i,l,void 0,u),l=Fu(),e!==null&&!Je?(Zu(e,t,u),Nn(e,t,u)):(we&&l&&Au(t),t.flags|=1,ot(e,t,i,u),t.child)}function Cp(e,t,i,l,u,c){return Ra(t),t.updateQueue=null,i=Om(t,l,i,u),Dm(e),l=Fu(),e!==null&&!Je?(Zu(e,t,c),Nn(e,t,c)):(we&&l&&Au(t),t.flags|=1,ot(e,t,i,c),t.child)}function Mp(e,t,i,l,u){if(Ra(t),t.stateNode===null){var c=pi,v=i.contextType;typeof v=="object"&&v!==null&&(c=rt(v)),c=new i(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=uc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},Uu(t),v=i.contextType,c.context=typeof v=="object"&&v!==null?rt(v):pi,c.state=t.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(oc(t,i,v,l),c.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(v=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),v!==c.state&&uc.enqueueReplaceState(c,c.state,null),Es(t,l,c,u),js(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,N=Ua(i,b);c.props=N;var V=c.context,q=i.contextType;v=pi,typeof q=="object"&&q!==null&&(v=rt(q));var X=i.getDerivedStateFromProps;q=typeof X=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||V!==v)&&pp(t,c,l,v),Kn=!1;var _=t.memoizedState;c.state=_,Es(t,l,c,u),js(),V=t.memoizedState,b||_!==V||Kn?(typeof X=="function"&&(oc(t,i,X,l),V=t.memoizedState),(N=Kn||mp(t,i,N,l,_,V,v))?(q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=V),c.props=l,c.state=V,c.context=v,l=N):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,Bu(e,t),v=t.memoizedProps,q=Ua(i,v),c.props=q,X=t.pendingProps,_=c.context,V=i.contextType,N=pi,typeof V=="object"&&V!==null&&(N=rt(V)),b=i.getDerivedStateFromProps,(V=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==X||_!==N)&&pp(t,c,l,N),Kn=!1,_=t.memoizedState,c.state=_,Es(t,l,c,u),js();var H=t.memoizedState;v!==X||_!==H||Kn||e!==null&&e.dependencies!==null&&Wl(e.dependencies)?(typeof b=="function"&&(oc(t,i,b,l),H=t.memoizedState),(q=Kn||mp(t,i,q,l,_,H,N)||e!==null&&e.dependencies!==null&&Wl(e.dependencies))?(V||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,H,N),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,H,N)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=H),c.props=l,c.state=H,c.context=N,l=q):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,vr(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=Va(t,e.child,null,u),t.child=Va(t,null,i,u)):ot(e,t,i,u),t.memoizedState=c.state,e=t.child):e=Nn(e,t,u),e}function Dp(e,t,i,l){return Da(),t.flags|=256,ot(e,t,i,l),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mc(e){return{baseLanes:e,cachePool:ym()}}function pc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Vt),e}function Op(e,t,i){var l=t.pendingProps,u=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),v&&(u=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(we){if(u?Qn(t):Pn(),(e=Ue)?(e=Bg(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:ln,overflow:rn}:null,retryLane:536870912,hydrationErrors:null},i=cm(e),i.return=t,t.child=i,lt=t,Ue=null)):e=null,e===null)throw Gn(t);return Jc(e)?t.lanes=32:t.lanes=536870912,null}var b=l.children;return l=l.fallback,u?(Pn(),u=t.mode,b=xr({mode:"hidden",children:b},u),l=Ma(l,u,i,null),b.return=t,l.return=t,b.sibling=l,t.child=b,l=t.child,l.memoizedState=mc(i),l.childLanes=pc(e,v,i),t.memoizedState=hc,Ds(null,l)):(Qn(t),gc(t,b))}var N=e.memoizedState;if(N!==null&&(b=N.dehydrated,b!==null)){if(c)t.flags&256?(Qn(t),t.flags&=-257,t=vc(e,t,i)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),b=l.fallback,u=t.mode,l=xr({mode:"visible",children:l.children},u),b=Ma(b,u,i,null),b.flags|=2,l.return=t,b.return=t,l.sibling=b,t.child=l,Va(t,e.child,null,i),l=t.child,l.memoizedState=mc(i),l.childLanes=pc(e,v,i),t.memoizedState=hc,t=Ds(null,l));else if(Qn(t),Jc(b)){if(v=b.nextSibling&&b.nextSibling.dataset,v)var V=v.dgst;v=V,l=Error(r(419)),l.stack="",l.digest=v,xs({value:l,source:null,stack:null}),t=vc(e,t,i)}else if(Je||yi(e,t,i,!1),v=(i&e.childLanes)!==0,Je||v){if(v=Ve,v!==null&&(l=vh(v,i),l!==0&&l!==N.retryLane))throw N.retryLane=l,Ca(e,l),Et(v,e,l),fc;Pc(b)||Ar(),t=vc(e,t,i)}else Pc(b)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Ue=Ft(b.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&hm(t,e),t=gc(t,l.children),t.flags|=4096);return t}return u?(Pn(),b=l.fallback,u=t.mode,N=e.child,V=N.sibling,l=bn(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,V!==null?b=bn(V,b):(b=Ma(b,u,i,null),b.flags|=2),b.return=t,l.return=t,l.sibling=b,t.child=l,Ds(null,l),l=t.child,b=e.child.memoizedState,b===null?b=mc(i):(u=b.cachePool,u!==null?(N=Qe._currentValue,u=u.parent!==N?{parent:N,pool:N}:u):u=ym(),b={baseLanes:b.baseLanes|i,cachePool:u}),l.memoizedState=b,l.childLanes=pc(e,v,i),t.memoizedState=hc,Ds(e.child,l)):(Qn(t),i=e.child,e=i.sibling,i=bn(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=i,t.memoizedState=null,i)}function gc(e,t){return t=xr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xr(e,t){return e=Rt(22,e,null,t),e.lanes=0,e}function vc(e,t,i){return Va(t,e.child,null,i),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rp(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ru(e.return,t,i)}function xc(e,t,i,l,u,c){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:u,treeForkCount:c}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=u,v.treeForkCount=c)}function zp(e,t,i){var l=t.pendingProps,u=l.revealOrder,c=l.tail;l=l.children;var v=Xe.current,b=(v&2)!==0;if(b?(v=v&1|2,t.flags|=128):v&=1,K(Xe,v),ot(e,t,l,i),l=we?vs:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rp(e,i,t);else if(e.tag===19)Rp(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(i=t.child,u=null;i!==null;)e=i.alternate,e!==null&&lr(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=t.child,t.child=null):(u=i.sibling,i.sibling=null),xc(t,!1,u,i,c,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&lr(e)===null){t.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}xc(t,!0,i,null,c,l);break;case"together":xc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Nn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),In|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(yi(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,i=bn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function yc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wl(e)))}function vS(e,t,i){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),Xn(t,Qe,e.memoizedState.cache),Da();break;case 27:case 5:ns(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:Xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Gu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Qn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Op(e,t,i):(Qn(t),e=Nn(e,t,i),e!==null?e.sibling:null);Qn(t);break;case 19:var u=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(yi(e,t,i,!1),l=(i&t.childLanes)!==0),u){if(l)return zp(e,t,i);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),K(Xe,Xe.current),l)break;return null;case 22:return t.lanes=0,Ep(e,t,i,t.pendingProps);case 24:Xn(t,Qe,e.memoizedState.cache)}return Nn(e,t,i)}function kp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!yc(e,i)&&(t.flags&128)===0)return Je=!1,vS(e,t,i);Je=(e.flags&131072)!==0}else Je=!1,we&&(t.flags&1048576)!==0&&dm(t,vs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")ju(e)?(l=Ua(e,l),t.tag=1,t=Mp(null,t,e,l,i)):(t.tag=0,t=dc(null,t,e,l,i));else{if(e!=null){var u=e.$$typeof;if(u===k){t.tag=11,t=wp(null,t,e,l,i);break e}else if(u===F){t.tag=14,t=Tp(null,t,e,l,i);break e}}throw t=Se(e)||e,Error(r(306,t,""))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,u=Ua(l,t.pendingProps),Mp(e,t,l,u,i);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var c=t.memoizedState;u=c.element,Bu(e,t),Es(t,l,null,i);var v=t.memoizedState;if(l=v.cache,Xn(t,Qe,l),l!==c.cache&&zu(t,[Qe],i,!0),js(),l=v.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Dp(e,t,l,i);break e}else if(l!==u){u=qt(Error(r(424)),t),xs(u),t=Dp(e,t,l,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ue=Ft(e.firstChild),lt=t,we=!0,Yn=null,Xt=!0,i=Em(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Da(),l===u){t=Nn(e,t,i);break e}ot(e,t,l,i)}t=t.child}return t;case 26:return vr(e,t),e===null?(i=Xg(t.type,null,t.pendingProps,null))?t.memoizedState=i:we||(i=t.type,e=t.pendingProps,l=kr(pe.current).createElement(i),l[st]=t,l[yt]=e,ut(l,i,e),at(l),t.stateNode=l):t.memoizedState=Xg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ns(t),e===null&&we&&(l=t.stateNode=qg(t.type,t.pendingProps,pe.current),lt=t,Xt=!0,u=Ue,ia(t.type)?(Wc=u,Ue=Ft(l.firstChild)):Ue=u),ot(e,t,t.pendingProps.children,i),vr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((u=l=Ue)&&(l=FS(l,t.type,t.pendingProps,Xt),l!==null?(t.stateNode=l,lt=t,Ue=Ft(l.firstChild),Xt=!1,u=!0):u=!1),u||Gn(t)),ns(t),u=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,l=c.children,Fc(u,c)?l=null:v!==null&&Fc(u,v)&&(t.flags|=32),t.memoizedState!==null&&(u=Ku(e,t,oS,null,null,i),Xs._currentValue=u),vr(e,t),ot(e,t,l,i),t.child;case 6:return e===null&&we&&((e=i=Ue)&&(i=ZS(i,t.pendingProps,Xt),i!==null?(t.stateNode=i,lt=t,Ue=null,e=!0):e=!1),e||Gn(t)),null;case 13:return Op(e,t,i);case 4:return Ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Va(t,null,l,i):ot(e,t,l,i),t.child;case 11:return wp(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,Xn(t,t.type,l.value),ot(e,t,l.children,i),t.child;case 9:return u=t.type._context,l=t.pendingProps.children,Ra(t),u=rt(u),l=l(u),t.flags|=1,ot(e,t,l,i),t.child;case 14:return Tp(e,t,t.type,t.pendingProps,i);case 15:return jp(e,t,t.type,t.pendingProps,i);case 19:return zp(e,t,i);case 31:return gS(e,t,i);case 22:return Ep(e,t,i,t.pendingProps);case 24:return Ra(t),l=rt(Qe),e===null?(u=Vu(),u===null&&(u=Ve,c=ku(),u.pooledCache=c,c.refCount++,c!==null&&(u.pooledCacheLanes|=i),u=c),t.memoizedState={parent:l,cache:u},Uu(t),Xn(t,Qe,u)):((e.lanes&i)!==0&&(Bu(e,t),Es(t,null,null,i),js()),u=e.memoizedState,c=t.memoizedState,u.parent!==l?(u={parent:l,cache:l},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Xn(t,Qe,l)):(l=c.cache,Xn(t,Qe,l),l!==u.cache&&zu(t,[Qe],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function An(e){e.flags|=4}function bc(e,t,i,l,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(rg())e.flags|=8192;else throw La=nr,_u}else e.flags&=-16777217}function Lp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t))if(rg())e.flags|=8192;else throw La=nr,_u}function yr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mh():536870912,e.lanes|=t,Oi|=t)}function Os(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function xS(e,t,i){var l=t.pendingProps;switch(Cu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Tn(Qe),Le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(xi(t)?An(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Du())),Be(t),null;case 26:var u=t.type,c=t.memoizedState;return e===null?(An(t),c!==null?(Be(t),Lp(t,c)):(Be(t),bc(t,u,null,l,i))):c?c!==e.memoizedState?(An(t),Be(t),Lp(t,c)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&An(t),Be(t),bc(t,u,e,l,i)),null;case 27:if(Dl(t),i=pe.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Be(t),null}e=I.current,xi(t)?mm(t):(e=qg(u,l,i),t.stateNode=e,An(t))}return Be(t),null;case 5:if(Dl(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Be(t),null}if(c=I.current,xi(t))mm(t);else{var v=kr(pe.current);switch(c){case 1:c=v.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:c=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":c=v.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":c=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":c=v.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?v.createElement(u,{is:l.is}):v.createElement(u)}}c[st]=t,c[yt]=l;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)c.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=c;e:switch(ut(c,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&An(t)}}return Be(t),bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=pe.current,xi(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,u=lt,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[st]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Og(e.nodeValue,i)),e||Gn(t,!0)}else e=kr(e).createTextNode(l),e[st]=t,t.stateNode=e}return Be(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=xi(t),i!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[st]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else i=Du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Be(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=xi(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[st]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),u=!1}else u=Du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==u&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),yr(t,t.updateQueue),Be(t),null);case 4:return Le(),e===null&&qc(t.stateNode.containerInfo),Be(t),null;case 10:return Tn(t.type),Be(t),null;case 19:if(G(Xe),l=t.memoizedState,l===null)return Be(t),null;if(u=(t.flags&128)!==0,c=l.rendering,c===null)if(u)Os(l,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=lr(e),c!==null){for(t.flags|=128,Os(l,!1),e=c.updateQueue,t.updateQueue=e,yr(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)um(i,e),i=i.sibling;return K(Xe,Xe.current&1|2),we&&Sn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ct()>jr&&(t.flags|=128,u=!0,Os(l,!1),t.lanes=4194304)}else{if(!u)if(e=lr(c),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,yr(t,e),Os(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!we)return Be(t),null}else 2*Ct()-l.renderingStartTime>jr&&i!==536870912&&(t.flags|=128,u=!0,Os(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ct(),e.sibling=null,i=Xe.current,K(Xe,u?i&1|2:i&1),we&&Sn(t,l.treeForkCount),e):(Be(t),null);case 22:case 23:return kt(t),Yu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),i=t.updateQueue,i!==null&&yr(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&G(za),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Tn(Qe),Be(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function yS(e,t){switch(Cu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tn(Qe),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Dl(t),null;case 31:if(t.memoizedState!==null){if(kt(t),t.alternate===null)throw Error(r(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Xe),null;case 4:return Le(),null;case 10:return Tn(t.type),null;case 22:case 23:return kt(t),Yu(),e!==null&&G(za),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Tn(Qe),null;case 25:return null;default:return null}}function Vp(e,t){switch(Cu(t),t.tag){case 3:Tn(Qe),Le();break;case 26:case 27:case 5:Dl(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:G(Xe);break;case 10:Tn(t.type);break;case 22:case 23:kt(t),Yu(),e!==null&&G(za);break;case 24:Tn(Qe)}}function Rs(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var u=l.next;i=u;do{if((i.tag&e)===e){l=void 0;var c=i.create,v=i.inst;l=c(),v.destroy=l}i=i.next}while(i!==u)}}catch(b){Ce(t,t.return,b)}}function Jn(e,t,i){try{var l=t.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var c=u.next;l=c;do{if((l.tag&e)===e){var v=l.inst,b=v.destroy;if(b!==void 0){v.destroy=void 0,u=t;var N=i,V=b;try{V()}catch(q){Ce(u,N,q)}}}l=l.next}while(l!==c)}}catch(q){Ce(t,t.return,q)}}function _p(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Am(t,i)}catch(l){Ce(e,e.return,l)}}}function Up(e,t,i){i.props=Ua(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){Ce(e,t,l)}}function zs(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(u){Ce(e,t,u)}}function on(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(u){Ce(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){Ce(e,t,u)}else i.current=null}function Bp(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(u){Ce(e,e.return,u)}}function Sc(e,t,i){try{var l=e.stateNode;$S(l,e.type,i,t),l[yt]=t}catch(u){Ce(e,e.return,u)}}function Hp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ia(e.type)||e.tag===4}function wc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hp(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.tag===27&&ia(e.type)||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 Tc(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=xn));else if(l!==4&&(l===27&&ia(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Tc(e,t,i),e=e.sibling;e!==null;)Tc(e,t,i),e=e.sibling}function br(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&ia(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(br(e,t,i),e=e.sibling;e!==null;)br(e,t,i),e=e.sibling}function $p(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);ut(t,l,i),t[st]=e,t[yt]=i}catch(c){Ce(e,e.return,c)}}var Cn=!1,We=!1,jc=!1,qp=typeof WeakSet=="function"?WeakSet:Set,it=null;function bS(e,t){if(e=e.containerInfo,Xc=$r,e=em(e),vu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var u=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{i.nodeType,c.nodeType}catch{i=null;break e}var v=0,b=-1,N=-1,V=0,q=0,X=e,_=null;t:for(;;){for(var H;X!==i||u!==0&&X.nodeType!==3||(b=v+u),X!==c||l!==0&&X.nodeType!==3||(N=v+l),X.nodeType===3&&(v+=X.nodeValue.length),(H=X.firstChild)!==null;)_=X,X=H;for(;;){if(X===e)break t;if(_===i&&++V===u&&(b=v),_===c&&++q===l&&(N=v),(H=X.nextSibling)!==null)break;X=_,_=X.parentNode}X=H}i=b===-1||N===-1?null:{start:b,end:N}}else i=null}i=i||{start:0,end:0}}else i=null;for(Kc={focusedElem:e,selectionRange:i},$r=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){switch(t=it,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)u=e[i],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,i=t,u=c.memoizedProps,c=c.memoizedState,l=i.stateNode;try{var ee=Ua(i.type,u);e=l.getSnapshotBeforeUpdate(ee,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(se){Ce(i,i.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Qc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}}function Yp(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Dn(e,i),l&4&&Rs(5,i);break;case 1:if(Dn(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(v){Ce(i,i.return,v)}else{var u=Ua(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ce(i,i.return,v)}}l&64&&_p(i),l&512&&zs(i,i.return);break;case 3:if(Dn(e,i),l&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Am(e,t)}catch(v){Ce(i,i.return,v)}}break;case 27:t===null&&l&4&&$p(i);case 26:case 5:Dn(e,i),t===null&&l&4&&Bp(i),l&512&&zs(i,i.return);break;case 12:Dn(e,i);break;case 31:Dn(e,i),l&4&&Kp(e,i);break;case 13:Dn(e,i),l&4&&Fp(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=MS.bind(null,i),QS(e,i))));break;case 22:if(l=i.memoizedState!==null||Cn,!l){t=t!==null&&t.memoizedState!==null||We,u=Cn;var c=We;Cn=l,(We=t)&&!c?On(e,i,(i.subtreeFlags&8772)!==0):Dn(e,i),Cn=u,We=c}break;case 30:break;default:Dn(e,i)}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&eu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var $e=null,St=!1;function Mn(e,t,i){for(i=i.child;i!==null;)Xp(e,t,i),i=i.sibling}function Xp(e,t,i){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(as,i)}catch{}switch(i.tag){case 26:We||on(i,t),Mn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:We||on(i,t);var l=$e,u=St;ia(i.type)&&($e=i.stateNode,St=!1),Mn(e,t,i),qs(i.stateNode),$e=l,St=u;break;case 5:We||on(i,t);case 6:if(l=$e,u=St,$e=null,Mn(e,t,i),$e=l,St=u,$e!==null)if(St)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(i.stateNode)}catch(c){Ce(i,t,c)}else try{$e.removeChild(i.stateNode)}catch(c){Ce(i,t,c)}break;case 18:$e!==null&&(St?(e=$e,_g(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Bi(e)):_g($e,i.stateNode));break;case 4:l=$e,u=St,$e=i.stateNode.containerInfo,St=!0,Mn(e,t,i),$e=l,St=u;break;case 0:case 11:case 14:case 15:Jn(2,i,t),We||Jn(4,i,t),Mn(e,t,i);break;case 1:We||(on(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Up(i,t,l)),Mn(e,t,i);break;case 21:Mn(e,t,i);break;case 22:We=(l=We)||i.memoizedState!==null,Mn(e,t,i),We=l;break;default:Mn(e,t,i)}}function Kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bi(e)}catch(i){Ce(t,t.return,i)}}}function Fp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bi(e)}catch(i){Ce(t,t.return,i)}}function SS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qp),t;default:throw Error(r(435,e.tag))}}function Sr(e,t){var i=SS(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var u=DS.bind(null,e,l);l.then(u,u)}})}function wt(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var u=i[l],c=e,v=t,b=v;e:for(;b!==null;){switch(b.tag){case 27:if(ia(b.type)){$e=b.stateNode,St=!1;break e}break;case 5:$e=b.stateNode,St=!1;break e;case 3:case 4:$e=b.stateNode.containerInfo,St=!0;break e}b=b.return}if($e===null)throw Error(r(160));Xp(c,v,u),$e=null,St=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zp(t,e),t=t.sibling}var It=null;function Zp(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wt(t,e),Tt(e),l&4&&(Jn(3,e,e.return),Rs(3,e),Jn(5,e,e.return));break;case 1:wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),l&64&&Cn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var u=It;if(wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),l&4){var c=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":c=u.getElementsByTagName("title")[0],(!c||c[ls]||c[st]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=u.createElement(l),u.head.insertBefore(c,u.querySelector("head > title"))),ut(c,l,i),c[st]=e,at(c),l=c;break e;case"link":var v=Zg("link","href",u).get(l+(i.href||""));if(v){for(var b=0;b<v.length;b++)if(c=v[b],c.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&c.getAttribute("rel")===(i.rel==null?null:i.rel)&&c.getAttribute("title")===(i.title==null?null:i.title)&&c.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(b,1);break t}}c=u.createElement(l),ut(c,l,i),u.head.appendChild(c);break;case"meta":if(v=Zg("meta","content",u).get(l+(i.content||""))){for(b=0;b<v.length;b++)if(c=v[b],c.getAttribute("content")===(i.content==null?null:""+i.content)&&c.getAttribute("name")===(i.name==null?null:i.name)&&c.getAttribute("property")===(i.property==null?null:i.property)&&c.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&c.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(b,1);break t}}c=u.createElement(l),ut(c,l,i),u.head.appendChild(c);break;default:throw Error(r(468,l))}c[st]=e,at(c),l=c}e.stateNode=l}else Qg(u,e.type,e.stateNode);else e.stateNode=Fg(u,l,e.memoizedProps);else c!==l?(c===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):c.count--,l===null?Qg(u,e.type,e.stateNode):Fg(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Sc(e,e.memoizedProps,i.memoizedProps)}break;case 27:wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),i!==null&&l&4&&Sc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),e.flags&32){u=e.stateNode;try{oi(u,"")}catch(ee){Ce(e,e.return,ee)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,Sc(e,u,i!==null?i.memoizedProps:u)),l&1024&&(jc=!0);break;case 6:if(wt(t,e),Tt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(ee){Ce(e,e.return,ee)}}break;case 3:if(_r=null,u=It,It=Lr(t.containerInfo),wt(t,e),It=u,Tt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Bi(t.containerInfo)}catch(ee){Ce(e,e.return,ee)}jc&&(jc=!1,Qp(e));break;case 4:l=It,It=Lr(e.stateNode.containerInfo),wt(t,e),Tt(e),It=l;break;case 12:wt(t,e),Tt(e);break;case 31:wt(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 13:wt(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Tr=Ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 22:u=e.memoizedState!==null;var N=i!==null&&i.memoizedState!==null,V=Cn,q=We;if(Cn=V||u,We=q||N,wt(t,e),We=q,Cn=V,Tt(e),l&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(i===null||N||Cn||We||Ba(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){N=i=t;try{if(c=N.stateNode,u)v=c.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{b=N.stateNode;var X=N.memoizedProps.style,_=X!=null&&X.hasOwnProperty("display")?X.display:null;b.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ee){Ce(N,N.return,ee)}}}else if(t.tag===6){if(i===null){N=t;try{N.stateNode.nodeValue=u?"":N.memoizedProps}catch(ee){Ce(N,N.return,ee)}}}else if(t.tag===18){if(i===null){N=t;try{var H=N.stateNode;u?Ug(H,!0):Ug(N.stateNode,!1)}catch(ee){Ce(N,N.return,ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Sr(e,i))));break;case 19:wt(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 30:break;case 21:break;default:wt(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(Hp(l)){i=l;break}l=l.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var u=i.stateNode,c=wc(e);br(e,c,u);break;case 5:var v=i.stateNode;i.flags&32&&(oi(v,""),i.flags&=-33);var b=wc(e);br(e,b,v);break;case 3:case 4:var N=i.stateNode.containerInfo,V=wc(e);Tc(e,V,N);break;default:throw Error(r(161))}}catch(q){Ce(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Qp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Yp(e,t.alternate,t),t=t.sibling}function Ba(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jn(4,t,t.return),Ba(t);break;case 1:on(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Up(t,t.return,i),Ba(t);break;case 27:qs(t.stateNode);case 26:case 5:on(t,t.return),Ba(t);break;case 22:t.memoizedState===null&&Ba(t);break;case 30:Ba(t);break;default:Ba(t)}e=e.sibling}}function On(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,u=e,c=t,v=c.flags;switch(c.tag){case 0:case 11:case 15:On(u,c,i),Rs(4,c);break;case 1:if(On(u,c,i),l=c,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(V){Ce(l,l.return,V)}if(l=c,u=l.updateQueue,u!==null){var b=l.stateNode;try{var N=u.shared.hiddenCallbacks;if(N!==null)for(u.shared.hiddenCallbacks=null,u=0;u<N.length;u++)Nm(N[u],b)}catch(V){Ce(l,l.return,V)}}i&&v&64&&_p(c),zs(c,c.return);break;case 27:$p(c);case 26:case 5:On(u,c,i),i&&l===null&&v&4&&Bp(c),zs(c,c.return);break;case 12:On(u,c,i);break;case 31:On(u,c,i),i&&v&4&&Kp(u,c);break;case 13:On(u,c,i),i&&v&4&&Fp(u,c);break;case 22:c.memoizedState===null&&On(u,c,i),zs(c,c.return);break;case 30:break;default:On(u,c,i)}t=t.sibling}}function Ec(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ys(i))}function Nc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e))}function en(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pp(e,t,i,l),t=t.sibling}function Pp(e,t,i,l){var u=t.flags;switch(t.tag){case 0:case 11:case 15:en(e,t,i,l),u&2048&&Rs(9,t);break;case 1:en(e,t,i,l);break;case 3:en(e,t,i,l),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e)));break;case 12:if(u&2048){en(e,t,i,l),e=t.stateNode;try{var c=t.memoizedProps,v=c.id,b=c.onPostCommit;typeof b=="function"&&b(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ce(t,t.return,N)}}else en(e,t,i,l);break;case 31:en(e,t,i,l);break;case 13:en(e,t,i,l);break;case 23:break;case 22:c=t.stateNode,v=t.alternate,t.memoizedState!==null?c._visibility&2?en(e,t,i,l):ks(e,t):c._visibility&2?en(e,t,i,l):(c._visibility|=2,Ci(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Ec(v,t);break;case 24:en(e,t,i,l),u&2048&&Nc(t.alternate,t);break;default:en(e,t,i,l)}}function Ci(e,t,i,l,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,v=t,b=i,N=l,V=v.flags;switch(v.tag){case 0:case 11:case 15:Ci(c,v,b,N,u),Rs(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?Ci(c,v,b,N,u):ks(c,v):(q._visibility|=2,Ci(c,v,b,N,u)),u&&V&2048&&Ec(v.alternate,v);break;case 24:Ci(c,v,b,N,u),u&&V&2048&&Nc(v.alternate,v);break;default:Ci(c,v,b,N,u)}t=t.sibling}}function ks(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,u=l.flags;switch(l.tag){case 22:ks(i,l),u&2048&&Ec(l.alternate,l);break;case 24:ks(i,l),u&2048&&Nc(l.alternate,l);break;default:ks(i,l)}t=t.sibling}}var Ls=8192;function Mi(e,t,i){if(e.subtreeFlags&Ls)for(e=e.child;e!==null;)Jp(e,t,i),e=e.sibling}function Jp(e,t,i){switch(e.tag){case 26:Mi(e,t,i),e.flags&Ls&&e.memoizedState!==null&&r2(i,It,e.memoizedState,e.memoizedProps);break;case 5:Mi(e,t,i);break;case 3:case 4:var l=It;It=Lr(e.stateNode.containerInfo),Mi(e,t,i),It=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ls,Ls=16777216,Mi(e,t,i),Ls=l):Mi(e,t,i));break;default:Mi(e,t,i)}}function Wp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];it=l,eg(l,e)}Wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ip(e),e=e.sibling}function Ip(e){switch(e.tag){case 0:case 11:case 15:Vs(e),e.flags&2048&&Jn(9,e,e.return);break;case 3:Vs(e);break;case 12:Vs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,wr(e)):Vs(e);break;default:Vs(e)}}function wr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];it=l,eg(l,e)}Wp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jn(8,t,t.return),wr(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,wr(t));break;default:wr(t)}e=e.sibling}}function eg(e,t){for(;it!==null;){var i=it;switch(i.tag){case 0:case 11:case 15:Jn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ys(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,it=l;else e:for(i=e;it!==null;){l=it;var u=l.sibling,c=l.return;if(Gp(l),l===i){it=null;break e}if(u!==null){u.return=c,it=u;break e}it=c}}}var wS={getCacheForType:function(e){var t=rt(Qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return rt(Qe).controller.signal}},TS=typeof WeakMap=="function"?WeakMap:Map,Ne=0,Ve=null,ge=null,ye=0,Ae=0,Lt=null,Wn=!1,Di=!1,Ac=!1,Rn=0,Ye=0,In=0,Ha=0,Cc=0,Vt=0,Oi=0,_s=null,jt=null,Mc=!1,Tr=0,tg=0,jr=1/0,Er=null,ea=null,tt=0,ta=null,Ri=null,zn=0,Dc=0,Oc=null,ng=null,Us=0,Rc=null;function _t(){return(Ne&2)!==0&&ye!==0?ye&-ye:$.T!==null?Uc():xh()}function ag(){if(Vt===0)if((ye&536870912)===0||we){var e=zl;zl<<=1,(zl&3932160)===0&&(zl=262144),Vt=e}else Vt=536870912;return e=zt.current,e!==null&&(e.flags|=32),Vt}function Et(e,t,i){(e===Ve&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(zi(e,0),na(e,ye,Vt,!1)),ss(e,i),((Ne&2)===0||e!==Ve)&&(e===Ve&&((Ne&2)===0&&(Ha|=i),Ye===4&&na(e,ye,Vt,!1)),un(e))}function ig(e,t,i){if((Ne&6)!==0)throw Error(r(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||is(e,t),u=l?NS(e,t):kc(e,t,!0),c=l;do{if(u===0){Di&&!l&&na(e,t,0,!1);break}else{if(i=e.current.alternate,c&&!jS(i)){u=kc(e,t,!1),c=!1;continue}if(u===2){if(c=t,e.errorRecoveryDisabledLanes&c)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var b=e;u=_s;var N=b.current.memoizedState.isDehydrated;if(N&&(zi(b,v).flags|=256),v=kc(b,v,!1),v!==2){if(Ac&&!N){b.errorRecoveryDisabledLanes|=c,Ha|=c,u=4;break e}c=jt,jt=u,c!==null&&(jt===null?jt=c:jt.push.apply(jt,c))}u=v}if(c=!1,u!==2)continue}}if(u===1){zi(e,0),na(e,t,0,!0);break}e:{switch(l=e,c=u,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:na(l,t,Vt,!Wn);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Tr+300-Ct(),10<u)){if(na(l,t,Vt,!Wn),Ll(l,0,!0)!==0)break e;zn=t,l.timeoutHandle=Lg(sg.bind(null,l,i,jt,Er,Mc,t,Vt,Ha,Oi,Wn,c,"Throttled",-0,0),u);break e}sg(l,i,jt,Er,Mc,t,Vt,Ha,Oi,Wn,c,null,-0,0)}}break}while(!0);un(e)}function sg(e,t,i,l,u,c,v,b,N,V,q,X,_,H){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Jp(t,c,X);var ee=(c&62914560)===c?Tr-Ct():(c&4194048)===c?tg-Ct():0;if(ee=o2(X,ee),ee!==null){zn=c,e.cancelPendingCommit=ee(hg.bind(null,e,t,c,i,l,u,v,b,N,q,X,null,_,H)),na(e,c,v,!V);return}}hg(e,t,c,i,l,u,v,b,N)}function jS(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var u=i[l],c=u.getSnapshot;u=u.value;try{if(!Ot(c(),u))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function na(e,t,i,l){t&=~Cc,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var c=31-Dt(u),v=1<<c;l[c]=-1,u&=~v}i!==0&&ph(e,i,t)}function Nr(){return(Ne&6)===0?(Bs(0),!1):!0}function zc(){if(ge!==null){if(Ae===0)var e=ge.return;else e=ge,wn=Oa=null,Qu(e),Ti=null,Ss=0,e=ge;for(;e!==null;)Vp(e.alternate,e),e=e.return;ge=null}}function zi(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,GS(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),zn=0,zc(),Ve=e,ge=i=bn(e.current,null),ye=t,Ae=0,Lt=null,Wn=!1,Di=is(e,t),Ac=!1,Oi=Vt=Cc=Ha=In=Ye=0,jt=_s=null,Mc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var u=31-Dt(l),c=1<<u;t|=e[u],l&=~c}return Rn=t,Fl(),i}function lg(e,t){de=null,$.H=Ms,t===wi||t===tr?(t=wm(),Ae=3):t===_u?(t=wm(),Ae=4):Ae=t===fc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Lt=t,ge===null&&(Ye=1,pr(e,qt(t,e.current)))}function rg(){var e=zt.current;return e===null?!0:(ye&4194048)===ye?Kt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Kt:!1}function og(){var e=$.H;return $.H=Ms,e===null?Ms:e}function ug(){var e=$.A;return $.A=wS,e}function Ar(){Ye=4,Wn||(ye&4194048)!==ye&&zt.current!==null||(Di=!0),(In&134217727)===0&&(Ha&134217727)===0||Ve===null||na(Ve,ye,Vt,!1)}function kc(e,t,i){var l=Ne;Ne|=2;var u=og(),c=ug();(Ve!==e||ye!==t)&&(Er=null,zi(e,t)),t=!1;var v=Ye;e:do try{if(Ae!==0&&ge!==null){var b=ge,N=Lt;switch(Ae){case 8:zc(),v=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var V=Ae;if(Ae=0,Lt=null,ki(e,b,N,V),i&&Di){v=0;break e}break;default:V=Ae,Ae=0,Lt=null,ki(e,b,N,V)}}ES(),v=Ye;break}catch(q){lg(e,q)}while(!0);return t&&e.shellSuspendCounter++,wn=Oa=null,Ne=l,$.H=u,$.A=c,ge===null&&(Ve=null,ye=0,Fl()),v}function ES(){for(;ge!==null;)cg(ge)}function NS(e,t){var i=Ne;Ne|=2;var l=og(),u=ug();Ve!==e||ye!==t?(Er=null,jr=Ct()+500,zi(e,t)):Di=is(e,t);e:do try{if(Ae!==0&&ge!==null){t=ge;var c=Lt;t:switch(Ae){case 1:Ae=0,Lt=null,ki(e,t,c,1);break;case 2:case 9:if(bm(c)){Ae=0,Lt=null,fg(t);break}t=function(){Ae!==2&&Ae!==9||Ve!==e||(Ae=7),un(e)},c.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:bm(c)?(Ae=0,Lt=null,fg(t)):(Ae=0,Lt=null,ki(e,t,c,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var b=ge;if(v?Pg(v):b.stateNode.complete){Ae=0,Lt=null;var N=b.sibling;if(N!==null)ge=N;else{var V=b.return;V!==null?(ge=V,Cr(V)):ge=null}break t}}Ae=0,Lt=null,ki(e,t,c,5);break;case 6:Ae=0,Lt=null,ki(e,t,c,6);break;case 8:zc(),Ye=6;break e;default:throw Error(r(462))}}AS();break}catch(q){lg(e,q)}while(!0);return wn=Oa=null,$.H=l,$.A=u,Ne=i,ge!==null?0:(Ve=null,ye=0,Fl(),Ye)}function AS(){for(;ge!==null&&!Pb();)cg(ge)}function cg(e){var t=kp(e.alternate,e,Rn);e.memoizedProps=e.pendingProps,t===null?Cr(e):ge=t}function fg(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Cp(i,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=Cp(i,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Qu(t);default:Vp(i,t),t=ge=um(t,Rn),t=kp(i,t,Rn)}e.memoizedProps=e.pendingProps,t===null?Cr(e):ge=t}function ki(e,t,i,l){wn=Oa=null,Qu(t),Ti=null,Ss=0;var u=t.return;try{if(pS(e,u,t,i,ye)){Ye=1,pr(e,qt(i,e.current)),ge=null;return}}catch(c){if(u!==null)throw ge=u,c;Ye=1,pr(e,qt(i,e.current)),ge=null;return}t.flags&32768?(we||l===1?e=!0:Di||(ye&536870912)!==0?e=!1:(Wn=e=!0,(l===2||l===9||l===3||l===6)&&(l=zt.current,l!==null&&l.tag===13&&(l.flags|=16384))),dg(t,e)):Cr(t)}function Cr(e){var t=e;do{if((t.flags&32768)!==0){dg(t,Wn);return}e=t.return;var i=xS(t.alternate,t,Rn);if(i!==null){ge=i;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Ye===0&&(Ye=5)}function dg(e,t){do{var i=yS(e.alternate,e);if(i!==null){i.flags&=32767,ge=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=i}while(e!==null);Ye=6,ge=null}function hg(e,t,i,l,u,c,v,b,N){e.cancelPendingCommit=null;do Mr();while(tt!==0);if((Ne&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=wu,l1(e,i,c,v,b,N),e===Ve&&(ge=Ve=null,ye=0),Ri=t,ta=e,zn=i,Dc=c,Oc=u,ng=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,OS(Ol,function(){return xg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,u=Q.p,Q.p=2,v=Ne,Ne|=4;try{bS(e,t,i)}finally{Ne=v,Q.p=u,$.T=l}}tt=1,mg(),pg(),gg()}}function mg(){if(tt===1){tt=0;var e=ta,t=Ri,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=$.T,$.T=null;var l=Q.p;Q.p=2;var u=Ne;Ne|=4;try{Zp(t,e);var c=Kc,v=em(e.containerInfo),b=c.focusedElem,N=c.selectionRange;if(v!==b&&b&&b.ownerDocument&&Ih(b.ownerDocument.documentElement,b)){if(N!==null&&vu(b)){var V=N.start,q=N.end;if(q===void 0&&(q=V),"selectionStart"in b)b.selectionStart=V,b.selectionEnd=Math.min(q,b.value.length);else{var X=b.ownerDocument||document,_=X&&X.defaultView||window;if(_.getSelection){var H=_.getSelection(),ee=b.textContent.length,se=Math.min(N.start,ee),ze=N.end===void 0?se:Math.min(N.end,ee);!H.extend&&se>ze&&(v=ze,ze=se,se=v);var O=Wh(b,se),M=Wh(b,ze);if(O&&M&&(H.rangeCount!==1||H.anchorNode!==O.node||H.anchorOffset!==O.offset||H.focusNode!==M.node||H.focusOffset!==M.offset)){var L=X.createRange();L.setStart(O.node,O.offset),H.removeAllRanges(),se>ze?(H.addRange(L),H.extend(M.node,M.offset)):(L.setEnd(M.node,M.offset),H.addRange(L))}}}}for(X=[],H=b;H=H.parentNode;)H.nodeType===1&&X.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<X.length;b++){var Y=X[b];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}$r=!!Xc,Kc=Xc=null}finally{Ne=u,Q.p=l,$.T=i}}e.current=t,tt=2}}function pg(){if(tt===2){tt=0;var e=ta,t=Ri,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=$.T,$.T=null;var l=Q.p;Q.p=2;var u=Ne;Ne|=4;try{Yp(e,t.alternate,t)}finally{Ne=u,Q.p=l,$.T=i}}tt=3}}function gg(){if(tt===4||tt===3){tt=0,Jb();var e=ta,t=Ri,i=zn,l=ng;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?tt=5:(tt=0,Ri=ta=null,vg(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(ea=null),Wo(i),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(as,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=$.T,u=Q.p,Q.p=2,$.T=null;try{for(var c=e.onRecoverableError,v=0;v<l.length;v++){var b=l[v];c(b.value,{componentStack:b.stack})}}finally{$.T=t,Q.p=u}}(zn&3)!==0&&Mr(),un(e),u=e.pendingLanes,(i&261930)!==0&&(u&42)!==0?e===Rc?Us++:(Us=0,Rc=e):Us=0,Bs(0)}}function vg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ys(t)))}function Mr(){return mg(),pg(),gg(),xg()}function xg(){if(tt!==5)return!1;var e=ta,t=Dc;Dc=0;var i=Wo(zn),l=$.T,u=Q.p;try{Q.p=32>i?32:i,$.T=null,i=Oc,Oc=null;var c=ta,v=zn;if(tt=0,Ri=ta=null,zn=0,(Ne&6)!==0)throw Error(r(331));var b=Ne;if(Ne|=4,Ip(c.current),Pp(c,c.current,v,i),Ne=b,Bs(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(as,c)}catch{}return!0}finally{Q.p=u,$.T=l,vg(e,t)}}function yg(e,t,i){t=qt(i,t),t=cc(e.stateNode,t,2),e=Zn(e,t,2),e!==null&&(ss(e,2),un(e))}function Ce(e,t,i){if(e.tag===3)yg(e,e,i);else for(;t!==null;){if(t.tag===3){yg(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ea===null||!ea.has(l))){e=qt(i,e),i=bp(2),l=Zn(t,i,2),l!==null&&(Sp(i,l,t,e),ss(l,2),un(l));break}}t=t.return}}function Lc(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new TS;var u=new Set;l.set(t,u)}else u=l.get(t),u===void 0&&(u=new Set,l.set(t,u));u.has(i)||(Ac=!0,u.add(i),e=CS.bind(null,e,t,i),t.then(e,e))}function CS(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ve===e&&(ye&i)===i&&(Ye===4||Ye===3&&(ye&62914560)===ye&&300>Ct()-Tr?(Ne&2)===0&&zi(e,0):Cc|=i,Oi===ye&&(Oi=0)),un(e)}function bg(e,t){t===0&&(t=mh()),e=Ca(e,t),e!==null&&(ss(e,t),un(e))}function MS(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),bg(e,i)}function DS(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),bg(e,i)}function OS(e,t){return Zo(e,t)}var Dr=null,Li=null,Vc=!1,Or=!1,_c=!1,aa=0;function un(e){e!==Li&&e.next===null&&(Li===null?Dr=Li=e:Li=Li.next=e),Or=!0,Vc||(Vc=!0,zS())}function Bs(e,t){if(!_c&&Or){_c=!0;do for(var i=!1,l=Dr;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var c=0;else{var v=l.suspendedLanes,b=l.pingedLanes;c=(1<<31-Dt(42|e)+1)-1,c&=u&~(v&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(i=!0,jg(l,c))}else c=ye,c=Ll(l,l===Ve?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||is(l,c)||(i=!0,jg(l,c));l=l.next}while(i);_c=!1}}function RS(){Sg()}function Sg(){Or=Vc=!1;var e=0;aa!==0&&YS()&&(e=aa);for(var t=Ct(),i=null,l=Dr;l!==null;){var u=l.next,c=wg(l,t);c===0?(l.next=null,i===null?Dr=u:i.next=u,u===null&&(Li=i)):(i=l,(e!==0||(c&3)!==0)&&(Or=!0)),l=u}tt!==0&&tt!==5||Bs(e),aa!==0&&(aa=0)}function wg(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var v=31-Dt(c),b=1<<v,N=u[v];N===-1?((b&i)===0||(b&l)!==0)&&(u[v]=s1(b,t)):N<=t&&(e.expiredLanes|=b),c&=~b}if(t=Ve,i=ye,i=Ll(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qo(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||is(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Qo(l),Wo(i)){case 2:case 8:i=dh;break;case 32:i=Ol;break;case 268435456:i=hh;break;default:i=Ol}return l=Tg.bind(null,e),i=Zo(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Qo(l),e.callbackPriority=2,e.callbackNode=null,2}function Tg(e,t){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Mr()&&e.callbackNode!==i)return null;var l=ye;return l=Ll(e,e===Ve?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(ig(e,l,t),wg(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?Tg.bind(null,e):null)}function jg(e,t){if(Mr())return null;ig(e,t,!0)}function zS(){XS(function(){(Ne&6)!==0?Zo(fh,RS):Sg()})}function Uc(){if(aa===0){var e=bi;e===0&&(e=Rl,Rl<<=1,(Rl&261888)===0&&(Rl=256)),aa=e}return aa}function Eg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bl(""+e)}function Ng(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function kS(e,t,i,l,u){if(t==="submit"&&i&&i.stateNode===u){var c=Eg((u[yt]||null).action),v=l.submitter;v&&(t=(t=v[yt]||null)?Eg(t.formAction):v.getAttribute("formAction"),t!==null&&(c=t,v=null));var b=new Yl("action","action",null,l,u);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(aa!==0){var N=v?Ng(u,v):new FormData(u);ic(i,{pending:!0,data:N,method:u.method,action:c},null,N)}}else typeof c=="function"&&(b.preventDefault(),N=v?Ng(u,v):new FormData(u),ic(i,{pending:!0,data:N,method:u.method,action:c},c,N))},currentTarget:u}]})}}for(var Bc=0;Bc<Su.length;Bc++){var Hc=Su[Bc],LS=Hc.toLowerCase(),VS=Hc[0].toUpperCase()+Hc.slice(1);Wt(LS,"on"+VS)}Wt(am,"onAnimationEnd"),Wt(im,"onAnimationIteration"),Wt(sm,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(W1,"onTransitionRun"),Wt(I1,"onTransitionStart"),Wt(eS,"onTransitionCancel"),Wt(lm,"onTransitionEnd"),li("onMouseEnter",["mouseout","mouseover"]),li("onMouseLeave",["mouseout","mouseover"]),li("onPointerEnter",["pointerout","pointerover"]),li("onPointerLeave",["pointerout","pointerover"]),ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hs="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(" "),_S=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hs));function Ag(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],u=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var v=l.length-1;0<=v;v--){var b=l[v],N=b.instance,V=b.currentTarget;if(b=b.listener,N!==c&&u.isPropagationStopped())break e;c=b,u.currentTarget=V;try{c(u)}catch(q){Kl(q)}u.currentTarget=null,c=N}else for(v=0;v<l.length;v++){if(b=l[v],N=b.instance,V=b.currentTarget,b=b.listener,N!==c&&u.isPropagationStopped())break e;c=b,u.currentTarget=V;try{c(u)}catch(q){Kl(q)}u.currentTarget=null,c=N}}}}function ve(e,t){var i=t[Io];i===void 0&&(i=t[Io]=new Set);var l=e+"__bubble";i.has(l)||(Cg(t,e,2,!1),i.add(l))}function $c(e,t,i){var l=0;t&&(l|=4),Cg(i,e,l,t)}var Rr="_reactListening"+Math.random().toString(36).slice(2);function qc(e){if(!e[Rr]){e[Rr]=!0,Sh.forEach(function(i){i!=="selectionchange"&&(_S.has(i)||$c(i,!1,e),$c(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rr]||(t[Rr]=!0,$c("selectionchange",!1,t))}}function Cg(e,t,i,l){switch(av(t)){case 2:var u=f2;break;case 8:u=d2;break;default:u=af}i=u.bind(null,t,i,e),u=void 0,!ou||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(t,i,{capture:!0,passive:u}):e.addEventListener(t,i,!0):u!==void 0?e.addEventListener(t,i,{passive:u}):e.addEventListener(t,i,!1)}function Yc(e,t,i,l,u){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var b=l.stateNode.containerInfo;if(b===u)break;if(v===4)for(v=l.return;v!==null;){var N=v.tag;if((N===3||N===4)&&v.stateNode.containerInfo===u)return;v=v.return}for(;b!==null;){if(v=ai(b),v===null)return;if(N=v.tag,N===5||N===6||N===26||N===27){l=c=v;continue e}b=b.parentNode}}l=l.return}zh(function(){var V=c,q=lu(i),X=[];e:{var _=rm.get(e);if(_!==void 0){var H=Yl,ee=e;switch(e){case"keypress":if($l(i)===0)break e;case"keydown":case"keyup":H=D1;break;case"focusin":ee="focus",H=du;break;case"focusout":ee="blur",H=du;break;case"beforeblur":case"afterblur":H=du;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=x1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=z1;break;case am:case im:case sm:H=S1;break;case lm:H=L1;break;case"scroll":case"scrollend":H=g1;break;case"wheel":H=_1;break;case"copy":case"cut":case"paste":H=T1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Uh;break;case"toggle":case"beforetoggle":H=B1}var se=(t&4)!==0,ze=!se&&(e==="scroll"||e==="scrollend"),O=se?_!==null?_+"Capture":null:_;se=[];for(var M=V,L;M!==null;){var Y=M;if(L=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||L===null||O===null||(Y=os(M,O),Y!=null&&se.push($s(M,Y,L))),ze)break;M=M.return}0<se.length&&(_=new H(_,ee,null,i,q),X.push({event:_,listeners:se}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",_&&i!==su&&(ee=i.relatedTarget||i.fromElement)&&(ai(ee)||ee[ni]))break e;if((H||_)&&(_=q.window===q?q:(_=q.ownerDocument)?_.defaultView||_.parentWindow:window,H?(ee=i.relatedTarget||i.toElement,H=V,ee=ee?ai(ee):null,ee!==null&&(ze=d(ee),se=ee.tag,ee!==ze||se!==5&&se!==27&&se!==6)&&(ee=null)):(H=null,ee=V),H!==ee)){if(se=Vh,Y="onMouseLeave",O="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(se=Uh,Y="onPointerLeave",O="onPointerEnter",M="pointer"),ze=H==null?_:rs(H),L=ee==null?_:rs(ee),_=new se(Y,M+"leave",H,i,q),_.target=ze,_.relatedTarget=L,Y=null,ai(q)===V&&(se=new se(O,M+"enter",ee,i,q),se.target=L,se.relatedTarget=ze,Y=se),ze=Y,H&&ee)t:{for(se=US,O=H,M=ee,L=0,Y=O;Y;Y=se(Y))L++;Y=0;for(var ae=M;ae;ae=se(ae))Y++;for(;0<L-Y;)O=se(O),L--;for(;0<Y-L;)M=se(M),Y--;for(;L--;){if(O===M||M!==null&&O===M.alternate){se=O;break t}O=se(O),M=se(M)}se=null}else se=null;H!==null&&Mg(X,_,H,se,!1),ee!==null&&ze!==null&&Mg(X,ze,ee,se,!0)}}e:{if(_=V?rs(V):window,H=_.nodeName&&_.nodeName.toLowerCase(),H==="select"||H==="input"&&_.type==="file")var je=Kh;else if(Gh(_))if(Fh)je=Q1;else{je=F1;var ne=K1}else H=_.nodeName,!H||H.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?V&&iu(V.elementType)&&(je=Kh):je=Z1;if(je&&(je=je(e,V))){Xh(X,je,i,q);break e}ne&&ne(e,_,V),e==="focusout"&&V&&_.type==="number"&&V.memoizedProps.value!=null&&au(_,"number",_.value)}switch(ne=V?rs(V):window,e){case"focusin":(Gh(ne)||ne.contentEditable==="true")&&(di=ne,xu=V,gs=null);break;case"focusout":gs=xu=di=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,tm(X,i,q);break;case"selectionchange":if(J1)break;case"keydown":case"keyup":tm(X,i,q)}var he;if(mu)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else fi?qh(e,i)&&(be="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(be="onCompositionStart");be&&(Bh&&i.locale!=="ko"&&(fi||be!=="onCompositionStart"?be==="onCompositionEnd"&&fi&&(he=kh()):($n=q,uu="value"in $n?$n.value:$n.textContent,fi=!0)),ne=zr(V,be),0<ne.length&&(be=new _h(be,e,null,i,q),X.push({event:be,listeners:ne}),he?be.data=he:(he=Yh(i),he!==null&&(be.data=he)))),(he=$1?q1(e,i):Y1(e,i))&&(be=zr(V,"onBeforeInput"),0<be.length&&(ne=new _h("onBeforeInput","beforeinput",null,i,q),X.push({event:ne,listeners:be}),ne.data=he)),kS(X,e,V,i,q)}Ag(X,t)})}function $s(e,t,i){return{instance:e,listener:t,currentTarget:i}}function zr(e,t){for(var i=t+"Capture",l=[];e!==null;){var u=e,c=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||c===null||(u=os(e,i),u!=null&&l.unshift($s(e,u,c)),u=os(e,t),u!=null&&l.push($s(e,u,c))),e.tag===3)return l;e=e.return}return[]}function US(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mg(e,t,i,l,u){for(var c=t._reactName,v=[];i!==null&&i!==l;){var b=i,N=b.alternate,V=b.stateNode;if(b=b.tag,N!==null&&N===l)break;b!==5&&b!==26&&b!==27||V===null||(N=V,u?(V=os(i,c),V!=null&&v.unshift($s(i,V,N))):u||(V=os(i,c),V!=null&&v.push($s(i,V,N)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var BS=/\r\n?/g,HS=/\u0000|\uFFFD/g;function Dg(e){return(typeof e=="string"?e:""+e).replace(BS,`
49
+ `).replace(HS,"")}function Og(e,t){return t=Dg(t),Dg(e)===t}function Re(e,t,i,l,u,c){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||oi(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&oi(e,""+l);break;case"className":_l(e,"class",l);break;case"tabIndex":_l(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":_l(e,i,l);break;case"style":Oh(e,l,c);break;case"data":if(t!=="object"){_l(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Bl(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(i==="formAction"?(t!=="input"&&Re(e,t,"name",u.name,u,null),Re(e,t,"formEncType",u.formEncType,u,null),Re(e,t,"formMethod",u.formMethod,u,null),Re(e,t,"formTarget",u.formTarget,u,null)):(Re(e,t,"encType",u.encType,u,null),Re(e,t,"method",u.method,u,null),Re(e,t,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Bl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=xn);break;case"onScroll":l!=null&&ve("scroll",e);break;case"onScrollEnd":l!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(i=l.__html,i!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=Bl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":ve("beforetoggle",e),ve("toggle",e),Vl(e,"popover",l);break;case"xlinkActuate":vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":vn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":vn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":vn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":vn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Vl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=m1.get(i)||i,Vl(e,i,l))}}function Gc(e,t,i,l,u,c){switch(i){case"style":Oh(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(i=l.__html,i!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof l=="string"?oi(e,l):(typeof l=="number"||typeof l=="bigint")&&oi(e,""+l);break;case"onScroll":l!=null&&ve("scroll",e);break;case"onScrollEnd":l!=null&&ve("scrollend",e);break;case"onClick":l!=null&&(e.onclick=xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),t=i.slice(2,u?i.length-7:void 0),c=e[yt]||null,c=c!=null?c[i]:null,typeof c=="function"&&e.removeEventListener(t,c,u),typeof l=="function")){typeof c!="function"&&c!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,u);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):Vl(e,i,l)}}}function ut(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var l=!1,u=!1,c;for(c in i)if(i.hasOwnProperty(c)){var v=i[c];if(v!=null)switch(c){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,c,v,i,null)}}u&&Re(e,t,"srcSet",i.srcSet,i,null),l&&Re(e,t,"src",i.src,i,null);return;case"input":ve("invalid",e);var b=c=v=u=null,N=null,V=null;for(l in i)if(i.hasOwnProperty(l)){var q=i[l];if(q!=null)switch(l){case"name":u=q;break;case"type":v=q;break;case"checked":N=q;break;case"defaultChecked":V=q;break;case"value":c=q;break;case"defaultValue":b=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:Re(e,t,l,q,i,null)}}Ah(e,c,b,N,V,v,u,!1);return;case"select":ve("invalid",e),l=v=c=null;for(u in i)if(i.hasOwnProperty(u)&&(b=i[u],b!=null))switch(u){case"value":c=b;break;case"defaultValue":v=b;break;case"multiple":l=b;default:Re(e,t,u,b,i,null)}t=c,i=v,e.multiple=!!l,t!=null?ri(e,!!l,t,!1):i!=null&&ri(e,!!l,i,!0);return;case"textarea":ve("invalid",e),c=u=l=null;for(v in i)if(i.hasOwnProperty(v)&&(b=i[v],b!=null))switch(v){case"value":l=b;break;case"defaultValue":u=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Re(e,t,v,b,i,null)}Mh(e,l,u,c);return;case"option":for(N in i)if(i.hasOwnProperty(N)&&(l=i[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Re(e,t,N,l,i,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(l=0;l<Hs.length;l++)ve(Hs[l],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in i)if(i.hasOwnProperty(V)&&(l=i[V],l!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,V,l,i,null)}return;default:if(iu(t)){for(q in i)i.hasOwnProperty(q)&&(l=i[q],l!==void 0&&Gc(e,t,q,l,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(l=i[b],l!=null&&Re(e,t,b,l,i,null))}function $S(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,c=null,v=null,b=null,N=null,V=null,q=null;for(H in i){var X=i[H];if(i.hasOwnProperty(H)&&X!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":N=X;default:l.hasOwnProperty(H)||Re(e,t,H,null,l,X)}}for(var _ in l){var H=l[_];if(X=i[_],l.hasOwnProperty(_)&&(H!=null||X!=null))switch(_){case"type":c=H;break;case"name":u=H;break;case"checked":V=H;break;case"defaultChecked":q=H;break;case"value":v=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:H!==X&&Re(e,t,_,H,l,X)}}nu(e,v,b,N,V,q,c,u);return;case"select":H=v=b=_=null;for(c in i)if(N=i[c],i.hasOwnProperty(c)&&N!=null)switch(c){case"value":break;case"multiple":H=N;default:l.hasOwnProperty(c)||Re(e,t,c,null,l,N)}for(u in l)if(c=l[u],N=i[u],l.hasOwnProperty(u)&&(c!=null||N!=null))switch(u){case"value":_=c;break;case"defaultValue":b=c;break;case"multiple":v=c;default:c!==N&&Re(e,t,u,c,l,N)}t=b,i=v,l=H,_!=null?ri(e,!!i,_,!1):!!l!=!!i&&(t!=null?ri(e,!!i,t,!0):ri(e,!!i,i?[]:"",!1));return;case"textarea":H=_=null;for(b in i)if(u=i[b],i.hasOwnProperty(b)&&u!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Re(e,t,b,null,l,u)}for(v in l)if(u=l[v],c=i[v],l.hasOwnProperty(v)&&(u!=null||c!=null))switch(v){case"value":_=u;break;case"defaultValue":H=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==c&&Re(e,t,v,u,l,c)}Ch(e,_,H);return;case"option":for(var ee in i)if(_=i[ee],i.hasOwnProperty(ee)&&_!=null&&!l.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Re(e,t,ee,null,l,_)}for(N in l)if(_=l[N],H=i[N],l.hasOwnProperty(N)&&_!==H&&(_!=null||H!=null))switch(N){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Re(e,t,N,_,l,H)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var se in i)_=i[se],i.hasOwnProperty(se)&&_!=null&&!l.hasOwnProperty(se)&&Re(e,t,se,null,l,_);for(V in l)if(_=l[V],H=i[V],l.hasOwnProperty(V)&&_!==H&&(_!=null||H!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(137,t));break;default:Re(e,t,V,_,l,H)}return;default:if(iu(t)){for(var ze in i)_=i[ze],i.hasOwnProperty(ze)&&_!==void 0&&!l.hasOwnProperty(ze)&&Gc(e,t,ze,void 0,l,_);for(q in l)_=l[q],H=i[q],!l.hasOwnProperty(q)||_===H||_===void 0&&H===void 0||Gc(e,t,q,_,l,H);return}}for(var O in i)_=i[O],i.hasOwnProperty(O)&&_!=null&&!l.hasOwnProperty(O)&&Re(e,t,O,null,l,_);for(X in l)_=l[X],H=i[X],!l.hasOwnProperty(X)||_===H||_==null&&H==null||Re(e,t,X,_,l,H)}function Rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var u=i[l],c=u.transferSize,v=u.initiatorType,b=u.duration;if(c&&b&&Rg(v)){for(v=0,b=u.responseEnd,l+=1;l<i.length;l++){var N=i[l],V=N.startTime;if(V>b)break;var q=N.transferSize,X=N.initiatorType;q&&Rg(X)&&(N=N.responseEnd,v+=q*(N<b?1:(b-V)/(N-V)))}if(--l,t+=8*(c+v)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Xc=null,Kc=null;function kr(e){return e.nodeType===9?e:e.ownerDocument}function zg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function kg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Fc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zc=null;function YS(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var Lg=typeof setTimeout=="function"?setTimeout:void 0,GS=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,XS=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(e){return Vg.resolve(null).then(e).catch(KS)}:Lg;function KS(e){setTimeout(function(){throw e})}function ia(e){return e==="head"}function _g(e,t){var i=t,l=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(u),Bi(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")qs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,qs(i);for(var c=i.firstChild;c;){var v=c.nextSibling,b=c.nodeName;c[ls]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||i.removeChild(c),c=v}}else i==="body"&&qs(e.ownerDocument.body);i=u}while(i);Bi(t)}function Ug(e,t){var i=e;e=0;do{var l=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function Qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Qc(i),eu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function FS(e,t,i,l){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ls])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ft(e.nextSibling),e===null)break}return null}function ZS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ft(e.nextSibling),e===null))return null;return e}function Bg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ft(e.nextSibling),e===null))return null;return e}function Pc(e){return e.data==="$?"||e.data==="$~"}function Jc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function QS(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ft(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Wc=null;function Hg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ft(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function $g(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function qg(e,t,i){switch(t=kr(i),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function qs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eu(e)}var Zt=new Map,Yg=new Set;function Lr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kn=Q.d;Q.d={f:PS,r:JS,D:WS,C:IS,L:e2,m:t2,X:a2,S:n2,M:i2};function PS(){var e=kn.f(),t=Nr();return e||t}function JS(e){var t=ii(e);t!==null&&t.tag===5&&t.type==="form"?lp(t):kn.r(e)}var Vi=typeof document>"u"?null:document;function Gg(e,t,i){var l=Vi;if(l&&typeof t=="string"&&t){var u=Ht(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),Yg.has(u)||(Yg.add(u),e={rel:e,crossOrigin:i,href:t},l.querySelector(u)===null&&(t=l.createElement("link"),ut(t,"link",e),at(t),l.head.appendChild(t)))}}function WS(e){kn.D(e),Gg("dns-prefetch",e,null)}function IS(e,t){kn.C(e,t),Gg("preconnect",e,t)}function e2(e,t,i){kn.L(e,t,i);var l=Vi;if(l&&e&&t){var u='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+Ht(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+Ht(i.imageSizes)+'"]')):u+='[href="'+Ht(e)+'"]';var c=u;switch(t){case"style":c=_i(e);break;case"script":c=Ui(e)}Zt.has(c)||(e=y({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(c,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(Ys(c))||t==="script"&&l.querySelector(Gs(c))||(t=l.createElement("link"),ut(t,"link",e),at(t),l.head.appendChild(t)))}}function t2(e,t){kn.m(e,t);var i=Vi;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Ht(l)+'"][href="'+Ht(e)+'"]',c=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ui(e)}if(!Zt.has(c)&&(e=y({rel:"modulepreload",href:e},t),Zt.set(c,e),i.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Gs(c)))return}l=i.createElement("link"),ut(l,"link",e),at(l),i.head.appendChild(l)}}}function n2(e,t,i){kn.S(e,t,i);var l=Vi;if(l&&e){var u=si(l).hoistableStyles,c=_i(e);t=t||"default";var v=u.get(c);if(!v){var b={loading:0,preload:null};if(v=l.querySelector(Ys(c)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(c))&&Ic(e,i);var N=v=l.createElement("link");at(N),ut(N,"link",e),N._p=new Promise(function(V,q){N.onload=V,N.onerror=q}),N.addEventListener("load",function(){b.loading|=1}),N.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Vr(v,t,l)}v={type:"stylesheet",instance:v,count:1,state:b},u.set(c,v)}}}function a2(e,t){kn.X(e,t);var i=Vi;if(i&&e){var l=si(i).hoistableScripts,u=Ui(e),c=l.get(u);c||(c=i.querySelector(Gs(u)),c||(e=y({src:e,async:!0},t),(t=Zt.get(u))&&ef(e,t),c=i.createElement("script"),at(c),ut(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(u,c))}}function i2(e,t){kn.M(e,t);var i=Vi;if(i&&e){var l=si(i).hoistableScripts,u=Ui(e),c=l.get(u);c||(c=i.querySelector(Gs(u)),c||(e=y({src:e,async:!0,type:"module"},t),(t=Zt.get(u))&&ef(e,t),c=i.createElement("script"),at(c),ut(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(u,c))}}function Xg(e,t,i,l){var u=(u=pe.current)?Lr(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=_i(i.href),i=si(u).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=_i(i.href);var c=si(u).hoistableStyles,v=c.get(e);if(v||(u=u.ownerDocument||u,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,v),(c=u.querySelector(Ys(e)))&&!c._p&&(v.instance=c,v.state.loading=5),Zt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Zt.set(e,i),c||s2(u,e,i,v.state))),t&&l===null)throw Error(r(528,""));return v}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(i),i=si(u).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function _i(e){return'href="'+Ht(e)+'"'}function Ys(e){return'link[rel="stylesheet"]['+e+"]"}function Kg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function s2(e,t,i,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),ut(t,"link",i),at(t),e.head.appendChild(t))}function Ui(e){return'[src="'+Ht(e)+'"]'}function Gs(e){return"script[async]"+e}function Fg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ht(i.href)+'"]');if(l)return t.instance=l,at(l),l;var u=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),at(l),ut(l,"style",u),Vr(l,i.precedence,e),t.instance=l;case"stylesheet":u=_i(i.href);var c=e.querySelector(Ys(u));if(c)return t.state.loading|=4,t.instance=c,at(c),c;l=Kg(i),(u=Zt.get(u))&&Ic(l,u),c=(e.ownerDocument||e).createElement("link"),at(c);var v=c;return v._p=new Promise(function(b,N){v.onload=b,v.onerror=N}),ut(c,"link",l),t.state.loading|=4,Vr(c,i.precedence,e),t.instance=c;case"script":return c=Ui(i.src),(u=e.querySelector(Gs(c)))?(t.instance=u,at(u),u):(l=i,(u=Zt.get(c))&&(l=y({},i),ef(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),at(u),ut(u,"link",l),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Vr(l,i.precedence,e));return t.instance}function Vr(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,c=u,v=0;v<l.length;v++){var b=l[v];if(b.dataset.precedence===t)c=b;else if(c!==u)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Ic(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _r=null;function Zg(e,t,i){if(_r===null){var l=new Map,u=_r=new Map;u.set(i,l)}else u=_r,l=u.get(i),l||(l=new Map,u.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var c=i[u];if(!(c[ls]||c[st]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var v=c.getAttribute(t)||"";v=e+v;var b=l.get(v);b?b.push(c):l.set(v,[c])}}return l}function Qg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function l2(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r2(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var u=_i(l.href),c=t.querySelector(Ys(u));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ur.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=c,at(c);return}c=t.ownerDocument||t,l=Kg(l),(u=Zt.get(u))&&Ic(l,u),c=c.createElement("link"),at(c);var v=c;v._p=new Promise(function(b,N){v.onload=b,v.onerror=N}),ut(c,"link",l),i.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ur.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var tf=0;function o2(e,t){return e.stylesheets&&e.count===0&&Hr(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Hr(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&tf===0&&(tf=62500*qS());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Hr(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>tf?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function Ur(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Br=null;function Hr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Br=new Map,t.forEach(u2,e),Br=null,Ur.call(e))}function u2(e,t){if(!(t.state.loading&4)){var i=Br.get(e);if(i)var l=i.get(null);else{i=new Map,Br.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<u.length;c++){var v=u[c];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}u=t.instance,v=u.getAttribute("data-precedence"),c=i.get(v)||l,c===l&&i.set(null,u),i.set(v,u),this.count++,l=Ur.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),c?c.parentNode.insertBefore(u,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Xs={$$typeof:R,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function c2(e,t,i,l,u,c,v,b,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Po(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Po(0),this.hiddenUpdates=Po(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=c,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Jg(e,t,i,l,u,c,v,b,N,V,q,X){return e=new c2(e,t,i,v,N,V,q,X,b),t=1,c===!0&&(t|=24),c=Rt(3,null,null,t),e.current=c,c.stateNode=e,t=ku(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:i,cache:t},Uu(c),e}function Wg(e){return e?(e=pi,e):pi}function Ig(e,t,i,l,u,c){u=Wg(u),l.context===null?l.context=u:l.pendingContext=u,l=Fn(t),l.payload={element:i},c=c===void 0?null:c,c!==null&&(l.callback=c),i=Zn(e,l,t),i!==null&&(Et(i,e,t),Ts(i,e,t))}function ev(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function nf(e,t){ev(e,t),(e=e.alternate)&&ev(e,t)}function tv(e){if(e.tag===13||e.tag===31){var t=Ca(e,67108864);t!==null&&Et(t,e,67108864),nf(e,67108864)}}function nv(e){if(e.tag===13||e.tag===31){var t=_t();t=Jo(t);var i=Ca(e,t);i!==null&&Et(i,e,t),nf(e,t)}}var $r=!0;function f2(e,t,i,l){var u=$.T;$.T=null;var c=Q.p;try{Q.p=2,af(e,t,i,l)}finally{Q.p=c,$.T=u}}function d2(e,t,i,l){var u=$.T;$.T=null;var c=Q.p;try{Q.p=8,af(e,t,i,l)}finally{Q.p=c,$.T=u}}function af(e,t,i,l){if($r){var u=sf(l);if(u===null)Yc(e,t,l,qr,i),iv(e,l);else if(m2(u,e,t,i,l))l.stopPropagation();else if(iv(e,l),t&4&&-1<h2.indexOf(e)){for(;u!==null;){var c=ii(u);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var v=Ta(c.pendingLanes);if(v!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;v;){var N=1<<31-Dt(v);b.entanglements[1]|=N,v&=~N}un(c),(Ne&6)===0&&(jr=Ct()+500,Bs(0))}}break;case 31:case 13:b=Ca(c,2),b!==null&&Et(b,c,2),Nr(),nf(c,2)}if(c=sf(l),c===null&&Yc(e,t,l,qr,i),c===u)break;u=c}u!==null&&l.stopPropagation()}else Yc(e,t,l,null,i)}}function sf(e){return e=lu(e),lf(e)}var qr=null;function lf(e){if(qr=null,e=ai(e),e!==null){var t=d(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=h(t),e!==null)return e;e=null}else if(i===31){if(e=p(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qr=e,null}function av(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Wb()){case fh:return 2;case dh:return 8;case Ol:case Ib:return 32;case hh:return 268435456;default:return 32}default:return 32}}var rf=!1,sa=null,la=null,ra=null,Ks=new Map,Fs=new Map,oa=[],h2="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".split(" ");function iv(e,t){switch(e){case"focusin":case"focusout":sa=null;break;case"dragenter":case"dragleave":la=null;break;case"mouseover":case"mouseout":ra=null;break;case"pointerover":case"pointerout":Ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(t.pointerId)}}function Zs(e,t,i,l,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:c,targetContainers:[u]},t!==null&&(t=ii(t),t!==null&&tv(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function m2(e,t,i,l,u){switch(t){case"focusin":return sa=Zs(sa,e,t,i,l,u),!0;case"dragenter":return la=Zs(la,e,t,i,l,u),!0;case"mouseover":return ra=Zs(ra,e,t,i,l,u),!0;case"pointerover":var c=u.pointerId;return Ks.set(c,Zs(Ks.get(c)||null,e,t,i,l,u)),!0;case"gotpointercapture":return c=u.pointerId,Fs.set(c,Zs(Fs.get(c)||null,e,t,i,l,u)),!0}return!1}function sv(e){var t=ai(e.target);if(t!==null){var i=d(t);if(i!==null){if(t=i.tag,t===13){if(t=h(i),t!==null){e.blockedOn=t,yh(e.priority,function(){nv(i)});return}}else if(t===31){if(t=p(i),t!==null){e.blockedOn=t,yh(e.priority,function(){nv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=sf(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);su=l,i.target.dispatchEvent(l),su=null}else return t=ii(i),t!==null&&tv(t),e.blockedOn=i,!1;t.shift()}return!0}function lv(e,t,i){Yr(e)&&i.delete(t)}function p2(){rf=!1,sa!==null&&Yr(sa)&&(sa=null),la!==null&&Yr(la)&&(la=null),ra!==null&&Yr(ra)&&(ra=null),Ks.forEach(lv),Fs.forEach(lv)}function Gr(e,t){e.blockedOn===t&&(e.blockedOn=null,rf||(rf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,p2)))}var Xr=null;function rv(e){Xr!==e&&(Xr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Xr===e&&(Xr=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],u=e[t+2];if(typeof l!="function"){if(lf(l||i)===null)continue;break}var c=ii(i);c!==null&&(e.splice(t,3),t-=3,ic(c,{pending:!0,data:u,method:i.method,action:l},l,u))}}))}function Bi(e){function t(N){return Gr(N,e)}sa!==null&&Gr(sa,e),la!==null&&Gr(la,e),ra!==null&&Gr(ra,e),Ks.forEach(t),Fs.forEach(t);for(var i=0;i<oa.length;i++){var l=oa[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<oa.length&&(i=oa[0],i.blockedOn===null);)sv(i),i.blockedOn===null&&oa.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var u=i[l],c=i[l+1],v=u[yt]||null;if(typeof c=="function")v||rv(i);else if(v){var b=null;if(c&&c.hasAttribute("formAction")){if(u=c,v=c[yt]||null)b=v.formAction;else if(lf(u)!==null)continue}else b=v.action;typeof b=="function"?i[l+1]=b:(i.splice(l,3),l-=3),rv(i)}}}function ov(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(v){return u=v})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function of(e){this._internalRoot=e}Kr.prototype.render=of.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var i=t.current,l=_t();Ig(i,l,e,t,null,null)},Kr.prototype.unmount=of.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ig(e.current,2,null,e,null,null),Nr(),t[ni]=null}};function Kr(e){this._internalRoot=e}Kr.prototype.unstable_scheduleHydration=function(e){if(e){var t=xh();e={blockedOn:null,target:e,priority:t};for(var i=0;i<oa.length&&t!==0&&t<oa[i].priority;i++);oa.splice(i,0,e),i===0&&sv(e)}};var uv=a.version;if(uv!=="19.2.4")throw Error(r(527,uv,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var g2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fr.isDisabled&&Fr.supportsFiber)try{as=Fr.inject(g2),Mt=Fr}catch{}}return Ps.createRoot=function(e,t){if(!o(e))throw Error(r(299));var i=!1,l="",u=gp,c=vp,v=xp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=Jg(e,1,!1,null,null,i,l,null,u,c,v,ov),e[ni]=t.current,qc(e),new of(t)},Ps.hydrateRoot=function(e,t,i){if(!o(e))throw Error(r(299));var l=!1,u="",c=gp,v=vp,b=xp,N=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(c=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(N=i.formState)),t=Jg(e,1,!0,t,i??null,l,u,N,c,v,b,ov),t.context=Wg(null),i=t.current,l=_t(),l=Jo(l),u=Fn(l),u.callback=null,Zn(i,u,l),i=l,t.current.lanes=i,ss(t,i),un(t),e[ni]=t.current,qc(e),new Kr(t)},Ps.version="19.2.4",Ps}var bv;function A2(){if(bv)return ff.exports;bv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),ff.exports=N2(),ff.exports}var C2=A2();const lx="/api";async function _e(n){const a=await fetch(`${lx}${n}`,{headers:{accept:"application/json"}});if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function M2(n){const a=new EventSource(`${lx}/events`);return a.addEventListener("state-changed",s=>{try{const r=JSON.parse(s.data);n("state-changed",r)}catch{n("state-changed",{})}}),a.onerror=()=>{},()=>a.close()}function et(n){if(!n)return"unknown";const a=Date.now()-new Date(n).getTime();return a<0||a<6e4?"just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}function pt(n,a){if(!n)return"";if(n.length<=a)return n;const s=n.lastIndexOf(" ",a);return(s>a*.6?n.slice(0,s):n.slice(0,a))+"…"}const rx=T.createContext(()=>{});function Pi(){return T.useContext(rx)}const D2=new Set(["overview","mail","sessions","work","connections","inner","notes","runtime"]);function ox(n){const a=n.replace(/^#\/?/,"");if(!a.startsWith("agent/"))return null;const s=a.split("/"),r=s[1]?decodeURIComponent(s[1]):"";if(!r)return null;const o=s[2]??"overview",d=D2.has(o)?o:"overview",h=s.slice(3),p=h.length>0?h.map(decodeURIComponent).join("/"):void 0;return{agent:r,tab:d,focus:p}}function $f(n){let a=`#/agent/${encodeURIComponent(n.agent)}`;return(n.tab!=="overview"||n.focus)&&(a+=`/${n.tab}`),n.focus&&(a+=`/${n.focus.split("/").map(encodeURIComponent).join("/")}`),a}const O2=typeof document<"u"?ce.useLayoutEffect:()=>{},ba=n=>{var a;return(a=n==null?void 0:n.ownerDocument)!==null&&a!==void 0?a:document},Xa=n=>n&&"window"in n&&n.window===n?n:ba(n).defaultView||window;function R2(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function z2(n){return R2(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let k2=!1;function Ed(){return k2}function Ka(n,a){if(!Ed())return a&&n?n.contains(a):!1;if(!n||!a)return!1;let s=a;for(;s!==null;){if(s===n)return!0;s.tagName==="SLOT"&&s.assignedSlot?s=s.assignedSlot.parentNode:z2(s)?s=s.host:s=s.parentNode}return!1}const Fi=(n=document)=>{var a;if(!Ed())return n.activeElement;let s=n.activeElement;for(;s&&"shadowRoot"in s&&(!((a=s.shadowRoot)===null||a===void 0)&&a.activeElement);)s=s.shadowRoot.activeElement;return s};function gt(n){if(Ed()&&n.target instanceof Element&&n.target.shadowRoot){var a,s;if("composedPath"in n)return(a=n.composedPath()[0])!==null&&a!==void 0?a:null;if("composedPath"in n.nativeEvent)return(s=n.nativeEvent.composedPath()[0])!==null&&s!==void 0?s:null}return n.target}function ux(n){var a,s,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(a=0;a<o;a++)n[a]&&(s=ux(n[a]))&&(r&&(r+=" "),r+=s)}else for(s in n)n[s]&&(r&&(r+=" "),r+=s);return r}function Fe(){for(var n,a,s=0,r="",o=arguments.length;s<o;s++)(n=arguments[s])&&(a=ux(n))&&(r&&(r+=" "),r+=a);return r}function L2(n){if(V2())n.focus({preventScroll:!0});else{let a=_2(n);n.focus(),U2(a)}}let Zr=null;function V2(){if(Zr==null){Zr=!1;try{document.createElement("div").focus({get preventScroll(){return Zr=!0,!0}})}catch{}}return Zr}function _2(n){let a=n.parentNode,s=[],r=document.scrollingElement||document.documentElement;for(;a instanceof HTMLElement&&a!==r;)(a.offsetHeight<a.scrollHeight||a.offsetWidth<a.scrollWidth)&&s.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),a=a.parentNode;return r instanceof HTMLElement&&s.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),s}function U2(n){for(let{element:a,scrollTop:s,scrollLeft:r}of n)a.scrollTop=s,a.scrollLeft=r}function Do(n){var a;if(typeof window>"u"||window.navigator==null)return!1;let s=(a=window.navigator.userAgentData)===null||a===void 0?void 0:a.brands;return Array.isArray(s)&&s.some(r=>n.test(r.brand))||n.test(window.navigator.userAgent)}function cx(n){var a;return typeof window<"u"&&window.navigator!=null?n.test(((a=window.navigator.userAgentData)===null||a===void 0?void 0:a.platform)||window.navigator.platform):!1}function Ji(n){let a=null;return()=>(a==null&&(a=n()),a)}const mo=Ji(function(){return cx(/^Mac/i)}),B2=Ji(function(){return cx(/^iPad/i)||mo()&&navigator.maxTouchPoints>1}),H2=Ji(function(){return Do(/AppleWebKit/i)&&!$2()}),$2=Ji(function(){return Do(/Chrome/i)}),q2=Ji(function(){return Do(/Android/i)}),Y2=Ji(function(){return Do(/Firefox/i)});function gl(n,a,s=!0){var r,o;let{metaKey:d,ctrlKey:h,altKey:p,shiftKey:m}=a;Y2()&&(!((o=window.event)===null||o===void 0||(r=o.type)===null||r===void 0)&&r.startsWith("key"))&&n.target==="_blank"&&(mo()?d=!0:h=!0);let g=H2()&&mo()&&!B2()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:d,ctrlKey:h,altKey:p,shiftKey:m}):new MouseEvent("click",{metaKey:d,ctrlKey:h,altKey:p,shiftKey:m,detail:1,bubbles:!0,cancelable:!0});gl.isOpening=s,L2(n),n.dispatchEvent(g),gl.isOpening=!1}gl.isOpening=!1;function fx(){let n=T.useRef(new Map),a=T.useCallback((o,d,h,p)=>{let m=p!=null&&p.once?(...g)=>{n.current.delete(h),h(...g)}:h;n.current.set(h,{type:d,eventTarget:o,fn:m,options:p}),o.addEventListener(d,m,p)},[]),s=T.useCallback((o,d,h,p)=>{var m;let g=((m=n.current.get(h))===null||m===void 0?void 0:m.fn)||h;o.removeEventListener(d,g,p),n.current.delete(h)},[]),r=T.useCallback(()=>{n.current.forEach((o,d)=>{s(o.eventTarget,o.type,d,o.options)})},[s]);return T.useEffect(()=>r,[r]),{addGlobalListener:a,removeGlobalListener:s,removeAllGlobalListeners:r}}function G2(n){return n.pointerType===""&&n.isTrusted?!0:q2()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}var X2=sx();function dx(n){let a=n;return a.nativeEvent=n,a.isDefaultPrevented=()=>a.defaultPrevented,a.isPropagationStopped=()=>a.cancelBubble,a.persist=()=>{},a}function K2(n,a){Object.defineProperty(n,"target",{value:a}),Object.defineProperty(n,"currentTarget",{value:a})}function hx(n){let a=T.useRef({isFocused:!1,observer:null});return O2(()=>{const s=a.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]),T.useCallback(s=>{let r=gt(s);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){a.current.isFocused=!0;let o=r,d=h=>{if(a.current.isFocused=!1,o.disabled){let p=dx(h);n==null||n(p)}a.current.observer&&(a.current.observer.disconnect(),a.current.observer=null)};o.addEventListener("focusout",d,{once:!0}),a.current.observer=new MutationObserver(()=>{if(a.current.isFocused&&o.disabled){var h;(h=a.current.observer)===null||h===void 0||h.disconnect();let p=o===Fi()?null:Fi();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:p})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:p}))}}),a.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let F2=!1,Sl=null;const qf=new Set;let rl=new Map,Wa=!1,Yf=!1;const Z2={Tab:!0,Escape:!0};function Nd(n,a){for(let s of qf)s(n,a)}function Q2(n){return!(n.metaKey||!mo()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function po(n){Wa=!0,!gl.isOpening&&Q2(n)&&(Sl="keyboard",Nd("keyboard",n))}function Ki(n){Sl="pointer","pointerType"in n&&n.pointerType,(n.type==="mousedown"||n.type==="pointerdown")&&(Wa=!0,Nd("pointer",n))}function mx(n){!gl.isOpening&&G2(n)&&(Wa=!0,Sl="virtual")}function px(n){gt(n)===window||gt(n)===document||F2||!n.isTrusted||(!Wa&&!Yf&&(Sl="virtual",Nd("virtual",n)),Wa=!1,Yf=!1)}function gx(){Wa=!1,Yf=!0}function Gf(n){if(typeof window>"u"||typeof document>"u"||rl.get(Xa(n)))return;const a=Xa(n),s=ba(n);let r=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){Wa=!0,r.apply(this,arguments)},s.addEventListener("keydown",po,!0),s.addEventListener("keyup",po,!0),s.addEventListener("click",mx,!0),a.addEventListener("focus",px,!0),a.addEventListener("blur",gx,!1),typeof PointerEvent<"u"&&(s.addEventListener("pointerdown",Ki,!0),s.addEventListener("pointermove",Ki,!0),s.addEventListener("pointerup",Ki,!0)),a.addEventListener("beforeunload",()=>{vx(n)},{once:!0}),rl.set(a,{focus:r})}const vx=(n,a)=>{const s=Xa(n),r=ba(n);a&&r.removeEventListener("DOMContentLoaded",a),rl.has(s)&&(s.HTMLElement.prototype.focus=rl.get(s).focus,r.removeEventListener("keydown",po,!0),r.removeEventListener("keyup",po,!0),r.removeEventListener("click",mx,!0),s.removeEventListener("focus",px,!0),s.removeEventListener("blur",gx,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",Ki,!0),r.removeEventListener("pointermove",Ki,!0),r.removeEventListener("pointerup",Ki,!0)),rl.delete(s))};function P2(n){const a=ba(n);let s;return a.readyState!=="loading"?Gf(n):(s=()=>{Gf(n)},a.addEventListener("DOMContentLoaded",s)),()=>vx(n,s)}typeof document<"u"&&P2();function Xf(){return Sl!=="pointer"}const J2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function W2(n,a,s){let r=ba(s?gt(s):void 0),o=s?gt(s):void 0;const d=typeof window<"u"?Xa(o).HTMLInputElement:HTMLInputElement,h=typeof window<"u"?Xa(o).HTMLTextAreaElement:HTMLTextAreaElement,p=typeof window<"u"?Xa(o).HTMLElement:HTMLElement,m=typeof window<"u"?Xa(o).KeyboardEvent:KeyboardEvent;let g=Fi(r);return n=n||g instanceof d&&!J2.has(g.type)||g instanceof h||g instanceof p&&g.isContentEditable,!(n&&a==="keyboard"&&s instanceof m&&!Z2[s.key])}function I2(n,a,s){Gf(),T.useEffect(()=>{if((s==null?void 0:s.enabled)===!1)return;let r=(o,d)=>{W2(!!(s!=null&&s.isTextInput),o,d)&&n(Xf())};return qf.add(r),()=>{qf.delete(r)}},a)}function ew(n){let{isDisabled:a,onFocus:s,onBlur:r,onFocusChange:o}=n;const d=T.useCallback(m=>{if(gt(m)===m.currentTarget)return r&&r(m),o&&o(!1),!0},[r,o]),h=hx(d),p=T.useCallback(m=>{let g=gt(m);const x=ba(g),y=x?Fi(x):Fi();g===m.currentTarget&&g===y&&(s&&s(m),o&&o(!0),h(m))},[o,s,h]);return{focusProps:{onFocus:!a&&(s||o||r)?p:void 0,onBlur:!a&&(r||o)?d:void 0}}}function tw(n){let{isDisabled:a,onBlurWithin:s,onFocusWithin:r,onFocusWithinChange:o}=n,d=T.useRef({isFocusWithin:!1}),{addGlobalListener:h,removeAllGlobalListeners:p}=fx(),m=T.useCallback(y=>{Ka(y.currentTarget,gt(y))&&d.current.isFocusWithin&&!Ka(y.currentTarget,y.relatedTarget)&&(d.current.isFocusWithin=!1,p(),s&&s(y),o&&o(!1))},[s,o,d,p]),g=hx(m),x=T.useCallback(y=>{if(!Ka(y.currentTarget,gt(y)))return;let S=gt(y);const w=ba(S),j=Fi(w);if(!d.current.isFocusWithin&&j===S){r&&r(y),o&&o(!0),d.current.isFocusWithin=!0,g(y);let E=y.currentTarget;h(w,"focus",C=>{let z=gt(C);if(d.current.isFocusWithin&&!Ka(E,z)){let D=new w.defaultView.FocusEvent("blur",{relatedTarget:z});K2(D,E);let R=dx(D);m(R)}},{capture:!0})}},[r,o,g,h,m]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:x,onBlur:m}}}let Kf=!1,Qr=0;function nw(){Kf=!0,setTimeout(()=>{Kf=!1},50)}function Sv(n){n.pointerType==="touch"&&nw()}function aw(){if(!(typeof document>"u"))return Qr===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",Sv),Qr++,()=>{Qr--,!(Qr>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",Sv)}}function xx(n){let{onHoverStart:a,onHoverChange:s,onHoverEnd:r,isDisabled:o}=n,[d,h]=T.useState(!1),p=T.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;T.useEffect(aw,[]);let{addGlobalListener:m,removeAllGlobalListeners:g}=fx(),{hoverProps:x,triggerHoverEnd:y}=T.useMemo(()=>{let S=(E,C)=>{if(p.pointerType=C,o||C==="touch"||p.isHovered||!Ka(E.currentTarget,gt(E)))return;p.isHovered=!0;let z=E.currentTarget;p.target=z,m(ba(gt(E)),"pointerover",D=>{p.isHovered&&p.target&&!Ka(p.target,gt(D))&&w(D,D.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:z,pointerType:C}),s&&s(!0),h(!0)},w=(E,C)=>{let z=p.target;p.pointerType="",p.target=null,!(C==="touch"||!p.isHovered||!z)&&(p.isHovered=!1,g(),r&&r({type:"hoverend",target:z,pointerType:C}),s&&s(!1),h(!1))},j={};return typeof PointerEvent<"u"&&(j.onPointerEnter=E=>{Kf&&E.pointerType==="mouse"||S(E,E.pointerType)},j.onPointerLeave=E=>{!o&&Ka(E.currentTarget,gt(E))&&w(E,E.pointerType)}),{hoverProps:j,triggerHoverEnd:w}},[a,s,r,o,p,m,g]);return T.useEffect(()=>{o&&y({currentTarget:p.target},p.pointerType)},[o]),{hoverProps:x,isHovered:d}}function yx(n={}){let{autoFocus:a=!1,isTextInput:s,within:r}=n,o=T.useRef({isFocused:!1,isFocusVisible:a||Xf()}),[d,h]=T.useState(!1),[p,m]=T.useState(()=>o.current.isFocused&&o.current.isFocusVisible),g=T.useCallback(()=>m(o.current.isFocused&&o.current.isFocusVisible),[]),x=T.useCallback(w=>{o.current.isFocused=w,o.current.isFocusVisible=Xf(),h(w),g()},[g]);I2(w=>{o.current.isFocusVisible=w,g()},[s,d],{enabled:d,isTextInput:s});let{focusProps:y}=ew({isDisabled:r,onFocusChange:x}),{focusWithinProps:S}=tw({isDisabled:!r,onFocusWithinChange:x});return{isFocused:d,isFocusVisible:p,focusProps:r?S:y}}var iw=Object.defineProperty,sw=(n,a,s)=>a in n?iw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,pf=(n,a,s)=>(sw(n,typeof a!="symbol"?a+"":a,s),s);let lw=class{constructor(){pf(this,"current",this.detect()),pf(this,"handoffState","pending"),pf(this,"currentId",0)}set(a){this.current!==a&&(this.handoffState="pending",this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},hn=new lw;function Wi(n){var a;return hn.isServer?null:n==null?document:(a=n==null?void 0:n.ownerDocument)!=null?a:document}function Ff(n){var a,s;return hn.isServer?null:n==null?document:(s=(a=n==null?void 0:n.getRootNode)==null?void 0:a.call(n))!=null?s:document}function bx(n){var a,s;return(s=(a=Ff(n))==null?void 0:a.activeElement)!=null?s:null}function rw(n){return bx(n)===n}function Oo(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(a=>setTimeout(()=>{throw a}))}function Un(){let n=[],a={addEventListener(s,r,o,d){return s.addEventListener(r,o,d),a.add(()=>s.removeEventListener(r,o,d))},requestAnimationFrame(...s){let r=requestAnimationFrame(...s);return a.add(()=>cancelAnimationFrame(r))},nextFrame(...s){return a.requestAnimationFrame(()=>a.requestAnimationFrame(...s))},setTimeout(...s){let r=setTimeout(...s);return a.add(()=>clearTimeout(r))},microTask(...s){let r={current:!0};return Oo(()=>{r.current&&s[0]()}),a.add(()=>{r.current=!1})},style(s,r,o){let d=s.style.getPropertyValue(r);return Object.assign(s.style,{[r]:o}),this.add(()=>{Object.assign(s.style,{[r]:d})})},group(s){let r=Un();return s(r),this.add(()=>r.dispose())},add(s){return n.includes(s)||n.push(s),()=>{let r=n.indexOf(s);if(r>=0)for(let o of n.splice(r,1))o()}},dispose(){for(let s of n.splice(0))s()}};return a}function wl(){let[n]=T.useState(Un);return T.useEffect(()=>()=>n.dispose(),[n]),n}let Nt=(n,a)=>{hn.isServer?T.useEffect(n,a):T.useLayoutEffect(n,a)};function ei(n){let a=T.useRef(n);return Nt(()=>{a.current=n},[n]),a}let Me=function(n){let a=ei(n);return ce.useCallback((...s)=>a.current(...s),[a])};function ow(n){let a=n.width/2,s=n.height/2;return{top:n.clientY-s,right:n.clientX+a,bottom:n.clientY+s,left:n.clientX-a}}function uw(n,a){return!(!n||!a||n.right<a.left||n.left>a.right||n.bottom<a.top||n.top>a.bottom)}function Sx({disabled:n=!1}={}){let a=T.useRef(null),[s,r]=T.useState(!1),o=wl(),d=Me(()=>{a.current=null,r(!1),o.dispose()}),h=Me(p=>{if(o.dispose(),a.current===null){a.current=p.currentTarget,r(!0);{let m=Wi(p.currentTarget);o.addEventListener(m,"pointerup",d,!1),o.addEventListener(m,"pointermove",g=>{if(a.current){let x=ow(g);r(uw(x,a.current.getBoundingClientRect()))}},!1),o.addEventListener(m,"pointercancel",d,!1)}}});return{pressed:s,pressProps:n?{}:{onPointerDown:h,onPointerUp:d,onClick:d}}}function ti(n){return T.useMemo(()=>n,Object.values(n))}let cw=T.createContext(void 0);function wx(){return T.useContext(cw)}function Zf(...n){return Array.from(new Set(n.flatMap(a=>typeof a=="string"?a.split(" "):[]))).filter(Boolean).join(" ")}function _n(n,a,...s){if(n in a){let o=a[n];return typeof o=="function"?o(...s):o}let r=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,_n),r}var go=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(go||{}),ha=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(ha||{});function At(){let n=dw();return T.useCallback(a=>fw({mergeRefs:n,...a}),[n])}function fw({ourProps:n,theirProps:a,slot:s,defaultTag:r,features:o,visible:d=!0,name:h,mergeRefs:p}){p=p??hw;let m=Tx(a,n);if(d)return Pr(m,s,r,h,p);let g=o??0;if(g&2){let{static:x=!1,...y}=m;if(x)return Pr(y,s,r,h,p)}if(g&1){let{unmount:x=!0,...y}=m;return _n(x?0:1,{0(){return null},1(){return Pr({...y,hidden:!0,style:{display:"none"}},s,r,h,p)}})}return Pr(m,s,r,h,p)}function Pr(n,a={},s,r,o){let{as:d=s,children:h,refName:p="ref",...m}=gf(n,["unmount","static"]),g=n.ref!==void 0?{[p]:n.ref}:{},x=typeof h=="function"?h(a):h;"className"in m&&m.className&&typeof m.className=="function"&&(m.className=m.className(a)),m["aria-labelledby"]&&m["aria-labelledby"]===m.id&&(m["aria-labelledby"]=void 0);let y={};if(a){let S=!1,w=[];for(let[j,E]of Object.entries(a))typeof E=="boolean"&&(S=!0),E===!0&&w.push(j.replace(/([A-Z])/g,C=>`-${C.toLowerCase()}`));if(S){y["data-headlessui-state"]=w.join(" ");for(let j of w)y[`data-${j}`]=""}}if(ol(d)&&(Object.keys(qa(m)).length>0||Object.keys(qa(y)).length>0))if(!T.isValidElement(x)||Array.isArray(x)&&x.length>1||pw(x)){if(Object.keys(qa(m)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(qa(m)).concat(Object.keys(qa(y))).map(S=>` - ${S}`).join(`
50
+ `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(S=>` - ${S}`).join(`
51
+ `)].join(`
52
+ `))}else{let S=x.props,w=S==null?void 0:S.className,j=typeof w=="function"?(...z)=>Zf(w(...z),m.className):Zf(w,m.className),E=j?{className:j}:{},C=Tx(x.props,qa(gf(m,["ref"])));for(let z in y)z in C&&delete y[z];return T.cloneElement(x,Object.assign({},C,y,g,{ref:o(mw(x),g.ref)},E))}return T.createElement(d,Object.assign({},gf(m,["ref"]),!ol(d)&&g,!ol(d)&&y),x)}function dw(){let n=T.useRef([]),a=T.useCallback(s=>{for(let r of n.current)r!=null&&(typeof r=="function"?r(s):r.current=s)},[]);return(...s)=>{if(!s.every(r=>r==null))return n.current=s,a}}function hw(...n){return n.every(a=>a==null)?void 0:a=>{for(let s of n)s!=null&&(typeof s=="function"?s(a):s.current=a)}}function Tx(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},s={};for(let r of n)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(s[o]!=null||(s[o]=[]),s[o].push(r[o])):a[o]=r[o];if(a.disabled||a["aria-disabled"])for(let r in s)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(s[r]=[o=>{var d;return(d=o==null?void 0:o.preventDefault)==null?void 0:d.call(o)}]);for(let r in s)Object.assign(a,{[r](o,...d){let h=s[r];for(let p of h){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;p(o,...d)}}});return a}function Ad(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},s={};for(let r of n)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(s[o]!=null||(s[o]=[]),s[o].push(r[o])):a[o]=r[o];for(let r in s)Object.assign(a,{[r](...o){let d=s[r];for(let h of d)h==null||h(...o)}});return a}function dt(n){var a;return Object.assign(T.forwardRef(n),{displayName:(a=n.displayName)!=null?a:n.name})}function qa(n){let a=Object.assign({},n);for(let s in a)a[s]===void 0&&delete a[s];return a}function gf(n,a=[]){let s=Object.assign({},n);for(let r of a)r in s&&delete s[r];return s}function mw(n){return ce.version.split(".")[0]>="19"?n.props.ref:n.ref}function ol(n){return n===T.Fragment||n===Symbol.for("react.fragment")}function pw(n){return ol(n.type)}let gw="button";function vw(n,a){var s;let r=wx(),{disabled:o=r||!1,autoFocus:d=!1,...h}=n,{isFocusVisible:p,focusProps:m}=yx({autoFocus:d}),{isHovered:g,hoverProps:x}=xx({isDisabled:o}),{pressed:y,pressProps:S}=Sx({disabled:o}),w=Ad({ref:a,type:(s=h.type)!=null?s:"button",disabled:o||void 0,autoFocus:d},m,x,S),j=ti({disabled:o,hover:g,focus:p,active:y,autofocus:d});return At()({ourProps:w,theirProps:h,slot:j,defaultTag:gw,name:"Button"})}let Tl=dt(vw),xw="span";var vo=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(vo||{});function yw(n,a){var s;let{features:r=1,...o}=n,d={ref:a,"aria-hidden":(r&2)===2?!0:(s=o["aria-hidden"])!=null?s:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return At()({ourProps:d,theirProps:o,slot:{},defaultTag:xw,name:"Hidden"})}let Qf=dt(yw);function bw(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function ga(n){return bw(n)&&"tagName"in n}function Ia(n){return ga(n)&&"accessKey"in n}function ma(n){return ga(n)&&"tabIndex"in n}function Sw(n){return ga(n)&&"style"in n}function ww(n){return Ia(n)&&n.nodeName==="IFRAME"}function Tw(n){return Ia(n)&&n.nodeName==="INPUT"}let jx=Symbol();function jw(n,a=!0){return Object.assign(n,{[jx]:a})}function gn(...n){let a=T.useRef(n);T.useEffect(()=>{a.current=n},[n]);let s=Me(r=>{for(let o of a.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return n.every(r=>r==null||(r==null?void 0:r[jx]))?void 0:s}let Cd=T.createContext(null);Cd.displayName="DescriptionContext";function Ex(){let n=T.useContext(Cd);if(n===null){let a=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(a,Ex),a}return n}function Ew(){let[n,a]=T.useState([]);return[n.length>0?n.join(" "):void 0,T.useMemo(()=>function(s){let r=Me(d=>(a(h=>[...h,d]),()=>a(h=>{let p=h.slice(),m=p.indexOf(d);return m!==-1&&p.splice(m,1),p}))),o=T.useMemo(()=>({register:r,slot:s.slot,name:s.name,props:s.props,value:s.value}),[r,s.slot,s.name,s.props,s.value]);return ce.createElement(Cd.Provider,{value:o},s.children)},[a])]}let Nw="p";function Aw(n,a){let s=T.useId(),r=wx(),{id:o=`headlessui-description-${s}`,...d}=n,h=Ex(),p=gn(a);Nt(()=>h.register(o),[o,h.register]);let m=ti({...h.slot,disabled:r||!1}),g={ref:p,...h.props,id:o};return At()({ourProps:g,theirProps:d,slot:m,defaultTag:Nw,name:h.name||"Description"})}let Cw=dt(Aw),Mw=Object.assign(Cw,{});var Nx=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(Nx||{});let Ax=T.createContext(()=>{});function Dw(){return T.useContext(Ax)}function Ow({value:n,children:a}){return ce.createElement(Ax.Provider,{value:n},a)}function Rw(n,a){let s=Dw();return ce.createElement(Tl,{ref:a,...Ad({onClick:s},n)})}let Cx=dt(Rw),Mx=class extends Map{constructor(a){super(),this.factory=a}get(a){let s=super.get(a);return s===void 0&&(s=this.factory(a),this.set(a,s)),s}};var zw=Object.defineProperty,kw=(n,a,s)=>a in n?zw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,Lw=(n,a,s)=>(kw(n,a+"",s),s),Dx=(n,a,s)=>{if(!a.has(n))throw TypeError("Cannot "+s)},Qt=(n,a,s)=>(Dx(n,a,"read from private field"),s?s.call(n):a.get(n)),vf=(n,a,s)=>{if(a.has(n))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(n):a.set(n,s)},wv=(n,a,s,r)=>(Dx(n,a,"write to private field"),a.set(n,s),s),cn,tl,nl;let Vw=class{constructor(a){vf(this,cn,{}),vf(this,tl,new Mx(()=>new Set)),vf(this,nl,new Set),Lw(this,"disposables",Un()),wv(this,cn,a),hn.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Qt(this,cn)}subscribe(a,s){if(hn.isServer)return()=>{};let r={selector:a,callback:s,current:a(Qt(this,cn))};return Qt(this,nl).add(r),this.disposables.add(()=>{Qt(this,nl).delete(r)})}on(a,s){return hn.isServer?()=>{}:(Qt(this,tl).get(a).add(s),this.disposables.add(()=>{Qt(this,tl).get(a).delete(s)}))}send(a){let s=this.reduce(Qt(this,cn),a);if(s!==Qt(this,cn)){wv(this,cn,s);for(let r of Qt(this,nl)){let o=r.selector(Qt(this,cn));Ox(r.current,o)||(r.current=o,r.callback(o))}for(let r of Qt(this,tl).get(a.type))r(Qt(this,cn),a)}}};cn=new WeakMap,tl=new WeakMap,nl=new WeakMap;function Ox(n,a){return Object.is(n,a)?!0:typeof n!="object"||n===null||typeof a!="object"||a===null?!1:Array.isArray(n)&&Array.isArray(a)?n.length!==a.length?!1:xf(n[Symbol.iterator](),a[Symbol.iterator]()):n instanceof Map&&a instanceof Map||n instanceof Set&&a instanceof Set?n.size!==a.size?!1:xf(n.entries(),a.entries()):Tv(n)&&Tv(a)?xf(Object.entries(n)[Symbol.iterator](),Object.entries(a)[Symbol.iterator]()):!1}function xf(n,a){do{let s=n.next(),r=a.next();if(s.done&&r.done)return!0;if(s.done||r.done||!Object.is(s.value,r.value))return!1}while(!0)}function Tv(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let a=Object.getPrototypeOf(n);return a===null||Object.getPrototypeOf(a)===null}var _w=Object.defineProperty,Uw=(n,a,s)=>a in n?_w(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,jv=(n,a,s)=>(Uw(n,typeof a!="symbol"?a+"":a,s),s),Bw=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(Bw||{});let Hw={0(n,a){let s=a.id,r=n.stack,o=n.stack.indexOf(s);if(o!==-1){let d=n.stack.slice();return d.splice(o,1),d.push(s),r=d,{...n,stack:r}}return{...n,stack:[...n.stack,s]}},1(n,a){let s=a.id,r=n.stack.indexOf(s);if(r===-1)return n;let o=n.stack.slice();return o.splice(r,1),{...n,stack:o}}},$w=class Rx extends Vw{constructor(){super(...arguments),jv(this,"actions",{push:a=>this.send({type:0,id:a}),pop:a=>this.send({type:1,id:a})}),jv(this,"selectors",{isTop:(a,s)=>a.stack[a.stack.length-1]===s,inStack:(a,s)=>a.stack.includes(s)})}static new(){return new Rx({stack:[]})}reduce(a,s){return _n(s.type,Hw,a,s)}};const zx=new Mx(()=>$w.new());var yf={exports:{}},bf={};/**
53
+ * @license React
54
+ * use-sync-external-store-with-selector.production.js
55
+ *
56
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
57
+ *
58
+ * This source code is licensed under the MIT license found in the
59
+ * LICENSE file in the root directory of this source tree.
60
+ */var Ev;function qw(){if(Ev)return bf;Ev=1;var n=Mo();function a(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var s=typeof Object.is=="function"?Object.is:a,r=n.useSyncExternalStore,o=n.useRef,d=n.useEffect,h=n.useMemo,p=n.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(m,g,x,y,S){var w=o(null);if(w.current===null){var j={hasValue:!1,value:null};w.current=j}else j=w.current;w=h(function(){function C(U){if(!z){if(z=!0,D=U,U=y(U),S!==void 0&&j.hasValue){var P=j.value;if(S(P,U))return R=P}return R=U}if(P=R,s(D,U))return P;var F=y(U);return S!==void 0&&S(P,F)?(D=U,P):(D=U,R=F)}var z=!1,D,R,k=x===void 0?null:x;return[function(){return C(g())},k===null?void 0:function(){return C(k())}]},[g,x,y,S]);var E=r(m,w[0],w[1]);return d(function(){j.hasValue=!0,j.value=E},[E]),p(E),E},bf}var Nv;function Yw(){return Nv||(Nv=1,yf.exports=qw()),yf.exports}var Gw=Yw();function kx(n,a,s=Ox){return Gw.useSyncExternalStoreWithSelector(Me(r=>n.subscribe(Xw,r)),Me(()=>n.state),Me(()=>n.state),Me(a),s)}function Xw(n){return n}function jl(n,a){let s=T.useId(),r=zx.get(a),[o,d]=kx(r,T.useCallback(h=>[r.selectors.isTop(h,s),r.selectors.inStack(h,s)],[r,s]));return Nt(()=>{if(n)return r.actions.push(s),()=>r.actions.pop(s)},[r,n,s]),n?d?o:!0:!1}let Pf=new Map,ul=new Map;function Av(n){var a;let s=(a=ul.get(n))!=null?a:0;return ul.set(n,s+1),s!==0?()=>Cv(n):(Pf.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>Cv(n))}function Cv(n){var a;let s=(a=ul.get(n))!=null?a:1;if(s===1?ul.delete(n):ul.set(n,s-1),s!==1)return;let r=Pf.get(n);r&&(r["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",r["aria-hidden"]),n.inert=r.inert,Pf.delete(n))}function Kw(n,{allowed:a,disallowed:s}={}){let r=jl(n,"inert-others");Nt(()=>{var o,d;if(!r)return;let h=Un();for(let m of(o=s==null?void 0:s())!=null?o:[])m&&h.add(Av(m));let p=(d=a==null?void 0:a())!=null?d:[];for(let m of p){if(!m)continue;let g=Wi(m);if(!g)continue;let x=m.parentElement;for(;x&&x!==g.body;){for(let y of x.children)p.some(S=>y.contains(S))||h.add(Av(y));x=x.parentElement}}return h.dispose},[r,a,s])}function Fw(n,a,s){let r=ei(o=>{let d=o.getBoundingClientRect();d.x===0&&d.y===0&&d.width===0&&d.height===0&&s()});T.useEffect(()=>{if(!n)return;let o=a===null?null:Ia(a)?a:a.current;if(!o)return;let d=Un();if(typeof ResizeObserver<"u"){let h=new ResizeObserver(()=>r.current(o));h.observe(o),d.add(()=>h.disconnect())}if(typeof IntersectionObserver<"u"){let h=new IntersectionObserver(()=>r.current(o));h.observe(o),d.add(()=>h.disconnect())}return()=>d.dispose()},[a,r,n])}let xo=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),Zw=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var Ln=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(Ln||{}),Jf=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Jf||{}),Qw=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Qw||{});function Pw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(xo)).sort((a,s)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(s.tabIndex||Number.MAX_SAFE_INTEGER)))}function Jw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Zw)).sort((a,s)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(s.tabIndex||Number.MAX_SAFE_INTEGER)))}var Lx=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Lx||{});function Ww(n,a=0){var s;return n===((s=Wi(n))==null?void 0:s.body)?!1:_n(a,{0(){return n.matches(xo)},1(){let r=n;for(;r!==null;){if(r.matches(xo))return!0;r=r.parentElement}return!1}})}var Iw=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Iw||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Vn(n){n==null||n.focus({preventScroll:!0})}let eT=["textarea","input"].join(",");function tT(n){var a,s;return(s=(a=n==null?void 0:n.matches)==null?void 0:a.call(n,eT))!=null?s:!1}function nT(n,a=s=>s){return n.slice().sort((s,r)=>{let o=a(s),d=a(r);if(o===null||d===null)return 0;let h=o.compareDocumentPosition(d);return h&Node.DOCUMENT_POSITION_FOLLOWING?-1:h&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function cl(n,a,{sorted:s=!0,relativeTo:r=null,skipElements:o=[]}={}){let d=Array.isArray(n)?n.length>0?Ff(n[0]):document:Ff(n),h=Array.isArray(n)?s?nT(n):n:a&64?Jw(n):Pw(n);o.length>0&&h.length>1&&(h=h.filter(w=>!o.some(j=>j!=null&&"current"in j?(j==null?void 0:j.current)===w:j===w))),r=r??(d==null?void 0:d.activeElement);let p=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,h.indexOf(r))-1;if(a&4)return Math.max(0,h.indexOf(r))+1;if(a&8)return h.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=a&32?{preventScroll:!0}:{},x=0,y=h.length,S;do{if(x>=y||x+y<=0)return 0;let w=m+x;if(a&16)w=(w+y)%y;else{if(w<0)return 3;if(w>=y)return 1}S=h[w],S==null||S.focus(g),x+=p}while(S!==bx(S));return a&6&&tT(S)&&S.select(),2}function Vx(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function aT(){return/Android/gi.test(window.navigator.userAgent)}function Mv(){return Vx()||aT()}function Jr(n,a,s,r){let o=ei(s);T.useEffect(()=>{if(!n)return;function d(h){o.current(h)}return document.addEventListener(a,d,r),()=>document.removeEventListener(a,d,r)},[n,a,r])}function _x(n,a,s,r){let o=ei(s);T.useEffect(()=>{if(!n)return;function d(h){o.current(h)}return window.addEventListener(a,d,r),()=>window.removeEventListener(a,d,r)},[n,a,r])}const Dv=30;function iT(n,a,s){let r=ei(s),o=T.useCallback(function(p,m){if(p.defaultPrevented)return;let g=m(p);if(g===null||!g.getRootNode().contains(g)||!g.isConnected)return;let x=(function y(S){return typeof S=="function"?y(S()):Array.isArray(S)||S instanceof Set?S:[S]})(a);for(let y of x)if(y!==null&&(y.contains(g)||p.composed&&p.composedPath().includes(y)))return;return!Ww(g,Lx.Loose)&&g.tabIndex!==-1&&p.preventDefault(),r.current(p,g)},[r,a]),d=T.useRef(null);Jr(n,"pointerdown",p=>{var m,g;Mv()||(d.current=((g=(m=p.composedPath)==null?void 0:m.call(p))==null?void 0:g[0])||p.target)},!0),Jr(n,"pointerup",p=>{if(Mv()||!d.current)return;let m=d.current;return d.current=null,o(p,()=>m)},!0);let h=T.useRef({x:0,y:0});Jr(n,"touchstart",p=>{h.current.x=p.touches[0].clientX,h.current.y=p.touches[0].clientY},!0),Jr(n,"touchend",p=>{let m={x:p.changedTouches[0].clientX,y:p.changedTouches[0].clientY};if(!(Math.abs(m.x-h.current.x)>=Dv||Math.abs(m.y-h.current.y)>=Dv))return o(p,()=>ma(p.target)?p.target:null)},!0),_x(n,"blur",p=>o(p,()=>ww(window.document.activeElement)?window.document.activeElement:null),!0)}function Md(...n){return T.useMemo(()=>Wi(...n),[...n])}function Ux(n,a,s,r){let o=ei(s);T.useEffect(()=>{n=n??window;function d(h){o.current(h)}return n.addEventListener(a,d,r),()=>n.removeEventListener(a,d,r)},[n,a,r])}function sT(n){return T.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function lT(n,a){let s=n(),r=new Set;return{getSnapshot(){return s},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...d){let h=a[o].call(s,...d);h&&(s=h,r.forEach(p=>p()))}}}function rT(){let n;return{before({doc:a}){var s;let r=a.documentElement,o=(s=a.defaultView)!=null?s:window;n=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:a,d:s}){let r=a.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),d=Math.max(0,n-o);s.style(r,"paddingRight",`${d}px`)}}}function oT(){return Vx()?{before({doc:n,d:a,meta:s}){function r(o){for(let d of s().containers)for(let h of d())if(h.contains(o))return!0;return!1}a.microTask(()=>{var o;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let p=Un();p.style(n.documentElement,"scrollBehavior","auto"),a.add(()=>a.microTask(()=>p.dispose()))}let d=(o=window.scrollY)!=null?o:window.pageYOffset,h=null;a.addEventListener(n,"click",p=>{if(ma(p.target))try{let m=p.target.closest("a");if(!m)return;let{hash:g}=new URL(m.href),x=n.querySelector(g);ma(x)&&!r(x)&&(h=x)}catch{}},!0),a.group(p=>{a.addEventListener(n,"touchstart",m=>{if(p.dispose(),ma(m.target)&&Sw(m.target))if(r(m.target)){let g=m.target;for(;g.parentElement&&r(g.parentElement);)g=g.parentElement;p.style(g,"overscrollBehavior","contain")}else p.style(m.target,"touchAction","none")})}),a.addEventListener(n,"touchmove",p=>{if(ma(p.target)){if(Tw(p.target))return;if(r(p.target)){let m=p.target;for(;m.parentElement&&m.dataset.headlessuiPortal!==""&&!(m.scrollHeight>m.clientHeight||m.scrollWidth>m.clientWidth);)m=m.parentElement;m.dataset.headlessuiPortal===""&&p.preventDefault()}else p.preventDefault()}},{passive:!1}),a.add(()=>{var p;let m=(p=window.scrollY)!=null?p:window.pageYOffset;d!==m&&window.scrollTo(0,d),h&&h.isConnected&&(h.scrollIntoView({block:"nearest"}),h=null)})})}}:{}}function uT(){return{before({doc:n,d:a}){a.style(n.documentElement,"overflow","hidden")}}}function Ov(n){let a={};for(let s of n)Object.assign(a,s(a));return a}let Fa=lT(()=>new Map,{PUSH(n,a){var s;let r=(s=this.get(n))!=null?s:{doc:n,count:0,d:Un(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(a),r.computedMeta=Ov(r.meta),this.set(n,r),this},POP(n,a){let s=this.get(n);return s&&(s.count--,s.meta.delete(a),s.computedMeta=Ov(s.meta)),this},SCROLL_PREVENT(n){let a={doc:n.doc,d:n.d,meta(){return n.computedMeta}},s=[oT(),rT(),uT()];s.forEach(({before:r})=>r==null?void 0:r(a)),s.forEach(({after:r})=>r==null?void 0:r(a))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Fa.subscribe(()=>{let n=Fa.getSnapshot(),a=new Map;for(let[s]of n)a.set(s,s.documentElement.style.overflow);for(let s of n.values()){let r=a.get(s.doc)==="hidden",o=s.count!==0;(o&&!r||!o&&r)&&Fa.dispatch(s.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",s),s.count===0&&Fa.dispatch("TEARDOWN",s)}});function cT(n,a,s=()=>({containers:[]})){let r=sT(Fa),o=a?r.get(a):void 0,d=o?o.count>0:!1;return Nt(()=>{if(!(!a||!n))return Fa.dispatch("PUSH",a,s),()=>Fa.dispatch("POP",a,s)},[n,a]),d}function fT(n,a,s=()=>[document.body]){let r=jl(n,"scroll-lock");cT(r,a,o=>{var d;return{containers:[...(d=o.containers)!=null?d:[],s]}})}function dT(n=0){let[a,s]=T.useState(n),r=T.useCallback(m=>s(m),[]),o=T.useCallback(m=>s(g=>g|m),[]),d=T.useCallback(m=>(a&m)===m,[a]),h=T.useCallback(m=>s(g=>g&~m),[]),p=T.useCallback(m=>s(g=>g^m),[]);return{flags:a,setFlag:r,addFlag:o,hasFlag:d,removeFlag:h,toggleFlag:p}}var hT={},Rv,zv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Rv=process==null?void 0:hT)==null?void 0:Rv.NODE_ENV)==="test"&&typeof((zv=Element==null?void 0:Element.prototype)==null?void 0:zv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
61
+ `)),[]});var mT=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(mT||{});function pT(n){let a={};for(let s in n)n[s]===!0&&(a[`data-${s}`]="");return a}function gT(n,a,s,r){let[o,d]=T.useState(s),{hasFlag:h,addFlag:p,removeFlag:m}=dT(n&&o?3:0),g=T.useRef(!1),x=T.useRef(!1),y=wl();return Nt(()=>{var S;if(n){if(s&&d(!0),!a){s&&p(3);return}return(S=r==null?void 0:r.start)==null||S.call(r,s),vT(a,{inFlight:g,prepare(){x.current?x.current=!1:x.current=g.current,g.current=!0,!x.current&&(s?(p(3),m(4)):(p(4),m(2)))},run(){x.current?s?(m(3),p(4)):(m(4),p(3)):s?m(1):p(1)},done(){var w;x.current&&bT(a)||(g.current=!1,m(7),s||d(!1),(w=r==null?void 0:r.end)==null||w.call(r,s))}})}},[n,s,a,y]),n?[o,{closed:h(1),enter:h(2),leave:h(4),transition:h(2)||h(4)}]:[s,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function vT(n,{prepare:a,run:s,done:r,inFlight:o}){let d=Un();return yT(n,{prepare:a,inFlight:o}),d.nextFrame(()=>{s(),d.requestAnimationFrame(()=>{d.add(xT(n,r))})}),d.dispose}function xT(n,a){var s,r;let o=Un();if(!n)return o.dispose;let d=!1;o.add(()=>{d=!0});let h=(r=(s=n.getAnimations)==null?void 0:s.call(n).filter(p=>p instanceof CSSTransition))!=null?r:[];return h.length===0?(a(),o.dispose):(Promise.allSettled(h.map(p=>p.finished)).then(()=>{d||a()}),o.dispose)}function yT(n,{inFlight:a,prepare:s}){if(a!=null&&a.current){s();return}let r=n.style.transition;n.style.transition="none",s(),n.offsetHeight,n.style.transition=r}function bT(n){var a,s;return((s=(a=n.getAnimations)==null?void 0:a.call(n))!=null?s:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function Dd(n,a){let s=T.useRef([]),r=Me(n);T.useEffect(()=>{let o=[...s.current];for(let[d,h]of a.entries())if(s.current[d]!==h){let p=r(a,o);return s.current=a,p}},[r,...a])}let Ro=T.createContext(null);Ro.displayName="OpenClosedContext";var an=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(an||{});function zo(){return T.useContext(Ro)}function ST({value:n,children:a}){return ce.createElement(Ro.Provider,{value:n},a)}function wT({children:n}){return ce.createElement(Ro.Provider,{value:null},n)}function TT(n){function a(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let da=[];TT(()=>{function n(a){if(!ma(a.target)||a.target===document.body||da[0]===a.target)return;let s=a.target;s=s.closest(xo),da.unshift(s??a.target),da=da.filter(r=>r!=null&&r.isConnected),da.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function Bx(n){let a=Me(n),s=T.useRef(!1);T.useEffect(()=>(s.current=!1,()=>{s.current=!0,Oo(()=>{s.current&&a()})}),[a])}let Hx=T.createContext(!1);function jT(){return T.useContext(Hx)}function kv(n){return ce.createElement(Hx.Provider,{value:n.force},n.children)}function ET(n){let a=jT(),s=T.useContext(qx),[r,o]=T.useState(()=>{var d;if(!a&&s!==null)return(d=s.current)!=null?d:null;if(hn.isServer)return null;let h=n==null?void 0:n.getElementById("headlessui-portal-root");if(h)return h;if(n===null)return null;let p=n.createElement("div");return p.setAttribute("id","headlessui-portal-root"),n.body.appendChild(p)});return T.useEffect(()=>{r!==null&&(n!=null&&n.body.contains(r)||n==null||n.body.appendChild(r))},[r,n]),T.useEffect(()=>{a||s!==null&&o(s.current)},[s,o,a]),r}let $x=T.Fragment,NT=dt(function(n,a){let{ownerDocument:s=null,...r}=n,o=T.useRef(null),d=gn(jw(S=>{o.current=S}),a),h=Md(o.current),p=s??h,m=ET(p),g=T.useContext(Wf),x=wl(),y=At();return Bx(()=>{var S;m&&m.childNodes.length<=0&&((S=m.parentElement)==null||S.removeChild(m))}),m?X2.createPortal(ce.createElement("div",{"data-headlessui-portal":"",ref:S=>{x.dispose(),g&&S&&x.add(g.register(S))}},y({ourProps:{ref:d},theirProps:r,slot:{},defaultTag:$x,name:"Portal"})),m):null});function AT(n,a){let s=gn(a),{enabled:r=!0,ownerDocument:o,...d}=n,h=At();return r?ce.createElement(NT,{...d,ownerDocument:o,ref:s}):h({ourProps:{ref:s},theirProps:d,slot:{},defaultTag:$x,name:"Portal"})}let CT=T.Fragment,qx=T.createContext(null);function MT(n,a){let{target:s,...r}=n,o={ref:gn(a)},d=At();return ce.createElement(qx.Provider,{value:s},d({ourProps:o,theirProps:r,defaultTag:CT,name:"Popover.Group"}))}let Wf=T.createContext(null);function DT(){let n=T.useContext(Wf),a=T.useRef([]),s=Me(d=>(a.current.push(d),n&&n.register(d),()=>r(d))),r=Me(d=>{let h=a.current.indexOf(d);h!==-1&&a.current.splice(h,1),n&&n.unregister(d)}),o=T.useMemo(()=>({register:s,unregister:r,portals:a}),[s,r,a]);return[a,T.useMemo(()=>function({children:d}){return ce.createElement(Wf.Provider,{value:o},d)},[o])]}let OT=dt(AT),Yx=dt(MT),RT=Object.assign(OT,{Group:Yx}),zT=T.Fragment;function kT(n,a){let{...s}=n,r=!1,{isFocusVisible:o,focusProps:d}=yx(),{isHovered:h,hoverProps:p}=xx({isDisabled:r}),{pressed:m,pressProps:g}=Sx({disabled:r}),x=Ad({ref:a},d,p,g),y=ti({hover:h,focus:o,active:m});return At()({ourProps:x,theirProps:s,slot:y,defaultTag:zT,name:"DataInteractive"})}let LT=dt(kT);function VT(n,a=typeof document<"u"?document.defaultView:null,s){let r=jl(n,"escape");Ux(a,"keydown",o=>{r&&(o.defaultPrevented||o.key===Nx.Escape&&s(o))})}function _T(){var n;let[a]=T.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[s,r]=T.useState((n=a==null?void 0:a.matches)!=null?n:!1);return Nt(()=>{if(!a)return;function o(d){r(d.matches)}return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[a]),s}function UT({defaultContainers:n=[],portals:a,mainTreeNode:s}={}){let r=Me(()=>{var o,d;let h=Wi(s),p=[];for(let m of n)m!==null&&(ga(m)?p.push(m):"current"in m&&ga(m.current)&&p.push(m.current));if(a!=null&&a.current)for(let m of a.current)p.push(m);for(let m of(o=h==null?void 0:h.querySelectorAll("html > *, body > *"))!=null?o:[])m!==document.body&&m!==document.head&&ga(m)&&m.id!=="headlessui-portal-root"&&(s&&(m.contains(s)||m.contains((d=s==null?void 0:s.getRootNode())==null?void 0:d.host))||p.some(g=>m.contains(g))||p.push(m));return p});return{resolveContainers:r,contains:Me(o=>r().some(d=>d.contains(o)))}}let Gx=T.createContext(null);function Lv({children:n,node:a}){let[s,r]=T.useState(null),o=Xx(a??s);return ce.createElement(Gx.Provider,{value:o},n,o===null&&ce.createElement(Qf,{features:vo.Hidden,ref:d=>{var h,p;if(d){for(let m of(p=(h=Wi(d))==null?void 0:h.querySelectorAll("html > *, body > *"))!=null?p:[])if(m!==document.body&&m!==document.head&&ga(m)&&m!=null&&m.contains(d)){r(m);break}}}}))}function Xx(n=null){var a;return(a=T.useContext(Gx))!=null?a:n}function BT(){let n=typeof document>"u";return"useSyncExternalStore"in mv?(a=>a.useSyncExternalStore)(mv)(()=>()=>{},()=>!1,()=>!n):!1}function ko(){let n=BT(),[a,s]=T.useState(hn.isHandoffComplete);return a&&hn.isHandoffComplete===!1&&s(!1),T.useEffect(()=>{a!==!0&&s(!0)},[a]),T.useEffect(()=>hn.handoff(),[]),n?!1:a}function Od(){let n=T.useRef(!1);return Nt(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var al=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(al||{});function HT(){let n=T.useRef(0);return _x(!0,"keydown",a=>{a.key==="Tab"&&(n.current=a.shiftKey?1:0)},!0),n}function Kx(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let a=new Set;for(let s of n.current)ga(s.current)&&a.add(s.current);return a}let $T="div";var Ga=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(Ga||{});function qT(n,a){let s=T.useRef(null),r=gn(s,a),{initialFocus:o,initialFocusFallback:d,containers:h,features:p=15,...m}=n;ko()||(p=0);let g=Md(s.current);KT(p,{ownerDocument:g});let x=FT(p,{ownerDocument:g,container:s,initialFocus:o,initialFocusFallback:d});ZT(p,{ownerDocument:g,container:s,containers:h,previousActiveElement:x});let y=HT(),S=Me(D=>{if(!Ia(s.current))return;let R=s.current;(k=>k())(()=>{_n(y.current,{[al.Forwards]:()=>{cl(R,Ln.First,{skipElements:[D.relatedTarget,d]})},[al.Backwards]:()=>{cl(R,Ln.Last,{skipElements:[D.relatedTarget,d]})}})})}),w=jl(!!(p&2),"focus-trap#tab-lock"),j=wl(),E=T.useRef(!1),C={ref:r,onKeyDown(D){D.key=="Tab"&&(E.current=!0,j.requestAnimationFrame(()=>{E.current=!1}))},onBlur(D){if(!(p&4))return;let R=Kx(h);Ia(s.current)&&R.add(s.current);let k=D.relatedTarget;ma(k)&&k.dataset.headlessuiFocusGuard!=="true"&&(Fx(R,k)||(E.current?cl(s.current,_n(y.current,{[al.Forwards]:()=>Ln.Next,[al.Backwards]:()=>Ln.Previous})|Ln.WrapAround,{relativeTo:D.target}):ma(D.target)&&Vn(D.target)))}},z=At();return ce.createElement(ce.Fragment,null,w&&ce.createElement(Qf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:vo.Focusable}),z({ourProps:C,theirProps:m,defaultTag:$T,name:"FocusTrap"}),w&&ce.createElement(Qf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:vo.Focusable}))}let YT=dt(qT),GT=Object.assign(YT,{features:Ga});function XT(n=!0){let a=T.useRef(da.slice());return Dd(([s],[r])=>{r===!0&&s===!1&&Oo(()=>{a.current.splice(0)}),r===!1&&s===!0&&(a.current=da.slice())},[n,da,a]),Me(()=>{var s;return(s=a.current.find(r=>r!=null&&r.isConnected))!=null?s:null})}function KT(n,{ownerDocument:a}){let s=!!(n&8),r=XT(s);Dd(()=>{s||rw(a==null?void 0:a.body)&&Vn(r())},[s]),Bx(()=>{s&&Vn(r())})}function FT(n,{ownerDocument:a,container:s,initialFocus:r,initialFocusFallback:o}){let d=T.useRef(null),h=jl(!!(n&1),"focus-trap#initial-focus"),p=Od();return Dd(()=>{if(n===0)return;if(!h){o!=null&&o.current&&Vn(o.current);return}let m=s.current;m&&Oo(()=>{if(!p.current)return;let g=a==null?void 0:a.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===g){d.current=g;return}}else if(m.contains(g)){d.current=g;return}if(r!=null&&r.current)Vn(r.current);else{if(n&16){if(cl(m,Ln.First|Ln.AutoFocus)!==Jf.Error)return}else if(cl(m,Ln.First)!==Jf.Error)return;if(o!=null&&o.current&&(Vn(o.current),(a==null?void 0:a.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}d.current=a==null?void 0:a.activeElement})},[o,h,n]),d}function ZT(n,{ownerDocument:a,container:s,containers:r,previousActiveElement:o}){let d=Od(),h=!!(n&4);Ux(a==null?void 0:a.defaultView,"focus",p=>{if(!h||!d.current)return;let m=Kx(r);Ia(s.current)&&m.add(s.current);let g=o.current;if(!g)return;let x=p.target;Ia(x)?Fx(m,x)?(o.current=x,Vn(x)):(p.preventDefault(),p.stopPropagation(),Vn(g)):Vn(o.current)},!0)}function Fx(n,a){for(let s of n)if(s.contains(a))return!0;return!1}function Zx(n){var a;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!ol((a=n.as)!=null?a:Px)||ce.Children.count(n.children)===1}let Lo=T.createContext(null);Lo.displayName="TransitionContext";var QT=(n=>(n.Visible="visible",n.Hidden="hidden",n))(QT||{});function PT(){let n=T.useContext(Lo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function JT(){let n=T.useContext(Vo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Vo=T.createContext(null);Vo.displayName="NestingContext";function _o(n){return"children"in n?_o(n.children):n.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function Qx(n,a){let s=ei(n),r=T.useRef([]),o=Od(),d=wl(),h=Me((w,j=ha.Hidden)=>{let E=r.current.findIndex(({el:C})=>C===w);E!==-1&&(_n(j,{[ha.Unmount](){r.current.splice(E,1)},[ha.Hidden](){r.current[E].state="hidden"}}),d.microTask(()=>{var C;!_o(r)&&o.current&&((C=s.current)==null||C.call(s))}))}),p=Me(w=>{let j=r.current.find(({el:E})=>E===w);return j?j.state!=="visible"&&(j.state="visible"):r.current.push({el:w,state:"visible"}),()=>h(w,ha.Unmount)}),m=T.useRef([]),g=T.useRef(Promise.resolve()),x=T.useRef({enter:[],leave:[]}),y=Me((w,j,E)=>{m.current.splice(0),a&&(a.chains.current[j]=a.chains.current[j].filter(([C])=>C!==w)),a==null||a.chains.current[j].push([w,new Promise(C=>{m.current.push(C)})]),a==null||a.chains.current[j].push([w,new Promise(C=>{Promise.all(x.current[j].map(([z,D])=>D)).then(()=>C())})]),j==="enter"?g.current=g.current.then(()=>a==null?void 0:a.wait.current).then(()=>E(j)):E(j)}),S=Me((w,j,E)=>{Promise.all(x.current[j].splice(0).map(([C,z])=>z)).then(()=>{var C;(C=m.current.shift())==null||C()}).then(()=>E(j))});return T.useMemo(()=>({children:r,register:p,unregister:h,onStart:y,onStop:S,wait:g,chains:x}),[p,h,r,y,S,x,g])}let Px=T.Fragment,Jx=go.RenderStrategy;function WT(n,a){var s,r;let{transition:o=!0,beforeEnter:d,afterEnter:h,beforeLeave:p,afterLeave:m,enter:g,enterFrom:x,enterTo:y,entered:S,leave:w,leaveFrom:j,leaveTo:E,...C}=n,[z,D]=T.useState(null),R=T.useRef(null),k=Zx(n),U=gn(...k?[R,a,D]:a===null?[]:[a]),P=(s=C.unmount)==null||s?ha.Unmount:ha.Hidden,{show:F,appear:W,initial:re}=PT(),[B,Z]=T.useState(F?"visible":"hidden"),ie=JT(),{register:le,unregister:Se}=ie;Nt(()=>le(R),[le,R]),Nt(()=>{if(P===ha.Hidden&&R.current){if(F&&B!=="visible"){Z("visible");return}return _n(B,{hidden:()=>Se(R),visible:()=>le(R)})}},[B,R,le,Se,F,P]);let De=ko();Nt(()=>{if(k&&De&&B==="visible"&&R.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[R,B,De,k]);let $=re&&!W,Q=W&&F&&re,J=T.useRef(!1),oe=Qx(()=>{J.current||(Z("hidden"),Se(R))},ie),me=Me(Te=>{J.current=!0;let Ze=Te?"enter":"leave";oe.onStart(R,Ze,Le=>{Le==="enter"?d==null||d():Le==="leave"&&(p==null||p())})}),A=Me(Te=>{let Ze=Te?"enter":"leave";J.current=!1,oe.onStop(R,Ze,Le=>{Le==="enter"?h==null||h():Le==="leave"&&(m==null||m())}),Ze==="leave"&&!_o(oe)&&(Z("hidden"),Se(R))});T.useEffect(()=>{k&&o||(me(F),A(F))},[F,k,o]);let G=!(!o||!k||!De||$),[,K]=gT(G,z,F,{start:me,end:A}),I=qa({ref:U,className:((r=Zf(C.className,Q&&g,Q&&x,K.enter&&g,K.enter&&K.closed&&x,K.enter&&!K.closed&&y,K.leave&&w,K.leave&&!K.closed&&j,K.leave&&K.closed&&E,!K.transition&&F&&S))==null?void 0:r.trim())||void 0,...pT(K)}),ue=0;B==="visible"&&(ue|=an.Open),B==="hidden"&&(ue|=an.Closed),F&&B==="hidden"&&(ue|=an.Opening),!F&&B==="visible"&&(ue|=an.Closing);let pe=At();return ce.createElement(Vo.Provider,{value:oe},ce.createElement(ST,{value:ue},pe({ourProps:I,theirProps:C,defaultTag:Px,features:Jx,visible:B==="visible",name:"Transition.Child"})))}function IT(n,a){let{show:s,appear:r=!1,unmount:o=!0,...d}=n,h=T.useRef(null),p=Zx(n),m=gn(...p?[h,a]:a===null?[]:[a]);ko();let g=zo();if(s===void 0&&g!==null&&(s=(g&an.Open)===an.Open),s===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,y]=T.useState(s?"visible":"hidden"),S=Qx(()=>{s||y("hidden")}),[w,j]=T.useState(!0),E=T.useRef([s]);Nt(()=>{w!==!1&&E.current[E.current.length-1]!==s&&(E.current.push(s),j(!1))},[E,s]);let C=T.useMemo(()=>({show:s,appear:r,initial:w}),[s,r,w]);Nt(()=>{s?y("visible"):!_o(S)&&h.current!==null&&y("hidden")},[s,S]);let z={unmount:o},D=Me(()=>{var U;w&&j(!1),(U=n.beforeEnter)==null||U.call(n)}),R=Me(()=>{var U;w&&j(!1),(U=n.beforeLeave)==null||U.call(n)}),k=At();return ce.createElement(Vo.Provider,{value:S},ce.createElement(Lo.Provider,{value:C},k({ourProps:{...z,as:T.Fragment,children:ce.createElement(Wx,{ref:m,...z,...d,beforeEnter:D,beforeLeave:R})},theirProps:{},defaultTag:T.Fragment,features:Jx,visible:x==="visible",name:"Transition"})))}function ej(n,a){let s=T.useContext(Lo)!==null,r=zo()!==null;return ce.createElement(ce.Fragment,null,!s&&r?ce.createElement(If,{ref:a,...n}):ce.createElement(Wx,{ref:a,...n}))}let If=dt(IT),Wx=dt(WT),Rd=dt(ej),tj=Object.assign(If,{Child:Rd,Root:If});var nj=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(nj||{}),aj=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(aj||{});let ij={0(n,a){return n.titleId===a.id?n:{...n,titleId:a.id}}},zd=T.createContext(null);zd.displayName="DialogContext";function Uo(n){let a=T.useContext(zd);if(a===null){let s=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,Uo),s}return a}function sj(n,a){return _n(a.type,ij,n,a)}let Vv=dt(function(n,a){let s=T.useId(),{id:r=`headlessui-dialog-${s}`,open:o,onClose:d,initialFocus:h,role:p="dialog",autoFocus:m=!0,__demoMode:g=!1,unmount:x=!1,...y}=n,S=T.useRef(!1);p=(function(){return p==="dialog"||p==="alertdialog"?p:(S.current||(S.current=!0,console.warn(`Invalid role [${p}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let w=zo();o===void 0&&w!==null&&(o=(w&an.Open)===an.Open);let j=T.useRef(null),E=gn(j,a),C=Md(j.current),z=o?0:1,[D,R]=T.useReducer(sj,{titleId:null,descriptionId:null,panelRef:T.createRef()}),k=Me(()=>d(!1)),U=Me(K=>R({type:0,id:K})),P=ko()?z===0:!1,[F,W]=DT(),re={get current(){var K;return(K=D.panelRef.current)!=null?K:j.current}},B=Xx(),{resolveContainers:Z}=UT({mainTreeNode:B,portals:F,defaultContainers:[re]}),ie=w!==null?(w&an.Closing)===an.Closing:!1;Kw(g||ie?!1:P,{allowed:Me(()=>{var K,I;return[(I=(K=j.current)==null?void 0:K.closest("[data-headlessui-portal]"))!=null?I:null]}),disallowed:Me(()=>{var K;return[(K=B==null?void 0:B.closest("body > *:not(#headlessui-portal-root)"))!=null?K:null]})});let le=zx.get(null);Nt(()=>{if(P)return le.actions.push(r),()=>le.actions.pop(r)},[le,r,P]);let Se=kx(le,T.useCallback(K=>le.selectors.isTop(K,r),[le,r]));iT(Se,Z,K=>{K.preventDefault(),k()}),VT(Se,C==null?void 0:C.defaultView,K=>{K.preventDefault(),K.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),k()}),fT(g||ie?!1:P,C,Z),Fw(P,j,k);let[De,$]=Ew(),Q=T.useMemo(()=>[{dialogState:z,close:k,setTitleId:U,unmount:x},D],[z,k,U,x,D]),J=ti({open:z===0}),oe={ref:E,id:r,role:p,tabIndex:-1,"aria-modal":g?void 0:z===0?!0:void 0,"aria-labelledby":D.titleId,"aria-describedby":De,unmount:x},me=!_T(),A=Ga.None;P&&!g&&(A|=Ga.RestoreFocus,A|=Ga.TabLock,m&&(A|=Ga.AutoFocus),me&&(A|=Ga.InitialFocus));let G=At();return ce.createElement(wT,null,ce.createElement(kv,{force:!0},ce.createElement(RT,null,ce.createElement(zd.Provider,{value:Q},ce.createElement(Yx,{target:j},ce.createElement(kv,{force:!1},ce.createElement($,{slot:J},ce.createElement(W,null,ce.createElement(GT,{initialFocus:h,initialFocusFallback:j,containers:Z,features:A},ce.createElement(Ow,{value:k},G({ourProps:oe,theirProps:y,slot:J,defaultTag:lj,features:rj,visible:z===0,name:"Dialog"})))))))))))}),lj="div",rj=go.RenderStrategy|go.Static;function oj(n,a){let{transition:s=!1,open:r,...o}=n,d=zo(),h=n.hasOwnProperty("open")||d!==null,p=n.hasOwnProperty("onClose");if(!h&&!p)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!h)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!p)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!d&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(r!==void 0||s)&&!o.static?ce.createElement(Lv,null,ce.createElement(tj,{show:r,transition:s,unmount:o.unmount},ce.createElement(Vv,{ref:a,...o}))):ce.createElement(Lv,null,ce.createElement(Vv,{ref:a,open:r,...o}))}let uj="div";function cj(n,a){let s=T.useId(),{id:r=`headlessui-dialog-panel-${s}`,transition:o=!1,...d}=n,[{dialogState:h,unmount:p},m]=Uo("Dialog.Panel"),g=gn(a,m.panelRef),x=ti({open:h===0}),y=Me(C=>{C.stopPropagation()}),S={ref:g,id:r,onClick:y},w=o?Rd:T.Fragment,j=o?{unmount:p}:{},E=At();return ce.createElement(w,{...j},E({ourProps:S,theirProps:d,slot:x,defaultTag:uj,name:"Dialog.Panel"}))}let fj="div";function dj(n,a){let{transition:s=!1,...r}=n,[{dialogState:o,unmount:d}]=Uo("Dialog.Backdrop"),h=ti({open:o===0}),p={ref:a,"aria-hidden":!0},m=s?Rd:T.Fragment,g=s?{unmount:d}:{},x=At();return ce.createElement(m,{...g},x({ourProps:p,theirProps:r,slot:h,defaultTag:fj,name:"Dialog.Backdrop"}))}let hj="h2";function mj(n,a){let s=T.useId(),{id:r=`headlessui-dialog-title-${s}`,...o}=n,[{dialogState:d,setTitleId:h}]=Uo("Dialog.Title"),p=gn(a);T.useEffect(()=>(h(r),()=>h(null)),[r,h]);let m=ti({open:d===0}),g={ref:p,id:r};return At()({ourProps:g,theirProps:o,slot:m,defaultTag:hj,name:"Dialog.Title"})}let pj=dt(oj),Ix=dt(cj),gj=dt(dj),vj=dt(mj),xj=Object.assign(pj,{Panel:Ix,Title:vj,Description:Mw});const yo=T.createContext({});function yj(n){const a=T.useRef(null);return a.current===null&&(a.current=n()),a.current}const bj=typeof window<"u",ey=bj?T.useLayoutEffect:T.useEffect,kd=T.createContext(null);function Ld(n,a){n.indexOf(a)===-1&&n.push(a)}function bo(n,a){const s=n.indexOf(a);s>-1&&n.splice(s,1)}const pn=(n,a,s)=>s>a?a:s<n?n:s;let Vd=()=>{};const va={},ty=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function ny(n){return typeof n=="object"&&n!==null}const ay=n=>/^0[^.\s]+$/u.test(n);function iy(n){let a;return()=>(a===void 0&&(a=n()),a)}const Jt=n=>n,Sj=(n,a)=>s=>a(n(s)),El=(...n)=>n.reduce(Sj),vl=(n,a,s)=>{const r=a-n;return r===0?1:(s-n)/r};class _d{constructor(){this.subscriptions=[]}add(a){return Ld(this.subscriptions,a),()=>bo(this.subscriptions,a)}notify(a,s,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](a,s,r);else for(let d=0;d<o;d++){const h=this.subscriptions[d];h&&h(a,s,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ut=n=>n*1e3,Pt=n=>n/1e3;function sy(n,a){return a?n*(1e3/a):0}const ly=(n,a,s)=>(((1-3*s+3*a)*n+(3*s-6*a))*n+3*a)*n,wj=1e-7,Tj=12;function jj(n,a,s,r,o){let d,h,p=0;do h=a+(s-a)/2,d=ly(h,r,o)-n,d>0?s=h:a=h;while(Math.abs(d)>wj&&++p<Tj);return h}function Nl(n,a,s,r){if(n===a&&s===r)return Jt;const o=d=>jj(d,0,1,n,s);return d=>d===0||d===1?d:ly(o(d),a,r)}const ry=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,oy=n=>a=>1-n(1-a),uy=Nl(.33,1.53,.69,.99),Ud=oy(uy),cy=ry(Ud),fy=n=>n>=1?1:(n*=2)<1?.5*Ud(n):.5*(2-Math.pow(2,-10*(n-1))),Bd=n=>1-Math.sin(Math.acos(n)),dy=oy(Bd),hy=ry(Bd),Ej=Nl(.42,0,1,1),Nj=Nl(0,0,.58,1),my=Nl(.42,0,.58,1),Aj=n=>Array.isArray(n)&&typeof n[0]!="number",py=n=>Array.isArray(n)&&typeof n[0]=="number",Cj={linear:Jt,easeIn:Ej,easeInOut:my,easeOut:Nj,circIn:Bd,circInOut:hy,circOut:dy,backIn:Ud,backInOut:cy,backOut:uy,anticipate:fy},Mj=n=>typeof n=="string",_v=n=>{if(py(n)){Vd(n.length===4);const[a,s,r,o]=n;return Nl(a,s,r,o)}else if(Mj(n))return Cj[n];return n},Wr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Dj(n,a){let s=new Set,r=new Set,o=!1,d=!1;const h=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function m(x){h.has(x)&&(g.schedule(x),n()),x(p)}const g={schedule:(x,y=!1,S=!1)=>{const j=S&&o?s:r;return y&&h.add(x),j.add(x),x},cancel:x=>{r.delete(x),h.delete(x)},process:x=>{if(p=x,o){d=!0;return}o=!0;const y=s;s=r,r=y,s.forEach(m),s.clear(),o=!1,d&&(d=!1,g.process(x))}};return g}const Oj=40;function gy(n,a){let s=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},d=()=>s=!0,h=Wr.reduce((R,k)=>(R[k]=Dj(d),R),{}),{setup:p,read:m,resolveKeyframes:g,preUpdate:x,update:y,preRender:S,render:w,postRender:j}=h,E=()=>{const R=va.useManualTiming,k=R?o.timestamp:performance.now();s=!1,R||(o.delta=r?1e3/60:Math.max(Math.min(k-o.timestamp,Oj),1)),o.timestamp=k,o.isProcessing=!0,p.process(o),m.process(o),g.process(o),x.process(o),y.process(o),S.process(o),w.process(o),j.process(o),o.isProcessing=!1,s&&a&&(r=!1,n(E))},C=()=>{s=!0,r=!0,o.isProcessing||n(E)};return{schedule:Wr.reduce((R,k)=>{const U=h[k];return R[k]=(P,F=!1,W=!1)=>(s||C(),U.schedule(P,F,W)),R},{}),cancel:R=>{for(let k=0;k<Wr.length;k++)h[Wr[k]].cancel(R)},state:o,steps:h}}const{schedule:ke,cancel:xa,state:ct,steps:Sf}=gy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Jt,!0);let lo;function Rj(){lo=void 0}const vt={now:()=>(lo===void 0&&vt.set(ct.isProcessing||va.useManualTiming?ct.timestamp:performance.now()),lo),set:n=>{lo=n,queueMicrotask(Rj)}},vy=n=>a=>typeof a=="string"&&a.startsWith(n),xy=vy("--"),zj=vy("var(--"),Hd=n=>zj(n)?kj.test(n.split("/*")[0].trim()):!1,kj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Uv(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Ii={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},xl={...Ii,transform:n=>pn(0,1,n)},Ir={...Ii,default:1},fl=n=>Math.round(n*1e5)/1e5,$d=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lj(n){return n==null}const Vj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qd=(n,a)=>s=>!!(typeof s=="string"&&Vj.test(s)&&s.startsWith(n)||a&&!Lj(s)&&Object.prototype.hasOwnProperty.call(s,a)),yy=(n,a,s)=>r=>{if(typeof r!="string")return r;const[o,d,h,p]=r.match($d);return{[n]:parseFloat(o),[a]:parseFloat(d),[s]:parseFloat(h),alpha:p!==void 0?parseFloat(p):1}},_j=n=>pn(0,255,n),wf={...Ii,transform:n=>Math.round(_j(n))},Za={test:qd("rgb","red"),parse:yy("red","green","blue"),transform:({red:n,green:a,blue:s,alpha:r=1})=>"rgba("+wf.transform(n)+", "+wf.transform(a)+", "+wf.transform(s)+", "+fl(xl.transform(r))+")"};function Uj(n){let a="",s="",r="",o="";return n.length>5?(a=n.substring(1,3),s=n.substring(3,5),r=n.substring(5,7),o=n.substring(7,9)):(a=n.substring(1,2),s=n.substring(2,3),r=n.substring(3,4),o=n.substring(4,5),a+=a,s+=s,r+=r,o+=o),{red:parseInt(a,16),green:parseInt(s,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const ed={test:qd("#"),parse:Uj,transform:Za.transform},Al=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),ca=Al("deg"),mn=Al("%"),te=Al("px"),Bj=Al("vh"),Hj=Al("vw"),Bv={...mn,parse:n=>mn.parse(n)/100,transform:n=>mn.transform(n*100)},qi={test:qd("hsl","hue"),parse:yy("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:s,alpha:r=1})=>"hsla("+Math.round(n)+", "+mn.transform(fl(a))+", "+mn.transform(fl(s))+", "+fl(xl.transform(r))+")"},Ie={test:n=>Za.test(n)||ed.test(n)||qi.test(n),parse:n=>Za.test(n)?Za.parse(n):qi.test(n)?qi.parse(n):ed.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Za.transform(n):qi.transform(n),getAnimatableNone:n=>{const a=Ie.parse(n);return a.alpha=0,Ie.transform(a)}},$j=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qj(n){var a,s;return isNaN(n)&&typeof n=="string"&&(((a=n.match($d))==null?void 0:a.length)||0)+(((s=n.match($j))==null?void 0:s.length)||0)>0}const by="number",Sy="color",Yj="var",Gj="var(",Hv="${}",Xj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zi(n){const a=n.toString(),s=[],r={color:[],number:[],var:[]},o=[];let d=0;const p=a.replace(Xj,m=>(Ie.test(m)?(r.color.push(d),o.push(Sy),s.push(Ie.parse(m))):m.startsWith(Gj)?(r.var.push(d),o.push(Yj),s.push(m)):(r.number.push(d),o.push(by),s.push(parseFloat(m))),++d,Hv)).split(Hv);return{values:s,split:p,indexes:r,types:o}}function Kj(n){return Zi(n).values}function wy({split:n,types:a}){const s=n.length;return r=>{let o="";for(let d=0;d<s;d++)if(o+=n[d],r[d]!==void 0){const h=a[d];h===by?o+=fl(r[d]):h===Sy?o+=Ie.transform(r[d]):o+=r[d]}return o}}function Fj(n){return wy(Zi(n))}const Zj=n=>typeof n=="number"?0:Ie.test(n)?Ie.getAnimatableNone(n):n,Qj=(n,a)=>typeof n=="number"?a!=null&&a.trim().endsWith("/")?n:0:Zj(n);function Pj(n){const a=Zi(n);return wy(a)(a.values.map((r,o)=>Qj(r,a.split[o])))}const sn={test:qj,parse:Kj,createTransformer:Fj,getAnimatableNone:Pj};function Tf(n,a,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?n+(a-n)*6*s:s<1/2?a:s<2/3?n+(a-n)*(2/3-s)*6:n}function Jj({hue:n,saturation:a,lightness:s,alpha:r}){n/=360,a/=100,s/=100;let o=0,d=0,h=0;if(!a)o=d=h=s;else{const p=s<.5?s*(1+a):s+a-s*a,m=2*s-p;o=Tf(m,p,n+1/3),d=Tf(m,p,n),h=Tf(m,p,n-1/3)}return{red:Math.round(o*255),green:Math.round(d*255),blue:Math.round(h*255),alpha:r}}function So(n,a){return s=>s>0?a:n}const He=(n,a,s)=>n+(a-n)*s,jf=(n,a,s)=>{const r=n*n,o=s*(a*a-r)+r;return o<0?0:Math.sqrt(o)},Wj=[ed,Za,qi],Ij=n=>Wj.find(a=>a.test(n));function $v(n){const a=Ij(n);if(!a)return!1;let s=a.parse(n);return a===qi&&(s=Jj(s)),s}const qv=(n,a)=>{const s=$v(n),r=$v(a);if(!s||!r)return So(n,a);const o={...s};return d=>(o.red=jf(s.red,r.red,d),o.green=jf(s.green,r.green,d),o.blue=jf(s.blue,r.blue,d),o.alpha=He(s.alpha,r.alpha,d),Za.transform(o))},td=new Set(["none","hidden"]);function eE(n,a){return td.has(n)?s=>s<=0?n:a:s=>s>=1?a:n}function tE(n,a){return s=>He(n,a,s)}function Yd(n){return typeof n=="number"?tE:typeof n=="string"?Hd(n)?So:Ie.test(n)?qv:iE:Array.isArray(n)?Ty:typeof n=="object"?Ie.test(n)?qv:nE:So}function Ty(n,a){const s=[...n],r=s.length,o=n.map((d,h)=>Yd(d)(d,a[h]));return d=>{for(let h=0;h<r;h++)s[h]=o[h](d);return s}}function nE(n,a){const s={...n,...a},r={};for(const o in s)n[o]!==void 0&&a[o]!==void 0&&(r[o]=Yd(n[o])(n[o],a[o]));return o=>{for(const d in r)s[d]=r[d](o);return s}}function aE(n,a){const s=[],r={color:0,var:0,number:0};for(let o=0;o<a.values.length;o++){const d=a.types[o],h=n.indexes[d][r[d]],p=n.values[h]??0;s[o]=p,r[d]++}return s}const iE=(n,a)=>{const s=sn.createTransformer(a),r=Zi(n),o=Zi(a);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?td.has(n)&&!o.values.length||td.has(a)&&!r.values.length?eE(n,a):El(Ty(aE(r,o),o.values),s):So(n,a)};function jy(n,a,s){return typeof n=="number"&&typeof a=="number"&&typeof s=="number"?He(n,a,s):Yd(n)(n,a)}const sE=n=>{const a=({timestamp:s})=>n(s);return{start:(s=!0)=>ke.update(a,s),stop:()=>xa(a),now:()=>ct.isProcessing?ct.timestamp:vt.now()}},Ey=(n,a,s=10)=>{let r="";const o=Math.max(Math.round(a/s),2);for(let d=0;d<o;d++)r+=Math.round(n(d/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},wo=2e4;function Gd(n){let a=0;const s=50;let r=n.next(a);for(;!r.done&&a<wo;)a+=s,r=n.next(a);return a>=wo?1/0:a}function lE(n,a=100,s){const r=s({...n,keyframes:[0,a]}),o=Math.min(Gd(r),wo);return{type:"keyframes",ease:d=>r.next(o*d).value/a,duration:Pt(o)}}const Ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function nd(n,a){return n*Math.sqrt(1-a*a)}const rE=12;function oE(n,a,s){let r=s;for(let o=1;o<rE;o++)r=r-n(r)/a(r);return r}const Ef=.001;function uE({duration:n=Ge.duration,bounce:a=Ge.bounce,velocity:s=Ge.velocity,mass:r=Ge.mass}){let o,d,h=1-a;h=pn(Ge.minDamping,Ge.maxDamping,h),n=pn(Ge.minDuration,Ge.maxDuration,Pt(n)),h<1?(o=g=>{const x=g*h,y=x*n,S=x-s,w=nd(g,h),j=Math.exp(-y);return Ef-S/w*j},d=g=>{const y=g*h*n,S=y*s+s,w=Math.pow(h,2)*Math.pow(g,2)*n,j=Math.exp(-y),E=nd(Math.pow(g,2),h);return(-o(g)+Ef>0?-1:1)*((S-w)*j)/E}):(o=g=>{const x=Math.exp(-g*n),y=(g-s)*n+1;return-Ef+x*y},d=g=>{const x=Math.exp(-g*n),y=(s-g)*(n*n);return x*y});const p=5/n,m=oE(o,d,p);if(n=Ut(n),isNaN(m))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:n};{const g=Math.pow(m,2)*r;return{stiffness:g,damping:h*2*Math.sqrt(r*g),duration:n}}}const cE=["duration","bounce"],fE=["stiffness","damping","mass"];function Yv(n,a){return a.some(s=>n[s]!==void 0)}function dE(n){let a={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...n};if(!Yv(n,fE)&&Yv(n,cE))if(a.velocity=0,n.visualDuration){const s=n.visualDuration,r=2*Math.PI/(s*1.2),o=r*r,d=2*pn(.05,1,1-(n.bounce||0))*Math.sqrt(o);a={...a,mass:Ge.mass,stiffness:o,damping:d}}else{const s=uE({...n,velocity:0});a={...a,...s,mass:Ge.mass},a.isResolvedFromDuration=!0}return a}function To(n=Ge.visualDuration,a=Ge.bounce){const s=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:r,restDelta:o}=s;const d=s.keyframes[0],h=s.keyframes[s.keyframes.length-1],p={done:!1,value:d},{stiffness:m,damping:g,mass:x,duration:y,velocity:S,isResolvedFromDuration:w}=dE({...s,velocity:-Pt(s.velocity||0)}),j=S||0,E=g/(2*Math.sqrt(m*x)),C=h-d,z=Pt(Math.sqrt(m/x)),D=Math.abs(C)<5;r||(r=D?Ge.restSpeed.granular:Ge.restSpeed.default),o||(o=D?Ge.restDelta.granular:Ge.restDelta.default);let R,k,U,P,F,W;if(E<1)U=nd(z,E),P=(j+E*z*C)/U,R=B=>{const Z=Math.exp(-E*z*B);return h-Z*(P*Math.sin(U*B)+C*Math.cos(U*B))},F=E*z*P+C*U,W=E*z*C-P*U,k=B=>Math.exp(-E*z*B)*(F*Math.sin(U*B)+W*Math.cos(U*B));else if(E===1){R=Z=>h-Math.exp(-z*Z)*(C+(j+z*C)*Z);const B=j+z*C;k=Z=>Math.exp(-z*Z)*(z*B*Z-j)}else{const B=z*Math.sqrt(E*E-1);R=Se=>{const De=Math.exp(-E*z*Se),$=Math.min(B*Se,300);return h-De*((j+E*z*C)*Math.sinh($)+B*C*Math.cosh($))/B};const Z=(j+E*z*C)/B,ie=E*z*Z-C*B,le=E*z*C-Z*B;k=Se=>{const De=Math.exp(-E*z*Se),$=Math.min(B*Se,300);return De*(ie*Math.sinh($)+le*Math.cosh($))}}const re={calculatedDuration:w&&y||null,velocity:B=>Ut(k(B)),next:B=>{if(!w&&E<1){const ie=Math.exp(-E*z*B),le=Math.sin(U*B),Se=Math.cos(U*B),De=h-ie*(P*le+C*Se),$=Ut(ie*(F*le+W*Se));return p.done=Math.abs($)<=r&&Math.abs(h-De)<=o,p.value=p.done?h:De,p}const Z=R(B);if(w)p.done=B>=y;else{const ie=Ut(k(B));p.done=Math.abs(ie)<=r&&Math.abs(h-Z)<=o}return p.value=p.done?h:Z,p},toString:()=>{const B=Math.min(Gd(re),wo),Z=Ey(ie=>re.next(B*ie).value,B,30);return B+"ms "+Z},toTransition:()=>{}};return re}To.applyToOptions=n=>{const a=lE(n,100,To);return n.ease=a.ease,n.duration=Ut(a.duration),n.type="keyframes",n};const hE=5;function Ny(n,a,s){const r=Math.max(a-hE,0);return sy(s-n(r),a-r)}function ad({keyframes:n,velocity:a=0,power:s=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:d=500,modifyTarget:h,min:p,max:m,restDelta:g=.5,restSpeed:x}){const y=n[0],S={done:!1,value:y},w=W=>p!==void 0&&W<p||m!==void 0&&W>m,j=W=>p===void 0?m:m===void 0||Math.abs(p-W)<Math.abs(m-W)?p:m;let E=s*a;const C=y+E,z=h===void 0?C:h(C);z!==C&&(E=z-y);const D=W=>-E*Math.exp(-W/r),R=W=>z+D(W),k=W=>{const re=D(W),B=R(W);S.done=Math.abs(re)<=g,S.value=S.done?z:B};let U,P;const F=W=>{w(S.value)&&(U=W,P=To({keyframes:[S.value,j(S.value)],velocity:Ny(R,W,S.value),damping:o,stiffness:d,restDelta:g,restSpeed:x}))};return F(0),{calculatedDuration:null,next:W=>{let re=!1;return!P&&U===void 0&&(re=!0,k(W),F(W)),U!==void 0&&W>=U?P.next(W-U):(!re&&k(W),S)}}}function mE(n,a,s){const r=[],o=s||va.mix||jy,d=n.length-1;for(let h=0;h<d;h++){let p=o(n[h],n[h+1]);if(a){const m=Array.isArray(a)?a[h]||Jt:a;p=El(m,p)}r.push(p)}return r}function pE(n,a,{clamp:s=!0,ease:r,mixer:o}={}){const d=n.length;if(Vd(d===a.length),d===1)return()=>a[0];if(d===2&&a[0]===a[1])return()=>a[1];const h=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=mE(a,r,o),m=p.length,g=x=>{if(h&&x<n[0])return a[0];let y=0;if(m>1)for(;y<n.length-2&&!(x<n[y+1]);y++);const S=vl(n[y],n[y+1],x);return p[y](S)};return s?x=>g(pn(n[0],n[d-1],x)):g}function gE(n,a){const s=n[n.length-1];for(let r=1;r<=a;r++){const o=vl(0,a,r);n.push(He(s,1,o))}}function vE(n){const a=[0];return gE(a,n.length-1),a}function xE(n,a){return n.map(s=>s*a)}function yE(n,a){return n.map(()=>a||my).splice(0,n.length-1)}function dl({duration:n=300,keyframes:a,times:s,ease:r="easeInOut"}){const o=Aj(r)?r.map(_v):_v(r),d={done:!1,value:a[0]},h=xE(s&&s.length===a.length?s:vE(a),n),p=pE(h,a,{ease:Array.isArray(o)?o:yE(a,o)});return{calculatedDuration:n,next:m=>(d.value=p(m),d.done=m>=n,d)}}const bE=n=>n!==null;function Bo(n,{repeat:a,repeatType:s="loop"},r,o=1){const d=n.filter(bE),p=o<0||a&&s!=="loop"&&a%2===1?0:d.length-1;return!p||r===void 0?d[p]:r}const SE={decay:ad,inertia:ad,tween:dl,keyframes:dl,spring:To};function Ay(n){typeof n.type=="string"&&(n.type=SE[n.type])}class Xd{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,s){return this.finished.then(a,s)}}const wE=n=>n/100;class jo extends Xd{constructor(a){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,o;const{motionValue:s}=this.options;s&&s.updatedAt!==vt.now()&&this.tick(vt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;Ay(a);const{type:s=dl,repeat:r=0,repeatDelay:o=0,repeatType:d,velocity:h=0}=a;let{keyframes:p}=a;const m=s||dl;m!==dl&&typeof p[0]!="number"&&(this.mixKeyframes=El(wE,jy(p[0],p[1])),p=[0,100]);const g=m({...a,keyframes:p});d==="mirror"&&(this.mirroredGenerator=m({...a,keyframes:[...p].reverse(),velocity:-h})),g.calculatedDuration===null&&(g.calculatedDuration=Gd(g));const{calculatedDuration:x}=g;this.calculatedDuration=x,this.resolvedDuration=x+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=g}updateTime(a){const s=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(a,s=!1){const{generator:r,totalDuration:o,mixKeyframes:d,mirroredGenerator:h,resolvedDuration:p,calculatedDuration:m}=this;if(this.startTime===null)return r.next(0);const{delay:g=0,keyframes:x,repeat:y,repeatType:S,repeatDelay:w,type:j,onUpdate:E,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-o/this.speed,this.startTime)),s?this.currentTime=a:this.updateTime(a);const z=this.currentTime-g*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?z<0:z>o;this.currentTime=Math.max(z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let R=this.currentTime,k=r;if(y){const W=Math.min(this.currentTime,o)/p;let re=Math.floor(W),B=W%1;!B&&W>=1&&(B=1),B===1&&re--,re=Math.min(re,y+1),!!(re%2)&&(S==="reverse"?(B=1-B,w&&(B-=w/p)):S==="mirror"&&(k=h)),R=pn(0,1,B)*p}let U;D?(this.delayState.value=x[0],U=this.delayState):U=k.next(R),d&&!D&&(U.value=d(U.value));let{done:P}=U;!D&&m!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return F&&j!==ad&&(U.value=Bo(x,this.options,C,this.speed)),E&&E(U.value),F&&this.finish(),U}then(a,s){return this.finished.then(a,s)}get duration(){return Pt(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(this.currentTime)}set time(a){a=Ut(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=a,this.tick(a))}getGeneratorVelocity(){const a=this.currentTime;if(a<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(a);const s=this.generator.next(a).value;return Ny(r=>this.generator.next(r).value,a,s)}get speed(){return this.playbackSpeed}set speed(a){const s=this.playbackSpeed!==a;s&&this.driver&&this.updateTime(vt.now()),this.playbackSpeed=a,s&&this.driver&&(this.time=Pt(this.currentTime))}play(){var o,d;if(this.isStopped)return;const{driver:a=sE,startTime:s}=this.options;this.driver||(this.driver=a(h=>this.tick(h))),(d=(o=this.options).onPlay)==null||d.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var a,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(a=this.options).onComplete)==null||s.call(a)}cancel(){var a,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(a=this.options).onCancel)==null||s.call(a)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),a.observe(this)}}function TE(n){for(let a=1;a<n.length;a++)n[a]??(n[a]=n[a-1])}const Qa=n=>n*180/Math.PI,id=n=>{const a=Qa(Math.atan2(n[1],n[0]));return sd(a)},jE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:id,rotateZ:id,skewX:n=>Qa(Math.atan(n[1])),skewY:n=>Qa(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},sd=n=>(n=n%360,n<0&&(n+=360),n),Gv=id,Xv=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),Kv=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),EE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xv,scaleY:Kv,scale:n=>(Xv(n)+Kv(n))/2,rotateX:n=>sd(Qa(Math.atan2(n[6],n[5]))),rotateY:n=>sd(Qa(Math.atan2(-n[2],n[0]))),rotateZ:Gv,rotate:Gv,skewX:n=>Qa(Math.atan(n[4])),skewY:n=>Qa(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function ld(n){return n.includes("scale")?1:0}function rd(n,a){if(!n||n==="none")return ld(a);const s=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(s)r=EE,o=s;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=jE,o=p}if(!o)return ld(a);const d=r[a],h=o[1].split(",").map(AE);return typeof d=="function"?d(h):h[d]}const NE=(n,a)=>{const{transform:s="none"}=getComputedStyle(n);return rd(s,a)};function AE(n){return parseFloat(n.trim())}const es=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ts=new Set(es),Fv=n=>n===Ii||n===te,CE=new Set(["x","y","z"]),ME=es.filter(n=>!CE.has(n));function DE(n){const a=[];return ME.forEach(s=>{const r=n.getValue(s);r!==void 0&&(a.push([s,r.get()]),r.set(s.startsWith("scale")?1:0))}),a}const pa={width:({x:n},{paddingLeft:a="0",paddingRight:s="0",boxSizing:r})=>{const o=n.max-n.min;return r==="border-box"?o:o-parseFloat(a)-parseFloat(s)},height:({y:n},{paddingTop:a="0",paddingBottom:s="0",boxSizing:r})=>{const o=n.max-n.min;return r==="border-box"?o:o-parseFloat(a)-parseFloat(s)},top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:(n,{transform:a})=>rd(a,"x"),y:(n,{transform:a})=>rd(a,"y")};pa.translateX=pa.x;pa.translateY=pa.y;const Pa=new Set;let od=!1,ud=!1,cd=!1;function Cy(){if(ud){const n=Array.from(Pa).filter(r=>r.needsMeasurement),a=new Set(n.map(r=>r.element)),s=new Map;a.forEach(r=>{const o=DE(r);o.length&&(s.set(r,o),r.render())}),n.forEach(r=>r.measureInitialState()),a.forEach(r=>{r.render();const o=s.get(r);o&&o.forEach(([d,h])=>{var p;(p=r.getValue(d))==null||p.set(h)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ud=!1,od=!1,Pa.forEach(n=>n.complete(cd)),Pa.clear()}function My(){Pa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(ud=!0)})}function OE(){cd=!0,My(),Cy(),cd=!1}class Kd{constructor(a,s,r,o,d,h=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=s,this.name=r,this.motionValue=o,this.element=d,this.isAsync=h}scheduleResolve(){this.state="scheduled",this.isAsync?(Pa.add(this),od||(od=!0,ke.read(My),ke.resolveKeyframes(Cy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:s,element:r,motionValue:o}=this;if(a[0]===null){const d=o==null?void 0:o.get(),h=a[a.length-1];if(d!==void 0)a[0]=d;else if(r&&s){const p=r.readValue(s,h);p!=null&&(a[0]=p)}a[0]===void 0&&(a[0]=h),o&&d===void 0&&o.set(a[0])}TE(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Pa.delete(this)}cancel(){this.state==="scheduled"&&(Pa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const RE=n=>n.startsWith("--");function Dy(n,a,s){RE(a)?n.style.setProperty(a,s):n.style[a]=s}const zE={};function Oy(n,a){const s=iy(n);return()=>zE[a]??s()}const kE=Oy(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ry=Oy(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),il=([n,a,s,r])=>`cubic-bezier(${n}, ${a}, ${s}, ${r})`,Zv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:il([0,.65,.55,1]),circOut:il([.55,0,1,.45]),backIn:il([.31,.01,.66,-.59]),backOut:il([.33,1.53,.69,.99])};function zy(n,a){if(n)return typeof n=="function"?Ry()?Ey(n,a):"ease-out":py(n)?il(n):Array.isArray(n)?n.map(s=>zy(s,a)||Zv.easeOut):Zv[n]}function LE(n,a,s,{delay:r=0,duration:o=300,repeat:d=0,repeatType:h="loop",ease:p="easeOut",times:m}={},g=void 0){const x={[a]:s};m&&(x.offset=m);const y=zy(p,o);Array.isArray(y)&&(x.easing=y);const S={delay:r,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:d+1,direction:h==="reverse"?"alternate":"normal"};return g&&(S.pseudoElement=g),n.animate(x,S)}function ky(n){return typeof n=="function"&&"applyToOptions"in n}function VE({type:n,...a}){return ky(n)&&Ry()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class Ly extends Xd{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:s,name:r,keyframes:o,pseudoElement:d,allowFlatten:h=!1,finalKeyframe:p,onComplete:m}=a;this.isPseudoElement=!!d,this.allowFlatten=h,this.options=a,Vd(typeof a.type!="string");const g=VE(a);this.animation=LE(s,r,o,g,d),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const x=Bo(o,this.options,p,this.speed);this.updateMotionValue&&this.updateMotionValue(x),Dy(s,r,x),this.animation.cancel()}m==null||m(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var a,s;(s=(a=this.animation).finish)==null||s.call(a)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var s,r,o;const a=(s=this.options)==null?void 0:s.element;!this.isPseudoElement&&(a!=null&&a.isConnected)&&((o=(r=this.animation).commitStyles)==null||o.call(r))}get duration(){var s,r;const a=((r=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:r.call(s).duration)||0;return Pt(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(Number(this.animation.currentTime)||0)}set time(a){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ut(a),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,rangeStart:s,rangeEnd:r,observe:o}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&kE()?(this.animation.timeline=a,s&&(this.animation.rangeStart=s),r&&(this.animation.rangeEnd=r),Jt):o(this)}}const Vy={anticipate:fy,backInOut:cy,circInOut:hy};function _E(n){return n in Vy}function UE(n){typeof n.ease=="string"&&_E(n.ease)&&(n.ease=Vy[n.ease])}const Nf=10;class BE extends Ly{constructor(a){UE(a),Ay(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:s,onUpdate:r,onComplete:o,element:d,...h}=this.options;if(!s)return;if(a!==void 0){s.set(a);return}const p=new jo({...h,autoplay:!1}),m=Math.max(Nf,vt.now()-this.startTime),g=pn(0,Nf,m-Nf),x=p.sample(m).value,{name:y}=this.options;d&&y&&Dy(d,y,x),s.setWithVelocity(p.sample(Math.max(0,m-g)).value,x,g),p.stop()}}const Qv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(sn.test(n)||n==="0")&&!n.startsWith("url("));function HE(n){const a=n[0];if(n.length===1)return!0;for(let s=0;s<n.length;s++)if(n[s]!==a)return!0}function $E(n,a,s,r){const o=n[0];if(o===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],h=Qv(o,a),p=Qv(d,a);return!h||!p?!1:HE(n)||(s==="spring"||ky(s))&&r}function fd(n){n.duration=0,n.type="keyframes"}const _y=new Set(["opacity","clipPath","filter","transform"]),qE=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function YE(n){for(let a=0;a<n.length;a++)if(typeof n[a]=="string"&&qE.test(n[a]))return!0;return!1}const GE=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),XE=iy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function KE(n){var y;const{motionValue:a,name:s,repeatDelay:r,repeatType:o,damping:d,type:h,keyframes:p}=n;if(!(((y=a==null?void 0:a.owner)==null?void 0:y.current)instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:x}=a.owner.getProps();return XE()&&s&&(_y.has(s)||GE.has(s)&&YE(p))&&(s!=="transform"||!x)&&!g&&!r&&o!=="mirror"&&d!==0&&h!=="inertia"}const FE=40;class ZE extends Xd{constructor({autoplay:a=!0,delay:s=0,type:r="keyframes",repeat:o=0,repeatDelay:d=0,repeatType:h="loop",keyframes:p,name:m,motionValue:g,element:x,...y}){var j;super(),this.stop=()=>{var E,C;this._animation&&(this._animation.stop(),(E=this.stopTimeline)==null||E.call(this)),(C=this.keyframeResolver)==null||C.cancel()},this.createdAt=vt.now();const S={autoplay:a,delay:s,type:r,repeat:o,repeatDelay:d,repeatType:h,name:m,motionValue:g,element:x,...y},w=(x==null?void 0:x.KeyframeResolver)||Kd;this.keyframeResolver=new w(p,(E,C,z)=>this.onKeyframesResolved(E,C,S,!z),m,g,x),(j=this.keyframeResolver)==null||j.scheduleResolve()}onKeyframesResolved(a,s,r,o){var z,D;this.keyframeResolver=void 0;const{name:d,type:h,velocity:p,delay:m,isHandoff:g,onUpdate:x}=r;this.resolvedAt=vt.now();let y=!0;$E(a,d,h,p)||(y=!1,(va.instantAnimations||!m)&&(x==null||x(Bo(a,r,s))),a[0]=a[a.length-1],fd(r),r.repeat=0);const w={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>FE?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...r,keyframes:a},j=y&&!g&&KE(w),E=(D=(z=w.motionValue)==null?void 0:z.owner)==null?void 0:D.current;let C;if(j)try{C=new BE({...w,element:E})}catch{C=new jo(w)}else C=new jo(w);C.finished.then(()=>{this.notifyFinished()}).catch(Jt),this.pendingTimeline&&(this.stopTimeline=C.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=C}get finished(){return this._animation?this.animation.finished:this._finished}then(a,s){return this.finished.finally(a).then(()=>{})}get animation(){var a;return this._animation||((a=this.keyframeResolver)==null||a.resume(),OE()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var a;this._animation&&this.animation.cancel(),(a=this.keyframeResolver)==null||a.cancel()}}function Uy(n,a,s,r=0,o=1){const d=Array.from(n).sort((g,x)=>g.sortNodePosition(x)).indexOf(a),h=n.size,p=(h-1)*r;return typeof s=="function"?s(d,h):o===1?d*r:p-d*r}const QE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function PE(n){const a=QE.exec(n);if(!a)return[,];const[,s,r,o]=a;return[`--${s??r}`,o]}function By(n,a,s=1){const[r,o]=PE(n);if(!r)return;const d=window.getComputedStyle(a).getPropertyValue(r);if(d){const h=d.trim();return ty(h)?parseFloat(h):h}return Hd(o)?By(o,a,s+1):o}const JE={type:"spring",stiffness:500,damping:25,restSpeed:10},WE=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),IE={type:"keyframes",duration:.8},e5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},t5=(n,{keyframes:a})=>a.length>2?IE:ts.has(n)?n.startsWith("scale")?WE(a[1]):JE:e5;function Hy(n,a){if(n!=null&&n.inherit&&a){const{inherit:s,...r}=n;return{...a,...r}}return n}function Fd(n,a){const s=(n==null?void 0:n[a])??(n==null?void 0:n.default)??n;return s!==n?Hy(s,n):s}const n5=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function a5(n){for(const a in n)if(!n5.has(a))return!0;return!1}const Zd=(n,a,s,r={},o,d)=>h=>{const p=Fd(r,n)||{},m=p.delay||r.delay||0;let{elapsed:g=0}=r;g=g-Ut(m);const x={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:S=>{a.set(S),p.onUpdate&&p.onUpdate(S)},onComplete:()=>{h(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:d?void 0:o};a5(p)||Object.assign(x,t5(n,x)),x.duration&&(x.duration=Ut(x.duration)),x.repeatDelay&&(x.repeatDelay=Ut(x.repeatDelay)),x.from!==void 0&&(x.keyframes[0]=x.from);let y=!1;if((x.type===!1||x.duration===0&&!x.repeatDelay)&&(fd(x),x.delay===0&&(y=!0)),(va.instantAnimations||va.skipAnimations||o!=null&&o.shouldSkipAnimations)&&(y=!0,fd(x),x.delay=0),x.allowFlatten=!p.type&&!p.ease,y&&!d&&a.get()!==void 0){const S=Bo(x.keyframes,p);if(S!==void 0){ke.update(()=>{x.onUpdate(S),x.onComplete()});return}}return p.isSync?new jo(x):new ZE(x)};function Pv(n){const a=[{},{}];return n==null||n.values.forEach((s,r)=>{a[0][r]=s.get(),a[1][r]=s.getVelocity()}),a}function Qd(n,a,s,r){if(typeof a=="function"){const[o,d]=Pv(r);a=a(s!==void 0?s:n.custom,o,d)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[o,d]=Pv(r);a=a(s!==void 0?s:n.custom,o,d)}return a}function Ja(n,a,s){const r=n.getProps();return Qd(r,a,s!==void 0?s:r.custom,n)}const $y=new Set(["width","height","top","left","right","bottom",...es]),Jv=30,i5=n=>!isNaN(parseFloat(n));class s5{constructor(a,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var d;const o=vt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((d=this.events.change)==null||d.notify(this.current),this.dependents))for(const h of this.dependents)h.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=s.owner}setCurrent(a){this.current=a,this.updatedAt=vt.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=i5(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,s){this.events[a]||(this.events[a]=new _d);const r=this.events[a].add(s);return a==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,s){this.passiveEffect=a,this.stopPassiveEffect=s}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,s,r){this.set(s),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-r}jump(a,s=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var a;(a=this.events.change)==null||a.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=vt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Jv)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Jv);return sy(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(a){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=a(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var a,s;(a=this.dependents)==null||a.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qi(n,a){return new s5(n,a)}const dd=n=>Array.isArray(n);function l5(n,a,s){n.hasValue(a)?n.getValue(a).set(s):n.addValue(a,Qi(s))}function r5(n){return dd(n)?n[n.length-1]||0:n}function o5(n,a){const s=Ja(n,a);let{transitionEnd:r={},transition:o={},...d}=s||{};d={...d,...r};for(const h in d){const p=r5(d[h]);l5(n,h,p)}}const ft=n=>!!(n&&n.getVelocity);function u5(n){return!!(ft(n)&&n.add)}function hd(n,a){const s=n.getValue("willChange");if(u5(s))return s.add(a);if(!s&&va.WillChange){const r=new va.WillChange("auto");n.addValue("willChange",r),r.add(a)}}function Pd(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const c5="framerAppearId",qy="data-"+Pd(c5);function Yy(n){return n.props[qy]}function f5({protectedKeys:n,needsAnimating:a},s){const r=n.hasOwnProperty(s)&&a[s]!==!0;return a[s]=!1,r}function Gy(n,a,{delay:s=0,transitionOverride:r,type:o}={}){let{transition:d,transitionEnd:h,...p}=a;const m=n.getDefaultTransition();d=d?Hy(d,m):m;const g=d==null?void 0:d.reduceMotion;r&&(d=r);const x=[],y=o&&n.animationState&&n.animationState.getState()[o];for(const S in p){const w=n.getValue(S,n.latestValues[S]??null),j=p[S];if(j===void 0||y&&f5(y,S))continue;const E={delay:s,...Fd(d||{},S)},C=w.get();if(C!==void 0&&!w.isAnimating()&&!Array.isArray(j)&&j===C&&!E.velocity){ke.update(()=>w.set(j));continue}let z=!1;if(window.MotionHandoffAnimation){const k=Yy(n);if(k){const U=window.MotionHandoffAnimation(k,S,ke);U!==null&&(E.startTime=U,z=!0)}}hd(n,S);const D=g??n.shouldReduceMotion;w.start(Zd(S,w,j,D&&$y.has(S)?{type:!1}:E,n,z));const R=w.animation;R&&x.push(R)}if(h){const S=()=>ke.update(()=>{h&&o5(n,h)});x.length?Promise.all(x).then(S):S()}return x}function md(n,a,s={}){var m;const r=Ja(n,a,s.type==="exit"?(m=n.presenceContext)==null?void 0:m.custom:void 0);let{transition:o=n.getDefaultTransition()||{}}=r||{};s.transitionOverride&&(o=s.transitionOverride);const d=r?()=>Promise.all(Gy(n,r,s)):()=>Promise.resolve(),h=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:x=0,staggerChildren:y,staggerDirection:S}=o;return d5(n,a,g,x,y,S,s)}:()=>Promise.resolve(),{when:p}=o;if(p){const[g,x]=p==="beforeChildren"?[d,h]:[h,d];return g().then(()=>x())}else return Promise.all([d(),h(s.delay)])}function d5(n,a,s=0,r=0,o=0,d=1,h){const p=[];for(const m of n.variantChildren)m.notify("AnimationStart",a),p.push(md(m,a,{...h,delay:s+(typeof r=="function"?0:r)+Uy(n.variantChildren,m,r,o,d)}).then(()=>m.notify("AnimationComplete",a)));return Promise.all(p)}function h5(n,a,s={}){n.notify("AnimationStart",a);let r;if(Array.isArray(a)){const o=a.map(d=>md(n,d,s));r=Promise.all(o)}else if(typeof a=="string")r=md(n,a,s);else{const o=typeof a=="function"?Ja(n,a,s.custom):a;r=Promise.all(Gy(n,o,s))}return r.then(()=>{n.notify("AnimationComplete",a)})}const m5={test:n=>n==="auto",parse:n=>n},Xy=n=>a=>a.test(n),Ky=[Ii,te,mn,ca,Hj,Bj,m5],Wv=n=>Ky.find(Xy(n));function p5(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||ay(n):!0}const g5=new Set(["brightness","contrast","saturate","opacity"]);function v5(n){const[a,s]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[r]=s.match($d)||[];if(!r)return n;const o=s.replace(r,"");let d=g5.has(a)?1:0;return r!==s&&(d*=100),a+"("+d+o+")"}const x5=/\b([a-z-]*)\(.*?\)/gu,pd={...sn,getAnimatableNone:n=>{const a=n.match(x5);return a?a.map(v5).join(" "):n}},gd={...sn,getAnimatableNone:n=>{const a=sn.parse(n);return sn.createTransformer(n)(a.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Iv={...Ii,transform:Math.round},y5={rotate:ca,rotateX:ca,rotateY:ca,rotateZ:ca,scale:Ir,scaleX:Ir,scaleY:Ir,scaleZ:Ir,skew:ca,skewX:ca,skewY:ca,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:xl,originX:Bv,originY:Bv,originZ:te},Jd={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,top:te,right:te,bottom:te,left:te,inset:te,insetBlock:te,insetBlockStart:te,insetBlockEnd:te,insetInline:te,insetInlineStart:te,insetInlineEnd:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,paddingBlock:te,paddingBlockStart:te,paddingBlockEnd:te,paddingInline:te,paddingInlineStart:te,paddingInlineEnd:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,marginBlock:te,marginBlockStart:te,marginBlockEnd:te,marginInline:te,marginInlineStart:te,marginInlineEnd:te,fontSize:te,backgroundPositionX:te,backgroundPositionY:te,...y5,zIndex:Iv,fillOpacity:xl,strokeOpacity:xl,numOctaves:Iv},b5={...Jd,color:Ie,backgroundColor:Ie,outlineColor:Ie,fill:Ie,stroke:Ie,borderColor:Ie,borderTopColor:Ie,borderRightColor:Ie,borderBottomColor:Ie,borderLeftColor:Ie,filter:pd,WebkitFilter:pd,mask:gd,WebkitMask:gd},Fy=n=>b5[n],S5=new Set([pd,gd]);function Zy(n,a){let s=Fy(n);return S5.has(s)||(s=sn),s.getAnimatableNone?s.getAnimatableNone(a):void 0}const w5=new Set(["auto","none","0"]);function T5(n,a,s){let r=0,o;for(;r<n.length&&!o;){const d=n[r];typeof d=="string"&&!w5.has(d)&&Zi(d).values.length&&(o=n[r]),r++}if(o&&s)for(const d of a)n[d]=Zy(s,o)}class j5 extends Kd{constructor(a,s,r,o,d){super(a,s,r,o,d,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:s,name:r}=this;if(!s||!s.current)return;super.readKeyframes();for(let x=0;x<a.length;x++){let y=a[x];if(typeof y=="string"&&(y=y.trim(),Hd(y))){const S=By(y,s.current);S!==void 0&&(a[x]=S),x===a.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!$y.has(r)||a.length!==2)return;const[o,d]=a,h=Wv(o),p=Wv(d),m=Uv(o),g=Uv(d);if(m!==g&&pa[r]){this.needsMeasurement=!0;return}if(h!==p)if(Fv(h)&&Fv(p))for(let x=0;x<a.length;x++){const y=a[x];typeof y=="string"&&(a[x]=parseFloat(y))}else pa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:s}=this,r=[];for(let o=0;o<a.length;o++)(a[o]===null||p5(a[o]))&&r.push(o);r.length&&T5(a,r,s)}measureInitialState(){const{element:a,unresolvedKeyframes:s,name:r}=this;if(!a||!a.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pa[r](a.measureViewportBox(),window.getComputedStyle(a.current)),s[0]=this.measuredOrigin;const o=s[s.length-1];o!==void 0&&a.getValue(r,o).jump(o,!1)}measureEndState(){var p;const{element:a,name:s,unresolvedKeyframes:r}=this;if(!a||!a.current)return;const o=a.getValue(s);o&&o.jump(this.measuredOrigin,!1);const d=r.length-1,h=r[d];r[d]=pa[s](a.measureViewportBox(),window.getComputedStyle(a.current)),h!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=h),(p=this.removedTransforms)!=null&&p.length&&this.removedTransforms.forEach(([m,g])=>{a.getValue(m).set(g)}),this.resolveNoneKeyframes()}}function Qy(n,a,s){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let r=document;const o=(s==null?void 0:s[n])??r.querySelectorAll(n);return o?Array.from(o):[]}return Array.from(n).filter(r=>r!=null)}const Py=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function E5(n){return ny(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:Wd}=gy(queueMicrotask,!1),nn={x:!1,y:!1};function Jy(){return nn.x||nn.y}function N5(n){return n==="x"||n==="y"?nn[n]?null:(nn[n]=!0,()=>{nn[n]=!1}):nn.x||nn.y?null:(nn.x=nn.y=!0,()=>{nn.x=nn.y=!1})}function Wy(n,a){const s=Qy(n),r=new AbortController,o={passive:!0,...a,signal:r.signal};return[s,o,()=>r.abort()]}function A5(n){return!(n.pointerType==="touch"||Jy())}function C5(n,a,s={}){const[r,o,d]=Wy(n,s);return r.forEach(h=>{let p=!1,m=!1,g;const x=()=>{h.removeEventListener("pointerleave",j)},y=C=>{g&&(g(C),g=void 0),x()},S=C=>{p=!1,window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),m&&(m=!1,y(C))},w=()=>{p=!0,window.addEventListener("pointerup",S,o),window.addEventListener("pointercancel",S,o)},j=C=>{if(C.pointerType!=="touch"){if(p){m=!0;return}y(C)}},E=C=>{if(!A5(C))return;m=!1;const z=a(h,C);typeof z=="function"&&(g=z,h.addEventListener("pointerleave",j,o))};h.addEventListener("pointerenter",E,o),h.addEventListener("pointerdown",w,o)}),d}const Iy=(n,a)=>a?n===a?!0:Iy(n,a.parentElement):!1,Id=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,M5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function D5(n){return M5.has(n.tagName)||n.isContentEditable===!0}const O5=new Set(["INPUT","SELECT","TEXTAREA"]);function R5(n){return O5.has(n.tagName)||n.isContentEditable===!0}const ro=new WeakSet;function e0(n){return a=>{a.key==="Enter"&&n(a)}}function Af(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const z5=(n,a)=>{const s=n.currentTarget;if(!s)return;const r=e0(()=>{if(ro.has(s))return;Af(s,"down");const o=e0(()=>{Af(s,"up")}),d=()=>Af(s,"cancel");s.addEventListener("keyup",o,a),s.addEventListener("blur",d,a)});s.addEventListener("keydown",r,a),s.addEventListener("blur",()=>s.removeEventListener("keydown",r),a)};function t0(n){return Id(n)&&!Jy()}const n0=new WeakSet;function k5(n,a,s={}){const[r,o,d]=Wy(n,s),h=p=>{const m=p.currentTarget;if(!t0(p)||n0.has(p))return;ro.add(m),s.stopPropagation&&n0.add(p);const g=a(m,p),x=(w,j)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",S),ro.has(m)&&ro.delete(m),t0(w)&&typeof g=="function"&&g(w,{success:j})},y=w=>{x(w,m===window||m===document||s.useGlobalTarget||Iy(m,w.target))},S=w=>{x(w,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",S,o)};return r.forEach(p=>{(s.useGlobalTarget?window:p).addEventListener("pointerdown",h,o),E5(p)&&(p.addEventListener("focus",g=>z5(g,o)),!D5(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),d}function eh(n){return ny(n)&&"ownerSVGElement"in n}const oo=new WeakMap;let fa;const eb=(n,a,s)=>(r,o)=>o&&o[0]?o[0][n+"Size"]:eh(r)&&"getBBox"in r?r.getBBox()[a]:r[s],L5=eb("inline","width","offsetWidth"),V5=eb("block","height","offsetHeight");function _5({target:n,borderBoxSize:a}){var s;(s=oo.get(n))==null||s.forEach(r=>{r(n,{get width(){return L5(n,a)},get height(){return V5(n,a)}})})}function U5(n){n.forEach(_5)}function B5(){typeof ResizeObserver>"u"||(fa=new ResizeObserver(U5))}function H5(n,a){fa||B5();const s=Qy(n);return s.forEach(r=>{let o=oo.get(r);o||(o=new Set,oo.set(r,o)),o.add(a),fa==null||fa.observe(r)}),()=>{s.forEach(r=>{const o=oo.get(r);o==null||o.delete(a),o!=null&&o.size||fa==null||fa.unobserve(r)})}}const uo=new Set;let Yi;function $5(){Yi=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};uo.forEach(a=>a(n))},window.addEventListener("resize",Yi)}function q5(n){return uo.add(n),Yi||$5(),()=>{uo.delete(n),!uo.size&&typeof Yi=="function"&&(window.removeEventListener("resize",Yi),Yi=void 0)}}function a0(n,a){return typeof n=="function"?q5(n):H5(n,a)}function Y5(n){return eh(n)&&n.tagName==="svg"}const G5=[...Ky,Ie,sn],X5=n=>G5.find(Xy(n)),i0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gi=()=>({x:i0(),y:i0()}),s0=()=>({min:0,max:0}),nt=()=>({x:s0(),y:s0()}),K5=new WeakMap;function Ho(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function yl(n){return typeof n=="string"||Array.isArray(n)}const th=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nh=["initial",...th];function $o(n){return Ho(n.animate)||nh.some(a=>yl(n[a]))}function tb(n){return!!($o(n)||n.variants)}function F5(n,a,s){for(const r in a){const o=a[r],d=s[r];if(ft(o))n.addValue(r,o);else if(ft(d))n.addValue(r,Qi(o,{owner:n}));else if(d!==o)if(n.hasValue(r)){const h=n.getValue(r);h.liveStyle===!0?h.jump(o):h.hasAnimated||h.set(o)}else{const h=n.getStaticValue(r);n.addValue(r,Qi(h!==void 0?h:o,{owner:n}))}}for(const r in s)a[r]===void 0&&n.removeValue(r);return a}const vd={current:null},nb={current:!1},Z5=typeof window<"u";function Q5(){if(nb.current=!0,!!Z5)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>vd.current=n.matches;n.addEventListener("change",a),a()}else vd.current=!1}const l0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Eo={};function ab(n){Eo=n}function P5(){return Eo}class J5{scrapeMotionValuesFromProps(a,s,r){return{}}constructor({parent:a,props:s,presenceContext:r,reducedMotionConfig:o,skipAnimations:d,blockInitialAnimation:h,visualState:p},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=vt.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,ke.render(this.render,!1,!0))};const{latestValues:g,renderState:x}=p;this.latestValues=g,this.baseTarget={...g},this.initialValues=s.initial?{...g}:{},this.renderState=x,this.parent=a,this.props=s,this.presenceContext=r,this.depth=a?a.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=d,this.options=m,this.blockInitialAnimation=!!h,this.isControllingVariants=$o(s),this.isVariantNode=tb(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:y,...S}=this.scrapeMotionValuesFromProps(s,{},this);for(const w in S){const j=S[w];g[w]!==void 0&&ft(j)&&j.set(g[w])}}mount(a){var s,r;if(this.hasBeenMounted)for(const o in this.initialValues)(s=this.values.get(o))==null||s.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];this.current=a,K5.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,d)=>this.bindToMotionValue(d,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(nb.current||Q5(),this.shouldReduceMotion=vd.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var a;this.projection&&this.projection.unmount(),xa(this.notifyUpdate),xa(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(a=this.parent)==null||a.removeChild(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const r=this.features[s];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,s){if(this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)(),s.accelerate&&_y.has(a)&&this.current instanceof HTMLElement){const{factory:h,keyframes:p,times:m,ease:g,duration:x}=s.accelerate,y=new Ly({element:this.current,name:a,keyframes:p,times:m,ease:g,duration:Ut(x)}),S=h(y);this.valueSubscriptions.set(a,()=>{S(),y.cancel()});return}const r=ts.has(a);r&&this.onBindTransform&&this.onBindTransform();const o=s.on("change",h=>{this.latestValues[a]=h,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,s)),this.valueSubscriptions.set(a,()=>{o(),d&&d(),s.owner&&s.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Eo){const s=Eo[a];if(!s)continue;const{isEnabled:r,Feature:o}=s;if(!this.features[a]&&o&&r(this.props)&&(this.features[a]=new o(this)),this.features[a]){const d=this.features[a];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,s){this.latestValues[a]=s}update(a,s){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let r=0;r<l0.length;r++){const o=l0[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const d="on"+o,h=a[d];h&&(this.propEventSubscriptions[o]=this.on(o,h))}this.prevMotionValues=F5(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(a),()=>s.variantChildren.delete(a)}addValue(a,s){const r=this.values.get(a);s!==r&&(r&&this.removeValue(a),this.bindToMotionValue(a,s),this.values.set(a,s),this.latestValues[a]=s.get())}removeValue(a){this.values.delete(a);const s=this.valueSubscriptions.get(a);s&&(s(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,s){if(this.props.values&&this.props.values[a])return this.props.values[a];let r=this.values.get(a);return r===void 0&&s!==void 0&&(r=Qi(s===null?void 0:s,{owner:this}),this.addValue(a,r)),r}readValue(a,s){let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(ty(r)||ay(r))?r=parseFloat(r):!X5(r)&&sn.test(s)&&(r=Zy(a,s)),this.setBaseTarget(a,ft(r)?r.get():r)),ft(r)?r.get():r}setBaseTarget(a,s){this.baseTarget[a]=s}getBaseTarget(a){var d;const{initial:s}=this.props;let r;if(typeof s=="string"||typeof s=="object"){const h=Qd(this.props,s,(d=this.presenceContext)==null?void 0:d.custom);h&&(r=h[a])}if(s&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,a);return o!==void 0&&!ft(o)?o:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,s){return this.events[a]||(this.events[a]=new _d),this.events[a].add(s)}notify(a,...s){this.events[a]&&this.events[a].notify(...s)}scheduleRenderMicrotask(){Wd.render(this.render)}}class ib extends J5{constructor(){super(...arguments),this.KeyframeResolver=j5}sortInstanceNodePosition(a,s){return a.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(a,s){const r=a.style;return r?r[s]:void 0}removeValueFromRenderState(a,{vars:s,style:r}){delete s[a],delete r[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;ft(a)&&(this.childSubscription=a.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Sa{constructor(a){this.isMounted=!1,this.node=a}update(){}}function sb({top:n,left:a,right:s,bottom:r}){return{x:{min:a,max:s},y:{min:n,max:r}}}function W5({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function I5(n,a){if(!a)return n;const s=a({x:n.left,y:n.top}),r=a({x:n.right,y:n.bottom});return{top:s.y,left:s.x,bottom:r.y,right:r.x}}function Cf(n){return n===void 0||n===1}function xd({scale:n,scaleX:a,scaleY:s}){return!Cf(n)||!Cf(a)||!Cf(s)}function Ya(n){return xd(n)||lb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function lb(n){return r0(n.x)||r0(n.y)}function r0(n){return n&&n!=="0%"}function No(n,a,s){const r=n-s,o=a*r;return s+o}function o0(n,a,s,r,o){return o!==void 0&&(n=No(n,o,r)),No(n,s,r)+a}function yd(n,a=0,s=1,r,o){n.min=o0(n.min,a,s,r,o),n.max=o0(n.max,a,s,r,o)}function rb(n,{x:a,y:s}){yd(n.x,a.translate,a.scale,a.originPoint),yd(n.y,s.translate,s.scale,s.originPoint)}const u0=.999999999999,c0=1.0000000000001;function eN(n,a,s,r=!1){var p;const o=s.length;if(!o)return;a.x=a.y=1;let d,h;for(let m=0;m<o;m++){d=s[m],h=d.projectionDelta;const{visualElement:g}=d.options;g&&g.props.style&&g.props.style.display==="contents"||(r&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(dn(n.x,-d.scroll.offset.x),dn(n.y,-d.scroll.offset.y)),h&&(a.x*=h.x.scale,a.y*=h.y.scale,rb(n,h)),r&&Ya(d.latestValues)&&co(n,d.latestValues,(p=d.layout)==null?void 0:p.layoutBox))}a.x<c0&&a.x>u0&&(a.x=1),a.y<c0&&a.y>u0&&(a.y=1)}function dn(n,a){n.min+=a,n.max+=a}function f0(n,a,s,r,o=.5){const d=He(n.min,n.max,o);yd(n,a,s,d,r)}function d0(n,a){return typeof n=="string"?parseFloat(n)/100*(a.max-a.min):n}function co(n,a,s){const r=s??n;f0(n.x,d0(a.x,r.x),a.scaleX,a.scale,a.originX),f0(n.y,d0(a.y,r.y),a.scaleY,a.scale,a.originY)}function ob(n,a){return sb(I5(n.getBoundingClientRect(),a))}function tN(n,a,s){const r=ob(n,s),{scroll:o}=a;return o&&(dn(r.x,o.offset.x),dn(r.y,o.offset.y)),r}const nN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aN=es.length;function iN(n,a,s){let r="",o=!0;for(let d=0;d<aN;d++){const h=es[d],p=n[h];if(p===void 0)continue;let m=!0;if(typeof p=="number")m=p===(h.startsWith("scale")?1:0);else{const g=parseFloat(p);m=h.startsWith("scale")?g===1:g===0}if(!m||s){const g=Py(p,Jd[h]);if(!m){o=!1;const x=nN[h]||h;r+=`${x}(${g}) `}s&&(a[h]=g)}}return r=r.trim(),s?r=s(a,o?"":r):o&&(r="none"),r}function ah(n,a,s){const{style:r,vars:o,transformOrigin:d}=n;let h=!1,p=!1;for(const m in a){const g=a[m];if(ts.has(m)){h=!0;continue}else if(xy(m)){o[m]=g;continue}else{const x=Py(g,Jd[m]);m.startsWith("origin")?(p=!0,d[m]=x):r[m]=x}}if(a.transform||(h||s?r.transform=iN(a,n.transform,s):r.transform&&(r.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:x=0}=d;r.transformOrigin=`${m} ${g} ${x}`}}function ub(n,{style:a,vars:s},r,o){const d=n.style;let h;for(h in a)d[h]=a[h];o==null||o.applyProjectionStyles(d,r);for(h in s)d.setProperty(h,s[h])}function h0(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Js={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(te.test(n))n=parseFloat(n);else return n;const s=h0(n,a.target.x),r=h0(n,a.target.y);return`${s}% ${r}%`}},sN={correct:(n,{treeScale:a,projectionDelta:s})=>{const r=n,o=sn.parse(n);if(o.length>5)return r;const d=sn.createTransformer(n),h=typeof o[0]!="number"?1:0,p=s.x.scale*a.x,m=s.y.scale*a.y;o[0+h]/=p,o[1+h]/=m;const g=He(p,m,.5);return typeof o[2+h]=="number"&&(o[2+h]/=g),typeof o[3+h]=="number"&&(o[3+h]/=g),d(o)}},bd={borderRadius:{...Js,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Js,borderTopRightRadius:Js,borderBottomLeftRadius:Js,borderBottomRightRadius:Js,boxShadow:sN};function cb(n,{layout:a,layoutId:s}){return ts.has(n)||n.startsWith("origin")||(a||s!==void 0)&&(!!bd[n]||n==="opacity")}function ih(n,a,s){var h;const r=n.style,o=a==null?void 0:a.style,d={};if(!r)return d;for(const p in r)(ft(r[p])||o&&ft(o[p])||cb(p,n)||((h=s==null?void 0:s.getValue(p))==null?void 0:h.liveStyle)!==void 0)&&(d[p]=r[p]);return d}function lN(n){return window.getComputedStyle(n)}class rN extends ib{constructor(){super(...arguments),this.type="html",this.renderInstance=ub}readValueFromInstance(a,s){var r;if(ts.has(s))return(r=this.projection)!=null&&r.isProjecting?ld(s):NE(a,s);{const o=lN(a),d=(xy(s)?o.getPropertyValue(s):o[s])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(a,{transformPagePoint:s}){return ob(a,s)}build(a,s,r){ah(a,s,r.transformTemplate)}scrapeMotionValuesFromProps(a,s,r){return ih(a,s,r)}}const oN={offset:"stroke-dashoffset",array:"stroke-dasharray"},uN={offset:"strokeDashoffset",array:"strokeDasharray"};function cN(n,a,s=1,r=0,o=!0){n.pathLength=1;const d=o?oN:uN;n[d.offset]=`${-r}`,n[d.array]=`${a} ${s}`}const fN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fb(n,{attrX:a,attrY:s,attrScale:r,pathLength:o,pathSpacing:d=1,pathOffset:h=0,...p},m,g,x){if(ah(n,p,g),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:y,style:S}=n;y.transform&&(S.transform=y.transform,delete y.transform),(S.transform||y.transformOrigin)&&(S.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),S.transform&&(S.transformBox=(x==null?void 0:x.transformBox)??"fill-box",delete y.transformBox);for(const w of fN)y[w]!==void 0&&(S[w]=y[w],delete y[w]);a!==void 0&&(y.x=a),s!==void 0&&(y.y=s),r!==void 0&&(y.scale=r),o!==void 0&&cN(y,o,d,h,!1)}const db=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),hb=n=>typeof n=="string"&&n.toLowerCase()==="svg";function dN(n,a,s,r){ub(n,a,void 0,r);for(const o in a.attrs)n.setAttribute(db.has(o)?o:Pd(o),a.attrs[o])}function mb(n,a,s){const r=ih(n,a,s);for(const o in n)if(ft(n[o])||ft(a[o])){const d=es.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[d]=n[o]}return r}class hN extends ib{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt}getBaseTargetFromProps(a,s){return a[s]}readValueFromInstance(a,s){if(ts.has(s)){const r=Fy(s);return r&&r.default||0}return s=db.has(s)?s:Pd(s),a.getAttribute(s)}scrapeMotionValuesFromProps(a,s,r){return mb(a,s,r)}build(a,s,r){fb(a,s,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(a,s,r,o){dN(a,s,r,o)}mount(a){this.isSVGTag=hb(a.tagName),super.mount(a)}}const mN=nh.length;function pb(n){if(!n)return;if(!n.isControllingVariants){const s=n.parent?pb(n.parent)||{}:{};return n.props.initial!==void 0&&(s.initial=n.props.initial),s}const a={};for(let s=0;s<mN;s++){const r=nh[s],o=n.props[r];(yl(o)||o===!1)&&(a[r]=o)}return a}function gb(n,a){if(!Array.isArray(a))return!1;const s=a.length;if(s!==n.length)return!1;for(let r=0;r<s;r++)if(a[r]!==n[r])return!1;return!0}const pN=[...th].reverse(),gN=th.length;function vN(n){return a=>Promise.all(a.map(({animation:s,options:r})=>h5(n,s,r)))}function xN(n){let a=vN(n),s=m0(),r=!0,o=!1;const d=g=>(x,y)=>{var w;const S=Ja(n,y,g==="exit"?(w=n.presenceContext)==null?void 0:w.custom:void 0);if(S){const{transition:j,transitionEnd:E,...C}=S;x={...x,...C,...E}}return x};function h(g){a=g(n)}function p(g){const{props:x}=n,y=pb(n.parent)||{},S=[],w=new Set;let j={},E=1/0;for(let z=0;z<gN;z++){const D=pN[z],R=s[D],k=x[D]!==void 0?x[D]:y[D],U=yl(k),P=D===g?R.isActive:null;P===!1&&(E=z);let F=k===y[D]&&k!==x[D]&&U;if(F&&(r||o)&&n.manuallyAnimateOnMount&&(F=!1),R.protectedKeys={...j},!R.isActive&&P===null||!k&&!R.prevProp||Ho(k)||typeof k=="boolean")continue;if(D==="exit"&&R.isActive&&P!==!0){R.prevResolvedValues&&(j={...j,...R.prevResolvedValues});continue}const W=yN(R.prevProp,k);let re=W||D===g&&R.isActive&&!F&&U||z>E&&U,B=!1;const Z=Array.isArray(k)?k:[k];let ie=Z.reduce(d(D),{});P===!1&&(ie={});const{prevResolvedValues:le={}}=R,Se={...le,...ie},De=J=>{re=!0,w.has(J)&&(B=!0,w.delete(J)),R.needsAnimating[J]=!0;const oe=n.getValue(J);oe&&(oe.liveStyle=!1)};for(const J in Se){const oe=ie[J],me=le[J];if(j.hasOwnProperty(J))continue;let A=!1;dd(oe)&&dd(me)?A=!gb(oe,me):A=oe!==me,A?oe!=null?De(J):w.add(J):oe!==void 0&&w.has(J)?De(J):R.protectedKeys[J]=!0}R.prevProp=k,R.prevResolvedValues=ie,R.isActive&&(j={...j,...ie}),(r||o)&&n.blockInitialAnimation&&(re=!1);const $=F&&W;re&&(!$||B)&&S.push(...Z.map(J=>{const oe={type:D};if(typeof J=="string"&&(r||o)&&!$&&n.manuallyAnimateOnMount&&n.parent){const{parent:me}=n,A=Ja(me,J);if(me.enteringChildren&&A){const{delayChildren:G}=A.transition||{};oe.delay=Uy(me.enteringChildren,n,G)}}return{animation:J,options:oe}}))}if(w.size){const z={};if(typeof x.initial!="boolean"){const D=Ja(n,Array.isArray(x.initial)?x.initial[0]:x.initial);D&&D.transition&&(z.transition=D.transition)}w.forEach(D=>{const R=n.getBaseTarget(D),k=n.getValue(D);k&&(k.liveStyle=!0),z[D]=R??null}),S.push({animation:z})}let C=!!S.length;return r&&(x.initial===!1||x.initial===x.animate)&&!n.manuallyAnimateOnMount&&(C=!1),r=!1,o=!1,C?a(S):Promise.resolve()}function m(g,x){var S;if(s[g].isActive===x)return Promise.resolve();(S=n.variantChildren)==null||S.forEach(w=>{var j;return(j=w.animationState)==null?void 0:j.setActive(g,x)}),s[g].isActive=x;const y=p(g);for(const w in s)s[w].protectedKeys={};return y}return{animateChanges:p,setActive:m,setAnimateFunction:h,getState:()=>s,reset:()=>{s=m0(),o=!0}}}function yN(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!gb(a,n):!1}function $a(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function m0(){return{animate:$a(!0),whileInView:$a(),whileHover:$a(),whileTap:$a(),whileDrag:$a(),whileFocus:$a(),exit:$a()}}function Sd(n,a){n.min=a.min,n.max=a.max}function tn(n,a){Sd(n.x,a.x),Sd(n.y,a.y)}function p0(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}const vb=1e-4,bN=1-vb,SN=1+vb,xb=.01,wN=0-xb,TN=0+xb;function xt(n){return n.max-n.min}function jN(n,a,s){return Math.abs(n-a)<=s}function g0(n,a,s,r=.5){n.origin=r,n.originPoint=He(a.min,a.max,n.origin),n.scale=xt(s)/xt(a),n.translate=He(s.min,s.max,n.origin)-n.originPoint,(n.scale>=bN&&n.scale<=SN||isNaN(n.scale))&&(n.scale=1),(n.translate>=wN&&n.translate<=TN||isNaN(n.translate))&&(n.translate=0)}function hl(n,a,s,r){g0(n.x,a.x,s.x,r?r.originX:void 0),g0(n.y,a.y,s.y,r?r.originY:void 0)}function v0(n,a,s,r=0){const o=r?He(s.min,s.max,r):s.min;n.min=o+a.min,n.max=n.min+xt(a)}function EN(n,a,s,r){v0(n.x,a.x,s.x,r==null?void 0:r.x),v0(n.y,a.y,s.y,r==null?void 0:r.y)}function x0(n,a,s,r=0){const o=r?He(s.min,s.max,r):s.min;n.min=a.min-o,n.max=n.min+xt(a)}function Ao(n,a,s,r){x0(n.x,a.x,s.x,r==null?void 0:r.x),x0(n.y,a.y,s.y,r==null?void 0:r.y)}function y0(n,a,s,r,o){return n-=a,n=No(n,1/s,r),o!==void 0&&(n=No(n,1/o,r)),n}function NN(n,a=0,s=1,r=.5,o,d=n,h=n){if(mn.test(a)&&(a=parseFloat(a),a=He(h.min,h.max,a/100)-h.min),typeof a!="number")return;let p=He(d.min,d.max,r);n===d&&(p-=a),n.min=y0(n.min,a,s,p,o),n.max=y0(n.max,a,s,p,o)}function b0(n,a,[s,r,o],d,h){NN(n,a[s],a[r],a[o],a.scale,d,h)}const AN=["x","scaleX","originX"],CN=["y","scaleY","originY"];function S0(n,a,s,r){b0(n.x,a,AN,s?s.x:void 0,r?r.x:void 0),b0(n.y,a,CN,s?s.y:void 0,r?r.y:void 0)}function w0(n){return n.translate===0&&n.scale===1}function yb(n){return w0(n.x)&&w0(n.y)}function T0(n,a){return n.min===a.min&&n.max===a.max}function MN(n,a){return T0(n.x,a.x)&&T0(n.y,a.y)}function j0(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function bb(n,a){return j0(n.x,a.x)&&j0(n.y,a.y)}function E0(n){return xt(n.x)/xt(n.y)}function N0(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function fn(n){return[n("x"),n("y")]}function DN(n,a,s){let r="";const o=n.x.translate/a.x,d=n.y.translate/a.y,h=(s==null?void 0:s.z)||0;if((o||d||h)&&(r=`translate3d(${o}px, ${d}px, ${h}px) `),(a.x!==1||a.y!==1)&&(r+=`scale(${1/a.x}, ${1/a.y}) `),s){const{transformPerspective:g,rotate:x,rotateX:y,rotateY:S,skewX:w,skewY:j}=s;g&&(r=`perspective(${g}px) ${r}`),x&&(r+=`rotate(${x}deg) `),y&&(r+=`rotateX(${y}deg) `),S&&(r+=`rotateY(${S}deg) `),w&&(r+=`skewX(${w}deg) `),j&&(r+=`skewY(${j}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(r+=`scale(${p}, ${m})`),r||"none"}const Sb=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ON=Sb.length,A0=n=>typeof n=="string"?parseFloat(n):n,C0=n=>typeof n=="number"||te.test(n);function RN(n,a,s,r,o,d){o?(n.opacity=He(0,s.opacity??1,zN(r)),n.opacityExit=He(a.opacity??1,0,kN(r))):d&&(n.opacity=He(a.opacity??1,s.opacity??1,r));for(let h=0;h<ON;h++){const p=Sb[h];let m=M0(a,p),g=M0(s,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||C0(m)===C0(g)?(n[p]=Math.max(He(A0(m),A0(g),r),0),(mn.test(g)||mn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||s.rotate)&&(n.rotate=He(a.rotate||0,s.rotate||0,r))}function M0(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const zN=wb(0,.5,dy),kN=wb(.5,.95,Jt);function wb(n,a,s){return r=>r<n?0:r>a?1:s(vl(n,a,r))}function LN(n,a,s){const r=ft(n)?n:Qi(n);return r.start(Zd("",r,a,s)),r.animation}function bl(n,a,s,r={passive:!0}){return n.addEventListener(a,s,r),()=>n.removeEventListener(a,s)}const VN=(n,a)=>n.depth-a.depth;class _N{constructor(){this.children=[],this.isDirty=!1}add(a){Ld(this.children,a),this.isDirty=!0}remove(a){bo(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(VN),this.isDirty=!1,this.children.forEach(a)}}function UN(n,a){const s=vt.now(),r=({timestamp:o})=>{const d=o-s;d>=a&&(xa(r),n(d-a))};return ke.setup(r,!0),()=>xa(r)}function fo(n){return ft(n)?n.get():n}class BN{constructor(){this.members=[]}add(a){Ld(this.members,a);for(let s=this.members.length-1;s>=0;s--){const r=this.members[s];if(r===a||r===this.lead||r===this.prevLead)continue;const o=r.instance;(!o||o.isConnected===!1)&&!r.snapshot&&(bo(this.members,r),r.unmount())}a.scheduleRender()}remove(a){if(bo(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(a){var s;for(let r=this.members.indexOf(a)-1;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1&&((s=o.instance)==null?void 0:s.isConnected)!==!1)return this.promote(o),!0}return!1}promote(a,s){var o;const r=this.lead;if(a!==r&&(this.prevLead=r,this.lead=a,a.show(),r)){r.updateSnapshot(),a.scheduleRender();const{layoutDependency:d}=r.options,{layoutDependency:h}=a.options;(d===void 0||d!==h)&&(a.resumeFrom=r,s&&(r.preserveOpacity=!0),r.snapshot&&(a.snapshot=r.snapshot,a.snapshot.latestValues=r.animationValues||r.latestValues),(o=a.root)!=null&&o.isUpdating&&(a.isLayoutDirty=!0)),a.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(a=>{var s,r,o,d,h;(r=(s=a.options).onExitComplete)==null||r.call(s),(h=(o=a.resumingFrom)==null?void 0:(d=o.options).onExitComplete)==null||h.call(d)})}scheduleRender(){this.members.forEach(a=>a.instance&&a.scheduleRender(!1))}removeLeadSnapshot(){var a;(a=this.lead)!=null&&a.snapshot&&(this.lead.snapshot=void 0)}}const ho={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Mf=["","X","Y","Z"],HN=1e3;let $N=0;function Df(n,a,s,r){const{latestValues:o}=a;o[n]&&(s[n]=o[n],a.setStaticValue(n,0),r&&(r[n]=0))}function Tb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const s=Yy(a);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:o,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(s,"transform",ke,!(o||d))}const{parent:r}=n;r&&!r.hasCheckedOptimisedAppear&&Tb(r)}function jb({attachResizeListener:n,defaultParent:a,measureScroll:s,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(h={},p=a==null?void 0:a()){this.id=$N++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(GN),this.nodes.forEach(PN),this.nodes.forEach(JN),this.nodes.forEach(XN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=h,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new _N)}addEventListener(h,p){return this.eventHandlers.has(h)||this.eventHandlers.set(h,new _d),this.eventHandlers.get(h).add(p)}notifyListeners(h,...p){const m=this.eventHandlers.get(h);m&&m.notify(...p)}hasListeners(h){return this.eventHandlers.has(h)}mount(h){if(this.instance)return;this.isSVG=eh(h)&&!Y5(h),this.instance=h;const{layoutId:p,layout:m,visualElement:g}=this.options;if(g&&!g.current&&g.mount(h),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||p)&&(this.isLayoutDirty=!0),n){let x,y=0;const S=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{y=window.innerWidth}),n(h,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,x&&x(),x=UN(S,250),ho.hasAnimatedSinceResize&&(ho.hasAnimatedSinceResize=!1,this.nodes.forEach(R0)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&g&&(p||m)&&this.addEventListener("didUpdate",({delta:x,hasLayoutChanged:y,hasRelativeLayoutChanged:S,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||g.getDefaultTransition()||nA,{onLayoutAnimationStart:E,onLayoutAnimationComplete:C}=g.getProps(),z=!this.targetLayout||!bb(this.targetLayout,w),D=!y&&S;if(this.options.layoutRoot||this.resumeFrom||D||y&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const R={...Fd(j,"layout"),onPlay:E,onComplete:C};(g.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R),this.setAnimationOrigin(x,D)}else y||R0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const h=this.getStack();h&&h.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(WN),this.animationId++)}getTransformTemplate(){const{visualElement:h}=this.options;return h&&h.getProps().transformTemplate}willUpdate(h=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Tb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let x=0;x<this.path.length;x++){const y=this.path[x];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),h&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const m=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),m&&this.nodes.forEach(FN),this.nodes.forEach(D0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(O0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ZN),this.nodes.forEach(QN),this.nodes.forEach(qN),this.nodes.forEach(YN)):this.nodes.forEach(O0),this.clearAllSnapshots();const p=vt.now();ct.delta=pn(0,1e3/60,p-ct.timestamp),ct.timestamp=p,ct.isProcessing=!0,Sf.update.process(ct),Sf.preRender.process(ct),Sf.render.process(ct),ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KN),this.sharedNodes.forEach(IN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const h=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=nt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,h?h.layoutBox:void 0)}updateScroll(h="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===h&&(p=!1),p&&this.instance){const m=r(this.instance);this.scroll={animationId:this.root.animationId,phase:h,isRoot:m,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!o)return;const h=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!yb(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,x=g!==this.prevTransformTemplateValue;h&&this.instance&&(p||Ya(this.latestValues)||x)&&(o(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(h=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return h&&(m=this.removeTransform(m)),aA(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var g;const{visualElement:h}=this.options;if(!h)return nt();const p=h.measureViewportBox();if(!(((g=this.scroll)==null?void 0:g.wasRoot)||this.path.some(iA))){const{scroll:x}=this.root;x&&(dn(p.x,x.offset.x),dn(p.y,x.offset.y))}return p}removeElementScroll(h){var m;const p=nt();if(tn(p,h),(m=this.scroll)!=null&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const x=this.path[g],{scroll:y,options:S}=x;x!==this.root&&y&&S.layoutScroll&&(y.wasRoot&&tn(p,h),dn(p.x,y.offset.x),dn(p.y,y.offset.y))}return p}applyTransform(h,p=!1,m){var x,y;const g=m||nt();tn(g,h);for(let S=0;S<this.path.length;S++){const w=this.path[S];!p&&w.options.layoutScroll&&w.scroll&&w!==w.root&&(dn(g.x,-w.scroll.offset.x),dn(g.y,-w.scroll.offset.y)),Ya(w.latestValues)&&co(g,w.latestValues,(x=w.layout)==null?void 0:x.layoutBox)}return Ya(this.latestValues)&&co(g,this.latestValues,(y=this.layout)==null?void 0:y.layoutBox),g}removeTransform(h){var m;const p=nt();tn(p,h);for(let g=0;g<this.path.length;g++){const x=this.path[g];if(!Ya(x.latestValues))continue;let y;x.instance&&(xd(x.latestValues)&&x.updateSnapshot(),y=nt(),tn(y,x.measurePageBox())),S0(p,x.latestValues,(m=x.snapshot)==null?void 0:m.layoutBox,y)}return Ya(this.latestValues)&&S0(p,this.latestValues),p}setTargetDelta(h){this.targetDelta=h,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(h){this.options={...this.options,...h,crossfade:h.crossfade!==void 0?h.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(h=!1){var w;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(h||m&&this.isSharedProjectionDirty||this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:x,layoutId:y}=this.options;if(!this.layout||!(x||y))return;this.resolvedRelativeTargetAt=ct.timestamp;const S=this.getClosestProjectingParent();S&&this.linkedParentVersion!==S.layoutVersion&&!S.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&S&&S.layout?this.createRelativeTarget(S,this.layout.layoutBox,S.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=nt(),this.targetWithTransforms=nt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):tn(this.target,this.layout.layoutBox),rb(this.target,this.targetDelta)):tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?this.createRelativeTarget(S,this.target,S.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||xd(this.parent.latestValues)||lb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(h,p,m){this.relativeParent=h,this.linkedParentVersion=h.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=nt(),this.relativeTargetOrigin=nt(),Ao(this.relativeTargetOrigin,p,m,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var j;const h=this.getLead(),p=!!this.resumingFrom||this!==h;let m=!0;if((this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===ct.timestamp&&(m=!1),m)return;const{layout:g,layoutId:x}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||x))return;tn(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,S=this.treeScale.y;eN(this.layoutCorrected,this.treeScale,this.path,p),h.layout&&!h.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(h.target=h.layout.layoutBox,h.targetWithTransforms=nt());const{target:w}=h;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(p0(this.prevProjectionDelta.x,this.projectionDelta.x),p0(this.prevProjectionDelta.y,this.projectionDelta.y)),hl(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==S||!N0(this.projectionDelta.x,this.prevProjectionDelta.x)||!N0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(h=!0){var p;if((p=this.options.visualElement)==null||p.scheduleRender(),h){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gi(),this.projectionDelta=Gi(),this.projectionDeltaWithTransform=Gi()}setAnimationOrigin(h,p=!1){const m=this.snapshot,g=m?m.latestValues:{},x={...this.latestValues},y=Gi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const S=nt(),w=m?m.source:void 0,j=this.layout?this.layout.source:void 0,E=w!==j,C=this.getStack(),z=!C||C.members.length<=1,D=!!(E&&!z&&this.options.crossfade===!0&&!this.path.some(tA));this.animationProgress=0;let R;this.mixTargetDelta=k=>{const U=k/1e3;z0(y.x,h.x,U),z0(y.y,h.y,U),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ao(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),eA(this.relativeTarget,this.relativeTargetOrigin,S,U),R&&MN(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=nt()),tn(R,this.relativeTarget)),E&&(this.animationValues=x,RN(x,g,this.latestValues,U,D,z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=U},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(h){var p,m,g;this.notifyListeners("animationStart"),(p=this.currentAnimation)==null||p.stop(),(g=(m=this.resumingFrom)==null?void 0:m.currentAnimation)==null||g.stop(),this.pendingAnimation&&(xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{ho.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=LN(this.motionValue,[0,1e3],{...h,velocity:0,isSync:!0,onUpdate:x=>{this.mixTargetDelta(x),h.onUpdate&&h.onUpdate(x)},onStop:()=>{},onComplete:()=>{h.onComplete&&h.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const h=this.getStack();h&&h.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(HN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const h=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:x}=h;if(!(!p||!m||!g)){if(this!==h&&this.layout&&g&&Eb(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||nt();const y=xt(this.layout.layoutBox.x);m.x.min=h.target.x.min,m.x.max=m.x.min+y;const S=xt(this.layout.layoutBox.y);m.y.min=h.target.y.min,m.y.max=m.y.min+S}tn(p,m),co(p,x),hl(this.projectionDeltaWithTransform,this.layoutCorrected,p,x)}}registerSharedNode(h,p){this.sharedNodes.has(h)||this.sharedNodes.set(h,new BN),this.sharedNodes.get(h).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const h=this.getStack();return h?h.lead===this:!0}getLead(){var p;const{layoutId:h}=this.options;return h?((p=this.getStack())==null?void 0:p.lead)||this:this}getPrevLead(){var p;const{layoutId:h}=this.options;return h?(p=this.getStack())==null?void 0:p.prevLead:void 0}getStack(){const{layoutId:h}=this.options;if(h)return this.root.sharedNodes.get(h)}promote({needsReset:h,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),h&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const h=this.getStack();return h?h.relegate(this):!1}resetSkewAndRotation(){const{visualElement:h}=this.options;if(!h)return;let p=!1;const{latestValues:m}=h;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Df("z",h,g,this.animationValues);for(let x=0;x<Mf.length;x++)Df(`rotate${Mf[x]}`,h,g,this.animationValues),Df(`skew${Mf[x]}`,h,g,this.animationValues);h.render();for(const x in g)h.setStaticValue(x,g[x]),this.animationValues&&(this.animationValues[x]=g[x]);h.scheduleRender()}applyProjectionStyles(h,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){h.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,h.visibility="",h.opacity="",h.pointerEvents=fo(p==null?void 0:p.pointerEvents)||"",h.transform=m?m(this.latestValues,""):"none";return}const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=fo(p==null?void 0:p.pointerEvents)||""),this.hasProjected&&!Ya(this.latestValues)&&(h.transform=m?m({},""):"none",this.hasProjected=!1);return}h.visibility="";const x=g.animationValues||g.latestValues;this.applyTransformsToTarget();let y=DN(this.projectionDeltaWithTransform,this.treeScale,x);m&&(y=m(x,y)),h.transform=y;const{x:S,y:w}=this.projectionDelta;h.transformOrigin=`${S.origin*100}% ${w.origin*100}% 0`,g.animationValues?h.opacity=g===this?x.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:h.opacity=g===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const j in bd){if(x[j]===void 0)continue;const{correct:E,applyTo:C,isCSSVariable:z}=bd[j],D=y==="none"?x[j]:E(x[j],g);if(C){const R=C.length;for(let k=0;k<R;k++)h[C[k]]=D}else z?this.options.visualElement.renderState.vars[j]=D:h[j]=D}this.options.layoutId&&(h.pointerEvents=g===this?fo(p==null?void 0:p.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(h=>{var p;return(p=h.currentAnimation)==null?void 0:p.stop()}),this.root.nodes.forEach(D0),this.root.sharedNodes.clear()}}}function qN(n){n.updateLayout()}function YN(n){var s;const a=((s=n.resumeFrom)==null?void 0:s.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=n.layout,{animationType:d}=n.options,h=a.source!==n.layout.source;if(d==="size")fn(y=>{const S=h?a.measuredBox[y]:a.layoutBox[y],w=xt(S);S.min=r[y].min,S.max=S.min+w});else if(d==="x"||d==="y"){const y=d==="x"?"y":"x";Sd(h?a.measuredBox[y]:a.layoutBox[y],r[y])}else Eb(d,a.layoutBox,r)&&fn(y=>{const S=h?a.measuredBox[y]:a.layoutBox[y],w=xt(r[y]);S.max=S.min+w,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[y].max=n.relativeTarget[y].min+w)});const p=Gi();hl(p,r,a.layoutBox);const m=Gi();h?hl(m,n.applyTransform(o,!0),a.measuredBox):hl(m,r,a.layoutBox);const g=!yb(p);let x=!1;if(!n.resumeFrom){const y=n.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:S,layout:w}=y;if(S&&w){const j=n.options.layoutAnchor||void 0,E=nt();Ao(E,a.layoutBox,S.layoutBox,j);const C=nt();Ao(C,r,w.layoutBox,j),bb(E,C)||(x=!0),y.options.layoutRoot&&(n.relativeTarget=C,n.relativeTargetOrigin=E,n.relativeParent=y)}}}n.notifyListeners("didUpdate",{layout:r,snapshot:a,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeLayoutChanged:x})}else if(n.isLead()){const{onExitComplete:r}=n.options;r&&r()}n.options.transition=void 0}function GN(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function XN(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function KN(n){n.clearSnapshot()}function D0(n){n.clearMeasurements()}function FN(n){n.isLayoutDirty=!0,n.updateLayout()}function O0(n){n.isLayoutDirty=!1}function ZN(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function QN(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function R0(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function PN(n){n.resolveTargetDelta()}function JN(n){n.calcProjection()}function WN(n){n.resetSkewAndRotation()}function IN(n){n.removeLeadSnapshot()}function z0(n,a,s){n.translate=He(a.translate,0,s),n.scale=He(a.scale,1,s),n.origin=a.origin,n.originPoint=a.originPoint}function k0(n,a,s,r){n.min=He(a.min,s.min,r),n.max=He(a.max,s.max,r)}function eA(n,a,s,r){k0(n.x,a.x,s.x,r),k0(n.y,a.y,s.y,r)}function tA(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const nA={duration:.45,ease:[.4,0,.1,1]},L0=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),V0=L0("applewebkit/")&&!L0("chrome/")?Math.round:Jt;function _0(n){n.min=V0(n.min),n.max=V0(n.max)}function aA(n){_0(n.x),_0(n.y)}function Eb(n,a,s){return n==="position"||n==="preserve-aspect"&&!jN(E0(a),E0(s),.2)}function iA(n){var a;return n!==n.root&&((a=n.scroll)==null?void 0:a.wasRoot)}const sA=jb({attachResizeListener:(n,a)=>bl(n,"resize",a),measureScroll:()=>{var n,a;return{x:document.documentElement.scrollLeft||((n=document.body)==null?void 0:n.scrollLeft)||0,y:document.documentElement.scrollTop||((a=document.body)==null?void 0:a.scrollTop)||0}},checkIsScrollRoot:()=>!0}),lA=n=>!n.isLayoutDirty&&n.willUpdate(!1);function U0(){const n=new Set,a=new WeakMap,s=()=>n.forEach(lA);return{add:r=>{n.add(r),a.set(r,r.addEventListener("willUpdate",s))},remove:r=>{n.delete(r);const o=a.get(r);o&&(o(),a.delete(r)),s()},dirty:s}}const Of={current:void 0},Nb=jb({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Of.current){const n=new sA({});n.mount(window),n.setOptions({layoutScroll:!0}),Of.current=n}return Of.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),Ab=T.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function rA(n=!0){const a=T.useContext(kd);if(a===null)return[!0,null];const{isPresent:s,onExitComplete:r,register:o}=a,d=T.useId();T.useEffect(()=>{if(n)return o(d)},[n]);const h=T.useCallback(()=>n&&r&&r(d),[d,r,n]);return!s&&r?[!1,h]:[!0]}const oA=T.createContext(null);function uA(){const n=T.useRef(!1);return ey(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function cA(){const n=uA(),[a,s]=T.useState(0),r=T.useCallback(()=>{n.current&&s(a+1)},[a]);return[T.useCallback(()=>ke.postRender(r),[r]),a]}const Cb=n=>n===!0,fA=n=>Cb(n===!0)||n==="id",Mb=({children:n,id:a,inherit:s=!0})=>{const r=T.useContext(yo),o=T.useContext(oA),[d,h]=cA(),p=T.useRef(null),m=r.id||o;p.current===null&&(fA(s)&&m&&(a=a?m+"-"+a:m),p.current={id:a,group:Cb(s)&&r.group||U0()});const g=T.useMemo(()=>({...p.current,forceRender:d}),[h]);return f.jsx(yo.Provider,{value:g,children:n})},Db=T.createContext({strict:!1}),B0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let H0=!1;function dA(){if(H0)return;const n={};for(const a in B0)n[a]={isEnabled:s=>B0[a].some(r=>!!s[r])};ab(n),H0=!0}function Ob(){return dA(),P5()}function hA(n){const a=Ob();for(const s in n)a[s]={...a[s],...n[s]};ab(a)}const mA=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Co(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||mA.has(n)}let Rb=n=>!Co(n);function pA(n){typeof n=="function"&&(Rb=a=>a.startsWith("on")?!Co(a):n(a))}try{pA(require("@emotion/is-prop-valid").default)}catch{}function gA(n,a,s){const r={};for(const o in n)o==="values"&&typeof n.values=="object"||ft(n[o])||(Rb(o)||s===!0&&Co(o)||!a&&!Co(o)||n.draggable&&o.startsWith("onDrag"))&&(r[o]=n[o]);return r}const qo=T.createContext({});function vA(n,a){if($o(n)){const{initial:s,animate:r}=n;return{initial:s===!1||yl(s)?s:void 0,animate:yl(r)?r:void 0}}return n.inherit!==!1?a:{}}function xA(n){const{initial:a,animate:s}=vA(n,T.useContext(qo));return T.useMemo(()=>({initial:a,animate:s}),[$0(a),$0(s)])}function $0(n){return Array.isArray(n)?n.join(" "):n}const sh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zb(n,a,s){for(const r in a)!ft(a[r])&&!cb(r,s)&&(n[r]=a[r])}function yA({transformTemplate:n},a){return T.useMemo(()=>{const s=sh();return ah(s,a,n),Object.assign({},s.vars,s.style)},[a])}function bA(n,a){const s=n.style||{},r={};return zb(r,s,n),Object.assign(r,yA(n,a)),r}function SA(n,a){const s={},r=bA(n,a);return n.drag&&n.dragListener!==!1&&(s.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(s.tabIndex=0),s.style=r,s}const kb=()=>({...sh(),attrs:{}});function wA(n,a,s,r){const o=T.useMemo(()=>{const d=kb();return fb(d,a,hb(r),n.transformTemplate,n.style),{...d.attrs,style:{...d.style}}},[a]);if(n.style){const d={};zb(d,n.style,n),o.style={...d,...o.style}}return o}const TA=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function lh(n){return typeof n!="string"||n.includes("-")?!1:!!(TA.indexOf(n)>-1||/[A-Z]/u.test(n))}function jA(n,a,s,{latestValues:r},o,d=!1,h){const m=(h??lh(n)?wA:SA)(a,r,o,n),g=gA(a,typeof n=="string",d),x=n!==T.Fragment?{...g,...m,ref:s}:{},{children:y}=a,S=T.useMemo(()=>ft(y)?y.get():y,[y]);return T.createElement(n,{...x,children:S})}function EA({scrapeMotionValuesFromProps:n,createRenderState:a},s,r,o){return{latestValues:NA(s,r,o,n),renderState:a()}}function NA(n,a,s,r){const o={},d=r(n,{});for(const S in d)o[S]=fo(d[S]);let{initial:h,animate:p}=n;const m=$o(n),g=tb(n);a&&g&&!m&&n.inherit!==!1&&(h===void 0&&(h=a.initial),p===void 0&&(p=a.animate));let x=s?s.initial===!1:!1;x=x||h===!1;const y=x?p:h;if(y&&typeof y!="boolean"&&!Ho(y)){const S=Array.isArray(y)?y:[y];for(let w=0;w<S.length;w++){const j=Qd(n,S[w]);if(j){const{transitionEnd:E,transition:C,...z}=j;for(const D in z){let R=z[D];if(Array.isArray(R)){const k=x?R.length-1:0;R=R[k]}R!==null&&(o[D]=R)}for(const D in E)o[D]=E[D]}}}return o}const Lb=n=>(a,s)=>{const r=T.useContext(qo),o=T.useContext(kd),d=()=>EA(n,a,r,o);return s?d():yj(d)},AA=Lb({scrapeMotionValuesFromProps:ih,createRenderState:sh}),CA=Lb({scrapeMotionValuesFromProps:mb,createRenderState:kb}),MA=Symbol.for("motionComponentSymbol");function DA(n,a,s){const r=T.useRef(s);T.useInsertionEffect(()=>{r.current=s});const o=T.useRef(null);return T.useCallback(d=>{var p;d&&((p=n.onMount)==null||p.call(n,d));const h=r.current;if(typeof h=="function")if(d){const m=h(d);typeof m=="function"&&(o.current=m)}else o.current?(o.current(),o.current=null):h(d);else h&&(h.current=d);a&&(d?a.mount(d):a.unmount())},[a])}const Vb=T.createContext({});function $i(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function OA(n,a,s,r,o,d){var R,k;const{visualElement:h}=T.useContext(qo),p=T.useContext(Db),m=T.useContext(kd),g=T.useContext(Ab),x=g.reducedMotion,y=g.skipAnimations,S=T.useRef(null),w=T.useRef(!1);r=r||p.renderer,!S.current&&r&&(S.current=r(n,{visualState:a,parent:h,props:s,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:x,skipAnimations:y,isSVG:d}),w.current&&S.current&&(S.current.manuallyAnimateOnMount=!0));const j=S.current,E=T.useContext(Vb);j&&!j.projection&&o&&(j.type==="html"||j.type==="svg")&&RA(S.current,s,o,E);const C=T.useRef(!1);T.useInsertionEffect(()=>{j&&C.current&&j.update(s,m)});const z=s[qy],D=T.useRef(!!z&&typeof window<"u"&&!((R=window.MotionHandoffIsComplete)!=null&&R.call(window,z))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,z)));return ey(()=>{w.current=!0,j&&(C.current=!0,window.MotionIsMounted=!0,j.updateFeatures(),j.scheduleRenderMicrotask(),D.current&&j.animationState&&j.animationState.animateChanges())}),T.useEffect(()=>{j&&(!D.current&&j.animationState&&j.animationState.animateChanges(),D.current&&(queueMicrotask(()=>{var U;(U=window.MotionHandoffMarkAsComplete)==null||U.call(window,z)}),D.current=!1),j.enteringChildren=void 0)}),j}function RA(n,a,s,r){const{layoutId:o,layout:d,drag:h,dragConstraints:p,layoutScroll:m,layoutRoot:g,layoutAnchor:x,layoutCrossfade:y}=a;n.projection=new s(n.latestValues,a["data-framer-portal-id"]?void 0:_b(n.parent)),n.projection.setOptions({layoutId:o,layout:d,alwaysMeasureLayout:!!h||p&&$i(p),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:r,crossfade:y,layoutScroll:m,layoutRoot:g,layoutAnchor:x})}function _b(n){if(n)return n.options.allowProjection!==!1?n.projection:_b(n.parent)}function Rf(n,{forwardMotionProps:a=!1,type:s}={},r,o){r&&hA(r);const d=s?s==="svg":lh(n),h=d?CA:AA;function p(g,x){let y;const S={...T.useContext(Ab),...g,layoutId:zA(g)},{isStatic:w}=S,j=xA(g),E=h(g,w);if(!w&&typeof window<"u"){kA();const C=LA(S);y=C.MeasureLayout,j.visualElement=OA(n,E,S,o,C.ProjectionNode,d)}return f.jsxs(qo.Provider,{value:j,children:[y&&j.visualElement?f.jsx(y,{visualElement:j.visualElement,...S}):null,jA(n,g,DA(E,j.visualElement,x),E,w,a,d)]})}p.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=T.forwardRef(p);return m[MA]=n,m}function zA({layoutId:n}){const a=T.useContext(yo).id;return a&&n!==void 0?a+"-"+n:n}function kA(n,a){T.useContext(Db).strict}function LA(n){const a=Ob(),{drag:s,layout:r}=a;if(!s&&!r)return{};const o={...s,...r};return{MeasureLayout:s!=null&&s.isEnabled(n)||r!=null&&r.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function VA(n,a){if(typeof Proxy>"u")return Rf;const s=new Map,r=(d,h)=>Rf(d,h,n,a),o=(d,h)=>r(d,h);return new Proxy(o,{get:(d,h)=>h==="create"?r:(s.has(h)||s.set(h,Rf(h,void 0,n,a)),s.get(h))})}const _A=(n,a)=>a.isSVG??lh(n)?new hN(a):new rN(a,{allowProjection:n!==T.Fragment});class UA extends Sa{constructor(a){super(a),a.animationState||(a.animationState=xN(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();Ho(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:s}=this.node.prevProps||{};a!==s&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)==null||a.call(this)}}let BA=0;class HA extends Sa{constructor(){super(...arguments),this.id=BA++,this.isExitComplete=!1}update(){var d;if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:s}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===r)return;if(a&&r===!1){if(this.isExitComplete){const{initial:h,custom:p}=this.node.getProps();if(typeof h=="string"){const m=Ja(this.node,h,p);if(m){const{transition:g,transitionEnd:x,...y}=m;for(const S in y)(d=this.node.getValue(S))==null||d.jump(y[S])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!a);s&&!a&&o.then(()=>{this.isExitComplete=!0,s(this.id)})}mount(){const{register:a,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const $A={animation:{Feature:UA},exit:{Feature:HA}};function Cl(n){return{point:{x:n.pageX,y:n.pageY}}}const qA=n=>a=>Id(a)&&n(a,Cl(a));function ml(n,a,s,r){return bl(n,a,qA(s),r)}const Ub=({current:n})=>n?n.ownerDocument.defaultView:null,q0=(n,a)=>Math.abs(n-a);function YA(n,a){const s=q0(n.x,a.x),r=q0(n.y,a.y);return Math.sqrt(s**2+r**2)}const Y0=new Set(["auto","scroll"]);class Bb{constructor(a,s,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:d=!1,distanceThreshold:h=3,element:p}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=eo(this.lastRawMoveEventInfo,this.transformPagePoint));const w=zf(this.lastMoveEventInfo,this.history),j=this.startEvent!==null,E=YA(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!j&&!E)return;const{point:C}=w,{timestamp:z}=ct;this.history.push({...C,timestamp:z});const{onStart:D,onMove:R}=this.handlers;j||(D&&D(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,w)},this.handlePointerMove=(w,j)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=j,this.lastMoveEventInfo=eo(j,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(w,j)=>{this.end();const{onEnd:E,onSessionEnd:C,resumeAnimation:z}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&z&&z(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=zf(w.type==="pointercancel"?this.lastMoveEventInfo:eo(j,this.transformPagePoint),this.history);this.startEvent&&E&&E(w,D),C&&C(w,D)},!Id(a))return;this.dragSnapToOrigin=d,this.handlers=s,this.transformPagePoint=r,this.distanceThreshold=h,this.contextWindow=o||window;const m=Cl(a),g=eo(m,this.transformPagePoint),{point:x}=g,{timestamp:y}=ct;this.history=[{...x,timestamp:y}];const{onSessionStart:S}=s;S&&S(a,zf(g,this.history)),this.removeListeners=El(ml(this.contextWindow,"pointermove",this.handlePointerMove),ml(this.contextWindow,"pointerup",this.handlePointerUp),ml(this.contextWindow,"pointercancel",this.handlePointerUp)),p&&this.startScrollTracking(p)}startScrollTracking(a){let s=a.parentElement;for(;s;){const r=getComputedStyle(s);(Y0.has(r.overflowX)||Y0.has(r.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(a){const s=this.scrollPositions.get(a);if(!s)return;const r=a===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},d={x:o.x-s.x,y:o.y-s.y};d.x===0&&d.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=d.x,this.lastMoveEventInfo.point.y+=d.y):this.history.length>0&&(this.history[0].x-=d.x,this.history[0].y-=d.y),this.scrollPositions.set(a,o),ke.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),xa(this.updatePoint)}}function eo(n,a){return a?{point:a(n.point)}:n}function G0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function zf({point:n},a){return{point:n,delta:G0(n,Hb(a)),offset:G0(n,GA(a)),velocity:XA(a,.1)}}function GA(n){return n[0]}function Hb(n){return n[n.length-1]}function XA(n,a){if(n.length<2)return{x:0,y:0};let s=n.length-1,r=null;const o=Hb(n);for(;s>=0&&(r=n[s],!(o.timestamp-r.timestamp>Ut(a)));)s--;if(!r)return{x:0,y:0};r===n[0]&&n.length>2&&o.timestamp-r.timestamp>Ut(a)*2&&(r=n[1]);const d=Pt(o.timestamp-r.timestamp);if(d===0)return{x:0,y:0};const h={x:(o.x-r.x)/d,y:(o.y-r.y)/d};return h.x===1/0&&(h.x=0),h.y===1/0&&(h.y=0),h}function KA(n,{min:a,max:s},r){return a!==void 0&&n<a?n=r?He(a,n,r.min):Math.max(n,a):s!==void 0&&n>s&&(n=r?He(s,n,r.max):Math.min(n,s)),n}function X0(n,a,s){return{min:a!==void 0?n.min+a:void 0,max:s!==void 0?n.max+s-(n.max-n.min):void 0}}function FA(n,{top:a,left:s,bottom:r,right:o}){return{x:X0(n.x,s,o),y:X0(n.y,a,r)}}function K0(n,a){let s=a.min-n.min,r=a.max-n.max;return a.max-a.min<n.max-n.min&&([s,r]=[r,s]),{min:s,max:r}}function ZA(n,a){return{x:K0(n.x,a.x),y:K0(n.y,a.y)}}function QA(n,a){let s=.5;const r=xt(n),o=xt(a);return o>r?s=vl(a.min,a.max-r,n.min):r>o&&(s=vl(n.min,n.max-o,a.min)),pn(0,1,s)}function PA(n,a){const s={};return a.min!==void 0&&(s.min=a.min-n.min),a.max!==void 0&&(s.max=a.max-n.min),s}const wd=.35;function JA(n=wd){return n===!1?n=0:n===!0&&(n=wd),{x:F0(n,"left","right"),y:F0(n,"top","bottom")}}function F0(n,a,s){return{min:Z0(n,a),max:Z0(n,s)}}function Z0(n,a){return typeof n=="number"?n:n[a]||0}const WA=new WeakMap;class IA{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:s=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const d=y=>{s&&this.snapToCursor(Cl(y).point),this.stopAnimation()},h=(y,S)=>{const{drag:w,dragPropagation:j,onDragStart:E}=this.getProps();if(w&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=N5(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=S,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fn(z=>{let D=this.getAxisMotionValue(z).get()||0;if(mn.test(D)){const{projection:R}=this.visualElement;if(R&&R.layout){const k=R.layout.layoutBox[z];k&&(D=xt(k)*(parseFloat(D)/100))}}this.originPoint[z]=D}),E&&ke.update(()=>E(y,S),!1,!0),hd(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},p=(y,S)=>{this.latestPointerEvent=y,this.latestPanInfo=S;const{dragPropagation:w,dragDirectionLock:j,onDirectionLock:E,onDrag:C}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:z}=S;if(j&&this.currentDirection===null){this.currentDirection=t3(z),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",S.point,z),this.updateAxis("y",S.point,z),this.visualElement.render(),C&&ke.update(()=>C(y,S),!1,!0)},m=(y,S)=>{this.latestPointerEvent=y,this.latestPanInfo=S,this.stop(y,S),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:x}=this.getProps();this.panSession=new Bb(a,{onSessionStart:d,onStart:h,onMove:p,onSessionEnd:m,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:x,distanceThreshold:r,contextWindow:Ub(this.visualElement),element:this.visualElement.current})}stop(a,s){const r=a||this.latestPointerEvent,o=s||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!o||!r)return;const{velocity:h}=o;this.startAnimation(h);const{onDragEnd:p}=this.getProps();p&&ke.postRender(()=>p(r,o))}cancel(){this.isDragging=!1;const{projection:a,animationState:s}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,s,r){const{drag:o}=this.getProps();if(!r||!to(a,o,this.currentDirection))return;const d=this.getAxisMotionValue(a);let h=this.originPoint[a]+r[a];this.constraints&&this.constraints[a]&&(h=KA(h,this.constraints[a],this.elastic[a])),d.set(h)}resolveConstraints(){var d;const{dragConstraints:a,dragElastic:s}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(d=this.visualElement.projection)==null?void 0:d.layout,o=this.constraints;a&&$i(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&r?this.constraints=FA(r.layoutBox,a):this.constraints=!1,this.elastic=JA(s),o!==this.constraints&&!$i(a)&&r&&this.constraints&&!this.hasMutatedConstraints&&fn(h=>{this.constraints!==!1&&this.getAxisMotionValue(h)&&(this.constraints[h]=PA(r.layoutBox[h],this.constraints[h]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:s}=this.getProps();if(!a||!$i(a))return!1;const r=a.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const d=tN(r,o.root,this.visualElement.getTransformPagePoint());let h=ZA(o.layout.layoutBox,d);if(s){const p=s(W5(h));this.hasMutatedConstraints=!!p,p&&(h=sb(p))}return h}startAnimation(a){const{drag:s,dragMomentum:r,dragElastic:o,dragTransition:d,dragSnapToOrigin:h,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=fn(x=>{if(!to(x,s,this.currentDirection))return;let y=m&&m[x]||{};(h===!0||h===x)&&(y={min:0,max:0});const S=o?200:1e6,w=o?40:1e7,j={type:"inertia",velocity:r?a[x]:0,bounceStiffness:S,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...d,...y};return this.startAxisValueAnimation(x,j)});return Promise.all(g).then(p)}startAxisValueAnimation(a,s){const r=this.getAxisMotionValue(a);return hd(this.visualElement,a),r.start(Zd(a,r,0,s,this.visualElement,!1))}stopAnimation(){fn(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const s=`_drag${a.toUpperCase()}`,r=this.visualElement.getProps(),o=r[s];return o||this.visualElement.getValue(a,(r.initial?r.initial[a]:void 0)||0)}snapToCursor(a){fn(s=>{const{drag:r}=this.getProps();if(!to(s,r,this.currentDirection))return;const{projection:o}=this.visualElement,d=this.getAxisMotionValue(s);if(o&&o.layout){const{min:h,max:p}=o.layout.layoutBox[s],m=d.get()||0;d.set(a[s]-He(h,p,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:s}=this.getProps(),{projection:r}=this.visualElement;if(!$i(s)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};fn(h=>{const p=this.getAxisMotionValue(h);if(p&&this.constraints!==!1){const m=p.get();o[h]=QA({min:m,max:m},this.constraints[h])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),fn(h=>{if(!to(h,a,null))return;const p=this.getAxisMotionValue(h),{min:m,max:g}=this.constraints[h];p.set(He(m,g,o[h]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;WA.set(this.visualElement,this);const a=this.visualElement.current,s=ml(a,"pointerdown",g=>{const{drag:x,dragListener:y=!0}=this.getProps(),S=g.target,w=S!==a&&R5(S);x&&y&&!w&&this.start(g)});let r;const o=()=>{const{dragConstraints:g}=this.getProps();$i(g)&&g.current&&(this.constraints=this.resolveRefConstraints(),r||(r=e3(a,g.current,()=>this.scalePositionWithinConstraints())))},{projection:d}=this.visualElement,h=d.addEventListener("measure",o);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),ke.read(o);const p=bl(window,"resize",()=>this.scalePositionWithinConstraints()),m=d.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:x})=>{this.isDragging&&x&&(fn(y=>{const S=this.getAxisMotionValue(y);S&&(this.originPoint[y]+=g[y].translate,S.set(S.get()+g[y].translate))}),this.visualElement.render())}));return()=>{p(),s(),h(),m&&m(),r&&r()}}getProps(){const a=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:d=!1,dragElastic:h=wd,dragMomentum:p=!0}=a;return{...a,drag:s,dragDirectionLock:r,dragPropagation:o,dragConstraints:d,dragElastic:h,dragMomentum:p}}}function Q0(n){let a=!0;return()=>{if(a){a=!1;return}n()}}function e3(n,a,s){const r=a0(n,Q0(s)),o=a0(a,Q0(s));return()=>{r(),o()}}function to(n,a,s){return(a===!0||a===n)&&(s===null||s===n)}function t3(n,a=10){let s=null;return Math.abs(n.y)>a?s="y":Math.abs(n.x)>a&&(s="x"),s}class n3 extends Sa{constructor(a){super(a),this.removeGroupControls=Jt,this.removeListeners=Jt,this.controls=new IA(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jt}update(){const{dragControls:a}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};a!==s&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const kf=n=>(a,s)=>{n&&ke.update(()=>n(a,s),!1,!0)};class a3 extends Sa{constructor(){super(...arguments),this.removePointerDownListener=Jt}onPointerDown(a){this.session=new Bb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ub(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:s,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:kf(a),onStart:kf(s),onMove:kf(r),onEnd:(d,h)=>{delete this.session,o&&ke.postRender(()=>o(d,h))}}}mount(){this.removePointerDownListener=ml(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Lf=!1;class i3 extends T.Component{componentDidMount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:r,layoutId:o}=this.props,{projection:d}=a;d&&(s.group&&s.group.add(d),r&&r.register&&o&&r.register(d),Lf&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ho.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:s,visualElement:r,drag:o,isPresent:d}=this.props,{projection:h}=r;return h&&(h.isPresent=d,a.layoutDependency!==s&&h.setOptions({...h.options,layoutDependency:s}),Lf=!0,o||a.layoutDependency!==s||s===void 0||a.isPresent!==d?h.willUpdate():this.safeToRemove(),a.isPresent!==d&&(d?h.promote():h.relegate()||ke.postRender(()=>{const p=h.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:a,layoutAnchor:s}=this.props,{projection:r}=a;r&&(r.options.layoutAnchor=s,r.root.didUpdate(),Wd.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:r}=this.props,{projection:o}=a;Lf=!0,o&&(o.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function $b(n){const[a,s]=rA(),r=T.useContext(yo);return f.jsx(i3,{...n,layoutGroup:r,switchLayoutGroup:T.useContext(Vb),isPresent:a,safeToRemove:s})}const s3={pan:{Feature:a3},drag:{Feature:n3,ProjectionNode:Nb,MeasureLayout:$b}};function P0(n,a,s){const{props:r}=n;n.animationState&&r.whileHover&&n.animationState.setActive("whileHover",s==="Start");const o="onHover"+s,d=r[o];d&&ke.postRender(()=>d(a,Cl(a)))}class l3 extends Sa{mount(){const{current:a}=this.node;a&&(this.unmount=C5(a,(s,r)=>(P0(this.node,r,"Start"),o=>P0(this.node,o,"End"))))}unmount(){}}class r3 extends Sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=El(bl(this.node.current,"focus",()=>this.onFocus()),bl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function J0(n,a,s){const{props:r}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&r.whileTap&&n.animationState.setActive("whileTap",s==="Start");const o="onTap"+(s==="End"?"":s),d=r[o];d&&ke.postRender(()=>d(a,Cl(a)))}class o3 extends Sa{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:s,propagate:r}=this.node.props;this.unmount=k5(a,(o,d)=>(J0(this.node,d,"Start"),(h,{success:p})=>J0(this.node,h,p?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Td=new WeakMap,Vf=new WeakMap,u3=n=>{const a=Td.get(n.target);a&&a(n)},c3=n=>{n.forEach(u3)};function f3({root:n,...a}){const s=n||document;Vf.has(s)||Vf.set(s,{});const r=Vf.get(s),o=JSON.stringify(a);return r[o]||(r[o]=new IntersectionObserver(c3,{root:n,...a})),r[o]}function d3(n,a,s){const r=f3(a);return Td.set(n,s),r.observe(n),()=>{Td.delete(n),r.unobserve(n)}}const h3={some:0,all:1};class m3 extends Sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var m;(m=this.stopObserver)==null||m.call(this);const{viewport:a={}}=this.node.getProps(),{root:s,margin:r,amount:o="some",once:d}=a,h={root:s?s.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:h3[o]},p=g=>{const{isIntersecting:x}=g;if(this.isInView===x||(this.isInView=x,d&&!x&&this.hasEnteredView))return;x&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",x);const{onViewportEnter:y,onViewportLeave:S}=this.node.getProps(),w=x?y:S;w&&w(g)};this.stopObserver=d3(this.node.current,h,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:s}=this.node;["amount","margin","root"].some(p3(a,s))&&this.startObserver()}unmount(){var a;(a=this.stopObserver)==null||a.call(this),this.hasEnteredView=!1,this.isInView=!1}}function p3({viewport:n={}},{viewport:a={}}={}){return s=>n[s]!==a[s]}const g3={inView:{Feature:m3},tap:{Feature:o3},focus:{Feature:r3},hover:{Feature:l3}},v3={layout:{ProjectionNode:Nb,MeasureLayout:$b}},x3={...$A,...g3,...s3,...v3},qb=VA(x3,_A),Yo=T.forwardRef(function(a,s){return f.jsx(LT,{children:f.jsx("a",{...a,ref:s})})}),Ws={base:["relative isolate inline-flex items-baseline justify-center gap-x-2 rounded-lg border text-base/6 font-semibold","px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)] sm:text-sm/6","focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500","data-disabled:opacity-50","*:data-[slot=icon]:-mx-0.5 *:data-[slot=icon]:my-0.5 *:data-[slot=icon]:size-5 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:self-center *:data-[slot=icon]:text-(--btn-icon) sm:*:data-[slot=icon]:my-1 sm:*:data-[slot=icon]:size-4 forced-colors:[--btn-icon:ButtonText] forced-colors:data-hover:[--btn-icon:ButtonText]"],solid:["border-transparent bg-(--btn-border)","dark:bg-(--btn-bg)","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(var(--radius-lg)-1px)] before:bg-(--btn-bg)","before:shadow-sm","dark:before:hidden","dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(var(--radius-lg)-1px)]","after:shadow-[inset_0_1px_--theme(--color-white/15%)]","data-active:after:bg-(--btn-hover-overlay) data-hover:after:bg-(--btn-hover-overlay)","dark:after:-inset-px dark:after:rounded-lg","data-disabled:before:shadow-none data-disabled:after:shadow-none"],outline:["border-zinc-950/10 text-zinc-950 data-active:bg-zinc-950/2.5 data-hover:bg-zinc-950/2.5","dark:border-white/15 dark:text-white dark:[--btn-bg:transparent] dark:data-active:bg-white/5 dark:data-hover:bg-white/5","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],plain:["border-transparent text-zinc-950 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","dark:text-white dark:data-active:bg-white/10 dark:data-hover:bg-white/10","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],colors:{"dark/zinc":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-white dark:[--btn-bg:var(--color-zinc-600)] dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],light:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:text-white dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],"dark/white":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-zinc-950 dark:[--btn-bg:white] dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],dark:["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],white:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-500)] data-hover:[--btn-icon:var(--color-zinc-500)]"],zinc:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-zinc-600)] [--btn-border:var(--color-zinc-700)]/90","dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],indigo:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-indigo-500)] [--btn-border:var(--color-indigo-600)]/90","[--btn-icon:var(--color-indigo-300)] data-active:[--btn-icon:var(--color-indigo-200)] data-hover:[--btn-icon:var(--color-indigo-200)]"],cyan:["text-cyan-950 [--btn-bg:var(--color-cyan-300)] [--btn-border:var(--color-cyan-400)]/80 [--btn-hover-overlay:var(--color-white)]/25","[--btn-icon:var(--color-cyan-500)]"],red:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-red-600)] [--btn-border:var(--color-red-700)]/90","[--btn-icon:var(--color-red-300)] data-active:[--btn-icon:var(--color-red-200)] data-hover:[--btn-icon:var(--color-red-200)]"],orange:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-orange-500)] [--btn-border:var(--color-orange-600)]/90","[--btn-icon:var(--color-orange-300)] data-active:[--btn-icon:var(--color-orange-200)] data-hover:[--btn-icon:var(--color-orange-200)]"],amber:["text-amber-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-amber-400)] [--btn-border:var(--color-amber-500)]/80","[--btn-icon:var(--color-amber-600)]"],yellow:["text-yellow-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-yellow-300)] [--btn-border:var(--color-yellow-400)]/80","[--btn-icon:var(--color-yellow-600)] data-active:[--btn-icon:var(--color-yellow-700)] data-hover:[--btn-icon:var(--color-yellow-700)]"],lime:["text-lime-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-lime-300)] [--btn-border:var(--color-lime-400)]/80","[--btn-icon:var(--color-lime-600)] data-active:[--btn-icon:var(--color-lime-700)] data-hover:[--btn-icon:var(--color-lime-700)]"],green:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-green-600)] [--btn-border:var(--color-green-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],emerald:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-emerald-600)] [--btn-border:var(--color-emerald-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],teal:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-teal-600)] [--btn-border:var(--color-teal-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],sky:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-sky-500)] [--btn-border:var(--color-sky-600)]/80","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],blue:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-blue-600)] [--btn-border:var(--color-blue-700)]/90","[--btn-icon:var(--color-blue-400)] data-active:[--btn-icon:var(--color-blue-300)] data-hover:[--btn-icon:var(--color-blue-300)]"],violet:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-violet-500)] [--btn-border:var(--color-violet-600)]/90","[--btn-icon:var(--color-violet-300)] data-active:[--btn-icon:var(--color-violet-200)] data-hover:[--btn-icon:var(--color-violet-200)]"],purple:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-purple-500)] [--btn-border:var(--color-purple-600)]/90","[--btn-icon:var(--color-purple-300)] data-active:[--btn-icon:var(--color-purple-200)] data-hover:[--btn-icon:var(--color-purple-200)]"],fuchsia:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-fuchsia-500)] [--btn-border:var(--color-fuchsia-600)]/90","[--btn-icon:var(--color-fuchsia-300)] data-active:[--btn-icon:var(--color-fuchsia-200)] data-hover:[--btn-icon:var(--color-fuchsia-200)]"],pink:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-pink-500)] [--btn-border:var(--color-pink-600)]/90","[--btn-icon:var(--color-pink-300)] data-active:[--btn-icon:var(--color-pink-200)] data-hover:[--btn-icon:var(--color-pink-200)]"],rose:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-rose-500)] [--btn-border:var(--color-rose-600)]/90","[--btn-icon:var(--color-rose-300)] data-active:[--btn-icon:var(--color-rose-200)] data-hover:[--btn-icon:var(--color-rose-200)]"]}};T.forwardRef(function({color:a,outline:s,plain:r,className:o,children:d,...h},p){let m=Fe(o,Ws.base,s?Ws.outline:r?Ws.plain:Fe(Ws.solid,Ws.colors[a??"dark/zinc"]));return typeof h.href=="string"?f.jsx(Yo,{...h,className:m,ref:p,children:f.jsx(ya,{children:d})}):f.jsx(Tl,{...h,className:Fe(m,"cursor-default"),ref:p,children:f.jsx(ya,{children:d})})});function ya({children:n}){return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"absolute top-1/2 left-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 pointer-fine:hidden","aria-hidden":"true"}),n]})}function y3({className:n,...a}){return f.jsx("nav",{...a,className:Fe(n,"flex flex-1 items-center gap-4 py-2.5")})}function b3({className:n,...a}){let s=T.useId();return f.jsx(Mb,{id:s,children:f.jsx("div",{...a,className:Fe(n,"flex items-center gap-3")})})}function S3({className:n,...a}){return f.jsx("div",{"aria-hidden":"true",...a,className:Fe(n,"-ml-4 flex-1")})}const rh=T.forwardRef(function({current:a,className:s,children:r,...o},d){let h=Fe("relative flex min-w-0 items-center gap-3 rounded-lg p-2 text-left text-base/6 font-medium text-zinc-950 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:not-nth-2:last:data-[slot=icon]:ml-auto *:not-nth-2:last:data-[slot=icon]:size-5 sm:*:not-nth-2:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 *:data-[slot=avatar]:[--avatar-radius:var(--radius-md)] sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white");return f.jsxs("span",{className:Fe(s,"relative"),children:[a&&f.jsx(qb.span,{layoutId:"current-indicator",className:"absolute inset-x-2 -bottom-2.5 h-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof o.href=="string"?f.jsx(Yo,{...o,className:h,"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})}):f.jsx(Tl,{...o,className:Fe("cursor-default",h),"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})})]})});function w3(){return f.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:f.jsx("path",{d:"M2 6.75C2 6.33579 2.33579 6 2.75 6H17.25C17.6642 6 18 6.33579 18 6.75C18 7.16421 17.6642 7.5 17.25 7.5H2.75C2.33579 7.5 2 7.16421 2 6.75ZM2 13.25C2 12.8358 2.33579 12.5 2.75 12.5H17.25C17.6642 12.5 18 12.8358 18 13.25C18 13.6642 17.6642 14 17.25 14H2.75C2.33579 14 2 13.6642 2 13.25Z"})})}function T3(){return f.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:f.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})})}function j3({open:n,close:a,children:s}){return f.jsxs(xj,{open:n,onClose:a,className:"lg:hidden",children:[f.jsx(gj,{transition:!0,className:"fixed inset-0 bg-black/30 transition data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in"}),f.jsx(Ix,{transition:!0,className:"fixed inset-y-0 w-full max-w-80 p-2 transition duration-300 ease-in-out data-closed:-translate-x-full",children:f.jsxs("div",{className:"flex h-full flex-col rounded-lg bg-ouro-deep shadow-xl ring-1 ring-ouro-moss/40",children:[f.jsx("div",{className:"-mb-3 px-4 pt-3",children:f.jsx(Cx,{as:rh,"aria-label":"Close navigation",children:f.jsx(T3,{})})}),s]})})]})}function E3({navbar:n,sidebar:a,children:s}){let[r,o]=T.useState(!1);return f.jsxs("div",{className:"relative isolate flex min-h-svh w-full bg-ouro-void max-lg:flex-col",children:[f.jsx("div",{className:"fixed inset-y-0 left-0 w-64 max-lg:hidden border-r border-zinc-200 dark:border-ouro-moss/30",children:a}),f.jsx(j3,{open:r,close:()=>o(!1),children:a}),f.jsxs("header",{className:"flex items-center px-4 lg:hidden",children:[f.jsx("div",{className:"py-2.5",children:f.jsx(rh,{onClick:()=>o(!0),"aria-label":"Open navigation",children:f.jsx(w3,{})})}),f.jsx("div",{className:"min-w-0 flex-1",children:n})]}),f.jsx("main",{className:"flex flex-1 flex-col lg:min-w-0 lg:pl-64",children:f.jsx("div",{className:"grow bg-ouro-deep p-4 lg:p-8",children:f.jsx("div",{className:"mx-auto max-w-6xl",children:s})})})]})}function N3({className:n,...a}){return f.jsx("nav",{...a,className:Fe(n,"flex h-full min-h-0 flex-col")})}function A3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-col border-b border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function C3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-1 flex-col overflow-y-auto p-4 [&>[data-slot=section]+[data-slot=section]]:mt-8")})}function M3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-col border-t border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function W0({className:n,...a}){let s=T.useId();return f.jsx(Mb,{id:s,children:f.jsx("div",{...a,"data-slot":"section",className:Fe(n,"flex flex-col gap-0.5")})})}function I0({className:n,...a}){return f.jsx("h3",{...a,className:Fe(n,"mb-1 px-2 text-xs/6 font-medium text-zinc-500 dark:text-zinc-400")})}const D3=T.forwardRef(function({current:a,className:s,children:r,...o},d){let h=Fe("flex w-full items-center gap-3 rounded-lg px-2 py-2.5 text-left text-base/6 font-medium text-zinc-950 sm:py-2 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:last:data-[slot=icon]:ml-auto *:last:data-[slot=icon]:size-5 sm:*:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","data-current:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white","dark:data-current:*:data-[slot=icon]:fill-white");return f.jsxs("span",{className:Fe(s,"relative"),children:[a&&f.jsx(qb.span,{layoutId:"current-indicator",className:"absolute inset-y-2 -left-4 w-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof o.href=="string"?f.jsx(Cx,{as:Yo,...o,className:h,"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})}):f.jsx(Tl,{...o,className:Fe("cursor-default",h),"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})})]})});function O3({className:n,...a}){return f.jsx("span",{...a,className:Fe(n,"truncate")})}const R3={red:"bg-red-500/15 text-red-700 group-data-hover:bg-red-500/25 dark:bg-red-500/10 dark:text-red-400 dark:group-data-hover:bg-red-500/20",orange:"bg-orange-500/15 text-orange-700 group-data-hover:bg-orange-500/25 dark:bg-orange-500/10 dark:text-orange-400 dark:group-data-hover:bg-orange-500/20",amber:"bg-amber-400/20 text-amber-700 group-data-hover:bg-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400 dark:group-data-hover:bg-amber-400/15",yellow:"bg-yellow-400/20 text-yellow-700 group-data-hover:bg-yellow-400/30 dark:bg-yellow-400/10 dark:text-yellow-300 dark:group-data-hover:bg-yellow-400/15",lime:"bg-lime-400/20 text-lime-700 group-data-hover:bg-lime-400/30 dark:bg-lime-400/10 dark:text-lime-300 dark:group-data-hover:bg-lime-400/15",green:"bg-green-500/15 text-green-700 group-data-hover:bg-green-500/25 dark:bg-green-500/10 dark:text-green-400 dark:group-data-hover:bg-green-500/20",emerald:"bg-emerald-500/15 text-emerald-700 group-data-hover:bg-emerald-500/25 dark:bg-emerald-500/10 dark:text-emerald-400 dark:group-data-hover:bg-emerald-500/20",teal:"bg-teal-500/15 text-teal-700 group-data-hover:bg-teal-500/25 dark:bg-teal-500/10 dark:text-teal-300 dark:group-data-hover:bg-teal-500/20",cyan:"bg-cyan-400/20 text-cyan-700 group-data-hover:bg-cyan-400/30 dark:bg-cyan-400/10 dark:text-cyan-300 dark:group-data-hover:bg-cyan-400/15",sky:"bg-sky-500/15 text-sky-700 group-data-hover:bg-sky-500/25 dark:bg-sky-500/10 dark:text-sky-300 dark:group-data-hover:bg-sky-500/20",blue:"bg-blue-500/15 text-blue-700 group-data-hover:bg-blue-500/25 dark:text-blue-400 dark:group-data-hover:bg-blue-500/25",indigo:"bg-indigo-500/15 text-indigo-700 group-data-hover:bg-indigo-500/25 dark:text-indigo-400 dark:group-data-hover:bg-indigo-500/20",violet:"bg-violet-500/15 text-violet-700 group-data-hover:bg-violet-500/25 dark:text-violet-400 dark:group-data-hover:bg-violet-500/20",purple:"bg-purple-500/15 text-purple-700 group-data-hover:bg-purple-500/25 dark:text-purple-400 dark:group-data-hover:bg-purple-500/20",fuchsia:"bg-fuchsia-400/15 text-fuchsia-700 group-data-hover:bg-fuchsia-400/25 dark:bg-fuchsia-400/10 dark:text-fuchsia-400 dark:group-data-hover:bg-fuchsia-400/20",pink:"bg-pink-400/15 text-pink-700 group-data-hover:bg-pink-400/25 dark:bg-pink-400/10 dark:text-pink-400 dark:group-data-hover:bg-pink-400/20",rose:"bg-rose-400/15 text-rose-700 group-data-hover:bg-rose-400/25 dark:bg-rose-400/10 dark:text-rose-400 dark:group-data-hover:bg-rose-400/20",zinc:"bg-zinc-600/10 text-zinc-700 group-data-hover:bg-zinc-600/20 dark:bg-white/5 dark:text-zinc-400 dark:group-data-hover:bg-white/10"};function xe({color:n="zinc",className:a,...s}){return f.jsx("span",{...s,className:Fe(a,"inline-flex items-center gap-x-1.5 rounded-md px-1.5 py-0.5 text-sm/5 font-medium sm:text-xs/5 forced-colors:outline",R3[n])})}T.forwardRef(function({color:a="zinc",className:s,children:r,...o},d){let h=Fe(s,"group relative inline-flex rounded-md focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500");return typeof o.href=="string"?f.jsx(Yo,{...o,className:h,ref:d,children:f.jsx(ya,{children:f.jsx(xe,{color:a,children:r})})}):f.jsx(Tl,{...o,className:h,ref:d,children:f.jsx(ya,{children:f.jsx(xe,{color:a,children:r})})})});function z3(n){T.useEffect(()=>{if(!n)return;const a=n;function s(r){if(!(r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement))switch(r.key){case"1":a({tab:"overview"});break;case"2":a({tab:"mail"});break;case"3":a({tab:"sessions"});break;case"4":a({tab:"work"});break;case"5":a({tab:"connections"});break;case"6":a({tab:"inner"});break;case"7":a({tab:"notes"});break;case"8":a({tab:"runtime"});break;case"Escape":{document.activeElement instanceof HTMLElement&&document.activeElement.blur();break}}}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n])}const k3={"owed-reply":"red","blocking-obligation":"red","broken-return":"red","stale-delegation":"yellow","return-ready":"lime","overdue-habit":"yellow"},L3={"owed-reply":"owed reply","blocking-obligation":"blocking","broken-return":"broken return","stale-delegation":"stale","return-ready":"ready to return","overdue-habit":"overdue"},V3={"owed-reply":"Someone spoke last and is waiting for your response","blocking-obligation":"This obligation is open and blocking forward progress","broken-return":"Work was done but the result was never returned to the requester","stale-delegation":"This was delegated to you and hasn't been addressed","return-ready":"The result is ready — deliver it to close the loop","overdue-habit":"This routine is past its scheduled cadence"},_3=new Set(["stale-delegation"]),U3=new Set(["owed-reply","blocking-obligation","broken-return","return-ready","overdue-habit"]),B3=new Set(["spawning","running","waiting_input","stalled"]);function H3({view:n,deskPrefs:a,refreshGeneration:s}){const r=Pi(),[o,d]=T.useState(null),[h,p]=T.useState(null),[m,g]=T.useState(null),[x,y]=T.useState(null),[S,w]=T.useState(null),j=n.agent,E=n.work,C=n.inner,z=n.activity,D=j.degraded,R=j.attention,k=E.tasks,U=E.obligations,P=E.sessions,F=E.coding,W=j.senses,re=E.bridges;return T.useEffect(()=>{_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d),_e(`/agents/${encodeURIComponent(j.agentName)}/coding`).then(p),_e(`/agents/${encodeURIComponent(j.agentName)}/continuity`).then(g).catch(()=>{}),_e(`/agents/${encodeURIComponent(j.agentName)}/orientation`).then(y).catch(()=>{}),_e(`/agents/${encodeURIComponent(j.agentName)}/changes`).then(w).catch(()=>{})},[j.agentName,s]),f.jsxs("div",{className:"space-y-6",children:[o&&o.items.length>0&&(()=>{const B=o.items.filter(ie=>U3.has(ie.urgency)),Z=o.items.filter(ie=>_3.has(ie.urgency));return f.jsxs("div",{className:"space-y-3",children:[B.length>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-fang/5 p-4 ring-1 ring-ouro-fang/15",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-fang",children:["Action now (",B.length,")"]}),f.jsx("div",{className:"mt-2 space-y-1.5",children:B.map((ie,le)=>f.jsx(ex,{item:ie,nav:r,agentName:j.agentName,onDismiss:()=>{d(Se=>Se&&{items:Se.items.filter((De,$)=>o.items.indexOf(ie)!==$)})}},`action-${le}`))})]}),Z.length>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["Stale (",Z.length,")"]}),f.jsx("button",{onClick:async()=>{var ie;for(const le of Z)(ie=le.ref)!=null&&ie.focus&&await fetch(`/api/agents/${encodeURIComponent(j.agentName)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:le.ref.focus})});_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d)},className:"text-xs text-ouro-gold underline underline-offset-2 hover:text-ouro-bone transition-colors",children:"Clear all stale"})]}),f.jsx("div",{className:"mt-2 space-y-1.5",children:Z.map((ie,le)=>f.jsx(ex,{item:ie,nav:r,agentName:j.agentName,onDismiss:()=>{_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d)}},`stale-${le}`))})]})]})})(),(a==null?void 0:a.carrying)&&f.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"What I'm carrying"}),f.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-bone",children:a.carrying})]}),(()=>{const B=(a==null?void 0:a.pinnedConstellations)??[];return B.length===0?null:f.jsxs("div",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Pinned threads"}),f.jsx("div",{className:"mt-2 space-y-2",children:B.map((Z,ie)=>f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-medium text-ouro-bone",children:Z.label}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-1.5",children:[Z.friendIds.map(le=>f.jsxs("button",{onClick:()=>r({tab:"sessions"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["friend:",le.slice(0,8),"…"]},le)),Z.taskRefs.map(le=>f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["task:",le]},le)),Z.bridgeIds.map(le=>f.jsxs("button",{onClick:()=>r({tab:"connections",focus:le}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["bridge:",le.slice(0,8),"…"]},le))]})]},ie))})]})})(),f.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10 sm:p-5",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Center of gravity"}),f.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone sm:text-2xl",children:R.label}),f.jsxs("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:[j.agentName," has"," ",f.jsxs(no,{tab:"work",children:[k.liveCount," live tasks"]}),","," ",f.jsxs(no,{tab:"work",children:[U.openCount," obligations"]}),","," ",f.jsxs(no,{tab:"work",children:[F.activeCount," coding lanes"]}),", and"," ",f.jsxs(no,{tab:"sessions",children:[P.liveCount," live sessions"]}),"."]}),D.status==="degraded"&&D.issues.length>0&&f.jsxs("div",{className:"mt-3 space-y-1",children:[D.issues.slice(0,5).map((B,Z)=>f.jsxs("button",{onClick:()=>r({tab:"runtime"}),className:"flex w-full items-start gap-2 rounded-lg bg-ouro-fang/5 px-3 py-2 text-left text-sm ring-1 ring-ouro-fang/10 hover:ring-ouro-fang/25 transition-colors",children:[f.jsx("span",{className:"mt-0.5 h-2 w-2 shrink-0 rounded-full bg-ouro-fang"}),f.jsxs("span",{className:"text-ouro-mist",children:[f.jsx("span",{className:"font-semibold text-ouro-fang",children:B.code}),f.jsxs("span",{className:"text-ouro-shadow",children:[" — ",pt(B.detail,80)]})]})]},Z)),D.issues.length>5&&f.jsxs("button",{onClick:()=>r({tab:"runtime"}),className:"text-xs text-ouro-glow underline underline-offset-2",children:["+",D.issues.length-5," more issues"]})]})]}),x&&f.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Orientation"}),(()=>{const B=x.currentSession;return B?f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx(xe,{color:"lime",children:"active session"}),f.jsxs("button",{onClick:()=>r({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"text-sm text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:[B.channel,"/",B.key]}),B.lastActivityAt&&f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(B.lastActivityAt)})]}):null})(),x.primaryObligation&&f.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:"yellow",children:x.primaryObligation.status}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:pt(x.primaryObligation.content,80)})]}),x.primaryObligation.nextAction&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-mist",children:["Next: ",x.primaryObligation.nextAction]}),x.primaryObligation.waitingOn&&f.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Waiting on: ",x.primaryObligation.waitingOn]})]}),x.resumeHandle&&f.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Resume handle"}),f.jsxs("div",{className:"mt-1 space-y-0.5 text-sm",children:[x.resumeHandle.lane&&f.jsxs("p",{className:"text-ouro-bone",children:["Lane: ",x.resumeHandle.lane]}),x.resumeHandle.artifact&&f.jsxs("p",{className:"text-ouro-mist",children:["Artifact: ",x.resumeHandle.artifact]}),x.resumeHandle.nextAction&&f.jsxs("p",{className:"text-ouro-mist",children:["Next: ",x.resumeHandle.nextAction]}),x.resumeHandle.blockerOrWaitingOn&&f.jsxs("p",{className:"text-ouro-shadow",children:["Blocked: ",x.resumeHandle.blockerOrWaitingOn]}),f.jsxs(xe,{color:x.resumeHandle.confidence==="high"?"lime":x.resumeHandle.confidence==="medium"?"yellow":"zinc",children:[x.resumeHandle.confidence," confidence"]})]})]}),x.otherActiveSessions.length>0&&f.jsxs("div",{className:"mt-2",children:[f.jsxs("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:["Other sessions (",x.otherActiveSessions.length,")"]}),f.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:x.otherActiveSessions.slice(0,5).map(B=>f.jsx("button",{onClick:()=>r({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:B.friendName},`${B.friendId}/${B.channel}/${B.key}`))})]})]}),S&&S.changeCount>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["What changed (",S.changeCount,")"]}),S.snapshotAge&&f.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Since ",et(S.snapshotAge)]}),f.jsxs("div",{className:"mt-2 space-y-1",children:[S.items.slice(0,8).map((B,Z)=>f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(xe,{color:B.kind.includes("status")?"yellow":"zinc",children:B.kind.replace(/_/g," ")}),f.jsx("span",{className:"truncate text-ouro-mist",children:B.summary})]},Z)),S.items.length>8&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["+",S.items.length-8," more changes"]})]})]}),m&&f.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Presence"}),m.presence.self?f.jsxs("div",{className:"mt-2 space-y-1",children:[f.jsx("p",{className:"text-sm font-medium text-ouro-bone",children:m.presence.self.availability}),m.presence.self.lane&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Lane: ",m.presence.self.lane]}),m.presence.self.tempo&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Tempo: ",m.presence.self.tempo]})]}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No presence data"}),m.presence.peers.length>0&&f.jsxs("div",{className:"mt-2 border-t border-ouro-moss/20 pt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:"Peers"}),f.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:m.presence.peers.map(B=>f.jsx(xe,{color:B.availability==="active"?"lime":"zinc",children:B.agentName},B.agentName))})]})]}),f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Cares (",m.cares.activeCount,")"]}),m.cares.items.length>0?f.jsx("div",{className:"mt-2 space-y-1.5",children:m.cares.items.slice(0,5).map(B=>f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:B.salience==="high"?"red":B.salience==="medium"?"yellow":"zinc",children:B.salience}),f.jsx("p",{className:"truncate text-sm text-ouro-bone",children:B.label})]},B.id))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No active cares"})]}),f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Episodes (",m.episodes.recentCount,")"]}),m.episodes.items.length>0?f.jsx("div",{className:"mt-2 space-y-1.5",children:m.episodes.items.slice(0,5).map(B=>f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(xe,{color:"zinc",children:B.kind}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"truncate text-sm text-ouro-bone",children:B.summary}),f.jsx("p",{className:"text-xs text-ouro-shadow",children:et(B.timestamp)})]})]},B.id))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No recent episodes"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[f.jsx(ao,{label:"Tasks",value:k.liveCount,sub:`${k.blockedCount} blocked`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Obligations",value:U.openCount,sub:`${P.liveCount} sessions`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Coding",value:F.activeCount,sub:`${F.blockedCount} blocked`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Inner",value:C.status,sub:pt(C.summary??"",30),onClick:()=>r({tab:"inner"})})]}),h&&h.items.length>0&&(()=>{const B=h.items.filter(Z=>B3.has(Z.status));return B.length===0?null:f.jsx(Is,{title:`Active coding (${B.length})`,children:f.jsx("div",{className:"space-y-1.5",children:B.map(Z=>f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"flex w-full items-center gap-2 rounded-lg bg-ouro-void/40 px-3 py-2 text-left ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:[f.jsx(xe,{color:Z.status==="running"?"lime":Z.status==="waiting_input"?"yellow":"zinc",children:Z.status}),f.jsxs("span",{className:"truncate text-sm text-ouro-bone",children:[Z.runner," — ",pt(Z.workdir,40)]}),f.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:et(Z.lastActivityAt)})]},Z.id))})})})(),f.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[f.jsx(Is,{title:"Senses",children:W.length>0?f.jsx($3,{items:W}):f.jsx(_f,{children:"No active senses"})}),f.jsx(Is,{title:"Bridges",children:re.length>0?f.jsx("div",{className:"flex flex-wrap gap-1.5",children:re.map(B=>f.jsx("button",{onClick:()=>r({tab:"connections",focus:B}),children:f.jsx(xe,{color:"lime",children:B})},B))}):f.jsx(_f,{children:"No active bridges"})})]}),(()=>{const B=U.items.filter(Z=>Z.status==="fulfilled");return B.length===0?null:f.jsx(Is,{title:"Recently closed",children:f.jsx("div",{className:"space-y-1",children:B.slice(0,3).map((Z,ie)=>f.jsxs("div",{className:"flex items-center gap-2 rounded-lg px-3 py-2 bg-ouro-glow/5 ring-1 ring-ouro-glow/10",children:[f.jsx(xe,{color:"lime",children:"closed"}),f.jsx("p",{className:"text-sm text-ouro-mist truncate",children:pt(Z.content,80)}),f.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:et(Z.updatedAt)})]},ie))})})})(),f.jsx(Is,{title:"Recent activity",children:z.recent.length>0?f.jsx("div",{className:"space-y-1",children:z.recent.map((B,Z)=>{const ie=B.kind==="coding"||B.kind==="obligation"?"work":B.kind==="session"?"sessions":"inner";return f.jsxs("button",{onClick:()=>r({tab:ie}),className:"flex w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left hover:bg-ouro-moss/10 transition-colors",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{children:B.kind}),f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(B.at)})]}),f.jsx("p",{className:"truncate text-sm font-medium text-ouro-bone",children:pt(B.label,100)}),f.jsx("p",{className:"truncate text-xs text-ouro-shadow",children:pt(B.detail,80)})]},Z)})}):f.jsx(_f,{children:"No recent activity yet."})})]})}function ex({item:n,nav:a,agentName:s,onDismiss:r}){var h;const o=n.urgency==="return-ready",d=(h=n.ref)==null?void 0:h.focus;return f.jsxs("div",{className:`flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left ring-1 transition-colors ${o?"bg-ouro-glow/5 ring-ouro-glow/15":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[f.jsxs("button",{onClick:()=>n.ref&&a({tab:n.ref.tab,focus:n.ref.focus}),className:"flex min-w-0 flex-1 items-start gap-2.5",children:[f.jsx(xe,{color:k3[n.urgency]??"zinc",children:L3[n.urgency]??n.urgency}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("p",{className:`text-sm font-medium ${o?"text-ouro-glow":"text-ouro-bone"}`,children:n.label}),f.jsx("p",{className:"text-xs text-ouro-shadow truncate",children:n.detail}),f.jsx("p",{className:"text-[10px] italic text-ouro-shadow/60 mt-0.5",children:V3[n.urgency]??""})]}),n.ageMs!=null&&f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:n.ageMs<36e5?`${Math.floor(n.ageMs/6e4)}m`:n.ageMs<864e5?`${Math.floor(n.ageMs/36e5)}h`:`${Math.floor(n.ageMs/864e5)}d`})]}),d&&f.jsx("button",{onClick:async p=>{p.stopPropagation(),await fetch(`/api/agents/${encodeURIComponent(s)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:d})}),r()},className:"shrink-0 text-xs text-ouro-shadow hover:text-ouro-fang transition-colors",title:"Dismiss",children:"✕"})]})}function no({tab:n,children:a}){const s=Pi();return f.jsx("button",{onClick:()=>s({tab:n}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow transition-colors",children:a})}function ao({label:n,value:a,sub:s,onClick:r}){return f.jsxs("button",{onClick:r,className:"rounded-xl bg-ouro-void/50 p-3 text-left ring-1 ring-ouro-moss/20 hover:ring-ouro-glow/20 transition-all",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),f.jsx("p",{className:"mt-1 text-xl font-semibold tabular-nums text-ouro-bone",children:a}),f.jsx("p",{className:"mt-0.5 truncate text-xs text-ouro-shadow",children:s})]})}function Is({title:n,children:a}){return f.jsxs("div",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n}),f.jsx("div",{className:"mt-2",children:a})]})}function $3({items:n}){return f.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(a=>f.jsx(xe,{color:"lime",children:a},a))})}function _f({children:n}){return f.jsx("p",{className:"text-sm text-ouro-shadow",children:n})}function pl(n){return n.length>0?n.join(", "):"(unknown)"}function q3(n,a){if(a==="all")return!0;if(["imbox","screener","discarded","quarantine"].includes(a))return n.placement===a;if(a==="native"||a==="delegated")return n.compartmentKind===a;if(a.startsWith("source:")){const s=a.slice(7),r=s.indexOf(":");if(r===-1)return n.source===s;const o=s.slice(0,r),d=s.slice(r+1);return n.source===o&&(n.ownerEmail??"unknown-owner")===d}return!1}function Yb(n){return n.subject||"(no subject)"}function Y3(n,a){return{status:"error",agentName:n,mailboxAddress:null,generatedAt:new Date().toISOString(),store:null,folders:[],messages:[],screener:[],outbound:[],recovery:{discardedCount:0,quarantineCount:0,undecryptableCount:0,missingKeyIds:[]},accessLog:[],error:a}}function G3(n,a,s){return{status:"error",agentName:n,mailboxAddress:a,generatedAt:new Date().toISOString(),message:null,accessLog:[],error:s}}function Gb(n){return n.provenance.compartmentKind==="delegated"?`delegated human mailbox · ${n.provenance.ownerEmail??"unknown owner"} / ${n.provenance.source??"unknown source"}`:"native agent mailbox"}function X3(n){return n.mailboxRole==="delegated-human-mailbox"?`delegated human mailbox · ${n.ownerEmail??"unknown owner"} / ${n.source??"unknown source"}`:n.mailboxRole==="agent-native-mailbox"?"native agent mailbox":"mailbox"}function K3(n){return n.sendAuthority==="agent-native"?"native agent mailbox":n.mailboxRole}function F3(n){return n.transport??n.provider??"not sent"}function Z3(n){return n.deliveredAt??n.failedAt??n.acceptedAt??n.sentAt??n.submittedAt??n.updatedAt}function oh(n){return n==="screener"?"bg-[#fff7d6] text-[#6f5200] ring-[#e7c85c]":n==="discarded"||n==="quarantine"?"bg-[#ffe8e2] text-[#8a2f1f] ring-[#ef9a84]":n==="sent"?"bg-[#dff7ea] text-[#17613a] ring-[#82caa1]":n==="draft"?"bg-[#e7ecff] text-[#263f95] ring-[#a7b5f5]":"bg-[#e9f3ef] text-[#1e5840] ring-[#9fc7b5]"}function Q3(n){return(n==null?void 0:n.messages.length)??0}function P3({agentName:n,focus:a,onFocusConsumed:s,refreshGeneration:r}){var z;const[o,d]=T.useState(null),[h,p]=T.useState("all"),[m,g]=T.useState(a??null),[x,y]=T.useState(null),[S,w]=T.useState(!1);T.useEffect(()=>{p("all"),g(a??null),y(null)},[n]),T.useEffect(()=>{d(null),_e(`/agents/${encodeURIComponent(n)}/mail`).then(d).catch(()=>d(Y3(n,"mail unavailable")))},[n,r]),T.useEffect(()=>{a&&(g(a),s==null||s())},[a,s]),T.useEffect(()=>{if(!m){y(null);return}w(!0),_e(`/agents/${encodeURIComponent(n)}/mail/${encodeURIComponent(m)}`).then(y).catch(()=>y(G3(n,(o==null?void 0:o.mailboxAddress)??null,"message unavailable"))).finally(()=>w(!1))},[n,m,r]);const j=T.useMemo(()=>{const D=(o==null?void 0:o.folders)??[];return[{id:"all",label:"All",count:Q3(o)},...D]},[o]),E=T.useMemo(()=>((o==null?void 0:o.messages)??[]).filter(D=>q3(D,h)),[h,o]),C=T.useMemo(()=>h!=="draft"&&h!=="sent"?[]:((o==null?void 0:o.outbound)??[]).filter(D=>h==="draft"?D.status==="draft":D.status!=="draft"),[h,o]);return o?o.status!=="ready"?f.jsx("div",{className:"mailbox-shell grid min-h-[58vh] place-items-center rounded-md bg-[#f2f6ef] p-8 text-[#1f2720] ring-1 ring-black/10",children:f.jsxs("div",{className:"max-w-lg text-center",children:[f.jsx("p",{className:"text-sm font-semibold text-[#667067]",children:"Mailbox"}),f.jsx("h2",{className:"mt-2 text-2xl font-semibold",children:o.status==="auth-required"?"Locked":"Unavailable"}),f.jsx("p",{className:"mt-3 text-sm leading-6 text-[#59645c]",children:o.error})]})}):f.jsxs("div",{className:"mailbox-shell overflow-hidden rounded-md bg-[#f2f6ef] text-[#172018] ring-1 ring-black/10",children:[f.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-[#cbd8c8] bg-[#e4ecdf] px-4 py-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"text-xs font-semibold text-[#687062]",children:"Agent mailbox"}),f.jsx("p",{className:"truncate text-sm text-[#2d3a30]",children:o.mailboxAddress})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:"zinc",children:"read-only"}),f.jsxs("span",{className:"text-xs tabular-nums text-[#687062]",children:[o.messages.length," messages"]}),f.jsxs("span",{className:"text-xs tabular-nums text-[#687062]",children:[o.outbound.length," outbound"]})]})]}),f.jsxs("div",{className:"grid min-h-[66vh] grid-cols-1 lg:grid-cols-[14.5rem_minmax(19rem,25rem)_minmax(0,1fr)]",children:[f.jsxs("aside",{className:"border-b border-[#cbd8c8] bg-[#e4ecdf] p-3 lg:border-b-0 lg:border-r",children:[f.jsx(J3,{folders:j,activeFolder:h,setActiveFolder:p}),f.jsx(W3,{discarded:o.recovery.discardedCount,quarantine:o.recovery.quarantineCount,undecryptable:o.recovery.undecryptableCount,missingKeyIds:o.recovery.missingKeyIds}),f.jsx(I3,{candidates:o.screener,onOpen:D=>{p("screener"),g(D)}}),f.jsx(eC,{entries:o.accessLog})]}),f.jsxs("section",{className:"border-b border-[#cbd8c8] bg-[#fbfdf8] lg:border-b-0 lg:border-r",children:[f.jsxs("div",{className:"border-b border-[#d8e2d4] px-4 py-3",children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:((z=j.find(D=>D.id===h))==null?void 0:z.label)??"All"}),f.jsx("p",{className:"text-xs text-[#687062]",children:C.length>0?`${C.length} outbound records`:`${E.length} messages`})]}),f.jsxs("div",{className:"max-h-[66vh] overflow-y-auto",children:[C.map(D=>f.jsx(nC,{record:D},D.id)),C.length===0&&E.map(D=>f.jsx(tC,{message:D,selected:m===D.id,onSelect:()=>g(D.id)},D.id)),C.length===0&&E.length===0&&f.jsx("div",{className:"px-4 py-10 text-center text-sm text-[#687062]",children:"No records here."})]})]}),f.jsxs("main",{className:"min-w-0 bg-[#fbfdf8]",children:[!m&&f.jsx(iC,{}),m&&S&&f.jsx(tx,{label:"Opening message"}),m&&!S&&(x==null?void 0:x.status)!=="ready"&&f.jsx("div",{className:"grid min-h-[54vh] place-items-center p-8 text-center",children:f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:"Message unavailable"}),f.jsx("p",{className:"mt-2 text-sm text-[#687062]",children:x==null?void 0:x.error})]})}),(x==null?void 0:x.status)==="ready"&&x.message&&f.jsx(aC,{detail:x})]})]})]}):f.jsx(tx,{label:"Opening mailbox"})}function J3({folders:n,activeFolder:a,setActiveFolder:s}){return f.jsx("div",{className:"space-y-1",children:n.map(r=>f.jsxs("button",{type:"button",onClick:()=>s(r.id),className:`flex h-9 w-full items-center justify-between rounded px-3 text-left text-sm transition-colors ${a===r.id?"bg-[#fbfdf8] text-[#172018] shadow-sm":"text-[#536157] hover:bg-[#fbfdf8]/65"}`,children:[f.jsx("span",{className:"truncate",children:r.label}),f.jsx("span",{className:"text-xs tabular-nums text-[#687062]",children:r.count})]},r.id))})}function W3({discarded:n,quarantine:a,undecryptable:s,missingKeyIds:r}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Recovery drawers"}),f.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-2",children:[f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2",children:[f.jsx("p",{className:"text-xs text-[#687062]",children:"Discarded"}),f.jsx("p",{className:"text-lg font-semibold tabular-nums text-[#172018]",children:n})]}),f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2",children:[f.jsx("p",{className:"text-xs text-[#687062]",children:"Quarantine"}),f.jsx("p",{className:"text-lg font-semibold tabular-nums text-[#172018]",children:a})]}),f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2",children:[f.jsx("p",{className:"text-xs text-[#687062]",children:"Undecryptable"}),f.jsx("p",{className:"text-lg font-semibold tabular-nums text-[#172018]",children:s})]})]}),s>0&&f.jsxs("p",{className:"mt-2 text-[11px] leading-4 text-[#687062]",children:["missing key ",r[0],r.length>1?` +${r.length-1} more`:""]})]})}function I3({candidates:n,onOpen:a}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Screener"}),f.jsxs("div",{className:"mt-2 space-y-2",children:[n.slice(0,5).map(s=>f.jsxs("button",{type:"button",onClick:()=>a(s.messageId),className:"block w-full rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2 text-left hover:border-[#9fb8a7]",children:[f.jsx("p",{className:"truncate text-xs font-semibold text-[#172018]",children:s.senderEmail}),f.jsx("p",{className:"mt-1 truncate text-xs text-[#687062]",children:s.trustReason})]},s.id)),n.length===0&&f.jsx("p",{className:"text-xs text-[#687062]",children:"No pending senders."})]})]})}function eC({entries:n}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Access audit"}),f.jsxs("div",{className:"mt-2 space-y-2",children:[n.slice(0,4).map(a=>f.jsxs("div",{className:"text-xs leading-4 text-[#687062]",children:[f.jsx("p",{className:"truncate font-medium text-[#3f4b42]",children:a.tool}),f.jsx("p",{className:"truncate",children:X3(a)}),f.jsx("p",{className:"truncate",children:a.reason})]},a.id)),n.length===0&&f.jsx("p",{className:"text-xs text-[#687062]",children:"No reads yet."})]})]})}function tC({message:n,selected:a,onSelect:s}){return f.jsxs("button",{type:"button",onClick:s,className:`block w-full border-b border-[#d8e2d4] px-4 py-3 text-left transition-colors ${a?"bg-[#eaf4ee]":"hover:bg-[#eef4ec]"}`,children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsx("p",{className:"min-w-0 truncate text-sm font-semibold text-[#172018]",children:pl(n.from)}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-[#687062]",children:et(n.receivedAt)})]}),f.jsx("p",{className:"mt-1 truncate text-sm text-[#26352a]",children:Yb(n)}),f.jsx("p",{className:"mt-1 line-clamp-2 text-xs leading-5 text-[#687062]",children:pt(n.snippet,150)}),f.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[f.jsx("span",{className:`rounded px-2 py-0.5 text-[11px] ring-1 ${oh(n.placement)}`,children:n.placement}),f.jsx("span",{className:"truncate text-[11px] text-[#687062]",children:Gb(n)})]})]})}function nC({record:n}){const a=n.deliveryEvents[n.deliveryEvents.length-1];return f.jsxs("div",{className:"border-b border-[#d8e2d4] px-4 py-3",children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsx("p",{className:"min-w-0 truncate text-sm font-semibold text-[#172018]",children:n.subject||"(no subject)"}),f.jsx("span",{className:`shrink-0 rounded px-2 py-0.5 text-[11px] ring-1 ${oh(n.status)}`,children:n.status})]}),f.jsxs("p",{className:"mt-1 truncate text-xs text-[#536157]",children:["to ",pl(n.to)]}),f.jsxs("p",{className:"mt-1 text-xs text-[#687062]",children:[F3(n)," · ",et(Z3(n))]}),f.jsxs("p",{className:"mt-1 truncate text-xs text-[#687062]",children:[K3(n)," · ",n.sendMode??"mode unknown",n.policyDecision?` · policy ${n.policyDecision.code} / ${n.policyDecision.fallback}`:""]}),(n.providerMessageId||n.providerRequestId)&&f.jsxs("p",{className:"mt-1 truncate text-xs text-[#687062]",children:["provider ",n.providerMessageId??"unknown",n.providerRequestId?` · request ${n.providerRequestId}`:""]}),a&&f.jsx("p",{className:"mt-1 line-clamp-2 text-xs leading-5 text-[#687062]",children:a.bodySafeSummary})]})}function aC({detail:n}){const a=n.message;return f.jsxs("article",{className:"min-h-[66vh]",children:[f.jsxs("header",{className:"border-b border-[#cbd8c8] bg-[#fbfdf8] px-6 py-5",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[f.jsx("h2",{className:"min-w-0 text-xl font-semibold leading-tight text-[#172018]",children:Yb(a)}),f.jsx("span",{className:`rounded px-2 py-0.5 text-xs ring-1 ${oh(a.placement)}`,children:a.placement})]}),f.jsxs("div",{className:"mt-4 grid gap-1 text-sm text-[#536157]",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"From:"})," ",pl(a.from)]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"To:"})," ",pl(a.to)]}),a.cc.length>0&&f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Cc:"})," ",pl(a.cc)]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Received:"})," ",new Date(a.receivedAt).toLocaleString()]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Provenance:"})," ",Gb(a)]})]})]}),f.jsx("div",{className:"border-b border-[#f0d0bd] bg-[#fff4e4] px-6 py-3 text-sm text-[#8a4a18]",children:a.untrustedContentWarning}),f.jsxs("div",{className:"px-6 py-6",children:[f.jsx("pre",{className:"whitespace-pre-wrap break-words font-body text-sm leading-7 text-[#26352a]",children:a.text||"(no text body)"}),a.bodyTruncated&&f.jsx("p",{className:"mt-4 text-xs text-[#687062]",children:"Body truncated in Mailbox."}),f.jsxs("div",{className:"mt-6 grid gap-3 border-t border-[#cbd8c8] pt-4 text-xs text-[#687062] md:grid-cols-2",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Read reason:"})," ",a.access.reason]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Read at:"})," ",new Date(a.access.accessedAt).toLocaleString()]})]}),a.attachments.length>0&&f.jsxs("div",{className:"mt-6 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-xs font-semibold text-[#687062]",children:"Attachments"}),f.jsx("div",{className:"mt-2 space-y-2",children:a.attachments.map(s=>f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2 text-sm text-[#3f4b42]",children:[s.filename," · ",s.contentType," · ",s.size.toLocaleString()," bytes"]},`${s.filename}-${s.size}`))})]})]})]})}function iC(){return f.jsx("div",{className:"grid min-h-[54vh] place-items-center p-8 text-center",children:f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:"No message selected"}),f.jsx("p",{className:"mt-2 text-sm text-[#687062]",children:"Reading pane idle."})]})})}function tx({label:n}){return f.jsxs("div",{className:"flex items-center gap-2 p-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-[#2f8f4e]"}),f.jsxs("span",{className:"text-xs text-[#687062]",children:[n,"..."]})]})}function jd(n){const a=n.function.name,s=sC(n.function.arguments);return a==="settle"?{kind:"response",name:a,id:n.id,deliveredText:s.answer??null,delegatedThought:null,metadata:s.intent??null,rawArgs:null}:a==="ponder"?{kind:"delegation",name:a,id:n.id,deliveredText:s.say??null,delegatedThought:s.thought??null,metadata:null,rawArgs:null}:a==="rest"?{kind:"rest",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:null}:a==="observe"?{kind:"observe",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:s.reason??null,rawArgs:null}:a==="surface"?{kind:"surface",name:a,id:n.id,deliveredText:s.content??null,delegatedThought:null,metadata:s.delegationId??s.friendId??null,rawArgs:null}:{kind:"action",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:n.function.arguments}}function sC(n){try{const a=JSON.parse(n);if(a&&typeof a=="object")return a}catch{}return{}}const lC=48;function rC(n){return n.scrollHeight-n.scrollTop-n.clientHeight<=lC}function Xb(n){const a=T.useRef(null),s=T.useRef(!0),r=T.useCallback(()=>{const d=a.current;d&&(s.current=rC(d))},[]),o=T.useCallback(()=>{s.current=!1},[]);return T.useEffect(()=>{const d=a.current;!d||!s.current||(d.scrollTop=d.scrollHeight)},[n]),{ref:a,onScroll:r,preserveScroll:o}}function oC(n){return typeof n=="string"?n:Array.isArray(n)?n.map(a=>a.type==="text"&&typeof a.text=="string"?a.text:"").filter(a=>a.length>0).join(""):""}function Ml(n){return oC(n.content)}function Kb(n){return n.time.authoredAt??n.time.observedAt??n.time.recordedAt}const nx={"needs-reply":{color:"red",label:"needs reply"},"on-hold":{color:"yellow",label:"on hold"},monitoring:{color:"zinc",label:"monitoring"},idle:{color:"zinc",label:"idle"}};function Fb(n){return n==="bluebubbles"?"iMessage":n==="teams"?"Teams":n==="cli"?"CLI":n==="mail"?"Mail":n==="voice"?"Voice":n}function uC(n){return n==="bluebubbles"?"imessage":n==="teams"?"teams":n==="cli"?"terminal":"default"}function cC(n){return n==="imessage"?"overflow-hidden rounded-xl bg-[#f5f5f7] text-[#1d1d1f] ring-1 ring-black/10":n==="teams"?"overflow-hidden rounded-xl bg-[#f7f5ff] text-[#242424] ring-1 ring-[#d8d1ff]":n==="terminal"?"overflow-hidden rounded-lg bg-[#050807] font-mono text-[#d1fae5] ring-1 ring-[#1f3a2c]":"overflow-hidden rounded-lg bg-ouro-void/60 text-ouro-bone ring-1 ring-ouro-moss/15"}function fC(n){return n==="imessage"?"border-b border-black/10 bg-[#fbfbfd] px-4 py-3 text-center":n==="teams"?"border-b border-[#d8d1ff] bg-[#4f3bb3] px-4 py-3 text-white":n==="terminal"?"border-b border-[#1f3a2c] bg-[#101815] px-4 py-2 text-[#86efac]":"border-b border-ouro-moss/15 px-4 py-3"}function dC(n){return n==="imessage"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-bl-md bg-[#e9e9eb] px-3.5 py-2 text-[#1d1d1f]":n==="teams"?"max-w-[85%] sm:max-w-[75%] rounded-md bg-white px-3.5 py-2 text-[#242424] shadow-sm ring-1 ring-[#e5e5e5]":n==="terminal"?"max-w-full rounded-none border-l-2 border-[#60a5fa] bg-transparent px-3 py-2 text-[#dbeafe]":"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-bl-sm bg-ouro-moss/25 px-3.5 py-2 ring-1 ring-ouro-moss/15"}function io(n,a="normal"){return n==="imessage"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-md bg-[#0a84ff] px-3.5 py-2 text-white":n==="teams"?"max-w-[85%] sm:max-w-[75%] rounded-md bg-[#ede9fe] px-3.5 py-2 text-[#242424] shadow-sm ring-1 ring-[#c4b5fd]":n==="terminal"?"max-w-full rounded-none border-l-2 border-[#22c55e] bg-transparent px-3 py-2 text-[#bbf7d0]":a==="surface"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-scale/12 px-3.5 py-2 ring-1 ring-ouro-scale/15":"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12"}function sl(n,a){return n==="imessage"?a==="agent"?"font-mono text-[9px] text-white/70":"font-mono text-[9px] text-[#6b7280]":n==="teams"?"font-mono text-[9px] uppercase tracking-wider text-[#5b5fc7]":n==="terminal"?a==="agent"?"font-mono text-[11px] text-[#22c55e]":"font-mono text-[11px] text-[#60a5fa]":a==="surface"||a==="agent"?"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70":"font-mono text-[9px] uppercase tracking-wider text-ouro-gold/70"}function ll(n,a="agent"){return n==="imessage"?"text-sm leading-relaxed whitespace-pre-wrap break-words":n==="teams"?"text-sm leading-relaxed text-[#242424] whitespace-pre-wrap break-words":n==="terminal"?`font-mono text-[12px] leading-6 whitespace-pre-wrap break-words ${a==="agent"?"text-[#bbf7d0]":"text-[#dbeafe]"}`:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words"}function hC(n){return Kb(n)}function Xi(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(hC(n)))}function mC({agentName:n,focus:a,onFocusConsumed:s,deskPrefs:r,refreshGeneration:o}){Pi();const[d,h]=T.useState(null),[p,m]=T.useState(null),[g,x]=T.useState(null),[y,S]=T.useState(!1),w=T.useRef(null);T.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/sessions`).then(h)},[n,o]),T.useEffect(()=>{a&&(w.current=null,m(a),x(null),S(!0),s==null||s())},[n,a,s]),T.useEffect(()=>{if(!p)return;const k=`${p}:${o}`;if(w.current===k)return;w.current=k,S(!0);const[U,P,F]=p.split("/");_e(`/agents/${encodeURIComponent(n)}/sessions/${encodeURIComponent(U)}/${encodeURIComponent(P)}/${encodeURIComponent(F)}`).then(x).catch(()=>x(null)).finally(()=>S(!1))},[n,p,o,a]);function j(k){if(p===k){m(null),x(null),w.current=null;return}m(k),x(null),S(!0)}const E=new Set((r==null?void 0:r.starredFriends)??[]);if(!d)return f.jsx(Zb,{label:"Loading sessions"});const C=new Map;for(const k of d.items)C.has(k.friendId)||C.set(k.friendId,[]),C.get(k.friendId).push(k);const z=[...C.entries()].sort((k,U)=>{const P=E.has(k[0])?0:1,F=E.has(U[0])?0:1;return P!==F?P-F:U[1].length-k[1].length}),D=[],R=new Map;for(const[k,U]of z)R.set(D.length,{name:U[0].friendName,channels:U.length,starred:E.has(k)}),D.push(...U);return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:[d.totalCount," sessions · ",d.activeCount," active · ",d.staleCount," stale"]}),f.jsx("div",{className:"space-y-1.5",children:D.map((k,U)=>{var Se;const P=R.get(U),F=E.has(k.friendId),W=`${k.friendId}/${k.channel}/${k.key}`,re=p===W,B=nx[k.replyState]??nx.idle,Z=((Se=k.lastUsage)==null?void 0:Se.total_tokens)??k.estimatedTokens??0,le=Z>0?Math.min(100,Math.round(Z/8e4*100)):0;return f.jsxs("div",{children:[P&&P.channels>1&&f.jsxs("div",{className:"flex items-center gap-2 pt-3 pb-1",children:[P.starred&&f.jsx("span",{className:"text-ouro-gold text-sm",children:"★"}),f.jsx("span",{className:"font-medium text-ouro-bone text-sm",children:P.name}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:[P.channels," channels"]})]}),f.jsxs("button",{onClick:()=>j(W),className:`flex w-full flex-col gap-1.5 rounded-lg px-3 py-3 text-left transition-colors ring-1 ${re?"bg-ouro-moss/15 ring-ouro-glow/20":"ring-ouro-moss/15 hover:bg-ouro-moss/8"}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[F&&f.jsx("span",{className:"text-ouro-gold",title:"Starred",children:"★"}),f.jsx("span",{className:"truncate font-medium text-ouro-bone",children:k.friendName}),f.jsxs("span",{className:"shrink-0 text-xs text-ouro-shadow",children:["via ",Fb(k.channel)]}),f.jsx(xe,{color:B.color,children:B.label})]}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:et(k.lastActivityAt)})]}),k.latestUserExcerpt&&f.jsxs("p",{className:"truncate text-xs text-ouro-gold/70",children:[f.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"in:"})," ",pt(k.latestUserExcerpt,100)]}),k.latestAssistantExcerpt&&f.jsxs("p",{className:"truncate text-xs text-ouro-glow/60",children:[f.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"out:"})," ",pt(k.latestAssistantExcerpt,100)]}),f.jsxs("div",{className:"flex items-center gap-3 text-xs text-ouro-shadow",children:[f.jsxs("span",{className:"tabular-nums",children:[k.messageCount," msgs"]}),k.lastUsage&&f.jsxs("span",{className:"tabular-nums",children:[k.lastUsage.total_tokens.toLocaleString()," tok"]}),le>0&&f.jsxs("div",{className:"flex items-center gap-1.5 flex-1 max-w-32",title:"Context pressure — steady state oscillates between 80-100%",children:[f.jsx("div",{className:"h-1 flex-1 rounded-full bg-ouro-moss/20",children:f.jsx("div",{className:`h-1 rounded-full transition-all ${le>100?"bg-ouro-fang":le>80?"bg-ouro-gold":"bg-ouro-glow"}`,style:{width:`${Math.min(100,le)}%`}})}),f.jsxs("span",{className:"tabular-nums text-[10px]",children:[le,"%"]})]})]})]}),re&&f.jsx(pC,{loading:y,transcript:g})]},W)})})]})}function pC({loading:n,transcript:a}){var d;const s=((d=a==null?void 0:a.messages[a.messages.length-1])==null?void 0:d.id)??null,{ref:r,onScroll:o}=Xb(s);return f.jsxs("div",{ref:r,"data-testid":"session-transcript-scroll",onScroll:o,className:"mt-1 max-h-[70vh] overflow-y-auto rounded-lg",children:[n&&!a&&f.jsx(Zb,{label:"Loading transcript"}),a&&f.jsx(gC,{transcript:a})]})}function gC({transcript:n}){const{messages:a,lastUsage:s}=n,r=uC(n.channel),o=a.filter(g=>g.role==="system"),d=a.filter(g=>g.role!=="system"),[h,p]=T.useState(!1),m=new Map;for(const g of d)g.role==="tool"&&g.toolCallId&&m.set(g.toolCallId,g);return f.jsxs("div",{className:cC(r),children:[f.jsxs("div",{className:fC(r),children:[f.jsx("p",{className:r==="terminal"?"font-mono text-xs":"text-sm font-semibold",children:Fb(n.channel)}),f.jsxs("p",{className:r==="terminal"?"mt-0.5 font-mono text-[10px] text-[#6ee7b7]":"mt-0.5 text-xs opacity-70",children:[n.friendName," · ",n.messageCount," messages"]})]}),f.jsxs("div",{className:"space-y-0.5 p-3",children:[s&&f.jsxs("p",{className:r==="terminal"?"pb-2 font-mono text-[10px] text-[#6ee7b7]":"pb-2 font-mono text-[10px] opacity-60",children:[s.input_tokens.toLocaleString()," in · ",s.output_tokens.toLocaleString()," out · ",s.total_tokens.toLocaleString()," total"]}),o.length>0&&f.jsxs("div",{className:"pb-2 mb-2 border-b border-current/10",children:[f.jsxs("button",{onClick:()=>p(!h),className:"font-mono text-[10px] uppercase tracking-wider opacity-60 transition-opacity hover:opacity-90",children:[h?"▼":"▶"," system context (",o.length,")"]}),h&&o.map(g=>f.jsxs("div",{className:"mt-2 max-h-60 overflow-y-auto rounded bg-black/5 p-2 text-xs opacity-75 whitespace-pre-wrap break-words",children:[f.jsx("p",{className:"mb-1 font-mono text-[9px] opacity-70",children:Xi(g)}),Ml(g)]},g.id))]}),d.map(g=>g.role==="tool"?null:g.role==="user"?f.jsx(vC,{msg:g,surface:r},g.id):g.role==="assistant"?f.jsx(xC,{msg:g,toolResults:m,surface:r},g.id):null)]})]})}function vC({msg:n,surface:a}){const s=Ml(n);return f.jsx("div",{className:"flex justify-start py-1",children:f.jsxs("div",{className:dC(a),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:sl(a,"user"),children:a==="terminal"?"human $":"user"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",n.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(a,"user"),children:s})]})})}function xC({msg:n,toolResults:a,surface:s}){const r=Ml(n),o=(n.toolCalls??[]).map(jd),d=o.filter(m=>m.kind!=="action"),h=o.filter(m=>m.kind==="action"),p=[];for(const m of d)m.kind==="response"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:m.deliveredText}),m.metadata&&m.metadata!=="complete"&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["intent: ",m.metadata]})]})},m.id)):m.kind==="delegation"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),m.deliveredText&&f.jsx("p",{className:ll(s),children:m.deliveredText}),m.delegatedThought&&f.jsxs("div",{className:"mt-2 rounded bg-black/10 px-2.5 py-1.5 ring-1 ring-current/10",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider opacity-70",children:"→ inner dialog"}),f.jsx("p",{className:"mt-0.5 text-xs opacity-80",children:m.delegatedThought})]})]})},m.id)):m.kind==="surface"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s,"surface"),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"surface"),children:"surfaced"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:m.deliveredText}),m.metadata&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",m.metadata]})]})},m.id)):m.kind==="rest"?p.push(f.jsx("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:"— resting —"},m.id)):m.kind==="observe"&&p.push(f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:["— observed",m.metadata?`: ${m.metadata}`:""," —"]},m.id));return r&&d.length===0&&p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:r})]})},`${n.id}-content`)),h.length>0&&p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsx("div",{className:"max-w-[85%] sm:max-w-[75%] space-y-1",children:h.map(m=>f.jsx(yC,{call:m,result:a.get(m.id),surface:s},m.id))})},`${n.id}-tools`)),f.jsx(f.Fragment,{children:p})}function yC({call:n,result:a,surface:s}){const[r,o]=T.useState(!1),d=a?Ml(a):null;return f.jsxs("button",{onClick:()=>o(!r),className:`w-full text-left rounded px-2.5 py-1.5 text-sm transition-colors ${s==="terminal"?"bg-[#0f1a15] font-mono text-[#bbf7d0] ring-1 ring-[#1f3a2c] hover:ring-[#22c55e]/40":s==="teams"?"bg-white text-[#242424] ring-1 ring-[#d8d1ff] hover:ring-[#5b5fc7]/40":s==="imessage"?"bg-white text-[#1d1d1f] ring-1 ring-black/10 hover:ring-[#0a84ff]/30":"bg-ouro-moss/10 ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"font-mono text-xs text-ouro-glow",children:n.name}),!r&&f.jsx("span",{className:"text-[10px] text-ouro-shadow",children:"tap to inspect"})]}),r&&f.jsxs(f.Fragment,{children:[n.rawArgs&&f.jsx("pre",{className:"mt-1.5 max-h-24 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap break-words",children:n.rawArgs}),a&&f.jsxs("div",{className:"mt-1.5 border-t border-ouro-moss/15 pt-1.5",children:[f.jsx(xe,{children:"result"}),f.jsx("pre",{className:"mt-1 max-h-32 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-mist whitespace-pre-wrap break-words",children:d})]})]})]})}function Zb({label:n}){return f.jsxs("div",{className:"flex items-center gap-2 py-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),f.jsxs("span",{className:"font-mono text-xs text-ouro-shadow",children:[n,"…"]})]})}function bC({agentName:n,view:a,focus:s,onFocusConsumed:r,refreshGeneration:o}){var R,k;const d=Pi(),[h,p]=T.useState(null),[m,g]=T.useState(null),[x,y]=T.useState(null),S=a.work,w=S.obligations,j=S.tasks;T.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/coding`).then(p),_e(`/agents/${encodeURIComponent(n)}/obligations`).then(g).catch(()=>{}),_e(`/agents/${encodeURIComponent(n)}/self-fix`).then(y).catch(()=>{})},[n,o]);const E=(m==null?void 0:m.items)??w.items,C=(m==null?void 0:m.openCount)??w.openCount,z=(h==null?void 0:h.items)??[],D=new Map;for(const U of z){const P=U.obligationId;if(P){const F=D.get(P);F?F.push(U):D.set(P,[U])}}return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("section",{children:[f.jsx(so,{label:`Obligations (${C} open)`}),(m==null?void 0:m.primarySelectionReason)&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Primary: ",m.primarySelectionReason]}),E.length>0?f.jsx("div",{className:"mt-3 space-y-3",children:E.map(U=>{const P=D.get(U.id)??[],F=SC(U)?U:null,W=(F==null?void 0:F.isPrimary)??!1,re=(F==null?void 0:F.meaning)??null,B=U.origin;return f.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${W?"bg-ouro-glow/5 ring-ouro-glow/20":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-start gap-2",children:[W&&f.jsx(xe,{color:"lime",children:"primary"}),f.jsx(xe,{color:U.status==="pending"?"yellow":U.status==="fulfilled"?"lime":"zinc",children:U.status}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:pt(U.content,120)})]}),B&&f.jsxs("button",{onClick:()=>d({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"mt-2 flex w-full items-center gap-2 rounded-md bg-ouro-moss/8 px-2.5 py-1.5 text-left text-xs ring-1 ring-ouro-moss/10 hover:ring-ouro-glow/20 transition-colors",children:[f.jsx("span",{className:"text-ouro-shadow",children:"from"}),f.jsx("span",{className:"font-medium text-ouro-glow",children:B.channel}),f.jsx("span",{className:"text-ouro-shadow",children:"→"}),f.jsx("span",{className:"text-ouro-mist truncate",children:B.key}),f.jsx("span",{className:"ml-auto text-ouro-shadow",children:"open session →"})]}),U.currentSurface&&f.jsxs("div",{className:"mt-1 text-xs text-ouro-mist",children:["surface: ",f.jsx("span",{className:"text-ouro-bone",children:U.currentSurface.kind})," — ",U.currentSurface.label]}),(re==null?void 0:re.waitingOn)&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Waiting on: ",re.waitingOn]}),P.length>0&&f.jsxs("div",{className:"mt-2 space-y-1",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Linked coding"}),P.map(Z=>f.jsxs("div",{className:"flex items-center gap-2 rounded bg-ouro-moss/10 px-2 py-1 text-xs",children:[f.jsx(xe,{color:Z.status==="failed"?"red":Z.status==="running"?"lime":"zinc",children:Z.status}),f.jsxs("span",{className:"text-ouro-mist truncate",children:[Z.runner," — ",Z.workdir]})]},Z.id))]}),U.nextAction&&f.jsxs("p",{className:"mt-1.5 text-xs text-ouro-mist",children:["Next: ",U.nextAction]}),f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:et(U.updatedAt)})]},U.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No open obligations."})]}),x&&x.steps.length>0&&f.jsxs("section",{children:[f.jsx(so,{label:`Self-fix ${x.active?"(active)":"(inactive)"}`}),x.currentStep&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-glow",children:["Current: ",x.currentStep]}),f.jsx("div",{className:"mt-3 space-y-1.5",children:x.steps.map((U,P)=>f.jsxs("div",{className:`flex items-center gap-2.5 rounded-lg px-3 py-2 ring-1 ${U.status==="active"?"bg-ouro-glow/5 ring-ouro-glow/20":U.status==="done"?"bg-ouro-void/40 ring-ouro-glow/10":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[f.jsx(xe,{color:U.status==="done"?"lime":U.status==="active"?"yellow":(U.status==="skipped","zinc"),children:U.status}),f.jsx("span",{className:`text-sm ${U.status==="active"?"font-medium text-ouro-bone":"text-ouro-mist"}`,children:U.label}),U.detail&&f.jsx("span",{className:"ml-auto text-xs text-ouro-shadow",children:U.detail})]},P))})]}),f.jsxs("section",{children:[f.jsx(so,{label:`Coding lanes (${z.length})`}),z.length>0?f.jsx("div",{className:"mt-3 space-y-2",children:z.map(U=>{const P=U.status,F=P==="failed",W=U.failure,re=U.obligationId,B=U.originSession;return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:F?"red":P==="running"?"lime":P==="completed"?"zinc":"yellow",children:P}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:U.runner}),f.jsx("span",{className:"truncate text-xs text-ouro-shadow",children:U.workdir})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-2",children:[re&&f.jsxs("button",{onClick:()=>d({tab:"work",focus:re}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",re.slice(0,20),"…"]}),U.taskRef&&f.jsxs("span",{className:"text-xs text-ouro-glow",children:["task: ",U.taskRef]}),B&&f.jsx("button",{onClick:()=>{d({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`})},className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:"origin session"})]}),U.checkpoint&&f.jsx("p",{className:"mt-1.5 text-xs text-ouro-mist",children:pt(U.checkpoint,100)}),f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["pid ",U.pid??"–"," · restarts ",U.restartCount," · ",et(U.lastActivityAt)]}),F&&W&&f.jsxs("div",{className:"mt-2 rounded bg-ouro-fang/5 p-2 text-xs ring-1 ring-ouro-fang/15",children:[f.jsx("span",{className:"font-semibold text-ouro-fang",children:"FAILURE:"})," ",f.jsxs("span",{className:"text-ouro-mist",children:[W.command," exited ",String(W.code??W.signal)]}),W.stderrTail&&f.jsx("pre",{className:"mt-1 max-h-20 overflow-y-auto font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap",children:W.stderrTail})]})]},U.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No coding sessions."})]}),f.jsxs("section",{children:[f.jsx(so,{label:`Tasks (${j.liveCount} live, ${j.blockedCount} blocked)`}),((R=j.liveTaskNames)==null?void 0:R.length)>0?f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:j.liveTaskNames.map(U=>f.jsx(xe,{children:U},U))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No live tasks."}),((k=j.actionRequired)==null?void 0:k.length)>0&&f.jsxs("div",{className:"mt-3",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Action required"}),f.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:j.actionRequired.map(U=>f.jsx(xe,{color:"red",children:U},U))})]})]})]})}function so({label:n}){return f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function SC(n){return"isPrimary"in n}function wC({agentName:n,focus:a,onFocusConsumed:s,refreshGeneration:r}){const o=Pi(),[d,h]=T.useState(null),[p,m]=T.useState(null),[g,x]=T.useState(null);T.useEffect(()=>{const j=`/agents/${encodeURIComponent(n)}`;Promise.all([_e(`${j}/attention`).then(h),_e(`${j}/bridges`).then(m),_e(`${j}/friends`).then(x)])},[n,r]);const y=(d==null?void 0:d.queueItems)??[],S=(p==null?void 0:p.items)??[],w=(g==null?void 0:g.friends)??[];return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("section",{children:[f.jsx(Uf,{label:`Who is waiting (${(d==null?void 0:d.queueLength)??0})`}),y.length>0?f.jsx("div",{className:"mt-3 space-y-2",children:y.map((j,E)=>{const C=j.bridgeId,z=j.obligationId;return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:()=>o({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:j.friendName}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:["via ",j.channel]}),f.jsxs(xe,{color:"yellow",children:["waiting ",et(new Date(j.timestamp).toISOString())]})]}),f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:pt(j.delegatedContent,140)}),f.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-2 text-xs",children:[C&&f.jsxs("button",{onClick:()=>o({tab:"connections",focus:C}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["bridge: ",C.slice(0,12),"…"]}),z&&f.jsxs("button",{onClick:()=>o({tab:"work",focus:z}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",z.slice(0,16),"…"]})]})]},E)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"Nobody waiting."})]}),f.jsxs("section",{children:[f.jsx(Uf,{label:`Bridges (${(p==null?void 0:p.totalCount)??0})`}),S.length>0?f.jsx("div",{className:"mt-3 space-y-3",children:S.map(j=>{const E=j.attachedSessions,C=j.task,z=j.lifecycle==="active";return f.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${z?"bg-ouro-moss/10 ring-ouro-glow/12":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(xe,{color:z?"lime":"zinc",children:j.lifecycle}),f.jsx("p",{className:"font-medium text-ouro-bone",children:j.objective})]}),j.summary&&f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:pt(j.summary,160)}),E.length>0&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:E.map((D,R)=>f.jsxs("button",{onClick:()=>o({tab:"sessions",focus:`${D.friendId}/${D.channel}/${D.key}`}),className:"rounded-md bg-ouro-moss/10 px-2 py-0.5 font-mono text-[11px] text-ouro-glow ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/25 transition-colors",children:[D.friendId,"/",D.channel,"/",D.key]},R))}),C&&f.jsxs("p",{className:"mt-1.5 text-xs",children:[f.jsxs("button",{onClick:()=>o({tab:"work"}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["task: ",C.taskName]}),f.jsxs("span",{className:"text-ouro-shadow",children:[" (",C.mode,")"]})]}),f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:et(j.updatedAt)})]},j.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No bridges."})]}),f.jsxs("section",{children:[f.jsx(Uf,{label:`Friends (${(g==null?void 0:g.totalFriends)??0})`}),w.length>0?f.jsx("div",{className:"mt-3 space-y-1.5",children:w.map(j=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("button",{onClick:()=>o({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:j.friendName}),f.jsxs("p",{className:"text-xs text-ouro-shadow",children:[j.channels.join(", ")," · ",j.sessionCount," sessions",j.lastActivityAt&&f.jsxs(f.Fragment,{children:[" · ",et(j.lastActivityAt)]})]})]}),f.jsxs("div",{className:"shrink-0 text-right",children:[f.jsx("p",{className:"tabular-nums text-sm font-medium text-ouro-bone",children:j.totalTokens.toLocaleString()}),f.jsx("p",{className:"text-[10px] text-ouro-shadow",children:"tokens"})]})]},j.friendId))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No friends."})]})]})}function Uf({label:n}){return f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function TC(n){return Kb(n)}function el(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(TC(n)))}function jC({agentName:n,view:a,refreshGeneration:s}){const r=Pi(),[o,d]=T.useState(null),[h,p]=T.useState(null),[m,g]=T.useState(!1),x=T.useRef(null),y=a.inner;T.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/habits`).then(d)},[n,s]),T.useEffect(()=>{h&&x.current!==s&&(x.current=s,_e(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(p))},[n,s,h!==null]);function S(){if(h){g(!m);return}_e(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(k=>{x.current=s,p(k),g(!0)})}const w=(o==null?void 0:o.items)??[],j=w.filter(k=>k.isOverdue),E=w.filter(k=>k.status==="active"&&!k.isOverdue),C=w.filter(k=>k.status==="paused"),z=y.mode==="deep"?y.origin:null,D=y.mode==="deep"?y.obligationStatus:null,R=w.find(k=>k.name.toLowerCase()==="heartbeat");return f.jsxs("div",{className:"space-y-8",children:[R&&f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Heartbeat"}),f.jsx("div",{className:`mt-2 rounded-xl p-4 ring-1 ${R.isOverdue?"bg-ouro-fang/5 ring-ouro-fang/15":"bg-ouro-moss/10 ring-ouro-glow/10"}`,children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${R.isOverdue?"bg-ouro-fang animate-pulse":"bg-ouro-glow"}`}),f.jsx("span",{className:"font-medium text-ouro-bone",children:R.isOverdue?"Overdue":"Healthy"}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:["every ",R.cadence??"unknown"," · last ",R.lastRun?et(R.lastRun):"never"]})]})})]}),f.jsx("section",{children:f.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Inner work"}),f.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone",children:y.status}),y.summary&&f.jsx("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:y.summary}),f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:y.hasPending?"Pending inner work queued.":"No pending inner work."}),z&&f.jsxs("div",{className:"mt-3",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Triggered from"}),f.jsxs("button",{onClick:()=>{r({tab:"sessions",focus:`${z.friendId}/${z.channel}/${z.key}`})},className:"mt-1 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:[z.friendId.slice(0,8),"…/",z.channel,"/",z.key]}),D&&f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"ml-2 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",D]})]})]})}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Inner dialog ",h?`(${h.messages.length} total)`:""]}),h?f.jsx(EC,{messages:h.messages}):f.jsx("button",{onClick:S,className:"mt-2 w-full rounded-lg px-3 py-2.5 text-left font-mono text-xs text-ouro-glow ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:"Load inner dialog"})]}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Habits (",(o==null?void 0:o.totalCount)??0,")"]}),j.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-fang mb-1.5",children:["Overdue (",j.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:j.map(k=>f.jsx(Bf,{h:k},k.name))})]}),E.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow mb-1.5",children:["Running fine (",E.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:E.map(k=>f.jsx(Bf,{h:k},k.name))})]}),C.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow mb-1.5",children:["Paused (",C.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:C.map(k=>f.jsx(Bf,{h:k},k.name))})]}),w.length===0&&f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No habits configured."})]})]})}function EC({messages:n}){var S;const a=n.filter(w=>w.role!=="system"&&w.role!=="tool"),[s,r]=T.useState(!1),o=s?a:a.slice(-30),d=a.length-o.length,h=((S=o[o.length-1])==null?void 0:S.id)??null,{ref:p,onScroll:m,preserveScroll:g}=Xb(h),x=[];for(const w of a){if(w.role!=="assistant")continue;const j=(w.toolCalls??[]).map(jd);for(const E of j)E.kind==="surface"&&x.push({index:w.sequence,kind:"surfaced",label:pt(E.deliveredText??"",40)}),E.kind==="rest"&&x.push({index:w.sequence,kind:"resting",label:"resting"}),E.kind==="delegation"&&x.push({index:w.sequence,kind:"delegated",label:"continued thinking"})}function y(w){var E;const j=(E=p.current)==null?void 0:E.querySelector(`[data-msg-index="${w}"]`);j&&j.scrollIntoView({behavior:"smooth",block:"center"})}return f.jsxs("div",{children:[x.length>0&&f.jsx("div",{className:"mt-2 mb-1 flex flex-wrap gap-1",children:x.map((w,j)=>f.jsxs("button",{onClick:()=>{g(),r(!0),setTimeout(()=>y(w.index),100)},className:`rounded-md px-2 py-0.5 text-[10px] font-mono ring-1 transition-colors ${w.kind==="surfaced"?"bg-ouro-scale/10 text-ouro-glow ring-ouro-scale/20 hover:ring-ouro-glow/30":w.kind==="resting"?"bg-ouro-void/40 text-ouro-shadow ring-ouro-moss/10":"bg-ouro-gold/5 text-ouro-gold ring-ouro-gold/10"}`,children:[w.kind==="surfaced"?"★":w.kind==="resting"?"—":"→"," #",w.index]},j))}),f.jsxs("div",{ref:p,"data-testid":"inner-transcript-scroll",onScroll:m,className:"max-h-[60vh] overflow-y-auto rounded-lg bg-ouro-void/60 p-3 ring-1 ring-ouro-moss/15 space-y-1",children:[d>0&&f.jsxs("button",{onClick:()=>{g(),r(!0)},className:"w-full rounded-lg px-3 py-2 text-center font-mono text-xs text-ouro-shadow hover:text-ouro-mist ring-1 ring-ouro-moss/10 hover:ring-ouro-moss/20 transition-colors mb-2",children:["Load ",d," earlier messages"]}),o.map(w=>{const j=Ml(w);if(w.role==="user"){const E=j.includes("[pending from")||j.includes("[delegated"),C=j.includes("waking up")||j.includes("world-state checkpoint");return f.jsx("div",{"data-msg-index":w.sequence,className:"flex justify-start py-1",children:f.jsxs("div",{className:`max-w-[85%] rounded-2xl rounded-bl-sm px-3 py-2 ring-1 ${E?"bg-ouro-gold/8 ring-ouro-gold/15":C?"bg-ouro-moss/20 ring-ouro-moss/15":"bg-ouro-moss/25 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider",style:{color:E?"var(--color-ouro-gold)":"var(--color-ouro-shadow)"},children:E?"★ delegated":C?"heartbeat":"prompt"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",w.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(w)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:j})]})},w.id)}if(w.role==="assistant"){const E=(w.toolCalls??[]).map(jd),C=E.filter(R=>R.kind==="surface"),z=E.filter(R=>R.kind==="rest"),D=E.filter(R=>R.kind==="delegation");return f.jsxs("div",{"data-msg-index":w.sequence,children:[C.map(R=>f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-scale/15 px-3 py-2 ring-1 ring-ouro-scale/20",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow",children:"★ surfaced outward"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",w.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(w)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:R.deliveredText}),R.metadata&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",R.metadata]})]})},R.id)),D.length>0&&f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-gold/50",children:["— still thinking — #",w.sequence," · ",el(w)]}),z.length>0&&f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/40",children:["— resting — #",w.sequence," · ",el(w)]}),C.length===0&&z.length===0&&D.length===0&&j&&f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-glow/6 px-3 py-2 ring-1 ring-ouro-glow/8",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/50",children:"thinking"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",w.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(w)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-mist whitespace-pre-wrap break-words",children:j})]})})]},w.id)}return null})]})]})}function Bf({h:n}){const a=n.isOverdue,s=n.isDegraded,r=n.status;return f.jsxs("div",{className:`rounded-lg px-3 py-2.5 ring-1 ${a?"bg-ouro-fang/5 ring-ouro-fang/15":s?"bg-ouro-gold/5 ring-ouro-gold/15":r==="paused"?"bg-ouro-void/30 ring-ouro-moss/10":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:a?"red":s?"yellow":r==="active"?"lime":"zinc",children:a?"overdue":s?"degraded":r}),f.jsx("span",{className:"font-medium text-ouro-bone",children:n.title})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-3 text-xs text-ouro-shadow",children:[n.cadence&&f.jsxs("span",{children:["every ",n.cadence]}),f.jsx("span",{children:n.lastRun?`last ${et(n.lastRun)}`:"never run"}),s&&n.degradedReason&&f.jsx("span",{className:"text-ouro-gold",children:n.degradedReason}),!a&&!s&&r==="active"&&n.lastRun&&f.jsx("span",{className:"text-ouro-glow",children:"on schedule"}),a&&n.overdueMs&&f.jsxs("span",{className:"text-ouro-fang",children:[Math.floor(n.overdueMs/6e4),"m overdue"]}),!n.lastRun&&r==="active"&&f.jsx("span",{className:"text-ouro-gold",children:"never fired — may be misconfigured"})]}),n.bodyExcerpt&&f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow/70",children:n.bodyExcerpt})]})}function NC({agentName:n,refreshGeneration:a}){const[s,r]=T.useState(null),[o,d]=T.useState(null),[h,p]=T.useState("diary");if(T.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/notes`).then(r),_e(`/agents/${encodeURIComponent(n)}/note-decisions`).then(d).catch(()=>{})},[n,a]),!s)return f.jsxs("div",{className:"flex items-center gap-2 py-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),f.jsx("span",{className:"font-mono text-xs text-ouro-shadow",children:"Loading…"})]});const m=s.recentDiaryEntries,g=s.recentJournalEntries;return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{onClick:()=>p("diary"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="diary"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Diary (",s.diaryEntryCount,")"]}),f.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),f.jsxs("button",{onClick:()=>p("journal"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="journal"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Journal (",s.journalEntryCount,")"]}),f.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),f.jsxs("button",{onClick:()=>p("decisions"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="decisions"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Decisions (",(o==null?void 0:o.totalCount)??0,")"]})]}),h==="diary"&&f.jsx("div",{children:m.length>0?f.jsx("div",{className:"space-y-3",children:m.map(x=>f.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone",children:x.text}),f.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-ouro-shadow",children:[f.jsx(xe,{children:x.source}),f.jsx("span",{children:et(x.createdAt)})]})]},x.id))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No diary entries yet. The agent hasn't written anything down."})}),h==="journal"&&f.jsx("div",{children:g.length>0?f.jsx("div",{className:"space-y-3",children:g.map(x=>f.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-medium text-ouro-bone",children:x.filename}),f.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-mist",children:x.preview})]},x.filename))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No journal entries yet."})}),h==="decisions"&&f.jsx("div",{children:o&&o.items.length>0?f.jsx("div",{className:"space-y-2",children:o.items.map((x,y)=>f.jsxs("div",{className:"rounded-xl bg-ouro-void/40 px-4 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:x.decision==="saved"?"lime":"zinc",children:x.decision}),f.jsx(xe,{children:x.kind.replace(/_/g," ")}),f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(x.timestamp)})]}),x.reason&&f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:x.reason}),x.excerpt&&f.jsx("p",{className:"mt-0.5 text-xs text-ouro-shadow italic truncate",children:x.excerpt})]},y))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No note decisions logged yet."})})]})}function AC({agentName:n,view:a,refreshGeneration:s}){var j;const[r,o]=T.useState(null),[d,h]=T.useState(null),p=a.agent,m=p.degraded,g=p.freshness,x=((j=p.providers)==null?void 0:j.lanes)??[];T.useEffect(()=>{Promise.all([_e("/machine/health").then(o).catch(()=>null),_e("/machine/logs").then(h).catch(()=>null)])},[n,s]);const y=LC(r)?r:null,S=(y==null?void 0:y.degradedComponents)??[],w=(d==null?void 0:d.entries)??[];return f.jsxs("div",{className:"space-y-8",children:[m.status==="degraded"&&m.issues.length>0&&f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-fang",children:["Agent issues (",m.issues.length,")"]}),f.jsx("div",{className:"mt-3 space-y-1.5",children:m.issues.map((E,C)=>f.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2.5 ring-1 ring-ouro-fang/15",children:[f.jsx("p",{className:"font-mono text-xs font-semibold text-ouro-fang",children:E.code}),f.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist break-all",children:E.detail})]},C))})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Agent config"}),f.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[f.jsx(Hi,{label:"Provider lanes",value:CC(x)}),f.jsx(Hi,{label:"Enabled",value:p.enabled?"yes":"no"}),f.jsx(Hi,{label:"Freshness",value:`${g.status}${g.ageMs!=null?` (${Math.floor(g.ageMs/6e4)}m)`:""}`})]})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Provider lanes"}),x.length>0?f.jsx("div",{className:"mt-3 grid gap-2 lg:grid-cols-2",children:x.map(E=>{const C=RC(E);return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("p",{className:"font-mono text-xs font-semibold uppercase tracking-wider text-ouro-bone",children:E.lane}),f.jsx(xe,{color:zC(E),children:E.status}),f.jsx(xe,{color:kC(E.readiness.status),children:E.readiness.status})]}),f.jsx("p",{className:"mt-2 text-sm font-medium text-ouro-bone",children:MC(E)}),f.jsxs("div",{className:"mt-2 space-y-1 text-xs text-ouro-mist",children:[f.jsxs("p",{children:["source: ",E.source]}),f.jsxs("p",{children:["readiness: ",DC(E.readiness)]}),E.readiness.attempts!==void 0&&f.jsxs("p",{children:["attempts: ",E.readiness.attempts]}),E.readiness.checkedAt&&f.jsxs("p",{children:["checked: ",et(E.readiness.checkedAt)]}),f.jsxs("p",{children:["credentials: ",OC(E.credential)]}),E.credential.revision&&f.jsxs("p",{children:["revision: ",E.credential.revision]}),ax(E)&&f.jsxs("p",{children:["reason: ",ax(E)]}),C&&f.jsxs("p",{className:"break-all text-ouro-fang",children:["repair: ",C]}),E.warnings.map((z,D)=>f.jsxs("p",{className:"break-words text-ouro-gold",children:["warning: ",z]},D))]})]},E.lane)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No provider lane data loaded."})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Daemon health"}),y?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[f.jsx(Hi,{label:"Status",value:y.status}),f.jsx(Hi,{label:"Mode",value:y.mode}),f.jsx(Hi,{label:"Uptime",value:`${Math.floor(y.uptimeSeconds/60)}m`})]}),S.length>0&&f.jsxs("div",{className:"mt-3 space-y-1.5",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Degraded components"}),S.map((E,C)=>f.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2 ring-1 ring-ouro-fang/15",children:[f.jsx("p",{className:"text-xs font-semibold text-ouro-fang",children:E.component}),f.jsx("p",{className:"text-xs text-ouro-mist",children:E.reason})]},C))]})]}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No health file found. This is normal when not running under the daemon."})]}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Recent logs (",(d==null?void 0:d.totalLines)??0," total)"]}),w.length>0?f.jsx("div",{className:"mt-3 max-h-96 overflow-y-auto rounded-lg bg-ouro-void/40 ring-1 ring-ouro-moss/15",children:[...w].reverse().slice(0,50).map((E,C)=>{const z=E.level;return f.jsxs("div",{className:"border-b border-ouro-moss/10 px-3 py-1.5 last:border-b-0",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx(xe,{color:z==="error"?"red":z==="warn"?"yellow":"zinc",children:z}),f.jsx("span",{className:"text-ouro-shadow",children:et(E.ts)}),f.jsx("span",{className:"font-mono text-ouro-glow",children:E.event})]}),f.jsx("p",{className:"truncate text-xs text-ouro-mist",children:E.message})]},C)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No log entries."})]})]})}function Hi({label:n,value:a}){return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),f.jsx("p",{className:"mt-1 text-sm font-medium text-ouro-bone",children:a})]})}function CC(n){return n.length===0?"none":`${n.filter(s=>s.status==="configured").length}/${n.length} configured`}function MC(n){return n.status==="unconfigured"?"unconfigured":`${n.provider} / ${n.model}`}function DC(n){return n.status==="failed"?n.error?`failed: ${n.error}`:"failed":n.status==="stale"?n.reason?`stale: ${n.reason}`:"stale":n.status==="unknown"?n.reason?`unknown: ${n.reason}`:"unknown":n.status}function OC(n){return n.status==="present"?n.source??"vault":n.status==="invalid-pool"?"vault unavailable":"missing"}function RC(n){return n.status==="unconfigured"?n.repairCommand:n.credential.repairCommand}function ax(n){return n.status==="unconfigured"?n.reason:n.readiness.reason}function zC(n){return n.status==="configured"?"green":"yellow"}function kC(n){return n==="ready"?"green":n==="failed"?"red":n==="stale"?"amber":"zinc"}function LC(n){return!!(n&&"degradedComponents"in n)}const Hf=[{id:"overview",label:"Overview"},{id:"mail",label:"Mailbox"},{id:"sessions",label:"Sessions"},{id:"work",label:"Work"},{id:"connections",label:"Connections"},{id:"inner",label:"Inner"},{id:"notes",label:"Diary & Journal"},{id:"runtime",label:"Runtime"}];function VC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function _C({agentName:n,view:a,deskPrefs:s,refreshGeneration:r,initialRoute:o}){const[d,h]=T.useState((o==null?void 0:o.tab)??"overview"),[p,m]=T.useState(o==null?void 0:o.focus),g=T.useRef(!1),x=T.useRef(n);T.useEffect(()=>{const C=x.current!==n;if(x.current=n,(o==null?void 0:o.agent)===n&&!g.current){g.current=!0,h(o.tab),m(o.focus);return}C&&(h("overview"),m(void 0))},[n,o==null?void 0:o.agent,o==null?void 0:o.focus,o==null?void 0:o.tab]);const y=T.useCallback(C=>{h(C.tab),m(C.focus),window.history.pushState(null,"",$f({agent:n,tab:C.tab,focus:C.focus}))},[n]),S=T.useCallback(C=>{h(C),m(void 0),window.history.pushState(null,"",$f({agent:n,tab:C,focus:void 0}))},[n]),w=T.useCallback(()=>m(void 0),[]);if(z3(y),!a||!n)return f.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[f.jsx("p",{className:"font-display text-2xl italic text-ouro-bone",children:"Choose an agent"}),f.jsx("p",{className:"mt-2 text-sm text-ouro-mist",children:"Select an agent from the sidebar to inspect its state."})]});const E=a.agent.attention;return f.jsx(rx.Provider,{value:y,children:f.jsxs("div",{children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-4 border-b border-ouro-moss/30",children:[f.jsx("div",{className:"min-w-0",children:f.jsx("h1",{className:"font-display text-2xl italic font-semibold text-ouro-bone sm:text-3xl",children:n})}),f.jsx(xe,{color:VC(E.level),children:E.label})]}),f.jsx("nav",{className:"mt-4 flex gap-0.5 overflow-x-auto border-b border-ouro-moss/20 -mx-1",children:(()=>{const C=s==null?void 0:s.tabOrder;if(!C)return Hf;const z=C.map(R=>Hf.find(k=>k.id===R)).filter(R=>R!==void 0),D=Hf.filter(R=>!C.includes(R.id));return[...z,...D]})().map(C=>f.jsx("button",{type:"button",onClick:()=>S(C.id),className:`shrink-0 px-3 py-2 text-xs font-mono uppercase tracking-wider transition-colors rounded-t-md ${d===C.id?"bg-ouro-moss/20 text-ouro-glow border-b-2 border-ouro-glow":"text-ouro-shadow hover:text-ouro-mist hover:bg-ouro-moss/10"}`,children:C.label},C.id))}),f.jsxs("div",{className:"mt-6",children:[d==="overview"&&f.jsx(H3,{view:a,deskPrefs:s,refreshGeneration:r}),d==="mail"&&f.jsx(P3,{agentName:n,focus:p,onFocusConsumed:w,refreshGeneration:r}),d==="sessions"&&f.jsx(mC,{agentName:n,focus:p,onFocusConsumed:w,deskPrefs:s,refreshGeneration:r}),d==="work"&&f.jsx(bC,{agentName:n,view:a,focus:p,onFocusConsumed:w,refreshGeneration:r}),d==="connections"&&f.jsx(wC,{agentName:n,focus:p,onFocusConsumed:w,refreshGeneration:r}),d==="inner"&&f.jsx(jC,{agentName:n,view:a,refreshGeneration:r}),d==="notes"&&f.jsx(NC,{agentName:n,refreshGeneration:r}),d==="runtime"&&f.jsx(AC,{agentName:n,view:a,refreshGeneration:r})]})]})})}function ix(){return ox(window.location.hash)}function UC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function BC(){var C,z;const[n,a]=T.useState(null),[s,r]=T.useState(((C=ix())==null?void 0:C.agent)??""),[o,d]=T.useState(null),[h,p]=T.useState(0),m=T.useRef(0),g=T.useRef(ix()),x=T.useCallback(async()=>{var D;try{const R=await _e("/machine");if(a(R),!s&&R.agents.length>0){const k=((D=g.current)==null?void 0:D.agent)??R.agents[0].agentName;r(k)}}catch{}},[s]),[y,S]=T.useState(null),w=T.useCallback(async D=>{if(!D){d(null),S(null);return}try{const[R,k]=await Promise.all([_e(`/agents/${encodeURIComponent(D)}`),_e(`/agents/${encodeURIComponent(D)}/desk-prefs`)]);d(R),S(k)}catch{d(null),S(null)}},[]);T.useEffect(()=>{x()},[x]),T.useEffect(()=>{s&&w(s)},[s,w]),T.useEffect(()=>M2(()=>{const R=++m.current;x().then(async()=>{m.current===R&&(s&&(await w(s),m.current!==R)||p(k=>k+1))})}),[x,w,s]),T.useEffect(()=>{const D=()=>{const R=ox(window.location.hash);R&&r(R.agent)};return window.addEventListener("hashchange",D),()=>window.removeEventListener("hashchange",D)},[]);const j=T.useCallback(D=>{r(D),window.history.pushState(null,"",$f({agent:D,tab:"overview",focus:void 0}))},[]);if(!n)return f.jsx("div",{className:"flex h-screen items-center justify-center bg-ouro-void",children:f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:"mx-auto mb-4 h-4 w-4 animate-pulse rounded-full bg-ouro-glow shadow-[0_0_20px_theme(--color-ouro-glow)]"}),f.jsx("p",{className:"font-mono text-sm text-ouro-mist",children:"Connecting to Mailbox…"})]})});const E=n.overview.totals;return f.jsx(E3,{navbar:f.jsxs(y3,{children:[f.jsx(S3,{}),f.jsx(b3,{children:f.jsx(rh,{children:f.jsx(xe,{color:n.overview.daemon.mode==="dev"?"yellow":"lime",children:n.overview.daemon.mode})})})]}),sidebar:f.jsxs(N3,{className:"bg-ouro-deep",children:[f.jsx(A3,{className:"border-ouro-moss/30",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"h-3 w-3 shrink-0 rounded-full bg-ouro-glow shadow-[0_0_16px_theme(--color-ouro-glow)]"}),f.jsx("div",{className:"min-w-0",children:f.jsx("p",{className:"truncate font-display text-lg italic font-semibold text-ouro-bone",children:"Ouro Mailbox"})})]})}),f.jsxs(C3,{className:"[&>[data-slot=section]+[data-slot=section]]:mt-4",children:[f.jsxs(W0,{children:[f.jsx(I0,{className:"text-ouro-mist/60",children:"Machine"}),f.jsx("div",{className:"grid grid-cols-3 gap-1.5 px-2",children:[{v:E.liveTasks??0,l:"Tasks",alert:(E.blockedTasks??0)>0},{v:E.openObligations??0,l:"Oblig."},{v:E.activeCodingAgents??0,l:"Coding"}].map(D=>f.jsxs("div",{className:"rounded-md bg-ouro-void/60 px-2 py-1.5 text-center ring-1 ring-ouro-moss/20",children:[f.jsx("div",{className:`text-base font-semibold tabular-nums ${D.alert?"text-ouro-fang":"text-ouro-bone"}`,children:D.v}),f.jsx("div",{className:"text-[9px] uppercase tracking-widest text-ouro-shadow",children:D.l})]},D.l))})]}),f.jsxs(W0,{children:[f.jsx(I0,{className:"text-ouro-mist/60",children:"Agents"}),n.agents.map(D=>f.jsx(D3,{current:D.agentName===s,onClick:()=>j(D.agentName),children:f.jsxs("div",{className:"flex min-w-0 flex-1 items-center justify-between gap-2",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx(O3,{className:"text-ouro-bone",children:D.agentName}),f.jsxs("p",{className:"truncate text-xs text-ouro-shadow",children:[D.tasks.liveCount,"t · ",D.obligations.openCount,"o · ",D.coding.activeCount,"c"]})]}),f.jsx(xe,{color:UC(D.attention.level),children:D.attention.label})]})},D.agentName))]})]}),f.jsx(M3,{className:"border-ouro-moss/30",children:f.jsxs("div",{className:"px-2 text-xs text-ouro-shadow",children:[f.jsx("p",{className:"font-mono",children:n.overview.runtime.version}),f.jsxs("p",{className:"mt-0.5",children:[n.overview.daemon.mode," · ",n.overview.freshness.status]})]})}),s&&o&&f.jsx("div",{className:"px-4 py-2 border-t border-ouro-moss/20",children:f.jsx("p",{className:"text-xs italic text-ouro-shadow/70",children:(()=>{const D=y==null?void 0:y.statusLine;if(D)return D;const R=o.inner;if(R.status==="running"||R.hasPending)return"thinking through something privately";const U=o.work.obligations.openCount;return U>2?"a few loose ends":U>0?"carrying something":"steady"})()})})]}),children:f.jsx(_C,{agentName:s,view:o,deskPrefs:y,refreshGeneration:h,initialRoute:((z=g.current)==null?void 0:z.agent)===s?g.current:void 0})})}C2.createRoot(document.getElementById("app")).render(f.jsx(T.StrictMode,{children:f.jsx(BC,{})}));