@zaip-ai/cli 1.0.6 → 1.0.7

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 (887) hide show
  1. package/README.md +4 -2
  2. package/dist/services/adapter-hook-sources.d.ts +3 -0
  3. package/dist/services/adapter-hook-sources.d.ts.map +1 -0
  4. package/dist/services/adapter-hook-sources.js +3 -0
  5. package/dist/services/adapter-hook-sources.js.map +1 -0
  6. package/dist/services/adapters.d.ts.map +1 -1
  7. package/dist/services/adapters.js +75 -600
  8. package/dist/services/adapters.js.map +1 -1
  9. package/dist/services/adapters.test.js +41 -0
  10. package/dist/services/adapters.test.js.map +1 -1
  11. package/dist/services/agent-adapters.d.ts +7 -0
  12. package/dist/services/agent-adapters.d.ts.map +1 -1
  13. package/dist/services/agent-adapters.js +81 -13
  14. package/dist/services/agent-adapters.js.map +1 -1
  15. package/dist/services/agent-adapters.test.js +56 -7
  16. package/dist/services/agent-adapters.test.js.map +1 -1
  17. package/dist/services/claude-settings-template.d.ts +2 -0
  18. package/dist/services/claude-settings-template.d.ts.map +1 -0
  19. package/dist/services/claude-settings-template.js +8 -0
  20. package/dist/services/claude-settings-template.js.map +1 -0
  21. package/dist/services/codex-config-template.d.ts +3 -0
  22. package/dist/services/codex-config-template.d.ts.map +1 -0
  23. package/dist/services/codex-config-template.js +98 -0
  24. package/dist/services/codex-config-template.js.map +1 -0
  25. package/dist/services/codex-pre-tool-hook-template.d.ts +2 -0
  26. package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -0
  27. package/dist/services/codex-pre-tool-hook-template.js +472 -0
  28. package/dist/services/codex-pre-tool-hook-template.js.map +1 -0
  29. package/dist/services/codex-rules.d.ts +1 -1
  30. package/dist/services/codex-rules.d.ts.map +1 -1
  31. package/dist/services/codex-rules.js +22 -13
  32. package/dist/services/codex-rules.js.map +1 -1
  33. package/dist/services/codex-subagent-hook-template.d.ts +2 -0
  34. package/dist/services/codex-subagent-hook-template.d.ts.map +1 -0
  35. package/dist/services/codex-subagent-hook-template.js +250 -0
  36. package/dist/services/codex-subagent-hook-template.js.map +1 -0
  37. package/dist/services/doctor.d.ts.map +1 -1
  38. package/dist/services/doctor.js +8 -35
  39. package/dist/services/doctor.js.map +1 -1
  40. package/dist/services/global-codex-config.d.ts +12 -6
  41. package/dist/services/global-codex-config.d.ts.map +1 -1
  42. package/dist/services/global-codex-config.js +72 -53
  43. package/dist/services/global-codex-config.js.map +1 -1
  44. package/dist/services/global-codex-config.test.js +35 -84
  45. package/dist/services/global-codex-config.test.js.map +1 -1
  46. package/dist/services/install-agents-template.d.ts.map +1 -1
  47. package/dist/services/install-agents-template.js +55 -19
  48. package/dist/services/install-agents-template.js.map +1 -1
  49. package/dist/services/local-state-migration.d.ts +19 -0
  50. package/dist/services/local-state-migration.d.ts.map +1 -0
  51. package/dist/services/local-state-migration.js +122 -0
  52. package/dist/services/local-state-migration.js.map +1 -0
  53. package/dist/services/logger.d.ts.map +1 -1
  54. package/dist/services/logger.js +4 -6
  55. package/dist/services/logger.js.map +1 -1
  56. package/dist/services/logger.test.js +36 -3
  57. package/dist/services/logger.test.js.map +1 -1
  58. package/dist/services/runtime-template.test.js +22 -18
  59. package/dist/services/runtime-template.test.js.map +1 -1
  60. package/dist/services/template-manifest.d.ts +1 -0
  61. package/dist/services/template-manifest.d.ts.map +1 -1
  62. package/dist/services/template-manifest.js +31 -11
  63. package/dist/services/template-manifest.js.map +1 -1
  64. package/dist/services/transactional-files.d.ts.map +1 -1
  65. package/dist/services/transactional-files.js +84 -27
  66. package/dist/services/transactional-files.js.map +1 -1
  67. package/dist/types.d.ts +2 -1
  68. package/dist/types.d.ts.map +1 -1
  69. package/package.json +2 -2
  70. package/templates/.agents/config/agents/catalog.yaml +1081 -145
  71. package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +30 -0
  72. package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +30 -0
  73. package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +30 -0
  74. package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +31 -0
  75. package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +30 -0
  76. package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +30 -0
  77. package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +31 -0
  78. package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +31 -0
  79. package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +31 -0
  80. package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +30 -0
  81. package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +30 -0
  82. package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +37 -0
  83. package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +35 -0
  84. package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +30 -0
  85. package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +30 -0
  86. package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +31 -0
  87. package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +30 -0
  88. package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +32 -0
  89. package/templates/.agents/config/clients.yaml +152 -0
  90. package/templates/{.zaip-aios → .agents/config}/pricing/models.json +4 -13
  91. package/templates/.agents/config/project.yaml +24 -1
  92. package/templates/.agents/dashboard/.zaip-managed.json +1140 -12
  93. package/templates/.agents/dashboard/README.md +23 -4
  94. package/templates/.agents/dashboard/apps/frontend/dist/assets/AgentCatalogSettingsPage-CLYIi7Vo.js +1 -0
  95. package/templates/.agents/dashboard/apps/frontend/dist/assets/AgentCatalogSettingsPage-DTDNVQGX.css +1 -0
  96. package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-Cv-JcoxP.js +1320 -0
  97. package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-Je5nK-Et.css +1 -0
  98. package/templates/.agents/dashboard/apps/frontend/dist/assets/PricingSettingsDialog-CzEggcRb.js +1 -0
  99. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-05YKn6Z4.js +3 -0
  100. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-YO3yqtgV.css +1 -0
  101. package/templates/.agents/dashboard/apps/frontend/dist/assets/dashboard-localization-C98LGC-Q.js +231 -0
  102. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-8AzCnl3a.js +77 -0
  103. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DdBYQ_8D.css +1 -0
  104. package/templates/.agents/dashboard/apps/frontend/dist/index.html +2 -2
  105. package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend}/index.html +1 -2
  106. package/templates/.agents/dashboard/apps/frontend/package.json +22 -0
  107. package/templates/.agents/dashboard/apps/frontend/src/AgentCatalogSettingsPage.tsx +617 -0
  108. package/templates/.agents/dashboard/apps/frontend/src/App.tsx +766 -0
  109. package/templates/.agents/dashboard/apps/frontend/src/AppLoadingPanels.tsx +134 -0
  110. package/templates/.agents/dashboard/apps/frontend/src/DashboardCapabilityNav.tsx +117 -0
  111. package/templates/.agents/dashboard/apps/frontend/src/DashboardHelpDialog.tsx +242 -0
  112. package/templates/.agents/dashboard/apps/frontend/src/PricingSettingsDialog.tsx +295 -0
  113. package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +719 -0
  114. package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.tsx +72 -0
  115. package/templates/.agents/dashboard/apps/frontend/src/agent-catalog-settings-page.css +660 -0
  116. package/templates/.agents/dashboard/apps/frontend/src/agent-catalog-settings.test.ts +249 -0
  117. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +31 -0
  118. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +374 -0
  119. package/templates/.agents/dashboard/apps/frontend/src/dashboard-capability-nav.css +81 -0
  120. package/templates/.agents/dashboard/apps/frontend/src/dashboard-help-dialog.css +202 -0
  121. package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.test.ts +72 -0
  122. package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.ts +361 -0
  123. package/templates/.agents/dashboard/apps/frontend/src/loading-feedback.css +42 -0
  124. package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/src/main.tsx +5 -1
  125. package/templates/.agents/dashboard/apps/frontend/src/operations-period.test.ts +18 -0
  126. package/templates/.agents/dashboard/apps/frontend/src/operations-period.ts +22 -0
  127. package/templates/.agents/dashboard/apps/frontend/src/pricing-settings-dialog.css +309 -0
  128. package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +129 -0
  129. package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +335 -0
  130. package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +57 -0
  131. package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +79 -0
  132. package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.ts +17 -0
  133. package/templates/.agents/dashboard/apps/frontend/src/styles.css +761 -0
  134. package/templates/.agents/dashboard/apps/frontend/src/traceability-workspace.css +70 -0
  135. package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/tsconfig.json +1 -7
  136. package/templates/.agents/dashboard/apps/frontend/vite.config.ts +22 -0
  137. package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/vitest.config.ts +3 -1
  138. package/templates/.agents/dashboard/dashboard.config.json +4 -0
  139. package/templates/.agents/dashboard/modules/cost-monitor/composition-root.ts +6 -0
  140. package/templates/.agents/dashboard/modules/cost-monitor/package.json +24 -0
  141. package/templates/.agents/dashboard/modules/cost-monitor/src/agent-groups.test.ts +43 -0
  142. package/templates/.agents/dashboard/modules/cost-monitor/src/agent-groups.ts +40 -0
  143. package/templates/.agents/dashboard/modules/cost-monitor/src/contracts.ts +221 -0
  144. package/templates/.agents/dashboard/modules/cost-monitor/src/provider.test.ts +19 -0
  145. package/templates/.agents/dashboard/modules/cost-monitor/src/provider.ts +5 -0
  146. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.test.ts +75 -0
  147. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.tsx +260 -0
  148. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostFilters.tsx +351 -0
  149. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostModelsAuditTable.test.ts +51 -0
  150. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostModelsAuditTable.tsx +327 -0
  151. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorIcons.tsx +50 -0
  152. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +251 -0
  153. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +775 -0
  154. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostPeriodAverageCards.tsx +89 -0
  155. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostSummary.tsx +64 -0
  156. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableIcons.tsx +9 -0
  157. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +708 -0
  158. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +797 -0
  159. package/templates/.agents/dashboard/modules/cost-monitor/src/react/MacroCostTable.test.ts +79 -0
  160. package/templates/.agents/dashboard/modules/cost-monitor/src/react/MacroCostTable.tsx +218 -0
  161. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-duration.ts +17 -0
  162. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-copy.ts +84 -0
  163. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-embedded.css +11 -0
  164. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-layout.test.ts +28 -0
  165. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-responsive.css +123 -0
  166. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-summary.ts +130 -0
  167. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor.css +683 -0
  168. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-run-origin.css +28 -0
  169. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-table-metrics.ts +77 -0
  170. package/templates/.agents/dashboard/modules/cost-monitor/src/react/index.ts +2 -0
  171. package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.test.ts +111 -0
  172. package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +140 -0
  173. package/templates/.agents/dashboard/modules/cost-monitor/src/run-display.ts +10 -0
  174. package/templates/.agents/dashboard/modules/cost-monitor/src/server/aggregate.test.ts +213 -0
  175. package/templates/.agents/dashboard/modules/cost-monitor/src/server/aggregate.ts +86 -0
  176. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-pricing.test.ts +132 -0
  177. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection-filtering.test.ts +193 -0
  178. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection-pricing.test.ts +167 -0
  179. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test-fixtures.ts +213 -0
  180. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test.ts +793 -0
  181. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.ts +622 -0
  182. package/templates/.agents/dashboard/modules/cost-monitor/src/server/index.ts +2 -0
  183. package/templates/.agents/dashboard/modules/cost-monitor/src/server/run-telemetry.test.ts +36 -0
  184. package/templates/.agents/dashboard/modules/cost-monitor/src/server/run-telemetry.ts +22 -0
  185. package/templates/.agents/dashboard/modules/cost-monitor/src/task-cost-groups.test.ts +137 -0
  186. package/templates/.agents/dashboard/modules/cost-monitor/src/task-cost-groups.ts +64 -0
  187. package/templates/.agents/dashboard/modules/cost-monitor/tsconfig.json +10 -0
  188. package/templates/.agents/dashboard/modules/operations/composition-root.ts +19 -0
  189. package/templates/.agents/dashboard/modules/operations/package.json +30 -0
  190. package/templates/.agents/dashboard/modules/operations/src/contracts.ts +409 -0
  191. package/templates/.agents/dashboard/modules/operations/src/duration-population.test.ts +16 -0
  192. package/templates/.agents/dashboard/modules/operations/src/duration-population.ts +35 -0
  193. package/templates/.agents/dashboard/modules/operations/src/react/EntityDetailsDialog.tsx +309 -0
  194. package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.test.ts +33 -0
  195. package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.tsx +491 -0
  196. package/templates/.agents/dashboard/modules/operations/src/react/MacroBoard.test.ts +28 -0
  197. package/templates/.agents/dashboard/modules/operations/src/react/MacroBoard.tsx +313 -0
  198. package/templates/.agents/dashboard/modules/operations/src/react/MacroGrid.tsx +61 -0
  199. package/templates/.agents/dashboard/modules/operations/src/react/MacroPlanningDialog.tsx +427 -0
  200. package/templates/.agents/dashboard/modules/operations/src/react/OperationDateFilters.test.ts +32 -0
  201. package/templates/.agents/dashboard/modules/operations/src/react/OperationDateFilters.tsx +124 -0
  202. package/templates/.agents/dashboard/modules/operations/src/react/OperationsIcons.tsx +58 -0
  203. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx +412 -0
  204. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +498 -0
  205. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +621 -0
  206. package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +800 -0
  207. package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageDetails.tsx +113 -0
  208. package/templates/.agents/dashboard/modules/operations/src/react/PeriodSummaryTable.tsx +248 -0
  209. package/templates/.agents/dashboard/modules/operations/src/react/PrdDocumentDialog.tsx +235 -0
  210. package/templates/.agents/dashboard/modules/operations/src/react/TaskBoard.test.ts +141 -0
  211. package/templates/.agents/dashboard/modules/operations/src/react/TaskBoard.tsx +352 -0
  212. package/templates/.agents/dashboard/modules/operations/src/react/TaskDetailsDialog.tsx +134 -0
  213. package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.tsx +502 -0
  214. package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.test.ts +48 -0
  215. package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.tsx +298 -0
  216. package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.css +19 -0
  217. package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.test.ts +47 -0
  218. package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.ts +66 -0
  219. package/templates/.agents/dashboard/modules/operations/src/react/card-type-colors.css +35 -0
  220. package/templates/.agents/dashboard/modules/operations/src/react/conversation-rows.test.ts +50 -0
  221. package/templates/.agents/dashboard/modules/operations/src/react/conversation-rows.ts +75 -0
  222. package/templates/.agents/dashboard/modules/operations/src/react/entity-details-dialog.css +76 -0
  223. package/templates/.agents/dashboard/modules/operations/src/react/execution-metrics.test.ts +170 -0
  224. package/templates/.agents/dashboard/modules/operations/src/react/execution-metrics.ts +88 -0
  225. package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +32 -0
  226. package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +93 -0
  227. package/templates/.agents/dashboard/modules/operations/src/react/export/ExportProgressToast.tsx +26 -0
  228. package/templates/.agents/dashboard/modules/operations/src/react/export/export-layout.test.ts +67 -0
  229. package/templates/.agents/dashboard/modules/operations/src/react/export/export-session.test.ts +208 -0
  230. package/templates/.agents/dashboard/modules/operations/src/react/export/export-session.ts +194 -0
  231. package/templates/.agents/dashboard/modules/operations/src/react/export/export.css +31 -0
  232. package/templates/.agents/dashboard/modules/operations/src/react/format-card-created-at.test.ts +19 -0
  233. package/templates/.agents/dashboard/modules/operations/src/react/format-card-created-at.ts +19 -0
  234. package/templates/.agents/dashboard/modules/operations/src/react/format-rounded-duration.test.ts +27 -0
  235. package/templates/.agents/dashboard/modules/operations/src/react/format-rounded-duration.ts +14 -0
  236. package/templates/.agents/dashboard/modules/operations/src/react/fullscreen-dialog.test.tsx +113 -0
  237. package/templates/.agents/dashboard/modules/operations/src/react/index.ts +10 -0
  238. package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-data.test.ts +70 -0
  239. package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-data.ts +24 -0
  240. package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-usage.tsx +83 -0
  241. package/templates/.agents/dashboard/modules/operations/src/react/macro-planning-dialog-responsive.css +74 -0
  242. package/templates/.agents/dashboard/modules/operations/src/react/macro-planning-dialog.css +752 -0
  243. package/templates/.agents/dashboard/modules/operations/src/react/metric-accessibility.test.ts +17 -0
  244. package/templates/.agents/dashboard/modules/operations/src/react/operation-date-range.test.ts +55 -0
  245. package/templates/.agents/dashboard/modules/operations/src/react/operation-date-range.ts +135 -0
  246. package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.test.ts +19 -0
  247. package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.ts +27 -0
  248. package/templates/.agents/dashboard/modules/operations/src/react/operations-date-filters.css +154 -0
  249. package/templates/.agents/dashboard/modules/operations/src/react/operations-filter-panel.css +187 -0
  250. package/templates/.agents/dashboard/modules/operations/src/react/operations-layout.test.ts +15 -0
  251. package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +69 -0
  252. package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.css +588 -0
  253. package/templates/.agents/dashboard/modules/operations/src/react/operations-page-filters.ts +51 -0
  254. package/templates/.agents/dashboard/modules/operations/src/react/operations-responsive.css +94 -0
  255. package/templates/.agents/dashboard/modules/operations/src/react/operations-table-badges.css +57 -0
  256. package/templates/.agents/dashboard/modules/operations/src/react/operations-view-order.test.ts +19 -0
  257. package/templates/.agents/dashboard/modules/operations/src/react/operations.css +753 -0
  258. package/templates/.agents/dashboard/modules/operations/src/react/period-summary.css +12 -0
  259. package/templates/.agents/dashboard/modules/operations/src/react/period-summary.test.ts +472 -0
  260. package/templates/.agents/dashboard/modules/operations/src/react/period-summary.ts +237 -0
  261. package/templates/.agents/dashboard/modules/operations/src/react/popup-localization.test.ts +48 -0
  262. package/templates/.agents/dashboard/modules/operations/src/react/run-scope.test.ts +29 -0
  263. package/templates/.agents/dashboard/modules/operations/src/react/run-scope.ts +25 -0
  264. package/templates/.agents/dashboard/modules/operations/src/react/sort-by-created-at.test.ts +35 -0
  265. package/templates/.agents/dashboard/modules/operations/src/react/sort-by-created-at.ts +11 -0
  266. package/templates/.agents/dashboard/modules/operations/src/react/status-labels.ts +36 -0
  267. package/templates/.agents/dashboard/modules/operations/src/react/table-order.test.ts +34 -0
  268. package/templates/.agents/dashboard/modules/operations/src/react/table-order.ts +15 -0
  269. package/templates/.agents/dashboard/modules/operations/src/react/task-origin-badge.css +23 -0
  270. package/templates/.agents/dashboard/modules/operations/src/react/task-origin.test.ts +46 -0
  271. package/templates/.agents/dashboard/modules/operations/src/react/task-origin.ts +27 -0
  272. package/templates/.agents/dashboard/modules/operations/src/react/unified-work-board.css +187 -0
  273. package/templates/.agents/dashboard/modules/operations/src/react/use-current-time.ts +12 -0
  274. package/templates/.agents/dashboard/modules/operations/src/react/use-infinite-column.ts +29 -0
  275. package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.test.ts +247 -0
  276. package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.ts +179 -0
  277. package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection-helpers.ts +43 -0
  278. package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection.test.ts +364 -0
  279. package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection.ts +787 -0
  280. package/templates/.agents/dashboard/modules/operations/src/server/canonical-compat.ts +176 -0
  281. package/templates/.agents/dashboard/modules/operations/src/server/canonical-run-projection.ts +140 -0
  282. package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.test.ts +137 -0
  283. package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.ts +121 -0
  284. package/templates/.agents/dashboard/modules/operations/src/server/filter.test.ts +33 -0
  285. package/templates/.agents/dashboard/modules/operations/src/server/filter.ts +17 -0
  286. package/templates/.agents/dashboard/modules/operations/src/server/index.ts +2 -0
  287. package/templates/.agents/dashboard/modules/operations/src/server/internal.ts +8 -0
  288. package/templates/.agents/dashboard/modules/operations/src/server/macro.ts +68 -0
  289. package/templates/.agents/dashboard/modules/operations/src/server/metric-coverage.ts +60 -0
  290. package/templates/.agents/dashboard/modules/operations/src/server/planned-task-previews.test.ts +22 -0
  291. package/templates/.agents/dashboard/modules/operations/src/server/planned-task-previews.ts +55 -0
  292. package/templates/.agents/dashboard/modules/operations/src/server/read-task-detail.ts +86 -0
  293. package/templates/.agents/dashboard/modules/operations/src/server/run-order.test.ts +23 -0
  294. package/templates/.agents/dashboard/modules/operations/src/server/run-order.ts +11 -0
  295. package/templates/.agents/dashboard/modules/operations/src/server/runs.test.ts +27 -0
  296. package/templates/.agents/dashboard/modules/operations/src/server/runs.ts +77 -0
  297. package/templates/.agents/dashboard/modules/operations/src/server/task-test-counts.test.ts +32 -0
  298. package/templates/.agents/dashboard/modules/operations/src/server/task-test-counts.ts +49 -0
  299. package/templates/.agents/dashboard/modules/operations/src/server/usage.test.ts +25 -0
  300. package/templates/.agents/dashboard/modules/operations/src/server/usage.ts +139 -0
  301. package/templates/.agents/dashboard/modules/operations/src/work-readiness.ts +26 -0
  302. package/templates/.agents/dashboard/modules/operations/tsconfig.json +10 -0
  303. package/templates/.agents/dashboard/modules/traceability/composition-root.ts +7 -0
  304. package/templates/.agents/dashboard/modules/traceability/golden/golden-view.test.ts +27 -0
  305. package/templates/.agents/dashboard/modules/traceability/golden/golden-view.ts +57 -0
  306. package/templates/.agents/dashboard/modules/traceability/golden/index.ts +1 -0
  307. package/templates/.agents/dashboard/modules/traceability/package.json +26 -0
  308. package/templates/.agents/dashboard/modules/traceability/src/contracts.ts +76 -0
  309. package/templates/.agents/dashboard/modules/traceability/src/react/TaskTracePanel.test.ts +80 -0
  310. package/templates/.agents/dashboard/modules/traceability/src/react/TaskTracePanel.tsx +681 -0
  311. package/templates/.agents/dashboard/modules/traceability/src/react/TraceDocumentDialog.tsx +34 -0
  312. package/templates/.agents/dashboard/modules/traceability/src/react/TraceStageDetail.tsx +129 -0
  313. package/templates/.agents/dashboard/modules/traceability/src/react/TraceStageDialog.tsx +49 -0
  314. package/templates/.agents/dashboard/modules/traceability/src/react/index.ts +1 -0
  315. package/templates/.agents/dashboard/modules/traceability/src/react/traceability-embedded.css +9 -0
  316. package/templates/.agents/dashboard/modules/traceability/src/react/traceability-navigation.css +122 -0
  317. package/templates/.agents/dashboard/modules/traceability/src/react/traceability-stage-detail.css +175 -0
  318. package/templates/.agents/dashboard/modules/traceability/src/react/traceability-stage-dialog.css +127 -0
  319. package/templates/.agents/dashboard/modules/traceability/src/react/traceability-usage.css +120 -0
  320. package/templates/.agents/dashboard/modules/traceability/src/react/traceability.css +727 -0
  321. package/templates/.agents/dashboard/modules/traceability/src/server/build-task-trace.test.ts +311 -0
  322. package/templates/.agents/dashboard/modules/traceability/src/server/build-task-trace.ts +421 -0
  323. package/templates/.agents/dashboard/modules/traceability/src/server/index.ts +1 -0
  324. package/templates/.agents/dashboard/modules/traceability/tsconfig.json +10 -0
  325. package/templates/.agents/dashboard/packages/branding/package.json +14 -0
  326. package/templates/.agents/dashboard/packages/branding/src/index.ts +10 -0
  327. package/templates/.agents/dashboard/packages/branding/tsconfig.json +7 -0
  328. package/templates/.agents/dashboard/packages/contracts/package.json +17 -0
  329. package/templates/.agents/dashboard/packages/contracts/src/export.ts +29 -0
  330. package/templates/.agents/dashboard/packages/contracts/src/index.ts +155 -0
  331. package/templates/.agents/dashboard/packages/contracts/src/period-counts.test.ts +48 -0
  332. package/templates/.agents/dashboard/packages/contracts/tsconfig.json +7 -0
  333. package/templates/.agents/dashboard/packages/data-export/package.json +19 -0
  334. package/templates/.agents/dashboard/packages/data-export/src/index.test.ts +268 -0
  335. package/templates/.agents/dashboard/packages/data-export/src/index.ts +84 -0
  336. package/templates/.agents/dashboard/packages/data-export/src/ooxml-stream.test.ts +19 -0
  337. package/templates/.agents/dashboard/packages/data-export/src/ooxml-stream.ts +260 -0
  338. package/templates/.agents/dashboard/packages/local-runtime/package.json +31 -0
  339. package/templates/.agents/dashboard/packages/local-runtime/server.mjs +68 -46
  340. package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.test.ts +224 -0
  341. package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.ts +320 -0
  342. package/templates/.agents/dashboard/packages/local-runtime/src/export/index.ts +7 -0
  343. package/templates/.agents/dashboard/packages/local-runtime/src/manifest-runs.ts +204 -0
  344. package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +92 -0
  345. package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +32 -0
  346. package/templates/.agents/dashboard/packages/local-runtime/src/runtime.mjs +222 -0
  347. package/templates/.agents/dashboard/packages/local-runtime/src/server-settings.test.ts +217 -0
  348. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +526 -0
  349. package/templates/.agents/dashboard/packages/local-runtime/src/server-summary-helpers.ts +73 -0
  350. package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +147 -0
  351. package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +580 -0
  352. package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +799 -0
  353. package/templates/.agents/dashboard/packages/local-runtime/src/start-dashboard.mjs +81 -0
  354. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +85 -33
  355. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +378 -0
  356. package/templates/.agents/dashboard/packages/local-runtime/tsconfig.json +8 -0
  357. package/templates/.agents/dashboard/packages/ui/package.json +18 -0
  358. package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.test.mjs +20 -0
  359. package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.tsx +273 -0
  360. package/templates/.agents/dashboard/packages/ui/src/DataTable.test.tsx +61 -0
  361. package/templates/.agents/dashboard/packages/ui/src/DataTable.tsx +292 -0
  362. package/templates/.agents/dashboard/packages/ui/src/PeriodAverageCards.test.tsx +27 -0
  363. package/templates/.agents/dashboard/packages/ui/src/PeriodAverageCards.tsx +27 -0
  364. package/templates/.agents/dashboard/packages/ui/src/format.test.ts +54 -0
  365. package/templates/.agents/dashboard/packages/ui/src/format.ts +81 -0
  366. package/templates/.agents/dashboard/packages/ui/src/index.ts +6 -0
  367. package/templates/.agents/dashboard/packages/ui/src/period-average-cards.css +64 -0
  368. package/templates/.agents/dashboard/packages/ui/src/ui.css +451 -0
  369. package/templates/.agents/dashboard/packages/ui/tsconfig.json +10 -0
  370. package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +214 -0
  371. package/templates/.agents/dashboard/packages/windows-launcher/ZaipDashboardLauncher.csproj +11 -0
  372. package/templates/.agents/dashboard/packages/windows-launcher/build-dashboard-launcher.ps1 +142 -0
  373. package/templates/.agents/dashboard/packages/windows-launcher/zaip-dashboard.cmd +4 -0
  374. package/templates/.agents/dashboard/tests/e2e/package.json +18 -0
  375. package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +33 -0
  376. package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +531 -0
  377. package/templates/.agents/dashboard/tests/e2e/tsconfig.json +9 -0
  378. package/templates/.agents/dashboard/zaip-dashboard.exe +0 -0
  379. package/templates/{.zaip-aios → .agents}/design/.zaip-managed.json +62 -50
  380. package/templates/.agents/design/DESIGN.md +7 -0
  381. package/templates/.agents/design/apps/catalog/dist/assets/index-BEmIE7WE.css +1 -0
  382. package/templates/{.zaip-aios/design/apps/catalog/dist/assets/index-Bvwc3Bgw.js → .agents/design/apps/catalog/dist/assets/index-CqqYWY2f.js} +1 -1
  383. package/templates/.agents/design/apps/catalog/dist/assets/{index-Bvwc3Bgw.js → index-D9pj7Jlf.js} +1 -1
  384. package/templates/.agents/design/apps/catalog/dist/index.html +2 -2
  385. package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-BWY-80s4.js +1 -0
  386. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{Color-6AOWCN3U-D8qyAXo4.js → Color-6AOWCN3U-B-kAgAjB.js} +1 -1
  387. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-Be2mDUQj.js +27 -0
  388. package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-DRx9blDs.js +1 -0
  389. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{DocsRenderer-JROSPFPF-LmiVo77Q.js → DocsRenderer-JROSPFPF-BVN7xHtv.js} +4 -4
  390. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{WithTooltip-7X4HQR7L-CTMWAwDe.js → WithTooltip-7X4HQR7L-CDHtKYkz.js} +1 -1
  391. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-DRQKCCAG-DUhJxxRU.js → chunk-DRQKCCAG-D6AsDkMK.js} +1 -1
  392. package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-9RCn9-l7.js → .agents/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-B4m5uloN.js} +1 -1
  393. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{components-BX1OfYUi.js → components-CN8YyTUg.js} +5 -5
  394. package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-EwuTh8Zk.js +1 -0
  395. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{iframe-LMhZM1ce.js → iframe-9yZfIsdT.js} +3 -3
  396. package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-BEmIE7WE.css +1 -0
  397. package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/react-18-jAz3avmR.js → .agents/design/apps/catalog/dist/storybook/assets/react-18-BoCSnq6H.js} +1 -1
  398. package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DyL61NPT.js +1 -0
  399. package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-DV8X2acD.js → .agents/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-Bnn_nMwJ.js} +1 -1
  400. package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/theming-CHbHkcNi.js → .agents/design/apps/catalog/dist/storybook/assets/theming-DS_ue2sb.js} +1 -1
  401. package/templates/.agents/design/apps/catalog/dist/storybook/iframe.html +2 -2
  402. package/templates/.agents/design/apps/catalog/dist/storybook/index.json +1 -1
  403. package/templates/.agents/design/apps/catalog/src/components/Primitives.tsx +168 -2
  404. package/templates/.agents/design/apps/catalog/src/components/dialog-focus.test.ts +42 -0
  405. package/templates/.agents/design/apps/catalog/src/components/dialog-focus.ts +38 -0
  406. package/templates/.agents/design/apps/catalog/src/design-contract.test.ts +37 -8
  407. package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +89 -28
  408. package/templates/.agents/design/apps/catalog/src/stories/Components.stories.tsx +54 -0
  409. package/templates/.agents/design/apps/catalog/src/styles/components.css +204 -3
  410. package/templates/.agents/design/apps/catalog/src/styles/design-system.css +2 -0
  411. package/templates/.agents/design/apps/catalog/src/styles.css +5 -0
  412. package/templates/.agents/design/tokens.json +9 -1
  413. package/templates/.agents/requirements/autonomous-assurance.md +9 -10
  414. package/templates/.agents/requirements/comparative-audit.md +22 -0
  415. package/templates/.agents/requirements/context-engine.md +5 -5
  416. package/templates/.agents/requirements/cost-observability.md +3 -2
  417. package/templates/.agents/requirements/data-export.md +57 -0
  418. package/templates/.agents/requirements/design-system.md +2 -2
  419. package/templates/.agents/requirements/execution-engine.md +8 -6
  420. package/templates/.agents/requirements/kanban-dashboard.md +3 -3
  421. package/templates/.agents/requirements/model-orchestration.md +11 -11
  422. package/templates/.agents/requirements/public-distribution.md +4 -4
  423. package/templates/.agents/requirements/software-architecture.md +4 -4
  424. package/templates/.agents/requirements/strategic-improvements.md +24 -0
  425. package/templates/.agents/requirements/work-lifecycle.md +20 -10
  426. package/templates/.agents/requirements/zaip-strategic-95.md +20 -0
  427. package/templates/.agents/rules/{zaip/architecture.md → architecture.md} +1 -1
  428. package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/context.md +3 -3
  429. package/templates/.agents/rules/core.md +21 -0
  430. package/templates/.agents/rules/{zaip/evolution.md → evolution.md} +1 -1
  431. package/templates/.agents/rules/frontend-lite.md +18 -0
  432. package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/model-orchestration.md +1 -1
  433. package/templates/.agents/rules/run-lifecycle-closure.md +24 -0
  434. package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/security.md +1 -1
  435. package/templates/.agents/rules/text-writing-utf8.md +12 -0
  436. package/templates/.agents/rules/workflow.md +25 -0
  437. package/templates/{.zaip-aios → .agents/runtime}/bin/zaip.mjs +399 -195
  438. package/templates/.agents/runtime/checksums.sha256 +9 -0
  439. package/templates/.agents/runtime/manifest.json +16 -0
  440. package/templates/{.zaip-aios → .agents/runtime}/sbom.cdx.json +532 -10
  441. package/templates/.agents/skills/criar-pasta-obsidian/SKILL.md +20 -0
  442. package/templates/.agents/skills/criar-pasta-obsidian/agents/openai.yaml +4 -0
  443. package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.mjs +414 -0
  444. package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.test.mjs +144 -0
  445. package/templates/.agents/skills/zaip-aios/SKILL.md +2 -2
  446. package/templates/.agents/skills/zaip-aios/agents/openai.yaml +4 -0
  447. package/templates/.agents/skills/zaip-skill-adapters/SKILL.md +1 -1
  448. package/templates/.agents/skills/zaip-skill-backend/SKILL.md +10 -0
  449. package/templates/.agents/skills/zaip-skill-backend/agents/openai.yaml +4 -0
  450. package/templates/.agents/skills/zaip-skill-cloud-engineering/SKILL.md +10 -0
  451. package/templates/.agents/skills/zaip-skill-cloud-engineering/agents/openai.yaml +4 -0
  452. package/templates/.agents/skills/zaip-skill-config/SKILL.md +3 -3
  453. package/templates/.agents/skills/zaip-skill-data-analyst/SKILL.md +23 -0
  454. package/templates/.agents/skills/zaip-skill-data-analyst/agents/openai.yaml +4 -0
  455. package/templates/.agents/skills/zaip-skill-design-system/SKILL.md +50 -0
  456. package/templates/.agents/skills/zaip-skill-design-system/agents/openai.yaml +4 -0
  457. package/templates/.agents/skills/zaip-skill-design-system/references/scope.md +21 -0
  458. package/templates/.agents/skills/zaip-skill-enforce-architecture/SKILL.md +2 -2
  459. package/templates/.agents/skills/zaip-skill-execution/SKILL.md +11 -8
  460. package/templates/.agents/skills/zaip-skill-execution/references/prepared-plan.md +2 -0
  461. package/templates/.agents/skills/zaip-skill-frontend/SKILL.md +10 -0
  462. package/templates/.agents/skills/zaip-skill-frontend/agents/openai.yaml +4 -0
  463. package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +41 -15
  464. package/templates/.agents/skills/zaip-skill-github-deploy/agents/openai.yaml +2 -2
  465. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +80 -0
  466. package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +1 -1
  467. package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +10 -0
  468. package/templates/.agents/skills/zaip-skill-marketing/agents/openai.yaml +4 -0
  469. package/templates/.agents/skills/zaip-skill-move-prd/SKILL.md +10 -6
  470. package/templates/.agents/skills/zaip-skill-move-spec/SKILL.md +9 -6
  471. package/templates/.agents/skills/zaip-skill-observability/SKILL.md +1 -1
  472. package/templates/.agents/skills/zaip-skill-prd/SKILL.md +27 -11
  473. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/SKILL.md +3 -4
  474. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +59 -13
  475. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +131 -28
  476. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +81 -2
  477. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.mjs +167 -0
  478. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.test.mjs +267 -0
  479. package/templates/.agents/skills/zaip-skill-refactor-existing-code/SKILL.md +55 -0
  480. package/templates/.agents/skills/zaip-skill-refactor-existing-code/agents/openai.yaml +4 -0
  481. package/templates/.agents/skills/zaip-skill-refactor-existing-code/references/refactor-map-contract.md +33 -0
  482. package/templates/.agents/skills/zaip-skill-refactor-existing-code/references/visual-modes.md +17 -0
  483. package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/inventory-source.mjs +181 -0
  484. package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/refactor-scripts.test.mjs +293 -0
  485. package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/validate-refactor-map.mjs +294 -0
  486. package/templates/.agents/skills/zaip-skill-requirements/SKILL.md +1 -1
  487. package/templates/.agents/skills/zaip-skill-review/SKILL.md +1 -1
  488. package/templates/.agents/skills/zaip-skill-rules/SKILL.md +4 -4
  489. package/templates/.agents/skills/zaip-skill-setup/SKILL.md +2 -2
  490. package/templates/.agents/skills/zaip-skill-spec/SKILL.md +10 -10
  491. package/templates/.agents/skills/zaip-skill-task/SKILL.md +3 -3
  492. package/templates/.agents/skills/zaip-skill-tool-setup/references/secrets.md +1 -1
  493. package/templates/.agents/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +1 -1
  494. package/templates/.agents/skills/zaip-skill-website-readiness/SKILL.md +53 -0
  495. package/templates/.agents/skills/zaip-skill-website-readiness/agents/openai.yaml +4 -0
  496. package/templates/.agents/skills/zaip-skill-website-readiness/references/capability-checklist.md +32 -0
  497. package/templates/.agents/tools/catalog.yaml +0 -6
  498. package/templates/.agents/zaip-aios/README.md +1 -1
  499. package/templates/.agents/zaip-aios/guides/01-primeiros-passos.md +4 -2
  500. package/templates/.agents/zaip-aios/guides/03-tasks.md +6 -0
  501. package/templates/.agents/zaip-aios/guides/04-specs.md +7 -3
  502. package/templates/.agents/zaip-aios/guides/05-prds.md +26 -1
  503. package/templates/.agents/zaip-aios/guides/06-execucao.md +10 -0
  504. package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +1 -1
  505. package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +2 -0
  506. package/templates/.agents/zaip-aios/guides/13-boas-praticas.md +3 -0
  507. package/templates/.agents/zaip-aios/guides/14-troubleshooting.md +3 -1
  508. package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +7 -1
  509. package/templates/.local/gitignore.template +2 -0
  510. package/templates/template-manifest.json +1650 -1859
  511. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-_yxs47Hd.css +0 -1
  512. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-ehU9Etwm.js +0 -1207
  513. package/templates/.agents/design/apps/catalog/dist/assets/index-B4pfFtvJ.css +0 -1
  514. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-DkBtOSHX.js +0 -1
  515. package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-BttERyCr.js +0 -1
  516. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Primitives-HZpQ6PjX.js +0 -1
  517. package/templates/.agents/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-9RCn9-l7.js +0 -18
  518. package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Bu6KfEwW.js +0 -1
  519. package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-B4pfFtvJ.css +0 -1
  520. package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-18-jAz3avmR.js +0 -9
  521. package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DvDPBd6Q.js +0 -1
  522. package/templates/.agents/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-DV8X2acD.js +0 -6
  523. package/templates/.agents/design/apps/catalog/dist/storybook/assets/theming-CHbHkcNi.js +0 -39
  524. package/templates/.agents/rules/project/.gitkeep +0 -0
  525. package/templates/.agents/rules/zaip/context.md +0 -22
  526. package/templates/.agents/rules/zaip/core.md +0 -24
  527. package/templates/.agents/rules/zaip/model-orchestration.md +0 -48
  528. package/templates/.agents/rules/zaip/security.md +0 -20
  529. package/templates/.agents/rules/zaip/workflow.md +0 -35
  530. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/inspect-local-sqlite.py +0 -52
  531. package/templates/.agents/tools/mcp/development/sqlite/README.md +0 -20
  532. package/templates/.agents/tools/mcp/development/sqlite/manifest.yaml +0 -25
  533. package/templates/.zaip-aios/checksums.sha256 +0 -370
  534. package/templates/.zaip-aios/dashboard/.zaip-managed.json +0 -46
  535. package/templates/.zaip-aios/dashboard/README.md +0 -91
  536. package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/index-_yxs47Hd.css +0 -1
  537. package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/index-ehU9Etwm.js +0 -1207
  538. package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/logo_novo_azul-BBx5pA2B.png +0 -0
  539. package/templates/.zaip-aios/dashboard/packages/local-runtime/server.mjs +0 -199
  540. package/templates/.zaip-aios/dashboard/packages/local-runtime/start-dashboard.mjs +0 -726
  541. package/templates/.zaip-aios/dashboard/zaip-dashboard.exe +0 -0
  542. package/templates/.zaip-aios/design/DESIGN.md +0 -180
  543. package/templates/.zaip-aios/design/README.md +0 -47
  544. package/templates/.zaip-aios/design/apps/catalog/.storybook/main.ts +0 -15
  545. package/templates/.zaip-aios/design/apps/catalog/.storybook/preview.ts +0 -21
  546. package/templates/.zaip-aios/design/apps/catalog/dist/assets/index-B4pfFtvJ.css +0 -1
  547. package/templates/.zaip-aios/design/apps/catalog/dist/index.html +0 -14
  548. package/templates/.zaip-aios/design/apps/catalog/dist/logo_novo_azul.png +0 -0
  549. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Color-6AOWCN3U-D8qyAXo4.js +0 -1
  550. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Components.stories-DkBtOSHX.js +0 -1
  551. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-BttERyCr.js +0 -1
  552. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/DocsRenderer-JROSPFPF-LmiVo77Q.js +0 -46
  553. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Primitives-HZpQ6PjX.js +0 -1
  554. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/WithTooltip-7X4HQR7L-CTMWAwDe.js +0 -9
  555. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/axe-Bk3eEgJf.js +0 -20
  556. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-242VQQM5-DB2JSNUA.js +0 -1
  557. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-DRQKCCAG-DUhJxxRU.js +0 -1
  558. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-QQBDHPVZ-nYh9QWsm.js +0 -1
  559. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/components-BX1OfYUi.js +0 -243
  560. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Bu6KfEwW.js +0 -1
  561. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/iframe-B4pfFtvJ.css +0 -1
  562. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/iframe-LMhZM1ce.js +0 -1154
  563. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/jsx-runtime-f3rHp9ZU.js +0 -1
  564. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/matchers-JIUQ3HVY-9iRExWZO.js +0 -28
  565. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/preload-helper-BdFrVu1K.js +0 -1
  566. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/react-DvDPBd6Q.js +0 -1
  567. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/favicon-wrapper.svg +0 -46
  568. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/favicon.svg +0 -1
  569. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/iframe.html +0 -710
  570. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/index.html +0 -152
  571. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/index.json +0 -1
  572. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/logo_novo_azul.png +0 -0
  573. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-bold-italic.woff2 +0 -0
  574. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-bold.woff2 +0 -0
  575. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-italic.woff2 +0 -0
  576. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-regular.woff2 +0 -0
  577. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/a11y-2/manager-bundle.js +0 -57
  578. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/docs-1/manager-bundle.js +0 -18
  579. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -632
  580. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/favicon-wrapper.svg +0 -46
  581. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/favicon.svg +0 -1
  582. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  583. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  584. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  585. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  586. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/globals-runtime.js +0 -78957
  587. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/globals.js +0 -24
  588. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/manager-stores.js +0 -23
  589. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/runtime.js +0 -28253
  590. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/vite-inject-mocker-entry.js +0 -2
  591. package/templates/.zaip-aios/design/apps/catalog/index.html +0 -13
  592. package/templates/.zaip-aios/design/apps/catalog/package.json +0 -32
  593. package/templates/.zaip-aios/design/apps/catalog/public/logo_novo_azul.png +0 -0
  594. package/templates/.zaip-aios/design/apps/catalog/src/App.tsx +0 -29
  595. package/templates/.zaip-aios/design/apps/catalog/src/components/CatalogShell.tsx +0 -78
  596. package/templates/.zaip-aios/design/apps/catalog/src/components/Primitives.tsx +0 -137
  597. package/templates/.zaip-aios/design/apps/catalog/src/design-contract.test.ts +0 -33
  598. package/templates/.zaip-aios/design/apps/catalog/src/pages/ComponentsPage.tsx +0 -83
  599. package/templates/.zaip-aios/design/apps/catalog/src/pages/DesignSystemPage.tsx +0 -185
  600. package/templates/.zaip-aios/design/apps/catalog/src/stories/Components.stories.tsx +0 -12
  601. package/templates/.zaip-aios/design/apps/catalog/src/stories/DesignSystem.stories.tsx +0 -12
  602. package/templates/.zaip-aios/design/apps/catalog/src/styles/catalog.css +0 -315
  603. package/templates/.zaip-aios/design/apps/catalog/src/styles/components.css +0 -228
  604. package/templates/.zaip-aios/design/apps/catalog/src/styles/design-system.css +0 -137
  605. package/templates/.zaip-aios/design/apps/catalog/src/styles.css +0 -85
  606. package/templates/.zaip-aios/design/apps/catalog/vite.config.ts +0 -10
  607. package/templates/.zaip-aios/design/packages/local-runtime/package.json +0 -9
  608. package/templates/.zaip-aios/design/packages/local-runtime/runtime.mjs +0 -238
  609. package/templates/.zaip-aios/design/packages/local-runtime/runtime.test.mjs +0 -66
  610. package/templates/.zaip-aios/design/packages/local-runtime/start-design.mjs +0 -46
  611. package/templates/.zaip-aios/design/packages/windows-launcher/Program.cs +0 -110
  612. package/templates/.zaip-aios/design/packages/windows-launcher/build-design-launcher.ps1 +0 -107
  613. package/templates/.zaip-aios/design/tokens.json +0 -52
  614. package/templates/.zaip-aios/design/zaip-design.exe +0 -0
  615. package/templates/.zaip-aios/manifest.json +0 -377
  616. package/templates/.zaip-aios/profiles/clients.json +0 -506
  617. package/templates/.zaip-aios/profiles/fixtures/architecture/negative/modules/orders/application/queries/list.query.ts +0 -5
  618. package/templates/.zaip-aios/profiles/fixtures/architecture/negative/modules/orders/domain/order.ts +0 -3
  619. package/templates/.zaip-aios/profiles/fixtures/architecture/positive/modules/orders/application/queries/list.query.ts +0 -5
  620. package/templates/.zaip-aios/profiles/typescript-hono-kysely.json +0 -41
  621. package/templates/.zaip-aios/templates/config/agents/catalog.yaml +0 -246
  622. package/templates/.zaip-aios/templates/requirements/.gitkeep +0 -0
  623. package/templates/.zaip-aios/templates/requirements/autonomous-assurance.md +0 -63
  624. package/templates/.zaip-aios/templates/requirements/context-engine.md +0 -44
  625. package/templates/.zaip-aios/templates/requirements/cost-observability.md +0 -39
  626. package/templates/.zaip-aios/templates/requirements/design-system.md +0 -48
  627. package/templates/.zaip-aios/templates/requirements/execution-engine.md +0 -60
  628. package/templates/.zaip-aios/templates/requirements/kanban-dashboard.md +0 -30
  629. package/templates/.zaip-aios/templates/requirements/model-orchestration.md +0 -58
  630. package/templates/.zaip-aios/templates/requirements/public-distribution.md +0 -40
  631. package/templates/.zaip-aios/templates/requirements/software-architecture.md +0 -57
  632. package/templates/.zaip-aios/templates/requirements/work-lifecycle.md +0 -82
  633. package/templates/.zaip-aios/templates/rules/project/.gitkeep +0 -0
  634. package/templates/.zaip-aios/templates/rules/zaip/architecture.md +0 -28
  635. package/templates/.zaip-aios/templates/rules/zaip/core.md +0 -24
  636. package/templates/.zaip-aios/templates/rules/zaip/evolution.md +0 -22
  637. package/templates/.zaip-aios/templates/rules/zaip/workflow.md +0 -35
  638. package/templates/.zaip-aios/templates/skills/.gitkeep +0 -0
  639. package/templates/.zaip-aios/templates/skills/zaip-aios/SKILL.md +0 -9
  640. package/templates/.zaip-aios/templates/skills/zaip-skill-adapt-stack/SKILL.md +0 -11
  641. package/templates/.zaip-aios/templates/skills/zaip-skill-adapt-stack/agents/openai.yaml +0 -4
  642. package/templates/.zaip-aios/templates/skills/zaip-skill-adapters/SKILL.md +0 -15
  643. package/templates/.zaip-aios/templates/skills/zaip-skill-adapters/agents/openai.yaml +0 -4
  644. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/SKILL.md +0 -19
  645. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/agents/openai.yaml +0 -4
  646. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/assets/adapter.example.yaml +0 -26
  647. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/references/security-contract.md +0 -10
  648. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/references/server-layout.md +0 -19
  649. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/scripts/inspect-openapi.mjs +0 -60
  650. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/scripts/scaffold-local-mcp.mjs +0 -47
  651. package/templates/.zaip-aios/templates/skills/zaip-skill-author-skills/SKILL.md +0 -21
  652. package/templates/.zaip-aios/templates/skills/zaip-skill-author-skills/agents/openai.yaml +0 -4
  653. package/templates/.zaip-aios/templates/skills/zaip-skill-change/SKILL.md +0 -20
  654. package/templates/.zaip-aios/templates/skills/zaip-skill-change/agents/openai.yaml +0 -4
  655. package/templates/.zaip-aios/templates/skills/zaip-skill-config/SKILL.md +0 -22
  656. package/templates/.zaip-aios/templates/skills/zaip-skill-config/agents/openai.yaml +0 -4
  657. package/templates/.zaip-aios/templates/skills/zaip-skill-context/SKILL.md +0 -16
  658. package/templates/.zaip-aios/templates/skills/zaip-skill-context/agents/openai.yaml +0 -4
  659. package/templates/.zaip-aios/templates/skills/zaip-skill-cqrs/SKILL.md +0 -11
  660. package/templates/.zaip-aios/templates/skills/zaip-skill-cqrs/agents/openai.yaml +0 -4
  661. package/templates/.zaip-aios/templates/skills/zaip-skill-decisions/SKILL.md +0 -14
  662. package/templates/.zaip-aios/templates/skills/zaip-skill-decisions/agents/openai.yaml +0 -4
  663. package/templates/.zaip-aios/templates/skills/zaip-skill-enforce-architecture/SKILL.md +0 -14
  664. package/templates/.zaip-aios/templates/skills/zaip-skill-enforce-architecture/agents/openai.yaml +0 -4
  665. package/templates/.zaip-aios/templates/skills/zaip-skill-eval/SKILL.md +0 -14
  666. package/templates/.zaip-aios/templates/skills/zaip-skill-eval/agents/openai.yaml +0 -4
  667. package/templates/.zaip-aios/templates/skills/zaip-skill-execution/SKILL.md +0 -36
  668. package/templates/.zaip-aios/templates/skills/zaip-skill-execution/agents/openai.yaml +0 -6
  669. package/templates/.zaip-aios/templates/skills/zaip-skill-execution/references/prepared-plan.md +0 -31
  670. package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/SKILL.md +0 -29
  671. package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/agents/openai.yaml +0 -4
  672. package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/references/launcher-contract.md +0 -36
  673. package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/SKILL.md +0 -75
  674. package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/agents/openai.yaml +0 -6
  675. package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/scripts/preflight.mjs +0 -256
  676. package/templates/.zaip-aios/templates/skills/zaip-skill-github-setup/SKILL.md +0 -80
  677. package/templates/.zaip-aios/templates/skills/zaip-skill-github-setup/agents/openai.yaml +0 -4
  678. package/templates/.zaip-aios/templates/skills/zaip-skill-move-prd/SKILL.md +0 -37
  679. package/templates/.zaip-aios/templates/skills/zaip-skill-move-prd/agents/openai.yaml +0 -4
  680. package/templates/.zaip-aios/templates/skills/zaip-skill-move-spec/SKILL.md +0 -38
  681. package/templates/.zaip-aios/templates/skills/zaip-skill-move-spec/agents/openai.yaml +0 -4
  682. package/templates/.zaip-aios/templates/skills/zaip-skill-navigate-work/SKILL.md +0 -16
  683. package/templates/.zaip-aios/templates/skills/zaip-skill-navigate-work/agents/openai.yaml +0 -4
  684. package/templates/.zaip-aios/templates/skills/zaip-skill-observability/SKILL.md +0 -24
  685. package/templates/.zaip-aios/templates/skills/zaip-skill-observability/agents/openai.yaml +0 -4
  686. package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/SKILL.md +0 -17
  687. package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/agents/openai.yaml +0 -4
  688. package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/references/routing.md +0 -11
  689. package/templates/.zaip-aios/templates/skills/zaip-skill-prd/SKILL.md +0 -44
  690. package/templates/.zaip-aios/templates/skills/zaip-skill-prd/agents/openai.yaml +0 -4
  691. package/templates/.zaip-aios/templates/skills/zaip-skill-preview/SKILL.md +0 -16
  692. package/templates/.zaip-aios/templates/skills/zaip-skill-preview/agents/openai.yaml +0 -4
  693. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/SKILL.md +0 -39
  694. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/agents/openai.yaml +0 -4
  695. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/inspect-local-sqlite.py +0 -52
  696. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/normalize-run-agents.mjs +0 -63
  697. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +0 -698
  698. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +0 -361
  699. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +0 -187
  700. package/templates/.zaip-aios/templates/skills/zaip-skill-requirements/SKILL.md +0 -16
  701. package/templates/.zaip-aios/templates/skills/zaip-skill-requirements/agents/openai.yaml +0 -4
  702. package/templates/.zaip-aios/templates/skills/zaip-skill-review/SKILL.md +0 -18
  703. package/templates/.zaip-aios/templates/skills/zaip-skill-review/agents/openai.yaml +0 -4
  704. package/templates/.zaip-aios/templates/skills/zaip-skill-rules/SKILL.md +0 -19
  705. package/templates/.zaip-aios/templates/skills/zaip-skill-rules/agents/openai.yaml +0 -4
  706. package/templates/.zaip-aios/templates/skills/zaip-skill-security/SKILL.md +0 -30
  707. package/templates/.zaip-aios/templates/skills/zaip-skill-security/agents/openai.yaml +0 -4
  708. package/templates/.zaip-aios/templates/skills/zaip-skill-setup/SKILL.md +0 -25
  709. package/templates/.zaip-aios/templates/skills/zaip-skill-setup/agents/openai.yaml +0 -4
  710. package/templates/.zaip-aios/templates/skills/zaip-skill-spec/SKILL.md +0 -45
  711. package/templates/.zaip-aios/templates/skills/zaip-skill-spec/agents/openai.yaml +0 -4
  712. package/templates/.zaip-aios/templates/skills/zaip-skill-task/SKILL.md +0 -41
  713. package/templates/.zaip-aios/templates/skills/zaip-skill-task/agents/openai.yaml +0 -4
  714. package/templates/.zaip-aios/templates/skills/zaip-skill-text-encoding/SKILL.md +0 -27
  715. package/templates/.zaip-aios/templates/skills/zaip-skill-text-encoding/agents/openai.yaml +0 -6
  716. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/SKILL.md +0 -22
  717. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/agents/openai.yaml +0 -4
  718. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/references/codex-config.md +0 -24
  719. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/references/secrets.md +0 -8
  720. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/configure-local-mcp.mjs +0 -52
  721. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/inspect-tool.mjs +0 -35
  722. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +0 -26
  723. package/templates/.zaip-aios/templates/tools/README.md +0 -9
  724. package/templates/.zaip-aios/templates/tools/api/asaas/README.md +0 -22
  725. package/templates/.zaip-aios/templates/tools/api/asaas/manifest.yaml +0 -20
  726. package/templates/.zaip-aios/templates/tools/api/github/README.md +0 -22
  727. package/templates/.zaip-aios/templates/tools/api/github/manifest.yaml +0 -20
  728. package/templates/.zaip-aios/templates/tools/api/google-ads/README.md +0 -23
  729. package/templates/.zaip-aios/templates/tools/api/google-ads/manifest.yaml +0 -21
  730. package/templates/.zaip-aios/templates/tools/api/google-analytics/README.md +0 -22
  731. package/templates/.zaip-aios/templates/tools/api/google-analytics/manifest.yaml +0 -20
  732. package/templates/.zaip-aios/templates/tools/api/google-search-console/README.md +0 -21
  733. package/templates/.zaip-aios/templates/tools/api/google-search-console/manifest.yaml +0 -19
  734. package/templates/.zaip-aios/templates/tools/api/google-tag-manager/README.md +0 -22
  735. package/templates/.zaip-aios/templates/tools/api/google-tag-manager/manifest.yaml +0 -20
  736. package/templates/.zaip-aios/templates/tools/api/hubspot/README.md +0 -22
  737. package/templates/.zaip-aios/templates/tools/api/hubspot/manifest.yaml +0 -20
  738. package/templates/.zaip-aios/templates/tools/api/instagram-graph/README.md +0 -23
  739. package/templates/.zaip-aios/templates/tools/api/instagram-graph/manifest.yaml +0 -21
  740. package/templates/.zaip-aios/templates/tools/api/kommo-crm/README.md +0 -23
  741. package/templates/.zaip-aios/templates/tools/api/kommo-crm/manifest.yaml +0 -21
  742. package/templates/.zaip-aios/templates/tools/api/linkedin-ads/README.md +0 -23
  743. package/templates/.zaip-aios/templates/tools/api/linkedin-ads/manifest.yaml +0 -21
  744. package/templates/.zaip-aios/templates/tools/api/meta-ads/README.md +0 -23
  745. package/templates/.zaip-aios/templates/tools/api/meta-ads/manifest.yaml +0 -21
  746. package/templates/.zaip-aios/templates/tools/api/openai/README.md +0 -22
  747. package/templates/.zaip-aios/templates/tools/api/openai/manifest.yaml +0 -20
  748. package/templates/.zaip-aios/templates/tools/api/shopify/README.md +0 -23
  749. package/templates/.zaip-aios/templates/tools/api/shopify/manifest.yaml +0 -21
  750. package/templates/.zaip-aios/templates/tools/api/slack/README.md +0 -22
  751. package/templates/.zaip-aios/templates/tools/api/slack/manifest.yaml +0 -20
  752. package/templates/.zaip-aios/templates/tools/api/stripe/README.md +0 -22
  753. package/templates/.zaip-aios/templates/tools/api/stripe/manifest.yaml +0 -20
  754. package/templates/.zaip-aios/templates/tools/api/tiktok-ads/README.md +0 -23
  755. package/templates/.zaip-aios/templates/tools/api/tiktok-ads/manifest.yaml +0 -21
  756. package/templates/.zaip-aios/templates/tools/api/youtube-analytics/README.md +0 -22
  757. package/templates/.zaip-aios/templates/tools/api/youtube-analytics/manifest.yaml +0 -20
  758. package/templates/.zaip-aios/templates/tools/catalog.yaml +0 -358
  759. package/templates/.zaip-aios/templates/tools/mcp/development/browser/README.md +0 -20
  760. package/templates/.zaip-aios/templates/tools/mcp/development/browser/manifest.yaml +0 -24
  761. package/templates/.zaip-aios/templates/tools/mcp/development/filesystem/README.md +0 -20
  762. package/templates/.zaip-aios/templates/tools/mcp/development/filesystem/manifest.yaml +0 -24
  763. package/templates/.zaip-aios/templates/tools/mcp/development/git/README.md +0 -20
  764. package/templates/.zaip-aios/templates/tools/mcp/development/git/manifest.yaml +0 -24
  765. package/templates/.zaip-aios/templates/tools/mcp/development/github/README.md +0 -20
  766. package/templates/.zaip-aios/templates/tools/mcp/development/github/manifest.yaml +0 -25
  767. package/templates/.zaip-aios/templates/tools/mcp/development/gitlab/README.md +0 -20
  768. package/templates/.zaip-aios/templates/tools/mcp/development/gitlab/manifest.yaml +0 -25
  769. package/templates/.zaip-aios/templates/tools/mcp/development/jira/README.md +0 -21
  770. package/templates/.zaip-aios/templates/tools/mcp/development/jira/manifest.yaml +0 -26
  771. package/templates/.zaip-aios/templates/tools/mcp/development/linear/README.md +0 -20
  772. package/templates/.zaip-aios/templates/tools/mcp/development/linear/manifest.yaml +0 -25
  773. package/templates/.zaip-aios/templates/tools/mcp/development/notion/README.md +0 -20
  774. package/templates/.zaip-aios/templates/tools/mcp/development/notion/manifest.yaml +0 -25
  775. package/templates/.zaip-aios/templates/tools/mcp/development/openai-docs/README.md +0 -15
  776. package/templates/.zaip-aios/templates/tools/mcp/development/openai-docs/manifest.yaml +0 -21
  777. package/templates/.zaip-aios/templates/tools/mcp/development/postgresql/README.md +0 -20
  778. package/templates/.zaip-aios/templates/tools/mcp/development/postgresql/manifest.yaml +0 -25
  779. package/templates/.zaip-aios/templates/tools/mcp/development/slack/README.md +0 -20
  780. package/templates/.zaip-aios/templates/tools/mcp/development/slack/manifest.yaml +0 -25
  781. package/templates/.zaip-aios/templates/tools/mcp/development/sqlite/README.md +0 -20
  782. package/templates/.zaip-aios/templates/tools/mcp/development/sqlite/manifest.yaml +0 -25
  783. package/templates/.zaip-aios/templates/tools/mcp/infra/aws/README.md +0 -21
  784. package/templates/.zaip-aios/templates/tools/mcp/infra/aws/manifest.yaml +0 -26
  785. package/templates/.zaip-aios/templates/tools/mcp/infra/azure/README.md +0 -20
  786. package/templates/.zaip-aios/templates/tools/mcp/infra/azure/manifest.yaml +0 -25
  787. package/templates/.zaip-aios/templates/tools/mcp/infra/cloudflare/README.md +0 -21
  788. package/templates/.zaip-aios/templates/tools/mcp/infra/cloudflare/manifest.yaml +0 -26
  789. package/templates/.zaip-aios/templates/tools/mcp/infra/docker/README.md +0 -20
  790. package/templates/.zaip-aios/templates/tools/mcp/infra/docker/manifest.yaml +0 -24
  791. package/templates/.zaip-aios/templates/tools/mcp/infra/gcp/README.md +0 -21
  792. package/templates/.zaip-aios/templates/tools/mcp/infra/gcp/manifest.yaml +0 -26
  793. package/templates/.zaip-aios/templates/tools/mcp/infra/hostinger/README.md +0 -20
  794. package/templates/.zaip-aios/templates/tools/mcp/infra/hostinger/manifest.yaml +0 -25
  795. package/templates/.zaip-aios/templates/tools/mcp/infra/kubernetes/README.md +0 -20
  796. package/templates/.zaip-aios/templates/tools/mcp/infra/kubernetes/manifest.yaml +0 -25
  797. package/templates/.zaip-aios/templates/tools/mcp/infra/terraform/README.md +0 -20
  798. package/templates/.zaip-aios/templates/tools/mcp/infra/terraform/manifest.yaml +0 -24
  799. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-ads/README.md +0 -21
  800. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-ads/manifest.yaml +0 -26
  801. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-analytics/README.md +0 -20
  802. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-analytics/manifest.yaml +0 -25
  803. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-search-console/README.md +0 -19
  804. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-search-console/manifest.yaml +0 -24
  805. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-tag-manager/README.md +0 -21
  806. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-tag-manager/manifest.yaml +0 -26
  807. package/templates/.zaip-aios/templates/tools/mcp/marketing/hubspot/README.md +0 -20
  808. package/templates/.zaip-aios/templates/tools/mcp/marketing/hubspot/manifest.yaml +0 -25
  809. package/templates/.zaip-aios/templates/tools/mcp/marketing/instagram-insights/README.md +0 -21
  810. package/templates/.zaip-aios/templates/tools/mcp/marketing/instagram-insights/manifest.yaml +0 -26
  811. package/templates/.zaip-aios/templates/tools/mcp/marketing/linkedin-ads/README.md +0 -21
  812. package/templates/.zaip-aios/templates/tools/mcp/marketing/linkedin-ads/manifest.yaml +0 -26
  813. package/templates/.zaip-aios/templates/tools/mcp/marketing/mailchimp/README.md +0 -21
  814. package/templates/.zaip-aios/templates/tools/mcp/marketing/mailchimp/manifest.yaml +0 -26
  815. package/templates/.zaip-aios/templates/tools/mcp/marketing/meta-ads/README.md +0 -21
  816. package/templates/.zaip-aios/templates/tools/mcp/marketing/meta-ads/manifest.yaml +0 -26
  817. package/templates/.zaip-aios/templates/tools/mcp/marketing/semrush/README.md +0 -20
  818. package/templates/.zaip-aios/templates/tools/mcp/marketing/semrush/manifest.yaml +0 -25
  819. package/templates/.zaip-aios/templates/tools/mcp/marketing/tiktok-ads/README.md +0 -21
  820. package/templates/.zaip-aios/templates/tools/mcp/marketing/tiktok-ads/manifest.yaml +0 -26
  821. package/templates/.zaip-aios/templates/tools/mcp/marketing/youtube-analytics/README.md +0 -21
  822. package/templates/.zaip-aios/templates/tools/mcp/marketing/youtube-analytics/manifest.yaml +0 -26
  823. package/templates/.zaip-aios/templates/tools/mcp/observability/cloudwatch/README.md +0 -21
  824. package/templates/.zaip-aios/templates/tools/mcp/observability/cloudwatch/manifest.yaml +0 -26
  825. package/templates/.zaip-aios/templates/tools/mcp/observability/datadog/README.md +0 -21
  826. package/templates/.zaip-aios/templates/tools/mcp/observability/datadog/manifest.yaml +0 -26
  827. package/templates/.zaip-aios/templates/tools/mcp/observability/elasticsearch/README.md +0 -21
  828. package/templates/.zaip-aios/templates/tools/mcp/observability/elasticsearch/manifest.yaml +0 -26
  829. package/templates/.zaip-aios/templates/tools/mcp/observability/grafana/README.md +0 -21
  830. package/templates/.zaip-aios/templates/tools/mcp/observability/grafana/manifest.yaml +0 -26
  831. package/templates/.zaip-aios/templates/tools/mcp/observability/kibana/README.md +0 -21
  832. package/templates/.zaip-aios/templates/tools/mcp/observability/kibana/manifest.yaml +0 -26
  833. package/templates/.zaip-aios/templates/tools/mcp/observability/loki/README.md +0 -19
  834. package/templates/.zaip-aios/templates/tools/mcp/observability/loki/manifest.yaml +0 -24
  835. package/templates/.zaip-aios/templates/tools/mcp/observability/new-relic/README.md +0 -21
  836. package/templates/.zaip-aios/templates/tools/mcp/observability/new-relic/manifest.yaml +0 -26
  837. package/templates/.zaip-aios/templates/tools/mcp/observability/opentelemetry/README.md +0 -20
  838. package/templates/.zaip-aios/templates/tools/mcp/observability/opentelemetry/manifest.yaml +0 -25
  839. package/templates/.zaip-aios/templates/tools/mcp/observability/prometheus/README.md +0 -19
  840. package/templates/.zaip-aios/templates/tools/mcp/observability/prometheus/manifest.yaml +0 -24
  841. package/templates/.zaip-aios/templates/tools/mcp/observability/sentry/README.md +0 -21
  842. package/templates/.zaip-aios/templates/tools/mcp/observability/sentry/manifest.yaml +0 -26
  843. package/templates/.zaip-aios/templates/tools/policies/approval-rules.yaml +0 -8
  844. package/templates/.zaip-aios/templates/tools/policies/financial-limits.yaml +0 -6
  845. package/templates/.zaip-aios/templates/tools/policies/permissions.yaml +0 -8
  846. package/templates/.zaip-aios/templates/tools/policies/secret-handling.md +0 -7
  847. package/templates/.zaip-aios/templates/tools/profiles/business.yaml +0 -8
  848. package/templates/.zaip-aios/templates/tools/profiles/default.yaml +0 -8
  849. package/templates/.zaip-aios/templates/tools/profiles/development.yaml +0 -13
  850. package/templates/.zaip-aios/templates/tools/profiles/infrastructure.yaml +0 -8
  851. package/templates/.zaip-aios/templates/tools/profiles/marketing.yaml +0 -9
  852. package/templates/.zaip-aios/templates/tools/profiles/observability.yaml +0 -8
  853. package/templates/.zaip-aios/templates/tools/runtime/README.md +0 -3
  854. package/templates/.zaip-aios/templates/tools/runtime/api-mcp-runtime.mjs +0 -217
  855. package/templates/.zaip-aios/templates/tools/runtime/api-mcp-runtime.test.mjs +0 -56
  856. package/templates/.zaip-aios/templates/tools/runtime/fixtures/definition.json +0 -17
  857. package/templates/.zaip-aios/templates/tools/runtime/runner.mjs +0 -16
  858. package/templates/.zaip-aios/templates/tools/runtime/stdio.test.mjs +0 -32
  859. package/templates/.zaip-aios/templates/tools/state.example.yaml +0 -8
  860. package/templates/.zaip-aios/templates/zaip-aios/INDEX.md +0 -26
  861. package/templates/.zaip-aios/templates/zaip-aios/README.md +0 -13
  862. package/templates/.zaip-aios/templates/zaip-aios/VERSION +0 -1
  863. package/templates/.zaip-aios/templates/zaip-aios/guides/01-primeiros-passos.md +0 -10
  864. package/templates/.zaip-aios/templates/zaip-aios/guides/02-requirements.md +0 -12
  865. package/templates/.zaip-aios/templates/zaip-aios/guides/03-tasks.md +0 -12
  866. package/templates/.zaip-aios/templates/zaip-aios/guides/04-specs.md +0 -16
  867. package/templates/.zaip-aios/templates/zaip-aios/guides/05-prds.md +0 -13
  868. package/templates/.zaip-aios/templates/zaip-aios/guides/06-execucao.md +0 -13
  869. package/templates/.zaip-aios/templates/zaip-aios/guides/07-revisao-e-validacao.md +0 -8
  870. package/templates/.zaip-aios/templates/zaip-aios/guides/08-contexto-e-tokens.md +0 -10
  871. package/templates/.zaip-aios/templates/zaip-aios/guides/09-agentes-e-squads.md +0 -8
  872. package/templates/.zaip-aios/templates/zaip-aios/guides/10-seguranca.md +0 -206
  873. package/templates/.zaip-aios/templates/zaip-aios/guides/11-observabilidade-e-custos.md +0 -10
  874. package/templates/.zaip-aios/templates/zaip-aios/guides/12-instalacao-e-upgrade.md +0 -10
  875. package/templates/.zaip-aios/templates/zaip-aios/guides/13-boas-praticas.md +0 -12
  876. package/templates/.zaip-aios/templates/zaip-aios/guides/14-troubleshooting.md +0 -12
  877. package/templates/.zaip-aios/templates/zaip-aios/guides/15-tools-e-codex.md +0 -25
  878. package/templates/.zaip-aios/templates/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +0 -47
  879. /package/templates/{.zaip-aios → .agents/config}/pricing/fx/2026/07/12/usd-brl.json +0 -0
  880. /package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend/public}/icon_zaip.png +0 -0
  881. /package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend/public}/logo_novo_azul.png +0 -0
  882. /package/templates/{.zaip-aios → .agents/runtime}/LICENSE +0 -0
  883. /package/templates/{.zaip-aios → .agents/runtime}/THIRD_PARTY_NOTICES.md +0 -0
  884. /package/templates/{.zaip-aios → .agents/runtime}/VERSION +0 -0
  885. /package/templates/{.zaip-aios → .agents/runtime}/migrations/001-layout-v1.json +0 -0
  886. /package/templates/{.zaip-aios → .agents/runtime}/migrations/002-layout-v2.json +0 -0
  887. /package/templates/{.zaip-aios → .agents/runtime}/schemas/contracts.schema.json +0 -0
@@ -0,0 +1,77 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardHelpDialog-Cv-JcoxP.js","assets/dashboard-localization-C98LGC-Q.js","assets/DashboardHelpDialog-Je5nK-Et.css","assets/AgentCatalogSettingsPage-CLYIi7Vo.js","assets/AgentCatalogSettingsPage-DTDNVQGX.css","assets/PricingSettingsDialog-CzEggcRb.js","assets/ProjectSettingsPage-05YKn6Z4.js","assets/ProjectSettingsPage-YO3yqtgV.css"])))=>i.map(i=>d[i]);
2
+ var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function re(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+te(a,u),c+=re(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+te(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(ne(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ie(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function A(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var j=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&&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)},M={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=M,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,j)}catch(e){j(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),n=e(((e,n)=>{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,k=O.port2;O.port1.onmessage=ee,D=function(){k.postMessage(null)}}else D=function(){_(ee,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}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 i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),o=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(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 d(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 f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),te=Symbol.iterator;function ne(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function ie(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?ie(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var A=Array.isArray,j=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N={pending:!1,data:null,method:null,action:null},P=[],F=-1;function I(e){return{current:e}}function L(e){0>F||(e.current=P[F],P[F]=null,F--)}function R(e,t){F++,P[F]=e.current,e.current=t}var ae=I(null),oe=I(null),se=I(null),ce=I(null);function z(e,t){switch(R(se,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(ae),R(ae,e)}function le(){L(ae),L(oe),L(se)}function ue(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=Hd(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function de(e){oe.current===e&&(L(ae),L(oe)),ce.current===e&&(L(ce),Qf._currentValue=N)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,ke=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,B=null,Ne=null;function Pe(e){if(typeof je==`function`&&Me(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(B,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(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 V(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function We(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 Ge(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function Ke(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Je(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Fe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ye(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ye(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Xe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ze(e,t){var n=t&-t;return n=n&42?1:Qe(n),(n&(e.suspendedLanes|t))===0?n:0}function Qe(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 $e(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function et(){var e=M.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function H(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var tt=Math.random().toString(36).slice(2),nt=`__reactFiber$`+tt,rt=`__reactProps$`+tt,it=`__reactContainer$`+tt,at=`__reactEvents$`+tt,ot=`__reactListeners$`+tt,st=`__reactHandles$`+tt,ct=`__reactResources$`+tt,lt=`__reactMarker$`+tt;function ut(e){delete e[nt],delete e[rt],delete e[at],delete e[ot],delete e[st]}function dt(e){var t=e[nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[nt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function ft(e){if(e=e[nt]||e[it]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function mt(e){var t=e[ct];return t||=e[ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ht(e){e[lt]=!0}var gt=new Set,_t={};function vt(e,t){yt(e,t),yt(e+`Capture`,t)}function yt(e,t){for(_t[e]=t,e=0;e<t.length;e++)gt.add(t[e])}var bt=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]*$`),xt={},St={};function Ct(e){return ye.call(St,e)?!0:ye.call(xt,e)?!1:bt.test(e)?St[e]=!0:(xt[e]=!0,!1)}function wt(e,t,n){if(Ct(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Tt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Et(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Dt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ot(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function At(e){if(!e._valueTracker){var t=Ot(e)?`checked`:`value`;e._valueTracker=kt(e,t,``+e[t])}}function jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ot(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Mt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Nt=/[\n"\\]/g;function Pt(e){return e.replace(Nt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ft(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Dt(t)):e.value!==``+Dt(t)&&(e.value=``+Dt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Lt(e,o,Dt(n)):Lt(e,o,Dt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Dt(s):e.removeAttribute(`name`)}function It(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){At(e);return}n=n==null?``:``+Dt(n),t=t==null?n:``+Dt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),At(e)}function Lt(e,t,n){t===`number`&&Mt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Rt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Dt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function zt(e,t,n){if(t!=null&&(t=``+Dt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Dt(n)}function Bt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(s(92));if(A(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}n??=``,t=n}n=Dt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),At(e)}function Vt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ht=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 Ut(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Ht.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Wt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(s(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Ut(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&Ut(e,a,t[a])}function Gt(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 Kt=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`]]),qt=/^[\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 Jt(e){return qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Yt(){}var Xt=null;function Zt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qt=null,$t=null;function en(e){var t=ft(e);if(t&&(e=t.stateNode)){var n=e[rt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ft(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Pt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[rt]||null;if(!i)throw Error(s(90));Ft(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&jt(r)}break a;case`textarea`:zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Rt(e,!!n.multiple,t,!1)}}}var tn=!1;function nn(e,t,n){if(tn)return e(t,n);tn=!0;try{return e(t)}finally{if(tn=!1,(Qt!==null||$t!==null)&&(xu(),Qt&&(t=Qt,e=$t,$t=Qt=null,en(t),e)))for(t=0;t<e.length;t++)en(e[t])}}function rn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[rt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(s(231,t,typeof n));return n}var an=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),on=!1;if(an)try{var sn={};Object.defineProperty(sn,"passive",{get:function(){on=!0}}),window.addEventListener(`test`,sn,sn),window.removeEventListener(`test`,sn,sn)}catch{on=!1}var cn=null,ln=null,un=null;function dn(){if(un)return un;var e,t=ln,n=t.length,r,i=`value`in cn?cn.value:cn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return un=i.slice(e,1<r?1-r:void 0)}function fn(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 pn(){return!0}function mn(){return!1}function hn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?pn:mn,this.isPropagationStopped=mn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=pn)},persist:function(){},isPersistent:pn}),t}var gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_n=hn(gn),vn=h({},gn,{view:0,detail:0}),yn=hn(vn),bn,xn,Sn,Cn=h({},vn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pn,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!==Sn&&(Sn&&e.type===`mousemove`?(bn=e.screenX-Sn.screenX,xn=e.screenY-Sn.screenY):xn=bn=0,Sn=e),bn)},movementY:function(e){return`movementY`in e?e.movementY:xn}}),wn=hn(Cn),Tn=hn(h({},Cn,{dataTransfer:0})),En=hn(h({},vn,{relatedTarget:0})),Dn=hn(h({},gn,{animationName:0,elapsedTime:0,pseudoElement:0})),On=hn(h({},gn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),kn=hn(h({},gn,{data:0})),An={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},jn={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`},Mn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Nn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mn[e])?!!t[e]:!1}function Pn(){return Nn}var Fn=hn(h({},vn,{key:function(e){if(e.key){var t=An[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=fn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pn,charCode:function(e){return e.type===`keypress`?fn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?fn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),In=hn(h({},Cn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ln=hn(h({},vn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pn})),Rn=hn(h({},gn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=hn(h({},Cn,{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})),Bn=hn(h({},gn,{newState:0,oldState:0})),Vn=[9,13,27,32],Hn=an&&`CompositionEvent`in window,Un=null;an&&`documentMode`in document&&(Un=document.documentMode);var Wn=an&&`TextEvent`in window&&!Un,Gn=an&&(!Hn||Un&&8<Un&&11>=Un),Kn=` `,qn=!1;function Jn(e,t){switch(e){case`keyup`:return Vn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Yn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Xn=!1;function Zn(e,t){switch(e){case`compositionend`:return Yn(t);case`keypress`:return t.which===32?(qn=!0,Kn):null;case`textInput`:return e=t.data,e===Kn&&qn?null:e;default:return null}}function Qn(e,t){if(Xn)return e===`compositionend`||!Hn&&Jn(e,t)?(e=dn(),un=ln=cn=null,Xn=!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 Gn&&t.locale!==`ko`?null:t.data;default:return null}}var $n={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 er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!$n[e.type]:t===`textarea`}function tr(e,t,n,r){Qt?$t?$t.push(r):$t=[r]:Qt=r,t=Dd(t,`onChange`),0<t.length&&(n=new _n(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var nr=null,rr=null;function ir(e){bd(e,0)}function ar(e){if(jt(pt(e)))return e}function or(e,t){if(e===`change`)return t}var sr=!1;if(an){var cr;if(an){var lr=`oninput`in document;if(!lr){var ur=document.createElement(`div`);ur.setAttribute(`oninput`,`return;`),lr=typeof ur.oninput==`function`}cr=lr}else cr=!1;sr=cr&&(!document.documentMode||9<document.documentMode)}function dr(){nr&&(nr.detachEvent(`onpropertychange`,fr),rr=nr=null)}function fr(e){if(e.propertyName===`value`&&ar(rr)){var t=[];tr(t,rr,e,Zt(e)),nn(ir,t)}}function pr(e,t,n){e===`focusin`?(dr(),nr=t,rr=n,nr.attachEvent(`onpropertychange`,fr)):e===`focusout`&&dr()}function mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ar(rr)}function hr(e,t){if(e===`click`)return ar(t)}function gr(e,t){if(e===`input`||e===`change`)return ar(t)}function _r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var vr=typeof Object.is==`function`?Object.is:_r;function yr(e,t){if(vr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!vr(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mt(e.document)}return t}function wr(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 Tr=an&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Mt(r)||(r=Er,`selectionStart`in r&&wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Or&&yr(Or,r)||(Or=r,r=Dd(Dr,`onSelect`),0<r.length&&(t=new _n(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};an&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`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(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),vt(t,[e])}var Kr=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&&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)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Fe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<fu)throw fu=0,pu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function si(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ci(e,t,n,r,i,a){var o=0;if(r=e,typeof e==`function`)ai(e)&&(o=1);else if(typeof e==`string`)o=Uf(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case O:return e=ii(31,n,t,i),e.elementType=O,e.lanes=a,e;case y:return li(n.children,i,a,t);case b:o=8,i|=24;break;case x:return e=ii(12,n,t,i|2),e.elementType=x,e.lanes=a,e;case T:return e=ii(13,n,t,i),e.elementType=T,e.lanes=a,e;case E:return e=ii(19,n,t,i),e.elementType=E,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:o=10;break a;case S:o=9;break a;case w:o=11;break a;case ee:o=14;break a;case D:o=16,r=null;break a}o=29,n=Error(s(130,e===null?`null`:typeof e,``)),r=null}return t=ii(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Fe(r)-1;r&=~(1<<i),n+=1;var a=32-Fe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Fe(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,U=null,W=!1,Ai=null,ji=!1,Mi=Error(s(519));function Ni(e){throw zi(mi(Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Mi}function Pi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[nt]=e,t[rt]=r,n){case`dialog`:Z(`cancel`,t),Z(`close`,t);break;case`iframe`:case`object`:case`embed`:Z(`load`,t);break;case`video`:case`audio`:for(n=0;n<vd.length;n++)Z(vd[n],t);break;case`source`:Z(`error`,t);break;case`img`:case`image`:case`link`:Z(`error`,t),Z(`load`,t);break;case`details`:Z(`toggle`,t);break;case`input`:Z(`invalid`,t),It(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Z(`invalid`,t);break;case`textarea`:Z(`invalid`,t),Bt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Nd(t.textContent,n)?(r.popover!=null&&(Z(`beforetoggle`,t),Z(`toggle`,t)),r.onScroll!=null&&Z(`scroll`,t),r.onScrollEnd!=null&&Z(`scrollend`,t),r.onClick!=null&&(t.onclick=Yt),t=!0):t=!1,t||Ni(e,!0)}function Fi(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:ji=!1;return;case 27:case 3:ji=!0;return;default:ki=ki.return}}function Ii(e){if(e!==ki)return!1;if(!W)return Fi(e),W=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&U&&Ni(e),Fi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));U=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));U=uf(e)}else t===27?(t=U,Zd(e.type)?(e=lf,lf=null,U=e):U=t):U=ki?cf(e.stateNode.nextSibling):null;return!0}function Li(){U=ki=null,W=!1}function Ri(){var e=Ai;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Ai=null),e}function zi(e){Ai===null?Ai=[e]:Ai.push(e)}var Bi=I(null),Vi=null,Hi=null;function Ui(e,t,n){R(Bi,t._currentValue),t._currentValue=n}function Wi(e){e._currentValue=Bi.current,L(Bi)}function Gi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ki(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Gi(a.return,n,e),r||(o=null);break a}a=c.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(s(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Gi(o,n,e),o=null}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function qi(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(s(387));if(o=o.memoizedProps,o!==null){var c=i.type;vr(i.pendingProps.value,o.value)||(e===null?e=[c]:e.push(c))}}else if(i===ce.current){if(o=i.alternate,o===null)throw Error(s(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&Ki(t,e,n,r),t.flags|=262144}function Ji(e){for(e=e.firstContext;e!==null;){if(!vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Yi(e){Vi=e,Hi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xi(e){return Qi(Vi,e)}function Zi(e,t){return Vi===null&&Yi(e),Qi(e,t)}function Qi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Hi===null){if(e===null)throw Error(s(308));Hi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Hi=Hi.next=t;return n}var $i=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ea=t.unstable_scheduleCallback,ta=t.unstable_NormalPriority,na={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ra(){return{controller:new $i,data:new Map,refCount:0}}function ia(e){e.refCount--,e.refCount===0&&ea(ta,function(){e.controller.abort()})}var aa=null,oa=0,sa=0,ca=null;function la(e,t){if(aa===null){var n=aa=[];oa=0,sa=fd(),ca={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return oa++,t.then(ua,ua),t}function ua(){if(--oa===0&&aa!==null){ca!==null&&(ca.status=`fulfilled`);var e=aa;aa=null,sa=0,ca=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function da(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var fa=j.S;j.S=function(e,t){tu=we(),typeof t==`object`&&t&&typeof t.then==`function`&&la(e,t),fa!==null&&fa(e,t)};var pa=I(null);function ma(){var e=pa.current;return e===null?Rl.pooledCache:e}function ha(e,t){t===null?R(pa,pa.current):R(pa,t.pool)}function ga(){var e=ma();return e===null?null:{parent:na._currentValue,pool:e}}var _a=Error(s(460)),va=Error(s(474)),ya=Error(s(542)),ba={then:function(){}};function xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Sa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Yt,Yt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e;default:if(typeof t.status==`string`)t.then(Yt,Yt);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e}throw wa=t,_a}}function Ca(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(wa=e,_a):e}}var wa=null;function Ta(){if(wa===null)throw Error(s(459));var e=wa;return wa=null,e}function Ea(e){if(e===_a||e===ya)throw Error(s(483))}var Da=null,Oa=0;function ka(e){var t=Oa;return Oa+=1,Da===null&&(Da=[]),Sa(Da,e,t)}function Aa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ja(e,t){throw t.$$typeof===g?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ma(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=oi(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function o(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ui(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===D&&Ca(a)===t.type)?(t=i(t,n.props),Aa(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Aa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=fi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=li(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ci(t.type,t.key,t.props,null,e.mode,n),Aa(n,t),n.return=e,n;case v:return t=fi(t,e.mode,n),t.return=e,t;case D:return t=Ca(t),f(e,t,n)}if(A(t)||ne(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ka(t),n);if(t.$$typeof===C)return f(e,Zi(e,t),n);ja(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case D:return n=Ca(n),p(e,t,n,r)}if(A(n)||ne(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ka(n),r);if(n.$$typeof===C)return p(e,t,Zi(e,n),r);ja(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=Ca(r),m(e,t,n,r,i)}if(A(r)||ne(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ka(r),i);if(r.$$typeof===C)return m(e,t,n,Zi(t,r),i);ja(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),W&&wi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return W&&wi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),W&&wi(i,h),l}function g(i,o,c,l){if(c==null)throw Error(s(151));for(var u=null,d=null,h=o,g=o=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),W&&wi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return W&&wi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),W&&wi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&Ca(l)===r.type){n(e,r.sibling),c=i(r,a.props),Aa(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=li(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=ci(a.type,a.key,a.props,null,e.mode,c),Aa(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=fi(a,e.mode,c),c.return=e,e=c}return o(e);case D:return a=Ca(a),b(e,r,a,c)}if(A(a))return h(e,r,a,c);if(ne(a)){if(l=ne(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,ka(a),c);if(a.$$typeof===C)return b(e,r,Zi(e,a),c);ja(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=ui(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=b(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xe(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Fa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ga(n[e],t)}var qa=I(null),Ja=I(0);function Ya(e,t){e=Wl,R(Ja,e),R(qa,t),Wl=e|t.baseLanes}function Xa(){R(Ja,Wl),R(qa,qa.current)}function Za(){Wl=Ja.current,L(qa),L(Ja)}var Qa=I(null),$a=null;function eo(e){var t=e.alternate;R(ao,ao.current&1),R(Qa,e),$a===null&&(t===null||qa.current!==null||t.memoizedState!==null)&&($a=e)}function to(e){R(ao,ao.current),R(Qa,e),$a===null&&($a=e)}function no(e){e.tag===22?(R(ao,ao.current),R(Qa,e),$a===null&&($a=e)):ro(e)}function ro(){R(ao,ao.current),R(Qa,Qa.current)}function io(e){L(Qa),$a===e&&($a=null),L(ao)}var ao=I(0);function oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))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)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 so=0,G=null,co=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(s(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return so=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Is:Ls,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){j.H=Fs;var t=co!==null&&co.next!==null;if(so=0,lo=co=G=null,uo=!1,ho=0,go=null,t)throw Error(s(300));e===null||ec||(e=e.dependencies,e!==null&&Ji(e)&&(ec=!0))}function So(e,t,n,r){G=e;var i=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=i)throw Error(s(301));if(i+=1,lo=co=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}j.H=Rs,a=t(n,r)}while(fo);return a}function Co(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(co===null?null:co.memoizedState)!==e&&(G.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}so=0,lo=co=G=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?G.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(co===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=co.next;var t=lo===null?G.memoizedState:lo.next;if(t!==null)lo=t,co=e;else{if(e===null)throw G.alternate===null?Error(s(467)):Error(s(310));co=e,e={memoizedState:co.memoizedState,baseState:co.baseState,baseQueue:co.baseQueue,queue:co.queue,next:null},lo===null?G.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Sa(go,e,t),t=G,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Is:Ls),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return Xi(e)}throw Error(s(438,String(e)))}function Mo(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),G.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function K(e){return Po(Oo(),co,e)}function Po(e,t,n){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=o=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(so&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===sa&&(d=!0);else if((so&p)===p){u=u.next,p===sa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,o=a):l=l.next=f,G.lanes|=p,Kl|=p;f=u.action,po&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,o=a):l=l.next=p,G.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=a:l.next=c,!vr(a,e.memoizedState)&&(ec=!0,d&&(n=ca,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Fo(e){var t=Oo(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);vr(a,t.memoizedState)||(ec=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Io(e,t,n){var r=G,i=Oo(),a=W;if(a){if(n===void 0)throw Error(s(407));n=n()}else n=t();var o=!vr((co||i).memoizedState,n);if(o&&(i.memoizedState=n,ec=!0),i=i.queue,ss(zo.bind(null,r,i,e),[e]),i.getSnapshot!==t||o||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,i,n,t),null),Rl===null)throw Error(s(349));a||so&127||Lo(r,t,n)}return n}function Lo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=ko(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Bo(t)&&Vo(e)}function zo(e,t,n){return n(function(){Bo(t)&&Vo(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function Vo(e){var t=$r(e,2);t!==null&&gu(t,e,2)}function Ho(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Uo(e,t,n,r){return e.baseState=n,Po(e,co,typeof r==`function`?r:No)}function Wo(e,t,n,r,i){if(Ms(e))throw Error(s(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};j.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,Go(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Go(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),Ko(e,t,s)}catch(n){Jo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),Ko(e,t,a)}catch(n){Jo(e,t,n)}}function Ko(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){qo(e,t,n)},function(n){return Jo(e,t,n)}):qo(e,t,n)}function qo(e,t,n){t.status=`fulfilled`,t.value=n,Yo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Go(e,n)))}function Jo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Yo(t),t=t.next;while(t!==r)}e.action=null}function Yo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xo(e,t){return t}function Zo(e,t){if(W){var n=Rl.formState;if(n!==null){a:{var r=G;if(W){if(U){b:{for(var i=U,a=ji;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){U=cf(i.nextSibling),r=i.data===`F!`;break a}}Ni(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:t},n.queue=r,n=ks.bind(null,G,r),r.dispatch=n,r=Ho(!1),a=js.bind(null,G,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Wo.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Qo(e){return $o(Oo(),co,e)}function $o(e,t,n){if(t=Po(e,t,Xo)[0],e=K(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===_a?ya:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,ns(9,{destroy:void 0},es.bind(null,i,n),null)),[r,a,e]}function es(e,t){e.action=t}function ts(e){var t=Oo(),n=co;if(n!==null)return $o(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=ko(),G.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function rs(){return Oo().memoizedState}function is(e,t,n,r){var i=Do();G.flags|=e,i.memoizedState=ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function as(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;co!==null&&r!==null&&yo(r,co.memoizedState.deps)?i.memoizedState=ns(t,a,n,r):(G.flags|=e,i.memoizedState=ns(1|t,a,n,r))}function os(e,t){is(8390656,8,e,t)}function ss(e,t){as(2048,8,e,t)}function cs(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=ko(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Oo().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(q&2)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return as(4,2,e,t)}function ds(e,t){return as(4,4,e,t)}function fs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){n=n==null?null:n.concat([e]),as(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||so&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),G.lanes|=e,Kl|=e,n)}function vs(e,t,n,r){return vr(n,t)?n:qa.current===null?!(so&42)||so&1073741824&&!(Y&261930)?(ec=!0,e.memoizedState=n):(e=hu(),G.lanes|=e,Kl|=e,t):(e=_s(e,n,r),vr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};j.T=s,js(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,da(c,r),mu(e)):As(e,t,r,mu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Ss(e).queue;ys(e,i,t,N,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:N,baseState:N,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:N},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},mu())}function ws(){return Xi(Qf)}function Ts(){return Oo().memoizedState}function Es(){return Oo().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Ra(n);var r=za(t,e,n);r!==null&&(gu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=Qr(e,t,n,r),n!==null&&(gu(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,mu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,vr(s,o))return Zr(e,t,i,0),Rl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return gu(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(s(479))}else t=Qr(e,n,r,2),t!==null&&gu(t,e,2)}function Ms(e){var t=e.alternate;return e===G||t!==null&&t===G}function Ns(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xe(e,n)}}var Fs={readContext:Xi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Fs.useEffectEvent=vo;var Is={readContext:Xi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:os,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),is(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Pe(!0);try{n(t)}finally{Pe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=ks.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Do(),e,t)},useTransition:function(){var e=Ho(!1);return e=ys.bind(null,G,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,i=Do();if(W){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Rl===null)throw Error(s(349));Y&127||Lo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,os(zo.bind(null,r,a,e),[e]),r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,a,n,t),null),n},useId:function(){var e=Do(),t=Rl.identifierPrefix;if(W){var n=Ci,r=Si;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Ds.bind(null,G)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(q&2)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:Xi,use:jo,useCallback:hs,useContext:Xi,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:K,useRef:rs,useState:function(){return K(No)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Oo(),co.memoizedState,e,t)},useTransition:function(){var e=K(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){return Uo(Oo(),co,e,t)},useMemoCache:Mo,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:Xi,use:jo,useCallback:hs,useContext:Xi,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Fo,useRef:rs,useState:function(){return Fo(No)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Oo();return co===null?_s(n,e,t):vs(n,co.memoizedState,e,t)},useTransition:function(){var e=Fo(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){var n=Oo();return co===null?(n.baseState=e,[e,n.queue.dispatch]):Uo(n,co,e,t)},useMemoCache:Mo,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ra(r);i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(gu(t,e,r),Ba(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ra(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(gu(t,e,r),Ba(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Ra(n);r.tag=2,t!=null&&(r.callback=t),t=za(e,r,n),t!==null&&(gu(t,e,n),Ba(t,e,n))}};function Vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!yr(n,r)||!yr(i,a):!0}function Hs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Us(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ws(e){Kr(e)}function Gs(e){console.error(e)}function Ks(e){Kr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){return n=Ra(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=Ra(e),e.tag=3,e}function Zs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&qi(t,n,i,!0),n=Qa.current,n!==null){switch(n.tag){case 31:case 13:return $a===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,i)),!1;case 22:return n.flags|=65536,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ku(e,r,i)),!1}throw Error(s(435,n.tag))}return Ku(e,r,i),Ou(),!1}if(W)return t=Qa.current,t===null?(r!==Mi&&(t=Error(s(423),{cause:r}),zi(mi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=mi(r,n),i=Ys(e.stateNode,r,i),Va(e,i),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Mi&&(e=Error(s(422),{cause:r}),zi(mi(e,n)))),!1;var a=Error(s(520),{cause:r});if(a=mi(a,n),Zl===null?Zl=[a]:Zl.push(a),Gl!==4&&(Gl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Ys(n.stateNode,r,e),Va(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(iu===null||!iu.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Xs(i),Zs(i,e,n,r),Va(n,i),!1}n=n.return}while(n!==null);return!1}var $s=Error(s(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?Pa(t,null,n,r):Na(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Yi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!ec?(To(e,t,i),Ec(e,t,i)):(W&&s&&Ei(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Dc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?yr:n,n(o,r)&&e.ref===t.ref)return Ec(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Dc(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Ec(e,t,i)}return fc(e,t,n,r,i)}function ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ha(t,a===null?null:a.cachePool),a===null?Xa():Ya(t,a),no(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ha(t,null),Xa(),ro(t)):(ha(t,a.cachePool),Ya(t,a),ro(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=ma();return a=a===null?null:{parent:na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ha(t,null),Xa(),no(t),e!==null&&qi(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return Na(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,io(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(W){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if(to(t),(e=U)?(e=rf(e,ji),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,U=null)):e=null,e===null)throw Ni(t);return t.lanes=536870912,null}return cc(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(to(t),i)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(ec||qi(e,t,n,!1),i=(n&e.childLanes)!==0,ec||i){if(r=Rl,r!==null&&(o=Ze(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,$r(e,o),gu(r,e,o),$s;Ou(),t=lc(e,t,n)}else e=a.treeContext,U=cf(o.nextSibling),ki=t,W=!0,Ai=null,ji=!1,e!==null&&Oi(t,e),t=cc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return Yi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!ec?(To(e,t,i),Ec(e,t,i)):(W&&r&&Ei(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return Yi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!ec?(To(e,t,a),Ec(e,t,a)):(W&&r&&Ei(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(Yi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Xi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ia(t),o=n.contextType,a.context=typeof o==`object`&&o?Xi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Bs.enqueueReplaceState(a,a.state,null),Wa(t,r,a,i),Ua(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Xi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Hs(t,a,r,o),Fa=!1;var f=t.memoizedState;a.state=f,Wa(t,r,a,i),Ua(),l=t.memoizedState,s||f!==l||Fa?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Fa||Vs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,La(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Xi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Hs(t,a,r,c),Fa=!1,f=t.memoizedState,a.state=f,Wa(t,r,a,i),Ua();var p=t.memoizedState;o!==d||f!==p||Fa||e!==null&&e.dependencies!==null&&Ji(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Fa||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ji(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,dc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Na(t,e.child,null,i),t.child=Na(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ec(e,t,i),e}function hc(e,t,n,r){return Li(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:ga()}}function vc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function yc(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(ao.current&2)!=0),o&&(i=!0,t.flags&=-129),o=(t.flags&32)!=0,t.flags&=-33,e===null){if(W){if(i?eo(t):ro(t),(e=U)?(e=rf(e,ji),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,U=null)):e=null,e===null)throw Ni(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(ro(t),i=t.mode,c=xc({mode:`hidden`,children:c},i),r=li(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,o,n),t.memoizedState=gc,oc(null,r)):(eo(t),bc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(eo(t),t.flags&=-257,t=Sc(e,t,n)):t.memoizedState===null?(ro(t),c=r.fallback,i=t.mode,r=xc({mode:`visible`,children:r.children},i),c=li(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Na(t,e.child,null,n),r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,o,n),t.memoizedState=gc,t=oc(null,r)):(ro(t),t.child=e.child,t.flags|=128,t=null);else if(eo(t),of(c)){if(o=c.nextSibling&&c.nextSibling.dataset,o)var u=o.dgst;o=u,r=Error(s(419)),r.stack=``,r.digest=o,zi({value:r,source:null,stack:null}),t=Sc(e,t,n)}else if(ec||qi(e,t,n,!1),o=(n&e.childLanes)!==0,ec||o){if(o=Rl,o!==null&&(r=Ze(o,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),gu(o,e,r),$s;af(c)||Ou(),t=Sc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,U=cf(c.nextSibling),ki=t,W=!0,Ai=null,ji=!1,e!==null&&Oi(t,e),t=bc(t,r.children),t.flags|=4096);return t}return i?(ro(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,i,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=_c(n):(i=c.cachePool,i===null?i=ga():(l=na._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=vc(e,o,n),t.memoizedState=gc,oc(e.child,r)):(eo(t),n=e.child,e=n.sibling,n=oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function bc(e,t){return t=xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function xc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function Sc(e,t,n){return Na(t,e.child,null,n),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gi(e.return,t,n)}function wc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Tc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ao.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(ao,o),tc(e,t,r,n),r=W?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cc(e,n,t);else if(e.tag===19)Cc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wc(t,!0,n,null,a,r);break;case`together`:wc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(qi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ji(e))):!0}function Oc(e,t,n){switch(t.tag){case 3:z(t,t.stateNode.containerInfo),Ui(t,na,e.memoizedState.cache),Li();break;case 27:case 5:ue(t);break;case 4:z(t,t.stateNode.containerInfo);break;case 10:Ui(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,to(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(eo(t),e=Ec(e,t,n),e===null?null:e.sibling):yc(e,t,n):(eo(t),t.flags|=128,null);eo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Tc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(ao,ao.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Ui(t,na,e.memoizedState.cache)}return Ec(e,t,n)}function kc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Dc(e,n)&&!(t.flags&128))return ec=!1,Oc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,W&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ca(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=nc(null,t,e,r,n);break a}else if(i===ee){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=ie(e)||e,Error(s(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Us(r,t.pendingProps),mc(e,t,r,i,n);case 3:a:{if(z(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,La(e,t),Wa(t,r,null,n);var o=t.memoizedState;if(r=o.cache,Ui(t,na,r),r!==a.cache&&Ki(t,[na],n,!0),Ua(),r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==i){i=mi(Error(s(424)),t),zi(i),t=hc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(U=cf(e.firstChild),ki=t,W=!0,Ai=null,ji=!0,n=Pa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Li(),r===i){t=Ec(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:W||(n=t.type,e=t.pendingProps,r=Bd(se.current).createElement(n),r[nt]=t,r[rt]=e,Pd(r,n,e),ht(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&W&&(r=t.stateNode=ff(t.type,t.pendingProps,se.current),ki=t,ji=!0,i=U,Zd(t.type)?(lf=i,U=cf(r.firstChild)):U=i),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((i=r=U)&&(r=tf(r,t.type,t.pendingProps,ji),r===null?i=!1:(t.stateNode=r,ki=t,U=cf(r.firstChild),ji=!1,i=!0)),i||Ni(t)),ue(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,r=a.children,Ud(i,a)?r=null:o!==null&&Ud(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=bo(e,t,Co,null,null,n),Qf._currentValue=i),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&W&&((e=n=U)&&(n=nf(n,t.pendingProps,ji),n===null?e=!1:(t.stateNode=n,ki=t,U=null,e=!0)),e||Ni(t)),null;case 13:return yc(e,t,n);case 4:return z(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Na(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ui(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Yi(t),i=Xi(i),r=r(i),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return Tc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return Yi(t),r=Xi(na),e===null?(i=ma(),i===null&&(i=Rl,a=ra(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},Ia(t),Ui(t,na,i)):((e.lanes&n)!==0&&(La(e,t),Wa(t,null,null,n),Ua()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,Ui(t,na,r),r!==i.cache&&Ki(t,[na],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ui(t,na,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Ac(e){e.flags|=4}function jc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw wa=ba,va}else e.flags&=-16777217}function Mc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Tu())e.flags|=8192;else throw wa=ba,va}function Nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ge(),e.lanes|=t,Xl|=t)}function Pc(e,t){if(!W)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ic(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fc(t),null;case 1:return Fc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Wi(na),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ii(t)?Ac(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ri())),Fc(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Ac(t),a===null?(Fc(t),jc(t,i,null,r,n)):(Fc(t),Mc(t,a))):a?a===e.memoizedState?(Fc(t),t.flags&=-16777217):(Ac(t),Fc(t),Mc(t,a)):(e=e.memoizedProps,e!==r&&Ac(t),Fc(t),jc(t,i,e,r,n)),null;case 27:if(de(t),n=se.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Fc(t),null}e=ae.current,Ii(t)?Pi(t,e):(e=ff(i,r,n),t.stateNode=e,Ac(t))}return Fc(t),null;case 5:if(de(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Fc(t),null}if(a=ae.current,Ii(t))Pi(t,a);else{var o=Bd(se.current);switch(a){case 1:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=o.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[nt]=t,a[rt]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=se.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ki,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[nt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Ni(t,!0)}else e=Bd(e).createTextNode(r),e[nt]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[nt]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(s(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[nt]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),i=!1}else i=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(io(t),t):(io(t),null)}return io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return le(),e===null&&Cd(t.stateNode.containerInfo),Fc(t),null;case 10:return Wi(t.type),Fc(t),null;case 19:if(L(ao),r=t.memoizedState,r===null)return Fc(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Pc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=oo(e),a!==null){for(t.flags|=128,Pc(r,!1),e=a.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return R(ao,ao.current&1|2),W&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>nu&&(t.flags|=128,i=!0,Pc(r,!1),t.lanes=4194304)}else{if(!i)if(e=oo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!W)return Fc(t),null}else 2*we()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,i=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=ao.current,R(ao,i?n&1|2:n&1),W&&wi(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&L(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(na),Fc(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Lc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(na),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(s(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(ao),null;case 4:return le(),null;case 10:return Wi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&L(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(na),null;case 25:return null;default:return null}}function Rc(e,t){switch(Di(t),t.tag){case 3:Wi(na),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:L(ao);break;case 10:Wi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&L(pa);break;case 24:Wi(na)}}function zc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){X(t,t.return,e)}}function Bc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){X(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){X(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){X(e,e.return,t)}}}function Hc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){X(e,t,n)}}function Uc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){X(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){X(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){X(e,t,n)}else n.current=null}function Gc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){X(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[rt]=t}catch(t){X(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(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&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[nt]=e,t[rt]=n}catch(t){X(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,nl=null;function rl(e,t){if(e=e.containerInfo,Rd=sp,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,nl=t;nl!==null;)if(t=nl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,nl=e;else for(;nl!==null;){switch(t=nl,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=Us(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){X(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,nl=e;break}nl=t.return}}function il(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:yl(e,n),r&4&&zc(5,n);break;case 1:if(yl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){X(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){X(n,n.return,e)}}r&64&&Vc(n),r&512&&Uc(n,n.return);break;case 3:if(yl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ka(e,t)}catch(e){X(n,n.return,e)}}break;case 27:t===null&&r&4&&Zc(n);case 26:case 5:yl(e,n),t===null&&r&4&&Gc(n),r&512&&Uc(n,n.return);break;case 12:yl(e,n);break;case 31:yl(e,n),r&4&&ul(e,n);break;case 13:yl(e,n),r&4&&dl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Qc,!r){t=t!==null&&t.memoizedState!==null||$c,i=Qc;var a=$c;Qc=r,($c=t)&&!a?xl(e,n,(n.subtreeFlags&8772)!=0):yl(e,n),Qc=i,$c=a}break;case 30:break;default:yl(e,n)}}function al(e){var t=e.alternate;t!==null&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ut(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 ol=null,sl=!1;function cl(e,t,n){for(n=n.child;n!==null;)ll(e,t,n),n=n.sibling}function ll(e,t,n){if(Ne&&typeof Ne.onCommitFiberUnmount==`function`)try{Ne.onCommitFiberUnmount(B,n)}catch{}switch(n.tag){case 26:$c||Wc(n,t),cl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$c||Wc(n,t);var r=ol,i=sl;Zd(n.type)&&(ol=n.stateNode,sl=!1),cl(e,t,n),pf(n.stateNode),ol=r,sl=i;break;case 5:$c||Wc(n,t);case 6:if(r=ol,i=sl,ol=null,cl(e,t,n),ol=r,sl=i,ol!==null)if(sl)try{(ol.nodeType===9?ol.body:ol.nodeName===`HTML`?ol.ownerDocument.body:ol).removeChild(n.stateNode)}catch(e){X(n,t,e)}else try{ol.removeChild(n.stateNode)}catch(e){X(n,t,e)}break;case 18:ol!==null&&(sl?(e=ol,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(ol,n.stateNode));break;case 4:r=ol,i=sl,ol=n.stateNode.containerInfo,sl=!0,cl(e,t,n),ol=r,sl=i;break;case 0:case 11:case 14:case 15:Bc(2,n,t),$c||Bc(4,n,t),cl(e,t,n);break;case 1:$c||(Wc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Hc(n,t,r)),cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:$c=(r=$c)||n.memoizedState!==null,cl(e,t,n),$c=r;break;default:cl(e,t,n)}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){X(t,t.return,e)}}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){X(t,t.return,e)}}function fl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tl),t;default:throw Error(s(435,e.tag))}}function pl(e,t){var n=fl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Xu.bind(null,e,t);t.then(r,r)}})}function ml(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,o=t,c=o;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){ol=c.stateNode,sl=!1;break a}break;case 5:ol=c.stateNode,sl=!1;break a;case 3:case 4:ol=c.stateNode.containerInfo,sl=!0;break a}c=c.return}if(ol===null)throw Error(s(160));ll(a,o,i),ol=null,sl=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gl(t,e),t=t.sibling}var hl=null;function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ml(t,e),_l(e),r&4&&(Bc(3,e,e.return),zc(3,e),Bc(5,e,e.return));break;case 1:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&64&&Qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=hl;if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&4){var a=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[lt]||a[nt]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),Pd(a,r,n),a[nt]=e,ht(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;c<o.length;c++)if(a=o[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;case`meta`:if(o=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<o.length;c++)if(a=o[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;default:throw Error(s(468,r))}a[nt]=e,ht(a),r=a}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&Kc(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),n!==null&&r&4&&Kc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),e.flags&32){i=e.stateNode;try{Vt(i,``)}catch(t){X(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Kc(e,i,n===null?i:n.memoizedProps)),r&1024&&(el=!0);break;case 6:if(ml(t,e),_l(e),r&4){if(e.stateNode===null)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){X(e,e.return,t)}}break;case 3:if(Bf=null,i=hl,hl=gf(t.containerInfo),ml(t,e),hl=i,_l(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){X(e,e.return,t)}el&&(el=!1,vl(e));break;case 4:r=hl,hl=gf(e.stateNode.containerInfo),ml(t,e),_l(e),hl=r;break;case 12:ml(t,e),_l(e);break;case 31:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 13:ml(t,e),_l(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Qc,d=$c;if(Qc=u||i,$c=d||l,ml(t,e),$c=d,Qc=u,_l(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Qc||$c||bl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){X(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){X(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){X(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,pl(e,n))));break;case 19:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 30:break;case 21:break;default:ml(t,e),_l(e)}}function _l(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(qc(r)){n=r;break}r=r.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var i=n.stateNode;Xc(e,Jc(e),i);break;case 5:var a=n.stateNode;n.flags&32&&(Vt(a,``),n.flags&=-33),Xc(e,Jc(e),a);break;case 3:case 4:var o=n.stateNode.containerInfo;Yc(e,Jc(e),o);break;default:throw Error(s(161))}}catch(t){X(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)il(e,t.alternate,t),t=t.sibling}function bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bc(4,t,t.return),bl(t);break;case 1:Wc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Hc(t,t.return,n),bl(t);break;case 27:pf(t.stateNode);case 26:case 5:Wc(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}e=e.sibling}}function xl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:xl(i,a,n),zc(4,a);break;case 1:if(xl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){X(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ga(c[i],s)}catch(e){X(r,r.return,e)}}n&&o&64&&Vc(a),Uc(a,a.return);break;case 27:Zc(a);case 26:case 5:xl(i,a,n),n&&r===null&&o&4&&Gc(a),Uc(a,a.return);break;case 12:xl(i,a,n);break;case 31:xl(i,a,n),n&&o&4&&ul(i,a);break;case 13:xl(i,a,n),n&&o&4&&dl(i,a);break;case 22:a.memoizedState===null&&xl(i,a,n),Uc(a,a.return);break;case 30:break;default:xl(i,a,n)}t=t.sibling}}function Sl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ia(n))}function Cl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e))}function wl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tl(e,t,n,r),t=t.sibling}function Tl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,n,r),i&2048&&zc(9,t);break;case 1:wl(e,t,n,r);break;case 3:wl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e)));break;case 12:if(i&2048){wl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){X(t,t.return,e)}}else wl(e,t,n,r);break;case 31:wl(e,t,n,r);break;case 13:wl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?wl(e,t,n,r):(a._visibility|=2,El(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?wl(e,t,n,r):Dl(e,t),i&2048&&Sl(o,t);break;case 24:wl(e,t,n,r),i&2048&&Cl(t.alternate,t);break;default:wl(e,t,n,r)}}function El(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:El(a,o,s,c,i),zc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,El(a,o,s,c,i)):u._visibility&2?El(a,o,s,c,i):Dl(a,o),i&&l&2048&&Sl(o.alternate,o);break;case 24:El(a,o,s,c,i),i&&l&2048&&Cl(o.alternate,o);break;default:El(a,o,s,c,i)}t=t.sibling}}function Dl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Dl(n,r),i&2048&&Sl(r.alternate,r);break;case 24:Dl(n,r),i&2048&&Cl(r.alternate,r);break;default:Dl(n,r)}t=t.sibling}}var Ol=8192;function kl(e,t,n){if(e.subtreeFlags&Ol)for(e=e.child;e!==null;)Al(e,t,n),e=e.sibling}function Al(e,t,n){switch(e.tag){case 26:kl(e,t,n),e.flags&Ol&&e.memoizedState!==null&&Gf(n,hl,e.memoizedState,e.memoizedProps);break;case 5:kl(e,t,n);break;case 3:case 4:var r=hl;hl=gf(e.stateNode.containerInfo),kl(e,t,n),hl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ol,Ol=16777216,kl(e,t,n),Ol=r):kl(e,t,n));break;default:kl(e,t,n)}}function jl(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 Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nl(e),e=e.sibling}function Nl(e){switch(e.tag){case 0:case 11:case 15:Ml(e),e.flags&2048&&Bc(9,e,e.return);break;case 3:Ml(e);break;case 12:Ml(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Pl(e)):Ml(e);break;default:Ml(e)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bc(8,t,t.return),Pl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Pl(t));break;default:Pl(t)}e=e.sibling}}function Fl(e,t){for(;nl!==null;){var n=nl;switch(n.tag){case 0:case 11:case 15:Bc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ia(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nl=r;else a:for(n=e;nl!==null;){r=nl;var i=r.sibling,a=r.return;if(al(r),r===n){nl=null;break a}if(i!==null){i.return=a,nl=i;break a}nl=a}}}var Il={getCacheForType:function(e){var t=Xi(na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Xi(na).controller.signal}},Ll=typeof WeakMap==`function`?WeakMap:Map,q=0,Rl=null,J=null,Y=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return q&2&&Y!==0?Y&-Y:j.T===null?et():fd()}function hu(){if(Yl===0)if(!(Y&536870912)||W){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),Yl=e}else Yl=536870912;return e=Qa.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Rl&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Y,Yl,!1)),qe(e,n),(!(q&2)||e!==Rl)&&(e===Rl&&(!(q&2)&&(ql|=n),Gl===4&&bu(e,Y,Yl,!1)),id(e))}function _u(e,t,n){if(q&6)throw Error(s(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ue(e,t),i=r?ju(e,t):ku(e,t,!0),a=r;do{if(i===0){Hl&&!r&&bu(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!yu(n)){i=ku(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=e.pendingLanes&-536870913,o=o===0?o&536870912?536870912:0:o;if(o!==0){t=o;a:{var c=e;i=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,o).flags|=256),o=ku(c,o,!1),o!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=a,ql|=a,i=4;break a}a=Ql,Ql=i,a!==null&&(Ql===null?Ql=a:Ql.push.apply(Ql,a))}i=o}if(a=!1,i!==2)continue}}if(i===1){Cu(e,0),bu(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(i=eu+300-we(),10<i)){if(bu(r,t,Yl,!Vl),V(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Kd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,a,`Throttled`,-0,0),i);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,a,null,-0,0)}}break}while(1);id(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yt},Al(t,a,d);var m=(a&62914560)===a?eu-we():(a&4194048)===a?tu-we():0;if(m=qf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Ru.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Ru(e,t,a,n,r,i,o,s,c)}function yu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!vr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Fe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ye(e,n,t)}function xu(){return q&6?!0:(ad(0,!1),!1)}function Su(){if(J!==null){if(zl===0)var e=J.return;else e=J,Hi=Vi=null,Eo(e),Da=null,Oa=0,e=J;for(;e!==null;)Rc(e.alternate,e),e=e.return;J=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Rl=e,J=n=oi(e.current,null),Y=t,zl=0,Bl=null,Vl=!1,Hl=Ue(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Fe(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,Xr(),n}function wu(e,t){G=null,j.H=Fs,t===_a||t===ya?(t=Ta(),zl=3):t===va?(t=Ta(),zl=4):zl=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,J===null&&(Gl=1,qs(e,mi(t,e.current)))}function Tu(){var e=Qa.current;return e===null?!0:(Y&4194048)===Y?$a===null:(Y&62914560)===Y||Y&536870912?e===$a:!1}function Eu(){var e=j.H;return j.H=Fs,e===null?Fs:e}function Du(){var e=j.A;return j.A=Il,e}function Ou(){Gl=4,Vl||(Y&4194048)!==Y&&Qa.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Rl===null||bu(Rl,Y,Yl,!1)}function ku(e,t,n){var r=q;q|=2;var i=Eu(),a=Du();(Rl!==e||Y!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&J!==null){var s=J,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:Qa.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Hi=Vi=null,q=r,j.H=i,j.A=a,J===null&&(Rl=null,Y=0,Xr()),o}function Au(){for(;J!==null;)Nu(J)}function ju(e,t){var n=q;q|=2;var r=Eu(),i=Du();Rl!==e||Y!==t?(ru=null,nu=we()+500,Cu(e,t)):Hl=Ue(e,t);a:do try{if(zl!==0&&J!==null){t=J;var a=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,a,1);break;case 2:case 9:if(xa(a)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Rl!==e||(zl=7),id(e)},a.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:xa(a)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(e,t,a,7));break;case 5:var o=null;switch(J.tag){case 26:o=J.memoizedState;case 5:case 27:var c=J;if(o?Wf(o):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Iu(u))}break b}}zl=0,Bl=null,Fu(e,t,a,5);break;case 6:zl=0,Bl=null,Fu(e,t,a,6);break;case 8:Su(),Gl=6;break a;default:throw Error(s(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Hi=Vi=null,j.H=r,j.A=i,q=n,J===null?(Rl=null,Y=0,Xr(),Gl):0}function Mu(){for(;J!==null&&!Se();)Nu(J)}function Nu(e){var t=kc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Iu(e):J=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:Rc(n,t),t=J=si(t,Wl),t=kc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Iu(e):J=t}function Fu(e,t,n,r){Hi=Vi=null,Eo(t),Da=null,Oa=0;var i=t.return;try{if(Qs(e,i,t,n,Y)){Gl=1,qs(e,mi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Gl=1,qs(e,mi(n,e.current)),J=null;return}t.flags&32768?(W||r===1?e=!0:Hl||Y&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Lu(t,e)):Iu(t)}function Iu(e){var t=e;do{if(t.flags&32768){Lu(t,Vl);return}e=t.return;var n=Ic(t.alternate,t,Wl);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Gl===0&&(Gl=5)}function Lu(e,t){do{var n=Lc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Gl=6,J=null}function Ru(e,t,n,r,i,a,o,c,l){e.cancelPendingCommit=null;do Uu();while(au!==0);if(q&6)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(a=t.lanes|t.childLanes,a|=Yr,Je(e,n,a,o,c,l),e===Rl&&(J=Rl=null,Y=0),su=t,ou=e,cu=n,lu=a,uu=i,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zu(Oe,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=j.T,j.T=null,i=M.p,M.p=2,o=q,q|=4;try{rl(e,t,n)}finally{q=o,M.p=i,j.T=r}}au=1,zu(),Bu(),Vu()}}function zu(){if(au===1){au=0;var e=ou,t=su,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=q;q|=4;try{gl(t,e);var a=zd,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=xr(s,h),v=xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{q=i,M.p=r,j.T=n}}e.current=t,au=2}}function Bu(){if(au===2){au=0;var e=ou,t=su,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=q;q|=4;try{il(e,t.alternate,t)}finally{q=i,M.p=r,j.T=n}}au=3}}function Vu(){if(au===4||au===3){au=0,Ce();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Hu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),$e(n),t=t.stateNode,Ne&&typeof Ne.onCommitFiberRoot==`function`)try{Ne.onCommitFiberRoot(B,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=j.T,i=M.p,M.p=2,j.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{j.T=t,M.p=i}}cu&3&&Uu(),id(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,ad(0,!1)}}function Hu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ia(t)))}function Uu(){return zu(),Bu(),Vu(),Wu()}function Wu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=$e(cu),r=j.T,i=M.p;try{M.p=32>n?32:n,j.T=null,n=uu,uu=null;var a=ou,o=cu;if(au=0,su=ou=null,cu=0,q&6)throw Error(s(331));var c=q;if(q|=4,Nl(a.current),Tl(a,a.current,o,n),q=c,ad(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(B,a)}catch{}return!0}finally{M.p=i,j.T=r,Hu(e,t)}}function Gu(e,t,n){t=mi(n,t),t=Ys(e.stateNode,t,2),e=za(e,t,2),e!==null&&(qe(e,2),id(e))}function X(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=mi(n,e),n=Xs(2),r=za(t,n,2),r!==null&&(Zs(n,r,t,e),qe(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Y&n)===n&&(Gl===4||Gl===3&&(Y&62914560)===Y&&300>we()-eu?!(q&2)&&Cu(e,0):Jl|=n,Xl===Y&&(Xl=0)),id(e)}function Ju(e,t){t===0&&(t=Ge()),e=$r(e,t),e!==null&&(qe(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return be(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Fe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=Y,a=V(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ue(r,a)||(n=!0,ud(r,a));r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&Gd()&&(e=rd);for(var t=we(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}au!==0&&au!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Fe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=We(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Y,n=V(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ue(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),$e(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=ld.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function ld(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Uu()&&e.callbackNode!==n)return null;var r=Y;return r=V(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),cd(e,we()),e.callbackNode!=null&&e.callbackNode===n?ld.bind(null,e):null)}function ud(e,t){if(Uu())return null;_u(e,t,!0)}function dd(){Yd(function(){q&6?be(Ee,od):sd()})}function fd(){if(rd===0){var e=sa;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),rd=e}return rd}function pd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Jt(``+e)}function md(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function hd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=pd((i[rt]||null).action),o=r.submitter;o&&(t=(t=o[rt]||null)?pd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new _n(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(rd!==0){var e=o?md(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?md(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var gd=0;gd<Wr.length;gd++){var _d=Wr[gd];Gr(_d.toLowerCase(),`on`+(_d[0].toUpperCase()+_d.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),yt(`onMouseEnter`,[`mouseout`,`mouseover`]),yt(`onMouseLeave`,[`mouseout`,`mouseover`]),yt(`onPointerEnter`,[`pointerout`,`pointerover`]),yt(`onPointerLeave`,[`pointerout`,`pointerover`]),vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var vd=`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(` `),yd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(vd));function bd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}}}}function Z(e,t){var n=t[at];n===void 0&&(n=t[at]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,gt.forEach(function(t){t!==`selectionchange`&&(yd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!on||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=dt(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}nn(function(){var r=a,i=Zt(n),o=[];a:{var s=Ur.get(e);if(s!==void 0){var c=_n,u=e;switch(e){case`keypress`:if(fn(n)===0)break a;case`keydown`:case`keyup`:c=Fn;break;case`focusin`:u=`focus`,c=En;break;case`focusout`:u=`blur`,c=En;break;case`beforeblur`:case`afterblur`:c=En;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Tn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Ln;break;case Ir:case Lr:case Rr:c=Dn;break;case Hr:c=Rn;break;case`scroll`:case`scrollend`:c=yn;break;case`wheel`:c=zn;break;case`copy`:case`cut`:case`paste`:c=On;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=In;break;case`toggle`:case`beforetoggle`:c=Bn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=rn(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Xt&&(u=n.relatedTarget||n.fromElement)&&(dt(u)||u[it]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?dt(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=In,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:pt(c),h=u==null?s:pt(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,dt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=Od,p=c,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;c!==null&&kd(o,s,c,d,!1),u!==null&&f!==null&&kd(o,f,u,d,!0)}}a:{if(s=r?pt(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=or;else if(er(s))if(sr)v=gr;else{v=mr;var y=pr}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&Gt(r.elementType)&&(v=or):v=hr;if(v&&=v(e,r)){tr(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Lt(s,`number`,s.value)}switch(y=r?pt(r):window,e){case`focusin`:(er(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(o,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(o,n,i)}var b;if(Hn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Xn?Jn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Gn&&n.locale!==`ko`&&(Xn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Xn&&(b=dn()):(cn=i,ln=`value`in cn?cn.value:cn.textContent,Xn=!0)),y=Dd(r,x),0<y.length&&(x=new kn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Yn(n),b!==null&&(x.data=b)))),(b=Wn?Zn(e,n):Qn(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new kn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),hd(o,e,r,n,i)}bd(o,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=rn(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=rn(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=rn(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=rn(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
10
+ `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Q(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Vt(e,``+r);break;case`className`:Tt(e,`class`,r);break;case`tabIndex`:Tt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Tt(e,n,r);break;case`style`:Wt(e,r,a);break;case`data`:if(t!==`object`){Tt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Jt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 a==`function`&&(n===`formAction`?(t!==`input`&&Q(e,t,`name`,i.name,i,null),Q(e,t,`formEncType`,i.formEncType,i,null),Q(e,t,`formMethod`,i.formMethod,i,null),Q(e,t,`formTarget`,i.formTarget,i,null)):(Q(e,t,`encType`,i.encType,i,null),Q(e,t,`method`,i.method,i,null),Q(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Jt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Jt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Z(`beforetoggle`,e),Z(`toggle`,e),wt(e,`popover`,r);break;case`xlinkActuate`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:wt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Kt.get(n)||n,wt(e,n,r))}}function $(e,t,n,r,i,a){switch(n){case`style`:Wt(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Vt(e,``+r);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!_t.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[rt]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):wt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Z(`error`,e),Z(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:Q(e,t,a,o,n,null)}}i&&Q(e,t,`srcSet`,n.srcSet,n,null),r&&Q(e,t,`src`,n.src,n,null);return;case`input`:Z(`invalid`,e);var c=a=o=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:o=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(s(137,t));break;default:Q(e,t,r,d,n,null)}}It(e,a,c,l,u,o,i,!1);return;case`select`:for(i in Z(`invalid`,e),r=o=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:o=c;break;case`multiple`:r=c;default:Q(e,t,i,c,n,null)}t=a,n=o,e.multiple=!!r,t==null?n!=null&&Rt(e,!!r,n,!0):Rt(e,!!r,t,!1);return;case`textarea`:for(o in Z(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(o)&&(c=n[o],c!=null))switch(o){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(s(91));break;default:Q(e,t,o,c,n,null)}Bt(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Q(e,t,l,r,n,null)}return;case`dialog`:Z(`beforetoggle`,e),Z(`toggle`,e),Z(`cancel`,e),Z(`close`,e);break;case`iframe`:case`object`:Z(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)Z(vd[r],e);break;case`image`:Z(`error`,e),Z(`load`,e);break;case`details`:Z(`toggle`,e);break;case`embed`:case`source`:case`link`:Z(`error`,e),Z(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:Q(e,t,u,r,n,null)}return;default:if(Gt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&$(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Q(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,o=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Q(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:a=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:o=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(s(137,t));break;default:m!==f&&Q(e,t,p,m,r,f)}}Ft(e,o,c,l,u,d,a,i);return;case`select`:for(a in m=o=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||Q(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:o=a;default:a!==l&&Q(e,t,i,a,r,l)}t=c,n=o,r=m,p==null?!!r!=!!n&&(t==null?Rt(e,!!n,n?[]:``,!1):Rt(e,!!n,t,!0)):Rt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Q(e,t,c,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(s(91));break;default:i!==a&&Q(e,t,o,i,r,a)}zt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Q(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Q(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Q(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(s(137,t));break;default:Q(e,t,u,p,r,m)}return;default:if(Gt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&$(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||$(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Q(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Q(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[lt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),ut(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[lt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(s(452));return e;case`head`:if(e=t.head,!e)throw Error(s(453));return e;case`body`:if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ut(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=M.d;M.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=xu();return e||t}function yf(e){var t=ft(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Pt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Pt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Pt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Pt(n.imageSizes)+`"]`)):i+=`[href="`+Pt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Pt(r)+`"][href="`+Pt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),ht(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=mt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);ht(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=mt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ht(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=mt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ht(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=se.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=mt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=mt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=mt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+Pt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),ht(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Pt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Pt(n.href)+`"]`);if(r)return t.instance=r,ht(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ht(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,ht(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),ht(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,ht(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),ht(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[lt]||a[nt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ht(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:N,_currentValue2:N,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){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=Ke(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ke(0),this.hiddenUpdates=Ke(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(3,null,null,t),e.current=a,a.stateNode=e,t=ra(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ia(a),e}function tp(e){return e?(e=ni,e):ni}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ra(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=za(e,r,t),n!==null&&(gu(n,e,t),Ba(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&gu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=mu();t=Qe(t);var n=$r(e,t);n!==null&&gu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,up(e,t,n,r)}finally{M.p=a,j.T=i}}function lp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,up(e,t,n,r)}finally{M.p=a,j.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Td(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Fe(o);s.entanglements[1]|=c,o&=~c}id(a),!(q&6)&&(nu=we()+500,ad(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&gu(s,a,2),xu(),ip(a,2)}if(a=dp(r),a===null&&Td(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function dp(e){return e=Zt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=dt(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(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(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ft(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=dt(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,H(e.priority,function(){op(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,H(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Xt=r,n.target.dispatchEvent(r),Xt=null}else return t=ft(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=ft(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[rt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[rt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current;np(n,mu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),xu(),t[it]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=et();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.7`)throw Error(s(527,Lp,`19.2.7`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(s(188)):(e=Object.keys(e).join(`,`),Error(s(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{B=zp.inject(Rp),Ne=zp}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(s(299));var n=!1,r=``,i=Ws,a=Gs,o=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,a,o,Pp),e[it]=t.current,Cd(e),new Fp(t)}})),c=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c(),d=`America/Sao_Paulo`,f={"2026-08-02":4809511,"2026-08-01":8894527,"2026-07-31":9472804,"2026-07-30":5167818,"2026-07-29":11336221,"2026-07-28":8262282,"2026-07-27":4862150,"2026-07-26":970899,"2026-07-25":7465970,"2026-07-24":9041538,"2026-07-23":19750,"2026-07-22":1371560,"2026-07-21":14992543,"2026-07-20":3168460,"2026-07-19":929990,"2026-07-18":9232700,"2026-07-17":16882853,"2026-07-16":20054785,"2026-07-15":35459620,"2026-07-14":24078852,"2026-07-13":22611635,"2026-07-12":8339738,"2026-07-11":1859980},p={cutoff:`2026-08-02T03:14:00.000Z`,cutoffDay:`2026-08-02`,durationMs:Object.values(f).reduce((e,t)=>e+t,0),costXlsxSha256:`C3EE0495667289FB81DD8F9268697CEB7692433C14CB19934C89B5F39129902A`,operationsXlsxSha256:`94E9577A7CA27F7FDD277D81E34156296CB28FE39CF6D7636B259EBBB7E56BCC`};function m(e){return e!=null&&Date.parse(e)>=Date.parse(p.cutoff)}function h(e,t){let n=new Map;for(let t of e)n.has(t.id)||n.set(t.id,t);return p.durationMs+[...n.values()].filter(e=>m(e.started_at)).reduce((e,n)=>e+(t(n)??0),0)}function g(e,t){if(e==null)return null;let n=new Date(e);if(Number.isNaN(n.getTime()))return null;let r=new Intl.DateTimeFormat(`en-CA`,{timeZone:d,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(n),i=e=>r.find(t=>t.type===e)?.value,a=i(`year`),o=i(`month`),s=i(`day`);return a===void 0||o===void 0||s===void 0?null:t===`year`?a:t===`month`?`${a}-${o}`:`${a}-${o}-${s}`}var _=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),v=e(((e,t)=>{t.exports=_()})),y=v(),b=new URL(`/assets/logo_novo_azul-BBx5pA2B.png`,``+import.meta.url).href;function x({filters:e,filtersActive:t=!1,lastUpdatedAt:n,loading:r,locale:i,onLocaleChange:a,onRefresh:o,repositoryName:s,settings:c,title:u}){let[d,f]=(0,l.useState)(!1),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),_=i===`pt-BR`?{filters:`Filtros`,language:`Idioma`,refresh:`Atualizar`,refreshing:`Atualizando…`,settings:`Configurações`,updated:`Atualizado`,waiting:`Aguardando atualização`}:{filters:`Filters`,language:`Language`,refresh:`Refresh`,refreshing:`Refreshing…`,settings:`Settings`,updated:`Updated`,waiting:`Waiting for refresh`},v=n===null?_.waiting:`${_.updated} ${new Intl.DateTimeFormat(i,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(n))}`,x=e=>{a(e),m(!1)},C=s?.includes(`/`)?`https://github.com/${s}`:null;return(0,y.jsxs)(`nav`,{"aria-label":`${s?`${u} ${s}`:u} menu`,className:`dashboard-header`,children:[(0,y.jsxs)(`div`,{className:`dashboard-header-brand`,children:[(0,y.jsxs)(`strong`,{children:[(0,y.jsx)(`span`,{children:u}),s?C?(0,y.jsxs)(`a`,{"aria-label":`Abrir ${s} no GitHub`,className:`dashboard-header-repository`,href:C,rel:`noreferrer`,target:`_blank`,children:[(0,y.jsx)(T,{}),(0,y.jsx)(`span`,{children:s})]}):(0,y.jsxs)(`span`,{className:`dashboard-header-repository`,children:[(0,y.jsx)(T,{}),(0,y.jsx)(`span`,{children:s})]}):null]}),(0,y.jsx)(`small`,{children:v})]}),(0,y.jsx)(`img`,{alt:`ZAIP`,className:`dashboard-header-logo`,src:b}),(0,y.jsxs)(`div`,{className:`dashboard-header-actions`,children:[(0,y.jsx)(`button`,{"aria-label":_.refresh,className:`dashboard-header-icon dashboard-header-refresh`,disabled:r,onClick:o,type:`button`,children:(0,y.jsx)(w,{})}),(0,y.jsxs)(`div`,{className:`dashboard-header-anchor dashboard-header-filter-action`,children:[(0,y.jsxs)(`button`,{className:`dashboard-header-button${d||t?` is-active`:``}`,onClick:()=>{f(e=>!e),m(!1),g(!1)},type:`button`,children:[(0,y.jsx)(E,{}),` `,_.filters]}),d?(0,y.jsx)(`div`,{className:`dashboard-header-popup dashboard-header-filter-popup`,children:e}):null]}),(0,y.jsxs)(`div`,{className:`dashboard-header-anchor dashboard-header-locale-action`,children:[(0,y.jsxs)(`button`,{className:`dashboard-header-button${p?` is-active`:``}`,onClick:()=>{m(e=>!e),f(!1),g(!1)},type:`button`,children:[(0,y.jsx)(S,{locale:i}),i===`pt-BR`?`PT-BR`:`EN-US`,(0,y.jsx)(ee,{})]}),p?(0,y.jsxs)(`div`,{className:`dashboard-header-popup dashboard-header-locale-popup`,children:[(0,y.jsxs)(`button`,{onClick:()=>x(`pt-BR`),type:`button`,children:[(0,y.jsx)(S,{locale:`pt-BR`}),` Português do Brasil`,i===`pt-BR`?(0,y.jsx)(`span`,{children:`✓`}):null]}),(0,y.jsxs)(`button`,{onClick:()=>x(`en-US`),type:`button`,children:[(0,y.jsx)(S,{locale:`en-US`}),` English`,i===`en-US`?(0,y.jsx)(`span`,{children:`✓`}):null]})]}):null]}),c===void 0?null:(0,y.jsxs)(`div`,{className:`dashboard-header-anchor dashboard-header-settings-action`,children:[(0,y.jsx)(`button`,{"aria-label":_.settings,className:`dashboard-header-icon${h?` is-active`:``}`,onClick:()=>{g(e=>!e),f(!1),m(!1)},type:`button`,children:(0,y.jsx)(D,{})}),h?(0,y.jsxs)(`div`,{className:`dashboard-header-popup dashboard-header-settings-popup`,children:[(0,y.jsxs)(`div`,{className:`dashboard-header-mobile-settings`,children:[(0,y.jsx)(`small`,{children:v}),(0,y.jsxs)(`button`,{disabled:r,onClick:o,type:`button`,children:[(0,y.jsx)(w,{}),` `,r?_.refreshing:_.refresh]}),(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:_.language}),(0,y.jsxs)(`select`,{onChange:e=>a(e.target.value),value:i,children:[(0,y.jsx)(`option`,{value:`pt-BR`,children:`Português do Brasil`}),(0,y.jsx)(`option`,{value:`en-US`,children:`English`})]})]}),(0,y.jsxs)(`div`,{className:`dashboard-header-mobile-filters`,children:[(0,y.jsx)(`strong`,{children:_.filters}),e]})]}),(0,y.jsx)(`div`,{className:`dashboard-header-settings-content`,children:c})]}):null]})]})]})}function S({locale:e}){return e===`pt-BR`?(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`dashboard-header-flag`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`rect`,{fill:`#18864b`,height:`24`,rx:`5`,width:`24`}),(0,y.jsx)(`path`,{d:`m12 3.8 8.2 8.2L12 20.2 3.8 12 12 3.8Z`,fill:`#f6d64a`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,fill:`#1b4f9c`,r:`4.2`}),(0,y.jsx)(`path`,{d:`M8.8 11.2c1.9-1 4.5-1 6.4 0`,fill:`none`,stroke:`#fff`,strokeWidth:`.8`})]}):(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`dashboard-header-flag`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`rect`,{fill:`#fff`,height:`24`,rx:`5`,width:`24`}),(0,y.jsx)(`path`,{d:`M0 3h24v3H0Zm0 6h24v3H0Zm0 6h24v3H0Z`,fill:`#bd3d44`}),(0,y.jsx)(`path`,{d:`M0 0h11v11H0Z`,fill:`#192f6b`})]})}function C({children:e,className:t=``}){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,className:`dashboard-header-svg ${t}`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,children:e})}function w(){return(0,y.jsxs)(C,{children:[(0,y.jsx)(`path`,{d:`M21 12a9 9 0 0 1-15.2 6.5L3 16`}),(0,y.jsx)(`path`,{d:`M3 21v-5h5`}),(0,y.jsx)(`path`,{d:`M3 12a9 9 0 0 1 15.2-6.5L21 8`}),(0,y.jsx)(`path`,{d:`M21 3v5h-5`})]})}function T(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,className:`dashboard-header-github`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{d:`M12 2C6.48 2 2 6.58 2 12.23c0 4.52 2.87 8.35 6.84 9.71.5.1.68-.22.68-.49 0-.24-.01-1.05-.02-1.9-2.78.62-3.37-1.2-3.37-1.2-.45-1.18-1.11-1.49-1.11-1.49-.91-.64.07-.63.07-.63 1 .07 1.53 1.06 1.53 1.06.9 1.57 2.34 1.12 2.91.86.09-.66.35-1.12.64-1.37-2.22-.26-4.56-1.14-4.56-5.06 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.3.1-2.71 0 0 .84-.28 2.75 1.05A9.32 9.32 0 0 1 12 6.97c.85 0 1.7.12 2.5.34 1.91-1.33 2.75-1.05 2.75-1.05.55 1.41.2 2.45.1 2.71.64.72 1.03 1.63 1.03 2.75 0 3.93-2.34 4.79-4.57 5.05.36.32.68.94.68 1.9 0 1.38-.01 2.49-.01 2.83 0 .27.18.59.69.49A10.25 10.25 0 0 0 22 12.23C22 6.58 17.52 2 12 2Z`,fill:`currentColor`})})}function E(){return(0,y.jsx)(C,{children:(0,y.jsx)(`path`,{d:`M3 6h18M7 12h10m-7 6h4`})})}function ee(){return(0,y.jsx)(C,{className:`dashboard-header-chevron`,children:(0,y.jsx)(`path`,{d:`m6 9 6 6 6-6`})})}function D(){return(0,y.jsxs)(C,{children:[(0,y.jsx)(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.09a2 2 0 0 1 1 1.74v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}var O=o();function k({rows:e,columns:t,rowKey:n,onRowClick:r,defaultSort:i=null,sortable:a=!1,showColumnInfo:o=!1,scrollLabel:s,locale:c=`pt-BR`,pageSize:u=100,emptyMessage:d=c===`pt-BR`?`Nenhum dado disponível.`:`No data available.`}){let[f,p]=(0,l.useState)(i),[m,h]=(0,l.useState)(0),[g,_]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(g===null)return;let e=()=>_(null);return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[g]);let v=(0,l.useMemo)(()=>t.filter(e=>!e.hidden),[t]),b=(0,l.useMemo)(()=>{if(f===null)return e;let n=t.find(e=>e.key===f.key);return n?[...e].sort((e,t)=>{let r=re(n.sortValue?.(e)??ne(n.render(e)),n.sortValue?.(t)??ne(n.render(t)));return f.direction===`asc`?r:-r}):e},[t,e,f]),x=u===null||u<=0?1:Math.max(1,Math.ceil(b.length/u)),S=Math.min(m,x-1),C=u===null||u<=0?b:b.slice(S*u,(S+1)*u);return(0,l.useEffect)(()=>h(0),[]),e.length===0?(0,y.jsx)(`p`,{className:`ui-empty`,children:d}):(0,y.jsxs)(`section`,{"aria-label":s,className:`ui-table-wrap`,role:s?`region`:void 0,tabIndex:s?0:void 0,children:[(0,y.jsxs)(`table`,{className:`ui-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsx)(`tr`,{children:v.map(e=>(0,y.jsx)(`th`,{"aria-sort":f?.key===e.key?f.direction===`asc`?`ascending`:`descending`:`none`,className:e.align===`right`?`is-number`:void 0,children:e.label&&(a||o)?(0,y.jsxs)(`span`,{className:`ui-table-heading`,children:[(0,y.jsx)(`span`,{className:`ui-table-label`,children:e.label}),a?(0,y.jsx)(`button`,{"aria-label":c===`pt-BR`?`Ordenar por ${e.label}`:`Sort by ${e.label}`,className:`ui-table-sort`,onClick:()=>p(t=>({key:e.key,direction:t?.key===e.key&&t.direction===`asc`?`desc`:`asc`})),type:`button`,children:(0,y.jsx)(`span`,{"aria-hidden":`true`,className:`ui-table-sort-indicator`,children:f?.key===e.key?f.direction===`asc`?`↑`:`↓`:`↕`})}):null,o?(0,y.jsx)(`button`,{"aria-label":c===`pt-BR`?`Informação sobre ${e.label}`:`Information about ${e.label}`,className:`ui-table-info`,onBlur:()=>_(null),onFocus:t=>te(t.currentTarget,e.description??ie(e.label,c),_),onMouseEnter:t=>te(t.currentTarget,e.description??ie(e.label,c),_),onMouseLeave:()=>_(null),type:`button`,children:`i`}):null]}):e.label},e.key))})}),(0,y.jsx)(`tbody`,{children:C.map(e=>(0,y.jsx)(`tr`,{className:r===void 0?void 0:`ui-table-row-action`,onClick:r===void 0?void 0:()=>r(e),onKeyDown:r===void 0?void 0:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r(e))},tabIndex:r===void 0?void 0:0,children:v.map(t=>(0,y.jsx)(`td`,{className:t.align===`right`?`is-number`:void 0,children:t.render(e)},t.key))},n(e)))}),v.some(e=>e.footer!==void 0)?(0,y.jsx)(`tfoot`,{children:(0,y.jsx)(`tr`,{children:v.map(e=>(0,y.jsx)(`td`,{className:e.align===`right`?`is-number`:void 0,children:e.footer},e.key))})}):null]}),x>1?(0,y.jsxs)(`nav`,{"aria-label":c===`pt-BR`?`Paginação da tabela`:`Table pagination`,className:`ui-table-pagination`,children:[(0,y.jsx)(`button`,{disabled:S===0,onClick:()=>h(e=>Math.max(0,e-1)),type:`button`,children:c===`pt-BR`?`Anterior`:`Previous`}),(0,y.jsxs)(`span`,{children:[c===`pt-BR`?`Página`:`Page`,` `,S+1,` / `,x]}),(0,y.jsx)(`button`,{disabled:S+1>=x,onClick:()=>h(e=>Math.min(x-1,e+1)),type:`button`,children:c===`pt-BR`?`Próxima`:`Next`})]}):null,g&&typeof document<`u`?(0,O.createPortal)((0,y.jsx)(`div`,{className:`ui-table-tooltip`,role:`tooltip`,style:{bottom:g.bottom,left:g.left,top:g.top},children:g.text}),document.body):null]})}function te(e,t,n){let r=e.getBoundingClientRect();n({text:t,left:Math.min(Math.max(r.left+r.width/2,176),window.innerWidth-176),...window.innerHeight-r.bottom<260?{bottom:window.innerHeight-r.top+9}:{top:r.bottom+9}})}function ne(e){return typeof e==`number`||typeof e==`string`?e:Array.isArray(e)?e.map(ne).filter(Boolean).join(` `):e&&typeof e==`object`&&`props`in e?ne(e.props?.children??null):null}function re(e,t){return e===null?t===null?0:1:t===null?-1:typeof e==`number`&&typeof t==`number`?e-t:new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}).compare(String(e),String(t))}function ie(e,t){let n=e.toLocaleLowerCase(t);return t===`pt-BR`?`Mostra ${n} para cada linha. Clique no título para ordenar em ordem crescente ou decrescente.`:`Shows ${n} for each row. Click the column title to sort in ascending or descending order.`}function A(e,t=`pt-BR`){return e===null?`0`:e>=36e5?`${new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e/36e5)} h`:e>=6e4?`${Math.round(e/6e4)} min`:`${Math.round(e/1e3)} ${t===`pt-BR`?`seg`:`sec`}`}function j(e,t=`pt-BR`){return e===null?`0`:e<36e5?A(e,t):`${new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e/36e5)} h`}function M(e,t=`pt-BR`,n=1){if(e===null)return`0`;let r=[{threshold:0x38d7ea4c68000,suffix:`Q`},{threshold:0xe8d4a51000,suffix:`T`},{threshold:1e9,suffix:`B`},{threshold:1e6,suffix:`M`},{threshold:1e3,suffix:`mil`}].find(({threshold:t})=>Math.abs(e)>=t);return r?`${new Intl.NumberFormat(t,{maximumFractionDigits:n}).format(e/r.threshold)} ${r.suffix}`:new Intl.NumberFormat(t,{notation:`compact`,maximumFractionDigits:n}).format(e)}function N(e,t=`pt-BR`,n){return e===null?`0`:new Intl.NumberFormat(t,{maximumFractionDigits:n}).format(e)}function P(e,t,n=`pt-BR`){return e===null?`0`:new Intl.NumberFormat(n,{style:`currency`,currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function F(e,t=`pt-BR`){return e===null?t===`pt-BR`?`indisponível`:`unavailable`:new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(e))}function I(e,t=`pt-BR`){return new Intl.NumberFormat(t,{style:`percent`,maximumFractionDigits:1}).format(e)}function L({ariaLabel:e,metrics:t}){return(0,y.jsx)(`section`,{"aria-label":e,className:`period-average-summary`,children:(0,y.jsx)(`div`,{className:`period-average-grid`,children:t.map(e=>(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{children:e.label}),(0,y.jsx)(`strong`,{children:e.value})]},e.label))})})}function R(e,t){return e===null?t===`pt-BR`?`Indisponível`:`Unavailable`:e===0?t===`pt-BR`?`0 seg`:`0 sec`:A(e,t)}function ae(e){if(typeof e.source_duration_ms==`number`)return e.source_duration_ms;if(typeof e.duration_ms==`number`)return e.duration_ms;if(e.finished_at===null)return null;let t=Date.parse(e.started_at),n=Date.parse(e.finished_at);return Number.isFinite(t)&&Number.isFinite(n)&&n>=t?n-t:null}function oe({details:e,locale:t,onClose:n}){let r=me(t),i=e.kind===`change`||e.kind===`decision`?e.row.title:e.row.id;return(0,O.createPortal)((0,y.jsx)(`dialog`,{className:`operations-status-dialog-backdrop`,onMouseDown:e=>e.currentTarget===e.target&&n(),open:!0,children:(0,y.jsxs)(`section`,{"aria-label":`${r.details} ${pe(e.kind,t)}`,"aria-modal":`true`,className:`operations-status-dialog operations-entity-details`,role:`dialog`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:pe(e.kind,t)}),(0,y.jsx)(`h2`,{children:i}),(0,y.jsx)(`p`,{children:e.row.id})]}),(0,y.jsx)(`button`,{"aria-label":t===`pt-BR`?`Fechar`:`Close`,onClick:n,type:`button`,children:`×`})]}),(0,y.jsxs)(`div`,{className:`operations-entity-details-scroll`,children:[e.kind===`change`?(0,y.jsx)(se,{locale:t,row:e.row}):null,e.kind===`decision`?(0,y.jsx)(ce,{locale:t,row:e.row}):null,e.kind===`execution`?(0,y.jsx)(z,{locale:t,row:e.row}):null,e.kind===`run`?(0,y.jsx)(le,{locale:t,row:e.row}):null]})]})}),document.body)}function se({row:e,locale:t}){let n=me(t);return(0,y.jsx)(ue,{items:[[n.status,e.status],[n.risk,e.risk],[n.origin,de(e.source)],[n.created,F(e.created_at,t)],[n.tasks,String(e.task_ids.length)],[n.requirements,fe(e.requirement_ids)],[n.acceptanceCriteria,fe(e.acceptance_ids)],[n.result,e.result??`—`],[n.file,e.artifact_path]]})}function ce({row:e,locale:t}){let n=me(t);return(0,y.jsx)(ue,{items:[[n.origin,e.origin],[n.scopeType,e.scope_type],[n.scope,e.scope_id],[n.created,F(e.created_at,t)],[n.file,e.artifact_path]]})}function z({row:e,locale:t}){let n=me(t);return(0,y.jsx)(ue,{items:[[n.status,e.status],[n.workStatus,e.work_status],[n.origin,de(e.origin)],[n.created,F(e.created_at,t)],[n.tasksInDag,String(e.dag.nodes.length)],[t===`pt-BR`?`Invocações do orquestrador`:`Orchestrator invocations`,String(e.orchestrator_run_count)],[t===`pt-BR`?`Invocações delegadas`:`Delegated invocations`,String(e.subagent_run_count)],[t===`pt-BR`?`Tasks finalizadas`:`Finalized Tasks`,`${e.finalized_task_count}/${e.task_count} (${e.finalizer_run_count} ${t===`pt-BR`?`chamadas finalizadoras`:`finalizer calls`})`],[n.topologicalOrder,fe(e.dag.topological_order)],[n.dependencies,e.dag.nodes.map(e=>`${e.task_id}: ${fe(e.depends_on)}`).join(`
11
+ `)||`—`],[n.result,e.result??`—`],[n.file,e.artifact_path]]})}function le({row:e,locale:t}){let n=me(t);return(0,y.jsx)(ue,{items:[[n.status,e.status],[n.phase,e.phase],[n.entrypoint,e.entrypoint],[n.type,e.work_type],[t===`pt-BR`?`Tipo da chamada`:`Call type`,e.run_kind===`run`?t===`pt-BR`?`Invocação do orquestrador`:`Orchestrator invocation`:t===`pt-BR`?`Invocação delegada`:`Delegated invocation`],[t===`pt-BR`?`Propósito`:`Purpose`,e.run_purpose],[t===`pt-BR`?`Exige finalizador`:`Requires finalizer`,e.requires_finalizer?`sim`:`não`],[t===`pt-BR`?`Invocação pai`:`Parent invocation`,e.parent_run_id??`—`],[n.client,e.client],[n.agent,e.agent_name],[n.provider,e.provider??`—`],[t===`pt-BR`?`Modelo planejado`:`Planned model`,e.model],[t===`pt-BR`?`Effort planejado`:`Planned effort`,e.reasoning_effort??`—`],[t===`pt-BR`?`Modelo efetivo`:`Effective model`,e.effective_config_mixed?t===`pt-BR`?`Misto`:`Mixed`:e.effective_model??`—`],[t===`pt-BR`?`Effort efetivo`:`Effective effort`,e.effective_config_mixed?t===`pt-BR`?`Misto`:`Mixed`:e.effective_reasoning_effort??`—`],[`Task`,e.task_id??`—`],[`SPEC`,e.spec_id??`—`],[`PRD`,e.prd_id??`—`],[`Change`,e.change_id??`—`],[`Execution`,e.execution_id??`—`],[n.start,F(e.started_at,t)],[n.end,F(e.finished_at,t)],[n.duration,R(ae(e),t)],[`Tokens`,M(e.usage.total.tokens.total,t)],[n.costBrl,P(e.usage.total.cost.brl,`BRL`,t)],[n.costUsd,P(e.usage.total.cost.usd,`USD`,t)],[n.file,e.artifact_path]]})}function ue({items:e}){return(0,y.jsx)(`dl`,{className:`operations-entity-detail-grid`,children:e.map(([e,t])=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`dt`,{children:e}),(0,y.jsx)(`dd`,{children:t})]},e))})}function de(e){return e.type===`task`?`Task: ${e.task_id}`:e.type===`spec`?`SPEC: ${e.spec_id}`:e.type===`interaction`?`Conversation: ${e.conversation_id}`:`PRD: ${e.prd_id}${`spec_id`in e&&e.spec_id?` · SPEC: ${e.spec_id}`:``}`}function fe(e){return e.length===0?`—`:e.join(`, `)}function pe(e,t){return(t===`pt-BR`?{change:`Mudança`,decision:`Decisão`,execution:`Execução ZAIP`,run:`Invocação de Agente`}:{change:`Change`,decision:`Decision`,execution:`Execution`,run:`Agent Invocation`})[e]}function me(e){return e===`pt-BR`?{details:`Detalhes de`,status:`Status`,risk:`Risco`,origin:`Origem`,created:`Criada`,tasks:`Tasks`,requirements:`Requisitos`,acceptanceCriteria:`Critérios de aceite`,result:`Resultado`,file:`Arquivo`,scopeType:`Tipo de escopo`,scope:`Escopo`,workStatus:`Status do trabalho`,tasksInDag:`Tasks na DAG`,topologicalOrder:`Ordem topológica`,dependencies:`Dependências`,phase:`Fase`,entrypoint:`Entrada`,type:`Tipo`,client:`Cliente`,agent:`Agente`,provider:`Provider`,model:`Modelo`,start:`Início`,end:`Fim`,duration:`Duração`,costBrl:`Custo BRL`,costUsd:`Custo USD`}:{details:`Details for`,status:`Status`,risk:`Risk`,origin:`Origin`,created:`Created`,tasks:`Tasks`,requirements:`Requirements`,acceptanceCriteria:`Acceptance criteria`,result:`Result`,file:`File`,scopeType:`Scope type`,scope:`Scope`,workStatus:`Work status`,tasksInDag:`Tasks in DAG`,topologicalOrder:`Topological order`,dependencies:`Dependencies`,phase:`Phase`,entrypoint:`Entrypoint`,type:`Type`,client:`Client`,agent:`Agent`,provider:`Provider`,model:`Model`,start:`Start`,end:`End`,duration:`Duration`,costBrl:`Cost BRL`,costUsd:`Cost USD`}}function he(e,t){let n=e.filter(e=>e.kind===`interaction`&&e.origin.type===`interaction`),r=new Map;for(let e of n){let t=e.origin.type===`interaction`?e.origin.conversation_id:``;r.set(t,[...r.get(t)??[],e])}return[...r].map(([e,n])=>{let r=new Set(n.map(e=>e.id)),i=[...new Map(t.filter(t=>t.entrypoint===`conversation`&&t.task_id===null&&(r.has(t.execution_id??``)||t.execution_id===null&&t.conversation_id===e)).map(e=>[e.id,e])).values()],a=[...n.map(e=>e.created_at),...i.map(e=>e.started_at)].filter(e=>e!==null).sort().at(-1)??``,o=i.filter(e=>e.run_kind!==`subrun`&&e.parent_run_id==null).flatMap(e=>{let t=ae(e);return t===null?[]:[t]}),s=[...n].sort((e,t)=>(t.created_at??``).localeCompare(e.created_at??``))[0];return{id:e,latest_started_at:a??``,run_count:i.length,execution_count:n.length,status:s.status,duration_ms:o.length===0?null:o.reduce((e,t)=>e+t,0),models:[...new Set(i.map(e=>e.effective_model??e.model).filter(ge))].sort()}}).sort((e,t)=>t.latest_started_at.localeCompare(e.latest_started_at))}function ge(e){return e!==null&&e.trim()!==``&&e.toLowerCase()!==`unknown`}function _e(e,t){return e.map((e,n)=>({row:e,index:n,timestamp:Date.parse(t(e)??``)})).sort((e,t)=>{let n=Number.isFinite(e.timestamp)?e.timestamp:-1/0;return(Number.isFinite(t.timestamp)?t.timestamp:-1/0)-n||e.index-t.index}).map(({row:e})=>e)}function ve({rows:e,locale:t}){let[n,r]=(0,l.useState)(null);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(k,{columns:[{key:`created`,label:`Criada`,render:e=>F(e.created_at)},{key:`title`,label:`Change`,render:e=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:e.title}),(0,y.jsx)(`small`,{children:e.id})]})},{key:`status`,label:`Status`,render:e=>(0,y.jsx)(De,{status:e.status})},{key:`risk`,label:`Risco`,render:e=>(0,y.jsx)(Oe,{risk:e.risk})},{key:`tasks`,label:`Tasks`,render:e=>e.task_ids.length,align:`right`},{key:`path`,label:`Arquivo`,render:e=>e.artifact_path}],locale:t,rowKey:e=>e.id,onRowClick:r,rows:_e(e,e=>e.created_at),showColumnInfo:!0,sortable:!0}),n?(0,y.jsx)(oe,{details:{kind:`change`,row:n},locale:t,onClose:()=>r(null)}):null]})}function ye({rows:e,locale:t}){let[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)(`all`),o=_e(e.filter(e=>i===`all`||e.kind===i),e=>e.created_at);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`operations-execution-table`,children:[(0,y.jsx)(`div`,{className:`operations-toolbar operations-run-kind-toolbar`,children:(0,y.jsx)(`nav`,{"aria-label":t===`pt-BR`?`Tipo de execução`:`Execution type`,children:[`all`,`interaction`,`delivery`].map(e=>(0,y.jsx)(`button`,{className:i===e?`is-active`:void 0,onClick:()=>a(e),type:`button`,children:be(e,t)},e))})}),(0,y.jsx)(k,{columns:[{key:`created`,label:`Data de criação`,render:e=>F(e.created_at)},{key:`id`,label:t===`pt-BR`?`Execução`:`Execution`,render:e=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:be(e.kind??`delivery`,t)}),(0,y.jsx)(`small`,{children:e.id})]})},{key:`status`,label:`Status`,render:e=>(0,y.jsx)(De,{status:e.status})},{key:`origin`,label:`Origem`,render:e=>(0,y.jsx)(ke,{entrypoint:e.origin.type===`interaction`?`conversation`:e.origin.type})},{key:`duration`,label:t===`pt-BR`?`Tempo de execução`:`Execution time`,render:e=>R(e.duration_ms,t),align:`right`},{key:`runs`,label:t===`pt-BR`?`Invocações do orquestrador`:`Orchestrator invocations`,render:e=>xe(e.orchestrator_run_count),align:`right`},{key:`subruns`,label:t===`pt-BR`?`Invocações delegadas`:`Delegated invocations`,render:e=>xe(e.subagent_run_count),align:`right`},{key:`finalizers`,label:t===`pt-BR`?`Finalizadores`:`Finalizers`,render:e=>`${xe(e.finalized_task_count)}/${xe(e.task_count)}`,align:`right`},{key:`tasks`,label:t===`pt-BR`?`Tarefas`:`Tasks`,render:e=>xe(e.task_count),align:`right`},{key:`specs`,label:`SPEC`,render:e=>xe(e.spec_count),align:`right`},{key:`prds`,label:`PRD`,render:e=>xe(e.prd_count),align:`right`}],locale:t,rowKey:e=>e.id,onRowClick:r,rows:o,showColumnInfo:!0,sortable:!0})]}),n?(0,y.jsx)(oe,{details:{kind:`execution`,row:n},locale:t,onClose:()=>r(null)}):null]})}function be(e,t){return t===`pt-BR`?e===`all`?`Todas`:e===`interaction`?`Interações`:`Execuções de entrega`:e===`all`?`All`:e===`interaction`?`Interactions`:`Delivery executions`}function xe(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0}function Se(e){return e.agent.toLowerCase()===`codex`?`codex`:e.agent_name||e.agent}function Ce({rows:e,locale:t}){let[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)(`all`),o=_e(e.filter(e=>i===`all`||e.run_kind===i),e=>e.started_at);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`operations-toolbar operations-run-kind-toolbar`,children:(0,y.jsx)(`nav`,{"aria-label":t===`pt-BR`?`Tipo de chamada de agente`:`Agent call type`,children:[`all`,`run`,`subrun`].map(e=>(0,y.jsx)(`button`,{className:i===e?`is-active`:void 0,onClick:()=>a(e),type:`button`,children:e===`all`?t===`pt-BR`?`Todas`:`All`:e===`run`?t===`pt-BR`?`Invocações do orquestrador`:`Orchestrator invocations`:t===`pt-BR`?`Invocações delegadas`:`Delegated invocations`},e))})}),(0,y.jsx)(k,{columns:[{key:`created`,label:`Data de criação`,render:e=>F(e.started_at)},{key:`id`,label:t===`pt-BR`?`Invocação`:`Agent invocation`,render:e=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:e.id}),(0,y.jsx)(`small`,{children:e.parent_run_id??e.task_id??e.conversation_id})]})},{key:`kind`,label:t===`pt-BR`?`Tipo`:`Type`,render:e=>e.run_kind===`run`?t===`pt-BR`?`Invocação do orquestrador`:`Orchestrator invocation`:t===`pt-BR`?`Invocação delegada`:`Delegated invocation`},{key:`agent`,label:t===`pt-BR`?`Agente`:`Agent`,render:e=>(0,y.jsx)(`strong`,{children:Se(e)})},{key:`status`,label:`Status`,render:e=>(0,y.jsx)(De,{status:e.status})},{key:`origin`,label:t===`pt-BR`?`Origem`:`Origin`,render:e=>(0,y.jsx)(ke,{entrypoint:e.entrypoint})},{key:`phase`,label:t===`pt-BR`?`Propósito`:`Purpose`,render:e=>we(e.run_purpose,t)},{key:`duration`,label:`Duração`,render:e=>R(ae(e),t)}],locale:t,rowKey:e=>e.id,onRowClick:r,rows:o,showColumnInfo:!0,sortable:!0}),n?(0,y.jsx)(oe,{details:{kind:`run`,row:n},locale:t,onClose:()=>r(null)}):null]})}function we(e,t){return t===`pt-BR`?{intake:`Entrada`,orchestration:`Orquestração`,execution:`Execução`,review:`Revisão`,audit:`Auditoria`,finalization:`Finalização`}[e]:e}function Te({rows:e,executions:t,locale:n}){let r=he(t,e);return(0,y.jsx)(k,{columns:[{key:`created`,label:n===`pt-BR`?`Data e hora`:`Date and time`,render:e=>F(e.latest_started_at)},{key:`conversation`,label:n===`pt-BR`?`Conversa`:`Conversation`,render:e=>(0,y.jsx)(`strong`,{children:e.id})},{key:`status`,label:`Status`,render:e=>(0,y.jsx)(De,{status:e.status})},{key:`runs`,label:n===`pt-BR`?`Invocações`:`Invocations`,render:e=>e.run_count,align:`right`},{key:`executions`,label:n===`pt-BR`?`Execuções`:`Executions`,render:e=>e.execution_count,align:`right`},{key:`duration`,label:n===`pt-BR`?`Duração`:`Duration`,render:e=>R(e.duration_ms,n)},{key:`models`,label:n===`pt-BR`?`Modelos`:`Models`,render:e=>e.models.length>0?e.models.join(`, `):`—`}],locale:n,rowKey:e=>e.id,rows:r,showColumnInfo:!0,sortable:!0})}function Ee({rows:e,locale:t}){let[n,r]=(0,l.useState)(null);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(k,{columns:[{key:`date`,label:`Data de criação`,render:e=>F(e.created_at)},{key:`title`,label:`Decisão`,render:e=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:e.title}),(0,y.jsx)(`small`,{children:e.id})]})},{key:`origin`,label:`Origem`,render:e=>(0,y.jsx)(Ae,{origin:e.origin})},{key:`stage`,label:`Fase`,render:e=>(0,y.jsx)(je,{scopeType:e.scope_type})},{key:`scope`,label:`Escopo`,render:e=>`${e.scope_type}: ${e.scope_id}`}],locale:t,rowKey:e=>e.id,onRowClick:r,rows:_e(e,e=>e.created_at),showColumnInfo:!0,sortable:!0}),n?(0,y.jsx)(oe,{details:{kind:`decision`,row:n},locale:t,onClose:()=>r(null)}):null]})}function De({status:e}){return(0,y.jsx)(`span`,{className:`operations-table-status is-${e}`,children:e})}function Oe({risk:e}){return(0,y.jsx)(`span`,{className:`operations-table-risk is-${e}`,children:e})}function ke({entrypoint:e}){let t=e===`prd`?`PRD`:e===`spec`?`SPEC`:e===`task`?`Tarefa`:`Conversa`;return(0,y.jsx)(`span`,{className:`operations-table-entry is-${e}`,children:t})}function Ae({origin:e}){return(0,y.jsx)(`span`,{className:`operations-table-decision-origin is-${e}`,children:e})}function je({scopeType:e}){let t=e===`change`?`planning`:`execution`;return(0,y.jsx)(`span`,{className:`operations-table-stage is-${t}`,children:t===`planning`?`Planejamento`:`Execução`})}var Me;function B(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Ne=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Pe=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Me=globalThis).__zod_globalConfig??(Me.__zod_globalConfig={});var Fe=globalThis.__zod_globalConfig;function Ie(e){return e&&Object.assign(Fe,e),Fe}function Le(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Re(e,t){return typeof t==`bigint`?t.toString():t}function ze(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function Be(e){return e==null}function Ve(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var He=Symbol(`evaluating`);function V(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==He)return r===void 0&&(r=He,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ue(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function We(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ge(e){return JSON.stringify(e)}function Ke(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var qe=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Je(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ye=ze(()=>{if(Fe.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Xe(e){if(Je(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Je(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ze(e){return Xe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Qe=new Set([`string`,`number`,`symbol`]);function $e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function et(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function H(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function tt(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function nt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return et(e,We(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Ue(this,`shape`,e),e},checks:[]}))}function rt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return et(e,We(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Ue(this,`shape`,r),r},checks:[]}))}function it(e,t){if(!Xe(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return et(e,We(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ue(this,`shape`,n),n}}))}function at(e,t){if(!Xe(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return et(e,We(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ue(this,`shape`,n),n}}))}function ot(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return et(e,We(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Ue(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function st(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return et(t,We(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Ue(this,`shape`,i),i},checks:[]}))}function ct(e,t,n){return et(t,We(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Ue(this,`shape`,i),i}}))}function lt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ut(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function dt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ft(e){return typeof e==`string`?e:e?.message}function pt(e,t,n){let r=e.message?e.message:ft(e.inst?._zod.def?.error?.(e))??ft(t?.error?.(e))??ft(n.customError?.(e))??ft(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function mt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ht(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var gt=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Re,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_t=B(`$ZodError`,gt),vt=B(`$ZodError`,gt,{Parent:Error});function yt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function bt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var xt=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ne;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>pt(e,a,Ie())));throw qe(t,i?.callee),t}return o.value},St=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>pt(e,a,Ie())));throw qe(t,i?.callee),t}return o.value},Ct=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ne;return a.issues.length?{success:!1,error:new(e??_t)(a.issues.map(e=>pt(e,i,Ie())))}:{success:!0,data:a.value}},wt=Ct(vt),Tt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>pt(e,i,Ie())))}:{success:!0,data:a.value}},Et=Tt(vt),Dt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return xt(e)(t,n,i)},Ot=e=>(t,n,r)=>xt(e)(t,n,r),kt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return St(e)(t,n,i)},At=e=>async(t,n,r)=>St(e)(t,n,r),jt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ct(e)(t,n,i)},Mt=e=>(t,n,r)=>Ct(e)(t,n,r),Nt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Tt(e)(t,n,i)},Pt=e=>async(t,n,r)=>Tt(e)(t,n,r),Ft=/^[cC][0-9a-z]{6,}$/,It=/^[0-9a-z]+$/,Lt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rt=/^[0-9a-vA-V]{20}$/,zt=/^[A-Za-z0-9]{27}$/,Bt=/^[a-zA-Z0-9_-]{21}$/,Vt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ht=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ut=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Wt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Gt=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Kt(){return new RegExp(Gt,`u`)}var qt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Yt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Xt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Zt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Qt=/^[A-Za-z0-9_-]*$/,$t=/^https?$/,en=/^\+[1-9]\d{6,14}$/,tn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,nn=RegExp(`^${tn}$`);function rn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function an(e){return RegExp(`^${rn(e)}$`)}function on(e){let t=rn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${tn}T(?:${r})$`)}var sn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},cn=/^[^A-Z]*$/,ln=/^[^a-z]*$/,un=B(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),dn=B(`$ZodCheckMaxLength`,(e,t)=>{var n;un.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Be(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=mt(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fn=B(`$ZodCheckMinLength`,(e,t)=>{var n;un.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Be(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=mt(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pn=B(`$ZodCheckLengthEquals`,(e,t)=>{var n;un.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Be(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=mt(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),mn=B(`$ZodCheckStringFormat`,(e,t)=>{var n,r;un.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),hn=B(`$ZodCheckRegex`,(e,t)=>{mn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),gn=B(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=cn,mn.init(e,t)}),_n=B(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ln,mn.init(e,t)}),vn=B(`$ZodCheckIncludes`,(e,t)=>{un.init(e,t);let n=$e(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),yn=B(`$ZodCheckStartsWith`,(e,t)=>{un.init(e,t);let n=RegExp(`^${$e(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),bn=B(`$ZodCheckEndsWith`,(e,t)=>{un.init(e,t);let n=RegExp(`.*${$e(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),xn=B(`$ZodCheckOverwrite`,(e,t)=>{un.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Sn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
12
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
13
+ `))}},Cn={major:4,minor:4,patch:3},wn=B(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Cn;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=lt(e),i;for(let a of t){if(a._zod.def.when){if(ut(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Ne;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=lt(e,t))});else{if(e.issues.length===t)continue;r||=lt(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(lt(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Ne;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Ne;return o.then(e=>t(e,r,a))}return t(o,r,a)}}V(e,`~standard`,()=>({validate:t=>{try{let n=wt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Et(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Tn=B(`$ZodString`,(e,t)=>{wn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??sn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),En=B(`$ZodStringFormat`,(e,t)=>{mn.init(e,t),Tn.init(e,t)}),Dn=B(`$ZodGUID`,(e,t)=>{t.pattern??=Ht,En.init(e,t)}),On=B(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ut(e)}else t.pattern??=Ut();En.init(e,t)}),kn=B(`$ZodEmail`,(e,t)=>{t.pattern??=Wt,En.init(e,t)}),An=B(`$ZodURL`,(e,t)=>{En.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===$t.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),jn=B(`$ZodEmoji`,(e,t)=>{t.pattern??=Kt(),En.init(e,t)}),Mn=B(`$ZodNanoID`,(e,t)=>{t.pattern??=Bt,En.init(e,t)}),Nn=B(`$ZodCUID`,(e,t)=>{t.pattern??=Ft,En.init(e,t)}),Pn=B(`$ZodCUID2`,(e,t)=>{t.pattern??=It,En.init(e,t)}),Fn=B(`$ZodULID`,(e,t)=>{t.pattern??=Lt,En.init(e,t)}),In=B(`$ZodXID`,(e,t)=>{t.pattern??=Rt,En.init(e,t)}),Ln=B(`$ZodKSUID`,(e,t)=>{t.pattern??=zt,En.init(e,t)}),Rn=B(`$ZodISODateTime`,(e,t)=>{t.pattern??=on(t),En.init(e,t)}),zn=B(`$ZodISODate`,(e,t)=>{t.pattern??=nn,En.init(e,t)}),Bn=B(`$ZodISOTime`,(e,t)=>{t.pattern??=an(t),En.init(e,t)}),Vn=B(`$ZodISODuration`,(e,t)=>{t.pattern??=Vt,En.init(e,t)}),Hn=B(`$ZodIPv4`,(e,t)=>{t.pattern??=qt,En.init(e,t),e._zod.bag.format=`ipv4`}),Un=B(`$ZodIPv6`,(e,t)=>{t.pattern??=Jt,En.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Wn=B(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Yt,En.init(e,t)}),Gn=B(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Xt,En.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Kn(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var qn=B(`$ZodBase64`,(e,t)=>{t.pattern??=Zt,En.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Kn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Jn(e){if(!Qt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Kn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Yn=B(`$ZodBase64URL`,(e,t)=>{t.pattern??=Qt,En.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Jn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Xn=B(`$ZodE164`,(e,t)=>{t.pattern??=en,En.init(e,t)});function Zn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Qn=B(`$ZodJWT`,(e,t)=>{En.init(e,t),e._zod.check=n=>{Zn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),$n=B(`$ZodUnknown`,(e,t)=>{wn.init(e,t),e._zod.parse=e=>e}),er=B(`$ZodNever`,(e,t)=>{wn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function tr(e,t,n){e.issues.length&&t.issues.push(...dt(n,e.issues)),t.value[n]=e.value}var nr=B(`$ZodArray`,(e,t)=>{wn.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>tr(t,n,e))):tr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function rr(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...dt(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function ir(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=tt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ar(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>rr(e,n,i,t,u,d))):rr(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var or=B(`$ZodObject`,(e,t)=>{if(wn.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=ze(()=>ir(t));V(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Je,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>rr(n,t,e,s,r,i))):rr(a,t,e,s,r,i)}return i?ar(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),sr=B(`$ZodObjectJIT`,(e,t)=>{or.init(e,t);let n=e._zod.parse,r=ze(()=>ir(t)),i=e=>{let t=new Sn([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Ge(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Ge(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
14
+ if (${n}.issues.length) {
15
+ if (${o} in input) {
16
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
17
+ ...iss,
18
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
19
+ })));
20
+ }
21
+ }
22
+
23
+ if (${n}.value === undefined) {
24
+ if (${o} in input) {
25
+ newResult[${o}] = undefined;
26
+ }
27
+ } else {
28
+ newResult[${o}] = ${n}.value;
29
+ }
30
+
31
+ `):c?t.write(`
32
+ if (${n}.issues.length) {
33
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
34
+ ...iss,
35
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
36
+ })));
37
+ }
38
+
39
+ if (${n}.value === undefined) {
40
+ if (${o} in input) {
41
+ newResult[${o}] = undefined;
42
+ }
43
+ } else {
44
+ newResult[${o}] = ${n}.value;
45
+ }
46
+
47
+ `):t.write(`
48
+ const ${n}_present = ${o} in input;
49
+ if (${n}.issues.length) {
50
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
51
+ ...iss,
52
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
53
+ })));
54
+ }
55
+ if (!${n}_present && !${n}.issues.length) {
56
+ payload.issues.push({
57
+ code: "invalid_type",
58
+ expected: "nonoptional",
59
+ input: undefined,
60
+ path: [${o}]
61
+ });
62
+ }
63
+
64
+ if (${n}_present) {
65
+ if (${n}.value === undefined) {
66
+ newResult[${o}] = undefined;
67
+ } else {
68
+ newResult[${o}] = ${n}.value;
69
+ }
70
+ }
71
+
72
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Je,s=!Fe.jitless,c=s&&Ye.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?ar([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function cr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!lt(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>pt(e,r,Ie())))}),t)}var lr=B(`$ZodUnion`,(e,t)=>{wn.init(e,t),V(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),V(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),V(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),V(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Ve(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>cr(t,r,e,i)):cr(o,r,e,i)}}),ur=B(`$ZodIntersection`,(e,t)=>{wn.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>fr(e,t,n)):fr(e,i,a)}});function dr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Xe(e)&&Xe(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=dr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=dr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fr(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),lt(e))return e;let o=dr(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var pr=B(`$ZodEnum`,(e,t)=>{wn.init(e,t);let n=Le(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Qe.has(typeof e)).map(e=>typeof e==`string`?$e(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),mr=B(`$ZodTransform`,(e,t)=>{wn.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Pe(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Ne;return n.value=i,n.fallback=!0,n}});function hr(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var gr=B(`$ZodOptional`,(e,t)=>{wn.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,V(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),V(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ve(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>hr(e,r)):hr(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),_r=B(`$ZodExactOptional`,(e,t)=>{gr.init(e,t),V(e._zod,`values`,()=>t.innerType._zod.values),V(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),vr=B(`$ZodNullable`,(e,t)=>{wn.init(e,t),V(e._zod,`optin`,()=>t.innerType._zod.optin),V(e._zod,`optout`,()=>t.innerType._zod.optout),V(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ve(e.source)}|null)$`):void 0}),V(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),yr=B(`$ZodDefault`,(e,t)=>{wn.init(e,t),e._zod.optin=`optional`,V(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>br(e,t)):br(r,t)}});function br(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var xr=B(`$ZodPrefault`,(e,t)=>{wn.init(e,t),e._zod.optin=`optional`,V(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Sr=B(`$ZodNonOptional`,(e,t)=>{wn.init(e,t),V(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Cr(t,e)):Cr(i,e)}});function Cr(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var wr=B(`$ZodCatch`,(e,t)=>{wn.init(e,t),e._zod.optin=`optional`,V(e._zod,`optout`,()=>t.innerType._zod.optout),V(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>pt(e,n,Ie()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>pt(e,n,Ie()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Tr=B(`$ZodPipe`,(e,t)=>{wn.init(e,t),V(e._zod,`values`,()=>t.in._zod.values),V(e._zod,`optin`,()=>t.in._zod.optin),V(e._zod,`optout`,()=>t.out._zod.optout),V(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Er(e,t.in,n)):Er(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Er(e,t.out,n)):Er(r,t.out,n)}});function Er(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Dr=B(`$ZodReadonly`,(e,t)=>{wn.init(e,t),V(e._zod,`propValues`,()=>t.innerType._zod.propValues),V(e._zod,`values`,()=>t.innerType._zod.values),V(e._zod,`optin`,()=>t.innerType?._zod?.optin),V(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Or):Or(r)}});function Or(e){return e.value=Object.freeze(e.value),e}var kr=B(`$ZodCustom`,(e,t)=>{un.init(e,t),wn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Ar(t,n,r,e));Ar(i,n,r,e)}});function Ar(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ht(e))}}var jr,Mr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Nr(){return new Mr}(jr=globalThis).__zod_globalRegistry??(jr.__zod_globalRegistry=Nr());var Pr=globalThis.__zod_globalRegistry;function Fr(e,t){return new e({type:`string`,...H(t)})}function Ir(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...H(t)})}function Lr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...H(t)})}function Rr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...H(t)})}function zr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...H(t)})}function Br(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...H(t)})}function Vr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...H(t)})}function Hr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...H(t)})}function Ur(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...H(t)})}function Wr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...H(t)})}function Gr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...H(t)})}function Kr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...H(t)})}function qr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...H(t)})}function Jr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...H(t)})}function Yr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...H(t)})}function Xr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...H(t)})}function Zr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...H(t)})}function Qr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...H(t)})}function $r(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...H(t)})}function ei(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...H(t)})}function ti(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...H(t)})}function ni(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...H(t)})}function ri(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...H(t)})}function ii(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...H(t)})}function ai(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...H(t)})}function oi(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...H(t)})}function si(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...H(t)})}function ci(e){return new e({type:`unknown`})}function li(e,t){return new e({type:`never`,...H(t)})}function ui(e,t){return new dn({check:`max_length`,...H(t),maximum:e})}function di(e,t){return new fn({check:`min_length`,...H(t),minimum:e})}function fi(e,t){return new pn({check:`length_equals`,...H(t),length:e})}function pi(e,t){return new hn({check:`string_format`,format:`regex`,...H(t),pattern:e})}function mi(e){return new gn({check:`string_format`,format:`lowercase`,...H(e)})}function hi(e){return new _n({check:`string_format`,format:`uppercase`,...H(e)})}function gi(e,t){return new vn({check:`string_format`,format:`includes`,...H(t),includes:e})}function _i(e,t){return new yn({check:`string_format`,format:`starts_with`,...H(t),prefix:e})}function vi(e,t){return new bn({check:`string_format`,format:`ends_with`,...H(t),suffix:e})}function yi(e){return new xn({check:`overwrite`,tx:e})}function bi(e){return yi(t=>t.normalize(e))}function xi(){return yi(e=>e.trim())}function Si(){return yi(e=>e.toLowerCase())}function Ci(){return yi(e=>e.toUpperCase())}function wi(){return yi(e=>Ke(e))}function Ti(e,t,n){return new e({type:`array`,element:t,...H(n)})}function Ei(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...H(n)})}function Di(e,t){let n=Oi(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ht(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(ht(r))}},e(t.value,t)),t);return n}function Oi(e,t){let n=new un({check:`custom`,...H(t)});return n._zod.check=e,n}function ki(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Pr,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function U(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,U(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&ji(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function W(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
73
+
74
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Ai(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Ni(t,`input`,e.processors),output:Ni(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ji(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ji(r.element,n);if(r.type===`set`)return ji(r.valueType,n);if(r.type===`lazy`)return ji(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return ji(r.innerType,n);if(r.type===`intersection`)return ji(r.left,n)||ji(r.right,n);if(r.type===`record`||r.type===`map`)return ji(r.keyType,n)||ji(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ji(r.in,n)||ji(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ji(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ji(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ji(e,n))return!0;return!!(r.rest&&ji(r.rest,n))}return!1}var Mi=(e,t={})=>n=>{let r=ki({...n,processors:t});return U(e,r),W(r,e),Ai(r,e)},Ni=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ki({...i??{},target:a,io:t,processors:n});return U(e,o),W(o,e),Ai(o,e)},Pi={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Fi=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Pi[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ii=(e,t,n,r)=>{n.not={}},Li=(e,t,n,r)=>{let i=e._zod.def,a=Le(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ri=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},zi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Bi=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=U(a.element,t,{...r,path:[...r.path,`items`]})},Vi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=U(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=U(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Hi=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>U(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ui=(e,t,n,r)=>{let i=e._zod.def,a=U(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=U(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Wi=(e,t,n,r)=>{let i=e._zod.def,a=U(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Gi=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ki=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},qi=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ji=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Yi=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;U(o,t,r);let s=t.seen.get(e);s.ref=o},Xi=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Zi=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Qi=B(`ZodISODateTime`,(e,t)=>{Rn.init(e,t),Ta.init(e,t)});function $i(e){return ii(Qi,e)}var ea=B(`ZodISODate`,(e,t)=>{zn.init(e,t),Ta.init(e,t)});function ta(e){return ai(ea,e)}var na=B(`ZodISOTime`,(e,t)=>{Bn.init(e,t),Ta.init(e,t)});function ra(e){return oi(na,e)}var ia=B(`ZodISODuration`,(e,t)=>{Vn.init(e,t),Ta.init(e,t)});function aa(e){return si(ia,e)}var oa=B(`ZodError`,(e,t)=>{_t.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>bt(e,t)},flatten:{value:t=>yt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Re,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Re,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),sa=xt(oa),ca=St(oa),la=Ct(oa),ua=Tt(oa),da=Dt(oa),fa=Ot(oa),pa=kt(oa),ma=At(oa),ha=jt(oa),ga=Mt(oa),_a=Nt(oa),va=Pt(oa),ya=new WeakMap;function ba(e,t,n){let r=Object.getPrototypeOf(e),i=ya.get(r);if(i||(i=new Set,ya.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var xa=B(`ZodType`,(e,t)=>(wn.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Ni(e,`input`),output:Ni(e,`output`)}}),e.toJSONSchema=Mi(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>sa(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>la(e,t,n),e.parseAsync=async(t,n)=>ca(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ua(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>da(e,t,n),e.decode=(t,n)=>fa(e,t,n),e.encodeAsync=async(t,n)=>pa(e,t,n),e.decodeAsync=async(t,n)=>ma(e,t,n),e.safeEncode=(t,n)=>ha(e,t,n),e.safeDecode=(t,n)=>ga(e,t,n),e.safeEncodeAsync=async(t,n)=>_a(e,t,n),e.safeDecodeAsync=async(t,n)=>va(e,t,n),ba(e,`ZodType`,{check(...e){let t=this.def;return this.clone(We(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return et(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Eo(e,t))},superRefine(e,t){return this.check(Do(e,t))},overwrite(e){return this.check(yi(e))},optional(){return G(this)},exactOptional(){return lo(this)},nullable(){return fo(this)},nullish(){return G(fo(this))},nonoptional(e){return vo(this,e)},array(){return Xa(this)},or(e){return eo([this,e])},and(e){return no(this,e)},transform(e){return So(this,oo(e))},default(e){return mo(this,e)},prefault(e){return go(this,e)},catch(e){return bo(this,e)},pipe(e){return So(this,e)},readonly(){return wo(this)},describe(e){let t=this.clone();return Pr.add(t,{description:e}),t},meta(...e){if(e.length===0)return Pr.get(this);let t=this.clone();return Pr.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Pr.get(e)?.description},configurable:!0}),e)),Sa=B(`_ZodString`,(e,t)=>{Tn.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fi(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ba(e,`_ZodString`,{regex(...e){return this.check(pi(...e))},includes(...e){return this.check(gi(...e))},startsWith(...e){return this.check(_i(...e))},endsWith(...e){return this.check(vi(...e))},min(...e){return this.check(di(...e))},max(...e){return this.check(ui(...e))},length(...e){return this.check(fi(...e))},nonempty(...e){return this.check(di(1,...e))},lowercase(e){return this.check(mi(e))},uppercase(e){return this.check(hi(e))},trim(){return this.check(xi())},normalize(...e){return this.check(bi(...e))},toLowerCase(){return this.check(Si())},toUpperCase(){return this.check(Ci())},slugify(){return this.check(wi())}})}),Ca=B(`ZodString`,(e,t)=>{Tn.init(e,t),Sa.init(e,t),e.email=t=>e.check(Ir(Ea,t)),e.url=t=>e.check(Hr(ka,t)),e.jwt=t=>e.check(ri(Wa,t)),e.emoji=t=>e.check(Ur(Aa,t)),e.guid=t=>e.check(Lr(Da,t)),e.uuid=t=>e.check(Rr(Oa,t)),e.uuidv4=t=>e.check(zr(Oa,t)),e.uuidv6=t=>e.check(Br(Oa,t)),e.uuidv7=t=>e.check(Vr(Oa,t)),e.nanoid=t=>e.check(Wr(ja,t)),e.guid=t=>e.check(Lr(Da,t)),e.cuid=t=>e.check(Gr(Ma,t)),e.cuid2=t=>e.check(Kr(Na,t)),e.ulid=t=>e.check(qr(Pa,t)),e.base64=t=>e.check(ei(Va,t)),e.base64url=t=>e.check(ti(Ha,t)),e.xid=t=>e.check(Jr(Fa,t)),e.ksuid=t=>e.check(Yr(Ia,t)),e.ipv4=t=>e.check(Xr(La,t)),e.ipv6=t=>e.check(Zr(Ra,t)),e.cidrv4=t=>e.check(Qr(za,t)),e.cidrv6=t=>e.check($r(Ba,t)),e.e164=t=>e.check(ni(Ua,t)),e.datetime=t=>e.check($i(t)),e.date=t=>e.check(ta(t)),e.time=t=>e.check(ra(t)),e.duration=t=>e.check(aa(t))});function wa(e){return Fr(Ca,e)}var Ta=B(`ZodStringFormat`,(e,t)=>{En.init(e,t),Sa.init(e,t)}),Ea=B(`ZodEmail`,(e,t)=>{kn.init(e,t),Ta.init(e,t)}),Da=B(`ZodGUID`,(e,t)=>{Dn.init(e,t),Ta.init(e,t)}),Oa=B(`ZodUUID`,(e,t)=>{On.init(e,t),Ta.init(e,t)}),ka=B(`ZodURL`,(e,t)=>{An.init(e,t),Ta.init(e,t)}),Aa=B(`ZodEmoji`,(e,t)=>{jn.init(e,t),Ta.init(e,t)}),ja=B(`ZodNanoID`,(e,t)=>{Mn.init(e,t),Ta.init(e,t)}),Ma=B(`ZodCUID`,(e,t)=>{Nn.init(e,t),Ta.init(e,t)}),Na=B(`ZodCUID2`,(e,t)=>{Pn.init(e,t),Ta.init(e,t)}),Pa=B(`ZodULID`,(e,t)=>{Fn.init(e,t),Ta.init(e,t)}),Fa=B(`ZodXID`,(e,t)=>{In.init(e,t),Ta.init(e,t)}),Ia=B(`ZodKSUID`,(e,t)=>{Ln.init(e,t),Ta.init(e,t)}),La=B(`ZodIPv4`,(e,t)=>{Hn.init(e,t),Ta.init(e,t)}),Ra=B(`ZodIPv6`,(e,t)=>{Un.init(e,t),Ta.init(e,t)}),za=B(`ZodCIDRv4`,(e,t)=>{Wn.init(e,t),Ta.init(e,t)}),Ba=B(`ZodCIDRv6`,(e,t)=>{Gn.init(e,t),Ta.init(e,t)}),Va=B(`ZodBase64`,(e,t)=>{qn.init(e,t),Ta.init(e,t)}),Ha=B(`ZodBase64URL`,(e,t)=>{Yn.init(e,t),Ta.init(e,t)}),Ua=B(`ZodE164`,(e,t)=>{Xn.init(e,t),Ta.init(e,t)}),Wa=B(`ZodJWT`,(e,t)=>{Qn.init(e,t),Ta.init(e,t)}),Ga=B(`ZodUnknown`,(e,t)=>{$n.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ka(){return ci(Ga)}var qa=B(`ZodNever`,(e,t)=>{er.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ii(e,t,n,r)});function Ja(e){return li(qa,e)}var Ya=B(`ZodArray`,(e,t)=>{nr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bi(e,t,n,r),e.element=t.element,ba(e,`ZodArray`,{min(e,t){return this.check(di(e,t))},nonempty(e){return this.check(di(1,e))},max(e,t){return this.check(ui(e,t))},length(e,t){return this.check(fi(e,t))},unwrap(){return this.element}})});function Xa(e,t){return Ti(Ya,e,t)}var Za=B(`ZodObject`,(e,t)=>{sr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vi(e,t,n,r),V(e,`shape`,()=>t.shape),ba(e,`ZodObject`,{keyof(){return io(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Ka()})},loose(){return this.clone({...this._zod.def,catchall:Ka()})},strict(){return this.clone({...this._zod.def,catchall:Ja()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return it(this,e)},safeExtend(e){return at(this,e)},merge(e){return ot(this,e)},pick(e){return nt(this,e)},omit(e){return rt(this,e)},partial(...e){return st(so,this,e[0])},required(...e){return ct(_o,this,e[0])}})});function Qa(e,t){return new Za({type:`object`,shape:e??{},...H(t)})}var $a=B(`ZodUnion`,(e,t)=>{lr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.options=t.options});function eo(e,t){return new $a({type:`union`,options:e,...H(t)})}var to=B(`ZodIntersection`,(e,t)=>{ur.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ui(e,t,n,r)});function no(e,t){return new to({type:`intersection`,left:e,right:t})}var ro=B(`ZodEnum`,(e,t)=>{pr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Li(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ro({...t,checks:[],...H(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ro({...t,checks:[],...H(r),entries:i})}});function io(e,t){return new ro({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...H(t)})}var ao=B(`ZodTransform`,(e,t)=>{mr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Pe(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ht(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(ht(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function oo(e){return new ao({type:`transform`,transform:e})}var so=B(`ZodOptional`,(e,t)=>{gr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function G(e){return new so({type:`optional`,innerType:e})}var co=B(`ZodExactOptional`,(e,t)=>{_r.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lo(e){return new co({type:`optional`,innerType:e})}var uo=B(`ZodNullable`,(e,t)=>{vr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fo(e){return new uo({type:`nullable`,innerType:e})}var po=B(`ZodDefault`,(e,t)=>{yr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function mo(e,t){return new po({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ze(t)}})}var ho=B(`ZodPrefault`,(e,t)=>{xr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function go(e,t){return new ho({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ze(t)}})}var _o=B(`ZodNonOptional`,(e,t)=>{Sr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vo(e,t){return new _o({type:`nonoptional`,innerType:e,...H(t)})}var yo=B(`ZodCatch`,(e,t)=>{wr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ji(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bo(e,t){return new yo({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var xo=B(`ZodPipe`,(e,t)=>{Tr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yi(e,t,n,r),e.in=t.in,e.out=t.out});function So(e,t){return new xo({type:`pipe`,in:e,out:t})}var Co=B(`ZodReadonly`,(e,t)=>{Dr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wo(e){return new Co({type:`readonly`,innerType:e})}var To=B(`ZodCustom`,(e,t)=>{kr.init(e,t),xa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ri(e,t,n,r)});function Eo(e,t={}){return Ei(To,e,t)}function Do(e,t){return Di(e,t)}function Oo(e){if(!Number.isSafeInteger(e.totalRows)||e.totalRows<0)throw TypeError(`totalRows must be a non-negative safe integer`);return Object.freeze({...e,version:2,filters:Object.freeze({...e.filters})})}var ko={health:`/api/v2/health`,snapshot:`/api/v2/snapshot`,reconcileOpenWork:`/api/v2/reconcile-open-work`,operations:`/api/v2/operations`,costMonitor:`/api/v2/cost-monitor`,agentCatalog:`/api/v2/agent-catalog`,projectSettings:`/api/v2/project-settings`,prd:e=>`/api/v2/prds/${encodeURIComponent(e)}`,spec:e=>`/api/v2/specs/${encodeURIComponent(e)}`,task:e=>`/api/v2/tasks/${encodeURIComponent(e)}`,taskTrace:e=>`/api/v2/tasks/${encodeURIComponent(e)}/trace`};Qa({from:wa().datetime({offset:!0}).nullable(),to:wa().datetime({offset:!0}).nullable()}).strict();var Ao=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),jo=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Mo={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},No=(0,l.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,l.createElement)(`svg`,{ref:c,...Mo,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:jo(`lucide`,i),...s},[...o.map(([e,t])=>(0,l.createElement)(e,t)),...Array.isArray(a)?a:[a]])),K=(e,t)=>{let n=(0,l.forwardRef)(({className:n,...r},i)=>(0,l.createElement)(No,{ref:i,iconNode:t,className:jo(`lucide-${Ao(e)}`,n),...r}));return n.displayName=`${e}`,n},Po=K(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Fo=K(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Io=K(`BadgeCheck`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Lo=K(`Boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Ro=K(`CalendarDays`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M16 18h.01`,key:`kzsmim`}]]),zo=K(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Bo=K(`CircleDot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Vo=K(`CircleGauge`,[[`path`,{d:`M15.6 2.7a10 10 0 1 0 5.7 5.7`,key:`1e0p6d`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M13.4 10.6 19 5`,key:`1kr7tw`}]]),Ho=K(`ClipboardList`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),Uo=K(`Clock3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16.5 12`,key:`1aq6pp`}]]),Wo=K(`Coins`,[[`circle`,{cx:`8`,cy:`8`,r:`6`,key:`3yglwk`}],[`path`,{d:`M18.09 10.37A6 6 0 1 1 10.34 18`,key:`t5s6rm`}],[`path`,{d:`M7 6h1v4`,key:`1obek4`}],[`path`,{d:`m16.71 13.88.7.71-2.82 2.82`,key:`1rbuyh`}]]),Go=K(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Ko=K(`Download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),qo=K(`FileCheck2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m3 15 2 2 4-4`,key:`1lhrkk`}]]),Jo=K(`FileCode2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m5 12-3 3 3 3`,key:`oke12k`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),Yo=K(`FileStack`,[[`path`,{d:`M21 7h-3a2 2 0 0 1-2-2V2`,key:`9rb54x`}],[`path`,{d:`M21 6v6.5c0 .8-.7 1.5-1.5 1.5h-7c-.8 0-1.5-.7-1.5-1.5v-9c0-.8.7-1.5 1.5-1.5H17Z`,key:`1059l0`}],[`path`,{d:`M7 8v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H15`,key:`16874u`}],[`path`,{d:`M3 12v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H11`,key:`k2ox98`}]]),Xo=K(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Zo=K(`Gavel`,[[`path`,{d:`m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8`,key:`15492f`}],[`path`,{d:`m16 16 6-6`,key:`vzrcl6`}],[`path`,{d:`m8 8 6-6`,key:`18bi4p`}],[`path`,{d:`m9 7 8 8`,key:`5jnvq1`}],[`path`,{d:`m21 11-8-8`,key:`z4y7zo`}]]),Qo=K(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),$o=K(`Layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),es=K(`LayoutGrid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ts=K(`Link2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),ns=K(`ListChecks`,[[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),rs=K(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),is=K(`Route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),as=K(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),os=K(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ss=K(`Workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),cs=K(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ls=K(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);function us({progress:e,keepOpen:t=!0}){return(0,y.jsxs)(`aside`,{"aria-live":`polite`,className:`export-progress`,role:`status`,children:[(0,y.jsx)(`strong`,{children:`Exportação em andamento`}),(0,y.jsx)(`progress`,{max:100,value:e,"aria-label":`Progresso da exportação`}),t&&(0,y.jsx)(`span`,{children:`Mantenha a página aberta.`}),(0,y.jsxs)(`span`,{children:[Math.round(e),`%`]})]})}function ds(){return(0,y.jsx)(`aside`,{"aria-live":`polite`,className:`export-success`,role:`status`,children:`Exportação concluída.`})}var fs=new TextEncoder,ps=4294967295,ms=Uint32Array.from({length:256},(e,t)=>{let n=t;for(let e=0;e<8;e++)n=n>>>1^(n&1?3988292384:0);return n>>>0}),hs=class{writable;metas=[];offset=0;closed=!1;constructor(e){this.writable=e}entry(e){let t=bs(e),n=this.put(Ss(t)),r=4294967295,i=0,a=!1;return{ready:n,write:async e=>{if(await n,a)throw Error(`ZIP entry is already closed`);if(i+e.length>ps)throw RangeError(`ZIP32 entry size exceeded`);r=Ds(e,r),i+=e.length,await this.put(e)},close:async()=>{if(await n,a)return;a=!0;let o=(r^4294967295)>>>0;await this.put(Cs(o,i)),this.metas.push({name:e,crc:o,size:i,offset:this.offset-i-16-t.length-30})},abort:e=>this.writable.abort?.(e)??Promise.resolve()}}async close(){if(this.closed)return;this.closed=!0;let e=this.offset;for(let e of this.metas)await this.put(ws(e));await this.put(Ts(this.metas.length,this.offset-e,e)),await this.writable.close()}async abort(e){this.closed=!0,await this.writable.abort?.(e)}async put(e){if(this.offset+e.length>ps)throw RangeError(`ZIP32 size exceeded`);await this.writable.ready,await this.writable.write(e),this.offset+=e.length}};async function gs(e){if(e.headers.length===0||e.headers.length>16384)throw RangeError(`XLSX supports columns A through XFD`);let t=vs(_s(e.headers,e.rows));await ys([xs(`[Content_Types].xml`,`<?xml version="1.0"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/></Types>`),xs(`_rels/.rels`,`<?xml version="1.0"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`),xs(`xl/workbook.xml`,`<?xml version="1.0"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><sheets><sheet name="Export" sheetId="1" r:id="rId1"/></sheets></workbook>`),xs(`xl/_rels/workbook.xml.rels`,`<?xml version="1.0"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>`),xs(`xl/styles.xml`,`<?xml version="1.0"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><fonts count="2"><font/><font><b/></font></fonts><fills count="1"><fill><patternFill patternType="none"/></fill></fills><borders count="1"><border/></borders><cellStyleXfs count="1"><xf/></cellStyleXfs><cellXfs count="2"><xf fontId="0" fillId="0" borderId="0" xfId="0"/><xf fontId="1" fillId="0" borderId="0" xfId="0" applyFont="1"/></cellXfs></styleSheet>`),{name:`xl/worksheets/sheet1.xml`,chunks:t}],e.writable)}async function*_s(e,t){let n=Os(e.length);yield bs(`<?xml version="1.0"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><sheetViews><sheetView workbookViewId="0"><pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/></sheetView></sheetViews><sheetData><row r="1">`),yield bs(e.map((e,t)=>As(`${Os(t+1)}1`,e,1)).join(``)),yield bs(`</row>`);let r=1;for await(let e of t){if(++r>1000001)throw RangeError(`A worksheet cannot exceed 1,000,000 data rows`);yield bs(`<row r="${r}">${e.values.map((e,t)=>As(`${Os(t+1)}${r}`,e,0)).join(``)}</row>`)}yield bs(`</sheetData><autoFilter ref="A1:${n}1"/></worksheet>`)}async function*vs(e,t=64*1024){let n=[],r=0,i=()=>{let e=new Uint8Array(r),t=0;for(let r of n)e.set(r,t),t+=r.length;return n=[],r=0,e};for await(let a of e){if(a.length>=t){r&&(yield i()),yield a;continue}r+a.length>t&&r&&(yield i()),n.push(a),r+=a.length}r&&(yield i())}async function ys(e,t){let n=new hs(t);try{for(let t of e){let e=n.entry(t.name);for await(let n of t.chunks)await e.write(n);await e.close()}await n.close()}catch(e){throw await n.abort(e),e}}var bs=e=>fs.encode(e),xs=(e,t)=>({name:e,chunks:(async function*(){yield bs(t)})()}),Ss=e=>Es(30,e,t=>{t.setUint32(0,67324752,!0),t.setUint16(4,20,!0),t.setUint16(6,8,!0),t.setUint16(26,e.length,!0)}),Cs=(e,t)=>{let n=new Uint8Array(16),r=new DataView(n.buffer);return r.setUint32(0,134695760,!0),r.setUint32(4,e,!0),r.setUint32(8,t,!0),r.setUint32(12,t,!0),n},ws=e=>Es(46,bs(e.name),t=>{t.setUint32(0,33639248,!0),t.setUint16(4,20,!0),t.setUint16(6,20,!0),t.setUint16(8,8,!0),t.setUint32(16,e.crc,!0),t.setUint32(20,e.size,!0),t.setUint32(24,e.size,!0),t.setUint16(28,bs(e.name).length,!0),t.setUint32(42,e.offset,!0)}),Ts=(e,t,n)=>{let r=new Uint8Array(22),i=new DataView(r.buffer);return i.setUint32(0,101010256,!0),i.setUint16(8,e,!0),i.setUint16(10,e,!0),i.setUint32(12,t,!0),i.setUint32(16,n,!0),r},Es=(e,t,n)=>{let r=new Uint8Array(e+t.length);return n(new DataView(r.buffer)),r.set(t,e),r},Ds=(e,t)=>{for(let n of e)t=(ms[(t^n)&255]??0)^t>>>8;return t>>>0},Os=e=>{let t=``;for(;e;)e--,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t},ks=e=>String(e??``).replace(/[&<>"']/g,e=>({"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&apos;`})[e]??e),As=(e,t,n)=>typeof t==`number`?`<c r="${e}" s="${n}"><v>${t}</v></c>`:`<c r="${e}" s="${n}" t="inlineStr"><is><t>${ks(t)}</t></is></c>`;async function js(e){let t=e.maxRowsPerFile??1e6;if(!Number.isSafeInteger(t)||t<1||t>1e6)throw TypeError(`maxRowsPerFile must be from 1 through 1,000,000`);let n=Math.max(1,Math.ceil(e.snapshot.totalRows/t)),r=Ms(e.snapshot.pages())[Symbol.asyncIterator](),i=1,a=0,o=-1,s=async()=>{let s=i++,c=0;await gs({headers:e.headers,rows:(async function*(){for(;c<t&&a<e.snapshot.totalRows;){let n=await r.next();if(n.done)throw RangeError(`Snapshot ended before totalRows`);c+=1,a+=1,yield{values:e.headers.map(e=>n.value[e])};let i=Math.floor(a/e.snapshot.totalRows*100);(i!==o||a===e.snapshot.totalRows||c===t)&&(o=i,e.progress?.({processed:a,total:e.snapshot.totalRows,percent:i,part:s}))}})(),writable:e.writable(s,n)})};if(e.snapshot.totalRows===0){await s(),e.progress?.({processed:0,total:0,percent:100,part:1});return}for(;a<e.snapshot.totalRows;)await s();if(!(await r.next()).done)throw RangeError(`Snapshot exceeded totalRows`)}async function*Ms(e){for await(let t of e)for(let e of t)yield e}var Ns=!1,Ps=0;async function Fs(e,t){let n=globalThis.showSaveFilePicker;if(n===void 0)throw Error(`Seu navegador não suporta salvar o arquivo de exportação.`);let r=e?`.zip`:`.xlsx`;return n({id:`zaip_export_${Date.now().toString(36).slice(-8)}_${(Ps++%1679616).toString(36).padStart(4,`0`)}`,startIn:`downloads`,suggestedName:`${t}${r}`,types:[{description:e?`Arquivo ZIP`:`Pasta de trabalho Excel`,accept:{[e?`application/zip`:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`]:[r]}}]})}function Is(e,t=new Date){let n=Object.fromEntries(new Intl.DateTimeFormat(`en-CA`,{timeZone:`America/Sao_Paulo`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}).formatToParts(t).filter(e=>e.type!==`literal`).map(e=>[e.type,e.value]));return`${`${n.year}-${n.month}-${n.day}-${n.hour}-${n.minute}`}-${e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/[^a-z0-9]+/gi,`-`).replace(/^-|-$/g,``).toLowerCase()||`export`}`}function Ls(e,t,n=new Date){return`${Is(e,n)}-part-${t}.xlsx`}function Rs(e){let t=e.createWritable().then(e=>e.getWriter());return{get ready(){return t.then(e=>e.ready)},async write(e){await(await t).write(e.slice().buffer)},async close(){await(await t).close()},async abort(e){await(await t).abort(e)}}}function zs(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}var Bs=class{state={status:`idle`,progress:0,error:null,message:null,completedFiles:[]};listeners=new Set;subscribe(e){return this.listeners.add(e),e(this.state),()=>this.listeners.delete(e)}setState(e){this.state=e;for(let t of this.listeners)t(e)}async start(e){if(Ns||this.state.status===`running`)throw Error(`An export is already running`);Ns=!0;let t=!1,n=new Date,r=Is(e.view,n),i=[];try{let a=e.snapshot.totalRows>1e6,o=await Fs(a,r),s=Rs(o);t=!0,this.setState({status:`running`,progress:0,error:null,message:`Mantenha a página aberta enquanto a exportação é concluída.`,completedFiles:i});let c=a?new hs(s):void 0;await js({snapshot:e.snapshot,headers:e.headers,writable:t=>{let r=Ls(e.view,t,n),i=c?.entry(r)??s;return{...i,async close(){await i.close()}}},progress:({percent:e})=>{this.setState({...this.state,progress:Math.max(this.state.progress,e)})}}),c!==void 0&&await c.close(),i.push(o.name),Ns=!1,this.setState({...this.state,status:`completed`,progress:100,message:null})}catch(e){throw t?this.setState({...this.state,status:`failed`,error:e instanceof Error?e.message:String(e),message:null}):zs(e)||this.setState({...this.state,status:`failed`,error:e instanceof Error?e.message:String(e)}),e}finally{Ns=!1}}},Vs=4e3;function Hs(e){return e.map(e=>Object.fromEntries(Object.entries(e).map(([e,t])=>{let n=Us(e);return n===null?[e,typeof t==`object`&&t?JSON.stringify(t):t]:[n,typeof t==`number`?t/36e5:t]})))}function Us(e){return e===`durationMs`?`durationHours`:e.endsWith(`DurationMs`)?`${e.slice(0,-2)}Hours`:e===`duration_ms`?`duration_hours`:e.endsWith(`_duration_ms`)?`${e.slice(0,-2)}hours`:null}function Ws({filters:e,rows:t,view:n}){let r=(0,l.useRef)(null);r.current===null&&(r.current=new Bs);let[i,a]=(0,l.useState)(r.current.state),[o,s]=(0,l.useState)(!1);(0,l.useEffect)(()=>r.current?.subscribe(a),[]),(0,l.useEffect)(()=>{if(i.status!==`completed`){s(!1);return}s(!0);let e=setTimeout(()=>s(!1),Vs);return()=>clearTimeout(e)},[i.status]);let c=[],u=new Set;for(let e of t)for(let t of Object.keys(e)){let e=Us(t)??t;u.has(e)||(u.add(e),c.push(e))}return c.length===0&&c.push(`result`),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`button`,{"aria-label":`Exportar Excel`,className:`excel-export-action`,disabled:i.status===`running`,onClick:()=>{let i=Oo({id:globalThis.crypto?.randomUUID?.()??`export-${Date.now()}`,createdAt:new Date().toISOString(),view:n,filters:e,totalRows:t.length,pages:async function*(){for(let e=0;e<t.length;e+=500)yield Hs(t.slice(e,e+500))}});r.current?.start({snapshot:i,headers:c,view:n}).catch(()=>void 0)},type:`button`,children:[(0,y.jsx)(Ko,{"aria-hidden":`true`,size:16}),`Exportar Excel`]}),i.status===`running`?(0,y.jsx)(us,{progress:i.progress}):null,o?(0,y.jsx)(ds,{}):null,i.status===`failed`?(0,y.jsxs)(`p`,{role:`alert`,children:[`Falha ao exportar: `,i.error]}):null]})}var Gs=1e3,Ks=60*Gs,qs=60*Ks,Js=24*qs,Ys=7*Js,Xs=30*Js,Zs=6*qs,Qs=new Set([`completed`,`blocked`,`failed`,`cancelled`]);function $s(e,t,n,r=Date.now()){if(e===null||Qs.has(t))return null;let i=Date.parse(e);if(!Number.isFinite(i))return null;let a=Math.max(0,r-i),o=t===`executing`||t===`verifying`;return{label:ec(a,o,n),alert:o&&a>Zs}}function ec(e,t,n){let r=n===`pt-BR`?`Há`:`Ago`,i=tc(e,t,n);return n===`pt-BR`?`${r} ${i}`:`${i} ${r}`}function tc(e,t,n){let r=Math.max(1,Math.round(e/Gs));if(r<60)return`${r} seg`;let i=Math.round(e/Ks);if(i<60)return`${i} min`;let a=Math.round(e/qs);if(a<24)return`${a} h`;let o=Math.round(e/Js);if(t||o<7)return`${o} d`;let s=Math.round(e/Ys);if(s<4)return n===`pt-BR`?`${s} sem`:`${s} w`;let c=Math.max(1,Math.round(e/Xs));return n===`pt-BR`?c===1?`1 mês`:`${c} meses`:`${c} mo`}function nc(e,t){return rc(e,t,t===`pt-BR`?`Criada`:`Created`)}function rc(e,t,n){let r=new Date(e);return Number.isNaN(r.getTime())?``:`${n} · ${new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`medium`}).format(r)}`}function ic(e,t=`pt-BR`){return e>=36e5?`${Math.round(e/36e5)} h`:e>=6e4?`${Math.round(e/6e4)} min`:`${Math.round(e/1e3)} ${t===`pt-BR`?`seg`:`sec`}`}function ac(e){return ic(e)}function oc(e,t){return e.filter(e=>e.kind===`spec`&&e.parent_id===t)}function sc(e,t,n){let r=new Map(t.map(e=>[e.id,e])),i=new Map(e.planned_tasks.map(e=>[e.id,e]));return[...new Set([...e.planned_tasks.map(e=>e.id),...e.task_ids])].map(e=>({id:e,task:r.get(e)??null,preview:i.get(e)??null,usage:n.get(e)}))}var cc={durationMs:null,tokens:null,costBrl:null};function lc(e){return{durationMs:e.duration_ms,tokens:e.usage.total.coverage.tokens>0?e.usage.total.tokens.total:null,costBrl:e.usage.total.coverage.brl>0?e.usage.total.cost.brl:null}}function uc({locale:e,usage:t}){return(0,y.jsx)(`dl`,{className:`operations-macro-usage-strip`,children:[{icon:(0,y.jsx)(Uo,{size:17}),label:e===`pt-BR`?`Tempo total`:`Total time`,value:t.durationMs===null?`—`:ic(t.durationMs,e)},{icon:(0,y.jsx)(ls,{size:17}),label:`Tokens`,value:M(t.tokens,e)},{icon:(0,y.jsx)(Wo,{size:17}),label:e===`pt-BR`?`Custo`:`Cost`,value:P(t.costBrl,`BRL`,e)}].map(e=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),(0,y.jsx)(`dt`,{children:e.label}),(0,y.jsx)(`dd`,{children:e.value})]},e.label))})}function dc({locale:e,usage:t}){let n=[t.durationMs===null?`—`:ic(t.durationMs,e),M(t.tokens,e),P(t.costBrl,`BRL`,e)];return(0,y.jsx)(`dl`,{className:`operations-macro-mini-usage`,children:(e===`pt-BR`?[`Tempo`,`Tokens`,`Custo`]:[`Time`,`Tokens`,`Cost`]).map((e,t)=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`dt`,{children:e}),(0,y.jsx)(`dd`,{children:n[t]})]},e))})}var fc={"en-US":{draft:`Definition (PRD + Requirements)`,planned:`Planned (SPEC + Changes)`,executing:`Executing (Tasks)`,verifying:`Verifying (Tests + Review)`,completed:`Completed`,blocked:`Blocked`,failed:`Failed`,cancelled:`Cancelled`},"pt-BR":{draft:`Definição (PRD + Requisitos)`,planned:`Planejamento (SPEC + Mudanças)`,executing:`Execução (Tarefas)`,verifying:`Verificação (Testes + Revisão)`,completed:`Concluído`,blocked:`Bloqueado`,failed:`Falhado`,cancelled:`Cancelado`}};function pc(e,t){return fc[t][e]}function mc(e,t){return t===`en-US`?e===`lite`?`Lite`:e===`standard`?`Standard`:`Critical`:e===`lite`?`Leve`:e===`standard`?`Padrão`:`Crítico`}var hc=[`task`,`spec`,`prd`];function gc(e,t){return t.find(t=>t.id===e.change_id)?.source.type??(e.spec_id===null?`task`:`spec`)}function _c(e){return e===`task`?`Task-first`:e===`spec`?`SPEC`:`PRD`}function vc(e,t,n){return t===``||gc(e,n)===t}function yc(){let[e,t]=(0,l.useState)(()=>Date.now());return(0,l.useEffect)(()=>{let e=window.setInterval(()=>t(Date.now()),1e3);return()=>window.clearInterval(e)},[]),e}function bc(e){let[t,n]=(0,l.useState)(10),r=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let i=r.current;if(i===null||t>=e)return;let a=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&n(t=>Math.min(e,t+10))},{rootMargin:`320px 0px`});return a.observe(i),()=>a.disconnect()},[e,t]),{hasMore:t<e,sentinelRef:r,visibleCount:Math.min(t,e)}}function xc(e,t=[]){if(e.length===0)return new Map(t.flatMap(e=>e.telemetry===null||e.telemetry===void 0?[]:[[e.id,{durationMs:e.telemetry.duration_ms,tokens:e.telemetry.tokens,costBrl:e.telemetry.cost_brl}]]));let n=new Map;for(let t of e){if(t.task_id===null)continue;let e=n.get(t.task_id)??{durationMs:null,tokens:null,costBrl:null};n.set(t.task_id,{durationMs:Sc(e.durationMs,t.phase===`execution`&&t.parent_run_id==null?ae(t):null),tokens:Sc(e.tokens,t.usage.total.tokens.total),costBrl:Sc(e.costBrl,t.usage.total.cost.brl)})}return n}function Sc(e,t){return e===null&&t===null?null:(e??0)+(t??0)}var Cc=[`definition`,`planning`,`ready`,`executing`,`verifying`,`completed`,`blocked`,`cancelled`,`failed`];function wc(e,t){return t===`task`?e.kind===`task`:t===`standalone-task`?e.kind===`task`&&e.row.spec_id===null:t===`all`||e.kind===t}function Tc(e,t,n){let r=e.kind===`prd`?t.filter(t=>t.parent_id===e.id):[],i=new Set(r.map(e=>e.id)),a=new Set(e.task_ids);if(e.kind===`spec`)for(let t of n)t.spec_id===e.id&&a.add(t.id);else{for(let e of r)for(let t of e.task_ids)a.add(t);for(let e of n)e.spec_id!==null&&i.has(e.spec_id)&&a.add(e.id)}let o=n.filter(e=>a.has(e.id));return{completedSpecs:r.filter(Dc).length,totalSpecs:r.length,completedTasks:o.filter(e=>e.status===`completed`).length,totalTasks:Math.max(o.length,e.planned_tasks.length)}}function Ec(e,t){let n=`Tasks ${t.completedTasks}/${t.totalTasks}`;return e===`prd`?`SPECs ${t.completedSpecs}/${t.totalSpecs} · ${n}`:n}function Dc(e){return e.lifecycle_status===`delivered`||e.work_status===`completed`}function Oc(e,t){return{"pt-BR":{definition:`Definição (PRD + Requisitos)`,planning:`Planejamento (SPEC + Change)`,ready:`Pronto para Executar`,executing:`Execução`,verifying:`Verificação`,completed:`Concluído`,blocked:`Bloqueado`,cancelled:`Cancelado`,failed:`Falhado`},"en-US":{definition:`Definition (PRDs)`,planning:`Planning`,ready:`Ready to Execute`,executing:`Executing`,verifying:`Verifying`,completed:`Completed`,blocked:`Blocked`,cancelled:`Cancelled`,failed:`Failed`}}[t][e]}function kc(e){return e.status===`completed`?`completed`:e.status===`cancelled`?`cancelled`:e.status===`failed`?`failed`:e.status===`blocked`?`blocked`:e.is_active===!0||e.status===`executing`?`executing`:e.status===`verifying`?`verifying`:(e.attempt_count??0)>0||e.started_at!=null||e.execution_started===!0?`executing`:e.status===`planned`?`ready`:null}function Ac(e,t){if(e.lifecycle_status===`cancelled`)return`cancelled`;if(e.lifecycle_status===`failed`)return`failed`;if(e.lifecycle_status===`blocked`)return`blocked`;if(e.lifecycle_status===`delivered`||e.lifecycle_status===`completed`)return`completed`;if(e.lifecycle_status===`ready`)return`ready`;if(e.kind===`prd`&&e.lifecycle_status===`draft`)return`definition`;if(e.kind===`spec`&&e.lifecycle_status===`draft`)return`planning`;if(e.work_status===`cancelled`)return`cancelled`;if(e.work_status===`failed`)return`failed`;if(e.work_status===`blocked`)return`blocked`;if(e.work_status===`completed`)return`completed`;if(e.is_active||t.some(t=>e.task_ids.includes(t.id)&&t.is_active))return`executing`;if(e.lifecycle_status===`verifying`||e.work_status===`verifying`)return`verifying`;if(e.work_status===`executing`){let n=t.filter(t=>e.task_ids.includes(t.id));return n.some(e=>e.status===`verifying`)&&n.every(e=>e.status===`verifying`||e.status===`completed`)?`verifying`:`executing`}return e.lifecycle_status===`active`?`executing`:`planning`}function jc({label:e,locale:t,onClose:n,onOpenDocument:r,onOpenTrace:i,row:a,runs:o,specs:s,tasks:c}){let u=(0,l.useRef)(null),d=(0,l.useRef)(null),[f,p]=(0,l.useState)(e===`SPEC`?a:null),m=(0,l.useMemo)(()=>oc(s,a.id),[a.id,s]),h=(0,l.useMemo)(()=>xc(o),[o]);(0,l.useEffect)(()=>{let e=u.current;if(e!==null)return e.open||e.showModal(),()=>{e.open&&e.close()}},[]);let g=e=>{d.current?.scrollTo({top:0}),p(e)},_=e===`PRD`&&f===null,v=f??a,b=sc(v,c,h);return(0,y.jsx)(`dialog`,{className:`operations-status-dialog-backdrop operations-macro-dialog-backdrop`,onCancel:e=>{e.preventDefault(),n()},onMouseDown:e=>{e.currentTarget===e.target&&n()},ref:u,children:(0,y.jsxs)(`section`,{"aria-label":`${t===`pt-BR`?`Detalhes do`:`Details for`} ${e}`,"aria-modal":`true`,className:`operations-macro-planning-dialog`,"data-kind":_?`prd`:`spec`,role:`dialog`,children:[(0,y.jsxs)(`header`,{className:`operations-macro-dialog-header`,children:[(0,y.jsxs)(`div`,{className:`operations-macro-heading`,children:[(0,y.jsx)(`span`,{className:`operations-macro-heading-icon`,"aria-hidden":`true`,children:_?(0,y.jsx)($o,{size:23}):(0,y.jsx)(Jo,{size:23})}),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`operations-macro-kicker`,children:[(0,y.jsx)(`span`,{children:_?`PRD`:`SPEC`}),(0,y.jsx)(`i`,{}),(0,y.jsx)(`span`,{children:Oc(Ac(v,c),t)})]}),(0,y.jsx)(`h2`,{children:v.title}),(0,y.jsx)(`p`,{title:v.id,children:v.id})]})]}),r?(0,y.jsxs)(`button`,{className:`operations-macro-document-open`,onClick:()=>{n(),r(v.kind,v.id)},type:`button`,children:[(0,y.jsx)(Xo,{"aria-hidden":`true`,size:16}),t===`pt-BR`?`Ler ${_?`PRD`:`SPEC`} completa`:`Read full ${_?`PRD`:`SPEC`}`]}):null,(0,y.jsx)(`button`,{"aria-label":t===`pt-BR`?`Fechar`:`Close`,className:`operations-macro-close`,onClick:n,type:`button`,children:(0,y.jsx)(cs,{"aria-hidden":`true`,size:20})})]}),(0,y.jsxs)(`div`,{className:`operations-macro-dialog-scroll`,ref:d,children:[e===`PRD`&&f!==null?(0,y.jsxs)(`button`,{className:`operations-macro-back`,onClick:()=>g(null),type:`button`,children:[(0,y.jsx)(Po,{"aria-hidden":`true`,size:16}),(0,y.jsxs)(`span`,{children:[t===`pt-BR`?`Voltar ao PRD`:`Back to PRD`,(0,y.jsx)(`small`,{children:a.title})]})]}):null,(0,y.jsx)(uc,{locale:t,usage:lc(v)}),(0,y.jsx)(Mc,{locale:t,row:v}),_?(0,y.jsx)(Pc,{locale:t,onSelectSpec:g,specs:m,tasks:c}):(0,y.jsx)(Fc,{locale:t,onOpenTrace:i,row:v,tasks:b,...e===`PRD`?{parentPrd:a}:{}})]})]})})}function Mc({locale:e,row:t}){return(0,y.jsx)(`dl`,{className:`operations-macro-overview-cards`,children:[{icon:(0,y.jsx)(ns,{size:17}),label:`Tasks`,value:t.task_count},{icon:(0,y.jsx)(is,{size:17}),label:`Runs`,value:t.run_count},{icon:(0,y.jsx)(Qo,{size:17}),label:e===`pt-BR`?`Execuções`:`Executions`,value:t.execution_count},{icon:(0,y.jsx)(Bo,{size:17}),label:e===`pt-BR`?`Estado`:`State`,value:Nc(t.lifecycle_status,e)}].map(e=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),(0,y.jsx)(`dt`,{children:e.label}),(0,y.jsx)(`dd`,{children:e.value})]},e.label))})}function Nc(e,t){return{"pt-BR":{draft:`Rascunho`,planned:`Planejado`,ready:`Pronto`,active:`Ativo`,executing:`Em execução`,verifying:`Em verificação`,delivered:`Entregue`,completed:`Concluído`,blocked:`Bloqueado`,failed:`Falhado`,cancelled:`Cancelado`},"en-US":{draft:`Draft`,planned:`Planned`,ready:`Ready`,active:`Active`,executing:`Executing`,verifying:`Verifying`,delivered:`Delivered`,completed:`Completed`,blocked:`Blocked`,failed:`Failed`,cancelled:`Cancelled`}}[t][e]??e}function Pc({locale:e,onSelectSpec:t,specs:n,tasks:r}){return(0,y.jsxs)(`section`,{className:`operations-macro-section operations-prd-specs`,children:[(0,y.jsx)(Ic,{count:n.length,description:e===`pt-BR`?`Selecione uma SPEC para ver suas Tasks e abrir a rastreabilidade completa.`:`Select a SPEC to see its Tasks and open the complete trace.`,icon:(0,y.jsx)(Lo,{size:19}),title:e===`pt-BR`?`SPECs deste PRD`:`SPECs in this PRD`}),n.length>0?(0,y.jsx)(`div`,{className:`operations-prd-spec-grid`,children:n.map((n,i)=>(0,y.jsxs)(`button`,{onClick:()=>t(n),type:`button`,children:[(0,y.jsx)(`span`,{className:`operations-prd-spec-index`,children:String(i+1).padStart(2,`0`)}),(0,y.jsxs)(`div`,{className:`operations-prd-spec-copy`,children:[(0,y.jsx)(`span`,{children:Oc(Ac(n,r),e)}),(0,y.jsx)(`strong`,{children:n.title}),(0,y.jsx)(`code`,{title:n.id,children:n.id})]}),(0,y.jsx)(dc,{locale:e,usage:lc(n)}),(0,y.jsxs)(`span`,{className:`operations-prd-spec-action`,children:[(0,y.jsxs)(`small`,{children:[Math.max(n.task_count,n.planned_tasks.length),` Tasks`]}),(0,y.jsx)(Fo,{"aria-hidden":`true`,size:18})]})]},n.id))}):(0,y.jsx)(Lc,{text:e===`pt-BR`?`Este PRD ainda não possui SPEC vinculada.`:`This PRD does not have a linked SPEC yet.`})]})}function Fc({locale:e,onOpenTrace:t,parentPrd:n,row:r,tasks:i}){return(0,y.jsxs)(y.Fragment,{children:[n?(0,y.jsxs)(`div`,{className:`operations-spec-parent`,children:[(0,y.jsx)($o,{"aria-hidden":`true`,size:16}),(0,y.jsx)(`span`,{children:e===`pt-BR`?`Parte do PRD`:`Part of PRD`}),(0,y.jsx)(`strong`,{children:n.title})]}):null,(0,y.jsxs)(`section`,{className:`operations-macro-section operations-spec-tasks`,children:[(0,y.jsx)(Ic,{count:i.length,description:e===`pt-BR`?`Cada Task mantém sua telemetria e leva ao Trace completo do ciclo.`:`Each Task preserves its telemetry and opens the full lifecycle trace.`,icon:(0,y.jsx)(is,{size:19}),title:e===`pt-BR`?`Fluxo de Tasks`:`Task flow`}),i.length>0?(0,y.jsx)(`div`,{className:`operations-spec-task-list`,children:i.map(({id:n,preview:r,task:i,usage:a},o)=>(0,y.jsxs)(`button`,{disabled:i===null,onClick:()=>{i!==null&&t(n)},type:`button`,children:[(0,y.jsxs)(`span`,{className:`operations-spec-task-sequence`,children:[(0,y.jsx)(`i`,{}),String(o+1).padStart(2,`0`)]}),(0,y.jsxs)(`div`,{className:`operations-spec-task-copy`,children:[(0,y.jsx)(`span`,{children:i?pc(i.status,e):e===`pt-BR`?`Planejada`:`Planned`}),(0,y.jsx)(`strong`,{children:i?.title??r?.title??n}),i===null&&r?.objective?(0,y.jsx)(`small`,{children:r.objective}):null,(0,y.jsx)(`code`,{title:n,children:n})]}),(0,y.jsx)(dc,{locale:e,usage:a??cc}),(0,y.jsxs)(`span`,{className:`operations-spec-task-action`,children:[i?e===`pt-BR`?`Abrir Trace`:`Open Trace`:e===`pt-BR`?`Materializa ao finalizar`:`Materializes when finalized`,i?(0,y.jsx)(Fo,{"aria-hidden":`true`,size:17}):null]})]},n))}):(0,y.jsx)(Lc,{text:e===`pt-BR`?`Esta SPEC ainda não possui Task materializada.`:`This SPEC does not have a materialized Task yet.`})]}),(0,y.jsxs)(`div`,{className:`operations-macro-document`,children:[(0,y.jsx)(Xo,{"aria-hidden":`true`,size:17}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:e===`pt-BR`?`Documento registrado`:`Registered document`}),(0,y.jsx)(`code`,{title:r.artifact_path,children:r.artifact_path})]})]})]})}function Ic({count:e,description:t,icon:n,title:r}){return(0,y.jsxs)(`header`,{className:`operations-macro-section-heading`,children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,children:n}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`h3`,{children:r}),(0,y.jsx)(`p`,{children:t})]}),(0,y.jsx)(`strong`,{children:e})]})}function Lc({text:e}){return(0,y.jsxs)(`div`,{className:`operations-macro-empty`,children:[(0,y.jsx)(Jo,{"aria-hidden":`true`,size:21}),(0,y.jsx)(`p`,{children:e})]})}function Rc(e,t=new Date){let n=e.reduce((e,t)=>Math.min(e,Date.parse(t.created_at)),1/0),r=Number.isFinite(n)?new Date(n):t;return r.setUTCDate(r.getUTCDate()-1),{start:Jc(r),end:Jc(t)}}function zc(e,t=new Date){let n=Wc(t),r=Wc(t);if(e===`yesterday`)return r=Gc(n,-1),Uc(r,r);if(e===`this-week`)return Uc(Gc(n,-qc(n)),n);if(e===`last-week`){let e=Gc(n,-qc(n));return Uc(Gc(e,-7),Gc(e,-1))}return e===`this-month`?Uc(new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1,12)),n):e===`last-month`?Uc(new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth()-1,1,12)),new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),0,12))):e===`last-3-months`?Uc(Kc(n,-3),n):e===`last-6-months`?Uc(Kc(n,-6),n):e===`this-year`?Uc(new Date(Date.UTC(n.getUTCFullYear(),0,1,12)),n):e===`last-year`?Uc(new Date(Date.UTC(n.getUTCFullYear()-1,0,1,12)),new Date(Date.UTC(n.getUTCFullYear()-1,11,31,12))):Uc(n,n)}function Bc(e,t,n){return Vc(e??n,t)}function Vc(e,t){if(e==null)return!1;let n=g(e,`day`);return n!==null&&n>=t.start&&n<=t.end}function Hc(e,t,n){return t===`all`||Vc(e,n)}function Uc(e,t){return{start:Jc(e),end:Jc(t)}}function Wc(e){let t=g(e.toISOString(),`day`);if(t===null)throw RangeError(`Invalid Operations date anchor`);return new Date(`${t}T12:00:00.000Z`)}function Gc(e,t){let n=new Date(e);return n.setUTCDate(n.getUTCDate()+t),n}function Kc(e,t){let n=e.getUTCDate(),r=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1,12)),i=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()+1,0,12)).getUTCDate();return r.setUTCDate(Math.min(n,i)),r}function qc(e){return(e.getUTCDay()+6)%7}function Jc(e){let t=g(e.toISOString(),`day`);if(t===null)throw RangeError(`Invalid Operations date value`);return t}var Yc={"pt-BR":{all:`Todo o Período`,custom:`Personalizado`,today:`Hoje`,yesterday:`Ontem`,"this-week":`Esta Semana`,"last-week":`Semana Passada`,"this-month":`Este Mês`,"last-month":`Mês Passado`,"last-3-months":`Últimos 3 meses`,"last-6-months":`Últimos 6 meses`,"this-year":`Este Ano`,"last-year":`Último ano`},"en-US":{all:`All Time`,custom:`Custom`,today:`Today`,yesterday:`Yesterday`,"this-week":`This Week`,"last-week":`Last Week`,"this-month":`This Month`,"last-month":`Last Month`,"last-3-months":`Last 3 months`,"last-6-months":`Last 6 months`,"this-year":`This Year`,"last-year":`Last year`}},Xc=Object.keys(Yc[`pt-BR`]);function Zc(e,t){return e===`all`?{disabled:!0,start:``,end:``}:{disabled:!1,start:t.start,end:t.end}}function Qc({ariaLabelSuffix:e=``,dateRange:t,defaultDateRange:n,locale:r,onDateRangeChange:i,onPresetChange:a,preset:o}){let s=Zc(o,t);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`label`,{className:`operations-toolbar-field operations-date-field`,children:[(0,y.jsx)(`span`,{children:r===`pt-BR`?`Data inicial`:`Start date`}),(0,y.jsx)(`input`,{"aria-label":`${r===`pt-BR`?`Data inicial`:`Start date`}${e}`,disabled:s.disabled,onInput:e=>{let n=e.currentTarget.value;i({start:n,end:n>t.end?n:t.end})},type:`date`,value:s.start})]}),(0,y.jsxs)(`label`,{className:`operations-toolbar-field operations-date-field`,children:[(0,y.jsx)(`span`,{children:r===`pt-BR`?`Data final`:`End date`}),(0,y.jsx)(`input`,{"aria-label":`${r===`pt-BR`?`Data final`:`End date`}${e}`,disabled:s.disabled,onInput:e=>{let n=e.currentTarget.value;i({start:n<t.start?n:t.start,end:n})},type:`date`,value:s.end})]}),(0,y.jsxs)(`label`,{className:`operations-toolbar-field operations-period-field`,children:[(0,y.jsx)(`span`,{children:r===`pt-BR`?`Período`:`Period`}),(0,y.jsx)(`select`,{"aria-label":`${r===`pt-BR`?`Período`:`Period`}${e}`,onChange:e=>{let r=e.target.value;if(r===`all`){a(r,n);return}if(r===`custom`){a(r,t);return}a(r,zc(r))},value:o,children:Xc.map(e=>(0,y.jsx)(`option`,{value:e,children:Yc[r][e]},e))})]})]})}function $c({locale:e}){return e===`pt-BR`?(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`operations-locale-flag`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`rect`,{fill:`#18864b`,height:`24`,rx:`5`,width:`24`}),(0,y.jsx)(`path`,{d:`m12 3.8 8.2 8.2L12 20.2 3.8 12 12 3.8Z`,fill:`#f6d64a`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,fill:`#1b4f9c`,r:`4.2`}),(0,y.jsx)(`path`,{d:`M8.8 11.2c1.9-1 4.5-1 6.4 0`,fill:`none`,stroke:`#fff`,strokeWidth:`.8`})]}):(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`operations-locale-flag`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`rect`,{fill:`#fff`,height:`24`,rx:`5`,width:`24`}),(0,y.jsx)(`path`,{d:`M0 3h24v3H0Zm0 6h24v3H0Zm0 6h24v3H0Z`,fill:`#bd3d44`}),(0,y.jsx)(`path`,{d:`M0 0h11v11H0Z`,fill:`#192f6b`})]})}function el(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,className:`operations-nav-svg`,fill:`none`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{d:`M20 11a8.1 8.1 0 1 0 2 5.3M20 4v7h-7`})})}function tl(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,className:`operations-nav-svg`,fill:`none`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{d:`M4 6h16M7 12h10m-7 6h4`})})}function nl(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,className:`operations-nav-svg operations-locale-chevron`,fill:`none`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{d:`m6 9 6 6 6-6`})})}function rl(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,className:`operations-reset-icon`,fill:`none`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{d:`M3 12a9 9 0 1 0 3-6.7M3 4v6h6`})})}function il(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,fill:`none`,viewBox:`0 0 20 20`,children:(0,y.jsx)(`path`,{d:`m6 6 8 8M14 6l-8 8`})})}function al(e){let t=new Map;for(let n of e)t.has(n.id)||t.set(n.id,n);return[...t.values()].filter(e=>(e.phase===void 0||e.phase===`execution`)&&(e.parent_run_id===null||e.parent_run_id===void 0||!t.has(e.parent_run_id)))}function ol(e){let t=new Map;for(let n of e)t.has(n.id)||t.set(n.id,n);return[...t.values()]}function sl(e){return e!==null&&e>=0?e:null}function cl(e){return sl(e.source_duration_ms??null)}function ll(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)}function ul(e){let t=al(e);return{runs:t,durationMs:ll(t.map(cl)),tokens:ll(t.map(e=>e.usage.total.tokens.total)),costBrl:ll(t.map(e=>e.usage.total.cost.brl))}}function dl(e){let t=ol(e);return{runs:t,durationMs:ll(t.map(cl)),tokens:ll(t.map(e=>e.usage.total.tokens.total)),costBrl:ll(t.map(e=>e.usage.total.cost.brl))}}function fl(e){return h(e,cl)}function pl(e){let t=dl(e);return{runs:t.runs,tokens:t.tokens,costBrl:t.costBrl}}var ml={definition:`#a78bfa`,planning:`#3f6fbd`,ready:`#38bdf8`,executing:`#fbbf24`,verifying:`#f87171`,completed:`#34d399`,blocked:`#64748b`,cancelled:`#64748b`,failed:`#64748b`},hl={lite:`#60a5fa`,standard:`#fbbf24`,critical:`#f87171`},gl={empty:`#60a5fa`,structured:`#fbbf24`,rework:`#f87171`};function _l(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)/t.length}function vl(e){let t=null;for(let n of e){if(n.created_at===null)continue;let e=Date.parse(n.created_at);Number.isNaN(e)||(t===null||e>t.timestamp)&&(t={value:n.created_at,timestamp:e})}return t?.value??null}function yl(e,t,n){let r=new Map(e.map(e=>[e.id,{id:e.id,title:e.title,durationMs:e.telemetry?.duration_ms??null,tokens:e.telemetry?.tokens??null,costBrl:e.telemetry?.cost_brl??null,runCount:e.telemetry===null||e.telemetry===void 0?0:1}]));if(t.length===0)return[...r.values()];for(let e of r.values())e.durationMs=null,e.tokens=null,e.costBrl=null,e.runCount=0;for(let e of al(t)){if(e.task_id===null)continue;let t=r.get(e.task_id);if(t===void 0)continue;t.runCount+=1;let n=sl(e.duration_ms);n!==null&&(t.durationMs=(t.durationMs??0)+n)}for(let e of ol(t)){if(e.task_id===null)continue;let t=r.get(e.task_id);if(t===void 0)continue;e.usage.total.tokens.total!==null&&(t.tokens=(t.tokens??0)+e.usage.total.tokens.total);let i=n?n(e.id):e.usage.total.cost.brl;i!==null&&(t.costBrl=(t.costBrl??0)+i)}return[...r.values()]}function bl(e,t,n){return e.map(e=>{if(t.length===0)return{id:e.id,title:e.title,durationMs:e.duration_ms??null,tokens:e.usage?.total.tokens.total??null,costBrl:e.usage?.total.cost.brl??null,runCount:e.run_count??0};let r=new Set(e.run_ids),i=t=>r.has(t.id)||(e.kind===`spec`?t.spec_id===e.id:t.prd_id===e.id),a=al(t).filter(i),o=ol(t).filter(i);return{id:e.id,title:e.title,durationMs:ll(a.map(e=>e.duration_ms)),tokens:ll(o.map(e=>e.usage.total.tokens.total)),costBrl:ll(o.map(e=>n?n(e.id):e.usage.total.cost.brl)),runCount:o.length}})}function xl(e,t){let n=t===`pt-BR`;return[{key:`empty`,label:n?`Sem tarefas`:`Without tasks`,color:gl.empty,count:e.filter(e=>e.task_count===0).length},{key:`structured`,label:n?`Com tarefas`:`With tasks`,color:gl.structured,count:e.filter(e=>e.task_count>0&&e.rework_run_count===0).length},{key:`rework`,label:n?`Com retrabalho`:`With rework`,color:gl.rework,count:e.filter(e=>e.rework_run_count>0).length}]}function Sl(e,t){let n=e.reduce((e,t)=>e+(t.durationMs??0),0),r=t.reduce((e,t)=>e+(t.durationMs??0),0);return{durationMs:n,durationShare:r===0?0:n/r,runCount:e.reduce((e,t)=>e+t.runCount,0),tokens:ll(e.map(e=>e.tokens)),costBrl:ll(e.map(e=>e.costBrl))}}function Cl({label:e,value:t,hint:n,featured:r=!1,onSelect:i}){let a=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{children:e}),(0,y.jsx)(`strong`,{children:t}),(0,y.jsx)(`small`,{children:n})]});return i===void 0?(0,y.jsx)(`article`,{"aria-label":`${e}: ${t}. ${n}`,className:`operations-kpi${r?` is-featured`:``}`,children:a}):(0,y.jsx)(`button`,{"aria-pressed":r,"aria-label":`${e}: ${t}. ${n}`,className:`operations-kpi is-selectable${r?` is-featured`:``}`,onClick:i,type:`button`,children:a})}function wl(e){let t=e===`pt-BR`;return{overview:t?`Visão geral`:`Overview`,tasks:t?`Tarefas`:`Tasks`,completedTasks:t?`concluídas`:`completed`,completedSpecs:t?`concluídas`:`completed`,completedPrds:t?`concluídos`:`completed`,totalExecutionTime:t?`Tempo total de execução`:`Total execution time`,totalRuns:t?`runs totais`:`total runs`,cost:t?`Custo`:`Cost`,showTerminal:t?`Mostrar canceladas, bloqueadas e falhadas`:`Show cancelled, blocked, and failed`,hideTerminal:t?`Esconder canceladas, bloqueadas e falhadas`:`Hide cancelled, blocked, and failed`,statusHint:t?`Distribuição atual do fluxo`:`Current workflow distribution`,averageTime:t?`Tempo médio`:`Average time`,averageTokens:t?`Tokens médios`:`Average tokens`,averageCost:t?`Custo médio`:`Average cost`,topHint:t?`Maiores durações acumuladas`:`Longest accumulated durations`,accumulatedTime:t?`Tempo acumulado`:`Accumulated time`,associatedRuns:t?`runs associadas`:`associated runs`,concentration:t?`Concentração`:`Concentration`,totalMeasuredTime:t?`do tempo total medido`:`of total measured time`,topFiveCost:t?`Custo do Top 5`:`Top 5 cost`,tokensUnavailable:t?`Tokens indisponíveis`:`Tokens unavailable`}}function Tl(e){let t=new Set;for(let n of e){let e=new Date(n.started_at);Number.isNaN(e.getTime())||t.add(`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`)}return t.size}function El(e,t,n,r){if(e<=0||t<=0||n<=0)return r===`pt-BR`?`Médias de execução indisponíveis`:`Execution averages unavailable`;let i=ic(e/t,r),a=ac(e/n),o=r===`pt-BR`?`${n} dias`:`${n} ${n===1?`day`:`days`}`;return r===`pt-BR`?`${i} / tarefa (${a} / dia) (${o})`:`${i} / task (${a} / day) (${o})`}function Dl(e,t){let n=t===`pt-BR`;if(e===`tasks`)return{statusTitle:n?`Status das tarefas`:`Task status`,classificationTitle:n?`Classificação de Tarefa`:`Task classification`,classificationHint:n?`Mix por criticidade`:`Criticality mix`,averageTitle:n?`Média por tarefa`:`Average per task`,averageHint:n?`Runs agregadas`:`Runs aggregated per task`,latestLabel:n?`Última tarefa criada`:`Latest task created`,topTitle:n?`Top 5 tarefas`:`Top 5 tasks`,shortPlural:`tasks`,emptyTop:n?`Nenhuma tarefa com duração registrada.`:`No task has a recorded duration.`};let r=e===`specs`,i=r?`SPEC`:`PRD`,a=r?`SPECs`:`PRDs`;return{statusTitle:n?`Status das ${a}`:`${i} status`,classificationTitle:n?`Classificação de ${i}`:`${i} classification`,classificationHint:n?`Estrutura da entrega`:`Delivery structure`,averageTitle:n?`Média por ${i}`:`Average per ${i}`,averageHint:n?`Runs agregadas por ${i}`:`Runs aggregated per ${i}`,latestLabel:n?`Última ${i} criada`:`Latest ${i} created`,topTitle:`Top 5 ${a}`,shortPlural:a,emptyTop:n?`Nenhuma ${i} com duração registrada.`:`No ${i} has a recorded duration.`}}function Ol(e,t){return new Intl.NumberFormat(t,{style:`currency`,currency:`BRL`,maximumFractionDigits:0}).format(e)}function kl(e,t,n,r){if(e===`tasks`){let e=new Set(t.map(e=>e.id));return r.filter(t=>t.task_id!==null&&e.has(t.task_id))}let i=new Set(n.map(e=>e.id)),a=new Set(n.flatMap(e=>e.run_ids));return r.filter(t=>a.has(t.id)||(e===`specs`?t.spec_id!==null&&i.has(t.spec_id):t.prd_id!==null&&i.has(t.prd_id)))}function Al({data:e,datePreset:t,locale:n,onDatePresetChange:r,onOpenTask:i,prds:a=e.prds,runs:o=e.runs,specs:s=e.specs,tasks:c=e.tasks,resolveRunCostBrl:u,includeLegacyEffort:d=!1}){let[f,p]=(0,l.useState)(`tasks`),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)(null),v=c.filter(e=>e.status===`completed`).length,b=s.filter(e=>e.work_status===`completed`).length,x=a.filter(e=>e.work_status===`completed`).length,S=c.length===0?0:v/c.length,C=s.length===0?0:b/s.length,w=a.length===0?0:x/a.length,T=Dl(f,n),E=wl(n),ee=f===`specs`?s:a,D=f===`tasks`?c.length:ee.length,O=kl(f,c,ee,o),k=f===`tasks`?yl(c,O,u):bl(ee,O,u),te=_l(k.map(e=>e.durationMs)),ne=Nl(c,n),re=Pl(ee,c,n),ie=f===`tasks`?ne:re,j=ie.reduce((e,t)=>e+t.count,0),N=Object.entries(hl).map(([e,t])=>({key:e,label:mc(e,n),color:t,count:c.filter(t=>t.risk===e).length})),L=f===`tasks`?N:xl(ee,n),R=ul(o),ae=dl(o),oe=pl(o),se=o.length===0?e.summary.overview_metrics:void 0,ce=R.runs,z=se?.duration_ms??(d?fl(o):ae.durationMs),le=se?.execution_day_count??Tl(ce),ue=se?.tokens??oe.tokens,de=u?oe.runs.reduce((e,t)=>{let n=u(t.id);return n===null?e:(e??0)+n},null):se?.cost_brl??oe.costBrl,fe=z===null||z<=0||de===null?null:de*36e5/z,pe=de===null||c.length===0?null:de/c.length,me=ue===null||c.length===0?null:ue/c.length,he=z===null||z<=0||ue===null?null:ue*36e5/z,ge=_l(k.map(e=>e.tokens)),_e=_l(k.map(e=>e.costBrl)),ve=vl(f===`tasks`?c:ee),ye=[[E.averageTime,te===null?`—`:A(te,n)],[E.averageTokens,M(ge,n)],[E.averageCost,P(_e,`BRL`,n)]],be=k.filter(e=>e.durationMs!==null).sort((e,t)=>(t.durationMs??0)-(e.durationMs??0)).slice(0,5),xe=Math.max(1,...be.map(e=>e.durationMs??0)),Se=Sl(be,k),Ce=e=>{p(e),h(null),_(null)};return(0,y.jsxs)(`section`,{"aria-label":E.overview,className:`operations-overview`,children:[(0,y.jsx)(`div`,{className:`operations-overview-controls`,children:(0,y.jsxs)(`label`,{className:`operations-overview-period`,children:[(0,y.jsx)(`span`,{children:n===`pt-BR`?`Período`:`Period`}),(0,y.jsxs)(`select`,{"aria-label":n===`pt-BR`?`Período`:`Period`,onChange:e=>r(e.target.value),value:t,children:[(0,y.jsx)(`option`,{value:`today`,children:n===`pt-BR`?`Hoje`:`Today`}),(0,y.jsx)(`option`,{value:`yesterday`,children:n===`pt-BR`?`Ontem`:`Yesterday`}),(0,y.jsx)(`option`,{value:`this-week`,children:n===`pt-BR`?`Esta Semana`:`This Week`}),(0,y.jsx)(`option`,{value:`last-week`,children:n===`pt-BR`?`Semana Passada`:`Last Week`}),(0,y.jsx)(`option`,{value:`this-month`,children:n===`pt-BR`?`Este Mês`:`This Month`}),(0,y.jsx)(`option`,{value:`last-month`,children:n===`pt-BR`?`Mês Passado`:`Last Month`}),(0,y.jsx)(`option`,{value:`last-3-months`,children:n===`pt-BR`?`Últimos 3 meses`:`Last 3 months`}),(0,y.jsx)(`option`,{value:`last-6-months`,children:n===`pt-BR`?`Últimos 6 meses`:`Last 6 months`}),(0,y.jsx)(`option`,{value:`this-year`,children:n===`pt-BR`?`Este Ano`:`This Year`}),(0,y.jsx)(`option`,{value:`last-year`,children:n===`pt-BR`?`Último ano`:`Last year`}),(0,y.jsx)(`option`,{value:`all`,children:n===`pt-BR`?`Todo o Período`:`All Time`}),(0,y.jsx)(`option`,{disabled:!0,value:`custom`,children:n===`pt-BR`?`Personalizado`:`Custom`})]})]})}),(0,y.jsxs)(`div`,{className:`operations-kpi-grid`,children:[(0,y.jsx)(Cl,{featured:f===`tasks`,hint:`${v} ${E.completedTasks} (${I(S,n)})`,label:E.tasks,onSelect:()=>Ce(`tasks`),value:String(c.length)}),(0,y.jsx)(Cl,{featured:f===`specs`,hint:`${b} ${E.completedSpecs} (${I(C,n)})`,label:`SPECs`,onSelect:()=>Ce(`specs`),value:String(s.length)}),(0,y.jsx)(Cl,{featured:f===`prds`,hint:`${x} ${E.completedPrds} (${I(w,n)})`,label:`PRDs`,onSelect:()=>Ce(`prds`),value:String(a.length)}),(0,y.jsx)(Cl,{hint:El(z??0,c.length,le,n),label:E.totalExecutionTime,value:z===null?`—`:A(z,n)}),(0,y.jsx)(Cl,{hint:me===null||he===null?n===`pt-BR`?`Tokens por tarefa e por hora indisponíveis`:`Tokens per task and hour unavailable`:n===`pt-BR`?`${M(me,n)} / tarefa (${M(he,n,0)} / hora)`:`${M(me,n)} / task (${M(he,n,0)} / hour)`,label:n===`pt-BR`?`Tokens gastos`:`Spent tokens`,value:ue===null?`—`:M(ue,n)}),(0,y.jsx)(Cl,{hint:fe===null||pe===null?n===`pt-BR`?`Custo por tarefa e por hora indisponível`:`Cost per task and hour unavailable`:n===`pt-BR`?`${Ol(pe,n)} / tarefa (${Ol(fe,n)} / hora)`:`${Ol(pe,n)} / task (${Ol(fe,n)} / hour)`,label:n===`pt-BR`?`Custo Estimado`:`Estimated cost`,value:de===null?`—`:Ol(de,n)})]}),(0,y.jsxs)(`div`,{className:`operations-chart-grid`,children:[(0,y.jsxs)(`article`,{className:`operations-panel operations-panel-wide`,children:[(0,y.jsx)(Ml,{hint:E.statusHint,title:T.statusTitle}),(0,y.jsx)(`div`,{"aria-hidden":`true`,className:`operations-stacked-bar`,children:ie.map(e=>(0,y.jsx)(`i`,{style:{background:e.color,flexGrow:e.count,display:e.count===0?`none`:void 0}},e.key))}),(0,y.jsx)(`div`,{className:`operations-legend-grid`,children:ie.map(e=>{let t=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`i`,{style:{background:e.color}}),(0,y.jsx)(`span`,{children:e.label}),(0,y.jsxs)(`span`,{className:`operations-legend-value`,children:[(0,y.jsx)(`strong`,{children:e.count}),(0,y.jsx)(`small`,{children:I(j===0?0:e.count/j,n)})]})]});return f===`tasks`?(0,y.jsx)(`button`,{"aria-label":`${e.label}: ${e.count}, ${I(j===0?0:e.count/j,n)}`,className:`operations-legend-row operations-status-filter`,onClick:()=>h(e.key),type:`button`,children:t},e.key):(0,y.jsx)(`div`,{className:`operations-legend-row`,children:t},e.key)})})]}),(0,y.jsxs)(`article`,{className:`operations-panel operations-panel-risk`,children:[(0,y.jsx)(Ml,{hint:T.classificationHint,title:T.classificationTitle}),(0,y.jsxs)(`div`,{className:`operations-donut-wrap`,children:[(0,y.jsx)(`div`,{"aria-hidden":`true`,className:`operations-donut`,style:{background:Fl(L,Math.max(D,1))}}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:D}),(0,y.jsx)(`span`,{children:T.shortPlural})]})]}),(0,y.jsx)(`div`,{className:`operations-legend-grid`,children:L.map(e=>{let t=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`i`,{style:{background:e.color}}),(0,y.jsx)(`span`,{children:e.label}),(0,y.jsxs)(`span`,{className:`operations-legend-value`,children:[(0,y.jsx)(`strong`,{children:e.count}),(0,y.jsx)(`small`,{children:I(D===0?0:e.count/D,n)})]})]});return f===`tasks`?(0,y.jsx)(`button`,{"aria-label":`${e.label}: ${e.count}, ${I(D===0?0:e.count/D,n)}`,className:`operations-legend-row operations-status-filter`,onClick:()=>_(e.key),type:`button`,children:t},e.key):(0,y.jsx)(`div`,{className:`operations-legend-row`,children:t},e.key)})})]}),(0,y.jsxs)(`article`,{className:`operations-panel operations-panel-type${n===`en-US`?` is-en-us`:``}`,children:[(0,y.jsx)(Ml,{hint:T.averageHint,title:T.averageTitle}),(0,y.jsx)(`div`,{className:`operations-type-summary`,children:ye.map(([e,t])=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:e}),(0,y.jsx)(`strong`,{children:t})]},e))}),(0,y.jsxs)(`footer`,{className:`operations-latest-task-created`,children:[(0,y.jsx)(`span`,{children:T.latestLabel}),(0,y.jsx)(`strong`,{children:ve===null?`—`:F(ve,n)})]})]}),(0,y.jsxs)(`article`,{className:`operations-panel`,children:[(0,y.jsx)(Ml,{hint:E.topHint,title:T.topTitle}),be.length>0?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`operations-run-bars`,children:be.map((e,t)=>(0,y.jsxs)(`button`,{"aria-label":n===`pt-BR`?`Abrir detalhes da tarefa ${e.title}`:`Open details for task ${e.title}`,className:`operations-run-bar`,disabled:f!==`tasks`,onClick:()=>void i(e.id),title:`${e.title}: ${A(e.durationMs,n)}`,type:`button`,children:[(0,y.jsx)(`strong`,{children:e.durationMs==null?`—`:A(e.durationMs,n)}),(0,y.jsx)(`i`,{style:{height:`${Math.max(8,(e.durationMs??0)/xe*100)}%`}}),(0,y.jsx)(`span`,{children:`#${t+1} ${e.id.slice(-4)}`})]},e.id))}),(0,y.jsxs)(`div`,{className:`operations-top-task-metrics`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:E.accumulatedTime}),(0,y.jsx)(`strong`,{children:A(Se.durationMs,n)}),(0,y.jsx)(`small`,{children:`${Se.runCount} ${E.associatedRuns}`})]}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:E.concentration}),(0,y.jsx)(`strong`,{children:I(Se.durationShare,n)}),(0,y.jsx)(`small`,{children:E.totalMeasuredTime})]}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:E.topFiveCost}),(0,y.jsx)(`strong`,{children:P(Se.costBrl,`BRL`,n)}),(0,y.jsx)(`small`,{children:Se.tokens===null?E.tokensUnavailable:`${M(Se.tokens,n)} tokens`})]})]})]}):(0,y.jsx)(`p`,{className:`operations-empty`,children:T.emptyTop})]})]}),m===null?null:(0,y.jsx)(jl,{eyebrow:n===`pt-BR`?`Status das tarefas`:`Task status`,label:Oc(m,n),locale:n,onClose:()=>h(null),onOpenTask:e=>{h(null),i(e)},tasks:c.filter(e=>kc(e)===m)}),g===null?null:(0,y.jsx)(jl,{eyebrow:n===`pt-BR`?`Risco das tarefas`:`Task risk`,label:mc(g,n),locale:n,onClose:()=>_(null),onOpenTask:e=>{_(null),i(e)},tasks:c.filter(e=>e.risk===g)})]})}function jl({eyebrow:e,label:t,locale:n,onClose:r,onOpenTask:i,tasks:a}){let o=n===`pt-BR`?a.length===1?`tarefa`:`tarefas`:a.length===1?`task`:`tasks`;return(0,y.jsx)(`dialog`,{className:`operations-status-dialog-backdrop`,onMouseDown:e=>{e.currentTarget===e.target&&r()},open:!0,children:(0,y.jsxs)(`section`,{"aria-label":`${t} — ${a.length} ${o}`,"aria-modal":`true`,className:`operations-status-dialog`,role:`dialog`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:e}),(0,y.jsx)(`h2`,{children:t}),(0,y.jsxs)(`p`,{children:[a.length,` `,o]})]}),(0,y.jsx)(`button`,{"aria-label":n===`pt-BR`?`Fechar`:`Close`,onClick:r,type:`button`,children:`×`})]}),(0,y.jsxs)(`div`,{className:`operations-status-task-list`,children:[a.map(e=>(0,y.jsxs)(`button`,{onClick:()=>i(e.id),type:`button`,children:[(0,y.jsxs)(`span`,{className:`operations-status-task-main`,children:[(0,y.jsx)(`strong`,{children:e.title}),(0,y.jsx)(`small`,{children:e.id})]}),(0,y.jsx)(`span`,{className:`operations-risk is-${e.risk}`,children:mc(e.risk,n)}),(0,y.jsxs)(`span`,{className:`operations-status-task-action`,children:[n===`pt-BR`?`Ver detalhes`:`View details`,` →`]})]},e.id)),a.length===0?(0,y.jsx)(`p`,{className:`operations-empty`,children:n===`pt-BR`?`Nenhuma tarefa neste status.`:`No tasks in this status.`}):null]})]})})}function Ml({title:e,hint:t,action:n}){return(0,y.jsxs)(`header`,{className:`operations-panel-header`,children:[(0,y.jsxs)(`div`,{className:`operations-panel-header-title`,children:[(0,y.jsx)(`h2`,{children:e}),n]}),(0,y.jsx)(`small`,{children:t})]})}function Nl(e,t){return Cc.map(n=>({key:n,label:Oc(n,t),color:ml[n],count:e.filter(e=>kc(e)===n).length}))}function Pl(e,t,n){return Cc.map(r=>({key:r,label:Oc(r,n),color:ml[r],count:e.filter(e=>Ac(e,t)===r).length}))}function Fl(e,t){let n=0,r=e.map(e=>{let r=n+e.count/t*100,i=`${e.color} ${n}% ${r}%`;return n=r,i});return n===0?`rgba(36, 52, 72, 0.86)`:`conic-gradient(${r.join(`, `)})`}var Il=[`draft`,`planned`,`executing`,`verifying`,`completed`,`blocked`,`failed`,`cancelled`];function Ll(e,t){if(t===`work-kanban`||t===`work-list`)return[...Cc];let n=t===`changes`?e.changes.map(e=>e.status):t===`executions`?e.executions.map(e=>e.status):t===`runs`?e.runs.map(e=>e.status):t===`conversations`?e.executions.filter(e=>e.kind===`interaction`).map(e=>e.status):[];return[...new Set(n)].sort()}function q(e,t){if(Cc.includes(e))return Oc(e,t);let n=Il.find(t=>t===e);return n===void 0?e:pc(n,t)}function Rl(e){return![`completed`,`delivered`,`failed`,`cancelled`,`superseded`].includes(e)}function J(e,t,n,r=!1){let i=new Map,a=new Map,o=new Map,s=Y(e.runs,t,r),c=e=>{let t=i.get(e);if(t!==void 0)return t;let n={key:e,prds:0,specs:0,tasks:0,tasksCreated:0,tasksActive:0,taskDaysActive:0,runs:0,tests:0,evidences:0,durationMs:null,tokens:null,costBrl:null};return i.set(e,n),a.set(e,new Set),o.set(e,new Set),n},l=e=>{let n=Wl(e,t);return n===null?null:c(n)};for(let t of e.prds){let e=l(t.created_at);e!==null&&(e.prds+=1)}for(let t of e.specs){let e=l(t.created_at);e!==null&&(e.specs+=1)}for(let t of e.tasks){let e=l(t.created_at);if(e===null)continue;e.tasks+=1,e.tasksCreated+=1,e.tests+=t.test_count??0;let n=a.get(e.key);for(let e of t.result?.evidence_ids??[])n?.add(e)}for(let t of ol(e.runs)){let e=l(t.started_at);e!==null&&(e.runs+=1,t.task_id!==null&&t.task_id!==void 0&&o.get(e.key)?.add(t.task_id),e.tokens=Vl(e.tokens,t.usage.total.tokens.total),e.costBrl=Vl(e.costBrl,n===void 0?t.usage.total.cost.brl:n(t.id)))}for(let[e,t]of a){let n=i.get(e);n!==void 0&&(n.evidences=t.size)}for(let[e,t]of o){let n=i.get(e);n!==void 0&&(n.tasksActive=t.size,n.taskDaysActive=t.size)}for(let[e,t]of s)c(e).durationMs=t;return[...i.values()].sort((e,t)=>t.key.localeCompare(e.key))}function Y(e,t,n){let r=new Map;for(let i of ol(e)){if(n&&!m(i.started_at))continue;let e=cl(i);if(e===null)continue;let a=Wl(i.started_at,t);a!==null&&r.set(a,(r.get(a)??0)+e)}if(n)for(let[e,n]of Object.entries(f)){let i=Wl(`${e}T12:00:00.000Z`,t);i!==null&&r.set(i,(r.get(i)??0)+n)}return r}function zl(e){let t={prds:0,specs:0,tasks:0,tasksCreated:0,tasksActive:null,taskDaysActive:0,runs:0,tests:0,evidences:0,durationMs:null,tokens:null,costBrl:null};for(let n of e)t.prds+=n.prds,t.specs+=n.specs,t.tasks+=n.tasks,t.tasksCreated+=n.tasksCreated,t.taskDaysActive+=n.taskDaysActive,t.runs+=n.runs,t.tests+=n.tests,t.evidences+=n.evidences,t.durationMs=Vl(t.durationMs,n.durationMs),t.tokens=Vl(t.tokens,n.tokens),t.costBrl=Vl(t.costBrl,n.costBrl);return t}function Bl(e){let t=e.length;return{tasks:t===0?null:e.reduce((e,t)=>e+t.tasks,0)/t,specs:t===0?null:e.reduce((e,t)=>e+t.specs,0)/t,prds:t===0?null:e.reduce((e,t)=>e+t.prds,0)/t,durationMs:Ul(e.map(e=>e.durationMs),t),tokens:Hl(e.map(e=>e.tokens)),costBrl:Hl(e.map(e=>e.costBrl))}}function Vl(e,t){return t===null?e:(e??0)+t}function Hl(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)/t.length}function Ul(e,t){if(t===0)return null;let n=e.filter(e=>e!==null);return n.length===0?null:n.reduce((e,t)=>e+t,0)/t}function Wl(e,t){return g(e,t)}function Gl({data:e,granularity:t,locale:n,resolveRunCostBrl:r,includeLegacyEffort:i=!1}){let a=J(e,t,r,i),o=zl(a),s={...o,durationMs:Kl(o.durationMs,o.tokens)},c=Bl(a),l=n===`pt-BR`?`Total geral`:`Grand total`,u=M(s.tokens);return(0,y.jsxs)(`div`,{className:`operations-period-summary`,children:[(0,y.jsx)(L,{ariaLabel:ql(t,n),metrics:[{label:Jl(n===`pt-BR`?`Tarefas criadas`:`Tasks created`,t,n),value:N(c.tasks,n,1)},{label:Jl(`SPECs`,t,n),value:N(c.specs,n,1)},{label:Jl(`PRDs`,t,n),value:N(c.prds,n,1)},{label:Jl(n===`pt-BR`?`Tempo`:`Time`,t,n),value:j(c.durationMs,n)},{label:Jl(`Tokens`,t,n),value:M(c.tokens,n)},{label:Jl(n===`pt-BR`?`Custo`:`Cost`,t,n),value:P(c.costBrl,`BRL`,n)}]}),(0,y.jsx)(k,{columns:[{key:`period`,label:Xl(t,n),render:e=>(0,y.jsx)(`strong`,{children:Zl(e.key,t,n)}),footer:l,sortValue:e=>e.key},Yl(`prds`,`PRDs`,s.prds),Yl(`specs`,`SPECs`,s.specs),Yl(`tasks`,n===`pt-BR`?`Tarefas criadas`:`Tasks created`,s.tasks),Yl(`runs`,`Runs`,s.runs),Yl(`tests`,n===`pt-BR`?`Testes`:`Tests`,s.tests),Yl(`evidences`,n===`pt-BR`?`Evidências`:`Evidence`,s.evidences),{key:`duration`,label:n===`pt-BR`?`Tempo`:`Time`,align:`right`,render:e=>A(e.durationMs),footer:(0,y.jsx)(`output`,{"aria-label":`${l} — ${n===`pt-BR`?`Tempo`:`Time`}: ${A(s.durationMs)}`,children:A(s.durationMs)}),sortValue:e=>e.durationMs},{key:`tokens`,label:`Tokens`,align:`right`,render:e=>M(e.tokens),footer:(0,y.jsx)(`output`,{"aria-label":`${l} — Tokens: ${u}`,children:u}),sortValue:e=>e.tokens},{key:`cost`,label:n===`pt-BR`?`Custos`:`Costs`,align:`right`,render:e=>P(e.costBrl,`BRL`),footer:(0,y.jsx)(`output`,{"aria-label":`${l} — ${n===`pt-BR`?`Custos`:`Costs`}: ${P(s.costBrl,`BRL`)}`,children:P(s.costBrl,`BRL`)}),sortValue:e=>e.costBrl}],emptyMessage:n===`pt-BR`?`Nenhum dado disponível para o período selecionado.`:`No data available for the selected period.`,defaultSort:{key:`period`,direction:`desc`},locale:n,rowKey:e=>e.key,rows:a,sortable:!0,showColumnInfo:!0})]})}function Kl(e,t){return e===null&&t===0?0:e}function ql(e,t){return t===`en-US`?e===`day`?`Daily averages`:e===`month`?`Monthly averages`:`Annual averages`:e===`day`?`Médias por dia`:e===`month`?`Médias por mês`:`Médias por ano`}function Jl(e,t,n){return n===`en-US`?`${e} ${t===`day`?`Daily average`:t===`month`?`Monthly average`:`Annual average`}`:`${e} ${t===`day`?`Médio por dia`:t===`month`?`Médio por mês`:`Médio por ano`}`}function Yl(e,t,n){return{key:e,label:t,align:`right`,render:t=>t[e],footer:n,sortValue:t=>t[e]}}function Xl(e,t){return t===`en-US`?e===`day`?`Day`:e===`month`?`Month`:`Year`:e===`day`?`Dia`:e===`month`?`Mês`:`Ano`}function Zl(e,t,n){if(t===`month`||t===`year`)return e;let r=new Date(`${e}T12:00:00`);return new Intl.DateTimeFormat(n,{...t===`day`?{day:`2-digit`}:{},month:t===`day`?`2-digit`:`long`,year:`numeric`}).format(r)}function Ql(e,t,n){return n.entityFilterActive?e.filter(e=>n.directRunMatch?.(e)===!0||e.task_id!==null&&t.taskIds.has(e.task_id)||e.spec_id!==null&&t.specIds.has(e.spec_id)||e.prd_id!==null&&t.prdIds.has(e.prd_id)):[...e]}function $l({allSpecs:e,allTasks:t,changes:n,locale:r,onOpenDocument:i,onOpenTask:a,prds:o,runs:s,specs:c,tasks:u}){let d=yc(),[f,p]=(0,l.useState)(`all`),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)(null),[v,b]=(0,l.useState)(``),x=(0,l.useMemo)(()=>xc(s,u),[s,u]),S=(0,l.useMemo)(()=>ou([...o.map(e=>({kind:`prd`,row:e})),...c.map(e=>({kind:`spec`,row:e})),...u.map(e=>({kind:`task`,row:e}))].filter(e=>wc(e,f))),[o,c,u,f]),C=(0,l.useMemo)(()=>new Map([...o,...c].map(n=>[n.id,Tc(n,e,t)])),[e,t,o,c]),w=m===null?[]:S.filter(e=>au(e,t)===m),T=e=>{h(null),e.kind===`task`?a(e.row.id):_(e.row)};return(0,y.jsxs)(`section`,{className:`operations-unified-work`,children:[(0,y.jsx)(eu,{locale:r,onChange:p,value:f}),(0,y.jsx)(`section`,{"aria-label":r===`pt-BR`?`Kanban de trabalho`:`Work Kanban`,className:`operations-board operations-work-board`,children:Cc.map(e=>(0,y.jsx)(tu,{changes:n,items:S.filter(n=>au(n,t)===e),locale:r,nowMs:d,onOpenColumn:()=>{b(``),h(e)},onOpenItem:T,progressByMacro:C,stage:e,totalsByTask:x},e))}),m?(0,y.jsx)(iu,{items:w,locale:r,onClose:()=>h(null),onOpenItem:T,onQueryChange:b,query:v,stage:m}):null,g?(0,y.jsx)(jc,{label:g.kind===`prd`?`PRD`:`SPEC`,locale:r,onClose:()=>_(null),onOpenDocument:i,onOpenTrace:e=>{_(null),a(e)},row:g,runs:s,specs:e,tasks:t}):null]})}function eu({locale:e,onChange:t,value:n}){let r=e===`pt-BR`?{task:`Tarefas`,all:`Tudo`,prd:`PRDs`,spec:`SPECs`,"standalone-task":`Tarefas Avulsas`}:{task:`Tasks`,all:`All`,prd:`PRDs`,spec:`SPECs`,"standalone-task":`Standalone Tasks`};return(0,y.jsx)(`nav`,{"aria-label":e===`pt-BR`?`Filtrar tipo de trabalho`:`Filter work type`,className:`operations-work-type-filters`,children:[`all`,`task`,`prd`,`spec`].map(e=>(0,y.jsx)(`button`,{className:n===e?`is-active`:void 0,onClick:()=>t(e),type:`button`,children:r[e]},e))})}function tu({changes:e,items:t,locale:n,nowMs:r,onOpenColumn:i,onOpenItem:a,progressByMacro:o,stage:s,totalsByTask:c}){let{hasMore:l,sentinelRef:u,visibleCount:d}=bc(t.length);return(0,y.jsxs)(`article`,{className:`operations-column is-${s}`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsx)(`button`,{className:`operations-column-trigger`,onClick:i,type:`button`,children:Oc(s,n)}),(0,y.jsx)(`button`,{"aria-label":`${t.length} — ${Oc(s,n)}`,className:`operations-column-count`,onClick:i,type:`button`,children:t.length})]}),(0,y.jsxs)(`div`,{className:`operations-column-body`,children:[t.slice(0,d).map(t=>(0,y.jsx)(nu,{changes:e,item:t,locale:n,nowMs:r,onOpen:()=>a(t),progress:o.get(t.row.id),stage:s,totalsByTask:c},t.row.id)),t.length===0?(0,y.jsx)(`p`,{className:`operations-empty`,children:n===`pt-BR`?`Sem itens`:`No items`}):null,l?(0,y.jsxs)(`div`,{className:`operations-infinite-sentinel`,ref:u,children:[d,` de `,t.length,` · carregando mais…`]}):null]})]})}function nu({changes:e,item:t,locale:n,nowMs:r,onOpen:i,progress:a,stage:o,totalsByTask:s}){let c=$s(t.row.created_at,cu(o),n,r),l=t.kind===`task`?t.row:null,u=t.kind===`task`?null:t.row,d=l?gc(l,e):t.kind,f=d===`task`?`Tarefa Avulsa`:t.kind.toUpperCase(),p=l?s.get(l.id):null,m=u?[u.duration_ms,u.usage.total.tokens.total,u.usage.total.cost.brl]:[p?.durationMs??null,p?.tokens??null,p?.costBrl??null];return(0,y.jsxs)(`button`,{className:`operations-task-card operations-work-card is-kind-${d}`,onClick:i,type:`button`,children:[(0,y.jsx)(`span`,{className:`operations-work-kind is-${t.kind}`,children:f}),(0,y.jsx)(`span`,{className:`operations-work-status is-${o}`,children:lu(o,n)}),l?(0,y.jsx)(`span`,{className:`operations-risk is-${l.risk}`,children:mc(l.risk,n)}):null,(0,y.jsx)(`strong`,{title:t.row.title,children:t.row.title}),(0,y.jsx)(`small`,{title:t.row.id,children:t.row.id}),t.row.created_at?(0,y.jsx)(`small`,{className:`operations-card-created`,children:nc(t.row.created_at,n)}):null,c?(0,y.jsx)(`span`,{className:`operations-elapsed-badge${c.alert?` is-alert`:``}`,children:c.label}):null,u?(0,y.jsx)(`span`,{className:`operations-work-card-counts`,children:Ec(u.kind,a??{completedSpecs:0,totalSpecs:0,completedTasks:0,totalTasks:0})}):null,(0,y.jsx)(`dl`,{className:`operations-task-usage operations-macro-usage`,children:[[n===`pt-BR`?`Tempo`:`Time`,m[0]==null?`—`:ic(m[0])],[`Tokens`,m[1]==null?`—`:M(m[1])],[n===`pt-BR`?`Custo`:`Cost`,m[2]==null?`—`:P(m[2],`BRL`)]].map(([e,t])=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`dt`,{children:e}),(0,y.jsx)(`dd`,{children:t})]},e))})]})}function ru(e,t){let n=t.trim().toLocaleLowerCase();return n?e.filter(e=>[e.row.id,e.row.title,e.kind].some(e=>e.toLocaleLowerCase().includes(n))):[...e]}function iu({items:e,locale:t,onClose:n,onOpenItem:r,onQueryChange:i,query:a,stage:o}){let s=ru(e,a);return(0,O.createPortal)((0,y.jsx)(`dialog`,{className:`operations-status-dialog-backdrop`,onMouseDown:e=>e.currentTarget===e.target&&n(),open:!0,children:(0,y.jsxs)(`section`,{"aria-label":Oc(o,t),"aria-modal":`true`,className:`operations-status-dialog`,role:`dialog`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:t===`pt-BR`?`Coluna de trabalho`:`Work column`}),(0,y.jsx)(`h2`,{children:Oc(o,t)}),(0,y.jsxs)(`p`,{children:[e.length,` itens`]})]}),(0,y.jsx)(`button`,{"aria-label":t===`pt-BR`?`Fechar`:`Close`,onClick:n,type:`button`,children:`×`})]}),(0,y.jsxs)(`label`,{className:`operations-status-dialog-search`,children:[(0,y.jsx)(`span`,{children:t===`pt-BR`?`Buscar itens`:`Search items`}),(0,y.jsx)(`input`,{autoFocus:!0,onChange:e=>i(e.target.value),placeholder:t===`pt-BR`?`Título, ID ou tipo`:`Title, ID, or type`,type:`search`,value:a})]}),(0,y.jsxs)(`div`,{className:`operations-status-task-list`,children:[s.map(e=>(0,y.jsxs)(`button`,{onClick:()=>r(e),type:`button`,children:[(0,y.jsxs)(`span`,{className:`operations-status-task-main`,children:[(0,y.jsx)(`strong`,{children:e.row.title}),(0,y.jsx)(`small`,{children:e.row.id})]}),(0,y.jsx)(`span`,{className:`operations-work-kind is-${e.kind}`,children:e.kind===`task`?`TASK`:e.kind.toUpperCase()}),(0,y.jsxs)(`span`,{className:`operations-status-task-action`,children:[t===`pt-BR`?`Ver detalhes`:`View details`,` →`]})]},`${e.kind}:${e.row.id}`)),s.length===0?(0,y.jsx)(`p`,{className:`operations-empty`,children:t===`pt-BR`?`Nenhum item encontrado nesta coluna.`:`No items found in this column.`}):null]})]})}),document.body)}function au(e,t){return e.kind===`task`?kc(e.row):Ac(e.row,t)}function ou(e){let t={urgent:0,high:1,medium:2,low:3};return e.sort((e,n)=>su(n).localeCompare(su(e))||String(au(e,[])).localeCompare(String(au(n,[])))||(e.kind===`task`?t[e.row.priority]:4)-(n.kind===`task`?t[n.row.priority]:4)||n.row.id.localeCompare(e.row.id))}function su(e){return e.kind===`task`?e.row.updated_at:e.row.updated_at??e.row.created_at??``}function cu(e){return e===`definition`?`draft`:e===`planning`||e===`ready`?`planned`:e===`blocked`?`blocked`:e}function lu(e,t){return{"pt-BR":{definition:`Definição`,planning:`Planejamento`,ready:`Pronto para executar`,executing:`Executando`,verifying:`Em verificação`,completed:`Concluído`,blocked:`Bloqueado`,cancelled:`Cancelado`,failed:`Falhado`},"en-US":{definition:`Definition`,planning:`Planning`,ready:`Ready to execute`,executing:`Running`,verifying:`Verifying`,completed:`Completed`,blocked:`Blocked`,cancelled:`Cancelled`,failed:`Failed`}}[t][e]}function uu({allSpecs:e,allTasks:t,changes:n,locale:r,onOpenDocument:i,onOpenTask:a,prds:o,runs:s,specs:c,tasks:u}){let[d,f]=(0,l.useState)(`all`),[p,m]=(0,l.useState)(null),h=(0,l.useMemo)(()=>du({allSpecs:e,allTasks:t,changes:n,items:[...o.map(e=>({kind:`prd`,row:e})),...c.map(e=>({kind:`spec`,row:e})),...u.map(e=>({kind:`task`,row:e}))].filter(e=>wc(e,d)),runs:s}),[e,t,n,o,s,c,u,d]);return(0,y.jsxs)(`section`,{className:`operations-unified-work operations-work-list`,children:[(0,y.jsx)(eu,{locale:r,onChange:f,value:d}),(0,y.jsx)(`div`,{className:`operations-work-list-table`,children:(0,y.jsx)(k,{columns:[{key:`item`,label:r===`pt-BR`?`Item de trabalho`:`Work item`,render:({item:e,originLabel:t})=>(0,y.jsxs)(`span`,{className:`operations-work-list-identity`,children:[(0,y.jsx)(`span`,{className:`operations-work-kind is-${e.kind}`,children:t}),(0,y.jsx)(`strong`,{children:e.row.title}),(0,y.jsx)(`small`,{children:e.row.id})]}),sortValue:({item:e})=>e.row.title},{key:`status`,label:`Status`,render:({stage:e})=>(0,y.jsx)(`span`,{className:`operations-status is-${e}`,children:Oc(e,r)}),sortValue:({stage:e})=>e},{key:`risk`,label:r===`pt-BR`?`Risco`:`Risk`,render:({risk:e})=>e?(0,y.jsx)(`span`,{className:`operations-risk is-${e}`,children:mc(e,r)}):`—`,sortValue:({risk:e})=>e},{key:`progress`,label:r===`pt-BR`?`Progresso`:`Progress`,render:({progress:e})=>e,sortValue:({item:e})=>e.kind===`task`?e.row.progress:e.row.quality.task_completion_rate},{key:`runs`,label:r===`pt-BR`?`Invocações do orquestrador`:`Orchestrator invocations`,description:r===`pt-BR`?`Chamadas do agente orquestrador relacionadas ao item.`:`Orchestrator agent calls related to the item.`,render:({runCount:e})=>e,sortValue:({runCount:e})=>e,align:`right`},{key:`subruns`,label:r===`pt-BR`?`Invocações delegadas`:`Delegated invocations`,description:r===`pt-BR`?`Chamadas de subagentes relacionadas ao item.`:`Subagent calls related to the item.`,render:({subrunCount:e})=>e,sortValue:({subrunCount:e})=>e,align:`right`},{key:`executions`,label:r===`pt-BR`?`Execuções`:`Executions`,render:({executionCount:e})=>e,sortValue:({executionCount:e})=>e,align:`right`},{key:`tasks`,label:r===`pt-BR`?`Tarefas`:`Tasks`,render:({taskCount:e})=>e,sortValue:({taskCount:e})=>e,align:`right`},{key:`duration`,label:r===`pt-BR`?`Tempo`:`Time`,render:({durationMs:e})=>e===null?R(null,r):ic(e),sortValue:({durationMs:e})=>e,align:`right`},{key:`tokens`,label:`Tokens`,render:({tokens:e})=>e===null?`—`:M(e),sortValue:({tokens:e})=>e,align:`right`},{key:`cost`,label:r===`pt-BR`?`Custo`:`Cost`,render:({costBrl:e})=>e===null?`—`:P(e,`BRL`),sortValue:({costBrl:e})=>e,align:`right`}],defaultSort:{key:`item`,direction:`asc`},emptyMessage:r===`pt-BR`?`Nenhum item de trabalho encontrado.`:`No work items found.`,locale:r,onRowClick:({item:e})=>{e.kind===`task`?a(e.row.id):m(e.row)},rowKey:({item:e})=>`${e.kind}:${e.row.id}`,rows:h,scrollLabel:r===`pt-BR`?`Tabela de itens de trabalho com rolagem horizontal para acessar todas as colunas.`:`Work items table with horizontal scrolling to access all columns.`,showColumnInfo:!0,sortable:!0})}),p?(0,y.jsx)(jc,{label:p.kind===`prd`?`PRD`:`SPEC`,locale:r,onClose:()=>m(null),onOpenDocument:i,onOpenTrace:e=>{m(null),a(e)},row:p,runs:s,specs:e,tasks:t}):null]})}function du({allSpecs:e,allTasks:t,changes:n,items:r,runs:i}){let a=xc(i);return r.map(r=>{let o=r.kind===`task`?r.row:null,s=r.kind===`task`?null:r.row,c=i.filter(e=>o?e.task_id===o.id:s!==null&&(s.run_ids.includes(e.id)||e.prd_id===s.id||e.spec_id===s.id||e.task_id!==null&&s.task_ids.includes(e.task_id))),l=o?a.get(o.id):null,u=s?Tc(s,e,t):null,d=s,f=u;if(o===null){if(d===null||f===null)throw Error(`A non-task work item must include macro progress.`);return{item:r,stage:Ac(d,t),originLabel:r.kind.toUpperCase(),risk:null,progress:Ec(d.kind,f),runCount:c.filter(e=>e.run_kind===`run`).length,subrunCount:c.filter(e=>e.run_kind===`subrun`).length,executionCount:d.execution_count??0,taskCount:f.totalTasks,durationMs:d.duration_ms??null,tokens:d.usage.total.tokens.total??null,costBrl:d.usage.total.cost.brl??null}}return{item:r,stage:kc(o)??`planning`,originLabel:_c(gc(o,n)),risk:o.risk??null,progress:`${Math.round(o.progress)}%`,runCount:c.filter(e=>e.run_kind===`run`).length,subrunCount:c.filter(e=>e.run_kind===`subrun`).length,executionCount:o.execution_count??0,taskCount:1,durationMs:l?.durationMs??null,tokens:l?.tokens??null,costBrl:l?.costBrl??null}})}var fu={"pt-BR":{"work-kanban":`Trabalho (Kanban)`,"work-list":`Trabalho (Lista)`,changes:`Mudanças`,executions:`Execuções`,runs:`Invocações de agentes`,conversations:`Conversas`,decisions:`Decisões`,daily:`Diário`,monthly:`Mensal`,yearly:`Anual`},"en-US":{"work-kanban":`Work (Kanban)`,"work-list":`Work (List)`,changes:`Changes`,executions:`Executions`,runs:`Agent invocations`,conversations:`Conversations`,decisions:`Decisions`,daily:`Daily`,monthly:`Monthly`,yearly:`Annual`}};function pu(e,t){let n=e.trim().toLocaleLowerCase();return n.length===0||t.some(e=>e?.toLocaleLowerCase().includes(n))}function mu({alternateContent:e,capabilityNavigation:t,data:n,dashboardTitle:r=`Dashboard Zaip AIOS`,loading:i,locale:a,onLocaleChange:o,onOpenDocument:s,onOpenTask:c,onDetailDataRequest:u,onPeriodChange:d,onRefresh:f,repositoryName:p,settings:m,resolveRunCostBrl:h}){let[g,_]=(0,l.useState)(`work-kanban`),[v,b]=(0,l.useState)(``),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)(!1),[E,ee]=(0,l.useState)(``),[D,O]=(0,l.useState)(``),[k,te]=(0,l.useState)(``),[ne,re]=(0,l.useState)(!1),ie=(0,l.useRef)(null),A=(0,l.useRef)(null),j=(0,l.useMemo)(()=>Rc(n.tasks),[n.tasks]),M=(0,l.useMemo)(()=>zc(`this-month`),[]),[N,P]=(0,l.useState)(()=>M),[F,I]=(0,l.useState)(`this-month`);(0,l.useEffect)(()=>{F===`all`&&P(j)},[F,j]);let L=(0,l.useCallback)(()=>{re(!0),ie.current!==null&&window.clearTimeout(ie.current),ie.current=window.setTimeout(()=>re(!1),220)},[]);(0,l.useEffect)(()=>()=>{ie.current!==null&&window.clearTimeout(ie.current)},[]);let R=typeof e==`function`?e({query:v,datePreset:F,...F===`all`?{}:{dateRange:N}}):e,ae=F===`all`&&v===``&&E===``&&D===``&&k===``,oe=()=>{L(),b(``),ee(``),O(``),te(``),P(M),I(`this-month`),d?.(`this-month`,M)},se=e=>{L(),e!==`work-kanban`&&e!==`work-list`&&u?.(),_(e),ee(``),O(``),te(``)},ce=Ll(n,g),z=![`decisions`,`daily`,`monthly`,`yearly`].includes(g),le=g===`work-kanban`||g===`work-list`||g===`changes`,ue=g===`work-kanban`||g===`work-list`,de=(g===`work-kanban`||g===`work-list`)&&Cc.includes(E),fe=e=>Hc(e,F,N),pe=n.tasks.filter(e=>(!de||kc(e)===E)&&(!D||e.risk===D)&&vc(e,k,n.changes)&&(F===`all`||Rl(e.status)||Bc(e.finished_at??e.updated_at,N,e.updated_at))&&pu(v,[e.id,e.title,e.short_name,e.objective,e.change_id,e.spec_id])),me=n.prds.filter(e=>(!de||Ac(e,n.tasks)===E)&&!D&&!k&&(F===`all`||Rl(e.lifecycle_status)||fe(e.updated_at??e.created_at))&&pu(v,[e.id,e.title,e.parent_id])),he=n.specs.filter(e=>(!de||Ac(e,n.tasks)===E)&&!D&&!k&&(F===`all`||Rl(e.lifecycle_status)||fe(e.updated_at??e.created_at))&&pu(v,[e.id,e.title,e.parent_id])),ge=n.changes.filter(e=>(!E||e.status===E)&&(!D||e.risk===D)&&fe(e.created_at)&&pu(v,[e.id,e.title,e.source.type,e.artifact_path])),_e=n.executions.filter(e=>(!E||e.status===E)&&fe(e.created_at)&&pu(v,[e.id,e.status,e.work_status,e.origin.type,e.origin.type===`interaction`?e.origin.conversation_id:null,e.artifact_path])),be=Ql(n.runs.filter(e=>(!E||de||e.status===E)&&fe(e.started_at)),{taskIds:new Set(pe.map(e=>e.id)),specIds:new Set(he.map(e=>e.id)),prdIds:new Set(me.map(e=>e.id))},{entityFilterActive:!!(v||de||D||k),directRunMatch:e=>v.trim().length>0&&pu(v,[e.id,e.task_id,e.spec_id,e.prd_id,e.change_id,e.execution_id,e.conversation_id,e.phase,e.agent,e.agent_name,e.model,e.effective_model])}),xe=_e.filter(e=>e.kind===`interaction`&&e.origin.type===`interaction`),Se=new Set(xe.map(e=>e.origin.type===`interaction`?e.origin.conversation_id:``)),we=be.filter(e=>e.entrypoint===`conversation`&&e.task_id===null&&Se.has(e.conversation_id)),De=n.decisions.filter(e=>fe(e.created_at)&&pu(v,[e.id,e.title,e.scope_id,e.scope_type,e.artifact_path])),Oe=(0,l.useMemo)(()=>g===`daily`||g===`monthly`||g===`yearly`?J({prds:me,specs:he,tasks:pe,runs:be},g===`daily`?`day`:g===`monthly`?`month`:`year`,h,ae):g===`work-kanban`||g===`work-list`?[...me.map(({kind:e,...t})=>({kind:`prd`,...t})),...he.map(({kind:e,...t})=>({kind:`spec`,...t})),...pe.map(e=>({kind:`task`,...e}))]:g===`changes`?ge:g===`decisions`?De:g===`executions`?_e:g===`conversations`?we:be,[ge,we,De,_e,me,h,be,he,pe,g,ae]),ke=i||ne;return(0,y.jsxs)(`main`,{className:`operations-page`,children:[(0,y.jsx)(x,{filters:(0,y.jsxs)(`div`,{className:`operations-global-filters`,"data-loading":ke||void 0,children:[(0,y.jsxs)(`div`,{className:`operations-filter-heading`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:a===`pt-BR`?`Filtrar dashboard`:`Filter dashboard`}),(0,y.jsx)(`small`,{children:a===`pt-BR`?`Os resultados são atualizados automaticamente`:`Results update automatically`})]}),ke?(0,y.jsxs)(`span`,{className:`operations-filter-status`,role:`status`,children:[(0,y.jsx)(`i`,{}),` `,a===`pt-BR`?`Atualizando dados`:`Updating data`]}):null]}),(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:a===`pt-BR`?`Tipo`:`Type`}),(0,y.jsx)(`select`,{onChange:e=>se(e.target.value),value:g,children:Object.keys(fu[a]).map(e=>(0,y.jsx)(`option`,{value:e,children:fu[a][e]},e))})]}),z?(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:`Status`}),(0,y.jsxs)(`select`,{onChange:e=>{L(),ee(e.target.value)},value:E,children:[(0,y.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todos`:`All`}),ce.map(e=>(0,y.jsx)(`option`,{value:e,children:q(e,a)},e))]})]}):null,le?(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:a===`pt-BR`?`Risco`:`Risk`}),(0,y.jsxs)(`select`,{onChange:e=>{L(),O(e.target.value)},value:D,children:[(0,y.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todos`:`All`}),(0,y.jsx)(`option`,{value:`lite`,children:mc(`lite`,a)}),(0,y.jsx)(`option`,{value:`standard`,children:mc(`standard`,a)}),(0,y.jsx)(`option`,{value:`critical`,children:mc(`critical`,a)})]})]}):null,ue?(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:a===`pt-BR`?`Origem da tarefa`:`Task origin`}),(0,y.jsxs)(`select`,{onChange:e=>{L(),te(e.target.value)},value:k,children:[(0,y.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todas`:`All`}),hc.map(e=>(0,y.jsx)(`option`,{value:e,children:_c(e)},e))]})]}):null,(0,y.jsx)(Qc,{ariaLabelSuffix:a===`pt-BR`?` nos filtros`:` in filters`,dateRange:N,defaultDateRange:j,locale:a,onDateRangeChange:e=>{L(),P(e),I(`custom`),d?.(`custom`,e)},onPresetChange:(e,t)=>{L(),I(e),P(t),d?.(e,t)},preset:F}),(0,y.jsxs)(`button`,{className:`operations-clear-filters`,onClick:oe,type:`button`,children:[(0,y.jsx)(rl,{}),a===`pt-BR`?`Limpar filtros`:`Clear filters`]})]}),filtersActive:!!(v||E||D||k||N.start!==j.start||N.end!==j.end),lastUpdatedAt:n.summary.source_latest_at,loading:ke,locale:a,onLocaleChange:o,onRefresh:f,...p===void 0?{}:{repositoryName:p},settings:m,title:r}),(0,y.jsx)(`h1`,{className:`operations-sr-only`,children:`Operações`}),(0,y.jsxs)(`header`,{className:`operations-hero`,children:[(0,y.jsx)(`div`,{children:(0,y.jsx)(`small`,{className:`operations-last-updated`,children:n.summary.source_latest_at===null?a===`pt-BR`?`Aguardando atualização`:`Waiting for refresh`:`${a===`pt-BR`?`Atualizado`:`Updated`} ${new Intl.DateTimeFormat(a,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(n.summary.source_latest_at))}`})}),(0,y.jsxs)(`div`,{className:`operations-actions`,children:[(0,y.jsx)(`button`,{"aria-label":a===`pt-BR`?`Atualizar`:`Refresh`,className:`operations-nav-icon`,disabled:i,onClick:f,type:`button`,children:(0,y.jsx)(el,{})}),(0,y.jsxs)(`div`,{className:`operations-nav-popup-anchor`,children:[(0,y.jsxs)(`button`,{className:`operations-nav-button${S?` is-active`:``}`,onClick:()=>{C(e=>!e),T(!1)},type:`button`,children:[(0,y.jsx)(tl,{}),` `,a===`pt-BR`?`Filtros`:`Filters`]}),S?(0,y.jsxs)(`div`,{className:`operations-nav-popup operations-filter-popup`,children:[(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:a===`pt-BR`?`Busca`:`Search`}),(0,y.jsx)(`input`,{onChange:e=>b(e.target.value),placeholder:a===`pt-BR`?`ID ou nome de ${fu[a][g]}`:`${fu[a][g]} ID or name`,value:v})]}),g===`work-kanban`||g===`work-list`?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:`Status`}),(0,y.jsxs)(`select`,{onChange:e=>ee(e.target.value),value:E,children:[(0,y.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todos`:`All`}),Cc.map(e=>(0,y.jsx)(`option`,{value:e,children:Oc(e,a)},e))]})]}),(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:a===`pt-BR`?`Risco`:`Risk`}),(0,y.jsxs)(`select`,{onChange:e=>O(e.target.value),value:D,children:[(0,y.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todos`:`All`}),(0,y.jsx)(`option`,{value:`lite`,children:mc(`lite`,a)}),(0,y.jsx)(`option`,{value:`standard`,children:mc(`standard`,a)}),(0,y.jsx)(`option`,{value:`critical`,children:mc(`critical`,a)})]})]}),(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:a===`pt-BR`?`Origem da tarefa`:`Task origin`}),(0,y.jsxs)(`select`,{onChange:e=>te(e.target.value),value:k,children:[(0,y.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todas`:`All`}),hc.map(e=>(0,y.jsx)(`option`,{value:e,children:_c(e)},e))]})]})]}):null,(0,y.jsx)(`button`,{onClick:oe,type:`button`,children:a===`pt-BR`?`Limpar filtros`:`Clear filters`})]}):null]}),(0,y.jsxs)(`div`,{className:`operations-nav-popup-anchor`,children:[(0,y.jsxs)(`button`,{className:`operations-nav-button${w?` is-active`:``}`,onClick:()=>{T(e=>!e),C(!1)},type:`button`,children:[(0,y.jsx)($c,{locale:a}),a===`pt-BR`?`PT-BR`:`EN-US`,(0,y.jsx)(nl,{})]}),w?(0,y.jsxs)(`div`,{className:`operations-nav-popup operations-locale-popup`,children:[(0,y.jsxs)(`button`,{onClick:()=>{o(`pt-BR`),T(!1)},type:`button`,children:[(0,y.jsx)($c,{locale:`pt-BR`}),` Português do Brasil`,a===`pt-BR`?(0,y.jsx)(`span`,{children:`✓`}):null]}),(0,y.jsxs)(`button`,{onClick:()=>{o(`en-US`),T(!1)},type:`button`,children:[(0,y.jsx)($c,{locale:`en-US`}),` English`,a===`en-US`?(0,y.jsx)(`span`,{children:`✓`}):null]})]}):null]})]})]}),ke?(0,y.jsx)(`div`,{"aria-live":`polite`,className:`operations-loading-status`,role:`status`,children:a===`pt-BR`?`Carregando dados atualizados…`:`Loading updated data…`}):null,(0,y.jsxs)(`div`,{"aria-busy":ke,className:ke?`operations-filtered is-loading`:`operations-filtered`,children:[(0,y.jsx)(Al,{data:n,datePreset:F,locale:a,onDatePresetChange:e=>{L();let t=e===`all`?j:e===`custom`?N:zc(e);I(e),P(t),d?.(e,t)},onOpenTask:c,prds:me,runs:be,resolveRunCostBrl:h,includeLegacyEffort:ae,specs:he,tasks:pe}),(0,y.jsxs)(`section`,{className:`dashboard-global-controls`,children:[t,(0,y.jsxs)(`div`,{className:`operations-toolbar-filters dashboard-global-filters`,children:[(0,y.jsxs)(`label`,{className:`operations-toolbar-field operations-search-field`,children:[(0,y.jsx)(`span`,{children:a===`pt-BR`?`Busca`:`Search`}),(0,y.jsxs)(`div`,{className:`operations-search-control`,children:[(0,y.jsx)(`input`,{"aria-label":a===`pt-BR`?`Busca`:`Search`,onChange:e=>{L(),b(e.target.value)},placeholder:a===`pt-BR`?`Buscar por nome ou ID`:`Search by name or ID`,ref:A,value:v}),v?(0,y.jsx)(`button`,{"aria-label":a===`pt-BR`?`Limpar busca`:`Clear search`,className:`operations-search-clear`,onClick:()=>{L(),b(``),A.current?.focus()},type:`button`,children:(0,y.jsx)(il,{})}):null]})]}),(0,y.jsx)(Qc,{dateRange:N,defaultDateRange:j,locale:a,onDateRangeChange:e=>{L(),P(e),I(`custom`),d?.(`custom`,e)},onPresetChange:(e,t)=>{L(),I(e),P(t),d?.(e,t)},preset:F})]})]}),R??(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`section`,{className:`operations-toolbar`,children:(0,y.jsxs)(`nav`,{"aria-label":`Entidades do ciclo de trabalho`,children:[[`work-kanban`,`work-list`,`executions`,`runs`,`decisions`,`changes`,`conversations`,`daily`,`monthly`,`yearly`].map(e=>(0,y.jsx)(`button`,{className:g===e?`is-active`:void 0,onClick:()=>se(e),type:`button`,children:fu[a][e]},e)),(0,y.jsx)(Ws,{filters:{query:v,status:E,risk:D,origin:k,dateRange:N,datePreset:F},rows:Oe,view:`operations-${g}`})]})}),(0,y.jsxs)(`section`,{className:`operations-content`,children:[g===`work-kanban`?(0,y.jsx)($l,{allSpecs:n.specs,allTasks:n.tasks,changes:n.changes,locale:a,onOpenDocument:s,onOpenTask:c,prds:me,runs:n.runs,specs:he,tasks:pe}):null,g===`work-list`?(0,y.jsx)(uu,{allSpecs:n.specs,allTasks:n.tasks,changes:n.changes,locale:a,onOpenDocument:s,onOpenTask:c,prds:me,runs:n.runs,specs:he,tasks:pe}):null,g===`changes`?(0,y.jsx)(ve,{locale:a,rows:ge}):null,g===`executions`?(0,y.jsx)(ye,{locale:a,rows:_e}):null,g===`runs`?(0,y.jsx)(Ce,{locale:a,rows:be}):null,g===`conversations`?(0,y.jsx)(Te,{executions:xe,locale:a,rows:we}):null,g===`decisions`?(0,y.jsx)(Ee,{locale:a,rows:De}):null,g===`daily`||g===`monthly`||g===`yearly`?(0,y.jsx)(Gl,{data:{prds:me,runs:be,specs:he,tasks:pe},granularity:g===`daily`?`day`:g===`monthly`?`month`:`year`,locale:a,resolveRunCostBrl:h,includeLegacyEffort:ae}):null]})]})]})]})}function hu({detail:e,label:t,locale:n,onClose:r}){let i=n===`pt-BR`;return(0,O.createPortal)((0,y.jsx)(`div`,{className:`operations-prd-document-backdrop`,onMouseDown:e=>{e.currentTarget===e.target&&r()},children:(0,y.jsxs)(`section`,{"aria-label":i?`${t} completa`:`Full ${t}`,"aria-modal":`true`,className:`operations-prd-document-dialog`,role:`dialog`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`span`,{children:[(0,y.jsx)(Xo,{"aria-hidden":`true`,size:16}),` `,t]}),(0,y.jsx)(`h2`,{children:e.title}),(0,y.jsx)(`p`,{children:e.id})]}),(0,y.jsx)(`button`,{"aria-label":i?`Fechar`:`Close`,onClick:r,type:`button`,children:(0,y.jsx)(cs,{"aria-hidden":`true`,size:20})})]}),(0,y.jsx)(`div`,{className:`operations-prd-document-scroll`,children:(0,y.jsx)(gu,{content:e.body})}),(0,y.jsx)(`footer`,{children:e.artifact_path})]})}),document.body)}function gu({content:e}){return(0,y.jsx)(`article`,{className:`operations-prd-markdown`,children:_u(e).map((e,t)=>{let n=`${e.kind}-${t}`;return e.kind===`heading`?(0,y.jsx)(`h${e.level}`,{children:bu(e.content)},n):e.kind===`paragraph`?(0,y.jsx)(`p`,{children:bu(e.content)},n):e.kind===`list`?(0,y.jsx)(e.ordered?`ol`:`ul`,{children:e.items.map(e=>(0,y.jsx)(`li`,{children:bu(e)},e))},n):e.kind===`quote`?(0,y.jsx)(`blockquote`,{children:bu(e.content)},n):e.kind===`code`?(0,y.jsx)(`pre`,{children:(0,y.jsx)(`code`,{"data-language":e.language??void 0,children:e.content})},n):e.kind===`table`?(0,y.jsx)(`div`,{className:`operations-prd-markdown-table`,children:(0,y.jsxs)(`table`,{children:[(0,y.jsx)(`thead`,{children:(0,y.jsx)(`tr`,{children:e.headers.map(e=>(0,y.jsx)(`th`,{children:bu(e)},e))})}),(0,y.jsx)(`tbody`,{children:e.rows.map(e=>(0,y.jsx)(`tr`,{children:e.map(e=>(0,y.jsx)(`td`,{children:bu(e)},e))},e.join(`|`)))})]})},n):(0,y.jsx)(`hr`,{},n)})})}function _u(e){let t=e.replace(/\r\n/g,`
75
+ `).split(`
76
+ `),n=[],r=[],i=()=>{let e=r.join(` `).trim();e&&n.push({kind:`paragraph`,content:e}),r=[]};for(let e=0;e<t.length;e+=1){let a=t[e]??``,o=a.match(/^(#{1,3})\s+(.+)$/);if(o){i(),n.push({kind:`heading`,level:(o[1]??`#`).length,content:o[2]??``});continue}if(/^\s*(```|~~~)/.test(a)){i();let r=a.trim().slice(0,3),o=[],s=a.trim().slice(3).trim()||null;for(;++e<t.length&&!(t[e]??``).trim().startsWith(r);)o.push(t[e]??``);n.push({kind:`code`,content:o.join(`
77
+ `),language:s});continue}if(a.includes(`|`)&&e+1<t.length&&vu(t[e+1]??``)){i();let r=yu(a),o=[];for(e+=2;e<t.length&&(t[e]??``).includes(`|`);)o.push(yu(t[e]??``)),e+=1;--e,n.push({kind:`table`,headers:r,rows:o});continue}let s=a.match(/^\s*(?:([-*+])|(\d+)\.)\s+(.+)$/);if(s){i();let r=!!s[2],a=[s[3]??``];for(;e+1<t.length;){let n=(t[e+1]??``).match(/^\s*(?:([-*+])|(\d+)\.)\s+(.+)$/);if(!n||!!n[2]!==r)break;a.push(n[3]??``),e+=1}n.push({kind:`list`,ordered:r,items:a});continue}if(/^\s*>\s?/.test(a)){i(),n.push({kind:`quote`,content:a.replace(/^\s*>\s?/,``)});continue}if(/^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/.test(a)){i(),n.push({kind:`rule`});continue}if(!a.trim()){i();continue}r.push(a.trim())}return i(),n}function vu(e){return yu(e).every(e=>/^:?-{3,}:?$/.test(e.replace(/\s/g,``)))}function yu(e){return e.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim())}function bu(e){return e.split(/(\*\*[^*]+\*\*|`[^`]+`|\*[^*]+\*|\[[^\]]+\]\([^\s)]+\))/g).map(e=>{if(e.startsWith(`**`)&&e.endsWith(`**`))return(0,y.jsx)(`strong`,{children:e.slice(2,-2)},e);if(e.startsWith("`")&&e.endsWith("`"))return(0,y.jsx)(`code`,{children:e.slice(1,-1)},e);if(e.startsWith(`*`)&&e.endsWith(`*`))return(0,y.jsx)(`em`,{children:e.slice(1,-1)},e);let t=e.match(/^\[([^\]]+)\]\(([^\s)]+)\)$/);return t?(0,y.jsx)(`a`,{href:t[2],rel:`noreferrer`,target:`_blank`,children:t[1]},e):(0,y.jsx)(l.Fragment,{children:e},e)})}function xu(e,t){let n=new Map(e.map(e=>[e.key,e]));for(let e of t??[])n.has(e)||n.set(e,Su(e));return[...n.values()].sort((e,t)=>t.latest_started_at.localeCompare(e.latest_started_at)||e.label.localeCompare(t.label))}function Su(e){return{key:e,label:e,latest_started_at:``,run_count:0,task_count:0,prd_count:0,spec_count:0,evidence_count:0,test_count:0,event_count:0,total_tokens:0,estimated_usd:0,estimated_brl:0,duration_ms:0,duration:{known_sum:0,unknown:0,complete:!0,coverage_ratio:1},coverage:{events:0,tokens:0,usd:0,brl:0}}}function Cu(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)}function wu(e,t=`all_invocations`){let n=new Map;for(let t of e)n.has(t.run_id)||n.set(t.run_id,t);let r=[...n.values()];if(t===`all_invocations`)return r;let i=new Set(r.map(e=>e.run_id));return t===`all_execution`?r.filter(e=>e.phase===`execution`):r.filter(e=>e.phase===`execution`&&(e.parent_run_id===null||!i.has(e.parent_run_id)))}function Tu(e,t=`all_invocations`){let n=wu(e,t),r=n.filter(e=>e.duration_ms!==null),i=n.length-r.length;return{known_sum:r.reduce((e,t)=>e+t.duration_ms,0),unknown:i,complete:i===0,coverage_ratio:n.length===0?1:r.length/n.length}}function Eu(e){let t=e?.trim().toLowerCase();return!t||t===`unknown`||t===`codex`?`openai`:t}var Du={events:0,tokens:0,usd:0,brl:0};function Ou(e,t){let n=new Map;for(let e of t)e.task_id!==null&&n.set(e.task_id,[...n.get(e.task_id)??[],e]);return e.filter(e=>n.has(e.id)).map(e=>ku(e,n.get(e.id)??[])).sort((e,t)=>t.latest_started_at.localeCompare(e.latest_started_at))}function ku(e,t){let n=Tu(t);return{key:e.id,label:e.title,latest_started_at:e.created_at,run_count:t.length,task_count:1,tasksCreated:1,tasksActive:1,prd_count:0,spec_count:0,evidence_count:0,test_count:e.test_count??0,event_count:t.reduce((e,t)=>e+t.event_count,0),total_tokens:Au(t.map(e=>e.total_tokens)),estimated_usd:Au(t.map(e=>e.estimated_usd)),estimated_brl:Au(t.map(e=>e.estimated_brl)),duration_ms:n.complete?n.known_sum:null,duration:n,coverage:t.reduce((e,t)=>({events:e.events+t.coverage.events,tokens:e.tokens+t.coverage.tokens,usd:e.usd+t.coverage.usd,brl:e.brl+t.coverage.brl}),Du)}}function Au(e){return e.length===0||e.some(e=>e===null)?null:e.reduce((e,t)=>e+t,0)}var ju=[`#00b0f0`,`#5ea7ff`,`#a78bfa`,`#f5c451`,`#fb7185`,`#94a3b8`];function Mu({rows:e,daily:t,models:n,currency:r,locale:i}){let a=Nu(i),o=[[a.input,Bu(e.map(e=>e.input_tokens))],[a.cache,Bu(e.map(e=>e.cached_input_tokens))],[a.output,Bu(e.map(e=>e.output_tokens))],[a.reasoning,Bu(e.map(e=>e.reasoning_tokens))]],s=Iu(n,r),c=Math.max(1,...s.map(e=>Fu(e,r)??0)),l=Lu(t,r),u=Math.max(1,...l.map(e=>e.value)),d=l.map((e,t)=>({...e,x:t/(l.length-1)*100,y:82-e.value/u*58})),f=d.map(e=>`${e.x},${e.y}`).join(` `);return(0,y.jsxs)(`section`,{className:`cost-chart-grid`,"aria-label":a.analyticsView,children:[(0,y.jsxs)(`article`,{className:`cost-chart cost-chart-trend`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`small`,{children:a.trend}),(0,y.jsx)(`h2`,{children:a.dailyCost})]}),(0,y.jsx)(`strong`,{children:a.sevenDays})]}),(0,y.jsxs)(`div`,{className:`cost-trend-plot`,children:[(0,y.jsxs)(`svg`,{className:`cost-line-chart`,role:`img`,viewBox:`0 0 100 100`,preserveAspectRatio:`none`,children:[(0,y.jsx)(`title`,{children:a.dailyCostChart}),(0,y.jsx)(`defs`,{children:(0,y.jsxs)(`linearGradient`,{id:`cost-area`,x1:`0`,x2:`0`,y1:`0`,y2:`1`,children:[(0,y.jsx)(`stop`,{stopColor:`#00b0f0`,stopOpacity:`.34`}),(0,y.jsx)(`stop`,{offset:`1`,stopColor:`#00b0f0`,stopOpacity:`0`})]})}),(0,y.jsx)(`polygon`,{fill:`url(#cost-area)`,points:`0,100 ${f} 100,100`}),(0,y.jsx)(`polyline`,{fill:`none`,points:f,stroke:`#00b0f0`,strokeWidth:`2`,vectorEffect:`non-scaling-stroke`})]}),d.map((e,t)=>(0,y.jsx)(`span`,{className:`cost-trend-value${t===0?` is-first`:t===d.length-1?` is-last`:``}`,style:{left:`${e.x}%`,top:`${e.y}%`},children:P(e.value,r,i)},e.key))]}),(0,y.jsx)(`div`,{className:`cost-trend-days`,children:d.map(e=>(0,y.jsx)(`span`,{children:zu(e.date,i)},e.key))})]}),(0,y.jsxs)(`article`,{className:`cost-chart cost-chart-model`,children:[(0,y.jsx)(`header`,{children:(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`small`,{children:a.distribution}),(0,y.jsx)(`h2`,{children:a.costByModel})]})}),(0,y.jsx)(`div`,{className:`cost-bar-list`,children:s.slice(0,6).map((e,t)=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:e.label}),(0,y.jsx)(`i`,{children:(0,y.jsx)(`b`,{style:{width:`${(Fu(e,r)??0)/c*100}%`,background:ju[t]}})}),(0,y.jsx)(`strong`,{children:P(Fu(e,r),r,i)})]},e.key))})]}),(0,y.jsxs)(`article`,{className:`cost-chart`,children:[(0,y.jsx)(`header`,{children:(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`small`,{children:a.composition}),(0,y.jsx)(`h2`,{children:a.tokenMix})]})}),(0,y.jsx)(`div`,{className:`token-mix`,children:o.map(([e,t],n)=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`i`,{style:{background:ju[n]}}),(0,y.jsx)(`span`,{children:e}),(0,y.jsx)(`strong`,{children:M(t,i)})]},e))})]}),(0,y.jsxs)(`article`,{className:`cost-chart cost-chart-phases`,children:[(0,y.jsx)(`header`,{children:(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`small`,{children:a.phases}),(0,y.jsx)(`h2`,{children:a.totalsByPhase})]})}),(0,y.jsx)(`div`,{className:`phase-strip`,children:[`conversation`,`planning`,`execution`].map((t,n)=>{let a=e.filter(e=>e.phase===t),o=Bu(a.map(e=>e.duration_ms)),s=Bu(a.map(e=>e.total_tokens)),c=Bu(a.map(e=>r===`BRL`?e.estimated_brl:e.estimated_usd));return(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`phase-name`,children:[(0,y.jsx)(`i`,{style:{background:ju[n]}}),(0,y.jsx)(`span`,{children:Pu(t,i)})]}),(0,y.jsxs)(`dl`,{className:`phase-metrics`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`dt`,{children:i===`pt-BR`?`Tempo`:`Time`}),(0,y.jsx)(`dd`,{children:A(o,i)})]}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`dt`,{children:`Tokens`}),(0,y.jsx)(`dd`,{children:M(s,i)})]}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`dt`,{children:i===`pt-BR`?`Custo`:`Cost`}),(0,y.jsx)(`dd`,{children:P(c,r,i)})]})]})]},t)})})]})]})}function Nu(e){return e===`pt-BR`?{analyticsView:`Visão analítica`,trend:`TENDÊNCIA`,dailyCost:`Custo diário`,sevenDays:`7 dias`,dailyCostChart:`Custo diário dos últimos 7 dias`,distribution:`DISTRIBUIÇÃO`,costByModel:`Custo por modelo`,composition:`COMPOSIÇÃO`,tokenMix:`Mix de tokens`,phases:`FASES`,totalsByPhase:`Totais por fase`,input:`Entrada`,cache:`Cache`,output:`Saída`,reasoning:`Raciocínio`}:{analyticsView:`Analytics overview`,trend:`TREND`,dailyCost:`Daily cost`,sevenDays:`7 days`,dailyCostChart:`Daily cost for the last 7 days`,distribution:`DISTRIBUTION`,costByModel:`Cost by model`,composition:`COMPOSITION`,tokenMix:`Token mix`,phases:`PHASES`,totalsByPhase:`Totals by phase`,input:`Input`,cache:`Cache`,output:`Output`,reasoning:`Reasoning`}}function Pu(e,t){return t===`en-US`?e===`conversation`?`Conversation`:e===`planning`?`Planning`:`Execution`:e===`conversation`?`Conversa`:e===`planning`?`Planejamento`:`Execução`}function Fu(e,t){return t===`BRL`?e.estimated_brl:e.estimated_usd}function Iu(e,t){return e.filter(e=>Fu(e,t)!==null)}function Lu(e,t,n=new Date){let r=new Map(e.map(e=>[e.key,Fu(e,t)??0]));return Array.from({length:7},(e,t)=>{let i=new Date(n.getFullYear(),n.getMonth(),n.getDate()-(6-t)),a=Ru(i);return{date:i,key:a,value:r.get(a)??0}})}function Ru(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function zu(e,t){return new Intl.DateTimeFormat(t,{weekday:`short`,day:`2-digit`,month:`2-digit`}).format(e).replace(`.`,``)}function Bu(e){let t=e.filter(e=>e!==null);return t.length?t.reduce((e,t)=>e+t,0):null}function Vu(e,t=new Date){if(Number.isNaN(t.getTime()))throw RangeError(`Invalid Cost Monitor period anchor`);let n=g(t.toISOString(),`day`);if(n===null)throw RangeError(`Invalid Cost Monitor period anchor`);if(e===`all`)return;if(e===`month`)return{from:`${n.slice(0,7)}-01`,to:n};let r=new Date(`${n}T12:00:00.000Z`);return r.setUTCDate(r.getUTCDate()-(Number(e)-1)),{from:g(r.toISOString(),`day`)??n,to:n}}async function Hu({currency:e,filters:t,from:n,refresh:r,to:i,signal:a,fetcher:o=fetch}){let s=new URLSearchParams({currency:e});if(n!==void 0&&s.set(`from`,n),i!==void 0&&s.set(`to`,i),t){let e=[[`provider`,t.provider],[`phase`,t.phase],[`agent`,t.agent],[`model`,t.model],[`status`,t.status]];for(let[t,n]of e)n&&s.set(t,n)}r&&s.set(`refresh`,r);let c=await o(`/api/v2/cost-monitor?${s.toString()}`,{...a===void 0?{}:{signal:a}});if(!c.ok){let e=(await c.text()).trim();throw Error(e||`Cost Monitor period request failed (${c.status})`)}return await c.json()}function Uu({currency:e,data:t,dateRange:n,filters:r,lastUpdatedAt:i,loadPeriod:a,period:o,snapshotBacked:s=!1}){let[c,u]=(0,l.useState)(null),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(null),_=(0,l.useRef)(!0),v=n===void 0?Vu(o):{from:n.start,to:n.end},y=Wu({filters:r,period:o,snapshotBacked:s});return(0,l.useEffect)(()=>{if(!y){_.current=!1;return}if(_.current&&Object.values(r).every(e=>e===``)){_.current=!1;return}_.current=!1;let n=new AbortController;return m(!0),g(null),a({currency:e,filters:r,...v===void 0?{}:{from:v.from,to:v.to},refresh:i,signal:n.signal}).then(e=>{n.signal.aborted||(f(t),u(e))}).catch(e=>{n.signal.aborted||g(e instanceof Error?e.message:String(e))}).finally(()=>{n.signal.aborted||m(!1)}),()=>n.abort()},[e,t,r,i,a,v?.from,v?.to,y,v]),{activeData:Gu(t,c,d),periodError:h,periodLoading:p}}function Wu({filters:e,period:t,snapshotBacked:n}){return!(n&&t===`all`&&Object.values(e).every(e=>e===``))}function Gu(e,t,n){return t!==null&&n===e?t:e}var X={query:``,provider:``,phase:``,origin:``,workType:``,agent:``,model:``,status:``,priority:``,risk:``};function Ku({available:e,hideQuery:t=!1,locale:n,value:r,onChange:i}){let a=(e,t)=>i({...r,[e]:t}),o=n===`en-US`?{search:`Search costs`,placeholder:`Invocation, task, model…`,agent:`Agent`,model:`Model`,priority:`Priority`,risk:`Risk`,phase:`Phase`,origin:`Origin`,work:`Work`,all:`All`,clear:`Clear`}:{search:`Buscar custos`,placeholder:`Invocação, tarefa, modelo…`,agent:`Agente`,model:`Modelo`,priority:`Prioridade`,risk:`Risco`,phase:`Fase`,origin:`Entrada`,work:`Trabalho`,all:`Todos`,clear:`Limpar`};return(0,y.jsxs)(`section`,{className:`cost-filters`,children:[t?null:(0,y.jsx)(`input`,{"aria-label":o.search,onChange:e=>a(`query`,e.target.value),placeholder:o.placeholder,value:r.query}),(0,y.jsx)(qu,{allLabel:o.all,label:`Provider`,onChange:e=>a(`provider`,e),options:e.providers,value:r.provider}),(0,y.jsx)(qu,{allLabel:o.all,label:o.agent,onChange:e=>a(`agent`,e),options:e.agents,value:r.agent}),(0,y.jsx)(qu,{allLabel:o.all,label:o.model,onChange:e=>a(`model`,e),options:e.models,value:r.model}),(0,y.jsx)(qu,{label:`Status`,allLabel:o.all,onChange:e=>a(`status`,e),options:e.statuses,value:r.status}),(0,y.jsx)(qu,{allLabel:o.all,label:o.priority,onChange:e=>a(`priority`,e),options:e.priorities,value:r.priority}),(0,y.jsx)(qu,{allLabel:o.all,label:o.risk,onChange:e=>a(`risk`,e),options:e.risks,value:r.risk}),(0,y.jsx)(qu,{allLabel:o.all,label:o.phase,onChange:e=>a(`phase`,e),options:e.phases,value:r.phase}),(0,y.jsx)(qu,{allLabel:o.all,label:o.origin,onChange:e=>a(`origin`,e),options:e.origins,value:r.origin}),(0,y.jsx)(qu,{allLabel:o.all,label:o.work,onChange:e=>a(`workType`,e),options:e.work_types,value:r.workType}),(0,y.jsx)(`button`,{onClick:()=>i(X),type:`button`,children:o.clear})]})}function qu({allLabel:e=`Todos`,label:t,value:n,options:r,onChange:i}){return(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:t}),(0,y.jsxs)(`select`,{onChange:e=>i(e.target.value),value:n,children:[(0,y.jsx)(`option`,{value:``,children:e}),r.map(e=>(0,y.jsx)(`option`,{value:e,children:e},e))]})]})}function Ju({locale:e}){return e===`pt-BR`?(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`cost-locale-flag`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`rect`,{fill:`#18864b`,height:`24`,rx:`5`,width:`24`}),(0,y.jsx)(`path`,{d:`m12 3.8 8.2 8.2L12 20.2 3.8 12 12 3.8Z`,fill:`#f6d64a`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,fill:`#1b4f9c`,r:`4.2`}),(0,y.jsx)(`path`,{d:`M8.8 11.2c1.9-1 4.5-1 6.4 0`,fill:`none`,stroke:`#fff`,strokeWidth:`.8`})]}):(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`cost-locale-flag`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`rect`,{fill:`#fff`,height:`24`,rx:`5`,width:`24`}),(0,y.jsx)(`path`,{d:`M0 3h24v3H0Zm0 6h24v3H0Zm0 6h24v3H0Zm0 6h24v3H0Z`,fill:`#bd3d44`}),(0,y.jsx)(`path`,{d:`M0 0h11v11H0Z`,fill:`#192f6b`}),(0,y.jsx)(`path`,{d:`m2.3 2.1.5 1 .9.1-.7.7.2 1-.9-.5-.9.5.2-1-.7-.7.9-.1.5-1Zm4 0 .5 1 .9.1-.7.7.2 1-.9-.5-.9.5.2-1-.7-.7.9-.1.5-1Z`,fill:`#fff`})]})}function Yu(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,className:`cost-locale-chevron`,fill:`none`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{d:`m6 9 6 6 6-6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`})})}function Xu(){return(0,y.jsx)(`svg`,{"aria-hidden":`true`,className:`cost-filter-icon`,fill:`none`,viewBox:`0 0 24 24`,children:(0,y.jsx)(`path`,{d:`M3 6h18M7 12h10m-7 6h4`})})}function Zu(){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`cost-settings-icon`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.09a2 2 0 0 1 1 1.74v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}function Qu(e,t,n){let r=new Map(e.map(e=>[e.key,{...e,tasksActive:e.tasksActive??e.task_count,taskDaysActive:e.tasksActive??e.task_count,tasksCreated:0}])),i=new Map,a=e=>{let t=nd(e,n);if(t===null)return null;let i=r.get(t);if(i!==void 0)return i;let a={key:t,label:t,latest_started_at:rd(t,n),run_count:0,task_count:0,tasksCreated:0,tasksActive:0,taskDaysActive:0,event_count:0,total_tokens:null,estimated_usd:null,estimated_brl:null,duration_ms:null,duration:{known_sum:0,unknown:0,complete:!0,coverage_ratio:1},coverage:{events:0,tokens:0,usd:0,brl:0},prd_count:0,spec_count:0,evidence_count:0,test_count:0};return r.set(t,a),a};for(let e of t.prds){let t=a(e.created_at);t!==null&&(t.prd_count+=1)}for(let e of t.specs){let t=a(e.created_at);t!==null&&(t.spec_count+=1)}for(let e of t.tasks){let t=a(e.created_at);if(t===null)continue;t.tasksCreated=(t.tasksCreated??0)+1,t.test_count+=e.test_count??0;let n=i.get(t.key)??new Set;for(let t of e.result?.evidence_ids??[])n.add(t);i.set(t.key,n)}for(let[e,t]of i){let n=r.get(e);n!==void 0&&(n.evidence_count=t.size)}return[...r.values()].sort((e,t)=>t.key.localeCompare(e.key))}function $u(e,t){let n=e.length;return{tasks:n===0?null:e.reduce((e,t)=>e+t.task_count,0)/n,specs:n===0?null:e.reduce((e,t)=>e+t.spec_count,0)/n,prds:n===0?null:e.reduce((e,t)=>e+t.prd_count,0)/n,durationMs:td(e.map(e=>e.duration_ms),n),tokens:ed(e.map(e=>e.total_tokens)),cost:ed(e.map(e=>t===`BRL`?e.estimated_brl:e.estimated_usd))}}function ed(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)/t.length}function td(e,t){return t===0?null:e.reduce((e,t)=>e+(t??0),0)/t}function nd(e,t){return g(e,t===`daily`?`day`:t===`monthly`?`month`:`year`)}function rd(e,t){return t===`annual`?`${e}-01-01T00:00:00.000Z`:t===`monthly`?`${e}-01T00:00:00.000Z`:`${e}T00:00:00.000Z`}function id({currency:e,locale:t,period:n,rows:r}){let i=$u(r,e);return(0,y.jsx)(L,{ariaLabel:ad(n,t),metrics:[{label:od(t===`pt-BR`?`Tarefas`:`Tasks`,n,t),value:N(i.tasks,t,1)},{label:od(`SPECs`,n,t),value:N(i.specs,t,1)},{label:od(`PRDs`,n,t),value:N(i.prds,t,1)},{label:od(t===`pt-BR`?`Tempo`:`Time`,n,t),value:j(i.durationMs,t)},{label:od(`Tokens`,n,t),value:M(i.tokens,t)},{label:od(t===`pt-BR`?`Custo`:`Cost`,n,t),value:P(i.cost,e,t)}]})}function ad(e,t){return t===`en-US`?e===`daily`?`Daily averages`:e===`monthly`?`Monthly averages`:`Annual averages`:e===`daily`?`Médias por dia`:e===`monthly`?`Médias por mês`:`Médias por ano`}function od(e,t,n){return n===`en-US`?`${e} ${t===`daily`?`Daily average`:t===`monthly`?`Monthly average`:`Annual average`}`:`${e} ${t===`daily`?`Médio por dia`:t===`monthly`?`Médio por mês`:`Médio por ano`}`}function sd({overview:e,currency:t,locale:n}){let r=n===`pt-BR`,i=t===`BRL`?e.estimated_brl:e.estimated_usd;return(0,y.jsx)(`section`,{"aria-label":`Resumo de custos`,className:`cost-summary`,children:[[r?`Custo estimado`:`Estimated cost`,P(i,t,n),r?`Período atual · custo observado`:`Current period · observed cost`],[`Tokens`,M(e.total_tokens,n),r?`${e.coverage.tokens}/${e.event_count} eventos · ${M(e.known_tokens_per_cycle,n)} tokens/ciclo`:`${e.coverage.tokens}/${e.event_count} events · ${M(e.known_tokens_per_cycle,n)} tokens/cycle`],[r?`BRL registrado`:`Recorded BRL`,P(e.recorded_brl,`BRL`,n),r?`Histórico fixado no registro`:`Historical value fixed when recorded`],[r?`Tarefas ativas`:`Active tasks`,String(e.task_count),r?`${e.task_count} no período`:`${e.task_count} in period`],[r?`Invocações de Agentes`:`Agent Invocations`,String(e.run_count),r?`${e.event_count} segmentos de uso · top 10 = ${cd(e.top_10_token_share,n)}`:`${e.event_count} usage segments · top 10 = ${cd(e.top_10_token_share,n)}`]].map(([e,t,n])=>(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{children:e}),(0,y.jsx)(`strong`,{children:t}),(0,y.jsx)(`small`,{children:n})]},e))})}function cd(e,t){return e===null?`—`:new Intl.NumberFormat(t,{style:`percent`,maximumFractionDigits:1}).format(e)}function ld(){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1.5`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1.5`})]})}function ud(e,t=`all_invocations`){return wu(e,t)}function dd(e,t){return e===`fast`?t===`pt-BR`?`Priority (derivado de Fast)`:`Priority (derived from Fast)`:e===`priority`?`Priority (API)`:e==="default"?`Standard (API)`:`-`}function fd(e){return{primary:e.model,detail:e.provider===null||e.provider===`unknown`?`-`:e.provider}}function pd(e){let t=e.trim().toLowerCase();return t.length>0&&![`unknown`,`manual`,`gpt-5`].includes(t)}function md(e){return[e.input_tokens,e.cached_input_tokens,e.output_tokens,e.reasoning_tokens,e.total_tokens,e.estimated_usd,e.estimated_brl].some(e=>e!==null&&e>0)}function hd(e){let t=e.context_input_multiplier,n=e.context_output_multiplier;if(t===null||n===null)return null;if(t===1&&n===1)return 0;let r=(e,t)=>{if(t===1)return 0;if(t<=0||e.some(e=>e===null))return null;let n=e.reduce((e,t)=>e+(t??0),0);return n-n/t},i=r([e.input_cost_usd,e.cached_input_cost_usd],t),a=r([e.output_cost_usd,e.reasoning_cost_usd],n);return i===null||a===null?null:i+a}function gd(e,t,n){return e===`pt-BR`?t:n}function _d(e){let t=e.filter(e=>typeof e==`number`);return t.length===0?null:t.reduce((e,t)=>e+t,0)}function vd(e,t){return new Set(e.map(e=>e.service_tier??`unknown`)).size===1?dd(e[0]?.service_tier??null,t):t===`pt-BR`?`Misto`:`Mixed`}function yd({rows:e,locale:t}){let n=new Map,r=new Set(ud(e));for(let r of e){let e=bd(r.model,t);e===null||!Z(r)||n.set(e,[...n.get(e)??[],r])}let i=[...n].map(([e,n])=>{let i=e=>n.reduce((t,n)=>{let r=n[e];return typeof r==`number`?(t??0)+r:t},null),a=i(`input_tokens`),o=i(`cached_input_tokens`),s=i(`output_tokens`),c=i(`input_cost_usd`),l=i(`cached_input_cost_usd`),u=i(`output_cost_usd`),d=i(`reasoning_cost_usd`),f=i(`estimated_usd`),p=i(`estimated_brl`),m=_d(n.map(hd)),h=Tu(n.filter(e=>r.has(e)),`all_invocations`);return{model:e,runs:n.length,duration:h,durationMs:h.complete?h.known_sum:null,input:a,cached:o,output:s,reasoning:i(`reasoning_tokens`),total:i(`total_tokens`),inputUsd:c,cacheUsd:l,outputUsd:u,reasoningUsd:d,contextUpliftUsd:m,speedUpliftUsd:i(`speed_uplift_usd`),estimatedUsd:f,estimatedBrl:p,scenario:vd(n,t)}}).sort((e,t)=>e.model.localeCompare(t.model));return(0,y.jsx)(k,{columns:[{key:`model`,label:`Modelo`,render:e=>e.model,sortValue:e=>e.model,footer:`Total`,description:gd(t,`Modelo efetivamente identificado nas invocações de agentes agregadas nesta linha. Invocações sem modelo identificável são agrupadas como Indefinido.`,`Model identified in the agent invocations aggregated in this row. Invocations without an identifiable model are grouped as Undefined.`)},{key:`scenario`,hidden:!0,label:t===`pt-BR`?`Velocidade`:`Speed`,render:e=>e.scenario,sortValue:e=>e.scenario,description:gd(t,`Velocidade observada nas invocações de agentes. Misto indica que o grupo contém mais de um cenário de velocidade.`,`Speed observed in agent invocations. Mixed indicates that the group contains more than one speed scenario.`)},{key:`runs`,label:t===`pt-BR`?`Invocações de Agentes`:`Agent Invocations`,render:e=>e.runs,sortValue:e=>e.runs,align:`right`,footer:i.reduce((e,t)=>e+t.runs,0)},{key:`durationMs`,label:t===`pt-BR`?`Tempo de processamento`:`Processing time`,render:e=>Dd(e.duration,t),sortValue:e=>e.duration.coverage_ratio>0?e.duration.known_sum:null,description:gd(t,`Soma do tempo observado de todas as Invocações de Agente financeiras elegíveis deste modelo. Cada ID de invocação entra uma vez; dados ausentes permanecem parciais e não são estimados.`,`Sum of observed time for all eligible financial Agent Invocations of this model. Each invocation ID is included once; missing data remains partial and is not estimated.`),align:`right`,footer:Dd(Tu([...r],`all_invocations`),t)},{key:`input`,label:t===`pt-BR`?`Tokens de entrada`:`Input tokens`,render:e=>Cd(e.input,t),sortValue:e=>e.input,align:`right`,footer:Cd(_d(i.map(e=>e.input)),t)},{key:`cache`,label:t===`pt-BR`?`Tokens em cache`:`Cached tokens`,render:e=>Cd(e.cached,t),sortValue:e=>e.cached,description:gd(t,`Parcela dos tokens de entrada atendida pelo cache. Ela está contida em Tokens de entrada e não deve ser somada novamente ao total de tokens.`,`Share of input tokens served from cache. It is included in Input tokens and must not be added to the token total again.`),align:`right`,footer:Cd(_d(i.map(e=>e.cached)),t)},{key:`output`,label:t===`pt-BR`?`Tokens de saída`:`Output tokens`,render:e=>Cd(e.output,t),sortValue:e=>e.output,align:`right`,footer:Cd(_d(i.map(e=>e.output)),t)},{key:`reasoning`,label:t===`pt-BR`?`Tokens de raciocínio`:`Reasoning tokens`,render:e=>Cd(e.reasoning,t),sortValue:e=>e.reasoning,description:gd(t,`Tokens internos de raciocínio reportados pelo provedor. São parte da saída e aparecem separados para auditoria, sem duplicar o total de tokens.`,`Internal reasoning tokens reported by the provider. They are part of the output and are shown separately for auditing without duplicating the token total.`),align:`right`,footer:Cd(_d(i.map(e=>e.reasoning)),t)},{key:`total`,label:t===`pt-BR`?`Total de tokens`:`Total tokens`,render:e=>Cd(e.total,t),sortValue:e=>e.total,description:gd(t,`Total auditável calculado como tokens de entrada mais tokens de saída. Cache e raciocínio são subconjuntos e não são adicionados novamente.`,`Auditable total calculated as input tokens plus output tokens. Cache and reasoning are subsets and are not added again.`),align:`right`,footer:Cd(_d(i.map(e=>e.total)),t)},{key:`inputUsd`,label:t===`pt-BR`?`Custo entrada (USD)`:`Input cost (USD)`,render:e=>$(e.inputUsd,t),sortValue:e=>e.inputUsd,align:`right`,footer:$(_d(i.map(e=>e.inputUsd)),t)},{key:`cacheUsd`,label:t===`pt-BR`?`Custo cache (USD)`:`Cache cost (USD)`,render:e=>$(e.cacheUsd,t),sortValue:e=>e.cacheUsd,align:`right`,footer:$(_d(i.map(e=>e.cacheUsd)),t)},{key:`outputUsd`,label:t===`pt-BR`?`Custo saída (USD)`:`Output cost (USD)`,render:e=>$(e.outputUsd,t),sortValue:e=>e.outputUsd,align:`right`,footer:$(_d(i.map(e=>e.outputUsd)),t)},{key:`reasoningUsd`,label:t===`pt-BR`?`Custo raciocínio (USD)`:`Reasoning cost (USD)`,render:e=>$(e.reasoningUsd,t),sortValue:e=>e.reasoningUsd,align:`right`,footer:$(_d(i.map(e=>e.reasoningUsd)),t)},{key:`contextUpliftUsd`,label:t===`pt-BR`?`Acréscimo contexto incluído (USD)`:`Included context uplift (USD)`,render:e=>$(e.contextUpliftUsd,t),sortValue:e=>e.contextUpliftUsd,description:gd(t,`Parcela adicional causada pelos multiplicadores de contexto. Ela já está incluída nos custos e no Total (USD); não deve ser somada novamente. O cálculo usa os segmentos internos de cada Invocação de Agente, sem criar uma visão separada de Chamadas LLM; multiplicadores 1× / 1× resultam em US$ 0,00.`,`Additional amount caused by context multipliers. It is already included in costs and Total (USD) and must not be added again. The calculation uses each Agent Invocation's internal segments without creating a separate LLM Calls view; 1× / 1× multipliers result in US$0.00.`),align:`right`,footer:$(_d(i.map(e=>e.contextUpliftUsd)),t)},{key:`speedUpliftUsd`,label:t===`pt-BR`?`Acréscimo velocidade incluído (USD)`:`Included speed uplift (USD)`,render:e=>$(e.speedUpliftUsd,t),sortValue:e=>e.speedUpliftUsd,description:gd(t,`Diferença entre o custo efetivo Priority/Fast e o custo Standard equivalente. Já está incluída nos custos efetivos e no Total (USD); é separada apenas como referência.`,`Difference between the effective Priority/Fast cost and the equivalent Standard cost. It is already included in effective costs and Total (USD) and is separated only for reference.`),align:`right`,footer:$(_d(i.map(e=>e.speedUpliftUsd)),t)},{key:`estimatedUsd`,label:t===`pt-BR`?`Custo Final no Período`:`Period final cost`,render:e=>$(e.estimatedUsd,t),sortValue:e=>e.estimatedUsd,description:gd(t,`Custo efetivo total em USD, incluindo tarifas de contexto e velocidade quando aplicáveis.`,`Total effective cost in USD, including context and speed rates when applicable.`),align:`right`,footer:$(_d(i.map(e=>e.estimatedUsd)),t)},{key:`estimatedBrl`,label:t===`pt-BR`?`Custo Final atual`:`Current final cost`,render:e=>P(e.estimatedBrl,`BRL`,t),sortValue:e=>e.estimatedBrl,description:gd(t,`Conversão do Total (USD) pela cotação atual configurada no projeto.`,`Conversion of Total (USD) using the current exchange rate configured for the project.`),align:`right`,footer:P(_d(i.map(e=>e.estimatedBrl)),`BRL`,t)}],locale:t,pageSize:100,rowKey:e=>e.model,rows:i,showColumnInfo:!0,sortable:!0})}function bd(e,t){if(pd(e))return e;let n=e.trim().toLowerCase();return n.length===0||n===`unknown`?t===`pt-BR`?`Indefinido`:`Undefined`:null}function Z(e){return md(e)||e.duration_ms!==null}var xd={"pt-BR":`Indisponível`,"en-US":`Unavailable`};function Sd(e){return xd[e]}function Cd(e,t){return e===null?Sd(t):new Intl.NumberFormat(t,{maximumFractionDigits:0}).format(e)}function wd(e,t){return e===null?Sd(t):M(e,t)}function Td(e,t,n){return e===null?Sd(n):P(e,t,n)}function Ed(e,t){return e===null?Sd(t):A(e,t)}function Dd(e,t){return e.complete||e.coverage_ratio>0?A(e.known_sum,t):Sd(t)}function Od(e,t,n){return e===`BRL`?t:n}function kd(e){return e.prd_id===null?e.spec_id===null?{label:`Tarefa avulsa`,tone:`task`}:{label:`SPEC`,tone:`spec`}:{label:`PRD`,tone:`prd`}}function Ad({rows:e,onOpenRun:t,currency:n,locale:r,compact:i=!1}){let a=t=>_d(e.map(e=>e[t])),o=jd(e),s=t=>!i||Md(e,t);return(0,y.jsx)(k,{columns:[{key:`startedAt`,label:r===`pt-BR`?`Data e hora`:`Date and time`,render:e=>Hd(e.started_at,r),footer:`Total`},{key:`run`,label:r===`pt-BR`?`Invocação`:`Agent invocation`,render:e=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:e.run_id}),(0,y.jsx)(`small`,{children:e.task_title})]})},{key:`origin`,label:r===`pt-BR`?`Origem`:`Origin`,render:e=>{let t=kd(e);return(0,y.jsx)(`span`,{className:`cost-run-origin cost-run-origin-${t.tone}`,children:t.label})}},{key:`duration`,label:r===`pt-BR`?`Tempo de execução`:`Execution time`,render:e=>e.duration_provenance===`legacy_inferred`?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{children:Ed(e.duration_ms,r)}),(0,y.jsx)(`small`,{children:r===`pt-BR`?`Tempo inferido`:`Inferred time`})]}):Ed(e.duration_ms,r),sortValue:e=>e.duration_ms,align:`right`,footer:Ed(o,r),hidden:!s(e=>e.duration_ms)},{key:`agent`,label:r===`pt-BR`?`Agente`:`Agent`,render:e=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:e.agent_name}),(0,y.jsx)(`small`,{children:`${e.run_kind===`run`?r===`pt-BR`?`Invocação do orquestrador`:`Orchestrator invocation`:r===`pt-BR`?`Invocação delegada`:`Delegated invocation`} · ${e.run_purpose}`})]})},{key:`model`,label:`Modelo`,render:e=>{let t=fd(e);return t.detail===`-`?(0,y.jsx)(`strong`,{children:t.primary}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:t.primary}),(0,y.jsx)(`small`,{children:t.detail})]})}},{key:`effort`,label:r===`pt-BR`?`Esforço`:`Effort`,render:e=>Ld(e.effective_reasoning_effort,e.reasoning_effort,r)},{key:`speed`,label:r===`pt-BR`?`Velocidade`:`Speed`,render:e=>Rd(e.service_tier,r)},{key:`inputTokens`,label:r===`pt-BR`?`Tokens entrada`:`Input tokens`,render:e=>Cd(e.input_tokens,r),sortValue:e=>e.input_tokens,align:`right`,footer:Cd(a(`input_tokens`),r),hidden:!s(e=>e.input_tokens)},{key:`cachedInputTokens`,label:r===`pt-BR`?`Tokens cache`:`Cached tokens`,render:e=>Cd(e.cached_input_tokens,r),sortValue:e=>e.cached_input_tokens,align:`right`,footer:Cd(a(`cached_input_tokens`),r),hidden:!s(e=>e.cached_input_tokens)},{key:`uncachedInputTokens`,label:r===`pt-BR`?`Entrada sem cache`:`Uncached input`,render:e=>Cd(e.uncached_input_tokens,r),sortValue:e=>e.uncached_input_tokens,align:`right`,footer:Cd(a(`uncached_input_tokens`),r),hidden:!s(e=>e.uncached_input_tokens)},{key:`outputTokens`,label:r===`pt-BR`?`Tokens saída`:`Output tokens`,render:e=>Cd(e.output_tokens,r),sortValue:e=>e.output_tokens,align:`right`,footer:Cd(a(`output_tokens`),r),hidden:!s(e=>e.output_tokens)},{key:`reasoningTokens`,label:r===`pt-BR`?`Tokens raciocínio`:`Reasoning tokens`,render:e=>Cd(e.reasoning_tokens,r),sortValue:e=>e.reasoning_tokens,align:`right`,footer:Cd(a(`reasoning_tokens`),r),hidden:!s(e=>e.reasoning_tokens)},{key:`visibleOutputTokens`,label:r===`pt-BR`?`Saída visível`:`Visible output`,render:e=>Cd(e.visible_output_tokens,r),sortValue:e=>e.visible_output_tokens,align:`right`,footer:Cd(a(`visible_output_tokens`),r),hidden:!s(e=>e.visible_output_tokens)},{key:`totalTokens`,label:`Total tokens`,render:e=>Cd(e.input_tokens!==null&&e.output_tokens!==null?e.input_tokens+e.output_tokens:e.total_tokens,r),sortValue:e=>e.input_tokens!==null&&e.output_tokens!==null?e.input_tokens+e.output_tokens:e.total_tokens,align:`right`,footer:Cd(a(`total_tokens`),r),hidden:!s(e=>e.total_tokens)},{key:`inputRate`,label:`USD/M entrada`,render:e=>Nd(e.input_rate_usd_per_million,r),align:`right`,hidden:!s(e=>e.input_rate_usd_per_million)},{key:`cacheRate`,label:`USD/M cache`,render:e=>Nd(e.cached_input_rate_usd_per_million,r),align:`right`,hidden:!s(e=>e.cached_input_rate_usd_per_million)},{key:`outputRate`,label:`USD/M saída`,render:e=>Nd(e.output_rate_usd_per_million,r),align:`right`,hidden:!s(e=>e.output_rate_usd_per_million)},{key:`reasoningRate`,label:`USD/M raciocínio`,render:e=>Nd(e.reasoning_rate_usd_per_million,r),align:`right`,hidden:!s(e=>e.reasoning_rate_usd_per_million)},{key:`contextMultiplier`,label:`Mult. contexto E/S`,description:gd(r,`Multiplicadores aplicados aos segmentos de uso desta Invocação de Agente quando o limite de contexto do modelo é ultrapassado. O total da invocação agrega os segmentos sem expor cada Chamada LLM.`,`Multipliers applied to this Agent Invocation's usage segments when the model context limit is exceeded. The invocation total aggregates segments without exposing each LLM Call.`),render:e=>Fd(e.context_input_multiplier,e.context_output_multiplier,r),align:`right`,hidden:!s(e=>e.context_input_multiplier)},{key:`speedMultiplier`,label:r===`pt-BR`?`Cenário velocidade API`:`API speed scenario`,description:gd(r,`Cenário de preço efetivo observado nesta Invocação de Agente. Priority/Fast pode elevar as tarifas em relação ao cenário Standard.`,`Effective pricing scenario observed in this Agent Invocation. Priority/Fast may increase rates compared with the Standard scenario.`),render:e=>dd(e.service_tier,r),align:`right`,hidden:!s(e=>e.service_tier)},{key:`inputCost`,label:`USD entrada`,render:e=>$(e.input_cost_usd,r),align:`right`,footer:$(a(`input_cost_usd`),r),hidden:!s(e=>e.input_cost_usd)},{key:`cacheCost`,label:`USD cache`,render:e=>$(e.cached_input_cost_usd,r),align:`right`,footer:$(a(`cached_input_cost_usd`),r),hidden:!s(e=>e.cached_input_cost_usd)},{key:`outputCost`,label:`USD saída`,render:e=>$(e.output_cost_usd,r),align:`right`,footer:$(a(`output_cost_usd`),r),hidden:!s(e=>e.output_cost_usd)},{key:`reasoningCost`,label:`USD raciocínio`,render:e=>$(e.reasoning_cost_usd,r),align:`right`,footer:$(a(`reasoning_cost_usd`),r),hidden:!s(e=>e.reasoning_cost_usd)},{key:`standardCost`,label:`USD padrão`,render:e=>$(e.standard_cost_usd,r),align:`right`,footer:$(a(`standard_cost_usd`),r),hidden:!s(e=>e.standard_cost_usd)},{key:`speedUplift`,label:`USD acréscimo rápido`,description:gd(r,`Parcela adicional causada pela velocidade Priority/Fast. Este valor já está incluído no custo efetivo e no total; é exibido separadamente apenas para auditoria.`,`Additional amount caused by Priority/Fast speed. This value is already included in the effective cost and total; it is shown separately for auditing only.`),render:e=>$(e.speed_uplift_usd,r),align:`right`,footer:$(a(`speed_uplift_usd`),r),hidden:!s(e=>e.speed_uplift_usd)},{key:`finalUsd`,label:r===`pt-BR`?`USD estimado API`:`Estimated API USD`,render:e=>$(e.estimated_usd,r),align:`right`,footer:$(a(`estimated_usd`),r),hidden:!s(e=>e.estimated_usd)},{key:`fxRate`,label:r===`pt-BR`?`Cotação atual`:`Current exchange rate`,render:e=>Q(e.fx_rate,r),align:`right`,hidden:!s(e=>e.fx_rate)},{key:`recordedFxRate`,label:r===`pt-BR`?`Cotação no período`:`Period exchange rate`,render:e=>Q(e.recorded_fx_rate,r),align:`right`,hidden:!s(e=>e.recorded_fx_rate)},{key:`recordedBrl`,label:r===`pt-BR`?`Custo Final no Período`:`Period final cost`,render:e=>Td(e.recorded_brl,`BRL`,r),align:`right`,footer:Td(a(`recorded_brl`),`BRL`,r),hidden:!s(e=>e.recorded_brl)},{key:`cost`,label:r===`pt-BR`?`Custo Final atual`:`Current final cost`,render:e=>Td(n===`BRL`?e.estimated_brl:e.estimated_usd,n,r),sortValue:e=>Od(n,e.estimated_brl,e.estimated_usd),align:`right`,footer:Td(a(n===`BRL`?`estimated_brl`:`estimated_usd`),n,r),hidden:!s(e=>n===`BRL`?e.estimated_brl:e.estimated_usd)},{key:`trace`,label:``,render:e=>(0,y.jsx)(`button`,{"aria-label":`Abrir detalhes da invocação`,className:`cost-row-action`,onClick:n=>{n.stopPropagation(),t(e.run_id)},type:`button`,children:(0,y.jsx)(ld,{})})}],locale:r,pageSize:100,rowKey:e=>e.run_id,onRowClick:e=>t(e.run_id),rows:e,scrollLabel:Bd(r),showColumnInfo:!0,sortable:!0})}function jd(e){return _d(ud(e).map(e=>e.duration_ms))}function Md(e,t){return e.some(e=>{let n=t(e);return n!==null&&n!==0&&n!==``})}function Nd(e,t){return e===null?Sd(t):new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function Q(e,t){return e===null?Sd(t):`R$ ${new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}function $(e,t){return e===null?Sd(t):new Intl.NumberFormat(t,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function Pd(e,t){return e===null?Sd(t):`${e.toLocaleString(`en-US`,{maximumFractionDigits:3})}×`}function Fd(e,t,n){return e===null||t===null?Sd(n):`${Pd(e,n)} / ${Pd(t,n)}`}function Id(e,t,n){return e===null||e.trim()===``||e.trim().toLowerCase()===`unknown`?`-`:n===`pt-BR`?{low:`Leve`,medium:`Médio`,high:`Alto`,xhigh:`Extra alto`,max:`Ultra`,default:`Padrão`,priority:`Rápido`}[e]??e:e}function Ld(e,t,n){let r=zd(e);if(r!==null)return Id(r,`effort`,n);let i=zd(t);if(i===null)return`-`;let a=Id(i,`effort`,n);return n===`pt-BR`?`${a} (solicitado; efetivo -)`:`${a} (requested; effective -)`}function Rd(e,t){let n=zd(e);return n===null?t===`pt-BR`?`Padrão`:`Standard`:Id(n,`speed`,t)}function zd(e){let t=e?.trim()??``;return t===``||t.toLowerCase()===`unknown`?null:t}function Bd(e){return e===`pt-BR`?`Tabela de custos por invocação com rolagem horizontal`:`Agent invocation costs table with horizontal scrolling`}function Vd(e){return e===`pt-BR`?`Tabela de custos agrupados com rolagem horizontal`:`Grouped costs table with horizontal scrolling`}function Hd(e,t){return!e||Number.isNaN(Date.parse(e))?`—`:new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(e))}function Ud(e,t,n){if(t===`annual`)return e.slice(0,4);if(t===`monthly`)return e.slice(0,7);let r=new Date(`${e}T12:00:00.000Z`);return Number.isNaN(r.getTime())?e:new Intl.DateTimeFormat(n,{dateStyle:`short`,timeZone:`UTC`}).format(r)}function Wd({locale:e,duration:t,tokens:n,cost:r,currency:i}){return e===`pt-BR`?`Total geral — Tempo: ${t}; Tokens: ${n}; ${i}: ${r}`:`Grand total — Time: ${t}; Tokens: ${n}; Cost (${i}): ${r}`}function Gd({rows:e,currency:t,locale:n,onOpenTrace:r,period:i,showDateTime:a=!0,dateHeading:o,labelHeading:s}){let c={runs:e.reduce((e,t)=>e+t.run_count,0),tasks:e.reduce((e,t)=>e+(i===void 0?t.task_count:t.taskDaysActive??t.tasksActive??t.task_count),0),prds:e.reduce((e,t)=>e+t.prd_count,0),specs:e.reduce((e,t)=>e+t.spec_count,0),evidences:e.reduce((e,t)=>e+t.evidence_count,0),tests:e.reduce((e,t)=>e+t.test_count,0),durationKnownMs:e.reduce((e,t)=>e+t.duration.known_sum,0),durationPartial:e.some(e=>!e.duration.complete),tokens:_d(e.map(e=>e.total_tokens)),usd:_d(e.map(e=>e.estimated_usd)),brl:_d(e.map(e=>e.estimated_brl))},l=c.durationPartial?c.durationKnownMs===0?Sd(n):A(c.durationKnownMs,n):Ed(c.durationKnownMs,n),u=wd(c.tokens,n),d=Td(t===`BRL`?c.brl:c.usd,t,n),f=Wd({locale:n,duration:l,tokens:u,cost:d,currency:t}),p=n===`pt-BR`?`Total geral`:`Grand total`;return(0,y.jsx)(k,{columns:[{key:`latestStartedAt`,label:o??(n===`pt-BR`?`Data e hora`:`Date and time`),render:e=>Hd(e.latest_started_at,n),hidden:!a,footer:a?(0,y.jsx)(`output`,{"aria-label":p,children:`Total`}):void 0},{key:`label`,label:i===void 0?s??(n===`pt-BR`?`Grupo`:`Group`):n===`pt-BR`?`Período`:`Period`,render:e=>i===void 0?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:e.label}),e.key===e.label?null:(0,y.jsx)(`small`,{children:e.key})]}):(0,y.jsx)(`strong`,{children:Ud(e.key,i,n)}),sortValue:e=>e.key,footer:a?void 0:(0,y.jsx)(`output`,{"aria-label":p,children:`Total`})},{key:`runs`,label:n===`pt-BR`?`Invocações`:`Agent invocations`,render:e=>e.run_count,align:`right`,footer:c.runs},{key:`tasks`,label:i===void 0?n===`pt-BR`?`Tarefas ativas`:`Active tasks`:n===`pt-BR`?`Dias-tarefa ativos`:`Active task-days`,render:e=>i===void 0?e.task_count:e.taskDaysActive??e.tasksActive??e.task_count,align:`right`,footer:c.tasks},...i===void 0?[]:[{key:`prds`,label:`PRDs`,render:e=>e.prd_count,align:`right`,footer:c.prds},{key:`specs`,label:`SPECs`,render:e=>e.spec_count,align:`right`,footer:c.specs},{key:`evidences`,label:n===`pt-BR`?`Evidências`:`Evidence`,render:e=>e.evidence_count,align:`right`,footer:c.evidences},{key:`tests`,label:`Tests`,render:e=>e.test_count,align:`right`,footer:c.tests}],{key:`duration`,label:`Tempo`,render:e=>Dd(e.duration,n),sortValue:e=>e.duration.coverage_ratio>0?e.duration.known_sum:null,align:`right`,footer:(0,y.jsx)(`output`,{"aria-label":f,children:l})},{key:`tokens`,label:`Tokens`,render:e=>wd(e.total_tokens,n),sortValue:e=>e.total_tokens,align:`right`,footer:(0,y.jsx)(`output`,{"aria-label":f,children:u})},{key:`cost`,label:n===`pt-BR`?`Custo`:`Cost`,render:e=>Td(t===`BRL`?e.estimated_brl:e.estimated_usd,t,n),sortValue:e=>Od(t,e.estimated_brl,e.estimated_usd),align:`right`,footer:(0,y.jsx)(`output`,{"aria-label":f,children:d})},...r?[{key:`trace`,label:``,render:e=>(0,y.jsx)(`button`,{"aria-label":`Abrir detalhes`,className:`cost-row-action`,onClick:t=>{t.stopPropagation(),r(e.key)},type:`button`,children:(0,y.jsx)(ld,{})})}]:[]],defaultSort:i===void 0?null:{key:`label`,direction:`desc`},locale:n,pageSize:100,rowKey:e=>e.key,onRowClick:r===void 0?void 0:e=>r(e.key),rows:e,scrollLabel:Vd(n),showColumnInfo:!0,sortable:!0})}var Kd={"pt-BR":{back:`Voltar - Dashboard`,title:`ZAIP Cost Monitor`,subtitle:`Visão Git-native de Custos, Tokens e Tempo de cada Tarefa, SPEC ou PRD.`,refresh:`Atualizar`,refreshing:`Atualizando…`,filters:`Filtros`,settings:`Configurações`,language:`Idioma`,currency:`Moeda`,kicker:`ZAIP-AIOS • COST MONITOR`,heading:`Custos e tokens`,intro:`Telemetria derivada localmente, atribuída por invocação de agente, tarefa, fase e origem.`,period:`Período`,allTime:`Todo o período`,last7:`Últimos 7 dias`,last30:`Últimos 30 dias`,last90:`Últimos 90 dias`,thisMonth:`Este mês`,observed:`cobertura observada`,noData:`Sem dados no filtro atual.`,tabs:{overview:`Visão geral`,models:`Modelos LLM`,agentCalls:`Invocações de Agentes`,executions:`Execuções`,conversations:`Conversas`,tasks:`Tarefas`,prds:`PRD`,specs:`SPEC`,providers:`Provedores`,agents:`Zaip Agentes`,daily:`Diário`,monthly:`Mensal`,annual:`Anual`}},"en-US":{back:`Back - Dashboard`,title:`ZAIP Cost Monitor`,subtitle:`Git-native view of Costs, Tokens and Time for each Task, SPEC, or PRD.`,refresh:`Refresh`,refreshing:`Refreshing…`,filters:`Filters`,settings:`Settings`,language:`Language`,currency:`Currency`,kicker:`ZAIP-AIOS • COST MONITOR`,heading:`Costs and tokens`,intro:`Locally derived telemetry attributed by agent invocation, task, phase, and origin.`,period:`Period`,allTime:`All time`,last7:`Last 7 days`,last30:`Last 30 days`,last90:`Last 90 days`,thisMonth:`This month`,observed:`observed coverage`,noData:`No data for the current filter.`,tabs:{overview:`Overview`,models:`Models`,agentCalls:`Agent Invocations`,executions:`Executions`,conversations:`Conversations`,tasks:`Tasks`,prds:`PRDs`,specs:`SPECs`,providers:`Providers`,agents:`Agents`,daily:`Daily`,monthly:`Monthly`,annual:`Annual`}}};function qd(e){return e===`pt-BR`?`BRL`:`USD`}function Jd(e,t,n,r){if(r===null)return e;let i=new Map(e.map(e=>[e.key,e]));for(let e of Object.keys(f)){let t=g(`${e}T12:00:00.000Z`,n);t!==null&&!i.has(t)&&i.set(t,{key:t,label:t,latest_started_at:`${e}T00:00:00.000Z`,run_count:0,task_count:0,tasksCreated:0,tasksActive:0,taskDaysActive:0,prd_count:0,spec_count:0,evidence_count:0,test_count:0,event_count:0,total_tokens:null,estimated_usd:null,estimated_brl:null,duration_ms:0,duration:{known_sum:0,unknown:0,complete:!0,coverage_ratio:1},coverage:{events:0,tokens:0,usd:0,brl:0}})}return[...i.values()].map(e=>{let r=Tu(t.filter(t=>(g(t.started_at,n)??t.started_at)===e.key&&m(t.started_at)),`all_invocations`),i=Object.entries(f).reduce((t,[r,i])=>g(`${r}T12:00:00.000Z`,n)===e.key?t+i:t,0),a=r.known_sum+i;return{...e,duration_ms:r.complete?a:null,duration:{...r,known_sum:a}}}).toSorted((e,t)=>t.key.localeCompare(e.key))}function Yd(e,t){if(e.length===0)return{...t,run_count:0,task_count:0,event_count:0,total_tokens:null,estimated_usd:null,estimated_brl:null,recorded_usd:null,recorded_brl:null,average_run_cost_usd:null,average_run_cost_brl:null,average_run_duration_ms:null,known_tokens_per_cycle:null,top_10_token_share:null,coverage:{events:0,tokens:0,usd:0,brl:0}};let n=e.reduce((e,t)=>({events:e.events+t.coverage.events,tokens:e.tokens+t.coverage.tokens,usd:e.usd+t.coverage.usd,brl:e.brl+t.coverage.brl}),{events:0,tokens:0,usd:0,brl:0}),r=e.filter(e=>e.total_tokens!==null),i=r.reduce((e,t)=>e+(t.total_tokens??0),0),a=r.reduce((e,t)=>e+t.event_count,0),o=[...r].sort((e,t)=>(t.total_tokens??0)-(e.total_tokens??0)).slice(0,10).reduce((e,t)=>e+(t.total_tokens??0),0);return{task_count:new Set(e.flatMap(e=>e.task_id?[e.task_id]:[])).size,run_count:e.length,event_count:e.reduce((e,t)=>e+t.event_count,0),total_tokens:Cu(e.map(e=>e.total_tokens)),estimated_usd:Cu(e.map(e=>e.estimated_usd)),estimated_brl:Cu(e.map(e=>e.estimated_brl)),recorded_usd:Cu(e.map(e=>e.recorded_usd)),recorded_brl:Cu(e.map(e=>e.recorded_brl)),average_run_cost_usd:Xd(e.map(e=>e.estimated_usd)),average_run_cost_brl:Xd(e.map(e=>e.estimated_brl)),average_run_duration_ms:Xd(ud(e).map(e=>e.duration_ms)),known_tokens_per_cycle:a===0?null:i/a,top_10_token_share:i===0?null:o/i,coverage:n}}function Xd(e){let t=e.filter(e=>e!==null);return t.length?t.reduce((e,t)=>e+t,0)/t.length:null}function Zd({rows:e,currency:t,details:n,locale:r,onOpenTrace:i}){let[a,o]=(0,l.useState)(null),s=e=>o(e),c=e.reduce((e,t)=>e+t.task_count,0),u=e.reduce((e,t)=>e+t.run_count,0),d=ef(e.map(e=>Qd(e,n?.runs??[]))),f=e.reduce((e,t)=>e+(t.usage.total.tokens.total??0),0),p=e.reduce((e,n)=>e+(t===`BRL`?n.usage.total.cost.brl??0:n.usage.total.cost.usd??0),0);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(k,{columns:[{key:`createdAt`,label:r===`pt-BR`?`Data e hora`:`Date and time`,render:e=>e.created_at?Hd(e.created_at,r):`—`,footer:`Total`},{key:`entity`,label:`Entidade`,render:e=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:e.title}),(0,y.jsx)(`small`,{children:e.id})]})},{key:`status`,label:`Status`,render:e=>e.work_status},{key:`tasks`,label:`Tasks`,render:e=>e.task_count,align:`right`,footer:c},{key:`runs`,label:`Runs`,render:e=>e.run_count,align:`right`,footer:u},{key:`duration`,label:r===`pt-BR`?`Tempo`:`Time`,render:e=>{let t=Qd(e,n?.runs??[]);return t===null?`Indisponível`:A(t,r)},align:`right`,footer:d===null?`Indisponível`:A(d,r)},{key:`tokens`,label:`Tokens`,render:e=>M(e.usage.total.tokens.total,r),align:`right`,footer:M(f,r)},{key:`cost`,label:`Custo`,render:e=>P(t===`BRL`?e.usage.total.cost.brl:e.usage.total.cost.usd,t,r),sortValue:e=>Od(t,e.usage.total.cost.brl,e.usage.total.cost.usd),align:`right`,footer:P(p,t,r)},{key:`rework`,label:`Retrabalho`,render:e=>I(e.quality.rework_rate),align:`right`},{key:`actions`,label:``,render:e=>(0,y.jsx)(`button`,{"aria-label":`${r===`pt-BR`?`Abrir detalhes do`:`Open details for`} ${e.kind.toUpperCase()}`,className:`cost-row-action`,onClick:t=>{t.stopPropagation(),s(e)},type:`button`,children:(0,y.jsx)(tf,{})})}],locale:r,pageSize:100,rowKey:e=>e.id,onRowClick:s,rows:e,showColumnInfo:!0,sortable:!0}),a?(0,y.jsx)(jc,{label:a.kind===`prd`?`PRD`:`SPEC`,locale:r,onClose:()=>o(null),onOpenTrace:e=>{o(null),i(e)},row:a,runs:n?.runs??[],specs:n?.specs??e.filter(e=>e.kind===`spec`),tasks:n?.tasks??[]}):null]})}function Qd(e,t=[]){if(t.length===0)return null;let n=new Set(e.run_ids),r=new Map;for(let e of t)r.has(e.id)||r.set(e.id,e);let i=[...r.values()],a=t=>n.has(t.id)||(e.kind===`prd`?t.prd_id===e.id:t.spec_id===e.id),o=i.filter(e=>e.phase===`execution`&&(e.parent_run_id===null||!r.has(e.parent_run_id))&&a(e)),s=o.map($d);return o.length===0||s.some(e=>e===null)?null:ef(s)}function $d(e){return typeof e.source_duration_ms==`number`?e.source_duration_ms:null}function ef(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)}function tf(){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1.5`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`}),(0,y.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1.5`})]})}var nf=new URL(`/assets/logo_novo_azul-BBx5pA2B.png`,``+import.meta.url).href,rf=`daily`,af=[`overview`,`executions`,`agentCalls`,`agents`,`models`,`providers`,`tasks`,`specs`,`prds`,`conversations`,`daily`,`monthly`,`annual`];function of(e,t){return e.find(e=>e.id===t)??null}function sf({capabilityNavigation:e,data:t,dashboardTitle:n=`Dashboard Zaip AIOS`,embedded:r=!1,globalFilters:i,lastUpdatedAt:a,locale:o,loading:s,onLocaleChange:c,onOpenTrace:u,onActiveDataChange:d,onRefresh:f,loadPeriod:p=Hu,operations:m,repositoryName:h,currency:_,onCurrencyChange:v}){let[b,S]=(0,l.useState)(rf),[C,w]=(0,l.useState)(`all`),[T,E]=(0,l.useState)(X),[ee,D]=(0,l.useState)(`BRL`),O=_??ee,k=e=>{D(e),v?.(e)},[te,ne]=(0,l.useState)(`all`),[re,ie]=(0,l.useState)(!1),[A,j]=(0,l.useState)(!1),[M,N]=(0,l.useState)(!1),[P,F]=(0,l.useState)(null),I=Kd[o],{activeData:L,periodError:R,periodLoading:ae}=Uu({currency:O,data:t,...i===void 0?{}:{dateRange:i.dateRange},filters:T,lastUpdatedAt:a,loadPeriod:p,period:te,snapshotBacked:r}),se=Object.values(T).some(e=>e!==``);(0,l.useEffect)(()=>{se||d?.(L)},[L,se,d]);let ce=a===null?o===`pt-BR`?`Aguardando atualização`:`Waiting for refresh`:`${o===`pt-BR`?`Atualizado`:`Updated`} ${new Intl.DateTimeFormat(o,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(a))}`,z=(0,l.useMemo)(()=>L.runs.filter(e=>cf(e,T)&&lf(e,i)).sort((e,t)=>t.started_at.localeCompare(e.started_at)),[L.runs,T,i]),le=(0,l.useMemo)(()=>{if(m===void 0)return;let e=new Set(z.map(e=>e.run_id));return{...m,runs:m.runs.filter(t=>e.has(t.id))}},[m,z]),ue=(0,l.useMemo)(()=>L.prds.filter(e=>df(e,i)),[L.prds,i]),de=(0,l.useMemo)(()=>L.specs.filter(e=>df(e,i)),[L.specs,i]),fe=(0,l.useMemo)(()=>{let e=!se&&(i===void 0||i.query===``&&i.datePreset===`all`)?L.legacy_effort_baseline??null:null,t={prds:L.prds.filter(e=>df(e,i)),specs:L.specs.filter(e=>df(e,i)),tasks:(m?.tasks??[]).filter(e=>df(e,i))};return{conversations:uf(z.filter(e=>e.phase===`conversation`),e=>e.conversation_id??e.task_title??e.run_id,void 0,`all_invocations`),tasks:Ou(t.tasks,z),providers:uf(z,e=>Eu(e.provider),void 0,`all_invocations`),agents:xu(uf(z,e=>e.agent_name),L.configured_agents),models:uf(z,e=>e.model),daily:Jd(Qu(uf(z,e=>g(e.started_at,`day`)??e.started_at.slice(0,10)),t,`daily`),z,`day`,e),monthly:Jd(Qu(uf(z,e=>g(e.started_at,`month`)??e.started_at.slice(0,7)),t,`monthly`),z,`month`,e),annual:Jd(Qu(uf(z,e=>g(e.started_at,`year`)??e.started_at.slice(0,4)),t,`annual`),z,`year`,e)}},[L.configured_agents,L.prds,L.specs,i,m?.tasks,z,se,L.legacy_effort_baseline]),pe=Yd(z,L.overview),me=(0,l.useMemo)(()=>b===`executions`?m?.executions??[]:b===`conversations`?fe.conversations:b===`tasks`?fe.tasks:b===`prds`?ue:b===`specs`?de:b===`providers`||b===`agents`||b===`daily`||b===`monthly`||b===`annual`?fe[b]:b===`agentCalls`&&C!==`all`?z.filter(e=>e.run_kind===C):z,[C,fe,m?.executions,z,b,ue,de]),he=e=>{c(e),k(qd(e))},ge=e=>{let t=of(m?.runs??[],e);t&&F(t)};return(0,y.jsxs)(r?`section`:`main`,{className:r?`cost-page cost-page-embedded`:`cost-page`,children:[r?null:(0,y.jsx)(x,{filters:(0,y.jsx)(Ku,{available:t.filters_available,hideQuery:r,locale:o,onChange:E,value:T}),filtersActive:Object.values(T).some(Boolean),lastUpdatedAt:a,loading:s||ae,locale:o,onLocaleChange:he,onRefresh:f,settings:(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:I.currency}),(0,y.jsxs)(`select`,{onChange:e=>k(e.target.value),value:O,children:[(0,y.jsx)(`option`,{value:`BRL`,children:`BRL · R$`}),(0,y.jsx)(`option`,{value:`USD`,children:`USD · $`})]})]}),...h===void 0?{}:{repositoryName:h},title:n}),R?(0,y.jsx)(`p`,{className:`cost-period-error`,role:`status`,children:o===`pt-BR`?`Não foi possível carregar o período selecionado: ${R}`:`Could not load the selected period: ${R}`}):null,r?null:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`nav`,{"aria-label":`Navegação do Cost Monitor`,className:`cost-monitor-nav`,children:[(0,y.jsxs)(`div`,{className:`cost-monitor-brand`,children:[(0,y.jsx)(`strong`,{className:`cost-monitor-title`,children:I.title}),(0,y.jsx)(`small`,{className:`cost-last-updated`,children:ce})]}),(0,y.jsx)(`img`,{alt:`ZAIP`,className:`cost-monitor-logo`,src:nf}),(0,y.jsxs)(`div`,{className:`cost-nav-actions`,children:[(0,y.jsx)(`button`,{"aria-label":I.refresh,className:`cost-nav-icon cost-refresh-action`,disabled:s,onClick:f,type:`button`,children:`↻`}),(0,y.jsxs)(`div`,{className:`cost-nav-popup-anchor cost-filter-action`,children:[(0,y.jsxs)(`button`,{className:re?`cost-nav-button is-active`:`cost-nav-button`,onClick:()=>{ie(e=>!e),j(!1),N(!1)},type:`button`,children:[(0,y.jsx)(Xu,{}),` `,I.filters]}),re?(0,y.jsx)(`div`,{className:`cost-nav-popup cost-nav-filter-popup`,children:(0,y.jsx)(Ku,{available:t.filters_available,hideQuery:r,locale:o,onChange:E,value:T})}):null]}),(0,y.jsxs)(`div`,{className:`cost-nav-popup-anchor cost-locale-action`,children:[(0,y.jsxs)(`button`,{className:A?`cost-nav-button is-active`:`cost-nav-button`,onClick:()=>{j(e=>!e),ie(!1),N(!1)},type:`button`,children:[(0,y.jsx)(Ju,{locale:o}),o===`pt-BR`?`PT-BR`:`EN-US`,(0,y.jsx)(Yu,{})]}),A?(0,y.jsxs)(`div`,{className:`cost-nav-popup cost-nav-locale-popup`,children:[(0,y.jsxs)(`button`,{onClick:()=>he(`pt-BR`),type:`button`,children:[(0,y.jsx)(Ju,{locale:`pt-BR`}),` Português do Brasil`,` `,o===`pt-BR`?`✓`:``]}),(0,y.jsxs)(`button`,{onClick:()=>he(`en-US`),type:`button`,children:[(0,y.jsx)(Ju,{locale:`en-US`}),` English `,o===`en-US`?`✓`:``]})]}):null]}),(0,y.jsxs)(`div`,{className:`cost-nav-popup-anchor cost-settings-action`,children:[(0,y.jsx)(`button`,{"aria-label":I.settings,className:M?`cost-nav-icon is-active`:`cost-nav-icon`,onClick:()=>{N(e=>!e),ie(!1),j(!1)},type:`button`,children:(0,y.jsx)(Zu,{})}),M?(0,y.jsxs)(`div`,{className:`cost-nav-popup cost-nav-settings-popup`,children:[(0,y.jsxs)(`div`,{className:`cost-mobile-settings`,children:[(0,y.jsx)(`small`,{className:`cost-mobile-updated`,children:ce}),(0,y.jsxs)(`button`,{disabled:s,onClick:f,type:`button`,children:[`↻`,` `,s?o===`pt-BR`?`Atualizando…`:`Refreshing…`:I.refresh]}),(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:o===`pt-BR`?`Idioma`:`Language`}),(0,y.jsxs)(`select`,{onChange:e=>he(e.target.value),value:o,children:[(0,y.jsx)(`option`,{value:`pt-BR`,children:`Português do Brasil`}),(0,y.jsx)(`option`,{value:`en-US`,children:`English`})]})]}),(0,y.jsxs)(`div`,{className:`cost-mobile-filters`,children:[(0,y.jsx)(`strong`,{children:I.filters}),(0,y.jsx)(Ku,{available:t.filters_available,hideQuery:r,locale:o,onChange:E,value:T})]})]}),(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:I.currency}),(0,y.jsxs)(`select`,{onChange:e=>k(e.target.value),value:O,children:[(0,y.jsx)(`option`,{value:`BRL`,children:`BRL · R$`}),(0,y.jsx)(`option`,{value:`USD`,children:`USD · $`})]})]})]}):null]})]})]}),(0,y.jsxs)(`header`,{className:`cost-hero`,children:[(0,y.jsx)(`p`,{className:`cost-hero-description`,children:I.subtitle}),(0,y.jsxs)(`label`,{className:`cost-period`,children:[(0,y.jsx)(`span`,{children:I.period}),(0,y.jsxs)(`select`,{onChange:e=>ne(e.target.value),value:te,children:[(0,y.jsx)(`option`,{value:`all`,children:I.allTime}),(0,y.jsx)(`option`,{value:`7`,children:I.last7}),(0,y.jsx)(`option`,{value:`30`,children:I.last30}),(0,y.jsx)(`option`,{value:`90`,children:I.last90}),(0,y.jsx)(`option`,{value:`month`,children:I.thisMonth})]})]})]})]}),r?null:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(sd,{currency:O,locale:o,overview:pe}),(0,y.jsxs)(`div`,{className:`cost-coverage-note`,children:[(0,y.jsx)(`span`,{children:`.agents/records/lifecycle + telemetry manifests`}),(0,y.jsxs)(`strong`,{children:[pe.coverage.tokens,`/`,pe.coverage.events,` eventos com tokens ·`,` `,pe.coverage.brl,`/`,pe.coverage.events,` com custo`]})]}),e]}),(0,y.jsxs)(`nav`,{"aria-label":`Visões de custo`,className:`cost-tabs`,children:[af.map(e=>(0,y.jsx)(`button`,{className:b===e?`is-active`:void 0,onClick:()=>S(e),type:`button`,children:I.tabs[e]},e)),(0,y.jsx)(Ws,{filters:{...T,...i,period:te,agentCallKind:C},rows:me,view:`cost-${b}`})]}),(0,y.jsxs)(`section`,{className:`cost-content cost-content-${b} ${b===`overview`?`cost-content-overview`:``}`,children:[b===`overview`?(0,y.jsx)(Mu,{currency:O,daily:fe.daily,locale:o,models:fe.models,rows:z}):null,b===`agentCalls`?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`nav`,{"aria-label":o===`pt-BR`?`Tipo de chamada de agente`:`Agent call type`,className:`cost-run-kind-toolbar`,children:[`all`,`run`,`subrun`].map(e=>(0,y.jsx)(`button`,{"aria-pressed":C===e,className:C===e?`is-active`:void 0,onClick:()=>w(e),type:`button`,children:e===`all`?o===`pt-BR`?`Todos`:`All`:e===`run`?o===`pt-BR`?`Invocações do orquestrador`:`Orchestrator invocations`:o===`pt-BR`?`Invocações delegadas`:`Delegated invocations`},e))}),(0,y.jsx)(Ad,{currency:O,locale:o,onOpenRun:ge,rows:C===`all`?z:z.filter(e=>e.run_kind===C)})]}):null,b===`executions`?(0,y.jsx)(ye,{locale:o,rows:m?.executions??[]}):null,b===`conversations`?(0,y.jsx)(Gd,{currency:O,labelHeading:o===`pt-BR`?`Conversa`:`Conversation`,locale:o,rows:fe.conversations}):null,b===`tasks`?(0,y.jsx)(Gd,{currency:O,dateHeading:o===`pt-BR`?`Criada em`:`Created at`,labelHeading:o===`pt-BR`?`Tarefa`:`Task`,locale:o,onOpenTrace:u,rows:fe.tasks}):null,b===`prds`?(0,y.jsx)(Zd,{currency:O,locale:o,onOpenTrace:u,rows:ue,...le?{details:le}:{}}):null,b===`specs`?(0,y.jsx)(Zd,{currency:O,locale:o,onOpenTrace:u,rows:de,...le?{details:le}:{}}):null,b===`models`?(0,y.jsx)(yd,{locale:o,rows:z}):null,[`providers`,`agents`].map(e=>b===e?(0,y.jsx)(Gd,{currency:O,labelHeading:e===`agents`?o===`pt-BR`?`Zaip Agentes`:`ZAIP agents`:o===`pt-BR`?`Provedor`:`Providers`,locale:o,rows:fe[e]},e):null),b===`daily`||b===`monthly`||b===`annual`?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(id,{currency:O,locale:o,period:b,rows:fe[b]}),(0,y.jsx)(Gd,{currency:O,locale:o,period:b,rows:fe[b],showDateTime:!1})]}):null]}),P?(0,y.jsx)(oe,{details:{kind:`run`,row:P},locale:o,onClose:()=>F(null)}):null]})}function cf(e,t){let n=t.query.trim().toLowerCase();return(!n||[e.run_id,e.task_title,e.model,e.requested_model,e.agent,e.agent_name].some(e=>e.toLowerCase().includes(n)))&&(!t.provider||Eu(e.provider)===t.provider)&&(!t.agent||e.agent_name===t.agent)&&(!t.model||e.model===t.model)&&(!t.status||e.task_status===t.status)&&(!t.priority||e.priority===t.priority)&&(!t.risk||e.risk===t.risk)&&(!t.phase||e.phase===t.phase)&&(!t.origin||e.origin===t.origin)&&(!t.workType||e.work_type===t.workType)}function lf(e,t){if(!t)return!0;let n=t.query.trim().toLocaleLowerCase();if(t.dateRange===void 0)return!n||[e.run_id,e.task_id,e.task_title,e.provider,e.agent,e.agent_name,e.model,e.requested_model,e.phase].some(e=>e?.toLocaleLowerCase().includes(n));let r=g(e.started_at,`day`)??e.started_at.slice(0,10);return r>=t.dateRange.start&&r<=t.dateRange.end&&(!n||[e.run_id,e.task_id,e.task_title,e.provider,e.agent,e.agent_name,e.model,e.requested_model,e.phase].some(e=>e?.toLocaleLowerCase().includes(n)))}function uf(e,t,n=t,r=`all_invocations`){let i=ud(e,r),a=new Map;for(let n of e)a.set(t(n),[...a.get(t(n))??[],n]);return[...a].map(([e,t])=>({...(()=>{let e=Tu(i.filter(e=>t.includes(e)),r===`all_execution`?`all_execution`:`all_invocations`);return{duration_ms:e.complete?e.known_sum:null,duration:e}})(),key:e,label:n(t[0]),latest_started_at:t.reduce((e,t)=>t.started_at>e?t.started_at:e,t[0]?.started_at??``),run_count:t.length,task_count:new Set(t.flatMap(e=>e.task_id?[e.task_id]:[])).size,tasksActive:new Set(t.flatMap(e=>e.task_id?[e.task_id]:[])).size,taskDaysActive:new Set(t.flatMap(e=>e.task_id?[e.task_id]:[])).size,prd_count:0,spec_count:0,evidence_count:0,test_count:0,event_count:t.reduce((e,t)=>e+t.event_count,0),total_tokens:Cu(t.map(e=>e.total_tokens)),estimated_usd:Cu(t.map(e=>e.estimated_usd)),estimated_brl:Cu(t.map(e=>e.estimated_brl)),coverage:t.reduce((e,t)=>({events:e.events+t.coverage.events,tokens:e.tokens+t.coverage.tokens,usd:e.usd+t.coverage.usd,brl:e.brl+t.coverage.brl}),{events:0,tokens:0,usd:0,brl:0})})).sort((e,t)=>t.latest_started_at.localeCompare(e.latest_started_at))}function df(e,t){if(t===void 0)return!0;let n=t.query.trim().toLowerCase();if(n&&![e.id??``,e.title??``].some(e=>e.toLowerCase().includes(n)))return!1;if(t.dateRange===void 0)return!0;if(e.created_at===null)return!1;let r=g(e.created_at,`day`)??e.created_at.slice(0,10);return r>=t.dateRange.start&&r<=t.dateRange.end}function ff({ariaLabel:e,closeLabel:t,document:n,onClose:r}){return(0,y.jsxs)(`section`,{"aria-label":e,"aria-modal":`true`,className:`trace-document`,role:`dialog`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`small`,{children:n.path}),(0,y.jsx)(`h2`,{children:n.title})]}),(0,y.jsx)(`button`,{"aria-label":t,className:`trace-close-button`,onClick:r,type:`button`,children:(0,y.jsx)(cs,{"aria-hidden":`true`,size:20,strokeWidth:2})})]}),(0,y.jsx)(`pre`,{children:n.content})]})}function pf({stage:e,stageRecord:t,documents:n,stageCopy:r,stageArtifacts:i,copy:a,onBack:o,onOpenDocument:s,onStageChange:c}){let l=[`definition`,`planning`,`execution`,`decisions`,`verification`,`evidence`],u=l.indexOf(e),d=l[u-1],f=l[u+1],p=n.filter(e=>e.kind===`evidence`).length,m=new Set(n.map(e=>e.kind)).size,h=new Map;for(let e of n)h.set(e.kind,[...h.get(e.kind)??[],e]);let g=t?.last_recorded_at??a.pending;return(0,y.jsxs)(`section`,{className:`trace-stage-detail`,children:[(0,y.jsx)(`header`,{children:(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`p`,{children:r[e].label}),(0,y.jsx)(`h3`,{children:i[e]}),(0,y.jsx)(`small`,{children:g})]})}),(0,y.jsxs)(`div`,{className:`trace-stage-metrics`,children:[(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{children:a.documents}),(0,y.jsx)(`strong`,{children:n.length})]}),(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{children:a.types}),(0,y.jsx)(`strong`,{children:m})]}),(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{children:a.evidenceMetric}),(0,y.jsx)(`strong`,{children:p})]})]}),(0,y.jsx)(`div`,{className:`trace-stage-documents`,children:n.length===0?(0,y.jsx)(`p`,{className:`trace-stage-empty`,children:a.empty}):[...h].map(([e,t])=>(0,y.jsxs)(`section`,{className:`trace-document-group`,children:[(0,y.jsxs)(`h4`,{children:[e,` `,(0,y.jsx)(`small`,{children:t.length})]}),t.map(e=>(0,y.jsxs)(`button`,{onClick:()=>s(e),type:`button`,children:[(0,y.jsx)(`strong`,{children:e.title}),(0,y.jsx)(`small`,{children:e.path})]},e.id))]},e))}),(0,y.jsxs)(`nav`,{"aria-label":a.navigation,className:`trace-stage-navigation`,children:[(0,y.jsxs)(`button`,{className:`trace-navigation-action trace-navigation-previous`,disabled:u===0,onClick:()=>c(l[u-1]),type:`button`,children:[(0,y.jsx)(Po,{"aria-hidden":`true`,size:18,strokeWidth:1.9}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`small`,{children:a.previous}),(0,y.jsx)(`strong`,{children:d?r[d].label.split(` (`)[0]:`—`})]})]}),(0,y.jsxs)(`div`,{className:`trace-navigation-center`,children:[(0,y.jsx)(`div`,{"aria-hidden":`true`,className:`trace-navigation-progress`,children:l.map((t,n)=>(0,y.jsx)(`span`,{"data-active":t===e,"data-passed":n<u},t))}),(0,y.jsxs)(`small`,{children:[u+1,` `,a.of,` `,l.length]}),(0,y.jsxs)(`button`,{className:`trace-all-stages-button`,onClick:o,type:`button`,children:[(0,y.jsx)(es,{"aria-hidden":`true`,size:15,strokeWidth:1.9}),a.back]})]}),(0,y.jsxs)(`button`,{className:`trace-navigation-action trace-navigation-next`,disabled:u===l.length-1,onClick:()=>c(l[u+1]),type:`button`,children:[(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`small`,{children:a.next}),(0,y.jsx)(`strong`,{children:f?r[f].label.split(` (`)[0]:`—`})]}),(0,y.jsx)(Fo,{"aria-hidden":`true`,size:18,strokeWidth:1.9})]})]})]})}function mf({ariaLabel:e,children:t,closeLabel:n,onClose:r}){return(0,l.useEffect)(()=>{let e=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]),(0,y.jsxs)(`div`,{className:`trace-stage-dialog-backdrop`,role:`presentation`,children:[(0,y.jsx)(`button`,{"aria-label":n,className:`trace-stage-dialog-backdrop-dismiss`,onClick:r,type:`button`}),(0,y.jsxs)(`section`,{"aria-label":e,"aria-modal":`true`,className:`trace-stage-dialog`,role:`dialog`,children:[(0,y.jsx)(`button`,{"aria-label":n,className:`trace-stage-dialog-close`,onClick:r,type:`button`,children:(0,y.jsx)(cs,{"aria-hidden":`true`,size:22})}),t]})]})}var hf=[`definition`,`planning`,`execution`,`decisions`,`verification`,`evidence`],gf=[`task`,`change`,`spec`,`prd`],_f=[`coverage`,`documents`,`evidence`,`links`],vf={"pt-BR":{lite:`Leve`,standard:`Padrão`,critical:`Crítico`},"en-US":{lite:`Lite`,standard:`Standard`,critical:`Critical`}},yf={definition:Ho,planning:Qo,execution:as,decisions:Zo,verification:os,evidence:qo},bf={definition:`PRD · Requisitos`,planning:`SPEC · Change`,execution:`Tarefas · DAG · Runs · arquivos`,decisions:`Decisões do planejamento e da execução`,verification:`Testes · revisões · evals · checks`,evidence:`Evidências · resultados · rastreabilidade`},xf={definition:`PRD · Requirements`,planning:`SPEC · Change`,execution:`Tasks · DAG · Runs · files`,decisions:`Planning and execution decisions`,verification:`Tests · reviews · evals · checks`,evidence:`Evidence · results · traceability`};function Sf(e,t){return[{label:`Task`,value:e.task_id,onOpen:void 0},{label:`Change`,value:e.change_id,onOpen:t.onOpenChange},{label:`SPEC`,value:e.spec_id,onOpen:t.onOpenSpec},{label:`PRD`,value:e.prd_id,onOpen:t.onOpenPrd}]}var Cf={definition:{label:`Definição (PRD + Requisitos)`,description:`Objetivo, contexto e critérios que definem o trabalho.`},planning:{label:`Planejamento (SPEC + Change)`,description:`Escopo, solução e mudanças previstas antes da execução.`},execution:{label:`Execução (Tarefas ou DAG)`,description:`Tarefas, dependências da DAG, Runs e arquivos produzidos.`},decisions:{label:`Decisões (Plano e Execução)`,description:`Decisões humanas e da IA tomadas no planejamento e na execução.`},verification:{label:`Verificação (Testes + Revisões)`,description:`Testes, revisões, evals e checks comparam o resultado aos Critérios de Aceite.`},evidence:{label:`Evidências (Resultados + Rastreabilidade)`,description:`Provas reproduzíveis vinculadas às Tasks, Changes, Runs e Critérios de Aceite.`}},wf={definition:{label:`Definition (PRD + Requirements)`,description:`Objective, context, and criteria that define the work.`},planning:{label:`Planning (SPEC + Change)`,description:`Scope, solution, and changes planned before execution.`},execution:{label:`Execution (Tasks or DAG)`,description:`Tasks, DAG dependencies, Runs, and produced files.`},decisions:{label:`Decisions (Plan and Execution)`,description:`Human and AI decisions made during planning and execution.`},verification:{label:`Verification (Tests + Reviews)`,description:`Tests, reviews, evals, and checks compare results with acceptance criteria.`},evidence:{label:`Evidence (Results + Traceability)`,description:`Reproducible proof linked to Tasks, Changes, Runs, and acceptance criteria.`}},Tf={"pt-BR":{aria:`Rastreabilidade da task`,coverage:`etapas rastreadas`,evidence:`evidências`,close:`Fechar`,empty:`Nenhum documento relacionado.`,closeDocument:`Fechar documento`,back:`Voltar às etapas`,previous:`Anterior`,next:`Próxima`,documents:`Documentos`,types:`Tipos`,evidenceMetric:`Evidências`,taskFirst:`Task-first`,specDriven:`Spec-driven`,copyId:`Copiar ID`,copied:`ID copiado`,unlinked:`Não vinculado`,recorded:`Registrada em`,pending:`Pendente`,missingTimestamp:`Sem data/hora`,tests:`testes registrados`,time:`Tempo`,tokens:`Tokens`,cost:`Custo`,measuredRuns:`Runs medidas`,items:`itens`,navigation:`Navegação entre etapas`,of:`de`,stageDetails:`Detalhes da etapa`,document:`Documento`},"en-US":{aria:`Task traceability`,coverage:`tracked stages`,evidence:`evidence items`,close:`Close`,empty:`No related document.`,closeDocument:`Close document`,back:`Back to stages`,previous:`Previous`,next:`Next`,documents:`Documents`,types:`Types`,evidenceMetric:`Evidence`,taskFirst:`Task-first`,specDriven:`Spec-driven`,copyId:`Copy ID`,copied:`ID copied`,unlinked:`Not linked`,recorded:`Recorded at`,pending:`Pending`,missingTimestamp:`Missing date/time`,tests:`recorded tests`,time:`Time`,tokens:`Tokens`,cost:`Cost`,measuredRuns:`measured Runs`,items:`items`,navigation:`Stage navigation`,of:`of`,stageDetails:`Stage details`,document:`Document`}};function Ef({taskId:e,locale:t=`pt-BR`}){let n=t===`pt-BR`;return(0,y.jsx)(`div`,{className:`trace-backdrop`,children:(0,y.jsxs)(`section`,{"aria-busy":`true`,"aria-label":n?`Carregando rastreabilidade`:`Loading traceability`,"aria-live":`polite`,className:`trace-panel trace-loading-panel`,role:`dialog`,children:[(0,y.jsxs)(`header`,{className:`trace-panel-header`,children:[(0,y.jsxs)(`div`,{className:`trace-heading`,children:[(0,y.jsx)(`span`,{className:`trace-heading-icon trace-loading-icon`,"aria-hidden":`true`,children:(0,y.jsx)(rs,{size:22,strokeWidth:1.8})}),(0,y.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,y.jsx)(`h2`,{children:n?`Carregando rastreabilidade`:`Loading traceability`}),(0,y.jsx)(`p`,{children:e})]})]}),(0,y.jsxs)(`span`,{className:`trace-loading-status`,children:[(0,y.jsx)(rs,{"aria-hidden":`true`,size:15,strokeWidth:2}),n?`Preparando trace`:`Preparing trace`]})]}),(0,y.jsx)(`div`,{className:`trace-loading-identifiers`,"aria-hidden":`true`,children:gf.map(e=>(0,y.jsx)(`span`,{},e))}),(0,y.jsx)(`div`,{className:`trace-loading-metrics`,"aria-hidden":`true`,children:_f.map(e=>(0,y.jsx)(`span`,{},e))}),(0,y.jsx)(`div`,{className:`trace-loading-stages`,"aria-hidden":`true`,children:hf.map(e=>(0,y.jsx)(`span`,{},e))})]})})}function Df({trace:e,locale:t=`pt-BR`,onClose:n,onOpenChange:r,onOpenPrd:i,onOpenSpec:a,embedded:o=!1}){let[s,c]=(0,l.useState)(null),[u,d]=(0,l.useState)(null),[f,p]=(0,l.useState)(!1),m=Tf[t],h=t===`en-US`?wf:Cf,g=t===`en-US`?xf:bf,_=(0,l.useMemo)(()=>new Map(hf.map(t=>[t,e.documents.filter(e=>e.stage===t)])),[e.documents]),v=(0,l.useMemo)(()=>new Map(e.stages.map(e=>[e.stage,e])),[e.stages]),b=Math.round(e.coverage.stages_with_timestamps/e.coverage.total_stages*100),x=[e.task_id,e.change_id,e.spec_id,e.prd_id].filter(Boolean).length,S=Sf(e,{onOpenChange:r,onOpenPrd:i,onOpenSpec:a}),C=Af(e.task_created_at,t),w=jf(e.task_created_at,t),T=async()=>{try{await navigator.clipboard.writeText(e.task_id),p(!0),window.setTimeout(()=>p(!1),2e3)}catch{p(!1)}};return(0,y.jsxs)(`div`,{className:o?`trace-embedded`:`trace-backdrop`,children:[(0,y.jsxs)(`section`,{"aria-label":m.aria,"aria-modal":o?void 0:`true`,className:`trace-panel`,role:`dialog`,children:[(0,y.jsxs)(`header`,{className:`trace-panel-header`,children:[(0,y.jsxs)(`div`,{className:`trace-heading`,children:[(0,y.jsx)(`span`,{className:`trace-heading-icon`,"aria-hidden":`true`,children:(0,y.jsx)(is,{size:22,strokeWidth:1.8})}),(0,y.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,y.jsx)(`div`,{className:`trace-heading-title`,children:(0,y.jsxs)(`h2`,{children:[(0,y.jsx)(`span`,{className:`trace-title-prefix`,children:`Trace:`}),` `,e.task_title||e.task_id]})}),(0,y.jsx)(`p`,{children:t===`pt-BR`?`Visão completa do ciclo de desenvolvimento`:`Complete development lifecycle view`})]})]}),(0,y.jsxs)(`div`,{className:`trace-header-actions`,children:[(0,y.jsx)(Of,{copy:m,locale:t,usage:e.usage}),o?null:(0,y.jsx)(`button`,{className:`trace-close-button`,"aria-label":m.close,onClick:n,type:`button`,children:(0,y.jsx)(cs,{"aria-hidden":`true`,size:20,strokeWidth:2})})]})]}),(0,y.jsxs)(`section`,{className:`trace-task-summary`,"aria-label":t===`pt-BR`?`Resumo da tarefa`:`Task summary`,children:[(0,y.jsxs)(`article`,{children:[(0,y.jsx)(Ro,{"aria-hidden":`true`,size:17,strokeWidth:1.8}),(0,y.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,y.jsx)(`span`,{children:t===`pt-BR`?`Criada em`:`Created at`}),(0,y.jsx)(`strong`,{children:C})]})]}),(0,y.jsxs)(`article`,{children:[(0,y.jsx)(Uo,{"aria-hidden":`true`,size:17,strokeWidth:1.8}),(0,y.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,y.jsx)(`span`,{children:t===`pt-BR`?`Desde a criação`:`Since creation`}),(0,y.jsx)(`strong`,{children:w})]})]}),(0,y.jsxs)(`article`,{className:`trace-task-progress`,children:[(0,y.jsx)(Vo,{"aria-hidden":`true`,size:17,strokeWidth:1.8}),(0,y.jsxs)(`div`,{className:`trace-task-summary-content trace-task-progress-content`,children:[(0,y.jsx)(`span`,{children:t===`pt-BR`?`Progresso`:`Progress`}),(0,y.jsxs)(`strong`,{children:[e.task_progress,`%`]}),(0,y.jsx)(`progress`,{max:100,value:e.task_progress})]})]}),(0,y.jsxs)(`article`,{className:`trace-task-classification`,children:[(0,y.jsx)(Io,{"aria-hidden":`true`,size:17,strokeWidth:1.8}),(0,y.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,y.jsx)(`span`,{children:t===`pt-BR`?`Classificação`:`Classification`}),(0,y.jsxs)(`div`,{className:`trace-task-badges`,children:[(0,y.jsxs)(`span`,{className:`trace-mode-badge`,children:[(0,y.jsx)(ss,{"aria-hidden":`true`,size:12,strokeWidth:2}),e.spec_id===null?m.taskFirst:m.specDriven]}),e.task_risk?(0,y.jsxs)(`span`,{className:`trace-risk-badge`,"data-risk":e.task_risk,children:[(0,y.jsx)(os,{"aria-hidden":`true`,size:12,strokeWidth:2}),vf[t][e.task_risk]]}):null]})]})]})]}),(0,y.jsx)(`section`,{className:`trace-overview trace-lineage`,"aria-label":t===`pt-BR`?`Identificadores vinculados`:`Linked identifiers`,children:S.map(({label:e,value:n,onOpen:r})=>{let i=n!==null&&r!==void 0,a=e===`Task`&&n!==null,o=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`trace-identifier-content`,children:[(0,y.jsxs)(`span`,{children:[(0,y.jsx)(ts,{"aria-hidden":`true`,size:11,strokeWidth:2}),e]}),(0,y.jsx)(`strong`,{title:n??m.unlinked,children:n??m.unlinked})]}),a?(0,y.jsx)(`button`,{"aria-label":f?t===`pt-BR`?`ID da tarefa copiado`:`Task ID copied`:t===`pt-BR`?`Copiar ID da tarefa`:`Copy task ID`,className:`trace-identifier-copy`,onClick:()=>void T(),title:f?t===`pt-BR`?`Copiado`:`Copied`:void 0,type:`button`,children:f?(0,y.jsx)(zo,{"aria-hidden":`true`,size:15}):(0,y.jsx)(Go,{"aria-hidden":`true`,size:15})}):null,i?(0,y.jsx)(Fo,{"aria-hidden":`true`,size:15,strokeWidth:1.9}):null]});return(0,y.jsx)(`article`,{"data-empty":n===null,"data-linked":n!==null,"data-navigable":i,children:i?(0,y.jsx)(`button`,{"aria-label":`${t===`pt-BR`?`Abrir`:`Open`} ${e}: ${n}`,className:`trace-identifier-navigation`,onClick:()=>r(n),type:`button`,children:o}):(0,y.jsx)(`div`,{className:`trace-identifier-static`,children:o})},e)})}),(0,y.jsxs)(`section`,{className:`trace-metrics`,"aria-label":t===`pt-BR`?`Resumo da rastreabilidade`:`Traceability summary`,children:[(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{className:`trace-metric-icon`,children:(0,y.jsx)(is,{"aria-hidden":`true`,size:18})}),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`strong`,{children:[b,`%`]}),(0,y.jsx)(`span`,{children:m.coverage})]}),(0,y.jsxs)(`small`,{children:[e.coverage.stages_with_timestamps,` `,m.of,` `,e.coverage.total_stages]})]}),(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{className:`trace-metric-icon`,children:(0,y.jsx)(Yo,{"aria-hidden":`true`,size:18})}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:e.documents.length}),(0,y.jsx)(`span`,{children:m.documents})]}),(0,y.jsx)(`small`,{children:t===`pt-BR`?`no ciclo completo`:`in the full lifecycle`})]}),(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{className:`trace-metric-icon`,children:(0,y.jsx)(Io,{"aria-hidden":`true`,size:18})}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:e.coverage.evidence_count}),(0,y.jsx)(`span`,{children:m.evidenceMetric})]}),(0,y.jsxs)(`small`,{children:[e.coverage.test_count,` `,m.tests]})]}),(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{className:`trace-metric-icon`,children:(0,y.jsx)(ts,{"aria-hidden":`true`,size:18})}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:x}),(0,y.jsx)(`span`,{children:t===`pt-BR`?`Vínculos`:`Links`})]}),(0,y.jsx)(`small`,{children:`Task · Change · SPEC · PRD`})]})]}),(0,y.jsx)(`div`,{className:`trace-stage-menu`,children:hf.map((e,n)=>{let r=yf[e],i=(_.get(e)??[]).length;return(0,y.jsxs)(`button`,{className:`trace-stage-menu-button`,"data-stage":e,onClick:()=>d(e),type:`button`,children:[(0,y.jsx)(`span`,{className:`trace-stage-number`,children:String(n+1).padStart(2,`0`)}),(0,y.jsx)(r,{className:`trace-stage-icon`,"aria-hidden":`true`,size:22,strokeWidth:1.8}),(0,y.jsx)(`strong`,{children:h[e].label}),(0,y.jsx)(`em`,{children:h[e].description}),(0,y.jsxs)(`span`,{className:`trace-stage-action`,children:[(0,y.jsxs)(`small`,{children:[(0,y.jsx)(Lo,{"aria-hidden":`true`,size:13}),` `,i,` `,m.items]}),(0,y.jsxs)(`span`,{children:[t===`pt-BR`?`Ver etapa`:`View stage`,(0,y.jsx)(Fo,{"aria-hidden":`true`,size:13,strokeWidth:2})]})]})]},e)})})]}),u?(0,y.jsx)(mf,{ariaLabel:m.stageDetails,closeLabel:t===`pt-BR`?`Fechar detalhes da etapa`:`Close stage details`,onClose:()=>d(null),children:(0,y.jsx)(pf,{copy:m,documents:_.get(u)??[],locale:t,onBack:()=>d(null),onOpenDocument:c,onStageChange:d,stage:u,stageArtifacts:g,stageRecord:v.get(u),stageCopy:h})}):null,s?(0,y.jsx)(ff,{ariaLabel:`${m.document} ${s.title}`,closeLabel:m.closeDocument,document:s,onClose:()=>c(null)}):null]})}function Of({usage:e,locale:t,copy:n}){let r=[{label:n.time,metric:e.duration_ms,value:kf(e.duration_ms.value,t)},{label:n.tokens,metric:e.total_tokens,value:e.total_tokens.value===null?`—`:M(e.total_tokens.value,t)},{label:n.cost,metric:e.cost,value:e.cost.value===null||e.cost.currency===null?`—`:P(e.cost.value,e.cost.currency,t)}];return(0,y.jsx)(`section`,{"aria-label":t===`pt-BR`?`Uso agregado da Task`:`Aggregated Task usage`,children:(0,y.jsx)(`dl`,{className:`trace-usage-strip`,children:r.map(({label:t,metric:r,value:i})=>{let a=Math.round(r.coverage_ratio*100),o=`${r.known_runs}/${e.run_count} ${n.measuredRuns} · ${a}%`;return(0,y.jsxs)(`div`,{title:o,children:[(0,y.jsxs)(`dt`,{children:[t,(0,y.jsx)(`span`,{"aria-hidden":`true`,className:`trace-usage-coverage`,"data-complete":r.unknown_runs===0}),(0,y.jsx)(`span`,{className:`trace-usage-sr-only`,children:o})]}),(0,y.jsx)(`dd`,{children:i})]},t)})})})}function kf(e,t){return e===null?`—`:A(e,t)}function Af(e,t){if(e===null)return`—`;let n=new Date(e);return Number.isNaN(n.getTime())?`—`:new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`short`}).format(n)}function jf(e,t){if(e===null)return`—`;let n=Date.parse(e);if(!Number.isFinite(n))return`—`;let r=Math.max(0,Date.now()-n),i=Math.max(1,Math.round(r/6e4)),a;if(i<60)a=`${i}m`;else{let e=Math.round(i/60);if(e<24)a=`${e}h`;else{let n=Math.round(e/24);if(n<7)a=`${n}d`;else{let e=Math.round(n/7);a=t===`pt-BR`?`${e}sem`:`${e}w`}}}return t===`pt-BR`?`Há ${a}`:`${a} ago`}function Mf({locale:e}){let t=e===`pt-BR`?[`Definição`,`Planejamento`,`Pronto para Executar`,`Execução`,`Verificação`]:[`Definition`,`Planning`,`Ready to Execute`,`Execution`,`Verification`];return(0,y.jsxs)(`main`,{"aria-busy":`true`,"aria-label":e===`pt-BR`?`Preparando dashboard`:`Preparing dashboard`,className:`app-skeleton`,children:[(0,y.jsxs)(`header`,{className:`app-skeleton-header`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-short`}),(0,y.jsx)(`h1`,{children:`Dashboard Zaip AIOS`})]}),(0,y.jsxs)(`div`,{className:`app-skeleton-actions`,children:[(0,y.jsx)(`span`,{}),(0,y.jsx)(`span`,{}),(0,y.jsx)(`span`,{})]})]}),(0,y.jsx)(`section`,{className:`app-skeleton-kpis`,"aria-hidden":`true`,children:Array.from({length:4},(e,t)=>`skeleton-kpi-${t}`).map(e=>(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-short`}),(0,y.jsx)(`span`,{className:`app-skeleton-value`}),(0,y.jsx)(`span`,{className:`app-skeleton-line`})]},e))}),(0,y.jsxs)(`section`,{className:`app-skeleton-panels`,"aria-hidden":`true`,children:[(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-medium`}),(0,y.jsx)(`div`,{className:`app-skeleton-chart`})]}),(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-medium`}),(0,y.jsx)(`div`,{className:`app-skeleton-chart app-skeleton-chart-small`})]})]}),(0,y.jsx)(`section`,{className:`app-skeleton-board`,"aria-hidden":`true`,children:t.map((e,t)=>(0,y.jsxs)(`article`,{children:[(0,y.jsx)(`h2`,{children:e}),Array.from({length:t%2==0?2:1},(t,n)=>`${e}-${n}`).map(e=>(0,y.jsxs)(`div`,{className:`app-skeleton-card`,children:[(0,y.jsx)(`span`,{className:`app-skeleton-line`}),(0,y.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-medium`}),(0,y.jsx)(`span`,{className:`app-skeleton-pill`})]},e))]},e))})]})}function Nf(e,t){let n=t===`pt-BR`;return e===`costs`?n?{title:`Carregando Monitor de Custos…`,detail:`Isso costuma levar poucos segundos.`}:{title:`Loading Cost Monitor…`,detail:`This usually takes a few seconds.`}:e===`traceability`?n?{title:`Carregando Rastreabilidade…`,detail:`Estamos preparando as 6 etapas da task.`}:{title:`Loading Traceability…`,detail:`Preparing the task's 6 stages.`}:n?{title:`Atualizando dados do dashboard…`,detail:`Você pode continuar navegando.`}:{title:`Refreshing dashboard data…`,detail:`You can keep navigating.`}}function Pf({area:e,locale:t}){let n=Nf(e,t);return(0,y.jsxs)(`section`,{"aria-busy":`true`,"aria-live":`polite`,className:`app-loading-panel`,role:`status`,children:[(0,y.jsx)(`i`,{}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:n.title}),(0,y.jsx)(`span`,{children:n.detail})]})]})}function Ff({area:e,locale:t}){let n=Nf(e,t);return(0,y.jsxs)(`section`,{"aria-live":`polite`,className:`app-refresh-status`,role:`status`,children:[(0,y.jsx)(`i`,{}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:n.title}),(0,y.jsx)(`span`,{children:n.detail})]})]})}function If({locale:e,onRetry:t}){return(0,y.jsxs)(`section`,{"aria-live":`polite`,className:`app-loading-panel app-loading-panel-error`,role:`status`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:e===`pt-BR`?`Não foi possível carregar os custos`:`Couldn't load costs`}),(0,y.jsx)(`span`,{children:e===`pt-BR`?`A tela continua disponível. Tente novamente quando quiser.`:`The dashboard remains available. Try again whenever you want.`})]}),(0,y.jsx)(`button`,{onClick:t,type:`button`,children:e===`pt-BR`?`Tentar novamente`:`Try again`})]})}var Lf={"pt-BR":{label:`Áreas do dashboard`,operations:`Operação`,operationsHint:`Lifecycle e trabalho em andamento`,costs:`Monitor de Custos`,costsHint:`Tempo, tokens e custo`,traceability:`Rastreabilidade`,traceabilityHint:`Ciclo completo em 6 etapas`},"en-US":{label:`Dashboard areas`,operations:`Operations`,operationsHint:`Lifecycle and work in progress`,costs:`Cost Monitor`,costsHint:`Time, tokens, and cost`,traceability:`Traceability`,traceabilityHint:`Complete 6-stage lifecycle`}};function Rf({activeView:e,locale:t,onChange:n}){let r=Lf[t],i=e=>{n(e),window.requestAnimationFrame(()=>{document.querySelector(`.dashboard-global-controls`)?.scrollIntoView({behavior:`smooth`,block:`start`})})};return(0,y.jsxs)(`nav`,{"aria-label":r.label,className:`dashboard-capability-nav`,children:[(0,y.jsxs)(`button`,{"aria-current":e===`operations`?`page`:void 0,className:e===`operations`?`is-active`:void 0,onClick:()=>i(`operations`),type:`button`,children:[(0,y.jsx)(zf,{}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:r.operations}),(0,y.jsx)(`small`,{children:r.operationsHint})]})]}),(0,y.jsxs)(`button`,{"aria-current":e===`cost-monitor`?`page`:void 0,className:e===`cost-monitor`?`is-active`:void 0,onClick:()=>i(`cost-monitor`),type:`button`,children:[(0,y.jsx)(Bf,{}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:r.costs}),(0,y.jsx)(`small`,{children:r.costsHint})]})]}),(0,y.jsxs)(`button`,{"aria-current":e===`traceability`?`page`:void 0,className:e===`traceability`?`is-active`:void 0,onClick:()=>i(`traceability`),type:`button`,children:[(0,y.jsx)(Vf,{}),(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`strong`,{children:r.traceability}),(0,y.jsx)(`small`,{children:r.traceabilityHint})]})]})]})}function zf(){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`lucide lucide-square-kanban`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`rect`,{height:`18`,rx:`2`,width:`18`,x:`3`,y:`3`}),(0,y.jsx)(`path`,{d:`M8 7v7`}),(0,y.jsx)(`path`,{d:`M12 7v4`}),(0,y.jsx)(`path`,{d:`M16 7v9`})]})}function Bf(){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`lucide lucide-circle-dollar-sign`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,y.jsx)(`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`}),(0,y.jsx)(`path`,{d:`M12 18V6`})]})}function Vf(){return(0,y.jsxs)(`svg`,{"aria-hidden":`true`,className:`lucide lucide-route`,viewBox:`0 0 24 24`,children:[(0,y.jsx)(`circle`,{cx:`6`,cy:`19`,r:`3`}),(0,y.jsx)(`path`,{d:`M9 19h6.5a3.5 3.5 0 0 0 0-7h-7a3.5 3.5 0 0 1 0-7H18`}),(0,y.jsx)(`circle`,{cx:`18`,cy:`5`,r:`3`})]})}var Hf=class{token;constructor(e){this.token=e}operations(e,t=!1){let n=t?`${ko.operations}?scope=overview`:ko.operations;return this.get(Kf(n,e))}costMonitor(e=`BRL`,t){return this.get(Kf(`${ko.costMonitor}?currency=${e}`,t))}snapshot(e=`BRL`,t){return this.get(Kf(`${ko.snapshot}?currency=${e}`,t))}reconcileOpenWork(e=`BRL`,t){return this.post(Kf(`${ko.reconcileOpenWork}?currency=${e}`,t),Wf)}task(e){return this.get(ko.task(e))}prd(e){return this.get(ko.prd(e))}spec(e){return this.get(ko.spec(e))}taskTrace(e){return this.get(ko.taskTrace(e))}pricing(){return this.get(`/api/v2/pricing`)}async savePricing(e){let t=await fetch(`/api/v2/pricing`,{method:`PUT`,headers:{"content-type":`application/json`,"x-zaip-session":this.token},body:JSON.stringify(e)});if(!t.ok)throw Error(`Pricing update failed with HTTP ${t.status}`);return await t.json()}fxRate(){return this.get(`/api/v2/fx-rate`)}agentCatalog(){return this.get(ko.agentCatalog)}agentPortraitUrl(e){return`/api/v2/agent-catalog-assets/${encodeURIComponent(e)}?token=${encodeURIComponent(this.token)}`}projectSettings(){return this.get(ko.projectSettings)}async saveProjectSettings(e){let t=await fetch(ko.projectSettings,{method:`PUT`,headers:{"content-type":`application/json`,"x-zaip-session":this.token},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.error??`Project settings update failed with HTTP ${t.status}`)}return await t.json()}async saveAgentCatalog(e){let t=e.map(({nickname_candidates:e,...t})=>t),n=await fetch(ko.agentCatalog,{method:`PUT`,headers:{"content-type":`application/json`,"x-zaip-session":this.token},body:JSON.stringify({agents:t})});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.error??`Agent catalog update failed with HTTP ${n.status}`)}return await n.json()}async saveFxRate(e){let t=await fetch(`/api/v2/fx-rate`,{method:`PUT`,headers:{"content-type":`application/json`,"x-zaip-session":this.token},body:JSON.stringify({rate:e})});if(!t.ok)throw Error(`FX update failed with HTTP ${t.status}`);return await t.json()}async get(e){let t=await Gf(e,{cache:`no-store`,headers:{"x-zaip-session":this.token}});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.error??`Dashboard API failed with HTTP ${t.status}`)}return await t.json()}async post(e,t=Uf){let n=await Gf(e,{method:`POST`,headers:{"x-zaip-session":this.token}},t);if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.error??`Dashboard API failed with HTTP ${n.status}`)}return await n.json()}},Uf=3e4,Wf=125e3;async function Gf(e,t,n=Uf){let r=new AbortController,i=window.setTimeout(()=>r.abort(),n);try{return await fetch(e,{...t,signal:r.signal})}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?Error(`A leitura demorou mais de ${Math.ceil(n/1e3)} segundos. Tente novamente.`):e}finally{window.clearTimeout(i)}}function Kf(e,t){if(t===void 0)return e;let n=new URL(e,`http://dashboard.local`);return t.from!==null&&n.searchParams.set(`from`,t.from),t.to!==null&&n.searchParams.set(`to`,t.to),`${n.pathname}${n.search}`}var qf={preset:`all`,range:{start:``,end:``}};function Jf(e){return e.preset===`all`?{from:null,to:null}:{from:e.range.start,to:e.range.end}}async function Yf(e){return e()}async function Xf(e,t){t(await e())}function Zf({locale:e,loadingTaskId:t,onSelectTask:n,onOpenChange:r,onOpenPrd:i,onOpenSpec:a,selectedTaskId:o,tasks:s,trace:c}){let l=[...s].sort((e,t)=>Date.parse(t.created_at)-Date.parse(e.created_at));return(0,y.jsxs)(`section`,{className:`traceability-workspace`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`span`,{children:e===`pt-BR`?`Task selecionada`:`Selected task`}),(0,y.jsx)(`select`,{"aria-label":e===`pt-BR`?`Selecionar task por nome`:`Select task by name`,onChange:e=>n(e.target.value),value:o,children:l.map(e=>(0,y.jsx)(`option`,{value:e.id,children:e.title},e.id))})]}),(0,y.jsx)(`small`,{children:e===`pt-BR`?`Selecione pelo nome para visualizar o ciclo completo sem precisar do ID.`:`Select by name to inspect the complete lifecycle without knowing the ID.`})]}),t?(0,y.jsx)(`div`,{"aria-live":`polite`,className:`traceability-workspace-loading`,children:e===`pt-BR`?`Carregando as 6 etapas…`:`Loading all 6 stages…`}):c?(0,y.jsx)(Df,{embedded:!0,locale:e,onClose:()=>void 0,onOpenChange:r,onOpenPrd:i,onOpenSpec:a,trace:c}):(0,y.jsx)(`p`,{children:e===`pt-BR`?`Nenhuma task disponível.`:`No task available.`})]})}var Qf=`modulepreload`,$f=function(e){return`/`+e},ep={},tp=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=$f(t,n),t=s(t),t in ep)return;ep[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Qf,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},np=`/zaip-cost-monitor`,rp=(0,l.lazy)(async()=>({default:(await tp(()=>import(`./DashboardHelpDialog-Cv-JcoxP.js`),__vite__mapDeps([0,1,2]))).DashboardHelpDialog})),ip=(0,l.lazy)(async()=>({default:(await tp(async()=>{let{AgentCatalogSettingsPage:e}=await import(`./AgentCatalogSettingsPage-CLYIi7Vo.js`);return{AgentCatalogSettingsPage:e}},__vite__mapDeps([3,4]))).AgentCatalogSettingsPage})),ap=(0,l.lazy)(async()=>({default:(await tp(async()=>{let{PricingSettingsPage:e}=await import(`./PricingSettingsDialog-CzEggcRb.js`);return{PricingSettingsPage:e}},__vite__mapDeps([5,1]))).PricingSettingsPage})),op=(0,l.lazy)(async()=>({default:(await tp(async()=>{let{ProjectSettingsPage:e}=await import(`./ProjectSettingsPage-05YKn6Z4.js`);return{ProjectSettingsPage:e}},__vite__mapDeps([6,7]))).ProjectSettingsPage})),sp=`/setup-pricing`,cp=`/setup-agents`,lp=`/setup-project`,up=`zaip-dashboard-session-token`,dp=`zaip-dashboard-locale`,fp=`zaip-dashboard-currency`;function pp(){return window.localStorage.getItem(dp)===`en-US`?`en-US`:`pt-BR`}function mp(e){return e.replace(/\/+$/,``)===np?`cost-monitor`:null}function hp(){let e=(0,l.useMemo)(()=>{let e=new URL(window.location.href),t=e.searchParams.get(`token`)??window.localStorage.getItem(up)??window.sessionStorage.getItem(up)??``;return t&&(window.localStorage.setItem(up,t),window.sessionStorage.setItem(up,t)),e.searchParams.has(`token`)&&(e.searchParams.delete(`token`),window.history.replaceState(null,``,`${e.pathname}${e.search}${e.hash}`)),t},[]),t=(0,l.useMemo)(()=>new Hf(e),[e]),[n,r]=(0,l.useState)(()=>mp(window.location.pathname)),[i,a]=(0,l.useState)(null),[o,s]=(0,l.useState)(null),[c,u]=(0,l.useState)(null),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(null),[_,v]=(0,l.useState)(null),[b,x]=(0,l.useState)(``),[S,C]=(0,l.useState)(pp),[w,T]=(0,l.useState)(()=>window.localStorage.getItem(fp)===`USD`?`USD`:`BRL`),[E,ee]=(0,l.useState)(()=>qf),[D,O]=(0,l.useState)(!1),[k,te]=(0,l.useState)(null),[ne,re]=(0,l.useState)(null),[ie,A]=(0,l.useState)(window.location.pathname),[j,M]=(0,l.useState)(!0),[N,P]=(0,l.useState)(`operations`),[F,I]=(0,l.useState)(null),[L,R]=(0,l.useState)(null),[ae,se]=(0,l.useState)(null),[ce,z]=(0,l.useState)(null),[le,ue]=(0,l.useState)(null),[de,fe]=(0,l.useState)({title:`Dashboard Zaip AIOS`,repositoryName:``}),pe=(0,l.useRef)(0),me=(0,l.useRef)(!1),he=(0,l.useRef)(!1),ge=(0,l.useRef)(0),_e=(0,l.useRef)(!1),ve=(0,l.useRef)(!1),ye=(0,l.useRef)(null),be=Jf(E),xe=`${w}:${be.from??``}:${be.to??``}`,Se=(0,l.useCallback)(async(e=!0,n=!1)=>{let r=++pe.current,i=()=>r===pe.current;e&&(M(!0),P(`operations`)),se(null),I(null);try{let e=Jf(E);if(n){let n=await t.reconcileOpenWork(w,e);if(!i())return;z(n.reconciliation),a(n.operations),ve.current=!0,s(n.costs),_e.current=!0,u(null),n.dashboard&&fe({title:n.dashboard.title,repositoryName:n.dashboard.repository_name}),ue(n.projection.source_latest_at)}else{let n=ve.current;if(_e.current){let n=await Yf(()=>t.snapshot(w,e));if(!i())return;a(n.operations),ve.current=!0,s(n.costs),_e.current=!0,u(null),ue(n.projection.source_latest_at)}else{let r=n?await t.operations(e):await t.operations(e,!0);if(!i())return;a(r),ve.current=n,ue(r.summary.source_latest_at)}}}catch(e){if(!i())return;se(e instanceof Error?e.message:String(e)),I(`operations`)}finally{e&&i()&&(M(!1),P(e=>e===`operations`?null:e))}},[t,w,E]),Ce=(0,l.useCallback)(async()=>{if(ve.current)return i;if(me.current)return null;me.current=!0,ge.current+=1,P(`costs`),I(null);try{let e=Jf(E),n=await t.operations(e);return a(n),ve.current=!0,n}catch(e){return se(e instanceof Error?e.message:String(e)),I(`operations`),null}finally{me.current=!1,ge.current=Math.max(0,ge.current-1),ge.current===0&&P(e=>e===`costs`?null:e)}},[t,i,E]),we=(0,l.useCallback)(async()=>{if(!_e.current&&!he.current){he.current=!0,ge.current+=1,P(`costs`),I(null);try{let e=Jf(E),n=ye.current;await Xf(()=>n?.key===xe?n.promise:t.snapshot(w,e),e=>{a(e.operations),ve.current=!0,s(e.costs),u(null),ue(e.projection.source_latest_at)}),_e.current=!0,ye.current=null}catch(e){se(e instanceof Error?e.message:String(e)),I(`costs`)}finally{he.current=!1,ge.current=Math.max(0,ge.current-1),ge.current===0&&P(e=>e===`costs`?null:e)}}},[t,xe,w,E]);(0,l.useEffect)(()=>{if(i===null||_e.current||ye.current?.key===xe)return;let e=t.snapshot(w,Jf(E));ye.current={key:xe,promise:e},e.catch(()=>{ye.current?.promise===e&&(ye.current=null)})},[t,xe,w,i,E]);let Te=async e=>{e&&z(null),R(e?`reconciling`:`refreshing`),await Se(!1,e),R(null)};(0,l.useEffect)(()=>{Se();let e=window.setInterval(()=>void Se(!1),3e4);return()=>window.clearInterval(e)},[Se]),(0,l.useEffect)(()=>{window.localStorage.setItem(dp,S)},[S]),(0,l.useEffect)(()=>{window.localStorage.setItem(fp,w)},[w]),(0,l.useEffect)(()=>{[`/`,sp,cp,lp].includes(window.location.pathname)||(window.history.replaceState(null,``,`/${window.location.search}${window.location.hash}`),A(`/`))},[]),(0,l.useEffect)(()=>{let e=()=>A(window.location.pathname);return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,l.useEffect)(()=>{ie!==sp||k!==null||Promise.all([t.pricing(),t.fxRate()]).then(([e,t])=>{te(e),re(t)}).catch(e=>se(String(e)))},[t,ie,k]);let Ee=e=>{window.history.pushState(null,``,e),A(e),window.scrollTo({left:0,top:0})};async function De(e){se(null),I(null),f(null),v(e),P(`traceability`),await new Promise(e=>window.requestAnimationFrame(()=>e()));try{let n=await t.taskTrace(e),r=i?.tasks.find(t=>t.id===e);return f({...n,task_title:r?.title||n.task_title||e,task_risk:r?.risk||n.task_risk||null,task_created_at:r?.created_at||n.task_created_at||null,task_progress:r?.progress??n.task_progress??0}),!0}catch(e){return se(e instanceof Error?e.message:String(e)),I(`traceability`),!1}finally{v(t=>t===e?null:t),P(e=>e===`traceability`?null:e)}}function Oe(e){let t=i?.changes.find(t=>t.id===e);t!==void 0&&(f(null),g({kind:`change`,row:t}))}function ke(e,t){let n=(e===`PRD`?i?.prds:i?.specs)?.find(e=>e.id===t);n!==void 0&&(f(null),g({kind:`macro`,label:e,row:n}))}async function Ae(e,n){se(null);try{m(e===`prd`?{label:`PRD`,detail:await t.prd(n)}:{label:`SPEC`,detail:await t.spec(n)})}catch(e){se(e instanceof Error?e.message:String(e))}}let je=async e=>{r(e),window.scrollTo({left:0,top:0});let t=e===`operations`||e===`traceability`?await Ce():i;if(e===`cost-monitor`&&we(),e===`traceability`){let e=(t??i)?.tasks.filter(e=>e.status===`completed`).toSorted((e,t)=>Date.parse(t.finished_at??t.updated_at)-Date.parse(e.finished_at??e.updated_at))[0];e&&(x(e.id),De(e.id));return}f(null),v(null)},Me=(0,y.jsx)(Rf,{activeView:n,locale:S,onChange:e=>void je(e)}),B=(0,l.useMemo)(()=>new Map((c??o)?.runs.map(e=>[e.run_id,e.estimated_brl])??[]),[o,c]),Ne=()=>{se(null),F===`costs`?we():F===`traceability`&&b?De(b):Se()};return ie===sp?k===null?(0,y.jsxs)(`main`,{className:`app-state`,children:[(0,y.jsx)(`p`,{children:S===`pt-BR`?`Configuração do projeto`:`Project settings`}),(0,y.jsx)(`h1`,{children:S===`pt-BR`?`Carregando catálogo de preços…`:`Loading pricing catalog…`}),(0,y.jsx)(`button`,{onClick:()=>Ee(`/`),type:`button`,children:S===`pt-BR`?`Voltar ao dashboard`:`Back to dashboard`})]}):(0,y.jsx)(l.Suspense,{fallback:null,children:(0,y.jsx)(ap,{catalog:k,fxRate:ne,locale:S,onClose:()=>Ee(`/`),onSave:async e=>{te(await t.savePricing(e)),await Se()},onSaveFxRate:async e=>{re(await t.saveFxRate(e)),await Se()}})}):ie===cp?(0,y.jsx)(l.Suspense,{fallback:null,children:(0,y.jsx)(ip,{api:t,locale:S,onClose:()=>Ee(`/`)})}):ie===lp?(0,y.jsx)(l.Suspense,{fallback:null,children:(0,y.jsx)(op,{api:t,locale:S,onClose:()=>Ee(`/`)})}):ae&&i===null?(0,y.jsxs)(`main`,{className:`app-state`,children:[(0,y.jsx)(`p`,{children:`Dashboard local indisponível`}),(0,y.jsx)(`h1`,{children:`Não foi possível ler o workspace V2.`}),(0,y.jsx)(`pre`,{children:ae}),(0,y.jsx)(`button`,{onClick:()=>void Se(),type:`button`,children:`Tentar novamente`})]}):i===null?(0,y.jsx)(Mf,{locale:S}):(0,y.jsxs)(y.Fragment,{children:[ae?(0,y.jsxs)(`div`,{className:`app-warning`,role:`status`,children:[(0,y.jsx)(`span`,{children:ae}),F?(0,y.jsx)(`button`,{onClick:Ne,type:`button`,children:S===`pt-BR`?`Tentar novamente`:`Try again`}):null,(0,y.jsx)(`button`,{onClick:()=>se(null),type:`button`,children:`×`})]}):null,(0,y.jsx)(mu,{alternateContent:n===`cost-monitor`?o===null?(()=>F===`costs`?(0,y.jsx)(If,{locale:S,onRetry:Ne}):(0,y.jsx)(Pf,{area:`costs`,locale:S})):(e=>(0,y.jsx)(sf,{currency:w,data:o,embedded:!0,globalFilters:e,lastUpdatedAt:le,locale:S,loading:N===`costs`,onLocaleChange:C,onCurrencyChange:T,onActiveDataChange:u,onOpenTrace:e=>void De(e),onRefresh:()=>R(`choose`),operations:i})):n===`traceability`?(()=>(0,y.jsx)(Zf,{loadingTaskId:_,locale:S,onSelectTask:e=>{x(e),De(e)},onOpenChange:Oe,onOpenPrd:e=>ke(`PRD`,e),onOpenSpec:e=>ke(`SPEC`,e),selectedTaskId:b,tasks:i.tasks,trace:d})):n===null?(0,y.jsx)(`span`,{"aria-hidden":`true`,hidden:!0}):void 0,capabilityNavigation:Me,data:i,dashboardTitle:de.title,repositoryName:de.repositoryName,loading:j,locale:S,resolveRunCostBrl:o===null?void 0:e=>B.get(e)??null,onLocaleChange:C,onDetailDataRequest:()=>void Ce(),onOpenDocument:(e,t)=>void Ae(e,t),onOpenTask:De,onPeriodChange:(e,t)=>ee({preset:e,range:t}),onRefresh:()=>R(`choose`),settings:(0,y.jsxs)(`div`,{className:`dashboard-global-settings`,children:[(0,y.jsxs)(`label`,{children:[(0,y.jsx)(`span`,{children:S===`pt-BR`?`Moeda`:`Currency`}),(0,y.jsxs)(`select`,{"aria-label":S===`pt-BR`?`Moeda`:`Currency`,onChange:e=>T(e.target.value),value:w,children:[(0,y.jsx)(`option`,{value:`BRL`,children:`BRL · Real brasileiro`}),(0,y.jsx)(`option`,{value:`USD`,children:`USD · US Dollar`})]})]}),(0,y.jsx)(`button`,{className:`dashboard-help-open`,onClick:()=>O(!0),type:`button`,children:S===`pt-BR`?`Abrir ajuda e guides`:`Open help and guides`}),(0,y.jsx)(`button`,{className:`dashboard-help-open`,onClick:()=>Ee(sp),type:`button`,children:S===`pt-BR`?`Configurar preços e câmbio`:`Configure pricing and FX`}),(0,y.jsx)(`button`,{className:`dashboard-help-open`,onClick:()=>Ee(cp),type:`button`,children:S===`pt-BR`?`Configurar agentes`:`Configure agents`}),(0,y.jsx)(`button`,{className:`dashboard-help-open`,onClick:()=>Ee(lp),type:`button`,children:S===`pt-BR`?`Configurar projeto`:`Configure project`})]})}),n===`traceability`?null:_?(0,y.jsx)(Ef,{locale:S,taskId:_}):d?(0,y.jsx)(Df,{locale:S,onClose:()=>f(null),onOpenChange:Oe,onOpenPrd:e=>ke(`PRD`,e),onOpenSpec:e=>ke(`SPEC`,e),trace:d}):null,h?.kind===`change`?(0,y.jsx)(oe,{details:{kind:`change`,row:h.row},locale:S,onClose:()=>g(null)}):null,h?.kind===`macro`?(0,y.jsx)(jc,{label:h.label,locale:S,onClose:()=>g(null),onOpenDocument:(e,t)=>void Ae(e,t),onOpenTrace:e=>{g(null),De(e)},row:h.row,runs:i.runs,specs:i.specs,tasks:i.tasks}):null,p?(0,y.jsx)(hu,{detail:p.detail,label:p.label,locale:S,onClose:()=>m(null)}):null,D?(0,y.jsx)(l.Suspense,{fallback:null,children:(0,y.jsx)(rp,{locale:S,onClose:()=>O(!1)})}):null,L===`choose`?(0,y.jsx)(`div`,{className:`app-refresh-dialog-backdrop`,children:(0,y.jsxs)(`section`,{"aria-label":`Atualizar dashboard`,"aria-modal":`true`,className:`app-refresh-dialog`,role:`dialog`,children:[(0,y.jsx)(`h2`,{children:S===`pt-BR`?`Atualizar dashboard`:`Refresh dashboard`}),(0,y.jsx)(`p`,{children:S===`pt-BR`?`Escolha uma atualização rápida ou reconcilie os itens que ainda estão em aberto.`:`Choose a quick refresh or reconcile work items that are still open.`}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`button`,{onClick:()=>void Te(!1),type:`button`,children:S===`pt-BR`?`Apenas atualizar dados`:`Refresh data only`}),(0,y.jsx)(`button`,{onClick:()=>void Te(!0),type:`button`,children:S===`pt-BR`?`Reconciliar itens abertos`:`Reconcile open work`})]}),(0,y.jsx)(`button`,{className:`app-refresh-cancel`,onClick:()=>R(null),type:`button`,children:S===`pt-BR`?`Cancelar`:`Cancel`})]})}):null,L===`refreshing`||L===`reconciling`?(0,y.jsxs)(`section`,{"aria-live":`polite`,className:`app-refresh-status`,role:`status`,children:[(0,y.jsx)(`i`,{}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`strong`,{children:L===`reconciling`?S===`pt-BR`?`Reconciliando itens em aberto…`:`Reconciling open work…`:S===`pt-BR`?`Atualizando dados…`:`Refreshing data…`}),(0,y.jsx)(`span`,{children:S===`pt-BR`?`Você pode continuar usando o dashboard.`:`You can keep using the dashboard.`})]})]}):null,ce!==null&&L===null?(0,y.jsxs)(`section`,{"aria-live":`polite`,className:`app-reconciliation-result`,role:`status`,children:[(0,y.jsx)(`strong`,{children:S===`pt-BR`?`Resultado da reconciliação manual`:`Manual reconciliation result`}),(0,y.jsx)(`span`,{children:S===`pt-BR`?`${ce.reconciled_ids.length} item(ns) reconciliado(s).`:`${ce.reconciled_ids.length} item(s) reconciled.`}),ce.reconciled_ids.length>0?(0,y.jsx)(`p`,{children:ce.reconciled_ids.join(`, `)}):null,ce.blocked.length>0?(0,y.jsxs)(`p`,{children:[S===`pt-BR`?`Bloqueados: `:`Blocked: `,ce.blocked.map(e=>`${e.id}${e.reason===null?``:` (${e.reason})`}`).join(`; `)]}):null,ce.not_reconciled.length>0?(0,y.jsxs)(`p`,{children:[S===`pt-BR`?`Não reconciliados: `:`Not reconciled: `,ce.not_reconciled.map(e=>`${e.id}${e.reason===null?``:` (${e.reason})`}`).join(`; `)]}):null,(0,y.jsx)(`button`,{onClick:()=>z(null),type:`button`,children:S===`pt-BR`?`Fechar`:`Dismiss`})]}):null,N!==null&&N!==`operations`&&L===null&&!(n===`cost-monitor`&&o===null)?(0,y.jsx)(Ff,{area:N,locale:S}):null]})}var gp=document.getElementById(`root`);if(!gp)throw Error(`Elemento #root não encontrado`);(0,u.createRoot)(gp).render((0,y.jsx)(l.StrictMode,{children:(0,y.jsx)(hp,{})}));export{n,v as t};