@agent-spaces/server 0.3.3 → 0.3.4
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/dist/app.js +11 -0
- package/dist/package.json +2 -1
- package/dist/routes/channel.js +18 -6
- package/dist/routes/file.js +2 -2
- package/dist/routes/inspector.js +14 -0
- package/dist/routes/issue.js +7 -0
- package/dist/services/channel.js +2 -0
- package/dist/services/file.js +4 -0
- package/dist/services/inspector-history.js +53 -0
- package/dist/services/notification-hub/events.js +34 -1
- package/dist/services/pty.js +6 -3
- package/dist/services/search.js +3 -5
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +4 -4
- package/dist/web/__next._full.txt +21 -21
- package/dist/web/__next._head.txt +4 -4
- package/dist/web/__next._index.txt +13 -13
- package/dist/web/__next._tree.txt +2 -2
- package/dist/web/_next/static/chunks/01tyftu_-l7tm.css +1 -0
- package/dist/web/_next/static/chunks/028b9_5cyq-_m.js +1 -0
- package/dist/web/_next/static/chunks/{0v7nmghv8ieef.js → 0eq7wt-l.fetc.js} +1 -1
- package/dist/web/_next/static/chunks/0ms3tsu4men_j.js +204 -0
- package/dist/web/_next/static/chunks/12gvpt~z9mn8w.js +1 -0
- package/dist/web/_next/static/chunks/15dyaigebtnwg.js +5 -0
- package/dist/web/_not-found/__next._full.txt +19 -19
- package/dist/web/_not-found/__next._head.txt +4 -4
- package/dist/web/_not-found/__next._index.txt +13 -13
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/web/_not-found/__next._not-found.txt +3 -3
- package/dist/web/_not-found/__next._tree.txt +2 -2
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +19 -19
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +21 -21
- package/dist/web/login/__next._full.txt +21 -21
- package/dist/web/login/__next._head.txt +4 -4
- package/dist/web/login/__next._index.txt +13 -13
- package/dist/web/login/__next._tree.txt +2 -2
- package/dist/web/login/__next.login.__PAGE__.txt +4 -4
- package/dist/web/login/__next.login.txt +3 -3
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +21 -21
- package/dist/web/settings/__next._full.txt +23 -23
- package/dist/web/settings/__next._head.txt +4 -4
- package/dist/web/settings/__next._index.txt +13 -13
- package/dist/web/settings/__next._tree.txt +2 -2
- package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
- package/dist/web/settings/__next.settings.txt +5 -5
- package/dist/web/settings/agents/__next._full.txt +23 -23
- package/dist/web/settings/agents/__next._head.txt +4 -4
- package/dist/web/settings/agents/__next._index.txt +13 -13
- package/dist/web/settings/agents/__next._tree.txt +2 -2
- package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
- package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
- package/dist/web/settings/agents/__next.settings.txt +5 -5
- package/dist/web/settings/agents.html +1 -1
- package/dist/web/settings/agents.txt +23 -23
- package/dist/web/settings/mcps/__next._full.txt +23 -23
- package/dist/web/settings/mcps/__next._head.txt +4 -4
- package/dist/web/settings/mcps/__next._index.txt +13 -13
- package/dist/web/settings/mcps/__next._tree.txt +2 -2
- package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
- package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
- package/dist/web/settings/mcps/__next.settings.txt +5 -5
- package/dist/web/settings/mcps.html +1 -1
- package/dist/web/settings/mcps.txt +23 -23
- package/dist/web/settings/models/__next._full.txt +23 -23
- package/dist/web/settings/models/__next._head.txt +4 -4
- package/dist/web/settings/models/__next._index.txt +13 -13
- package/dist/web/settings/models/__next._tree.txt +2 -2
- package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
- package/dist/web/settings/models/__next.settings.models.txt +3 -3
- package/dist/web/settings/models/__next.settings.txt +5 -5
- package/dist/web/settings/models.html +1 -1
- package/dist/web/settings/models.txt +23 -23
- package/dist/web/settings/providers/__next._full.txt +23 -23
- package/dist/web/settings/providers/__next._head.txt +4 -4
- package/dist/web/settings/providers/__next._index.txt +13 -13
- package/dist/web/settings/providers/__next._tree.txt +2 -2
- package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
- package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
- package/dist/web/settings/providers/__next.settings.txt +5 -5
- package/dist/web/settings/providers.html +1 -1
- package/dist/web/settings/providers.txt +23 -23
- package/dist/web/settings/skills/__next._full.txt +23 -23
- package/dist/web/settings/skills/__next._head.txt +4 -4
- package/dist/web/settings/skills/__next._index.txt +13 -13
- package/dist/web/settings/skills/__next._tree.txt +2 -2
- package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
- package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
- package/dist/web/settings/skills/__next.settings.txt +5 -5
- package/dist/web/settings/skills.html +1 -1
- package/dist/web/settings/skills.txt +23 -23
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +23 -23
- package/dist/web/workflows/__next._full.txt +21 -21
- package/dist/web/workflows/__next._head.txt +4 -4
- package/dist/web/workflows/__next._index.txt +13 -13
- package/dist/web/workflows/__next._tree.txt +2 -2
- package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
- package/dist/web/workflows/__next.workflows.txt +3 -3
- package/dist/web/workflows.html +1 -1
- package/dist/web/workflows.txt +21 -21
- package/dist/web/workspace/_/__next._full.txt +21 -21
- package/dist/web/workspace/_/__next._head.txt +4 -4
- package/dist/web/workspace/_/__next._index.txt +13 -13
- package/dist/web/workspace/_/__next._tree.txt +2 -2
- package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -3
- package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
- package/dist/web/workspace/_/__next.workspace.txt +3 -3
- package/dist/web/workspace/_.html +1 -1
- package/dist/web/workspace/_.txt +21 -21
- package/dist/web/workspaces/__next._full.txt +21 -21
- package/dist/web/workspaces/__next._head.txt +4 -4
- package/dist/web/workspaces/__next._index.txt +13 -13
- package/dist/web/workspaces/__next._tree.txt +2 -2
- package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
- package/dist/web/workspaces/__next.workspaces.txt +3 -3
- package/dist/web/workspaces.html +1 -1
- package/dist/web/workspaces.txt +21 -21
- package/dist/ws/agent-runner.js +1 -0
- package/dist/ws/connection-manager.js +13 -0
- package/dist/ws/handler.js +3 -11
- package/dist/ws/terminal-handler.js +19 -3
- package/package.json +3 -1
- package/dist/web/_next/static/chunks/0cwvdk55mrt_9.css +0 -1
- package/dist/web/_next/static/chunks/0gczc8mmde5my.js +0 -1
- package/dist/web/_next/static/chunks/0lmeh15xwcj0s.js +0 -204
- package/dist/web/_next/static/chunks/0puhc.l_.mc99.js +0 -1
- package/dist/web/_next/static/chunks/0wekj7h15h7z7.js +0 -5
- /package/dist/web/_next/static/{gN3O86ki0NGTvGTqE2Ibh → O5-QCW1u2YNyAUyaoYh6s}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{gN3O86ki0NGTvGTqE2Ibh → O5-QCW1u2YNyAUyaoYh6s}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/_next/static/{gN3O86ki0NGTvGTqE2Ibh → O5-QCW1u2YNyAUyaoYh6s}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,171167,(e,t,a)=>{t.exports=JSON.parse('{"common":{"save":"Save","saved":"Saved","cancel":"Cancel","delete":"Delete","confirm":"Confirm","search":"Search","loading":"Loading...","noData":"No data","upload":"Upload","remove":"Remove","add":"Add","edit":"Edit","open":"Open","close":"Close","back":"Back","next":"Next","retry":"Retry","error":"Error","success":"Success","manage":"Manage","active":"Active","name":"Name","description":"Description","status":"Status","actions":"Actions","copy":"Copy","copied":"Copied","create":"Create","saving":"Saving...","you":"You","user":"User","refresh":"Refresh","new":"New"},"settings":{"title":"Settings","description":"Customize your workspace appearance","userAvatar":"User Avatar","theme":"Theme","themeLight":"Light","themeDark":"Dark","themeSystem":"System","language":"Language","languageZh":"中文","languageEn":"English","security":"Security","newSecretPlaceholder":"New secret key (leave empty to remove)","redirecting":"Redirecting to login...","zoom":"Page Zoom","zoomReset":"Reset","showWorkspaceTabs":"Show Workspace Tabs","autoActivateWorkspace":"Auto-open last workspace on startup","layout":"Layout","resetLayout":"Reset to Default","speech":"Speech Recognition","speechDescription":"Configure speech recognition provider credentials","speechProvider":"Provider","speechTencent":"Tencent Cloud","speechAppId":"App ID","speechSecretId":"Secret ID","speechSecretKey":"Secret Key","speechNoConfig":"No speech recognition configured","speechAddConfig":"Add Config","git":"Git"},"login":{"subtitle":"Enter your secret key to continue","secretPlaceholder":"Secret key (leave empty if not set)","verifying":"Verifying...","login":"Login","loginFailed":"Login failed","networkError":"Network error","manageServers":"Manage Servers"},"workspaces":{"title":"Workspaces","newWorkspace":"New Workspace","emptyMessage":"No workspaces yet. Create one to get started."},"workspace":{"dialog":{"editTitle":"Edit Workspace","newTitle":"New Workspace","editDescription":"Update workspace settings.","newDescription":"Create a new workspace bound to a local directory.","namePlaceholder":"Workspace name"},"agents":"Agents","addAgent":"Add Agent","noAgents":"No agents in this workspace","clone":{"createFromGit":"Create from Git","fromGitTooltip":"Clone from a Git repository","selectFolderFirst":"Please select a target folder first","title":"Create from Git","description":"Enter a Git repository URL to clone into the selected folder.","cloneTo":"Will clone to: ","objects":"objects","cloning":"Cloning...","clone":"Clone","cloneFailed":"Clone failed","noResponseBody":"No response body","phase":{"counting":"Counting objects...","compressing":"Compressing...","receiving":"Receiving data...","resolving":"Resolving...","done":"Done","error":"Failed"}}},"sidebar":{"nav":{"home":"Home","workspaces":"Workspaces","addWorkspace":"Add Workspace","settings":"Settings","general":"General","agents":"Agents","skills":"Skills","mcps":"MCP Servers","models":"Models","providers":"Providers"},"notifications":{"openAriaLabel":"Open notifications","title":"Notifications","viewAll":"View all notifications","centerTitle":"Notification Center","empty":"No notifications","clearAll":"Clear all","markAllRead":"Mark all read","backToList":"Back to list"},"server":{"servers":"Servers","addServer":"Add Server","manageServers":"Manage Servers","editServer":"Edit Server","editDescription":"Update server connection details.","addDescription":"Add an API server to connect to.","manageDescription":"Add, edit, or remove API server connections.","url":"URL","secret":"Secret","secretPlaceholder":"Optional API secret","secretOptionalPlaceholder":"Secret (optional)","newServer":"New Server","switch":"Switch"}},"agent":{"provider":{"anthropicMessages":"Anthropic Messages","openaiChatCompletions":"OpenAI Chat Completions","openaiResponses":"OpenAI Responses API","openaiResponsesToAnthropic":"OpenAI Responses To Anthropic Messages","openaiChatToAnthropic":"OpenAI Chat Completions To Anthropic Messages","geminiGenerateContent":"Gemini Native generateContent"},"runtime":{"openAgentSdk":"Open Agent SDK","claudeCode":"Claude Code","codex":"Codex","langchain":"LangChain"},"role":{"agent":{"name":"Agent"},"scheduler":{"name":"Scheduler"},"task_creator":{"name":"Task Creator"},"bot":{"name":"Bot Agent"}},"defaultName":"New Agent","error":{"loadFailed":"Failed to load agent presets","saveFailed":"Failed to save agent preset","connectionTestFailed":"Connection test failed","noWorkspace":"Open a workspace before adding agent presets","deleteFailed":"Failed to delete agent preset"},"dialog":{"title":"Agent Presets","editDescription":"Configure agent behavior, tools, and model settings","listDescription":"Manage agent presets for workspace automation","add":"Add","addEmpty":"Empty","noWorkspace":"No workspace selected","loading":"Loading agent presets..."},"list":{"noDescription":"No description","empty":"No agent presets yet"},"detail":{"uploadAvatar":"Upload","removeAvatar":"Remove","name":"Name","role":"Role","description":"Description","agentRuntime":"Agent Runtime","runtimePlaceholder":"Select agent runtime...","runtimeSearchPlaceholder":"Search agent runtime...","workingDirectory":"Working Directory","workingDirPlaceholder":"/workspace","systemPrompt":"System Prompt","systemPromptPlaceholder":"Enter system prompt...","mcpServers":"MCP Servers","tools":"Tools","skills":"Skills","uploadSkills":"Upload Markdown skills","model":"Model","provider":"Provider","providerPlaceholder":"Select provider...","providerSearchPlaceholder":"Search provider...","modelField":"Model","selectProviderFirst":"Select a provider first...","modelPlaceholder":"Select model...","modelSearchPlaceholder":"Search or type custom model...","apiMessageType":"API Message Type","apiMessageTypePlaceholder":"Select API message type...","apiMessageTypeSearchPlaceholder":"Search API message type...","apiBase":"API Base","apiBasePlaceholder":"https://api.example.com/v1","apiKey":"API Key","apiKeyPlaceholder":"sk-...","validateHelper":"Validate provider credentials before saving.","testing":"Testing...","test":"Test","temperature":"Temperature","maxTokens":"Max Tokens","basic":"Basic"},"debug":{"status":"status:","provider":"provider:","url":"url:","model":"model:","body":"body:"}},"models":{"capability":{"vision":"Vision","reasoning":"Reasoning","embedding":"Embedding"},"error":{"saveFailed":"Failed to save model","deleteFailed":"Failed to delete model"},"confirm":{"delete":"Delete this model?"},"dialog":{"editTitle":"Edit Model","addTitle":"Add Model","title":"Models","editDescription":"Configure model properties and capabilities","listDescription":"Manage available LLM models","add":"Add","loading":"Loading models..."},"list":{"contextAbbr":"ctx","empty":"No models yet"},"form":{"details":"Details","modelId":"Model ID","modelIdPlaceholder":"e.g. gpt-4o","displayName":"Display Name","displayNamePlaceholder":"e.g. GPT-4o","provider":"Provider","context":"Context","maxContextTokens":"Max context tokens","customContextPlaceholder":"128000","thinking":"Thinking","enableThinking":"Enable thinking","enableThinkingHelper":"Send reasoning/thinking options with model requests.","effort":"Effort","cost":"Cost","inputPerMillion":"Input / 1M tokens","outputPerMillion":"Output / 1M tokens","costPlaceholder":"0.00","capabilities":"Capabilities"}},"providers":{"error":{"saveFailed":"Failed to save provider","deleteFailed":"Failed to delete provider"},"confirm":{"delete":"Delete this provider?"},"dialog":{"editTitle":"Edit Provider","addTitle":"Add Provider","title":"Providers","editDescription":"Configure provider connection settings","listDescription":"Manage LLM API providers","add":"Add","loading":"Loading providers..."},"list":{"noApiBase":"No API base configured","modelsCount":"models","addModel":"Add model","empty":"No providers yet"},"form":{"connection":"Connection","name":"Name","namePlaceholder":"e.g. Anthropic","apiBase":"API Base","apiBasePlaceholder":"https://api.anthropic.com","apiKey":"API Key","apiKeyPlaceholder":"sk-..."}},"chat":{"channel":{"general":"General","issue":"Issue","agent":"Agent","edit":"Edit Channel","create":"Create Channel","selectType":"Select type","addMember":"Add Member","info":"Channel Info","members":"Members","type":"Type:","channelId":"Channel ID","memberCount":"Member count","createdAt":"Created","noMembers":"No members yet","delete":"Delete Channel","deleteConfirm":"Are you sure you want to delete this channel? This action cannot be undone.","namePlaceholder":"Channel name","archive":"Archive","unarchive":"Unarchive","archived":"Archived","clearArchived":"Clear Archived","clearArchivedConfirm":"Delete {count} archived {count, plural, one {channel} other {channels}}? This cannot be undone."},"channelType":{"general":"General","issue":"Issue","agent":"Agent"},"emptyState":"Select a channel to start chatting","status":{"idle":"Idle","waitingForUser":"Waiting for confirmation","running":"Running","success":"Success","error":"Failed"},"viewRelatedIssue":"View related issue","deleteMessage":{"title":"Delete Message","description":"Are you sure you want to delete this message? This action cannot be undone."},"clearMessages":{"title":"Clear Channel Messages","description":"Are you sure you want to clear all messages in #{channel}? This action cannot be undone.","confirm":"Clear"},"pendingQuestion":{"placeholder":"Type your answer..."},"untitledTodo":"Untitled todo","input":{"placeholder":"Message #{channel}... Use @ to mention agents, / for commands","attachFiles":"Attach Files","autoMode":"Auto","unpinAgent":"Unpin Agent","pinAgent":"Pin Agent","mcp":"MCP","noMcp":"No MCP configured","skill":"Skill","noSkills":"No skills configured","tools":"Tools","noTools":"No tools configured","todos":"Todos","uploadFailed":"Upload failed: {name}","voiceStart":"Voice Input","voiceStop":"Stop Recording","manageMembers":"Manage channel members"},"messageParts":{"agentProcessing":"Agent is processing...","agentThinking":"Agent is thinking","aiIntermediateOutput":"AI intermediate output","streamingResponse":"Streaming response","intermediateMessage":"Intermediate message","chainSteps":"{count, plural, one {# chain step} other {# chain steps}}","reject":"Reject","approve":"Approve","result":"Result","aiMessage":"AI message","failedToLoadDetails":"Failed to load details.","loadingDetails":"Loading details...","noDetails":"No details available.","raw":"Raw","input":"Input","output":"Output"},"chainOfThought":{"defaultHeader":"Chain of Thought"},"commit":{"clipboardUnavailable":"Clipboard API not available"},"subagent":{"instructions":"Instructions","tools":"Tools","noDescription":"No description","outputSchema":"Output Schema"},"terminal":{"title":"Terminal","running":"Running...","clipboardUnavailable":"Clipboard API not available"},"context":{"totalCost":"Total cost","input":"Input","output":"Output","reasoning":"Reasoning","cache":"Cache"},"attachments":{"source":"Source","image":"Image","attachment":"Attachment","imageAlt":"Image","remove":"Remove","noAttachments":"No attachments"},"askUser":{"placeholder":"Type an answer..."},"readonlyCodeBlock":{"loading":"Loading code..."}},"issue":{"status":{"draft":"Draft","planned":"Planned","in_progress":"In Progress","review_pending":"Review Pending","changes_requested":"Changes Requested","approved":"Approved","completed":"Completed","archived":"Archived","error":"Error"},"list":{"title":"Issues","emptyTitle":"No issues yet","emptyDescription":"Create an issue to start collaborating","addIssue":"Add Issue","taskCount":"{count, plural, one {# task} other {# tasks}}","archive":"Archive","unarchive":"Unarchive","archived":"Archived","clearArchived":"Clear Archived","clearArchivedConfirm":"Delete {count} archived {count, plural, one {issue} other {issues}}? This cannot be undone."},"detail":{"selectIssue":"Select an issue to view details","commentPlaceholder":"Write a comment... Use @ to mention agents, / for commands","openChatChannel":"Open chat channel","memberCount":"{count, plural, one {# member} other {# members}}","created":"Created","updated":"Updated","pr":"PR:","start":"Start","resumeFailed":"Resume failed tasks","retryPaused":"Automatic retry paused after {failed}/{total} attempts.","tasks":"Tasks ({count})","editTask":"Edit Task","addTask":"Add Task","taskTitlePlaceholder":"Task title","taskDescriptionPlaceholder":"Description (optional)","noTasks":"No tasks yet","noAgent":"No agent assigned","comments":"Comments ({count})","author":"Author","commented":"commented","comment":"Comment","tabInfo":"Info","tabMembers":"Members","infoStatus":"Status","infoIssueId":"Issue ID","infoTaskCount":"Tasks","infoMemberCount":"Members","infoCreatedAt":"Created","infoUpdatedAt":"Updated","infoBranch":"Branch","infoPr":"PR","infoDescription":"Description","addMember":"Add member","deleteIssue":"Delete Issue"},"message":{"task":"task {taskId}","openMessage":"Open message","expandMore":"Show more","collapse":"Collapse"},"edit":{"title":"Edit Issue","description":"Modify issue info, status and members","titlePlaceholder":"Title","descriptionPlaceholder":"Description","statusLabel":"Status","membersLabel":"Members","searchAgent":"Search Agent...","noAgents":"No agents available"},"create":{"title":"Create Issue","description":"Create a new issue and assign members","titlePlaceholder":"Title","descriptionPlaceholder":"Description (optional)","membersLabel":"Members","searchAgent":"Search Agent...","noAgents":"No agents available","submit":"Create"}},"task":{"status":{"pending":"Pending","running":"Running","reviewing":"Reviewing","waiting_review":"Waiting Review","retrying":"Retrying","done":"Done","failed":"Failed","cancelled":"Cancelled"}},"home":{"table":{"agent":"Agent","model":"Model","modelUnknown":"unknown","summary":"Summary","cost":"Cost","total":"Total:","cacheHit":"Cache hit:","tokensIn":"in","tokensOut":"out","status":"Status","duration":"Duration","time":"Time","emptyMessage":"Usage appears here after an agent run completes.","noResults":"No results."},"period":{"today":"Today","7d":"7 days","30d":"30 days","1y":"1 year","custom":"Custom"},"title":"Agent Usage","metric":{"agentRuns":"Agent Runs","agentRunsHelper":"completed runs","tokensUsed":"Tokens Used","tokensIn":"in","totalCost":"Total Cost","totalCostHelper":"estimated spend","avgDuration":"Avg Duration","avgDurationHelper":"per run"},"chart":{"dailyTokenUsage":"Daily Token Usage","input":"Input","output":"Output","costByModel":"Cost by Model","noUsageRecords":"No completed usage records yet.","tokenDistribution":"Token Distribution","costDistribution":"Cost Distribution","tokens":"tokens","totalCost":"total cost","noCostData":"No cost data yet.","noTokenData":"No token data"},"pagination":{"showing":"Showing","to":"to","of":"of","entries":"entries","prevAriaLabel":"Go to previous page","previous":"Previous","nextAriaLabel":"Go to next page","next":"Next"},"time":{"justNow":"just now","minutesAgo":"{n}m ago","hoursAgo":"{n}h ago","daysAgo":"{n}d ago"},"subscription":{"planTitle":"Subscription Plans","addPlatform":"Subscriptions","title":"Manage Subscriptions","empty":"No subscriptions yet. Click below to add one.","add":"Add Platform","cancel":"Cancel","save":"Save","platform":"Platform","label":"Label","labelPlaceholder":"Optional name for this config","loading":"Loading...","resetAt":"Resets at","headers":"Extra Headers","addHeader":"Add","noHeaders":"No headers","cookiePlaceholder":"Paste browser Cookie","editTitle":"Edit Subscription"}},"editor":{"explorer":"EXPLORER","noFiles":"No files found","revealInFinder":"Reveal in Finder","loadingEditor":"Loading editor...","openFileToEdit":"Open a file to start editing","search":"Search","searchPlaceholder":"Search file contents...","searchFiles":"Search Files","searchCode":"Search Code","caseSensitive":"Case Sensitive","useRegex":"Regex","searchResults":"{count} results in {files} files","tooManyResults":"Too many results, narrow your search","noResults":"No results found","searching":"Searching...","menuFile":"File","menuEdit":"Edit","menuSave":"Save","menuUndo":"Undo","menuRedo":"Redo","menuCut":"Cut","menuCopy":"Copy","menuPaste":"Paste","menuFind":"Find","menuReplace":"Replace","menuView":"View","menuFullscreen":"Fullscreen","exitFullscreen":"Exit Fullscreen","enableEdit":"Enable Editing","disableEdit":"Set Read-only","revealInTree":"Reveal in File Tree","copyFilePath":"Copy File Path","copyRelativePath":"Copy Relative Path","copied":"Copied","saveChangesTitle":"Save Changes","saveChangesDesc":"File \\"{name}\\" has unsaved changes. Save before closing?","discardChanges":"Don\'t Save","cancel":"Cancel","save":"Save","importFile":"Import File","importFileDesc":"Choose an import method to add files to the current directory","importOnline":"Online File","importInternal":"Internal File","importUpload":"Local Upload","importSuccess":"Import successful","importFailed":"Import failed","copyPath":"Copy Path","rename":"Rename","move":"Move","copyFile":"Copy","renameTitle":"Rename","renamePlaceholder":"Enter new name","moveTitle":"Move to","movePlaceholder":"Enter destination path","copyTitle":"Copy to","copyPlaceholder":"Enter destination path","newFile":"New File","newFolder":"New Folder","newFileName":"Enter file name","newFolderName":"Enter folder name","fileTooLargeTitle":"Large File","fileTooLargeDesc":"File \\"{name}\\" is {size}, which may cause the editor to lag. Open anyway?","openAnyway":"Open Anyway","deleteFileTitle":"Delete File","deleteFileDesc":"Are you sure you want to delete \\"{name}\\"? This action cannot be undone.","deleteFolderTitle":"Delete Folder","deleteFolderDesc":"Are you sure you want to delete \\"{name}\\" and all its contents? This action cannot be undone.","allFiles":"All Files","recentlyAdded":"Recently Added","recentlyOpened":"Recently Opened"},"terminal":{"newTerminal":"New Terminal","noSession":"No terminal session","selectWorkingDirectory":"Select Working Directory","selectWorkingDirectoryDescription":"This workspace has multiple bound directories. Select which one to use for this terminal.","virtualKeyboard":"Keyboard","sendCtrlC":"Quit","clearScreen":"Clear","pasteCommand":"Paste Commands","pasteCommandDescription":"Edit commands and confirm to send them line by line to the terminal","pasteCommandPlaceholder":"One command per line...","cancel":"Cancel","confirm":"Confirm"},"git":{"changes":{"title":"Changes","staged":"Staged","unstaged":"Unstaged","commitMessagePlaceholder":"Commit message (⌘+Enter)","commit":"Commit","committing":"Committing...","syncChanges":"Sync Changes","syncing":"Syncing...","discardAll":"Discard all changes","discard":"Discard","confirmDiscardAll":"Are you sure you want to discard all uncommitted changes? This action cannot be undone.","confirmDiscardFile":"Are you sure you want to discard changes for {file}? This action cannot be undone.","refresh":"Refresh","editGitignore":"Edit .gitignore","noChanges":"No changes","noBranches":"No branches","selectFileDiff":"Select a file to view diff","noChangesToShow":"No changes to show","ignoreThisFile":"Ignore this file","ignoreFilePath":"Ignore {path}","syncedSuccessfully":"Synced successfully","syncFailed":"Sync failed","failedCommitMessage":"Failed to generate commit message","committedSuccessfully":"Committed successfully","commitFailed":"Commit failed","discardedSuccessfully":"Changes discarded","discardFailed":"Discard failed"},"commits":{"title":"Commits","titleWithCount":"Commits ({count})","pushNCommits":"Push {count} commits","pullNCommits":"Pull {count} commits","noCommits":"No commits","settingsTitle":"Git Settings","remoteTrackingBranch":"Remote tracking branch","pushedSuccessfully":"Pushed successfully","pushFailed":"Push failed","pulledSuccessfully":"Pulled successfully","pullFailed":"Pull failed","remoteAdded":"Remote added","contextMenu":{"openChanges":"Open Changes","openOnGitHub":"Open on GitHub","checkout":"Checkout","checkoutDetached":"Checkout (Detached)","createBranch":"Create Branch...","deleteBranch":"Delete Branch","createTag":"Create Tag...","cherryPick":"Cherry Pick","compareWithRemote":"Compare with Remote","compareWithMergeBase":"Compare with Merge Base","compareWith":"Compare with...","copyCommitId":"Copy Commit ID","copyCommitMessage":"Copy Commit Message","addToChat":"Add to Chat","explainChanges":"Explain Changes","branchName":"Branch name","tagName":"Tag name","branchToDelete":"Branch to delete","comparingWith":"Comparing with {hash}","checkedOut":"Checked out","cherryPicked":"Cherry-picked","branchCreated":"Branch created","branchDeleted":"Branch deleted","tagCreated":"Tag created","commitIdCopied":"Commit ID copied","commitMessageCopied":"Commit message copied","failed":"Operation failed"}},"graph":{"title":"Graph"},"remote":{"bindTitle":"Bind Remote Repository","nameLabel":"Remote name","namePlaceholder":"origin","urlLabel":"Remote URL","urlPlaceholder":"https://github.com/user/repo.git","adding":"Adding...","addRemote":"Add Remote"},"notInitialized":{"message":"Not a Git repository","initializing":"Initializing...","initialize":"Initialize Git Repository"},"settings":{"title":"Git Settings","globalScope":"Global Settings","localScope":"Repository Settings","globalScopeDescription":"These settings apply to all Git repositories","localScopeDescription":"These settings apply only to the current repository","name":"User Name","namePlaceholder":"Enter Git user name","email":"Email","emailPlaceholder":"Enter Git email","proxy":"HTTP Proxy","proxyPlaceholder":"e.g. http://127.0.0.1:7890","saved":"Settings saved","saveFailed":"Failed to save settings","loading":"Loading..."}},"projectSettings":{"title":"Project Settings","loading":"Loading...","workspaceNotFound":"Workspace not found","info":{"title":"Info","path":"Path","channels":"Channels","issues":"Issues"},"automation":{"title":"Automation","autoProcess":"Auto Process Issues","autoProcessDescription":"Scheduler will automatically plan and execute open issues"},"notifications":{"title":"Notifications","messageNotifications":"Message Notifications","messageNotificationsDescription":"Push issue progress and final task results to external chat platforms","lark":"Feishu","wechat":"WeChat","appId":"app_id","appSecret":"app_secret","stopService":"Stop Service","startService":"Start Service","testSend":"Test Send","saveSuccess":"Notification settings saved","saveFailed":"Failed to save notification settings","startSuccess":"Notification service started","startFailed":"Failed to start notification service","stopSuccess":"Notification service stopped","stopFailed":"Failed to stop notification service","testSuccess":"Test notification sent","testFailed":"Failed to send test notification","native":"System","nativeDescription":"Push issue progress and task results via native OS notifications","nativePermissionGranted":"Granted","nativePermissionDenied":"Denied","nativePermissionDefault":"Not granted","nativePermissionUnsupported":"Unsupported","nativeRequestPermission":"Grant Permission","nativeTestSuccess":"System notification sent","nativeTestFailed":"Failed to send system notification","nativePermissionGrantedToast":"Notification permission granted","nativePermissionDeniedToast":"Notification permission denied","androidOngoingTaskNotification":"Ongoing task notification","androidOngoingTaskNotificationDescription":"Update an ongoing notification in the system notification panel when tasks change. Android only; foreground service support may be required."},"wechat":{"robot":"WeChat iLink Robot","connected":"Connected: {accountId}","scanned":"Scanned. Confirm login on your phone.","expired":"QR code expired. Refresh to get a new one.","scanQr":"Scan the QR code with WeChat to authorize the robot.","refreshLogin":"Refresh Login","getQr":"Get QR","status":"Status: {status}","loginUrl":"Login URL: {url}","connectedToast":"WeChat robot connected","pollFailed":"Failed to poll WeChat QR status","getQrFailed":"Failed to get WeChat QR code"},"botAgent":{"title":"Bot Agent","selectAgent":"No agent selected","manage":"Manage"},"events":{"title":"Notification Events","issueStarted":"Issue Started","issueCompleted":"Issue Completed","taskCompleted":"Task Completed"},"prompt":{"title":"Prompt","workspacePrompt":"Workspace Prompt","description":"Applied to every agent run in this workspace","savePrompt":"Save Prompt","saveSuccess":"Workspace prompt saved","saveFailed":"Failed to save workspace prompt"}},"composer":{"openDialog":"Open Dialog","newContent":"New Content","placeholder":"Type content, use @ to mention, / to open commands","heading":"Heading","quote":"Quote","divider":"Divider","addFile":"Add File","dropzoneHint":"Tip: drag files here, or click \\"Add File\\"","send":"Send","sending":"Sending...","uploadFailed":"Upload failed: {name}","noMatch":"No matches","selectOption":"Select an option"},"folderPicker":{"newFolder":"New Folder","folderNamePlaceholder":"Folder name","select":"Select","selectDirectory":"Select a directory to check permissions"},"commands":{"title":"Commands","addCommand":"Add Command","editCommand":"Edit Command","name":"Name","command":"Command","workingDirectory":"Working Directory","shell":"Shell","environmentVariables":"Environment Variables","autoRestart":"Auto Restart","run":"Run","stop":"Stop","save":"Save","cancel":"Cancel","delete":"Delete","noCommands":"No commands","searchPlaceholder":"Search commands...","import":"Import","importTitle":"Import Commands from package.json","importDescription":"Select a project directory to parse scripts from package.json","selectProject":"Select project directory","parsedScripts":"Parsed Scripts","noScripts":"No scripts found","addSelected":"Add Selected","customCommands":"Custom Commands","folder":"Folder"},"skills":{"title":"Skills Management","description":"Manage and import skills, bind to agents","import":"Import","importTitle":"Import Skill Files","importPlaceholder":"Drag .md files here, or click to select","importConfirm":"Confirm Import","filterAll":"All Skills","filterFavorites":"Favorites","filterByAgent":"Filter by Agent","search":"Search skills...","empty":"No skills found","manageAgents":"Manage","apply":"Apply","delete":"Delete","editTitle":"Edit Skill - {name}","editDescription":"Edit skill Markdown content","bindTitle":"Bind Agents - {name}","bindDescription":"Select agents to bind this skill to","searchAgents":"Search agents...","syncToAgents":"Sync to Agents","syncTitle":"Sync Skills to Agents","syncDescription":"The following agent skill files are outdated. Select items to update.","syncEmpty":"All agent skills are up to date","syncConfirm":"Confirm Update","syncSuccess":"Updated {count} skill files"},"mcps":{"title":"MCP Servers","description":"Manage and import MCP server configs, bind to agents","import":"Import","importTitle":"Import MCP Config","importConfirm":"Confirm Import","importInvalidJson":"Invalid JSON format","importFailed":"Import failed","filterAll":"All","filterFavorites":"Favorites","filterByAgent":"Filter by Agent","search":"Search MCP servers...","empty":"No MCP servers configured","apply":"Apply","delete":"Delete","editTitle":"Edit MCP - {name}","editDescription":"Edit MCP server config (JSON)","bindTitle":"Bind Agents - {name}","bindDescription":"Select agents to bind this MCP server to"},"commandPalette":{"title":"Command Palette","description":"Search and run commands","placeholder":"Type a command or search...","empty":"No results found.","noResults":"No search results","typeKeyword":"Type a keyword to search..."}}')},367640,(e,t,a)=>{t.exports=JSON.parse('{"common":{"save":"保存","saved":"已保存","cancel":"取消","delete":"删除","confirm":"确认","search":"搜索","loading":"加载中...","noData":"暂无数据","upload":"上传","remove":"移除","add":"添加","edit":"编辑","open":"打开","close":"关闭","back":"返回","next":"下一步","retry":"重试","error":"错误","success":"成功","manage":"管理","active":"活跃","name":"名称","description":"描述","status":"状态","actions":"操作","copy":"复制","copied":"已复制","create":"创建","saving":"保存中...","you":"你","user":"用户","refresh":"刷新","new":"新建"},"settings":{"title":"设置","description":"自定义工作空间外观","userAvatar":"用户头像","theme":"主题","themeLight":"浅色","themeDark":"深色","themeSystem":"跟随系统","language":"语言","languageZh":"中文","languageEn":"English","security":"安全","newSecretPlaceholder":"新的密钥(留空则移除)","redirecting":"正在跳转到登录页...","zoom":"页面缩放","zoomReset":"重置","showWorkspaceTabs":"显示工作空间标签栏","autoActivateWorkspace":"启动时自动打开上一次工作空间","layout":"布局","resetLayout":"恢复默认布局","speech":"语音识别","speechDescription":"配置语音识别服务商凭据","speechProvider":"服务商","speechTencent":"腾讯云","speechAppId":"App ID","speechSecretId":"Secret ID","speechSecretKey":"Secret Key","speechNoConfig":"暂无语音识别配置","speechAddConfig":"添加配置","git":"Git"},"login":{"subtitle":"输入密钥以继续","secretPlaceholder":"密钥(如未设置可留空)","verifying":"验证中...","login":"登录","loginFailed":"登录失败","networkError":"网络错误","manageServers":"管理服务器"},"workspaces":{"title":"工作空间","newWorkspace":"新建工作空间","emptyMessage":"暂无工作空间。创建一个以开始使用。"},"workspace":{"dialog":{"editTitle":"编辑工作空间","newTitle":"新建工作空间","editDescription":"更新工作空间设置。","newDescription":"创建新的工作空间并绑定到本地目录。","namePlaceholder":"工作空间名称"},"agents":"智能体","addAgent":"添加智能体","noAgents":"此工作空间暂无智能体","clone":{"createFromGit":"从 Git 创建","fromGitTooltip":"从 Git 仓库克隆","selectFolderFirst":"请先选择目标文件夹","title":"从 Git 创建","description":"输入 Git 仓库地址,克隆到选定的文件夹中。","cloneTo":"将克隆到: ","objects":"个对象","cloning":"克隆中...","clone":"克隆","cloneFailed":"克隆失败","noResponseBody":"无响应内容","phase":{"counting":"计算对象中...","compressing":"压缩中...","receiving":"接收数据中...","resolving":"解析中...","done":"完成","error":"失败"}}},"sidebar":{"nav":{"home":"首页","workspaces":"工作空间","addWorkspace":"添加工作空间","settings":"设置","general":"通用","agents":"智能体","skills":"技能管理","mcps":"MCP 服务器","models":"模型","providers":"供应商","workflows":"工作流"},"notifications":{"openAriaLabel":"打开通知","title":"通知","viewAll":"查看所有通知","centerTitle":"通知中心","empty":"暂无通知","clearAll":"清空","markAllRead":"全部已读","backToList":"返回列表"},"server":{"servers":"服务器","addServer":"添加服务器","manageServers":"管理服务器","editServer":"编辑服务器","editDescription":"更新服务器连接信息。","addDescription":"添加 API 服务器连接。","manageDescription":"添加、编辑或移除 API 服务器连接。","url":"URL","secret":"密钥","secretPlaceholder":"可选 API 密钥","secretOptionalPlaceholder":"密钥(可选)","newServer":"新服务器","switch":"切换"}},"agent":{"provider":{"anthropicMessages":"Anthropic Messages","openaiChatCompletions":"OpenAI Chat Completions","openaiResponses":"OpenAI Responses API","openaiResponsesToAnthropic":"OpenAI Responses To Anthropic Messages","openaiChatToAnthropic":"OpenAI Chat Completions To Anthropic Messages","geminiGenerateContent":"Gemini Native generateContent"},"runtime":{"openAgentSdk":"Open Agent SDK","claudeCode":"Claude Code","codex":"Codex","langchain":"LangChain"},"role":{"agent":{"name":"Agent"},"scheduler":{"name":"调度者"},"task_creator":{"name":"任务创建者"},"bot":{"name":"Bot Agent"}},"defaultName":"新 Agent","error":{"loadFailed":"加载 Agent 预设失败","saveFailed":"保存 Agent 预设失败","connectionTestFailed":"连接测试失败","noWorkspace":"请先打开工作空间再添加 Agent 预设","deleteFailed":"删除 Agent 预设失败"},"dialog":{"title":"Agent 预设","editDescription":"配置 Agent 行为、工具和模型设置","listDescription":"管理工作空间的 Agent 预设","add":"添加","addEmpty":"空白","noWorkspace":"未选择工作空间","loading":"加载 Agent 预设中..."},"list":{"noDescription":"无描述","empty":"暂无 Agent 预设"},"detail":{"uploadAvatar":"上传","removeAvatar":"移除","name":"名称","role":"角色","description":"描述","agentRuntime":"Agent 运行时","runtimePlaceholder":"选择 Agent 运行时...","runtimeSearchPlaceholder":"搜索 Agent 运行时...","workingDirectory":"工作目录","workingDirPlaceholder":"/workspace","systemPrompt":"系统提示","systemPromptPlaceholder":"输入系统提示...","mcpServers":"MCP 服务器","tools":"工具","skills":"技能","uploadSkills":"上传 Markdown 技能","model":"模型","provider":"供应商","providerPlaceholder":"选择供应商...","providerSearchPlaceholder":"搜索供应商...","modelField":"模型","selectProviderFirst":"请先选择供应商...","modelPlaceholder":"选择模型...","modelSearchPlaceholder":"搜索或输入自定义模型...","apiMessageType":"API 消息类型","apiMessageTypePlaceholder":"选择 API 消息类型...","apiMessageTypeSearchPlaceholder":"搜索 API 消息类型...","apiBase":"API 地址","apiBasePlaceholder":"https://api.example.com/v1","apiKey":"API 密钥","apiKeyPlaceholder":"sk-...","validateHelper":"保存前验证供应商凭据。","testing":"测试中...","test":"测试","temperature":"温度","maxTokens":"最大 Token 数","basic":"基本信息"},"debug":{"status":"状态:","provider":"供应商:","url":"URL:","model":"模型:","body":"请求体:"}},"models":{"capability":{"vision":"视觉","reasoning":"推理","embedding":"嵌入"},"error":{"saveFailed":"保存模型失败","deleteFailed":"删除模型失败"},"confirm":{"delete":"删除此模型?"},"dialog":{"editTitle":"编辑模型","addTitle":"添加模型","title":"模型","editDescription":"配置模型属性和能力","listDescription":"管理可用的 LLM 模型","add":"添加","loading":"加载模型中..."},"list":{"contextAbbr":"上下文","empty":"暂无模型"},"form":{"details":"详情","modelId":"模型 ID","modelIdPlaceholder":"例如 gpt-4o","displayName":"显示名称","displayNamePlaceholder":"例如 GPT-4o","provider":"供应商","context":"上下文","maxContextTokens":"最大上下文 Token","customContextPlaceholder":"128000","thinking":"思考","enableThinking":"启用思考","enableThinkingHelper":"随模型请求发送推理/思考选项。","effort":"投入度","cost":"费用","inputPerMillion":"输入 / 百万 Token","outputPerMillion":"输出 / 百万 Token","costPlaceholder":"0.00","capabilities":"能力"}},"providers":{"error":{"saveFailed":"保存供应商失败","deleteFailed":"删除供应商失败"},"confirm":{"delete":"删除此供应商?"},"dialog":{"editTitle":"编辑供应商","addTitle":"添加供应商","title":"供应商","editDescription":"配置供应商连接设置","listDescription":"管理 LLM API 供应商","add":"添加","loading":"加载供应商中..."},"list":{"noApiBase":"未配置 API 地址","modelsCount":"个模型","addModel":"添加模型","empty":"暂无供应商"},"form":{"connection":"连接","name":"名称","namePlaceholder":"例如 Anthropic","apiBase":"API 地址","apiBasePlaceholder":"https://api.anthropic.com","apiKey":"API 密钥","apiKeyPlaceholder":"sk-..."}},"chat":{"channel":{"general":"通用","issue":"议题","agent":"Agent","edit":"编辑频道","create":"创建频道","selectType":"选择类型","addMember":"添加成员","info":"频道信息","members":"成员","type":"类型:","channelId":"频道 ID","memberCount":"成员数","createdAt":"创建时间","noMembers":"暂无成员","noAgents":"未找到 Agent","delete":"删除频道","deleteConfirm":"确认删除此频道?此操作不可撤销。","namePlaceholder":"频道名称","archive":"归档","unarchive":"取消归档","archived":"已归档","clearArchived":"清空归档","clearArchivedConfirm":"确认删除 {count} 个已归档的频道?此操作不可撤销。"},"channelType":{"general":"通用","issue":"议题","agent":"Agent"},"emptyState":"选择一个频道开始对话","status":{"idle":"空闲中","waitingForUser":"等待用户确认","running":"运行中","success":"成功","error":"失败"},"viewRelatedIssue":"查看关联议题","deleteMessage":{"title":"删除消息","description":"确认删除这条消息?此操作不可撤销。"},"clearMessages":{"title":"清空频道消息","description":"确认清空 #{channel} 的所有消息?此操作不可撤销。","confirm":"清空"},"pendingQuestion":{"placeholder":"输入回答..."},"untitledTodo":"未命名待办","input":{"placeholder":"发送消息到 #{channel}... 使用 @ 提及 Agent,输入 / 打开命令","attachFiles":"附件","autoMode":"自动","unpinAgent":"取消固定","pinAgent":"固定此 Agent","mcp":"MCP","noMcp":"未配置 MCP","skill":"技能","noSkills":"未配置技能","tools":"工具","noTools":"未配置工具","todos":"待办","uploadFailed":"上传失败:{name}","voiceStart":"语音输入","voiceStop":"停止录音","manageMembers":"管理频道成员"},"messageParts":{"agentProcessing":"Agent 正在处理...","agentThinking":"Agent 正在思考","aiIntermediateOutput":"AI 中间输出","streamingResponse":"流式响应","intermediateMessage":"中间消息","chainSteps":"{count} 个链式步骤","reject":"拒绝","approve":"批准","result":"结果","aiMessage":"AI 消息","failedToLoadDetails":"加载详情失败。","loadingDetails":"加载详情中...","noDetails":"无可用详情。","raw":"原始数据","input":"输入","output":"输出"},"chainOfThought":{"defaultHeader":"思维链"},"commit":{"clipboardUnavailable":"剪贴板不可用"},"subagent":{"instructions":"指令","tools":"工具","noDescription":"无描述","outputSchema":"输出模式"},"terminal":{"title":"终端","running":"运行中...","clipboardUnavailable":"剪贴板不可用"},"context":{"totalCost":"总费用","input":"输入","output":"输出","reasoning":"推理","cache":"缓存"},"attachments":{"source":"来源","image":"图片","attachment":"附件","imageAlt":"图片","remove":"移除","noAttachments":"无附件"},"askUser":{"placeholder":"输入回答..."},"readonlyCodeBlock":{"loading":"加载代码中..."}},"issue":{"status":{"draft":"草稿","planned":"已规划","in_progress":"进行中","review_pending":"待审核","changes_requested":"需修改","approved":"已批准","completed":"已完成","archived":"已归档","error":"错误"},"list":{"title":"议题","emptyTitle":"暂无议题","emptyDescription":"创建一个议题开始协作","addIssue":"添加议题","taskCount":"{count} 个任务","archive":"归档","unarchive":"取消归档","archived":"已归档","clearArchived":"清空归档","clearArchivedConfirm":"确认删除 {count} 个已归档的议题?此操作不可撤销。"},"detail":{"selectIssue":"选择一个议题查看详情","commentPlaceholder":"写评论... 使用 @ 提及 Agent,输入 / 打开命令","openChatChannel":"打开聊天频道","memberCount":"{count} 位成员","created":"创建于","updated":"更新于","pr":"PR:","start":"开始","resumeFailed":"重试失败任务","retryPaused":"自动重试已在 {failed}/{total} 次尝试后暂停。","tasks":"任务 ({count})","editTask":"编辑任务","addTask":"添加任务","taskTitlePlaceholder":"任务标题","taskDescriptionPlaceholder":"描述(可选)","noTasks":"暂无任务","noAgent":"未分配 Agent","comments":"评论 ({count})","author":"作者","commented":"评论了","comment":"评论","tabInfo":"信息","tabMembers":"成员","infoStatus":"状态","infoIssueId":"议题 ID","infoTaskCount":"任务数","infoMemberCount":"成员数","infoCreatedAt":"创建时间","infoUpdatedAt":"更新时间","infoBranch":"分支","infoPr":"PR","infoDescription":"描述","addMember":"添加成员","deleteIssue":"删除议题"},"message":{"task":"任务 {taskId}","openMessage":"打开消息","expandMore":"展开更多","collapse":"收起"},"edit":{"title":"编辑议题","description":"修改议题信息、状态和成员","titlePlaceholder":"标题","descriptionPlaceholder":"描述","statusLabel":"状态","membersLabel":"成员","searchAgent":"搜索 Agent...","noAgents":"无可用 Agent"},"create":{"title":"创建议题","description":"创建一个新的议题并指定成员","titlePlaceholder":"标题","descriptionPlaceholder":"描述(可选)","membersLabel":"成员","searchAgent":"搜索 Agent...","noAgents":"无可用 Agent","submit":"创建"}},"task":{"status":{"pending":"待处理","running":"运行中","reviewing":"审核中","waiting_review":"等待审核","retrying":"重试中","done":"完成","failed":"失败","cancelled":"已取消"}},"home":{"table":{"agent":"Agent","model":"模型","modelUnknown":"未知","summary":"摘要","cost":"费用","total":"总计:","cacheHit":"缓存命中:","tokensIn":"输入","tokensOut":"输出","status":"状态","duration":"耗时","time":"时间","emptyMessage":"Agent 运行完成后,使用记录将显示在此处。","noResults":"暂无结果。"},"period":{"today":"今日","7d":"7 天","30d":"30 天","1y":"1 年","custom":"自定义"},"title":"Agent 用量","metric":{"agentRuns":"Agent 运行次数","agentRunsHelper":"已完成运行","tokensUsed":"Token 用量","tokensIn":"输入","totalCost":"总费用","totalCostHelper":"预估花费","avgDuration":"平均耗时","avgDurationHelper":"每次运行"},"chart":{"dailyTokenUsage":"每日 Token 用量","input":"输入","output":"输出","costByModel":"按模型费用","noUsageRecords":"暂无已完成的用量记录。","tokenDistribution":"Token 分布","costDistribution":"费用分布","tokens":"tokens","totalCost":"总费用","noCostData":"暂无费用数据。","noTokenData":"暂无 Token 数据"},"pagination":{"showing":"显示","to":"至","of":"共","entries":"条","prevAriaLabel":"上一页","previous":"上一页","nextAriaLabel":"下一页","next":"下一页"},"time":{"justNow":"刚刚","minutesAgo":"{n} 分钟前","hoursAgo":"{n} 小时前","daysAgo":"{n} 天前"},"subscription":{"planTitle":"订阅计划","addPlatform":"订阅计划","title":"管理订阅平台","empty":"暂无订阅平台,点击下方按钮添加","add":"添加平台","cancel":"取消","save":"保存","platform":"平台","label":"名称","labelPlaceholder":"给这个配置取个名字(可选)","loading":"加载中...","resetAt":"重置于","headers":"请求头 (Headers)","addHeader":"添加","noHeaders":"暂无请求头","cookiePlaceholder":"粘贴浏览器 Cookie","editTitle":"编辑订阅平台"}},"editor":{"explorer":"资源管理器","noFiles":"未找到文件","revealInFinder":"在 Finder 中显示","loadingEditor":"编辑器加载中...","openFileToEdit":"打开文件开始编辑","search":"搜索","searchPlaceholder":"搜索文件内容...","searchFiles":"搜索文件名","searchCode":"搜索代码","caseSensitive":"区分大小写","useRegex":"正则表达式","searchResults":"{count} 个结果,{files} 个文件","tooManyResults":"结果过多,请缩小搜索范围","noResults":"未找到结果","searching":"搜索中...","menuFile":"文件","menuEdit":"编辑","menuSave":"保存","menuUndo":"撤销","menuRedo":"重做","menuCut":"剪切","menuCopy":"复制","menuPaste":"粘贴","menuFind":"查找","menuReplace":"替换","menuView":"视图","menuFullscreen":"全屏","exitFullscreen":"退出全屏","enableEdit":"启用编辑","disableEdit":"设为只读","revealInTree":"在文件树中显示","copyFilePath":"复制文件路径","copyRelativePath":"复制相对路径","copied":"已复制","saveChangesTitle":"保存更改","saveChangesDesc":"文件 \\"{name}\\" 已修改,是否保存?","discardChanges":"不保存","cancel":"取消","save":"保存","importFile":"导入文件","importFileDesc":"选择导入方式将文件添加到当前目录","importOnline":"在线文件","importInternal":"内部文件","importUpload":"本地上传","importSuccess":"导入成功","importFailed":"导入失败","copyPath":"复制路径","rename":"重命名","move":"移动","copyFile":"复制","renameTitle":"重命名","renamePlaceholder":"输入新名称","moveTitle":"移动到","movePlaceholder":"输入目标路径","copyTitle":"复制到","copyPlaceholder":"输入目标路径","newFile":"新建文件","newFolder":"新建文件夹","newFileName":"输入文件名","newFolderName":"输入文件夹名","fileTooLargeTitle":"文件过大","fileTooLargeDesc":"文件 \\"{name}\\" 大小为 {size},可能导致编辑器卡顿。是否继续打开?","openAnyway":"仍然打开","deleteFileTitle":"删除文件","deleteFileDesc":"确定要删除文件 \\"{name}\\" 吗?此操作不可撤销。","deleteFolderTitle":"删除文件夹","deleteFolderDesc":"确定要删除文件夹 \\"{name}\\" 及其所有内容吗?此操作不可撤销。","allFiles":"所有文件","recentlyAdded":"最近添加","recentlyOpened":"最近打开"},"terminal":{"newTerminal":"新建终端","noSession":"无终端会话","selectWorkingDirectory":"选择工作目录","selectWorkingDirectoryDescription":"此工作空间绑定了多个目录。请选择用于此终端的目录。","virtualKeyboard":"键盘","sendCtrlC":"退出","clearScreen":"清屏","pasteCommand":"粘贴命令","pasteCommandDescription":"编辑命令后点击确认,将逐行发送到终端","pasteCommandPlaceholder":"每行一条命令...","cancel":"取消","confirm":"确认"},"git":{"changes":{"title":"更改","staged":"已暂存","unstaged":"未暂存","commitMessagePlaceholder":"提交信息 (⌘+Enter)","commit":"提交","committing":"提交中...","syncChanges":"同步更改","syncing":"同步中...","discardAll":"丢弃所有更改","discard":"丢弃","confirmDiscardAll":"确定要丢弃所有未提交的更改吗?此操作不可撤销。","confirmDiscardFile":"确定要丢弃 {file} 的更改吗?此操作不可撤销。","refresh":"刷新","editGitignore":"编辑 .gitignore","noChanges":"暂无更改","noBranches":"暂无分支","selectFileDiff":"选择文件查看差异","noChangesToShow":"没有可显示的更改","ignoreThisFile":"忽略此文件","ignoreFilePath":"忽略 {path}","syncedSuccessfully":"同步成功","syncFailed":"同步失败","failedCommitMessage":"生成提交信息失败","committedSuccessfully":"提交成功","commitFailed":"提交失败","discardedSuccessfully":"已丢弃更改","discardFailed":"丢弃失败"},"commits":{"title":"提交","titleWithCount":"提交 ({count})","pushNCommits":"推送 {count} 个提交","pullNCommits":"拉取 {count} 个提交","noCommits":"暂无提交","settingsTitle":"Git 设置","remoteTrackingBranch":"远程跟踪分支","pushedSuccessfully":"推送成功","pushFailed":"推送失败","pulledSuccessfully":"拉取成功","pullFailed":"拉取失败","remoteAdded":"远程仓库已添加","contextMenu":{"openChanges":"打开更改","openOnGitHub":"在 GitHub 上打开","checkout":"检出","checkoutDetached":"检出 (分离 HEAD)","createBranch":"创建分支...","deleteBranch":"删除分支","createTag":"创建标签...","cherryPick":"Cherry Pick","compareWithRemote":"与远程比较","compareWithMergeBase":"与合并基准比较","compareWith":"与...比较","copyCommitId":"复制 Commit ID","copyCommitMessage":"复制提交信息","addToChat":"添加到聊天","explainChanges":"解释更改","branchName":"分支名称","tagName":"标签名称","branchToDelete":"要删除的分支","comparingWith":"正在与 {hash} 比较","checkedOut":"已检出","cherryPicked":"已 Cherry Pick","branchCreated":"分支已创建","branchDeleted":"分支已删除","tagCreated":"标签已创建","commitIdCopied":"Commit ID 已复制","commitMessageCopied":"提交信息已复制","failed":"操作失败"}},"graph":{"title":"图谱"},"remote":{"bindTitle":"绑定远程仓库","nameLabel":"远程名称","namePlaceholder":"origin","urlLabel":"远程 URL","urlPlaceholder":"https://github.com/user/repo.git","adding":"添加中...","addRemote":"添加远程仓库"},"notInitialized":{"message":"不是 Git 仓库","initializing":"初始化中...","initialize":"初始化 Git 仓库"},"settings":{"title":"Git 设置","globalScope":"全局设置","localScope":"当前仓库设置","globalScopeDescription":"这些设置将应用到所有 Git 仓库","localScopeDescription":"这些设置仅应用到当前仓库","name":"用户名","namePlaceholder":"输入 Git 用户名","email":"邮箱","emailPlaceholder":"输入 Git 邮箱","proxy":"HTTP 代理","proxyPlaceholder":"例如 http://127.0.0.1:7890","saved":"设置已保存","saveFailed":"保存设置失败","loading":"加载中..."}},"projectSettings":{"title":"项目设置","loading":"加载中...","workspaceNotFound":"未找到工作空间","info":{"title":"信息","path":"路径","channels":"频道","issues":"议题"},"automation":{"title":"自动化","autoProcess":"自动处理议题","autoProcessDescription":"调度者将自动规划和执行开放议题"},"notifications":{"title":"通知","messageNotifications":"消息通知","messageNotificationsDescription":"将议题进度和最终任务结果推送到外部聊天平台","lark":"飞书","wechat":"微信","appId":"app_id","appSecret":"app_secret","stopService":"停止服务","startService":"启动服务","testSend":"测试发送","saveSuccess":"通知设置已保存","saveFailed":"保存通知设置失败","startSuccess":"通知服务已启动","startFailed":"启动通知服务失败","stopSuccess":"通知服务已停止","stopFailed":"停止通知服务失败","testSuccess":"测试通知已发送","testFailed":"发送测试通知失败","native":"系统通知","nativeDescription":"通过操作系统原生通知在本地推送议题进度和任务结果","nativePermissionGranted":"已授权","nativePermissionDenied":"已拒绝","nativePermissionDefault":"未授权","nativePermissionUnsupported":"不支持","nativeRequestPermission":"授权通知","nativeTestSuccess":"系统通知已发送","nativeTestFailed":"发送系统通知失败","nativePermissionGrantedToast":"通知权限已授权","nativePermissionDeniedToast":"通知权限被拒绝","androidOngoingTaskNotification":"常驻任务通知","androidOngoingTaskNotificationDescription":"任务变化时更新系统通知面板中的常驻通知。仅 Android 生效,可能需要前台服务支持。"},"wechat":{"robot":"微信 iLink 机器人","connected":"已连接:{accountId}","scanned":"已扫码,请在手机上确认登录。","expired":"二维码已过期,请刷新获取新的。","scanQr":"使用微信扫描二维码以授权机器人。","refreshLogin":"刷新登录","getQr":"获取二维码","status":"状态:{status}","loginUrl":"登录 URL:{url}","connectedToast":"微信机器人已连接","pollFailed":"轮询微信二维码状态失败","getQrFailed":"获取微信二维码失败"},"botAgent":{"title":"Bot Agent","selectAgent":"未选择 Agent","manage":"管理"},"events":{"title":"通知事件","issueStarted":"议题开始","issueCompleted":"议题完成","taskCompleted":"任务完成"},"prompt":{"title":"Prompt","workspacePrompt":"工作空间 Prompt","description":"应用于此工作空间中的每次 Agent 运行","savePrompt":"保存 Prompt","saveSuccess":"工作空间 Prompt 已保存","saveFailed":"保存工作空间 Prompt 失败"}},"composer":{"openDialog":"打开对话框","newContent":"新建内容","placeholder":"输入内容,支持 @ 艾特人,输入 / 打开命令面板","heading":"标题","quote":"引用","divider":"分割线","addFile":"添加文件","dropzoneHint":"提示:拖拽文件到这里,或点击「添加文件」","send":"发送","sending":"发送中...","uploadFailed":"上传失败: {name}","noMatch":"无匹配结果","selectOption":"选择一个选项"},"folderPicker":{"newFolder":"新建文件夹","folderNamePlaceholder":"文件夹名称","select":"选择","selectDirectory":"选择一个目录以检查权限"},"commands":{"title":"命令","addCommand":"添加命令","editCommand":"编辑命令","name":"名称","command":"命令","workingDirectory":"工作目录","shell":"Shell","environmentVariables":"环境变量","autoRestart":"自动重启","run":"运行","stop":"停止","save":"保存","cancel":"取消","delete":"删除","noCommands":"暂无命令","searchPlaceholder":"搜索命令...","import":"导入","importTitle":"从 package.json 导入命令","importDescription":"选择项目目录,解析 package.json 中的 scripts 字段","selectProject":"选择项目目录","parsedScripts":"解析的脚本","noScripts":"未找到 scripts","addSelected":"添加选中命令","customCommands":"自定义命令","folder":"分组"},"skills":{"title":"技能管理","description":"管理和导入技能文件,绑定到智能体","import":"导入","importTitle":"导入技能文件","importPlaceholder":"拖拽 .md 文件到此处,或点击选择","importConfirm":"确认导入","filterAll":"全部技能","filterFavorites":"收藏","filterByAgent":"按智能体过滤","search":"搜索技能...","empty":"暂无技能","manageAgents":"管理","apply":"应用","delete":"删除","editTitle":"编辑技能 - {name}","editDescription":"编辑技能 Markdown 内容","bindTitle":"绑定智能体 - {name}","bindDescription":"选择要绑定此技能的智能体","searchAgents":"搜索智能体...","syncToAgents":"更新到智能体","syncTitle":"同步技能到智能体","syncDescription":"以下智能体的技能文件已过时,勾选需要更新的项目","syncEmpty":"所有智能体的技能已是最新","syncConfirm":"确认更新","syncSuccess":"已更新 {count} 个技能文件"},"mcps":{"title":"MCP 服务器管理","description":"管理和导入 MCP 服务器配置,绑定到智能体","import":"导入","importTitle":"导入 MCP 配置","importConfirm":"确认导入","importInvalidJson":"JSON 格式无效","importFailed":"导入失败","filterAll":"全部","filterFavorites":"收藏","filterByAgent":"按智能体过滤","search":"搜索 MCP 服务器...","empty":"暂无 MCP 服务器配置","apply":"应用","delete":"删除","editTitle":"编辑 MCP - {name}","editDescription":"编辑 MCP 服务器配置(JSON)","bindTitle":"绑定智能体 - {name}","bindDescription":"选择要绑定此 MCP 服务器的智能体"},"commandPalette":{"title":"命令面板","description":"搜索并执行命令","placeholder":"输入命令或搜索...","empty":"未找到匹配结果","noResults":"无搜索结果","typeKeyword":"输入关键词搜索..."}}')},556106,e=>{"use strict";var t=e.i(344180),a=e.i(764556),i=e.i(799543),o=e.i(972725);function n({locale:e,...a}){if(!e)throw Error(void 0);return(0,t.jsx)(o.IntlProvider,{locale:e,...a})}var s=e.i(171167),r=e.i(367640);let l="agent-spaces-locale",c={en:s.default,zh:r.default},d=(0,a.createContext)({locale:"zh",setLocale:()=>{}});function m(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}function p(){let e=localStorage.getItem(l);return"en"===e||"zh"===e?e:"zh"}function u(){return"zh"}e.s(["LocaleProvider",0,function({children:e}){(0,i.useServerInsertedHTML)(()=>(0,t.jsx)("script",{dangerouslySetInnerHTML:{__html:`(function(){try{var l=localStorage.getItem('${l}');document.documentElement.lang=(l==='en')?'en':'zh-CN'}catch(e){}})()`}},"locale-init"));let o=(0,a.useSyncExternalStore)(m,p,u),s=(0,a.useCallback)(e=>{localStorage.setItem(l,e),document.documentElement.lang="zh"===e?"zh-CN":"en",window.dispatchEvent(new StorageEvent("storage",{key:l}))},[]);return(0,t.jsx)(d.Provider,{value:{locale:o,setLocale:s},children:(0,t.jsx)(n,{locale:o,messages:c[o],children:e})})},"useLocale",0,function(){return(0,a.useContext)(d)}],556106)},799773,e=>{"use strict";let t=(0,e.i(433721).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],799773)},324216,e=>{"use strict";var t=e.i(344180),a=e.i(465458),i=e.i(799773),o=e.i(951841),n=e.i(523592);let s={sm:"size-8 [&>svg]:size-3",md:"size-10 [&>svg]:size-4",lg:"size-12 [&>svg]:size-5"};e.s(["UserIcon",0,function({size:e="lg",className:r}){let l=(0,o.useUserAvatar)(),c=(0,n.resolveServerAssetUrl)(l);return(0,t.jsx)("div",{className:(0,a.cn)("rounded-full overflow-hidden border border-input flex items-center justify-center shrink-0",s[e],c?"":"bg-muted",r),children:c?(0,t.jsx)("img",{src:c,alt:"User",className:"size-full object-cover"}):(0,t.jsx)(i.User,{className:"text-muted-foreground"})})}])},240455,858583,955886,e=>{"use strict";var t=e.i(433721);let a=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,a],240455);let i=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,i],858583);let o=(0,t.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);e.s(["Languages",0,o],955886)},348085,758960,797161,e=>{"use strict";var t=e.i(433721);let a=(0,t.default)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);e.s(["Palette",0,a],348085);let i=(0,t.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",0,i],758960);let o=(0,t.default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);e.s(["Mic",0,o],797161)},238300,e=>{"use strict";var t=e.i(344180),a=e.i(764556),i=e.i(799543),o=e.i(244073),n=e.i(233297),s=e.i(950396),r=e.i(556106),l=e.i(209988),c=e.i(260218),d=e.i(681622),m=e.i(465458),p=e.i(240455),u=e.i(858583),g=e.i(92457),h=e.i(955886),v=e.i(357301),y=e.i(799773),f=e.i(348085),C=e.i(882469),k=e.i(758960),S=e.i(797161),b=e.i(327962),A=e.i(226624),x=e.i(817854),P=e.i(607452),T=e.i(324216),w=e.i(437122),N=e.i(964970),D=e.i(515104);let F=[{key:"appearance",icon:f.Palette},{key:"language",icon:C.Globe},{key:"account",icon:y.User},{key:"security",icon:k.Shield},{key:"git",icon:b.GitBranch},{key:"speech",icon:S.Mic}];function I(){return(0,t.jsx)("div",{className:"space-y-5",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2.5 block",children:"Git"}),(0,t.jsx)(N.GitSettingsForm,{scope:"global"})]})})}function M(){let e=(0,o.useTranslations)("settings"),i=(0,o.useTranslations)("common"),[n,s]=(0,a.useState)([]),[r,l]=(0,a.useState)(!0),d=async()=>{try{let e=await fetch("/api/speech-recognition",{headers:(0,w.authHeaders)()});e.ok&&s(await e.json())}catch{}l(!1)};(0,a.useEffect)(()=>{d()},[]);let m=async(e,t)=>{await fetch(`/api/speech-recognition/${e}`,{method:"PUT",headers:{"Content-Type":"application/json",...(0,w.authHeaders)()},body:JSON.stringify({credentials:t})})},p=async(e,t)=>{await fetch(`/api/speech-recognition/${e}`,{method:"PUT",headers:{"Content-Type":"application/json",...(0,w.authHeaders)()},body:JSON.stringify({enabled:t})}),s(a=>a.map(a=>a.id===e?{...a,enabled:t}:a))},u=async e=>{let t=await fetch("/api/speech-recognition",{method:"POST",headers:{"Content-Type":"application/json",...(0,w.authHeaders)()},body:JSON.stringify({provider:e,credentials:{}})});if(t.ok){let e=await t.json();s(t=>[...t,e])}};if(r)return(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:i("loading")});let g=n.find(e=>"tencent"===e.provider);return(0,t.jsx)("div",{className:"space-y-5",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2.5 block",children:e("speechDescription")}),(0,t.jsxs)("div",{className:"space-y-3 p-3 border rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e("speechTencent")}),g&&(0,t.jsx)(A.Switch,{checked:!1!==g.enabled,onCheckedChange:e=>p(g.id,e)})]}),g?(0,t.jsx)(R,{configId:g.id,credentials:g.credentials,onSave:m}):(0,t.jsx)(c.Button,{variant:"outline",size:"sm",className:"text-xs",onClick:()=>u("tencent"),children:e("speechAddConfig")})]})]})})}function R({configId:e,credentials:i,onSave:n}){let s=(0,o.useTranslations)("settings"),r=(0,o.useTranslations)("common"),[l,m]=(0,a.useState)(i.appId??""),[p,u]=(0,a.useState)(i.secretId??""),[g,h]=(0,a.useState)(i.secretKey??""),[v,y]=(0,a.useState)(!1),f=async()=>{await n(e,{appId:l,secretId:p,secretKey:g}),y(!0),setTimeout(()=>y(!1),2e3)};return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(x.Label,{className:"text-xs text-muted-foreground",children:s("speechAppId")}),(0,t.jsx)(d.Input,{className:"h-7 text-xs",value:l,onChange:e=>m(e.target.value),placeholder:"125922****"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(x.Label,{className:"text-xs text-muted-foreground",children:s("speechSecretId")}),(0,t.jsx)(d.Input,{className:"h-7 text-xs",value:p,onChange:e=>u(e.target.value),placeholder:"SecretId"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(x.Label,{className:"text-xs text-muted-foreground",children:s("speechSecretKey")}),(0,t.jsx)(d.Input,{type:"password",className:"h-7 text-xs",value:g,onChange:e=>h(e.target.value),placeholder:"SecretKey"})]}),(0,t.jsx)(c.Button,{size:"sm",className:"text-xs",onClick:f,children:r(v?"saved":"save")})]})}e.s(["SettingsDialog",0,function({open:e,onOpenChange:y,standalone:f}){let{theme:C,setTheme:k}=(0,s.useTheme)(),S=(0,o.useTranslations)("settings"),b=(0,o.useTranslations)("common"),{locale:x,setLocale:N}=(0,r.useLocale)(),R=(0,i.useRouter)(),[j,L]=(0,a.useState)("appearance"),[E,U]=(0,a.useState)(()=>localStorage.getItem("userAvatarUrl")),[O,B]=(0,a.useState)(""),[G,W]=(0,a.useState)(!1),[z,H]=(0,a.useState)(()=>{let e=localStorage.getItem("pageZoom"),t=e?Number(e):100;return t>=50&&t<=200?t:100}),[K,_]=(0,a.useState)(!1),[J,Q]=(0,a.useState)(()=>{let e=localStorage.getItem("showWorkspaceTabs");return null===e||"false"!==e}),[V,q]=(0,a.useState)(()=>"true"===localStorage.getItem("autoActivateWorkspace")),Z=(0,a.useCallback)(e=>{localStorage.setItem("pageZoom",String(e)),H(e),window.dispatchEvent(new CustomEvent("zoom-change",{detail:e}))},[]),$=[{value:"light",label:S("themeLight"),icon:p.Sun},{value:"dark",label:S("themeDark"),icon:u.Moon},{value:"system",label:S("themeSystem"),icon:g.Monitor}];(0,a.useEffect)(()=>{let e=requestAnimationFrame(()=>{U(localStorage.getItem("userAvatarUrl")),_((0,D.isNativeEnvironment)())});return()=>cancelAnimationFrame(e)},[e]);let X=async e=>{let t=e.target.files?.[0];if(!t)return;let a=new FileReader;a.onload=async()=>{try{let e=await fetch("/api/upload/avatar",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUrl:a.result,filename:"user.jpg"})}),t=await e.json();t.url&&(localStorage.setItem("userAvatarUrl",t.url),U(t.url),fetch("/api/user/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({avatarUrl:t.url})}).catch(()=>{}))}catch{}},a.readAsDataURL(t),e.target.value=""},Y=()=>{localStorage.removeItem("userAvatarUrl"),U(null),fetch("/api/user/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({avatarUrl:null})}).catch(()=>{})},ee=async()=>{let e=(0,w.getToken)();try{(await fetch("/api/auth/change-secret",{method:"POST",headers:{"Content-Type":"application/json",...null!==e?{Authorization:`Bearer ${e}`}:{}},body:JSON.stringify({newSecret:O,currentToken:e})})).ok&&(W(!0),(0,w.removeToken)(),setTimeout(()=>(0,n.tauriNavigate)(R,"/login"),800))}catch{}},et={appearance:S("theme"),language:S("language"),account:S("userAvatar"),security:S("security"),git:S("git"),speech:S("speech")},ea=(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col sm:flex-row",children:[(0,t.jsx)("div",{className:"flex sm:flex-col sm:w-36 sm:border-r sm:py-3 sm:px-2 shrink-0 overflow-x-auto border-b sm:border-b-0 gap-1 px-2 py-2",children:F.map(({key:e,icon:a})=>(0,t.jsxs)("button",{type:"button",onClick:()=>L(e),className:(0,m.cn)("flex items-center gap-2 rounded-md px-2.5 py-2 text-xs font-medium transition-colors whitespace-nowrap",j===e?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[(0,t.jsx)(a,{className:"size-4"}),et[e]]},e))}),(0,t.jsx)("div",{className:"flex-1 p-5 min-w-0 overflow-y-auto",children:(()=>{switch(j){case"appearance":return(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2.5 block",children:S("theme")}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-2",children:$.map(({value:e,label:a,icon:i})=>(0,t.jsxs)("button",{type:"button",onClick:()=>k(e),className:(0,m.cn)("flex flex-col items-center gap-1.5 rounded-lg border p-3 text-sm transition-colors hover:bg-muted/50",C===e&&"border-primary bg-primary/5 text-primary"),children:[(0,t.jsx)(i,{className:"size-5"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:a})]},e))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:S("showWorkspaceTabs")}),(0,t.jsx)(A.Switch,{size:"sm",checked:J,onCheckedChange:e=>{Q(e),localStorage.setItem("showWorkspaceTabs",String(e)),window.dispatchEvent(new CustomEvent("workspace-tabs-visibility",{detail:e}))}})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:S("autoActivateWorkspace")}),(0,t.jsx)(A.Switch,{size:"sm",checked:V,onCheckedChange:e=>{q(e),localStorage.setItem("autoActivateWorkspace",String(e))}})]}),K&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2.5 block",children:S("zoom")}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(P.Slider,{min:50,max:200,step:10,value:z,onValueChange:e=>Z(Array.isArray(e)?e[0]:e),className:"flex-1"}),(0,t.jsxs)("span",{className:"text-xs font-mono tabular-nums w-10 text-right",children:[z,"%"]}),(0,t.jsx)("button",{type:"button",onClick:()=>Z(100),className:"text-muted-foreground hover:text-foreground transition-colors",title:S("zoomReset"),children:(0,t.jsx)(v.RotateCcw,{className:"size-3.5"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2.5 block",children:S("layout")}),(0,t.jsxs)(c.Button,{variant:"outline",size:"sm",className:"gap-1.5 text-xs",onClick:()=>window.dispatchEvent(new CustomEvent("reset-layout")),children:[(0,t.jsx)(v.RotateCcw,{className:"size-3.5"}),S("resetLayout")]})]})]});case"language":return(0,t.jsx)("div",{className:"space-y-5",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2.5 block",children:S("language")}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{value:"zh",label:S("languageZh")},{value:"en",label:S("languageEn")}].map(({value:e,label:a})=>(0,t.jsxs)("button",{type:"button",onClick:()=>N(e),className:(0,m.cn)("flex items-center justify-center gap-1.5 rounded-lg border p-3 text-sm transition-colors hover:bg-muted/50",x===e&&"border-primary bg-primary/5 text-primary"),children:[(0,t.jsx)(h.Languages,{className:"size-4"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:a})]},e))})]})});case"account":return(0,t.jsx)("div",{className:"space-y-5",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2.5 block",children:S("userAvatar")}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(T.UserIcon,{size:"lg"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("label",{className:"text-xs text-primary cursor-pointer hover:underline",children:[b("upload"),(0,t.jsx)("input",{type:"file",accept:"image/*",className:"hidden",onChange:X})]}),E&&(0,t.jsx)("button",{type:"button",className:"text-xs text-destructive hover:underline",onClick:Y,children:b("remove")})]})]})]})});case"security":return(0,t.jsx)("div",{className:"space-y-5",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2.5 block",children:S("security")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Input,{type:"password",className:"h-8 text-sm flex-1",placeholder:S("newSecretPlaceholder"),value:O,onChange:e=>{B(e.target.value),W(!1)},onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)(c.Button,{size:"sm",onClick:ee,disabled:G,children:G?b("saved"):b("save")})]}),G&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:S("redirecting")})]})});case"git":return(0,t.jsx)(I,{});case"speech":return(0,t.jsx)(M,{})}})()})]});return f?ea:(0,t.jsx)(l.Dialog,{open:e,onOpenChange:y,children:(0,t.jsxs)(l.DialogContent,{className:"sm:max-w-lg max-h-[85vh] p-0 gap-0 flex flex-col overflow-hidden",children:[(0,t.jsxs)(l.DialogHeader,{className:"px-5 py-4 border-b shrink-0",children:[(0,t.jsx)(l.DialogTitle,{className:"text-base",children:S("title")}),(0,t.jsx)(l.DialogDescription,{className:"text-xs",children:S("description")})]}),(0,t.jsx)("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:ea})]})})}])}]);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,177053,e=>{"use strict";var t=e.i(344180),n=e.i(523592);{let e=window.fetch,t="__api_patched__";window[t]||(window[t]=!0,window.fetch=function(t,r){if("string"==typeof t&&t.startsWith("/api/")){let e=(0,n.getActiveServerUrl)();e&&(t=`${e}${t}`)}return e.call(window,t,r)})}var r=e.i(764556),a=e.i(799543),i=e.i(437122),o=e.i(233297),s=e.i(286117);e.s(["AuthGuard",0,function({children:e}){let n=(0,a.usePathname)(),l=(0,a.useRouter)(),[c,d]=(0,r.useState)(!1),u=(0,s.isLoginPath)(n);return((0,r.useEffect)(()=>{if(u)return void d(!0);if(!(0,i.isAuthenticated)())return void(0,o.tauriNavigate)(l,"/login",!0);let e=(0,i.getToken)();fetch("/api/auth/check",{headers:null!==e?{Authorization:`Bearer ${e}`}:{}}).then(e=>401===e.status||403===e.status?((0,i.removeToken)(),(0,o.tauriNavigate)(l,"/login",!0),null):e.ok?e.json():{authenticated:!0}).then(e=>{null!==e&&(e.authenticated?d(!0):((0,i.removeToken)(),(0,o.tauriNavigate)(l,"/login",!0)))}).catch(()=>d(!0))},[u,l]),u||c)?(0,t.jsx)(t.Fragment,{children:e}):null}],177053)},640376,e=>{"use strict";let t=(0,e.i(816709).create)((e,t)=>({open:!1,commands:[],setOpen:t=>e({open:t}),toggle:()=>e(e=>({open:!e.open})),register:n=>(e(e=>e.commands.some(e=>e.id===n.id)?e:{commands:[...e.commands,n]}),()=>t().unregister(n.id)),registerMany:t=>{let n=new Set(t.map(e=>e.id));return e(e=>({commands:[...e.commands.filter(e=>!n.has(e.id)),...t]})),()=>e(e=>({commands:e.commands.filter(e=>!n.has(e.id))}))},unregister:t=>e(e=>({commands:e.commands.filter(e=>e.id!==t)}))}));e.s(["useCommandPalette",0,t])},478189,(e,t,n)=>{"use strict";t.exports="/__open-stack-frame-in-editor"},994876,e=>{"use strict";var t=e.i(344180),n=e.i(799543),r=e.i(764556),a=e.i(370383),i=e.i(928542),o=e.i(294237),s=e.i(564822),l=e.i(465458),c=e.i(260218),d=e.i(681622);e.i(362962);var u=e.i(14452);e.i(613087);var f=e.i(638322),m=e.i(433721);let p=(0,m.default)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),h="sidebar_state",g=r.createContext(null);function v(){let e=r.useContext(g);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}function x({defaultOpen:e=!0,open:n,onOpenChange:a,className:i,style:o,children:c,...d}){let u=(0,s.useIsMobile)(),[f,m]=r.useState(!1),[p,v]=r.useState(e),b=n??p;r.useEffect(()=>{if(void 0!==n)return;let e=document.cookie.match(RegExp(`(?:^|; )${h}=([^;]*)`));e&&v("true"===e[1])},[]);let w=r.useCallback(e=>{let t="function"==typeof e?e(b):e;a?a(t):v(t),document.cookie=`${h}=${t}; path=/; max-age=604800`},[a,b]),y=r.useCallback(()=>u?m(e=>!e):w(e=>!e),[u,w,m]);r.useEffect(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[y]);let j=b||u&&f?"expanded":"collapsed",k=r.useMemo(()=>({state:j,open:b,setOpen:w,isMobile:u,openMobile:f,setOpenMobile:m,toggleSidebar:y}),[j,b,w,u,f,m,y]);return(0,t.jsx)(g.Provider,{value:k,children:(0,t.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...o},className:(0,l.cn)("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i),...d,children:c})})}function b({side:e="left",variant:n="sidebar",collapsible:r="offcanvas",className:a,children:i,dir:o,...s}){let{isMobile:c,state:d,openMobile:f,setOpenMobile:m}=v();return"none"===r?(0,t.jsx)("div",{"data-slot":"sidebar",className:(0,l.cn)("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...s,children:i}):c?(0,t.jsx)(u.Sheet,{open:f,onOpenChange:m,...s,children:(0,t.jsxs)(u.SheetContent,{dir:o,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:e,children:[(0,t.jsxs)(u.SheetHeader,{className:"sr-only",children:[(0,t.jsx)(u.SheetTitle,{children:"Sidebar"}),(0,t.jsx)(u.SheetDescription,{children:"Displays the mobile sidebar."})]}),(0,t.jsx)("div",{className:"flex h-full w-full flex-col",children:i})]})}):(0,t.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":"collapsed"===d?r:"","data-variant":n,"data-side":e,"data-slot":"sidebar",children:[(0,t.jsx)("div",{"data-slot":"sidebar-gap",className:(0,l.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===n||"inset"===n?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,t.jsx)("div",{"data-slot":"sidebar-container","data-side":e,className:(0,l.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex","floating"===n||"inset"===n?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...s,children:(0,t.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col overflow-hidden group-data-[variant=floating]:rounded-xl group-data-[variant=floating]:bg-transparent",children:i})})]})}function w({className:e,onClick:n,...r}){let{toggleSidebar:a}=v();return(0,t.jsxs)(c.Button,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:(0,l.cn)(e),onClick:e=>{n?.(e),a()},...r,children:[(0,t.jsx)(p,{}),(0,t.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function y({className:e,...n}){return(0,t.jsx)("main",{"data-slot":"sidebar-inset",className:(0,l.cn)("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...n})}function j({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,l.cn)("flex flex-col gap-2 p-2 shrink-0",e),...n})}function k({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:(0,l.cn)("flex flex-col gap-2 p-2 shrink-0",e),...n})}function N({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,l.cn)("flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n})}function E({className:e,...n}){return(0,t.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,l.cn)("flex w-full min-w-0 flex-col gap-0",e),...n})}function S({className:e,...n}){return(0,t.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,l.cn)("group/menu-item relative",e),...n})}let C=(0,o.cva)("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function D({render:e,isActive:n=!1,variant:r="default",size:o="default",tooltip:s,className:c,...d}){let{isMobile:u,state:m}=v(),p=(0,i.useRender)({defaultTagName:"button",props:(0,a.mergeProps)({className:(0,l.cn)(C({variant:r,size:o}),c)},d),render:s?(0,t.jsx)(f.TooltipTrigger,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:o,active:n}});return s?("string"==typeof s&&(s={children:s}),(0,t.jsxs)(f.Tooltip,{children:[p,(0,t.jsx)(f.TooltipContent,{side:"right",align:"center",hidden:"collapsed"!==m||u,...s})]})):p}function M({className:e,...n}){return(0,t.jsx)("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:(0,l.cn)("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...n})}function I({render:e,size:t="md",isActive:n=!1,className:r,...o}){return(0,i.useRender)({defaultTagName:"a",props:(0,a.mergeProps)({className:(0,l.cn)("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",r)},o),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:t,active:n}})}var R=e.i(244073),L=e.i(233297),A=e.i(341807),P=e.i(411649),T=e.i(451534);let _=(0,m.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var O=e.i(325443),z=e.i(990336),F=e.i(100559),W=e.i(962562),$=e.i(137340),B=e.i(361421),B=B,H=e.i(327962),U=e.i(415360),K=e.i(191202);let V=(0,m.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);var X=e.i(227634),q=e.i(592039),Y=e.i(324216),G=e.i(588591),Z=e.i(86477),J=e.i(549705),Q=e.i(238300),ee=e.i(625873),et=e.i(22906),en=e.i(256186),er=e.i(917955),ea=e.i(996652),ei=e.i(650654),eo=e.i(249673),es=e.i(315775),el=e.i(953700),ec=e.i(267624);function ed({routes:e}){let{state:a,isMobile:i,setOpenMobile:o}=v(),s="collapsed"===a,[c,d]=(0,r.useState)(new Set),u=(0,n.useRouter)(),f=(0,R.useTranslations)("common"),m=e=>{i&&o(!1),(0,L.tauriNavigate)(u,e)};return(0,t.jsx)(E,{children:e.map(e=>{let n=!s&&c.has(e.id),r=!!e.subs?.length,a=r||!!e.onAdd;return(0,t.jsx)(S,{children:a?s?(0,t.jsxs)(ea.Popover,{children:[(0,t.jsx)(ea.PopoverTrigger,{render:(0,t.jsx)(D,{className:"justify-center text-muted-foreground hover:bg-sidebar-muted hover:text-foreground",tooltip:e.title}),children:e.icon}),(0,t.jsxs)(ea.PopoverContent,{side:"right",sideOffset:8,className:"w-56 p-1.5",children:[(0,t.jsx)("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground mb-1",children:e.title}),e.subs?.map(n=>(0,t.jsxs)("div",{className:"group/sub relative flex items-center",children:[n.onClick?(0,t.jsxs)("button",{type:"button",onClick:n.onClick,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground",children:[n.icon,n.title]}):(0,t.jsxs)("button",{type:"button",onClick:()=>m(n.link),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground",children:[n.icon,n.title]}),n.menuItems&&n.menuItems.length>0&&(0,t.jsxs)(er.DropdownMenu,{children:[(0,t.jsx)(er.DropdownMenuTrigger,{className:"absolute right-1 flex items-center justify-center rounded-md p-0.5 opacity-0 group-hover/sub:opacity-100 hover:bg-accent transition-opacity cursor-pointer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(es.MoreHorizontal,{className:"size-3.5 text-muted-foreground"})}),(0,t.jsx)(er.DropdownMenuContent,{align:"end",side:"right",children:n.menuItems.map(e=>(0,t.jsxs)(er.DropdownMenuItem,{variant:e.variant,onClick:e.onClick,children:[e.icon,e.label]},e.label))})]})]},`${e.id}-${n.title}`)),e.onAdd&&(0,t.jsxs)("button",{type:"button",onClick:e.onAdd,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground mt-0.5",children:[(0,t.jsx)(el.Plus,{className:"size-3.5"}),e.addLabel??f("add")]}),e.manageLink&&(0,t.jsxs)("button",{type:"button",onClick:()=>m(e.manageLink),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground mt-0.5",children:[(0,t.jsx)(ec.LayoutGrid,{className:"size-3.5"}),f("manage")]})]})]}):(0,t.jsxs)(en.Collapsible,{open:n,onOpenChange:t=>d(n=>{let r=new Set(n);return t?r.add(e.id):r.delete(e.id),r}),className:"w-full",children:[(0,t.jsxs)(en.CollapsibleTrigger,{render:(0,t.jsx)(D,{className:(0,l.cn)("group/hdr flex flex-1 items-center rounded-lg px-2 transition-colors",n?"bg-sidebar-muted text-foreground":"text-muted-foreground hover:bg-sidebar-muted hover:text-foreground")}),children:[e.icon,(0,t.jsx)("span",{className:"ml-2 flex-1 text-sm font-medium",children:e.title}),r&&(0,t.jsx)("span",{children:n?(0,t.jsx)(eo.ChevronUp,{className:"size-4"}):(0,t.jsx)(ei.ChevronDown,{className:"size-4"})})]}),(0,t.jsx)(en.CollapsibleContent,{children:(0,t.jsxs)(M,{className:"my-1 ml-3.5",children:[e.subs?.map(n=>(0,t.jsx)(S,{className:"h-auto",children:(0,t.jsxs)("div",{className:"group/sub relative flex items-center",children:[(0,t.jsx)(I,{render:n.onClick?(0,t.jsx)("button",{type:"button",onClick:n.onClick,className:"flex w-full items-center rounded-md px-4 py-1.5 text-sm font-medium text-muted-foreground hover:bg-sidebar-muted hover:text-foreground"}):(0,t.jsx)("button",{type:"button",onClick:()=>m(n.link),className:"flex w-full items-center rounded-md px-4 py-1.5 text-sm font-medium text-muted-foreground hover:bg-sidebar-muted hover:text-foreground"}),children:n.title}),n.menuItems&&n.menuItems.length>0&&(0,t.jsxs)(er.DropdownMenu,{children:[(0,t.jsx)(er.DropdownMenuTrigger,{className:"absolute right-1 flex items-center justify-center rounded-md p-0.5 opacity-0 group-hover/sub:opacity-100 hover:bg-sidebar-muted transition-opacity cursor-pointer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(es.MoreHorizontal,{className:"size-3.5 text-muted-foreground"})}),(0,t.jsx)(er.DropdownMenuContent,{align:"end",side:"right",children:n.menuItems.map(e=>(0,t.jsxs)(er.DropdownMenuItem,{variant:e.variant,onClick:e.onClick,children:[e.icon,e.label]},e.label))})]})]})},`${e.id}-${n.title}`)),e.onAdd&&(0,t.jsx)(S,{children:(0,t.jsxs)("button",{type:"button",onClick:e.onAdd,className:"flex w-full items-center gap-2 rounded-md px-4 py-1.5 text-sm font-medium text-muted-foreground hover:bg-sidebar-muted hover:text-foreground",children:[(0,t.jsx)(el.Plus,{className:"size-3.5"}),e.addLabel??f("add")]})}),e.manageLink&&(0,t.jsx)(S,{children:(0,t.jsxs)("button",{type:"button",onClick:()=>m(e.manageLink),className:"flex w-full items-center gap-2 rounded-md px-4 py-1.5 text-sm font-medium text-muted-foreground hover:bg-sidebar-muted hover:text-foreground",children:[(0,t.jsx)(ec.LayoutGrid,{className:"size-3.5"}),f("manage")]})})]})})]}):(0,t.jsxs)(D,{tooltip:e.title,render:(0,t.jsx)("button",{type:"button",onClick:()=>m(e.link),className:(0,l.cn)("flex items-center rounded-lg px-2 transition-colors text-muted-foreground hover:bg-sidebar-muted hover:text-foreground",s&&"justify-center")}),children:[e.icon,!s&&(0,t.jsx)("span",{className:"ml-2 text-sm font-medium",children:e.title})]})},e.id)})})}var eu=e.i(191118),ef=e.i(36539),ef=ef,em=e.i(875350),ep=e.i(506037),eh=e.i(487122),eg=e.i(238153),ev=e.i(492421),ex=e.i(632713),eb=e.i(539392),ew=e.i(516467);function ey(e,t){let n=(0,ew.toDate)(e)-(0,ew.toDate)(t);return n<0?-1:n>0?1:n}var ej=e.i(511518),ek=e.i(731285),eN=e.i(936765);function eE(e,t){return function(e,t,n){var r;let a,i=(0,ev.getDefaultOptions)(),o=n?.locale??i.locale??eg.defaultLocale,s=ey(e,t);if(isNaN(s))throw RangeError("Invalid time value");let l=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:s}),[c,d]=(0,eb.normalizeDates)(n?.in,...s>0?[t,e]:[e,t]),u=(r=void 0,e=>{let t=(r?Math[r]:Math.trunc)(e);return 0===t?0:t})(((0,ew.toDate)(d)-(0,ew.toDate)(c))/1e3),f=Math.round((u-((0,ex.getTimezoneOffsetInMilliseconds)(d)-(0,ex.getTimezoneOffsetInMilliseconds)(c))/1e3)/60);if(f<2)if(n?.includeSeconds)if(u<5)return o.formatDistance("lessThanXSeconds",5,l);else if(u<10)return o.formatDistance("lessThanXSeconds",10,l);else if(u<20)return o.formatDistance("lessThanXSeconds",20,l);else if(u<40)return o.formatDistance("halfAMinute",0,l);else if(u<60)return o.formatDistance("lessThanXMinutes",1,l);else return o.formatDistance("xMinutes",1,l);else if(0===f)return o.formatDistance("lessThanXMinutes",1,l);else return o.formatDistance("xMinutes",f,l);if(f<45)return o.formatDistance("xMinutes",f,l);if(f<90)return o.formatDistance("aboutXHours",1,l);if(f<ej.minutesInDay){let e=Math.round(f/60);return o.formatDistance("aboutXHours",e,l)}if(f<2520)return o.formatDistance("xDays",1,l);else if(f<ej.minutesInMonth){let e=Math.round(f/ej.minutesInDay);return o.formatDistance("xDays",e,l)}else if(f<2*ej.minutesInMonth)return a=Math.round(f/ej.minutesInMonth),o.formatDistance("aboutXMonths",a,l);if((a=function(e,t){var n;let r,a,[i,o,s]=(0,eb.normalizeDates)(void 0,e,e,t),l=ey(o,s),c=Math.abs((0,ek.differenceInCalendarMonths)(o,s));if(c<1)return 0;1===o.getMonth()&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-l*c);let d=ey(o,s)===-l;+(r=(0,ew.toDate)(i,void 0),n=void 0,(a=(0,ew.toDate)(r,n?.in)).setHours(23,59,59,999),a)==+(0,eN.endOfMonth)(r,void 0)&&1===c&&1===ey(i,s)&&(d=!1);let u=l*(c-d);return 0===u?0:u}(d,c))<12){let e=Math.round(f/ej.minutesInMonth);return o.formatDistance("xMonths",e,l)}{let e=a%12,t=Math.trunc(a/12);return e<3?o.formatDistance("aboutXYears",t,l):e<9?o.formatDistance("overXYears",t,l):o.formatDistance("almostXYears",t+1,l)}}(e,(0,eh.constructFrom)(e,Date.now()),t)}var eS=e.i(209988);let eC=(0,m.default)("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),eD={issue_completed:"✓",issue_failed:"✕",task_completed:"✓",task_failed:"✕"},eM={issue_completed:"text-green-600 bg-green-100 dark:bg-green-900/30 dark:text-green-400",issue_failed:"text-red-600 bg-red-100 dark:bg-red-900/30 dark:text-red-400",task_completed:"text-green-600 bg-green-100 dark:bg-green-900/30 dark:text-green-400",task_failed:"text-red-600 bg-red-100 dark:bg-red-900/30 dark:text-red-400"};function eI({open:e,onOpenChange:n,workspaceId:a,initialNotification:i}){let o=(0,R.useTranslations)("sidebar.notifications"),s=(0,ep.useNotificationStore)(e=>e.notifications),d=(0,ep.useNotificationStore)(e=>e.markRead),u=(0,ep.useNotificationStore)(e=>e.markAllRead),f=(0,ep.useNotificationStore)(e=>e.clearAll),[m,p]=(0,r.useState)(null),h=i&&!m?i:m;return(0,t.jsx)(eS.Dialog,{open:e,onOpenChange:e=>{e||p(null),n(e)},children:(0,t.jsxs)(eS.DialogContent,{className:"sm:max-w-lg max-h-[80vh] flex flex-col gap-0 overflow-hidden p-0",children:[(0,t.jsx)(eS.DialogHeader,{className:"px-6 py-4 border-b shrink-0",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eS.DialogTitle,{children:o("centerTitle")}),s.some(e=>!e.read)&&(0,t.jsx)("span",{className:"inline-flex items-center justify-center size-5 rounded-full bg-blue-500 text-[10px] font-medium text-white",children:s.filter(e=>!e.read).length})]}),s.some(e=>!e.read)&&(0,t.jsxs)(c.Button,{variant:"ghost",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>u(a),children:[(0,t.jsx)(eC,{className:"size-3.5"}),o("markAllRead")]})]})}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:h?(0,t.jsxs)("div",{className:"px-6 py-4",children:[(0,t.jsxs)("div",{className:(0,l.cn)("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium mb-3",eM[h.type]??""),children:[eD[h.type]??""," ",h.type]}),(0,t.jsx)("h3",{className:"text-lg font-semibold mb-2",children:h.title}),h.description&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:h.description}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eE(new Date(h.createdAt),{addSuffix:!0})}),Object.keys(h.data).length>0&&(0,t.jsx)("pre",{className:"mt-3 text-xs bg-muted rounded p-3 overflow-auto",children:JSON.stringify(h.data,null,2)})]}):0===s.length?(0,t.jsx)("div",{className:"px-6 py-12 text-center text-sm text-muted-foreground",children:o("empty")}):(0,t.jsx)("div",{className:"divide-y",children:s.map(e=>(0,t.jsxs)("button",{className:(0,l.cn)("flex w-full items-start gap-3 px-6 py-3.5 text-left hover:bg-accent/50 transition-colors",!e.read&&"bg-accent/30"),onClick:()=>{e.read||d(a,e.id),p(e)},children:[(0,t.jsx)("div",{className:(0,l.cn)("mt-1 size-2 rounded-full shrink-0",e.read?"bg-transparent":"bg-blue-500")}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium truncate",children:e.title}),e.description&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-1 mt-0.5",children:e.description}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:eE(new Date(e.createdAt),{addSuffix:!0})})]})]},e.id))})}),s.length>0&&(0,t.jsx)("div",{className:"px-6 py-3 border-t shrink-0 flex justify-end",children:(0,t.jsxs)(c.Button,{variant:"ghost",size:"sm",className:"h-7 text-xs gap-1 text-destructive",onClick:()=>{f(a),n(!1)},children:[(0,t.jsx)(em.Trash2Icon,{className:"size-3.5"}),o("clearAll")]})})]})})}function eR({workspaceId:e}){let n=(0,R.useTranslations)("sidebar.notifications"),a=(0,ep.useNotificationStore)(e=>e.notifications),i=(0,ep.useNotificationStore)(e=>e.markRead),o=(0,ep.useNotificationStore)(e=>e.clearAll),s=a.filter(e=>!e.read).length,[d,u]=(0,r.useState)(!1),[f,m]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),g=a.slice(0,5);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ea.Popover,{open:d,onOpenChange:u,children:[(0,t.jsxs)(ea.PopoverTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"rounded-full relative","aria-label":n("openAriaLabel")}),children:[(0,t.jsx)(ef.default,{className:"size-5"}),s>0&&(0,t.jsx)("span",{className:"absolute -top-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-red-500 text-[10px] font-medium text-white",children:s>9?"9+":s})]}),(0,t.jsxs)(ea.PopoverContent,{side:"right",className:"w-80 max-h-[70dvh] my-6 p-0",align:"start",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b",children:[(0,t.jsx)("span",{className:"text-sm font-semibold",children:n("title")}),a.length>0&&(0,t.jsx)("div",{className:"flex gap-1",children:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"size-7",onClick:()=>o(e),title:n("clearAll"),children:(0,t.jsx)(em.Trash2Icon,{className:"size-3.5"})})})]}),(0,t.jsx)(eu.ScrollArea,{className:"max-h-[50dvh] overflow-hidden",children:0===g.length?(0,t.jsx)("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:n("empty")}):(0,t.jsx)("div",{className:"divide-y",children:g.map(n=>(0,t.jsxs)("button",{className:(0,l.cn)("flex w-full items-start gap-3 px-4 py-3 text-left hover:bg-accent/50 transition-colors",!n.read&&"bg-accent/30"),onClick:()=>{n.read||i(e,n.id),h(n),m(!0)},children:[(0,t.jsx)("div",{className:(0,l.cn)("mt-1 size-2 rounded-full shrink-0",n.read?"bg-transparent":"bg-blue-500")}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium truncate",children:n.title}),n.description&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mt-0.5",children:n.description}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:eE(new Date(n.createdAt),{addSuffix:!0})})]})]},n.id))})}),a.length>5&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"border-t"}),(0,t.jsx)("button",{className:"w-full px-4 py-2.5 text-sm text-muted-foreground hover:text-primary hover:bg-accent/30 transition-colors",onClick:()=>{h(null),u(!1),m(!0)},children:n("viewAll")})]})]})]}),(0,t.jsx)(eI,{open:f,onOpenChange:m,workspaceId:e,initialNotification:p})]})}var eL=e.i(344118);let eA=(0,m.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var eP=e.i(210),eT=e.i(523592);function e_({open:e,onOpenChange:n,editingId:a,servers:i,onSave:o}){let s=(0,R.useTranslations)("sidebar"),l=(0,R.useTranslations)("common"),[u,f]=r.useState(""),[m,p]=r.useState(""),[h,g]=r.useState("");return r.useEffect(()=>{if(e&&a){let e=i.find(e=>e.id===a);e&&(f(e.name),p(e.url),g(e.secret||""))}else e&&(f(""),p(""),g(""))},[e,a,i]),(0,t.jsx)(eS.Dialog,{open:e,onOpenChange:n,children:(0,t.jsxs)(eS.DialogContent,{children:[(0,t.jsxs)(eS.DialogHeader,{children:[(0,t.jsx)(eS.DialogTitle,{children:s(a?"server.editServer":"server.addServer")}),(0,t.jsx)(eS.DialogDescription,{children:s(a?"server.editDescription":"server.addDescription")})]}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:l("name")}),(0,t.jsx)(d.Input,{value:u,onChange:e=>f(e.target.value),placeholder:"My Server"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:s("server.url")}),(0,t.jsx)(d.Input,{value:m,onChange:e=>p(e.target.value),placeholder:"http://192.168.1.100:3100",onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:s("server.secret")}),(0,t.jsx)(d.Input,{type:"password",value:h,onChange:e=>g(e.target.value),placeholder:s("server.secretPlaceholder"),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]})]}),(0,t.jsxs)(eS.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>n(!1),children:l("cancel")}),(0,t.jsx)(c.Button,{onClick:()=>{if(!u.trim()||!m.trim())return;let e=m.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),a?o(i.map(t=>t.id===a?{...t,name:u.trim(),url:e,secret:h.trim()||void 0}:t)):o([...i,{id:Date.now().toString(),name:u.trim(),url:e,secret:h.trim()||void 0}]),n(!1)},disabled:!u.trim()||!m.trim(),children:l(a?"save":"add")})]})]})})}var eO=e.i(894920);function ez(){let{isMobile:e}=v(),n=(0,R.useTranslations)("sidebar"),[a,i]=r.useState(eT.loadServers),[o,s]=r.useState(eT.loadActiveId),[l,c]=r.useState(!1),[d,u]=r.useState(null),[f,m]=r.useState(!1),p=a.find(e=>e.id===o)||a[0],h=e=>{s(e.id),(0,eT.saveActiveId)(e.id),(0,eT.setActiveServerCookie)(e.url),window.location.href="/"};return p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E,{children:(0,t.jsx)(S,{children:(0,t.jsxs)(er.DropdownMenu,{children:[(0,t.jsxs)(er.DropdownMenuTrigger,{render:(0,t.jsx)(D,{size:"lg",className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"}),children:[(0,t.jsx)("div",{className:"flex aspect-square size-8 items-center justify-center rounded-lg bg-background text-foreground",children:(0,t.jsx)(F.Server,{className:"size-4"})}),(0,t.jsxs)("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[(0,t.jsx)("span",{className:"truncate font-semibold",children:p.name}),(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:p.url.replace(/^https?:\/\//,"")})]}),(0,t.jsx)(eA,{className:"ml-auto"})]}),(0,t.jsxs)(er.DropdownMenuContent,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg mb-4",align:"start",side:e?"bottom":"right",sideOffset:4,children:[(0,t.jsx)(er.DropdownMenuGroup,{children:(0,t.jsx)(er.DropdownMenuLabel,{className:"text-xs text-muted-foreground",children:n("server.servers")})}),a.map(e=>(0,t.jsxs)(er.DropdownMenuItem,{onClick:()=>h(e),className:"gap-2 p-2",children:[(0,t.jsx)("div",{className:"flex size-6 items-center justify-center rounded-sm border",children:(0,t.jsx)(F.Server,{className:"size-3.5 shrink-0"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:e.url})]}),e.id===o&&(0,t.jsx)(eL.Check,{className:"size-4 text-primary shrink-0"})]},e.id)),(0,t.jsx)(er.DropdownMenuSeparator,{}),(0,t.jsxs)(er.DropdownMenuItem,{className:"gap-2 p-2",onClick:()=>{u(null),c(!0)},children:[(0,t.jsx)("div",{className:"flex size-6 items-center justify-center rounded-md border bg-background",children:(0,t.jsx)(el.Plus,{className:"size-4"})}),(0,t.jsx)("div",{className:"font-medium text-muted-foreground",children:n("server.addServer")})]}),(0,t.jsxs)(er.DropdownMenuItem,{className:"gap-2 p-2",onClick:()=>m(!0),children:[(0,t.jsx)("div",{className:"flex size-6 items-center justify-center rounded-md border bg-background",children:(0,t.jsx)(eP.Settings2,{className:"size-4"})}),(0,t.jsx)("div",{className:"font-medium text-muted-foreground",children:n("server.manageServers")})]})]})]})})}),(0,t.jsx)(e_,{open:l,onOpenChange:c,editingId:d,servers:a,onSave:e=>{i(e),(0,eT.saveServers)(e);let t=d?e.find(e=>e.id===d):e[e.length-1];d&&t&&d===o&&(0,eT.setActiveServerCookie)(t.url)}}),(0,t.jsx)(eO.ServerManagerDialog,{open:f,onOpenChange:m,servers:a,activeId:o,onUpdate:e=>{i(e),(0,eT.saveServers)(e);let t=e.find(e=>e.id===o);t&&(0,eT.setActiveServerCookie)(t.url)},onRemove:e=>{if("default"===e)return;let t=a.filter(t=>t.id!==e);if(i(t),(0,eT.saveServers)(t),o===e){let e=t.find(e=>"default"===e.id)||t[0];e&&h(e)}},onSwitch:h})]}):null}var eF=e.i(524),eW=e.i(361031),e$=e.i(640376),eB=e.i(31807),eH=e.i(327964),eU=e.i(250226),eK=e.i(286117);function eV(e){return`/workspace/${e}`}function eX(){let{state:e,toggleSidebar:a}=v(),i=(0,n.usePathname)(),o=(0,n.useRouter)(),c=(0,R.useTranslations)("sidebar"),d=(0,R.useTranslations)("common"),u="collapsed"===e,f=(0,eK.isWorkspacePath)(i),m=(0,s.useIsMobile)(),p=(0,eK.workspaceIdFromLocation)(i,window.location.search),h=(0,eW.useWorkspaceStore)(e=>e.workspaces),g=(0,eW.useWorkspaceStore)(e=>e.setWorkspaces),x=(0,eW.useWorkspaceStore)(e=>e.upsertWorkspace),y=(0,eW.useWorkspaceStore)(e=>e.removeWorkspace),[E,S]=(0,r.useState)(!1),[C,D]=(0,r.useState)(!1),[M,I]=(0,r.useState)(!1),[en,er]=(0,r.useState)(!1),[ea,ei]=(0,r.useState)(!1),[eo,es]=(0,r.useState)(!1),[el,ec]=(0,r.useState)(!1),[eu,ef]=(0,r.useState)(null),[em,ep]=(0,r.useState)(void 0),eh=(0,r.useCallback)(()=>{fetch("/api/workspaces").then(e=>e.json()).then(g).catch(()=>{})},[g]);(0,r.useEffect)(()=>{eh()},[eh]),(0,r.useEffect)(()=>{let e=()=>a(),t=e=>{"agents"===e.detail&&S(!0)};return window.addEventListener("toggle-sidebar",e),window.addEventListener("open-dialog",t),()=>{window.removeEventListener("toggle-sidebar",e),window.removeEventListener("open-dialog",t)}},[a]);let eg=(0,e$.useCommandPalette)(e=>e.registerMany);(0,r.useEffect)(()=>eg([{id:"toggle-sidebar",label:"Toggle Sidebar",group:"View",icon:V,action:()=>a()},{id:"latest-channel",label:"Open Latest Channel",group:"Navigation",icon:X.Hash,action:()=>{let{channels:e,setActiveChannel:t}=eB.useChannelStore.getState();e.length>0&&(t(e[e.length-1].id),eU.useMobilePanelStore.getState().setActivePanel("chat"))}},{id:"latest-issue",label:"Open Latest Issue",group:"Navigation",icon:q.CircleDot,action:()=>{let{issues:e,setActiveIssue:t}=eH.useIssueStore.getState();e.length>0&&(t(e[e.length-1].id),eU.useMobilePanelStore.getState().setActivePanel("issue-detail"))}},{id:"open-agents",label:"Open Agent Settings",group:"Settings",icon:O.Bot,action:()=>window.dispatchEvent(new CustomEvent("open-dialog",{detail:"agents"}))},{id:"open-workflows",label:"Open Workflow Settings",group:"Settings",icon:H.GitBranch,action:()=>{window.location.href=(0,L.toStaticHref)("/workflows")}}]),[eg,a]);let ev=async e=>{if(eu){let t=await fetch(`/api/workspaces/${eu.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});x(await t.json())}else{let t=await fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});x(await t.json())}},ex=async e=>{if(await fetch(`/api/workspaces/${e.id}`,{method:"DELETE"}),y(e.id),p===e.id){let t=h.filter(t=>t.id!==e.id);(0,L.tauriNavigate)(o,t.length>0?eV(t[0].id):"/")}},eb=[{id:"home",title:c("nav.home"),icon:(0,t.jsx)(P.Home,{className:"size-4"}),link:"/"},{id:"workspaces",title:c("nav.workspaces"),icon:(0,t.jsx)(T.FolderOpen,{className:"size-4"}),link:"/",onAdd:()=>{ef(null),ec(!0)},addLabel:c("nav.addWorkspace"),manageLink:"/workspaces",subs:[...h.map(e=>({title:e.name,link:eV(e.id),icon:(0,t.jsx)(T.FolderOpen,{className:"size-4"}),menuItems:[{label:d("edit"),icon:(0,t.jsx)(W.Pencil,{className:"size-3.5"}),onClick:()=>{ef(e),ec(!0)}},{label:d("open"),icon:(0,t.jsx)(B.default,{className:"size-3.5"}),onClick:()=>fetch(`/api/workspaces/${e.id}/reveal`,{method:"POST"})},{label:d("delete"),icon:(0,t.jsx)($.Trash2,{className:"size-3.5"}),variant:"destructive",onClick:()=>ex(e)}]}))]},{id:"workflows",title:c("nav.workflows"),icon:(0,t.jsx)(H.GitBranch,{className:"size-4"}),link:"/workflows"},{id:"settings",title:c("nav.settings"),icon:(0,t.jsx)(_,{className:"size-4"}),link:"#",subs:m?[{title:c("nav.general"),link:"/settings"},{title:c("nav.agents"),link:"/settings/agents",icon:(0,t.jsx)(O.Bot,{className:"size-3.5"})},{title:c("nav.skills"),link:"/settings/skills",icon:(0,t.jsx)(U.Sparkles,{className:"size-3.5"})},{title:c("nav.mcps"),link:"/settings/mcps",icon:(0,t.jsx)(K.Plug,{className:"size-3.5"})},{title:c("nav.models"),link:"/settings/models",icon:(0,t.jsx)(z.Brain,{className:"size-3.5"})},{title:c("nav.providers"),link:"/settings/providers",icon:(0,t.jsx)(F.Server,{className:"size-3.5"})}]:[{title:c("nav.general"),link:"#",onClick:()=>D(!0)},{title:c("nav.agents"),link:"#",icon:(0,t.jsx)(O.Bot,{className:"size-3.5"}),onClick:()=>S(!0)},{title:c("nav.skills"),link:"#",icon:(0,t.jsx)(U.Sparkles,{className:"size-3.5"}),onClick:()=>ei(!0)},{title:c("nav.mcps"),link:"#",icon:(0,t.jsx)(K.Plug,{className:"size-3.5"}),onClick:()=>es(!0)},{title:c("nav.models"),link:"#",icon:(0,t.jsx)(z.Brain,{className:"size-3.5"}),onClick:()=>{ep(void 0),I(!0)}},{title:c("nav.providers"),link:"#",icon:(0,t.jsx)(F.Server,{className:"size-3.5"}),onClick:()=>er(!0)}]}];return(0,t.jsxs)(b,{variant:"floating",collapsible:"icon",className:(0,l.cn)("overflow-hidden",f&&"bg-[#f2f3f5] dark:bg-[#0f1117]"),children:[(0,t.jsxs)(j,{className:(0,l.cn)("flex shrink-0 rounded-xl border border-border bg-card mx-2 mt-2 px-3 py-2.5 shadow-[0_1px_3px_rgba(0,0,0,0.04)]",u?"flex-row items-center justify-between gap-y-4 md:flex-col md:items-center md:justify-center":"flex-row items-center justify-between"),children:[(0,t.jsx)("a",{href:"#",className:"flex items-center gap-2",children:(0,t.jsx)(Y.UserIcon,{size:u?"sm":"md"})}),(0,t.jsxs)(A.motion.div,{className:(0,l.cn)("flex items-center gap-2",u?"flex-row md:flex-col-reverse":"flex-row"),initial:{opacity:0},animate:{opacity:1},transition:{duration:.8},children:[(0,t.jsx)(eR,{workspaceId:p??""}),(0,t.jsx)(w,{})]},u?"header-collapsed":"header-expanded")]}),(0,t.jsx)(N,{className:"min-h-0 overflow-y-auto group-data-[collapsible=icon]:overflow-y-auto gap-2 mx-2 my-2 rounded-xl border border-border bg-card p-2 shadow-[0_1px_3px_rgba(0,0,0,0.04)]",children:(0,t.jsx)(ed,{routes:eb})}),(0,t.jsx)(k,{className:"shrink-0 mx-2 mb-2 rounded-xl border border-border bg-card p-2 shadow-[0_1px_3px_rgba(0,0,0,0.04)]",children:(0,t.jsx)(ez,{})}),(0,t.jsx)(G.AgentDialog,{open:E,onOpenChange:S}),(0,t.jsx)(ee.SkillsDialog,{open:ea,onOpenChange:ei}),(0,t.jsx)(et.McpsDialog,{open:eo,onOpenChange:es}),(0,t.jsx)(Q.SettingsDialog,{open:C,onOpenChange:D}),(0,t.jsx)(Z.ModelsDialog,{open:M,onOpenChange:I,initialProvider:em}),(0,t.jsx)(J.ProvidersDialog,{open:en,onOpenChange:er,onAddModel:e=>{ep(e),I(!0)}}),(0,t.jsx)(eF.WorkspaceDialog,{open:el,onOpenChange:ec,workspace:eu,onSubmit:ev})]})}function eq(){let e=(0,eW.useWorkspaceStore)(e=>e.workspaces),{toggleSidebar:r}=v(),a=(0,n.useRouter)(),i=(0,n.usePathname)(),o=(0,n.useSearchParams)(),s=(0,eK.workspaceIdFromLocation)(i,o.toString());return(0,t.jsxs)("div",{className:"flex items-center h-12 px-3 bg-transparent overflow-x-auto shrink-0",children:[(0,t.jsx)("button",{onClick:()=>r(),className:"flex items-center justify-center size-8 rounded-lg text-muted-foreground hover:bg-accent/50 transition-colors shrink-0 md:hidden",children:(0,t.jsx)(p,{size:16})}),(0,t.jsx)("div",{className:"flex items-center gap-1 rounded-xl p-1",children:e.map(e=>(0,t.jsx)("button",{onClick:()=>{var t;return(0,L.tauriNavigate)(a,(t=e.id,`/workspace/${t}`))},className:(0,l.cn)("flex items-center gap-1.5 px-3.5 h-7 text-[13px] font-medium rounded-lg transition-all whitespace-nowrap",s===e.id?"bg-primary text-primary-foreground shadow-[rgba(0,0,0,0.08)_0px_4px_6px]":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:(0,t.jsx)("span",{className:"max-w-[160px] truncate",children:e.name})},e.id))})]})}e.i(8890);var eY=e.i(478189);function eG(){let[e,t]=(0,r.useState)(!1),[n,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{a(!0)},[]),(0,r.useEffect)(()=>{if(!e)return;let n=e=>{e.preventDefault(),e.stopPropagation();let n=e.target;if(!(n instanceof HTMLElement))return;let r=function(e){let t=e.closest("[data-inspector-relative-path]");if(t?.dataset.inspectorRelativePath)return{relativePath:t.dataset.inspectorRelativePath,lineNumber:t.dataset.inspectorLine??"1",columnNumber:t.dataset.inspectorColumn??"1"};let n=function e(t){if(!t)return;let n=Object.keys(t).find(e=>e.startsWith("__reactFiber$")||e.startsWith("__reactInternalInstance$"));return n?t[n]:e(t.parentElement)}(e);for(;n;){let e=n._debugSource??n._debugOwner?._debugSource;if(e?.fileName&&e.lineNumber)return{absolutePath:e.fileName,lineNumber:String(e.lineNumber),columnNumber:String(e.columnNumber??1)};n=n.return??void 0}}(n);console.debug("[react-dev-inspector] native click",r),t(!1),r?(e=>{if(!e)return;let t="codeInfo"in e?e.codeInfo:e,{lineNumber:n,columnNumber:r,relativePath:a,absolutePath:i}=t,o=!!a,s=o?a:i;if(!s)return console.error("[react-dev-inspector] Cannot open editor without source fileName",t);let l=o?`${eY.default}/relative`:eY.default;fetch(`${l}?${new URLSearchParams({fileName:s,lineNumber:n,colNumber:r})}`)})(r):console.warn("[react-dev-inspector] no React source info found",n)};return window.addEventListener("click",n,!0),()=>window.removeEventListener("click",n,!0)},[e]),null}e.s(["AppShell",0,function({children:e}){let a=(0,n.usePathname)(),[i,o]=(0,r.useState)(()=>{let e=localStorage.getItem("showWorkspaceTabs");return null===e||"false"!==e});return((0,r.useEffect)(()=>{let e=e=>o(e.detail);return window.addEventListener("workspace-tabs-visibility",e),()=>window.removeEventListener("workspace-tabs-visibility",e)},[]),(0,eK.isLoginPath)(a))?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eG,{}),(0,t.jsxs)(x,{className:"h-[var(--app-content-height)] min-h-0 bg-[#f2f3f5] dark:bg-[#0f1117]",children:[(0,t.jsx)(eX,{}),(0,t.jsxs)(y,{className:"!bg-transparent",children:[i&&(0,t.jsx)(eq,{}),e]})]})]})}],994876)},984642,e=>{"use strict";var t=e.i(344180),n=e.i(640376),r=e.i(683640),a=e.i(764556);function i(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}let o=(0,a.forwardRef)(function({size:e=44,lsKey:n,onClick:r,children:o,className:s,style:l,visible:c=!0,snapThreshold:d=60,minimizeDelay:u=2e3,unhoverDelay:f=2e3,defaultPosition:m},p){let h=(0,a.useRef)({x:0,y:0}),[g,v]=(0,a.useState)({x:0,y:0}),[x,b]=(0,a.useState)(!1),[w,y]=(0,a.useState)(!1),j=(0,a.useRef)(!1),k=(0,a.useRef)({x:0,y:0}),N=(0,a.useRef)(!1),E=(0,a.useRef)(void 0),S=(0,a.useRef)(void 0),C=(0,a.useRef)("right"),D=(0,a.useRef)(null),M=e/2;(0,a.useEffect)(()=>{let t=function(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}(n),r={x:m?.x??window.innerWidth-e-20,y:m?.y??window.innerHeight-e-28},a=t?{x:Math.min(t.x,window.innerWidth-e),y:Math.min(t.y,window.innerHeight-e)}:r;h.current=a,v(a),b(!0)},[n,e,m]);let I=(0,a.useCallback)(e=>{y(!0),h.current={x:"left"===e?-M:window.innerWidth-M,y:h.current.y},v(h.current)},[M]),R=(0,a.useCallback)(()=>{clearTimeout(E.current),E.current=void 0,clearTimeout(S.current),S.current=void 0},[]),L=(0,a.useCallback)(()=>{R(),y(!1);let t=window.innerWidth,r={x:h.current.x<t/2?12:t-e-12,y:h.current.y};h.current=r,v(r),i(n,r)},[R,e,n]),A=(0,a.useCallback)(()=>{w&&L(),clearTimeout(S.current),S.current=void 0},[w,L]),P=(0,a.useCallback)(()=>{D.current&&(S.current=setTimeout(()=>I(C.current),f))},[I,f]),T=(0,a.useCallback)(e=>{j.current=!0,N.current=!1,D.current=null,R(),w&&L(),k.current={x:e.clientX-h.current.x,y:e.clientY-h.current.y},e.target.setPointerCapture(e.pointerId)},[R,w,L]),_=(0,a.useCallback)(t=>{if(!j.current)return;N.current=!0;let n=Math.max(0,Math.min(window.innerWidth-e,t.clientX-k.current.x)),r=Math.max(0,Math.min(window.innerHeight-e,t.clientY-k.current.y));h.current={x:n,y:r},v({x:n,y:r})},[e]),O=(0,a.useCallback)(()=>{j.current=!1;let{x:t,y:a}=h.current,o=window.innerWidth,s=t<d,l=t>o-e-d,c=Math.max(12,Math.min(window.innerHeight-e-12,a));if(s||l){let t=s?"left":"right";C.current=t,D.current=t;let r={x:s?12:o-e-12,y:c};h.current=r,v(r),i(n,r),E.current=setTimeout(()=>I(t),u)}else D.current=null,h.current={x:t,y:c},v(h.current),i(n,{x:t,y:c});if(!N.current&&r){let e=t=>{t.stopPropagation(),t.preventDefault(),document.removeEventListener("click",e,!0)};document.addEventListener("click",e,!0),r()}},[r,I,e,d,u,n]);return((0,a.useEffect)(()=>{let t=()=>{R();let t=window.innerWidth;if(w){let n=h.current.x<t/2;h.current={x:n?-M:t-M,y:Math.min(h.current.y,window.innerHeight-e-12)}}else h.current={x:Math.min(h.current.x,t-e-12),y:Math.min(h.current.y,window.innerHeight-e-12)};v(h.current)};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[R,w,M,e]),(0,a.useEffect)(()=>R,[R]),c&&x)?(0,t.jsx)("div",{ref:p,onPointerDown:T,onPointerMove:_,onPointerUp:O,onMouseEnter:A,onMouseLeave:P,className:s,style:{position:"fixed",left:g.x,top:g.y,width:e,height:e,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:99999,touchAction:"none",userSelect:"none",transition:j.current?"none":"left 0.3s ease-out, top 0.3s ease-out",...l},children:o}):null});e.s(["ConsolePanel",0,function(){let e=(0,n.useCommandPalette)(e=>e.toggle),a=(0,n.useCommandPalette)(e=>e.open);return(0,t.jsx)(o,{lsKey:"console-panel:pos",onClick:e,visible:!a,style:{background:"#3b82f6",color:"white",boxShadow:"0 4px 12px rgba(59,130,246,0.4)"},children:(0,t.jsx)(r.Terminal,{size:18})})}],984642)},694819,e=>{"use strict";var t=e.i(764556),n=e.i(515104);function r(){let e=document.documentElement,t=window.visualViewport,r=(0,n.isNativeEnvironment)()&&/Android/i.test(navigator.userAgent)?window.__agentSpacesNativeInsets?.top??0:0,a=t?.height??window.innerHeight,i=t?Math.max(0,window.innerHeight-t.height-t.offsetTop):0,o=Math.max(i,(0,n.isNativeEnvironment)()&&/Android/i.test(navigator.userAgent)?window.__agentSpacesNativeInsets?.keyboard??0:0),s=i>0?a:Math.max(0,window.innerHeight-o),l=Math.max(0,s-r);e.style.setProperty("--app-viewport-height",`${s}px`),e.style.setProperty("--app-content-height",`${l}px`),e.style.setProperty("--keyboard-inset-height",`${o}px`),e.style.setProperty("--app-top-inset",`${r}px`)}e.s(["ViewportInsets",0,function(){return(0,t.useEffect)(()=>{r();let e=e=>(function(e){if(!(e instanceof HTMLElement&&e.matches("input, textarea, [contenteditable='true'], [contenteditable='']")))return;let t=()=>{r(),e.scrollIntoView({block:"nearest",inline:"nearest"})};t(),window.setTimeout(t,60),window.setTimeout(t,180),window.setTimeout(t,360)})(e.target),t=window.visualViewport;return t?.addEventListener("resize",r),t?.addEventListener("scroll",r),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("agent-spaces-native-insets",r),document.addEventListener("focusin",e),()=>{t?.removeEventListener("resize",r),t?.removeEventListener("scroll",r),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r),window.removeEventListener("agent-spaces-native-insets",r),document.removeEventListener("focusin",e)}},[]),null}])},701341,e=>{"use strict";var t=e.i(344180),n=e.i(764556),r=e.i(515104);async function a(e){if(!(0,r.isFlutterEnvironment)())return;let t=window.__flutterBridge;if(t?.invoke)try{await t.invoke("setZoom",{scale:e/100})}catch{}}e.s(["ZoomWrapper",0,function({children:e}){return(0,n.useEffect)(()=>{let e=localStorage.getItem("pageZoom");if(e){let t=Number(e);t>=50&&t<=200&&a(t)}let t=e=>{let t=e.detail;"number"==typeof t&&t>=50&&t<=200&&a(t)};return window.addEventListener("zoom-change",t),()=>window.removeEventListener("zoom-change",t)},[]),(0,t.jsx)(t.Fragment,{children:e})}])},698679,e=>{"use strict";let t,n,r;var a,i,o,s,l,c,d,u,f,m=e.i(344180),p=e.i(764556),h=/[\\\/_+.#"@\[\(\{&]/,g=/[\\\/_+.#"@\[\(\{&]/g,v=/[\s-]/,x=/[\s-]/g;function b(e){return e.toLowerCase().replace(x," ")}function w(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function y(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function j(...e){return t=>{let n=!1,r=e.map(e=>{let r=y(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():y(e[t],null)}}}}function k(...e){return p.useCallback(j(...e),e)}"u">typeof window&&window.document&&window.document.createElement;var N=globalThis?.document?p.useLayoutEffect:()=>{},E=p[" useId ".trim().toString()]||(()=>void 0),S=0;function C(e){let[t,n]=p.useState(E());return N(()=>{e||n(e=>e??String(S++))},[e]),e||(t?`radix-${t}`:"")}p[" useEffectEvent ".trim().toString()],p[" useInsertionEffect ".trim().toString()];var D=p[" useInsertionEffect ".trim().toString()]||N;Symbol("RADIX:SYNC_STATE");var M=e.i(106206);function I(e){var t;let n,r=(t=e,(n=p.forwardRef((e,t)=>{let{children:n,...r}=e;if(p.isValidElement(n)){var a;let e,i,o=(a=n,(i=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(i=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),s=function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==p.Fragment&&(s.ref=t?j(t,o):o),p.cloneElement(n,s)}return p.Children.count(n)>1?p.Children.only(null):null})).displayName=`${t}.SlotClone`,n),a=p.forwardRef((e,t)=>{let{children:n,...a}=e,i=p.Children.toArray(n),o=i.find(L);if(o){let e=o.props.children,n=i.map(t=>t!==o?t:p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null);return(0,m.jsx)(r,{...a,ref:t,children:p.isValidElement(e)?p.cloneElement(e,void 0,n):null})}return(0,m.jsx)(r,{...a,ref:t,children:n})});return a.displayName=`${e}.Slot`,a}var R=Symbol("radix.slottable");function L(e){return p.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===R}var A=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=I(`Primitive.${t}`),r=p.forwardRef((e,r)=>{let{asChild:a,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,m.jsx)(a?n:t,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function P(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...e)=>t.current?.(...e),[])}var T="dismissableLayer.update",_=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),O=p.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:s,...l}=e,c=p.useContext(_),[d,f]=p.useState(null),h=d?.ownerDocument??globalThis?.document,[,g]=p.useState({}),v=k(t,e=>f(e)),x=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=x.indexOf(b),j=d?x.indexOf(d):-1,N=c.layersWithOutsidePointerEventsDisabled.size>0,E=j>=y,S=function(e,t=globalThis?.document){let n=P(e),r=p.useRef(!1),a=p.useRef(()=>{});return p.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){F("dismissableLayer.pointerDownOutside",n,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...c.branches].some(e=>e.contains(t));E&&!n&&(a?.(e),o?.(e),e.defaultPrevented||s?.())},h),C=function(e,t=globalThis?.document){let n=P(e),r=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!r.current&&F("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;![...c.branches].some(e=>e.contains(t))&&(i?.(e),o?.(e),e.defaultPrevented||s?.())},h);return!function(e,t=globalThis?.document){let n=P(e);p.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{j===c.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},h),p.useEffect(()=>{if(d)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(u=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),z(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=u)}},[d,h,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),z())},[d,c]),p.useEffect(()=>{let e=()=>g({});return document.addEventListener(T,e),()=>document.removeEventListener(T,e)},[]),(0,m.jsx)(A.div,{...l,ref:v,style:{pointerEvents:N?E?"auto":"none":void 0,...e.style},onFocusCapture:w(e.onFocusCapture,C.onFocusCapture),onBlurCapture:w(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:w(e.onPointerDownCapture,S.onPointerDownCapture)})});function z(){let e=new CustomEvent(T);document.dispatchEvent(e)}function F(e,t,n,{discrete:r}){let a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t&&a.addEventListener(e,t,{once:!0}),r)a&&M.flushSync(()=>a.dispatchEvent(i));else a.dispatchEvent(i)}O.displayName="DismissableLayer",p.forwardRef((e,t)=>{let n=p.useContext(_),r=p.useRef(null),a=k(t,r);return p.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,m.jsx)(A.div,{...e,ref:a})}).displayName="DismissableLayerBranch";var W="focusScope.autoFocusOnMount",$="focusScope.autoFocusOnUnmount",B={bubbles:!1,cancelable:!0},H=p.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[s,l]=p.useState(null),c=P(a),d=P(i),u=p.useRef(null),f=k(t,e=>l(e)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?u.current=t:V(u.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;null!==t&&(s.contains(t)||V(u.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&V(s)});return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){X.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(W,B);s.addEventListener(W,c),s.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(V(r,{select:t}),document.activeElement!==n)return}(U(s).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&V(s))}return()=>{s.removeEventListener(W,c),setTimeout(()=>{let t=new CustomEvent($,B);s.addEventListener($,d),s.dispatchEvent(t),t.defaultPrevented||V(e??document.body,{select:!0}),s.removeEventListener($,d),X.remove(h)},0)}}},[s,c,d,h]);let g=p.useCallback(e=>{if(!n&&!r||h.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){var i;let t,r=e.currentTarget,[o,s]=[K(t=U(i=r),i),K(t.reverse(),i)];o&&s?e.shiftKey||a!==s?e.shiftKey&&a===o&&(e.preventDefault(),n&&V(s,{select:!0})):(e.preventDefault(),n&&V(o,{select:!0})):a===r&&e.preventDefault()}},[n,r,h.paused]);return(0,m.jsx)(A.div,{tabIndex:-1,...o,ref:f,onKeyDown:g})});function U(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function K(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function V(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}H.displayName="FocusScope";var X=(r=[],{add(e){let t=r[0];e!==t&&t?.pause(),(r=q(r,e)).unshift(e)},remove(e){r=q(r,e),r[0]?.resume()}});function q(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var Y=p.forwardRef((e,t)=>{let{container:n,...r}=e,[a,i]=p.useState(!1);N(()=>i(!0),[]);let o=n||a&&globalThis?.document?.body;return o?M.default.createPortal((0,m.jsx)(A.div,{...r,ref:t}),o):null});Y.displayName="Portal";var G=e=>{var t;let n,r,{present:a,children:i}=e,o=function(e){var t,n;let[r,a]=p.useState(),i=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),[l,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},p.useReducer((e,t)=>n[e][t]??e,t));return p.useEffect(()=>{let e=Z(i.current);s.current="mounted"===l?e:"none"},[l]),N(()=>{let t=i.current,n=o.current;if(n!==e){let r=s.current,a=Z(t);e?c("MOUNT"):"none"===a||t?.display==="none"?c("UNMOUNT"):n&&r!==a?c("ANIMATION_OUT"):c("UNMOUNT"),o.current=e}},[e,c]),N(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=n=>{let a=Z(i.current).includes(CSS.escape(n.animationName));if(n.target===r&&a&&(c("ANIMATION_END"),!o.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},a=e=>{e.target===r&&(s.current=Z(i.current))};return r.addEventListener("animationstart",a),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",a),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(e=>{i.current=e?getComputedStyle(e):null,a(e)},[])}}(a),s="function"==typeof i?i({present:o.isPresent}):p.Children.only(i),l=k(o.ref,(t=s,(r=(n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.ref:(r=(n=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof i||o.isPresent?p.cloneElement(s,{ref:l}):null};function Z(e){return e?.animationName||"none"}G.displayName="Presence";var J=0;function Q(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ee=e.i(824627),et="right-scroll-bar-position",en="width-before-scroll-bar";function er(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ea="u">typeof window?p.useLayoutEffect:p.useEffect,ei=new WeakMap,eo=(void 0===a&&(a={}),(void 0===i&&(i=function(e){return e}),o=[],s=!1,l={read:function(){if(s)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:null},useMedium:function(e){var t=i(e,s);return o.push(t),function(){o=o.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(s=!0;o.length;){var t=o;o=[],t.forEach(e)}o={push:function(t){return e(t)},filter:function(){return o}}},assignMedium:function(e){s=!0;var t=[];if(o.length){var n=o;o=[],n.forEach(e),t=o}var r=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(r)};a(),o={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),o}}}}).options=(0,ee.__assign)({async:!0,ssr:!1},a),l),es=function(){},el=p.forwardRef(function(e,t){var n,r,a,i,o=p.useRef(null),s=p.useState({onScrollCapture:es,onWheelCapture:es,onTouchMoveCapture:es}),l=s[0],c=s[1],d=e.forwardProps,u=e.children,f=e.className,m=e.removeScrollBar,h=e.enabled,g=e.shards,v=e.sideCar,x=e.noRelative,b=e.noIsolation,w=e.inert,y=e.allowPinchZoom,j=e.as,k=e.gapMode,N=(0,ee.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=(n=[o,t],r=function(e){return n.forEach(function(t){return er(t,e)})},(a=(0,p.useState)(function(){return{value:null,callback:r,facade:{get current(){return a.value},set current(value){var e=a.value;e!==value&&(a.value=value,a.callback(value,e))}}}})[0]).callback=r,i=a.facade,ea(function(){var e=ei.get(i);if(e){var t=new Set(e),r=new Set(n),a=i.current;t.forEach(function(e){r.has(e)||er(e,null)}),r.forEach(function(e){t.has(e)||er(e,a)})}ei.set(i,n)},[n]),i),S=(0,ee.__assign)((0,ee.__assign)({},N),l);return p.createElement(p.Fragment,null,h&&p.createElement(v,{sideCar:eo,removeScrollBar:m,shards:g,noRelative:x,noIsolation:b,inert:w,setCallbacks:c,allowPinchZoom:!!y,lockRef:o,gapMode:k}),d?p.cloneElement(p.Children.only(u),(0,ee.__assign)((0,ee.__assign)({},S),{ref:E})):p.createElement(void 0===j?"div":j,(0,ee.__assign)({},S,{className:f,ref:E}),u))});el.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},el.classNames={fullWidth:en,zeroRight:et};var ec=function(e){var t=e.sideCar,n=(0,ee.__rest)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return p.createElement(r,(0,ee.__assign)({},n))};ec.isSideCarExport=!0;var ed=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=f||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,a;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eu=function(){var e=ed();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ef=function(){var e=eu();return function(t){return e(t.styles,t.dynamic),null}},em={left:0,top:0,right:0,gap:0},ep=function(e){return parseInt(e||"",10)||0},eh=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[ep(n),ep(r),ep(a)]},eg=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return em;var t=eh(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ev=ef(),ex="data-scroll-locked",eb=function(e,t,n,r){var a=e.left,i=e.top,o=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(ex,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(o,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(et," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(en," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(et," .").concat(et," {\n right: 0 ").concat(r,";\n }\n \n .").concat(en," .").concat(en," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(ex,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},ew=function(){var e=parseInt(document.body.getAttribute(ex)||"0",10);return isFinite(e)?e:0},ey=function(){p.useEffect(function(){return document.body.setAttribute(ex,(ew()+1).toString()),function(){var e=ew()-1;e<=0?document.body.removeAttribute(ex):document.body.setAttribute(ex,e.toString())}},[])},ej=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;ey();var i=p.useMemo(function(){return eg(a)},[a]);return p.createElement(ev,{styles:eb(i,!t,a,n?"":"!important")})},ek=!1;if("u">typeof window)try{var eN=Object.defineProperty({},"passive",{get:function(){return ek=!0,!0}});window.addEventListener("test",eN,eN),window.removeEventListener("test",eN,eN)}catch(e){ek=!1}var eE=!!ek&&{passive:!1},eS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},eC=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),eD(e,r)){var a=eM(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},eD=function(e,t){return"v"===e?eS(t,"overflowY"):eS(t,"overflowX")},eM=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},eI=function(e,t,n,r,a){var i,o=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),s=o*r,l=n.target,c=t.contains(l),d=!1,u=s>0,f=0,m=0;do{if(!l)break;var p=eM(e,l),h=p[0],g=p[1]-p[2]-o*h;(h||g)&&eD(e,l)&&(f+=g,m+=h);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&l!==document.body||c&&(t.contains(l)||t===l))return u&&(a&&1>Math.abs(f)||!a&&s>f)?d=!0:!u&&(a&&1>Math.abs(m)||!a&&-s>m)&&(d=!0),d},eR=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eL=function(e){return[e.deltaX,e.deltaY]},eA=function(e){return e&&"current"in e?e.current:e},eP=0,eT=[];let e_=(c=function(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),a=p.useState(eP++)[0],i=p.useState(ef)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(0,ee.__spreadArray)([e.lockRef.current],(e.shards||[]).map(eA),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!o.current.allowPinchZoom;var a,i=eR(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-i[0],c="deltaY"in e?e.deltaY:s[1]-i[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var f=window.getSelection(),m=f&&f.anchorNode;if(m&&(m===d||m.contains(d)))return!1;var p=eC(u,d);if(!p)return!0;if(p?a=u:(a="v"===u?"h":"v",p=eC(u,d)),!p)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var h=r.current||a;return eI(h,t,e,"h"===h?l:c,!0)},[]),l=p.useCallback(function(e){if(eT.length&&eT[eT.length-1]===i){var n="deltaY"in e?eL(e):eR(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var a=(o.current.shards||[]).map(eA).filter(Boolean).filter(function(t){return t.contains(e.target)});(a.length>0?s(e,a[0]):!o.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=p.useCallback(function(e,n,r,a){var i={name:e,delta:n,target:r,should:a,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=p.useCallback(function(e){n.current=eR(e),r.current=void 0},[]),u=p.useCallback(function(t){c(t.type,eL(t),t.target,s(t,e.lockRef.current))},[]),f=p.useCallback(function(t){c(t.type,eR(t),t.target,s(t,e.lockRef.current))},[]);p.useEffect(function(){return eT.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",l,eE),document.addEventListener("touchmove",l,eE),document.addEventListener("touchstart",d,eE),function(){eT=eT.filter(function(e){return e!==i}),document.removeEventListener("wheel",l,eE),document.removeEventListener("touchmove",l,eE),document.removeEventListener("touchstart",d,eE)}},[]);var m=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(i,{styles:"\n .block-interactivity-".concat(a," {pointer-events: none;}\n .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,m?p.createElement(ej,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},eo.useMedium(c),ec);var eO=p.forwardRef(function(e,t){return p.createElement(el,(0,ee.__assign)({},e,{ref:t,sideCar:e_}))});eO.classNames=el.classNames;var ez=new WeakMap,eF=new WeakMap,eW={},e$=0,eB=function(e){return e&&(e.host||eB(e.parentNode))},eH=function(e,t,n,r){var a=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=eB(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});eW[n]||(eW[n]=new WeakMap);var i=eW[n],o=[],s=new Set,l=new Set(a),c=function(e){!e||s.has(e)||(s.add(e),c(e.parentNode))};a.forEach(c);var d=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(ez.get(e)||0)+1,c=(i.get(e)||0)+1;ez.set(e,l),i.set(e,c),o.push(e),1===l&&a&&eF.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),s.clear(),e$++,function(){o.forEach(function(e){var t=ez.get(e)-1,a=i.get(e)-1;ez.set(e,t),i.set(e,a),t||(eF.has(e)||e.removeAttribute(r),eF.delete(e)),a||e.removeAttribute(n)}),--e$||(ez=new WeakMap,ez=new WeakMap,eF=new WeakMap,eW={})}},eU=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),eH(r,a,n,"aria-hidden")):function(){return null}},eK="Dialog",[eV,eX]=function(e,t=[]){let n=[],r=()=>{let t=n.map(e=>p.createContext(e));return function(n){let r=n?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let a=p.createContext(r),i=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[i]||a,l=p.useMemo(()=>o,Object.values(o));return(0,m.jsx)(s.Provider,{value:l,children:r})};return o.displayName=t+"Provider",[o,function(n,o){let s=o?.[e]?.[i]||a,l=p.useContext(s);if(l)return l;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let a=n(e)[`__scope${r}`];return{...t,...a}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}(eK),[eq,eY]=eV(eK),eG=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,s=p.useRef(null),l=p.useRef(null),[c,d]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[a,i,o]=function({defaultProp:e,onChange:t}){let[n,r]=p.useState(e),a=p.useRef(n),i=p.useRef(t);return D(()=>{i.current=t},[t]),p.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,r,i]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{let t=p.useRef(void 0!==e);p.useEffect(()=>{let e=t.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,r])}return[l,p.useCallback(t=>{if(s){let n="function"==typeof t?t(e):t;n!==e&&o.current?.(n)}else i(t)},[s,e,i,o])]}({prop:r,defaultProp:a??!1,onChange:i,caller:eK});return(0,m.jsx)(eq,{scope:t,triggerRef:s,contentRef:l,contentId:C(),titleId:C(),descriptionId:C(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};eG.displayName=eK;var eZ="DialogTrigger";p.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=eY(eZ,n),i=k(t,a.triggerRef);return(0,m.jsx)(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ta(a.open),...r,ref:i,onClick:w(e.onClick,a.onOpenToggle)})}).displayName=eZ;var eJ="DialogPortal",[eQ,e0]=eV(eJ,{forceMount:void 0}),e1=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=eY(eJ,t);return(0,m.jsx)(eQ,{scope:t,forceMount:n,children:p.Children.map(r,e=>(0,m.jsx)(G,{present:n||i.open,children:(0,m.jsx)(Y,{asChild:!0,container:a,children:e})}))})};e1.displayName=eJ;var e2="DialogOverlay",e3=p.forwardRef((e,t)=>{let n=e0(e2,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=eY(e2,e.__scopeDialog);return i.modal?(0,m.jsx)(G,{present:r||i.open,children:(0,m.jsx)(e4,{...a,ref:t})}):null});e3.displayName=e2;var e5=I("DialogOverlay.RemoveScroll"),e4=p.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=eY(e2,n);return(0,m.jsx)(eO,{as:e5,allowPinchZoom:!0,shards:[a.contentRef],children:(0,m.jsx)(A.div,{"data-state":ta(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),e6="DialogContent",e9=p.forwardRef((e,t)=>{let n=e0(e6,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=eY(e6,e.__scopeDialog);return(0,m.jsx)(G,{present:r||i.open,children:i.modal?(0,m.jsx)(e8,{...a,ref:t}):(0,m.jsx)(e7,{...a,ref:t})})});e9.displayName=e6;var e8=p.forwardRef((e,t)=>{let n=eY(e6,e.__scopeDialog),r=p.useRef(null),a=k(t,n.contentRef,r);return p.useEffect(()=>{let e=r.current;if(e)return eU(e)},[]),(0,m.jsx)(te,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:w(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:w(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:w(e.onFocusOutside,e=>e.preventDefault())})}),e7=p.forwardRef((e,t)=>{let n=eY(e6,e.__scopeDialog),r=p.useRef(!1),a=p.useRef(!1);return(0,m.jsx)(te,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));let i=t.target;n.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),te=p.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,s=eY(e6,n),l=p.useRef(null),c=k(t,l);return p.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Q()),document.body.insertAdjacentElement("beforeend",e[1]??Q()),J++,()=>{1===J&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),J--}},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(H,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,m.jsx)(O,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ta(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(tl,{titleId:s.titleId}),(0,m.jsx)(tc,{contentRef:l,descriptionId:s.descriptionId})]})]})}),tt="DialogTitle";p.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=eY(tt,n);return(0,m.jsx)(A.h2,{id:a.titleId,...r,ref:t})}).displayName=tt;var tn="DialogDescription";p.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=eY(tn,n);return(0,m.jsx)(A.p,{id:a.descriptionId,...r,ref:t})}).displayName=tn;var tr="DialogClose";function ta(e){return e?"open":"closed"}p.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=eY(tr,n);return(0,m.jsx)(A.button,{type:"button",...r,ref:t,onClick:w(e.onClick,()=>a.onOpenChange(!1))})}).displayName=tr;var ti="DialogTitleWarning",[to,ts]=(d={contentName:e6,titleName:tt,docsSlug:"dialog"},t=p.createContext(d),(n=e=>{let{children:n,...r}=e,a=p.useMemo(()=>r,Object.values(r));return(0,m.jsx)(t.Provider,{value:a,children:n})}).displayName=ti+"Provider",[n,function(e){let n=p.useContext(t);if(n)return n;if(void 0!==d)return d;throw Error(`\`${e}\` must be used within \`${ti}\``)}]),tl=({titleId:e})=>{let t=ts(ti),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
-
|
|
5
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},tc=({contentRef:e,descriptionId:t})=>{let n=ts("DialogDescriptionWarning"),r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return p.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},td='[cmdk-group=""]',tu='[cmdk-group-items=""]',tf='[cmdk-item=""]',tm=`${tf}:not([aria-disabled="true"])`,tp="cmdk-item-select",th="data-value",tg=(e,t,n)=>{var r;return r=e,function e(t,n,r,a,i,o,s){if(o===n.length)return i===t.length?1:.99;var l=`${i},${o}`;if(void 0!==s[l])return s[l];for(var c,d,u,f,m=a.charAt(o),p=r.indexOf(m,i),b=0;p>=0;)(c=e(t,n,r,a,p+1,o+1,s))>b&&(p===i?c*=1:h.test(t.charAt(p-1))?(c*=.8,(u=t.slice(i,p-1).match(g))&&i>0&&(c*=Math.pow(.999,u.length))):v.test(t.charAt(p-1))?(c*=.9,(f=t.slice(i,p-1).match(x))&&i>0&&(c*=Math.pow(.999,f.length))):(c*=.17,i>0&&(c*=Math.pow(.999,p-i))),t.charAt(p)!==n.charAt(o)&&(c*=.9999)),(c<.1&&r.charAt(p-1)===a.charAt(o+1)||a.charAt(o+1)===a.charAt(o)&&r.charAt(p-1)!==a.charAt(o))&&.1*(d=e(t,n,r,a,p+1,o+2,s))>c&&(c=.1*d),c>b&&(b=c),p=r.indexOf(m,p+1);return s[l]=b,b}(r=n&&n.length>0?`${r+" "+n.join(" ")}`:r,t,b(r),b(t),0,0,{})},tv=p.createContext(void 0),tx=p.createContext(void 0),tb=p.createContext(void 0),tw=p.forwardRef((e,t)=>{let n=tI(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=tI(()=>new Set),a=tI(()=>new Map),i=tI(()=>new Map),o=tI(()=>new Set),s=tD(e),{label:l,children:c,value:d,onValueChange:u,filter:f,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:v=!0,...x}=e,b=C(),w=C(),y=C(),j=p.useRef(null),k=tA();tM(()=>{if(void 0!==d){let e=d.trim();n.current.value=e,N.emit()}},[d]),tM(()=>{k(6,R)},[]);let N=p.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var a,i,o,l;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)I(),D(),k(1,M);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(y);e?e.focus():null==(a=document.getElementById(b))||a.focus()}if(k(7,()=>{var e;n.current.selectedItemId=null==(e=L())?void 0:e.id,N.emit()}),r||k(5,R),(null==(i=s.current)?void 0:i.value)!==void 0){null==(l=(o=s.current).onValueChange)||l.call(o,null!=t?t:"");return}}N.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),E=p.useMemo(()=>({value:(e,t,r)=>{var a;t!==(null==(a=i.current.get(e))?void 0:a.value)&&(i.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,S(t,r)),k(2,()=>{D(),N.emit()}))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),k(3,()=>{I(),D(),n.current.value||M(),N.emit()}),()=>{i.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=L();k(4,()=>{I(),(null==t?void 0:t.getAttribute("id"))===e&&M(),N.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{i.current.delete(e),a.current.delete(e)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:b,inputId:y,labelId:w,listInnerRef:j}),[]);function S(e,t){var r,a;let i=null!=(a=null==(r=s.current)?void 0:r.filter)?a:tg;return e?i(e,n.current.search,t):0}function D(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=a.current.get(n),i=0;r.forEach(t=>{i=Math.max(e.get(t),i)}),t.push([n,i])});let r=j.current;P().sort((t,n)=>{var r,a;let i=t.getAttribute("id"),o=n.getAttribute("id");return(null!=(r=e.get(o))?r:0)-(null!=(a=e.get(i))?a:0)}).forEach(e=>{let t=e.closest(tu);t?t.appendChild(e.parentElement===t?e:e.closest(`${tu} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${tu} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=j.current)?void 0:t.querySelector(`${td}[${th}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function M(){let e=P().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(th);N.setState("value",t||void 0)}function I(){var e,t,o,l;if(!n.current.search||!1===s.current.shouldFilter){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let c=0;for(let a of r.current){let r=S(null!=(t=null==(e=i.current.get(a))?void 0:e.value)?t:"",null!=(l=null==(o=i.current.get(a))?void 0:o.keywords)?l:[]);n.current.filtered.items.set(a,r),r>0&&c++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=c}function R(){var e,t,n;let r=L();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(td))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function L(){var e;return null==(e=j.current)?void 0:e.querySelector(`${tf}[aria-selected="true"]`)}function P(){var e;return Array.from((null==(e=j.current)?void 0:e.querySelectorAll(tm))||[])}function T(e){let t=P()[e];t&&N.setState("value",t.getAttribute(th))}function _(e){var t;let n=L(),r=P(),a=r.findIndex(e=>e===n),i=r[a+e];null!=(t=s.current)&&t.loop&&(i=a+e<0?r[r.length-1]:a+e===r.length?r[0]:r[a+e]),i&&N.setState("value",i.getAttribute(th))}function O(e){let t=L(),n=null==t?void 0:t.closest(td),r;for(;n&&!r;)r=null==(n=e>0?function(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}(n,td):function(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}(n,td))?void 0:n.querySelector(tm);r?N.setState("value",r.getAttribute(th)):_(e)}let z=()=>T(P().length-1),F=e=>{e.preventDefault(),e.metaKey?z():e.altKey?O(1):_(1)},W=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?O(-1):_(-1)};return p.createElement(A.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=x.onKeyDown)||t.call(x,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||n))switch(e.key){case"n":case"j":v&&e.ctrlKey&&F(e);break;case"ArrowDown":F(e);break;case"p":case"k":v&&e.ctrlKey&&W(e);break;case"ArrowUp":W(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),z();break;case"Enter":{e.preventDefault();let t=L();if(t){let e=new Event(tp);t.dispatchEvent(e)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:tT},l),tP(e,e=>p.createElement(tx.Provider,{value:N},p.createElement(tv.Provider,{value:E},e))))}),ty=p.forwardRef((e,t)=>{var n,r;let a=C(),i=p.useRef(null),o=p.useContext(tb),s=p.useContext(tv),l=tD(e),c=null!=(r=null==(n=l.current)?void 0:n.forceMount)?r:null==o?void 0:o.forceMount;tM(()=>{if(!c)return s.item(a,null==o?void 0:o.id)},[c]);let d=tL(a,i,[e.value,e.children,i],e.keywords),u=p.useContext(tx),f=tR(e=>e.value&&e.value===d.current),m=tR(e=>!!c||!1===s.filter()||!e.search||e.filtered.items.get(a)>0);function h(){var e,t;g(),null==(t=(e=l.current).onSelect)||t.call(e,d.current)}function g(){u.setState("value",d.current,!0)}if(p.useEffect(()=>{let t=i.current;if(!(!t||e.disabled))return t.addEventListener(tp,h),()=>t.removeEventListener(tp,h)},[m,e.onSelect,e.disabled]),!m)return null;let{disabled:v,value:x,onSelect:b,forceMount:w,keywords:y,...k}=e;return p.createElement(A.div,{ref:j(i,t),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||s.getDisablePointerSelection()?void 0:g,onClick:v?void 0:h},e.children)}),tj=p.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...i}=e,o=C(),s=p.useRef(null),l=p.useRef(null),c=C(),d=p.useContext(tv),u=tR(e=>!!a||!1===d.filter()||!e.search||e.filtered.groups.has(o));tM(()=>d.group(o),[]),tL(o,s,[e.value,e.heading,l]);let f=p.useMemo(()=>({id:o,forceMount:a}),[a]);return p.createElement(A.div,{ref:j(s,t),...i,"cmdk-group":"",role:"presentation",hidden:!u||void 0},n&&p.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),tP(e,e=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},p.createElement(tb.Provider,{value:f},e))))}),tk=p.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=p.useRef(null),i=tR(e=>!e.search);return n||i?p.createElement(A.div,{ref:j(a,t),...r,"cmdk-separator":"",role:"separator"}):null}),tN=p.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=null!=e.value,i=p.useContext(tx),o=tR(e=>e.search),s=tR(e=>e.selectedItemId),l=p.useContext(tv);return p.useEffect(()=>{null!=e.value&&i.setState("search",e.value)},[e.value]),p.createElement(A.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:a?e.value:o,onChange:e=>{a||i.setState("search",e.target.value),null==n||n(e.target.value)}})}),tE=p.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,i=p.useRef(null),o=p.useRef(null),s=tR(e=>e.selectedItemId),l=p.useContext(tv);return p.useEffect(()=>{if(o.current&&i.current){let e=o.current,t=i.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty("--cmdk-list-height",n.toFixed(1)+"px")})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),p.createElement(A.div,{ref:j(i,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},tP(e,e=>p.createElement("div",{ref:j(o,l.listInnerRef),"cmdk-list-sizer":""},e)))}),tS=p.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:i,container:o,...s}=e;return p.createElement(eG,{open:n,onOpenChange:r},p.createElement(e1,{container:o},p.createElement(e3,{"cmdk-overlay":"",className:a}),p.createElement(e9,{"aria-label":e.label,"cmdk-dialog":"",className:i},p.createElement(tw,{ref:t,...s}))))}),tC=Object.assign(tw,{List:tE,Item:ty,Input:tN,Group:tj,Separator:tk,Dialog:tS,Empty:p.forwardRef((e,t)=>tR(e=>0===e.filtered.count)?p.createElement(A.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:p.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...i}=e;return p.createElement(A.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},tP(e,e=>p.createElement("div",{"aria-hidden":!0},e)))})});function tD(e){let t=p.useRef(e);return tM(()=>{t.current=e}),t}var tM="u"<typeof window?p.useEffect:p.useLayoutEffect;function tI(e){let t=p.useRef();return void 0===t.current&&(t.current=e()),t}function tR(e){let t=p.useContext(tx),n=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,n,n)}function tL(e,t,n,r=[]){let a=p.useRef(),i=p.useContext(tv);return tM(()=>{var o;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),l=r.map(e=>e.trim());i.value(e,s,l),null==(o=t.current)||o.setAttribute(th,s),a.current=s}),a}var tA=()=>{let[e,t]=p.useState(),n=tI(()=>new Map);return tM(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function tP({asChild:e,children:t},n){let r;return e&&p.isValidElement(t)?p.cloneElement("function"==typeof(r=t.type)?r(t.props):"render"in r?r.render(t.props):t,{ref:t.ref},n(t.props.children)):n(t)}var tT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},t_=e.i(465458),tO=e.i(209988),tz=e.i(294237);function tF({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,t_.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}e.i(260218),e.i(681622),e.i(788010);let tW=(0,tz.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function t$({className:e,align:t="inline-start",...n}){return(0,m.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:(0,t_.cn)(tW({align:t}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}(0,tz.cva)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});var tB=e.i(367914);function tH({className:e,...t}){return(0,m.jsx)(tC,{"data-slot":"command",className:(0,t_.cn)("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...t})}function tU({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:a=!1,...i}){return(0,m.jsxs)(tO.Dialog,{...i,children:[(0,m.jsxs)(tO.DialogHeader,{className:"sr-only",children:[(0,m.jsx)(tO.DialogTitle,{children:e}),(0,m.jsx)(tO.DialogDescription,{children:t})]}),(0,m.jsx)(tO.DialogContent,{className:(0,t_.cn)("overflow-hidden rounded-xl! p-0",r),showCloseButton:a,children:n})]})}function tK({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,m.jsxs)(tF,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[(0,m.jsx)(tC.Input,{"data-slot":"command-input",className:(0,t_.cn)("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),(0,m.jsx)(t$,{children:(0,m.jsx)(tB.SearchIcon,{className:"size-4 shrink-0 opacity-50"})})]})})}function tV({className:e,...t}){return(0,m.jsx)(tC.List,{"data-slot":"command-list",className:(0,t_.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function tX({className:e,...t}){return(0,m.jsx)(tC.Empty,{"data-slot":"command-empty",className:(0,t_.cn)("py-6 text-center text-sm",e),...t})}function tq({className:e,...t}){return(0,m.jsx)(tC.Group,{"data-slot":"command-group",className:(0,t_.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...t})}function tY({className:e,children:t,...n}){return(0,m.jsx)(tC.Item,{"data-slot":"command-item",className:(0,t_.cn)("group/command-item relative flex w-full cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...n,children:t})}function tG({className:e,...t}){return(0,m.jsx)("span",{"data-slot":"command-shortcut",className:(0,t_.cn)("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",e),...t})}var tZ=e.i(640376),tJ=e.i(227634),tQ=e.i(938306),t0=e.i(31807);let t1={prefix:"channel",aliases:["ch","c"],label:"Channel",icon:tJ.Hash,search:e=>{let{channels:t,setActiveChannel:n}=t0.useChannelStore.getState(),r=e.toLowerCase();return t.filter(e=>e.name.toLowerCase().includes(r)).map(e=>({id:e.id,label:e.name,description:e.type,icon:tQ.MessageCircle,action:()=>n(e.id)}))}};var t2=e.i(592039),t3=e.i(511800),t5=e.i(327964);let t4={prefix:"issue",aliases:["i","bug"],label:"Issue",icon:t2.CircleDot,search:e=>{let{issues:t,setActiveIssue:n}=t5.useIssueStore.getState(),r=e.toLowerCase();return t.filter(e=>e.title.toLowerCase().includes(r)||e.description?.toLowerCase().includes(r)).map(e=>({id:e.id,label:e.title,description:e.status,icon:t3.AlertCircle,action:()=>n(e.id)}))}};var t6=e.i(984178),t9=e.i(381253),t8=e.i(691223),t7=e.i(437122);let ne=new Set(["ts","tsx","js","jsx","py","rs","go","java","c","cpp","h","css","scss","html","json","yaml","yml","md","sql","sh"]),nt={prefix:"file",aliases:["f","open"],label:"File",icon:t6.FileIcon,search:async e=>{let{openFile:t}=t8.useEditorStore.getState(),{workspaceId:n}=t0.useChannelStore.getState();if(!n)return[];let r=await (0,t7.fetchWithAuth)(`/api/workspaces/${n}/search/files?q=${encodeURIComponent(e)}`);return r.ok?((await r.json()).results??[]).map(e=>{var r;let a;return{id:e.path,label:e.name,description:e.path,icon:(r=e.path,a=r.split(".").pop()?.toLowerCase()??"",ne.has(a)?t9.FileCode:t6.FileIcon),action:()=>t(n,e.path)}}):[]}};var nn=e.i(451534);let nr=(0,e.i(433721).default)("briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);var na=e.i(361031),ni=e.i(233297);let no={prefix:"workspace",aliases:["w","ws"],label:"Workspace",icon:nn.FolderOpen,search:e=>{let{workspaces:t}=na.useWorkspaceStore.getState(),n=e.toLowerCase();return t.filter(e=>e.name.toLowerCase().includes(n)||e.boundDirs.some(e=>e.toLowerCase().includes(n))).map(e=>({id:e.id,label:e.name,description:e.boundDirs[0],icon:nr,action:()=>{let t=(0,ni.toStaticHref)(`/workspace/${e.id}`);window.location.href=t}}))}};var ns=e.i(100559),nl=e.i(882469),nc=e.i(523592);let nd=[t1,t4,nt,no,{prefix:"server",aliases:["s","sv"],label:"Server",icon:ns.Server,search:e=>{let t=(0,nc.loadServers)(),n=(0,nc.loadActiveId)(),r=e.toLowerCase();return t.filter(e=>e.name.toLowerCase().includes(r)||e.url.toLowerCase().includes(r)).map(e=>({id:e.id,label:e.name+(e.id===n?" (active)":""),description:e.url,icon:nl.Globe,action:()=>{(0,nc.saveActiveId)(e.id),(0,nc.setActiveServerCookie)(e.url),window.location.reload()}}))}}];function nu(e){for(let t of nd)for(let n of[t.prefix,...t.aliases])if(e===n+" "||e.startsWith(n+" "))return{provider:t,keyword:e.slice(n.length+1)};return null}var nf=e.i(244073);e.s(["CommandPalette",0,function(){let e=(0,nf.useTranslations)("commandPalette"),{open:t,setOpen:n,toggle:r,commands:a}=(0,tZ.useCommandPalette)(),[i,o]=(0,p.useState)("");(0,p.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),r())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r]),(0,p.useEffect)(()=>{if(!t){o("");let e=document.querySelector("[cmdk-input]");e&&(e.value="")}},[t]);let s=(0,p.useMemo)(()=>nu(i),[i]),[l,c]=(0,p.useState)([]),[d,u]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=nu(i);if(!e){c([]),u(!1);return}let t=e.provider.search(e.keyword);if(t instanceof Promise){u(!0);let e=!1;return t.then(t=>{e||c(t)}).finally(()=>{e||u(!1)}),()=>{e=!0}}c(t),u(!1)},[i]);let f=(0,p.useMemo)(()=>{let e=new Map;for(let t of a){let n=e.get(t.group)??[];n.push(t),e.set(t.group,n)}return e},[a]),h=(0,p.useMemo)(()=>nd.map(e=>({id:`hint:${e.prefix}`,label:e.prefix,description:[...e.aliases].join(", "),icon:e.icon})),[]),g=!!s;return(0,m.jsx)(tU,{open:t,onOpenChange:n,title:e("title"),description:e("description"),children:(0,m.jsxs)(tH,{shouldFilter:!s,children:[(0,m.jsx)(tK,{placeholder:e("placeholder"),value:i,onValueChange:o}),(0,m.jsxs)(tV,{children:[(0,m.jsx)(tX,{children:e("empty")}),g&&(0,m.jsx)(tq,{heading:s.provider.label,children:d?(0,m.jsx)("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"..."}):0===l.length?(0,m.jsx)("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:e("noResults")}):l.slice(0,10).map(e=>(0,m.jsxs)(tY,{value:e.label,onSelect:()=>{n(!1),e.action()},children:[e.icon&&(0,m.jsx)(e.icon,{className:"size-4 shrink-0"}),(0,m.jsx)("span",{className:"truncate min-w-0",children:e.label}),e.description&&(0,m.jsx)("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground truncate max-w-[200px]",children:e.description})]},e.id))}),!s&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(tq,{heading:"Search",children:h.map(e=>(0,m.jsxs)(tY,{value:e.label,className:"data-selected:bg-transparent! [&>svg:last-child]:hidden!",onSelect:()=>o(e.label+" "),children:[e.icon&&(0,m.jsx)(e.icon,{className:"size-4 shrink-0"}),(0,m.jsx)("span",{className:"truncate min-w-0",children:e.label}),e.description&&(0,m.jsx)("span",{className:"ml-auto text-xs text-muted-foreground text-right shrink-0",children:e.description})]},e.id))}),[...f.entries()].map(([e,t])=>(0,m.jsx)(tq,{heading:e,children:t.map(e=>(0,m.jsxs)(tY,{value:e.label,onSelect:()=>{n(!1),e.action()},children:[e.icon&&(0,m.jsx)(e.icon,{className:"size-4 shrink-0"}),(0,m.jsx)("span",{className:"truncate min-w-0",children:e.label}),e.shortcut&&(0,m.jsx)(tG,{children:e.shortcut})]},e.id))},e))]})]})]})})}],698679)}]);
|
/package/dist/web/_next/static/{gN3O86ki0NGTvGTqE2Ibh → O5-QCW1u2YNyAUyaoYh6s}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/web/_next/static/{gN3O86ki0NGTvGTqE2Ibh → O5-QCW1u2YNyAUyaoYh6s}/_ssgManifest.js
RENAMED
|
File without changes
|