@overlordai/server 1.0.138 → 1.0.139
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.
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-BhddWVW1.js → AccessTokensPage-DMsQKvGG.js} +1 -1
- package/public/assets/{AdminPage-pfvAHWMr.js → AdminPage-DqZMqDDh.js} +1 -1
- package/public/assets/{AgentCliPage-C345jDjj.js → AgentCliPage-BR2YXUlN.js} +1 -1
- package/public/assets/{ApiReferencePage-DHLXt2i6.js → ApiReferencePage-CWGvx9sZ.js} +1 -1
- package/public/assets/{ArchitecturePage-C6I9_3Gs.js → ArchitecturePage-CVipZPS8.js} +1 -1
- package/public/assets/{AuditLogPage-CdIyX0zS.js → AuditLogPage-CCUK_lWo.js} +1 -1
- package/public/assets/{BindPlatformPage-KFs9i2uA.js → BindPlatformPage-BDisYk6H.js} +1 -1
- package/public/assets/{BotIntegrationPage-DCFZPk-7.js → BotIntegrationPage-DoqcdqwE.js} +1 -1
- package/public/assets/{BotManage-XcDpO3JL.js → BotManage-DRo01WBu.js} +1 -1
- package/public/assets/{BotSetupPage-VWtZWkVa.js → BotSetupPage-nornZgmt.js} +1 -1
- package/public/assets/{ChangelogPage-BbOP-JLv.js → ChangelogPage-Bd5TviZ8.js} +1 -1
- package/public/assets/{CliReferencePage-DtYHgbSY.js → CliReferencePage-C6NT0ynG.js} +1 -1
- package/public/assets/{DeploymentPage-BtlkcDYB.js → DeploymentPage-3YMjpAFo.js} +1 -1
- package/public/assets/{DevWorkflowPage-CxXMRR-3.js → DevWorkflowPage-DFQTZVP9.js} +1 -1
- package/public/assets/{DeveloperManage-BcBr_3L_.js → DeveloperManage-BnMIj_g_.js} +1 -1
- package/public/assets/{DeveloperSetupPage-DZ4yMaW5.js → DeveloperSetupPage-Cw4nLpIm.js} +1 -1
- package/public/assets/{DocsIndexPage-BLlkapm4.js → DocsIndexPage-cK28EfKj.js} +1 -1
- package/public/assets/{DocsLayout-MaagZ0kw.js → DocsLayout-BVtSzaqN.js} +1 -1
- package/public/assets/{DocsPrimitives-OHFIHBcn.js → DocsPrimitives-2csfHzW_.js} +1 -1
- package/public/assets/{EditProjectPage-C3QK8nE_.js → EditProjectPage-D4LeLkUK.js} +1 -1
- package/public/assets/{EmptyState-C3ql5j5L.js → EmptyState-ADwWEXdn.js} +1 -1
- package/public/assets/{EnvVariablesPage-DckuYIoH.js → EnvVariablesPage-D7HonzNe.js} +1 -1
- package/public/assets/{HomePage-zewuW5E4.js → HomePage-CFVWSe09.js} +1 -1
- package/public/assets/{InfoRow-D5t0RpaR.js → InfoRow-CmtJW4M9.js} +1 -1
- package/public/assets/{InstallationPage-DUCocNLA.js → InstallationPage-CJ-YdcrX.js} +1 -1
- package/public/assets/{LandingPage-y9pKUede.js → LandingPage-CWdPeZv-.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-CJBGPeYo.js → LocalDevelopmentPage-BDl2Ktyc.js} +1 -1
- package/public/assets/{LoginPage-WGOUh3Zl.js → LoginPage-DgF9ENzx.js} +1 -1
- package/public/assets/{MetricBar-CWCoyjWv.js → MetricBar-DoUTAkIk.js} +1 -1
- package/public/assets/{MobileTerminalShell-By5L8I0_.js → MobileTerminalShell-BSE0-T35.js} +13 -13
- package/public/assets/{NotFoundPage-NHnxMNCC.js → NotFoundPage-BUrnSFza.js} +1 -1
- package/public/assets/{OnboardingGuide-DalnDVPS.js → OnboardingGuide-E87DHNsp.js} +1 -1
- package/public/assets/{PermissionsPage-Dt4llTFV.js → PermissionsPage-DKhdHNDg.js} +1 -1
- package/public/assets/{PipelineConfigPage-CIojkTYx.js → PipelineConfigPage-Dn-fh0Ia.js} +1 -1
- package/public/assets/{PipelineEditorPage-BZ96tFxp.js → PipelineEditorPage-DY945ZLB.js} +1 -1
- package/public/assets/{ProfilePage-YrqpghqL.js → ProfilePage-wMwqf3xq.js} +1 -1
- package/public/assets/{ProjectDetailPage-CM5bfJmU.js → ProjectDetailPage-Czbvi0xm.js} +1 -1
- package/public/assets/{ProjectListPage-DC1Kc7Lb.js → ProjectListPage-qT9qvnxf.js} +1 -1
- package/public/assets/{QuickAuth-rpWKeLO_.js → QuickAuth-BsMxofrA.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-DZAmLAes.js → RemoveMemberConfirmDialog-Brv6Th8M.js} +1 -1
- package/public/assets/{Select-C-ttiP28.js → Select-BfjWmQST.js} +1 -1
- package/public/assets/{SettingsPage-C7ErXyNZ.js → SettingsPage-CZwwUAeC.js} +1 -1
- package/public/assets/{Skeleton-joUgi0KR.js → Skeleton-DQWHHk9G.js} +1 -1
- package/public/assets/{SkillPage-C3fKU78U.js → SkillPage-CKbqXAb6.js} +1 -1
- package/public/assets/{TaskDetailPage-CoYa78-E.js → TaskDetailPage-CskFoYAc.js} +2 -2
- package/public/assets/{TaskListPage-BqyEs5a5.js → TaskListPage-T7DWBtM3.js} +1 -1
- package/public/assets/{TaskStatusBadge-DHw2HKgB.js → TaskStatusBadge-Cd9AKReP.js} +1 -1
- package/public/assets/TerminalHomePage-ClJFAaTn.js +11 -0
- package/public/assets/{TokenManage-Cg_B-8Nh.js → TokenManage-Cj9UuqyE.js} +1 -1
- package/public/assets/{Tooltip-C5YjudXm.js → Tooltip-1tjISJAN.js} +1 -1
- package/public/assets/{TotpSetupPage-BnxSNEq7.js → TotpSetupPage-Dme4c3tv.js} +1 -1
- package/public/assets/{WorkerDetailPage-CZPkIYBS.js → WorkerDetailPage-CgXIs1_M.js} +1 -1
- package/public/assets/{WorkerListPage-D50gtKFZ.js → WorkerListPage-CM1GqeN7.js} +1 -1
- package/public/assets/{WorkerOperationsPage-C4PArGPr.js → WorkerOperationsPage-uArfsFAY.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-r4f3o1z6.js → WorkerSetupGuidePage-CyW_9sIh.js} +1 -1
- package/public/assets/{WorkerSetupPage-C8IoFobt.js → WorkerSetupPage-DTQvCeTf.js} +1 -1
- package/public/assets/{agent-type-options-B1aNX95r.js → agent-type-options-l4HLs4lb.js} +1 -1
- package/public/assets/{arrow-left-kFMv2goM.js → arrow-left-D2z6WXle.js} +1 -1
- package/public/assets/{arrow-right-iDt-dafx.js → arrow-right-BBWwGkdK.js} +1 -1
- package/public/assets/{bot-ChxoWTEC.js → bot-haRrziLf.js} +1 -1
- package/public/assets/{chevron-left-CjZsnHH6.js → chevron-left-B11s6IVD.js} +1 -1
- package/public/assets/{chevron-right-bRokRq2n.js → chevron-right-CxMAZVfy.js} +1 -1
- package/public/assets/{copy-DTL-jbDm.js → copy-CukaPL3b.js} +1 -1
- package/public/assets/{download-B7XilVjT.js → download-CtBIkCC6.js} +1 -1
- package/public/assets/{external-link-CFjZxTQ5.js → external-link-BYaw3Ovt.js} +1 -1
- package/public/assets/{file-text-oQMnmgkw.js → file-text-CwpyLWx2.js} +1 -1
- package/public/assets/{git-fork-JOmnLsHO.js → git-fork-DjDcRdWO.js} +1 -1
- package/public/assets/index-BUjb3VF-.css +1 -0
- package/public/assets/{index-DHpBdv1F.js → index-GPUbNOkg.js} +2 -2
- package/public/assets/{key-BBeR1F9r.js → key-D-EBAM_S.js} +1 -1
- package/public/assets/{loader-circle-4X_s6z-L.js → loader-circle-PEOtoIoF.js} +1 -1
- package/public/assets/{pencil-er_Z36Ro.js → pencil-BObnoNZc.js} +1 -1
- package/public/assets/{plus-E_rJxJAi.js → plus-JnJTWOh0.js} +1 -1
- package/public/assets/{rotate-ccw-DKJbe7VX.js → rotate-ccw-9hl77Xny.js} +1 -1
- package/public/assets/{scroll-text-DTD9Dg9z.js → scroll-text-w6v00sw0.js} +1 -1
- package/public/assets/{settings-DaAAUDK3.js → settings-DqX6KTB6.js} +1 -1
- package/public/assets/{status-colors-DJc_fXaW.js → status-colors-C_RhLQKM.js} +1 -1
- package/public/assets/{task-constants-CsjB14wR.js → task-constants-LNckgIqT.js} +1 -1
- package/public/assets/{trash-2-DUEEg0-a.js → trash-2-BH7Uy_FR.js} +1 -1
- package/public/assets/{useFetch-CIp8RQub.js → useFetch-C6aoI2YR.js} +1 -1
- package/public/assets/{users-DyJLLqVQ.js → users-N89uFOml.js} +1 -1
- package/public/assets/{wifi-BOM9bCKp.js → wifi-B0GLkoI5.js} +1 -1
- package/public/assets/{workflow-DCr-oujx.js → workflow-CPFrQB2p.js} +1 -1
- package/public/index.html +2 -2
- package/public/sw.js +1 -1
- package/public/assets/TerminalHomePage-Dr6u8qQW.js +0 -11
- package/public/assets/index-C4BXwe2D.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-CWdPeZv-.js","assets/arrow-right-BBWwGkdK.js","assets/bot-haRrziLf.js","assets/workflow-CPFrQB2p.js","assets/users-N89uFOml.js","assets/copy-CukaPL3b.js","assets/HomePage-CFVWSe09.js","assets/TaskStatusBadge-Cd9AKReP.js","assets/status-colors-C_RhLQKM.js","assets/Skeleton-DQWHHk9G.js","assets/OnboardingGuide-E87DHNsp.js","assets/chevron-right-CxMAZVfy.js","assets/date-RFA7-ZGs.js","assets/useFetch-C6aoI2YR.js","assets/Tooltip-1tjISJAN.js","assets/TerminalHomePage-ClJFAaTn.js","assets/MobileTerminalShell-BSE0-T35.js","assets/loader-circle-PEOtoIoF.js","assets/rotate-ccw-9hl77Xny.js","assets/MobileTerminalShell-6GBZ9nXN.css","assets/task-constants-LNckgIqT.js","assets/agent-type-options-l4HLs4lb.js","assets/Select-BfjWmQST.js","assets/plus-JnJTWOh0.js","assets/wifi-B0GLkoI5.js","assets/TaskListPage-T7DWBtM3.js","assets/git-fork-DjDcRdWO.js","assets/EmptyState-ADwWEXdn.js","assets/chevron-left-B11s6IVD.js","assets/TaskDetailPage-CskFoYAc.js","assets/arrow-left-D2z6WXle.js","assets/external-link-BYaw3Ovt.js","assets/file-text-CwpyLWx2.js","assets/WorkerListPage-CM1GqeN7.js","assets/MetricBar-DoUTAkIk.js","assets/WorkerSetupGuidePage-CyW_9sIh.js","assets/key-D-EBAM_S.js","assets/download-CtBIkCC6.js","assets/settings-DqX6KTB6.js","assets/WorkerDetailPage-CgXIs1_M.js","assets/InfoRow-CmtJW4M9.js","assets/trash-2-BH7Uy_FR.js","assets/ProjectListPage-qT9qvnxf.js","assets/ProjectDetailPage-Czbvi0xm.js","assets/RemoveMemberConfirmDialog-Brv6Th8M.js","assets/pencil-BObnoNZc.js","assets/EditProjectPage-D4LeLkUK.js","assets/PipelineEditorPage-DY945ZLB.js","assets/ProfilePage-wMwqf3xq.js","assets/password-CHk45-jw.js","assets/AccessTokensPage-DMsQKvGG.js","assets/CliReferencePage-C6NT0ynG.js","assets/DocsPrimitives-2csfHzW_.js","assets/QuickAuth-BsMxofrA.js","assets/ApiReferencePage-CWGvx9sZ.js","assets/SkillPage-CKbqXAb6.js","assets/DocsLayout-BVtSzaqN.js","assets/InstallationPage-CJ-YdcrX.js","assets/DeveloperSetupPage-Cw4nLpIm.js","assets/WorkerSetupPage-DTQvCeTf.js","assets/BotSetupPage-nornZgmt.js","assets/LocalDevelopmentPage-BDl2Ktyc.js","assets/DeploymentPage-3YMjpAFo.js","assets/PipelineConfigPage-Dn-fh0Ia.js","assets/DevWorkflowPage-DFQTZVP9.js","assets/EnvVariablesPage-D7HonzNe.js","assets/ArchitecturePage-CVipZPS8.js","assets/AgentCliPage-BR2YXUlN.js","assets/DocsIndexPage-cK28EfKj.js","assets/AdminPage-DqZMqDDh.js","assets/scroll-text-w6v00sw0.js","assets/DeveloperManage-BnMIj_g_.js","assets/BotManage-DRo01WBu.js","assets/TokenManage-Cj9UuqyE.js","assets/AuditLogPage-CCUK_lWo.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e_=Object.defineProperty;var Pm=i=>{throw TypeError(i)};var t_=(i,u,s)=>u in i?e_(i,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[u]=s;var Ve=(i,u,s)=>t_(i,typeof u!="symbol"?u+"":u,s),_s=(i,u,s)=>u.has(i)||Pm("Cannot "+s);var q=(i,u,s)=>(_s(i,u,"read from private field"),s?s.call(i):u.get(i)),Pt=(i,u,s)=>u.has(i)?Pm("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(i):u.set(i,s),Kt=(i,u,s,o)=>(_s(i,u,"write to private field"),o?o.call(i,s):u.set(i,s),s),Ee=(i,u,s)=>(_s(i,u,"access private method"),s);var eh=(i,u,s,o)=>({set _(f){Kt(i,u,f,s)},get _(){return q(i,u,o)}});(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const y of m.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&o(y)}).observe(document,{childList:!0,subtree:!0});function s(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(f){if(f.ep)return;f.ep=!0;const m=s(f);fetch(f.href,m)}})();function a_(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var vs={exports:{}},ti={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -239,4 +239,4 @@ overlord install`,setup_step_1_link:"installation guide",setup_step_2_title:"reg
|
|
|
239
239
|
overlord setup worker`,setup_step_2_link:"worker setup guide",setup_step_3_title:"connect as developer",setup_step_3_desc:"install the developer cli to create tasks, attach to running sessions, and monitor progress from your terminal.",setup_step_3_command:`npm install -g @overlordai/developer-cli
|
|
240
240
|
ov login https://overlord.yourdomain.com`,setup_step_3_link:"development workflow",go_to_app:"open app",documentation:"documentation",api:"api",copy_install_command:"copy install command"},docs:{quick_start:"// quick start",developer_cli:"developer cli (ov)",admin_cli:"admin cli (overlord)",authentication:"// authentication",usage:"usage",flags:"flags",example:"example",request_body:"request body",response:"response",quick_start_with_token:"// quick start with your token",replace_token_hint:"// replace <your-token> with the actual token value from your access tokens page",cli_tools_desc:"// overlord provides two cli tools: {ov} (developer cli) and {overlord} (admin/ops cli)",api_base_url_desc:"// base url: {url} · all endpoints return json · auth via bearer token in authorization header",docs_nav_getting_started:"// getting started",docs_nav_guides:"// guides",docs_nav_reference:"// reference",docs_nav_other:"// other",docs_installation:"installation",docs_developer_setup:"developer setup",docs_worker_setup:"worker setup",docs_bot_setup:"bot setup",docs_local_dev:"local development",docs_worker_ops:"worker operations",docs_deployment:"deployment",docs_bot_integration:"bot integration",docs_pipeline:"pipeline config",docs_dev_workflow:"dev workflow",docs_cli:"cli reference",docs_api:"api reference",docs_skill:"skill reference",docs_permissions:"permissions & roles",docs_env_vars:"environment variables",docs_architecture:"architecture",docs_changelog:"changelog",docs_back:"< back",docs_all_title:"// all documentation",docs_all_subtitle:"browse all guides, references, and resources",docs_desc_installation:"install overlord server and cli tools",docs_desc_developer_setup:"set up your local development environment",docs_desc_worker_setup:"register and configure worker machines",docs_desc_bot_setup:"connect lark or slack bots to overlord",docs_desc_local_dev:"run and debug overlord locally",docs_desc_worker_ops:"manage worker lifecycle and monitoring",docs_desc_deployment:"deploy overlord to production servers",docs_desc_bot_integration:"interactive cards, adapter pattern, troubleshooting",docs_desc_pipeline:"define multi-stage task pipelines",docs_desc_dev_workflow:"git workflow, branching, and merge requests",docs_desc_cli:"cli command reference",docs_desc_api:"http api endpoint reference",docs_desc_skill:"custom skill definitions and configuration",docs_desc_permissions:"roles, access control, and authorization",docs_desc_env_vars:"environment variables for server and worker",docs_desc_architecture:"system architecture and component overview",docs_desc_changelog:"version history and release notes",docs_agent_cli:"agent cli",docs_desc_agent_cli:"claude, cursor, and codex cli integration and flag mapping"},onboarding:{getting_started:"// getting started",dismiss:"dismiss",all_done:"all set! you're ready to go.",admin_create_project_title:"create your first project",admin_create_project_desc:"set up a project with a git repo and pipeline",admin_register_worker_title:"register a worker",admin_register_worker_desc:"generate a token and set up a worker to run tasks",admin_create_developer_title:"create a developer account",admin_create_developer_desc:"add team members who can create and monitor tasks",admin_configure_bot_title:"configure a chat bot",admin_configure_bot_desc:"register a Lark or Slack bot to enable task management via chat",admin_first_task_title:"create your first task",admin_first_task_desc:"verify the full pipeline works end-to-end",lead_view_projects_title:"view your projects",lead_view_projects_desc:"check the projects assigned to you",lead_configure_pipeline_title:"configure a pipeline",lead_configure_pipeline_desc:"set up stages for your project workflow",lead_add_member_title:"add a team member",lead_add_member_desc:"invite developers to your project",lead_first_task_title:"create your first task",lead_first_task_desc:"submit a task and watch it execute",dev_install_cli_title:"install the ov cli",dev_install_cli_desc:"npm install -g @overlordai/developer-cli",dev_setup_cli_title:"run ov setup",dev_setup_cli_desc:"connect to the server and authenticate",dev_link_chat_title:"link your chat account",dev_link_chat_desc:'send "bind" to the bot in Lark or Slack to connect your account',dev_view_projects_title:"explore projects",dev_view_projects_desc:"browse available projects and their pipelines",dev_first_task_title:"create your first task",dev_first_task_desc:"submit a task via web or cli",go_to_projects:"go to projects",go_to_workers:"go to workers",go_to_tasks:"go to tasks",go_to_bots:"manage bots",manage_developers:"manage developers",cli:"cli",setup_guide:"setup guide"},bind:{title:"// link platform account",linking:"linking your account...",success:"account linked successfully!",success_detail:"your {platform} account has been connected. you can now use bot commands.",error:"failed to link account",invalid_token:'this link is invalid or has expired. send "bind" to the bot again to get a new link.',back_to_home:"go to dashboard",no_token:"no bind token provided."},pwa_install:{title:"overlord://install",command:"overlord --install",desc_1:"add to home screen for standalone app experience",desc_2:"works offline · full-screen · instant launch",install:"y — install",skip:"n — skip",ios_command:"install --manual",ios_step_1:"tap share button in safari toolbar",ios_step_2:'scroll down → tap "add to home screen"',ios_step_3:'tap "add" to confirm'},pwa_update:{message:"new version available",reload:"reload"},terminal_home:{title:"terminal",select_project:"project...",all_projects:"all projects",task_description_placeholder:"describe the task...",new_task:"new task",no_active_tasks:"no active tasks",create_task_hint:"create a task using the bar above to get started",confirm_create_title:"create task",confirm_create_message:`create a [{taskType}] task in project [{projectKey}]?
|
|
241
241
|
|
|
242
|
-
"{description}"`}};function Ab(i,u){const s=u.split(".");let o=i;for(const f of s){if(o==null||typeof o!="object")return u;o=o[f]}return typeof o=="string"?o:u}function zb(i,u){return u?i.replace(/\{(\w+)\}/g,(s,o)=>u[o]!=null?String(u[o]):`{${o}}`):i}function Yr(i,u){return zb(Ab(Rb,i),u)}function Vt(){return{t:g.useCallback((u,s)=>Yr(u,s),[])}}function cp(){const{theme:i,setTheme:u}=sp(),{t:s}=Vt(),o=i==="dark"||i==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){u(o?"light":"dark")}return h.jsx("button",{onClick:f,className:"flex items-center gap-1.5 rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]","aria-label":s(o?"common.switch_to_light":"common.switch_to_dark"),title:s(o?"common.light_mode":"common.dark_mode"),children:o?h.jsx(_b,{size:16}):h.jsx(mb,{size:16})})}class Ns extends Error{constructor(s,o,f){const m=s.status||s.status===0?s.status:"",y=s.statusText??"",b=`${m} ${y}`.trim(),_=b?`status code ${b}`:"an unknown error";super(`Request failed with ${_}: ${o.method} ${o.url}`);Ve(this,"response");Ve(this,"request");Ve(this,"options");this.name="HTTPError",this.response=s,this.request=o,this.options=f}}class fp extends Error{constructor(s){let o="Non-error value was thrown";try{typeof s=="string"?o=s:s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&(o=s.message)}catch{}super(o);Ve(this,"name","NonError");Ve(this,"value");this.value=s}}class As extends Error{constructor(s){const o=s!=null&&s.cause?s.cause instanceof Error?s.cause:new fp(s.cause):void 0;super(s!=null&&s.code?`Forced retry: ${s.code}`:"Forced retry",o?{cause:o}:void 0);Ve(this,"name","ForceRetryError");Ve(this,"customDelay");Ve(this,"code");Ve(this,"customRequest");this.customDelay=s==null?void 0:s.delay,this.code=s==null?void 0:s.code,this.customRequest=s==null?void 0:s.request}}const Sh=(()=>{let i=!1,u=!1;const s=typeof globalThis.ReadableStream=="function",o=typeof globalThis.Request=="function";if(s&&o)try{u=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return i&&!u})(),Ob=typeof globalThis.AbortController=="function",dp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Cb=typeof globalThis.ReadableStream=="function",Db=typeof globalThis.FormData=="function",mp=["get","post","put","patch","head","delete"],Nb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},zs=2147483647,Mb=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,hp=Symbol("stop");class pp{constructor(u){Ve(this,"options");this.options=u}}const Ub=i=>new pp(i),qb={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Lb={next:!0},Hb={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Bb=i=>{if(!i)return 0;if(i instanceof FormData){let u=0;for(const[s,o]of i)u+=Mb,u+=new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length,u+=typeof o=="string"?new TextEncoder().encode(o).length:o.size;return u}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const u=JSON.stringify(i);return new TextEncoder().encode(u).length}catch{return 0}return 0},yp=(i,u,s)=>{let o,f=0;return i.pipeThrough(new TransformStream({transform(m,y){if(y.enqueue(m),o){f+=o.byteLength;let b=u===0?0:f/u;b>=1&&(b=1-Number.EPSILON),s==null||s({percent:b,totalBytes:Math.max(u,f),transferredBytes:f},o)}o=m},flush(){o&&(f+=o.byteLength,s==null||s({percent:1,totalBytes:Math.max(u,f),transferredBytes:f},o))}}))},Yb=(i,u)=>{if(!i.body)return i;if(i.status===204)return new Response(null,{status:i.status,statusText:i.statusText,headers:i.headers});const s=Math.max(0,Number(i.headers.get("content-length"))||0);return new Response(yp(i.body,s,u),{status:i.status,statusText:i.statusText,headers:i.headers})},Gb=(i,u,s)=>{if(!i.body)return i;const o=Bb(s??i.body);return new Request(i,{duplex:"half",body:yp(i.body,o,u)})},_n=i=>i!==null&&typeof i=="object",Dr=(...i)=>{for(const u of i)if((!_n(u)||Array.isArray(u))&&u!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...i)},gp=(i={},u={})=>{const s=new globalThis.Headers(i),o=u instanceof globalThis.Headers,f=new globalThis.Headers(u);for(const[m,y]of f.entries())o&&y==="undefined"||y===void 0?s.delete(m):s.set(m,y);return s};function Nr(i,u,s){return Object.hasOwn(u,s)&&u[s]===void 0?[]:Ws(i[s]??[],u[s]??[])}const _p=(i={},u={})=>({beforeRequest:Nr(i,u,"beforeRequest"),beforeRetry:Nr(i,u,"beforeRetry"),afterResponse:Nr(i,u,"afterResponse"),beforeError:Nr(i,u,"beforeError")}),Vb=(i,u)=>{const s=new URLSearchParams;for(const o of[i,u])if(o!==void 0)if(o instanceof URLSearchParams)for(const[f,m]of o.entries())s.append(f,m);else if(Array.isArray(o))for(const f of o){if(!Array.isArray(f)||f.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(f[0]),String(f[1]))}else if(_n(o))for(const[f,m]of Object.entries(o))m!==void 0&&s.append(f,String(m));else{const f=new URLSearchParams(o);for(const[m,y]of f.entries())s.append(m,y)}return s},Ws=(...i)=>{let u={},s={},o={},f;const m=[];for(const y of i)if(Array.isArray(y))Array.isArray(u)||(u=[]),u=[...u,...y];else if(_n(y)){for(let[b,_]of Object.entries(y)){if(b==="signal"&&_ instanceof globalThis.AbortSignal){m.push(_);continue}if(b==="context"){if(_!=null&&(!_n(_)||Array.isArray(_)))throw new TypeError("The `context` option must be an object");u={...u,context:_==null?{}:{...u.context,..._}};continue}if(b==="searchParams"){_==null?f=void 0:f=f===void 0?_:Vb(f,_);continue}_n(_)&&b in u&&(_=Ws(u[b],_)),u={...u,[b]:_}}_n(y.hooks)&&(o=_p(o,y.hooks),u.hooks=o),_n(y.headers)&&(s=gp(s,y.headers),u.headers=s)}return f!==void 0&&(u.searchParams=f),m.length>0&&(m.length===1?u.signal=m[0]:dp?u.signal=AbortSignal.any(m):u.signal=m.at(-1)),u},Xb=i=>mp.includes(i)?i.toUpperCase():i,Qb=["get","put","head","delete","options","trace"],Zb=[408,413,429,500,502,503,504],Kb=[413,429,503],Eh={limit:2,methods:Qb,statusCodes:Zb,afterStatusCodes:Kb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:i=>.3*2**(i-1)*1e3,jitter:void 0,retryOnTimeout:!1},Jb=(i={})=>{if(typeof i=="number")return{...Eh,limit:i};if(i.methods&&!Array.isArray(i.methods))throw new Error("retry.methods must be an array");if(i.methods&&(i.methods=i.methods.map(s=>s.toLowerCase())),i.statusCodes&&!Array.isArray(i.statusCodes))throw new Error("retry.statusCodes must be an array");const u=Object.fromEntries(Object.entries(i).filter(([,s])=>s!==void 0));return{...Eh,...u}};class Ms extends Error{constructor(s){super(`Request timed out: ${s.method} ${s.url}`);Ve(this,"request");this.name="TimeoutError",this.request=s}}async function $b(i,u,s,o){return new Promise((f,m)=>{const y=setTimeout(()=>{s&&s.abort(),m(new Ms(i))},o.timeout);o.fetch(i,u).then(f).catch(m).then(()=>{clearTimeout(y)})})}async function Wb(i,{signal:u}){return new Promise((s,o)=>{u&&(u.throwIfAborted(),u.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(m),o(u.reason)}const m=setTimeout(()=>{u==null||u.removeEventListener("abort",f),s()},i)})}const Fb=(i,u)=>{const s={};for(const o in u)Object.hasOwn(u,o)&&!(o in Hb)&&!(o in qb)&&(!(o in i)||o in Lb)&&(s[o]=u[o]);return s},Ib=i=>i===void 0?!1:Array.isArray(i)?i.length>0:i instanceof URLSearchParams?i.size>0:typeof i=="object"?Object.keys(i).length>0:typeof i=="string"?i.trim().length>0:!!i;function Pb(i){return i instanceof Ns||(i==null?void 0:i.name)===Ns.name}function e0(i){return i instanceof Ms||(i==null?void 0:i.name)===Ms.name}var Jr,vp,Jt,Bt,rt,Q,$a,ea,vn,oe,Gr,bp,Us,Vr,Ja,qs,xp,ii,Xr,Ls;const ri=class ri{constructor(u,s={}){Pt(this,oe);Ve(this,"request");Pt(this,Jt);Pt(this,Bt,0);Pt(this,rt);Pt(this,Q);Pt(this,$a);Pt(this,ea);Pt(this,vn);var f,m,y;if(Kt(this,rt,u),Kt(this,Q,{...s,headers:gp(q(this,rt).headers,s.headers),hooks:_p({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Xb(s.method??q(this,rt).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:Jb(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof q(this,rt)!="string"&&!(q(this,rt)instanceof URL||q(this,rt)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(q(this,Q).prefixUrl&&typeof q(this,rt)=="string"){if(q(this,rt).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");q(this,Q).prefixUrl.endsWith("/")||(q(this,Q).prefixUrl+="/"),Kt(this,rt,q(this,Q).prefixUrl+q(this,rt))}Ob&&dp&&(Kt(this,ea,q(this,Q).signal??q(this,rt).signal),Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal),Sh&&(q(this,Q).duplex="half"),q(this,Q).json!==void 0&&(q(this,Q).body=((m=(f=q(this,Q)).stringifyJson)==null?void 0:m.call(f,q(this,Q).json))??JSON.stringify(q(this,Q).json),q(this,Q).headers.set("content-type",q(this,Q).headers.get("content-type")??"application/json"));const o=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(q(this,rt)instanceof globalThis.Request&&(Db&&q(this,Q).body instanceof globalThis.FormData||q(this,Q).body instanceof URLSearchParams)&&!o&&q(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(q(this,rt),q(this,Q)),Ib(q(this,Q).searchParams)){const _="?"+(typeof q(this,Q).searchParams=="string"?q(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(Ee(y=ri,Jr,vp).call(y,q(this,Q).searchParams)).toString()),p=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,_);this.request=new globalThis.Request(p,q(this,Q))}if(q(this,Q).onUploadProgress){if(typeof q(this,Q).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=Ee(this,oe,Ls).call(this,this.request,q(this,Q).body??void 0)}}static create(u,s){var y,b,_;const o=new ri(u,s),f=async()=>{var w,E,N,Y,L,H,B,U,K,X,ue,ce;if(typeof q(o,Q).timeout=="number"&&q(o,Q).timeout>zs)throw new RangeError(`The \`timeout\` option cannot be greater than ${zs}`);await Promise.resolve();let p=await Ee(w=o,oe,xp).call(w);for(const ye of q(o,Q).hooks.afterResponse){const F=Ee(E=o,oe,Us).call(E,p.clone());let W;try{W=await ye(o.request,Ee(N=o,oe,ii).call(N),F,{retryCount:q(o,Bt)})}catch(Pe){throw Ee(Y=o,oe,Ja).call(Y,F),Ee(L=o,oe,Ja).call(L,p),Pe}if(W instanceof pp)throw Ee(H=o,oe,Ja).call(H,F),Ee(B=o,oe,Ja).call(B,p),new As(W.options);const se=W instanceof globalThis.Response?W:p;F!==se&&Ee(U=o,oe,Ja).call(U,F),p!==se&&Ee(K=o,oe,Ja).call(K,p),p=se}if(Ee(X=o,oe,Us).call(X,p),!p.ok&&(typeof q(o,Q).throwHttpErrors=="function"?q(o,Q).throwHttpErrors(p.status):q(o,Q).throwHttpErrors)){let ye=new Ns(p,o.request,Ee(ue=o,oe,ii).call(ue));for(const F of q(o,Q).hooks.beforeError)ye=await F(ye,{retryCount:q(o,Bt)});throw ye}if(q(o,Q).onDownloadProgress){if(typeof q(o,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Cb)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const ye=p.clone();return Ee(ce=o,oe,Ja).call(ce,p),Yb(ye,q(o,Q).onDownloadProgress)}return p},m=Ee(y=o,oe,qs).call(y,f).finally(()=>{var w,E;const p=q(o,$a);Ee(w=o,oe,Vr).call(w,(p==null?void 0:p.body)??void 0),Ee(E=o,oe,Vr).call(E,o.request.body??void 0)});for(const[p,w]of Object.entries(Nb))p==="bytes"&&typeof((_=(b=globalThis.Response)==null?void 0:b.prototype)==null?void 0:_.bytes)!="function"||(m[p]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||w);const E=await m;if(p==="json"){if(E.status===204)return"";const N=await E.text();return N===""?"":s.parseJson?s.parseJson(N):JSON.parse(N)}return E[p]()});return m}};Jr=new WeakSet,vp=function(u){return u&&typeof u=="object"&&!Array.isArray(u)&&!(u instanceof URLSearchParams)?Object.fromEntries(Object.entries(u).filter(([,s])=>s!==void 0)):u},Jt=new WeakMap,Bt=new WeakMap,rt=new WeakMap,Q=new WeakMap,$a=new WeakMap,ea=new WeakMap,vn=new WeakMap,oe=new WeakSet,Gr=function(){const u=q(this,Q).retry.delay(q(this,Bt));let s=u;q(this,Q).retry.jitter===!0?s=Math.random()*u:typeof q(this,Q).retry.jitter=="function"&&(s=q(this,Q).retry.jitter(u),(!Number.isFinite(s)||s<0)&&(s=u));const o=q(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,s)},bp=async function(u){if(eh(this,Bt)._++,q(this,Bt)>q(this,Q).retry.limit)throw u;const s=u instanceof Error?u:new fp(u);if(s instanceof As)return s.customDelay??Ee(this,oe,Gr).call(this);if(!q(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw u;if(q(this,Q).retry.shouldRetry!==void 0){const o=await q(this,Q).retry.shouldRetry({error:s,retryCount:q(this,Bt)});if(o===!1)throw u;if(o===!0)return Ee(this,oe,Gr).call(this)}if(e0(u)&&!q(this,Q).retry.retryOnTimeout)throw u;if(Pb(u)){if(!q(this,Q).retry.statusCodes.includes(u.response.status))throw u;const o=u.response.headers.get("Retry-After")??u.response.headers.get("RateLimit-Reset")??u.response.headers.get("X-RateLimit-Retry-After")??u.response.headers.get("X-RateLimit-Reset")??u.response.headers.get("X-Rate-Limit-Reset");if(o&&q(this,Q).retry.afterStatusCodes.includes(u.response.status)){let f=Number(o)*1e3;Number.isNaN(f)?f=Date.parse(o)-Date.now():f>=Date.parse("2024-01-01")&&(f-=Date.now());const m=q(this,Q).retry.maxRetryAfter??f;return f<m?f:m}if(u.response.status===413)throw u}return Ee(this,oe,Gr).call(this)},Us=function(u){return q(this,Q).parseJson&&(u.json=async()=>q(this,Q).parseJson(await u.text())),u},Vr=function(u){u&&u.cancel().catch(()=>{})},Ja=function(u){Ee(this,oe,Vr).call(this,u.body??void 0)},qs=async function(u){try{return await u()}catch(s){const o=Math.min(await Ee(this,oe,bp).call(this,s),zs);if(q(this,Bt)<1)throw s;if(await Wb(o,q(this,ea)?{signal:q(this,ea)}:{}),s instanceof As&&s.customRequest){const f=q(this,Q).signal?new globalThis.Request(s.customRequest,{signal:q(this,Q).signal}):new globalThis.Request(s.customRequest);Ee(this,oe,Xr).call(this,f)}for(const f of q(this,Q).hooks.beforeRetry){const m=await f({request:this.request,options:Ee(this,oe,ii).call(this),error:s,retryCount:q(this,Bt)});if(m instanceof globalThis.Request){Ee(this,oe,Xr).call(this,m);break}if(m instanceof globalThis.Response)return m;if(m===hp)return}return Ee(this,oe,qs).call(this,u)}},xp=async function(){var s;(s=q(this,Jt))!=null&&s.signal.aborted&&(Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal,this.request=new globalThis.Request(this.request,{signal:q(this,Q).signal}));for(const o of q(this,Q).hooks.beforeRequest){const f=await o(this.request,Ee(this,oe,ii).call(this),{retryCount:q(this,Bt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){Ee(this,oe,Xr).call(this,f);break}}const u=Fb(this.request,q(this,Q));return Kt(this,$a,this.request),this.request=q(this,$a).clone(),q(this,Q).timeout===!1?q(this,Q).fetch(q(this,$a),u):$b(q(this,$a),u,q(this,Jt),q(this,Q))},ii=function(){if(!q(this,vn)){const{hooks:u,...s}=q(this,Q);Kt(this,vn,Object.freeze(s))}return q(this,vn)},Xr=function(u){Kt(this,vn,void 0),this.request=Ee(this,oe,Ls).call(this,u)},Ls=function(u,s){return!q(this,Q).onUploadProgress||!u.body?u:Gb(u,q(this,Q).onUploadProgress,s??q(this,Q).body??void 0)},Pt(ri,Jr);let Kr=ri;/*! MIT License © Sindre Sorhus */const Hs=i=>{const u=(s,o)=>Kr.create(s,Dr(i,o));for(const s of mp)u[s]=(o,f)=>Kr.create(o,Dr(i,f,{method:s}));return u.create=s=>Hs(Dr(s)),u.extend=s=>(typeof s=="function"&&(s=s(i??{})),Hs(Dr(i,s))),u.stop=hp,u.retry=Ub,u},kh=Hs();let Mr=null;const Qr=kh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[i=>{const u=xa.getState().accessToken;u&&i.headers.set("Authorization",`Bearer ${u}`)}],afterResponse:[async(i,u,s)=>{if(s.status===401&&!i.headers.has("X-Retry-After-Refresh")){Mr||(Mr=xa.getState().refresh().finally(()=>{Mr=null}));try{await Mr}catch{throw s}const o=xa.getState().accessToken;return o&&i.headers.set("Authorization",`Bearer ${o}`),i.headers.set("X-Retry-After-Refresh","1"),kh(i,u)}}]}}),t0=3e4;function a0(i){if(i.link)return i.link;const u=(i.title+" "+i.body).match(/task\s*#?(\d+)/i);if(u)return`/tasks/${u[1]}`;const s=(i.title+" "+i.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function Sp(){const i=Fa(),[u,s]=g.useState([]),[o,f]=g.useState(0),[m,y]=g.useState(!1),[b,_]=g.useState(!1),p=g.useRef(null),{t:w}=Vt(),E=g.useRef(async()=>{try{_(!0);const H=(await Qr.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,B=H.filter(U=>!U.isRead).length;s(U=>U.length===H.length&&U.every((K,X)=>K.id===H[X].id&&K.isRead===H[X].isRead)?U:H),f(U=>U===B?U:B)}catch{}finally{_(!1)}});g.useEffect(()=>{E.current();const L=setInterval(()=>E.current(),t0);return()=>clearInterval(L)},[]),g.useEffect(()=>{function L(H){p.current&&!p.current.contains(H.target)&&y(!1)}return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);async function N(L){try{await Qr.post(`web/notifications/${L}/read`),s(H=>H.map(B=>B.id===L?{...B,isRead:!0}:B)),f(H=>Math.max(0,H-1))}catch{}}async function Y(){try{await Qr.post("web/notifications/read-all"),s(L=>L.map(H=>({...H,isRead:!0}))),f(0)}catch{}}return h.jsxs("div",{className:"relative",ref:p,children:[h.jsxs("button",{type:"button",onClick:()=>y(L=>!L),"aria-label":w("common.notifications"),className:"relative inline-flex items-center justify-center rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]",children:[h.jsx(Fv,{size:16}),o>0&&h.jsx("span",{className:"absolute right-0 top-0 flex h-3 min-w-3 items-center justify-center rounded-full bg-[var(--destructive)] px-0.5 text-[8px] font-semibold leading-none text-white",children:o})]}),m&&h.jsxs("div",{className:"absolute right-0 top-full z-50 mt-2 w-[min(320px,calc(100vw-2rem))] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm font-semibold",children:w("common.notifications")}),o>0&&h.jsxs("button",{type:"button",onClick:Y,"aria-label":w("common.mark_all_read"),className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(Iv,{className:"h-3.5 w-3.5"}),w("common.mark_all_read")]})]}),h.jsx("div",{className:"max-h-80 overflow-y-auto",children:b&&u.length===0?h.jsx("div",{className:"flex justify-center py-8",children:h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):u.length===0?h.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[h.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),h.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:w("common.no_notifications")})]}):u.map(L=>{const H=a0(L);return h.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${H?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${L.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{H&&(L.isRead||N(L.id),y(!1),i(H))},children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm font-medium",title:L.title,children:L.title}),h.jsx("p",{className:"truncate text-xs text-[var(--text-secondary)]",title:L.body,children:L.body}),h.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(L.createdAt).toLocaleString()})]}),!L.isRead&&h.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),N(L.id)},"aria-label":w("common.mark_as_read"),className:"shrink-0 rounded-[4px] p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:h.jsx(Pv,{className:"h-3.5 w-3.5"})})]},L.id)})})]})]})}function n0(i){return i&&i.trim().length>0?i:null}function Ep(i,u=50){return n0(i.name)??Wh(i.description,u)}function l0(i){return i.description}function kp(i){return`#${i.id} ${l0(i)}`}function K1(i,u=100){return{text:`#${i.id} ${Ep(i,u)}`,title:kp(i)}}function i0(i){return{tasks:i.tasks.map(u=>({type:"task",id:u.id,title:`#${u.id} ${Ep(u)}`,subtitle:`${u.status} · ${u.project_key}`,hoverTitle:kp(u)})),workers:(i.workers??[]).map(u=>({type:"worker",id:u.id,title:u.name,subtitle:`${u.hostname} · ${u.status}`})),projects:i.projects.map(u=>({type:"project",id:u.key,title:u.name,subtitle:u.repository}))}}const r0=300,wh={tasks:gb,workers:ap,projects:ib},u0={tasks:"tasks",workers:"workers",projects:"projects"};function wp({renderTrigger:i}={}){const[u,s]=g.useState(""),[o,f]=g.useState({tasks:[],workers:[],projects:[]}),[m,y]=g.useState(!1),[b,_]=g.useState(!1),[p,w]=g.useState(0),E=g.useRef(null),N=g.useRef(null),Y=g.useRef(void 0),L=g.useRef(void 0),H=Fa(),{t:B}=Vt(),U=g.useMemo(()=>[...o.tasks,...o.workers,...o.projects],[o]),K=g.useCallback(async W=>{var Pe;if(!W.trim()){f({tasks:[],workers:[],projects:[]});return}(Pe=L.current)==null||Pe.abort();const se=new AbortController;L.current=se;try{y(!0);const Je=await Qr.get("web/search",{searchParams:{q:W},signal:se.signal}).json();f(i0(Je)),w(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{se.signal.aborted||y(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>K(u),r0),()=>{Y.current&&clearTimeout(Y.current)}),[u,K]),g.useEffect(()=>{function W(se){se.key==="/"&&!b&&!(se.target instanceof HTMLInputElement||se.target instanceof HTMLTextAreaElement)&&(se.preventDefault(),_(!0)),se.key==="Escape"&&b&&(se.preventDefault(),X())}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[b]),g.useEffect(()=>{b&&setTimeout(()=>{var W;return(W=N.current)==null?void 0:W.focus()},50)},[b]);function X(){_(!1),s(""),f({tasks:[],workers:[],projects:[]}),w(0)}function ue(W){switch(X(),W.type){case"task":H(`/tasks/${W.id}`);break;case"worker":H(`/workers/${W.id}`);break;case"project":H(`/projects/${W.id}`);break}}function ce(W){W.key==="ArrowDown"?(W.preventDefault(),w(se=>Math.min(se+1,U.length-1))):W.key==="ArrowUp"?(W.preventDefault(),w(se=>Math.max(se-1,0))):W.key==="Enter"&&U[p]&&(W.preventDefault(),ue(U[p]))}const ye=U.length>0;let F=0;return h.jsxs(h.Fragment,{children:[i?i(()=>_(!0)):h.jsxs("button",{type:"button",onClick:()=>_(!0),className:"flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:[h.jsx(tp,{className:"h-3.5 w-3.5"}),h.jsx("span",{children:B("common.search_placeholder")}),h.jsx("kbd",{className:"ml-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:"/"})]}),b&&h.jsx("div",{ref:E,className:"fixed inset-0 z-[100] flex items-start justify-center pt-[calc(var(--safe-area-top,0px)+16px)] md:pt-[15vh]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},onClick:W=>{W.target===E.current&&X()},children:h.jsxs("div",{className:"mx-3 w-full max-w-[640px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-2xl sm:mx-4 md:mx-0",children:[h.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),h.jsx("input",{ref:N,type:"text",placeholder:B("common.search_input_placeholder"),value:u,onChange:W=>s(W.target.value),onKeyDown:ce,className:"flex-1 bg-transparent text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none"}),m&&h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),h.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:u.trim()&&!ye&&!m?h.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:B("common.no_search_results",{query:u})}):Object.keys(wh).map(W=>{const se=o[W];if(se.length===0)return null;const Pe=wh[W],Je=F;return F+=se.length,h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[h.jsx(Pe,{className:"h-3 w-3"}),h.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:u0[W]})]}),se.map((Ce,At)=>{const ut=Je+At,Me=ut===p;return h.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Me?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>ue(Ce),onMouseEnter:()=>w(ut),children:[h.jsx("span",{className:`text-xs ${Me?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Me?">":" "}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm",title:Ce.hoverTitle??Ce.title,children:Ce.title}),Ce.subtitle&&h.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",title:Ce.subtitle,children:Ce.subtitle})]})]},`${Ce.type}-${Ce.id}`)})]},W)})}),h.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",B("common.navigate_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",B("common.select_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",B("common.close_hint")]})]})]})})]})}const o0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"};function Th(i){return Array.from(i.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function s0({isOpen:i,onClose:u,onConfirm:s,title:o,message:f,confirmLabel:m,cancelLabel:y,confirmVariant:b="danger",isLoading:_,children:p}){const{t:w}=Vt(),E=g.useId(),N=m??w("common.confirm"),Y=y??w("common.cancel"),L=g.useRef(null),H=g.useRef(null),B=o0[b];g.useEffect(()=>{if(!i)return;H.current=document.activeElement;const K=requestAnimationFrame(()=>{if(L.current){const X=Th(L.current);X.length>0&&X[0].focus()}});return()=>{var X;cancelAnimationFrame(K),(X=H.current)==null||X.focus()}},[i]);const U=g.useCallback(K=>{if(K.key==="Escape"){u();return}if(K.key==="Tab"&&L.current){const X=Th(L.current);if(X.length===0)return;const ue=X[0],ce=X[X.length-1];K.shiftKey?document.activeElement===ue&&(K.preventDefault(),ce.focus()):document.activeElement===ce&&(K.preventDefault(),ue.focus())}},[u]);return i?h.jsx("div",{onClick:u,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"max(1rem, 10vh)",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:h.jsxs("div",{ref:L,role:"dialog","aria-modal":"true","aria-labelledby":E,onClick:K=>K.stopPropagation(),onKeyDown:U,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[h.jsx("div",{style:{marginBottom:"1.25rem"},children:h.jsxs("div",{id:E,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[h.jsx(np,{style:{width:"1rem",height:"1rem"}}),o]})}),h.jsxs("div",{style:{marginBottom:"1.25rem"},children:[h.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f}),p]}),h.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[h.jsx("button",{type:"button",onClick:u,disabled:_,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",cursor:_?"not-allowed":"pointer",opacity:_?.7:1,transition:"color 0.15s, border-color 0.15s"},children:Y}),h.jsx("button",{type:"button",onClick:s,disabled:_,style:{flex:1,padding:"0.5rem",backgroundColor:B,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:_?"not-allowed":"pointer",opacity:_?.7:1},children:_?w("common.processing"):N})]})]})}):null}const jh="overlord-pwa-install-dismissed";function c0(){const i=navigator.userAgent;return/iP(hone|od|ad)/.test(i)&&/WebKit/.test(i)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(i)}function f0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function d0(){const{t:i}=Vt(),[u,s]=g.useState("hidden"),[o,f]=g.useState(!1),m=g.useRef(null),y=g.useRef(void 0);g.useEffect(()=>{if(f0()||localStorage.getItem(jh)||window.innerWidth>=768)return;const p=E=>{E.preventDefault(),m.current=E};window.addEventListener("beforeinstallprompt",p);const w=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",p),clearTimeout(w),clearTimeout(y.current)}},[]);function b(){localStorage.setItem(jh,"1"),s("dismissing"),y.current=setTimeout(()=>s("hidden"),200)}async function _(){if(m.current){await m.current.prompt();const{outcome:p}=await m.current.userChoice;p==="accepted"&&b(),m.current=null}else c0()&&f(!0)}return u==="hidden"?null:h.jsx("div",{className:`fixed bottom-4 left-4 right-4 z-40 md:hidden ${u==="dismissing"?"animate-slide-down":"animate-slide-up"}`,role:"dialog","aria-label":i("pwa_install.title"),children:h.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.06] px-3 py-1.5",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),h.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:i("pwa_install.title")})]}),h.jsx("button",{onClick:b,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:h.jsx(lp,{size:14})})]}),h.jsx("div",{className:"px-3.5 py-3",children:o?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.ios_command")]}),h.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[i("pwa_install.ios_step_1"),i("pwa_install.ios_step_2"),i("pwa_install.ios_step_3")].map((p,w)=>h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:h.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:w+1})}),h.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[w===0&&h.jsx(hb,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),p]})]},w))})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.command")]}),h.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",i("pwa_install.desc_1"),h.jsx("br",{}),"→ ",i("pwa_install.desc_2")]}),h.jsxs("div",{className:"mt-2.5 flex gap-2",children:[h.jsx("button",{onClick:_,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_install.install")}),h.jsx("button",{onClick:b,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:i("pwa_install.skip")})]})]})})]})})}function m0(){const{t:i}=Vt(),[u,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;let o=!1,f=null,m=null,y=null,b=null;function _(){o||s(!0)}navigator.serviceWorker.addEventListener("controllerchange",_);function p(E){if(f=E,E.waiting){s(!0);return}y=()=>{const N=E.installing;N&&(m=N,b=()=>{N.state==="installed"&&navigator.serviceWorker.controller&&(o||s(!0))},N.addEventListener("statechange",b))},E.addEventListener("updatefound",y)}navigator.serviceWorker.getRegistration().then(E=>{E&&!o&&p(E)});const w=setInterval(()=>{navigator.serviceWorker.getRegistration().then(E=>{!E||o||(E.update().catch(()=>{}),E.waiting&&s(!0))})},3e4);return()=>{o=!0,clearInterval(w),navigator.serviceWorker.removeEventListener("controllerchange",_),f&&y&&f.removeEventListener("updatefound",y),m&&b&&m.removeEventListener("statechange",b)}},[]),u?h.jsx("div",{className:"animate-slide-up fixed bottom-20 left-4 right-4 z-50 md:bottom-4 md:left-auto md:right-4 md:w-80",children:h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsx(ep,{size:14,className:"shrink-0 text-[var(--accent)]"}),h.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:i("pwa_update.message")}),h.jsx("button",{onClick:()=>window.location.reload(),className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-1 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_update.reload")})]})}):null}const Ur=64,h0=96,Rh=32;function p0({children:i,className:u}){const s=g.useRef(null),o=g.useRef(0),f=g.useRef("idle"),[m,y]=g.useState(0),[b,_]=g.useState("idle"),p=g.useCallback(U=>{f.current=U,_(U)},[]),w=g.useCallback(()=>{const U=s.current;return U?U.scrollTop<=0:!0},[]),E=g.useCallback(U=>{if(!w()){o.current=0;return}o.current=U.touches[0].clientY},[w]),N=g.useCallback(U=>{if(f.current==="refreshing"||o.current===0)return;const X=U.touches[0].clientY-o.current;if(X<=0){f.current!=="idle"&&(y(0),p("idle"));return}if(!w())return;U.preventDefault();const ue=Math.min(X*.5,h0);y(ue),p(ue>=Ur?"ready":"pulling")},[w,p]),Y=g.useCallback(()=>{f.current!=="refreshing"&&(f.current==="ready"?(p("refreshing"),y(Ur),setTimeout(()=>{window.location.reload()},300)):(y(0),p("idle")),o.current=0)},[p]);g.useEffect(()=>{const U=s.current;if(U)return U.addEventListener("touchstart",E,{passive:!0}),U.addEventListener("touchmove",N,{passive:!1}),U.addEventListener("touchend",Y,{passive:!0}),()=>{U.removeEventListener("touchstart",E),U.removeEventListener("touchmove",N),U.removeEventListener("touchend",Y)}},[E,N,Y]);const L=Math.min(m/Ur,1),H=b==="refreshing"?0:m/Ur*180,B=m>0||b==="refreshing";return h.jsxs("div",{ref:s,className:u,style:{overscrollBehaviorY:"contain"},children:[B&&h.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:m,transition:b==="idle"?"height 200ms ease-out":void 0},children:h.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Rh,height:Rh,opacity:L,transition:b==="idle"?"opacity 200ms ease-out":void 0},children:b==="refreshing"?h.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[h.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),h.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):h.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:b==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${H}deg)`,transition:"color 150ms"},children:h.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),i]})}const Tp=g.createContext({setActions:()=>{}});function J1(i){const{setActions:u}=g.useContext(Tp);g.useEffect(()=>(u(i),()=>u(null)),[i,u])}const jp=g.createContext({setSubtitle:()=>{}});function $1(i){const{setSubtitle:u}=g.useContext(jp),s=typeof i=="string"?i:(i==null?void 0:i.text)??null,o=typeof i=="string"?i:(i==null?void 0:i.title)??(i==null?void 0:i.text)??null;g.useEffect(()=>s?(u(o&&o!==s?{text:s,title:o}:s),()=>u(null)):(u(null),()=>u(null)),[s,o,u])}const y0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih}],g0=[{to:"/workers",label:"workers",icon:ap},{to:"/projects",label:"projects",icon:rb},{to:"/access-tokens",label:"tokens",icon:ob}],_0=[{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:lb},{to:"/docs/bot",label:"bot",icon:db},{to:"/docs/skill",label:"skill",icon:yb},{to:"/docs/all",label:"all",icon:sb}],v0=[{to:"/admin",label:"admin",icon:pb}],b0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih}],qr={"/home":{title:"common.breadcrumb_terminal",subtitle:"common.breadcrumb_terminal_sub"},"/dashboard":{title:"common.breadcrumb_dashboard",subtitle:"common.breadcrumb_dashboard_sub"},"/tasks":{title:"common.breadcrumb_tasks",subtitle:"common.breadcrumb_tasks_sub"},"/workers":{title:"common.breadcrumb_workers",subtitle:"common.breadcrumb_workers_sub"},"/projects":{title:"common.breadcrumb_projects",subtitle:"common.breadcrumb_projects_sub"},"/admin":{title:"common.breadcrumb_admin",subtitle:"common.breadcrumb_admin_sub"},"/profile":{title:"common.breadcrumb_profile",subtitle:"common.breadcrumb_profile_sub"},"/access-tokens":{title:"common.breadcrumb_tokens",subtitle:"common.breadcrumb_tokens_sub"},"/docs":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_sub"},"/docs/cli":{title:"common.breadcrumb_docs_cli",subtitle:"common.breadcrumb_docs_cli_sub"},"/docs/api":{title:"common.breadcrumb_docs_api",subtitle:"common.breadcrumb_docs_api_sub"},"/docs/skill":{title:"common.breadcrumb_docs_skill",subtitle:"common.breadcrumb_docs_skill_sub"},"/docs/bot":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_bot_sub"},"/docs/all":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_all_sub"}};function x0(i){const{t:u}=Vt();if(qr[i]){const o=qr[i];return{title:u(o.title),subtitle:u(o.subtitle)}}const s="/"+i.split("/").filter(Boolean)[0];if(qr[s]){const o=qr[s],f=i.split("/").filter(Boolean).slice(1).join(" / ");return{title:u(o.title),subtitle:f||u(o.subtitle)}}return{title:i.slice(1).replace(/\//g," // ")||"home"}}function S0(i,u){return i==="/home"?u==="/home":i==="/dashboard"?u==="/dashboard":u.startsWith(i)}function E0(){const i=gt(),{t:u}=Vt(),s={terminal:u("terminal_home.title"),dashboard:u("dashboard.title"),tasks:u("tasks.title"),workers:u("workers.title")};return h.jsxs("nav",{className:"flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)]",style:{height:48,paddingTop:4},children:[b0.map(({to:o,label:f,icon:m})=>{const y=S0(o,i.pathname);return h.jsxs(Js,{to:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(m,{size:18,className:y?"text-[var(--accent)]":"text-[var(--text-muted)]"}),h.jsx("span",{className:`text-[11px] lowercase ${y?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},o)}),h.jsx(wp,{renderTrigger:o=>h.jsxs("button",{type:"button",onClick:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(tp,{size:18,className:"text-[var(--text-muted)]"}),h.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:u("common.search_placeholder")})]})})]})}function k0(){const i=Fa(),{t:u}=Vt();return h.jsxs("header",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:hidden",style:{height:"calc(56px + env(safe-area-inset-top, 0px))",minHeight:"calc(56px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[h.jsxs("button",{onClick:()=>i("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:h.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),h.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:u("common.overlord")})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{onClick:()=>i("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.profile"),children:h.jsx(vb,{size:18})}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})}function Lr({label:i,items:u,collapsed:s}){return h.jsxs("div",{className:"mt-4 first:mt-0",children:[h.jsx("div",{className:`overflow-hidden transition-all duration-300 ${s?"max-h-0 mb-0 opacity-0":"max-h-6 mb-2 opacity-100"}`,children:h.jsx("div",{className:"px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:i})}),u.map(({to:o,label:f,icon:m})=>h.jsx(Js,{to:o,className:({isActive:y})=>`flex items-center text-sm lowercase transition-all duration-300 ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${y?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:y})=>h.jsxs(h.Fragment,{children:[h.jsx(m,{size:14,style:{flexShrink:0}}),!s&&h.jsx("span",{children:y?`> ${f}`:` ${f}`})]})},o))]})}function w0(){const{user:i,logout:u}=xa(),s=Fa(),[o,f]=g.useState(!1),m=Eb(),{t:y}=Vt(),{sidebarCollapsed:b,toggleSidebar:_}=wb();function p(){u(),s("/login")}return h.jsxs("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] transition-[width,min-width] duration-300 overflow-hidden",style:{width:b?56:240,minWidth:b?56:240,backgroundColor:"var(--bg-card)"},children:[h.jsx("div",{className:"flex items-center px-5",style:{height:48},children:h.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:h.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!b&&h.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:y("common.overlord")})]})}),h.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[h.jsx(Lr,{label:y("common.tasks_section"),items:y0,collapsed:b}),h.jsx(Lr,{label:y("common.fleet_section"),items:g0,collapsed:b}),h.jsx(Lr,{label:y("common.docs_section"),items:_0,collapsed:b}),m&&h.jsx(Lr,{label:y("common.admin_section"),items:v0,collapsed:b})]}),h.jsx("div",{className:"flex px-3 py-1",children:h.jsx("button",{onClick:_,className:"flex items-center justify-center w-full py-1.5 rounded-[4px] text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)] hover:bg-[var(--accent)]/5","aria-label":b?"expand sidebar":"collapse sidebar",children:b?h.jsx(tb,{size:14}):h.jsx(eb,{size:14})})}),h.jsx("div",{className:"border-t border-[var(--border)] p-3",children:h.jsxs("div",{className:`flex min-h-[44px] items-center px-3 transition-[gap] duration-300 ${b?"gap-0":"gap-3"}`,children:[h.jsx("button",{onClick:()=>s("/profile"),className:"flex h-7 w-7 items-center justify-center text-xs font-bold text-black transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",borderRadius:4,flexShrink:0},title:y("common.profile"),children:((i==null?void 0:i.username)??"u")[0].toUpperCase()}),h.jsxs("div",{className:`flex min-w-0 flex-1 items-center overflow-hidden transition-[max-width,opacity] duration-300 ${b?"pointer-events-none max-w-0 opacity-0":"max-w-[calc(100%-28px)] opacity-100"}`,"aria-hidden":b,children:[h.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:y("common.profile"),tabIndex:b?-1:void 0,children:[h.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(i==null?void 0:i.username)??"user"}),h.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(i==null?void 0:i.role)??"user"})]}),h.jsx("button",{onClick:()=>f(!0),className:"ml-2 p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":y("common.log_out"),tabIndex:b?-1:void 0,children:h.jsx(fb,{size:14})})]})]})}),h.jsx(s0,{isOpen:o,onClose:()=>f(!1),onConfirm:p,title:y("common.logout_title"),message:y("common.logout_message"),confirmLabel:y("common.logout"),confirmVariant:"warning"})]})}function T0({headerActions:i,subtitleOverride:u}){const s=gt(),{title:o,subtitle:f}=x0(s.pathname),m=u??f,y=typeof m=="string"?m:m==null?void 0:m.text,b=typeof m=="string"?m:(m==null?void 0:m.title)??(m==null?void 0:m.text);return h.jsxs("header",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5",style:{height:48,minHeight:48,backgroundColor:"var(--bg-card)"},children:[h.jsxs("div",{className:"text-sm lowercase",children:[h.jsx("span",{style:{color:"var(--text-primary)"},children:o}),y&&h.jsxs("span",{style:{color:"var(--text-muted)"},title:b,children:[" ","// ",Wh(y,40)]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[i,h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(wp,{}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})]})}function j0(){const[i,u]=g.useState(null),[s,o]=g.useState(null),f=gt(),m=f.pathname==="/home",y=/^\/tasks\/\d+$/.test(f.pathname),b=f.pathname.startsWith("/docs");return g.useEffect(()=>up.getState().init(),[]),h.jsxs("div",{className:"fixed inset-x-0 top-0 flex w-full overflow-hidden font-mono md:flex-row",style:{height:"var(--app-height, 100dvh)",minHeight:"var(--app-height, 100dvh)"},children:[h.jsx(w0,{}),h.jsxs("div",{"data-testid":"app-main-column",className:"flex min-h-0 flex-1 flex-col overflow-hidden pb-[calc(48px+var(--safe-area-bottom,0px))] md:pb-0",children:[h.jsx(k0,{}),!b&&h.jsx(T0,{headerActions:i,subtitleOverride:s}),h.jsx(p0,{className:m||y?"min-h-0 flex-1 overflow-hidden bg-[var(--bg-primary)]":"min-h-0 flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:h.jsx(Tp.Provider,{value:{setActions:u},children:h.jsx(jp.Provider,{value:{setSubtitle:o},children:h.jsx(dv,{})})})}),h.jsx(d0,{}),h.jsx(m0,{}),h.jsx("div",{className:"safe-area-bottom-fill fixed inset-x-0 bottom-0 z-30 bg-[var(--bg-card)] md:hidden",children:h.jsx(E0,{})})]})]})}function Ah(i){var s;const u=(s=i.state)==null?void 0:s.from;return u?{from:u}:{from:{pathname:i.pathname,search:i.search}}}function li({children:i,requireAdmin:u=!1}){const{accessToken:s,user:o,requireTotpSetup:f,initializing:m}=xa(),y=gt();if(m)return h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return h.jsx(ll,{to:"/login",state:Ah(y),replace:!0});if(f){const b=Ah(y);return y.pathname!=="/totp-setup"&&y.pathname!=="/bind"?h.jsx(ll,{to:"/totp-setup",state:b,replace:!0}):y.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(b.from)),h.jsx(ll,{to:"/totp-setup",state:b,replace:!0})):h.jsx(h.Fragment,{children:i})}return u&&(o==null?void 0:o.role)!==ip.ADMIN?h.jsx(ll,{to:"/home",replace:!0}):h.jsx(h.Fragment,{children:i})}function R0({children:i}){const{theme:u,resolved:s,setResolved:o}=sp();return g.useEffect(()=>{if(u!=="system"){o(u);return}const f=window.matchMedia("(prefers-color-scheme: dark)");o(f.matches?"dark":"light");const m=y=>o(y.matches?"dark":"light");return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[u,o]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),h.jsx(h.Fragment,{children:i})}class A0 extends g.Component{constructor(u){super(u),this.state={hasError:!1,error:null}}static getDerivedStateFromError(u){return{hasError:!0,error:u}}render(){var u;return this.state.hasError?h.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[h.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Yr("common.runtime_error")}),h.jsx("p",{className:"max-w-md text-center text-xs text-[var(--text-muted)]",children:((u=this.state.error)==null?void 0:u.message)||Yr("common.an_unexpected_error_occurred")}),h.jsxs("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(ep,{className:"h-3.5 w-3.5"}),Yr("common.reload")]})]}):this.props.children}}function z0({isOpen:i}){const u=Fa(),{logout:s,setSessionExpired:o}=xa(),{t:f}=Vt();function m(){s(),o(!1),u("/login")}return i?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),h.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:h.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[h.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:h.jsx(cb,{className:"h-7 w-7 text-[var(--warning)]"})}),h.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),h.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),h.jsx("button",{type:"button",className:"w-full rounded-[4px] bg-[var(--accent)] px-3 py-2.5 text-xs font-medium text-black hover:opacity-90 transition-opacity",onClick:m,children:f("auth.go_to_login")})]})})]}):null}const zh=5;let ba=[];const Bs=new Set;function Rp(){Bs.forEach(i=>i())}function O0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Wa(i,u,s=4e3){const o=O0();return ba=[...ba,{id:o,variant:i,message:u,duration:s}],ba.length>zh&&(ba=ba.slice(ba.length-zh)),Rp(),o}Wa.success=(i,u)=>Wa("success",i,u);Wa.error=(i,u)=>Wa("error",i,u);Wa.warning=(i,u)=>Wa("warning",i,u);Wa.info=(i,u)=>Wa("info",i,u);function C0(i){ba=ba.filter(u=>u.id!==i),Rp()}function D0(){const[,i]=g.useState(0);return g.useEffect(()=>{const u=()=>i(s=>s+1);return Bs.add(u),()=>{Bs.delete(u)}},[]),ba}const N0={success:{icon:ab,borderColor:"var(--accent)"},error:{icon:nb,borderColor:"var(--destructive)"},warning:{icon:np,borderColor:"var(--warning)"},info:{icon:ub,borderColor:"var(--info)"}};function M0({item:i}){const u=N0[i.variant],s=u.icon,{t:o}=Vt(),f=g.useCallback(()=>C0(i.id),[i.id]);return g.useEffect(()=>{if(!i.duration)return;const m=setTimeout(f,i.duration);return()=>clearTimeout(m)},[i.duration,f]),h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] bg-[var(--bg-card)] px-4 py-3 shadow-lg",style:{borderLeft:`3px solid ${u.borderColor}`},role:"alert",children:[h.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:u.borderColor}}),h.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:i.message}),h.jsx("button",{onClick:f,className:"shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]","aria-label":o("common.dismiss_notification"),children:h.jsx(lp,{className:"h-3.5 w-3.5"})})]})}function U0(){const i=D0();return i.length===0?null:h.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-[9999] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:i.map(u=>h.jsx("div",{className:"pointer-events-auto",children:h.jsx(M0,{item:u})},u.id))})}const q0=g.lazy(()=>ne(()=>import("./LandingPage-y9pKUede.js"),__vite__mapDeps([0,1,2,3,4,5]))),L0=g.lazy(()=>ne(()=>import("./LoginPage-WGOUh3Zl.js"),[])),H0=g.lazy(()=>ne(()=>import("./TotpSetupPage-BnxSNEq7.js"),[])),B0=g.lazy(()=>ne(()=>import("./NotFoundPage-NHnxMNCC.js"),[])),Y0=g.lazy(()=>ne(()=>import("./HomePage-zewuW5E4.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,1]))),G0=g.lazy(()=>ne(()=>import("./TerminalHomePage-Dr6u8qQW.js"),__vite__mapDeps([15,16,17,18,19,20,21,10,11,22,8,12,13,23,24,25]))),V0=g.lazy(()=>ne(()=>import("./TaskListPage-BqyEs5a5.js"),__vite__mapDeps([26,20,21,7,8,12,14,27,22,5,28,9,23,29,11]))),X0=g.lazy(()=>ne(()=>import("./TaskDetailPage-CoYa78-E.js"),__vite__mapDeps([30,20,21,16,17,18,19,12,22,8,14,31,24,27,32,33]))),Q0=g.lazy(()=>ne(()=>import("./WorkerListPage-D50gtKFZ.js"),__vite__mapDeps([34,8,35,36,37,38,39,25,5,17,22,28,9,13,23]))),Z0=g.lazy(()=>ne(()=>import("./WorkerDetailPage-CZPkIYBS.js"),__vite__mapDeps([40,12,8,41,35,13,14,42,31]))),K0=g.lazy(()=>ne(()=>import("./WorkerSetupGuidePage-r4f3o1z6.js"),__vite__mapDeps([36,37,38,39,25]))),J0=g.lazy(()=>ne(()=>import("./ProjectListPage-DC1Kc7Lb.js"),__vite__mapDeps([43,22,21,28,9,12,13,23]))),$0=g.lazy(()=>ne(()=>import("./ProjectDetailPage-CM5bfJmU.js"),__vite__mapDeps([44,45,22,14,12,8,41,13,18,42,23]))),W0=g.lazy(()=>ne(()=>import("./EditProjectPage-C3QK8nE_.js"),__vite__mapDeps([46,22,45,21,23]))),F0=g.lazy(()=>ne(()=>import("./PipelineEditorPage-BZ96tFxp.js"),__vite__mapDeps([47,22]))),I0=g.lazy(()=>ne(()=>import("./ProfilePage-YrqpghqL.js"),__vite__mapDeps([48,49,41,13]))),P0=g.lazy(()=>ne(()=>import("./BindPlatformPage-KFs9i2uA.js"),[])),e1=g.lazy(()=>ne(()=>import("./AccessTokensPage-BhddWVW1.js"),__vite__mapDeps([50,22,28,9,12,13,23,5,42]))),t1=g.lazy(()=>ne(()=>import("./CliReferencePage-DtYHgbSY.js"),__vite__mapDeps([51,52,5,53,23]))),a1=g.lazy(()=>ne(()=>import("./ApiReferencePage-DHLXt2i6.js"),__vite__mapDeps([54,53,5,23]))),n1=g.lazy(()=>ne(()=>import("./SkillPage-C3fKU78U.js"),__vite__mapDeps([55,52,5,32]))),l1=g.lazy(()=>ne(()=>import("./DocsLayout-MaagZ0kw.js"),__vite__mapDeps([56,31]))),i1=g.lazy(()=>ne(()=>import("./InstallationPage-DUCocNLA.js"),__vite__mapDeps([57,52,5]))),r1=g.lazy(()=>ne(()=>import("./DeveloperSetupPage-DZ4yMaW5.js"),__vite__mapDeps([58,52,5]))),u1=g.lazy(()=>ne(()=>import("./WorkerSetupPage-C8IoFobt.js"),__vite__mapDeps([59,52,5]))),o1=g.lazy(()=>ne(()=>import("./BotSetupPage-VWtZWkVa.js"),__vite__mapDeps([60,52,5]))),s1=g.lazy(()=>ne(()=>import("./LocalDevelopmentPage-CJBGPeYo.js"),__vite__mapDeps([61,52,5]))),c1=g.lazy(()=>ne(()=>import("./WorkerOperationsPage-C4PArGPr.js"),[])),f1=g.lazy(()=>ne(()=>import("./DeploymentPage-BtlkcDYB.js"),__vite__mapDeps([62,52,5]))),Oh=g.lazy(()=>ne(()=>import("./BotIntegrationPage-DCFZPk-7.js"),[])),d1=g.lazy(()=>ne(()=>import("./PipelineConfigPage-CIojkTYx.js"),__vite__mapDeps([63,52,5]))),m1=g.lazy(()=>ne(()=>import("./DevWorkflowPage-CxXMRR-3.js"),__vite__mapDeps([64,52,5]))),h1=g.lazy(()=>ne(()=>import("./PermissionsPage-Dt4llTFV.js"),[])),p1=g.lazy(()=>ne(()=>import("./EnvVariablesPage-DckuYIoH.js"),__vite__mapDeps([65,52,5]))),y1=g.lazy(()=>ne(()=>import("./ArchitecturePage-C6I9_3Gs.js"),__vite__mapDeps([66,52,5]))),g1=g.lazy(()=>ne(()=>import("./ChangelogPage-BbOP-JLv.js"),[])),_1=g.lazy(()=>ne(()=>import("./AgentCliPage-C345jDjj.js"),__vite__mapDeps([67,52,5]))),v1=g.lazy(()=>ne(()=>import("./DocsIndexPage-BLlkapm4.js"),__vite__mapDeps([68,38,2,3,39,33]))),b1=g.lazy(()=>ne(()=>import("./AdminPage-pfvAHWMr.js"),__vite__mapDeps([69,4,2,70,39]))),x1=g.lazy(()=>ne(()=>import("./DeveloperManage-BcBr_3L_.js"),__vite__mapDeps([71,22,49,28,9,13,8,23,4,18,24]))),S1=g.lazy(()=>ne(()=>import("./BotManage-XcDpO3JL.js"),__vite__mapDeps([72,22,52,5,42,23,28,9,13,8,2,18]))),E1=g.lazy(()=>ne(()=>import("./TokenManage-Cg_B-8Nh.js"),__vite__mapDeps([73,37,5,32,28,9,13,8,23]))),k1=g.lazy(()=>ne(()=>import("./AuditLogPage-CdIyX0zS.js"),__vite__mapDeps([74,22,28,9,70,29,11]))),w1=g.lazy(()=>ne(()=>import("./SettingsPage-C7ErXyNZ.js"),[]));function T1(){return h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function j1(){const i=xa(u=>u.sessionExpired);return h.jsxs(R0,{children:[h.jsx(U0,{}),h.jsx(A0,{children:h.jsxs(Hv,{children:[h.jsx(z0,{isOpen:i}),h.jsx(g.Suspense,{fallback:h.jsx(T1,{}),children:h.jsxs(hv,{children:[h.jsx(ee,{path:"/",element:h.jsx(q0,{})}),h.jsx(ee,{path:"/login",element:h.jsx(L0,{})}),h.jsx(ee,{path:"/totp-setup",element:h.jsx(li,{children:h.jsx(H0,{})})}),h.jsx(ee,{path:"/bind",element:h.jsx(li,{children:h.jsx(P0,{})})}),h.jsxs(ee,{element:h.jsx(li,{children:h.jsx(j0,{})}),children:[h.jsx(ee,{path:"/home",element:h.jsx(G0,{})}),h.jsx(ee,{path:"/dashboard",element:h.jsx(Y0,{})}),h.jsx(ee,{path:"/tasks",element:h.jsx(V0,{})}),h.jsx(ee,{path:"/tasks/:id",element:h.jsx(X0,{})}),h.jsx(ee,{path:"/workers",element:h.jsx(Q0,{})}),h.jsx(ee,{path:"/workers/setup",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(K0,{})})}),h.jsx(ee,{path:"/workers/:id",element:h.jsx(Z0,{})}),h.jsx(ee,{path:"/projects",element:h.jsx(J0,{})}),h.jsx(ee,{path:"/projects/:key",element:h.jsx($0,{})}),h.jsx(ee,{path:"/projects/:key/edit",element:h.jsx(W0,{})}),h.jsx(ee,{path:"/projects/:key/pipeline",element:h.jsx(F0,{})}),h.jsx(ee,{path:"/profile",element:h.jsx(I0,{})}),h.jsx(ee,{path:"/access-tokens",element:h.jsx(e1,{})}),h.jsxs(ee,{path:"/docs",element:h.jsx(l1,{}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"cli",replace:!0})}),h.jsx(ee,{path:"cli",element:h.jsx(t1,{})}),h.jsx(ee,{path:"api",element:h.jsx(a1,{})}),h.jsx(ee,{path:"bot",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"all",element:h.jsx(v1,{})}),h.jsx(ee,{path:"skill",element:h.jsx(n1,{})}),h.jsx(ee,{path:"installation",element:h.jsx(i1,{})}),h.jsx(ee,{path:"developer-setup",element:h.jsx(r1,{})}),h.jsx(ee,{path:"worker-setup",element:h.jsx(u1,{})}),h.jsx(ee,{path:"bot-setup",element:h.jsx(o1,{})}),h.jsx(ee,{path:"local-development",element:h.jsx(s1,{})}),h.jsx(ee,{path:"worker-operations",element:h.jsx(c1,{})}),h.jsx(ee,{path:"deployment",element:h.jsx(f1,{})}),h.jsx(ee,{path:"bot-integration",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"pipeline-config",element:h.jsx(d1,{})}),h.jsx(ee,{path:"dev-workflow",element:h.jsx(m1,{})}),h.jsx(ee,{path:"permissions",element:h.jsx(h1,{})}),h.jsx(ee,{path:"env-variables",element:h.jsx(p1,{})}),h.jsx(ee,{path:"architecture",element:h.jsx(y1,{})}),h.jsx(ee,{path:"agent-cli",element:h.jsx(_1,{})}),h.jsx(ee,{path:"changelog",element:h.jsx(g1,{})})]}),h.jsxs(ee,{path:"/admin",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(b1,{})}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"developers",replace:!0})}),h.jsx(ee,{path:"developers",element:h.jsx(x1,{})}),h.jsx(ee,{path:"bots",element:h.jsx(S1,{})}),h.jsx(ee,{path:"tokens",element:h.jsx(E1,{})}),h.jsx(ee,{path:"audit-logs",element:h.jsx(k1,{})}),h.jsx(ee,{path:"settings",element:h.jsx(w1,{})})]})]}),h.jsx(ee,{path:"*",element:h.jsx(B0,{})})]})})]})})]})}function Ap(i=window){var u,s;return((u=i.matchMedia)==null?void 0:u.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}async function R1(i=window,u="portrait"){var o,f;if(!Ap(i))return!1;const s=(f=(o=i.screen)==null?void 0:o.orientation)==null?void 0:f.lock;if(typeof s!="function")return!1;try{return await s.call(i.screen.orientation,u),!0}catch{return!1}}function A1(i){var u,s;return((u=i.matchMedia)==null?void 0:u.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}function z1(i){var s,o;const u=((s=i.navigator)==null?void 0:s.userAgent)??"";return/iPhone|iPad|iPod/i.test(u)||/Macintosh/i.test(u)&&(((o=i.navigator)==null?void 0:o.maxTouchPoints)??0)>1}function O1(i){const u=i.activeElement;if(!(u instanceof HTMLElement))return!1;const s=u.tagName;return u.isContentEditable||s==="INPUT"||s==="TEXTAREA"||s==="SELECT"}function C1(i){const u=i.screen;if(!u)return null;const s=Math.round(u.width),o=Math.round(u.height);return i.innerHeight>=i.innerWidth?Math.max(s,o):Math.min(s,o)}function D1(i=window,u=document){const s=u.documentElement,o=i.visualViewport??null;let f=-1;const m=()=>{const y=Math.round((o==null?void 0:o.height)??0),b=Math.round(i.innerHeight);let _=y>0?y:b;if(A1(i)&&z1(i)&&!O1(u)){const p=C1(i);p!==null&&(_=Math.max(_,b,p))}_!==f&&(f=_,s.style.setProperty("--app-height",`${_}px`))};return m(),i.addEventListener("resize",m),i.addEventListener("orientationchange",m),o==null||o.addEventListener("resize",m),()=>{i.removeEventListener("resize",m),i.removeEventListener("orientationchange",m),o==null||o.removeEventListener("resize",m)}}xa.getState().initialize();D1(window,document);const zp=window,N1=Ap(zp);R1(zp);if(N1){document.documentElement.classList.add("pwa-standalone");const i=window.matchMedia("(prefers-color-scheme: dark)").matches,u=localStorage.getItem("overlord-theme"),s=u==="dark"||u!=="light"&&i;document.body.style.backgroundColor=s?"#171717":"#FFFFFF",new MutationObserver(()=>{const o=document.documentElement.classList.contains("dark");document.body.style.backgroundColor=o?"#171717":"#FFFFFF"}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}d_.createRoot(document.getElementById("root")).render(h.jsx(g.StrictMode,{children:h.jsx(j1,{})}));export{G1 as $,U1 as A,q1 as B,Pv as C,ip as D,ab as E,cb as F,V1 as G,Ns as H,nb as I,Y1 as J,np as K,Jh as L,db as M,ll as N,B1 as O,d0 as P,ep as Q,Rr as R,ap as S,cp as T,vb as U,s_ as V,H1 as W,lp as X,Wh as Y,ob as Z,fb as _,Vt as a,lb as a0,yb as a1,Js as a2,dv as a3,X1 as a4,Q1 as a5,$s as b,xe as c,pb as d,sb as e,Fa as f,gt as g,Qr as h,Eb as i,h as j,up as k,Ep as l,kp as m,l0 as n,Ir as o,L1 as p,$1 as q,g as r,K1 as s,Wa as t,xa as u,s0 as v,J1 as w,tp as x,Ph as y,Z1 as z};
|
|
242
|
+
"{description}"`}};function Ab(i,u){const s=u.split(".");let o=i;for(const f of s){if(o==null||typeof o!="object")return u;o=o[f]}return typeof o=="string"?o:u}function zb(i,u){return u?i.replace(/\{(\w+)\}/g,(s,o)=>u[o]!=null?String(u[o]):`{${o}}`):i}function Yr(i,u){return zb(Ab(Rb,i),u)}function Vt(){return{t:g.useCallback((u,s)=>Yr(u,s),[])}}function cp(){const{theme:i,setTheme:u}=sp(),{t:s}=Vt(),o=i==="dark"||i==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){u(o?"light":"dark")}return h.jsx("button",{onClick:f,className:"flex items-center gap-1.5 rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]","aria-label":s(o?"common.switch_to_light":"common.switch_to_dark"),title:s(o?"common.light_mode":"common.dark_mode"),children:o?h.jsx(_b,{size:16}):h.jsx(mb,{size:16})})}class Ns extends Error{constructor(s,o,f){const m=s.status||s.status===0?s.status:"",y=s.statusText??"",b=`${m} ${y}`.trim(),_=b?`status code ${b}`:"an unknown error";super(`Request failed with ${_}: ${o.method} ${o.url}`);Ve(this,"response");Ve(this,"request");Ve(this,"options");this.name="HTTPError",this.response=s,this.request=o,this.options=f}}class fp extends Error{constructor(s){let o="Non-error value was thrown";try{typeof s=="string"?o=s:s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&(o=s.message)}catch{}super(o);Ve(this,"name","NonError");Ve(this,"value");this.value=s}}class As extends Error{constructor(s){const o=s!=null&&s.cause?s.cause instanceof Error?s.cause:new fp(s.cause):void 0;super(s!=null&&s.code?`Forced retry: ${s.code}`:"Forced retry",o?{cause:o}:void 0);Ve(this,"name","ForceRetryError");Ve(this,"customDelay");Ve(this,"code");Ve(this,"customRequest");this.customDelay=s==null?void 0:s.delay,this.code=s==null?void 0:s.code,this.customRequest=s==null?void 0:s.request}}const Sh=(()=>{let i=!1,u=!1;const s=typeof globalThis.ReadableStream=="function",o=typeof globalThis.Request=="function";if(s&&o)try{u=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return i&&!u})(),Ob=typeof globalThis.AbortController=="function",dp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Cb=typeof globalThis.ReadableStream=="function",Db=typeof globalThis.FormData=="function",mp=["get","post","put","patch","head","delete"],Nb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},zs=2147483647,Mb=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,hp=Symbol("stop");class pp{constructor(u){Ve(this,"options");this.options=u}}const Ub=i=>new pp(i),qb={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Lb={next:!0},Hb={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Bb=i=>{if(!i)return 0;if(i instanceof FormData){let u=0;for(const[s,o]of i)u+=Mb,u+=new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length,u+=typeof o=="string"?new TextEncoder().encode(o).length:o.size;return u}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const u=JSON.stringify(i);return new TextEncoder().encode(u).length}catch{return 0}return 0},yp=(i,u,s)=>{let o,f=0;return i.pipeThrough(new TransformStream({transform(m,y){if(y.enqueue(m),o){f+=o.byteLength;let b=u===0?0:f/u;b>=1&&(b=1-Number.EPSILON),s==null||s({percent:b,totalBytes:Math.max(u,f),transferredBytes:f},o)}o=m},flush(){o&&(f+=o.byteLength,s==null||s({percent:1,totalBytes:Math.max(u,f),transferredBytes:f},o))}}))},Yb=(i,u)=>{if(!i.body)return i;if(i.status===204)return new Response(null,{status:i.status,statusText:i.statusText,headers:i.headers});const s=Math.max(0,Number(i.headers.get("content-length"))||0);return new Response(yp(i.body,s,u),{status:i.status,statusText:i.statusText,headers:i.headers})},Gb=(i,u,s)=>{if(!i.body)return i;const o=Bb(s??i.body);return new Request(i,{duplex:"half",body:yp(i.body,o,u)})},_n=i=>i!==null&&typeof i=="object",Dr=(...i)=>{for(const u of i)if((!_n(u)||Array.isArray(u))&&u!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...i)},gp=(i={},u={})=>{const s=new globalThis.Headers(i),o=u instanceof globalThis.Headers,f=new globalThis.Headers(u);for(const[m,y]of f.entries())o&&y==="undefined"||y===void 0?s.delete(m):s.set(m,y);return s};function Nr(i,u,s){return Object.hasOwn(u,s)&&u[s]===void 0?[]:Ws(i[s]??[],u[s]??[])}const _p=(i={},u={})=>({beforeRequest:Nr(i,u,"beforeRequest"),beforeRetry:Nr(i,u,"beforeRetry"),afterResponse:Nr(i,u,"afterResponse"),beforeError:Nr(i,u,"beforeError")}),Vb=(i,u)=>{const s=new URLSearchParams;for(const o of[i,u])if(o!==void 0)if(o instanceof URLSearchParams)for(const[f,m]of o.entries())s.append(f,m);else if(Array.isArray(o))for(const f of o){if(!Array.isArray(f)||f.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(f[0]),String(f[1]))}else if(_n(o))for(const[f,m]of Object.entries(o))m!==void 0&&s.append(f,String(m));else{const f=new URLSearchParams(o);for(const[m,y]of f.entries())s.append(m,y)}return s},Ws=(...i)=>{let u={},s={},o={},f;const m=[];for(const y of i)if(Array.isArray(y))Array.isArray(u)||(u=[]),u=[...u,...y];else if(_n(y)){for(let[b,_]of Object.entries(y)){if(b==="signal"&&_ instanceof globalThis.AbortSignal){m.push(_);continue}if(b==="context"){if(_!=null&&(!_n(_)||Array.isArray(_)))throw new TypeError("The `context` option must be an object");u={...u,context:_==null?{}:{...u.context,..._}};continue}if(b==="searchParams"){_==null?f=void 0:f=f===void 0?_:Vb(f,_);continue}_n(_)&&b in u&&(_=Ws(u[b],_)),u={...u,[b]:_}}_n(y.hooks)&&(o=_p(o,y.hooks),u.hooks=o),_n(y.headers)&&(s=gp(s,y.headers),u.headers=s)}return f!==void 0&&(u.searchParams=f),m.length>0&&(m.length===1?u.signal=m[0]:dp?u.signal=AbortSignal.any(m):u.signal=m.at(-1)),u},Xb=i=>mp.includes(i)?i.toUpperCase():i,Qb=["get","put","head","delete","options","trace"],Zb=[408,413,429,500,502,503,504],Kb=[413,429,503],Eh={limit:2,methods:Qb,statusCodes:Zb,afterStatusCodes:Kb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:i=>.3*2**(i-1)*1e3,jitter:void 0,retryOnTimeout:!1},Jb=(i={})=>{if(typeof i=="number")return{...Eh,limit:i};if(i.methods&&!Array.isArray(i.methods))throw new Error("retry.methods must be an array");if(i.methods&&(i.methods=i.methods.map(s=>s.toLowerCase())),i.statusCodes&&!Array.isArray(i.statusCodes))throw new Error("retry.statusCodes must be an array");const u=Object.fromEntries(Object.entries(i).filter(([,s])=>s!==void 0));return{...Eh,...u}};class Ms extends Error{constructor(s){super(`Request timed out: ${s.method} ${s.url}`);Ve(this,"request");this.name="TimeoutError",this.request=s}}async function $b(i,u,s,o){return new Promise((f,m)=>{const y=setTimeout(()=>{s&&s.abort(),m(new Ms(i))},o.timeout);o.fetch(i,u).then(f).catch(m).then(()=>{clearTimeout(y)})})}async function Wb(i,{signal:u}){return new Promise((s,o)=>{u&&(u.throwIfAborted(),u.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(m),o(u.reason)}const m=setTimeout(()=>{u==null||u.removeEventListener("abort",f),s()},i)})}const Fb=(i,u)=>{const s={};for(const o in u)Object.hasOwn(u,o)&&!(o in Hb)&&!(o in qb)&&(!(o in i)||o in Lb)&&(s[o]=u[o]);return s},Ib=i=>i===void 0?!1:Array.isArray(i)?i.length>0:i instanceof URLSearchParams?i.size>0:typeof i=="object"?Object.keys(i).length>0:typeof i=="string"?i.trim().length>0:!!i;function Pb(i){return i instanceof Ns||(i==null?void 0:i.name)===Ns.name}function e0(i){return i instanceof Ms||(i==null?void 0:i.name)===Ms.name}var Jr,vp,Jt,Bt,rt,Q,$a,ea,vn,oe,Gr,bp,Us,Vr,Ja,qs,xp,ii,Xr,Ls;const ri=class ri{constructor(u,s={}){Pt(this,oe);Ve(this,"request");Pt(this,Jt);Pt(this,Bt,0);Pt(this,rt);Pt(this,Q);Pt(this,$a);Pt(this,ea);Pt(this,vn);var f,m,y;if(Kt(this,rt,u),Kt(this,Q,{...s,headers:gp(q(this,rt).headers,s.headers),hooks:_p({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Xb(s.method??q(this,rt).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:Jb(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof q(this,rt)!="string"&&!(q(this,rt)instanceof URL||q(this,rt)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(q(this,Q).prefixUrl&&typeof q(this,rt)=="string"){if(q(this,rt).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");q(this,Q).prefixUrl.endsWith("/")||(q(this,Q).prefixUrl+="/"),Kt(this,rt,q(this,Q).prefixUrl+q(this,rt))}Ob&&dp&&(Kt(this,ea,q(this,Q).signal??q(this,rt).signal),Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal),Sh&&(q(this,Q).duplex="half"),q(this,Q).json!==void 0&&(q(this,Q).body=((m=(f=q(this,Q)).stringifyJson)==null?void 0:m.call(f,q(this,Q).json))??JSON.stringify(q(this,Q).json),q(this,Q).headers.set("content-type",q(this,Q).headers.get("content-type")??"application/json"));const o=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(q(this,rt)instanceof globalThis.Request&&(Db&&q(this,Q).body instanceof globalThis.FormData||q(this,Q).body instanceof URLSearchParams)&&!o&&q(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(q(this,rt),q(this,Q)),Ib(q(this,Q).searchParams)){const _="?"+(typeof q(this,Q).searchParams=="string"?q(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(Ee(y=ri,Jr,vp).call(y,q(this,Q).searchParams)).toString()),p=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,_);this.request=new globalThis.Request(p,q(this,Q))}if(q(this,Q).onUploadProgress){if(typeof q(this,Q).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=Ee(this,oe,Ls).call(this,this.request,q(this,Q).body??void 0)}}static create(u,s){var y,b,_;const o=new ri(u,s),f=async()=>{var w,E,N,Y,L,H,B,U,K,X,ue,ce;if(typeof q(o,Q).timeout=="number"&&q(o,Q).timeout>zs)throw new RangeError(`The \`timeout\` option cannot be greater than ${zs}`);await Promise.resolve();let p=await Ee(w=o,oe,xp).call(w);for(const ye of q(o,Q).hooks.afterResponse){const F=Ee(E=o,oe,Us).call(E,p.clone());let W;try{W=await ye(o.request,Ee(N=o,oe,ii).call(N),F,{retryCount:q(o,Bt)})}catch(Pe){throw Ee(Y=o,oe,Ja).call(Y,F),Ee(L=o,oe,Ja).call(L,p),Pe}if(W instanceof pp)throw Ee(H=o,oe,Ja).call(H,F),Ee(B=o,oe,Ja).call(B,p),new As(W.options);const se=W instanceof globalThis.Response?W:p;F!==se&&Ee(U=o,oe,Ja).call(U,F),p!==se&&Ee(K=o,oe,Ja).call(K,p),p=se}if(Ee(X=o,oe,Us).call(X,p),!p.ok&&(typeof q(o,Q).throwHttpErrors=="function"?q(o,Q).throwHttpErrors(p.status):q(o,Q).throwHttpErrors)){let ye=new Ns(p,o.request,Ee(ue=o,oe,ii).call(ue));for(const F of q(o,Q).hooks.beforeError)ye=await F(ye,{retryCount:q(o,Bt)});throw ye}if(q(o,Q).onDownloadProgress){if(typeof q(o,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Cb)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const ye=p.clone();return Ee(ce=o,oe,Ja).call(ce,p),Yb(ye,q(o,Q).onDownloadProgress)}return p},m=Ee(y=o,oe,qs).call(y,f).finally(()=>{var w,E;const p=q(o,$a);Ee(w=o,oe,Vr).call(w,(p==null?void 0:p.body)??void 0),Ee(E=o,oe,Vr).call(E,o.request.body??void 0)});for(const[p,w]of Object.entries(Nb))p==="bytes"&&typeof((_=(b=globalThis.Response)==null?void 0:b.prototype)==null?void 0:_.bytes)!="function"||(m[p]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||w);const E=await m;if(p==="json"){if(E.status===204)return"";const N=await E.text();return N===""?"":s.parseJson?s.parseJson(N):JSON.parse(N)}return E[p]()});return m}};Jr=new WeakSet,vp=function(u){return u&&typeof u=="object"&&!Array.isArray(u)&&!(u instanceof URLSearchParams)?Object.fromEntries(Object.entries(u).filter(([,s])=>s!==void 0)):u},Jt=new WeakMap,Bt=new WeakMap,rt=new WeakMap,Q=new WeakMap,$a=new WeakMap,ea=new WeakMap,vn=new WeakMap,oe=new WeakSet,Gr=function(){const u=q(this,Q).retry.delay(q(this,Bt));let s=u;q(this,Q).retry.jitter===!0?s=Math.random()*u:typeof q(this,Q).retry.jitter=="function"&&(s=q(this,Q).retry.jitter(u),(!Number.isFinite(s)||s<0)&&(s=u));const o=q(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,s)},bp=async function(u){if(eh(this,Bt)._++,q(this,Bt)>q(this,Q).retry.limit)throw u;const s=u instanceof Error?u:new fp(u);if(s instanceof As)return s.customDelay??Ee(this,oe,Gr).call(this);if(!q(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw u;if(q(this,Q).retry.shouldRetry!==void 0){const o=await q(this,Q).retry.shouldRetry({error:s,retryCount:q(this,Bt)});if(o===!1)throw u;if(o===!0)return Ee(this,oe,Gr).call(this)}if(e0(u)&&!q(this,Q).retry.retryOnTimeout)throw u;if(Pb(u)){if(!q(this,Q).retry.statusCodes.includes(u.response.status))throw u;const o=u.response.headers.get("Retry-After")??u.response.headers.get("RateLimit-Reset")??u.response.headers.get("X-RateLimit-Retry-After")??u.response.headers.get("X-RateLimit-Reset")??u.response.headers.get("X-Rate-Limit-Reset");if(o&&q(this,Q).retry.afterStatusCodes.includes(u.response.status)){let f=Number(o)*1e3;Number.isNaN(f)?f=Date.parse(o)-Date.now():f>=Date.parse("2024-01-01")&&(f-=Date.now());const m=q(this,Q).retry.maxRetryAfter??f;return f<m?f:m}if(u.response.status===413)throw u}return Ee(this,oe,Gr).call(this)},Us=function(u){return q(this,Q).parseJson&&(u.json=async()=>q(this,Q).parseJson(await u.text())),u},Vr=function(u){u&&u.cancel().catch(()=>{})},Ja=function(u){Ee(this,oe,Vr).call(this,u.body??void 0)},qs=async function(u){try{return await u()}catch(s){const o=Math.min(await Ee(this,oe,bp).call(this,s),zs);if(q(this,Bt)<1)throw s;if(await Wb(o,q(this,ea)?{signal:q(this,ea)}:{}),s instanceof As&&s.customRequest){const f=q(this,Q).signal?new globalThis.Request(s.customRequest,{signal:q(this,Q).signal}):new globalThis.Request(s.customRequest);Ee(this,oe,Xr).call(this,f)}for(const f of q(this,Q).hooks.beforeRetry){const m=await f({request:this.request,options:Ee(this,oe,ii).call(this),error:s,retryCount:q(this,Bt)});if(m instanceof globalThis.Request){Ee(this,oe,Xr).call(this,m);break}if(m instanceof globalThis.Response)return m;if(m===hp)return}return Ee(this,oe,qs).call(this,u)}},xp=async function(){var s;(s=q(this,Jt))!=null&&s.signal.aborted&&(Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal,this.request=new globalThis.Request(this.request,{signal:q(this,Q).signal}));for(const o of q(this,Q).hooks.beforeRequest){const f=await o(this.request,Ee(this,oe,ii).call(this),{retryCount:q(this,Bt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){Ee(this,oe,Xr).call(this,f);break}}const u=Fb(this.request,q(this,Q));return Kt(this,$a,this.request),this.request=q(this,$a).clone(),q(this,Q).timeout===!1?q(this,Q).fetch(q(this,$a),u):$b(q(this,$a),u,q(this,Jt),q(this,Q))},ii=function(){if(!q(this,vn)){const{hooks:u,...s}=q(this,Q);Kt(this,vn,Object.freeze(s))}return q(this,vn)},Xr=function(u){Kt(this,vn,void 0),this.request=Ee(this,oe,Ls).call(this,u)},Ls=function(u,s){return!q(this,Q).onUploadProgress||!u.body?u:Gb(u,q(this,Q).onUploadProgress,s??q(this,Q).body??void 0)},Pt(ri,Jr);let Kr=ri;/*! MIT License © Sindre Sorhus */const Hs=i=>{const u=(s,o)=>Kr.create(s,Dr(i,o));for(const s of mp)u[s]=(o,f)=>Kr.create(o,Dr(i,f,{method:s}));return u.create=s=>Hs(Dr(s)),u.extend=s=>(typeof s=="function"&&(s=s(i??{})),Hs(Dr(i,s))),u.stop=hp,u.retry=Ub,u},kh=Hs();let Mr=null;const Qr=kh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[i=>{const u=xa.getState().accessToken;u&&i.headers.set("Authorization",`Bearer ${u}`)}],afterResponse:[async(i,u,s)=>{if(s.status===401&&!i.headers.has("X-Retry-After-Refresh")){Mr||(Mr=xa.getState().refresh().finally(()=>{Mr=null}));try{await Mr}catch{throw s}const o=xa.getState().accessToken;return o&&i.headers.set("Authorization",`Bearer ${o}`),i.headers.set("X-Retry-After-Refresh","1"),kh(i,u)}}]}}),t0=3e4;function a0(i){if(i.link)return i.link;const u=(i.title+" "+i.body).match(/task\s*#?(\d+)/i);if(u)return`/tasks/${u[1]}`;const s=(i.title+" "+i.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function Sp(){const i=Fa(),[u,s]=g.useState([]),[o,f]=g.useState(0),[m,y]=g.useState(!1),[b,_]=g.useState(!1),p=g.useRef(null),{t:w}=Vt(),E=g.useRef(async()=>{try{_(!0);const H=(await Qr.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,B=H.filter(U=>!U.isRead).length;s(U=>U.length===H.length&&U.every((K,X)=>K.id===H[X].id&&K.isRead===H[X].isRead)?U:H),f(U=>U===B?U:B)}catch{}finally{_(!1)}});g.useEffect(()=>{E.current();const L=setInterval(()=>E.current(),t0);return()=>clearInterval(L)},[]),g.useEffect(()=>{function L(H){p.current&&!p.current.contains(H.target)&&y(!1)}return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);async function N(L){try{await Qr.post(`web/notifications/${L}/read`),s(H=>H.map(B=>B.id===L?{...B,isRead:!0}:B)),f(H=>Math.max(0,H-1))}catch{}}async function Y(){try{await Qr.post("web/notifications/read-all"),s(L=>L.map(H=>({...H,isRead:!0}))),f(0)}catch{}}return h.jsxs("div",{className:"relative",ref:p,children:[h.jsxs("button",{type:"button",onClick:()=>y(L=>!L),"aria-label":w("common.notifications"),className:"relative inline-flex items-center justify-center rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]",children:[h.jsx(Fv,{size:16}),o>0&&h.jsx("span",{className:"absolute right-0 top-0 flex h-3 min-w-3 items-center justify-center rounded-full bg-[var(--destructive)] px-0.5 text-[8px] font-semibold leading-none text-white",children:o})]}),m&&h.jsxs("div",{className:"absolute right-0 top-full z-50 mt-2 w-[min(320px,calc(100vw-2rem))] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm font-semibold",children:w("common.notifications")}),o>0&&h.jsxs("button",{type:"button",onClick:Y,"aria-label":w("common.mark_all_read"),className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(Iv,{className:"h-3.5 w-3.5"}),w("common.mark_all_read")]})]}),h.jsx("div",{className:"max-h-80 overflow-y-auto",children:b&&u.length===0?h.jsx("div",{className:"flex justify-center py-8",children:h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):u.length===0?h.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[h.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),h.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:w("common.no_notifications")})]}):u.map(L=>{const H=a0(L);return h.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${H?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${L.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{H&&(L.isRead||N(L.id),y(!1),i(H))},children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm font-medium",title:L.title,children:L.title}),h.jsx("p",{className:"truncate text-xs text-[var(--text-secondary)]",title:L.body,children:L.body}),h.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(L.createdAt).toLocaleString()})]}),!L.isRead&&h.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),N(L.id)},"aria-label":w("common.mark_as_read"),className:"shrink-0 rounded-[4px] p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:h.jsx(Pv,{className:"h-3.5 w-3.5"})})]},L.id)})})]})]})}function n0(i){return i&&i.trim().length>0?i:null}function Ep(i,u=50){return n0(i.name)??Wh(i.description,u)}function l0(i){return i.description}function kp(i){return`#${i.id} ${l0(i)}`}function K1(i,u=100){return{text:`#${i.id} ${Ep(i,u)}`,title:kp(i)}}function i0(i){return{tasks:i.tasks.map(u=>({type:"task",id:u.id,title:`#${u.id} ${Ep(u)}`,subtitle:`${u.status} · ${u.project_key}`,hoverTitle:kp(u)})),workers:(i.workers??[]).map(u=>({type:"worker",id:u.id,title:u.name,subtitle:`${u.hostname} · ${u.status}`})),projects:i.projects.map(u=>({type:"project",id:u.key,title:u.name,subtitle:u.repository}))}}const r0=300,wh={tasks:gb,workers:ap,projects:ib},u0={tasks:"tasks",workers:"workers",projects:"projects"};function wp({renderTrigger:i}={}){const[u,s]=g.useState(""),[o,f]=g.useState({tasks:[],workers:[],projects:[]}),[m,y]=g.useState(!1),[b,_]=g.useState(!1),[p,w]=g.useState(0),E=g.useRef(null),N=g.useRef(null),Y=g.useRef(void 0),L=g.useRef(void 0),H=Fa(),{t:B}=Vt(),U=g.useMemo(()=>[...o.tasks,...o.workers,...o.projects],[o]),K=g.useCallback(async W=>{var Pe;if(!W.trim()){f({tasks:[],workers:[],projects:[]});return}(Pe=L.current)==null||Pe.abort();const se=new AbortController;L.current=se;try{y(!0);const Je=await Qr.get("web/search",{searchParams:{q:W},signal:se.signal}).json();f(i0(Je)),w(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{se.signal.aborted||y(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>K(u),r0),()=>{Y.current&&clearTimeout(Y.current)}),[u,K]),g.useEffect(()=>{function W(se){se.key==="/"&&!b&&!(se.target instanceof HTMLInputElement||se.target instanceof HTMLTextAreaElement)&&(se.preventDefault(),_(!0)),se.key==="Escape"&&b&&(se.preventDefault(),X())}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[b]),g.useEffect(()=>{b&&setTimeout(()=>{var W;return(W=N.current)==null?void 0:W.focus()},50)},[b]);function X(){_(!1),s(""),f({tasks:[],workers:[],projects:[]}),w(0)}function ue(W){switch(X(),W.type){case"task":H(`/tasks/${W.id}`);break;case"worker":H(`/workers/${W.id}`);break;case"project":H(`/projects/${W.id}`);break}}function ce(W){W.key==="ArrowDown"?(W.preventDefault(),w(se=>Math.min(se+1,U.length-1))):W.key==="ArrowUp"?(W.preventDefault(),w(se=>Math.max(se-1,0))):W.key==="Enter"&&U[p]&&(W.preventDefault(),ue(U[p]))}const ye=U.length>0;let F=0;return h.jsxs(h.Fragment,{children:[i?i(()=>_(!0)):h.jsxs("button",{type:"button",onClick:()=>_(!0),className:"flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:[h.jsx(tp,{className:"h-3.5 w-3.5"}),h.jsx("span",{children:B("common.search_placeholder")}),h.jsx("kbd",{className:"ml-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:"/"})]}),b&&h.jsx("div",{ref:E,className:"fixed inset-0 z-[100] flex items-start justify-center pt-[calc(var(--safe-area-top,0px)+16px)] md:pt-[15vh]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},onClick:W=>{W.target===E.current&&X()},children:h.jsxs("div",{className:"mx-3 w-full max-w-[640px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-2xl sm:mx-4 md:mx-0",children:[h.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),h.jsx("input",{ref:N,type:"text",placeholder:B("common.search_input_placeholder"),value:u,onChange:W=>s(W.target.value),onKeyDown:ce,className:"flex-1 bg-transparent text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none"}),m&&h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),h.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:u.trim()&&!ye&&!m?h.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:B("common.no_search_results",{query:u})}):Object.keys(wh).map(W=>{const se=o[W];if(se.length===0)return null;const Pe=wh[W],Je=F;return F+=se.length,h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[h.jsx(Pe,{className:"h-3 w-3"}),h.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:u0[W]})]}),se.map((Ce,At)=>{const ut=Je+At,Me=ut===p;return h.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Me?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>ue(Ce),onMouseEnter:()=>w(ut),children:[h.jsx("span",{className:`text-xs ${Me?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Me?">":" "}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm",title:Ce.hoverTitle??Ce.title,children:Ce.title}),Ce.subtitle&&h.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",title:Ce.subtitle,children:Ce.subtitle})]})]},`${Ce.type}-${Ce.id}`)})]},W)})}),h.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",B("common.navigate_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",B("common.select_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",B("common.close_hint")]})]})]})})]})}const o0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"};function Th(i){return Array.from(i.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function s0({isOpen:i,onClose:u,onConfirm:s,title:o,message:f,confirmLabel:m,cancelLabel:y,confirmVariant:b="danger",isLoading:_,children:p}){const{t:w}=Vt(),E=g.useId(),N=m??w("common.confirm"),Y=y??w("common.cancel"),L=g.useRef(null),H=g.useRef(null),B=o0[b];g.useEffect(()=>{if(!i)return;H.current=document.activeElement;const K=requestAnimationFrame(()=>{if(L.current){const X=Th(L.current);X.length>0&&X[0].focus()}});return()=>{var X;cancelAnimationFrame(K),(X=H.current)==null||X.focus()}},[i]);const U=g.useCallback(K=>{if(K.key==="Escape"){u();return}if(K.key==="Tab"&&L.current){const X=Th(L.current);if(X.length===0)return;const ue=X[0],ce=X[X.length-1];K.shiftKey?document.activeElement===ue&&(K.preventDefault(),ce.focus()):document.activeElement===ce&&(K.preventDefault(),ue.focus())}},[u]);return i?h.jsx("div",{onClick:u,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"max(1rem, 10vh)",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:h.jsxs("div",{ref:L,role:"dialog","aria-modal":"true","aria-labelledby":E,onClick:K=>K.stopPropagation(),onKeyDown:U,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[h.jsx("div",{style:{marginBottom:"1.25rem"},children:h.jsxs("div",{id:E,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[h.jsx(np,{style:{width:"1rem",height:"1rem"}}),o]})}),h.jsxs("div",{style:{marginBottom:"1.25rem"},children:[h.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f}),p]}),h.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[h.jsx("button",{type:"button",onClick:u,disabled:_,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",cursor:_?"not-allowed":"pointer",opacity:_?.7:1,transition:"color 0.15s, border-color 0.15s"},children:Y}),h.jsx("button",{type:"button",onClick:s,disabled:_,style:{flex:1,padding:"0.5rem",backgroundColor:B,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:_?"not-allowed":"pointer",opacity:_?.7:1},children:_?w("common.processing"):N})]})]})}):null}const jh="overlord-pwa-install-dismissed";function c0(){const i=navigator.userAgent;return/iP(hone|od|ad)/.test(i)&&/WebKit/.test(i)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(i)}function f0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function d0(){const{t:i}=Vt(),[u,s]=g.useState("hidden"),[o,f]=g.useState(!1),m=g.useRef(null),y=g.useRef(void 0);g.useEffect(()=>{if(f0()||localStorage.getItem(jh)||window.innerWidth>=768)return;const p=E=>{E.preventDefault(),m.current=E};window.addEventListener("beforeinstallprompt",p);const w=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",p),clearTimeout(w),clearTimeout(y.current)}},[]);function b(){localStorage.setItem(jh,"1"),s("dismissing"),y.current=setTimeout(()=>s("hidden"),200)}async function _(){if(m.current){await m.current.prompt();const{outcome:p}=await m.current.userChoice;p==="accepted"&&b(),m.current=null}else c0()&&f(!0)}return u==="hidden"?null:h.jsx("div",{className:`fixed bottom-4 left-4 right-4 z-40 md:hidden ${u==="dismissing"?"animate-slide-down":"animate-slide-up"}`,role:"dialog","aria-label":i("pwa_install.title"),children:h.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.06] px-3 py-1.5",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),h.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:i("pwa_install.title")})]}),h.jsx("button",{onClick:b,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:h.jsx(lp,{size:14})})]}),h.jsx("div",{className:"px-3.5 py-3",children:o?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.ios_command")]}),h.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[i("pwa_install.ios_step_1"),i("pwa_install.ios_step_2"),i("pwa_install.ios_step_3")].map((p,w)=>h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:h.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:w+1})}),h.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[w===0&&h.jsx(hb,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),p]})]},w))})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.command")]}),h.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",i("pwa_install.desc_1"),h.jsx("br",{}),"→ ",i("pwa_install.desc_2")]}),h.jsxs("div",{className:"mt-2.5 flex gap-2",children:[h.jsx("button",{onClick:_,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_install.install")}),h.jsx("button",{onClick:b,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:i("pwa_install.skip")})]})]})})]})})}function m0(){const{t:i}=Vt(),[u,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;let o=!1,f=null,m=null,y=null,b=null;function _(){o||s(!0)}navigator.serviceWorker.addEventListener("controllerchange",_);function p(E){if(f=E,E.waiting){s(!0);return}y=()=>{const N=E.installing;N&&(m=N,b=()=>{N.state==="installed"&&navigator.serviceWorker.controller&&(o||s(!0))},N.addEventListener("statechange",b))},E.addEventListener("updatefound",y)}navigator.serviceWorker.getRegistration().then(E=>{E&&!o&&p(E)});const w=setInterval(()=>{navigator.serviceWorker.getRegistration().then(E=>{!E||o||(E.update().catch(()=>{}),E.waiting&&s(!0))})},3e4);return()=>{o=!0,clearInterval(w),navigator.serviceWorker.removeEventListener("controllerchange",_),f&&y&&f.removeEventListener("updatefound",y),m&&b&&m.removeEventListener("statechange",b)}},[]),u?h.jsx("div",{className:"animate-slide-up fixed bottom-20 left-4 right-4 z-50 md:bottom-4 md:left-auto md:right-4 md:w-80",children:h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsx(ep,{size:14,className:"shrink-0 text-[var(--accent)]"}),h.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:i("pwa_update.message")}),h.jsx("button",{onClick:()=>window.location.reload(),className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-1 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_update.reload")})]})}):null}const Ur=64,h0=96,Rh=32;function p0({children:i,className:u}){const s=g.useRef(null),o=g.useRef(0),f=g.useRef("idle"),[m,y]=g.useState(0),[b,_]=g.useState("idle"),p=g.useCallback(U=>{f.current=U,_(U)},[]),w=g.useCallback(()=>{const U=s.current;return U?U.scrollTop<=0:!0},[]),E=g.useCallback(U=>{if(!w()){o.current=0;return}o.current=U.touches[0].clientY},[w]),N=g.useCallback(U=>{if(f.current==="refreshing"||o.current===0)return;const X=U.touches[0].clientY-o.current;if(X<=0){f.current!=="idle"&&(y(0),p("idle"));return}if(!w())return;U.preventDefault();const ue=Math.min(X*.5,h0);y(ue),p(ue>=Ur?"ready":"pulling")},[w,p]),Y=g.useCallback(()=>{f.current!=="refreshing"&&(f.current==="ready"?(p("refreshing"),y(Ur),setTimeout(()=>{window.location.reload()},300)):(y(0),p("idle")),o.current=0)},[p]);g.useEffect(()=>{const U=s.current;if(U)return U.addEventListener("touchstart",E,{passive:!0}),U.addEventListener("touchmove",N,{passive:!1}),U.addEventListener("touchend",Y,{passive:!0}),()=>{U.removeEventListener("touchstart",E),U.removeEventListener("touchmove",N),U.removeEventListener("touchend",Y)}},[E,N,Y]);const L=Math.min(m/Ur,1),H=b==="refreshing"?0:m/Ur*180,B=m>0||b==="refreshing";return h.jsxs("div",{ref:s,className:u,style:{overscrollBehaviorY:"contain"},children:[B&&h.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:m,transition:b==="idle"?"height 200ms ease-out":void 0},children:h.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Rh,height:Rh,opacity:L,transition:b==="idle"?"opacity 200ms ease-out":void 0},children:b==="refreshing"?h.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[h.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),h.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):h.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:b==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${H}deg)`,transition:"color 150ms"},children:h.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),i]})}const Tp=g.createContext({setActions:()=>{}});function J1(i){const{setActions:u}=g.useContext(Tp);g.useEffect(()=>(u(i),()=>u(null)),[i,u])}const jp=g.createContext({setSubtitle:()=>{}});function $1(i){const{setSubtitle:u}=g.useContext(jp),s=typeof i=="string"?i:(i==null?void 0:i.text)??null,o=typeof i=="string"?i:(i==null?void 0:i.title)??(i==null?void 0:i.text)??null;g.useEffect(()=>s?(u(o&&o!==s?{text:s,title:o}:s),()=>u(null)):(u(null),()=>u(null)),[s,o,u])}const y0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih}],g0=[{to:"/workers",label:"workers",icon:ap},{to:"/projects",label:"projects",icon:rb},{to:"/access-tokens",label:"tokens",icon:ob}],_0=[{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:lb},{to:"/docs/bot",label:"bot",icon:db},{to:"/docs/skill",label:"skill",icon:yb},{to:"/docs/all",label:"all",icon:sb}],v0=[{to:"/admin",label:"admin",icon:pb}],b0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih}],qr={"/home":{title:"common.breadcrumb_terminal",subtitle:"common.breadcrumb_terminal_sub"},"/dashboard":{title:"common.breadcrumb_dashboard",subtitle:"common.breadcrumb_dashboard_sub"},"/tasks":{title:"common.breadcrumb_tasks",subtitle:"common.breadcrumb_tasks_sub"},"/workers":{title:"common.breadcrumb_workers",subtitle:"common.breadcrumb_workers_sub"},"/projects":{title:"common.breadcrumb_projects",subtitle:"common.breadcrumb_projects_sub"},"/admin":{title:"common.breadcrumb_admin",subtitle:"common.breadcrumb_admin_sub"},"/profile":{title:"common.breadcrumb_profile",subtitle:"common.breadcrumb_profile_sub"},"/access-tokens":{title:"common.breadcrumb_tokens",subtitle:"common.breadcrumb_tokens_sub"},"/docs":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_sub"},"/docs/cli":{title:"common.breadcrumb_docs_cli",subtitle:"common.breadcrumb_docs_cli_sub"},"/docs/api":{title:"common.breadcrumb_docs_api",subtitle:"common.breadcrumb_docs_api_sub"},"/docs/skill":{title:"common.breadcrumb_docs_skill",subtitle:"common.breadcrumb_docs_skill_sub"},"/docs/bot":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_bot_sub"},"/docs/all":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_all_sub"}};function x0(i){const{t:u}=Vt();if(qr[i]){const o=qr[i];return{title:u(o.title),subtitle:u(o.subtitle)}}const s="/"+i.split("/").filter(Boolean)[0];if(qr[s]){const o=qr[s],f=i.split("/").filter(Boolean).slice(1).join(" / ");return{title:u(o.title),subtitle:f||u(o.subtitle)}}return{title:i.slice(1).replace(/\//g," // ")||"home"}}function S0(i,u){return i==="/home"?u==="/home":i==="/dashboard"?u==="/dashboard":u.startsWith(i)}function E0(){const i=gt(),{t:u}=Vt(),s={terminal:u("terminal_home.title"),dashboard:u("dashboard.title"),tasks:u("tasks.title"),workers:u("workers.title")};return h.jsxs("nav",{className:"flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)]",style:{height:48,paddingTop:4},children:[b0.map(({to:o,label:f,icon:m})=>{const y=S0(o,i.pathname);return h.jsxs(Js,{to:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(m,{size:18,className:y?"text-[var(--accent)]":"text-[var(--text-muted)]"}),h.jsx("span",{className:`text-[11px] lowercase ${y?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},o)}),h.jsx(wp,{renderTrigger:o=>h.jsxs("button",{type:"button",onClick:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(tp,{size:18,className:"text-[var(--text-muted)]"}),h.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:u("common.search_placeholder")})]})})]})}function k0(){const i=Fa(),{t:u}=Vt();return h.jsxs("header",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:hidden",style:{height:"calc(56px + env(safe-area-inset-top, 0px))",minHeight:"calc(56px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[h.jsxs("button",{onClick:()=>i("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:h.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),h.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:u("common.overlord")})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{onClick:()=>i("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.profile"),children:h.jsx(vb,{size:18})}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})}function Lr({label:i,items:u,collapsed:s}){return h.jsxs("div",{className:"mt-4 first:mt-0",children:[h.jsx("div",{className:`overflow-hidden transition-all duration-300 ${s?"max-h-0 mb-0 opacity-0":"max-h-6 mb-2 opacity-100"}`,children:h.jsx("div",{className:"px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:i})}),u.map(({to:o,label:f,icon:m})=>h.jsx(Js,{to:o,className:({isActive:y})=>`flex items-center text-sm lowercase transition-all duration-300 ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${y?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:y})=>h.jsxs(h.Fragment,{children:[h.jsx(m,{size:14,style:{flexShrink:0}}),!s&&h.jsx("span",{children:y?`> ${f}`:` ${f}`})]})},o))]})}function w0(){const{user:i,logout:u}=xa(),s=Fa(),[o,f]=g.useState(!1),m=Eb(),{t:y}=Vt(),{sidebarCollapsed:b,toggleSidebar:_}=wb();function p(){u(),s("/login")}return h.jsxs("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] transition-[width,min-width] duration-300 overflow-hidden",style:{width:b?56:240,minWidth:b?56:240,backgroundColor:"var(--bg-card)"},children:[h.jsx("div",{className:"flex items-center px-5",style:{height:48},children:h.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:h.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!b&&h.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:y("common.overlord")})]})}),h.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[h.jsx(Lr,{label:y("common.tasks_section"),items:y0,collapsed:b}),h.jsx(Lr,{label:y("common.fleet_section"),items:g0,collapsed:b}),h.jsx(Lr,{label:y("common.docs_section"),items:_0,collapsed:b}),m&&h.jsx(Lr,{label:y("common.admin_section"),items:v0,collapsed:b})]}),h.jsx("div",{className:"flex px-3 py-1",children:h.jsx("button",{onClick:_,className:"flex items-center justify-center w-full py-1.5 rounded-[4px] text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)] hover:bg-[var(--accent)]/5","aria-label":b?"expand sidebar":"collapse sidebar",children:b?h.jsx(tb,{size:14}):h.jsx(eb,{size:14})})}),h.jsx("div",{className:"border-t border-[var(--border)] p-3",children:h.jsxs("div",{className:`flex min-h-[44px] items-center px-3 transition-[gap] duration-300 ${b?"gap-0":"gap-3"}`,children:[h.jsx("button",{onClick:()=>s("/profile"),className:"flex h-7 w-7 items-center justify-center text-xs font-bold text-black transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",borderRadius:4,flexShrink:0},title:y("common.profile"),children:((i==null?void 0:i.username)??"u")[0].toUpperCase()}),h.jsxs("div",{className:`flex min-w-0 flex-1 items-center overflow-hidden transition-[max-width,opacity] duration-300 ${b?"pointer-events-none max-w-0 opacity-0":"max-w-[calc(100%-28px)] opacity-100"}`,"aria-hidden":b,children:[h.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:y("common.profile"),tabIndex:b?-1:void 0,children:[h.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(i==null?void 0:i.username)??"user"}),h.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(i==null?void 0:i.role)??"user"})]}),h.jsx("button",{onClick:()=>f(!0),className:"ml-2 p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":y("common.log_out"),tabIndex:b?-1:void 0,children:h.jsx(fb,{size:14})})]})]})}),h.jsx(s0,{isOpen:o,onClose:()=>f(!1),onConfirm:p,title:y("common.logout_title"),message:y("common.logout_message"),confirmLabel:y("common.logout"),confirmVariant:"warning"})]})}function T0({headerActions:i,subtitleOverride:u}){const s=gt(),{title:o,subtitle:f}=x0(s.pathname),m=u??f,y=typeof m=="string"?m:m==null?void 0:m.text,b=typeof m=="string"?m:(m==null?void 0:m.title)??(m==null?void 0:m.text);return h.jsxs("header",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5",style:{height:48,minHeight:48,backgroundColor:"var(--bg-card)"},children:[h.jsxs("div",{className:"text-sm lowercase",children:[h.jsx("span",{style:{color:"var(--text-primary)"},children:o}),y&&h.jsxs("span",{style:{color:"var(--text-muted)"},title:b,children:[" ","// ",Wh(y,40)]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[i,h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(wp,{}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})]})}function j0(){const[i,u]=g.useState(null),[s,o]=g.useState(null),f=gt(),m=f.pathname==="/home",y=/^\/tasks\/\d+$/.test(f.pathname),b=f.pathname.startsWith("/docs");return g.useEffect(()=>up.getState().init(),[]),h.jsxs("div",{className:"fixed inset-x-0 top-0 flex w-full overflow-hidden font-mono md:flex-row",style:{height:"var(--app-height, 100dvh)",minHeight:"var(--app-height, 100dvh)"},children:[h.jsx(w0,{}),h.jsxs("div",{"data-testid":"app-main-column",className:"flex min-h-0 flex-1 flex-col overflow-hidden pb-[calc(48px+var(--safe-area-bottom,0px))] md:pb-0",children:[h.jsx(k0,{}),!b&&h.jsx(T0,{headerActions:i,subtitleOverride:s}),h.jsx(p0,{className:m||y?"min-h-0 flex-1 overflow-hidden bg-[var(--bg-primary)]":"min-h-0 flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:h.jsx(Tp.Provider,{value:{setActions:u},children:h.jsx(jp.Provider,{value:{setSubtitle:o},children:h.jsx(dv,{})})})}),h.jsx(d0,{}),h.jsx(m0,{}),h.jsx("div",{className:"safe-area-bottom-fill fixed inset-x-0 bottom-0 z-30 bg-[var(--bg-card)] md:hidden",children:h.jsx(E0,{})})]})]})}function Ah(i){var s;const u=(s=i.state)==null?void 0:s.from;return u?{from:u}:{from:{pathname:i.pathname,search:i.search}}}function li({children:i,requireAdmin:u=!1}){const{accessToken:s,user:o,requireTotpSetup:f,initializing:m}=xa(),y=gt();if(m)return h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return h.jsx(ll,{to:"/login",state:Ah(y),replace:!0});if(f){const b=Ah(y);return y.pathname!=="/totp-setup"&&y.pathname!=="/bind"?h.jsx(ll,{to:"/totp-setup",state:b,replace:!0}):y.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(b.from)),h.jsx(ll,{to:"/totp-setup",state:b,replace:!0})):h.jsx(h.Fragment,{children:i})}return u&&(o==null?void 0:o.role)!==ip.ADMIN?h.jsx(ll,{to:"/home",replace:!0}):h.jsx(h.Fragment,{children:i})}function R0({children:i}){const{theme:u,resolved:s,setResolved:o}=sp();return g.useEffect(()=>{if(u!=="system"){o(u);return}const f=window.matchMedia("(prefers-color-scheme: dark)");o(f.matches?"dark":"light");const m=y=>o(y.matches?"dark":"light");return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[u,o]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),h.jsx(h.Fragment,{children:i})}class A0 extends g.Component{constructor(u){super(u),this.state={hasError:!1,error:null}}static getDerivedStateFromError(u){return{hasError:!0,error:u}}render(){var u;return this.state.hasError?h.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[h.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Yr("common.runtime_error")}),h.jsx("p",{className:"max-w-md text-center text-xs text-[var(--text-muted)]",children:((u=this.state.error)==null?void 0:u.message)||Yr("common.an_unexpected_error_occurred")}),h.jsxs("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(ep,{className:"h-3.5 w-3.5"}),Yr("common.reload")]})]}):this.props.children}}function z0({isOpen:i}){const u=Fa(),{logout:s,setSessionExpired:o}=xa(),{t:f}=Vt();function m(){s(),o(!1),u("/login")}return i?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),h.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:h.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[h.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:h.jsx(cb,{className:"h-7 w-7 text-[var(--warning)]"})}),h.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),h.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),h.jsx("button",{type:"button",className:"w-full rounded-[4px] bg-[var(--accent)] px-3 py-2.5 text-xs font-medium text-black hover:opacity-90 transition-opacity",onClick:m,children:f("auth.go_to_login")})]})})]}):null}const zh=5;let ba=[];const Bs=new Set;function Rp(){Bs.forEach(i=>i())}function O0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Wa(i,u,s=4e3){const o=O0();return ba=[...ba,{id:o,variant:i,message:u,duration:s}],ba.length>zh&&(ba=ba.slice(ba.length-zh)),Rp(),o}Wa.success=(i,u)=>Wa("success",i,u);Wa.error=(i,u)=>Wa("error",i,u);Wa.warning=(i,u)=>Wa("warning",i,u);Wa.info=(i,u)=>Wa("info",i,u);function C0(i){ba=ba.filter(u=>u.id!==i),Rp()}function D0(){const[,i]=g.useState(0);return g.useEffect(()=>{const u=()=>i(s=>s+1);return Bs.add(u),()=>{Bs.delete(u)}},[]),ba}const N0={success:{icon:ab,borderColor:"var(--accent)"},error:{icon:nb,borderColor:"var(--destructive)"},warning:{icon:np,borderColor:"var(--warning)"},info:{icon:ub,borderColor:"var(--info)"}};function M0({item:i}){const u=N0[i.variant],s=u.icon,{t:o}=Vt(),f=g.useCallback(()=>C0(i.id),[i.id]);return g.useEffect(()=>{if(!i.duration)return;const m=setTimeout(f,i.duration);return()=>clearTimeout(m)},[i.duration,f]),h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] bg-[var(--bg-card)] px-4 py-3 shadow-lg",style:{borderLeft:`3px solid ${u.borderColor}`},role:"alert",children:[h.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:u.borderColor}}),h.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:i.message}),h.jsx("button",{onClick:f,className:"shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]","aria-label":o("common.dismiss_notification"),children:h.jsx(lp,{className:"h-3.5 w-3.5"})})]})}function U0(){const i=D0();return i.length===0?null:h.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-[9999] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:i.map(u=>h.jsx("div",{className:"pointer-events-auto",children:h.jsx(M0,{item:u})},u.id))})}const q0=g.lazy(()=>ne(()=>import("./LandingPage-CWdPeZv-.js"),__vite__mapDeps([0,1,2,3,4,5]))),L0=g.lazy(()=>ne(()=>import("./LoginPage-DgF9ENzx.js"),[])),H0=g.lazy(()=>ne(()=>import("./TotpSetupPage-Dme4c3tv.js"),[])),B0=g.lazy(()=>ne(()=>import("./NotFoundPage-BUrnSFza.js"),[])),Y0=g.lazy(()=>ne(()=>import("./HomePage-CFVWSe09.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,1]))),G0=g.lazy(()=>ne(()=>import("./TerminalHomePage-ClJFAaTn.js"),__vite__mapDeps([15,16,17,18,19,20,21,10,11,22,8,12,13,23,24]))),V0=g.lazy(()=>ne(()=>import("./TaskListPage-T7DWBtM3.js"),__vite__mapDeps([25,20,21,7,8,12,14,26,22,5,27,9,23,28,11]))),X0=g.lazy(()=>ne(()=>import("./TaskDetailPage-CskFoYAc.js"),__vite__mapDeps([29,20,21,16,17,18,19,12,22,8,14,30,26,31,32]))),Q0=g.lazy(()=>ne(()=>import("./WorkerListPage-CM1GqeN7.js"),__vite__mapDeps([33,8,34,35,36,37,38,24,5,17,22,27,9,13,23]))),Z0=g.lazy(()=>ne(()=>import("./WorkerDetailPage-CgXIs1_M.js"),__vite__mapDeps([39,12,8,40,34,13,14,41,30]))),K0=g.lazy(()=>ne(()=>import("./WorkerSetupGuidePage-CyW_9sIh.js"),__vite__mapDeps([35,36,37,38,24]))),J0=g.lazy(()=>ne(()=>import("./ProjectListPage-qT9qvnxf.js"),__vite__mapDeps([42,22,21,27,9,12,13,23]))),$0=g.lazy(()=>ne(()=>import("./ProjectDetailPage-Czbvi0xm.js"),__vite__mapDeps([43,44,22,14,12,8,40,13,45,41,23]))),W0=g.lazy(()=>ne(()=>import("./EditProjectPage-D4LeLkUK.js"),__vite__mapDeps([46,22,44,21,23]))),F0=g.lazy(()=>ne(()=>import("./PipelineEditorPage-DY945ZLB.js"),__vite__mapDeps([47,22]))),I0=g.lazy(()=>ne(()=>import("./ProfilePage-wMwqf3xq.js"),__vite__mapDeps([48,49,40,13]))),P0=g.lazy(()=>ne(()=>import("./BindPlatformPage-BDisYk6H.js"),[])),e1=g.lazy(()=>ne(()=>import("./AccessTokensPage-DMsQKvGG.js"),__vite__mapDeps([50,22,27,9,12,13,23,5,41]))),t1=g.lazy(()=>ne(()=>import("./CliReferencePage-C6NT0ynG.js"),__vite__mapDeps([51,52,5,53,23]))),a1=g.lazy(()=>ne(()=>import("./ApiReferencePage-CWGvx9sZ.js"),__vite__mapDeps([54,53,5,23]))),n1=g.lazy(()=>ne(()=>import("./SkillPage-CKbqXAb6.js"),__vite__mapDeps([55,52,5,31]))),l1=g.lazy(()=>ne(()=>import("./DocsLayout-BVtSzaqN.js"),__vite__mapDeps([56,30]))),i1=g.lazy(()=>ne(()=>import("./InstallationPage-CJ-YdcrX.js"),__vite__mapDeps([57,52,5]))),r1=g.lazy(()=>ne(()=>import("./DeveloperSetupPage-Cw4nLpIm.js"),__vite__mapDeps([58,52,5]))),u1=g.lazy(()=>ne(()=>import("./WorkerSetupPage-DTQvCeTf.js"),__vite__mapDeps([59,52,5]))),o1=g.lazy(()=>ne(()=>import("./BotSetupPage-nornZgmt.js"),__vite__mapDeps([60,52,5]))),s1=g.lazy(()=>ne(()=>import("./LocalDevelopmentPage-BDl2Ktyc.js"),__vite__mapDeps([61,52,5]))),c1=g.lazy(()=>ne(()=>import("./WorkerOperationsPage-uArfsFAY.js"),[])),f1=g.lazy(()=>ne(()=>import("./DeploymentPage-3YMjpAFo.js"),__vite__mapDeps([62,52,5]))),Oh=g.lazy(()=>ne(()=>import("./BotIntegrationPage-DoqcdqwE.js"),[])),d1=g.lazy(()=>ne(()=>import("./PipelineConfigPage-Dn-fh0Ia.js"),__vite__mapDeps([63,52,5]))),m1=g.lazy(()=>ne(()=>import("./DevWorkflowPage-DFQTZVP9.js"),__vite__mapDeps([64,52,5]))),h1=g.lazy(()=>ne(()=>import("./PermissionsPage-DKhdHNDg.js"),[])),p1=g.lazy(()=>ne(()=>import("./EnvVariablesPage-D7HonzNe.js"),__vite__mapDeps([65,52,5]))),y1=g.lazy(()=>ne(()=>import("./ArchitecturePage-CVipZPS8.js"),__vite__mapDeps([66,52,5]))),g1=g.lazy(()=>ne(()=>import("./ChangelogPage-Bd5TviZ8.js"),[])),_1=g.lazy(()=>ne(()=>import("./AgentCliPage-BR2YXUlN.js"),__vite__mapDeps([67,52,5]))),v1=g.lazy(()=>ne(()=>import("./DocsIndexPage-cK28EfKj.js"),__vite__mapDeps([68,37,2,3,38,32]))),b1=g.lazy(()=>ne(()=>import("./AdminPage-DqZMqDDh.js"),__vite__mapDeps([69,4,2,70,38]))),x1=g.lazy(()=>ne(()=>import("./DeveloperManage-BnMIj_g_.js"),__vite__mapDeps([71,22,49,27,9,13,8,23,4,45,18]))),S1=g.lazy(()=>ne(()=>import("./BotManage-DRo01WBu.js"),__vite__mapDeps([72,22,52,5,41,23,27,9,13,8,2,45]))),E1=g.lazy(()=>ne(()=>import("./TokenManage-Cj9UuqyE.js"),__vite__mapDeps([73,36,5,31,27,9,13,8,23]))),k1=g.lazy(()=>ne(()=>import("./AuditLogPage-CCUK_lWo.js"),__vite__mapDeps([74,22,27,9,70,28,11]))),w1=g.lazy(()=>ne(()=>import("./SettingsPage-CZwwUAeC.js"),[]));function T1(){return h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function j1(){const i=xa(u=>u.sessionExpired);return h.jsxs(R0,{children:[h.jsx(U0,{}),h.jsx(A0,{children:h.jsxs(Hv,{children:[h.jsx(z0,{isOpen:i}),h.jsx(g.Suspense,{fallback:h.jsx(T1,{}),children:h.jsxs(hv,{children:[h.jsx(ee,{path:"/",element:h.jsx(q0,{})}),h.jsx(ee,{path:"/login",element:h.jsx(L0,{})}),h.jsx(ee,{path:"/totp-setup",element:h.jsx(li,{children:h.jsx(H0,{})})}),h.jsx(ee,{path:"/bind",element:h.jsx(li,{children:h.jsx(P0,{})})}),h.jsxs(ee,{element:h.jsx(li,{children:h.jsx(j0,{})}),children:[h.jsx(ee,{path:"/home",element:h.jsx(G0,{})}),h.jsx(ee,{path:"/dashboard",element:h.jsx(Y0,{})}),h.jsx(ee,{path:"/tasks",element:h.jsx(V0,{})}),h.jsx(ee,{path:"/tasks/:id",element:h.jsx(X0,{})}),h.jsx(ee,{path:"/workers",element:h.jsx(Q0,{})}),h.jsx(ee,{path:"/workers/setup",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(K0,{})})}),h.jsx(ee,{path:"/workers/:id",element:h.jsx(Z0,{})}),h.jsx(ee,{path:"/projects",element:h.jsx(J0,{})}),h.jsx(ee,{path:"/projects/:key",element:h.jsx($0,{})}),h.jsx(ee,{path:"/projects/:key/edit",element:h.jsx(W0,{})}),h.jsx(ee,{path:"/projects/:key/pipeline",element:h.jsx(F0,{})}),h.jsx(ee,{path:"/profile",element:h.jsx(I0,{})}),h.jsx(ee,{path:"/access-tokens",element:h.jsx(e1,{})}),h.jsxs(ee,{path:"/docs",element:h.jsx(l1,{}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"cli",replace:!0})}),h.jsx(ee,{path:"cli",element:h.jsx(t1,{})}),h.jsx(ee,{path:"api",element:h.jsx(a1,{})}),h.jsx(ee,{path:"bot",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"all",element:h.jsx(v1,{})}),h.jsx(ee,{path:"skill",element:h.jsx(n1,{})}),h.jsx(ee,{path:"installation",element:h.jsx(i1,{})}),h.jsx(ee,{path:"developer-setup",element:h.jsx(r1,{})}),h.jsx(ee,{path:"worker-setup",element:h.jsx(u1,{})}),h.jsx(ee,{path:"bot-setup",element:h.jsx(o1,{})}),h.jsx(ee,{path:"local-development",element:h.jsx(s1,{})}),h.jsx(ee,{path:"worker-operations",element:h.jsx(c1,{})}),h.jsx(ee,{path:"deployment",element:h.jsx(f1,{})}),h.jsx(ee,{path:"bot-integration",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"pipeline-config",element:h.jsx(d1,{})}),h.jsx(ee,{path:"dev-workflow",element:h.jsx(m1,{})}),h.jsx(ee,{path:"permissions",element:h.jsx(h1,{})}),h.jsx(ee,{path:"env-variables",element:h.jsx(p1,{})}),h.jsx(ee,{path:"architecture",element:h.jsx(y1,{})}),h.jsx(ee,{path:"agent-cli",element:h.jsx(_1,{})}),h.jsx(ee,{path:"changelog",element:h.jsx(g1,{})})]}),h.jsxs(ee,{path:"/admin",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(b1,{})}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"developers",replace:!0})}),h.jsx(ee,{path:"developers",element:h.jsx(x1,{})}),h.jsx(ee,{path:"bots",element:h.jsx(S1,{})}),h.jsx(ee,{path:"tokens",element:h.jsx(E1,{})}),h.jsx(ee,{path:"audit-logs",element:h.jsx(k1,{})}),h.jsx(ee,{path:"settings",element:h.jsx(w1,{})})]})]}),h.jsx(ee,{path:"*",element:h.jsx(B0,{})})]})})]})})]})}function Ap(i=window){var u,s;return((u=i.matchMedia)==null?void 0:u.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}async function R1(i=window,u="portrait"){var o,f;if(!Ap(i))return!1;const s=(f=(o=i.screen)==null?void 0:o.orientation)==null?void 0:f.lock;if(typeof s!="function")return!1;try{return await s.call(i.screen.orientation,u),!0}catch{return!1}}function A1(i){var u,s;return((u=i.matchMedia)==null?void 0:u.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}function z1(i){var s,o;const u=((s=i.navigator)==null?void 0:s.userAgent)??"";return/iPhone|iPad|iPod/i.test(u)||/Macintosh/i.test(u)&&(((o=i.navigator)==null?void 0:o.maxTouchPoints)??0)>1}function O1(i){const u=i.activeElement;if(!(u instanceof HTMLElement))return!1;const s=u.tagName;return u.isContentEditable||s==="INPUT"||s==="TEXTAREA"||s==="SELECT"}function C1(i){const u=i.screen;if(!u)return null;const s=Math.round(u.width),o=Math.round(u.height);return i.innerHeight>=i.innerWidth?Math.max(s,o):Math.min(s,o)}function D1(i=window,u=document){const s=u.documentElement,o=i.visualViewport??null;let f=-1;const m=()=>{const y=Math.round((o==null?void 0:o.height)??0),b=Math.round(i.innerHeight);let _=y>0?y:b;if(A1(i)&&z1(i)&&!O1(u)){const p=C1(i);p!==null&&(_=Math.max(_,b,p))}_!==f&&(f=_,s.style.setProperty("--app-height",`${_}px`))};return m(),i.addEventListener("resize",m),i.addEventListener("orientationchange",m),o==null||o.addEventListener("resize",m),()=>{i.removeEventListener("resize",m),i.removeEventListener("orientationchange",m),o==null||o.removeEventListener("resize",m)}}xa.getState().initialize();D1(window,document);const zp=window,N1=Ap(zp);R1(zp);if(N1){document.documentElement.classList.add("pwa-standalone");const i=window.matchMedia("(prefers-color-scheme: dark)").matches,u=localStorage.getItem("overlord-theme"),s=u==="dark"||u!=="light"&&i;document.body.style.backgroundColor=s?"#171717":"#FFFFFF",new MutationObserver(()=>{const o=document.documentElement.classList.contains("dark");document.body.style.backgroundColor=o?"#171717":"#FFFFFF"}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}d_.createRoot(document.getElementById("root")).render(h.jsx(g.StrictMode,{children:h.jsx(j1,{})}));export{G1 as $,U1 as A,q1 as B,Pv as C,ip as D,ab as E,cb as F,V1 as G,Ns as H,nb as I,Y1 as J,np as K,Jh as L,db as M,ll as N,B1 as O,d0 as P,ep as Q,Rr as R,ap as S,cp as T,vb as U,s_ as V,H1 as W,lp as X,Wh as Y,ob as Z,fb as _,Vt as a,lb as a0,yb as a1,Js as a2,dv as a3,X1 as a4,Q1 as a5,$s as b,xe as c,pb as d,sb as e,Fa as f,gt as g,Qr as h,Eb as i,h as j,up as k,Ep as l,kp as m,l0 as n,Ir as o,L1 as p,$1 as q,g as r,K1 as s,Wa as t,xa as u,s0 as v,J1 as w,tp as x,Ph as y,Z1 as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as r,p as e,a4 as s,a5 as u,$ as a}from"./index-
|
|
1
|
+
import{W as r,p as e,a4 as s,a5 as u,$ as a}from"./index-GPUbNOkg.js";const n={[e.QUEUED]:"var(--text-muted)",[e.ASSIGNED]:"#60a5fa",[e.RUNNING]:"var(--accent)",[e.SUSPENDED]:"var(--warning)",[e.COMPLETED]:"var(--info)",[e.FAILED]:"var(--destructive)",[e.CANCELLED]:"var(--text-muted)"};function v(t){return n[t]??"var(--text-muted)"}const o={[r.ONLINE]:"var(--accent)",[r.OFFLINE]:"var(--destructive)",[r.DRAINING]:"var(--warning)",[r.DECOMMISSIONED]:"var(--text-muted)"};function E(t){return o[t]??"var(--text-muted)"}function x(t){switch(t){case s.ACTIVE:return"text-green-400";case s.DISABLED:return"text-red-400";default:return"text-[var(--text-muted)]"}}function S(t){switch(t){case a.ACTIVE:return"text-green-400";case a.USED:return"text-blue-400";case a.REVOKED:return"text-red-400";case a.EXPIRED:return"text-[var(--text-muted)]";default:return"text-[var(--text-muted)]"}}function d(t){switch(t){case u.ACTIVE:return"text-green-400";case"error":return"text-red-400";default:return"text-[var(--text-muted)]"}}function i(t){return t>.8?"var(--destructive)":t>.6?"var(--warning)":"var(--accent)"}export{v as a,i as b,x as c,d,S as e,E as g,n as t,o as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as i,h as n,p as c,J as k}from"./index-
|
|
1
|
+
import{o as i,h as n,p as c,J as k}from"./index-GPUbNOkg.js";import{a as T}from"./agent-type-options-l4HLs4lb.js";const b=i((t,r)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0,fetchTasks:async a=>{const s=r()._fetchTasksAbort;s&&s.abort();const o=new AbortController,l=r()._fetchTasksRequestId+1;t({loading:!0,error:null,_fetchTasksAbort:o,_fetchTasksRequestId:l});try{const e={};a!=null&&a.status&&(e.status=a.status),a!=null&&a.projectKey&&(e.projectKey=a.projectKey),a!=null&&a.developerId&&(e.developerId=a.developerId),a!=null&&a.cursor&&(e.cursor=a.cursor),a!=null&&a.limit&&(e.limit=String(a.limit));const f=await n.get("web/tasks",{searchParams:e,signal:o.signal}).json();if(r()._fetchTasksRequestId!==l)return;t({tasks:f.data,nextCursor:f.nextCursor??null,_fetchTasksAbort:null})}catch(e){if(e instanceof DOMException&&e.name==="AbortError")return;r()._fetchTasksRequestId===l&&t({error:e instanceof Error?e.message:"Failed to fetch tasks"})}finally{r()._fetchTasksRequestId===l&&t({loading:!1,_fetchTasksAbort:null})}},fetchTask:async a=>{t({loading:!0,error:null});try{const s=await n.get(`web/tasks/${a}`).json();t({currentTask:s})}catch(s){t({error:s instanceof Error?s.message:"Failed to fetch task"})}finally{t({loading:!1})}},createTask:async a=>{t({error:null});try{const s=await n.post("web/tasks",{json:a}).json();return t(o=>({tasks:[s,...o.tasks]})),s}catch(s){throw t({error:s instanceof Error?s.message:"Failed to create task"}),s}},cancelTask:async a=>{t({error:null});try{await n.post(`web/tasks/${a}/cancel`);const{currentTask:s}=r();(s==null?void 0:s.id)===a&&await r().fetchTask(a)}catch(s){throw t({error:s instanceof Error?s.message:"Failed to cancel task"}),s}},reset:()=>{t({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0})}})),p=[c.COMPLETED,c.FAILED,c.CANCELLED],E=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],d=T(t=>t);[...d];function _(t){return(t??k.CLAUDE).toLowerCase()}export{p as T,E as a,_ as g,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-GPUbNOkg.js";function p(s,l){const[i,d]=e.useState(null),[R,a]=e.useState(!0),[m,o]=e.useState(null),f=e.useRef(s);f.current=s;const r=e.useRef(0),t=e.useRef(!0),u=e.useCallback(async()=>{const c=++r.current;a(!0),o(null);try{const n=await f.current();t.current&&c===r.current&&d(n)}catch(n){if(t.current&&c===r.current){const E=n instanceof Error?n.message:"An unexpected error occurred";o(E)}}finally{t.current&&c===r.current&&a(!1)}},l);return e.useEffect(()=>{u()},[u]),e.useEffect(()=>()=>{t.current=!1,r.current+=1},[]),{data:i,loading:R,error:m,refetch:u}}export{p as u};
|
package/public/index.html
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap"
|
|
29
29
|
rel="stylesheet"
|
|
30
30
|
/>
|
|
31
|
-
<script type="module" crossorigin src="/assets/index-
|
|
32
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
31
|
+
<script type="module" crossorigin src="/assets/index-GPUbNOkg.js"></script>
|
|
32
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BUjb3VF-.css">
|
|
33
33
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
34
34
|
<body>
|
|
35
35
|
<div id="root"></div>
|
package/public/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,e={};const l=(l,
|
|
1
|
+
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let o={};const a=s=>l(s,r),u={module:{uri:r},exports:o,require:a};e[r]=Promise.all(n.map(s=>u[s]||a(s))).then(s=>(i(...s),o))}}define(["./workbox-6e9b121d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"og-image.png",revision:"f1563b4bdc7d1a4ab0aef864b0c2294e"},{url:"index.html",revision:"38141702738d08df75f213320c5cbe07"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"apple-touch-icon-152x152.png",revision:"8cc7ef3bc3aa19c3d8a29a58646d0636"},{url:"apple-touch-icon-120x120.png",revision:"7057fb6fb60df3fcf3cd49883db13be9"},{url:"assets/workflow-CPFrQB2p.js",revision:null},{url:"assets/wifi-B0GLkoI5.js",revision:null},{url:"assets/users-N89uFOml.js",revision:null},{url:"assets/useFetch-C6aoI2YR.js",revision:null},{url:"assets/trash-2-BH7Uy_FR.js",revision:null},{url:"assets/task-constants-LNckgIqT.js",revision:null},{url:"assets/status-colors-C_RhLQKM.js",revision:null},{url:"assets/settings-DqX6KTB6.js",revision:null},{url:"assets/scroll-text-w6v00sw0.js",revision:null},{url:"assets/rotate-ccw-9hl77Xny.js",revision:null},{url:"assets/plus-JnJTWOh0.js",revision:null},{url:"assets/pencil-BObnoNZc.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-PEOtoIoF.js",revision:null},{url:"assets/key-D-EBAM_S.js",revision:null},{url:"assets/index-GPUbNOkg.js",revision:null},{url:"assets/index-BUjb3VF-.css",revision:null},{url:"assets/git-fork-DjDcRdWO.js",revision:null},{url:"assets/file-text-CwpyLWx2.js",revision:null},{url:"assets/external-link-BYaw3Ovt.js",revision:null},{url:"assets/download-CtBIkCC6.js",revision:null},{url:"assets/date-RFA7-ZGs.js",revision:null},{url:"assets/copy-CukaPL3b.js",revision:null},{url:"assets/chevron-right-CxMAZVfy.js",revision:null},{url:"assets/chevron-left-B11s6IVD.js",revision:null},{url:"assets/bot-haRrziLf.js",revision:null},{url:"assets/arrow-right-BBWwGkdK.js",revision:null},{url:"assets/arrow-left-D2z6WXle.js",revision:null},{url:"assets/agent-type-options-l4HLs4lb.js",revision:null},{url:"assets/WorkerSetupPage-DTQvCeTf.js",revision:null},{url:"assets/WorkerSetupGuidePage-CyW_9sIh.js",revision:null},{url:"assets/WorkerOperationsPage-uArfsFAY.js",revision:null},{url:"assets/WorkerListPage-CM1GqeN7.js",revision:null},{url:"assets/WorkerDetailPage-CgXIs1_M.js",revision:null},{url:"assets/TotpSetupPage-Dme4c3tv.js",revision:null},{url:"assets/Tooltip-1tjISJAN.js",revision:null},{url:"assets/TokenManage-Cj9UuqyE.js",revision:null},{url:"assets/TerminalHomePage-ClJFAaTn.js",revision:null},{url:"assets/TaskStatusBadge-Cd9AKReP.js",revision:null},{url:"assets/TaskListPage-T7DWBtM3.js",revision:null},{url:"assets/TaskDetailPage-CskFoYAc.js",revision:null},{url:"assets/SkillPage-CKbqXAb6.js",revision:null},{url:"assets/Skeleton-DQWHHk9G.js",revision:null},{url:"assets/SettingsPage-CZwwUAeC.js",revision:null},{url:"assets/Select-BfjWmQST.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-Brv6Th8M.js",revision:null},{url:"assets/QuickAuth-BsMxofrA.js",revision:null},{url:"assets/ProjectListPage-qT9qvnxf.js",revision:null},{url:"assets/ProjectDetailPage-Czbvi0xm.js",revision:null},{url:"assets/ProfilePage-wMwqf3xq.js",revision:null},{url:"assets/PipelineEditorPage-DY945ZLB.js",revision:null},{url:"assets/PipelineConfigPage-Dn-fh0Ia.js",revision:null},{url:"assets/PermissionsPage-DKhdHNDg.js",revision:null},{url:"assets/OnboardingGuide-E87DHNsp.js",revision:null},{url:"assets/NotFoundPage-BUrnSFza.js",revision:null},{url:"assets/MobileTerminalShell-BSE0-T35.js",revision:null},{url:"assets/MobileTerminalShell-6GBZ9nXN.css",revision:null},{url:"assets/MetricBar-DoUTAkIk.js",revision:null},{url:"assets/LoginPage-DgF9ENzx.js",revision:null},{url:"assets/LocalDevelopmentPage-BDl2Ktyc.js",revision:null},{url:"assets/LandingPage-CWdPeZv-.js",revision:null},{url:"assets/InstallationPage-CJ-YdcrX.js",revision:null},{url:"assets/InfoRow-CmtJW4M9.js",revision:null},{url:"assets/HomePage-CFVWSe09.js",revision:null},{url:"assets/EnvVariablesPage-D7HonzNe.js",revision:null},{url:"assets/EmptyState-ADwWEXdn.js",revision:null},{url:"assets/EditProjectPage-D4LeLkUK.js",revision:null},{url:"assets/DocsPrimitives-2csfHzW_.js",revision:null},{url:"assets/DocsLayout-BVtSzaqN.js",revision:null},{url:"assets/DocsIndexPage-cK28EfKj.js",revision:null},{url:"assets/DeveloperSetupPage-Cw4nLpIm.js",revision:null},{url:"assets/DeveloperManage-BnMIj_g_.js",revision:null},{url:"assets/DevWorkflowPage-DFQTZVP9.js",revision:null},{url:"assets/DeploymentPage-3YMjpAFo.js",revision:null},{url:"assets/CliReferencePage-C6NT0ynG.js",revision:null},{url:"assets/ChangelogPage-Bd5TviZ8.js",revision:null},{url:"assets/BotSetupPage-nornZgmt.js",revision:null},{url:"assets/BotManage-DRo01WBu.js",revision:null},{url:"assets/BotIntegrationPage-DoqcdqwE.js",revision:null},{url:"assets/BindPlatformPage-BDisYk6H.js",revision:null},{url:"assets/AuditLogPage-CCUK_lWo.js",revision:null},{url:"assets/ArchitecturePage-CVipZPS8.js",revision:null},{url:"assets/ApiReferencePage-CWGvx9sZ.js",revision:null},{url:"assets/AgentCliPage-BR2YXUlN.js",revision:null},{url:"assets/AdminPage-DqZMqDDh.js",revision:null},{url:"assets/AccessTokensPage-DMsQKvGG.js",revision:null},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"manifest.webmanifest",revision:"e3100788a89f54481dbd663d57df57a6"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("/index.html"))),s.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new s.CacheFirst({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new s.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3})]}),"GET")});
|