openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
148 lines • 466 kB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./about-page-zvK82zP3.js","./control-ui-boot-shared-DJkUdZmL.js","./control-ui-boot-shared-Dfs-gZII.js","./control-ui-boot-shared-umGE-sEP.js","./control-ui-boot-shared-Sj2zqjOr.js","./control-ui-boot-shared-em9-jnbz.js","./plugin-contracts-runtime-CNCaYops.js","./control-ui-boot-shared-D4XEBdOG.js","./config-runtime-BecGLziM.js","./markdown-runtime-ORQpioyT.js","./control-ui-boot-shared-xfDhIVun.js","./control-ui-boot-shared-D3oo_6Fq.js","./control-ui-boot-shared-styles-BaQ2sAfZ.js","./sidebar-update-runtime-DonYLwN5.js","./control-ui-boot-new-CxgnwT6A.js","./chat-transcript-styles-Dzr3t9kA.js","./control-ui-boot-new-styles-Bb6Ub5D3.js","./control-ui-boot-shared-styles-DKyMAG_6.css","./control-ui-boot-shared-CXHNz0Bh.css","./sidebar-update-runtime-ah7rgQE7.css","./chat-transcript-styles-B_dd5Ueo.css","./control-ui-boot-new-styles-u1aN_ui5.css","./control-ui-boot-new-D-SpiTTi.css","./about-page-B5fnhNH8.css","./activity-page-BMFCNRbk.js","./stream-auto-follow-controller-BZ0UzGsg.js","./control-ui-boot-chat-C8hdsB2M.js","./control-ui-boot-chat-VeeaXyJz.js","./control-ui-boot-chat-Ck7W_FPO.js","./control-ui-boot-chat-DxoNF0Ad.js","./control-ui-boot-chat-styles-BRrYkFSc.js","./control-ui-boot-chat-styles-C_Ls1c0m.css","./control-ui-boot-chat-mLz7NUiY.css","./activity-page-WLXiwpab.css","./agents-home-page-0doh2FzN.js","./roster-element-CaNgUr5l.js","./agents-home-page-DfcNNRNz.css","./agents-page-BPYKCO8I.js","./en-settings-KEcvGj5Z.js","./github-identity-view-CGs3W7rE.js","./tool-catalog--o1DKbxU.js","./slots-DxbTdEPp.js","./decision-model-picker-CTOm1wVT.js","./skills-shared-C3RXI2i4.js","./tool-catalog-DcVygOsX.css","./agents-page-DFluc6jm.css","./approvals-page-dTUyCb8i.js","./apps-page-Lw1Jv2BD.js","./en-apps-BZRaTvSe.js","./native-chrome-setup-f8SRqsww.js","./native-chrome-setup-DEA9Gvpf.css","./apps-page-W4BVT2Dy.css","./channels-page-_M07nxbU.js","./wizard-step-controls-C7I6IQZe.js","./config-form-D5QdC_Am.js","./config-form.tiers-CqQphhDm.js","./config-form.search-DJEvDtN5.js","./config-form.node.shared-BDgoYpu6.js","./phone-runtime-ZUS6orP4.js","./wizard-step-controls-D2NAzKG1.css","./control-ui-boot-chat-XcDaYmck.js","./control-ui-boot-chat-BPMc7uzL.js","./control-ui-boot-chat-Dh5vtL-G.css","./cloud-workers-page-CtX6jpk4.js","./config-page-Bg-ZRwTp.js","./response-body-DtENYz2O.js","./theme-palette-BXs1N4qF.js","./update-run-view--bA96Nt4.js","./en-update-actions-Bqyjfcr4.js","./settings-targets-B_ZHOn2L.js","./setup-schema-CsxjHw97.js","./system-info-C3-P4Ofh.js","./wizard-login-controller-DkwUVM4m.js","./state-DYR1Gs_f.js","./en-transcripts-CRsx6m0e.js","./en-memory-import-DGOlPbGX.js","./settings-select-row-C4LcPBBS.js","./settings-model-D2N5Sxkb.js","./update-run-view-CS3ezHvV.css","./wizard-login-controller-6KiX7cZx.css","./config-page-BqgFf8Bw.css","./connection-page-DedaOtBR.js","./login-runtime-ULR4eeNT.js","./gateway-vitals-DuGt95EC.js","./en-debug-x_0vhb2F.js","./sparkline-tile-DioVokoS.js","./sparkline-tile-CaHeaFDQ.css","./connection-page-Cwi7GDhW.css","./custodian-page-CB6CiEu2.js","./custodian-surface-DEGhn11a.js","./plugin-help-B4SbmTLF.js","./custodian-alert-store-DMTYYmJp.js","./custodian-surface-BS8BC9z-.css","./route-view-QL14VxCG.js","./dashboards-page-BaVhUBNy.js","./near-viewport-observer-WgGck829.js","./dashboards-page-oN0QjD8g.css","./debug-page-DRyElqol.js","./lane-table-DnTeYTFe.js","./lane-table-CSTpz4OW.css","./device-page-DKnOXax5.js","./device-page-DzxF6N-U.css","./permissions-page-CcKnKu0E.js","./page-operations-DGRUsmRL.js","./devices-page-DIXYGiUR.js","./desktop-focus-window-BNmA4flB.js","./en-devices-CbdD7BkR.js","./capacity-meter-Cbrs_m5W.js","./capacity-meter-Bpyn5Saf.css","./devices-page-Do3i-SE3.css","./labs-page-CXVCOWGr.js","./lobsterdex-page-BCJIDsuN.js","./lobsterdex-page-BYmxmm_r.css","./logs-page-CTz3weQZ.js","./logs-page-Bu6yianf.css","./meetings-page-CYjKwTwb.js","./meetings-page-C6CzIO_R.css","./memory-import-page-D_T_U9Pq.js","./memory-import-page-744kZiKS.css","./load-BvSiHO4c.js","./usage-BQd4o5lO.js","./model-providers-page-BSPzCIVA.js","./usage-B2dpYrkh.js","./view-status-B49WVyLy.js","./provider-usage-BqWZjTP2.js","./provider-usage-request-DaxVEnIY.js","./usage-BATiNRJi.css","./view-status-CPVPeI0Y.css","./model-setup-page-C7u639b-.js","./first-run-activation-receipt-sjoKnQlo.js","./plugin-page-sDTwp19q.js","./control-ui-disabled-DfZ2EcL3.js","./plugins-page-DRXtyEME.js","./panel-empty-state-DS_rQC2v.js","./reasoned-disabled-control-U3kHzkKT.js","./consent-dialog-qHYDRXx-.js","./plugins-hub-header-D4NMeFIC.js","./credential-editor-CkvILw07.js","./ref-contract-co55NzZZ.js","./file-preview-modal-registration-C6IYZb_Z.js","./plugins-hub-header-Cyk3jpV5.css","./credential-editor-CxfZfu4o.css","./plugins-page-D_KVIBAs.css","./portals-page-Ce3PZSf5.js","./portals-page-pG5r4WM8.css","./profile-page-B-3M1Tz4.js","./profile-page-C73ipYq-.css","./search-page-D1rWe8Lo.js","./secrets-page-tNu2n7bi.js","./secrets-page-DwICXUvq.css","./sessions-page-TPLkiopT.js","./session-workspace-recovery.runtime-sCzaBa0p.js","./transcript-search-C_sHjcNy.js","./cloud-worker-stop.runtime-BR0jZ8bp.js","./sessions-hub-header-iaB_NgZ6.js","./sessions-page-6hLZrAfW.css","./skill-workshop-page-CTtWxCzR.js","./skill-workshop-page-fZsq8iy4.css","./skills-page-Dj_Cydjx.js","./skills-page-BQ5d-20G.css","./systems-page-BoH-w4s7.js","./desktop-panel-DON9OquX.js","./scrollbar-styles-BIL0YPCY.js","./dock-panel-styles-C_3Cdw6M.js","./gateway-websocket-url-cYJwVUmD.js","./systems-page-CG-xKQDS.css","./terminal-page-CaVT3fIf.js","./terminal-panel-registration-DwNbVu-U.js","./panel-tab-strip-DvSbDG3-.js","./dock-destination-controls-CzLuh1pj.js","./theme-color-DAo4KRoc.js","./catalog-terminal-start-BmIoZaYn.js","./terminal-page-DzAc6IHZ.css","./route-loader-CydiuB2I.js","./request-usage-snapshot-DoCj0VT1.js","./usage-page-4xb0hVaZ.js","./worktrees-page-BJPWZ5dF.js","./control-ui-loader-MOtpn6us.js","./debug-overlay-layout.runtime-C4v1gRfy.js"])))=>i.map(i=>d[i]);
import{n as e,r as t}from"./rolldown-runtime-8BhlS34s.js";import{Ao as n,Bi as r,Ci as i,Do as a,Fo as o,Ga as s,Gi as c,Ha as l,Ji as u,Ka as d,Ki as f,Kr as p,Mi as m,Mo as h,No as g,Qa as _,Ri as v,Si as y,So as b,Sr as x,Ti as S,Ui as C,Va as w,Wn as T,Xa as E,Xn as D,Xt as O,Yi as k,Yt as ee,Zn as A,ai as j,bi as te,cr as ne,dr as M,fo as N,fr as re,gr as ie,io as ae,ir as oe,ji as se,ko as ce,lo as le,lr as ue,mo as P,mr as de,na as fe,no as pe,oi as me,oo as he,or as ge,pr as _e,qi as ve,qn as ye,ra as be,ro as xe,rr as Se,si as Ce,so as we,sr as Te,t as Ee,to as De,ur as Oe,vo as ke,vr as Ae,wi as je,wo as Me,xi as Ne,xr as Pe,yr as Fe,zi as Ie}from"./control-ui-core-9qYjK5B2.js";import{$ as F,B as Le,I as Re,R as ze,X as Be,Y as I,ct as Ve,g as He,h as Ue,j as We,k as Ge,nt as Ke,p as qe}from"./lit-runtime-B8uOr6OX.js";import{a as Je,c as Ye,d as Xe,i as Ze,l as Qe,n as $e,o as et,r as tt,s as nt}from"./gateway-runtime-Cr51Pi7N.js";import{a as rt,i as it,o as at,u as ot}from"./session-snapshot-database-BurLa_ut.js";import{$ as st,$a as ct,$i as lt,$t as ut,Aa as L,Ao as dt,Ar as ft,B as pt,Bi as mt,Br as ht,Ct as gt,Da as _t,Do as R,Dr as vt,Ea as yt,Ei as bt,Eo as xt,Er as St,Et as Ct,Fr as wt,Ft as Tt,G as Et,Gr as Dt,Hi as Ot,Hr as kt,Ht as At,Ii as jt,Ir as Mt,It as Nt,J as Pt,Jt as Ft,K as It,Ki as Lt,L as Rt,Li as zt,Lr as Bt,Mn as Vt,Mr as Ht,Nn as Ut,Nr as Wt,Or as Gt,Pa as Kt,Pi as qt,Pn as Jt,Pr as Yt,Pt as Xt,Qt as Zt,R as Qt,Ra as $t,Ri as en,Rr as tn,Rt as nn,St as rn,Tr as an,Tt as on,U as sn,Ur as cn,V as ln,W as un,Wr as dn,Xa as fn,Xi as pn,Xt as mn,Ya as hn,Yi as gn,Yr as _n,Zi as vn,_a as z,_i as yn,_t as bn,ao as xn,bt as Sn,ca as Cn,ci as wn,di as Tn,dt as En,ea as Dn,ei as On,en as kn,eo as An,fa as B,fi as jn,ft as Mn,gi as Nn,hi as Pn,hn as V,ia as Fn,ii as In,in as Ln,ja as Rn,ka as H,li as zn,lo as Bn,ma as Vn,mo as Hn,na as Un,nn as Wn,nt as Gn,oa as U,oi as Kn,ot as qn,pa as Jn,pi as Yn,pt as Xn,qi as Zn,ra as Qn,rn as $n,ro as W,sa as G,si as er,sn as tr,so as nr,ta as rr,ti as ir,tn as ar,to as or,tt as sr,ua as cr,ui as lr,vo as ur,vt as dr,wo as fr,wt as pr,xn as mr,xt as hr,yi as gr,yn as _r,yt as vr,zt as yr}from"./ui-DuRgK6kL.js";function br(e){return xr.some(t=>t===e)}var xr,Sr;function Cr(){return(Cr=e((()=>{xr=[`overview`,`files`,`tools`,`skills`,`channels`,`cron`,`memory`],Sr=`overview`})))()}function wr(e,t){if(!Tr)return Array.from(e).slice(0,t).join(``);let n=``,r=0;for(let{segment:i}of Tr.segment(e))if(n+=i,r+=1,r>=t)break;return n}var Tr;function Er(){return(Er=e((()=>{Tr=typeof Intl.Segmenter==`function`?new Intl.Segmenter(void 0,{granularity:`grapheme`}):null})))()}function Dr(e){return!!e&&typeof e.getItem==`function`&&typeof e.setItem==`function`}function Or(e){let t=Object.getOwnPropertyDescriptor(globalThis,e);if(typeof process<`u`&&{}.VITEST)return t&&!t.get&&Dr(t.value)?t.value:null;if(typeof window<`u`&&typeof document<`u`)try{let t=window[e];return Dr(t)?t:null}catch{return null}return t&&!t.get&&Dr(t.value)?t.value:null}function kr(){return Or(`localStorage`)}function Ar(){return Or(`sessionStorage`)}function jr(){return(jr=e((()=>{})))()}var Mr,Nr,Pr,Fr;function Ir(){return(Ir=e((()=>{Mr={menuLabel:`Agent menu`,agents:`Agents`,newConversation:`New conversation`,allAgents:`All agents`,showAllAgents:`Show all agents`,showOneAgent:`Show one agent`,workspaceMenuLabel:`Workspace menu`,switchAgent:`Switch agent`,working:`Working…`,ready:`Ready to chat`,whatCanAgentDo:`What can {name} do?`,help:`Help`,getHelp:`Get help`,getApps:`Get the apps`,discord:`Discord community`,viewChangelog:`View changelog`,agentSettings:`Agent settings`},Nr={label:`Agent`,allAgents:`All agents`},Pr={pinToSwitcher:`Pin to switcher`,unpinFromSwitcher:`Unpin from switcher`},Fr={title:`Identity`,subtitle:`Name, emoji, and avatar shown in chats and the sidebar.`,name:`Display name`,namePlaceholder:`Agent name`,emoji:`Emoji`,chooseEmoji:`Choose emoji`,searchEmoji:`Search emoji…`,noEmojiMatches:`No matching emoji`,chooseImage:`Choose image…`,replaceImage:`Replace image…`,imageUnusable:`That image can't be used. Pick an image file up to 2 MB.`,imageTooDetailed:`That image is too detailed to store as an avatar. Try a simpler image, or set a workspace image path with openclaw agents set-identity --agent <id> --avatar <path>.`,fileHint:`Saving mirrors identity fields to IDENTITY.md; configured values take precedence.`}})))()}var Lr;function Rr(){return(Rr=e((()=>{Ir(),Lr={pluginUi:{sessionRecentMessages:`Recent messages`,sessionHistoryUnavailable:`Session history could not be loaded. Try again.`,sessionHistoryEmpty:`No recent messages.`,customize:`Customize UI`,selectionScope:`Choose views for this browser window. Built-in views are always available.`,builtin:`Built-in view`,retryView:`Retry plugin view`,reload:`Reload plugin UI`,dashboardTitle:`Session dashboard`,dashboardEmpty:`This session has no dashboard widgets yet.`,customPluginsDisabled:`Custom plugin UI is off`,customPluginsEnableHint:`Enable Custom plugin UI in Labs.`,openLabs:`Open Labs`,surface:{"session-list":`Session list`,composer:`Composer`,workspace:`Workspace`,transcript:`Transcript`,"tool-result":`Tool results`}},capacityMeter:{workerSlots:`{used} of {total} slots busy`,unavailable:`Slot utilization unavailable`,execHost:`Codex exec`},agentsHome:{},common:{uploadsDisabled:`File and image uploads are disabled.`,health:`Health`,ok:`OK`,yes:`Yes`,no:`No`,default:`Default`,active:`Active`,loading:`Loading…`,gatewayStarting:`Gateway starting…`,refreshing:`Refreshing…`,offline:`Offline`,connect:`Connect`,connected:`Connected`,refresh:`Refresh`,retry:`Retry`,staleData:`Showing stale data.`,reload:`Reload`,reset:`Reset`,restore:`Restore`,unarchive:`Unarchive`,undo:`Undo`,probe:`Probe`,call:`Call`,confirm:`Confirm`,dontAskAgain:`Don't ask me again`,cancel:`Cancel`,close:`Close`,previous:`Previous`,next:`Next`,continue:`Continue`,back:`Back`,create:`Create`,copy:`Copy`,copied:`Copied!`,copyFailed:`Copy failed`,copyCode:`Copy code`,copyTable:`Copy table`,expandTable:`Expand table`,expandedTable:`Expanded table`,closeTable:`Close expanded table`,resizeSplitView:`Resize split view`,delete:`Delete`,remove:`Remove`,dismiss:`Dismiss`,dismissAndDontShowAgain:`Dismiss and don't show again`,unselect:`Unselect`,enabled:`Enabled`,disabled:`Disabled`,failed:`Failed`,none:`none`,na:`n/a`,never:`never`,justNow:`just now`,now:`now`,unknown:`Unknown`,configured:`Configured`,running:`Running`,queued:`Queued`,completed:`Completed`,cancelled:`Cancelled`,linked:`Linked`,mode:`Mode`,system:`System`,light:`Light`,dark:`Dark`,baseUrl:`Base URL`,lastStart:`Last start`,lastProbe:`Last probe`,lastConnect:`Last connect`,lastMessage:`Last message`,authAge:`Auth age`,credential:`Credential`,audience:`Audience`,publicKey:`Public Key`,probeOk:`Probe ok`,probeFailed:`Probe failed`,reloadConfig:`Reload Config`,multiSelect:{addCustom:`Add “{value}”`,noMatches:`No matches`,remove:`Remove {value}`},loadConfig:`Load config`,loadApprovals:`Load approvals`,settingsSections:`Settings sections`,version:`Version`,docs:`Docs`,learnMore:`Learn more`,colorMode:`Color mode`,colorModeOption:`Color mode: {mode}`,search:`Search`,pickerNoMatches:`No matches`,save:`Save`,saving:`Saving…`,saveAndPublish:`Save & Publish`,importing:`Importing…`,importFromRelays:`Import from Relays`,showAdvanced:`Show Advanced`,hideAdvanced:`Hide Advanced`,unsavedChanges:`You have unsaved changes`,working:`Working…`,showQr:`Show QR`,relink:`Relink`,waitForScan:`Wait for scan`,logout:`Logout`,skipToMainContent:`Skip to main content`},focus:{unsupported:`This focused view is not supported.`},shortcutsOverlay:{title:`Keyboard shortcuts`},optionCard:{recommended:`Recommended`,skip:`Skip for now`},nativeConversation:{openDashboardFailed:`Couldn't open that page in the Dashboard`},nativeLinkMenu:{label:`Link actions`,openInline:`Open in Browser Panel`,openExternal:`Open in Default Browser`,copy:`Copy Link`},browserLinkPreferences:{openInControlUi:`Open links in Control UI browser`},filePreview:{bundle:{},label:`Support files`},mcpApp:{},sessionHovercard:{ariaLabel:`Session information`,agentNotepad:`Agent Notepad`,linkedChannel:`Linked to {channel}`,viaAccount:`Via {account}`,topicNumber:`Topic {id}`,sessionParticipants:`In this session`,chatKinds:{direct:`Direct chat`,group:`Group chat`,channel:`Channel`,thread:`Thread`,topic:`Topic`},attributionOther:`& {count} other`,attributionOthers:`& {count} others`,moreParticipants:`+{count}`,moreParticipantsLabel:`{count} more participants`,projectLabel:`Project`,workspaceLabel:`Workspace`,branchLabel:`Branch`,runsOn:`Runs on {providerId} · {profileId}`,machineLabel:`Machine`,machineCpu:`{cpu} vCPU`,machineMemory:`{memory} GB`,more:`+{count} more`,changedFile:`{count} file`,changedFiles:`{count} files`,pullRequestLabel:`Pull request #{number}, {state}`,pullRequestAuthorLabel:`Opened by {login}`,states:{open:`Open`,draft:`Draft`,merged:`Merged`,closed:`Closed`},checks:{passing:`CI checks passing`,failing:`CI checks failing`,pending:`CI checks running`}},sessionProgressCard:{title:`Progress`,composerTitle:`Task progress`,shortCount:`{completed} of {total}`,noteLabel:`Progress note`,dismiss:`Dismiss progress card`,clearSaved:`Clear saved progress for everyone`,clearFailed:`Could not clear saved progress card.`,refresh:{label:`Refresh task progress`,retry:`Retry progress refresh`,pending:`Refreshing task progress…`,failed:`Could not refresh. Previous update kept.`,timeout:`No new update yet. The request may still be running.`,updated:`Task progress updated`},widgetLabel:`Session progress`,widgetLoading:`Loading session progress…`,widgetEmpty:`No progress card yet`,widgetUnavailable:`Session progress is unavailable.`,widgetAccessDenied:`Select a session you can access or change sharing for this session.`,countLabel:`{completed} of {total} completed`,activity:{updated:`Updated {time}`,completed:`Completed {time}`,failed:`Failed {time}`,stopped:`Stopped {time}`},outcome:{completed:`Completed`,failed:`Failed`,stopped:`Stopped`},stepLabel:`{step}, {status}`,status:{completed:`completed`,failed:`failed`,inProgress:`in progress`,paused:`paused`,pending:`pending`,stopped:`stopped`},receipt:{updating:`Updating progress`,failed:`Progress update failed`,skipped:`Progress update skipped`,updated:`Progress updated — {completed}/{total} · {current}`,noteUpdated:`Progress note updated`,cleared:`Progress cleared`}},channels:{lastError:`Last error`,refreshingStaleSnapshot:`Refreshing channel status in the background; showing the last successful snapshot.`,hub:{connectedTitle:`Connected channels`,addTitle:`Add a channel`,addSubtitle:`Pick a service and follow the guided setup.`,updatedAgo:`Updated {ago}`,noneConnected:`No channels connected yet. Pick one below to get started.`,partialSnapshot:`Some channel checks did not finish before the UI budget.`,stateRunning:`Running`,stateConfigured:`Configured`,stateAttention:`Needs attention`,setUp:`Set up`,guidedSetup:`Guided step-by-step setup`,openDetails:`Open details`,lastMessageAgo:`Last message {ago}`,browseAllTitle:`More channels…`,browseAllSubtitle:`Browse every available channel, including installable plugins.`,runSetup:`Run setup`,adminRequired:`Browsing only. Channel setup requires operator.admin access.`,saveBeforeSetup:`You have unsaved channel config changes. Save or reload them before running guided setup.`},pairing:{title:`DM access requests`,subtitle:`Review people waiting to send direct messages to pairing-protected channels.`,channelFilter:`Channel`,accountFilter:`Account`,allChannels:`All channels`,allAccounts:`All accounts`,approve:`Approve`,dismiss:`Dismiss`,approveAria:`Approve {sender} for {channel}, account {account}`,dismissAria:`Dismiss {sender} for {channel}, account {account}`,requested:`Requested {ago}`,expires:`Expires {ago}`,senderDetails:`Sender details`,missingPermission:`This connection does not have operator.pairing access, so DM requests cannot be reviewed.`,noAccounts:`No configured channel accounts use DM sender pairing.`,noRequests:`No pending DM access requests.`,noFilteredRequests:`No pending requests match these filters.`,limits:`Requests expire after {minutes} minutes. Each channel account can hold up to {count} pending requests.`,detailTitle:`DM access`,detailSubtitle:`People must be approved before their direct messages reach the agent.`,pendingCount:`{count} pending`,noPending:`No pending requests`,review:`Review requests`,approveDialogTitle:`Approve DM access`,dismissDialogTitle:`Dismiss DM access request`,approveExplanation:`This lets the sender talk to the agent in direct messages. It does not grant group access.`,dismissExplanation:`This removes the current request but does not block the sender. They can request access again later.`,notifyRequester:`Notify the requester after approval`,makeCommandOwner:`Also make this sender the first command owner`,commandOwnerHelp:`Command owners can run privileged commands and approve dangerous actions. This option is only available while no owner is configured.`,commandOwnerNeedsAdmin:`No command owner is configured. This connection needs operator.admin to assign the first owner.`,approvedNotice:`DM access approved.`,approvedOwnerNotice:`DM access approved and the first command owner was configured.`,approvedNotificationFailedNotice:`DM access approved, but the requester notification could not be delivered.`,approvedOwnerFailedNotice:`DM access approved, but the first command owner could not be configured.`,approvedFollowupsFailedNotice:`DM access approved, but requester notification and command-owner setup both failed.`,dismissedNotice:`DM access request dismissed. The sender can request access again.`},setup:{dialogLabel:`Set up {channel}`,title:`Set up {channel}`,genericTitle:`a channel`,subtitle:`Guided channel setup`,starting:`Starting setup…`,working:`Working…`,sessionExpired:`This setup session expired after the Gateway restarted. Close this dialog, then start channel setup again.`,continue:`Continue`,finish:`Finish`,copyText:`Copy`,openLink:`Open link`,viewDocs:`View docs`,doneTitle:`Channel configured`,doneBody:`Configuration saved. The gateway reloads the channel automatically; check its card for live status.`,doneNoChangesTitle:`No changes made`,doneNoChangesBody:`Setup finished without configuring a channel. Nothing was saved.`,whatsappScanTitle:`Link WhatsApp by scanning the QR code`,whatsappScanHelp:`On your phone, open WhatsApp → Settings → Linked devices → Link a device, then scan this code.`,whatsappQrLoading:`Generating QR code…`,whatsappQrHint:`Click Show QR to generate a pairing code.`,whatsappQrAlt:`WhatsApp QR`,whatsappLinked:`WhatsApp is linked and ready.`,regenerateQr:`New QR code`,linkLater:`Link later`},config:{schemaUnavailable:`Schema unavailable. Use Raw.`,channelSchemaUnavailable:`Channel config schema unavailable.`,loadingSchema:`Loading config schema…`},generic:{subtitle:`Channel status and configuration.`},discord:{title:`Discord`,subtitle:`Bot status and channel configuration.`},googleChat:{title:`Google Chat`,subtitle:`Chat API webhook status and channel configuration.`},imessage:{title:`iMessage`,subtitle:`macOS bridge status and channel configuration.`},signal:{title:`Signal`,subtitle:`signal-cli status and channel configuration.`},slack:{title:`Slack`,subtitle:`Socket mode status and channel configuration.`},telegram:{title:`Telegram`,subtitle:`Bot status and channel configuration.`},whatsapp:{title:`WhatsApp`,subtitle:`Link WhatsApp Web and monitor connection health.`,phoneNumber:`Phone number`,loggedOut:`Logged out.`,logoutConfirmTitle:`Log out of WhatsApp account {accountId}?`,logoutConfirmMessage:`Logging out of account {accountId} stops its listener and deletes its saved credentials.`,logoutNotCleared:`No stored WhatsApp session was cleared. It may already be absent, or its auth directory may require manual cleanup.`},nostr:{title:`Nostr`,subtitle:`Decentralized DMs via Nostr relays (NIP-04).`,profile:`Profile`,editProfile:`Edit Profile`,profilePicture:`Profile picture`,noProfile:`No profile set.`,noProfileHint:`Click "Edit Profile" to add your name, bio, and avatar.`,name:`Name`,displayName:`Display Name`,about:`About`,advanced:`Advanced`,profilePicturePreview:`Profile picture preview`,account:`Account`,username:`Username`,usernameHelp:`Short username (e.g., satoshi)`,bio:`Bio`,bioPlaceholder:`Tell people about yourself...`,bioHelp:`A brief bio or description`,displayNameHelp:`Your full display name`,avatarUrl:`Avatar URL`,avatarHelp:`HTTPS URL to your profile picture`,bannerUrl:`Banner URL`,bannerHelp:`HTTPS URL to a banner image`,website:`Website`,websiteHelp:`Your personal website`,nip05Identifier:`NIP-05 Identifier`,nip05Help:`Verifiable identifier (e.g., you@domain.com)`,lightningAddress:`Lightning Address`,lightningHelp:`Lightning address for tips (LUD-16)`,placeholders:{username:`satoshi`,displayName:`Satoshi Nakamoto`,avatarUrl:`https://example.com/avatar.jpg`,bannerUrl:`https://example.com/banner.jpg`,website:`https://example.com`,nip05:`you@example.com`,lightningAddress:`you@getalby.com`},notices:{timeout:`Request timed out after 30 seconds; the server may still have applied the change — check the profile before retrying.`,operationFailed:`{prefix}: {error}`,updateFailed:`Profile update failed`,publishFailed:`Profile publish failed on all relays.`,published:`Profile published to relays.`,importFailed:`Profile import failed`,importedFromRelays:`Profile imported from relays. Review and publish.`,imported:`Profile imported. Review and publish.`}}},agentStartup:{title:`Starting up`,description:`The agent is getting ready. This view will load automatically.`,short:`Starting up…`},lazyView:{errorTitle:`Panel failed to load`,genericSubtitle:`Something went wrong while loading this panel.`,staleTitle:`This view could not load`,staleSubtitle:`Some interface files could not be downloaded. Check your connection, then reload.`,reloading:`Reloading…`,retry:`Retry`,stylesFailed:`Styles failed to load, so the page may look broken.`},communityInvite:{title:`Pull up a chair.`,body:`There’s a place for you in the AI future. Join the Community on Reddit, Discord, and X.`,join:`Join`,follow:`Follow`,joinPlatform:`Join the OpenClaw community on {platform}`,followPlatform:`Follow OpenClaw on {platform}`,dismissForever:`Dismiss and don't show again`,dismissFailed:`Invitation dismissed, but your preference couldn't be saved.`},updates:{adminRequired:`Administrator access is required to change update settings or start an update.`,campaign:{countdown:`Updating in {time}`,waitingForIdle:`Waiting for active work · forced update in {time}`,held:`Update held · resumes in {time}`,applying:`Applying update…`},holdOneHour:`Hold 1 h`,reviewUpdate:`Review update`,run:{title:`Update progress`,phases:`Update phases`,steps:`Installation steps`,details:`Step details`,noDetails:`No step details recorded yet.`,verification:`Verification checks`,report:`Update report`,restarting:`Gateway restarting…`,reconnecting:`Reconnecting automatically. Update progress is saved on the gateway.`,progress:`{completed} of {total} phases complete`,phase:{requested:`Requested`,staging:`Staging`,validating:`Validating`,repairing:`Repairing`,activating:`Activating`,restarting:`Restarting`,verifying:`Verifying`,finished:`Finished`},step:{completed:`Complete`,in_progress:`In progress`,pending:`Pending`,failed:`Failed`,skipped:`Skipped`},oracle:{service:`Service`,version:`Version`,plugins:`Plugins`,channels:`Channels`,inference:`Inference`},oracleState:{pass:`Passed`,warn:`Not verified`,fail:`Failed`,pending:`Pending`}},confirm:{action:`Update and restart`},target:{version:`v{version}`,commitBehind:`{count} commit behind`,commitsBehind:`{count} commits behind`,viewChanges:`Compare on GitHub`},sidebar:{campaignTarget:`{status} · {target}`,updating:`Updating Gateway…`,availableTitle:`Update available`,availableSummary:`A newer revision is ready.`,blockedTitle:`Update blocked`,blockedSummary:`The selected revision could not be applied to this checkout.`,blockedWaiting:`Blocked · waiting for active work · {target}`,waitingForIdle:`Waiting for active work`},dialog:{disconnected:"The Gateway disconnected during the update. This page reconnects on its own. If it stays disconnected, run `openclaw triage` on the Gateway host to open a local coding agent for diagnosis and repair.",restarting:"The Gateway is restarting. This page disconnects and reconnects on its own. If it stays disconnected, run `openclaw triage` on the Gateway host to open a local coding agent for diagnosis and repair."},channel:{},installKind:{},page:{},coalescedRestart:`Update installed. A gateway restart is already in progress; status will refresh after it reconnects.`,error:`Update error: {error}`,checkError:`Could not check for updates: {error}`,status:`Update {status}: {reason}. {guidance}`,verificationFailedWithIdentity:"Update finished, but the running install does not match the expected revision. Expected {expected}, running {actual}. Run `openclaw triage` on the Gateway host before retrying.",handoffTimeout:"Update completion was not confirmed. Run `openclaw triage` on the Gateway host and inspect the result before retrying.",outcomeUnknown:"The update outcome is unknown. Run `openclaw triage` on the Gateway host and inspect the result before retrying.",triage:{hostHint:"If Ask OpenClaw is unavailable, run `openclaw triage` on the Gateway host to open a local coding agent for diagnosis and repair. Diagnose the cause before retrying."},report:{},failureReasons:{dirty:`Commit or stash changes, then retry.`,noUpstream:`Set an upstream branch, then retry.`,notGitInstall:"Not a git checkout. Run `openclaw update` from the CLI for a global reinstall.",notOpenclawRoot:`Run the update from an OpenClaw checkout or use the CLI global reinstall path.`,depsInstallFailed:`Dependency install failed. Fix the install error and retry.`,buildFailed:`Build failed. Fix the build error and retry.`,buildDirty:`The selected revision's build changed checkout files. Retry with a revision that includes its generated artifacts.`,uiBuildFailed:`The control UI rebuild failed. Fix the UI build error and retry.`,globalInstallFailed:`The global package install did not verify on disk. Retry or reinstall from the CLI.`,restartDisabled:`The update was not applied because gateway restarts are disabled. Enable restarts in config, then retry.`,restartUnavailable:`This global install cannot be safely replaced while restarts are disabled and no supervisor is present.`,externalSupervisorUpdateRequired:"This Gateway is managed by an external supervisor. Use your server or deployment's update workflow to update OpenClaw and restart the Gateway. The Control UI and `openclaw update` cannot update this installation. No package changes or Gateway restart were attempted.",restartUnhealthy:`The replacement process never became healthy. The previous process stayed up so you can recover.`,restartRevisionMismatch:`The restarted Gateway is running a different revision. Check the service install root and retry.`,restartRevisionUnavailable:`The restarted Gateway could not report its revision. Check the service install root and logs before retrying.`,alreadyCurrent:`This checkout is already at its tracked upstream revision.`,managedServiceHandoffAlreadyRunning:`Another managed update is already running. Wait for it to complete, then refresh update status.`,managedServiceHandoffUnavailable:"Stop the foreground Gateway, run `openclaw update`, then launch it again. For automatic updates, install a managed Gateway service.",doctorFailed:"Doctor repair failed. Run `openclaw doctor --non-interactive` and retry.",managedServiceHandoffFailed:"The update helper stopped before finishing. Run `openclaw update` in the terminal to see why.",managedServiceHandoffSpawnFailed:"The Gateway could not start the update helper. Run `openclaw update` in the terminal instead.",managedServiceHandoffParentTimeout:"The Gateway stayed up too long for the update helper. Start the update again, or run `openclaw update`.",default:`See the gateway logs for the exact failure and retry once the cause is fixed.`},failedAtStep:`The update failed at {step}: {cause}.`,succeededVersion:`Gateway updated to v{version}.`,succeededCommit:`Gateway updated · now on {sha}.`,succeeded:`Gateway updated and restarted.`},devices:{readOnly:{},pairing:{button:`Pair device`,adminRequired:`Administrator access is required to create setup codes.`,title:`Pair a device`,loadFailed:`Could not load the pairing dialog. Check your connection and try again.`},binding:{},inventory:{},capabilities:{},execApprovals:{}},worktrees:{adminRequired:`Browsing only. Worktree changes require operator.admin access.`,newWorktree:`New worktree`,ownerManual:`Manual`,ownerSession:`Session`,ownerWorkboard:`Workboard`,title:`Managed Worktrees`,subtitle:`Isolated repository checkouts owned by OpenClaw.`,cleanNow:`Clean up now`,name:`Name`,namePlaceholder:`auto`,baseBranch:`Base branch`,baseBranchPlaceholder:`Remote default`,repo:`Repository`,empty:`No managed worktrees.`,restorable:`Restorable`,restore:`Restore`,confirmDelete:`Snapshot and delete {name}?`,confirmForceDelete:`Snapshot failed: {error}
Delete without a snapshot?`},agentChip:Mr,agentScope:Nr,newSession:{title:`New session`,hint:`Pick where this session works, then say what to do.`,placementReloadBlocked:`Recovery needs a reload. Unsaved starts will be lost.`,discardUnsavedAndReload:`Discard unsaved starts and reload`},dashboardsPage:{emptyTitle:`No dashboards yet`,emptyDescription:`Dashboards created in your tasks will appear here.`,loadError:`Could not load dashboards: {error}`,openFocusMode:`Open dashboard in focus mode`,live:`Live`,byAuthor:`By {author}`,updated:`Updated {time}`,updatedUnknown:`Update time unknown`,totalLabel:`dashboards`,searchLabel:`Search dashboards`,searchPlaceholder:`Search dashboards…`,authorFilter:`Author`,allAuthors:`All authors`,sortLabel:`Sort`,sortUpdated:`Recently updated`,sortTitle:`Title A–Z`,resultCount:`Dashboards: {count}`,noResultsTitle:`No matching dashboards`,noResultsDescription:`Try another search or author.`},dashboardDocument:{close:`Close dashboard`,missingSession:`No dashboard session was specified.`,notFound:`This session could not be found.`,unavailable:`Session dashboards are unavailable for this connection.`,loadFailed:`Could not load this dashboard: {error}. Check the Gateway connection and try again.`},sessionsView:{subagentPrefix:`Subagent:`,automationPrefix:`Automation:`,actionRequiresConnection:`Connect to the Gateway to change sessions.`,actionUnavailable:`This Gateway does not support this session action.`,actionRequiresScope:`This action requires {scope} access.`,actionRequiresOwnership:`Only the session creator or an admin can make this change.`,deletePreservedReasons:{"owner-mismatch":`owned elsewhere`,busy:`live run or cleanup active`,"foreign-lock":`foreign Git lock`,"snapshot-failed":`OpenClaw could not create a safety snapshot`,"cleanup-failed":`cleanup failed`},draftCleanupFailed:`Session deleted; browser draft remains. Clear site data.`,title:`Sessions`,subtitle:`Browse sessions and manage per-session overrides.`,store:`Store: {path}`,active:`Updated within`,limit:`Limit`,createdBy:`Created by {name}`,ownedBy:`Owned by {name}`,archivedBy:`Archived by {name}`,archiveReason:`Archive reason`,archiveReasonManual:`Archived manually`,archiveReasonAgeRetention:`Automatically archived by age retention`,archiveReasonActiveSessionCap:`Automatically archived because the active-session limit was reached`,archiveReasonStaleDashboard:`Automatically archived after dashboard inactivity`,archiveReasonRestartRecovery:`Archived when a replacement session was recovered`,viewingNow:`viewing now`,owners:`Owners`,allOwners:`All owners`,involvingMe:`Involving me`,hideFromInvolvingMe:`Hide from Involving me`,showInInvolvingMe:`Show in Involving me`,specificOwner:`Specific owner`,specificOwnerAvailable:`Specific owner: {count} available`,specificOwnerSelected:`Specific owner: {name}`,ownerYou:`{name} (You)`,withParticipant:`with {name}`,withMoreParticipants:`+{count} more`,assignToMe:`Me`,assignTo:`Assign to…`,filterControls:`Session filters`,filters:`Filters`,sourceFilters:`Session source filters`,global:`Global`,unknown:`Unknown`,sessionState:`Session state`,all:`All`,snooze:`Snooze`,wakeSession:`Wake session`,snoozeHour:`In 1 hour`,snoozeThreeHours:`In 3 hours`,snoozeEvening:`This evening`,snoozeTomorrow:`Tomorrow`,snoozeNextWeek:`Next week`,snoozed:`Snoozed`,snoozeWakes:`Wakes {time}`,sessionSnoozed:`Snoozed until {time}`,snoozeTomorrowTime:`tomorrow {time}`,sessionArchived:`Session archived`,archiving:`Archiving…`,sessionsArchived:`Archived {count} sessions`,deleteAllArchived:`Delete all archived…`,deleteAllArchivedConfirm:`Delete {count} archived sessions and their transcripts? Any attached workers will be stopped safely first.`,activeTooltip:`Loads sessions updated in the last {count} minutes.`,limitTooltip:`Max sessions to load.`,globalTooltip:`Include global sessions.`,unknownTooltip:`Include unknown sessions.`,archivedOnlyTooltip:`Show only archived sessions.`,minutesPlaceholder:`min`,searchPlaceholder:`Filter by key, agent, label, kind…`,user:`User`,assistant:`Assistant`,selected:`{count} selected`,deleteSelected:`Delete`,selectAllOnPage:`Select all on page`,selectSession:`Select session`,optionalPlaceholder:`(optional)`,key:`Key`,label:`Label`,kind:`Kind`,updated:`Updated`,tokens:`Tokens`,goal:`Goal`,goalNote:`Goal note`,thinking:`Thinking`,fast:`Fast`,verbose:`Verbose`,reasoning:`Reasoning`,actions:`Actions`,addToWorkboard:`Add to Workboard`,openWorkboardCard:`Open Workboard card`,opensAsDashboard:`Opens as dashboard`,approvalNeeded:`Approval needed`,messageNeedsAttention:`{count} message needs attention`,messagesNeedAttention:`{count} messages need attention`,unsentDraft:`Unsent draft`,noSessions:`No sessions found.`,noActiveSessions:`No active sessions.`,noArchivedSessions:`No archived sessions.`,noSessionsMatchFilters:`No sessions match your filters.`,pagination:`{start}-{end} of {total} rows`,pageSize:`Rows per page`,rowsPerPage:`{count} per page`,showAll:`Show all`,inherit:`inherit`,offExplicit:`off (explicit)`,auto:`auto`,on:`on`,off:`off`,full:`full`,stream:`stream`,contextUsage:`{percent}% of context used ({used} / {context} tokens)`,promptBudgetUsage:`{percent}% of last-run prompt budget used ({used} / {context} tokens)`,promptBudgetUsageApprox:`Approximately {percent}% of last-run prompt budget used ({used} / {context} tokens)`,contextUsageApprox:`~{percent}% of context used ({used} / {context} tokens, approximate)`,showSessionDetails:`Show session details for {count}`,hideSessionDetails:`Hide session details for {count}`,sessionDetails:`Session details`,overrides:`Overrides`,status:`Status`,statusLive:`Live`,statusIdle:`Idle`,statusUnknown:`Unknown`,statusQueued:`Queued`,statusRunning:`Running`,statusDone:`Done`,statusFailed:`Failed`,statusInterrupted:`Interrupted`,statusKilled:`Killed`,statusTimeout:`Timed out`,waitingForAnswer:`Waiting for your answer`,waitingForApproval:`Waiting for approval`,questionsNeedAnswer:`{count} questions need your answer`,approvalsNeedApproval:`{count} requests need approval`,attentionMore:`+{count} more`,runFailedReason:`Run failed: {reason}`,childRunFailedReason:`Child session {label} failed: {reason}`,runErrorTimedOut:`Timed out`,runErrorUnknown:`Unknown error`,attentionRequired:`Session needs attention`,openSession:`Open session`,model:`Model`,provider:`Provider`,runtime:`Runtime`,runDuration:`Run duration`,lastActive:`Last active {time}`,surface:`Surface`,subject:`Subject`,room:`Room`,space:`Space`,sessionId:`Session ID`,activeRun:`Active run`,subagentsWorking:`Subagents working`,showChildSessions:`Show {count} child sessions for {session}`,hideChildSessions:`Hide {count} child sessions for {session}`,childSessions:`Child sessions`,showMoreChildren:`Show {count} more`,archived:`Archived`,pinned:`Pinned`,unread:`Unread`,automationAttached:`Automation attached`,incognito:`Incognito session`,cloudWorkerPlacement:`Placement: {state}`,placementWorkspaceConflict:`{placement} · 1 workspace conflict`,placementWorkspaceConflicts:`{placement} · {count} workspace conflicts`,cloudWorkerDiskWarning:`Cloud session disk space is low`,cloudWorkerDiskCritical:`Cloud session disk space is critically low`,cloudWorkerDescendantConflict:`Cloud worker child: 1 workspace conflict`,cloudWorkerDescendantConflicts:`Cloud worker children: {count} workspace conflicts`,renameSession:`Rename session`,renameSessionPrompt:`Rename session`,renameSessionMenu:`Rename…`,setIconMenu:`Set icon`,setColorMenu:`Color`,setIconColorMenu:`Icon & color`,sessionColor:`Session color: {color}`,colors:{red:`Red`,blue:`Blue`,green:`Green`,yellow:`Yellow`,purple:`Purple`,orange:`Orange`,pink:`Pink`,cyan:`Cyan`},iconEmojiSection:`Emoji`,iconGlyphSection:`Icons`,noIcon:`No icon`,noColor:`No color`,customEmojiCell:`Custom emoji…`,customEmojiTitle:`Custom emoji`,customEmojiSet:`Set`,customEmojiHint:`Any emoji works. Press {shortcut} for the system emoji picker.`,customEmojiHintNoShortcut:`Any emoji works.`,customIconCell:`Custom icon…`,customIconTitle:`Custom icon`,customIconHint:`Paste an emoji or SVG. Press {shortcut} for the system emoji picker.`,customIconHintNoShortcut:`Paste an emoji or SVG.`,removeIcon:`Remove icon`,pinSession:`Pin session`,pinRootSessionsOnly:`Only root sessions can be pinned; pin the parent session instead.`,unpinSession:`Unpin session`,markUnread:`Mark as unread`,markRead:`Mark as read`,markUnreadCount:`Mark {count} as unread`,markReadCount:`Mark {count} as read`,forkSession:`Fork conversation`,forkFromLastCompleted:`Fork from last completed message`,forkedSession:`Forked session`,copySessionId:`Session ID`,copySessionLink:`Session link`,copySessionPreviewLink:`Preview link`,copyMarkdown:`Conversation as Markdown`,openNewTab:`New tab`,openNewWindow:`New window`,splitBelow:`Split below`,workspaceEditors:`Workspace · editor`,resetAppearance:`Reset to default`,copyTranscriptChanged:`Conversation changed while copying. Try again.`,openWindowBlocked:`Allow pop-ups for this site, then try again.`,splitUnavailable:`Open a conversation on a wide screen to use split view.`,openPullRequest:`Open PR`,openInEditorMenu:`Open in`,archiveSession:`Archive session`,archiveSessionCount:`Archive {count}`,restoreSession:`Restore session`,restoreSessionCount:`Restore {count}`,moveSession:`Move session…`,moveSessionTitle:`Move session`,moveSessionDescription:`Choose where "{session}" should continue.`,moveSessionNoReplayWarning:`OpenClaw safely reconciles the current workspace before moving. Active work is never replayed.`,moveSessionActiveRunWarning:`The active turn will be interrupted. Partial output is not replayed; send the next turn again after the move.`,moveSessionAction:`Move session`,moveSessionCatalogFailed:`Could not load available destinations.`,moveSessionFailed:`Move failed`,moveSessionGatewayTarget:`Gateway`,movingSession:`Moving to {target}…`,movingSessionGeneric:`Moving session…`,stopCloudWorker:`Stop cloud worker…`,stopCloudWorkerConfirm:`Stop the cloud worker for "{session}"?`,stopCloudWorkerConfirmAction:`Stop worker`,initialTurnPausedByWorkerStop:`Worker stop requested. Review the initial message before retrying.`,stopCloudWorkerStale:`Gateway connection replaced before the cloud worker for "{session}" was stopped. Try again.`,deleteSessionMenu:`Delete…`,deleteSessionCount:`Delete {count}…`,deleteSessionConfirm:`Delete "{session}" and its transcript? Any attached worker will be stopped safely first.`,deleteSessionStale:`Gateway connection replaced before "{session}" was deleted. Try again.`,deleteSessionsConfirm:`Delete {count} sessions and their transcripts? Any attached workers will be stopped safely first.`,deleteSessionsStale:`Gateway connection replaced before {count} sessions were deleted. Try again.`,deleteSelectedConfirmOne:`Delete 1 session?
Stop any attached worker safely, then delete the session entry and archive its transcript.`,deleteSelectedConfirm:`Delete {count} sessions?
Stop any attached workers safely, then delete the session entries and archive their transcripts.`,groupBy:`Group by`,groupByNone:`None`,groupByCategory:`Custom groups`,groupByPerson:`Person`,showSessionPreview:`Show message preview`,hideEmptyGroups:`Hide empty groups`,hideEmptyGroupsSelected:`Hide empty groups: {mode}`,emptyGroupsWhenFiltering:`When filtering`,emptyGroupsAlways:`Always`,emptyGroupsNever:`Never`,showCronSessions:`Show automation sessions`,showSystemSessions:`Show system sessions`,groupByChannel:`Channel`,groupByKind:`Kind`,groupByAgent:`Agent`,groupByDate:`Date`,group:`Group`,ungrouped:`Ungrouped`,newGroup:`New group`,newGroupPrompt:`New group name`,newGroupTitle:`New group`,newGroupCreate:`Create group`,newGroupFailed:`Could not create the group.`,newGroupStale:`Gateway connection replaced before the group was saved. Try again.`,newGroupMoveSkipped:`Group created, but the move was skipped because the list changed. Move from the row menu.`,moveToGroup:`Move session to a group`,moveToGroupMenu:`Move to group`,moveToGroupMenuCount:`Move {count} to group`,removeFromGroup:`Remove from group`,moveBackToGroups:`Move back to Groups`,groupMenu:`Group options for {group}`,newSessionInGroup:`New session in {group}`,groupDefaultsMenu:`New session defaults`,groupDefaultsTitle:`New session defaults for "{group}"`,groupDefaultsDescription:`Choose where new sessions in this group start.`,groupDefaultsCwd:`Working directory`,groupDefaultsCwdPlaceholder:`Use the agent workspace`,groupDefaultsCwdHint:`Leave empty to use the selected agent's workspace.`,groupDefaultsMode:`Environment`,groupDefaultsLocal:`Current checkout`,groupDefaultsWorktree:`New worktree`,groupDefaultsWorktreeHint:`Runs each session in an isolated Git worktree.`,groupDefaultsFailed:`Could not save the group defaults.`,groupDefaultsRequiresAdmin:`This folder is outside agent workspaces. Saving defaults for it requires operator.admin. Open Inbox, select Limited access, request admin, then approve in Devices.`,groupDefaultsStale:`Gateway connection replaced before the defaults were saved. Try again.`,renameGroupMenu:`Rename group`,renameGroupTitle:`Rename group "{group}"`,groupNameLabel:`Group name`,deleteGroupMenu:`Delete group`,deleteGroupTitle:`Delete group "{group}"`,deleteGroupConfirm:`The group is removed. Its sessions move back to the session list.`,deleteGroupStale:`Gateway connection replaced before "{group}" was deleted. Try again.`,dragSessionHint:`Drag session to move between groups`,dateToday:`Today`,dateYesterday:`Yesterday`,dateThisWeek:`This week`,dateOlder:`Older`,dateNoActivity:`No activity`,groupRowCount:`{count} sessions`,groupRowCountOne:`{count} session`},agents:{noAgents:`No agents`,createdBy:`Created by {id}`,defaults:{title:`Agent defaults`,description:`Defaults every agent inherits unless overridden.`},copyId:`Copy ID`,default:`Default`,setDefault:`Set Default`,...Pr,selectTitle:`Select an agent`,selectSubtitle:`Pick an agent to inspect its workspace and tools.`,tabs:{overview:`Overview`,files:`Files`,tools:`Tools`,skills:`Skills`,channels:`Channels`,cronJobs:`Automations`,memory:`Memory`},context:{title:`Agent Context`,workspace:`Workspace`,openFilesTab:`Open Files tab`,primaryModel:`Primary Model`,runtime:`Runtime`,thinkingDefault:`Thinking Default`,identityName:`Identity Name`,identityAvatar:`Identity Avatar`,skillsFilter:`Skills Filter`,default:`Default`,configurationSubtitle:`Workspace, identity, and model configuration.`,schedulingSubtitle:`Workspace and scheduling targets.`},identity:Fr,overview:{title:`Overview`,subtitle:`Workspace paths and identity metadata.`,selectedSkills:`{count} selected`,allSkills:`all skills`,unsavedConfig:`You have unsaved config changes.`,modelSelection:`Model Selection`,primaryModel:`Primary model`,primaryModelDefault:`Primary model (default)`,notSet:`Not set`,inheritDefault:`Inherit default`,inheritDefaultModel:`Inherit default ({model})`,fallbacks:`Fallbacks`,addFallback:`Add fallback…`},toolCatalog:{groups:{files:`Files`,runtime:`Runtime`,web:`Web`,memory:`Memory`,sessions:`Sessions`,ui:`UI`,messaging:`Messaging`,automation:`Automation`,nodes:`Nodes`,agents:`Agents`,media:`Media`},descriptions:{read:`Read file contents`,write:`Create or overwrite files`,edit:`Make precise edits`,applyPatch:`Patch files (OpenAI)`,exec:`Run shell commands`,process:`Manage background processes`,webSearch:`Search the web`,webFetch:`Fetch web content`,memorySearch:`Semantic search`,memoryGet:`Read memory files`,sessionsList:`List sessions`,sessionsHistory:`Session history`,sessionsSend:`Send to session`,sessionsSpawn:`Spawn sub-agent`,sessionStatus:`Session status`,browser:`Control web browser`,canvas:`Control canvases`,message:`Send messages`,cron:`Schedule tasks`,gateway:`Gateway control`,nodes:`Nodes + devices`,agentsList:`List agents`,image:`Image understanding`},profiles:{minimal:`Minimal`,coding:`Coding`,messaging:`Messaging`,full:`Full`}},skillsPanel:{title:`Skills`,subtitle:`Per-agent skill allowlist and workspace skills.`,loadConfig:`Load the gateway config to set per-agent skills.`,customAllowlist:`This agent uses a custom skill allowlist.`,inheritedAllowlist:`This agent inherits the default skill allowlist.`,allEnabled:`All skills are enabled. Disabling any skill will create a per-agent allowlist.`,loadAgent:`Load skills for this agent to view workspace-specific entries.`,filter:`Filter`,searchPlaceholder:`Search skills`,shown:`{count} shown`,empty:`No skills found.`,missing:`Missing: {items}`,reason:`Reason: {items}`,updateError:`Could not update the agent skill allowlist.`},channels:{title:`Channels`,subtitle:`Gateway-wide channel status snapshot.`,lastRefresh:`Last refresh: {time}`,loadHint:`Load channels to see live status.`,empty:`No channels found.`,connectedCount:`{connected}/{total} connected`,noAccounts:`no accounts`,configuredCount:`{count} configured`,notConfigured:`not configured`,enabledCount:`{count} enabled`,setupGuide:`Setup guide`},cronPanel:{schedulerTitle:`Scheduler`,schedulerSubtitle:`Gateway automations status.`,jobs:`Jobs`,nextWake:`Next wake`,agentJobsTitle:`Agent Automations`,agentJobsSubtitle:`Scheduled jobs targeting this agent.`,noJobs:`No jobs assigned.`,runNow:`Run Now`,edit:`Edit`,editJob:`Edit {name}`},files:{emptyDraft:`Empty draft`,minRead:`{count} min read`,markdownPreview:`Markdown Preview`,extensionPreview:`{ext} Preview`,preview:`Preview`,expandPreview:`Expand preview`,collapsePreview:`Collapse preview`,editFile:`Edit file`,closePreview:`Close preview`,coreFilesTitle:`Core Files`,coreFilesSubtitle:`Bootstrap persona, identity, and tool guidance.`,workspace:`Workspace`,loadHint:`Load the agent workspace files to edit core instructions.`,empty:`No files found.`,missing:`missing`,selectFile:`Select a file to edit.`,willCreateOnSave:`Will Create on Save`,liveDraftPreview:`Live Draft Preview`,savedPreview:`Saved Preview`,updated:`Updated {time}`,notCreatedYet:`Not Created Yet`,updatedUnknown:`Updated Unknown`,missingHint:`This file is missing. Saving will create it in the agent workspace.`,addFile:`Add file…`,createHint:`This file does not exist yet. Saving will create it in the agent workspace.`,content:`Content`,words:`{count} words`,lines:`lines`,overwrite:`Overwrite`,conflictHint:`This file changed in the agent workspace after this draft was started. Reload to take the workspace version, or Overwrite to replace it with this draft.`}},debug:{lanes:{lane:`Lane`,active:`Active`,queued:`Queued`,blocked:`Blocked`},overlay:{title:`System busyness`,eyebrow:`Live diagnostics`,move:`Move system busyness with arrow keys, or drag`,minimize:`Minimize system busyness`,expand:`Expand system busyness`,lanes:`Lanes`,status:`Event loop / status`,activeRuns:`Active runs`,events:`Events`,cpu:`CPU`,memory:`Memory`,delayP99:`Delay p99`}},configForm:{redactedPlaceholder:`[redacted - click reveal to view]`,sectionHelp:`Help for {section}`,advancedDivider:`Advanced`,advancedSettings:`Advanced settings`,hideValue:`Hide value`,revealValue:`Reveal value`,disableStreamToReveal:`Disable stream mode to reveal value`,storedSecretNotRevealable:`This editor cannot reveal the stored value.`,unsupportedType:`Unsupported type: {type}. Use Raw mode.`,structuredSecretRaw:`Structured value (SecretRef) - use Raw mode to edit`,structuredSecretFile:`Structured value (SecretRef) - edit the config file directly`,defaultValue:`Default: {value}`,select:`Select...`,enumOn:`On`,enumOff:`Off`,enumAuto:`Auto`,nullValue:`null`,jsonValue:`JSON value`,invalidJson:`Enter valid JSON before leaving this field.`,invalidString:`Enter a value that matches this setting's constraints.`,invalidNumber:`Enter a value within the allowed range and step.`,draftRejected:`This setting could not be saved. Your draft is still here.`,unsupportedArray:`Unsupported array schema. Use Raw mode.`,itemCountOne:`{count} item`,itemCount:`{count} items`,add:`Add`,noItems:`No items yet. Click "Add" to create one.`,removeItem:`Remove item`,customEntries:`Custom entries`,addEntry:`Add Entry`,key:`Key`,removeEntry:`Remove entry`,renameRedactedBlocked:`This entry holds a stored secret. Add the new key with its value, then remove this one.`,schemaUnavailable:`Schema unavailable.`,unsupportedSchema:`Unsupported schema. Use Raw.`,unsupportedNode:`Unsupported schema node. Use Raw mode.`,noSettingsMatch:`No settings match "{query}"`,noSettingsInSection:`No settings in this section`,sections:{}},quickSettings:{language:`Language`,model:{title:`Model & Thinking`,model:`Model`,thinking:`Thinking`,fastMode:`Fast Mode`,default:`Default`,modelPolicy:`Model policy`,thinkingLevels:{off:`Off`,low:`Low`,medium:`Medium`,high:`High`},fastModes:{auto:`Auto`,fast:`Fast`,standard:`Standard`,on:`On`,off:`Off`}},channels:{title:`Channels`,connect:`Connect →`},appearance:{lobsterVisits:`Lobster visits`,lobsterVisitsOn:`Drops by occasionally`,lobsterVisitsThemeHidden:`The lobster stays home while the {theme} theme is active. Other visitors still drop by.`,lobsterVisitsOff:`Never visits`,lobsterSounds:`Lobster sounds`,lobsterSoundsOn:`Tiny blubs when touched`,lobsterSoundsOff:`Silent`,lobsterdex:`Lobsterdex`,lobsterdexSeen:`{seen}/{total} visited`,lobsterdexFirstVisited:`{name} · first visited {date}`,lobsterdexCardFirstVisited:`First visited {date}`,lobsterdexCardShinySeen:`✦ Shiny spotted {date}`,lobsterdexCardCopyLink:`Copy link`,lobsterdexOpen:`Open Lobsterdex`},security:{intro:`Review gateway access, tool policy, device authentication, and approvals.`,title:`Security`,gatewayAuth:`Gateway auth`,execPolicy:`Exec policy`,browserEnabled:`Browser enabled`,toolProfile:`Available tools`,toolProfileDefault:`Using core and default plugin tools. Choose Full to include available optional plugin tools.`},system:{gatewayHost:`Gateway Host`,up:`Up {duration}`,cpu:`CPU`,memory:`Memory`,disk:`Disk`,usage:`{label} usage`,loadAverage:`Load average: {values}`,core:`{count} core`,cores:`{count} cores`,load:`load`,used:`used`,freeOf:`{free} free of {total}`,runtime:`Node {version} · PID {pid}`},personal:{browserOnly:`Stored in this browser only.`}},configPage:{},configView:{adminRequired:`Configuration changes require operator.admin access.`,channelSettings:`Channel settings`,categories:{},sections:{},themes:{},textSizes:{},profileSyncedHint:`Saved to your profile — follows you on every device.`,syncedHint:`Synced across your devices through the gateway.`,syncPendingHint:`Waiting to sync through the gateway.`,notifications:{},appearance:{},chatPrefs:{},sidebarPrefs:{},sessionObserver:{},connection:{},root:`<root>`,itemCount:`[{count} item]`,itemCountPlural:`[{count} items]`,form:`Form`,raw:`Raw`,formUnsafeTitle:`Form view can't safely edit some fields`,rawTitle:`Edit raw JSON/JSON5 config`,rawUnavailableTitle:`Raw mode unavailable for this snapshot`,open:`Open`,fileOpenedOnGateway:`Configuration file opened on Gateway host.`,applying:`Applying…`,autoSaveSaving:`Saving…`,autoSaveSaved:`Saved`,autoSavePaused:`Autosave paused after reconnect`,saveNow:`Save`,autoSaveFailed:`Save failed`,autoSaveRejected:`Settings not applied`,autoSaveRejectedHint:`Current settings are unchanged.`,rejectionDetails:`Show reason`,recoveryNotRestored:`Settings could not be restored. Your draft is kept. Check {path} before saving again.`,recoveryUnknown:`Settings restoration could not be confirmed. Your draft is kept. Check {path} before saving again.`,recoveryBackup:`Inspect the recovery backup at {path}.`,recoveryReload:`Discard draft and reload`,discardUnconfirmed:`The last save could not be confirmed. Your draft is kept. Reload configuration before discarding this setting.`,writeGatewayChanged:`This unsettled change belongs to a different Gateway. Reconnect to that Gateway to retry, or discard the draft.`,writeUnconfirmed:`The last configuration change could not be confirmed. Your draft is kept. Retry before changing other settings.`,autoSaveConflict:`Settings changed elsewhere`,retry:`Retry`,applyChanges:`Apply changes`,rawDiscard:`Discard`,reloadBlocked:`Finish saving or discard pending config changes before reloading.`,rawDraftBlocksApply:`Save or discard edits in the Raw editor before applying changes.`,rawDraftPendingFormTitle:`Unsaved raw config edits — save or discard them before switching to Form.`,rawDraftBlocksFormEdit:`Unsaved raw config edits could not be parsed; resolve them in the Raw editor before changing settings.`,rawDraftUnverified:`Cannot verify the raw draft against the saved configuration; reload and retry.`,invalidConfig:`Your configuration is invalid. Some settings may not work as expected.`,dismissWarning:`Don't remind again`,viewPendingChangesRaw:`View pending changes`,rawDiffUnavailable:`Changes detected (JSON diff not available)`,hideEnvValues:`Hide env values`,revealEnvValues:`Reveal env values`,peek:`Peek`,loadingSchema:`Loading schema…`,formUnsafeCount:`1 setting in this config can only be edited as text: {paths}`,formUnsafeCountPlural:`{count} settings in this config can only be edited as text: {paths}`,formUnsafeMore:`+{count} more`,openRawEditor:`Open Raw editor`,rawConfig:`Raw config (JSON/JSON5)`,secretCount:`{count} secret`,secretCountPlural:`{count} secrets`,redacted:`redacted`,visible:`visible`,revealSensitive:`Reveal sensitive values`,hideSensitive:`Hide sensitive values`,toggleRawRedaction:`Toggle raw config redaction`,sensitiveHidden:`{count} sensitive value hidden. Use the reveal button above to edit the raw config.`,sensitiveHiddenPlural:`{count} sensitive values hidden. Use the reveal button above to edit the raw config.`},execApproval:{scope:{standingGrant:`Always allow runs this exact command for "{automation}" without asking, until revoked (revocable)`,standingGrantDays:`Always allow runs this exact command for "{automation}" without asking, for {count} days (revocable)`,messageSend:`Sends to {count} recipient(s) via {target}`,payment:`Pays {amount} {currency} to {target}`,externalPost:`Posts externally to {target}`},expiresIn:`expires in {time}`,expired:`expired`,execApprovalNeeded:`Exec approval needed`,pluginApprovalNeeded:`Plugin approval needed`,requestedBySession:`Approval requested by session {session}`,pending:`{count} pending`,otherPending:`Other pending requests`,reviewRequest:`Review approval from {agent}: {command}`,decisionRequest:`{decision}: {command}`,agentPendingOne:`{count} pending approval`,agentPending:`{count} pending approvals`,allowOnce:`Allow once`,alwaysAllow:`Always allow`,alwaysAllowHere:`Always allow here`,allowAlwaysUnavailable:`Allow Always is unavailable for this command.`,reviewOnly:`Review only. Sign in with approval access to record a decision.`,deny:`Deny`,details:`Details`,labels:{host:`Host`,session:`Session`,cwd:`CWD`,resolved:`Resolved`,security:`Security`,ask:`Ask`}},approvalPage:{brandName:`OpenClaw`,eyebrow:`Operator approval`,loadingTitle:`Loading approval`,loadingDescription:`Checking the current approval state with the Gateway.`,unavailableTitle:`Approval unavailable`,unavailableDescription:`This approval could not be found or this device is not authorized to review it.`,connectionErrorTitle:`Connection interrupted`,connectionErrorDescription:`OpenClaw cannot confirm or record a decision while disconnected. Reconnect to check the current status.`,retry:`Retry`,execTitle:`Command approval`,pending:`Waiting for your decision`,pendingDescription:`Review the request carefully. The first answer from any surface wins.`,approvedHere:`Approved here`,deniedHere:`Denied here`,resolvedElsewhere:`Resolved elsewhere`,resolvedElsewhereDescription:`Another surface or an earlier attempt recorded the decision first.`,approved:`Approved`,denied:`Denied`,expired:`Expired`,cancelled:`Cancelled`,allowedOnceDescription:`The operation was approved for this request only.`,allowedAlwaysDescription:`The operation was approved with the always-allow decision.`,deniedDescription:`The operation was denied and will not continue.`,expiredDescription:`No decision arrived before the deadline, so the operation was denied.`,cancelledDescription:`The requesting run ended before a decision could be used.`,summaryLabel:`Summary`,commandLabel:`Command`,requestLabel:`Request details`,nodeLabel:`Node`,expiresLabel:`Expires`,resolvedLabel:`Resolved`,actionsLabel:`Approval decisions`,resolvingDecision:`Recording {decision}…`,safeToClose:`The decision is recorded. You can close this page.`,openControlUi:`Open Control UI`},agentTools:{},skillGroups:{workspace:`Workspace Skills`,builtIn:`Built-in Skills`,installed:`Installed Skills`,extra:`Extra Skills`,other:`Other Skills`},skillsPage:{},skillStatus:{bundled:`bundled`,eligible:`eligible`,blocked:`blocked`,disabled:`disabled`,blockedAllowlist:`blocked by allowlist`,blockedAgentFilter:`blocked by agent filter`},nav:{gateway:{sectionLabel:`Gateway`,menuLabel:`Gateway: {gateway}`,primaryTag:`primary`,setPrimary:`Set as primary…`,openSettings:`Gateway settings…`,connected:`Connected`,unreachable:`Unreachable`,unknown:`Unknown status`},owner:`Owner`,back:`Back`,forward:`Forward`,settings:`Settings`,askOpenClaw:`Ask OpenClaw`,settingsGroupDevice:`This Mac`,settingsGroupThisComputer:`This computer`,settingsGroupThisIPhone:`This iPhone`,settingsGroupThisIPad:`This iPad`,settingsGroupThisDevice:`This device`,settingsGroupConnections:`Connections`,settingsGroupAgents:`Agents & Tools`,settingsGroupSecurity:`Privacy & Security`,settingsGroupSystem:`System`,settingsSearchLabel:`Search settings`,settingsSearchPlaceholder:`Search settings…`,settingsSearchNoResults:`No matching settings.`,settingsSearchClear:`Clear settings search`,settingsLoadFailed:`Settings navigation could not load.`,exitSettings:`Back to app`,expand:`Expand sidebar`,collapse:`Collapse sidebar`,resize:`Resize sidebar`,more:`More`,home:`Home`,pages:`Pages`,customize:`Edit pinned items`,customizeReset:`Reset pinned items`,workboardGroup:`WorkBoard`},terminal:{title:`Terminal`,toggle:`Toggle terminal`,open:`Open terminal`,openWindow:`Open terminal in new window`,hide:`Hide terminal`,resize:`Resize terminal panel`,newSession:`New terminal session`,addFiles:`Add files to terminal`,dropFiles:`Drop files to add them`,uploadProgress:`Uploading {current} of {total}`,uploadFailed:`Upload failed`,retryUpload:`Retry`,insertUploadedPaths:`Insert uploaded paths`,uploadExpired:`Uploaded files may have expired. Cancel this batch and choose the files again.`,closeSession:`Close terminal session`,sessions:`Terminal sessions`,refreshSessions:`Refresh`,loadingSessions:`Loading sessions…`,noSessions:`No live terminal sessions`,currentSession:`current`,sessionAttached:`attached`,attachSession:`Attach session`,attachFailed:`Could not attach terminal session`,startCancelled:`Terminal start was cancelled. Try again.`,connecting:`Connecting to session…`,connectionTimedOut:`Session did not connect within 30 seconds.`,refreshRequired:`Control UI updated. Reload this page to continue the terminal action.`,tabLabel:`shell {n}`,tabHint:`{agent} · {cwd}`,agentOwnedBadge:`agent`,exited:`exited`,exitedCode:`exited ({code})`,exitedSignal:`exited (signal {signal})`,detached:`detached`,dockBottom:`Dock to bottom`,dockRight:`Dock to right`,dockMain:`Fill main content area`,dockMode:`Terminal panel position`,unavailable:`The terminal is not available on this gateway.`,unusableSession:`The Gateway returned an unusable terminal session (missing {field}). The Gateway is likely older than this Control UI — update it, then retry.`,uploadTooLarge:`File exceeds the 16 MiB terminal upload limit: {file}`,uploadUnsafeCmdPath:`Cannot safely insert an uploaded path containing % or ! into cmd.exe`,uploadUnsupportedShell:`Cannot safely insert an uploaded path into unsupported shell: {shell}`,uploadInvalidNativePath:`Cannot safely insert the uploaded native file path`},browser:{nativeTab:`App tab`,remoteTab:`Agent browser tab`,stop:`Stop loading`,profile:`Browser profile: {profile}`,title:`Browser`,open:`Open`,openPanel:`Open browser panel`,moreActions:`More actions`,copyUrl:`Copy URL`,openNewTab:`Open in new tab`,openWithinOpenClaw:`Open in OpenClaw`,toggle:`Toggle browser panel`,close:`Close browser panel`,resize:`Resize browser panel`,newTab:`New tab`,closeTab:`Close tab`,untitledTab:`New tab`,back:`Back`,forward:`Forward`,reload:`Reload`,openExternal:`Open in your browser`,urlPlaceholder:`Enter a URL and press Enter`,dockBottom:`Dock to bottom`,dockRight:`Dock to right`,annotate:`Annotate page`,inspect:`Inspect element`,annotateSend:`Send to chat`,annotateUndo:`Undo`,annotateClear:`Clear`,annotateDone:`Exit annotate mode`,annotateHint:`Draw on the page, then send the markup to your chat.`,inspectName:`Name`,inspectRole:`Role`,inspectFocusable:`Focusable`,loading:`Loading page…`,notRunning:`The gateway browser is not running.`,start:`Start browser`,errors:{},annotatePrompt:{}},desktop:{title:`Desktop`,openWindow:`Open desktop in new window`,unavailable:`Desktop viewing is unavailable for this connection.`,toggle:`Toggle desktop panel`,reconnect:`Reconnect`,connecting:`Connecting to desktop…`},systems:{},routeTitles:{modelProviders:`Models`,notifications:`Notifications`,advanced:`Advanced`},tabs:{device:`This Mac`,devicePermissions:`Permissions`,agentsHome:`Agents`,agents:`Agents`,activity:`Activity`,meetings:`Meetings`,apps:`Apps`,portals:`Portals`,approvals:`Approvals`,workboard:`Workboard`,worktrees:`Worktrees`,channels:`Channels`,connection:`Gateway`,sessions:`Sessions`,systems:`Systems`,usage:`Usage`,cron:`Automations`,skills:`Skills`,plugins:`Plugins`,skillWorkshop:`Skill workshop`,devices:`Devices`,cloudWorkers:`Cloud workers`,chat:`Chat`,dashboards:`Dashboards`,custodian:`OpenClaw`,profile:`Profile`,communications:`Communications`,appearance:`Appearance`,lobsterdex:`Lobsterdex`,automation:`Automation`,mcp:`MCP`,memory:`Memory`,search:`Search`,talk:`Talk`,infrastructure:`Infrastructure`,labs:`Labs`,updates:`Updates`,about:`About`,aiAgents:`Agent Defaults`,modelSetup:`Model Setup`,memoryImport:`Import Memory`,security:`Privacy & Security`,secrets:`Secrets`,debug:`Debug`,logs:`Logs`,plugin:`Plugin`},subtitles:{device:`App settings and capabilities on this Mac.`,devicePermissions:`Manage macOS access, location, and computer presence.`,agentsHome:`Who is on your team and what they are doing`,agents:`Workspaces, tools, identities.`,activity:`Recent sessions across people using this gateway.`,meetings:`Meeting notes and transcripts across this gateway.`,apps:`Companion apps for phone, watch, desktop, and browser.`,portals:`Live previews from agent-run applications.`,approvals:`Recent exec, plugin, and system-agent approvals.`,workboard:`Agent work queue and session handoff.`,worktrees:`Isolated agent task checkouts and recovery snapshots.`,channels:`Channels and settings.`,connection:`Gateway endpoint, credentials, and handshake status.`,sessions:`Active sessions and defaults.`,systems:`Machines and desktops.`,usage:`API usage and costs.`,cron:`Scheduled tasks and recurring agent runs.`,skills:`Manage your agent skills`,plugins:`Extend your Claw with tools`,skillWorkshop:`The skills your agent uses now, suggestions waiting for review, and past decisions.`,devices:`Paired devices, pairing approvals, and exec bindings.`,cloudWorkers:`Profiles and machine sizes for cloud sessions.`,chat:`Gateway chat for quick interventions.`,dashboards:`Tasks with saved dashboards.`,custodian:`System setup and care.`,config:`Legacy settings route; opens Appearance.`,profile:`Your display name, avatar, and identity on this gateway.`,communications:`Messages, text-to-speech, and meeting capture settings.`,appearance:`Theme and UI settings.`,lobsterdex:`Every lobster palette that has visited this browser.`,automation:`Commands, hooks, automations, and plugins.`,mcp:`MCP servers, auth, tools, and diagnostics.`,memory:`Memory engine, search, and dreaming.`,search:`Choose how agents search the web and check provider health.`,talk:`Realtime voice: provider, model, and speaker voice.`,infrastructure:`Gateway, browser, node host, discovery, and ACP settings.`,labs:`Experimental agent and tool capabilities.`,updates:`Release channel, automatic updates, and current update status.`,about:`Control UI and connected Gateway build identity.`,aiAgents:`Global agent defaults: skills, tools, and session.`,modelSetup:`Connect a verified AI model`,modelProviders:`Default models, behavior, provider access, usage, and cost.`,memoryImport:`Bring Codex and Claude Code memory into an agent workspace.`,notifications:`Browser push notifications from your gateway.`,security:`Gateway auth, exec policy, tool profile, and approvals.`,advanced:`Every remaining config section, plus the raw file editor.`,debug:`Snapshots, events, RPC.`,logs:`Live gateway logs.`,plugin:`Plugin-provided panel.`},meetingCapture:{title:`Meeting capture`,description:`Choose which sources can save meeting notes on this Gateway.`,sources:`Auto-start sources`},cloudWorkersPage:{},portalsPage:{},modelSetup:{discovery:{},missingAuth:`No provider credential is configured for this model. Set it up in Model Setup.`,commandHint:`Try /models or /help.`,heading:`Connect a verified AI model`,intro:`OpenClaw discovers AI access on this Gateway. Choose a provider to begin; nothing is selected, tested, installed, or saved automatically.`,required:{title:`No AI provider configured`,body:`Connect a provider and choose a model to send messages.`,action:`Connect an AI provider`},loading:`Checking this Gateway for available AI access…`,testing:`Testing — asking the selected model for a quick reply…`,retry:`Retry`,checkAgain:`Check again`,recovery:{unknown:`The previous activation is unresolved. Check again refreshes the current setup without repeating it. If a model is available, you can verify and use it.`,wait:`The previous setup attempt may still be running. Check again can refresh its result. If no model appears, check again after {time} to choose a provider.`,useCurrent:`Verify & use selected model`},verify:{},access:{adminRequired:`Model setup requires operator.admin access.`,gatewayTooOld:`The Gateway is running an older OpenClaw version`},candidates:{title:`Found on this Gateway`,recommended:`Recommended`,credentialsReady:`Credentials ready`,signInNeeded:`Sign-in needed`,detected:`Detected`,testAndUse:`Test & use`,retry:`Retry test`,testingButton:`Testing…`},nativeDiscovery:{},nativeModels:{title:`Use an installed agent`,body:`Choose a model from an installed agent. It keeps its own sign-in and tools. Use saves your choice without running the setup test.`,choose:`Choose a model`,use:`Use`,saving:`Saving…`,loading:`Checking installed agents…`,empty:`No models are available from installed agents. Check the installed app, then open the picker again.`,unconfirmed:`Availability not confirmed`},empty:{title:`Recommended installs`,intro:`Install an assistant or local model service, then check again.`},signIn:{title:`Set up and verify a model`,description:`Setup requests a model reply. To save an account first, choose Connect provider.`,verify:`Set up & verify`,install:`Review & install`,custom:`Set up endpoint`,more:`More sign-in options`},prepare:{title:`Run a model locally`,intro:`Use a local model service or prepare a private GGUF model on this Gateway.`,ollamaButton:`Check & set up`,ollamaLabel:`Ollama`,ollamaHint:`Connect to the Ollama service on this Gateway and prepare a tools-capable model`,llamaCppLabel:`llama.cpp`,providerNotReady:`{provider} did not expose a usable local model. Review the setup result, then retry.`},manual:{title:`Connect with an API key or token`,provider:`Provider and access method`,selectProvider:`Select a provider`,selectProviderHint:`Choose where this credential comes from`,accessValue:`API key or token`,accessValueFor:`{provider} API key or token`,accessValuePlaceholder:`Paste an API key or token`,connectAndVerify:`Connect & verify`,verifyHint:`OpenClaw verifies a real model reply before marking the connection ready.`,required:`Choose a provider and enter an API key or token.`},success:{},utility:{},failure:{auth:`Authentication failed`,rateLimit:`Rate limited`,billing:`Billing problem`,timeout:`Timed out`,format:`Invalid response`,unavailable:`Unavailable`,unknown:`Connection failed`},failureGuidance:{auth:`Review the provider credential or sign-in, then retry.`,rateLimit:`Wait for the provider limit to reset, then retry.`,billing:`Restore provider billing or quota, then retry.`,timeout:`The model did not finish the setup test in time. Warm it or choose a faster model, then retry.`,unavailable:`Make sure the provider service is running and reachable, then retry.`,format:`Check that the endpoint exposes a compatible chat model, then retry.`,unknown:`Review the connection details, then retry.`},errors:{requestFailed:`Model setup request failed.`,activationFailed:`The model could not be activated.`},wizard:{dialogLabel:`Provider sign-in`,prepareDialogLabel:`Local model setup`,title:`Sign in with a provider`,connected:`Account connected. Choose a model when you want to test a reply.`,failed:`Could not finish. Open Details to see what to do next.`,details:`Details`,prepareTitle:`Set up a local model`,starting:`Starting provider sign-in…`,prepareStarting:`Starting local model setup…`,checking:`Checking your model setup…`,working:`Working…`,continue:`Continue`,submit:`Submit`,openSignIn:`Open sign-in`,copy:`Copy`,copyCode:`Copy code`,copyLink:`Copy link`,manualEntry:`Use manual entry`,browserInstructions:`Complete sign-in in your browser, then return here.`,waiting:`Waiting for sign-in…`,deviceCodeWarning:`Continue only if you started this sign-in yourself. If a website or another person gave you this code, cancel.`,expires:`Expires in {count} minutes`,cancelled:`Provider sign-in was cancelled.`,finishingStep:`Setup is finishing the current step. You can cancel when it finishes.`,cancelFailed:`Could not confirm cancellation: {error}`,sessionExpired:`The Gateway no longer has this setup session. It may already have finished. Close this dialog and choose Check again to review the current setup.`,gatewayNotResponding:`The Gateway is not responding. Check that it is running, then try again.`,gatewayReconnecting:`The Gateway is not responding. Waiting for it to reconnect.`,notComplete:`Sign-in finished, but model setup is not complete yet.`}},memoryImport:{},onboarding:{memoryImport:{title:`Bring your assistant memory with you`,body:`OpenClaw found memory from other coding assistants. Import it into your agent workspace?`,plannedCount:`{count} ready to import`,alreadyImported:`Already imported: {count}`,sourceUnavailable:`Source path unavailable`,import:`Import`,skip:`Skip`,reviewDetails:`Review details`,importingProvider:`Importing…`,providerResult:`Migrated {migrated}, skipped {skipped}`,providerIncomplete:`Migrated {migrated}, skipped {skipped}, {errors} failed, {conflicts} conflicts`,providerError:`Import failed: {error}`,connectionChanged:`Skipped: the Gateway connection changed during the import`,unknownError:`Request failed`,doneTitle:`Memory import finished`,doneBody:`Migrated {migrated}, skipped {skipped}. You can continue setting up OpenClaw.`}},assistantPanel:{title:`Assistant sidebar`,home:`Home`,toggle:`Talk to your Home agent`,openHome:`Open Home full page`,close:`Close assistant sidebar`,resize:`Resize assistant sidebar`,dockBottom:`Dock assistant sidebar at bottom`,dockRight:`Dock assistant sidebar at right`,context:`Working on: {context}`,contextOff:`Work context off`,removeContext:`Remove work context`,includeContext:`Include work context`,selection:`Selected text`,attachSelection:`Attach selected text`,removeSelection:`Remove selected text`},custodian:{title:`OpenClaw`,subtitleCaretaker:`System setup and care.`,exitSetup:`Exit setup`,newAgent:`New agent`,hatchDraft:`Wake up, my friend!`,placeholder:`Message OpenClaw…`,sensitivePlaceholder:`Enter sensitive value…`,sensitiveReply:`Sensitive reply sent`,cancel:`Cancel`,send:`Send`,thinking:`OpenClaw is thinking`,earlier:`Earlier`,requestFailed:`OpenClaw could not reply. Try again.`,connectionChanged:`The Gateway connection changed. Retry to continue this setup.`,sessionRestarted:`{error} OpenClaw started a fresh session; earlier messages remain for context.`,unsupportedGateway:`Update the Gateway to continue setup with OpenClaw.`,panel:{title:`OpenClaw`,toggle:`Toggle Ask OpenClaw`,close:`Close Ask OpenClaw`,resize:`Resize Ask OpenClaw`,dockBottom:`Dock Ask OpenClaw at bottom`,dockRight:`Dock Ask OpenClaw at right`},history:{button:`History`,title:`Recent changes`,description:`What changed on this system, newest first.`,loading:`Loading recent changes…`,empty:`No recorded changes yet.`,requestFailed:`OpenClaw could not load change history.`,loadMore:`Load more`,loadingMore:`Loading more…`,changedPaths:`Changed paths ({count})`,invalidEdit:`This manual edit did not pass configuration validation.`,opaqueChange:`Formatting or comments changed without visible configuration path changes.`,sources:{systemAgent:`system-agent`,doctor:`doctor`,settings:`settings`,cli:`CLI`,pluginInstall:`plugin install`,manualEdit:`manual edit`,unknown:`unknown`}},nudge:{configReload:`Configuration reload stopped — ask me what happened`,channelAuth:`{channel} authentication degraded — ask me what happened`,channelDisconnected:`{channel} just disconnected — ask me what happened`,channelDegraded:`{channel} is degraded — ask me what happened`,channelFallback:`A channel`,dismiss:`Dismiss this update`,channelSetupTitle:`Reach OpenClaw outside this app`,channelSetupBody:`The web app already works. Add a channel only if you want to message OpenClaw from another service.`,channelSetupAction:`Set up a channel`,channelSetupDismiss:`Keep using the web app`,channelStatusErrorTitle:`Channel status is unavailable`,channelStatusErrorBody:`Retry the check, or keep using the web app without a channel.`}},mcpServers:{},mcpPage:{},talkPage:{intro:`Configure realtime voice providers, models, and speaker voices.`,voiceSection:{title:`Realtime voice`,description:`Continuous speech conversations with your agent. The pickers below write talk.realtime settings; the full form further down covers everything else.`},status:{title:`Status`,ready:`Ready`,notReady:`Not configured`,unavailable:`Unavailable`,unavailableHint:`Connect to the Gateway to check realtime voice readiness.`,activeProvider:`Active provider: {provider}`,noProvider:`No realtime voice provider is configured yet.`},provider:{title:`Provider`,description:`Auto picks the first provider with working credentials.`,auto:`Auto`},model:{title:`Model`,description:`Realtime voice model for browser Talk sessions.`,default:`Provider default`,defaultNamed:`Default ({model})`},voice:{title:`Speaker voice`,description:`Voice used for spoken replies. GPT-Live locks the voice once a call starts.`,default:`Provider default`,unsupported:`unsupported`,unsupportedDefault:`This saved voice is unavailable for the selected route. Provider default will be used.`},gptLive:{title:`GPT-Live`,hint:`Released browser/Gateway-owned WebRTC tries OAuth first and falls back to a Platform API key. Direct backend sockets and unlisted or private routes require Platform API-key access. Delegated work can be steered while running and requires exact spoken confirmation for high-impact actions.`,ready:`Ready`}},memoryPage:{},sessionsPage:{hubTablistLabel:`Session sections`},pluginsPage:{},labsPage:{intro:`Labs contains experimental capabilities that may change, break, or disappear between releases.`,sectionTitle:`Experimental features`,sectionDescription:`Changes save without restarting the Gateway. Code Mode and Tool Search apply to future agent runs.`,documentation:`Documentation`,restartRequired:`Gateway restart required.`,saveErrorTitle:`Could not update feature`,saveFailed:`The feature setting could not be saved.`,decisionAssistance:{},codeMode:{},swarm:{title:`Swarm`,groupTitle:`Parallel tasks`,defaultPhase:`Unphased`,progress:`{complete} of {total}`,active:`{running} running · {queued} queued · {failed} failed or stopped`,finished:`{done} completed · {failed} failed or stopped`,completed:`{done} completed`,failedOrStopped:`Failed or stopped`,childOutcome:`Child runs finished. Check the conversation for the final response.`,childOutcomeProcessing:`Child runs finished. The parent is processing their results.`,details:`Child details`,detailsUnavailable:`Child details are unavailable. Counts include all accepted workers.`,otherGroups:`{count} more active groups`},toolSearch:{},customPluginUi:{},hostDesktop:{},workerDesktop:{}},aboutPage:{productName:`OpenClaw`,tagline:`Your personal AI assistant, running on your own devices.`,waveHello:`Wave hello to Clawd`,linksLabel:`Community and resources`,linkWebsite:`Website`,linkDocs:`Docs`,linkGitHub:`GitHub`,linkDiscord:`Discord`,linkX:`X (Twitter)`,linkChangelog:`Changelog`,license:`© 2026 OpenClaw Foundation — MIT License.`,artifactTitle:`Control UI`,artifactSubtitle:`Identity embedded when this browser artifact was built.`,artifactDetails:`Control UI build details`,version:`Version`,commit:`Commit`,branch:`Branch`,built:`Built`,unavailable:`Unavailable`,copyCommit:`Copy full commit hash`,copyingCommit:`Copying commit hash`,copiedCommit:`Commit hash copied`,copyCommitFailed:`Could not copy commit hash`,gateway:`Gateway`,gatewayVersion:`Connected Gateway version`,gatewayVersionHint:`Reported by the active Gateway connection; separate from this Control UI build.`},appsPage:{},presence:{sharedOwner:{name:`Shared owner`,hint:`Connected with the Gateway token or over a tunnel, not a personal sign-in.`},rosterTitle:`Online`,filters:{label:`Filter & sort people`,noMatches:`No people match this filter`,presence:`Active people first`,reset:`Reset to defaults`,running:`Running sessions`,total:`Total sessions`,name:`Name`},active:`Active`,onlineActive:`Online · Active`,onlineIdle:`Online · Idle`,idle:`Idle`,offline:`Offline`,sessions:{openCount:`{count}\xA0open`,runningCount:`{count}\xA0running`,openHint:`Owned, unarchived conversations you can access across agents. Excludes hidden subagents, automation, and system sessions.`,runningHint:`Open sessions actively executing an agent turn. Queued work is not running.`,counts:`{open} open sessions, {running} running`,unavailable:`Session counts unavailable`,retry:`Counts may be out of date. Retry`},card:{details:`Details for {name}`,loadFailed:`Could not open details. Try again, or open this person’s Activity page.`,ariaLabel:`Activity for {name}`,person:`Person`,onlineFor:`Online for`,where:`Where`,reportedTimeZone:`Reported time zone: {zone}`,lastActivity:`Last interaction`,notObserved:`Activity unavailable`,viewingNow:`Viewing now`,recentSessions:`Recent sessions`,noVisibleSessions:`No visible sessions being viewed.`,noRecentSessions:`No recent visible sessions.`,sessionUpdated:`Session updated`,ago:`ago`,viewActivity:`View activity`,web:`Web`,cli:`Command line`,terminal:`Terminal`,app:`App`}},activityFeed:{partialHistory:`People and counts describe visible recorded session associations; retained history and this people list may be incomplete.`,sessionsMode:`Sessions`,searchPlaceholder:`Search session titles…`,time:`Time`,time24h:`Last 24 hours`,time7d:`Last 7 days`,time30d:`Last 30 days`,timeAll:`All time`,everyone:`Everyone`,peopleButtonLabel:`Filter sessions by person`,lastActive:`· {time}`,unresolvedIdentities:`Unresolved identities`,clearPersonFilter:`Clear person filter`,showing:`Showing {shown} of {total}`,today:`Today`,yesterday:`Yesterday`,unknownDate:`Unknown date`,noSessions:`No sessions match these filters.`,automationGroup:`{count} automation sessions`,automation:`Automation`,inspectRun:`Inspect run`,recap:`Session recap`,recapMissing:`No recap yet`,recapUpdating:`Updating recap…`,recapStale:`New activity since this recap`,recapUnavailable:`Recap unavailable`,recapRefreshFailed:`Couldn’t refresh recap`,recapRetry:`Retry recap`,recapUpdated:`Recap updated {time}`,backToSessions:`Back to sessions`,channelLabel:`Channel: {value}`,agentLabel:`Agent: {value}`,online:`Online`,idle:`Idle`,offline:`Offline`,unknownDevice:`Unknown device`,lastInput:`Last input {time} ago`,viewingNow:`Viewing now`,notViewing:`Not viewing a session right now.`,notFoundTitle:`Person not found`,notFoundDescription:`No online presence or visible session association matches this identity.`},githubPublication:{personal:`My GitHub`,system:`System`,agent:`Agent override`,publishAs:`Publish as @{account}`,account:`Publication account`,newAction:`Choose a new publication`,failedAttempt:`Publication attempt failed`,capacity:`Too many publications are awaiting review. Finish an existing publication, then select "{newAction}" to make room. Existing retries remain available.`,confirm:`Confirm original publication`,check:`Check publication`,refresh:`Refresh publication`,unknown:`The outcome is unknown. Retry keeps the original account and request; it does not switch accounts.`,target:`Pull request: {repository} → {base}`,pushTarget:`Push: {repository} · {branch}`,snapshot:`Original accepted snapshot`,head:`HEAD`,index:`Index tree`,workspace:`Workspace tree`,dispatched:`GitHub {kind} was dispatched; its remote outcome may still be unknown.`,observed:`GitHub {kind} was observed. Disconnecting does not undo this effect.`,effectLink:`View GitHub effect`,effectPush:`push`,effectPullRequest:`pull request`,personalWorkspace:`Wait for work to finish and reclaim the workspace to publish with My GitHub.`,unidentified:`Sign in with a personal profile to use My GitHub.`,connectHelp:`Connect GitHub in Settings → Profile → GitHub connections.`},githubConnections:{title:`GitHub connections`,description:`Check the accounts used for agent commands, dashboard data, and publishing. These connections are separate from your GitHub sign-in and co-author credit.`,mine:`My GitHub`,system:`System GitHub`,personalDescription:`Your account for explicitly selected Publish PR actions.`,systemDescription:`Default account for agent commands, authenticated dashboards, and publishing.`,unboundDescription:`Sign in with a personal Gateway profile to connect My GitHub. Administrators can still manage System GitHub.`,signInRequired:`Personal sign-in required`,connected:`Connected`,disconnected:`Not connected`,notLoaded:`Status not loaded`,checking:`Checking connection…`,statusUnavailable:`Connection status unavailable`,manage:`Manage connections`,reconnectRequired:`Reconnect required`,connectMine:`Connect My GitHub`,changeMine:`Change My GitHub`,changeSystem:`Change System GitHub`,disconnectMine:`Disconnect My GitHub`,disconnectDescription:`Stops unfinished personal publication. Published work stays intact; revoke the app grant separately in GitHub settings.`,adminManaged:`Admin managed`,purpose:`Connect GitHub`,forMe:`For me`,forSystem:`For the system`,purposeHint:`Only the selected connection changes.`,continue:`Continue with GitHub`,usage:`Where these accounts are used`,usageDescription:`My GitHub is used only when you explicitly select it for Gateway-brokered Publish PR on an idle, reconciled local workspace. Publication still needs write access to the session. Agent git/gh, model actions, previews, and workers keep the shared account. Finish and reclaim remote work before personal publication. Connecting My GitHub changes no defaults.`,details:`Connection details`,agentTitle:`GitHub account`,agentFor:`GitHub for {agent}`,agentDescription:`Used for this agent's commands and authenticated dashboard data. Verified confirms the account; repository access is checked when data is requested.`,viewAgent:`View agent account`,agentOverride:`Agent override`,advancedOverride:`Advanced: agent GitHub override`,manageCommon:`Manage connections in Profile`},profilePage:{personalInstructions:{title:`Personal instructions`,description:`Tell this agent about you and how you like to work. This edits only your personal USER.md, not the shared workspace file.`},offline:`Connect to the gateway to meet your agent.`,access:{},usageStatistics:`Usage statistics`,usageStatisticsDescription:`View activity, costs, and usage trends.`,identity:{title:`Identity`,menuLabel:`Identity menu`,menuButtonLabel:`Identity and app menu for {name}`,description:`Your profile on this gateway.`,avatar:`Avatar`,chooseAvatar:`Choose image`,displayName:`Display name`,linkedEmails:`Linked emails`},modelAccounts:{}},skillWorkshop:{},activity:{status:{done:`Done`}},gatewayLogs:{title:`Logs`,subtitle:`Gateway file logs (JSONL).`,exportButton:`Export {label}`,exportLabels:{filtered:`filtered`,visible:`visible`},filter:`Filter`,searchPlaceholder:`Search logs`,autoFollow:`Auto-follow`,file:`File: {file}`,truncated:`Log output truncated; showing latest chunk.`,empty:`No log entries.`},pluginTabs:{unavailableTitle:`Plugin panel unavailable`,unavailableSubtitle:`The plugin that owns this tab is not active on the connected gateway, or it did not provide a panel.`},logbook:{nav:{previousDay:`Previous day`,nextDay:`Next day`,today:`Today`},status:{capturing:`Capturing every {seconds}s`,paused:`Capture paused`,disabled:`Capture off`,nodeHelp:`Device providing screen snapshots.`,pending:`{count} frames queued`,pendingHelp:`Snapshots waiting for the next analysis batch.`,analyzing:`Analyzing…`,captureError:`Capture error`,batchError:`Analysis error`,modelMissing:`No vision model`,modelMissingHelp:`Set plugins.entries.logbook.config.visionModel or configure tools.media models.`},actions:{pause:`Pause`,resume:`Resume`,analyzeNow:`Analyze now`},empty:{title:`Nothing on the timeline yet.`,subtitle:`Logbook is collecting snapshots; cards appear after the first analysis batch completes.`},card:{keyframeAlt:`Screen snapshot from this activity`,distractions:`Distractions`},stats:{title:`Day at a glance`,focus:`{pct}% focus`,tracked:`{duration} tracked`},standup:{title:`Daily standup`,generate:`Generate`,refresh:`Regenerate`,empty:`Turn today's timeline into a ready-to-paste standup update.`},ask:{title:`Ask your day`,placeholder:`When did I review the gateway PR?`,submit:`Ask`}},board:{label:`Session dashboard`,tabsLabel:`Dashboard tabs`,moreTabs:`More dashboard tabs`,gridLabel:`Dashboard widgets`,emptyTitle:`A clear board, ready for work`,emptyHint:`Your agent can pin widgets here — try asking for a status card.`,actionFailed:`The dashboard change could not be saved.`,actionInProgress:`Another dashboard change is still being saved.`,announcement:{moved:`Moved {title}.`,resized:`Resized {title}.`,removed:`Removed {title}.`,granted:`Widget access allowed.`,rejected:`Widget access rejected.`},widget:{cellLabel:`Dashboard widget: {title}. Use arrow keys to navigate. Hold Alt and press an arrow key to move it.`,moveHandle:`Move {title}`,resizeHandle:`Resize {title}`,menuLabel:`Widget options`,moveToTab:`Move to tab`,noOtherTabs:`No other tabs`,resize:`Resize`,autoHeight:`Auto height`,remove:`Delete`,needsApproval:`Needs approval`,needsApprovalDetail:`This widget requested additional access.`,networkAccess:`Network origins`,hostTools:`Host tools and data`,activeCapabilities:`Active widget capabilities`,networkCapability:`Network: {capability}`,toolCapability:`Tool: {capability}`,granted:`Granted`,allow:`Allow`,allowFailed:`Could not allow widget access. Try again.`,reject:`Reject`,rejectFailed:`Could not reject widget access. Try again.`,rejected:`Access rejected`,rejectedDetail:`This widget stays inactive until it is removed or replaced.`,appLoading:`Restoring app…`,appStaleTitle:`This pinned app is stale`,appStaleDetail:`Its server, resource, or originating transcript is no longer available.`,retry:`Retry`,frameResolverMissing:`Widget content is unavailable.`,sandboxUnavailable:`Widget sandbox host is unavailable.`,runtimeError:`Script error: {message}`,waitingForConnection:`Waiting for the connection. This view will recover automatically.`,resourceUnavailable:`A widget resource could not load. Retry when the connection is available.`,frameAuthorizationFailed:`Widget authorization failed after repeated refresh attempts.`,sandboxOriginRequired:`Widget authorization failed after repeated refresh attempts. If the gateway runs behind a reverse proxy or tunnel that does not route the widget sandbox port, set mcp.apps.sandboxOrigin to a dedicated public origin routed to the sandbox listener.`,errorTitle:`This widget could not load`,errorDetail:`The problem is contained to this card.`,actionErrorTitle:`Widget change failed`,actionErrorDetail:`The dashboard kept the previous widget state.`,errorShow:`Show details`,kindMcp:`MCP`,kindHtml:`HTML`,kindPlugin:`Plugin`,kindReport:`Report`,kindWebsite:`Website`,kindBrowserDashboard:`Browser dashboard`,pluginLoading:`Loading plugin widget…`,disabledPlugin:`Widget from disabled plugin {pluginId}`}},connection:{browserSignIn:{title:`Sign in to continue loading content`,description:`Your website sign-in has expired. Images and files cannot load until you sign in again. Your conversation and draft will stay open.`,action:`Sign in`,dismiss:`Not now`,returnHint:`Finish signing in in the new tab, then return here. Visible attachments will retry automatically.`,checkAgain:`Check again`,checking:`Checking access…`,stillRequired:`Sign-in is still required. Finish signing in, then check again.`,unavailable:`Could not verify access. Check your connection and try again.`},disconnectedTitle:`Disconnected`,connecting:`Connecting…`,starting:`Starting…`,restoring:`Restoring…`,"reload-required":`Refresh required`,offline:`Disconnected`,reconnecting:`Reconnecting…`,interruptedRetrying:`Connection to the Gateway was interrupted. Reconnecting automatically. (WebSocket {code})`,interrupted:`Connection to the Gateway was interrupted. Check your connection and try again. (WebSocket {code})`,restarting:`Restarting…`,suspending:`Suspending…`,suspended:`Suspended`,retryNow:`Retry now`,actionsUnavailable:`Actions are unavailable while the Gateway reconnects.`,settingsChangesUnavailable:`Changes to settings are disabled while the Gateway is reconnecting.`,sessionMoveRefreshFailed:`The session move was saved, but refreshing the list failed: {error}`,sessionMoveUncertain:`The session move could not be confirmed. Refresh and check its group before retrying. {error}`,sessionOperationCompletedPreviousConnection:`The session operation completed on the previous connection. Check the current session list before continuing.`,sessionOperationCompletedPreviousConnectionWithRefreshError:`The session operation completed on the previous connection, but refreshing the current session list failed: {error}`,scopeUpgrade:{},access:{},switchGateway:{title:`Switch to a different Gateway?`,summary:`This link asks the browser to connect somewhere else.`,current:`Current`,next:`Link`,note:`Anything you enter after switching goes to that host.`,noteToken:`The link also carries a token for it.`,noteScoped:`Your saved credential for {host} stays here and is not sent.`,confirm:`Switch to {host}`,cancel:`Keep current Gateway`},help:{title:`How to connect`,step1:`Start the gateway on your host machine:`,step2:`Get a tokenized dashboard URL:`,step3:`Paste the Gateway URL and secret above, or open that URL directly.`,docsLink:`Read the docs →`,copyCommand:`Copy command`,copyCommandAria:`Copy command: {command}`}},attention:{issues:`Inbox`},standingGrants:{title:`Standing grants`,description:`Allow-always on an automation approval mints a standing grant for that exact command. Revoking one makes the next occurrence ask again.`,historyTitle:`Approval history`,empty:`No standing grants. Answer an automation approval with Always allow to mint one.`,stateUntilRevoked:`Until revoked`,stateExpiresIn:`Expires in {count}d`,stateExpired:`Expired`,stateRevoked:`Revoked`,revoke:`Revoke`,revoking:`Revoking…`,columns:{automation:`Automation`,command:`Command`,uses:`Uses`,state:`State`}},approvalHistory:{description:`Terminal exec, plugin, and system-agent approvals recorded by this gateway, newest first.`,loading:`Loading approval history…`,loadingMore:`Loading…`,loadMore:`Load more`,empty:`No resolved approvals in the rolling 30-day window.`,retention:`Approval history is a rolling 30-day window.`,offline:`Connect to the gateway to load approval history.`,invalidResponse:`The gateway returned an invalid approval history response.`,unknown:`Unknown`,notApplicable:`N/A`,columns:{resolved:`Resolved`,kind:`Kind`,request:`Request`,decision:`Decision`,reason:`Resolution reason`,source:`Source agent / session`,resolver:`Resolver`},kinds:{exec:`Exec`,plugin:`Plugin`,systemAgent:`System agent`},statuses:{allowed:`Allowed`,denied:`Denied`,expired:`Expired`,cancelled:`Cancelled`},decisions:{allowOnce:`Allow once`,allowAlways:`Always allow`,deny:`Deny`},reasons:{user:`User decision`,timeout:`Timed out`,malformedVerdict:`Malformed verdict`,noRoute:`No route`,runAborted:`Run aborted`,gatewayRestart:`Gateway restart`,storageCorrupt:`Storage corrupt`}},commandPalette:{},palette:{placeholder:`Search or start a task…`,categories:{navigation:`Navigation`}},dreaming:{},modelProviders:{},searchPage:{},usage:{common:{emptyValue:`—`,unknown:`unknown`},loading:{title:`Usage Overview`,badge:`Loading`},metrics:{tokens:`Tokens`,cost:`Cost`,session:`session`,sessions:`sessions`},heatmap:{title:`Token Activity`,subtitle:`Daily token intensity for the selected range, up to one year.`,cellTokens:`{tokens} tokens`,less:`Less`,more:`More`},providerUsage:{title:`Provider plans & billing`,subtitle:`Live plan, quota, balance, and budget data reported by configured providers.`,stalled:`Provider usage did not finish loading. Refresh to retry.`,unavailable:`Provider usage is unavailable; the last request failed. Refresh to retry.`,balance:`Balance`,spend:`Usage`,budget:`Budget`,today:`Today`,last7Days:`7 days`,lastDays:`{count} days`,dailyCost:`Daily provider cost`,requests:`{count} requests`,inputTokens:`{count} input`,cacheTokens:`{count} cache`,outputTokens:`{count} output`,topModels:`Top models`,costCategories:`Cost categories`,remaining:`{percent}% left`,resets:`Resets {date}`},presets:{},scope:{},filters:{},query:{},export:{},cacheStatus:{},empty:{},daily:{},costWindows:{},breakdown:{output:`Output`,input:`Input`,cacheWrite:`Cache Write`,cacheRead:`Cache Read`,total:`Total`,tokensByType:`Tokens by Type`,costByType:`Cost by Type`},overview:{title:`Usage Overview`},sessions:{},details:{noUsageData:`No usage data for this session.`,duration:`Duration`,modelMix:`Model Mix`,filtered:`(filtered)`,close:`Close session details`,noTimeline:`No timeline data`,loadFailed:`Could not load {detail}: {error}`,noDataInRange:`No data in range`,usageOverTime:`Usage Over Time`,rangeStart:`Range start`,rangeEnd:`Range end`,reset:`Reset`,perTurn:`Per Turn`,cumulative:`Cumulative`,turnRange:`Turns {start}–{end} of {total}`,assistantOutputTokens:`Assistant output tokens`,userToolInputTokens:`User + tool input tokens`,tokensWrittenToCache:`Tokens written to cache`,tokensReadFromCache:`Tokens read from cache`,noContextData:`No context data`,contextOutOfDate:`These context details are out of date. Refresh usage and try again.`,systemPromptBreakdown:`System Prompt Breakdown`,collapse:`Collapse`,collapseAll:`Collapse All`,expandAll:`Expand All`,baseContextPerMessage:`Base context per message`,system:`System`,systemShort:`Sys`,skills:`Skills`,tools:`Tools`,files:`Files`,ofInput:`of input`,of:`of`,timelineFiltered:`timeline filtered`,loadedIntervalMessages:`Loaded conversation · selected interval`,conversation:`Conversation`,noMessages:`No messages`,tool:`Tool`,toolResult:`Tool result`,hasTools:`Has tools`,searchConversation:`Search conversation`,filterByRole:`Filter by role`,filterByTool:`Filter by tool`,you:`You`,noMessagesMatch:`No messages match the filters.`},mosaic:{}},login:{},chat:{agentDatabaseWarming:`This agent is still starting. Retry in a moment.`,historyRequestTimedOut:`Chat history request timed out. Retry to load the conversation.`,clawhub:{retryStatus:`Status unavailable · Retry`,viewDetails:`View details`},modelAccounts:{section:`Account`,automatic:`Automatic (new-chat default)`,manage:`Manage saved accounts…`},mentions:{menu:`Mention a person`,empty:`No people found`,truncated:`Keep typing to find more people.`,online:`Online`,offline:`Offline`,unavailable:`Could not load people. Try again.`,limit:`You can mention up to 10 people per message.`,selectedLabel:`Will notify`,selected:`Will notify: {names}`,remove:`Remove mention`,restoreFailed:`Mention selection could not be restored. Edit this message and select its recipients again.`,unsupported:`Human mentions are not available in this mode. Remove the selected mentions or send from a normal chat.`},cloudWorkerFailed:`Runner failed: {error}`,errorDetails:`Error details`,errorReplySummary:`Couldn't finish this reply. Check the conversation before trying again.`,errorBusySummary:`OpenClaw is busy. Check status before trying again.`,errorSignInSummary:`Couldn't sign in to the AI service. Sign in again under Models.`,errorStartSummary:`Couldn't start this conversation. Open Settings → Logs for details.`,checkStatus:`Check status`,details:`Details`,copyError:`Copy error`,providerAccessRemoved:`This reply stopped because the provider was signed out. Sign in again or choose another model.`,providerReview:{},providerPolicy:{bufferingTitle:`Cyber safety review`,bufferingBody:`OpenAI is reviewing this response for cyber safety.`,blockedTitle:`Cyber policy block`,blockedBody:`OpenAI blocked this response under its cyber policy.`,fallbackTitle:`Provider changed the model`,fallbackBody:`OpenAI routed this response to {model}.`,fallbackUnknownBody:`OpenAI routed this response to another model.`,escalatedTitle:`Retried on Daybreak`,escalatedBody:`OpenAI declined this request; retried on {model}.`,unavailableTitle:`Daybreak unavailable`,unavailableBody:`OpenAI declined this request; {model} is not authorized.`},diskSpace:{warningTitle:`Cloud session disk space is low`,criticalTitle:`Cloud session disk space is critically low`,warningBody:`{percent}% used · {free} free. Delete unneeded files or stop the cloud worker before large writes.`,criticalBody:`{percent}% used · {free} free. New writes may fail and stop the agent. Delete unneeded files or stop the cloud worker before large writes.`},workerRuntimeInstall:{transferringTitle:`Updating worker runtime · {transferred} of {total} ({percent}%)`,installingTitle:`Installing worker runtime`,transferringBody:`Transferring the new worker runtime to this device: {transferred} of {total} ({percent}%). The next turn starts when it finishes.`,installingBody:`Installing the new worker runtime on this device.`},sendErrors:{outboxPayloadCopied:`This queued message was copied from another tab. Check the conversation and retry only if it has not arrived.`,outboxPayloadCapacity:`Browser attachment storage is full. Try a smaller batch or send/discard queued messages to free space. No new message was sent; your input is retained.`,outboxPayloadUnavailable:`Browser attachment storage is unavailable. Allow browser storage and close older dashboard tabs before reconnecting and retrying. No new message was sent.`,outboxPayloadMissing:`Queued attachments are missing or unreadable. This may be a stale copy from another tab. Check the conversation, then discard this row and attach the files again if needed. No new message was sent.`,activeLeafChanged:`The session switched branches — review and resend.`},waitingForApproval:`Waiting for approval…`,waitingOnSubagents:`Waiting on subagents`,yieldWaiting:`Handed off and waiting`,yieldResumed:`Resumed`,startupStatus:{retrying:`Retrying… {attempt}/{maxAttempts}`,preparingWorkspace:`Preparing workspace…`,namingWorktree:`Naming worktree…`,creatingWorktree:`Creating worktree…`,runningSetup:`Running setup…`,provisioningEnvironment:`Provisioning environment…`,preparingContext:`Preparing this turn…`,memoryFlushing:`Saving conversation memory…`,startingModel:`Waiting for a response…`,waitingForState:`Temporarily busy—retrying…`},archivedSessionDisabled:`This session is archived. Unarchive it to continue the conversation.`,subagentViewOnly:`View-only subagent`,subagentSessionDisabled:`This is a subagent of {parent}. Continue the conversation in its parent session.`,parentSession:`the parent session`,openParentSession:`Open parent session`,parentSessionUnavailable:`Parent session information is unavailable.`,sessionRoute:{chooseTitle:`Choose a session`,multipleMatches:`More than one session matches {shortId}.`,additionalMatches:`Search results remain. Use a longer id prefix.`,notFoundTitle:`Session not found`,notFoundExplanation:`The session may have been removed, or the link may be incorrect.`,goToMain:`Go to main session`,viewSessions:`View sessions`,catalogShareUnavailable:`This shared session route is unavailable.`,catalogShareInvalid:`This {catalog} share URL is invalid.`},commandResults:{startingNewThread:`Starting new session...`,resettingThread:`Resetting session...`,stoppingCurrentRun:`Stopping current run...`,chatHistoryCleared:`Chat history cleared.`,emptyExport:`There are no messages to export yet.`,exportPathUnsupported:`Control UI exports Markdown through your browser. Run /export without a file path.`,unknownCommand:"Unknown command: `{command}`",options:`Options: {options}.`,sessionUnavailable:`Session capability is unavailable`,help:{availableCommands:`Available Commands`,agentCommand:`agent`,openMenu:"Type `/` to open the command menu."},compaction:{failed:`Compaction failed.`,failedWithReason:`Compaction failed: {reason}`,tokenSummary:` ({before} -> {after} tokens)`,succeeded:`Context compacted successfully`,skipped:`Compaction skipped.`,skippedWithReason:`Compaction skipped: {reason}`},model:{current:`**Current model:** {model}`,available:`**Available:** {models}`,more:` +{count} more`,getFailed:`Failed to get model info: {error}`,set:`Model set to {model}.`,setFailed:`Failed to set model: {error}`},thinking:{current:`Current thinking level: {level}.`,getFailed:`Failed to get thinking level: {error}`,reset:`Thinking level reset to default.`,resetFailed:`Failed to reset thinking level: {error}`,unrecognized:`Unrecognized thinking level "{level}". Valid levels: {options}.`,unsupported:`Unsupported thinking level "{level}" for this model. Valid levels: {options}.`,set:`Thinking level set to {level}.`,setFailed:`Failed to set thinking level: {error}`},verbose:{current:`Current verbose level: {level}.`,getFailed:`Failed to get verbose level: {error}`,unrecognized:`Unrecognized verbose level "{level}". Valid levels: off, on, full.`,set:`Verbose mode set to {level}.`,setFailed:`Failed to set verbose mode: {error}`},fast:{autoValue:`auto ({seconds} sec)`,on:`on`,off:`off`,sourceSession:` (session)`,sourceAgent:` (default: agent)`,sourceModel:` (default: model)`,sourceDefault:` (default)`,current:`Current fast mode: {value}`,options:`on, off, auto ({seconds} sec), default, status`,getFailed:`Failed to get fast mode: {error}`,reset:`Fast mode reset to default.`,resetFailed:`Failed to reset fast mode: {error}`,unrecognized:`Unrecognized fast mode "{mode}". Valid levels: on, off, auto, default, status.`,setAuto:`Fast mode set to auto.`,enabled:`Fast mode enabled.`,disabled:`Fast mode disabled.`,setFailed:`Failed to set fast mode: {error}`},usage:{noActiveThread:`No active session.`,notAvailable:`n/a`,title:`Session Usage`,inputTokens:`Input: {count} tokens`,outputTokens:`Output: {count} tokens`,totalTokens:`Total: {count} tokens`,context:`Context: {percent} of {total}`,promptBudget:`Prompt budget (last run): {percent} of {total}`,model:`Model: {model}`,failed:`Failed to get usage: {error}`},agents:{none:`No agents configured.`,title:`**Agents** ({count})`,default:`default`,runtime:` · runtime {runtime}`,failed:`Failed to list agents: {error}`},steer:{timeout:`The active run ended before the steer message was accepted.`,failed:`Steer failed before it reached the run; try again.`,usage:"Usage: `/steer <message>`",succeeded:`Steered.`,requestFailed:`Failed to steer: {error}`},redirect:{timeout:`The active run ended before the redirect message was accepted.`,failed:`Redirect failed before it reached the run; try again.`,usage:"Usage: `/redirect <message>`",succeeded:`Redirected.`,requestFailed:`Failed to redirect: {error}`}},sessionSharing:{menu:`Session sharing`,current:`Session visibility: {visibility}`,visibility:`Visibility`,shared:`Shared`,readOnly:`Read-only`,suggest:`Suggest`,draft:`Draft`,publishDraft:`Publish draft`,owner:`Owner`,members:`Members`,selected:`Member`,noPeople:`No paired people found.`,readOnlyNotice:`Only the session owner and members can act in this session.`,scopeReadOnlyNotice:`Sending messages is unavailable with your current access.`,publicAccess:`Public access`,publicIndicator:`Public`,worldReadable:`Public — anyone can read without signing in.`,notPublic:`Only signed-in people with access can view this session.`,enablePublicAccess:`Enable public access…`,disablePublicAccess:`Disable public access`,copyPublicLink:`Copy public link`,publicConfirmTitle:`Make this session world-readable?`,publicConfirmMessage:`Anyone with the public link can read existing and future conversation text without signing in. Tools, reasoning, files, and widgets are excluded. Review the conversation for private information before sharing. Disabling access cannot recall copies already downloaded.`,publicConfirmEnable:`Make public`,publicEnabled:`Public access enabled. Copy the public link from Session sharing.`,publicDisabled:`Public access disabled.`,publicUnavailable:`Public access requires a saved, non-incognito session.`},reactions:{add:`Add reaction`,quick:`Quick reactions`,emoji:`Emoji`,more:`More…`,back:`Back to quick reactions`,placeholder:`Any emoji`,shortcut:`{shortcut} opens your emoji picker.`,hint:`Type or paste an emoji.`,invalid:`Reactions are a single emoji.`,you:`You`,andOthers:`{names} and {count} others`,reactedWith:`{names} reacted with {emoji}`},sessionSuggestions:{suggest:`Suggest`,suggestMessage:`Suggest message`,attachmentsUnsupported:`Remove attachments before submitting a text suggestion.`,sendNow:`Send {author}'s suggestion now`,queue:`Queue {author}'s suggestion`,edit:`Edit {author}'s suggestion`,dismiss:`Dismiss {author}'s suggestion`,typing:`{name} is typing…`,typingMany:`{names} are typing…`,typingSeveral:`Several people are typing…`,typingOthers:`{count} others`,otherCollaborators:`Other collaborators`,typingDraftState:`is typing...`,pausedDraftState:`Draft`,state:{pending:`Pending`,accepted:`Accepted`,dismissed:`Dismissed`}},sessionHeader:{renameTooltip:`Rename session`,renameAria:`Rename session {title}`,renameInputAria:`Session title`,renameInputPlaceholder:`Session title`,openParent:`Open parent session {title}`,panels:`Panels`,layout:`Layout`,continueInTerminal:{action:`Continue in terminal…`,title:`Continue in terminal`,description:`Copy this command to continue the current session. It is safe to paste in common terminals and shells.`,authNote:`The command contains no credentials. The terminal authenticates independently, and the session's access controls still apply.`,disconnected:`Connect to the Gateway to continue this session in a terminal.`,queryRouted:`Query-routed Gateway URLs cannot create credential-free continuation commands because authentication and stored device scope are not query-aware. Use a manually authenticated CLI target or a queryless configured Gateway URL.`,unavailable:`This session or Gateway address cannot be continued in a terminal.`},workspaceAria:`Workspace actions for {workspace}`,revealFinder:`Reveal in Finder`,revealFileExplorer:`Reveal in File Explorer`,revealFileManager:`Open in file manager`,copyPath:`Copy path`,copyBranch:`Copy branch name`,copied:`Copied`,incognito:`Incognito session`,branches:`Session branches`,branchSwitchUnavailable:`Branch switch is unavailable while the agent is working.`,untitledBranch:`Untitled branch`,oneMessage:`{count} message`,messages:`{count} messages`,activeBranch:`Active branch`},board:{faceLabel:`Session face`,chatFace:`Chat`,splitFace:`Split`,dashboardFace:`Dashboard`,dockMenu:`Chat dock: {dock}`,dockLeft:`Dock chat left`,dockRight:`Dock chat right`,dockBottom:`Dock chat bottom`,resizeDock:`Resize chat dock`,enterFullscreen:`Enter fullscreen`,exitFullscreen:`Exit fullscreen`,fullscreenUnavailable:`Fullscreen is unavailable in this browser`,fullscreenFailed:`Could not change fullscreen mode: {error}`,workboardCard:`Workboard card: {title}, {status}`,defaultTab:`Main`,mockPlaceholder:`Board view seam · {tabs} tabs · {widgets} widgets`,resetTitle:`Reset conversation?`,resetDescription:`The conversation context resets. Your dashboard stays.`},catalog:{remoteViewOnly:`This session is on a paired device and is view-only.`,unsupportedViewOnly:`This external session source is view-only.`,sessionMenu:`External session actions`,openInOpenClaw:`Open in OpenClaw`,importToOpenClaw:`Import to OpenClaw`,importComplete:`Imported {count} transcript items.`,importUnchanged:`The imported transcript is up to date.`,importIncomplete:`Imported {count} transcript items. Older history exceeded the import limit.`,openImportedSession:`Open imported session`,openInTerminal:`Open in terminal`,deleteSession:`Delete`,deleteSessionConfirm:`Delete this external session from OpenClaw? Make sure no other runner is using it. Beamed sessions are deleted permanently. Sessions kept by another tool, such as Codex, are archived there and may be restorable.`,terminalUnavailable:`Terminal opening is unavailable for this session.`},taskSuggestions:{eyebrow:`Suggested task · in {repo}`,startSession:`Start in a new session`,startOptions:`Choose where to start the task`,startWorktree:`Start in a new worktree`,chooseRepository:`Choose repository`,repositoryFolder:`Repository folder`,chooseRepositoryHelp:`Choose a Git repository with a commit. Your task will start in a new worktree; its instructions are preserved.`,startCurrentSession:`Start in this session`,copyPrompt:`Copy prompt`,copyPromptFailed:`Couldn't copy the prompt to the clipboard`,promptCopied:`Copied`,showInstructions:`Show instructions`,hideInstructions:`Hide instructions`,previous:`Previous suggested task`,next:`Next suggested task`,starting:`Starting…`,dismiss:`Dismiss {title}`,started:`Task started`,startUnconfirmed:`Couldn't confirm the task started. Retry checks the same task.`,adminRequired:`Administrator access is required to start suggested tasks.`},pullRequests:{linkLabel:`Pull request #{number}: {title}`,createPr:`Create PR`,createPrLabel:`Create a pull request for {branch}`,publishPr:`Publish PR`,publishing:`Publishing…`,publicationRequested:`Requested`,retryPublication:`Retry publication`,openPublishedPr:`Open PR`,cloudPublicationGuidance:`Start a live agent turn and ask it to publish this cloud workspace after reconciliation.`,dismiss:`Dismiss pull request #{number}`,open:`Open`,draft:`Draft`,merged:`Merged`,closed:`Closed`,checks:`CI`,checksPassing:`CI checks passing`,checksFailing:`CI checks failing`,checksPending:`CI checks running`,ciMonitoring:`CI monitoring`,openChecks:`Open checks on GitHub`,checksPassed:`Passed`,checksFailed:`Failed`,checksRunning:`Running`,checksSkipped:`Skipped`,rateLimited:`GitHub API rate limit reached. Pull request status may be out of date until the limit resets.`,unavailable:`GitHub status could not be refreshed. Showing the last known state; check GitHub for the latest.`},usageRemaining:`Usage Remaining`,view:{menu:`View`,reasoning:`Reasoning`,toolCalls:`Tool calls`,commentary:`Keep commentary`},sendShortcut:`Send shortcut`,sendShortcutEnter:`Enter`,sendShortcutModifierEnter:`⌘/Ctrl+Enter`,followUpMode:`Follow-ups while the agent is working`,followUpModeQueue:`Queue until the run ends`,followUpModeServer:`Server default ({mode})`,followUpModeLoading:`loading…`,followUpModeSteer:`Steer into the active run`,followUpModeOverriding:`Overriding server default ({mode})`,followUpModeReset:`Reset to server default`,catalogOpenTarget:`Open external sessions in`,catalogOpenTargetViewer:`OpenClaw viewer`,catalogOpenTargetTerminal:`Terminal`,catalogOutputTruncated:`[Output truncated]`,onboardingDisabled:`Disabled during setup`,commandPaletteTitle:`Search or jump to… (⌘K)`,openCommandPalette:`Open command palette`,updating:`Updating…`,actions:{copyAsMarkdown:`Copy as markdown`,dismissError:`Dismiss error`,exitFocusMode:`Exit focus mode`,scrollToLatest:`Scroll to latest`},markdown:{truncated:`… truncated ({total} chars, showing first {shown}).`},mermaid:{title:`Mermaid diagram`,options:`Diagram options`,diagram:`Show diagram`,source:`Show source`,copySource:`Copy source`,expand:`Expand diagram`,rendering:`Rendering diagram…`,error:`This diagram could not be rendered. Check the source or simplify the diagram.`,rendererError:`The Mermaid renderer could not load or finish. Reload the dashboard; if this continues, check proxy or authentication rules for its renderer asset URLs.`,imageError:`The diagram image could not be displayed. Reload the dashboard to try again.`},codeBlock:{},workspaceConflict:{titleOne:`1 cloud workspace conflict`,titleMany:`{count} cloud workspace conflicts`,description:`OpenClaw kept your local versions and applied the other cloud changes. Inspect the staged result or take its version for a conflicted path.`,summary:`Local versions kept; inspect or take the cloud version.`,showCommands:`Show commands`,morePaths:`+{count} more paths`,stagedResult:`Staged cloud result`,copyStagedResult:`Copy staged result ref`,inspectCloud:`Inspect the first cloud version`,takeCloud:`Take the first cloud version`,copyInspectCommand:`Copy cloud inspect command`,copyTakeCommand:`Copy take-cloud command`,commandHelp:`Run these in Bash or zsh (Git Bash on Windows). If inspect says the path does not exist, the cloud deleted it; verify and remove the local path manually. If checkout reports a file/directory conflict, move or remove the blocking local path, then retry. If the staged ref is missing, the notice is stale; do not change the local path.`,commandsUnavailable:`This filename contains terminal control characters, so OpenClaw will not build a copyable shell command for it. Inspect the staged ref directly and enter the path manually with care.`,dismiss:`Dismiss workspace conflict notice`,eventSender:`Cloud workspace`,eventTitleOne:`Cloud result applied with 1 conflict`,eventTitleMany:`Cloud result applied with {count} conflicts`,eventDescription:`Local versions were kept for these paths; other cloud changes were applied.`},compaction:{label:`Compacted history`,savedTokens:`saved {count} tokens`},sessionReset:{label:`Session reset`,description:`The earlier conversation was cleared.`},outboxRecoveryReviewTitle:`Review in this chat?`,outboxRecoveryConfirm:`Add this saved copy to “{chat}” for review? Nothing will be sent.`,outboxRecoveryRestore:`Restore`,outboxRecoveryConflict:`Keep or clear the draft and pending messages in this chat first, or open another non-Incognito chat. Your saved copy is unchanged.`,outboxRecoveryStorageFailed:`We could not access your saved messages. Reload to try again. Do not clear browser site data if you want to keep them.`,outboxRecoveryFull:`There are more saved messages than we can show. Review or delete the copies below to make room. The remaining messages are still saved in this browser.`,outboxRecoveryDraft:`Draft`,outboxRecoveryQueued:`Unsent`,outboxRecoverySource:`from {chat}`,outboxRecoveryUpdated:`Last updated {time}`,outboxRecoveryGoal:`Includes an unsent goal change`,outboxRecoveryReply:`Reply to: {text}`,outboxRecoveryAttachments:`Attachments: {files}`,outboxRecoveryUnconfirmedLabel:`may have been sent`,outboxRecoveryUnconfirmed:`Delivery unconfirmed. This message may already have been sent. Check the original chat before sending it again.`,outboxRecoveryAttachmentMissing:`An attachment could not be loaded. Review the message and reattach the file before sending.`,outboxRecoveryDelete:`Delete`,outboxRecoveryDeleteTitle:`Delete this saved copy?`,outboxRecoveryDeleteConfirm:`This removes the draft and any saved messages or attachments shown with it from this browser. It cannot be undone. Messages already sent to a chat will not be deleted.`,outboxRecoveryDeleteConflict:`This saved copy changed while you were reviewing it. Nothing was deleted. Reload and review it again.`,privateDraftReload:{blocked:`An unsent Incognito draft is keeping this tab open. Review it before refreshing.`,review:`Review private draft`,title:`Unsent Incognito draft`,description:`This draft stays only in this tab. Copy its text or download its attachments before discarding it to refresh. Keeping this tab open leaves the draft unchanged.`,text:`Draft text`,copy:`Copy text`,goal:`This draft includes an unsent goal change.`,reading:`Some attachments are still being read. Keep this tab open, then review the draft again when they finish.`,changed:`The draft changed while you were reviewing it. It has not been discarded; review the current draft before refreshing.`,copyFailed:`The text could not be copied. Select it in the draft field and copy it manually.`,attachmentUnavailable:`This attachment is no longer available to download. Keep the draft open and recover the original file before discarding it.`,download:`Download {name}`,discard:`Discard this draft and refresh`,keep:`Keep in this tab`,unavailable:`The private draft could not be opened. It remains in this tab; try Review private draft again.`},incognitoExpiredTitle:`Incognito session expired`,incognitoExpiredBody:`Incognito sessions last for 24 hours or until the Gateway restarts. Your unsent input stays in this tab.`,newIncognitoSession:`New Incognito session`,restartRecoveryTitle:`This session ended during a restart.`,restartRecoveryDisabled:`Its transcript is safe.`,resumeInNewSession:`Resume in new session`,resumingSession:`Resuming…`,systemNotice:{guardian:{approvedSummary:`Guardian approved {action}.`,deniedLabel:`Guardian denied`,deniedSummary:`{action} · risk: {risk}
{rationale}`,warningLabel:`Guardian warning`,warningFallback:`Guardian stopped the requested action.`,strictReviewRequiredLabel:`Guardian review required`,strictReviewRequiredSummary:`Guardian is reviewing this action before it can continue.`,requestedAction:`Requested action`,unknownRisk:`unknown`,noRationale:`No rationale was provided.`},restartRecovery:{label:`System · restart recovery`,summary:`Turn interrupted by a gateway restart — asked the agent to resume and finish the response.`,interrupted:`The Gateway restarted. Automatic recovery was interrupted before the agent could resume. Send a message to continue.`,cancelled:`The Gateway restarted. Automatic recovery was cancelled before the agent could resume. Send a message to continue.`},gatewayRestarted:{label:`System · gateway restarted`},cliHarnessContext:{label:`System · injected context`},claudeCliTaskNotification:{label:`System · background task`},showContent:`Show content`},progressLabels:{shelling:`Shelling`,scuttling:`Scuttling`,clawing:`Clawing`,pinching:`Pinching`,molting:`Molting`,bubbling:`Bubbling`,tiding:`Tiding`,reefing:`Reefing`,cracking:`Cracking`,sifting:`Sifting`,brining:`Brining`,nautiling:`Nautiling`,krilling:`Krilling`,barnacling:`Barnacling`,lobstering:`Lobstering`,tidepooling:`Tidepooling`,pearling:`Pearling`,snapping:`Snapping`,surfacing:`Surfacing`},turnRecap:{doneIn:`Done in {duration}`,tokens:`{count} output tokens`,tokensOne:`1 output token`},commands:{},skills:{menu:`Skill references`,label:`Skills`,loading:`Loading skills…`},splitView:{chooseConversation:`Choose a conversation`,missingOwner:`Select this pane, then choose Home or a conversation in the sidebar to restore it.`,open:`Open split view`,splitRight:`Split right`,splitDown:`Split down`,closePane:`Close pane`,panePosition:`Column {column}, row {row} ({pane})`,dropSplit:`Split`,dropOpenHere:`Open here`},sidebar:{updateMacAndGateway:`Update Mac app + Gateway`,updateGateway:`Update Gateway`,serverUpdatedTitle:`Server updated`,serverUpdatedRefresh:`Refresh for full capabilities`,threads:`Sessions`,otherSessions:`Other`,groups:`Groups`,coding:`Coding`,catalogViewOptions:`View options`,reorderItem:`Reorder {item}`,moveUp:`Move up`,moveDown:`Move down`,hideFromSidebar:`Hide from sidebar`,sectionHidden:`{section} hidden.`,sectionHiddenRecovery:`Show it again in Settings > Appearance > Sidebar.`,hiddenSessionSections:`Hidden session sections`,showSessionSection:`Show`,catalogGroupByProject:`Project`,catalogGroupByPerson:`Person`,openSessionMenu:`Open session menu`,sortBy:`Sort by`,sortCreated:`Created`,menuFilters:`Filters`,menuDisplay:`Display`,hideEmpty:`Hide empty`,activeFilterCount:`Active filters: {count}`,sortSessions:`Filter & sort`,sessionSources:`Session sources`,showOnlyPerson:`Show only {name}`,showEveryone:`Show everyone`,showAllSessions:`Show all sessions`,noActiveSessionsForFilter:`No active sessions match this filter`,sortUpdated:`Last updated`,sessionMenu:`Actions for {session}`,sessionMenuMany:`Actions for {count} sessions`,catalogDiscoveryHelp:`{error}. Configure automatic session discovery in Settings > Appearance > Session sources.`,catalogPaginationFailed:`Session catalog returned a repeated page cursor`,catalogPageMissingHost:`Session catalog page did not include the requested host`},welcome:{suggestions:{whatCanYouDo:`What can you do?`}},runControls:{newSession:`New session`,newSessionWorktree:`New session in worktree`,exportChat:`Export chat`,queue:`Queue`,queueMessage:`Queue message`,stop:`Stop`,stopWithShortcut:`Stop (Esc)`,stopGenerating:`Stop generating`,send:`Send`,sendMessage:`Send message`},queue:{reviewEdit:`Review edit`,reloadBlocked:`Save or cancel your queued message edit before reloading.`,connectionPending:`Finishing connection recovery. Try sending again when it is ready.`,editSourceChanged:`This queued message changed while you were editing. Your edit is still here. Copy it, cancel the edit, and review the queue before trying again.`,editStorageFailed:`Your edit could not be saved in this browser. Keep this tab open and copy your edit before freeing browser storage, then try again.`,full:`The message queue is full. Wait for a queued message to send or remove one, then try again.`,initialTurnPending:`The initial message is unresolved. Reconnect if needed, then review it before sending another message.`,notSent:`Not sent`,deliveryUnconfirmed:`Delivery unconfirmed`,checkDelivery:`Check delivery`,checkDeliveryHelp:`Delivery is unconfirmed. Check delivery looks for the original message without resending it or starting a worker. Inspect the conversation, or copy the retained prompt if you choose to start a separate attempt.`,retry:`Retry`,retryQueuedMessage:`Retry queued message`,discard:`Discard`,discardPendingMessage:`Discard this local pending copy. This does not cancel a message already received by the Gateway.`,steer:`Steer`,steerQueuedMessage:`Steer queued message`,removeQueuedMessage:`Remove queued message`,reorderQueuedMessage:`Reorder queued message with the arrow keys`,reorderUnavailable:`This message holds its place and cannot be reordered`,editQueuedMessage:`Edit queued message`,moreActions:`More queued message actions`,cancelEdit:`Cancel editing and keep the queued message`,states:{applyingSettings:`Applying chat settings`,blockedByUnconfirmed:`Queue paused. Retry or discard the earlier unconfirmed message in the conversation.`,runningCommand:`Running command`,waitingForReconnect:`Waiting for reconnect`,editing:`Editing`,needsReview:`Delivery uncertain`},imageCount:`Image ({count})`},goals:{},asyncQuestions:{title:`Optional · work can continue`,dismiss:`Dismiss`,dismissing:`Dismissing…`,dismissed:`Dismissed`,reopening:`Restoring answer…`,dismissedReason:`You can still answer this question later.`,dismissedNotice:`Question dismissed. Work continues.`,pendingOne:`{count} unanswered question`,pendingMany:`{count} unanswered questions`,inComposer:`Answer above the message box.`,archived:`No longer pending`,archivedReason:`The conversation moved on. You can still answer this question.`,sendFailed:`Could not send your answer. Your draft is preserved.`,queued:`Answer queued`,sending:`Sending answer…`,sent:`Answer sent`,failed:`Answer not sent`,awaitingConfirmation:`Awaiting delivery confirmation`,retry:`Retry answer`,draftStorageFailed:`This answer is not saved on this device. Keep this page open or copy your answer.`,draftConflict:`This question was edited in another tab. Copy your answer before reloading.`},questions:{resourcePreview:`Preview resource`,addResources:`Add resources`,resourceUploadTooLarge:`Selected resources exceed the upload limits.`,other:`Type your own answer here`,multilineHint:`Enter adds a line · {shortcut} to continue`,answer:`Answer`,answerPlaceholder:`{label}`,openLink:`Open link`,externalStepHint:`Complete the step in the new tab, then return here to submit your answer.`,submit:`Submit`,next:`Next`,back:`Back`,skip:`Skip`,skipping:`Skipping…`,skipped:`Skipped`,collapse:`Collapse question`,expand:`Expand question`,eyebrow:`Waiting for your answer`,summaryLabel:`Question outcome`,ownAnswerFor:`Your own answer for {header}`,storeRequestedBy:`Requested by {agent} · {session}`,storeEntry:`Stores {name} as {kind}`,storeReplacement:`Replaces {name} — last updated {updated}`,storeReplacementBy:`Replaces {name} — last updated {updated} by {updatedBy}`,submitting:`Submitting…`,submitFailed:`Could not submit: {error}`,answered:`Answered`,answeredElsewhere:`Answered elsewhere`,unavailable:`Unavailable`,expired:`Expired`,disconnected:`Not connected. Try again after reconnecting.`},imageLightbox:{previous:`Previous image`,next:`Next image`,position:`{current} / {total}`,label:`Image preview: {title}`,open:`Open image {title}`,openOriginal:`Open in new tab`,copy:`Copy image`,download:`Download image`,copyFailed:`Could not copy this image. Check clipboard access and try again.`,downloadFailed:`Could not download this image. Try again.`,loadFailed:`Could not load this image. Try again.`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetZoom:`Reset zoom`,close:`Close image preview`,untitled:`Image`},externalImage:{notLoaded:`External image not loaded`,open:`Open image`},messages:{copySelection:`Copy`,replyingTo:`Replying to {name}`,message:`message`,showLess:`Show less`,showMore:`Show more`,tooLargeToDisplay:`This message is too large to display here.`,unattributedSender:`Message`,toolSender:`Tool`,errorSender:`Error`},mediaPlayer:{play:`Play`,pause:`Pause`,seek:`Seek media`,mute:`Mute`,unmute:`Unmute`,volume:`Volume`,download:`Download {filename}`,preparing:`Preparing playback…`,openVideo:`Expand {filename} in the media overlay`,videoPreview:`Video preview: {title}`,closeVideoPreview:`Close video preview`},youtube:{provider:`YouTube`,video:`YouTube video`,player:`YouTube player: {title}`,play:`Play {title}`,open:`Open on YouTube`,openVideo:`Open {title} on YouTube`,close:`Close player`,strict:`Inline playback is disabled in strict embed mode. Open this video on YouTube.`,narrow:`Open this video on YouTube to play it in a larger window.`},modelControls:{},nativeRuntimeRecovery:{},permissionControls:{},rail:{title:`Side chat`,subtitle:`Ask about this session or its project`,expand:`Expand side chat`,collapse:`Collapse side chat`,close:`Close side chat`,show:`Show side chat`,clear:`Clear side chat`,pullRequests:`Pull requests`,checksPassing:`{count} passed`,checksFailing:`{count} failed`,checksPending:`{count} running`,finished:`Finished {time}`,empty:`Answers come from this session's transcript and its project files.`,starters:{changed:`What changed?`,stopped:`Why did it stop?`,remaining:`What's left?`},askLabel:`Ask in side chat`,askPlaceholder:`Ask a question`,askImageQuestion:`What does this image show?`,selectionTooLong:`These comments are too long for Side chat. Use a shorter selection or comment.`,selectionQuoteOnly:`The selection is too long to attach. A short quote is ready in Side chat.`,askSubmit:`Ask`,askPending:`Answering from this session…`,askBusy:`Side chat is already answering a question.`,askHistoryUnavailable:`Couldn't load this session's history.`,askMissing:`This session is no longer available.`,askModelUnavailable:`No utility model is configured for this session.`,askImageUnsupported:`This Side chat model cannot read images. Choose an image-capable utility model, then retry.`,askRateLimited:`Side chat reached its question limit. Try again shortly.`,askUnavailable:`Side chat cannot answer right now.`,askRetry:`Retry`,asOf:`as of {time}`,health:{"on-track":`On track`,grinding:`Working`,stuck:`Stuck`,"waiting-on-user":`Waiting on you`,"wrapping-up":`Wrapping up`,done:`Done`,failed:`Failed`}},detailPanel:{},sidebarColumns:{close:`Close {panel}`},sidePanel:{label:`Side panel`,addTab:`Add side panel tab`,expand:`Focus`,expandPanel:`Expand {panel}`,restore:`Restore split`,useViewAsDefault:`Use current view as default`,currentViewIsDefault:`This is the default view`,defaultViewDescription:`Used when anyone opens this dashboard. Personal layout choices still apply.`,savingDefault:`Saving default…`,defaultSaved:`Dashboard default saved for future opens.`,defaultSaveFailed:`Could not save the dashboard default. Check the connection and try again.`,defaultSaveError:`Could not save the dashboard default: {error}`,swap:`Swap {main} and {side}`,layout:`Layout`,dockLeft:`Move side panel left`,dockRight:`Move side panel right`,dockBottom:`Move side panel below`,conversation:`Chat`,conversationEmpty:`The conversation for this task.`,minimize:`Minimize side panel`,resize:`Resize side panel`,review:`Review`,reviewEmpty:`Open a change, file, image, or tool result to review it here.`,terminal:`Terminal`,terminalEmpty:`Open a shell for this session's workspace.`,browser:`Browser`,browserEmpty:`A shared browser for you and the agent.`,files:`Files`,filesEmpty:`Browse files, artifacts, and changes from this session.`,companion:`Side chat`,companionEmpty:`Ask a focused question about this session.`,desktop:`Desktop`,desktopEmpty:`Connect to an available remote desktop.`,portal:`Portal`,portalEmpty:`Preview a web application running for this task.`,discussion:`Discussion`,discussionEmpty:`Open the shared discussion for this session.`,dashboard:`Dashboard`,dashboardEmpty:`This task does not have a dashboard yet.`},thread:{search:`Search messages`,searchPlaceholder:`Search messages...`,closeSearch:`Close search`,loading:`Loading chat`,showEarlier:`Show earlier`,loadingEarlier:`Loading earlier…`,noMatches:`No matching messages`,positionRail:`Conversation position`,positionMarker:`{label}, marker {position} of {count}`,positionUserMessage:`User message`,positionAssistantMessage:`Assistant message`,positionMarkerHint:`Use arrow keys or Home and End to choose a marker, Enter or Space to jump, and Escape to return to the conversation. Tab leaves the rail.`},pendingInputs:{waitingForWorkspaceSync:`Received · waiting for workspace sync`,waitingForWorkerSetup:`Received · waiting for worker setup`,resuming:`Interrupted by a Gateway restart. This saved message will resume when the session is ready.`,cancelled:`Cancelled before the agent started it. It will not run automatically; copy it and send again.`,interrupted:`Interrupted before the agent started it. It will not run automatically; copy it and send again.`,earlier:`Show earlier messages`,latest:`Show latest messages`},pairingQrExpired:{title:`Pairing QR expired`,reason:`Run /pair qr again to generate a fresh setup code.`,badge:`Expired`},composer:{composerInput:`Chat composer`,emojiSuggestions:`Emoji suggestions`,placeholder:`Message {name}`,emptyHint:`Write a message to send.`,placeholderWithAttachments:`Add a message or paste more images...`,offlineQueuedHint:`{count} in this conversation’s outbox.`,preparingModel:`Preparing model...`,responding:`{name} is responding...`,sendingMessage:`Sending message...`,working:`{name} is working...`,runDone:`Done`,runInterrupted:`Interrupted`,runStatus:`Run status: {status}`,compactingContext:`Compacting context...`,contextCompacted:`Context compacted`,fallbackActive:`Fallback active: {model}`,fallbackCleared:`Fallback cleared: {model}`,fallbackSelected:`Selected: {model}`,fallbackCurrent:`Active: {model}`,fallbackPrevious:`Previous fallback: {model}`,fallbackReason:`Reason: {reason}`,fallbackAttempts:`Attempts: {attempts}`,cancelReply:`Cancel reply`,attachmentPreview:`Attachment preview`,browserAnnotation:`Browser annotation`,browserAnnotationPreview:`Browser annotation preview`,browserAnnotationRegion:`{count} marked region`,browserAnnotationRegions:`{count} marked regions`,browserAnnotationInspectedElement:`Element inspected`,browserAnnotationRemoved:`Browser annotation removed.`,browserAnnotationUndoUnavailable:`Undo is unavailable because the browser annotation limit has been reached.`,preparingAttachments:`Preparing attachments…`,preparingAttachmentCount:`Preparing {count} attachment`,preparingAttachmentsCount:`Preparing {count} attachments`,removeAttachment:`Remove attachment`,removeNamedAttachment:`Remove {name}`,removeBrowserAnnotation:`Remove browser annotation: {name}`,addAttachment:`Add attachment`,attach:`Attach…`,attachPhoto:`Photo`,attachFileOption:`File`,menu:{back:`Back`,skills:`Skills`,connectors:`Connectors`,webSearch:`Web search`,webSearchGloballyDisabled:`Web search is disabled in config (tools.web.search.enabled). Session overrides cannot turn it back on.`,webSearchClearStaleEnable:`Web search is disabled in config. Click to clear this session’s enable override.`,managePlugins:`Manage plugins`,manageSkills:`Manage skills`,addMcpServer:`Add MCP server…`,addMcpServerTitle:`Add MCP server`,addMcpServerDescription:`Configure the server and choose where it is enabled.`,scopeLabel:`Availability`,scopeSession:`This session`,scopeEverywhere:`Everywhere`,scopeSessionHint:`The server is saved globally disabled and enabled only for this session.`,scopeEverywhereHint:`The server is saved and enabled for every session.`,toolAccess:{label:`Tool access`,loading:`Loading tools…`,loadFailed:`Couldn’t load tools.`,noTools:`No tools available for this connector.`,summary:`{enabled} of {total} tools on`,summaryOne:`{enabled} of {total} tool on`},enabledCount:`{count} on`,loadingSkills:`Loading skills…`,skillsLoadFailed:`Couldn’t load skills.`,noSkills:`No skills available.`,noConnectors:`No MCP servers configured.`,depsMissing:`deps missing`,skillBlocked:`not available for this agent`,sessionTag:`session`,offlineBlocked:`Connect to the gateway to change session capabilities.`,adminBlocked:`Admin access is required to manage connectors.`,savingBlocked:`Wait for the current session capability change to finish.`},overrides:{count:`{count} overrides`,countOne:`{count} override`,clear:`Clear session overrides`},contextUsage:{title:`Context usage details`,open:`Open context usage details`,summary:`Session context usage: {used} of {limit} ({pct}%)`,contextWindow:`Context window`,promptBudget:`Prompt budget`,latestRunTokens:`Latest run tokens`,estimatedCost:`Est. cost`,planUsage:`Plan usage`,openUsage:`Open usage dashboard`,resets:`Resets {time}`,usageCredits:`Usage credits`,budgetValue:`{used} of {limit}`,limitFiveHour:`5-hour limit`,limitWeekly:`Weekly`,limitDaily:`Daily limit`,limitHours:`{hours}-hour limit`},takePhoto:`Take photo`,cameraAccessFailed:`Unable to access the camera.`,cameraBusy:`The camera is busy or unavailable to the browser.`,cameraFallback:`Camera {number}`,cameraInput:`Camera`,cameraListUnsupported:`This browser cannot list cameras.`,cameraNoneFound:`No camera was found.`,cameraPageInactive:`Cameras are unavailable while this page is inactive.`,cameraPermissionBlocked:`Camera access is blocked. Allow camera access in browser site settings.`,cameraPreview:`Camera preview`,dismissVoiceInputError:`Dismiss voice input error`,microphoneAccessFailed:`Unable to access microphone inputs.`,microphoneAccessPending:`Waiting for microphone access. Bring this tab to the foreground and allow access if prompted.`,microphoneBusy:`Microphone inputs are busy or unavailable to the browser.`,microphoneStopped:`Microphone input stopped. Choose an available input and start again.`,microphoneFallback:`Microphone {number}`,microphoneInput:`Microphone input`,microphoneAppliesNextSession:`Changes apply when you start your next Talk session.`,microphoneListUnsupported:`This browser cannot list microphone inputs.`,noCameras:`No additional cameras found`,noMicrophones:`No additional microphones found`,microphoneNoneFound:`No microphone found. Plug one in and it appears here.`,microphonePageInactive:`Microphone inputs are unavailable while this page is inactive.`,microphonePermissionBlocked:`Microphone access is blocked. Allow it in browser site settings to list inputs.`,realtimeTalkCapability:`Tap to talk`,dictationCapability:`Dictation`,realtimeTalkProviderUnavailable:`No realtime voice provider is configured.`,dictationProviderUnavailableShort:`No transcription provider is configured.`,talkCapabilityChecking:`Checking provider availability…`,talkCapabilityUnknown:`Provider availability could not be verified.`,openRealtimeTalkSettings:`Talk settings`,openDictationSettings:`Transcription setup`,configureCapability:`Configure`,holdToRecordSetting:`Hold microphone button to start dictation`,holdToDictate:`Hold to start dictation`,holdToRecordSettingDescription:`Hold until dictation starts, then release and keep speaking. Tap Stop to insert the transcript.`,dictationAudioUnsupported:`The Gateway returned an unsupported dictation audio format.`,dictationBrowserAudioUnsupported:`This browser cannot capture dictation audio at 8 kHz.`,dictationDisconnected:`Dictation stopped because the Gateway disconnected.`,dictationFailed:`Dictation failed.`,dictationInterruptedRecovery:`Captured text was inserted. Check your connection and try again.`,dictationStartRecovery:`Check microphone access and transcription settings, then try again.`,dictationFinalizing:`Finishing dictation…`,dictationListening:`Listening…`,dictationStopAndKeep:`Stop and keep text`,dictationProviderUnavailable:`No transcription provider is configured for dictation. Choose one in Settings to dictate.`,realtimeTalkCancellationRejected:`Realtime output cancellation was not accepted.`,realtimeTalkMissingTurnIdentity:`Realtime output is missing its turn identity.`,realtimeTalkRequiresMicrophone:`Realtime voice input requires browser microphone access.`,selectedMicrophoneUnavailable:`The selected microphone is unavailable. Choose another input or System default.`,selectedCameraUnavailable:`The selected camera is unavailable. Choose another camera or System default.`,startVoiceInput:`Start voice input`,voiceGestureHint:`Tap to talk · Hold to start dictation`,stillListening:`Still listening`,stopVoiceInput:`Stop voice input`,systemDefaultMicrophone:`System default`,useSystemDefaultMicrophoneForCall:`Use System default for this call`,systemDefaultCamera:`System default`,switchCamera:`Switch camera`,turnCameraOff:`Turn camera off`,turnCameraOn:`Turn camera on`,voiceTranscript:`Voice transcript`},attachments:{allowImage:`Allow image`,attachedFile:`Attached file`,audio:`Audio`,expand:`Open {filename} in the side panel`,open:`Open`,previewUnavailable:`Preview unavailable`,textPreviewUnavailable:`Could not preview this file. Text previews require UTF-8 files up to 256 KiB. Download it to read the full file.`,htmlPreviewUnavailable:`Could not preview this HTML file. HTML previews require UTF-8 files up to 2 MiB. Download it to read the full file.`,readFailed:`Could not attach: {names}{more}`,imagesOnly:`Side chat accepts image attachments only.`,tooLarge:`Too large to send: {names}{more}`,showInTextField:`Show in text field`,pastedText:`Pasted text`,outsideAllowedFolders:`Outside allowed folders`,unavailable:`Unavailable`,failureDeliveryFailed:`Delivery failed. Try sending this file again.`,failureInvalidReference:`Use a public HTTPS URL without credentials or attach a local file by a safe path.`,failureFileNotFound:`File not found. Check the path and try again.`,failureUnsupportedFormat:`Rejected by the local attachment allowlist. Send a supported file type.`,history:`History`,image:`Image`,notSent:`Not sent`,omittedFromHistory:`Omitted from history`,omittedFromHistoryWithSize:`Omitted from history · {size}`,video:`Video`},voice:{asking:`Asking OpenClaw...`,preparing:`Preparing voice session...`,connecting:`Connecting voice input...`,listening:`Listening...`,selectionFailed:`Could not change voices. Restart the call.`,selectionTimedOut:`Voice change timed out. Restart the call.`,selectionConfirmationFailed:`Voice change unconfirmed.`},selectors:{loadMoreSessions:`Show more`,loadMoreRosterSessions:`Load more sessions`,model:`Chat model`,modelSection:`Model`,modelLocked:`Locked`,modelLockedLabel:`Model selection controlled for this session`,lockedSessionModel:`Session model`,thinkingLevel:`Chat thinking level`},toolCards:{tool:`Tool`,canvas:`Canvas`,summary:`Summary`,toolInput:`Tool input`,toolOutput:`Tool output`,providerResponse:`Provider tool response`,executionOutput:`Execution output`,showFullOutput:`Show full output`,fullOutputUnavailable:`Full output unavailable. Only the captured output is shown.`,copyOutput:`Copy available output`,downloadOutput:`Download available output`,outputLoadFailed:`Could not load the full output. Try again.`,outputDownloadFailed:`Could not download the output. Try again.`,toolError:`Tool error`,rawDetails:`Raw details`,activity:{titleOne:`1 operation`,titleMany:`{count} operations`,commandsOne:`1 command`,commandsMany:`{count} commands`,readsOne:`1 read`,readsMany:`{count} reads`,editsOne:`1 edit`,editsMany:`{count} edits`,writesOne:`1 write`,writesMany:`{count} writes`,searchesOne:`1 search`,searchesMany:`{count} searches`,fetchesOne:`1 fetch`,fetchesMany:`{count} fetches`,otherOne:`1 other operation`,otherMany:`{count} other operations`,failed:`{count} failed`,blocked:`{count} blocked`,unknown:`{count} unknown`},showRawDetails:`Show raw details`,hideRawDetails:`Hide raw details`,viewMode:`Tool detail view`,diff:`Diff`,raw:`Raw`,openFile:`Open file`,openDetails:`Open tool details in side panel`,widgetActions:`Widget actions`,copyToClipboard:`Copy to clipboard`,downloadFile:`Download file`,copyAsImage:`Copy as image`,downloadAsImage:`Download as image`,widgetExportRerender:`This widget needs to be re-rendered to export as an image.`,widgetExportHtmlFallback:`Image unavailable. Downloaded the widget as HTML instead.`,widgetExportFailed:`Widget export failed. Try again.`,pinToDashboard:`Pin to dashboard`,pinToDashboardPending:`Pinning…`,pinToDashboardFailed:`Could not pin to dashboard. Try again.`,pinnedToDashboard:`Pinned`,fileChanges:`File changes`,attemptedChanges:`Attempted changes`,failed:`failed`,skipped:`Skipped`,skippedCount:`{count} skipped`,running:`Running`,completed:`Completed`,blocked:`Blocked`,outcomeUnknown:`Outcome unknown`,exitCode:`Exit code {code}`,failureCount:`{count} failed`,noOutputFailed:`No output — tool failed.`,noOutputSucceeded:`No output — tool completed successfully.`,noResult:`No result available.`,review:{reviewing:`{reviewer} reviewing`,approved:`{reviewer} approved`,denied:`{reviewer} denied`,timedOut:`{reviewer} timed out`,aborted:`{reviewer} stopped`,risk:`{level} risk`,authorization:`{level} authorization`,noRationale:`No rationale was provided.`},verbs:{read:`Read`,edit:`Edit`,editing:`Editing`,edited:`Edited`,create:`Create`,creating:`Creating`,created:`Created`,delete:`Delete`,deleting:`Deleting`,deleted:`Deleted`,change:`Change`,changing:`Changing`,changed:`Changed`,write:`Write`,writing:`Writing`,wrote:`Wrote`,searched:`Searched`,fetched:`Fetched`}},workRun:{workedFor:`Worked for {duration}`,worked:`Worked`,toolCallsOne:`1 tool call`,toolCallsMany:`{count} tool calls`},sessionDiff:{title:`Changes`,show:`Show session changes`,refresh:`Refresh changes`,loading:`Loading changes…`,empty:`No changes in this session's checkout.`,notGit:`This session's workspace is not a git checkout.`,unknownSession:`No workspace is associated with this session.`,unknownCommit:`This commit is no longer available in the session checkout.`,workspaceStopped:`Saved changed files are shown. Start the cloud session to load full diffs and line counts.`,workspaceStoppedFile:`Start the cloud session to load this diff.`,disconnected:`Gateway is disconnected.`,allChanges:`All Changes`,uncommitted:`Uncommitted`,commitsAhead:`{count} commits ahead of {base}`,head:`HEAD`,mergeBase:`Merge Base`,scopeMenu:`Choose change scope`,sync:`Sync`,syncLocally:`Sync Locally`,syncDescription:`Run this command in a local checkout to mirror this session's committed changes.`,copyCommand:`Copy sync command`,checkoutPath:`Checkout path`,branchName:`Branch name`,uncommittedStay:`Uncommitted changes stay in the session checkout.`,viewOptions:`Change view options`,collapseAll:`Collapse All`,expandAll:`Expand All`,enableWrapping:`Enable Wrapping`,disableWrapping:`Disable Wrapping`,switchSplit:`Switch to Split Diff`,switchUnified:`Switch to Unified Diff`,fileActions:`Actions for {path}`,copyPath:`Copy Path`,openFile:`Open File`,openInEditor:`Open in Editor`,revealInFileTree:`Reveal in File Tree`,unmodifiedLines:`{count} unmodified lines`,expandPreviousLines:`Show previous {count} unmodified lines`,expandNextLines:`Show next {count} unmodified lines`,expandAllLines:`Show all {count} unmodified lines`,binaryFile:`Binary file`,untracked:`untracked`,previewUnavailable:`Diff preview is unavailable.`,truncatedFile:`Diff truncated.`,truncatedResult:`Some changes could not be displayed.`,statusAdded:`Added`,statusDeleted:`Deleted`,statusRenamed:`Renamed`,statusModified:`Modified`},sessionDiscussion:{show:`Show discussion`,hide:`Hide discussion`,disconnected:`Gateway is disconnected.`,loading:`Loading discussion…`,opening:`Opening discussion…`,requiresWriteAccess:`Operator write access is required to open this discussion.`,openExternal:`Open discussion in a new tab`,frameTitle:`Session discussion`,unavailable:`This discussion cannot be embedded.`},workspaceFiles:{label:`Session workspace`,collapse:`Collapse session workspace`,showFiles:`Show session files`,dockRight:`Dock to the right`,dockBottom:`Dock to the bottom`,workspace:`Session`,files:`Workspace`,refresh:`Refresh session workspace`,loading:`Loading session workspace…`,changed:`Changed`,read:`Read`,artifacts:`Artifacts`,browser:`Project files`,root:`Root`,search:`Search files`,searchResults:`Search results`,parentFolder:`Parent folder`,noBrowserFiles:`No files in this folder.`,folderUnavailable:`This folder is unavailable. Open its parent folder to continue browsing.`,noSearchResults:`No matching files.`,truncated:`Showing the first matching files. Refine the search to narrow results.`,session:`Session`,missing:`Missing`,filterAll:`All`,filters:`Filter files`,changedCount:`{count} changed`,readCount:`{count} read`,artifactCount:`{count} artifacts`,actions:`Workspace file actions`,preview:`Preview`,copyPath:`Copy path`}},languages:{en:`English`,zhCN:`简体中文 (Simplified Chinese)`,zhTW:`繁體中文 (Traditional Chinese)`,ptBR:`Português (Brazilian Portuguese)`,de:`Deutsch (German)`,es:`Español (Spanish)`,jaJP:`日本語 (Japanese)`,ko:`한국어 (Korean)`,fr:`Français (French)`,hi:`हिन्दी (Hindi)`,ar:`العربية (Arabic)`,it:`Italiano (Italian)`,tr:`Türkçe (Turkish)`,uk:`Українська (Ukrainian)`,id:`Bahasa Indonesia (Indonesian)`,pl:`Polski (Polish)`,th:`ไทย (Thai)`,vi:`Tiếng Việt (Vietnamese)`,nl:`Nederlands (Dutch)`,fa:`فارسی (Persian)`,ru:`Русский (Russian)`},secretsStore:{name:`Name`,access:`Access`,accessMode:`Access mode`,value:`Value`,allowedHosts:`Allowed hosts`,allowedHostsPlaceholder:`api.example.com`,allowedHostsHint:`Exact hostnames only, one per line or comma-separated. No wildcards or ports.`,noAllowedHosts:`None`,updated:`Last updated`,by:`{time} by {name}`,actions:`Actions`,add:`Add`,edit:`Edit`,bulk:`Bulk Add`,protectedSecret:`Protected secret`,protectedSecretHint:`Hidden after save and inert unless referenced by a SecretRef or used through enabled destination-bound Gateway egress. It is never directly readable.`,agentReadable:`Agent-readable environment`,agentReadableHint:`High risk: visible to admins and plaintext to Gateway-hosted agent commands. The agent can print, transmit, or persist it. Applies from the next run.`,hint:`Choose protected, write-only secrets or intentionally agent-readable Gateway environment values.`,required:`Enter a value.`,detect:`Protect credential-like names automatically`,detected:`{count} protected secrets detected`,detectedOne:`{count} protected secret detected`,unavail:`Gateway/admin required.`,badName:`Use SERVICE_API_KEY.`,tooLarge:`Max 64 KiB.`,savedProtected:`Saved {name} as Protected secret. Add a SecretRef or enable destination-bound Gateway egress to use it.`,savedReadable:`Saved {name} as Agent-readable environment. It is available to Gateway-hosted agent commands from the next run.`,savedMany:`Saved {count} entries ({protected} protected, {readable} agent-readable). Protected secrets need a SecretRef or enabled destination-bound Gateway egress; agent-readable environment values reach Gateway-hosted agent commands from the next run.`,warnings:`{count} runtime warnings.`,partial:`{saved}/{total}: {error}`,confirmDelete:`Delete {name}?`,deleted:`Deleted {name}.`,deleteFailed:`The secret was not deleted. Reload the list and try again.`},cron:{adminRequired:`Browsing only. Automation changes require operator.admin access.`,tabs:{filterLabel:`Automation status`,all:`All`,active:`Active`,paused:`Paused`},list:{},suggestions:{},stats:{tasks:`Automations`,failing:`Failing`,nextWake:`Next wake`},detail:{tabsLabel:`Automation details`,newTitle:`New automation`,newSubtitle:`Describe what OpenClaw should do, then pick when it runs.`,back:`All automations`,settingsTab:`Settings`,historyTitle:`Run history`,generalSection:`General`,scheduleSection:`Schedule`,deliverySection:`Delivery`,active:`Active`,paused:`Paused`},actions:{runNow:`Run now`,runNowJob:`Run now: {name}`,runIfDue:`Run if due`,pauseJob:`Pause: {name}`,resumeJob:`Resume: {name}`,clone:`Clone`,remove:`Remove`,removeConfirmTitle:`Remove "{name}"?`,removeConfirmMessage:`This permanently deletes the automation and stops all future runs. This action cannot be undone.`,moreJob:`More actions for {name}`},runNotStarted:{notDue:`This automation is not due yet.`,alreadyRunning:`This automation is already running.`,recoveryPending:`Scheduler recovery is still in progress.`,invalidSpec:`This automation has an invalid schedule or payload.`,stopped:`The scheduler is stopped.`,unknown:`This automation could not be started.`},jobs:{schedule:`Schedule`,lastRun:`Last run`,all:`All`,condition:`Condition`,conditional:`Conditional`,unconditional:`Unconditional`,sort:`Sort`,nextRun:`Next run`,recentlyUpdated:`Recently updated`,name:`Name`,direction:`Direction`,ascending:`Ascending`,descending:`Descending`,reset:`Reset`},runs:{searchRuns:`Search runs`,searchPlaceholder:`Summary, error, or task`,newestFirst:`Newest first`,oldestFirst:`Oldest first`,status:`Status`,delivery:`Delivery`,clear:`Clear`,allStatuses:`All statuses`,allDelivery:`All delivery`,noMatching:`No matching runs.`,emptyTitle:`No runs yet`,emptyHint:`Runs show up here once an automation fires.`,conditionActivity:`Condition activity`,conditionActivityHint:`Checks run on schedule before the payload starts.`,checks:`Checks`,lastChecked:`Last checked`,lastFired:`Last fired`,notChecked:`Not checked yet`,neverFired:`Never`,emptyConditionTitle:`No payload runs yet`,emptyConditionHint:`The condition has been checked {count} times without matching. Run history starts when the payload executes.`,emptyConditionHintOne:`The condition has been checked once without matching. Run history starts when the payload executes.`,emptyConditionUnchecked:`The condition has not been checked yet. Run history starts when the payload executes.`,loadMore:`Load more runs`,runStatusOk:`OK`,runStatusError:`Error`,runStatusSkipped:`Skipped`,runStatusUnknown:`Unknown`,runStatusRunning:`Running`,deliveryDelivered:`Delivered`,deliveryNotDelivered:`Not delivered`,deliveryUnknown:`Unknown`,deliveryNotRequested:`Not requested`},form:{requiredSr:`required`,fieldName:`Name`,description:`Description`,agentId:`Agent`,namePlaceholder:`Morning brief`,descriptionPlaceholder:`Optional context for this task`,agentPlaceholder:`main or ops`,agentHelp:`Start typing to pick a known agent, or enter a custom one.`,promptPlaceholder:`Describe what OpenClaw should do...`,repeat:`Repeat`,repeatInterval:`Interval`,repeatOnce:`Once`,repeatOnExit:`On exit`,repeatStream:`Stream source`,onExitHelp:`Runs when a watched command exits. The schedule cannot be edited here.`,every:`Every`,at:`At`,cronOption:`Cron`,runAt:`Run at`,unit:`Unit`,minutes:`Minutes`,hours:`Hours`,days:`Days`,expression:`Expression`,expressionPlaceholder:`0 7 * * *`,everyAmountPlaceholder:`30`,summaryEverySecondOne:`Runs every second`,summaryEveryMinuteOne:`Runs every minute`,summaryEveryHourOne:`Runs every hour`,summaryEveryDayOne:`Runs every day`,summaryEverySeconds:`Runs every {amount} seconds`,summaryEveryMinutes:`Runs every {amount} minutes`,summaryEveryHours:`Runs every {amount} hours`,summaryEveryDays:`Runs every {amount} days`,summaryOnce:`Runs once at {at}`,summaryCron:`Cron schedule {expr}`,summaryCronTz:`Cron schedule {expr} ({tz})`,timezoneOptional:`Timezone`,timezonePlaceholder:`America/Los_Angeles`,timezoneHelp:`Optional. Leave blank to use the Gateway host timezone, or enter any valid IANA timezone.`,runsIn:`Runs in`,mainSession:`Main session`,isolatedSession:`Isolated session`,sessionHelp:`Main posts into the agent's timeline. Isolated runs a dedicated agent turn.`,wakeMode:`Wake mode`,now:`Now`,nextHeartbeat:`Next heartbeat`,wakeModeHelp:`Now triggers immediately. Next heartbeat waits for the next cycle.`,action:`Action`,command:`Command`,script:`Script`,readOnlyPayloadHelp:`This payload was created outside Control UI. Its contents stay read-only and are preserved when you save other changes.`,systemEvent:`Post to main timeline`,agentTurn:`Run agent task`,systemEventHelp:`Sends your text to the gateway main timeline (good for reminders).`,agentTurnHelp:`Starts an agent run in its own session using your prompt.`,timeoutSeconds:`Timeout (seconds)`,timeoutPlaceholder:`Optional, e.g. 90`,timeoutHelp:`Optional. Leave blank to use the gateway default timeout for this run.`,mainTimelineMessage:`Main timeline message`,assistantTaskPrompt:`Prompt`,deliveryModeLabel:`Mode`,selectDeliveryMode:`Choose a delivery mode`,announceDefault:`Announce summary`,webhookPost:`Webhook POST`,noneInternal:`None (internal)`,deliveryHelp:`Announce posts a summary to chat. None keeps execution internal.`,webhookUrl:`Webhook URL`,channel:`Channel`,webhookPlaceholder:`https://example.com/cron`,channelHelp:`Choose which connected channel receives the summary.`,webhookHelp:`Send run summaries to a webhook endpoint.`,to:`To`,toPlaceholder:`+1555... or chat id`,toHelp:`Optional recipient override (chat id, phone, or user id).`,advanced:`Advanced`,advancedHelp:`Optional condition checks, delivery guarantees, schedule jitter, and model controls.`,conditionTrigger:`Condition trigger`,conditionTriggerHelp:`Run a quiet headless check before the task and call the model only when it matches.`,triggerConfigured:`Trigger configured`,triggerScript:`Trigger script`,triggerScriptHelp:`Runs unattended with this automation's tool policy. Return json({ fire, message?, state? }); limits: 30 seconds, 5 tool calls, 16 KB state.`,triggerOnce:`Disable after first match`,triggerOnceHelp:`Disable this automation after the first successful fired task.`,triggerDisabled:`Condition triggers are disabled by cron.triggers.enabled.`,triggerDisabledConfigured:`Condition triggers are disabled. Existing configuration is preserved until you clear it.`,clearTrigger:`Clear trigger`,startEnabled:`Start enabled`,deleteAfterRun:`Delete after run`,deleteAfterRunHelp:`Best for one-shot reminders that should auto-clean up.`,clearAgentOverride:`Clear agent override`,clearAgentHelp:`Force this task to use the gateway default agent.`,sessionKey:`Session key`,sessionKeyHelp:`Optional routing key for job delivery and wake routing.`,exactTiming:`Exact timing (no stagger)`,exactTimingHelp:`Run on exact cron boundaries with no spread.`,staggerWindow:`Stagger window`,staggerUnit:`Stagger unit`,staggerPlaceholder:`30`,seconds:`Seconds`,accountId:`Account ID`,accountIdHelp:`Optional channel account ID for multi-account setups.`,lightContext:`Light context`,lightContextHelp:`Use lightweight bootstrap context for this agent job.`,model:`Model`,customModel:`Custom model…`,modelPlaceholder:`openai/gpt-5.2`,modelHelp:`Start typing to pick a known model, or enter a custom one. Routine jobs (summaries, triage, classification) run well on a lighter model — cheaper and faster than your default.`,thinking:`Reasoning`,thinkingPlaceholder:`low`,thinkingHelp:`Use a suggested level or enter a provider-specific value.`,failureAlerts:`Failure alerts`,failureAlertInherit:`Inherit global setting`,failureAlertDisabled:`Disable for this job`,failureAlertCustom:`Custom per-job settings`,failureAlertsHelp:`Control when this job sends repeated-failure alerts.`,failureAlertAfter:`Alert after`,failureAlertAfterHelp:`Consecutive errors before alerting.`,failureAlertCooldown:`Cooldown (seconds)`,failureAlertCooldownHelp:`Minimum seconds between alerts.`,failureAlertChannel:`Alert channel`,failureAlertTo:`Alert to`,failureAlertToPlaceholder:`+1555... or chat id`,failureAlertToHelp:`Optional recipient override for failure alerts.`,failureAlertMode:`Alert mode`,failureAlertAnnounce:`Announce (via channel)`,failureAlertWebhook:`Webhook (HTTP POST)`,failureAlertAccountId:`Alert account ID`,failureAlertAccountPlaceholder:`Account ID for multi-account setups`,bestEffortDelivery:`Best effort delivery`,bestEffortHelp:`Do not fail the task if delivery itself fails.`,cantAddYet:`Can't save yet`,fillRequired:`Fill the required fields below to enable submit.`,fixFields:`Fix {count} field to continue.`,fixFieldsPlural:`Fix {count} fields to continue.`,saving:`Saving...`,saveChanges:`Save changes`,createTask:`Create automation`,createAndRun:`Create & run now`,cancel:`Cancel`},jobState:{next:`Next`},runEntry:{noSummary:`No summary.`,deliverySuppression:`Delivery suppression: {reason}`,runAt:`Run at`,transcript:`Run transcript`,viewTranscript:`View transcript`,transcriptEmpty:`No messages in this run yet.`,transcriptMissingMetadata:`This run is missing the identity needed to open its transcript.`,transcriptUnavailable:`The exact run transcript is unavailable or ambiguous. Refresh run history and try again.`,next:`Next {rel}`,due:`Due {rel}`},errors:{nameRequired:`Name is required.`,scheduleAtInvalid:`Enter a valid date/time.`,everyAmountInvalid:`Interval must be greater than 0.`,triggerIntervalTooShort:`Condition-triggered automations must run at least every 30 seconds.`,cronExprRequired:`Cron expression is required.`,staggerAmountInvalid:`Stagger must be greater than 0.`,triggerScriptRequired:`Trigger script is required when the condition trigger is enabled.`,triggerScriptPayloadUnsupported:`Script payloads cannot use condition triggers because both own the same saved state.`,triggerScheduleUnsupported:`Condition triggers require an interval, cron, or stream schedule.`,systemTextRequired:`System text is required.`,agentMessageRequired:`Agent message is required.`,timeoutInvalid:`If set, timeout must be 0 or greater (0 disables this timeout).`,deliveryModeRequired:`Choose a delivery mode explicitly, or run openclaw doctor --fix to repair legacy settings.`,webhookUrlRequired:`Webhook URL is required.`,webhookUrlInvalid:`Webhook URL must be a valid http(s):// URL without embedded credentials.`,invalidRunTime:`Invalid run time.`,invalidIntervalAmount:`Invalid interval amount.`,cronExprRequiredShort:`Cron expression required.`,invalidStaggerAmount:`Invalid stagger amount.`,systemEventTextRequired:`System event text required.`,agentMessageRequiredShort:`Agent message required.`,nameRequiredShort:`Name required.`}},linkReader:{loadingPreview:`Loading preview…`,title:`Link reader`,urlPlaceholder:`Supported link URL`}}})))()}function zr(e){return Wr.some(t=>t===e)}function Br(e){let t=e.toLowerCase();if(t.startsWith(`zh`)){let[,...e]=t.split(`-`);return e.includes(`hant`)?`zh-TW`:e.includes(`hans`)?`zh-CN`:e.some(e=>e===`tw`||e===`hk`||e===`mo`)?`zh-TW`:`zh-CN`}return Ur.find(e=>t.startsWith(e.split(`-`)[0].toLowerCase()))??`en`}async function Vr(e){return e===`en`?null:(await Hr[e]())[e.replaceAll(`-`,`_`)]??null}var Hr,Ur,Wr;function Gr(){return(Gr=e((()=>{G(),Hr={"zh-CN":()=>U(()=>import(`./zh-CN-DUWCwJ3h.js`),[],import.meta.url),"zh-TW":()=>U(()=>import(`./zh-TW-kxBaqM-4.js`),[],import.meta.url),"pt-BR":()=>U(()=>import(`./pt-BR-jhVofdRs.js`),[],import.meta.url),de:()=>U(()=>import(`./de-BQvNHAza.js`),[],import.meta.url),es:()=>U(()=>import(`./es-hshjXKIK.js`),[],import.meta.url),"ja-JP":()=>U(()=>import(`./ja-JP-RE2MtuhB.js`),[],import.meta.url),ko:()=>U(()=>import(`./ko-DB2au_5B.js`),[],import.meta.url),fr:()=>U(()=>import(`./fr-BBNyMKus.js`),[],import.meta.url),hi:()=>U(()=>import(`./hi-Bcw8M12G.js`),[],import.meta.url),ar:()=>U(()=>import(`./ar-B0VgzGGj.js`),[],import.meta.url),it:()=>U(()=>import(`./it-Z8b4f6IW.js`),[],import.meta.url),tr:()=>U(()=>import(`./tr-BAlKIlVY.js`),[],import.meta.url),uk:()=>U(()=>import(`./uk-CqbLaA39.js`),[],import.meta.url),id:()=>U(()=>import(`./id-uIo1UDnK.js`),[],import.meta.url),pl:()=>U(()=>import(`./pl-CYBcoNFN.js`),[],import.meta.url),th:()=>U(()=>import(`./th-T42GI3yb.js`),[],import.meta.url),vi:()=>U(()=>import(`./vi-DmrZR41j.js`),[],import.meta.url),nl:()=>U(()=>import(`./nl-58-525on.js`),[],import.meta.url),fa:()=>U(()=>import(`./fa-BCOccuL4.js`),[],import.meta.url),ru:()=>U(()=>import(`./ru-CBgS7n4y.js`),[],import.meta.url)},Ur=Object.keys(Hr),Wr=[`en`,...Ur]})))()}function Kr(e,t){let n=e;for(let e of t){if(!n||typeof n!=`object`)return;n=Reflect.get(n,e)}return n}function qr(e){typeof document<`u`&&(document.documentElement.lang=e,document.documentElement.dir=Jr.has(e)?`rtl`:`ltr`)}var Jr,Yr,Xr,K,Zr;function Qr(){return(Qr=e((()=>{Rr(),Gr(),Jr=new Set([`ar`,`fa`]),Yr=class{constructor(e=Vr){this.loadLocaleTranslation=e,this.locale=`en`,this.translations={en:Lr},this.subscribers=new Set,this.pendingLocale=null,this.pendingLocaleShouldPersist=!0,this.localeRequestGeneration=0,this.inFlightLocaleLoads=new Map,this.loadLocale()}readStoredLocale(){try{return kr()?.getItem(`openclaw.i18n.locale`)??null}catch{return null}}persistLocale(e){let t=kr();if(t)try{e===null?t.removeItem(`openclaw.i18n.locale`):t.setItem(`openclaw.i18n.locale`,e)}catch{}}resolveInitialLocale(){let e=this.readStoredLocale();return zr(e)?{locale:e,shouldPersist:!0}:{locale:this.getSystemLocale(),shouldPersist:!1}}loadLocale(){let e=this.resolveInitialLocale();if(e.locale===`en`){this.locale=`en`,qr(`en`),e.shouldPersist||this.persistLocale(null);return}this.applyLocale(e.locale,!1,e.shouldPersist)}getLocale(){return this.locale}getRequestedLocale(){return this.pendingLocale??this.locale}getSystemLocale(){return Br((typeof globalThis.navigator?.language==`string`?globalThis.navigator.language:null)??``)}async setLocale(e){return this.applyLocale(e,!1,!0)}async useSystemLocale(){return this.applyLocale(this.getSystemLocale(),!1,!1)}async applyLocale(e,t,n){let r=++this.localeRequestGeneration,i=e!==`en`&&!this.translations[e];if(n||this.persistLocale(null),this.locale===e&&!i){this.pendingLocale=null,n&&this.persistLocale(e);return}if(i){this.pendingLocale=e,this.pendingLocaleShouldPersist=n;try{let t=await Cn(this.inFlightLocaleLoads,e,()=>this.loadLocaleTranslation(e),{evictOnSettled:!0});if(!t)return;this.translations[e]=t}catch(i){let a=this.localeRequestGeneration===r;t&&a&&this.localeLoadRecovery?.isUnrecoverableError(i)&&(n&&this.persistLocale(e),this.localeLoadRecovery.onUnrecoverableLocaleLoad?.(e)),console.error(`Failed to load locale: ${e}`,i);return}}this.localeRequestGeneration===r&&(this.pendingLocale=null,this.locale=e,qr(e),n&&this.persistLocale(e),this.notify())}retryPendingLocale(){if(this.pendingLocale===null||this.pendingLocale===this.locale)return;let e=this.pendingLocale,t=this.pendingLocaleShouldPersist;this.pendingLocale=null,this.applyLocale(e,!0,t)}setLocaleLoadRecovery(e){this.localeLoadRecovery=e}registerTranslation(e,t){this.translations[e]=t}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}notify(){this.subscribers.forEach(e=>e(this.locale))}translateActive(e){let t=Kr(this.translations[this.locale],e.split(`.`));return typeof t==`string`?t:void 0}t(e,t){let n=e.split(`.`),r=Kr(this.translations[this.locale]||this.translations.en,n);return r===void 0&&this.locale!==`en`&&(r=Kr(this.translations.en,n)),typeof r==`string`?t?r.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`):r:e}},Xr=new Yr,K=(e,t)=>Xr.t(e,t),Zr=e=>Xr.translateActive(e),typeof process<`u`&&{}.VITEST&&(globalThis[Symbol.for(`openclaw.i18nManagerTestApi`)]={createI18nManager(e){return new Yr(e)}})})))()}var $r;function ei(){return(ei=e((()=>{Qr(),$r=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe?.(),this.unsubscribe=Xr.subscribe(()=>this.host.requestUpdate()),this.host.requestUpdate()}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}}})))()}function q(){return(q=e((()=>{Qr(),ei()})))()}var ti,ni,ri;function ii(){return(ii=e((()=>{I(),ei(),ti=class extends Fn{constructor(...e){super(...e),this.i18nController=new $r(this)}},ni=class extends ti{createRenderRoot(){return this}},ri=class extends ni{connectedCallback(){super.connectedCallback(),this.style.display=`contents`}}})))()}function ai(e,t=rr()){let n=t?{mod:`⌘`,ctrl:`⌃`,shift:`⇧`,alt:`⌥`}:{mod:`Ctrl`,ctrl:`Ctrl`,shift:`Shift`,alt:`Alt`},r={Backquote:"`",Comma:`,`,Enter:t?`⏎`:`Enter`,Escape:t?`esc`:`Esc`,ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,Click:`Click`};return[...e.modifiers.map(e=>n[e]),r[e.key]??e.key.toUpperCase()]}function oi(e,t=rr()){return ai(e,t).join(t?``:`+`)}function si(e,t){return Un(e,t,rr(),Qn(t))}var ci;function li(){return(li=e((()=>{Dn(),ci={commandPalette:lt,newSession:{modifiers:[`mod`,`shift`],key:`o`,platformSpecific:!0},archiveSession:{modifiers:[`mod`,`shift`],key:`a`,platformSpecific:!0},keyboardShortcuts:{modifiers:[`mod`],key:`/`},toggleSidebar:{modifiers:[`mod`],key:`b`,platformSpecific:!0},debugOverlay:{modifiers:[`mod`,`shift`],key:`d`},appearanceSettings:{modifiers:[`mod`,`shift`],key:`Comma`},escape:{modifiers:[],key:`Escape`},sendMessage:{modifiers:[],key:`Enter`},modifiedEnter:{modifiers:[`mod`],key:`Enter`},newline:{modifiers:[`shift`],key:`Enter`},transcriptSearch:{modifiers:[`mod`],key:`f`,platformSpecific:!0},terminalPanel:{modifiers:[`ctrl`],key:`Backquote`},homePanel:{modifiers:[`mod`,`shift`],key:`h`},workspaceFiles:{modifiers:[`mod`,`shift`],key:`b`},sideChat:{modifiers:[`mod`,`shift`],key:`s`},browserPanel:{modifiers:[`mod`,`alt`,`shift`],key:`u`},desktopPanel:{modifiers:[`mod`,`alt`,`shift`],key:`d`},discussionPanel:{modifiers:[`mod`,`alt`,`shift`],key:`j`},dashboardPanel:{modifiers:[`mod`,`alt`,`shift`],key:`g`},reviewPanel:{modifiers:[`mod`,`alt`,`shift`],key:`e`},approveAlways:{modifiers:[`mod`,`shift`],key:`Enter`},denyApproval:{modifiers:[`mod`],key:`d`},historyPrevious:{modifiers:[],key:`ArrowUp`},historyNext:{modifiers:[],key:`ArrowDown`},zoomIn:{modifiers:[],key:`+`},zoomOut:{modifiers:[],key:`-`},zoomReset:{modifiers:[],key:`0`},imagePanLeft:{modifiers:[`shift`],key:`ArrowLeft`},imagePanRight:{modifiers:[`shift`],key:`ArrowRight`},imagePanUp:{modifiers:[`shift`],key:`ArrowUp`},imagePanDown:{modifiers:[`shift`],key:`ArrowDown`},toggleSessionSelect:{modifiers:[`alt`],key:`Click`},extendSessionSelect:{modifiers:[`shift`],key:`Click`}}})))()}function ui(e){return e.length<=10?`***`:`${Lt(e,0,6)}...${Lt(e,-4)}`}function di({match:e,groups:t,input:n,offset:r}){let i=r<0?``:n.slice(r+e.length);if(e.includes(`PRIVATE KEY-----`))return lr(e,`...redacted...`);let a=t.findLast(e=>typeof e==`string`&&e.length>0)??e;if(a===`$`&&i.startsWith("`"))return e;let o=ui(a);if(a===e)return o;let s=e.lastIndexOf(a);return s<0?`***`:`${e.slice(0,s)}${o}${e.slice(s+a.length)}`}function fi(e){return e.replace(mi,(e,t,n,r)=>Yn(n)?`${t}${n}=${ui(r)}`:e)}function pi(e){let t=fi(e);for(let e of hi)t=Tn(t,e,di);return gi.reduce((e,[t,n])=>e.replace(t,n),t)}var mi,hi,gi,_i;function vi(){return(vi=e((()=>{jn(),wn(),er(),mi=/([?&])([^=&#\s]+)=([^&#\s"'<>]+)/gu,hi=Kn.map(e=>typeof e==`string`?new RegExp(...zn(e)):e),gi=[[/\b(Authorization|Cookie|Set-Cookie)\s*:\s*[^\n\r]+/gi,`$1: [redacted]`],[/\b(Bearer\s+)[A-Za-z0-9._~+/=-]{12,}/gi,`$1[redacted]`],[/\b(api[_.-]?key|token|secret|password|passwd|authorization)\b(["'])(\s*:\s*)"(?:\\.|[^"\\\r\n])*"/gi,`$1$2$3"[redacted]"`],[/\b(api[_.-]?key|token|secret|password|passwd|authorization)\b(["'])(\s*:\s*)'(?:\\.|[^'\\\r\n])*'/gi,`$1$2$3'[redacted]'`],[/\b(api[_.-]?key|token|secret|password|passwd|authorization)\b(\s*[:=]\s*)["']?[^"',\s}]+/gi,`$1$2[redacted]`],[/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,`[redacted private key]`]],_i=pi})))()}function J(e,t=``){return Ot(e,{redact:pi})||t}function yi(e,t=``){let n=e?.trim();return n?pi(n):t}function Y(){return(Y=e((()=>{Pn(),vi()})))()}function bi(e){let t=e?.isConnected?e.getBoundingClientRect():null;return t&&t.width>0?t:null}function xi(){return[...document.openClawModalLayers??[]].findLast(e=>e.isConnected)}function Si(){return document.querySelector(`.shell-nav[aria-modal='true']`)??document.querySelector(`.shell`)}function Ci(e){if(typeof document>`u`)return!1;let t=document.querySelector(`openclaw-toast-host`);if(!t)return Ei=e,!1;let n=xi();if(n&&t.parentElement!==n){n.append(t);let e=r=>{r.target===n&&(n.removeEventListener(`wa-after-hide`,e),queueMicrotask(()=>(xi()??Si())?.append(t)))};n.addEventListener(`wa-after-hide`,e)}return t.show(e),!0}var wi,Ti,Ei,Di;function Oi(){return(Oi=e((()=>{I(),Ke(),Ge(),be(),q(),ii(),Y(),wi=6e3,Ti=450,Ei=null,Di=class extends ri{constructor(...e){super(...e),this.toast=null,this.active=!1,this.toastQueue=[],this.dismissTimer=null,this.exitTimer=null,this.exitReason=null,this.remainingMs=0,this.deadline=0,this.hovered=!1}syncPlacement(){this.dataset.toastPlacement=this.parentElement?.matches(`.shell`)?`shell`:`overlay`}connectedCallback(){super.connectedCallback(),this.syncPlacement(),this.hovered=this.querySelector(`.app-toast`)?.matches(`:hover`)??!1,this.syncDismissTimer();let e=Ei;Ei=null,e&&this.show(e)}disconnectedCallback(){if(super.disconnectedCallback(),this.isConnected)return;let e=xi()??Si();this.parentElement?.localName===`openclaw-modal-dialog`&&e?e.append(this):this.dismiss(`disconnected`)}show(e){if(e.fifo&&this.toast){this.toastQueue.push(e);return}this.finishDismiss(this.exitReason??`replaced`),this.toast=e,this.active=!0,this.exitReason=null,this.remainingMs=e.durationMs??wi,this.syncDismissTimer()}updated(){this.toast||(this.hovered=!1),this.syncDismissTimer()}syncDismissTimer(e){if(!this.toast||!this.active||!this.isConnected)return;let t=this.getRootNode(),n=t instanceof ShadowRoot?t.activeElement:this.ownerDocument.activeElement,r=e??this.contains(n);this.hovered||r?this.dismissTimer!==null&&(this.remainingMs=Math.max(0,this.deadline-performance.now()),globalThis.clearTimeout(this.dismissTimer),this.dismissTimer=null):this.dismissTimer===null&&(this.deadline=performance.now()+this.remainingMs,this.dismissTimer=globalThis.setTimeout(()=>this.dismiss(`timeout`),this.remainingMs))}clearDismissTimer(){this.dismissTimer!==null&&(globalThis.clearTimeout(this.dismissTimer),this.dismissTimer=null),this.exitTimer!==null&&(globalThis.clearTimeout(this.exitTimer),this.exitTimer=null)}finishDismiss(e){let t=this.toast;if(this.clearDismissTimer(),this.active=!1,this.exitReason=null,this.toast=null,t?.onDismiss?.(e),e===`disconnected`){this.hovered=!1;let e=this.toastQueue.splice(0);for(let t of e)t.onDismiss?.(`disconnected`)}else if(e!==`replaced`){let e=this.toastQueue.shift();e&&this.show(e)}}dismiss(e){let t=this.toast;if(t){if(this.clearDismissTimer(),e!==`dismiss`&&e!==`timeout`||!this.isConnected||globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches||!bi(t.anchor)){this.finishDismiss(e);return}this.active=!1,this.exitReason=e,this.exitTimer=globalThis.setTimeout(()=>{this.toast===t&&this.finishDismiss(e)},Ti)}}render(){let e=this.toast;if(!e)return Be;let t=bi(e.anchor);return F`
<div
class="app-toast ${t?`app-toast--anchored`:e.placement===`bottom`?`app-toast--bottom`:``}"
data-active=${this.active?`true`:`false`}
style=${We(t?{"--app-toast-anchor-center":`${t.left+t.width/2}px`,"--app-toast-anchor-top":`${t.top}px`,"--app-toast-anchor-width":`${t.width}px`}:{})}
role="status"
aria-live="polite"
aria-atomic="true"
@pointerenter=${()=>{this.hovered=!0,this.syncDismissTimer()}}
@pointerleave=${()=>{this.hovered=!1,this.syncDismissTimer()}}
@focusin=${()=>this.syncDismissTimer(!0)}
@focusout=${e=>{this.syncDismissTimer(e.relatedTarget instanceof Node&&this.contains(e.relatedTarget))}}
@transitionend=${e=>{e.target===e.currentTarget&&e.propertyName===`opacity`&&!this.active&&this.exitReason&&this.finishDismiss(this.exitReason)}}
>
${e.icon?F`<span class="app-toast__icon" aria-hidden="true">${e.icon}</span>`:Be}
<span class="app-toast__message"
>${typeof e.message==`string`?yi(e.message):e.message}</span
>
${e.actionLabel&&e.onAction?F`
<button
type="button"
class="app-toast__action"
@click=${()=>{this.dismiss(`action`),e.onAction?.()}}
>
${e.actionLabel}
</button>
`:Be}
<button
type="button"
class="app-toast__dismiss"
aria-label=${K(`common.dismiss`)}
@click=${()=>this.dismiss(`dismiss`)}
>
${fe.x}
</button>
</div>
`}},In([Ve()],Di.prototype,`toast`,void 0),In([Ve()],Di.prototype,`active`,void 0),typeof customElements<`u`&&!customElements.get(`openclaw-toast-host`)&&customElements.define(`openclaw-toast-host`,Di)})))()}function ki(e,t){let n=R(t);return n?Zn(n,Ni[e]):void 0}function Ai(e){let t=R(e);return t?Ht(t)||Pi.test(t)?t:Fi.test(t)||/[\r\n]/.test(t)?null:t.length<=Mi?t:null:null}function ji(e){let t=ki(`name`,e?.name)??Ii,n=Ai(e?.avatar),r=ki(`avatarSource`,e?.avatarSource)??null,i=e?.avatarStatus===`none`||e?.avatarStatus===`local`||e?.avatarStatus===`remote`||e?.avatarStatus===`data`?e.avatarStatus:null,a=ki(`avatarReason`,e?.avatarReason)??null;return{agentId:typeof e?.agentId==`string`&&e.agentId.trim()?e.agentId.trim():null,name:t,avatar:n,avatarSource:r,avatarStatus:i,avatarReason:a}}var Mi,Ni,Pi,Fi,Ii;function Li(){return(Li=e((()=>{ft(),Mi=64,Ni={name:50,avatarSource:500,avatarReason:200},Pi=/^\/(?!\/)/,Fi=/^[a-z][a-z0-9+.-]*:/i,Ii=`Assistant`})))()}function Ri(e){return Ht(e)||Hi.test(e)}function zi(e,t){return[R(t?.avatar),R(e.identity?.avatarUrl),R(e.identity?.avatar)].find(e=>e&&Ri(e))??null}function Bi(e,t,n){let r=R(e);return r?.startsWith(`blob:`)?r:zi(t,n)}function Vi(e){let t=e?.trim();return!t||t===`A`||t.startsWith(`blob:`)||Ri(t)||t.length>8||/\s/.test(t)||/[\\/.:]/.test(t)||Ui.test(t)?null:t}var Hi,Ui;function Wi(){return(Wi=e((()=>{ft(),Li(),Hi=/^\/(?!\/)/,Ui=/[\u200B-\u200F\u202A-\u202E\u2060-\u206F\uFEFF]/u})))()}function Gi(e){let t=e.trim().toLowerCase();return Gt(t)?`openai`:t}function Ki(e,t){let n=e.trim();if(!n)return``;let r=t?.trim();if(!r)return n;let i=`${r.toLowerCase()}/`;return n.toLowerCase().startsWith(i)?n:`${r}/${n}`}function qi(e,t){let n=e?.trim();return n?n.includes(`/`)?n:Yi(n,t)||n:``}function Ji(e,t){let n=t.trim().toLowerCase();return n?e.some(e=>ea(e)===n):!1}function Yi(e,t){let n=e.trim().toLowerCase();if(!n)return``;let r=``;for(let e of t){if(e.id.trim().toLowerCase()!==n)continue;let t=Ki(e.id,e.provider);if(!r){r=t;continue}if(r.toLowerCase()!==t.toLowerCase())return``}return r}function Xi(e,t,n){if(typeof e!=`string`)return``;let r=e.trim();if(!r)return``;let i=t?.trim();if(!i)return qi(r,n);if(!r.includes(`/`)){let e=qi(r,n);return e===r?Ki(r,i):e}let a=Ki(r,i),o=r.toLowerCase(),s=Gi(i);return n.some(e=>e.id.trim().toLowerCase()===o&&Gi(e.provider)===s)&&Ji(n,a)?a:Ji(n,r)?r:Ji(n,a)?a:Yi(r,n)||r}function Zi(e){let t=e.trim();if(!t)return``;let n=t.indexOf(`/`);return n<=0?t:`${t.slice(n+1)} · ${t.slice(0,n)}`}function Qi(e){let t=e.provider?.trim();return t?`${e.id} · ${t}`:e.id}function $i(e){let t=e.name.trim(),n=e.alias?.trim();return!t||!n?t||n||``:n.toLowerCase()===t.toLowerCase()?t:n.toLowerCase().includes(t.toLowerCase())?n:`${t} · ${n}`}function ea(e){return Ki(e.id,e.provider).trim().toLowerCase()}function ta(e,t){return`${e.toLowerCase()}\u0000${t?.trim().toLowerCase()??``}`}function na(e){let t=new Map,n=new Map,r=e.map(e=>{let t=$i(e);return{entry:e,name:t,qualifiedKey:tn(Ki(e.id,e.provider)),nameKey:t.toLowerCase(),providerKey:ta(t,e.provider)}});for(let{name:e,qualifiedKey:i,nameKey:a,providerKey:o}of r){if(!e)continue;let r=t.get(a)??new Set;r.add(i),t.set(a,r);let s=n.get(o)??new Set;s.add(i),n.set(o,s)}return new Map(r.map(({entry:e,name:r,qualifiedKey:i,nameKey:a,providerKey:o})=>{let s=r||Qi(e);return r&&(t.get(a)?.size??0)>1&&(s=`${r} · ${(n.get(o)?.size??0)<=1?e.provider?.trim()||e.id:Qi(e)}`),[i,s]}))}function ra(e,t){let n=e.trim();return n?t.get(tn(n))??Zi(n):``}function ia(e,t){let n=Ki(e.id,e.provider);return{value:n,label:t.get(tn(n))??Qi(e)}}function aa(){return(aa=e((()=>{vt(),Bt()})))()}function oa(e,t){return X(e.key)?.agentId??e.agentId??t}function X(e){let t=fr(e);return An(t.startsWith(`:`)||t.endsWith(`:`)||t.includes(`::`)?t.split(`:`).filter(Boolean).join(`:`):t)}function sa(e){let t=/^agent:([^:]+):([^:]+):(.+)$/.exec(e);return t?{agentId:t[1],channel:t[2],accountId:t[3]}:null}function ca(e){return R(e?.parentSessionKey)??R(e?.spawnedBy)}function la(e){if(Ia(e.key)||R(e.spawnedBy))return!1;let t=R(e.parentSessionKey);if(!t)return!0;let n=X(e.key);return n?.agentId?t===fn({agentId:n.agentId}):!1}function ua(e){if(e==null)return``;let t=Ba.get(e);if(t!==void 0)return t;let n=da(e);return Ba.size>=Va&&Ba.clear(),Ba.set(e,n),n}function da(e){let t=R(e);if(!t)return``;if(!/(?:^|:)(?:catalog|matrix|signal)(?=:|$)/i.test(t))return t.toLowerCase();let n=t.split(`:`),r=0;for(;n.length-r>=3&&n[r]?.toLowerCase()===`agent`;)n[r]=`agent`,n[r+1]=n[r+1]?.toLowerCase()??``,r+=2;for(;r<n.length&&!n[r]?.trim();)r+=1;let i=n[r]?.toLowerCase();if(i===`catalog`)return n.join(`:`);let a=n[r+1]?.toLowerCase(),o=i===`matrix`&&(a===`channel`||a===`group`);if(!o&&(i!==`signal`||a!==`group`))return t.toLowerCase();if(n[r]=i,n[r+1]=a,o){for(let e=n.length-2;e>=r+2;--e)if(n[e]?.toLowerCase()===`thread`){n[e]=`thread`;break}}else{n[r+2]=n[r+2]?.trim()??``;for(let e=r+3;e<n.length;e+=1)n[e]=n[e]?.toLowerCase()??``}return n.join(`:`)}function fa(e){let t=e.hello?.snapshot;if(!t||typeof t!=`object`||!(`sessionDefaults`in t))return;let n=t.sessionDefaults;return n&&typeof n==`object`?n:void 0}function pa(e){return ct(e.agentsList?.mainKey??fa(e)?.mainKey)}function ma(e){return W(e.agentsList?.defaultId??fa(e)?.defaultAgentId??`main`)}function ha(e){let t=e.assistantAgentId??e.agentsList?.defaultId??fa(e)?.defaultAgentId;return t?W(t):void 0}function ga(e){return ha(e)??`main`}function _a(e,t){let n=R(t);if(!n||va(n))return null;let r=ba(e,n);return r.sessionKey===`global`?r.agentId??null:null}function va(e){return fr(e)===`global`}function ya(e){let t=xt(e.agentsList?.scope);return t?t===`global`:va(fa(e)?.mainSessionKey)}function ba(e,t,n){let r=t.trim(),i=X(r),a=xa(e),o=pa(e),s=i?.rest??r.toLowerCase(),c=s===`main`||a&&s===o;if(va(r)){let t=n?.trim()?W(n):ha(e);return{sessionKey:`global`,...t?{agentId:t}:{}}}if(!i&&(!c||!a))return{sessionKey:r};let l=W(i?.agentId??R(n)??ma(e)),u=ua(r);if(c&&a){let t=fa(e),n=R(t?.mainSessionKey),r=n&&l===ma(e)&&l===W(t?.defaultAgentId)&&l===X(n)?.agentId&&o===ct(t?.mainKey);u=ya(e)?`global`:r?ua(n):fn({agentId:l,mainKey:o})}return{sessionKey:u,agentId:l}}function xa(e){return e.agentsList!=null||fa(e)!==void 0}function Sa(e,t){let n=e.trim();return!n||X(n)||!t?.trim()?n:`agent:${W(t)}:${n}`}function Ca(e,t){let n=R(t);return n?ba(e,n).sessionKey:``}function wa(e,t,n,r,i){let a=R(t),o=R(n);if(!a||!o)return!1;let s=R(i),c=ba(e,a,s),l=R(r),u=ma(e),d=ba(e,o,l??u),f=c.agentId??u,p=d.agentId??u;return(!s||W(s)===f)&&(!l||W(l)===p)&&c.sessionKey===d.sessionKey&&f===p}function Ta(e,t,n){return!R(t)||wa(e,e.sessionKey,t,n)}function Ea(e,t){return Ca(e,t)===`global`}function Da(e,t=e.sessionKey){return ba(e,t??``).agentId}function Oa(e,t,n,r){let i=n?ba(e,n):null;return wa(e,n,t,r??(va(t)?i?.agentId:void 0))}function ka(e){let t=ua(e);return t===`main`?za:t}function Z(e,t){if(e===t)return!!e?.trim();let n=ka(e),r=ka(t);return!!(n&&r&&n===r)}function Aa(e){let t=X(e);return W(t?.agentId??`main`)}function ja(e,t){let n=fr(e.key);return e.kind===`global`||e.kind===`unknown`||n===`global`||n===`unknown`||e.key===`main`||fr(X(e.key)?.rest)===ct(t)}function Ma(e,t){return!(!e.sessionId?.trim()||ja(e,t))}function Na(e,t){return e.every(e=>e.archived===!0)||e.every(e=>e.hasActiveRun!==!0&&!ja(e,t))}function Pa(e,t,n=Ra){let r=W(t),i=X(e);return i?W(i.agentId)===r:r===W(n)}function Fa(e,t){let n=fr(e);return n.startsWith(t)||fr(X(n)?.rest).startsWith(t)}function Ia(e){return Fa(e,`subagent:`)}function La(e){return Fa(e,`acp:`)}var Ra,za,Ba,Va;function Q(){return(Q=e((()=>{or(),$t(),Ra=`main`,za=fn({agentId:Ra,mainKey:hn}),Ba=new Map,Va=4096})))()}function Ha(e){return{client:e?.client??null,connected:e?.phase===`connected`,applySessionKey:e?.sessionKey??`main`,configLoading:!1,configRaw:`{
}
`,configRawOriginal:``,configRawOriginalParsed:io(null),configRawOriginalParsePending:io(null),configValid:io(null),configIssues:io([]),configSaving:!1,configApplying:!1,configAutoSaveStatus:io(`idle`),configRecoveryError:io(null),configNeedsApply:!1,configSnapshot:io(null),configDraftBaseHash:io(null),configSchema:io(null),configSchemaVersion:io(null),configSchemaLoading:!1,configUiHints:io({}),configForm:io(null),configFormOriginal:io(null),configFormDirty:!1,configFormMode:io(`form`),lastError:io(null)}}function Ua(e){let t=co.get(e);co.delete(e),t?.invalidated.resolve({ok:!1,error:`The configuration refresh was superseded.`})}function Wa(e){return co.get(e)}function Ga(e,t){let n={version:Ka(e,`config`),client:t,connectionEpoch:Ja(e),completion:an(),invalidated:an()};return co.set(e,n),n}function Ka(e,t){t===`config`&&Ua(e);let n=ao.get(e)??{config:0,schema:0},r={...n,[t]:n[t]+1};return ao.set(e,r),r[t]}function qa(e){Ua(e),ao.delete(e)}function Ja(e){return oo.get(e)??0}function Ya(e,t){e.configSnapshot=t,so.delete(e)}function Xa(e){so.add(e),Ua(e),oo.set(e,Ja(e)+1)}function Za(e,t,n){return e.connected&&e.client===t&&Ja(e)===n}function Qa(e,t,n,r,i){return Za(e,r,i)&&ao.get(e)?.[t]===n}function $a(e){return B(e?.sourceConfig)??B(e?.resolved)??B(e?.config)}function eo(e){return so.has(e)?null:e.configForm??$a(e.configSnapshot)}function to(e){let t=e.trim();if(!lo.test(t))return null;let n=W(t);return uo.has(n)?null:n}function no(e,t){let n=to(t);if(!n)return null;let r=B(e?.agents),i=B(r?.entries),a=Object.keys(i??{}).find(e=>lo.test(e)&&W(e)===n);if(!i||!a)return null;let o=i[a];return z(o)?{path:[`agents`,`entries`,a],entry:o}:null}function ro(e,t,n={}){let r=to(t);return r?no(e.configForm??$a(e.configSnapshot),r)||(n.ensure?{path:[`agents`,`entries`,r],entry:{}}:null):null}var io,ao,oo,so,co,lo,uo;function fo(){return(fo=e((()=>{St(),Q(),io=e=>e,ao=new WeakMap,oo=new WeakMap,so=new WeakSet,co=new WeakMap,lo=/^[a-z0-9_][a-z0-9_-]{0,63}$/i,uo=new Set([`__proto__`,`prototype`,`constructor`])})))()}function po(e){return e.filter(e=>e.kind!==`system`)}function mo(e){return{...e,agents:po(e.agents)}}function ho(e,t){return R(e.name)??R(e.identity?.name)??R(t?.name)??e.id}function go(e,t){return(t?.nameSource&&t.nameSource!=="default"?R(t.name):void 0)??R(e.name)??R(e.identity?.name)??e.id}function _o(e,t){let n=[R(e.identity?.emoji),R(e.identity?.avatar),R(t?.emoji),R(t?.avatar)];for(let e of n){let t=Vi(e);if(t)return t}return null}function vo(e,t={}){return e==null||!Number.isFinite(e)?t.fallback??`-`:zt(e,{style:`legacy-binary`,maxUnit:t.maxUnit??`tera`,separator:` `,fractionDigits:t.fractionDigits??((e,t)=>t===`byte`?null:+(e<10))})}function yo(e,t){let n=e;return{entry:no(e,t)?.entry,defaults:n?.agents?.defaults,globalTools:n?.tools}}function bo(e,t){let n=yo(e,t);return Array.isArray(n.entry?.skills)?Hn(n.entry.skills):Array.isArray(n.defaults?.skills)?Hn(n.defaults.skills):void 0}function xo(e,t,n,r,i){let a=yo(t,e.id),o=(n&&n.agentId===e.id?n.workspace:null)||a.entry?.workspace||e.workspace||a.defaults?.workspace||`default`,s=So(a.entry?.model)??So(a.defaults?.model)??So(e.model),c=wo(a.entry?.model,a.defaults?.model)??(t?null:Co(e.model)),l=s&&c?.length?`${s} (+${c.length} fallback)`:s??`-`,u=Wt(e.agentRuntime),d=R(e.identity?.name)||R(e.name)||R(i?.name)||a.entry?.name||e.id,f=zi(e,i)?`custom`:_o(e,i)??`—`,p=bo(t,e.id);return{workspace:o,model:l,runtime:u,identityName:d,identityAvatar:f,skillsLabel:p?K(`agents.overview.selectedSkills`,{count:String(p.length)}):K(`agents.overview.allSkills`),isDefault:!!(r&&e.id===r)}}function So(e){if(typeof e==`string`)return R(e)??null;if(!e||typeof e!=`object`)return null;let t=e,n=[t.primary,t.model,t.id,t.value].find(e=>typeof e==`string`);return R(n)??null}function Co(e){if(!e||typeof e!=`object`)return null;let t=e,n=Array.isArray(t.fallbacks)?t.fallbacks:Array.isArray(t.fallback)?t.fallback:null;return n?n.filter(e=>typeof e==`string`):null}function wo(e,t){return Co(e)??(So(e)?[]:Co(t))}function To(e,t){let n=e?.agents?.defaults?.models,r=t?yo(e,t)?.entry?.models:void 0,i=Object.keys({...n,...r}),a=[];for(let e of i){let t=e.trim();if(!t)continue;let i=n?.[e],o=r?.[e],s=o?.alias===void 0?R(i?.alias):R(o.alias)??``,c=t.indexOf(`/`);a.push({value:t,label:s&&s!==t?`${s} (${t})`:t,provider:c>0?t.slice(0,c):void 0,alias:s})}return a}function Eo(e,t,n){if(!t)return()=>!1;let r=Vn(e?.agents),i=Vn(r?.defaults),a=n?no(e,n)?.entry:void 0,o=[Vn(i?.models),Vn(a?.models)],s=new Map;for(let e of o)for(let[t,n]of Object.entries(e??{})){if(Mt(t)||!z(n)||!Object.hasOwn(n,`alias`))continue;let e=tn(t);s.delete(e),s.set(e,R(n.alias)??``)}let c=new Map,l=new Map;for(let[e,t]of s)if(t){let n=fr(t);c.set(n,e);let r=cn(e);r&&l.set(`${r.provider}/${n}`,e)}let u=t.trim(),{model:d,profile:f}=ht(u),p=c.get(fr(u)),m=f?p??c.get(fr(d)):void 0,h=cn(d),g=Vn(e?.models),_=Vn(g?.providers),v=Vn(h?dn(_,h.provider):void 0),y=fr(v?.api),b=!!(y&&y!==h?.provider),x=d;m?x=m:!f&&p&&!b&&(!h||cn(p))&&(x=p);let S=tn(x);return e=>{let{model:t,profile:n}=ht(e),r=cn(t),i=c.get(fr(t))??(r?l.get(`${r.provider}/${fr(r.modelId)}`):void 0)??t;return tn(i)===S&&(!n||n===f)}}function Do(e,t,n,r){let i=new Set,a=[],o=new Map,s=To(e,r),c=e=>{let t=tn(e.value);i.has(t)||(i.add(t),a.push(e))};if(n){let e=new Map(s.map(e=>[tn(e.value),e.alias])),t=n.map(t=>{let n=tn(`${t.provider}/${t.id}`),r=e.get(n);return r===void 0?t:{...t,alias:r||void 0}}),r=na(t);for(let e of t){let t=ia(e,r);o.set(tn(t.value),{...t,provider:e.provider,tags:e.tags,...e.available===!1?{disabled:!0}:{}})}}for(let e of s)c(o.get(tn(e.value))??e);for(let e of o.values())c(e);if(t&&!i.has(tn(t))){let e=t.indexOf(`/`);a.unshift({value:t,label:`Current (${t})`,provider:e>0?t.slice(0,e):void 0})}return a}function Oo(){return(Oo=e((()=>{kt(),Dt(),Pn(),Bn(),Bt(),wt(),Yt(),q(),Wi(),aa(),fo()})))()}function ko(e){document.dispatchEvent(new CustomEvent(Fo,{detail:e}))}async function Ao(e){let{agentId:t,client:n,key:r}=e,i,a=new Set,o=null;for(let s=0;s<Lo;s+=1){let s=await n.request(`sessions.catalog.list`,{agentId:t,catalogId:r.catalogId,hostIds:[r.hostId],limitPerHost:Io,...i?{cursors:{[r.hostId]:i}}:{}});if(!e.isCurrent())return null;o=s.catalogs.find(e=>e.id===r.catalogId)?.hosts.find(e=>e.hostId===r.hostId)??null;let c=o?.sessions.find(e=>e.threadId===r.threadId)??null;if(c)return{host:o,session:c};let l=o?.nextCursor;if(!l||a.has(l))break;a.add(l),i=l}return{host:o,session:null}}function jo(e,t){let n=`catalog:${encodeURIComponent(e.catalogId)}:${encodeURIComponent(e.hostId)}:${encodeURIComponent(e.threadId)}`;return t?`agent:${W(t)}:${n}`:n}function Mo(e){return`?${new URLSearchParams({catalog:e.catalogId,host:e.hostId,thread:e.threadId,...e.sourceHomeId?{sourceHomeId:e.sourceHomeId}:{}}).toString()}`}function No(e){let t=new URLSearchParams(e),[n,r,i,a]=[`catalog`,`host`,`thread`,`sourceHomeId`].map(e=>t.get(e)?.trim());return n&&r&&i?{catalogId:n,hostId:r,threadId:i,...a?{sourceHomeId:a}:{}}:null}function Po(e){let t=e?.replace(/^agent:[^:]+:/u,``);if(!t?.startsWith(`catalog:`))return null;let n=t.slice(8).split(`:`);if(n.length!==3)return null;try{let[e,t,r]=n.map(e=>decodeURIComponent(e));return e&&t&&r?{catalogId:e,hostId:t,threadId:r}:null}catch{return null}}var Fo,Io,Lo;function Ro(){return(Ro=e((()=>{Q(),Fo=`openclaw-session-catalog-continued`,Io=100,Lo=100})))()}function zo(e){return`?${new URLSearchParams({draft:e,[Yo]:`1`}).toString()}`}function Bo(e,t){return e!==`unknown`&&(e!==`global`||t)}function Vo(e){return e?.boardFace===`dashboard`?`dashboard`:`chat`}function Ho(e,t,n){let r=e.sessions.state.result?.sessions.find(e=>Z(e.key,t));if(!r||!va(r.key))return r;let i=e.sessions.state.agentId?.trim(),a=Go(e,n);return i&&W(i)===W(a)?r:void 0}function Uo(e,t,n){return Vo(Ho(e,t,n))}function Wo(e,t,n){let r=Uo(e,t,n),i=Ko({context:e,face:r,sessionKey:t,agentId:n,preferenceDerivedFace:!0,exactKey:!0});Ne({selection:e.agentSelection,gateway:e.gateway,sessionKey:t,agentId:n}),e.navigate(r,i.options)}function Go(e,t){let n={agentsList:e.agents.state.agentsList,hello:e.gateway.snapshot.hello};return t?.trim()||e.agentSelection.state.selectedId?.trim()||ma(n)}function Ko(e){let t=e.context,n=e.sessionKey,r,a,o,s;if(t){let i={agentsList:t.agents.state.agentsList,hello:t.gateway.snapshot.hello};r=Go(t,e.agentId),a=e.basePath??t.basePath,s=pa(i),o=Ho(t,n,r)}else r=e.fallbackAgentId,a=e.basePath??``,o=e.row,s=e.mainKey;let c=Po(o?.key??n),l=c?fn({agentId:X(n)?.agentId??r,mainKey:s??`main`}):o?.key??n,u=i(e.face,r,l,a,{displayName:c?void 0:o?.displayName,exactKey:e.exactKey,mainKey:s,shortIdLength:e.shortIdLength})??b(e.face,a),d=c?Mo(c):void 0,f=new URLSearchParams(d??``);e.preferenceDerivedFace&&!o&&f.set(qo,`1`),e.focusComposer&&f.set(Yo,`1`),e.dashboardExpanded&&f.set(Xo,`expanded`);let p=e.navigationKey?.trim()||o?.key;p&&Zo.test(p)&&f.set(Jo,p);let m=f.toString(),h=m?{pathname:u,search:`?${m}`}:{pathname:u},g=new URLSearchParams(d??``);e.dashboardExpanded&&g.set(Xo,`expanded`);let _=g.toString();return{href:`${u}${_?`?${_}`:``}`,options:h}}var qo,Jo,Yo,Xo,Zo;function Qo(){return(Qo=e((()=>{P(),y(),te(),Ro(),Q(),qo=`__openclawSessionFacePreference`,Jo=`__openclawSessionKey`,Yo=`__openclawComposerFocus`,Xo=`dashboard`,Zo=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu})))()}var $o;function es(){return(es=e((()=>{$o=class{constructor(e){this.host=e,this.entries=[],this.connected=!1,e.addController(this)}watchStore(e,t,n){return this.watch(e,(e,t)=>e.subscribe(t),t,n)}watch(e,t,n,r){return this.addEntry(e,(e,i)=>{let a=i.generation,o=t(e,()=>{this.connected&&i.generation===a&&Object.is(i.source,e)&&(n?.(e),!r||globalThis.document?.visibilityState===`hidden`||typeof globalThis.requestAnimationFrame!=`function`?this.host.requestUpdate():i.frame===void 0&&(i.frame=globalThis.requestAnimationFrame(()=>{i.frame=void 0,this.connected&&i.generation===a&&Object.is(i.getSource(),e)&&(this.host.requestUpdate(),r())})))});return i.cleanup=o,n?.(e),o},!0)}effect(e,t){return this.addEntry(e,e=>t(e),!1)}hostConnected(){this.connected=!0,this.refresh(!0)}hostUpdate(){this.connected&&this.refresh(!1)}clear(){for(let e of this.entries)this.disconnectEntry(e)}hostDisconnected(){this.connected=!1,this.clear()}addEntry(e,t,n){let r={getSource:e,connect:e=>t(e,r),invalidateOnConnect:n,source:void 0,cleanup:void 0,generation:0,frame:void 0};return this.entries.push(r),this.connected&&this.refreshEntry(r,n),this}refresh(e){for(let t of this.entries)this.refreshEntry(t,e&&t.invalidateOnConnect)}refreshEntry(e,t){let n=e.getSource()??void 0;if(!Object.is(e.source,n)&&(this.disconnectEntry(e),n!==void 0)){e.source=n,e.generation+=1;try{e.cleanup=e.connect(n)}catch(t){throw this.disconnectEntry(e),t}t&&this.host.requestUpdate()}}disconnectEntry(e){e.generation+=1,e.frame!==void 0&&(globalThis.cancelAnimationFrame(e.frame),e.frame=void 0),e.source=void 0;let t=e.cleanup;if(e.cleanup=void 0,t)try{t()}catch(e){console.error(`[openclaw] subscription cleanup failed`,e)}}}})))()}var ts,ns,rs,is,as;function os(){return(os=e((()=>{ts=`openclaw-chat-route-ready`,ns=`openclaw-chat-transcript-loading-changed`,rs=`openclaw-chat-pane-lifecycle-changed`,is=`openclaw-chat-history-recovery-changed`,as=`openclaw-chat-run-activity-changed`})))()}var ss;function cs(){return(cs=e((()=>{ss=class{constructor(){this.lastDeviceToken=``}key(e){if(!e)return``;let{gatewayUrl:t,token:n,password:r,bootstrapToken:i}=e.connection,a=e.snapshot.hello?.auth;return a&&(this.lastDeviceToken=a.deviceToken??``),JSON.stringify([t,n,r,i,this.lastDeviceToken])}}})))()}function ls(e){let t=gs.get(e);if(!t){let n=new ss;t={identity:n,scope:n.key(e.gateway),pendingDraft:``,focusRequest:0,selectionEpoch:0,seenGateways:new Set,listeners:new Set},gs.set(e,t);let r=t;e.gateway.subscribe(()=>{ds(e,r),fs(r)}),e.router.subscribe(()=>{r.publication&&r.publication.pathname!==us(e)&&(r.publication=void 0,r.selectionEpoch+=1,fs(r))})}return ds(e,t),t}function us(e){return e.router.getState().location?.pathname??window.location.pathname}function ds(e,t){let n=t.identity.key(e.gateway);t.scope!==n&&(t.scope=n,t.publication=void 0,t.selectionEpoch+=1,t.pendingDraft=``,t.focusRequest=0)}function fs(e){for(let t of e.listeners)t()}function ps(e,t){let n=ls(e);return n.listeners.add(t),()=>n.listeners.delete(t)}function ms(e){let t=ls(e),n=e.gateway.connection.gatewayUrl;return!t.publication?.overview||!t.publication.installed||t.seenGateways.has(n)?!1:(t.seenGateways.add(n),!0)}function hs(e){ls(e).seenGateways.add(e.gateway.connection.gatewayUrl)}var gs;function _s(){return(_s=e((()=>{cs(),gs=new WeakMap})))()}function vs(){return(vs=e((()=>{})))()}function ys(){return(ys=e((()=>{})))()}function bs(){for(let e of Ds)e()}function xs(){if(Es.size===0||Ds.size===0){ks!==null&&(cancelAnimationFrame(ks),ks=null);return}ks===null&&(ks=requestAnimationFrame(()=>{ks=null,bs(),xs()}))}function Ss(e){for(let t of Es)for(let n of t()){if(!n.isConnected)continue;let t=n.getBoundingClientRect();if(t.width>0&&t.height>0&&t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top)return!0}return!1}function Cs(){if(!p())return()=>{};Os+=1,Os===1&&bs();let e=!1;return()=>{e||(e=!0,--Os,Os===0&&bs())}}function ws(e,t){if(!p())return e(!1),()=>{};let n,r=()=>{let r=t(),i=Os>0||!!(r&&r.width>0&&r.height>0&&Ss(r));i!==n&&(n=i,e(i))};return Ds.add(r),r(),xs(),()=>{Ds.delete(r),xs()}}function Ts(e,t=`toggle`,n=()=>[e,...e.querySelectorAll(`*`)]){if(!p()||!e.isConnected||As.has(e))return;Es.add(n),xs();let r=new MutationObserver(()=>{e.isConnected||a()}),i=n=>{n.target===e&&(t!==`toggle`||n.newState===`closed`)&&a()},a=()=>{r.disconnect(),e.removeEventListener(t,i),As.delete(e),Es.delete(n),bs(),xs()};As.add(e),e.addEventListener(t,i);let o=e.getRootNode();for(r.observe(o,{childList:!0,subtree:!0});o instanceof ShadowRoot;)o=o.host.getRootNode(),r.observe(o,{childList:!0,subtree:!0})}var Es,Ds,Os,ks,As;function js(){return(js=e((()=>{Es=new Set,Ds=new Set,Os=0,ks=null,As=new WeakSet})))()}function Ms(e){let t=e.sessionKey.trim().toLowerCase(),n=e.agentId??X(e.sessionKey)?.agentId??(t===`global`||t===`main`?`@unresolved`:`main`);return`${e.sessionKey}\u0000agent:${n}`}var Ns;function Ps(){return(Ps=e((()=>{Q(),Ns=`@unresolved`})))()}function Fs(e,t){let n=null,r=!1,i=!1,a=()=>(n??=e().then(e=>(window.removeEventListener(`online`,o),t?.(e),e)).catch(e=>{throw n=null,r?(window.addEventListener(`online`,o,{once:!0}),navigator.onLine&&!i&&(i=!0,s()),e):e}),n),o=()=>r&&void a().catch(()=>void 0),s=()=>{n||(`requestIdleCallback`in window?requestIdleCallback(o,{timeout:3e3}):setTimeout(o,1500))},c=()=>{r=!0,i=!1};return{schedule:()=>{c(),s()},load:()=>(c(),a()),dispose:()=>{r=!1,window.removeEventListener(`online`,o)}}}function Is(){return(Is=e((()=>{})))()}function Ls(e){return e.split(/[\\/]/).findLast(Boolean)??e}function Rs(){return(Rs=e((()=>{})))()}function zs(e){return e.replace(Ys,e=>`…${e.slice(-4)}`)}function Bs(e,t){if(!Qs.test(e))return{channelSession:!1};let n=e.match(Zs)?.[1],r=R(n)??R(t);return{channel:r,channelSession:!!r}}function Vs(e){let t=R(e.repository?.branch)??R(e.worktree?.branch);return!e.repository&&t?.startsWith(Xs)?t.slice(9):t}function Hs(e){let t=R(e.repository?.url.replace(/\.git$/u,``))??(e.execNode?void 0:R(e.worktree?.repoRoot));if(t){let n=(e.placement&&`remoteWorkspaceDir`in e.placement?R(e.placement.remoteWorkspaceDir):void 0)??(e.execNode?R(e.execCwd):void 0);return{kind:`project`,name:Ls(t),path:t,cwd:e.repository?n:R(e.spawnedCwd),branch:Vs(e)}}let n=e.execNode?R(e.execCwd):R(e.spawnedWorkspaceDir)??R(e.spawnedCwd);return n?{kind:`workspace`,name:Ls(n),path:n}:void 0}function Us(e){let t=R(e.execNode),n=t?zs(t):void 0,r=R(e.repository?.url.replace(/\.git$/u,``))??R(e.worktree?.repoRoot),i=Vs(e),a=r?i?`${Ls(r)} ⎇ ${i}`:Ls(r):void 0;return a&&n?`${a} · ${n}`:a??n}function Ws(e){return Js.get(e)??e.charAt(0).toUpperCase()+e.slice(1)}function Gs(e){let t=fr(e);if(e===`main`||/^agent:[^:]+:main$/u.test(e))return{prefix:``,fallbackName:`Main Session`};if(e.includes(`:subagent:`)){let e=K(`sessionsView.subagentPrefix`);return{kind:`subagent`,prefix:e,fallbackName:e.replace(/:\s*$/u,``)}}if(t.startsWith(`cron:`)||e.includes(`:cron:`)){let e=K(`sessionsView.automationPrefix`);return{kind:`automation`,prefix:e,fallbackName:e}}let n=e.match(/^agent:[^:]+:([^:]+)(?::([^:]+))?:(?:direct|dm):(.+)$/);if(n){let t=n[1],r=n[2],i=n[3];if(!t||!i)return{prefix:``,fallbackName:e,accountId:r};let a=Ws(t),o=i.trim();return{prefix:``,fallbackName:`${a} · ${o.length<=10?o:`…${Lt(o,-6)}`}`,accountId:r}}let r=e.match(/^agent:[^:]+:([^:]+):group:(.+)$/);if(r){let t=r[1];return t?{prefix:``,fallbackName:`${Ws(t)} Group`}:{prefix:``,fallbackName:e}}for(let[t,n]of Js)if(e===t||e.startsWith(`${t}:`))return{prefix:``,fallbackName:`${n} Session`};if(/^agent:[^:]+:dashboard:/.test(e))return{prefix:``,fallbackName:`New session`};let i=e.match(/^agent:[^:]+:(?:explicit:)?(.+)$/)?.[1];return i?{prefix:``,fallbackName:zs(i)}:{prefix:``,fallbackName:e}}function Ks(e,t){let n=R(t?.label),r=R(t?.displayName),i=R(t?.derivedTitle),{kind:a,prefix:o,fallbackName:s,accountId:c}=Gs(e),l=R(t?.accountId)??c,u=e=>{if(!a||!o)return e;let t=a===`automation`&&e.replace(/^cron(\s+job)?:\s*/i,``).trim()||e,n=RegExp(`^${o.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}\\s*`,`i`);return a===`subagent`?t.replace(n,``).trim()||s:n.test(t)?t:`${o} ${t}`},d=(()=>{if(n&&n!==e)return u(n);if(r&&r!==e)return u(r);let a=t?Us(t):void 0;return a&&t?.worktree?u(a):i&&i!==e?u(i):s})();if(!l||l==="default")return d;let f=` · ${l}`;return d.endsWith(f)?d:`${d}${f}`}function qs(e){return Ut(e.key)?`cron`:e.kind}var Js,Ys,Xs,Zs,Qs;function $s(){return($s=e((()=>{Vt(),q(),Js=new Map([[`imessage`,`iMessage`],[`telegram`,`Telegram`],[`discord`,`Discord`],[`signal`,`Signal`],[`slack`,`Slack`],[`whatsapp`,`WhatsApp`],[`matrix`,`Matrix`],[`msteams`,`Microsoft Teams`],[`bluebubbles`,`BlueBubbles`],[`googlechat`,`Google Chat`],[`mattermost`,`Mattermost`],[`irc`,`IRC`],[`email`,`Email`],[`sms`,`SMS`]]),Ys=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{10,}/gi,Xs=`openclaw/`,Zs=/^agent:[^:]+:([^:]+)(?:(?::[^:]+)?:(?:direct|dm)|:(?:group|channel|thread)):/,Qs=/:(?:direct|dm|group|channel|thread):/})))()}function ec(e,t){for(let n=(e?.length??0)-1;n>=0;--n)t(e[n])&&e.splice(n,1)}function tc(e,t){for(let n of rc.get(e)?.values()??[])ec(n,e=>e.isCurrent()&&t.some(({key:t,retireBeforeRevision:n})=>Z(e.sessionKey,t)&&e.expiresAt-3e4<n))}var nc,rc;function ic(){return(ic=e((()=>{Q(),nc=3e4,rc=new WeakMap})))()}function ac(e){return e instanceof Zt&&e.gatewayCode===`UNAVAILABLE`&&e.retryable&&Vn(e.details)?.code===`agent-database-inspection-pending`}function oc(e,t=0){let n=Math.min(500*2**Math.min(t,4),5e3),r=e instanceof Zt?e.retryAfterMs:void 0;return typeof r==`number`&&Number.isFinite(r)?Math.max(r,n):n}function sc(e){return e instanceof Zt&&(Ln(e)||$n(e))||Ct(e)||ac(e)}function cc(e){return e.phase===`connected`&&e.restartPending!==!0&&(e.suspensionPhase===void 0||e.suspensionPhase===`accepting`)}function lc(e,t){return sc(e)||!(e instanceof Zt)&&t!=null&&!cc(t)}function uc(){return(uc=e((()=>{kn(),Wn(),on()})))()}function dc(e){let t=e?.trim()??``;if(!t)return K(`common.unknown`);try{return new URL(t).host||t}catch{return t}}function fc(){return(fc=e((()=>{q()})))()}function pc(e){let t=e.getRootNode();return e.assignedSlot??e.parentElement??(t instanceof ShadowRoot?t.host:null)}function mc(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function hc(e){for(let t of e.composedPath())if(t instanceof HTMLAnchorElement)return t;return e.target instanceof Element?e.target.closest(`a`):null}function gc(e){let t=hc(e);if(!t||t.hasAttribute(`download`)||t.hasAttribute(`data-file-path`))return null;try{let e=new URL(t.href,window.location.href);return(e.protocol===`http:`||e.protocol===`https:`)&&e.origin!==window.location.origin?{anchor:t,url:e}:null}catch{return null}}function _c(){return(_c=e((()=>{})))()}function vc(e,t){return e.phase===`connected`&&t&&ie(e.hello?.auth??null)&&(Xe(e,`terminal.open`)??!1)}function yc(){return(yc=e((()=>{Pe(),Qe()})))()}function bc(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function xc(){return(xc=e((()=>{})))()}var Sc;function Cc(){return(Cc=e((()=>{L(),I(),P(),G(),Sc=H({...h(`about`),component:()=>U(()=>import(`./about-page-zvK82zP3.js`).then(()=>({header:!0,render:()=>F`<openclaw-about-page></openclaw-about-page>`})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]),import.meta.url)})})))()}function wc(e){return n(e,De)}var Tc;function Ec(){return(Ec=e((()=>{L(),P(),G(),Tc=H({...h(`activity`),loaderDeps:(e,t)=>{let{pathname:n,search:r,hash:i}=wc(t);return`${n}\u0000${r}\u0000${i}`},loader:(e,{location:t})=>wc(t),component:()=>U(()=>import(`./activity-page-BMFCNRbk.js`).then(e=>e.activityPageComponent),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,10,11,12,13,25,26,27,28,29,15,30,17,18,19,20,31,32,33]),import.meta.url)})})))()}var Dc;function Oc(){return(Oc=e((()=>{L(),P(),G(),Dc=H({...h(`agents-home`),component:()=>U(()=>import(`./agents-home-page-0doh2FzN.js`),__vite__mapDeps([34,10,2,3,4,5,6,7,8,9,1,11,12,13,35,17,18,19,36]),import.meta.url)})})))()}function kc(e){let t=e.get(`agent`)?.trim()??``;return t&&!t.includes(`/`)&&t!==`.`&&t!==`..`?t:null}function Ac(e,t=``){let r=n(e,pe),i=N(r.pathname,t),a=new URLSearchParams(r.search),o=a.has(`agent`),s=kc(a);a.delete(`agent`);let c=a.toString(),l=i?.agentId??s,u=i?ke(i.agentId,i.invalidPanel?null:i.panelSegment,t):l?ke(l,null,t):b(`agents`,t),d=o||i?.invalidPanel?{pathname:u,search:c?`?${c}`:``,hash:r.hash}:void 0;return{location:r,requestedAgentId:l,panel:i?.panel??`overview`,...d?{canonicalLocation:d}:{}}}function jc(){return(jc=e((()=>{P(),Cr()})))()}async function Mc(e,t){let n=Ac(t,e.basePath),r=e.gateway,i=r.snapshot,a=e.settingsAgentSelection,o=a.intentRevision,s=e.agents.state.agentsList??await e.agents.ensureList(),c=s?mo(s):null;return{...n,gateway:r,gatewaySnapshot:i,settingsAgentSelection:a,selectionIntentRevision:o,agentsList:c,error:e.agents.state.agentsError}}var Nc;function Pc(){return(Pc=e((()=>{L(),P(),Oo(),jc(),G(),Nc=H({...h(`agents`),loaderDeps:(e,t)=>{let n=Ac(t,e.basePath).location;return`${n.pathname}\u0000${n.search}\u0000${n.hash}\u0000${e.settingsAgentSelection.intentRevision}`},loader:(e,{location:t})=>Mc(e,t),component:()=>U(()=>import(`./agents-page-BPYKCO8I.js`),__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,10,11,12,13,38,30,39,40,14,15,16,41,42,43,17,18,19,31,20,21,22,44,45]),import.meta.url)})})))()}var Fc;function Ic(){return(Ic=e((()=>{L(),I(),P(),G(),Fc=H({...h(`approvals`),component:()=>U(()=>import(`./approvals-page-dTUyCb8i.js`).then(()=>({header:!0,render:()=>F`<openclaw-approvals-page></openclaw-approvals-page>`})),__vite__mapDeps([46,3,2,4,5,8,7,6,9,10,1,11,12,13,17,18,19]),import.meta.url)})})))()}var Lc;function Rc(){return(Rc=e((()=>{L(),I(),P(),G(),Lc=H({...h(`apps`),loaderDeps:(e,t)=>t.search,loader:(e,{location:t})=>t.search,component:()=>U(()=>import(`./apps-page-Lw1Jv2BD.js`).then(()=>({header:!0,render:e=>F`<openclaw-apps-page .appSearch=${e??``}></openclaw-apps-page>`})),__vite__mapDeps([47,1,2,3,4,5,6,7,8,9,10,11,12,13,48,49,38,17,18,19,50,51]),import.meta.url)})})))()}function zc(e){Promise.all([e.channels.refresh(!1),e.runtimeConfig.ensureLoaded()]).then(()=>{e.runtimeConfig.ensureSchemaLoaded()},()=>void 0)}var Bc;function Vc(){return(Vc=e((()=>{L(),I(),P(),G(),Bc=H({...h(`channels`),loader:e=>zc(e),component:()=>U(()=>import(`./channels-page-_M07nxbU.js`).then(()=>({header:!0,render:()=>F`<openclaw-channels-page></openclaw-channels-page>`})),__vite__mapDeps([52,1,2,3,4,5,6,7,8,9,10,11,12,13,53,29,26,27,28,15,30,54,55,38,56,57,58,17,18,19,59,20,31,32]),import.meta.url)})})))()}function Hc(e,t,n){let r=new URLSearchParams(n.search),i=n.pathname===b(e,t.basePath)?r.get(we):null;i&&r.delete(we);let a=r.toString();return`${Te(t.gateway).key}\u0000${i??n.pathname}\u0000${a?`?${a}`:``}`}function Uc(e){return H({...h(e),loaderDeps:(t,n)=>Hc(e,t,n),loader:async(t,n)=>(await U(async()=>{let{loadSessionPage:e}=await import(`./control-ui-boot-chat-XcDaYmck.js`).then(e=>(e.t(),e.n));return{loadSessionPage:e}},__vite__mapDeps([60,2,3,4,5,6,7,8,9,27,1,10,11,12,13,28,61,26,29,15,30,17,18,19,20,31,32,62]),import.meta.url)).loadSessionPage(t,e,n),component:()=>U(()=>import(`./control-ui-boot-chat-XcDaYmck.js`).then(e=>(e.a(),e.o)),__vite__mapDeps([60,2,3,4,5,6,7,8,9,27,1,10,11,12,13,28,61,26,29,15,30,17,18,19,20,31,32,62]),import.meta.url)})}var Wc;function Gc(){return(Gc=e((()=>{L(),P(),ne(),G(),Wc=[Uc(`chat`),Uc(`dashboard`)]})))()}var Kc;function qc(){return(qc=e((()=>{L(),I(),P(),G(),Kc=H({...h(`cloud-workers`),loader:e=>e.runtimeConfig.ensureLoaded(),component:()=>U(()=>import(`./cloud-workers-page-CtX6jpk4.js`).then(()=>({header:!0,render:()=>F`<openclaw-cloud-workers-page></openclaw-cloud-workers-page>`})),__vite__mapDeps([63,2,3,4,5,6,7,8,9,1,10,11,12,13,38,17,18,19]),import.meta.url)})})))()}function Jc(e){if(!e)return null;try{return decodeURIComponent(e.slice(1))}catch{return null}}function Yc(e){let t=new URLSearchParams(e.search),n=t.get(`__openclawMemoryPath`)??e.pathname;t.delete(xe);let r=t.toString(),i=t.get(`section`)?.trim()||null;return{pathname:n,search:r?`?${r}`:``,hash:e.hash,section:i,advanced:t.get(`advanced`)===`1`,tab:t.get(`tab`)?.trim()||null,targetBlockId:Jc(e.hash)}}var Xc,Zc,Qc,$c;function el(){return(el=e((()=>{P(),Xc={behavior:`settings-model-behavior`},Zc={language:`settings-language`,theme:`settings-appearance-theme`,accent:`settings-appearance-accent`,typography:`settings-appearance-typography`,textSize:`settings-appearance-text-size`,sidebar:`settings-appearance-sidebar`,chat:`settings-appearance-chat`,sessionSources:`settings-session-sources`,connection:`settings-appearance-connection`},Qc=e=>({routeId:`appearance`,search:`?section=__appearance__`,hash:`#${e}`}),$c={modelBehavior:{routeId:`model-providers`,hash:`#${Xc.behavior}`},appearanceLanguage:Qc(Zc.language),appearanceSidebar:Qc(Zc.sidebar),sessionSources:Qc(Zc.sessionSources)}})))()}function tl(e,t,n){let r=Yc(t),i=r.section?rl[`${n}:${r.section}`]:void 0;if(r.section&&i)return Kt({pathname:b(i.routeId,e.basePath),search:i.search??(i.keepSection?`?section=${encodeURIComponent(r.section)}${i.advanced?`&advanced=1`:``}`:``),hash:r.hash});let a=n===`memory`?{owner:e.settingsAgentSelection,revision:e.settingsAgentSelection.intentRevision}:void 0,o=e.runtimeConfig.ensureLoaded();return n!==`updates`&&o.then(()=>e.runtimeConfig.ensureSchemaLoaded()).catch(()=>void 0),{...r,...a?{agentSelectionIntent:a}:{}}}function nl(e){return H({...h(e),loaderDeps:(t,n)=>{let r=Yc(n),i=`${r.pathname}\u0000${r.search}\u0000${r.hash}`;return e===`memory`?`${i}\u0000${t.settingsAgentSelection.intentRevision}`:i},loader:(t,{location:n})=>tl(t,n,e),component:()=>U(()=>import(`./config-page-Bg-ZRwTp.js`).then(()=>({header:!0,render:t=>F`
<openclaw-config-page .pageId=${e} .routeData=${t??null}></openclaw-config-page>
`})),__vite__mapDeps([64,1,2,3,4,5,6,7,8,9,10,11,12,13,65,66,67,68,25,38,26,27,28,29,15,30,60,61,14,16,69,70,41,40,54,55,56,57,58,71,72,53,73,74,75,76,77,17,18,19,78,20,31,32,62,21,22,44,59,79,80]),import.meta.url)})}var rl,il,al;function ol(){return(ol=e((()=>{L(),I(),P(),s(),el(),G(),rl={"communications:__notifications__":{routeId:`notifications`,keepSection:!1},"communications:channels":{routeId:`channels`,keepSection:!1},"communications:broadcast":{routeId:`advanced`,keepSection:!0},"communications:talk":{routeId:`talk`,keepSection:!0},"appearance:wizard":{routeId:`advanced`,keepSection:!0},"advanced:transcripts":{routeId:`communications`,keepSection:!0,advanced:!0},"automation:approvals":{routeId:`security`,keepSection:!0},"automation:plugins":{routeId:`plugin-settings`,keepSection:!1,search:`?tab=advanced`},"ai-agents:memory":{routeId:`memory`,keepSection:!0},"ai-agents:models":{routeId:`model-providers`,keepSection:!1}},il=H({...h(`config`),loaderDeps:(e,t)=>`${t.pathname}\u0000${t.search}\u0000${t.hash}`,loader:(e,{location:t})=>{let n=Jc(t.hash)===`settings-general-model`?$c.modelBehavior:$c.appearanceLanguage;return Kt({pathname:b(n.routeId,e.basePath),search:`search`in n?n.search:``,hash:n.hash})},component:async()=>({header:!0,render:()=>Be})}),al=[H({...h(`settings`),loader:(e,{location:t})=>d()?void 0:Kt({...t,pathname:b(`chat`,e.basePath)}),component:async()=>({render:()=>Be})}),il,nl(`communications`),nl(`appearance`),nl(`notifications`),nl(`security`),nl(`automation`),nl(`mcp`),nl(`memory`),nl(`talk`),nl(`infrastructure`),nl(`updates`),nl(`ai-agents`),nl(`advanced`)]})))()}var sl;function cl(){return(cl=e((()=>{L(),I(),P(),G(),sl=H({...h(`connection`),component:()=>U(()=>import(`./connection-page-DedaOtBR.js`).then(()=>({header:!0,render:()=>F`<openclaw-connection-page></openclaw-connection-page>`})),__vite__mapDeps([81,1,2,3,4,5,6,7,8,9,10,11,12,13,38,69,82,71,83,84,85,17,18,19,86,87]),import.meta.url)})})))()}var ll;function ul(){return(ul=e((()=>{L(),P(),G(),ll=H({...h(`cron`),loaderDeps:(e,{search:t})=>t,loader:(e,{deps:t})=>t,component:()=>U(()=>import(`./control-ui-boot-shared-D3oo_6Fq.js`).then(e=>(e.n(),e.t)).then(e=>e.cronPageComponent),__vite__mapDeps([11,2,3,4,5,6,7,8,9,1,10,12,13,17,19,18]),import.meta.url)})})))()}function dl(e){return new URLSearchParams(e).get(`intent`)===`new-agent`?`new-agent`:null}var fl;function pl(){return(pl=e((()=>{L(),P(),G(),fl=H({...h(`custodian`),loaderDeps:(e,t)=>t.search,loader:(e,{location:t})=>({onboarding:ge(t.search),intent:dl(t.search)}),component:()=>U(()=>import(`./custodian-page-CB6CiEu2.js`).then(()=>U(async()=>{let{renderCustodianRoute:e}=await import(`./route-view-QL14VxCG.js`);return{renderCustodianRoute:e}},__vite__mapDeps([93]),import.meta.url).then(({renderCustodianRoute:e})=>({header:!0,render:t=>e(t)}))),__vite__mapDeps([88,10,2,3,4,5,6,7,8,9,1,11,12,13,89,90,26,27,28,29,15,30,91,53,60,61,17,18,19,20,31,32,59,62,92]),import.meta.url)})})))()}function ml(e,t){let n=R(e)??``,r=fa({hello:t}),i=R(r?.mainSessionKey);if(!i)return n;if(!n)return i;let a=xt(r?.mainKey)??`main`,o=R(r?.defaultAgentId);return n===`main`||n===a||o&&(n===`agent:${o}:main`||n===`agent:${o}:${a}`)?i:n}function hl(e,t){let n=ba(e,R(t)??``);return n.sessionKey===`global`?n.agentId:void 0}function gl(e,t){let n=hl(e,t);return n?{agentId:n}:{}}function _l(e,t){let n=X(t),r=fr(t),i=n?.agentId??(r===`global`?ha(e):r===`unknown`?void 0:ma(e));return i?{agentId:W(i)}:{}}function vl(e,t){let n=R(t.agentId)??_l(e,t.sessionKey).agentId;return n?{agentId:n}:{}}function yl(e,t,n){return wa(e,e.sessionKey,t,n)}function bl(e,t){let n=e.sessions.filter(e=>e.key&&xl(e,t.archivedFilter));return{...e,count:n.length,sessions:n}}function xl(e,t=`active`){return t===`all`||e.archived===!0==(t===`archived`)}function Sl(e,t){return xl(e,t.archivedFilter)&&e.kind!==`global`&&e.kind!==`unknown`&&(t.showCron===!0||!Ut(e.key))&&(t.showSystem===!0||!Jt(e))&&(!t.filterByAgent||Pa(e.key,t.agentId,t.defaultAgentId))}function Cl(e,t){return e.filter(e=>e.key===t.currentSessionKey&&((t.archivedFilter??`active`)===`active`||xl(e,t.archivedFilter))?!0:Sl(e,t)&&!Ia(e.key)&&(!e.spawnedBy||R(e.category)!=null))}function wl(e,t){return Cl(e?.sessions??[],t)}function Tl(e,t){let n=Number(t.pinned===!0)-Number(e.pinned===!0);if(n!==0)return n;let r=(t.pinnedAt??0)-(e.pinnedAt??0);if(r!==0)return r;let i=(t.updatedAt??0)-(e.updatedAt??0);return i===0?e.key<t.key?-1:+(e.key>t.key):i}function El(e){let t=ml(e.sessionKey,e.hello),n=ga({assistantAgentId:e.assistantAgentId,hello:e.hello}),r=X(t)?.agentId??n,i=t.toLowerCase()!==`unknown`,a=n=>Oa(e,n.key,t,n.agentId??(va(n.key)?e.resultAgentId:void 0)),o=e.result?.sessions.find(a)??(e.activeSession&&a(e.activeSession)?e.activeSession:void 0),s=t&&t.toLowerCase()!==`unknown`&&!Po(t)?{...o??{kind:`direct`,updatedAt:null},key:t}:void 0,c=wl(e.result,{currentSessionKey:t||void 0,agentId:r,defaultAgentId:n,filterByAgent:i,showCron:e.showCron,showSystem:e.showSystem,archivedFilter:e.archivedFilter}).toSorted(e.compareSessions??Tl),l=c.find(a);return!l&&s&&e.archivedFilter!==`archived`&&(l=s,c=[l,...c]),{currentSessionKey:t,selectedAgentId:r,defaultAgentId:n,selectedSession:s,visibleSessions:c,activeRowKey:l?.key??null}}function Dl(){return(Dl=e((()=>{Vt(),Ro(),Q()})))()}function Ol(e,t){let n=e,r=t,i=Object.keys(e).filter(e=>e!==`snapshotAt`),a=Object.keys(t).filter(e=>e!==`snapshotAt`);return i.length===a.length&&i.every(e=>{let t=n[e],i=r[e];return t===i||t!==null&&i!==null&&typeof t==`object`&&typeof i==`object`&&JSON.stringify(t)===JSON.stringify(i)})}function kl(e,t){let n=e.agentRuntime?.id?.trim(),r=t.agentRuntime?.id?.trim();return!(e.modelProvider&&t.modelProvider&&e.modelProvider!==t.modelProvider||e.model&&t.model&&e.model!==t.model||n&&r&&n!==r)}function Al(e,t){if(!t||t.thinkingLevels===void 0&&t.thinkingOptions===void 0||!kl(e,t)||e.thinkingLevels!==void 0||e.thinkingOptions!==void 0)return e;let n={...e};for(let r of Ml)e[r]===void 0&&t[r]!==void 0&&Object.assign(n,{[r]:t[r]});return n}function jl(e){let t={...e};for(let e of Ml)delete t[e];return t}var Ml;function Nl(){return(Nl=e((()=>{Ml=[`thinkingLevels`,`thinkingOptions`,`thinkingDefault`]})))()}function Pl(e){let t={...e};for(let[n,r]of Object.entries(e))(r===void 0||n===`totalTokensFresh`&&r===!1&&e.totalTokens===void 0)&&Reflect.deleteProperty(t,n);return t}function Fl(e){return!!(typeof e.sessionId==`string`&&e.sessionId.trim()||typeof e.updatedAt==`number`)}function Il(e,t){if(!t||!e.sessionId||e.sessionId!==t.sessionId||e.derivedTitle!==void 0&&e.lastMessagePreview!==void 0)return e;let n=Bl(e,null),r=Bl(t,null);if(n&&r&&n!==r)return e;let i={...e};for(let n of[`derivedTitle`,`lastMessagePreview`])e[n]===void 0&&t[n]!==void 0&&(i[n]=t[n]);return i}function Ll(e,t){return typeof e.updatedAt==`number`&&typeof t?.updatedAt==`number`&&e.updatedAt<t.updatedAt}function Rl(e,t){if(!t||!bn(t)||bn(e)||e.snapshotAt!==void 0&&t.snapshotAt!==void 0&&e.snapshotAt>t.snapshotAt)return!1;let n=e.updatedAt??0;return(t.updatedAt??0)>=n||typeof t.startedAt==`number`&&t.startedAt>=n}function zl(e,t,n){let r=Bl(e,null),i=X(t)?.agentId??n;if(r&&i?.trim()&&r!==W(i))return!1;if(Z(e.key,t))return!0;if(!va(t)||e.kind!==`global`)return!1;let a=X(e.key);return a?.agentId!==void 0&&W(a.agentId)===W(n??``)}function Bl(e,t){let n=X(e.key);return n?.agentId?W(n.agentId):e.agentId?.trim()?W(e.agentId):e.kind===`global`&&t?.trim()?W(t):null}function $(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function Vl(e){return e===`running`||e===`queued`||e===`done`||e===`failed`||e===`interrupted`||e===`killed`||e===`timeout`?e:null}function Hl(e,t,n){Ol(e,t)&&Zl.set(e,n)}function Ul(e,t,n,r,i){let{key:a}=t;if(!e||!t.sessionId||e.sessionId!==t.sessionId||typeof n.revision!=`string`||Zl.get(e)!==n.revision||t.snapshotAt===void 0||!zl(e,a,t.agentId)||Jl(e,r))return{applied:!1,key:a,row:e};let o={...e,snapshotAt:Math.max(e.snapshotAt??0,t.snapshotAt)},s=i?.(o,e,Object.keys(e),t)??o;return Hl(s,o,n.revision),{applied:!0,key:a,row:s,admittedRow:s,reconciled:!0}}function Wl(e){let t=B(e);if(!t)return null;let n=B(t.session),r=n?{...Array.isArray(t.ancestorSessions)?Object.fromEntries(Object.entries(t).filter(([,e])=>e===null)):t,...n}:t,i=R($(r,`key`))??R($(t,`sessionKey`));if(!i)return null;let a=R($(t,`reason`))??R($(r,`reason`))??null,o=R($(t,`phase`))??R($(r,`phase`)),s=$(r,`hasActiveRun`),c=typeof s==`boolean`?s:$(t,`hasActiveRun`),l=$(r,`archived`),u=$(r,`updatedAt`),d=$(r,`snapshotAt`),f=$(r,`thinkingLevel`),p=Object.hasOwn(r,`activeRunIds`)?$(r,`activeRunIds`):$(t,`activeRunIds`);return[{key:i,reason:a,sessionId:R($(r,`sessionId`)),updatedAt:typeof u==`number`?u:null,snapshotAt:typeof d==`number`&&Number.isFinite(d)?d:void 0,hasPermissionMode:Object.hasOwn(r,`permissionMode`),hasActivitySummary:Object.hasOwn(r,`activitySummary`),thinkingLevel:typeof f==`string`?f:f===null?null:void 0,agentId:R($(t,`agentId`))??null,runId:R($(t,`runId`))??R($(r,`runId`))??null,clientRunId:R($(t,`clientRunId`))??R($(r,`clientRunId`))??null,hasActiveRun:typeof c==`boolean`?c:null,activeRunIds:p===null||Array.isArray(p)&&p.every(e=>typeof e==`string`)?p:void 0,status:Vl($(r,`status`))??Vl($(t,`status`)),archived:typeof l==`boolean`?l:null,isChatTurn:o===`start`||o===`message`||o===`end`||o===`error`||a===`send`||a===`steer`,isAncestorReference:t.ancestorSessionRef===!0},t,r,a]}function Gl(e){let t=B(e);return!t||!Array.isArray(t.ancestorSessions)?[e]:[e,...[...t.ancestorSessions.map(e=>[e,!1]),...Array.isArray(t.ancestorSessionRefs)?t.ancestorSessionRefs.map(e=>[e,!0]):[]].flatMap(([e,n])=>{let r=B(e),i=R(r?.key);return!r||!i?[]:[{session:r,agentId:R(r.agentId)??X(i)?.agentId,ts:t.ts,ancestorSessions:[],...n?{ancestorSessionRef:!0}:{}}]})]}function Kl(e,t,n,r){return!e.some(e=>(n.some(t=>typeof t==`string`&&Z(t,e.key))||e.childSessions?.some(e=>Z(e,t)))&&!r?.some(t=>{let n=Wl(t)?.[0];return n&&zl(e,n.key,n.agentId)}))}function ql(e){return Wl(e)?.[0]??null}function Jl(e,t){let n=t.resultAgentId?.trim()?W(t.resultAgentId):null,r=Bl(e,t.selectedGlobalAgentId??null);return n!==null&&r!==null&&r!==n}function Yl(e,t,n={},r){let i=e=>({disposition:e,row:t,confirmRead:!1});if(!e?.key)return i(`invalid`);let a=Pl(e);if(Jl(a,n))return i(`outside-scope`);let o=t&&r?.isProvisional?.(t)?void 0:t;if(n.preserveExisting&&t)return i(`preserved`);if(Ll(a,t))return i(`older`);if(!o&&!Fl(a))return i(`unpersisted`);let s=t?.key??a.key,c=Il(Al(s===a.key?a:{...a,key:s},o),o);if(Rl(c,t))return i(`stale-active`);c=r?.project?.(c,o)??c;let l=xl(c,n.archivedFilter??`active`);if(o&&Ol(c,o)&&l){let e=Ol(a,o);return e&&r?.observe?.(o),{disposition:`unchanged`,row:o,admittedRow:e?o:c,confirmRead:e}}let u=l?c:void 0;return u&&r?.observe?.(u),{disposition:`accepted`,row:u,admittedRow:c,confirmRead:u!==void 0}}function Xl(e,t,n={},r){let i=Wl(t);if(!i)return{applied:!1,row:e};let[a,o,s,c]=i,{key:l}=a;if(a.isAncestorReference)return Ul(e,a,s,n,r);let{agentId:u,ancestorRevision:d,ancestorSessions:f,ancestorSessionRefs:p,catalogChanged:m,clientRunId:h,compacted:g,key:_,phase:v,reason:y,runId:b,session:x,sessionKey:S,ts:C,...w}=s;if(!a.agentId&&(va(l)||!X(l)&&!Object.keys(w).length))return{applied:!1,key:l,agentId:null,row:e};if(c===`delete`&&!a.sessionId)return{applied:!1,key:l,agentId:a.agentId,row:e};if(c===`delete`)return e&&e.sessionId!==a.sessionId?{applied:!1,key:l,agentId:a.agentId,row:e}:{applied:!0,key:l,agentId:a.agentId,deletedKey:e?.key??l};let T=w.kind===`direct`||w.kind===`group`||w.kind===`global`||w.kind===`unknown`?w.kind:e?.kind,E=typeof w.updatedAt==`number`?w.updatedAt:e?.updatedAt,D=R(w.sessionId)??e?.sessionId;if(!T||!e&&D===void 0&&typeof E!=`number`)return{applied:!1,row:e};let O={applied:!0,key:l,agentId:a.agentId,runId:a.runId,clientRunId:a.clientRunId,hasActiveRun:a.hasActiveRun,status:a.status,isChatTurn:a.isChatTurn},k=Array.isArray(o.ancestorSessions);if(!e&&(!n.admitSnapshot||!k||!B(o.session)))return O;let ee=B(w.agentRuntime),A={modelProvider:R(w.modelProvider),model:R(w.model),...ee?{agentRuntime:{id:R(ee.id)??``}}:{}},j=e&&!kl(A,e)?jl(e):e,te=R(B(o.session)?.agentId),ne={...k?{}:j,...w,key:e?.key??l,kind:T,updatedAt:E??null,...D?{sessionId:D}:{},...k&&te?{agentId:te}:{}};for(let[e,t]of Object.entries(w))t===null&&!Ql.has(e)&&Reflect.deleteProperty(ne,e);let M=[...Object.keys(w).filter(e=>w[e]!==void 0),...j===e?[]:Ml],N=Yl(ne,e,{...n,selectedGlobalAgentId:a.agentId??n.selectedGlobalAgentId??null},r&&e?{project:t=>r(t,e,k?[...M,...Object.keys(e).filter(e=>!Object.hasOwn(t,e))]:M,a)}:void 0),re=e?.owner?.actor;typeof s.ancestorRevision==`string`&&N.admittedRow&&Hl(N.admittedRow,Pl(ne),s.ancestorRevision);let ie=N.admittedRow?.owner?.actor,ae=!!N.admittedRow&&(k||Object.hasOwn(w,`owner`)||Object.hasOwn(w,`createdActor`))&&(re?.type!==ie?.type||re?.id!==ie?.id||re?.label!==ie?.label||e?.owner?.assignedAt!==N.admittedRow?.owner?.assignedAt);return{...O,row:N.row,admittedRow:N.admittedRow,reconciled:!0,disposition:N.disposition,...typeof o.ts==`number`&&Number.isFinite(o.ts)?{eventTs:o.ts}:{},ownershipChanged:ae}}var Zl,Ql;function $l(){return($l=e((()=>{Dl(),Q(),Nl(),Zl=new WeakMap,Ql=new Set([`updatedAt`,`activeLeafEntryId`,`modelOverrideSource`])})))()}function eu(e,t){return e&&t.some((t,n)=>t!==e.sessions[n])?{...e,sessions:t}:e}function tu(e,t,n){let r=e.sessions.filter(e=>e.key!==t);return n&&(r.push(n),r.sort(Tl)),{...e,count:r.length,sessions:r}}function nu(e,t){let n=new Set,r=[...e.sessions,...t.sessions].filter(e=>!e.key||n.has(e.key)?!1:(n.add(e.key),!0)),i=t.totalCount??e.totalCount,a=t.hasMore??(typeof i==`number`&&Number.isFinite(i)?r.length<i:!1);return{...t,count:r.length,totalCount:i,hasMore:a,nextOffset:t.nextOffset??(a?r.length:null),sessions:r}}function ru(e,t){if(!e||!t)return e;let n=new Map(t.sessions.map(e=>[e.key,e]));return eu(e,e.sessions.map(e=>Il(e,n.get(e.key))))}function iu(e,t,n,r){let i=n.sessionKey?.trim();if(!i)return e;let a=X(i)?.agentId,o=W(a??ga(n));if(!a&&W(t.agentId??``)!==o)return e;let s=e=>Oa(n,e.key,i,e.agentId),c=t.result?.sessions.find(s);if(c&&(r||c.archived===!0)&&!e.sessions.some(s)){let t=[...e.sessions,c];return{...e,count:t.length,sessions:t}}return e}function au(e,t,n={},r){let i=ql(t),a=i?.agentId??n.selectedGlobalAgentId??null,o=i?e?.sessions.find(e=>zl(e,i.key,a)):void 0,{row:s,admittedRow:c,reconciled:l,eventTs:u,ownershipChanged:d,disposition:f,...p}=Xl(o,t,n,r);if(f===`outside-scope`)return{...p,row:o,result:e};if(p.deletedKey){if(!e||!o)return{...p,result:e};let t=e.sessions.filter(e=>e!==o);return{...p,result:{...e,count:t.length,sessions:t}}}if(!l)return!e&&p.applied?{applied:!1,result:e}:{...p,result:e};if(!e||!o)return{applied:!1,result:e};let m=s===o?e:tu(e,o.key,s),h=u!==void 0&&u>m.ts?{...m,ts:u}:m,g=d?{...h,owners:void 0}:h;return{...p,row:s,admittedRow:c,result:g}}function ou(e,t,n={},r,i=()=>!0){let a=e,o,s=[];for(let e of Gl(t)){let c=ql(e);if(c&&(!i(c)||e!==t&&a?.sessions.some(e=>zl(e,c.key,c.agentId)&&e.sessionId!==c.sessionId)))continue;let l=au(a,e,n,r);o??=l,a=l.result,l.admittedRow&&s.push(l.admittedRow)}return{...o??{applied:!1},...s.length?{applied:!0,admittedRows:s}:{},result:a}}function su(e,t,n,r={},i=!1,a){if(!t?.key||Jl(t,r))return e;if(!e){if(!Fl(t)&&!n)return null;let e=Fl(t)&&xl(t,r.archivedFilter??`active`)?Yl(t,void 0,{...r,archivedFilter:`all`},a):void 0,i=e?.row?[e.row]:[];return{ts:Date.now(),path:``,count:i.length,defaults:n??{modelProvider:null,model:null,contextTokens:null},sessions:i}}let o=e.sessions.find(e=>zl(e,t.key,t.agentId??r.selectedGlobalAgentId??null)),s=n?Al(n,e.defaults):e.defaults,c=s===e.defaults?e:{...e,defaults:s},l=Yl(t,o,{...r,preserveExisting:i},a);return l.disposition===`older`||l.disposition===`outside-scope`||l.disposition===`invalid`?e:l.disposition===`accepted`?tu(c,o?.key??t.key,l.row):c}function cu(){return(cu=e((()=>{Dl(),Q(),$l(),Nl()})))()}async function lu(e,t){await e.request(`sessions.setInvolvement`,t)}function uu(e){let t=e?.trim();return{...xu,rowMode:`compact`,hasBoard:!0,archivedFilter:`all`,...t?{agentId:t}:{}}}function du(e){let t=e?.trim();return{...xu,archivedFilter:`all`,...t?{agentId:t}:{}}}function fu(e,t){let n=e.trim(),r=t?.trim();return{key:n,...r?{agentId:r}:{}}}function pu(e={}){let t={includeGlobal:!0,includeUnknown:!0,configuredAgentsOnly:!0};e.rowMode&&(t.rowMode=e.rowMode),e.limit===void 0?t.limit=xu.limit:e.limit>0&&(t.limit=Math.floor(e.limit));for(let n of[`includeGlobal`,`includeUnknown`,`configuredAgentsOnly`,`excludeSubagents`,`excludeCron`,`excludeSystem`,`hasBoard`])e[n]!==void 0&&(t[n]=e[n]);for(let n of[`includeDerivedTitles`,`includeLastMessage`,`includeOwnerSessionCounts`,`ownerFirst`,`involvingMe`])e[n]===!0&&(t[n]=!0);e.archivedFilter===`archived`?t.archived=!0:e.archivedFilter===`all`&&(t.archived=`all`);let n=e.archivedFilter===`archived`||e.archivedFilter===`all`?0:typeof e.activeMinutes==`number`&&e.activeMinutes>0?Math.floor(e.activeMinutes):0;n>0&&(t.activeMinutes=n);for(let n of[`agentId`,`spawnedBy`,`search`,`ownerId`]){let r=e[n]?.trim();r&&(t[n]=r)}return e.boardFace&&(t.boardFace=e.boardFace),typeof e.offset==`number`&&e.offset>0&&(t.offset=Math.floor(e.offset)),t}function mu(e){let{offset:t,append:n,...r}=e,i=typeof e.limit==`number`&&e.limit>0?Math.floor(e.limit):xu.limit;return Object.freeze({...pu({...r,limit:i}),limit:i,...e.pageSize?{pageSize:e.pageSize}:{}})}async function hu(e,t,n){return gu(e,pu(t),n)}async function gu(e,t,n){let{pageSize:r,...i}=t;if(!r||!i.limit||i.limit<=r)return await e.request(`sessions.list`,i)??null;let a=null,o=i.offset??0;for(let t=i.limit;t>0;t-=r){if(!n())return null;let s=await e.request(`sessions.list`,{...i,limit:Math.min(t,r),...o>0?{offset:o}:{}});if(!n()||!s)return null;if(a=a?nu(a,s):s,!s.hasMore||s.sessions.length===0)break;let c=s.nextOffset??o+s.sessions.length;if(c<=o)throw Error(`Session list pagination did not advance.`);o=c}return a}function _u(e,t,n,r={}){let i=r.expectedSessionId?.trim(),a={...fu(t,r.agentId),...i?{expectedSessionId:i}:{},...r.expectedMarkedUnreadAt===void 0?{}:{expectedMarkedUnreadAt:r.expectedMarkedUnreadAt},...n};return n.archived===!0?e.request(`sessions.patch`,a,dr):e.request(`sessions.patch`,a)}function vu(e,t){return t.patch.archived===!0?e.request(`sessions.patchMany`,t,dr):e.request(`sessions.patchMany`,t)}function yu(e,t,n={}){return e.request(`sessions.delete`,{...fu(t,n.agentId),deleteTranscript:n.deleteTranscript??!0,...n.expectedSessionId?{expectedSessionId:n.expectedSessionId}:{},...n.archivedOnly===!0?{archivedOnly:!0}:{}},dr)}function bu(e,t,n={}){return e.request(`sessions.reset`,fu(t,n.agentId)).then(()=>void 0)}var xu;function Su(){return(Su=e((()=>{vr(),cu(),xu={limit:200}})))()}function Cu(e,t){return{result:t.result,error:t.error,basePath:e.basePath,fallbackAgentId:Go(e),globalScope:ya({agentsList:e.agents.state.agentsList,hello:e.gateway.snapshot.hello}),mainKey:pa({agentsList:e.agents.state.agentsList,hello:e.gateway.snapshot.hello})}}async function wu(e){let t=uu(e.agentSelection.state.scopeId),n=e.sessions.listSnapshot(t);return!n.result&&!n.loading&&(await e.sessions.refreshList({...t,force:!0}),n=e.sessions.listSnapshot(t)),Cu(e,n)}var Tu;function Eu(){return(Eu=e((()=>{L(),I(),P(),Qo(),Q(),Su(),G(),Tu=H({...h(`dashboards`),loader:wu,component:()=>U(()=>import(`./dashboards-page-BaVhUBNy.js`).then(()=>({header:!0,render:e=>F`<openclaw-dashboards-page .routeData=${e}></openclaw-dashboards-page>`})),__vite__mapDeps([94,10,2,3,4,5,6,7,8,9,1,11,12,13,95,17,18,19,96]),import.meta.url)})})))()}var Du;function Ou(){return(Ou=e((()=>{L(),I(),P(),G(),Du=H({...h(`debug`),component:()=>U(()=>import(`./debug-page-DRyElqol.js`).then(()=>({header:!0,render:()=>F`<openclaw-debug-page></openclaw-debug-page>`})),__vite__mapDeps([97,1,2,3,4,5,6,7,8,9,10,11,12,13,98,84,17,18,19,99]),import.meta.url)})})))()}var ku,Au;function ju(){return(ju=e((()=>{L(),I(),P(),G(),ku=H({...h(`device`),component:()=>U(()=>import(`./device-page-DKnOXax5.js`).then(()=>({header:!0,render:()=>F`<openclaw-device-page></openclaw-device-page>`})),__vite__mapDeps([100,10,2,3,4,5,6,7,8,9,1,11,12,13,38,48,49,17,18,19,50,101]),import.meta.url)}),Au=H({...h(`device-permissions`),component:()=>U(()=>import(`./permissions-page-CcKnKu0E.js`).then(()=>({header:!0,render:()=>F`<openclaw-device-permissions-page></openclaw-device-permissions-page>`})),__vite__mapDeps([102,10,2,3,4,5,6,7,8,9,1,11,12,13,38,17,18,19]),import.meta.url)})})))()}async function Mu(e){let{createInitialDevicesState:t,loadDevices:n,loadExecApprovals:r,loadNodes:i}=await U(async()=>{let{createInitialDevicesState:e,loadDevices:t,loadExecApprovals:n,loadNodes:r}=await import(`./page-operations-DGRUsmRL.js`).then(e=>(e.i(),e.l));return{createInitialDevicesState:e,loadDevices:t,loadExecApprovals:n,loadNodes:r}},__vite__mapDeps([103]),import.meta.url),a=e.gateway,o=a.snapshot,s=t({client:o.client,connected:o.phase===`connected`});if(o.phase!==`connected`||!o.client)return{gateway:a,gatewaySnapshot:o,devices:s};let c=o.hello?.auth??null,l=!c||Ae(c),u=ie(c);return await Promise.all([i(s),Promise.allSettled([l&&n(s),e.runtimeConfig.refresh(),u&&r(s)])]),{gateway:a,gatewaySnapshot:o,devices:s}}var Nu;function Pu(){return(Pu=e((()=>{L(),I(),P(),Pe(),G(),Nu=H({...h(`devices`),loader:Mu,component:()=>U(()=>import(`./devices-page-DIXYGiUR.js`).then(()=>({header:!0,render:e=>F`<openclaw-devices-page .routeData=${e}></openclaw-devices-page>`})),__vite__mapDeps([104,3,2,4,5,8,7,6,9,1,10,11,12,13,14,15,16,105,103,106,107,17,18,19,20,21,22,108,109]),import.meta.url)})})))()}var Fu;function Iu(){return(Iu=e((()=>{L(),I(),P(),G(),Fu=H({...h(`labs`),loader:e=>e.runtimeConfig.ensureLoaded(),component:()=>U(()=>import(`./labs-page-CXVCOWGr.js`).then(()=>({header:!0,render:()=>F`<openclaw-labs-page></openclaw-labs-page>`})),__vite__mapDeps([110,1,2,3,4,5,6,7,8,9,10,11,12,13,76,17,18,19]),import.meta.url)})})))()}var Lu;function Ru(){return(Ru=e((()=>{L(),I(),P(),G(),Lu=H({...h(`lobsterdex`),component:()=>U(()=>import(`./lobsterdex-page-BCJIDsuN.js`).then(()=>({header:!0,render:()=>F`<openclaw-lobsterdex-page></openclaw-lobsterdex-page>`})),__vite__mapDeps([111,10,2,3,4,5,6,7,8,9,1,11,12,13,14,15,16,17,18,19,20,21,22,112]),import.meta.url)})})))()}var zu;function Bu(){return(Bu=e((()=>{L(),I(),P(),Se(),G(),zu=H({...h(`logs`),component:()=>U(()=>import(`./logs-page-CTz3weQZ.js`).then(()=>({header:!0,render:()=>F`<openclaw-logs-page ${oe({logsPage:!0})}></openclaw-logs-page>`})),__vite__mapDeps([113,3,2,4,5,8,7,6,9,1,10,11,12,13,25,17,18,19,114]),import.meta.url)})})))()}var Vu;function Hu(){return(Hu=e((()=>{L(),P(),G(),Vu=H({...h(`meetings`),loaderDeps:(e,{search:t})=>t,loader:(e,{deps:t})=>t,component:()=>U(()=>import(`./meetings-page-CYjKwTwb.js`).then(e=>e.meetingsPageComponent),__vite__mapDeps([115,1,2,3,4,5,6,7,8,9,10,11,12,13,69,74,17,18,19,116]),import.meta.url)})})))()}var Uu;function Wu(){return(Wu=e((()=>{L(),I(),P(),G(),Uu=H({...h(`memory-import`),component:()=>U(()=>import(`./memory-import-page-D_T_U9Pq.js`).then(()=>({header:!0,render:()=>F`<openclaw-memory-import-page></openclaw-memory-import-page>`})),__vite__mapDeps([117,5,4,10,2,3,6,7,8,9,1,11,12,13,75,17,18,19,118]),import.meta.url)})})))()}async function Gu(e,t){let n=new URLSearchParams(t.location.search),r=n.get(`connect`)===`1`,i=n.get(`provider`)?.trim()??``,a=e.gateway,o=a.snapshot,s=e.settingsAgentSelection,c=s.intentRevision,l={gateway:a,gatewaySnapshot:o,selectionIntentRevision:c,connect:r,provider:i},u=s.state.selectedId,{EMPTY_MODEL_PROVIDERS_DATA:d,loadModelProvidersData:f}=await U(async()=>{let{EMPTY_MODEL_PROVIDERS_DATA:e,loadModelProvidersData:t}=await import(`./load-BvSiHO4c.js`).then(e=>(e.n(),e.a));return{EMPTY_MODEL_PROVIDERS_DATA:e,loadModelProvidersData:t}},__vite__mapDeps([119,1,2,3,4,5,6,7,8,9,10,11,12,13,38,120,17,18,19]),import.meta.url),p=o.phase===`connected`?o.client:null,m=()=>{let e=a.snapshot;return t.shouldRun()&&e.phase===`connected`&&e.client===o.client&&e.hello===o.hello&&s.intentRevision===c&&s.state.selectedId===u};return p&&m()&&(u||=(await e.agents.ensureList(),s.state.selectedId),u&&m())?{...l,data:await f(p,{agentId:u,signal:t.signal}),client:p,agentId:u}:{...l,data:d,client:null,agentId:u}}var Ku;function qu(){return(qu=e((()=>{L(),I(),P(),G(),Ku=H({...h(`model-providers`),loaderDeps:(e,t)=>t.search,loader:Gu,component:()=>U(()=>import(`./model-providers-page-BSPzCIVA.js`).then(()=>({header:!0,render:(e,t=!1)=>F`<openclaw-model-providers-page
.routeData=${e}
.loaderPending=${t}
></openclaw-model-providers-page>`})),__vite__mapDeps([121,3,2,4,5,8,7,6,9,27,1,10,11,12,13,38,42,119,120,122,123,72,53,73,124,125,17,18,19,126,59,79,127]),import.meta.url)})})))()}var Ju;function Yu(){return(Yu=e((()=>{L(),I(),P(),G(),Ju=H({...h(`model-setup`),loaderDeps:(e,t)=>t.search,loader:(e,{location:t})=>{let n=[`1`,`explicit`].includes(new URLSearchParams(t.search).get(`firstRun`)??``);return n?{firstRun:n}:Kt({pathname:b(`model-providers`,e.basePath),search:`?connect=1`,hash:``})},component:()=>U(()=>import(`./model-setup-page-C7u639b-.js`).then(()=>({header:!0,render:e=>F`<openclaw-model-setup-page .routeData=${e}></openclaw-model-setup-page>`})),__vite__mapDeps([128,1,2,3,4,5,6,7,8,9,10,11,12,13,29,26,27,28,15,30,73,72,38,53,123,124,129,17,18,19,20,31,32,59,79,127]),import.meta.url)})})))()}var Xu;function Zu(){return(Zu=e((()=>{L(),P(),G(),Xu=H({...h(`new-session`),loaderDeps:(e,t)=>t.search,staleReloadMode:`blocking`,loader:async(e,{location:t,cause:n})=>(await U(async()=>{let{load:e}=await import(`./control-ui-boot-new-CxgnwT6A.js`).then(e=>(e.t(),e.n));return{load:e}},__vite__mapDeps([14,3,2,4,5,8,7,6,9,1,10,11,12,13,15,16,17,18,19,20,21,22]),import.meta.url)).load(e,t.search,n),component:()=>U(()=>import(`./control-ui-boot-new-CxgnwT6A.js`).then(e=>(e.r(),e.i)),__vite__mapDeps([14,3,2,4,5,8,7,6,9,1,10,11,12,13,15,16,17,18,19,20,21,22]),import.meta.url)})})))()}function Qu(e,t=``,n=``){let r=new URLSearchParams(e),i=ce(r.get(`__openclawPluginPath`)??t,n);return{pluginId:i?.pluginId??r.get(`plugin`)?.trim()??``,id:i?.id??r.get(`id`)?.trim()??``}}function $u(e){return`${e.pluginId}/${e.id}`}function ed(e){return Object.fromEntries([...new URLSearchParams(e)].filter(([e])=>e.startsWith(`p.`)).map(([e,t])=>[e.slice(2),t]))}var td;function nd(){return(nd=e((()=>{L(),I(),P(),G(),td=H({...h(`plugin`),loaderDeps:(e,t)=>JSON.stringify([$u(Qu(t.search,t.pathname,e.basePath)),ed(t.search)]),loader:(e,t)=>({...Qu(t.location.search,t.location.pathname,e.basePath),params:ed(t.location.search)}),component:()=>U(()=>import(`./plugin-page-sDTwp19q.js`).then(()=>({header:!0,render:e=>{let t=e??{pluginId:``,id:``,params:{}};return F`<openclaw-plugin-page
.pluginId=${t.pluginId}
.tabId=${t.id}
.params=${t.params}
>
</openclaw-plugin-page>`}})),__vite__mapDeps([130,28,3,2,4,5,8,7,6,9,27,1,10,11,12,13,26,29,15,30,131,82,17,18,19,20,31,32]),import.meta.url)})})))()}function rd(e){return e.request(`plugins.list`,{})}function id(e,t,n,r){return e.request(`plugins.catalog.get`,{id:t,...r?{version:r}:{}},n?{signal:n}:void 0)}function ad(e,t){return e.request(`plugins.uninstall`,{pluginId:t})}function od(e,t,n,r){return e.request(`plugins.setEnabled`,{pluginId:t,enabled:n,...r})}async function sd(e,t,n,r={}){let i,a=await e.runExternalMutation(async e=>{if(e!==t)throw Error(`Connection changed before the plugin update started.`);try{return await n(e)}catch(e){throw i=e instanceof Error?e:Error(String(e)),i}},r);if(!a.ok)throw i??Error(a.error);return{value:a.value,refreshError:a.refresh.ok?null:a.refresh.error}}function cd(){return(cd=e((()=>{})))()}function ld(e){return n(n(e,ae),he)}function ud(e,t=``){let n=new URLSearchParams(e.search),r=b(`plugin-settings`,t),i=n.get(`tab`),a=e.pathname===r&&i===`advanced`,o=n.has(`tab`)&&!a;o&&n.delete(`tab`);let s=n.toString(),c=e.pathname===`${r}/discover`,l={pathname:c||i===`discover`?b(`plugins`,t):e.pathname,search:s?`?${s}`:``,hash:e.hash};return o||c?l:null}function dd(){return(dd=e((()=>{P()})))()}async function fd(e,t){let n=ld(t.location),r=e.gateway,i=r.snapshot,a=i.client;if(i.phase!==`connected`||!a)return{gateway:r,gatewaySnapshot:i,result:null,error:null,location:n};try{return{gateway:r,gatewaySnapshot:i,result:await rd(a),error:null,location:n}}catch(e){return{gateway:r,gatewaySnapshot:i,result:null,error:J(e),location:n}}}function pd(e,t){return H({...h(e),loaderDeps:(e,t)=>{let n=ld(t);return`${n.pathname}\u0000${n.search}\u0000${n.hash}`},loader:(e,n)=>{let r=ud(ld(n.location),e.basePath);return r?Kt(r):(t===`settings`&&e.runtimeConfig.ensureLoaded().then(()=>e.runtimeConfig.ensureSchemaLoaded()).catch(()=>void 0),fd(e,n))},component:()=>U(()=>import(`./plugins-page-DRXtyEME.js`).then(()=>({header:!0,render:e=>F`<openclaw-plugins-page
.routeData=${e}
.surface=${t}
></openclaw-plugins-page>`})),__vite__mapDeps([132,3,2,4,5,8,7,6,9,10,1,11,12,13,90,26,27,28,29,15,30,131,133,134,135,56,54,55,38,57,58,72,53,73,77,136,137,138,139,17,18,19,20,31,32,59,79,140,141,142]),import.meta.url)})}var md,hd,gd;function _d(){return(_d=e((()=>{L(),I(),P(),Y(),dd(),G(),md=pd(`plugins`,`discovery`),hd=pd(`plugin-settings`,`settings`),gd=[md,hd]})))()}var vd;function yd(){return(yd=e((()=>{L(),I(),P(),G(),vd=H({...h(`portals`),component:()=>U(()=>import(`./portals-page-Ce3PZSf5.js`).then(()=>({header:!0,render:()=>F`<openclaw-portals-page></openclaw-portals-page>`})),__vite__mapDeps([143,11,2,3,4,5,6,7,8,9,1,10,12,13,17,19,18,144]),import.meta.url)})})))()}var bd;function xd(){return(xd=e((()=>{L(),I(),P(),G(),bd=H({...h(`profile`),loader:e=>{e.agents.ensureList()},component:()=>U(()=>import(`./profile-page-B-3M1Tz4.js`).then(()=>({header:!0,render:()=>F`<openclaw-profile-page></openclaw-profile-page>`})),__vite__mapDeps([145,3,2,4,5,8,7,6,9,1,10,11,12,13,53,69,39,17,18,19,59,146]),import.meta.url)})})))()}var Sd;function Cd(){return(Cd=e((()=>{L(),I(),P(),G(),Sd=H({...h(`search`),component:()=>U(()=>import(`./search-page-D1rWe8Lo.js`).then(()=>({header:!0,render:()=>F`<openclaw-search-page></openclaw-search-page>`})),__vite__mapDeps([147,1,2,3,4,5,6,7,8,9,10,11,12,13,38,14,15,16,56,27,54,55,57,58,76,77,137,26,28,29,30,138,17,18,19,20,21,22,31,32,141]),import.meta.url)})})))()}var wd;function Td(){return(Td=e((()=>{L(),I(),P(),G(),wd=H({...h(`secrets`),component:()=>U(()=>import(`./secrets-page-tNu2n7bi.js`).then(()=>({header:!0,render:()=>F`<openclaw-secrets-page></openclaw-secrets-page>`})),__vite__mapDeps([148,10,2,3,4,5,6,7,8,9,1,11,12,13,138,17,18,19,149]),import.meta.url)})})))()}function Ed(e){let t=new URLSearchParams(e.search),n=t.get(`session`)?.trim()||null,r=t.get(`status`);return{expandedSessionKey:n,statusFilter:r===`archived`?`archived`:r===`all`?`all`:`active`}}async function Dd(e,t){return await e.runtimeConfig.ensureLoaded().catch(()=>void 0),Ed(t)}var Od;function kd(){return(kd=e((()=>{L(),I(),P(),G(),Od=H({...h(`sessions`),loaderDeps:(e,t)=>{let n=Ed(t);return`${n.expandedSessionKey??``}\u0000${n.statusFilter}\u0000${e.agentSelection.state.scopeId??`all`}`},loader:(e,{location:t})=>Dd(e,t),component:()=>U(()=>import(`./sessions-page-TPLkiopT.js`).then(()=>({header:!0,render:e=>F`<openclaw-sessions-page .routeData=${e}></openclaw-sessions-page>`})),__vite__mapDeps([150,27,3,2,4,5,8,7,6,9,1,10,11,12,13,151,26,28,29,15,30,152,153,107,154,17,18,19,20,31,32,108,155]),import.meta.url)})})))()}var Ad;function jd(){return(jd=e((()=>{L(),I(),P(),G(),Ad=H({...h(`skill-workshop`),component:()=>U(()=>import(`./skill-workshop-page-CTtWxCzR.js`).then(()=>({render:()=>F`<openclaw-skill-workshop-page></openclaw-skill-workshop-page>`})),__vite__mapDeps([156,10,2,3,4,5,6,7,8,9,1,11,12,13,26,27,28,29,15,30,60,61,136,139,17,18,19,20,31,32,62,140,157]),import.meta.url)})})))()}async function Md(e,t){return e.request(`skills.status`,{agentId:t})}function Nd(){return(Nd=e((()=>{})))()}async function Pd(e,t,n){let r=new URLSearchParams(t.location.search),i=r.get(`clawhub`)??void 0,a=e.gateway,o=a.snapshot,s=e.agents,c=n===`settings`?e.settingsAgentSelection:e.agentSelection,l=c.state,u=c.intentRevision,d=o.client,f=null,p=null,m=null;if(o.phase===`connected`&&d){try{let e=await s.ensureList(),t=r.get(`agent`)??l.selectedId??e?.defaultId;p=e?.agents.some(e=>e.id===t)?t??null:null}catch(e){f=J(e)}if(p)try{m=await Md(d,p)??null}catch(e){f??=J(e)}}return{gateway:a,gatewaySnapshot:o,agents:s,selectedAgentId:p,selectionIntentRevision:u,report:m,error:f,clawhubRef:i}}function Fd(e,t){return H({...h(e),loaderDeps:(e,t)=>t.search,loader:(e,n)=>Pd(e,n,t),component:()=>U(()=>import(`./skills-page-Dj_Cydjx.js`).then(()=>({header:!0,render:e=>e?F`<openclaw-skills-page
.routeData=${e}
.surface=${t}
></openclaw-skills-page>`:Be})),__vite__mapDeps([158,1,2,3,4,5,6,7,8,9,10,11,12,13,29,26,27,28,15,30,43,136,17,18,19,20,31,32,140,159]),import.meta.url)})}var Id;function Ld(){return(Ld=e((()=>{L(),I(),P(),Y(),G(),Id=[Fd(`skills`,`discovery`),Fd(`skill-settings`,`settings`)]})))()}var Rd,zd;function Bd(){return(Bd=e((()=>{L(),P(),ne(),G(),Rd=()=>U(()=>import(`./systems-page-BoH-w4s7.js`),__vite__mapDeps([160,1,2,3,4,5,6,7,8,9,10,11,12,13,161,61,27,28,26,29,15,30,60,162,163,164,134,105,85,17,18,19,20,31,32,62,86,165]),import.meta.url),zd=H({...h(`systems`),loaderDeps:e=>String(Te(e.gateway).key),staleTime:1/0,loader:async e=>(await Rd()).load(e),component:Rd})})))()}var Vd;function Hd(){return(Hd=e((()=>{L(),I(),P(),Se(),G(),Vd=H({...h(`terminal`),loader:(e,{location:t})=>t,component:()=>U(()=>import(`./terminal-page-CaVT3fIf.js`).then(()=>({render:e=>F`<openclaw-terminal-page
.location=${e??null}
${oe({terminalPage:!0})}
></openclaw-terminal-page>`})),__vite__mapDeps([166,133,167,5,4,26,2,3,6,7,8,9,27,1,10,11,12,13,28,29,15,30,162,163,168,169,170,171,17,18,19,20,31,32,172]),import.meta.url)})})))()}var Ud;function Wd(){return(Wd=e((()=>{L(),P(),G(),Ud=H({...h(`usage`),loader:(e,t)=>{let n=e.gateway,r={gateway:n,gatewaySnapshot:n.snapshot,agentId:e.agentSelection.state.scopeId,date:new Date};return U(async()=>{let{loadUsageRouteData:e}=await import(`./route-loader-CydiuB2I.js`);return{loadUsageRouteData:e}},__vite__mapDeps([173,174,120,125]),import.meta.url).then(({loadUsageRouteData:n})=>n(e,t,r))},component:()=>U(()=>import(`./usage-page-4xb0hVaZ.js`).then(e=>e.usagePageComponent),__vite__mapDeps([175,1,2,3,4,5,6,7,8,9,10,11,12,13,120,122,124,174,125,17,18,19,126]),import.meta.url)})})))()}function Gd(e){return n(e,le)}function Kd(e,t=``){let n=Gd(e),r=o(n.pathname,t),i=new URLSearchParams(n.search),a=i.has(`board`);if(!r&&!a)return{boardFilter:qd,search:n.search};let s=i.get(`board`)?.trim()??``;i.delete(`board`);let c=i.toString(),l=r??(_t(s)?s:qd);return{boardFilter:l,search:c?`?${c}`:``,...a?{canonicalLocation:{pathname:l===qd?b(`workboard`,t):Me(l,t),search:c?`?${c}`:``,hash:n.hash}}:{}}}var qd;function Jd(){return(Jd=e((()=>{yt(),P(),qd=`__all__`})))()}var Yd;function Xd(){return(Xd=e((()=>{L(),I(),P(),Jd(),G(),Yd=H({...h(`workboard`),loaderDeps:(e,t)=>{let n=Gd(t),r=Kd(n,e.basePath),i=r.canonicalLocation;return`${i?.pathname??n.pathname}\u0000${i?.search??r.search}`},loader:(e,{location:t})=>Kd(t,e.basePath),component:()=>U(()=>import(`./plugin-page-sDTwp19q.js`).then(()=>({header:!0,render:e=>F`<openclaw-plugin-page
.pluginId=${`workboard`}
.tabId=${`workboard`}
.params=${{boardId:e?.boardFilter??`__all__`}}
></openclaw-plugin-page>`})),__vite__mapDeps([130,28,3,2,4,5,8,7,6,9,27,1,10,11,12,13,26,29,15,30,131,82,17,18,19,20,31,32]),import.meta.url)})})))()}var Zd;function Qd(){return(Qd=e((()=>{L(),I(),P(),G(),Zd=H({...h(`worktrees`),component:()=>U(()=>import(`./worktrees-page-BJPWZ5dF.js`).then(()=>({header:!0,render:()=>F`<openclaw-worktrees-page></openclaw-worktrees-page>`})),__vite__mapDeps([176,5,4,10,2,3,6,7,8,9,1,11,12,13,14,15,16,154,17,18,19,20,21,22]),import.meta.url)})})))()}function $d(e,t){if(e){if(t){let n=of.get(e);for(let e of t)n?.delete(e)}else of.delete(e)}}function ef(e){return!!(e?.result&&Date.now()-e.result.cachedAt<af)}function tf(e,t){let n=of.get(e);n||(n=new Map,of.set(e,n));let r=t.trim(),i=n.get(r);if(i&&(!i.result||ef(i)))return n.delete(r),n.set(r,i),i.pending;n.delete(r);let a={pending:Promise.resolve(null)};return a.pending=e.request(`agent.identity.get`,{agentId:r}).then(t=>{if(of.get(e)!==n||n.get(r)!==a)return null;a.result={identity:t,cachedAt:Date.now()};for(let[e,t]of n){if(n.size<=rf)break;t.result&&n.delete(e)}return t},e=>{throw n.get(r)===a&&n.delete(r),e}),n.set(r,a),a.pending}function nf(e){let t=e.snapshot.client,n=e.snapshot.phase===`connected`,r=0,i=new Map,a=new Map,o=new Set,s=()=>{for(let e of o)e()},c=e=>{let o=e.phase===`connected`;if(e.client===t&&o===n)return;let c=i.size>0;$d(t),t=e.client,n=o,r+=1,i.clear(),a.clear(),c&&s()};return e.subscribe(c),e.subscribeEvents?.(e=>{e.event===`config.changed`&&($d(t),r+=1,i.clear(),a.clear(),s())}),{get(e){let t=e?.trim();return t?i.get(t)??null:null},entries(){return[...i.values()]},async ensure(t){let n=e.snapshot;c(n);let o=n.client;if(!o||n.phase!==`connected`)return;let l=r,u=ur(t).filter(e=>{let t=of.get(o)?.get(e);return!ef(t)||i.get(e)!==t?.result?.identity});if(u.length===0)return;let d=await Promise.all(u.map(async e=>[e,a.get(e)??0,await tf(o,e).catch(()=>null)]));if(r!==l||e.snapshot.client!==o||e.snapshot.phase!==`connected`)return;let f=!1;for(let[e,t,n]of d)n&&i.get(e)!==n&&t===(a.get(e)??0)&&(i.set(e,n),f=!0);f&&s()},invalidate(e){let n=!1,r=ur(e);$d(t,r);for(let e of r)a.set(e,(a.get(e)??0)+1),i.delete(e)&&(n=!0);n&&s()},subscribe:e=>_n(o,e)}}var rf,af,of;function sf(){return(sf=e((()=>{Bn(),rf=128,af=6e4,of=new WeakMap})))()}function cf(e){let t=e.client,n=e.phase===`connected`,r=0,i=!1;return{get epoch(){return r},capture(){return!i&&n&&t?{client:t,epoch:r}:null},isCurrent(e){return!i&&n&&t===e.client&&r===e.epoch},invalidate(){i||(r+=1)},transition(e){if(i)return!1;let a=e.phase===`connected`,o=t!==e.client||n!==a;return o&&(r+=1),t=e.client,n=a,o},dispose(){i||(i=!0,r+=1)}}}function lf(){return(lf=e((()=>{})))()}function uf(e,t,n){let r=B(e);return r?(typeof r.gatewayCode==`string`?r.gatewayCode:typeof r.code==`string`?r.code:null)===t&&B(r.details)?.code===n:!1}function df(e){return uf(e,Nt.INVALID_REQUEST,nn.WIZARD_NOT_FOUND)}function ff(e){return uf(e,Nt.UNAVAILABLE,nn.SETUP_ADMISSION_BUSY)}function pf(e){return e instanceof Error&&e.name===`GatewayRequestError`&&At(e)?.missingScope===`operator.read`}function mf(e){return B(e)?.gatewayCode===Nt.FORBIDDEN||pf(e)}function hf(e){return`You don't have permission to view ${e}. Ask the person who manages OpenClaw for access.`}function gf(){return(gf=e((()=>{yr()})))()}function _f(e,t){let n=t.agentId.trim(),r=t.sessionKey.trim();return`${n}:${r}:model=${xf(e,r)||`(default)`}`}async function vf(e,t,n={}){let r=e.client,i=t.agentId.trim(),a=t.sessionKey.trim(),o=_f(e,{agentId:i,sessionKey:a});if(!r||!e.connected||!i||!a||e.toolsEffectiveLoading&&e.toolsEffectiveLoadingKey===o)return;let s=Symbol(`effective-tools-request`);Sf.set(e,s);let c=()=>e.client===r&&e.connected&&Sf.get(e)===s&&(n.isCurrent?.()??!0),l=()=>!c()||(n.ignoreResponse?.(i,o)??!1);e.toolsEffectiveLoading=!0,e.toolsEffectiveLoadingKey=o,e.toolsEffectiveResultKey=null,e.toolsEffectiveError=null,e.toolsEffectiveResult=null;try{let t=await r.request(`tools.effective`,{agentId:i,sessionKey:a});if(l())return;e.toolsEffectiveResultKey=o,e.toolsEffectiveResult=t}catch(t){if(l())return;e.toolsEffectiveError=n.onError?.(t)??J(t)}finally{c()&&e.toolsEffectiveLoadingKey===o&&(Sf.delete(e),e.toolsEffectiveLoadingKey=null,e.toolsEffectiveLoading=!1)}}function yf(e){Sf.delete(e),e.toolsEffectiveResult=null,e.toolsEffectiveResultKey=null,e.toolsEffectiveError=null,e.toolsEffectiveLoading=!1,e.toolsEffectiveLoadingKey=null}function bf(e){let t=e.sessionKey?.trim();if(!t||e.agentsPanel!==`tools`||!e.agentsSelectedId)return;let n=Aa(t);if(e.agentsSelectedId===n)return vf(e,{agentId:n,sessionKey:t})}function xf(e,t){if(!t)return``;let n=e.chatModelCatalog??[],r=e.sessions.state.modelOverrides[t],i=e.sessionsResult?.defaults,a=Xi(i?.model,i?.modelProvider,n);if(r===null)return a;if(r)return qi(r,n);let o=e.sessionsResult?.sessions.find(e=>e.key===t);return o?.model?Xi(o.model,o.modelProvider,n):a}var Sf;function Cf(){return(Cf=e((()=>{aa(),Y(),Q(),Sf=new WeakMap})))()}function wf(e,t){return!!(e.agentsSelectedId&&e.agentsSelectedId!==t)}function Tf(e,t){return pf(e)?hf(t):J(e)}async function Ef(e,t){let n=t.trim(),r=e.client;if(!r||!e.connected||!n||e.toolsCatalogLoading&&e.toolsCatalogLoadingAgentId===n)return;let i=e.requestGeneration,a=()=>e.client!==r||e.requestGeneration!==i||e.toolsCatalogLoadingAgentId!==n||wf(e,n);e.toolsCatalogLoading=!0,e.toolsCatalogLoadingAgentId=n,e.toolsCatalogError=null,e.toolsCatalogResult=null;try{let t=await r.request(`tools.catalog`,{agentId:n,includePlugins:!0});if(a())return;e.toolsCatalogResult=t}catch(t){if(a())return;e.toolsCatalogError=Tf(t,`tools catalog`)}finally{e.client===r&&e.requestGeneration===i&&e.toolsCatalogLoadingAgentId===n&&(e.toolsCatalogLoadingAgentId=null,e.toolsCatalogLoading=!1)}}async function Df(e,t){let n=e.client,r=e.requestGeneration;await vf(e,t,{isCurrent:()=>e.client===n&&e.connected&&e.requestGeneration===r,ignoreResponse:(t,n)=>e.toolsEffectiveLoadingKey!==n||wf(e,t),onError:e=>Tf(e,`effective tools`)})}async function Of(e,t,n,r=()=>!0){if(!r())return;let i=e.state.configFormDirty;e.stageDefaultAgent(t)&&!i&&e.state.configFormDirty&&await e.save({canDispatch:r})&&r()&&await n()}async function kf(e,t){await e.request(`agents.update`,{agentId:t.agentId,...t.name?{name:t.name}:{},...t.emoji?{emoji:t.emoji}:{},...t.avatar?{avatar:t.avatar}:{}})}function Af(){return{list:null,loading:!1,error:null}}function jf(e){let t=cf(e.snapshot),n={client:e.snapshot.client,connected:e.snapshot.phase===`connected`,agentsLoading:!1,agentsError:null,agentsList:null},r=new Map,i=new Map,a=new Set,o=!1,s=0,c=null,l=()=>{c=null,s+=1,n.agentsLoading=!1},u=()=>{if(!o)for(let e of a)e(n)},d=e=>{let t=r.get(e);if(t)return t;let n=Af();return r.set(e,n),n},f=async e=>{let r=t.capture();if(!r)return n.agentsList;if(c&&!e)return c;if(n.agentsList&&!e)return n.agentsList;let i=++s;n.agentsLoading=!0,n.agentsError=null,u();let a=r.client.request(`agents.list`,{}).then(e=>{let a=t.isCurrent(r)&&s===i;return a&&(n.agentsList=e,n.agentsError=null),a?e:null}).catch(e=>(t.isCurrent(r)&&s===i&&(n.agentsList=null,n.agentsError=Tf(e,`agent list`)),null)).finally(()=>{let e=s===i;e&&(c=null),e&&t.isCurrent(r)&&(n.agentsLoading=!1,u())});return c=a,a},p=async(e,n)=>{let a=R(e),o=t.capture();if(!a||!o)return a?r.get(a)?.list??null:null;let s=d(a);if(s.list&&!n)return s.list;let c=i.get(a);if(c&&!n)return c;s.loading=!0,s.error=null,u();let l=o.client.request(`agents.files.list`,{agentId:a}).then(e=>{let n=t.isCurrent(o)&&i.get(a)===l;return n&&e&&(s.list=e,s.error=null),n?s.list:null}).catch(e=>(t.isCurrent(o)&&i.get(a)===l&&(s.error=J(e)),null)).finally(()=>{let e=i.get(a)===l;e&&i.delete(a),e&&t.isCurrent(o)&&(s.loading=!1,u())});return i.set(a,l),l},m=e.subscribe(e=>{let a=n.client!==e.client,o=e.phase===`connected`,s=t.transition(e);if(n.client=e.client,n.connected=o,s&&(a||!o)){l(),i.clear();for(let e of r.values())e.loading=!1;r.clear(),n.agentsList=null,n.agentsError=null}s&&u()});return{get state(){return n},ensureList:()=>f(!1),refreshList:()=>f(!0),files(e){let t=R(e);return t?r.get(t)??Af():Af()},invalidateFiles(e){let t=!1;for(let n of ur(e))t=r.delete(n)||t,t=i.delete(n)||t;t&&u()},ensureFiles:e=>p(e,!1),refreshFiles:e=>p(e,!0),recordFile({agentId:e,file:t}){let n=d(e);if(!n.list){p(e,!0);return}i.delete(e);let r={...t};delete r.content;let a=n.list.files;n.list={...n.list,files:a.some(e=>e.name===r.name)?a.map(e=>e.name===r.name?r:e):[...a,r]},n.loading=!1,n.error=null,u()},subscribe(e){return _n(a,e)},dispose(){o=!0,t.dispose(),m(),a.clear(),i.clear(),r.clear(),l()}}}function Mf(){return(Mf=e((()=>{Bn(),Y(),gf(),Cf()})))()}function Nf(e,t){let n=e&&Object.hasOwn(e,t)&&e[t];return Array.isArray(n)?n:[]}function Pf(e,t){if(!e)return!1;let n=B(Object.hasOwn(e.channels,t)?e.channels[t]:void 0);return n?.configured===!0||n?.running===!0||n?.connected===!0||Nf(e.channelAccounts,t).some(e=>e.configured===!0||e.running===!0||e.connected===!0)}function Ff(e){return e?[...new Set([...e.channelOrder,...Object.keys(e.channels),...Object.keys(e.channelAccounts)])].some(t=>Pf(e,t)):!1}function If(e,t){if(!e)return null;let n=B(e.channels);return B(n?.[t])??B(e[t])}function Lf(e){if(e==null)return K(`common.na`);if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return K(`common.na`)}}function Rf(e){let t=If(e.configForm,e.channelId);return t?e.fields.flatMap(e=>e in t?[{label:e,value:Lf(t[e])}]:[]):[]}function zf(e){let t=e.hello?.auth;return JSON.stringify({role:t?.role??null,scopes:t?.scopes?[...t.scopes].toSorted():null})}function Bf(e,t){let n=e.hello?.auth;return!n?.scopes||pr({role:n.role??`operator`,requestedScopes:[t],allowedScopes:n.scopes})}function Vf(e={}){return{client:e.client??null,connected:e.phase===`connected`,channelsLoading:!1,channelsLoadingProbe:null,channelsRefreshSeq:0,channelsSnapshot:null,channelsError:null,channelsLastSuccess:null,pairingLoading:!1,pairingRefreshSeq:0,pairingSnapshot:null,pairingError:null,pairingLastSuccess:null,pairingBusyRequestId:null,whatsappLoginMessage:null,whatsappLoginQrDataUrl:null,whatsappLoginSessionKey:null,whatsappLoginConnected:null,whatsappBusy:!1}}function Hf(e,t,n){return e.client===t&&e.channelsRefreshSeq===n}function Uf(e,t,n){return e.connected&&e.client===t&&e.pairingRefreshSeq===n}function Wf(e){e.pairingRefreshSeq+=1,e.pairingLoading=!1}async function Gf(e,t={}){let n=e.client;if(!n||!e.connected||e.pairingLoading||e.pairingBusyRequestId&&!t.duringMutation)return;let r=e.pairingRefreshSeq+1;e.pairingRefreshSeq=r,e.pairingLoading=!0,e.pairingError=null;try{let t=await n.request(`channels.pairing.list`,{});if(!Uf(e,n,r))return;e.pairingSnapshot=t,e.pairingLastSuccess=Date.now()}catch(t){Uf(e,n,r)&&(e.pairingError=J(t))}finally{Uf(e,n,r)&&(e.pairingLoading=!1)}}function Kf(e,t){let n=e.pairingSnapshot;n&&n.requests.some(e=>e.requestId===t)&&(e.pairingSnapshot={...n,requests:n.requests.filter(e=>e.requestId!==t)})}function qf(e){let t=Vf(e.snapshot),n={whatsappEpoch:0,pairingEpoch:0};async function r(e,r){let i=t.client;if(!i||!t.connected||t.pairingBusyRequestId)return null;let a=e.requestId,o=n.pairingEpoch,s=()=>t.connected&&t.client===i&&n.pairingEpoch===o&&t.pairingBusyRequestId===a;Wf(t),t.pairingBusyRequestId=e.requestId,t.pairingError=null;try{let n=await r(i);return s()?(Kf(t,e.requestId),Wf(t),await Gf(t,{duringMutation:!0}),s()?{result:n}:null):null}catch(e){return s()&&(t.pairingError=J(e)),null}finally{s()&&(t.pairingBusyRequestId=null)}}async function i(e,r,i){let a=t.client;if(!a||!t.connected||t.whatsappBusy)return!1;t.whatsappBusy=!0;let o=n.whatsappEpoch,s=()=>t.connected&&t.client===a&&n.whatsappEpoch===o;try{let t=await e(a);if(!s())return!1;r(t)}catch(e){return s()&&(t.whatsappLoginMessage=J(e),i?.()),!1}finally{s()&&(t.whatsappBusy=!1)}return!0}function a(e,n){return i(t=>t.request(`web.login.start`,{channel:`whatsapp`,force:e,timeoutMs:3e4,...n?{accountId:n}:{}}),e=>{t.whatsappLoginSessionKey=e.connected?null:e.sessionKey??null,t.whatsappLoginMessage=e.message?J(e.message):null,t.whatsappLoginQrDataUrl=e.qrDataUrl??null,t.whatsappLoginConnected=typeof e.connected==`boolean`?e.connected:null},()=>{t.whatsappLoginQrDataUrl=null,t.whatsappLoginSessionKey=null,t.whatsappLoginConnected=null})}function o(e){return i(n=>n.request(`web.login.wait`,{channel:`whatsapp`,timeoutMs:12e4,currentQrDataUrl:t.whatsappLoginQrDataUrl??void 0,...t.whatsappLoginSessionKey?{sessionKey:t.whatsappLoginSessionKey}:{},...e?{accountId:e}:{}}),e=>{t.whatsappLoginMessage=e.message?J(e.message):null,t.whatsappLoginConnected=e.connected??null,e.connected&&(t.whatsappLoginSessionKey=null),e.qrDataUrl?t.whatsappLoginQrDataUrl=e.qrDataUrl:e.connected&&(t.whatsappLoginQrDataUrl=null)},()=>{t.whatsappLoginConnected=null})}function s(e){return i(t=>t.request(`channels.logout`,{channel:`whatsapp`,...e?{accountId:e}:{}}),e=>{e.cleared?(t.whatsappLoginMessage=K(`channels.whatsapp.loggedOut`),t.whatsappLoginQrDataUrl=null,t.whatsappLoginSessionKey=null,t.whatsappLoginConnected=null):t.whatsappLoginMessage=K(`channels.whatsapp.logoutNotCleared`)})}let c=new Set,l=Bf(e.snapshot,`operator.read`),u=zf(e.snapshot),d=Bf(e.snapshot,`operator.admin`),f=!1,p=!1,m=()=>{if(!f)for(let e of c)e(t)},h=async e=>{if(f)return;let t=e();m();try{return await t}finally{m()}};async function g(e){let n=t.client;if(!n||!t.connected||t.channelsLoading&&(!t.channelsLoadingProbe||e))return;let r=(t.channelsRefreshSeq??0)+1;t.channelsRefreshSeq=r,t.channelsLoading=!0,t.channelsLoadingProbe=e,e||(p=!1);try{let i=await n.request(`channels.status`,{probe:e,timeoutMs:8e3});if(!Hf(t,n,r))return;t.channelsSnapshot=i,t.channelsError=null,t.channelsLastSuccess=Date.now()}catch(e){if(!Hf(t,n,r))return;pf(e)?(t.channelsSnapshot=null,t.channelsError=hf(`channel status`)):t.channelsError=J(e)}finally{Hf(t,n,r)&&(t.channelsLoading=!1,t.channelsLoadingProbe=null,p&&await g(!1))}}let _=(e=!1)=>h(()=>g(e)),v=e=>h(async()=>{await e()&&await _(!0)}),y=e.subscribe(e=>{let r=t.client!==e.client,i=e.phase===`connected`,a=t.connected!==i,o=Bf(e,`operator.read`),s=l!==o;l=o;let c=zf(e),f=u!==c;u=c;let h=Bf(e,`operator.admin`),g=d!==h;d=h,t.client=e.client,t.connected=i,(r||a||s)&&(p=!1,t.channelsLoading=!1,t.channelsLoadingProbe=null,t.channelsRefreshSeq=(t.channelsRefreshSeq??0)+1,t.channelsError=i||!o?null:t.channelsError,t.channelsSnapshot=null,t.channelsLastSuccess=null),(r||a||g)&&(n.whatsappEpoch+=1,t.whatsappBusy=!1,t.whatsappLoginSessionKey=null,h||(t.whatsappLoginMessage=null,t.whatsappLoginQrDataUrl=null,t.whatsappLoginConnected=null)),(r||a||f)&&(n.pairingEpoch+=1,t.pairingSnapshot=null,t.pairingError=null,t.pairingLastSuccess=null,t.pairingLoading=!1,t.pairingBusyRequestId=null,t.pairingRefreshSeq+=1),m()}),b=e.subscribeEvents(e=>{e.event===`config.changed`&&t.connected&&l&&(t.channelsSnapshot||t.channelsLoading||c.size!==0)&&(p=!0,_())});return{get state(){return t},refresh:_,refreshPairing:()=>h(()=>Gf(t)),approvePairing:async e=>{let t=await h(()=>r(e,t=>t.request(`channels.pairing.approve`,e)));return t?t.result:null},dismissPairing:async e=>!!await h(()=>r(e,t=>t.request(`channels.pairing.dismiss`,e))),startWhatsApp:(e,t)=>v(()=>a(e,t)),waitWhatsApp:e=>v(()=>o(e)),logoutWhatsApp:e=>v(()=>s(e)),subscribe:e=>_n(c,e),dispose(){f||(f=!0,p=!1,t.channelsRefreshSeq=(t.channelsRefreshSeq??0)+1,n.whatsappEpoch+=1,n.pairingEpoch+=1,t.pairingRefreshSeq+=1,t.pairingBusyRequestId=null,t.whatsappBusy=!1,y(),b(),c.clear())}}}function Jf(){return(Jf=e((()=>{gt(),q(),Y(),gf()})))()}function Yf(e){let t=null,n=0,r=0,i=!1,a=()=>{t&&=(clearTimeout(t),null),n=0,r+=1},o=()=>{if(i||!e.shouldRefresh()){a();return}if(t)return;let s=Xf[Math.min(n,Xf.length-1)];t=setTimeout(()=>{t=null;let i=r;n=Math.min(n+1,Xf.length-1),e.refresh(()=>i===r).then(()=>i===r&&o(),()=>i===r&&o())},s)};return{cancel:a,reconcile:o,dispose:()=>{i=!0,a()}}}var Xf;function Zf(){return(Zf=e((()=>{Xf=[250,750,1500,3e3,6e3,3e4]})))()}function Qf(e){let t=e.trim().toLowerCase();return[`localhost`,`::1`,`[::1]`].includes(t)||/^127(?:\.\d{1,3}){3}$/.test(t)&&t.split(`.`).every(e=>Number(e)<=255)}function $f(){return($f=e((()=>{})))()}function ep(e){let t=[],n=32768;for(let r=0;r<e.length;r+=n)t.push(String.fromCharCode(...e.subarray(r,r+n)));return btoa(t.join(``))}function tp(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return n}function np(){return(np=e((()=>{})))()}function rp(e){return`${wp}${tr(e)}`}function ip(e){try{e?.removeItem(Cp)}catch{}}function ap(e){if(!e)return null;try{let t=JSON.parse(e);return!t||t.version!==1||!t.deviceId||typeof t.deviceId!=`string`||!t.tokens||typeof t.tokens!=`object`?null:t}catch{return null}}function op(e){try{let t=kr(),n=rp(e),r=ap(t?.getItem(n)??null);if(r)return ip(t),r;let i=ap(t?.getItem(Cp)??null);if(!i)return null;try{t?.setItem(n,JSON.stringify(i)),ip(t)}catch{}return i}catch{return null}}function sp(e,t){try{let n=kr();n?.setItem(rp(e),JSON.stringify(t)),ip(n)}catch{}}function cp(e){let t={};for(let[n,r]of Object.entries(e)){let e=Mn(n);e&&r&&typeof r.token==`string`&&(t[e]={token:r.token,role:e,scopes:Xn(Array.isArray(r.scopes)?r.scopes:void 0),updatedAtMs:Number.isFinite(r.updatedAtMs)?r.updatedAtMs:0})}return t}function lp(e){let t=op(e.gatewayUrl);if(!t||t.deviceId!==e.deviceId)return null;let n=Mn(e.role);return cp(t.tokens)[n]??null}function up(e){let t=vp(kr());if(!t)return null;let n=lp({deviceId:t.deviceId,gatewayUrl:e,role:`operator`});return n?.scopes.includes(`operator.read`)?n.token:null}function dp(e){let t=op(e.gatewayUrl),n=Mn(e.role),r={token:e.token,role:n,scopes:Xn(e.scopes),updatedAtMs:Date.now()};return sp(e.gatewayUrl,{version:1,deviceId:e.deviceId,tokens:{...t?.deviceId===e.deviceId?cp(t.tokens):{},[n]:r}}),r}function fp(e){let t=op(e.gatewayUrl);if(!t||t.deviceId!==e.deviceId)return;let n=Mn(e.role),r=cp(t.tokens);r[n]&&(delete r[n],sp(e.gatewayUrl,{...t,tokens:r}))}function pp(e){return ep(e).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/g,``)}function mp(e){let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`);return tp(t+`=`.repeat((4-t.length%4)%4))}async function hp(e){let t=globalThis.crypto?.subtle;if(t){let n=await t.digest(`SHA-256`,e.slice().buffer);return $e.bytesToHex(new Uint8Array(n))}return $e.bytesToHex((await xp()).sha256(e))}async function gp(){let e=nt.randomSecretKey(),t=await tt(e);return{deviceId:await hp(t),publicKey:pp(t),privateKey:pp(e)}}function _p(){try{let e=kr()?.getItem(Tp);if(!e)return null;let t=JSON.parse(e);return z(t)&&t.version===1&&typeof t.deviceId==`string`&&t.deviceId?t.deviceId:null}catch{return null}}function vp(e){try{let t=e?.getItem(Tp);if(t){let e=JSON.parse(t);if(e?.version===1&&typeof e.deviceId==`string`&&typeof e.publicKey==`string`&&typeof e.privateKey==`string`)return e}}catch{}return null}async function yp(){let e=kr(),t=vp(e);try{if(t){let n=await hp(mp(t.publicKey));if(n!==t.deviceId){let r={...t,deviceId:n};e?.setItem(Tp,JSON.stringify(r))}return{deviceId:n,publicKey:t.publicKey,privateKey:t.privateKey}}}catch{}if(Ep)return Ep;let n=await gp(),r={version:1,deviceId:n.deviceId,publicKey:n.publicKey,privateKey:n.privateKey,createdAtMs:Date.now()};try{e?.setItem(Tp,JSON.stringify(r))}catch{}return Ep=n,n}async function bp(e,t){let n=mp(e),r=new TextEncoder().encode(t);return pp(await et(r,n))}var xp,Sp,Cp,wp,Tp,Ep;function Dp(){return(Dp=e((()=>{Je(),En(),G(),xp=()=>U(()=>import(`./control-ui-boot-shared-em9-jnbz.js`).then(e=>(e.H(),e.W)),__vite__mapDeps([5,4]),import.meta.url),Sp=Ze.sha512Async,Ze.sha512Async=async e=>globalThis.crypto?.subtle&&Sp?await Sp(e):Uint8Array.from((await xp()).sha512(e)),Cp=`openclaw.device.auth.v1`,wp=`${Cp}:`,Tp=`openclaw-device-identity-v1`,Ep=null})))()}function Op(e){let t=e.trim().split(/\s+/).join(` `);return`v1-${bc(t).toString(36)}-${t.length.toString(36)}`}function kp(e,t,n){return`configHints.${encodeURIComponent(e).replaceAll(`.`,`%2E`)}.${t}.${Op(n)}`}function Ap(){return(Ap=e((()=>{})))()}function jp(e){return/^\$\{[^}]*\}$/.test(e.trim())}function Mp(e){return typeof e==`string`?e.trim().length>0&&!jp(e):e!=null}function Np(e){if(e)return Array.isArray(e.type)?e.type.find(e=>e!==`null`)??e.type[0]:e.type}function Pp(e){let t=Array.isArray(e.type)?e.type:e.type?[e.type]:[];return t.length>0&&!t.includes(`string`)||e.const!==void 0&&typeof e.const!=`string`||e.enum&&!e.enum.some(e=>typeof e==`string`)||e.allOf&&!e.allOf.every(Pp)||e.anyOf&&!e.anyOf.some(Pp)?!1:!e.oneOf||e.oneOf.some(Pp)}function Fp(e){return e.filter(e=>typeof e==`string`).join(`.`)}function Ip(e,t){let n=Fp(e),r=t[n];if(r)return{hint:r,hintPath:n};let i=e.map(String),a=Jp.get(t);a||(a=Object.entries(t).flatMap(([e,t])=>e.includes(`*`)?[[e.split(`.`),t]]:[]),Jp.set(t,a));for(let[e,t]of a)if(e.length===i.length&&e.every((e,t)=>e===`*`||e===i[t]))return{hint:t,hintPath:e.join(`.`)}}function Lp(e,t){return Ip(e,t)?.hint}function Rp(e,t){let n=Ip(e,t);if(!n)return;let{hint:r,hintPath:i}=n;return{...r,label:r.label?Zr(kp(i,`label`,r.label))??r.label:r.label,help:r.help?Zr(kp(i,`help`,r.help))??r.help:r.help}}function zp(e){return e.replace(/_/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/\s+/g,` `).replace(/^./,e=>e.toUpperCase())}function Bp(e){return`${JSON.stringify(e,null,2).trimEnd()}\n`}function Vp(e){let t=Array.isArray(e)?e:z(e)?Object.values(e):[];return e===`__OPENCLAW_REDACTED__`||t.some(Vp)}function Hp(e){if(e.value===`__OPENCLAW_REDACTED__`)return e.originalFormValue===`__OPENCLAW_REDACTED__`&&!e.originalRawPathExists&&e.canOmit?Xp:e.value;if(Array.isArray(e.value)){let t=Array.isArray(e.originalFormValue)?e.originalFormValue:[],n=Array.isArray(e.originalRawValue)?e.originalRawValue:[];return e.value.map((e,r)=>Hp({value:e,originalFormValue:t[r],originalRawValue:n[r],originalRawPathExists:r in n,canOmit:!1}))}if(!z(e.value))return e.value;let t=z(e.originalFormValue)?e.originalFormValue:null,n=z(e.originalRawValue)?e.originalRawValue:null,r={};for(let[i,a]of Object.entries(e.value)){let e=t!=null&&Object.hasOwn(t,i)?t[i]:void 0,o=n!=null&&Object.hasOwn(n,i),s=Hp({value:a,originalFormValue:e,originalRawValue:o?n?.[i]:void 0,originalRawPathExists:o,canOmit:!0});s!==Xp&&(r[i]=s)}return e.canOmit&&Object.keys(r).length===0&&!e.originalRawPathExists?Xp:r}function Up(e,t,n){if(!t||!n)return e;let r=Hp({value:e,originalFormValue:t,originalRawValue:n,originalRawPathExists:!0,canOmit:!1});return z(r)?r:e}function Wp(e){return typeof e==`string`&&Zp.has(e)}function Gp(e,t,n){if(t.length===0||t.some(Wp))return null;let r=e;for(let e=0;e<t.length-1;e+=1){let i=t[e],a=t[e+1];if(i===void 0||typeof r!=`object`||!r||typeof i==`number`&&!Array.isArray(r))return null;let o=r,s=o[i];if(s==null){if(!n)return null;s=typeof a==`number`?[]:{},o[i]=s}r=s}let i=t.at(-1);return i===void 0?null:{current:r,lastKey:i}}function Kp(e,t,n){let r=Gp(e,t,!0);if(r){if(typeof r.lastKey==`number`){Array.isArray(r.current)&&(r.current[r.lastKey]=n);return}typeof r.current==`object`&&r.current!=null&&(r.current[r.lastKey]=n)}}function qp(e,t){let n=Gp(e,t,!1);if(n){if(typeof n.lastKey==`number`){Array.isArray(n.current)&&n.current.splice(n.lastKey,1);return}typeof n.current==`object`&&n.current!=null&&delete n.current[n.lastKey]}}var Jp,Yp,Xp,Zp;function Qp(){return(Qp=e((()=>{Ap(),Qr(),Jp=new WeakMap,Yp=`__OPENCLAW_REDACTED__`,Xp=Symbol(`omit-redacted-config-value`),Zp=new Set([`__proto__`,`prototype`,`constructor`])})))()}function $p(){return nm!==null}function em(){return rm??=U(()=>import(`./config-runtime-BecGLziM.js`).then(e=>(e.V(),e.B)).then(e=>(nm=e.default,nm),e=>{throw rm=null,e}),__vite__mapDeps([8]),import.meta.url),rm}function tm(e){try{return JSON.parse(e)}catch(t){if(nm)return nm.parse(e);throw em().catch(()=>void 0),t}}var nm,rm;function im(){return(im=e((()=>{G(),nm=null,rm=null})))()}function am(e,t,n){if(!e||!t)return null;let r=structuredClone(n),i=(e,t,n,a)=>{for(let o of new Set([...Object.keys(e),...Object.keys(t)])){let s=[...a,o];Object.hasOwn(t,o)?z(e[o])&&z(t[o])&&z(n[o])?i(e[o],t[o],n[o],s):yn(e[o])!==yn(t[o])&&Kp(r,s,structuredClone(t[o])):qp(r,s)}};return i(e,t,n,[]),r}function om(e,t){let n=(e,t)=>t===`__OPENCLAW_REDACTED__`&&Mp(e)?Yp:Array.isArray(e)?e.map((e,r)=>n(e,Array.isArray(t)?t[r]:void 0)):z(e)?Object.fromEntries(Object.entries(e).map(([e,r])=>[e,n(r,z(t)?t[e]:void 0)])):e;return Object.fromEntries(Object.entries(e).map(([e,r])=>[e,n(r,t[e])]))}function sm(e,t,n){let r=om(e,n),i=om(t,n);return yn(am(r,n,i))!==yn(i)}function cm(e,t,n){let r=om(e,n),i=om(t,n);return yn(am(r,i,n))!==yn(am(r,n,i))}function lm(){return(lm=e((()=>{Nn(),Qp()})))()}function um(e){if(typeof e?.raw==`string`)return e.raw;let t=$a(e);return t?Bp(t):null}function dm(e){Lm.delete(e)}function fm(e,t){let n=J(e),r=e instanceof D?`${e.name}: ${n}`:n;if(!t||!(e instanceof D)||!z(e.details))return r;let i=e.details.issues;if(!Array.isArray(i))return r;let a=`${e.name}: invalid config: `;if(!r.startsWith(a))return r;let o=wm(t);if(!o)return r;let s=a.length;for(let e of i){if(!z(e)||typeof e.path!=`string`||typeof e.message!=`string`||!r.startsWith(`${e.path}: ${e.message}`,s))break;let t=pm(e.path,o);if(t!==e.path&&(r=`${r.slice(0,s)}${t}${r.slice(s+e.path.length)}`),s+=t.length+2+e.message.length,!r.startsWith(`; `,s))break;s+=2}return r}function pm(e,t){let n=e.split(`.`),r=(e,t)=>{if(t===n.length)return[``];let i=n[t];if(i===void 0)return[];if(Array.isArray(e)){let a=Number(i);return!/^\d+$/u.test(i)||!Number.isSafeInteger(a)||!Object.hasOwn(e,a)?[n.slice(t).join(`.`)]:r(e[a],t+1).map(e=>e?`#${a+1}.${e}`:`#${a+1}`)}if(!z(e))return[n.slice(t).join(`.`)];let a=Object.keys(e).flatMap(i=>{let a=i.split(`.`);return a.length>n.length-t||!a.every((e,r)=>e===n[t+r])?[]:r(e[i],t+a.length).map(e=>e?`${i}.${e}`:i)});return a.length>0?a:[n.slice(t).join(`.`)]},i=new Set(r(t,0));return i.size===1?i.values().next().value??e:e}function mm(e,t,n={}){let r=(e.configFormDirty||e.configRecoveryError!==null||n.preservePendingChanges===!0)&&n.discardPendingChanges!==!0;n.discardPendingChanges===!0&&(e.configAutoSaveStatus=`idle`,e.configRecoveryError=null);let i=t.configRevisionHash??t.hash??null;t.appliedConfigHash!==void 0&&(e.configNeedsApply=i!==t.appliedConfigHash);let a=e.configDraftBaseHash??e.configSnapshot?.hash??null;Ya(e,t);let o=$a(t);!(typeof t.raw==`string`||o||e.configForm)&&e.configFormMode===`raw`&&(e.configFormMode=`form`),r?(e.configFormMode!==`raw`&&e.configForm&&(e.configRaw=Bp(e.configForm)),e.configDraftBaseHash=a):Nm(e)}function hm(e){let t=e.trim();return t===`true`||t!==`false`&&e}function gm(e,t){if(e==null)return e;if(t.allOf&&t.allOf.length>0){let{allOf:n,...r}=t,i=gm(e,r);for(let e of n)i=gm(i,e);return i}let n=Np(t);if(t.anyOf||t.oneOf){let n=(t.anyOf??t.oneOf??[]).filter(e=>!(e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)));if(n.length===1){let t=n[0];return t?gm(e,t):e}if(typeof e==`string`){if(n.some(Pp))return e;for(let t of n){let n=Np(t);if(n===`number`||n===`integer`){let t=T(e,n===`integer`);if(t===void 0||typeof t==`number`)return t}if(n===`boolean`){let t=hm(e);if(typeof t==`boolean`)return t}}}for(let t of n){let n=Np(t);if(n===`object`&&typeof e==`object`&&!Array.isArray(e)||n===`array`&&Array.isArray(e))return gm(e,t)}return e}if(n===`number`||n===`integer`)return typeof e==`string`?T(e,n===`integer`):e;if(n===`boolean`)return typeof e==`string`?hm(e):e;if(n===`string`)return typeof e==`string`&&e.length===0&&t.minLength?void 0:e;if(n===`object`){if(typeof e!=`object`||Array.isArray(e))return e;let n=t.properties??{},r=t.additionalProperties&&typeof t.additionalProperties==`object`?t.additionalProperties:null,i={};for(let[t,a]of Object.entries(e)){let e=n[t]??r,o=e?gm(a,e):a;o!==void 0&&(i[t]=o)}return i}if(n===`array`){if(!Array.isArray(e))return e;let n=t.items;return Array.isArray(n)?e.map((e,t)=>{let r=t<n.length?n[t]:void 0;return r?gm(e,r):e}):n?e.map(e=>gm(e,n)).filter(e=>e!==void 0):e}return e}function _m(e){if(!e.configFormDirty&&typeof e.configSnapshot?.raw==`string`)return e.configSnapshot.raw;let t=vm(e);return t?Bp(t):e.configRaw}function vm(e){if(e.configFormMode!==`form`||!e.configForm)return null;let t=z(e.configSchema)?e.configSchema:null;return Up(t?gm(e.configForm,t):e.configForm,e.configFormOriginal,e.configFormOriginal)}function ym(e){return z(e)&&z(e.config)&&typeof e.hash==`string`&&e.hash.length>0}function bm(e){let t=$a(e.configSnapshot);if(!t||e.configDraftBaseHash!==e.configSnapshot?.hash)return;let n=e.configFormOriginal??e.configRawOriginalParsed;if(!n)throw Error(K(`configView.rawDraftUnverified`));if(!sm(n,n,t))return;let r=vm(e)??wm(e.configRaw);if(!r||sm(n,r,t))throw Error(`config changed since last load; re-run config.get and retry`)}function xm(e,t,n,r={}){let i=r.raw??Bp(n.config),a=vm(e),o=a?Bp(a):e.configRaw,s=$a(t.independentSnapshot),c=!!(a&&e.configFormOriginal&&s&&cm(e.configFormOriginal,a,s)),l=o===t.raw?structuredClone(n.config):c?null:am(t.form,a,n.config);if(Ya(e,{...e.configSnapshot,raw:i,hash:n.hash,valid:!0,issues:[],config:n.config,sourceConfig:n.config}),e.configDraftBaseHash=n.hash,e.configValid=!0,e.configIssues=[],e.configAutoSaveStatus=c?`conflict`:e.configAutoSaveStatus===`paused`?`paused`:`idle`,!l){c||(Tm(e,t.raw),e.configFormOriginal=t.form);let r=e.configFormOriginal??e.configRawOriginalParsed,i=a??wm(e.configRaw);return(c||r&&i&&sm(r,i,n.config))&&(e.configAutoSaveStatus=`conflict`,e.lastError=`config changed since last load; re-run config.get and retry`),e.configFormDirty=!0,e.configAutoSaveStatus}return Tm(e,i),e.configFormOriginal=structuredClone(n.config),e.configForm=l,e.configRaw=Bp(l),e.configFormDirty=e.configRaw!==Bp(n.config),e.configFormDirty||(e.configAutoSaveStatus=`idle`,e.configRaw=i,dm(e)),e.configAutoSaveStatus}function Sm(e,t){let n=e.configFormOriginal??$a(e.configSnapshot)??{},r=Bp(t),i=Bp(n);e.configForm=t,e.configRaw=r,e.configFormDirty=r!==i,e.configFormMode=`form`,Cm(e)}function Cm(e){e.configAutoSaveStatus!==`saving`&&e.configAutoSaveStatus!==`conflict`&&e.configAutoSaveStatus!==`paused`&&((e.configAutoSaveStatus===`rejected`||!e.configFormDirty&&e.configAutoSaveStatus===`error`)&&(e.lastError=null),e.configAutoSaveStatus=`idle`)}function wm(e){try{return B(tm(e))}catch{return null}}function Tm(e,t){e.configRawOriginal=t,e.configRawOriginalParsePending=null;try{e.configRawOriginalParsed=B(tm(t));return}catch{e.configRawOriginalParsed=null}let n=em().then(r=>{if(e.configRawOriginal===t&&e.configRawOriginalParsePending===n)try{e.configRawOriginalParsed=B(r.parse(t))}catch{e.configRawOriginalParsed=null}}).catch(()=>void 0).finally(()=>{e.configRawOriginalParsePending===n&&(e.configRawOriginalParsePending=null)});e.configRawOriginalParsePending=n}function Em(e,t){let n;if(e.configFormDirty&&e.configFormMode===`raw`){let t=wm(e.configRaw);if(!t){e.configAutoSaveStatus=`error`,e.lastError=K(`configView.rawDraftBlocksFormEdit`);return}n=t}else n=structuredClone(e.configForm??$a(e.configSnapshot)??{});t(n),Sm(e,n)}function Dm(e,t){let n=Lm.get(e)??new Set;n.add(t),Lm.set(e,n)}function Om(e,t){let n=Lm.get(e);n&&(n.delete(t),n.size===0&&Lm.delete(e))}function km(e,t,n,r){if(n.length!==4||n[0]!==`plugins`||n[1]!==`entries`||typeof n[2]!=`string`||n[3]!==`enabled`)return;let i=n[2],a=B(t.plugins),o=Array.isArray(a?.allow)?a.allow:null;if(!o){Om(e,i);return}if(r===!0){if(o.includes(i))return;if(o.length===0){Om(e,i);return}Kp(t,[`plugins`,`allow`],[...o,i]),Dm(e,i);return}Lm.get(e)?.has(i)&&(Kp(t,[`plugins`,`allow`],o.filter(e=>e!==i)),Om(e,i))}function Am(e,t,n){Em(e,r=>{if(Kp(r,t,n),t[0]===`plugins`&&t[1]===`allow`){Lm.delete(e);return}km(e,r,t,n)})}function jm(e,t,n=!1){em().catch(()=>void 0),e.configRaw=t,e.configFormDirty=t!==e.configRawOriginal,e.configFormDirty?e.configDraftBaseHash=e.configDraftBaseHash??e.configSnapshot?.hash??null:n?(e.configForm=structuredClone(e.configFormOriginal??{}),dm(e)):Nm(e),e.configFormMode=`raw`,Cm(e)}function Mm(e){let t=$a(e.configSnapshot);e.configFormOriginal=structuredClone(t??{}),Tm(e,e.configSnapshot?.raw??(t?Bp(t):e.configRawOriginal)),e.configDraftBaseHash=e.configSnapshot?.hash??null}function Nm(e){Mm(e),e.configForm=structuredClone(e.configFormOriginal??{}),e.configRaw=e.configRawOriginal,e.configFormDirty=!1,e.configFormMode=`form`,Lm.delete(e)}function Pm(e,t){Em(e,e=>qp(e,t))}function Fm(e,t){let n=$a(e.configSnapshot),r=e.configFormOriginal;if(!n||!e.configSnapshot?.hash||e.configValid!==!0||!r||!e.configForm||e.configFormMode!==`form`)return!1;let i=structuredClone(e.configForm),a=t.reduce((e,t)=>Array.isArray(e)&&typeof t==`number`||z(e)&&typeof t==`string`?e[t]:void 0,r);if(a===void 0?qp(i,t):Kp(i,t,structuredClone(a)),i=Up(i,r,r),cm(r,i,n))return e.configAutoSaveStatus=`conflict`,e.lastError=`config changed since last load; re-run config.get and retry`,!1;let o=am(r,i,n);return o?(Mm(e),e.configAutoSaveStatus!==`paused`&&(e.configAutoSaveStatus=`idle`),Sm(e,o),e.lastError=null,!0):!1}function Im(e,t){let n=no(e.configForm??$a(e.configSnapshot),t);if(!n)return!1;let r=n.path[2];return Em(e,e=>{let t=B(e.agents),n=B(t?.entries);n&&(Object.keys(n).length>1&&Kp(e,[`agents`,`ownership`],`explicit`),Kp(e,[`agents`,`defaults`,`systemAgent`,`agentId`],r))}),!0}var Lm;function Rm(){return(Rm=e((()=>{A(),ye(),q(),Qp(),Y(),im(),lm(),fo(),Lm=new WeakMap})))()}function zm(){return++Hm}async function Bm(e,t){let n=zm();if(!e)return!1;if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}return n!==Hm||t&&!t()?!1:Vm(e)}function Vm(e){let t=document.createElement(`textarea`),n=document.activeElement instanceof HTMLElement?document.activeElement:void 0;t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,([...document.openClawModalLayers??[]].findLast(e=>e.isConnected)??document.body).appendChild(t),t.select();try{return document.execCommand(`copy`)}catch{return!1}finally{if(t.remove(),n?.isConnected){let e=t.ownerDocument;window.setTimeout(()=>{let{activeElement:t,body:r}=e;n.isConnected&&(!t||t===r)&&n.focus({preventScroll:!0})},0)}}}var Hm;function Um(){return(Um=e((()=>{Hm=0})))()}function Wm(e,t,n){let r=n===void 0?J(t):fm(t,n),i=t instanceof D&&z(t.details)?t.details:null;return i&&(i.publication===`partial`||i.publication===`complete`)?(i.rollbackStatus!==`restored`&&(typeof i.configPath==`string`&&(r=K(i.rollbackStatus===`not-restored`?`configView.recoveryNotRestored`:`configView.recoveryUnknown`,{path:i.configPath}),typeof i.recoveryBackupPath==`string`&&(r+=`
`+K(`configView.recoveryBackup`,{path:i.recoveryBackupPath}))),e.configRecoveryError=r),{status:`error`,message:r}):r.includes(`config changed since last load`)?{status:`conflict`,message:r}:t instanceof D&&ar(t)&&t.gatewayCode===Nt.INVALID_REQUEST&&i?.publication===void 0&&i?.persistedConfig===void 0&&Array.isArray(i?.issues)&&i.issues.length>0&&i.issues.every(e=>z(e)&&typeof e.path==`string`&&typeof e.message==`string`)?{status:`rejected`,message:r.replace(/^GatewayRequestError: /u,``)}:{status:`error`,message:r}}function Gm(e){if(!(e instanceof D))return!1;let t=z(e.details)?e.details:null;return t&&(t.publication===`partial`||t.publication===`complete`)?t.rollbackStatus===`restored`:e.gatewayCode===Nt.INVALID_REQUEST||e.gatewayCode===Nt.FORBIDDEN}function Km(){return(Km=e((()=>{yr(),kn(),A(),q(),Y(),Rm()})))()}async function qm(e,t,n,r){let i=e.configFormMode===`form`&&e.configFormDirty?um(e.configSnapshot):null,a=e.client,o=Ja(e);await t()&&a&&Za(e,a,o)&&i!==null&&um(e.configSnapshot)===i&&(e.configDraftBaseHash=e.configSnapshot?.hash??e.configDraftBaseHash,n()),r()}async function Jm(e,t,n,r,i,a,o){if(!Za(e,t,n))return{ok:!1,reason:`unavailable`,error:`Connection changed before the configuration update started.`};if(i.canDispatch&&!i.canDispatch())return{ok:!1,reason:`unavailable`,error:i.dispatchError??`Access changed before the configuration update started.`};let s={operation:`independent`,raw:e.configFormDirty?e.configRawOriginal:_m(e),form:e.configFormOriginal,independentSnapshot:e.configSnapshot},c;try{c=await r(t)}catch(r){if(!Za(e,t,n))return{ok:!1,reason:`unavailable`,error:`Connection changed before the configuration update completed.`};let i=Wm(e,r);return{ok:!1,reason:i.status===`conflict`?`conflict`:Gm(r)?`rejected`:`error`,error:i.message}}let l=e=>({ok:!0,value:c,refresh:{ok:!1,error:e}});try{let r=i.configWriteAck?.(c);if(r&&r.noop!==!0&&(o?.({...s,ack:r}),Za(e,t,n)&&xm(e,s,r)),!Za(e,t,n))return l(`Connection changed before the configuration update was refreshed.`);if(r?.noop!==!0&&i.shouldRefresh&&!i.shouldRefresh(c))return{ok:!0,value:c,refresh:{ok:!0}};let u=await a();if(!Za(e,t,n))return l(`Connection changed before the configuration update was refreshed.`);if(!u.ok)return l(u.error);if(r?.noop===!0){let t=e.configSnapshot,n=$a(t);if(!n||!t?.hash)throw Error(`Config hash missing; refresh and retry.`);xm(e,{raw:e.configRawOriginal,form:e.configFormOriginal,independentSnapshot:t},{config:n,hash:t.hash},{raw:t.raw})}return{ok:!0,value:c,refresh:{ok:!0}}}catch(e){return l(J(e))}}function Ym(e,t={},n=()=>!0){let r=e.client;if(!r||!e.connected)return null;let i=Ga(e,r);return Qm(e,i,t,n).then(i.completion.resolve),i}function Xm(e,t={},n=()=>!0){let r=Ym(e,t,n);return r?r.completion.promise.then(e=>e.ok):Promise.resolve(!1)}async function Zm(e,t={}){let n=Ym(e,t);if(!n)return xn(`Configuration is unavailable; reconnect and try again.`);let{client:r,connectionEpoch:i}=n;for(;;){let t=await Promise.race([n.completion.promise,n.invalidated.promise]);if(!Za(e,r,i))return xn(`Connection changed before the configuration update was refreshed.`);let a=Wa(e);if(!a)return xn(`The configuration refresh was superseded by a configuration write.`);if(a===n)return t;n=a}}async function Qm(e,{client:t,connectionEpoch:n,version:r},i,a){let o=()=>a()&&Qa(e,`config`,r,t,n);i.background||(e.configLoading=!0),!i.draftWrites?.hasUnacknowledgedDraftWrite()&&e.configAutoSaveStatus!==`conflict`&&e.configAutoSaveStatus!==`rejected`&&(!i.background||e.configAutoSaveStatus!==`error`)&&(e.lastError=null,e.chatError=null);try{let n=await t.request(`config.get`,{});if(!o())return xn(`The configuration refresh was superseded.`);if(e.configValid=typeof n.valid==`boolean`?n.valid:null,e.configIssues=Array.isArray(n.issues)?n.issues:[],n.writeError){let t=Wm(e,new D(n.writeError));return e.lastError=t.message,e.configAutoSaveStatus=`error`,xn(t.message)}return e.configRecoveryError!==null&&(!n.exists||!n.valid)?xn(e.configRecoveryError):(i.beforeApplySnapshot?.(),o()?(i.draftWrites?i.draftWrites.applySnapshot(n,i):mm(e,n,i),!i.background&&!e.configFormDirty&&!i.draftWrites?.hasUnacknowledgedDraftWrite()&&((e.configAutoSaveStatus===`error`||e.configAutoSaveStatus===`conflict`||e.configAutoSaveStatus===`rejected`)&&(e.configAutoSaveStatus=`idle`),e.lastError=null),nr(void 0)):xn(`The configuration refresh was superseded.`))}catch(t){if(!o())return xn(`The configuration refresh was superseded.`);let n=Wm(e,t);return e.lastError=n.message,(e.configAutoSaveStatus===`rejected`||i.draftWrites?.hasUnacknowledgedDraftWrite())&&(e.configAutoSaveStatus=`error`),xn(n.message)}finally{Qa(e,`config`,r,t,n)&&(e.configLoading=!1)}}async function $m(e){let t=e.client;if(!t||!e.connected||e.configSchemaLoading)return;let n=Ja(e),r=Ka(e,`schema`);e.configSchemaLoading=!0;try{let i=await t.request(`config.schema`,{});if(!Qa(e,`schema`,r,t,n))return;e.configSchema=i.schema??null,e.configUiHints=i.uiHints??{},e.configSchemaVersion=i.version??null}catch(i){Qa(e,`schema`,r,t,n)&&(e.lastError=J(i),e.configAutoSaveStatus===`rejected`&&(e.configAutoSaveStatus=`error`))}finally{Qa(e,`schema`,r,t,n)&&(e.configSchemaLoading=!1)}}async function eh(e,t,n,r=()=>!0){let i=e.client,a=()=>t!==`auto`||e.configFormDirty&&e.configFormMode===`form`;if(!i||!e.connected||!a()||e.configRecoveryError!==null)return!1;let o=Ja(e),s=()=>Za(e,i,o),c=t===`auto`?null:t===`apply`?`configApplying`:`configSaving`;c&&(e[c]=!0,e.lastError=null,e.chatError=null);let l=null,u=null;try{if(e.configRawOriginalParsePending&&await e.configRawOriginalParsePending,!s()||!a())return!1;bm(e);let o=_m(e),c={operation:t===`apply`?`apply`:`save`,raw:o,form:vm(e),independentSnapshot:null};l=e.configFormMode===`form`?o:null;let d=e.configDraftBaseHash??e.configSnapshot?.hash;if(!d)return e.lastError=`Config hash missing; reload and retry.`,e.configAutoSaveStatus=`error`,!1;if(!r())return!1;t===`auto`&&(e.configAutoSaveStatus=`saving`,e.lastError=null,e.chatError=null),u={...c,ack:null},n?.(u);let f=await i.request(t===`apply`?`config.apply`:`config.set`,{raw:o,baseHash:d,...t===`apply`?{sessionKey:e.applySessionKey}:{}});return n?.({...c,ack:f}),!s()||(xm(e,c,f),e.configNeedsApply=t!==`apply`,t!==`auto`&&(await Xm(e),!s()))?!1:(t!==`apply`&&e.configAutoSaveStatus!==`conflict`&&(e.configAutoSaveStatus=e.configFormDirty?`idle`:`saved`),!0)}catch(t){if(s()){let r=Wm(e,t,l);u&&e.configRecoveryError===null&&Gm(t)&&n?.({...u,rejected:!0}),e.lastError=r.message,e.configAutoSaveStatus=r.status}return!1}finally{c&&s()&&(e[c]=!1)}}function th(e,t,n,r,i){if(xm(e,n,r),!i()||!e.configFormDirty)return;try{bm(e)}catch(t){let n=Wm(e,t);e.lastError=n.message,e.configAutoSaveStatus=n.status;return}let a={raw:_m(e),form:vm(e),independentSnapshot:null};t.request(`config.set`,{raw:a.raw,baseHash:r.hash}).then(t=>xm(e,a,t)).catch(()=>void 0)}async function nh(e,t,n){let r=e.client,i=e.configSnapshot;if(!r||!e.connected||!i)return!1;let a=Ja(e),o=i.hash,s=$a(i);if(!o||!s)return e.lastError=`Config hash missing; refresh and retry.`,e.configAutoSaveStatus=`conflict`,!1;if(t.canDispatch&&!t.canDispatch())return!1;let c=e.configFormDirty?e.configAutoSaveStatus:`idle`,l={operation:`independent`,raw:e.configRawOriginal,form:e.configFormOriginal,independentSnapshot:i};e.configAutoSaveStatus=`saving`,e.lastError=null,e.chatError=null;try{let u=await r.request(`config.patch`,{baseHash:o,raw:typeof t.raw==`string`?t.raw:JSON.stringify(t.raw),sessionKey:e.applySessionKey,note:t.note,...t.replacePaths?.length?{replacePaths:t.replacePaths}:{}}),d={config:u.noop===!0?s:u.config,hash:u.noop===!0?o:u.hash};if(n?.({...l,ack:d}),!Za(e,r,a))return!1;let f=xm(e,l,d,{raw:u.noop===!0?i.raw:void 0});return u.noop!==!0&&(e.configNeedsApply=!0),e.configAutoSaveStatus=f===`conflict`?`conflict`:e.configFormDirty&&c===`paused`?`paused`:e.configFormDirty?`idle`:`saved`,!0}catch(t){if(Za(e,r,a)){if(t instanceof D&&ar(t)&&t.gatewayCode===Nt.UNAVAILABLE&&z(t.details)&&t.details.publication!==`partial`&&t.details.publication!==`complete`&&ym(t.details.persistedConfig)){n?.({...l,ack:t.details.persistedConfig});let r=xm(e,l,t.details.persistedConfig);if(e.configNeedsApply=!0,r===`conflict`)return!1}let r=Wm(e,t);e.lastError=r.message,e.configAutoSaveStatus=r.status}return!1}}async function rh(e,t){let n=e.client;if(!n||!e.connected)return null;let r=Ja(e);try{let i=await n.request(`config.schema.lookup`,{path:t});return Za(e,n,r)?i:null}catch(t){if(!Za(e,n,r))return null;throw t}}async function ih(e){let t=e.client;if(!t||!e.connected)return;let n=Ja(e),r=()=>Za(e,t,n);e.configAutoSaveStatus!==`rejected`&&(e.lastError=null),e.chatError=null;let i=async(t,n)=>{if(!r())return;let i=t;n&&(i+=await Bm(n)?`\n\nFile path copied to clipboard: ${n}`:`\n\nFile path: ${n}`),r()&&(e.lastError=yi(i),e.configAutoSaveStatus===`rejected`&&(e.configAutoSaveStatus=`error`),Ci({message:e.lastError}))};try{let n=await t.request(`config.openFile`,{});if(!r())return;if(!n.ok){await i(yi(n.error,`Failed to open config file`),n.path||e.configSnapshot?.path);return}Ci({message:K(`configView.fileOpenedOnGateway`)})}catch(t){await i(J(t),e.configSnapshot?.path)}}function ah(){return(ah=e((()=>{yr(),kn(),A(),q(),Um(),Y(),Oi(),Rm(),Km(),fo()})))()}function oh(e){let{state:t}=e,n=async()=>{let t=e.holdAutoSave();try{e.hasInFlightWrite()&&await e.drainPendingWrites()}finally{t(!1)}e.clearPatches()};return async r=>{if(e.invalidateFieldDiscards(),await n(),t.connected&&t.client){e.cancelAppliedRefresh();try{await e.run(()=>Xm(t,{discardPendingChanges:!0}),`config`)&&e.clearDraftConnection()}finally{e.reconcileAppliedRefresh()}return}r?.reloadOnly||t.configRecoveryError!==null||(e.mutate(()=>{Nm(t),t.configAutoSaveStatus!==`conflict`&&(t.configAutoSaveStatus=`idle`,t.lastError=null)}),e.clearDraftConnection())}}function sh(){return(sh=e((()=>{Rm(),ah()})))()}function ch(e){let{state:t}=e,n=new Set;return{invalidate:e=>{for(let t of n)(!e||e.slice(0,Math.min(e.length,t.path.length)).every((e,n)=>e===t.path[n]))&&(t.current=!1)},discard:async r=>{let i=t.client,a=Ja(t);if(!i||!t.connected||t.configFormMode!==`form`)return!1;let o={path:[...r],current:!0};n.add(o);let s=e.holdAutoSave(),c=!1,l=()=>o.current&&!e.isDisposed()&&Za(t,i,a);try{return c=await e.serialize(async()=>!l()||!await e.readSnapshot()||!l()||t.configRecoveryError!==null?!1:e.hasUnacknowledgedDraftWrite()?(t.lastError=K(`configView.discardUnconfirmed`),t.configAutoSaveStatus=`error`,!1):Fm(t,o.path)),c}finally{n.delete(o),e.reconcileDraft(),s(c),e.publish()}}}}function lh(){return(lh=e((()=>{q(),Rm(),fo()})))()}function uh(e){let{state:t}=e,n=null,r=r=>(e.cancelAppliedRefresh(),e.dispatch(async i=>{e.cancelAppliedRefresh();let a=t.client,o=Ja(t);try{let s=r();if(`error`in s)return t.lastError=s.error,t.configAutoSaveStatus=`error`,n=r,!1;if(!a||!t.configSnapshot||s.options.canDispatch?.()===!1)return!1;let c=await nh(t,s.options,i);return Za(t,a,o)&&(n=c?null:r,c&&e.reconcileDraft()),c}finally{e.reconcileAppliedRefresh()}}).finally(e.scheduleAutoSave));return{queue:r,retry:e=>n?r(n):e(),clear:()=>{n=null}}}function dh(){return(dh=e((()=>{ah(),fo()})))()}function fh({state:e,getFlight:t,invalidateConfigLoad:n,refreshConnectionState:r,refreshSnapshot:i,isDisposed:a,pauseAutoSaveDraftConnection:o,clearAutoSaveDraftConnection:s,publish:c,reconcileAppliedRefresh:l}){let u=null,d=!1,f=null,p=()=>{d=!1,f=null},m=()=>{let e=u??f;return e&&!e.ack&&!e.rejected&&e.operation!==`independent`?e:null},h=()=>m()!==null,g=(e,t)=>t!==null&&(e.gatewayUrl===t.gatewayUrl||tr(e.gatewayUrl)===tr(t.gatewayUrl)),_=()=>{let t=m();return!t||g(t,e.client)?!0:e.client?(e.configAutoSaveStatus=`error`,e.lastError=K(`configView.writeGatewayChanged`),!1):!1},v=(n,r={})=>{let i=m();if(mm(e,n,{...r,preservePendingChanges:i!==null||r.preservePendingChanges===!0}),r.discardPendingChanges){u=null,p();return}let a=$a(n),o=n.configRevisionHash??n.hash,s=i?.form&&i.raw===e.configRawOriginal?um(n):n.raw;if(i&&g(i,e.client)&&t()?.submission!==i&&s===i.raw&&n.hash&&a){let t={config:a,hash:n.hash},r=i.operation===`save`||!!o&&n.appliedConfigHash===o,s=e.configAutoSaveStatus,c=e.lastError;xm(e,i,t,{raw:n.raw}),r&&(u={...i,ack:t},p()),(!r||e.configFormDirty)&&e.configAutoSaveStatus!==`conflict`?(e.configAutoSaveStatus=s===`conflict`?`error`:s,e.lastError=c):r&&!e.configFormDirty&&(e.lastError=null)}};return{applySnapshot:v,canWriteDraft:_,unacknowledgedDraftWrite:m,hasUnacknowledgedDraftWrite:h,get latestSubmission(){return u??f},get interrupted(){return d},createFlight(){let r=m(),i={promise:Promise.resolve(),submission:null,snapshotAtDispatch:e.configSnapshot},o=e.client,s=Ja(e);return{flight:i,onSubmitted:c=>{if(!o)return;let l={...c,gatewayUrl:o.gatewayUrl};!c.ack&&!c.rejected&&(i.snapshotAtDispatch=e.configSnapshot),i.submission=l,!a()&&Za(e,o,s)&&(u=c.rejected&&r?r:l,c.ack&&p()),c.ack&&!a()&&t()===i&&n()}}},reconcileSettledFlight(t,n,r){n&&e.configSnapshot&&e.configSnapshot!==t.snapshotAtDispatch&&v(e.configSnapshot),r?.(),t.submission?.rejected&&!h()&&!e.configFormDirty&&e.configSnapshot?(mm(e,e.configSnapshot),t.submission.operation===`save`&&(Cm(e),c())):t.submission?.rejected&&h()&&(e.configAutoSaveStatus===`rejected`&&(e.configAutoSaveStatus=`error`,e.lastError=K(`configView.writeUnconfirmed`)),i())},flushDisposedFlight(t,n,r){n.promise.then(()=>{let i=n.submission,a=i?.ack??null;a&&i&&g(i,t)&&th(e,t,i,a,r)})},retireConnection(){u=null},interrupt(e){d=!0,f=e?.ack?null:e},refreshInterrupted(){let t=f,n=t?.raw??null;t&&!t.ack&&!t.rejected&&(u=t);let i=()=>({form:structuredClone(e.configForm??{}),raw:e.configRaw,mode:e.configFormMode,originalRaw:e.configRawOriginal,dirty:e.configFormDirty,submittedRaw:e.configFormDirty?_m(e):e.configRaw}),d=null;r(()=>{d=i()},n!==null).then(r=>{if(!a()){if(!r||!e.connected){l();return}if(!_()){c(),l();return}if(p(),n!==null&&e.configSnapshot?.raw!==n){let t=e.configSnapshot?.raw,n=d&&t===d.originalRaw;d&&n&&!d.dirty&&Nm(e);let r=typeof t==`string`&&!n;r&&(e.configFormDirty=!0),e.configAutoSaveStatus=r?`conflict`:`error`,e.lastError=r?`config changed since last load; re-run config.get and retry`:K(`configView.writeUnconfirmed`),c(),l();return}if(t?.operation===`apply`&&m()===t){e.configAutoSaveStatus=`error`,e.lastError??=K(`configView.writeUnconfirmed`),c(),l();return}if(n!==null&&e.configSnapshot?.raw===n){e.configSnapshot.appliedConfigHash===void 0&&(e.configNeedsApply=!0);let t=e.configFormDirty?i():d;t&&t.submittedRaw!==n?(Mm(e),e.configForm=t.form,e.configRaw=t.raw,e.configFormMode=t.mode,e.configFormDirty=!0,o()):(Nm(e),e.configAutoSaveStatus=`idle`,s())}c(),l()}})},clear(){u=null,p()}}}function ph(){return(ph=e((()=>{q(),Rm(),ah(),fo()})))()}function mh({state:e,gateway:t,publish:n,run:r,mutate:i,resetLoads:a,resetConfigLoad:o,refreshConnectionState:s,canCallConfigMethod:c,cancelAppliedRefresh:l,reconcileAppliedRefresh:u,disposeAppliedRefresh:d,isDisposed:f}){let p=null,m=null,h=!1,g=null,_=!1,v=0,y=an(),b=!1,x,S=null,C=t=>{let r=c(t);return!r&&e.connected&&(e.lastError=K(`configView.adminRequired`),e.configAutoSaveStatus===`rejected`&&(e.configAutoSaveStatus=`error`),n()),r&&t!==`config.patch`&&!k.canWriteDraft()?(n(),!1):r},w=()=>{g=null,_=!1,e.configAutoSaveStatus===`paused`&&(e.configAutoSaveStatus=`idle`)},T=()=>{_=!0,e.configFormMode===`form`&&e.configAutoSaveStatus!==`conflict`&&(e.configAutoSaveStatus=`paused`)},E=()=>{if(_){T();return}!g&&e.client&&e.connected&&e.configFormDirty&&e.configFormMode===`form`&&(g={client:e.client,epoch:Ja(e)})},D=()=>{e.client&&e.connected&&e.configFormMode===`form`&&(g={client:e.client,epoch:Ja(e)},_=!1,e.configAutoSaveStatus===`paused`&&(e.configAutoSaveStatus=`idle`))},O=()=>e.configAutoSaveStatus!==`conflict`&&e.configRecoveryError===null&&k.canWriteDraft()&&!_&&g!==null&&g.client===e.client&&g.epoch===Ja(e),k=fh({state:e,getFlight:()=>m,invalidateConfigLoad:()=>M(),refreshConnectionState:s,refreshSnapshot:()=>r(()=>Xm(e,{background:!0,draftWrites:me}),`config`),isDisposed:f,pauseAutoSaveDraftConnection:T,clearAutoSaveDraftConnection:w,publish:n,reconcileAppliedRefresh:u}),{applySnapshot:ee,unacknowledgedDraftWrite:A,hasUnacknowledgedDraftWrite:j}=k,te=()=>{e.configFormDirty?E():m===null&&w()},ne=()=>{p&&=(clearTimeout(p),null),h=!1},M=()=>{o(),Ka(e,`config`),e.configLoading=!1},N=(t,n=!1)=>{let{flight:r,onSubmitted:i}=k.createFlight(),a=t(i);return r.promise=a.catch(()=>!1).then(t=>{if(m!==r)return;let i=!t&&j();i&&ne(),m=null,k.reconcileSettledFlight(r,i,n?te:void 0);let a=h||n&&t&&e.configFormDirty&&e.configFormMode===`form`&&p===null;h=!1,a&&!f()?re():u()}),m=r,a},re=()=>{if(!(f()||v||b||!O()||!c(`config.set`))){if(m){h=!0;return}l(),N(t=>r(()=>eh(e,`auto`,t,()=>C(`config.set`)?(de.clear(),!0):!1)),!0).catch(()=>void 0)}},ie=()=>{p&&(clearTimeout(p),p=null,re())},ae=()=>{!f()&&!b&&O()&&c(`config.set`)&&e.configFormDirty&&e.configFormMode===`form`&&(l(),p&&clearTimeout(p),p=setTimeout(()=>{p=null,re()},hh))},oe=async(e=!1)=>{for(;;){e&&ie();let t=m;if(!t||(await Promise.race([t.promise,y.promise]),f()))return;e||ne()}},se=()=>(v++,ne(),e=>{v--,e&&ae()}),ce=null,le=(t,n,i={})=>{if(b&&!x)return Promise.resolve(n());let a=e.client,o=Ja(e);i.flushScheduledDraft?ie():ne();let s=()=>r(async()=>{b&&x&&!f()&&(await x(),b||(i.flushScheduledDraft?ie():ne())),m&&await oe(i.flushScheduledDraft);let r=k.interrupted&&i.flushScheduledDraft?Wa(e):null;r&&await Promise.race([r.completion.promise,r.invalidated.promise]);let s=a&&Za(e,a,o);return b||f()||!s?n():e.configRecoveryError!==null||i.canDispatch?.()===!1?n(e.configRecoveryError??void 0):i.flushScheduledDraft&&j()?(e.lastError=K(`configView.writeUnconfirmed`),e.configAutoSaveStatus=`error`,n(e.lastError)):await N(t)}),c=ce?ce.then(s):s(),l=c.catch(()=>!1).then(()=>{ce===l&&(ce=null)});return ce=l,c},ue=ch({state:e,serialize:e=>le(e,()=>!1),readSnapshot:()=>r(()=>Xm(e,{draftWrites:me}),`config`),hasUnacknowledgedDraftWrite:j,holdAutoSave:se,isDisposed:f,publish:n,reconcileDraft:te}),P=t.subscribe(t=>{let r=e.client!==t.client,i=e.connected!==(t.phase===`connected`);if(e.client=t.client,e.connected=t.phase===`connected`,e.applySessionKey=t.sessionKey,r||i){let t=A();ue.invalidate(),k.retireConnection(),de.clear();let r=e.configFormDirty||m!==null||t!==null;a(),ce=null,Xa(e),ne(),l(),r&&T(),(m!==null||t!==null)&&(k.interrupt(m?.submission??t),m=null,h=!1);let i=y;y=an(),i.resolve(),e.configLoading=!1,e.configSchemaLoading=!1,e.configSaving=!1,e.configApplying=!1,e.configAutoSaveStatus===`saving`&&(e.configAutoSaveStatus=`idle`),e.connected&&e.client&&(k.interrupted?k.refreshInterrupted():qm(e,s,n,u))}n()}),de=uh({state:e,reconcileDraft:te,dispatch:e=>le(e,()=>!1,{flushScheduledDraft:!0,canDispatch:()=>C(`config.patch`)}),cancelAppliedRefresh:l,reconcileAppliedRefresh:u,scheduleAutoSave:()=>{j()||ae()}}),fe=(e,t)=>{ue.invalidate(t),i(e),te(),ae()},pe=(t,n)=>n()?le(async r=>{D(),l();try{if(t===`apply`&&e.configFormDirty&&e.configFormMode===`raw`)return e.configAutoSaveStatus=`error`,e.lastError=K(`configView.rawDraftBlocksApply`),!1;let i=await eh(e,t,e=>{t===`save`&&e.ack===null&&de.clear(),r(e)},()=>n()?(t===`apply`&&de.clear(),!0):!1);return te(),i}finally{u()}},()=>!1,{canDispatch:n}):Promise.resolve(!1),me={hasUnacknowledgedDraftWrite:j,applySnapshot:ee,patchForm:(t,n)=>fe(()=>Am(e,t,n),t),removeFormValue:t=>fe(()=>Pm(e,t),t),setRaw:t=>fe(()=>jm(e,t,j())),discardFormValue:ue.discard,discardDraft:oh({state:e,invalidateFieldDiscards:ue.invalidate,hasInFlightWrite:()=>m!==null,holdAutoSave:se,drainPendingWrites:oe,clearPatches:de.clear,run:r,mutate:i,clearDraftConnection:()=>{k.clear(),w()},cancelAppliedRefresh:l,reconcileAppliedRefresh:u}),setWritesSuspended:(e,t)=>{if(x=t,b!==e){if(b=e,e)ne(),S=an();else{let e=S;S=null,e?.resolve(),j()||ae()}}},waitForPendingWrites:()=>oe(!0),flushFormChanges:async()=>{let t=e.client,n=Ja(e);return!t||!c(`config.set`)||e.configFormMode!==`form`?!1:(await oe(!0),!f()&&Za(e,t,n)&&!e.configFormDirty&&e.configRecoveryError===null&&(e.configAutoSaveStatus===`saved`||e.configAutoSaveStatus===`idle`))},save:(e={})=>pe(`save`,()=>C(`config.set`)&&(e.canDispatch?.()??!0)),retry:()=>de.retry(()=>k.latestSubmission?.operation===`apply`?me.apply():me.save()),apply:()=>pe(`apply`,()=>C(`config.apply`)),stageDefaultAgent:t=>{if(!C(`config.set`))return!1;ue.invalidate([`agents`]);let r=Im(e,t);return n(),te(),ae(),r},patch:e=>C(`config.patch`)&&(e.canDispatch?.()??!0)?de.queue(()=>({options:e})):Promise.resolve(!1),patchFromSnapshot:t=>C(`config.patch`)?de.queue(()=>{let n=$a(e.configSnapshot);return n?t(n):{error:`Configuration is unavailable; refresh and try again.`}}):Promise.resolve(!1),runExternalMutation:async(t,n={})=>{let i=e.client,a=Ja(e);for(;;){if(n.waitForWritesResumed&&b&&!f()&&(await x?.(),b&&!f()&&await S?.promise),!i||!Za(e,i,a))return{ok:!1,reason:`unavailable`,error:`Connection changed before the configuration update started.`};let o=await le(o=>Jm(e,i,a,t,n,()=>r(()=>Zm(e,{draftWrites:me}),`config`),o),e=>({ok:!1,reason:b?`suspended`:`unavailable`,error:e??(b?`Configuration writes are temporarily suspended.`:`Configuration is unavailable; reconnect and try again.`)}),{flushScheduledDraft:!0});if(!n.waitForWritesResumed||f()||o.ok||o.reason!==`suspended`&&!b)return o}},dispose(){ue.invalidate(),de.clear(),S?.resolve(),S=null,y.resolve();let t=e.client,n=e.connected&&t!==null&&!b&&c(`config.set`),r=m;ne(),d(),t&&r?k.flushDisposedFlight(t,r,()=>n&&!_&&c(`config.set`)):n&&!j()&&O()&&e.configFormDirty&&e.configFormMode===`form`&&eh(e,`auto`,void 0,()=>c(`config.set`)),Xa(e),e.connected=!1,e.configLoading=!1,e.configSchemaLoading=!1,e.configSaving=!1,e.configApplying=!1,P(),k.clear()}};return me}var hh;function gh(){return(gh=e((()=>{St(),q(),sh(),Rm(),lh(),ah(),dh(),fo(),ph(),hh=800})))()}function _h(e){let t=Ha(e.snapshot),n=f(()=>!t.configFormDirty&&!t.configSaving&&!t.configApplying&&!p.hasUnacknowledgedDraftWrite(),()=>Ci({message:K(`configView.reloadBlocked`)})),r=new Set,i=new Map,a=!1,o=(t,n)=>Ye({client:e.snapshot.client,hello:e.snapshot.hello??null,phase:e.snapshot.phase},t,t===`config.schema`?`operator.read`:`operator.admin`,n),s=()=>{if(!a)for(let e of r)e(t)},c=async(e,t)=>{let n;try{return n=e(),t&&i.set(t,n),s(),await n}finally{try{s()}finally{t&&i.get(t)===n&&i.delete(t)}}},l=e=>{e(),s()},u=async(e,t)=>{await(i.get(e)??c(t,e))},d=Yf({shouldRefresh:()=>!a&&t.connected&&t.configNeedsApply&&t.configSnapshot?.appliedConfigHash!==void 0,refresh:e=>u(`config`,()=>Xm(t,{background:!0,draftWrites:p},e))}),p=mh({state:t,gateway:e,publish:s,run:c,mutate:l,resetLoads:()=>{i.clear()},resetConfigLoad:()=>{i.delete(`config`)},refreshConnectionState:(e,n=!1)=>{let r=c(()=>Xm(t,{beforeApplySnapshot:e,preservePendingChanges:n,draftWrites:p}),`config`);return t.configSchemaVersion!==null&&h()&&c(()=>$m(t),`schema`),r},canCallConfigMethod:o,cancelAppliedRefresh:d.cancel,reconcileAppliedRefresh:d.reconcile,disposeAppliedRefresh:d.dispose,isDisposed:()=>a}),m=async()=>{t.configSnapshot||await u(`config`,()=>Xm(t,{draftWrites:p})),d.reconcile()},h=()=>{let t=e.snapshot;return!t.client||t.phase!==`connected`||Xe(t,`config.schema`)===!1?!1:Fe(t.hello?.auth??null)};return{get state(){return t},get canSet(){return o(`config.set`)},get canApply(){return o(`config.apply`)},get canPatch(){return o(`config.patch`)},get canOpenFile(){return o(`config.openFile`,{requireAdvertisement:!1})},ensureLoaded:m,ensureSchemaLoaded:()=>t.configSchema||!h()?Promise.resolve():u(`schema`,()=>$m(t)),refresh:async e=>{d.cancel();try{await c(()=>Xm(t,{...e,draftWrites:p}),`config`)}finally{d.reconcile()}},refreshSchema:()=>c(()=>$m(t),`schema`),patchForm:p.patchForm,removeFormValue:p.removeFormValue,setRaw:p.setRaw,discardDraft:p.discardDraft,discardFormValue:p.discardFormValue,setWritesSuspended:p.setWritesSuspended,waitForPendingWrites:p.waitForPendingWrites,flushFormChanges:p.flushFormChanges,save:p.save,retry:p.retry,apply:p.apply,openFile:()=>o(`config.openFile`,{requireAdvertisement:!1})?c(()=>ih(t)):Promise.resolve(),agentEntry:(e,n)=>ro(t,e,n),stageDefaultAgent:p.stageDefaultAgent,patch:p.patch,patchFromSnapshot:p.patchFromSnapshot,runExternalMutation:p.runExternalMutation,lookupSchemaPath:e=>c(()=>rh(t,e)),subscribe(e){return _n(r,e)},dispose(){n(),a=!0,p.dispose(),r.clear(),qa(t),dm(t)}}}function vh(){return(vh=e((()=>{c(),Pe(),q(),Qe(),Oi(),Zf(),Rm(),ah(),fo(),gh()})))()}function yh(e,t){let n=e.state.selectedId,r=e.intentRevision;return e.subscribe(()=>{let i=e.state.selectedId,a=e.intentRevision!==void 0&&e.intentRevision!==r;r=e.intentRevision,n!==i&&(n=i,t(i,a))})}function bh(e){let t=new Map,n=()=>{let t=e.snapshot(),n=ga(t);return(e,r)=>{let i=ba(t,e,r??void 0);return`${i.sessionKey}\0${i.agentId??W(r??n)}`}},r=(e,t)=>n()(e,t),i=(e,t)=>{for(let n of e?.records??[])if(t&&n.sessionId===t)return n;return e?.active},a=e=>t.get(r(e.target.key,e.target.agentId))===e.owner&&e.owner.records.has(e),o=(e,t)=>!e?.sessionId||!t||e.sessionId===t,s=t=>{e.publish({...e.readState(),error:t},`operation`),Ci({message:t})},c=(e,t)=>{if(e&&e.phase!==`rollback`&&(t&&e.sessionId?t===e.sessionId:e.owner.active===e))return e.phase},l=t=>{e.publish({...e.readState(),deletedSessions:t&&t.owner.active===t?[{key:t.target.key,...t.target.agentId?{agentId:t.target.agentId}:{},retireBeforeRevision:Date.now()}]:[]}),e.redecorateLists()},u=n=>{let a=r(n.key,n.agentId),o=t.get(a);o||(o={sessionId:e.publishedRow((e,t)=>r(e.key,e.agentId??t)===a)?.sessionId,revision:e.requestRevision(),records:new Set},t.set(a,o));let s=n.expectedSessionId??o.sessionId,c=i(o,s);if(c&&(o.active===c||c.phase===`pending`)&&(!s||c.sessionId===s))return c;let l={target:n,sessionId:s,owner:o,phase:`pending`,rows:new WeakMap};return(!s||!o.sessionId||s===o.sessionId)&&(o.active=l,o.sessionId=s,o.revision=e.requestRevision()),o.records.add(l),l},d=t=>{a(t)&&t.phase!==`confirmed`&&(t.phase=`rollback`,e.redecorateLists(),t.owner.records.delete(t),t.owner.active===t&&(t.owner.active=void 0),l(),e.invalidateLists())},f=(t,n)=>{t.phase!==`confirmed`&&(t.phase=`confirmed`,t.sessionId||(t.owner.revision=e.requestRevision()),t.rows=new WeakMap,t.owner.active===t&&e.retire(n),l(t))},p=(e,t)=>{if(e.operation)return e.operation;let{target:n}=e;return e.operation=(async()=>{try{let r=await yu(t.client,n.key,n);return a(e)?!r.deleted&&e.phase!==`confirmed`?(d(e),{deleted:!1}):(f(e,n.key),{deleted:!0,...r.worktreePreserved?{worktreePreserved:r.worktreePreserved}:{}}):{deleted:!1}}catch(t){if(!a(e))return{deleted:!1};d(e);let n=J(t);throw s(n),t}})(),e.operation},m=async t=>{let n=e.connection.capture(),r={deleted:[],errors:[],preservedWorktrees:[]};if(!n||t.length===0)return r;let i=new Map;for(let e of t){let t=u(e),n=i.get(t)??new Map;n.set(e.key,e),i.set(t,n)}l();for(let[o,c]of i){if(!e.connection.isCurrent(n)&&!o.operation){let e=[...i.keys()].filter(e=>!e.operation&&a(e));if(e.length>0){let n=Error(K(`sessionsView.deleteSessionsStale`,{count:String(t.length)}));for(let t of e){d(t);for(let e of i.get(t).values())r.errors.push({target:e,error:n})}s(n.message)}break}try{let e=await p(o,n);e.deleted&&(r.deleted.push(...c.keys()),e.worktreePreserved&&r.preservedWorktrees.push(e.worktreePreserved))}catch(e){for(let t of c.values())r.errors.push({target:t,error:e})}}return r.deleted.length>0&&(e.connection.isCurrent(n)&&await e.reconcileMutation(t.length===1?t[0]?.agentId:void 0),!e.connection.isCurrent(n)&&!await e.reconcilePreviousConnection(n))?{deleted:[],errors:[],preservedWorktrees:[]}:r};return{acceptsGeneration:(e,n,i)=>o(t.get(r(e,i)),n),deletionState:(e,n,a)=>c(i(t.get(r(e,n)),a),a),deleteMany:m,async delete(e,t={}){let n=await m([{key:e,...t}]);if(n.errors.length>0)throw n.errors[0].error;return{deleted:n.deleted.includes(e),...n.preservedWorktrees[0]?{worktreePreserved:n.preservedWorktrees[0]}:{}}},apply(e,r){if(!e||t.size===0)return e;let a=n(),s=e.sessions;for(let[n,i]of t)for(let t of i.records){let o=t.rows.get(r);t.phase===`rollback`&&i.active===t&&o&&!s.some(e=>a(e.key,e.agentId??r.scope.agentId)===n)&&(s===e.sessions&&(s=s.slice()),s.splice(o.index,0,o.row))}let l=s.filter((e,n)=>{let s=e.agentId??r.scope.agentId,l=t.get(a(e.key,s));if(!o(l,e.sessionId))return!1;let u=i(l,e.sessionId);return!c(u,e.sessionId)||(u?.phase===`pending`&&u.rows.set(r,{row:e,index:n}),!1)});return l.length===e.sessions.length&&l.every((t,n)=>t===e.sessions[n])?e:{...e,count:l.length,sessions:l}},reconcileList(e,r,a){if(!e)return e;let o=n(),s=e.sessions.filter(e=>{let n=o(e.key,e.agentId??a),s=t.get(n);if(!s)s={revision:r,sessionId:e.sessionId,records:new Set},t.set(n,s);else if(e.sessionId&&e.sessionId!==s.sessionId){if(r<=s.revision||i(s,e.sessionId)?.sessionId===e.sessionId)return!1;if(s.active?.phase===`pending`&&!s.active.sessionId)return!0;s.sessionId=e.sessionId,s.active=void 0}return s.revision=Math.max(s.revision,r),!0});return s.length===e.sessions.length?e:{...e,sessions:s,count:s.length}},observe(n){let{key:a,agentId:o,reason:s,sessionId:c}=n;if(s===`delete`){if(!c){e.invalidateLists();return}let t=u({key:a,expectedSessionId:c,...o?{agentId:o}:{}});f(t,a)}else if(s===`create`||s===`new`){let e=i(t.get(r(a,o)));e?.phase===`confirmed`&&(e.owner.active=void 0,l())}},clear:()=>t.clear()}}function xh(){return(xh=e((()=>{q(),Y(),Oi(),Q(),Su()})))()}function Sh(e){let t=0,n=null,r=null,i=null,a=()=>{i!==null&&(globalThis.clearTimeout(i),i=null)},o=(n,r)=>t===r&&e.isCurrent(n),s=c=>{if(n?.client===c.client&&n.epoch===c.epoch)return Promise.resolve();if(r?.generation===t)return r.promise;a();let l=t,u=(async()=>{try{let t=await c.client.request(`sessions.subscribe`,{},{timeoutMs:Ft});if(!o(c,l))return;if(t?.subscribed!==!0)throw new D({code:`UNAVAILABLE`,message:`Gateway did not activate the session event subscription`,retryable:!0});n=c,e.onError(c,null)}catch(t){if(!o(c,l))return;let n=t instanceof ut?new D({code:t.code,message:t.message,retryable:!0}):t;e.onError(c,ac(n)?null:J(n));let r=e.retryDelayMs(n);if(r===null||!o(c,l))return;i=globalThis.setTimeout(()=>{i=null,o(c,l)&&s(c)},r)}})().finally(()=>{r?.promise===u&&(r=null)});return r={generation:l,promise:u},u},c=()=>{t+=1,n=null,r=null,a()};return{ensure:s,reset:c,dispose:c}}function Ch(){return(Ch=e((()=>{mn(),kn(),A(),Y(),uc()})))()}function wh(e){return{key:e.key,agentId:e.agentId,kind:e.kind,updatedAt:e.updatedAt,sessionId:e.sessionId,sharingRole:e.sharingRole,visibility:e.visibility,archived:e.archived,worktree:e.worktree?{...e.worktree}:void 0,repositoryWorkspaceId:e.repositoryWorkspaceId,repository:e.repository?{...e.repository}:void 0}}function Th(e){let t=e.repositoryWorkspaceId?[`repository`,e.repositoryWorkspaceId,e.repository?.branch]:[`worktree`,e.worktree?.id,e.worktree?.branch,e.worktree?.repoRoot];return JSON.stringify([e.sessionId,e.sharingRole,e.visibility,e.archived===!0,...t])}function Eh(e){return JSON.stringify([e.selfUser?.identity??null,e.hello?.auth?.role,e.hello?.auth?.scopes,Xe(e,`sessions.github.publish`)])}function Dh(e){let t=new Map,n=(t,n)=>{let r=ba(e.snapshot(),t.key,t.agentId??n??void 0);return`${r.agentId??``}\0${r.sessionKey}`},r=(e,n)=>{t.delete(e),n.controller.reset()},i=(e,n)=>{!n.retained&&!n.controller.hasBindings&&t.get(e)===n&&t.delete(e)},a=e=>{for(let[n,i]of t){let t=e(i.row,n);!i.current()||!t||Th(t)!==Th(i.row)?r(n,i):i.row=wh(t)}},o=e=>({ts:0,path:``,count:1,defaults:{modelProvider:null,model:null,contextTokens:null},sessions:[e]});return{attach(a,o,s){let c=e.connection.capture();if(!c)return null;let l=ba(e.snapshot(),a.key,a.agentId),u=`${l.agentId??``}\0${l.sessionKey}`,d=Eh(e.snapshot()),f=t.get(u);if(f&&(!f.current()||Th(f.row)!==Th(a))&&(r(u,f),f=void 0),!f){let n={row:wh({...a,key:l.sessionKey,agentId:l.agentId}),retained:!1,current:()=>t.get(u)===n&&e.connection.isCurrent(c)&&Eh(e.snapshot())===d&&e.deletionState(n.row)!==`confirmed`,controller:new s({client:c.client,target:l,isCurrent:()=>n.current(),reserve:()=>{if(!n.retained){if([...t.values()].filter(e=>e.retained).length>=Oh)throw Error(K(`githubPublication.capacity`,{newAction:K(`githubPublication.newAction`)}));n.retained=!0}},release:()=>{n.retained=!1,i(u,n)},unbound:()=>i(u,n)})};f=n,t.set(u,f)}let p=f;return Object.assign(p.controller.bind(o),{matches:t=>p.current()&&!e.deletionState(t)&&n(t)===u&&Th(t)===Th(p.row)})},observeRows(e,r){if(t.size===0)return;let i=new Map(e.map(e=>[n(e,r),e]));a((e,t)=>{let n=i.get(t);return n?su(o(e),{...n,key:e.key,agentId:e.agentId},void 0,{archivedFilter:`all`,selectedGlobalAgentId:e.agentId})?.sessions[0]:e})},observeEvent(e){if(t.size===0)return;let r=ql(e);if(!r||va(r.key)&&!r.agentId)return;let i=n({key:r.key,agentId:r.agentId??void 0});if(a((t,n)=>n===i?ou(o(t),e,{archivedFilter:`all`,selectedGlobalAgentId:t.agentId}).result?.sessions[0]:t),B(e)?.reason===`github-publication`){let e=t.get(i);e?.current()&&e.controller.invalidate()}},observePullRequests(e){let n=B(B(e)?.sessions);if(n)for(let e of t.values()){let t=B(n[Sa(e.row.key,e.row.agentId)]);t?.status===`ready`&&Array.isArray(t.pullRequests)&&e.current()&&e.controller.result?.status===`failed`&&e.controller.invalidate()}},invalidate(){for(let e of t.values())e.current()&&e.controller.invalidate()},clear(){for(let[e,n]of t)r(e,n)}}}var Oh;function kh(){return(kh=e((()=>{q(),Qe(),cu(),Q(),Oh=32})))()}function Ah(e){return e.find(e=>e.sharingRole!==`owner`&&e.sharingRole!==`admin`)??e[0]}function jh(e,t){return{allowed:!1,requiredScope:e,cause:t,reason:K(t===`disconnected`?`sessionsView.actionRequiresConnection`:t===`method-unavailable`?`sessionsView.actionUnavailable`:t===`session-not-owned`?`sessionsView.actionRequiresOwnership`:`sessionsView.actionRequiresScope`,{scope:e})}}function Mh(e,t){let n=t.requiredScope===`operator.admin`?t.requiredScope:hr(t.method,t.params)??t.requiredScope,r=(t.sessionScope&&n!==`operator.admin`?rn(t.method,t.params):void 0)??n;if(!r)throw Error(`Missing session method scope: ${t.method}`);let i=e?.scopes,a=e?.role??`operator`;if(!Array.isArray(i)||!pr({role:a,requestedScopes:[r],allowedScopes:i}))return jh(r,`missing-scope`);let o=t.method===`sessions.patchMany`&&z(t.params)?t.params.patch:t.method===`sessions.patch`?t.params:void 0;return(z(o)&&typeof o.archived==`boolean`&&!pr({role:a,requestedScopes:[`operator.admin`],allowedScopes:i})||r===`operator.sessions.write`&&!pr({role:a,requestedScopes:[`operator.write`],allowedScopes:i})&&t.method!==`sessions.create`)&&t.session?.sharingRole!==`owner`&&t.session?.sharingRole!==`admin`?jh(r,`session-not-owned`):{allowed:!0,requiredScope:r}}function Nh(e,t){let n=Mh(e?.hello?.auth,t);return e?.phase!==`connected`||!e.client?jh(n.requiredScope,`disconnected`):Xe(e,t.method)===!0?n:jh(n.requiredScope,`method-unavailable`)}function Ph(){return(Ph=e((()=>{gt(),Sn(),q(),Qe()})))()}function Fh(e){let t=e?.groups;return Array.isArray(t)?t.flatMap((e,t)=>{let n=e,r=typeof n?.name==`string`?n.name.trim():``;return r?[{name:r,position:typeof n?.position==`number`&&Number.isSafeInteger(n.position)?n.position:t}]:[]}):[]}function Ih(e,t){let n=t?.defaults,r=new Map;if(Array.isArray(n))for(let e of n){let t=e,n=typeof t?.name==`string`?t.name.trim():``;if(!n)continue;let i=typeof t?.cwd==`string`?t.cwd.trim():``;r.set(n,{...i?{cwd:i}:{},...typeof t?.worktree==`boolean`?{worktree:t.worktree}:{}})}return e.map(({name:e,position:t})=>({name:e,position:t,...r.get(e)}))}function Lh(e){return Rh(e?.sectionOrder)??[]}function Rh(e){if(!Array.isArray(e))return null;let t=[];for(let n of e){if(typeof n!=`string`)continue;let e=n.trim(),r=[`catalog:`,`category:`].find(t=>e.startsWith(t)),i=r?e.slice(r.length).trim():``,a=r?i&&`${r}${i}`:zh.has(e)&&e;a&&!t.includes(a)&&t.push(a)}return t}var zh;function Bh(){return(Bh=e((()=>{zh=new Set([`ungrouped`,`groups`,`work`])})))()}function Vh(){try{let e=JSON.parse(kr()?.getItem(Uh)??`[]`);return ur(e)}catch{return[]}}function Hh(e){let t=-1,n=0,r=0,i=`idle`,a=null,o=null,s=()=>{o!==null&&(clearTimeout(o),o=null)},c=()=>{t=-1,n+=1,r+=1,a=null,s(),i=`loading`,e.publish({...e.readState()})},l=()=>{t=-1,n+=1,a=null,s()},u=(t,n,r)=>{let a=e.readState(),o=t.map(e=>e.name),s=o.length===a.groups.length&&o.every((e,t)=>e===a.groups[t]),c=n.length===a.sectionOrder.length&&n.every((e,t)=>e===a.sectionOrder[t]),l=t.length===a.groupSettings.length&&t.every((e,t)=>{let n=a.groupSettings[t];return n?.name===e.name&&n.position===e.position&&n.cwd===e.cwd&&n.worktree===e.worktree}),u=i!==r;i=r,(!s||!l||!c||u)&&e.publish({...a,groups:[...o],groupSettings:[...t],sectionOrder:[...n]})},d=(r,a,s,c)=>{if(!e.connection.isCurrent(r)||a!==n||(i!==`unavailable`&&(i=`unavailable`,e.publish({...e.readState()})),!c))return null;t=-1;let l=e.retryDelayMs(s);return l!==null&&(o=setTimeout(()=>{o=null,e.connection.isCurrent(r)&&a===n&&p()},l)),null},f=async(t,r,i)=>{try{let i=await t.client.request(Wh,{});if(!e.connection.isCurrent(t)||r!==n)return null;let a=Fh(i),o=Lh(i),s=Vh();if(s.length>0&&Nh(e.snapshot(),{method:`sessions.groups.put`,requiredScope:`operator.write`}).allowed){if(a.length===0){let i=await t.client.request(`sessions.groups.put`,{names:s});if(!e.connection.isCurrent(t)||r!==n)return null;a=Fh(i),o=Lh(i)}try{kr()?.removeItem(Uh)}catch{}}if(!(Xe(e.snapshot(),Gh)===!0&&Nh(e.snapshot(),{method:Gh,requiredScope:`operator.write`}).allowed))return u(a,o,`ready`),a;u(a,o,`loading`);try{let i=await t.client.request(Gh,{});if(!e.connection.isCurrent(t)||r!==n)return null;a=Ih(a,i)}catch(e){return d(t,r,e,!0)}return u(a,o,`ready`),a}catch(e){return d(t,r,e,i===!0)}},p=async()=>{let r=e.connection.capture();if(!r)return null;if(t===r.epoch)return a??e.readState().groupSettings;let o=Xe(e.snapshot(),Wh);s();let c=++n;if(t=r.epoch,i!==`loading`&&(i=`loading`,e.publish({...e.readState()})),o===!1)return u([],[],`ready`),[];let l=f(r,c,o).then(t=>e.connection.isCurrent(r)&&c!==n?p():t).finally(()=>{a===l&&(a=null)});return a=l,l},m=(e,t)=>{c(),u(e,t,`loading`),p()},h=async(t,n,r)=>{let i=e.connection.capture();if(!i)return`stale`;try{let a=await i.client.request(t,n);return e.connection.isCurrent(i)?(r(a),`completed`):`stale`}catch(t){if(!e.connection.isCurrent(i))return`stale`;throw e.publish({...e.readState(),error:J(t)},`operation`),t}},g=(t,n=e.readState().groupSettings)=>{m(Ih(Fh(t),{defaults:n}),Lh(t))};return{delete:t=>h(`sessions.groups.delete`,{name:t},t=>{g(t),e.refreshRows()}),dispose:l,generation:()=>r,invalidate:c,load:p,put:(e,t)=>h(`sessions.groups.put`,{names:[...e],...t===void 0?{}:{sectionOrder:[...t]}},g),rename:(t,n)=>h(`sessions.groups.rename`,{name:t,to:n},r=>{let i=e.readState().groupSettings,a=i.some(e=>e.name===n),o=i.flatMap(e=>e.name===t?a?[]:[{...e,name:n}]:[e]);g(r,o),e.refreshRows()}),status:()=>i,update:(t,n)=>h(`sessions.groups.update`,{name:t,...n},t=>{let n=e.readState();u(Ih(n.groupSettings,t),n.sectionOrder,`ready`)})}}var Uh,Wh,Gh;function Kh(){return(Kh=e((()=>{Bn(),Y(),Qe(),Ph(),Bh(),Uh=`openclaw:sessions:custom-groups`,Wh=`sessions.groups.list`,Gh=`sessions.groups.defaults`})))()}function qh(e=``,t){let n=e.trim(),r=t?.trim(),i=n&&n.toLowerCase()!==`unknown`?n:void 0;return{...r?{agentId:r}:{},...i?{parentSessionKey:i,emitCommandHooks:!0,succeedsParent:!1}:{}}}async function Jh(e,t={}){let n=await e.request(`sessions.create`,t),r=R(n?.key)??``;if(!r)throw Error(`sessions.create returned no key`);let i={status:`idle`};if(n.runStarted){let e=R(n.runId)??``;i={status:`started`,...e?{runId:e}:{}}}else n.runError!==void 0&&(i={status:`rejected`,error:(R(n.runError?.message)??``)||`The session was created, but its first message could not be sent.`,...n.runError?.details===void 0?{}:{errorDetails:n.runError.details}});return{key:r,entry:n.entry,initialRun:i}}function Yh(){return(Yh=e((()=>{})))()}function Xh(e,t,n,r){return{source:{revision:e,updatedAt:t,event:!0,...n===void 0?{}:{readCutoff:n},...r===void 0?{}:{snapshotAt:r}}}}function Zh(e,t){return e.snapshotAt!==void 0&&t.snapshotAt!==void 0&&e.snapshotAt!==t.snapshotAt?e.snapshotAt>t.snapshotAt:(e.event||t.event)&&e.updatedAt!==null&&t.updatedAt!==null&&e.updatedAt!==t.updatedAt?e.updatedAt>t.updatedAt:!e.event&&t.readCutoff!==void 0?e.revision>t.readCutoff:!t.event&&e.readCutoff!==void 0?t.revision<=e.readCutoff:e.revision>t.revision}function Qh(e,t){let n=e?.writer;t.writer&&(!n||Zh(t.writer,n))&&(n=t.writer);let r=e=>!!(e.event&&n&&e!==n&&Zh(n,e)),i=!e||t.source!==e.source&&(r(e.source)||!r(t.source)&&Zh(t.source,e.source)),a=e&&!i?e:t;return a.source.event&&(!n||Zh(a.source,n))&&(n=a.source),{useOffered:i,observation:a.writer===n?a:{source:a.source,writer:n}}}function $h(){let e=new WeakMap,t=new WeakSet,n=(t,n)=>{let r=X(t.key)?.agentId??t.agentId?.trim()??e.get(t)?.agentId??n?.trim();return r?W(r):null},r=(e,t)=>{let r=n(e,t);return!e.sessionId?.trim()||va(e.key)&&!r?null:JSON.stringify([ka(e.key),r,e.sessionId])},i=(t,r)=>e.get(t)??{read:{source:{revision:0,updatedAt:t.updatedAt??null}},agentId:n(t,r),fields:new Map},a=(t,n,i)=>{let a=r(t,i),o=e;return(t,s)=>{let c=e.get(t);return!a||o!==e||!c||r(t,i)!==a?[]:s.filter(e=>!rg.has(e)&&(c.fields.get(e)??c.read).source===n.source)}};return{reset(){e=new WeakMap},owner:n,identity:r,inheritRow:(t,n,a)=>{if(!n||e.has(t))return t;let o=i(n),s=r(n,o.agentId);if(!s||s!==r(t,o.agentId))return t;let c=new Map(o.fields);if(a&&r(a)===s){let e=i(a,o.agentId);for(let r of eg)t[r]!==n[r]&&t[r]===a[r]&&c.set(r,e.fields.get(r)??e.read)}return e.set(t,{...o,fields:c}),t},mergeRow:(n,a,o)=>{let s=n===a?e.get(n):void 0;if(s&&t.has(s))return n;let c=r(n,o);if(!c||c!==r(a,o))return n;let l=s??i(n,o);if(s){let r;for(let[e,t]of l.fields){let n=Qh(t,t).observation;n!==t&&(r??=new Map(l.fields),r.set(e,n))}let i=r?{...l,fields:r}:l;return r&&e.set(n,i),t.add(i),n}let u=i(a,o),d=u.read.source.revision>l.read.source.revision,f=d?a:n,p=d?u:l,m=n,h=a,g=f.key===n.key?f:{...f,key:n.key},_=g,v=g!==f,y,b=new Set([...Object.keys(n),...Object.keys(a),...l.fields.keys(),...u.fields.keys()]);for(let e of b){if(rg.has(e))continue;let t=Qh(l.fields.get(e)??l.read,u.fields.get(e)??u.read),n=t.useOffered?h:m,r=t.observation;r===p.read?p.fields.has(e)&&(y??=new Map(p.fields),y.delete(e)):r!==p.fields.get(e)&&(y??=new Map(p.fields),y.set(e,r)),(_[e]!==n[e]||Object.hasOwn(_,e)!==Object.hasOwn(n,e))&&(v||=(g={...f},_=g,!0),Object.hasOwn(n,e)?_[e]=n[e]:delete _[e])}let x=y?{...p,fields:y}:p;return g===n||Ol(g,n)?(e.set(n,x),n):(e.set(g,x),g)},observeReadRow:(t,n,r,o=[])=>{if((e.get(t)?.read.source.revision??0)>=n)return()=>[];let s=new Map;for(let e of o)for(let[t,n]of i(e,r).fields){let e=n.writer,r=s.get(t);e&&(!r||Zh(e,r))&&s.set(t,e)}let c=new Map;for(let e of t.rowMode===`compact`?ng:tg)t[e]===void 0&&c.set(e,{source:{revision:0,updatedAt:null}});let l=X(t.key)?.agentId??t.agentId?.trim()??r?.trim(),u={source:{revision:n,updatedAt:t.updatedAt??null,snapshotAt:t.snapshotAt}};for(let[e,t]of s){let n=(c.get(e)??u).source;Zh(n,t)&&c.set(e,{source:n,writer:t})}return e.set(t,{read:u,agentId:l?W(l):null,fields:c}),a(t,u,r)},observeFields:(t,n,r,o)=>{let s=i(t,o),c=new Map(s.fields);for(let e of n)rg.has(e)||c.set(e,r);return e.set(t,{...s,fields:c}),a(t,r,o)},fieldNames:e=>[...new Set([...Object.keys(e),...i(e).fields.keys()])],fieldObservation:(e,t)=>{let n=i(e);return n.fields.get(t)??n.read},bindOwner(t,n){e.has(t)||e.set(t,i(t,n))},rowRevision:t=>e.get(t)?.read.source.revision??0,hasObservation:t=>{let n=e.get(t);if(!n)return!1;if(n.read.source.revision>0)return!0;for(let e of n.fields.values())if(e.source.event===!0)return!0;return!1},hasNewerFacts:(t,n)=>{let r=e.get(t);if(!r)return n<0;if(r.read.source.revision>n)return!0;for(let e of r.fields.values())if(e.source.revision>n||e.writer!==void 0&&e.writer.revision>n||e.writer?.readCutoff!==void 0&&e.writer.readCutoff>=n)return!0;return!1}}}var eg,tg,ng,rg;function ig(){return(ig=e((()=>{It(),Q(),Nl(),eg=[`derivedTitle`,`lastMessagePreview`,...Ml],tg=[`derivedTitle`,`lastMessagePreview`,`activitySummary`],ng=[...tg,...Et],rg=new Set([`key`,`sessionId`,`agentId`])})))()}function ag(e,t,n){let r=new Map,i=(e,t,n,i)=>{let a=r.get(e);if(a&&a.sessionId!==n.sessionId&&i.source.revision<=a.observation.source.revision)return!1;let o=a?.sessionId===n.sessionId?a:void 0,s=Qh(o?.observation,i);if(o&&!s.useOffered)return s.observation!==o.observation&&(r.set(e,{...o,observation:s.observation}),!0);let c=o?.archived?o:void 0;return r.set(e,{sessionId:n.sessionId,archived:t,observation:s.observation,...t?{archivedAt:n.archivedAt??c?.archivedAt,archivedBy:n.archivedBy??c?.archivedBy,archiveReason:n.archiveReason??c?.archiveReason}:{}}),!0},a=new Map,o=e=>{r.delete(e.trim()),a.delete(e.trim())},s=e=>{if(!r.get(e.key)||!e.sessionId)return e;i(e.key,e.archived===!0,{...e,sessionId:e.sessionId},n.fieldObservation(e,`archived`));let t=r.get(e.key);if(!t||t.sessionId!==e.sessionId)return e;let a=og(t.archived);t.archived&&(t.archivedAt!==void 0&&(a.archivedAt=t.archivedAt),t.archivedBy!==void 0&&(a.archivedBy=t.archivedBy),t.archiveReason!==void 0&&(a.archiveReason=t.archiveReason));let o=Object.entries(a),s=e;if(o.every(([r,i])=>{let a=n.fieldObservation(e,r);return s[r]===i&&Object.hasOwn(s,r)===(i!==void 0)&&Qh(a,t.observation).observation===a}))return n.mergeRow(e,e);let c=n.inheritRow({...e,...a},e);for(let[e,t]of o)t===void 0&&Reflect.deleteProperty(c,e);return n.observeFields(c,Object.keys(a),t.observation),n.mergeRow(e,c)};return{clear:o,confirm:(t,n,a,o)=>{let s=t.trim(),c=r.get(s),l=e(s);return l?.sessionId&&l.sessionId!==a.sessionId||c&&c.sessionId!==a.sessionId&&l?.sessionId!==a.sessionId?!1:i(s,n,a,o)},clearAll:()=>{r.clear(),a.clear()},observe:(e,t,r)=>{let o=e.trim();o&&t!==null&&r?.sessionId&&(t&&a.get(o)?.sessionId===r.sessionId&&a.delete(o),i(o,t,{...r,sessionId:r.sessionId},n.fieldObservation(r,`archived`)))},applyRow:s,apply:e=>!e||r.size===0?e:eu(e,e.sessions.map(s)),visibility:t=>{let n=t.trim(),i=a.get(n),o=r.get(n);if(!i&&!o?.archived)return;let s=e(n);if(i&&(!s||s.sessionId===i.sessionId))return`pending`;if(o?.archived)return s&&o.sessionId!==s.sessionId?void 0:`archived`},beginPending:(e,n)=>{let r=e.trim(),i=a.get(r);if(!r||i&&i.sessionId===n)return null;let o=Symbol(`session-archive`);return a.set(r,{sessionId:n,token:o}),t(),()=>{a.get(r)?.token===o&&(a.delete(r),t())}}}}var og;function sg(){return(sg=e((()=>{cu(),ig(),og=(e,t)=>e?{archived:!0,pinned:!1,pinnedAt:void 0,...t?{archivedAt:t.archivedAt,archivedBy:t.archivedBy,archiveReason:t.archiveReason}:{}}:{archived:!1,archivedAt:void 0,archivedBy:void 0,archiveReason:void 0}})))()}function cg(e){let t=new Map,n=new Set,r=(r,i,a=!1)=>{let o=r.trim();if(!o)return;a?n.add(o):n.delete(o);let s=t.get(o);s&&(s.revision+=1);let c=e.readState(),l={...c.modelOverrides};if(i===void 0){if(!Object.hasOwn(c.modelOverrides,o))return;delete l[o]}else{let e=i===null?null:i.trim();if(l[o]===e&&Object.hasOwn(l,o))return;l[o]=e}e.publish({...c,modelOverrides:l})};return{set:r,retire:e=>{let n=e.trim();n&&(t.delete(n),r(n,void 0))},preparePatch:(i,a,o,s)=>{let c=i.trim(),l=Object.hasOwn(a,`model`),u=()=>o.ownsModelOverride?.()!==!1,d=0,f;return{start:()=>{if(!l||f||!u())return;let o=t.get(c);f=Symbol(`session-model-patch`),t.set(c,{token:f,previous:o?.previous??{value:e.readState().modelOverrides[c],created:n.has(c)},revision:0}),r(i,a.model),d=t.get(c)?.revision??0},settle:n=>{if(!f)return;let l=t.get(c);if(l?.token===f&&(t.delete(c),l.revision===d)){if(e.connection.isCurrent(s)&&u()){if(n&&!o.deferListRefresh)r(i,void 0);else{let t=l.previous,o=!n&&t.created&&e.publishedRow(c)?.modelOverrideSource===void 0;r(i,n?a.model:t.created&&!o?void 0:t.value,o)}}else r(i,void 0)}}}},settleCreated(e){e.modelOverrideSource!==void 0&&n.has(e.key)&&r(e.key,void 0)},clear(){n.clear(),t.clear()}}}function lg(e,t,n,r=`updatedAt`){let i=Wl(t);if(!e||!i||!_g({...n,archivedFilter:`active`,excludeSubagents:!1}))return!1;let[,a]=i;if(!Vn(a.session)||a.catalogChanged===!0||a.phase===`reset`||(n.offset??0)>0)return!1;let o=Gl(t),s=Array.isArray(a.ancestorSessions),c=!1;for(let t of o){let i=Wl(t);if(!i)return!1;let[a,,l]=i,u=a.agentId??X(a.key)?.agentId;if(n.agentId&&u&&W(n.agentId)!==W(u))continue;let d=e.sessions.find(e=>zl(e,a.key,a.agentId??n.agentId??null)),f=n.excludeSubagents===!0&&Ia(a.key),p=[d?.spawnedBy??l.spawnedBy,d?.controlOwnerSessionKey??l.controlOwnerSessionKey,d?.parentSessionKey??l.parentSessionKey].filter(e=>typeof e==`string`&&!!e);if(!s&&(Ia(a.key)||p.length>0||d?.childSessions?.length)||!Kl(e.sessions,a.key,p,s?o:void 0))return!1;if(f){c=!0;continue}let m=Xl(d,t,{resultAgentId:n.agentId,archivedFilter:`all`}).admittedRow;if(!d||!m||!xl(d,n.archivedFilter??`active`)||d.sessionId!==m.sessionId||d.kind!==m.kind||d.archived===!0!=(m.archived===!0)||d.pinned===!0!=(m.pinned===!0)||d.pinnedAt!==m.pinnedAt||JSON.stringify(d.owner)!==JSON.stringify(m.owner)||JSON.stringify(d.createdActor)!==JSON.stringify(m.createdActor)||d.spawnedBy!==m.spawnedBy||d.controlOwnerSessionKey!==m.controlOwnerSessionKey||d.parentSessionKey!==m.parentSessionKey||!a.isAncestorReference&&(a.updatedAt===null||a.updatedAt<(d.updatedAt??0)||a.snapshotAt!==void 0&&a.snapshotAt<(d.snapshotAt??0)||r===`activity`&&un(m)<un(d))||!a.isAncestorReference&&a.updatedAt!==d.updatedAt&&e.sessions.length>(e.nextOffset??e.limitApplied??n.limit??xu.limit))return!1;c=!0}return c}function ug(e){return e.append!==!0&&e.backgroundHydrate!==!0}function dg(e){let t=e?W(e):null;return e=>!t||!e?.trim()||W(e)===t}function fg(e,t){let n=Gl(e).map(e=>pg(e,t));return(e,t)=>n.some(n=>n(e,t))}function pg(e,t){let n=Wl(e),r=n?.[0],i=n?.[1]??Vn(e),a=n?.[2],o=dg(r?.agentId??X(r?.key)?.agentId??(typeof i?.agentId==`string`?i.agentId:t)),s=[a?.controlOwnerSessionKey,a?.spawnedBy,a?.parentSessionKey,i?.parentSessionKey];return(e,t)=>{let n=e.spawnedBy;return n&&r&&Z(r.key,n)?!0:o(e.agentId)?!n||!r||t?.sessions.some(e=>Z(e.key,r.key))||s.some(e=>typeof e==`string`&&Z(e,n))?!0:!t||t.hasMore===!0||(t.totalCount??t.sessions.length)>t.sessions.length:!1}}function mg(e,t){if(!e)return null;if(e.outcome.status===`failed`||!t?.trim())return e.matchesRequestedQuery?e.outcome:null;let n=e.result,r=n&&!n.hasMore&&(n.totalCount??n.sessions.length)<=n.sessions.length;return!e.options.append&&dg(t)(e.options.agentId)&&(e.options.agentId?.trim()||r)?e.outcome:null}function hg(e,t,n){return e?((t.intent!==`automatic`||e.intent===`automatic`)&&(t.intent!==`reconcile`||e.intent===`automatic`||e.intent===`reconcile`)&&(ug(t.options)||!ug(e.options))?(e.options=t.options,e.intent=t.intent,e.foreground=t.foreground,e.bootstrap=t.bootstrap,e.errorOwner=t.errorOwner):t.intent===`reconcile`&&vg(yg(e.options,n),yg(t.options,n),!1)&&(e.errorOwner=t.errorOwner),e.completions.push(...t.completions),e):t}function gg(e,t,n){let r=new Set;for(let i of e)n(i.query,i.snapshot.result)&&(i.pending!==null||i.snapshot.error!==null||!lg(i.snapshot.result,t,i.scope))&&r.add(i);return r}function _g(e){if(e.includeDerivedTitles===!1||e.includeLastMessage===!1)return!1;let t=mu(e);return t.archived===void 0&&!t.spawnedBy&&(t.boardFace??t.hasBoard)===void 0&&!t.activeMinutes&&!t.search&&!t.ownerId&&t.involvingMe!==!0&&t.includeOwnerSessionCounts!==!0&&t.excludeSubagents!==!0&&t.excludeCron!==!0&&t.excludeSystem!==!0&&t.includeGlobal===!0&&t.includeUnknown===!0&&t.configuredAgentsOnly===!0}function vg(e,t,n){let r=pu(e),i=pu(t);return n&&(r.limit=i.limit,r.ownerFirst=i.ownerFirst),JSON.stringify(r)===JSON.stringify(i)}function yg(e,t){let n={...e,includeDerivedTitles:e.includeDerivedTitles??!0};return!t.selfUser?.id.trim()||n.append===!0||!_g(n)?n:{...n,ownerFirst:!0}}function bg(e,t){return e?new Promise(n=>{e.completions.push({options:t,reconcile:!1,complete:n})}):null}function xg(e,t,n,r){e.completions.forEach(({options:e,reconcile:i,complete:a})=>{let o=yg(e,r);a((i?n:t).then(e=>e?{...e,matchesRequestedQuery:vg(o,e.options,!1)}:null))})}function Sg(e,t,n,r,i){let a=i.selfUser?.id.trim()&&_g(e)&&n&&typeof t==`number`?t+n.sessions.length:r.sessions.length;return{...e,limit:Math.max(e.limit??xu.limit,a)}}function Cg(){return(Cg=e((()=>{sn(),Dl(),Q(),Su(),$l()})))()}function wg(e){return{reconcileConfirmedPreviousConnection:async(t,n)=>{let r=e.connection.capture();if(!r||r.client!==t.client)return!1;let i;try{let t=await e.reconcileMutation(n);i=t.status===`failed`?t.error:void 0}catch(e){i=J(e)}return e.connection.isCurrent(r)?(e.publish({...e.readState(),error:i?K(`connection.sessionOperationCompletedPreviousConnectionWithRefreshError`,{error:i}):K(`connection.sessionOperationCompletedPreviousConnection`)},`operation`),!0):!1},refreshCategory:(t,n)=>{let r=e.readState(),i=dg(n)(r.agentId??void 0),a=()=>{let n=e.readState();return i&&e.connection.isCurrent(t)&&n.agentId===r.agentId&&n.result===r.result&&n.resultCached===r.resultCached},o=t=>{a()&&e.publish({...e.readState(),error:K(`connection.sessionMoveRefreshFailed`,{error:t})},`operation`)};e.reconcileMutation(n,a).then(e=>{e.status===`failed`&&o(e.error)}).catch(e=>o(J(e)))},reportUncertainCategory:(t,n)=>{e.reconcileMutation(n).catch(()=>void 0);let r=Error(K(`connection.sessionMoveUncertain`,{error:J(t)}));return e.publish({...e.readState(),error:r.message},`operation`),r}}}function Tg(e){return e instanceof Zt&&(e.gatewayCode===Nt.INVALID_REQUEST||e.gatewayCode===Nt.FORBIDDEN||e.gatewayCode===Nt.APPROVAL_NOT_FOUND)}function Eg(){return(Eg=e((()=>{yr(),kn(),q(),Y(),Cg()})))()}function Dg(e,t){let{entry:n}=t,r=[];Object.hasOwn(e,`model`)&&t.resolved&&r.push({...t.resolved,...n.modelOverrideSource===void 0?{}:{modelOverrideSource:n.modelOverrideSource==="default"?null:n.modelOverrideSource}});for(let[i,a]of[[`thinkingLevel`,`thinkingLevels`],[`contextWindow`,`contextWindows`]])e[i]!==void 0&&r.push({[i]:t.resolved&&Object.hasOwn(t.resolved,i)?t.resolved[i]:n[i],...t.resolved?.[a]===void 0?{}:{[a]:t.resolved[a]}});e.fastMode!==void 0&&r.push({fastMode:n.fastMode}),typeof e.archived==`boolean`&&r.push(og(e.archived,n));for(let t of[`label`,`category`,`boardPresentation`,`boardFace`])e[t]!==void 0&&r.push({[t]:n[t]});if(e.pinned!==void 0||e.unread===!1){let t={pinned:n.pinnedAt!==void 0,pinnedAt:n.pinnedAt},i={unread:ln(n),lastReadAt:n.lastReadAt,markedUnreadAt:n.markedUnreadAt,agentStatus:n.agentStatus};r.push(e.pinned===void 0?i:e.unread===!1?{...t,...i}:t)}return r}function Og(){return(Og=e((()=>{sg()})))()}function kg(e,t,n){let r=n?.trim()?W(n):void 0,i=ba(e,t,r);if(i.agentId&&r&&i.agentId!==r)return null;let a=i.agentId??r;return i.sessionKey&&a?{identity:JSON.stringify([i.sessionKey,a]),key:i.sessionKey,agentId:a}:null}function Ag(e,t,n){let r=t.agentId?.trim()||X(t.key)?.agentId||n;return r?.trim()?kg(e,t.key,r)?.identity??null:null}function jg(e,t,n,r){let i=n?r===void 0?e.findRow((e,r)=>Ag(t,e,r)===n.identity)?.sessionId?.trim():r.trim():void 0;return n&&i?{...n,sessionId:i}:null}function Mg(e,t,n,r){let i=()=>n?e.findRow((e,r)=>Ag(t,e,r)===n.identity):void 0,a=!!i();return()=>{let e=i(),t=e?.sessionId?.trim();return a&&!e||!!(t&&t!==r()?.sessionId)}}function Ng(e,t,n,r){if(!t||n||r.expectedSessionId!==void 0)return null;let i=r.predecessorReceipt?.read(),a=i?.entry.sessionId?.trim();return a&&i&&kg(e,i.key,t.agentId)?.identity===t.identity?{...t,sessionId:a}:null}function Pg(e,t){let n=new Map,r=0,i=(e,t)=>{let r=n.get(e.identity);return r?.token===t&&r.sessionId===e.sessionId},a=t=>{t?e.redecorateLists():e.notifyPendingChange()};return{prepare:(i,o)=>{let s=Symbol(`session-row-patch`),c=++r;return r=>{let l=e.snapshot(),u=e.findRow((e,t)=>e.sessionId===r.sessionId&&Ag(l,e,t)===r.identity),d=n.get(r.identity);if(!u&&r.sessionId!==void 0)return d?.token!==s||d.sessionId!==void 0?null:(d.sessionId=r.sessionId,s);if(d&&(d.sessionId===void 0||d.sessionId===r.sessionId)&&d.order>c)return null;let f=i(u),p=d&&d.sessionId===r.sessionId?d.previous:t.read(u),m=r.sessionId!==void 0;return n.set(r.identity,{token:s,order:c,sessionId:r.sessionId,hasProjectedRow:m,isCurrent:o,previous:p,next:f,canonical:t.canonical?t.canonical(p,f):f}),a(m),s}},owns:i,read(e){let t=n.get(e);return t&&t.isCurrent?.()!==!1?t:void 0},observe(e,r,i){let a=i?n.get(i):void 0;a&&a.sessionId===e.sessionId&&(a.canonical=t.observe(a.canonical,e,r),a.previous=t.observe(a.previous,e,r))},settle(e,t,r,i){let o=n.get(e.identity);o&&o.token===t&&o.sessionId===e.sessionId&&(o.hasProjectedRow?i&&(o.next=r?o.canonical:o.previous,o.previous=o.next):n.delete(e.identity),i&&a(o.hasProjectedRow),n.get(e.identity)===o&&n.delete(e.identity))},applyRow(e,r){let i=r?n.get(r):void 0;return!i||i.sessionId===void 0||e.sessionId!==i.sessionId?e:(i.hasProjectedRow=!0,t.write(e,i.next))},hasPending:()=>n.size>0,clear:()=>n.clear()}}function Fg(e,t){return Pg(e,{read:e=>e?.[t],write:(n,r)=>n[t]===r?n:e.copyRow(n,{[t]:r}),observe:(e,n,r)=>r.includes(t)?n[t]:e})}function Ig(e){let t=Pg(e,{read:e=>({pinned:e?.pinned===!0,pinnedAt:e?.pinnedAt}),write:(t,n)=>t.pinned===!0===n.pinned?t:e.copyRow(t,n),observe:(e,t,n)=>({pinned:n.includes(`pinned`)?t.pinned===!0:e.pinned,pinnedAt:n.includes(`pinnedAt`)?t.pinnedAt:e.pinnedAt})});return{...t,start(e,n){return t.prepare(e=>n?{pinned:!0,pinnedAt:e?.pinnedAt??Date.now()}:{pinned:!1,pinnedAt:void 0})(e)}}}function Lg(e){let t=Fg(e,`thinkingLevel`),n=Pg(e,{read:e=>({fastMode:e?.fastMode,effectiveFastMode:e?.effectiveFastMode}),canonical:(e,t)=>({...e,fastMode:t.fastMode}),write:(t,n)=>t.fastMode===n.fastMode&&t.effectiveFastMode===n.effectiveFastMode?t:e.copyRow(t,n),observe:(e,t,n)=>({fastMode:n.includes(`fastMode`)?t.fastMode:e.fastMode,effectiveFastMode:n.includes(`effectiveFastMode`)?t.effectiveFastMode:e.effectiveFastMode})}),r=Fg(e,`contextWindow`);return{owners:[t,n,r],read(e){let i=t.read(e),a=n.read(e),o=r.read(e);return i||a||o?{...i?{thinkingLevel:i.next}:{},...a?.next,...o?{contextWindow:o.next}:{}}:void 0},prepare(e,i){let a=[];return e.thinkingLevel!==void 0&&a.push([t,t.prepare(()=>e.thinkingLevel?.trim()||void 0,i)]),e.fastMode!==void 0&&a.push([n,n.prepare(()=>({fastMode:e.fastMode??void 0,effectiveFastMode:e.fastMode??void 0}),i)]),e.contextWindow!==void 0&&a.push([r,r.prepare(()=>e.contextWindow?.trim()||void 0,i)]),a.length===0?null:e=>e?a.map(([t,n])=>[t,n(e)]):[]}}}var Rg;function zg(){return(zg=e((()=>{Q(),Rg=[`pinned`,`pinnedAt`,`unread`,`category`,`thinkingLevel`,`fastMode`,`effectiveFastMode`,`contextWindow`]})))()}function Bg(e){return(t,n,r)=>{let i=e.connection.capture(),a=t.trim();if(!i||!a||r&&(!r.agentId.trim()||!r.sessionId.trim()))return;let o=e.snapshot(),s=r&&kg(o,a,r.agentId);if(r&&!s)return;let c=(t,i)=>(r&&s?t.sessionId===r.sessionId&&Ag(o,t,i)===s.identity:Z(t.key,a))?e.copyRow(t,n):t,l=e.readState(),u=eu(l.result,l.result?.sessions.map(e=>c(e,l.agentId))??[]),d=r?e.stageManagedResults(i,e=>eu(e.snapshot.result,e.snapshot.result?.sessions.map(t=>c(t,e.snapshot.agentId))??[]),e=>({row:e.row?c(e.row,e.target.agentId):null})):void 0;e.connection.isCurrent(i)&&(u!==l.result&&e.publish({...l,result:u}),d?.notify())}}function Vg(){return(Vg=e((()=>{cu(),Q(),zg()})))()}function Hg(e){let t=(t,n)=>{e.connection.isCurrent(t)&&e.publish({...e.readState(),error:J(n)},`operation`)},n=cg(e),r=ag(e.publishedRow,()=>e.publish({...e.readState()}),e.archiveFields),i=new Set,a=Bg(e),o=Ig(e),s=Fg(e,`category`),c=Fg(e,`unread`),l=Lg(e),u=[o,c,s,...l.owners],d=()=>u.some(e=>e.hasPending()),f=(t,n)=>{if(!d())return t;let r=Ag(e.snapshot(),t,n);return u.reduce((e,t)=>t.applyRow(e,r),t)},{reconcileConfirmedPreviousConnection:p,refreshCategory:m,reportUncertainCategory:h}=wg(e),g=async(r={},a={})=>{let o=e.connection.capture();if(!o)return null;try{let{currentSessionKey:s,...c}=r,l=await Jh(o.client,{...c,...qh(s,r.agentId)});if(!e.connection.isCurrent(o))return await p(o,r.agentId)?l:null;e.notifyCreated(l.key,l.entry,c.agentId),(c.worktree===!0||c.execNode?.trim())&&i.add(l.key.trim()),c.model?.trim()?n.set(l.key,c.model,!0):i.has(l.key)&&e.publish({...e.readState()});let u=e.reconcileMutation(r.agentId);if(a.reconciliation===`background`)u.catch(e=>{t(o,e)});else if(await u,!e.connection.isCurrent(o))return await p(o,r.agentId)?l:null;return l}catch(e){return t(o,e),null}},_=async(e={})=>(await g(e))?.key??null,v=async(t,r,i={})=>{let u=e.connection.capture();if(!u)return null;let d=Object.hasOwn(r,`model`),f=()=>!w()&&i.canDispatch?.()!==!1,g=l.prepare(r,f),_=d||g!==null,v=t.trim(),y=e.snapshot(),b=_||r.label!==void 0||r.category!==void 0||r.pinned!==void 0||r.unread===!1||r.archived!==void 0||r.boardFace!==void 0||r.boardPresentation!==void 0?kg(y,v,i.agentId):null,x=jg(e,y,b,i.expectedSessionId),S=Object.hasOwn(r,`thinkingLevel`),C=S?e.suspendThink(v,i.agentId):void 0,w=Mg(e,y,_?b:null,()=>x),T=x??b,E=[[T,g?.(T)??[]]],D=!1,O=!1,k,ee=()=>i.ownsModelOverride?.()!==!1,A=n.preparePatch(t,r,i,u),j=r.pinned===!0,te=null,ne=null,M=null,N=()=>{r.category!==void 0&&!M&&x&&(M=s.prepare(()=>r.category?.trim()||void 0)(x)),A.start(),r.pinned!==void 0&&!te&&x&&(te=o.start(x,j)),r.unread===!1&&!ne&&x&&(ne=c.prepare(()=>!1)(x))};i.waitFor||N();let re=t=>{A.settle(t),S&&(t?e.clearThink(v,i.agentId):C?.(),C=void 0);for(let[n,r]of[[x,[[o,te],[c,ne],[s,M]]],...E])if(n)for(let[i,a]of r)a&&i.settle(n,a,t&&D,e.connection.isCurrent(u))},ie=()=>{if(!e.connection.isCurrent(u)||!_)return;let t=Ng(y,b,x,i);t&&(x=t,f()&&E.push([x,g?.(x)??[]]))},ae;try{if(i.waitFor&&(ae=i.predecessorReceipt?.subscribe(ie),ie(),await i.waitFor,!e.connection.isCurrent(u)||(ie(),w()))||i.canDispatch?.()===!1||(N(),!e.connection.isCurrent(u)||!f()))return re(!1),null;Object.hasOwn(r,`permissionMode`)&&(k=e.claimPermissionProjection(t,i.agentId,i.expectedSessionId));let n=x?e.capturePatchFields(x):void 0,o=await _u(u.client,t,r,_&&x?{...i,expectedSessionId:x.sessionId}:i);if(O=!0,!e.connection.isCurrent(u))return re(!1),await p(u,i.agentId)?o:null;if(i.onConfirmed?.(o),D=x!==null&&o.entry.sessionId===x.sessionId&&kg(y,o.key,x.agentId)?.identity===x.identity,x&&D&&n){let t=e.readRevision();for(let e of Dg(r,o))n({key:x.key,agentId:x.agentId,sessionId:x.sessionId,updatedAt:o.entry.updatedAt??null,readCutoff:t,fields:e})}if(k){let e=k.confirm({sessionId:o.entry?.sessionId,permissionMode:o.entry?.permissionMode,updatedAt:o.entry?.updatedAt});if(e===`superseded`)return re(!0),o;let n=kg(y,t,i.agentId);e===`confirmed`&&n&&o.entry?.sessionId&&a(t,{permissionMode:o.entry?.permissionMode,...o.entry?.updatedAt===void 0?{}:{updatedAt:o.entry.updatedAt}},{agentId:n.agentId,sessionId:o.entry.sessionId})}if(r.category!==void 0&&Object.keys(r).every(e=>e===`category`||e===`pinned`))return re(!0),i.deferListRefresh||m(u,i.agentId),o;let s={status:`refreshed`},c=D&&r.unread===!1&&Object.keys(r).length===1;if(!i.deferListRefresh&&!c){if(Object.hasOwn(r,`permissionMode`)?s=await e.reconcileMutation(i.agentId,k?.isCurrent):await e.reconcileMutation(i.agentId),!e.connection.isCurrent(u))return re(!1),await p(u,i.agentId)?o:null;if(k?.isCurrent()===!1)return re(!0),o}return re(!0),s.status===`failed`?{...o,listRefreshError:s.error}:o}catch(t){let n=r.category!==void 0&&!O&&!Tg(t);n&&M&&x&&(s.settle(x,M,!1,!1),M=null,te&&=(o.settle(x,te,!1,!1),null));try{!O&&e.connection.isCurrent(u)&&!w()&&E.some(([e,t])=>e&&t.some(([t,n])=>n&&t.owns(e,n)))&&i.onRejected?.(t)}finally{re(O)}if(!e.connection.isCurrent(u))return null;throw n?h(t,i.agentId):(ee()&&!w()&&e.publish({...e.readState(),error:J(t)},`operation`),t)}finally{ae?.()}},y=async(t,n)=>{let r=e.connection.capture();if(!r)return null;let{archived:i,pinned:a}=n,o=a===!0?{pinned:!0}:a===!1?{pinned:!1,pinnedAt:void 0}:void 0,s=i===void 0?o:{...og(i),...i?void 0:o},c=e.snapshot(),l=s?t.map(t=>{let n=kg(c,t.key,t.agentId),r=t.expectedSessionId?.trim();if(!n||!r)return null;let i={...n,sessionId:r};return{owned:i,confirm:e.capturePatchFields(i)}}):[],u=await vu(r.client,{targets:t,patch:n});if(!e.connection.isCurrent(r))return u;if(s){let t=e.readRevision();u.outcomes.forEach((e,n)=>{let r=l[n];e.ok&&r&&r.confirm({key:r.owned.key,agentId:r.owned.agentId,sessionId:r.owned.sessionId,updatedAt:null,readCutoff:t,fields:s})})}return u},b=async(n,r={})=>{let i=e.connection.capture();if(!i)return`not-started`;try{return await bu(i.client,n,r),e.connection.isCurrent(i)?`completed`:`uncertain`}catch(e){return t(i,e),`uncertain`}},x=async(n,r,i={})=>{let o=e.connection.capture();if(!o)return null;let s=e.snapshot(),c=kg(s,n,i.agentId),l=c&&e.findRow((e,t)=>Ag(s,e,t)===c.identity),u=c&&l?.sessionId?{agentId:c.agentId,sessionId:l.sessionId}:void 0;try{let t=await o.client.request(`sessions.assignOwner`,{key:n,owner:r,...i.agentId?{agentId:i.agentId}:{}});return e.connection.isCurrent(o)?(u&&a(t.key,{owner:t.owner},u),t.owner):null}catch(e){return t(o,e),null}},S=()=>{n.clear();for(let e of u)e.clear();r.clearAll(),i.clear()};return{create:_,createResult:g,reconcileConfirmedPreviousConnection:p,retireDeletedSession(t){e.retirePullRequestSummary(t),r.clear(t),i.delete(t.trim()),n.set(t,void 0)},patch:v,settingsPreview(t,n){let r=kg(e.snapshot(),t,n);return r?l.read(r.identity):void 0},patchMany:y,assignOwner:x,patchRowLocal:a,applyPendingRow:f,observePendingFields(t,n,r){if(!d())return;let i=Ag(e.snapshot(),t,r);for(let e of u)e.observe(t,n,i)},applyPendingRows(e,t){return!e||!d()?e:eu(e,e.sessions.map(e=>f(e,t)))},applyConfirmedArchives:r.apply,applyConfirmedArchiveRow:r.applyRow,observeArchiveState:r.observe,confirmArchiveState:r.confirm,reset:b,retireModelOverride:n.retire,archiveVisibility:r.visibility,beginArchive:r.beginPending,isPreparedWorkSession:e=>i.has(e.trim()),settlePrepared(e){for(let t of e?.sessions??[])n.settleCreated(t),(t.worktree||t.execNode)&&i.delete(t.key)},retireConnection(){S();let t=e.readState();e.publish({...t,modelOverrides:{}})},dispose:S}}function Ug(){return(Ug=e((()=>{Y(),Yh(),cu(),sg(),Eg(),Og(),zg(),Su(),Vg()})))()}function Wg(e,t){let n=new Map,r=(t,n)=>{let r=ba(e.snapshot,t,n??void 0);return`${r.sessionKey}\0${r.agentId??``}`},i=(e,t)=>{let r=n.get(e),i={sessionId:t,fact:r&&r.sessionId===t?r.fact:void 0};return n.set(e,i),i},a=(e,a,o)=>{let s=r(e,a),c=o?.trim()||void 0,l=t(),u=l.observations.publishedRow((e,t)=>r(e.key,e.agentId??t)===s),d=c??u?.sessionId,f=i(s,d);!f.fact&&u&&u.sessionId===d&&(f.fact={permissionMode:u.permissionMode,updatedAt:u.updatedAt,revision:l.observations.rowRevision(u)});let p=f.fact,m=()=>n.get(s)===f,h=!1,g=f.fact;return{isCurrent:()=>m()&&(!h||f.fact===g),confirm(e){let n=f.sessionId===e.sessionId?f.fact:void 0;return!m()||e.sessionId&&c&&c!==e.sessionId||e.updatedAt!=null&&n?.updatedAt!=null&&e.updatedAt<n.updatedAt?`superseded`:(h=!0,g=f.fact,n&&n!==p&&n.updatedAt===e.updatedAt&&n.permissionMode!==e.permissionMode?`refresh`:e.sessionId?(f.sessionId=e.sessionId,f.fact={permissionMode:e.permissionMode,updatedAt:e.updatedAt,revision:t().requestRevision},g=f.fact,`confirmed`):`confirmed`)}}},o=(e,i,a,o)=>{let s=r(e.key,e.agentId??a),c=n.get(s);if(!c)return e;if(e.sessionId!==c.sessionId)return o&&n.delete(s),e;let l=i(e),u=c.fact,d=u?.updatedAt!=null&&e.updatedAt!=null&&e.updatedAt<u.updatedAt,f=u?.updatedAt!=null&&e.updatedAt!=null&&e.updatedAt>u.updatedAt;if(!u||f||!d&&l>u.revision)return o&&(u&&u.permissionMode===e.permissionMode&&u.updatedAt===e.updatedAt?u.revision=l:c.fact={permissionMode:e.permissionMode,updatedAt:e.updatedAt,revision:Math.max(l,u?.revision??0)}),e;if(e.permissionMode===u.permissionMode)return e;let p={...e};return u.permissionMode===void 0?delete p.permissionMode:p.permissionMode=u.permissionMode,t().observations.inheritRow(p,e)},s=(e,t,r,i)=>!e||n.size===0?e:eu(e,e.sessions.map(e=>o(e,t,r,i)));return{claim:a,capture:(e,t)=>{let i=r(e,t),a=n.get(i),o=a?.fact,s=o?.revision;return()=>a!==void 0&&n.get(i)===a&&a.fact===o&&a.fact?.revision===s},reconcileList:(e,t,n)=>s(e,()=>t,n,!0),reconcileRow:(e,t,n)=>o(e,()=>t,n,!0),apply:(e,t,n)=>s(e,t,n,!1),applyRow:(e,t,n)=>o(e,()=>t,n,!1),observeEventRow:(e,a,o,s)=>{if(e===a)return e;let c=e.agentId??o.agentId??s,l=r(e.key,c),u=n.get(l);if((!u||u.sessionId!==e.sessionId)&&(u=i(l,e.sessionId)),u?.fact?.updatedAt!=null&&e.updatedAt!=null&&e.updatedAt<u.fact.updatedAt){let t={...e,permissionMode:u.fact.permissionMode};return t.permissionMode===void 0&&delete t.permissionMode,t}return e.sessionId&&(u.fact={permissionMode:e.permissionMode,updatedAt:e.updatedAt,revision:t().requestRevision}),e},clear:()=>n.clear()}}function Gg(){return(Gg=e((()=>{cu(),Q()})))()}function Kg(e){let t=Rg,n=(n,r,i)=>(a,o)=>{let s=r?.observe(n,i),c=e.roster.observations.inheritRow(a,n,o),l=e.roster.observations.projectFields(r?e.permissions.reconcileRow(c,r.revision,i):c,i);return s&&e.mutations.observePendingFields(n,s(l,t),i),l},r=n=>{let r=e.roster.captureReconciliation(),i={...n,key:n.key.trim(),agentId:W(n.agentId)},a=!!(i.key&&n.agentId.trim()&&i.sessionId.trim());return n=>{let o=()=>r.isCurrent(void 0,i.agentId)&&e.deletions.acceptsGeneration(i.key,i.sessionId,i.agentId)&&!e.deletions.deletionState(i.key,i.agentId,i.sessionId);if(!a||!n.agentId.trim()||!Z(n.key,i.key)||W(n.agentId)!==i.agentId||n.sessionId!==i.sessionId||!o())return;let s=Object.keys(n.fields),c=Xh(r.revision,n.updatedAt,n.readCutoff),l=!1,u=!1,d=(t,n)=>{u=e.mutations.confirmArchiveState(i.key,t.archived===!0,{sessionId:i.sessionId,archivedAt:t.archivedAt,archivedBy:t.archivedBy,archiveReason:t.archiveReason},n)||u},f=(r,a)=>{let o=X(r.key)?.agentId,u=o??r.agentId??a;if(!u||W(u)!==i.agentId||o&&r.agentId&&W(r.agentId)!==W(o)||!Z(r.key,i.key)||r.sessionId!==i.sessionId)return r;let f={...r,...n.fields};for(let[e,t]of Object.entries(n.fields))t===void 0&&Reflect.deleteProperty(f,e);e.roster.observations.inheritRow(f,r);let p=e.roster.observations.observeFields(f,s,c,i.agentId),m=e.roster.observations.projectFields(f,i.agentId);return`archived`in n.fields&&(l=!0,d(m,e.roster.observations.fieldObservation(m,`archived`))),e.mutations.observePendingFields(f,p(m,t),i.agentId),m},p=(e,t)=>e&&eu(e,e.sessions.map(e=>f(e,t))),m=e.readState(),h=p(m.result,m.agentId),g=e.roster.observations.stageManagedResults(r.scope,e=>p(e.snapshot.result,e.snapshot.agentId),e=>({row:e.row?f(e.row,e.target.agentId):null}));o()&&(!l&&`archived`in n.fields&&d(n.fields,c),(h!==m.result||u)&&e.publish({...m,result:e.decorate(h)}),g.notify())}},i=(t,r,i,a)=>{let o=e.readState(),s=t?.agentId??(va(t?.key)?i?.selectedGlobalAgentId:void 0)??i?.resultAgentId??o.agentId;if(a&&!a.isCurrent(void 0,s)||t&&(!e.deletions.acceptsGeneration(t.key,t.sessionId,s)||e.deletions.deletionState(t.key,s,t.sessionId)))return!1;if(a&&!a.isCurrent(t,s))return r&&t&&va(t.key)&&s!==o.agentId&&i?.selectedGlobalAgentId===s?`defaults-only`:!1;let c=!!a||!t||e.roster.observations.isCurrentRow(t,void 0,s);if(!c&&!o.result?.sessions.some(n=>Z(n.key,t?.key)&&e.roster.observations.isCurrentRow(n)))return!1;let l=i?.sourceCanonicalListRevision,u=!c||!a&&l!==void 0&&e.canonicalListRevision()>l,d=t&&n(t,a,s),f,p=t?e.roster.observations.currentRow(t,s):void 0,m=t&&Ll(t,p)?void 0:t,h=su(o.result,m,r,i,u,t?{observe:e=>{f=e.key},isProvisional:n=>o.resultCached===!0&&(!!a||e.roster.observations.rowRevision(t)>0)&&e.roster.observations.rowRevision(n)===0,project:d}:void 0),g=e.decorate(h),_=f&&g?.sessions.find(e=>Z(e.key,f)),v=_||(t&&a&&c?Yl(t,e.roster.observations.currentRow(t,s),{resultAgentId:s,selectedGlobalAgentId:s,archivedFilter:`all`},{project:d}).admittedRow:void 0),y=v?a?.stage(v,s):void 0;v&&e.githubPublication.observeRows([v],s);let b=i?.resultAgentId?.trim()?W(i.resultAgentId):o.agentId,x=g?.sessions!==o.result?.sessions;return(g!==o.result||b!==o.agentId)&&e.publish({...o,result:g,agentId:b}),y?.(),t&&c&&x&&(a||l===void 0)&&e.roster.invalidateManagedLists(X(t.key)?.agentId??s,_||t,i?.sourceListScope),c};return{capturePatchFields:r,reconcile:i,reconcileChangedEvent:(n,r,i)=>{let{roster:a,connection:o,deletions:s,githubPublication:c,permissions:l,mutations:u,thinkingClaims:d}=e,f=e.readState(),p=ql(n),m=()=>(!r.scope||o.isCurrent(r.scope))&&(!p||s.acceptsGeneration(p.key,p.sessionId,p.agentId??f.agentId)),h=e=>r.deliver(e,m),g=()=>({eventInfo:null,reconciled:{applied:!1,result:e.readState().result},notifyEvent:h});if(!m())return g();let _=f.result,v=R(B(n)?.reason);c.observeEvent(n);let y=e.snapshot().sessionKey?.trim(),b=p?.archived===!0&&!!(y&&Ta({assistantAgentId:e.snapshot().assistantAgentId,hello:e.snapshot().hello,sessionKey:y},p.key,p.agentId)),x=b?{...i,archivedFilter:`all`}:i,S,C,w=a.observations.prepareProjection(),T=(e,n,i,o,s)=>{let c=s.hasPermissionMode?l.observeEventRow(e,n,s,o):e;a.observations.inheritRow(c,n);let d=a.observations.inheritRow({...c},c),f=a.observations.observeFields(d,s.isAncestorReference?a.observations.fieldNames(n):i,Xh(r.revision,s.updatedAt,void 0,s.snapshotAt),o),p=w.projectFields(d,o);return s.archived!==null&&u.observeArchiveState(p.key,p.archived===!0,p),u.observePendingFields(d,f(p,t),o),p},E=(e,t,r)=>{let i=eu(e,w.projectRows(e?.sessions??[])),o=ou(i,n,t,(e,t,n,i)=>T(e,t,n,i.agentId??r,i),e=>s.acceptsGeneration(e.key,e.sessionId,e.agentId??r));if(a.observations.inherit(o.result,i,void 0,r),!C&&o.admittedRow){let{result:e,...t}=o;C=t}return o},D=E(_,x,f.agentId),O=[],k=a.observations.stageManagedResults(r.scope,e=>{let t=E(e.snapshot.result,{resultAgentId:e.snapshot.agentId,archivedFilter:b?`all`:e.scope.archivedFilter},e.snapshot.agentId);return O.push(...(t.admittedRows??[]).map(e=>({row:e,revision:r.revision}))),t.result},e=>{if(!p&&v===`runner-availability`)return{row:e.row,invalidateRevision:r.revision};let t=Gl(n).find(t=>{let n=ql(t),r=n?.agentId??X(n?.key)?.agentId;return n&&r&&Z(n.key,e.target.key)&&W(r)===e.target.agentId&&s.acceptsGeneration(n.key,n.sessionId,r)}),i=ql(t);if(!i)return{row:e.row};if(!e.row)return{row:null,eventResult:C,invalidateRevision:r.revision};if(i.sessionId&&i.sessionId!==e.row.sessionId)return{row:e.row};let a=Xl(w.projectFields(e.row,e.target.agentId),t,{resultAgentId:e.target.agentId,selectedGlobalAgentId:e.target.agentId,archivedFilter:`all`},(t,n,r)=>T(t,n,r,e.target.agentId,i));return t===n&&(a.admittedRow||a.deletedKey)&&(S??=a),{row:a.row??null,eventResult:a,...!a.deletedKey&&(!a.admittedRow||!Array.isArray(B(t)?.ancestorSessions))?a.admittedRow&&B(B(t)?.session)?{certification:{revision:r.revision,reason:v}}:{invalidateRevision:r.revision}:{}}},!1,O,r),ee=(e=!1)=>k.notify(e?(D.admittedRows??[]).map(e=>({row:e,revision:r.revision})):[],v),A=d.observeEvent(p?.reason===`delete`?D:C??S??D,p);return p&&(p.reason!==`delete`||D.deletedKey||!p.sessionId)&&s.observe(p),m()?{eventInfo:p,reconciled:D,claimChanged:A,notifyManaged:ee,notifyEvent:h}:g()},observeRow:(t,r,i)=>{let{roster:a,deletions:o}=e;if(!t.key.trim()||!t.agentId.trim())throw Error(`A session row observation requires a session key and explicit agent.`);let s={key:t.key.trim(),agentId:W(t.agentId)},c=a.observations.registerRow(s,r,{onInvalidate:i?.onInvalidate,onEvent:i?.onEvent,isValid:e=>o.acceptsGeneration(s.key,e,s.agentId),decorate:t=>o.deletionState(t.key,s.agentId,t.sessionId)?null:e.mutations.applyPendingRow(e.mutations.applyConfirmedArchiveRow(e.permissions.applyRow(t,a.observations.rowRevision(t),s.agentId)),s.agentId)}),l=a.observations.publishedRow((e,t)=>{let n=X(e.key)?.agentId??e.agentId??t;return!!(n&&Z(e.key,s.key)&&W(n)===s.agentId&&a.observations.hasLiveObservation(e)&&o.acceptsGeneration(e.key,e.sessionId,s.agentId))});return l&&a.observations.stageObservedRows([l],e.connection.capture(),s.agentId)(),{get row(){return c.current()},get sessionId(){return c.sessionId()},get hasObserved(){return c.hasObserved()},isCurrent:c.isCurrent,dispose:c.dispose,captureReconcile(){let t=a.captureReconciliation();return r=>{if(!c.isCurrent()||!t.isCurrent(void 0,s.agentId))return{status:`retired`};if(c.readInvalidated(t.revision))return{status:`invalidated`};if(r){if(!c.acceptsRead(r,t.revision)||o.deletionState(r.key,s.agentId,r.sessionId)||!t.isCurrent(r,s.agentId))return{status:`current`,row:c.current()};let i=Yl(r,a.observations.currentRow(r,s.agentId),{resultAgentId:s.agentId,selectedGlobalAgentId:s.agentId,archivedFilter:`all`},{isProvisional:e=>a.observations.rowRevision(e)===0,project:n(r,t,s.agentId)});if(i.admittedRow){let n=i.admittedRow,r=t.stage(n,s.agentId),o=e.readState(),c=a.observations.mergeRows(o.result,[n],o.agentId,s.agentId);e.githubPublication.observeRows([n],s.agentId),c!==o.result&&e.publish({...o,result:e.decorate(c)}),r()}}else c.clear(t.revision)();return c.isCurrent()?{status:`current`,row:c.current()}:{status:`retired`}}}}},captureReconcile(){let t=e.roster.captureReconciliation();return(e,n,r)=>i(e,n,r,t)}}}function qg(){return(qg=e((()=>{cu(),Q(),zg(),ig(),$l()})))()}function Jg(e){if(!(e instanceof D)||!e.retryable)return null;let t=typeof e.retryAfterMs==`number`&&Number.isFinite(e.retryAfterMs)?e.retryAfterMs:Yg;return Math.min(Math.max(t,Xg),Zg)}var Yg,Xg,Zg;function Qg(){return(Qg=e((()=>{A(),Yg=500,Xg=100,Zg=3e4})))()}function $g(e){return c_.get(e)??s_}function e_(e,t){return t?`account:${JSON.stringify([e,t])}`:e}function t_(e){o_+=1,e===void 0?(s_=o_,c_.clear()):c_.set(e,o_)}var n_,r_,i_,a_,o_,s_,c_,l_,u_;function d_(){return(d_=e((()=>{G(),n_=`openclaw-session-roster`,r_=`rosters`,i_=2592e6,a_=1572864,o_=0,s_=0,c_=new Map,l_=0,u_={read(e,t){let n=$g(e);return U(async()=>{let{readSessionRoster:e}=await import(`./control-ui-boot-shared-D3oo_6Fq.js`).then(e=>(e.a(),e.o));return{readSessionRoster:e}},__vite__mapDeps([11,2,3,4,5,6,7,8,9,1,10,12,13,17,19,18]),import.meta.url).then(({readSessionRoster:r})=>r(e,t,n))},write(e){let t=$g(e.scope);l_+=1;let n=l_;U(()=>Promise.resolve().then(()=>(vy(),cy)).then(r=>{t===$g(e.scope)&&r.persistSessionRoster(e,n)}),void 0,import.meta.url).catch(()=>void 0)}}})))()}function f_(e,t,n,r){let i=n.rosterCache??u_,a=()=>{let t=e.connection?tr(e.connection.gatewayUrl):n.bootRecord?.scope,r=M({client:e.snapshot.client})??n.bootRecord?.recoveryScope;return t?e_(t,r):void 0},o=a(),s=e.connectionRevision,c=n.bootRecord?.profileId,l=n.bootRecord?ue(n.bootRecord):void 0,u=new AbortController,d=()=>r.publish({...r.readState(),result:null,resultCached:!1,agentId:null,groups:[],groupSettings:[],sectionOrder:[]}),f=de(({scope:t,replacement:i,retiredOwner:a})=>{if(!t||t===(e.connection?tr(e.connection.gatewayUrl):n.bootRecord?.scope)){let t=e.snapshot.hello?.auth?.recoveryScope??M({client:e.snapshot.client})??n.bootRecord?.recoveryScope,o=l,s=t?{recoveryScope:t}:o;if(i&&!_e(i,o)&&(l=void 0),a&&!_e(a,s)&&!_e(a,o)||_e(i,s))return;u.abort(),r.readState().resultCached&&d()}}),p={scope:o,connectionRevision:s,agentId:t.state.selectedId,profileId:c,query:{}},m=n.bootRecord?{mainKey:n.bootRecord.agents.mainKey,scope:n.bootRecord.agents.scope}:void 0;return{settled:new Promise(a=>{if(!n.bootRecord||e.snapshot.phase===`connected`){a();return}u.signal.addEventListener(`abort`,()=>a(),{once:!0}),U(async()=>{let{hydrateSessionRoster:e}=await import(`./control-ui-boot-shared-D3oo_6Fq.js`).then(e=>(e.a(),e.o));return{hydrateSessionRoster:e}},__vite__mapDeps([11,2,3,4,5,6,7,8,9,1,10,12,13,17,19,18]),import.meta.url).then(({hydrateSessionRoster:n})=>n(e,t,i,r,p,u.signal)).then(a,a)}),get routingDefaults(){return!u.signal.aborted&&e.snapshot.phase!==`connected`&&a()===p.scope&&e.connectionRevision===p.connectionRevision?m:void 0},synchronize(t){(e.connectionRevision!==s||e.connection&&n.bootRecord?.scope!==tr(e.connection.gatewayUrl))&&(l=void 0),t.phase===`connected`&&u.abort(),(a()!==o||e.connectionRevision!==s||t.phase===`connected`&&c!==void 0&&c!==(t.selfUser?.id??null))&&(c=void 0,o=a(),s=e.connectionRevision,u.abort(),d())},persist(t){t.result&&!t.resultCached&&r.connected()&&e.connection&&re(e.snapshot.hello?.auth,e.connection.token)&&(c=void 0,i.write({version:1,scope:a(),savedAt:Date.now(),profileId:e.snapshot.selfUser?.id??null,agentId:t.agentId,query:r.query(),result:t.result,groups:t.groups,groupSettings:t.groupSettings,sectionOrder:t.sectionOrder}))},dispose(){f(),u.abort()}}}function p_(){return(p_=e((()=>{Oe(),d_(),G()})))()}function m_({active:e,refresh:t}){let n=e,r=0,i=0,a=null,o=0,s=!1,c=null,l=()=>{clearTimeout(r),r=0},u=(e=!0)=>{if(!n||a||!s||r)return;let t=Date.now(),o=e?h_*(1-.2*Math.random()):0;r=setTimeout(d,c===null?Math.max(o,i-t):Math.max(0,c-t))},d=()=>{if(l(),!n||a||!s)return;s=!1,c=null;let e={};a=e;let r=Date.now(),d=o;t(()=>a===e&&d===o).catch(()=>{}).finally(()=>{if(a!==e)return;a=null;let t=Date.now();i=t+Math.min(15e3,Math.max(5e3,3*(t-r))),u()})},f=()=>{o+=1,l(),s=!1,c=null},p=()=>{f(),a=null,i=0};return{scheduleRetry(e){c=Date.now()+e,s=!0,l(),u(!1)},schedule(){s=!0,u()},setActive(e,t=!1){if(n=e,e){u(!1);return}s||=t||r!==0,l()},absorb:f,reset:p,dispose:p}}var h_;function g_(){return(g_=e((()=>{h_=5e3})))()}function __(e,t,n=()=>!0){e.snapshot=t;for(let r of e.listeners){if(!n()||e.snapshot!==t)return;r(t)}}function v_(e,{managedLists:t,observations:n,nextRevision:r,isPageActive:i,publishPrimary:a}){let o=(o,s)=>{let c=e.connection.capture();if(!c)return Promise.resolve();if(o.pending)return s.invalidated&&(!s.background||!o.queued||o.queued.background)&&(o.readGeneration+=1,o.queued=s),o.pending;if(s.background&&!s.invalidated&&!s.append&&o.connectionEpoch===c.epoch||s.append&&!o.snapshot.result)return Promise.resolve();s.append||(o.queued=null);let l=()=>t.get(o.key)===o&&e.connection.isCurrent(c),u=async()=>{let t=s;for(;t&&l();){t.append||o.coordinator.absorb();let s={...o.query,limit:t.append?o.query.limit:o.retainedLimit,...t.append&&t.offset!==void 0?{offset:t.offset}:{}};__(o,{...o.snapshot,loading:!0,error:null},l);try{let u=r(),d=o.readGeneration,f=()=>l()&&(!s.pageSize||d===o.readGeneration&&i()&&o.listeners.size>0),p=await gu(c.client,s,f);if(!l())return;if(!f()){if(__(o,{...o.snapshot,loading:!1},l),!o.queued||o.queued.background||!i())return;t=o.queued,o.queued=null;continue}if(!p)throw Error(`The session query did not return a result. Try again.`);let m=e.reconcileList(p,u,o.query.agentId),h=o.snapshot.result,g=ru(m,h),_=o.query.agentId;n.inherit(g,m,h,_);let v=n.accept(g,h,e.readState().result,_,o.snapshot.agentId),y=v&&t.append&&s.offset&&h?nu(h,v):v,b=e.decorate(y,o);b&&(o.retainedLimit=Math.max(o.retainedLimit,b.sessions.length));let x=n.stageObservedRows(v?.sessions??[],c,_,void 0,!1);o.connectionEpoch=c.epoch,o.startupRetryAttempt=0;let S={result:b,agentId:_??null,loading:!1,error:null};o.snapshot=S;let C=e.readState(),w=n.mergeRows(C.result,b?.sessions??[],C.agentId,_);w!==C.result&&a(w),l()&&o.snapshot===S&&__(o,S,l),x()}catch(t){if(!l())return;let n=lc(t,e.snapshot()),r=ac(t);r?o.coordinator.scheduleRetry(oc(t,o.startupRetryAttempt++)):o.startupRetryAttempt=0,__(o,{...o.snapshot,loading:!1,error:n?null:J(t),startupPending:r},l)}if(!l())return;let u=o.queued;if(u?.background)return;o.queued=null,t=i()?u:null}},d=an(),f=d.promise.finally(()=>{o.pending===f&&(o.pending=null,o.queued?.background&&l()&&i()&&o.coordinator.schedule())});return o.pending=f,d.resolve(u()),f};return(n,r,a=()=>!0)=>!r.background||n.pending?o(n,r):((!n.queued||r.invalidated&&n.queued.background)&&(n.queued=r),e.background(n,async()=>{if(a()&&t.get(n.key)===n&&n.listeners.size>0){if(!i()){n.coordinator.setActive(!1,!0);return}let e=n.queued??r;n.queued=null,await o(n,e)}}))}function y_(){return(y_=e((()=>{St(),Y(),uc(),cu(),Su()})))()}function b_(e,t,n){let r=0,i=(t=()=>!0)=>{let r=new Set;for(let n of e.values())n.warmPrimary&&t(n)&&(n.warmPrimary=!1,n.scope.agentId&&r.add(W(n.scope.agentId)),n.listeners.size===0&&!n.pending&&(n.coordinator.dispose(),e.delete(n.key)));r.size>0&&n(r)},a=(t,n,r)=>{let a=e=>n(e);return t.listeners.add(a),i(e=>e===t),t.coordinator.setActive(r),()=>{if(t.listeners.delete(a),t.listeners.size>0||e.get(t.key)!==t)return;t.coordinator.setActive(!1,t.queued!==null),t.queued=null;let n=()=>{!t.warmPrimary&&t.listeners.size===0&&e.get(t.key)===t&&(t.coordinator.dispose(),e.delete(t.key))};t.pending?t.pending.finally(n):n()}};return{subscribe:a,observe(t,n,r,i,o){let s=a(t,n,r),c=!1,l=()=>{if(c||e.get(t.key)!==t)throw Error(`This session query has been disposed.`)};try{n(t.snapshot)}catch(e){throw s(),e}return{async refresh(){l();let e=i.capture();if(!e)throw Error(`The session query is unavailable while disconnected. Try again.`);if(await o(),l(),!i.isCurrent(e))throw Error(`The session query connection changed. Try again.`);if(t.snapshot.error)throw Error(t.snapshot.error)},dispose(){c||(c=!0,s())}}},retire:i,get revision(){return r},invalidate(t,n,a){let o=JSON.stringify(mu(n)),s=e.get(o);o!==a&&(!s||t(s))&&(r+=1),i(e=>e.key!==a&&t(e))},capture(e,n,r){let a=JSON.stringify(mu(e));i(t=>t.scope.agentId===e.agentId&&t.key!==a);let o=t(e);if(o.listeners.size>0||o.pending){i(e=>e===o);return}o.warmPrimary=!0,o.connectionEpoch=r,__(o,{result:n,agentId:e.agentId?W(e.agentId):null,loading:!1,error:null})},presentation(t,n){if(!_g(t))return null;for(let r of e.values())if(r.warmPrimary&&r.listeners.size===0&&!r.pending&&!r.snapshot.loading&&r.snapshot.error===null&&r.connectionEpoch===n&&vg(r.scope,t,!0))return{result:r.snapshot.result,agentId:r.snapshot.agentId};return null}}}function x_(){return(x_=e((()=>{Q(),Cg(),y_(),Su()})))()}function S_(e,t,n,r){let i=async n=>{let r=e.connection.capture();if(!r)return null;try{let i=t(),a=await hu(r.client,n,()=>e.connection.isCurrent(r));return e.connection.isCurrent(r)?{result:e.reconcileList(a??null,i,n.agentId),scope:r,issuedRevision:i}:null}catch(t){if(!e.connection.isCurrent(r))return null;throw t}};return{list:async(t={})=>{let n=await i(t);return n&&e.connection.isCurrent(n.scope)?e.decorate(n.result,{scope:t}):null},reconcile:async(t,a)=>{let o=e.connection.capture();if(!o)return{status:`stale`};try{let a=await i(t);if(!a||!e.connection.isCurrent(o))return{status:`stale`};let s=a.result?.sessions??[],c=e.readState(),l=e.decorate(n.mergeRows(c.result,s,c.agentId,t.agentId),r()),u=n.stageObservedRows(s,a.scope,t.agentId,a.issuedRevision);return l!==c.result&&e.publish({...c,result:l}),u(),{status:`refreshed`}}catch(t){return e.connection.isCurrent(o)&&a?.()!==!1?{status:`failed`,error:J(t)}:{status:`stale`}}}}}function C_(){return(C_=e((()=>{Y(),Su()})))()}function w_(e,t){return async(n,r)=>{let i=e.connection.capture();if(!i)return{status:`stale`};t.invalidate(n);let a=t.foreground();if(dg(n)(a.agentId)){let o=t.replacementOptions(a.initial?n:void 0),s=await t.refresh(o,r);if(!e.connection.isCurrent(i))return{status:`stale`};let c=mg(s,n);if(c)return c.status===`failed`&&r?.()===!1?{status:`stale`}:c;if(!n?.trim()||r?.()===!1)return{status:`stale`}}return t.read(t.replacementOptions(n),r)}}function T_(){return(T_=e((()=>{Cg()})))()}function E_(e){let t=new Map,n=()=>{for(let[e,n]of t){if(t.size<=D_)break;n.result&&t.delete(e)}},r=t=>{if(!e.connection.isCurrent(t.scope))return!1;let n=e.currentRow(t.params),r=t.result?t.result.session:t.issuedRow;return!n||!!(r&&n.sessionId===r.sessionId&&(n.updatedAt??0)<=(r.updatedAt??0))};return{describe:async(i,a={})=>{let o=e.connection.capture(),s=a.timeoutMs===void 0?[]:[{timeoutMs:a.timeoutMs}];if(!o||a.client&&a.client!==o.client){if(a.refresh&&a.client)return a.client.request(`sessions.describe`,i,...s);throw Error(`gateway not connected`)}let c=X(i.key)?.agentId,l=JSON.stringify([i.key,c&&W(c)===W(i.agentId)?void 0:i.agentId,i.includeDerivedTitles,i.includeLastMessage,a.timeoutMs]),u=t.get(l);if(u&&r(u)&&!a.refresh&&(!u.result||e.canReuse()))return u.promise;t.delete(l);let d=o.client.request(`sessions.describe`,i,...s),f={params:{...i},scope:o,promise:d,issuedRow:e.currentRow(i),reusable:e.canReuse()};return f.promise=d.then(i=>{let a=i.session?.runtimeMs===void 0?i:{...i,session:{...i.session,runtimeSampledAt:Date.now()}};return t.get(l)===f&&e.connection.isCurrent(o)&&(f.result=a,(!f.reusable||!e.canReuse()||!r(f))&&t.delete(l),n()),a},e=>{throw t.get(l)===f&&t.delete(l),e}),t.set(l,f),n(),f.promise},clear:()=>t.clear(),invalidateEvent(e){if(!Array.isArray(Wl(e)?.[1].ancestorSessions)){t.clear();return}let n=Gl(e).flatMap(e=>{let t=ql(e);return t?[t]:[]});if(!n.length){t.clear();return}for(let[e,r]of t){let i=X(r.params.key)?.agentId??r.params.agentId;n.some(e=>{let t=e.agentId??X(e.key)?.agentId;return Z(e.key,r.params.key)&&(!i||!t||W(t)===W(i))})&&t.delete(e)}}}}var D_;function O_(){return(O_=e((()=>{Q(),$l(),D_=128})))()}function k_(e,t,n,r,i){return(a,o)=>{let s=new Set([...e].filter(r)),c=new Map;return{captures:e=>s.has(e),results:c,deliver(e,l){for(let u of s){if(!a||!t.isCurrent(a))return;if(u.onEvent&&n(u))try{let t=c.get(u),n=l?.()===!1?{applied:!1,generationRejected:!0}:t&&(r(u)||t.result.deletedKey)&&u.snapshot===t.snapshot&&(!t.result.admittedRow||!i(t.result.admittedRow,o))?t.result:{applied:!1};u.onEvent(e,n)}catch(e){console.error(`[sessions] event observer error:`,e)}}}}}}function A_(e,t){let{identity:n,inheritRow:r,mergeRow:i,rowRevision:a}=e,o=(e,t,r)=>{let i=new Map;for(let a of e){if(r&&!r.has(a.sessionId))continue;let e=n(a,t);e&&i.set(e,a)}return i},s=(e,t,s,c,u)=>{if(!e||t.length===0)return e;let d=o(t,c);return eu(e,e.sessions.map(e=>{let t=n(e,s),o=t&&d.get(t);if(!o)return e;let f=t&&u?.get(t),p=f&&(a(o)>a(f)||Ll(f,o))&&l(o,c);return p?p.key===e.key?p:r({...p,key:e.key},p):i(e,o,s)}))},c=e=>{let{state:o,primaryRows:s,observedRows:c}=t(e&&new Set(e.flatMap(e=>e.sessionId?.trim()?[e.sessionId]:[]))),l=(e,t)=>{let l=n(e,t);if(!l)return e;let u=e,d=s.get(l);d&&(u=o.resultCached&&a(d)===0?i(u,d,t):i(d,u,t));for(let e of c.get(l)??[])u=i(u,e,t);return u.key===e.key?u:r({...u,key:e.key},u)};return{projectFields:l,projectRows:e=>e.map(e=>l(e))}},l=(e,t)=>c([e]).projectFields(e,t),u=(e,r,i)=>{let a=n(e,r);if(!a)return[];let{primaryRows:o,observedRows:s}=i??t(),c=o.get(a);return[...c?[c]:[],...s.get(a)??[]]};return{indexRows:o,merge:s,prepareProjection:c,projectFields:l,heldRowsFor:u,currentRow:(e,t)=>{let n=u(e,t)[0];return n?l(n,t):void 0}}}function j_(){return(j_=e((()=>{cu(),$l()})))()}function M_(e,t){let n=e.runId?.trim()||null,r=Zn(yi(e.errorMessage).replace(/\s+/g,` `).trim(),160);return i=>{if(!e.sessionKeys.some(e=>Z(i.key,e)))return i;let a=t?t.agentId(i):i.agentId??e.agentId;if(va(i.key)&&(!e.agentId||!a||W(a)!==W(e.agentId)))return i;let o=t?.project(i)??i,s=o.hasActiveRun===!0||bn(o),c=o.lastRunId?.trim(),l=e.status!==`queued`&&e.status!==`running`;if(!s&&l&&n&&c&&c!==n||s&&(!n||!o.activeRunIds?.includes(n)))return i;let u=n?o.activeRunIds?.filter(e=>e!==n):[];if(u?.length){let e={...o,activeRunIds:u,hasActiveRun:!0,status:`running`};return t?.observe(e,o,[`activeRunIds`,`hasActiveRun`,`status`]),e}let d=s&&n&&c&&c!==n&&l?n:void 0,f=e.status===`failed`||e.status===`timeout`,p=f?r||(d?void 0:o.lastRunError):void 0,m=d?e.endedAt:o.endedAt??e.endedAt,h=d?void 0:typeof o.startedAt==`number`?Math.max(0,m-o.startedAt):o.runtimeMs,g=o.activeRunIds?.length?[]:o.activeRunIds,_=e.status===`killed`?!0:d||e.status===`running`?!1:o.abortedLastRun,v=[`hasActiveRun`,`status`];g!==void 0&&v.push(`activeRunIds`),(!f||r||d)&&v.push(`lastRunError`),d?v.push(`lastRunId`,`startedAt`,`endedAt`,`runtimeMs`):o.endedAt??(v.push(`endedAt`),typeof o.startedAt==`number`&&v.push(`runtimeMs`)),(d||e.status===`killed`||e.status===`running`)&&v.push(`abortedLastRun`);let y=!d&&o.hasActiveRun===!1&&o.status===e.status&&o.lastRunError===p&&o.endedAt===m&&o.runtimeMs===h&&o.activeRunIds===g&&o.abortedLastRun===_?o:{...o,...d?{lastRunId:d,startedAt:void 0}:{},activeRunIds:g,hasActiveRun:!1,status:e.status,lastRunError:p,endedAt:m,runtimeMs:h,abortedLastRun:_};return t?.observe(y,o,v),y}}function N_(e,t,n){if(!e)return e;let r=M_(t,n);return eu(e,e.sessions.map(r))}function P_(e){return(t,n)=>{let{owner:r,inheritRow:i,observeFields:a}=e.provenance,{projectFields:o}=e.prepareProjection(),s=e=>({agentId:t=>r(t,e),project:t=>o(t,e),observe:(t,r,o)=>{i(t,r),a(t,o,Xh(n.revision,null),e)}}),c=(e,n)=>e&&N_(e,t,s(n)),l=e.readState(),u=c(l.result,l.agentId),d=e.stage(n.scope,e=>c(e.snapshot.result,e.snapshot.agentId),e=>{let r=t.sessionKeys.some(n=>{let r=X(n)?.agentId??t.agentId;return!!(r&&Z(n,e.target.key)&&W(r)===W(e.target.agentId))});return{row:e.row&&r?M_(t,s(e.target.agentId))(e.row):e.row,...!e.row&&r?{invalidateRevision:n.revision}:{}}});return{result:u,changed:u!==l.result||d.changed,notify:d.notify}}}function F_(){return(F_=e((()=>{Y(),cu(),Q(),ig()})))()}function I_(e,t){let n=$h(),{owner:r,identity:i,inheritRow:a,mergeRow:o,rowRevision:s}=n,c=new Set,l=new Map,u=m_({active:!0,refresh:async()=>{k(e.connection.capture(),e=>e.snapshot.result,({target:e,row:t})=>({row:t,invalidateRevision:l.get(e)?.revision,invalidationReason:l.get(e)?.reason})).notify()}}),d=(e,t=!1)=>{l.delete(e),l.size||(t?u.reset():u.absorb())},f=t=>c.has(t)&&t.scope!==null&&e.connection.isCurrent(t.scope),p=e=>f(e)&&!e.snapshot.retired&&(e.snapshot.sessionId===null||e.isValid(e.snapshot.sessionId)),m=k_(c,e.connection,f,p,n.hasNewerFacts),h=(e,t)=>{let n=X(e.key)?.agentId;return!!e.sessionId?.trim()&&Z(e.key,t.key)&&r(e,t.agentId)===W(t.agentId)&&(!n||!e.agentId||W(e.agentId)===W(n))},g=e=>p(e)?e.snapshot.row:null,_=(e,t)=>p(e)&&h(t,e.target)&&!!(t.sessionId&&e.isValid(t.sessionId))&&(e.snapshot.sessionId===null||e.snapshot.sessionId===t.sessionId),v=(e,t,r,i=!1)=>_(e,t)&&(r>e.snapshot.invalidatedRevision||i&&e.snapshot.sessionId===null&&e.snapshot.invalidatedRevision===0&&n.hasObservation(t)),y=(e,t)=>{let r=e.snapshot,i=r.sessionId;if(f(e)&&!r.retired&&i)return t.some(({row:t,revision:a})=>t.sessionId&&t.sessionId!==i&&h(t,e.target)&&e.isValid(t.sessionId)&&(!e.isValid(i)||a>r.invalidatedRevision&&(!r.row||!n.hasNewerFacts(r.row,a))))?{entry:e,previous:r,snapshot:{...r,row:null,visible:null,retired:!0}}:void 0},b=n=>{let r=e.readState(),a=x(r.result?.sessions??[],r.agentId,n),o=e.connection.capture()?.epoch,s=new Map,l=(e,t)=>{let n=s.get(e);n?n.push(t):s.set(e,[t])};for(let e of t.values())if(e.connectionEpoch===o)for(let[t,r]of x(e.snapshot.result?.sessions??[],e.snapshot.agentId,n))l(t,r);for(let e of c){let t=g(e),r=t&&(!n||n.has(t.sessionId))&&i(t,e.target.agentId);t&&r&&l(r,t)}return{state:r,primaryRows:a,observedRows:s}},{indexRows:x,merge:S,prepareProjection:C,projectFields:w,heldRowsFor:T,currentRow:E}=A_(n,b),D=(e,t,r)=>n.observeReadRow(e,t,r,T(e,r)),O=(e,t,r)=>{if(e.length===0)return[];let i=b();return e.map(e=>({row:e,select:n.observeReadRow(e,t,r,T(e,r,i))}))},k=(n,r,o,m=!1,b=[],x)=>{if(!n||!e.connection.isCurrent(n))return{changed:!1,notify:()=>{}};let S=[...c],C=[],w=[];for(let[i,a]of t){if(a.connectionEpoch!==n.epoch)continue;let t=a.snapshot,o=e.decorate(r(a),a);o!==a.snapshot.result&&C.push({key:i,entry:a,previous:t,snapshot:{...t,result:o}})}for(let e of S){let t=y(e,b);if(t){w.push(t);continue}if(!p(e))continue;let n=e.snapshot,r=g(e),c=o?.({target:e.target,row:r})??{row:r},f=c.row&&(r!==null||m)&&(c.row===r||(m?v(e,c.row,c.observationRevision??s(c.row),!0):_(e,c.row)))?c.row:m&&c.row?r:null,S=f?e.decorate(f):null,C=f&&S&&h(S,e.target)&&i(S,e.target.agentId)===i(f,e.target.agentId)?a(S,f):null,T=!n.row||e.onInvalidate?Math.max(n.invalidatedRevision,c.invalidateRevision??0):n.invalidatedRevision;c.certification&&e.onInvalidate&&(l.set(e.target,c.certification),u.schedule());let E=l.get(e.target);E&&(T>=E.revision||m&&b.some(({row:t,revision:n})=>n>E.revision&&v(e,t,n)))&&d(e.target);let D=n.hasObserved||f!==null||!!c.eventResult?.deletedKey,O=n;(f!==n.row||C!==n.visible||D!==n.hasObserved||T!==n.invalidatedRevision)&&(O={row:C??f,visible:C,hasObserved:D,invalidatedRevision:T,sessionId:n.sessionId??f?.sessionId??null,retired:!!c.eventResult?.deletedKey},w.push({entry:e,previous:n,snapshot:O,invalidationReason:c.invalidationReason})),e.onEvent&&c.eventResult&&(!c.eventResult.admittedRow||_(e,c.eventResult.admittedRow))&&x?.results.set(e,{snapshot:O,result:{...c.eventResult,row:C??void 0}})}if(!e.connection.isCurrent(n))return{changed:!1,notify:()=>{}};let T=!1;for(let e of C)t.get(e.key)===e.entry&&e.entry.snapshot===e.previous&&(e.entry.snapshot=e.snapshot,T=!0);for(let e of w)f(e.entry)&&(e.snapshot.retired||p(e.entry))&&e.entry.snapshot===e.previous&&(e.entry.snapshot=e.snapshot,e.snapshot.retired&&d(e.entry.target,!0),T=!0);return{changed:T,notify:(r=[],i)=>{if(e.connection.isCurrent(n)){for(let e of S){let t=y(e,r);t&&(e.snapshot=t.snapshot,d(e.target,!0),w.push(t))}for(let{key:r,entry:i,snapshot:a}of C)for(let o of i.listeners){if(!e.connection.isCurrent(n))return;if(t.get(r)!==i||i.snapshot!==a)break;o(a)}for(let{entry:t,previous:r,snapshot:a,invalidationReason:o}of w){if(!e.connection.isCurrent(n))return;f(t)&&(a.retired||p(t))&&t.snapshot===a&&(a.retired&&t.onEvent&&x?.captures(t)?t.listener(a.visible,{eventPending:!0}):t.listener(a.visible),p(t)&&t.snapshot===a&&a.invalidatedRevision>r.invalidatedRevision&&t.onInvalidate?.(o??i))}}}}},ee=(e,t,n,a,c=!0)=>{let l=x(e,n),u=new WeakMap(e.map(e=>[e,a??s(e)])),{projectFields:d}=C();return k(t,t=>S(t.snapshot.result,c?e:[],t.snapshot.agentId,n),e=>{let t=e.row?i(e.row,e.target.agentId):null,a=t?l.get(t):[...l.values()].find(t=>r(t,n)===W(e.target.agentId)&&h(t,e.target));return{row:a?e.row?o(e.row,d(a,n),e.target.agentId):d(a,n):e.row,...!e.row&&a?{observationRevision:u.get(a)??0}:{}}},!0,e.map(e=>({row:e,revision:a??s(e)}))).notify},A=E_({connection:e.connection,canReuse:()=>e.observerError()===null,currentRow:e=>{let t=j.publishedRow((t,i)=>{let a=X(e.key)?.agentId??e.agentId;return Z(t.key,e.key)&&(!a||r(t,i)===W(a))&&n.hasObservation(t)});return t?w(t,e.agentId):void 0}}),j={descriptions:A,reset(){n.reset(),c.clear(),l.clear(),u.reset(),A.clear()},registerRow(t,r,i){let a={target:Object.freeze({...t}),scope:e.connection.capture(),listener:r,...i,snapshot:{row:null,visible:null,hasObserved:!1,sessionId:null,invalidatedRevision:0,retired:!1}};return c.add(a),{current:()=>g(a)?a.snapshot.visible:null,sessionId:()=>a.snapshot.sessionId,hasObserved:()=>a.snapshot.hasObserved,isCurrent:()=>p(a),readInvalidated:e=>e<=a.snapshot.invalidatedRevision,acceptsRead:(e,t)=>v(a,e,t),clear:e=>{let t=g(a);if(!p(a)||t&&n.hasNewerFacts(t,e))return()=>{};let r={...a.snapshot,row:null,visible:null,hasObserved:!0,invalidatedRevision:Math.max(a.snapshot.invalidatedRevision,e)};return a.snapshot=r,d(a.target),()=>{p(a)&&a.snapshot===r&&a.listener(null)}},dispose:()=>{c.delete(a),d(a.target,!0)}}},inheritRow:a,mergeRow:o,currentRow:E,mergeRows:S,publishedRow(n){let r=e.readState(),i=r.result?.sessions.find(e=>n(e,r.agentId));if(i)return i;for(let e of t.values()){let t=e.snapshot.result?.sessions.find(t=>n(t,e.scope.agentId));if(t)return t}for(let e of c){let t=g(e);if(t&&n(t,e.target.agentId))return t}},projectFields:w,prepareProjection:C,projectRows:e=>e.length===0?[]:C(e).projectRows(e),stageObservedRows:ee,stageManagedResults:k,captureEventDelivery:m,rowRevision:s,hasLiveObservation:t=>e.connection.capture()!==null&&n.hasObservation(t),isCurrentRow:(e,t,r)=>{let i=T(e,r),a=t??s(e);return!i.some(e=>s(e)>a)&&(t===void 0||i.some(n.hasObservation)||![...c].some(t=>_(t,e)&&!v(t,e,a,!0)))},bindOwner:(e,t)=>{for(let r of e?.sessions??[])n.bindOwner(r,t)},observeReadRows:O,observeFields:n.observeFields,fieldNames:n.fieldNames,fieldObservation:n.fieldObservation,stageRunTerminal:P_({readState:e.readState,prepareProjection:C,provenance:n,stage:k}),copyRow:(e,t)=>a({...e,...t},e),captureReconciliation(t){let n=e.connection.capture();return{scope:n,revision:t,observe:(e,n)=>D(e,t,n),isCurrent:(r,i)=>n!==null&&e.connection.isCurrent(n)&&(!r||j.isCurrentRow(r,Math.max(t,s(r)),i)),stage:(e,r)=>ee([e],n,r,t)}},accept(n,r,i,a,o=a,s=e.readState().agentId){let l=x(n?.sessions??[],a),u=S(S(n,r?.sessions??[],a,o),i?.sessions??[],a,s),d=e.connection.capture()?.epoch;for(let e of t.values())e.connectionEpoch===d&&(u=S(u,e.snapshot.result?.sessions??[],a,e.snapshot.agentId));for(let e of c){let t=g(e);t&&(u=S(u,[t],a,e.target.agentId,l))}return eu(u,j.projectRows(u?.sessions??[]))},inherit(e,t,n,r){let o=x(t?.sessions??[],r),s=x(n?.sessions??[],r);for(let t of e?.sessions??[]){let e=i(t,r);e&&a(t,o.get(e),s.get(e))}}};return j}function L_(){return(L_=e((()=>{g_(),cu(),O_(),Q(),j_(),ig(),F_()})))()}function R_(e){let t=cc(e.snapshot()),n=0,r=0,i=0,a=null,o=null,s={},c={scope:{}},l=`none`,u=typeof document<`u`&&typeof globalThis.addEventListener==`function`,d=!u||document.visibilityState!==`hidden`,f=new Map,p=I_(e,f),m=()=>{r=0,p.reset(),i+=1,a=null,o?.completions.forEach(({complete:e})=>e(null)),o=null},h=e=>{let t=mu(e),n=JSON.stringify(t),r=f.get(n);if(r)return r;let i={key:n,query:t,scope:Object.freeze({...e}),retainedLimit:t.limit,startupRetryAttempt:0,readGeneration:0,connectionEpoch:null,snapshot:{result:null,agentId:null,loading:!1,error:null},listeners:new Set,coordinator:m_({active:!1,refresh:e=>b(i,{append:!1,invalidated:!0,background:!0},e)}),pending:null,queued:null};return f.set(n,i),i},g=b_(f,h,e.onWarmListsRetired),_=(e=()=>!0)=>g.invalidate(e,s),v=(e,t)=>{g.retire(n=>n.key!==t&&e(n));for(let n of f.values())n.key!==t&&e(n)&&(n.readGeneration+=1,n.coordinator.schedule())},y=(e,t,n)=>{let r=fg({agentId:e,session:t}),i=n&&JSON.stringify(mu(n));v(e=>r(e.query,e.snapshot.result),i)},b=v_(e,{managedLists:f,observations:p,nextRevision:()=>++n,isPageActive:()=>d,publishPrimary:t=>e.publish({...e.readState(),result:e.decorate(t,c)})}),x=S_(e,()=>++n,p,()=>c),S=async(t,a=!1,o)=>{let u=e.connection.capture();if(!u)return null;let d=i,f=g.revision,m=()=>e.connection.isCurrent(u)&&d===i,{append:h=!1,force:_,backgroundHydrate:v=!1,...y}=t,b={...y};if(delete b.offset,v?(a||l===`none`)&&(s=b,l=`seeded`):(s=b,l=`foreground`),!v){let t=e.observerError();e.publish({...e.readState(),loading:!0,error:t,deletedSessions:[]},t?`session-observer`:void 0)}try{let i=++n,a=await hu(u.client,y,m);if(!m())return null;a=e.reconcileList(a,i,y.agentId);let o=e.readState(),l=!o.resultCached&&h&&typeof y.offset==`number`,d=o.resultCached?null:o.result,_=ru(a,d);p.inherit(_,a,d,y.agentId);let x=p.accept(_,o.result,null,y.agentId,o.agentId),S=x&&l&&d?nu(d,x):x;h&&S&&!v&&(s=Sg(b,y.offset,a,S,e.snapshot())),S&&=iu(S,{agentId:o.agentId,result:o.resultCached?{sessions:o.result?.sessions.filter(p.hasLiveObservation)??[]}:o.result},e.snapshot(),v),vg(c.scope,b,l)||(c={scope:b}),c.scope=h?s:b,S=e.decorate(S,c);let C=p.stageObservedRows(a?.sessions??[],u,y.agentId,i,!1);e.onCanonicalList(S,i,y.agentId,a),S&&y.agentId&&f===g.revision&&_g(c.scope)&&g.capture(c.scope,S,u.epoch);let w=e.readState(),T=e.observerError();return r=0,e.publish({...w,result:S,resultCached:!1,agentId:y.agentId?.trim()?W(y.agentId):null,loading:v?w.loading:!1,startupPending:!1,error:T,deletedSessions:[]},T?`session-observer`:void 0),C(),{options:t,matchesRequestedQuery:!0,result:a,outcome:{status:`refreshed`}}}catch(n){let i=J(n),a=o?.()!==!1;if(m()){let t=ac(n);t?O.scheduleRetry(oc(n,r++)):r=0;let o=e.readState();e.publish({...o,loading:v?o.loading:!1,error:a?lc(n,e.snapshot())?null:i:o.error,startupPending:t,deletedSessions:[]},a?`operation`:void 0)}return m()&&a?{options:t,matchesRequestedQuery:!0,result:null,outcome:{status:`failed`,error:i}}:null}},C=(t,n=!1,r)=>{let i=e.connection.capture();if(!i)return Promise.resolve(null);let s=!ug(t)&&typeof o?.intent==`function`?null:o;s&&(o=null);let c=e.snapshot(),l=yg(t,c),u=an(),d=null,f=u.promise.finally(()=>{if(a!==f)return;a=null;let t=o;t&&(s?.completions.some(({reconcile:e})=>e)&&(d=bg(t,l)),t.intent!==`explicit`&&!t.foreground?e.background(t,w):w())});return a=f,u.resolve(S(l,n,r)),s&&xg(s,f,f.then(t=>t??(e.connection.isCurrent(i)?d:null)),c),f},w=()=>{let t=o;if(a||!t)return Promise.resolve(null);let n=typeof t.intent==`function`?A(t.intent()):t.options;n.append||O.absorb();let r=e.snapshot(),i=vg(yg(t.errorOwner.options,r),yg(n,r),!1);return C(n,t.bootstrap,i?t.errorOwner.isCurrent:void 0)},T=(t,n,r,s=`explicit`,c=!1)=>{if(!e.connection.capture())return Promise.resolve(null);let l=ug(t);if(a||s!==`explicit`){let u=an();return o=hg(o,{options:t,errorOwner:{options:t,isCurrent:r},intent:s,foreground:c,bootstrap:n,completions:[{options:t,reconcile:s===`reconcile`,complete:u.resolve}]},e.snapshot()),l&&ug(o.options)&&(i+=1),a||(o.foreground?w():e.background(o,w)),u.promise}let u=Object.entries(t).some(([e,t])=>e!==`force`&&e!==`backgroundHydrate`&&t!==void 0);return e.readState().result&&!t.force&&!u?Promise.resolve({options:t,matchesRequestedQuery:!0,result:e.readState().result,outcome:{status:`refreshed`}}):(l&&(i+=1),t.append!==!0&&O.absorb(),C(t,n,r))},E=(e={})=>T(e,!1).then(()=>void 0),D=async t=>{let n=e.connection.capture();for(let e=a;e&&t();e=a)await e;if(n&&e.connection.isCurrent(n)&&t()){if(!d){O.setActive(!1,!0);return}o||await C({...s,force:!0})}},O=m_({active:d,refresh:t=>e.background(O,()=>D(t))}),k=e=>{let t=e.type===`pagehide`;d=!t&&document.visibilityState!==`hidden`,O.setActive(d,t||a!==null);for(let e of f.values())e.listeners.size>0&&e.coordinator.setActive(d,t||e.pending!==null)},ee=e=>{let t=e?`addEventListener`:`removeEventListener`;document[t](`visibilitychange`,k),globalThis[t](`pagehide`,k),globalThis[t](`pageshow`,k)};u&&ee(!0);let A=e=>({...s,...e?.trim()?{agentId:e.trim()}:{},force:!0}),j=w_(e,{foreground:()=>({agentId:s.agentId,initial:l===`none`}),replacementOptions:A,invalidate:y,refresh:(e,t)=>T(e,!1,t,`reconcile`),read:x.reconcile});return{observeGateway(e,n){let r=cc(e);r&&!t&&!n&&y(),t=r},captureReconciliation:()=>p.captureReconciliation(++n),observations:p,captureEvent(t){let r=e.connection.capture(),i=++n,a=fg(t);return{revision:i,scope:r,lists:gg(f.values(),t,a),affectsPrimary:a({agentId:s.agentId}),...p.captureEventDelivery(r,i)}},primaryList:()=>c,get requestRevision(){return n},list:x.list,listSnapshot(t){if(_g(t)){let{result:t,agentId:n,loading:r,error:i,startupPending:a}=e.readState();return{result:t,agentId:n,loading:r,error:i,startupPending:a}}return f.get(JSON.stringify(mu(t)))?.snapshot??{result:null,agentId:null,loading:!1,error:null}},subscribeList(e,t){return g.subscribe(h(e),t,d)},observeList:(t,n)=>{let r=h(t);return g.observe(r,n,d,e.connection,()=>b(r,{append:!1,invalidated:!0}))},refreshList(e={}){return _g(e)?E(e):b(h(e),{append:e.append===!0,...e.force===!0&&e.append!==!0?{invalidated:!0}:{},...e.offset===void 0?{}:{offset:e.offset}})},isPrimaryList:_g,async refreshManagedLists(){let t=e.connection.capture();t&&await Promise.all([...f.values()].filter(e=>e.listeners.size>0&&e.connectionEpoch!==t.epoch).map(e=>b(e,{append:!1,background:!0})))},refresh:E,bootstrap:e=>T(e,!0,void 0,`automatic`),refreshAutomatic:e=>T(e,!1,void 0,`automatic`),refreshReplacement:()=>T(A(),!1,void 0,`automatic`).then(e=>e?.matchesRequestedQuery?e.result:null),refreshSelection:(e,t=!1)=>(t&&(r=0,i+=1,a=null),T(A(e()),!1,void 0,e,t)),reconcileMutation:j,redecorateLists(){let t=e.readState(),n=e.decorate(t.result,c),r=p.stageManagedResults(e.connection.capture(),e=>e.snapshot.result);n!==t.result&&e.publish({...t,result:n});for(let t of f.values()){let n=e.decorate(t.snapshot.result,t);n!==t.snapshot.result&&__(t,{...t.snapshot,result:n})}r.notify()},lastOptions:()=>s,retireWarmLists:_,selectionPresentation(t){let n=e.connection.capture();return n&&!e.observerError()&&t?g.presentation(A(t),n.epoch):null},canApplyPrimarySnapshot(t){let n=!a&&e.readState();return n&&n.error===null&&!n.resultCached&&lg(n.result,t,s)},invalidateManagedLists:y,scheduleEvent(e={}){let t=dg(e.agentId),n=e.affectedLists;g.invalidate(e=>n?.has(e)??t(e.query.agentId),s),!e.primarySnapshotApplied&&(e.affectsPrimary??t(s.agentId))&&O.schedule(),n?v(e=>n.has(e)):y(e.agentId)},reset(){m(),c={scope:c.scope},O.reset();for(let e of f.values()){if(e.coordinator.reset(),e.startupRetryAttempt=0,e.pending=e.queued=null,e.listeners.size===0){e.coordinator.dispose(),f.delete(e.key);continue}(e.snapshot.loading||e.snapshot.error||e.snapshot.startupPending)&&__(e,{...e.snapshot,loading:!1,error:null,startupPending:!1})}},dispose(){m(),O.dispose(),u&&ee(!1);for(let e of f.values())e.coordinator.dispose(),e.listeners.clear();f.clear()}}}function z_(){return(z_=e((()=>{St(),Y(),uc(),g_(),cu(),Q(),Cg(),y_(),x_(),Su(),C_(),T_(),L_()})))()}async function B_(e,t){let n=await e.request(`sessions.recover`,t);if(!n?.key?.trim()||!n?.sessionId?.trim())throw Error(`sessions.recover returned no successor identity`);return n}function V_(e,t){let{key:n,...r}=fu(e,t);return{sessionKey:n,...r}}function H_(e){let t=new Set,n,r,i=!1,a=()=>r??=U(()=>import(`./control-ui-boot-chat-Ck7W_FPO.js`).then(e=>(e.a(),e.o)).then(e=>n=e,e=>{throw r=void 0,e}),__vite__mapDeps([28,3,2,4,5,8,7,6,9,27,1,10,11,12,13,17,18,19]),import.meta.url),o=async t=>{let n=e.connection.capture();if(!n)return null;try{let r=await B_(n.client,t);return e.connection.isCurrent(n)?(e.notifyCreated(r.key),await e.reconcileMutation(t.agentId),e.connection.isCurrent(n)?r:null):null}catch(t){return e.connection.isCurrent(n)&&e.reportError(t),null}},s=async(t,n={})=>{let r=e.connection.capture();if(!r)throw Error(`Session compaction requires an active Gateway connection`);let i=await r.client.request(`sessions.compact`,fu(t,n.agentId));if(!e.connection.isCurrent(r))throw Error(`Session compaction completed on a replaced Gateway connection`);return i},c=async(t,n)=>{let r=e.connection.capture();if(!r)return null;let i=await r.client.request(t,n);return e.connection.isCurrent(r)?i:null},l=(e,t={})=>c(`sessions.files.list`,{sessionKey:e,path:t.path??``,search:t.search??``,...t.agentId?.trim()?{agentId:t.agentId.trim()}:{}}),u=(e,t,n={})=>c(`sessions.files.get`,{sessionKey:e,path:t,...n.agentId?.trim()?{agentId:n.agentId.trim()}:{}}),d=(e,t,n,r)=>c(`sessions.files.set`,{sessionKey:e,path:t,content:n,expectedHash:r.expectedHash,...r.agentId?.trim()?{agentId:r.agentId.trim()}:{}}),f=async e=>{await(n??await a()).releaseGatewaySessionMessageSubscription(e),t.delete(e)},p=async(r,o={})=>{let s=e.connection.capture();if(!s||i)throw Error(`Session message subscription requires an active Gateway connection`);let c=r.trim(),l=o.agentId?.trim()?W(o.agentId):null,{mode:u,includeApprovals:d}=o,p=n??await a();if(i||!e.connection.isCurrent(s))throw Error(`Session message subscription completed on a replaced Gateway connection`);let m=await p.getGatewaySessionMessageSubscriptionCoordinator(s.client,{keysEquivalent:Z}).acquire(c,{agentId:l,...d?{includeApprovals:!0}:{},...u?{mode:u}:{}}).catch(t=>{throw t instanceof AggregateError&&t.errors[0]instanceof ut&&t.errors[0].requestSent&&!i&&e.connection.isCurrent(s)&&!U_.has(t)&&(U_.add(t),s.client.forceReconnect(`session subscription recovery failed`)),t});if(t.add(m),i||!e.connection.isCurrent(s))throw await f(m).catch(()=>void 0),Error(`Session message subscription completed on a replaced Gateway connection`);return m},m=async(t,n,r,i)=>{let a=e.connection.capture();if(!a)throw Error(t);let o=await a.client.request(n,r);return e.connection.isCurrent(a)&&await e.reconcileMutation(i).catch(()=>{}),o};return{compact:s,forkAtMessage:(e,t,n={})=>m(`Session fork requires an active Gateway connection`,`sessions.fork`,{...V_(e,n.agentId),entryId:t},n.agentId),getFile:u,listBranches:async(e,t={})=>(await c(`sessions.branches.list`,V_(e,t.agentId)))?.branches??[],listFiles:l,recover:o,rewind:(e,t,n={})=>m(`Session rewind requires an active Gateway connection`,`sessions.rewind`,{...V_(e,n.agentId),entryId:t},n.agentId),setFile:d,subscribeMessages:p,switchBranch:(e,t,n={})=>m(`Session branch switch requires an active Gateway connection`,`sessions.branches.switch`,{...V_(e,n.agentId),leafEntryId:t},n.agentId),unsubscribeMessages:f,retireConnection:e=>{e&&n?.resetGatewaySessionMessageSubscriptionCoordinator(e),t.clear()},dispose:()=>{i=!0;for(let e of t)f(e).catch(()=>void 0)}}}var U_;function W_(){return(W_=e((()=>{kn(),Q(),Su(),G(),U_=new WeakSet})))()}function G_(e,t){let n=new Map,r=new Map,i=(t,n)=>{let r=X(t)?.agentId??n??ga(e.snapshot);return`${ua(t)}\0agent:${W(r)}`};return{get:(e,t)=>{let a=i(e,t);return r.has(a)?void 0:n.get(a)?.[0]},clear:(e,t)=>{let a=i(e,t);return r.delete(a),n.delete(a)},suspend:(e,t)=>{let a=i(e,t);if(!n.has(a))return;let o=Symbol(`session-thinking-claim-suspension`),s=r.get(a)??new Set;return s.add(o),r.set(a,s),()=>{let e=r.get(a);e?.delete(o)&&e.size===0&&r.delete(a)}},reset:()=>{n.clear(),r.clear()},recordCreated(e,r,a){typeof r?.thinkingLevel==`string`&&typeof r.updatedAt==`number`&&n.set(i(e,a),[r.thinkingLevel,r.updatedAt,t()])},settle(e,t,r){let a=i(e.key,r),o=n.get(a),s=o?.[1]===void 0?o!==void 0&&t>o[2]:(e.updatedAt??-1)>o[1]||e.updatedAt===o[1]&&t>o[2];o&&(e.thinkingLevel===o[0]||s)&&n.delete(a)},observeEvent(e,r){let a=!1;if(e.applied&&e.key&&r){let o=i(e.key,r.agentId),s=n.get(o),c=r.thinkingLevel,l=r.updatedAt===null||s?.[1]===void 0||r.updatedAt>=s[1],u=e.deletedKey||r.archived===!0&&!e.row;if(s&&l&&u)a=n.delete(o);else if(s&&l&&!e.row&&typeof c==`string`){let e=[c,r.updatedAt??void 0,t()];a=s[0]!==e[0]||s[1]!==e[1]||s[2]!==e[2],a&&n.set(o,e)}else s&&l&&c!==void 0&&(a=n.delete(o))}return a}}}function K_(){return(K_=e((()=>{Q()})))()}function q_(e,t,n,r){e.delete(t),e.set(t,n),pt(e,r)}var J_,Y_,X_;function Z_(){return(Z_=e((()=>{cu(),J_=1e4,Y_=1e5,X_=class{constructor(){this.currentPhaseByGroup=new Map,this.phaseRankByGroupPhase=new Map,this.nextPhaseRank=0,this.latestLogByGroup=new Map,this.phaseByChild=new Map}clear(){this.currentPhaseByGroup.clear(),this.phaseRankByGroupPhase.clear(),this.nextPhaseRank=0,this.latestLogByGroup.clear(),this.phaseByChild.clear()}observe(e){let t=B(e);if(!t)return!1;let n=B(t.session)??t,r=R(t.swarmGroupId)??R(n.swarmGroupId);if(!r)return!1;let i=R(t.kind),a=R(t.text);if((i===`phase`||i===`log`)&&a){if(i===`phase`){let e=`${r}\u0000${a}`;this.phaseRankByGroupPhase.has(e)||(q_(this.phaseRankByGroupPhase,e,this.nextPhaseRank,Y_),this.nextPhaseRank+=1)}return q_(i===`phase`?this.currentPhaseByGroup:this.latestLogByGroup,r,a,J_),!0}let o=R(n.key)??R(t.sessionKey);if(!o)return!0;let s=R(n.swarmPhase)??R(t.swarmPhase);if(s)return q_(this.phaseByChild,o,s,Y_),!0;if(R(t.reason)===`create`&&!this.phaseByChild.has(o)){let e=this.currentPhaseByGroup.get(r);e&&q_(this.phaseByChild,o,e,Y_)}return!0}decorate(e){return e&&eu(e,e.sessions.map(e=>{let t=this.phaseByChild.get(e.key)??e.swarmPhase,n=e.swarmGroupId?.trim(),r=(n?this.latestLogByGroup.get(n):void 0)??e.swarmLog,i=(t&&n?this.phaseRankByGroupPhase.get(`${n}\u0000${t}`):void 0)??e.swarmPhaseRank;return t===e.swarmPhase&&r===e.swarmLog&&i===e.swarmPhaseRank?e:{...e,...t?{swarmPhase:t}:{},...i===void 0?{}:{swarmPhaseRank:i},...r?{swarmLog:r}:{}}}))}}})))()}function Q_(e,t,n={}){let r={result:null,agentId:null,modelOverrides:{},loading:!1,error:null,deletedSessions:[],groups:n.bootRecord?.groups.map(e=>e.name)??[],groupSettings:n.bootRecord?.groups??[],sectionOrder:n.bootRecord?.sectionOrder??[]},i={result:null,agentId:null},a=null,o=e.snapshot.phase===`connected`?e.snapshot.selfUser?.id.trim()??null:n.bootRecord?.profileId,s=()=>{(i.result||r.result||a!==null)&&(a=y+1),i={result:null,agentId:null}},c=f_(e,t,n,{readState:()=>r,publish:e=>{A.retireWarmLists(),s(),e.resultCached&&(i={result:e.result,agentId:e.agentId,resultCached:!0}),E(e)},connected:()=>l.capture()!==null,query:()=>A.lastOptions()}),l=cf(e.snapshot),u=async(t,r)=>{let i=l.capture(),a=async()=>{i&&l.isCurrent(i)&&e.snapshot.client===i.client&&await r()};await(n.connectionBootstrap?.run(t,a,{background:!0})??a())},d=Dh({connection:l,snapshot:()=>e.snapshot,deletionState:e=>N.deletionState(e.key,e.agentId,e.sessionId)}),f=new X_,p=new Map,m=new Map,h=new Set,g=new Set,_=G_(e,()=>A.requestRevision),v=0,y=0,b=null,x=null,S=e.snapshot.client,C=null,w=null,T=()=>{v+=1;for(let e of h)e(r)},E=(e,t)=>{e.error===null?w=null:(t||e.error!==r.error)&&(w=t??`operation`),A.observations.bindOwner(e.result,e.agentId),r=e,(a===null||y>=a)&&(i={result:e.result,agentId:e.agentId,resultCached:e.resultCached},e.resultCached||(a=null)),d.observeRows(e.result?.sessions??[],e.agentId),c.persist(e),T()},D=e=>{let t=e.trim();m.delete(t),p.delete(t)},O=(e,t=A.primaryList())=>{let n=ee.apply(e,A.observations.rowRevision,t.scope.agentId),r=f.decorate(n);A.observations.inherit(r,n);let i=N.apply(M.applyPendingRows(M.applyConfirmedArchives(r),t.scope.agentId),t);return A.observations.inherit(i,e),i},k=Sh({isCurrent:l.isCurrent,retryDelayMs:Jg,onError:(e,t)=>{if(!l.isCurrent(e))return;let n=C;C=t,t!==null&&(A.retireWarmLists(),A.observations.descriptions.clear());let i=w===`session-observer`;t!==null&&(r.error===null||i)?E({...r,error:t},`session-observer`):t===null&&i?E({...r,error:null}):n!==t&&T(),n!==null&&t===null&&(d.invalidate(),A.refreshAutomatic({...A.lastOptions(),backgroundHydrate:!0,force:!0}),A.invalidateManagedLists())}}),ee=Wg(e,()=>A),A=R_({background:u,connection:l,snapshot:()=>e.snapshot,readState:()=>r,publish:E,onWarmListsRetired:e=>{let n=t.state.selectedId;!i.result&&n&&e.has(W(n))&&T()},observerError:()=>C,decorate:O,reconcileList:(e,t,n)=>{let r=N.reconcileList(e&&{...e,sessions:e.sessions.map(Pl)},t,n),i=A.observations.observeReadRows(r?.sessions??[],t,n),a=ee.reconcileList(r,t,n);return A.observations.inherit(a,r),a&&(A.observations.projectRows(a.sessions).forEach((e,t)=>{let r=i[t];r&&M.observePendingFields(r.row,r.select(e,Rg),n)}),a)},onCanonicalList(e,t,n,r){d.observeRows(r?.sessions??e?.sessions??[],n),M.settlePrepared(e);for(let e of r?.sessions??[])_.settle(e,t,n);y+=1}}),j=Hh({connection:l,snapshot:()=>e.snapshot,readState:()=>r,publish:E,refreshRows:()=>A.refresh({...A.lastOptions(),force:!0}),retryDelayMs:Jg}),te=(e,t,n)=>{A.retireWarmLists(),_.recordCreated(e,t,n);for(let t of g)t(e)},ne=(e,t)=>{A.retireWarmLists(),A.observations.descriptions.clear(),E(e,t)},M=Hg({connection:l,snapshot:()=>e.snapshot,findRow:e=>{let t=A.observations.publishedRow(e);return t?A.observations.projectFields(t):void 0},readState:()=>r,publish:ne,copyRow:A.observations.copyRow,stageManagedResults:A.observations.stageManagedResults,reconcileMutation:A.reconcileMutation,publishedRow:e=>A.observations.publishedRow(t=>t.key===e),archiveFields:A.observations,readRevision:()=>A.requestRevision,redecorateLists:A.redecorateLists,notifyPendingChange:T,notifyCreated:te,clearThink:_.clear,suspendThink:_.suspend,claimPermissionProjection:ee.claim,capturePatchFields:e=>P(e),retirePullRequestSummary:D}),N=bh({connection:l,snapshot:()=>e.snapshot,requestRevision:()=>A.requestRevision,readState:()=>r,publish:ne,publishedRow:A.observations.publishedRow,redecorateLists:A.redecorateLists,invalidateLists:A.scheduleEvent,reconcileMutation:A.reconcileMutation,reconcilePreviousConnection:M.reconcileConfirmedPreviousConnection,retire:M.retireDeletedSession}),{dispose:re,retireConnection:ie,...ae}=H_({connection:l,reconcileMutation:A.reconcileMutation,notifyCreated:te,reportError:e=>E({...r,error:J(e)},`operation`)}),oe=e=>p.get(e.trim()),se=e=>{let t={};return m.set(e.trim(),t),t},ce=(e,t,n)=>{let i=e.trim();!i||n!==void 0&&m.get(i)!==n||p.get(i)!==t&&(t?p.set(i,t):p.delete(i),E({...r}))},{reconcile:le,captureReconcile:ue,capturePatchFields:P,reconcileChangedEvent:de,observeRow:fe}=Kg({readState:()=>r,publish:E,canonicalListRevision:()=>y,connection:l,snapshot:()=>e.snapshot,permissions:ee,mutations:M,thinkingClaims:_,decorate:O,deletions:N,githubPublication:d,roster:A}),pe=e=>{let t=w===`operation`,n=t?r.error:C;E({...e,error:n},n===null?void 0:t?`operation`:`session-observer`)},me=e=>{let t=A.captureReconciliation();if(t.scope&&!l.isCurrent(t.scope))return!1;for(let t of e.sessionKeys)t.trim()&&A.invalidateManagedLists(X(t)?.agentId??e.agentId,{key:t});let n=r.result,{result:i,changed:a,notify:o}=A.observations.stageRunTerminal(e,t);return i!==n&&pe({...r,result:i}),o(),a},he=e.subscribe(e=>{let n=S,u=e.phase===`connected`,h=e.selfUser?.id.trim()||null,g=l.transition(e);if(u?(o!==void 0&&o!==h&&(A.retireWarmLists(),s(),T()),o=h):e.client?i.result&&a===null&&(a=y+1):s(),A.observeGateway(e,g),c.synchronize(e),S=e.client,d.observeRows([]),g){n!==e.client&&N.clear();let t=p.size>0,i=C!==null;_.reset(),ee.clear(),A.reset(),k.reset(),C=null,ie(n),j.invalidate(),f.clear(),M.retireConnection(),p.clear(),m.clear(),(t||i)&&u&&e.client&&E({...r})}if(!u||!e.client){b=null,x=null,E({...r,result:r.resultCached?r.result:null,agentId:r.resultCached?r.agentId:null,loading:!1,error:null,startupPending:!1,deletedSessions:[]});return}let v=b!==e.client;if(v||x!==h){let e=l.capture();if(!e)return;if(b=e.client,x=h,!v){A.scheduleEvent();return}k.ensure(e),A.bootstrap({...A.lastOptions(),agentId:t.state.selectedId??void 0,includeDerivedTitles:!0,includeLastMessage:!0,backgroundHydrate:!0,force:!0}).then(()=>{l.isCurrent(e)&&A.refreshManagedLists()}).catch(()=>void 0)}}),ge=yh(t,(n,r)=>{s(),T(),n&&b===e.snapshot.client&&A.refreshSelection(()=>t.state.selectedId,r)}),_e=e.subscribeEvents(e=>{if(e.event===`controlUi.sessionPullRequests.changed`){d.observePullRequests(e.payload);return}if((e.event===`config.changed`||e.event===`chat.metadata.changed`)&&A.observations.descriptions.clear(),e.event===`config.changed`){A.scheduleEvent();return}if(e.event!==`sessions.changed`&&e.event!==`session.message`)return;A.observations.descriptions.invalidateEvent(e.payload);let t=e.payload;if(e.event===`sessions.changed`&&t?.reason===`activity-summary`){A.captureEvent(e.payload).deliver(e);return}let n=A.canApplyPrimarySnapshot(e.payload),i=A.captureEvent(e.payload),a=f.observe(e.payload),{eventInfo:o,reconciled:s,claimChanged:c,notifyManaged:p,notifyEvent:m}=de(e.payload,i,{resultAgentId:r.agentId,archivedFilter:A.lastOptions().archivedFilter});if(i.scope&&!l.isCurrent(i.scope))return;let h=s.hasActiveRun??o?.hasActiveRun,g=s.status??o?.status,_=h===!1||g!=null&&g!==`running`,v=e.event===`session.message`&&_,y=s.applied&&n,b=!1;if(c||a||o?.archived!==null&&!v||!v&&s.applied&&(s.result!==r.result||s.deletedKey)||y){let e=O(s.result);(c||e!==r.result)&&(pe({...r,result:e}),b=!0)}if(p?.(b),i.scope&&!l.isCurrent(i.scope))return;let x=t?.reason,S=t?.agentId;if(x===`groups`&&(j.invalidate(),u(j.load,()=>j.load())),e.event===`session.message`&&!_){m?.(e);return}A.scheduleEvent({agentId:o?.agentId??X(o?.key)?.agentId??(typeof S==`string`?S:void 0),primarySnapshotApplied:y,affectsPrimary:i.affectsPrimary,affectedLists:i.lists}),m?.(e)});return{get revision(){return v},get state(){return r},get eventSubscriptionError(){return C},get presentation(){return i.result?i:A.selectionPresentation(t.state.selectedId)??i},get canonicalListRevision(){return y},githubPublication:d,get cachedRoutingDefaults(){return c.routingDefaults},whenCachedRosterSettled:()=>c.settled,captureConnectionScope:l.capture,isConnectionScopeCurrent:l.isCurrent,describe:A.observations.descriptions.describe,list:A.list,observeList:A.observeList,listSnapshot:A.listSnapshot,subscribeList(e,t){return A.isPrimaryList(e)?_n(h,()=>t(A.listSnapshot(e))):A.subscribeList(e,t)},refreshList:A.refreshList,reconcile:le,captureReconcile:ue,observeRow:fe,inheritRow:A.observations.inheritRow,projectRows:A.observations.projectRows,reconcileRunTerminal:me,refresh:A.refresh,invalidate:A.scheduleEvent,refreshReplacement:A.refreshReplacement,reconcileMutation:A.reconcileMutation,capturePermissionObservation:ee.capture,createResult:M.createResult,create:M.create,...ae,patch:M.patch,patchMany:M.patchMany,archiveVisibility:M.archiveVisibility,beginArchive:M.beginArchive,assignOwner:M.assignOwner,retireModelOverride:M.retireModelOverride,think:_.get,settingsPreview:M.settingsPreview,patchRowLocal:M.patchRowLocal,isPreparedWorkSession:M.isPreparedWorkSession,pullRequestSummary:oe,capturePullRequestEpoch:se,setPullRequestSummary:ce,delete:N.delete,deleteMany:N.deleteMany,deletionState:N.deletionState,reset:M.reset,groupsLoad:j.load,groupsGeneration:j.generation,groupsStatus:j.status,groupsInvalidate:j.invalidate,groupsPut:j.put,groupsRename:j.rename,groupsUpdate:j.update,groupsDelete:j.delete,subscribeCreated:e=>_n(g,e),subscribe:e=>_n(h,e),dispose(){s(),c.dispose(),d.clear(),A.dispose(),re(),l.dispose(),j.dispose(),b=null,x=null,M.dispose(),ee.clear(),N.clear(),f.clear(),p.clear(),m.clear(),k.dispose(),he(),ge(),_e(),g.clear(),h.clear()}}}function $_(){return($_=e((()=>{Pt(),Y(),xh(),Ch(),kh(),Kh(),Q(),Ug(),zg(),Gg(),qg(),Qg(),p_(),z_(),$l(),W_(),K_(),Z_(),Su(),F_(),Dl()})))()}function ev(){try{let e=kr()?.getItem(tv);return e===`card`||e===`off`?e:`pill`}catch{return`pill`}}var tv;function nv(){return(nv=e((()=>{tv=`openclaw.chat.observerHud.display`})))()}function rv(e,t){return e.request(`sessions.observer.visibility`,{visible:t})}function iv(){return(iv=e((()=>{})))()}function av(e,t,n){return!new URLSearchParams(e.search+`&`+e.hash.slice(1)).has(`session`)&&!a(e.pathname,t)&&(n(e.pathname,t)===null||/^\/chat(?:\/main)?\/?$/u.test(e.pathname.slice(t.length)))}async function ov(e){let t=await e.initialLocationReady;if(!g(e.history.location(),t)&&e.shouldInstallLocation?.()!==!1&&(e.installLocation?await e.installLocation(t):e.history.replace(t)),!e.enabled)return e.onInitialDecision?.(),()=>void 0;let{context:n}=e,r=()=>g(e.history.location(),t),i=e.redirect??(()=>n.replace(`model-setup`,{search:`?firstRun=1`})),a=!1,o=()=>{a||(a=!0,e.onInitialDecision?.())},s=e=>{if(a)return;if(e.phase!==`connected`){(e.hello||e.phase===`reload-required`||e.phase===`stopped`)&&o();return}let t=fa(e),s=n.agentSelection.state.selectedId?.trim()||null;if(Ye(e,`openclaw.setup.detect`,`operator.admin`)&&(!s||s===t?.defaultAgentId?.trim())&&r()){if(t?.modelConfigured===!1)i();else if(t?.modelConfigured)try{if(localStorage.getItem(`openclaw.modelSetup.pendingActivation.v1`)){let t=n.gateway.connectionRevision;U(async()=>{let{resumeFirstRunActivation:e}=await import(`./first-run-activation-receipt-sjoKnQlo.js`).then(e=>(e.i(),e.r));return{resumeFirstRunActivation:e}},__vite__mapDeps([129,5,4,73]),import.meta.url).then(({resumeFirstRunActivation:c})=>c({context:n,isStillDefaultLanding:r,redirect:i},e,t,s,()=>a,o)).catch(o);return}}catch{}}o()},c=n.gateway.subscribe(s);return s(n.gateway.snapshot),()=>{c(),o()}}function sv(){return(sv=e((()=>{P(),Qe(),Q(),G()})))()}var cv,lv,uv,dv;function fv(){return(fv=e((()=>{gn(),Qt(),qn(),Pe(),Y(),Qe(),G(),cv={pages:`page`,navigation:`navigation`,panels:`panel`,actions:`action`,accessories:`accessory`,widgets:`widget`,replacements:`replacement`},lv=/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/,uv=15e3,dv=class{constructor(e){this.getContext=e,this.owners=new Map,this.selected=new Map,this.listeners=new Set,this.loadingOwners=new Set,this.loadingCatalog=null,this.stops=[],this.client=null,this.connectionId=null,this.refreshGeneration=0,this.disposed=!1,this.diagnostics=[],this.grantTimer=null}get errors(){let e=[...this.owners.values(),...this.loadingOwners].flatMap(e=>Object.keys(cv).filter(t=>e.contributions[t].size>0&&e.descriptor.uiCapabilities&&!e.descriptor.uiCapabilities.includes(cv[t])).map(t=>({pluginId:e.descriptor.pluginId,message:`Registered UI capability "${cv[t]}" is missing from uiCapabilities in openclaw.plugin.json.`})));return[...this.diagnostics,...e]}get hasPlugins(){return this.owners.size>0||this.loadingOwners.size>0}isLoading(e){return this.loadingCatalog===`pending`||this.loadingCatalog?.has(e)===!0||[...this.loadingOwners].some(t=>t.descriptor.pluginId===e)}get canReload(){let e=this.getContext().gateway.snapshot;return!this.disposed&&e.phase===`connected`&&x(e).canAdmin&&Xe(e,`plugins.controlUi.reload`)===!0}async reload(){if(!this.canReload||!this.client)throw Error(`Reloading plugin UI requires a connected operator with admin access.`);let e=this.client,t=this.connectionId;if(await e.request(`plugins.controlUi.reload`,{}),this.disposed||this.client!==e||this.connectionId!==t)throw Error(`The connection changed while reloading plugin UI. Reconnect and retry.`);await this.refresh()}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}invalidate(e){if(!this.isCurrent(e))throw Error(`This plugin UI activation has ended.`);this.publish()}start(){let e=this.getContext();this.stops.push(e.gateway.subscribe(()=>this.syncConnection()),e.gateway.subscribeEvents(e=>{(e.event===`plugins.controlUi.changed`||e.event===`plugins.changed`)&&this.refresh()})),this.syncConnection()}syncConnection(){let e=this.getContext().gateway.snapshot,t=e.phase===`connected`?e.client:null,n=t?e.hello?.server?.connId??null:null;(this.client!==t||this.connectionId!==n)&&(this.retireOwners(),this.client=t,this.connectionId=n,this.diagnostics=[],this.publish(),t&&Xe(e,`plugins.controlUi.list`)&&this.refresh())}async refresh(){let e=this.client;if(!e||this.disposed)return;let t=++this.refreshGeneration;for(let e of this.loadingOwners)this.disposeOwner(e);this.loadingOwners.clear(),this.loadingCatalog=`pending`,this.publish();let n=()=>!this.disposed&&this.client===e&&this.refreshGeneration===t;try{let t=await e.request(`plugins.controlUi.list`,{});if(!n())return;this.diagnostics=t.diagnostics;let r=new Set(t.plugins.map(e=>e.pluginId));this.loadingCatalog=r;for(let[e,t]of this.owners)r.has(e)||(this.owners.delete(e),this.disposeOwner(t));if(this.publish(),t.plugins.length){let i=new URL(e.gatewayUrl,window.location.href);if(i.protocol=i.protocol.replace(/^ws/u,`http`),!E(e.gatewayUrl)){this.loadingCatalog=null;let r=Error(`Native plugin UI requires the Control UI served by the connected Gateway. Open ${i.origin} and reconnect there.`);await Promise.all(t.plugins.map(t=>(this.reportError(t.pluginId,r),this.reportActivation(t,e,n,`failed`,r))));return}let a=await this.getContext().config.refresh();if(!n())return;if(!a)throw Error(`Could not authenticate native plugin assets. Reconnect and retry.`);for(let i of t.plugins){let t=Rt(i.pluginId,this.getContext().resourceBasePath);if(a.pluginAssetsRequireAuth&&(!window.isSecureContext||!a.pluginFrameGrants.some(e=>e.pluginId===i.pluginId&&e.match===`prefix`&&e.path===t))){r.delete(i.pluginId);let t=Error(window.isSecureContext?`Native plugin asset grant unavailable: ${i.pluginId}`:`Native plugin UI requires HTTPS or localhost to authenticate its assets. Open this Gateway through HTTPS/Tailscale Serve, or use its loopback dashboard.`);if(this.reportError(i.pluginId,t),await this.reportActivation(i,e,n,`failed`,t),!n())return}}a.pluginAssetsRequireAuth&&this.startGrantRenewal()}let i=t.plugins.filter(e=>r.has(e.pluginId)&&this.owners.get(e.pluginId)?.descriptor.revision!==e.revision).map(t=>this.activate(t,e,n));this.loadingCatalog=null,this.publish(),await Promise.all(i),this.publish()}catch(e){n()&&(this.loadingCatalog=null,this.reportError(`host`,e),this.publish())}}startGrantRenewal(){this.grantTimer===null&&(this.grantTimer=setInterval(()=>{this.client&&this.owners.size&&this.getContext().config.refresh().catch(e=>this.reportError(`host`,e))},Gn/2))}async activate(e,t,n){let r=new AbortController,i={descriptor:e,client:t,abort:r,disposers:new Set,contributions:{pages:new Map,navigation:new Map,panels:new Map,actions:new Map,replacements:new Map,accessories:new Map,widgets:new Map},selections:new Map};this.loadingOwners.add(i);try{let a=[],o=await vn(pn((async()=>{let{initializeControlUiPlugin:e}=await U(async()=>{let{initializeControlUiPlugin:e}=await import(`./control-ui-loader-MOtpn6us.js`);return{initializeControlUiPlugin:e}},__vite__mapDeps([177,3,2,4,5,8,7,6,9,11,1,10,12,13,17,19,18]),import.meta.url);return e(this.getContext,this,i,a,()=>this.disposeOwner(i))})(),r.signal,()=>Error(`Plugin UI activation ended.`)),uv,()=>{throw Error(`Plugin UI initialization timed out. Check the plugin and reload its UI.`)});if(!o||!n()||r.signal.aborted){this.disposeOwner(i);return}let s=[...o.selections].map(([t,n])=>{if(n===null)return[t,null];let r=o.contributions.replacements.get(n);if(r?.value.surface!==t)throw Error(`The selected UI replacement is unavailable.`);return[t,{key:`${e.pluginId}/${n}`,signal:r.signal}]}),c=this.owners.get(e.pluginId);if(this.loadingOwners.delete(i),this.owners.set(e.pluginId,o),c)for(let[t,n]of this.selected){let r=n.key.slice(e.pluginId.length+1);if(n.signal.aborted||n.signal!==c.contributions.replacements.get(r)?.signal)continue;let i=o.contributions.replacements.get(r);i?.value.surface===t?this.selected.set(t,{key:n.key,signal:i.signal}):this.selected.delete(t)}for(let[e,t]of s)t===null?this.selected.delete(e):this.selected.set(e,t);for(let e of a)e.media=`all`;c&&this.disposeOwner(c),this.publish(),await this.reportActivation(e,t,n,`activated`)}catch(r){this.loadingOwners.delete(i),this.disposeOwner(i),n()&&(this.reportError(e.pluginId,r),this.publish(),await this.reportActivation(e,t,n,`failed`,r))}finally{this.loadingOwners.delete(i)}}async reportActivation(e,t,n,r,i){if(n())try{await t.request(`plugins.controlUi.report`,{pluginId:e.pluginId,revision:e.revision,status:r,...i===void 0?{}:{error:J(i,`Plugin UI activation failed.`).slice(0,512)}})}catch(t){n()&&this.reportError(e.pluginId,t)}}isCurrent(e){return!this.disposed&&!e.abort.signal.aborted&&this.client===e.client}register(e,t,n){if(!this.isCurrent(e))throw Error(`This plugin UI activation has ended.`);let r=e.contributions[t],i=n.id;if(!lv.test(i)||r.has(i))throw Error(`Invalid or duplicate plugin UI contribution: ${i}`);let a=new AbortController,o={value:n,signal:AbortSignal.any([e.abort.signal,a.signal])};r.set(i,o);let s=()=>{if(e.disposers.delete(s)){if(r.delete(i),t===`replacements`){for(let[t,n]of e.selections)n===i&&e.selections.delete(t);this.clearSelections(o.signal)}a.abort(),this.publish()}};return e.disposers.add(s),this.publish(),s}registrations(e){let t=[];for(let n of this.owners.values())for(let[r,i]of n.contributions[e])t.push({key:`${n.descriptor.pluginId}/${r}`,pluginId:n.descriptor.pluginId,value:i.value,host:n.host,signal:i.signal});return t.toSorted((e,t)=>e.key.localeCompare(t.key))}selectedReplacement(e){let t=this.selected.get(e);return this.registrations(`replacements`).find(n=>n.key===t?.key&&n.signal===t.signal&&n.value.surface===e)}selectReplacement(e,t){if(t===null)this.selected.delete(e);else{let n=this.registrations(`replacements`).find(n=>n.key===t&&n.value.surface===e);if(!n)throw Error(`The selected UI replacement is unavailable.`);this.selected.set(e,{key:t,signal:n.signal})}this.publish()}reportError(e,t){let n=J(t,`Plugin UI failed.`);this.diagnostics.some(t=>t.pluginId===e&&t.message===n)||(this.diagnostics=[...this.diagnostics.filter(t=>t.pluginId!==e),{pluginId:e,message:n}].slice(-20),this.publish())}publish(){for(let e of this.listeners)e()}disposeOwner(e){for(let{signal:t}of e.contributions.replacements.values())this.clearSelections(t);e.abort.abort();for(let t of[...e.disposers].toReversed())try{t()}catch(t){this.reportError(e.descriptor.pluginId,t)}e.disposers.clear()}clearSelections(e){for(let[t,n]of this.selected)n.signal===e&&this.selected.delete(t)}retireOwners(){this.refreshGeneration+=1,this.loadingCatalog=null,this.grantTimer!==null&&(clearInterval(this.grantTimer),this.grantTimer=null);let e=[...this.owners.values(),...this.loadingOwners];this.owners.clear(),this.loadingOwners.clear();for(let t of e)this.disposeOwner(t)}dispose(){this.disposed=!0,this.retireOwners();for(let e of this.stops)e();this.stops.length=0,this.listeners.clear()}}})))()}function pv(e){let t=e.client??e,n=gv.get(t);return n===void 0&&(n=++_v,gv.set(t,n)),n}function mv(e,t){let n=X(t.sessionKey),r=t.agentId?.trim(),i=r?W(r):n?W(n.agentId):va(t.sessionKey)?ga(e):ma(e),a=ua(t.sessionKey),o=n?a.split(`:`).slice(2).join(`:`):a,s=pa(e);return`agent:${i}:${va(t.sessionKey)||o===`main`||o===s?hn:o}`}function hv(e,t){let n=mv(e,t),r=e.settings?.gatewayUrl,i=M({client:e.client});return`scope:${r&&i?JSON.stringify([tr(r),i]):`unowned:${pv(e)}`}\u0000${n}`}var gv,_v;function vv(){return(vv=e((()=>{Oe(),Q(),gv=new WeakMap,_v=0})))()}function yv(e,t){let n=new URLSearchParams;return e&&n.set(`agent`,e),t?.catalogId&&n.set(`catalog`,t.catalogId),t?.group&&n.set(`group`,t.group),n.size>0?`?${n.toString()}`:``}function bv(e){let t=new URLSearchParams(e);return{agentId:t.get(`agent`)?.trim()??``,catalogId:t.get(`catalog`)?.trim()??``,group:t.get(`group`)?.trim()??``}}function xv(){return(xv=e((()=>{})))()}function Sv(e){if(!z(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(!n.trim()||!z(r))continue;let e=typeof r.activeTabId==`string`?r.activeTabId.trim():``,i={};if(z(r.reopenDockByTab))for(let[e,t]of Object.entries(r.reopenDockByTab).slice(0,50)){let n=e.trim();n&&(t===`bottom`||t===`left`||t===`right`)&&(i[n]=t)}(e||Object.keys(i).length!==0)&&(t[n]={...e?{activeTabId:e}:{},...Object.keys(i).length>0?{reopenDockByTab:i}:{}})}return t}function Cv(e,t,n){let r=t.trim();if(!r)return Sv(e);let i=Sv(e),a=i[r]??{};return delete i[r],i[r]={...a,...n},Object.fromEntries(Object.entries(i).slice(-500))}function wv(){return(wv=e((()=>{})))()}function Tv(e){return Math.min(Pv,Math.max(260,e))}function Ev(e){return Math.min(Fv,Math.max(220,e))}function Dv(e){return e.dock===`bottom`||e.dock===`left`?e.dock:`right`}function Ov(e){return e.columns[0]?.panels.find(t=>t.id===e.mainPanelId)}function kv(e){return e.columns[0]?.panels.filter(t=>t.id!==e.mainPanelId)??[]}function Av(e){return kv(e).find(t=>t.id===e.columns[0]?.activePanelId)}function jv(e,t){return e.expanded&&e.expandedSide?e.open===!0&&Av(e)?.slot===t:(Ov(e)?.slot??`conversation`)===t||e.open===!0&&!e.expanded&&Av(e)?.slot===t}function Mv(e,t){let n=structuredClone(e);if(!Number.isFinite(t)||t<=0)return n;let r=n.columns[0];if(!r)return n;if(n.columns=[r],Dv(n)===`bottom`)return r.height=Ev(r.height),n;let i=Math.max(260,Math.min(Pv,t*.6)),a=Math.max(0,t-Iv-Lv);return 260>a?null:(r.width=Math.min(i,a,Tv(r.width)),n)}function Nv(e,t,n){let r=e.columns[0];if(!r?.browserWidthPending||!e.open||e.expanded||Dv(e)===`bottom`||(Ov(e)?.slot??`conversation`)!==`conversation`||Av(e)?.slot!==`browser`||!Number.isFinite(t)||t<680||!Number.isFinite(n)||n<=0)return e;let i=structuredClone(e),a=i.columns[0];return a.width=Math.max(r.width,t-Math.min(n,t/2)-Lv),delete a.browserWidthPending,Mv(i,t)??e}var Pv,Fv,Iv,Lv;function Rv(){return(Rv=e((()=>{Pv=1200,Fv=800,Iv=312,Lv=6})))()}function zv(e){return typeof e==`string`&&/^plugin:[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}\/[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/.test(e)}function Bv(e){return e===`chat`?`dashboard`:e===`browser`||e===`link-reader`||e===`companion`||e===`conversation`||e===`dashboard`||e===`desktop`||e===`detail`||e===`discussion`||e===`portal`||e===`terminal`||e===`workspace`||zv(e)?e:null}function Vv(e,t){let n=e,r=2;for(;t.has(n);)n=`${e}-${r++}`;return t.add(n),n}function Hv(e){if(!z(e)||!Array.isArray(e.columns))return{columns:[],open:!1,expanded:!1};let t,n=new Set,r=new Set,i=[],a=dt(e.mainPanelId)?.trim(),o,s=``,c=Uv,l,u=Wv;for(let d of e.columns){if(!z(d)||d.side!==`left`&&d.side!==`right`||!Array.isArray(d.panels))continue;t??=R(d.id)??`column`;let e=R(d.activePanelId)??``,f;for(let t of d.panels){if(!z(t))continue;let s=Bv(t.slot);if(!s||s===`detail`&&R(t.taskId)||r.has(s))continue;let c=R(t.id)??``,l=Vv(c||s,n),u=c||(t.slot===`chat`?`chat`:s);u===e&&(f??=l),u===a&&(o??=l),r.add(s);let d=R(t.environmentId),p=R(t.portalId);i.push({id:l,slot:s,...(s===`desktop`||s===`portal`&&!p)&&d?{environmentId:d}:{},...s===`portal`&&p?{portalId:p}:{}})}s=f??s,c=typeof d.width==`number`&&Number.isFinite(d.width)?Tv(d.width):c,l=d.browserWidthPending===!0||void 0,u=typeof d.height==`number`&&Number.isFinite(d.height)?Ev(d.height):u}let d=i.find(e=>e.slot===`conversation`);e.mainPanelId===void 0&&e.expanded===!0&&e.open!==!1&&(o=i.find(e=>e.id===s)?.id??i[0]?.id),(o||d||a!==void 0||e.expanded===!0)&&(d||(d={id:Vv(`conversation`,n),slot:`conversation`},i.push(d)),o??=d.id);let f=i.find(e=>e.id===s&&e.id!==o)??(d&&d.id!==o?d:i.find(e=>e.id!==o)),p=t||i.length>0||e.open===!0?[{id:t??`side-panel-column`,side:`right`,panels:i,activePanelId:f?.id??``,height:u,width:c,...l?{browserWidthPending:l}:{}}]:[];return{columns:p,...o?{mainPanelId:o}:{},dock:e.dock===`bottom`||e.dock===`left`?e.dock:`right`,open:typeof e.open==`boolean`?e.open:p.length>0,expanded:e.expanded===!0,...e.dashboardPresentationOverride===null||e.dashboardPresentationOverride===`split`||e.dashboardPresentationOverride===`expanded`?{dashboardPresentationOverride:e.dashboardPresentationOverride}:{},...e.expanded===!0&&e.expandedSide===!0&&e.open!==!1&&f?{expandedSide:!0}:{},...e.resourceAutoOpenDismissed===!0?{resourceAutoOpenDismissed:!0}:{}}}var Uv,Wv;function Gv(){return(Gv=e((()=>{Pn(),Rv(),Uv=480,Wv=360})))()}function Kv(e){let t={};for(let[n,r]of Object.entries(cr(e)).slice(-500)){let e=n.trim();e&&(t[e]=Hv(r))}return t}function qv(e,t,n,r){let i=t.trim(),a=Kv(e);if(!i)return a;let o=a[i],s=Hv(n),c=r?.geometryOnly&&o?{...o,dock:s.dock,columns:o.columns.map(e=>{let t=s.columns.find(t=>t.id===e.id);return t?{...e,width:t.width,height:t.height,browserWidthPending:t.browserWidthPending}:e})}:s;return delete a[i],a[i]=Hv({...c,dashboardPresentationOverride:r?.dashboardPresentationOverride===void 0?o?o.dashboardPresentationOverride:null:r.dashboardPresentationOverride}),Object.fromEntries(Object.entries(a).slice(-500))}function Jv(e){let t={};for(let[n,r]of Object.entries(cr(e)).slice(-500)){let e=n.trim(),i=typeof r==`string`?r.trim():``;e&&i&&(t[e]=i)}return t}function Yv(e,t,n){let r=t.trim(),i=n.trim(),a=Jv(e);return!r||!i?a:(delete a[r],a[r]=i,Object.fromEntries(Object.entries(a).slice(-500)))}function Xv(){return(Xv=e((()=>{Gv()})))()}function Zv(e){let t=e.reduce((e,t)=>e+t,0);return e.map(e=>e/t)}function Qv(e,t){let n=RegExp(`^${t}(\\d+)$`,`u`).exec(e);return n?Number(n[1]):0}function $v(e,t){return!Array.isArray(e)||e.length!==t||e.some(e=>typeof e!=`number`||!Number.isFinite(e)||e<=0)?Array.from({length:t},()=>1/t):Zv(e)}function ey(e,t,n){let r=typeof e==`string`?e.trim():``;if(r&&!t.has(r))return t.add(r),r;let i=n();for(;t.has(i);)i=n();return t.add(i),i}function ty(e){if(!z(e)||!Array.isArray(e.columns))return;let t=e.columns.filter(z),n=t.reduce((e,t)=>Array.isArray(t.panes)?t.panes.reduce((e,t)=>!z(t)||typeof t.id!=`string`?e:Math.max(e,Qv(t.id.trim(),`p`)),e):e,0),r=t.reduce((e,t)=>typeof t.id==`string`?Math.max(e,Qv(t.id.trim(),`c`)):e,0),i=new Set,a=new Set,o=[],s=[];for(let[e,c]of t.entries()){if(!Array.isArray(c.panes))continue;let t=[],l=[];for(let[e,r]of c.panes.entries()){if(!z(r)||typeof r.sessionKey!=`string`)continue;let a=r.sessionKey.trim();a&&(t.push({id:ey(r.id,i,()=>`p${++n}`),sessionKey:a}),l.push(e))}if(t.length===0)continue;let u=$v(c.paneWeights,c.panes.length),d=Zv(l.map(e=>mt(u[e],`normalized split pane source weight`)));o.push({id:ey(c.id,a,()=>`c${++r}`),panes:t,paneWeights:d}),s.push(e)}if(o.length===0)return;let c=$v(e.columnWeights,t.length),l=Zv(s.map(e=>mt(c[e],`normalized split column source weight`))),u=o.flatMap(e=>e.panes);if(u.length<2&&!va(u[0]?.sessionKey))return;let d=typeof e.activePaneId==`string`?e.activePaneId.trim():``;return{columns:o,columnWeights:l,activePaneId:u.some(e=>e.id===d)?d:mt(u[0],`normalized split layout first pane`).id}}function ny(){return(ny=e((()=>{Pn(),Q()})))()}function ry(e){return new Promise((t,n)=>{e.addEventListener(`success`,()=>t(e.result)),e.addEventListener(`error`,()=>n(e.error??Error(`IndexedDB request failed`))),e.addEventListener(`blocked`,()=>n(Error(`IndexedDB open was blocked`)))})}function iy(e){let t=new Promise((t,n)=>{e.addEventListener(`complete`,()=>t()),e.addEventListener(`error`,()=>n(e.error??Error(`IndexedDB transaction failed`))),e.addEventListener(`abort`,()=>n(e.error??Error(`IndexedDB transaction failed`)))});return t.catch(()=>void 0),t}async function ay(){try{globalThis.indexedDB&&await new Promise(e=>{let t=indexedDB.deleteDatabase(n_);t.addEventListener(`success`,()=>e()),t.addEventListener(`error`,()=>e()),t.addEventListener(`blocked`,()=>e())})}catch{}}async function oy(){for(let e=0;e<2;e+=1){try{if(!globalThis.indexedDB)return null;let e=indexedDB.open(n_,1);e.addEventListener(`upgradeneeded`,()=>{for(let t of Array.from(e.result.objectStoreNames))e.result.deleteObjectStore(t);e.result.createObjectStore(r_,{keyPath:`scope`})});let t=await ry(e);if(t.addEventListener(`versionchange`,()=>t.close()),t.objectStoreNames.length===1&&t.objectStoreNames.contains(`rosters`)&&t.transaction(`rosters`).objectStore(`rosters`).keyPath===`scope`)return t;t.close()}catch{}e===0&&await ay()}return null}function sy(){return(sy=e((()=>{d_()})))()}var cy=t({persistSessionRoster:()=>uy});async function ly(e){if(!e.some(_y))return;let{boundSessionRosterRecord:t,parseSessionRosterRecord:n}=await U(async()=>{let{boundSessionRosterRecord:e,parseSessionRosterRecord:t}=await import(`./control-ui-boot-shared-D3oo_6Fq.js`).then(e=>(e.a(),e.o));return{boundSessionRosterRecord:e,parseSessionRosterRecord:t}},__vite__mapDeps([11,2,3,4,5,6,7,8,9,1,10,12,13,17,19,18]),import.meta.url);if(!e.some(_y))return;let r=await oy();if(r)try{if(!e.some(_y))return;let i=r.transaction(r_,`readwrite`),a=iy(i),o=i.objectStore(r_),s=await ry(o.getAll()),c=new Map;for(let e of s){let t=n(e);if(!t){o.clear(),c.clear();break}c.set(t.scope,t)}for(let n of e){if(!_y(n))continue;let e=n.record,r=t(e);r?(o.put(r),c.set(r.scope,r)):(o.delete(e.scope),c.delete(e.scope))}let l=[...c.values()].toSorted((e,t)=>t.savedAt-e.savedAt);for(let[e,t]of l.entries())(e>=6||Date.now()-t.savedAt>2592e6)&&o.delete(t.scope);await a}catch{r.close(),await ay()}finally{r.close()}}function uy(e,t){!globalThis.indexedDB||t<=(my.get(e.scope)??0)||(my.set(e.scope,t),py.set(e.scope,e),hy!==null&&clearTimeout(hy),hy=setTimeout(()=>void dy(),500))}async function dy(){hy!==null&&(clearTimeout(hy),hy=null);let e=[...py.values()].map(e=>({record:e,generation:$g(e.scope)}));py.clear(),e.length>0&&(gy=gy.then(()=>ly(e))),await gy}async function fy(e){t_(e),e===void 0?(py.clear(),my.clear()):(py.delete(e),my.delete(e)),py.size===0&&hy!==null&&(clearTimeout(hy),hy=null);let t=gy;gy=(async()=>{try{await t}finally{if(e===void 0)await ay();else{let t=await oy();if(t)try{let n=t.transaction(r_,`readwrite`),r=iy(n);n.objectStore(r_).delete(e),await r}finally{t.close()}}}})(),await gy}var py,my,hy,gy,_y;function vy(){return(vy=e((()=>{sy(),d_(),G(),py=new Map,my=new Map,hy=null,gy=Promise.resolve(),_y=({record:e,generation:t})=>t===$g(e.scope),globalThis.indexedDB&&typeof window<`u`&&typeof window.addEventListener==`function`&&typeof document<`u`&&typeof document.addEventListener==`function`&&(window.addEventListener(`pagehide`,()=>void dy()),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&dy()}))})))()}function yy(e){return!e.sessionKey&&!e.scopePrefix&&(Ey+=1),Promise.all([...Ty].map(t=>Promise.resolve(t(e)))).then(()=>void 0)}function by(e){try{localStorage.setItem(wy,JSON.stringify(e)),localStorage.removeItem(wy)}catch{}}function xy(e){try{let t=JSON.parse(e);if(t&&typeof t==`object`&&`scopePrefix`in t&&typeof t.scopePrefix==`string`&&t.scopePrefix.startsWith(`scope:[`))return{scopePrefix:t.scopePrefix};if(typeof t==`object`&&t&&`sessionKey`in t&&typeof t.sessionKey==`string`&&t.sessionKey)return{sessionKey:t.sessionKey,...`reason`in t&&t.reason===`cache-eviction`?{reason:`cache-eviction`}:{}}}catch{}return{}}function Sy(e){let t=yy(e);return by(e),t}function Cy(e){return Ty.add(e),()=>Ty.delete(e)}var wy,Ty,Ey;function Dy(){return(Dy=e((()=>{wy=`openclaw.control.chatSnapshots.invalidate.v1`,Ty=new Set,Ey=0,typeof window<`u`&&window.addEventListener(`storage`,e=>{e.key===wy&&e.newValue!==null&&yy(xy(e.newValue)).catch(e=>{console.error(`[chat-snapshot-cache] cross-tab invalidation failed`,e)})})})))()}var Oy=t({deleteStoredChatSnapshot:()=>ky});async function ky(e,t){await Sy({sessionKey:e,...t?{reason:t}:{}}),await it(e)}async function Ay(e){await Sy(e?{scopePrefix:e}:{}),e?await rt(e):await ot()}function jy(){return(jy=e((()=>{at(),Dy()})))()}function My(e,t){let n=t.map(({key:t,agentId:n})=>hv(e,{sessionKey:t,agentId:n}));return U(async()=>{let{deleteStoredChatSnapshot:e}=await Promise.resolve().then(()=>(jy(),Oy));return{deleteStoredChatSnapshot:e}},void 0,import.meta.url).then(({deleteStoredChatSnapshot:e})=>Promise.all(n.map(t=>e(t))).then(()=>void 0))}function Ny(){return(Ny=e((()=>{vv(),jy(),G()})))()}function Py(e){Ry&&(e===void 0||Ry.cacheKey===e)&&(Ry.cancelled=!0,Ry=void 0)}function Fy(e){Py();let t=Ey,n={cacheKey:e,cancelled:!1,promise:U(async()=>{let{readStoredChatSnapshotRecord:e}=await import(`./session-snapshot-database-BurLa_ut.js`).then(e=>(e.o(),e.d));return{readStoredChatSnapshotRecord:e}},[],import.meta.url).then(({readStoredChatSnapshotRecord:t})=>t(e)).then(e=>n.cancelled||t!==Ey?void 0:e).catch(()=>void 0)};Ry=n}function Iy(e){if(Ry?.cacheKey!==e)return;let t=Ry;return Ry=void 0,t}function Ly(){Ry&&(Ry.readyAt??=Date.now())}var Ry;function zy(){return(zy=e((()=>{Dy(),G(),Cy(({sessionKey:e,scopePrefix:t})=>{(!t||Ry?.cacheKey.startsWith(t))&&Py(e)})})))()}function By(e){if(!fr(e).startsWith(Wy))return!1;let t=e.indexOf(`,`);if(t<5)return!1;let n=e.slice(5,t),r=fr(n.split(`;`)[0]);return r.startsWith(`image/`)?!Ky.has(r):!1}function Vy(e,t,n={}){let r=e.trim();if(!r)return null;if(n.allowDataImage===!0&&By(r))return r;if(fr(r).startsWith(Wy))return null;try{let e=new URL(r,t);return Gy.has(fr(e.protocol))?e.toString():null}catch{return null}}function Hy(e={}){let t=window.open(`about:blank`,`_blank`,e.popup?`popup`:void 0);return t&&(t.opener=null),t}function Uy(e,t={}){let n=Vy(e,t.baseHref??window.location.href,t);if(!n)return null;let r=window.open(n,`_blank`,`noopener,noreferrer`);return r&&(r.opener=null),r}var Wy,Gy,Ky;function qy(){return(qy=e((()=>{Wy=`data:`,Gy=new Set([`http:`,`https:`,`blob:`]),Ky=new Set([`image/svg+xml`])})))()}function Jy(e){e&&typeof URL<`u`&&typeof URL.revokeObjectURL==`function`&&URL.revokeObjectURL(e)}function Yy(e){e.videoPoster?.controller.abort(),Jy(e.videoPoster?.url)}function Xy(e){let t=Qy.get(e);t&&(Yy(t),Jy(t.previewUrl),Qy.delete(e))}function Zy(e=[]){for(let t of e)Xy(t.id)}var Qy;function $y(){return($y=e((()=>{Qy=new Map})))()}function eb(e,t){return`${rb}${e.length}:${e}:${t.length}:${t}:`}function tb(e,t,n){return`${eb(e,t)}${n.length}:${n}`}function nb(e,t){try{let n=globalThis.sessionStorage,r=eb(e,t),i=[];for(let e=0;e<n.length;e+=1){let t=n.key(e);t?.startsWith(r)&&i.push(t)}return i.toSorted()}catch{return[]}}var rb;function ib(){return(ib=e((()=>{rb=`openclaw.new-session.session-placement-recovery.v1:`})))()}function ab(e){return e?.length?e.flatMap(e=>{let t=Jn(e);if(!t)return[];let n=typeof t.mimeType==`string`?t.mimeType.trim():``,r=typeof t.content==`string`?t.content:``;return!/^[a-z0-9][a-z0-9!#$&^_.+-]*\/[a-z0-9][a-z0-9!#$&^_.+-]*$/i.test(n)||!/^[A-Za-z0-9+/]+={0,2}$/.test(r)?[]:[{id:Xt(),dataUrl:`data:${n};base64,${r}`,mimeType:n,...t.origin===`paste`||t.origin===`file`?{origin:t.origin}:{},fileName:typeof t.fileName==`string`?t.fileName:void 0}]}):[]}function ob(){return(ob=e((()=>{Tt()})))()}function sb(e){return`openclaw.control.goalOperation.v1:${JSON.stringify(tr(e))}:`}function cb(e,t){return`${sb(e)}${JSON.stringify(t)}:`}function lb(e){return fb.get(sb(e))?.[1]??0}function ub(e){return e+864e5<=Date.now()}function db(e,t){let n=sb(e),r=t?cb(e,t):null,i=fb.get(n)??[r,0];try{let e=globalThis.sessionStorage;for(let t=e.length-1;t>=0;--t){let i=e.key(t);if(i?.startsWith(n)){if(!r||!i.startsWith(r))e.removeItem(i);else{let t=qt(e.getItem(i)??`null`);if(t===void 0){e.setItem(i,`"invalid"`);continue}z(t)&&typeof t.issuedAtMs==`number`&&ub(t.issuedAtMs)&&e.setItem(i,`"expired"`)}}}}catch{}fb.set(n,[r,i[1]+ +(!r||i[0]!==r)])}var fb;function pb(){return(pb=e((()=>{Pn(),fb=new Map})))()}function mb(e){let t=B(e)?.authReason;return typeof t==`string`&&Sb.has(t)?t:null}function hb(e,t,n){if(e||!t)return null;let r=mr(t);return r?{kind:r.reason===`scope-upgrade`?`scope-upgrade-pending`:r.reason===`role-upgrade`?`role-upgrade-pending`:r.reason===`metadata-upgrade`?`metadata-upgrade-pending`:`pairing-required`,requestId:r.requestId??null}:n===V.PAIRING_REQUIRED?{kind:`pairing-required`,requestId:null}:null}function gb(e){return e.connected||!e.lastError?null:e.lastErrorCode?e.lastErrorCode===V.AUTH_IDENTITY_HEADER_REQUIRED||e.lastErrorCode===V.AUTH_UNAUTHORIZED&&typeof e.lastErrorAuthReason==`string`&&Sb.has(e.lastErrorAuthReason)?`trusted-proxy`:bb.has(e.lastErrorCode)?e.lastErrorCode===V.AUTH_DEVICE_TOKEN_MISMATCH&&!e.hasToken&&!e.hasPassword||yb.has(e.lastErrorCode)?`required`:`failed`:null:fr(e.lastError).includes(`unauthorized`)?!e.hasToken&&!e.hasPassword?`required`:`failed`:null}function _b(e,t,n){if(e||!t)return!1;if(n)return xb.has(n);let r=fr(t);return r.includes(`secure context`)||r.includes(`device identity required`)}function vb(e){return J(e.replace(/([?#&])(?:access_token|auth|deviceToken|password|refresh_token|token)=([^&#\s]+)/gi,`$1[redacted-credential]`).replace(/\bBearer\s+([A-Za-z0-9._~+/-]+=*)/gi,`Bearer [redacted]`).replace(/(["']?(?:access|accessToken|deviceToken|password|refresh|refreshToken|token)["']?\s*[:=]\s*)["']?[^"',\s}]+/gi,`$1[redacted]`))}var yb,bb,xb,Sb;function Cb(){return(Cb=e((()=>{_r(),Y(),yb=new Set([V.AUTH_REQUIRED,V.AUTH_TOKEN_MISSING,V.AUTH_PASSWORD_MISSING,V.AUTH_TOKEN_NOT_CONFIGURED,V.AUTH_PASSWORD_NOT_CONFIGURED]),bb=new Set([...yb,V.AUTH_UNAUTHORIZED,V.AUTH_TOKEN_MISMATCH,V.AUTH_PASSWORD_MISMATCH,V.AUTH_BOOTSTRAP_TOKEN_INVALID,V.AUTH_DEVICE_TOKEN_MISMATCH,V.AUTH_RATE_LIMITED,V.AUTH_TAILSCALE_IDENTITY_MISSING,V.AUTH_TAILSCALE_PROXY_MISSING,V.AUTH_TAILSCALE_WHOIS_FAILED,V.AUTH_TAILSCALE_IDENTITY_MISMATCH]),xb=new Set([`BROWSER_WEBSOCKET_SECURITY_ERROR`,V.CONTROL_UI_DEVICE_IDENTITY_REQUIRED,V.DEVICE_IDENTITY_REQUIRED]),Sb=new Set([`trusted_proxy_no_request`,`trusted_proxy_untrusted_source`,`trusted_proxy_loopback_source`,`trusted_proxy_local_interface_check_failed`,`trusted_proxy_local_interface_source`,`trusted_proxy_user_missing`,`trusted_proxy_user_not_allowed`,`trusted_proxy_config_missing`,`trusted_proxy_no_proxies_configured`,`proxy_attribution_required`])})))()}function wb(e){return Nb.add(e),()=>{Nb.delete(e)}}function Tb(){return{origin:kb,resourceBasePath:Ab,authTokens:jb}}async function Eb(e,t){let n=kb??globalThis.location?.origin??`http://localhost`;if(new URL(e,n).origin!==n)throw Error(`Resource must belong to the connected Gateway`);let r=AbortSignal.any([Mb.signal,AbortSignal.timeout(t)]),i=await ee(e,{credentials:`include`,signal:r},jb,()=>!0);if(i.status===401||i.status===403)throw await i.body?.cancel(),Error(`Gateway credentials rejected`);return i}function Db(e){if(!e)return null;try{let t=new URL(e);return`${t.protocol===`wss:`?`https:`:t.protocol===`ws:`?`http:`:t.protocol}//${t.host}`}catch{return null}}function Ob(e,t=[],n=``){let r=e&&_(e)?globalThis.location?.origin??null:Db(e),i=globalThis.location?.origin,a=r&&i===r?Rn(n):``;if(kb!==r||Ab!==a||jb.length!==t.length||jb.some((e,n)=>e!==t[n])){Mb.abort(),Mb=new AbortController;for(let e of Nb)e()}kb=r,Ab=a,jb=[...t]}var kb,Ab,jb,Mb,Nb;function Pb(){return(Pb=e((()=>{P(),O(),kb=null,Ab=``,jb=[],Mb=new AbortController,Nb=new Set})))()}function Fb(){return Lb}function Ib(){Lb+=1}var Lb;function Rb(){return(Rb=e((()=>{Lb=0})))()}function zb(e){if(e.event===`config.changed`)return`refresh`;if(e.event===`chat.metadata.changed`){let t=B(e.payload);return t?.modelSelectionChanged===!0?`clear`:t?.modelCatalogChanged===!1?void 0:`refresh`}}function Bb(e){let t=$b.get(e);return t||(t={entries:new Map,reads:new Set,nextRead:0,requests:new Map},$b.set(e,t)),t}function Vb(e,t){for(let n of Array.from(ex.get(e)??[]))n(t)}function Hb(e,t,n,r=!1){let i=Bb(e),a={client:e,cache:i,scope:t,signal:n,unresolvedScope:r,order:++i.nextRead};return i.reads.add(a),a}function Ub(e,t){let n=new Set;for(let e of t.entries.keys()){if(t.entries.size<=tx)break;t.entries.delete(e),n.add(e);for(let n of t.reads)(n.unresolvedScope||n.scope&&Gb(Wb(n.scope))===e)&&t.reads.delete(n)}n.size&&$b.get(e)===t&&Vb(e,{type:`invalidated`,matches:(e,t)=>n.has(t)})}function Wb(e){let{agentId:t,view:n=`configured`,...r}=e;return{view:n,...r,...t===void 0?{}:{agentId:t.trim()}}}function Gb(e){let{refresh:t,...n}=e;return JSON.stringify(Object.entries(n).filter(([,e])=>e!==void 0).toSorted(([e],[t])=>e.localeCompare(t)))}function Kb(e,t,n){let{cache:r,client:i}=e;if($b.get(i)!==r||!r.reads.has(e)||e.signal?.aborted)return!1;let a=Gb(Wb(t));if(e.scope){let n=Wb(e.scope);if(n.agentId===void 0&&(n.agentId=t.agentId),Gb(n)!==a)return!1}let o=r.entries.get(a)??{scope:t};if(!t.refresh&&(o.publishedRead??0)>e.order)return!1;let s=!n.refreshFailed;for(let n of r.reads)s&&n!==e&&n.scope&&Gb(Wb(n.scope))===a&&(t.refresh||!n.scope.refresh)&&r.reads.delete(n);if(r.reads.delete(e),t.refresh&&s){for(let e of r.entries.values())e!==o&&qb(e);r.reads.clear()}o.result=n,o.invalidated=!s,o.publishedRead=e.order,o.expiresAt=s?n.models.reduce((e,t)=>Math.min(e,t.unavailableUntil??1/0),1/0):void 0,r.entries.delete(a),r.entries.set(a,o),r.requiresSnapshot=n.modelSelectionPolicy?.restricted===!0;for(let e of r.requests.get(a)?.values()??[])for(let r of[e.active,e.queued])r&&s&&(t.refresh||!r.refresh)&&r.resolve(n);return Ub(i,r),t.refresh&&s&&Vb(i,{type:`invalidated`,matches:(e,t)=>t!==a}),Vb(i,{type:`published`}),!0}function qb(e){e.invalidated=!0,e.expiresAt=void 0}function Jb(e,t){qb(t);let n=Gb(Wb(t.scope));Vb(e,{type:`invalidated`,matches:(e,t)=>t===n})}function Yb(e,t){let n=$b.get(e);$b.delete(e),Bb(e).requiresSnapshot=t?.requireSnapshot===!0||n?.requiresSnapshot===!0||(n?.entries.size??0)>0;for(let e of n?.requests.values()??[])for(let t of e.values())t.active?.reject(new DOMException(`Model catalog connection retired`,`AbortError`)),t.queued?.reject(new DOMException(`Model catalog connection retired`,`AbortError`));Vb(e,{type:`invalidated`,matches:()=>!0})}function Xb(e,t){let n=$b.get(e);return n?.requiresSnapshot===!0&&!n.entries.get(Gb(Wb(t)))?.result}function Zb(e){let t=e&&$b.get(e);return!!(t?.entries.size&&t.requiresSnapshot===!1)}function Qb(e,t,n,r){let i=$b.get(e);if(!i)return;let a=e=>e&&r?.has(Gb(Wb(e)))?!1:!t||!e?!0:t.sessionsOnly&&e.sessionKey===void 0||t.agentId!==void 0&&e.agentId!==void 0&&e.agentId!==t.agentId.trim()||t.authProfileId!==void 0&&e.authProfileId!==t.authProfileId?!1:t.sessionKey===void 0?!0:n?e.sessionKey!==void 0&&!xa(n)&&!X(e.sessionKey)||wa(n,e.sessionKey,t.sessionKey,t.agentId,e.agentId):e.sessionKey===t.sessionKey;for(let e of i.reads)a(e.scope)&&i.reads.delete(e);for(let e of i.entries.values())a(e.scope)&&qb(e);Vb(e,{type:`invalidated`,matches:a})}var $b,ex,tx;function nx(){return(nx=e((()=>{Q(),$b=new WeakMap,ex=new WeakMap,tx=64})))()}function rx(e,t,n,r=`refresh`){r===`clear`?Yb(e,{requireSnapshot:!0}):r===`refresh`&&Qb(e,t,n),ox.get(e)?.invalidate(t,n)}function ix(e,t,n){let r=B(t),i=ql(r),a=typeof r?.agentId==`string`?r.agentId:void 0,o=i?{agentId:a,sessionKey:i.key}:void 0,s=o&&ax(r)?new Set(Array.from(ox.get(e)?.entries.values()??[]).filter(e=>e.listeners.size>0).map(e=>Gb(Wb(e.scope)))):void 0;Qb(e,o??{agentId:a,sessionsOnly:!0},n,s),ox.get(e)?.invalidate(o,n,r)}function ax(e){return e?.catalogChanged!==!0&&e?.phase!==`reset`&&(e?.reason===`patch`||e?.reason===`command-metadata`)}var ox;function sx(){return(sx=e((()=>{nx(),cu(),ox=new WeakMap})))()}function cx(e){ux.delete(e)}function lx(e){let t=ux.get(e);if(!t){t=e.request(`cron.list`,{includeDisabled:!0,limit:200,offset:0,sortBy:`name`,sortDir:`asc`,compact:!0}),ux.set(e,t);let n=t;n.catch(()=>{ux.get(e)===n&&ux.delete(e)})}return t}var ux;function dx(){return(dx=e((()=>{ux=new WeakMap})))()}function fx(e){return e.event===`config.changed`||e.event===`chat.metadata.changed`&&B(e.payload)?.authChanged!==!1}function px(e){mx.get(e)?.entries.clear()}var mx;function hx(){return(hx=e((()=>{mx=new WeakMap})))()}function gx(e,t,n,r=``,i){let a=i??globalThis.location?.href;if(!a)return null;try{let i=new URL(a),o=new URL(e,i);if(o.protocol===`ws:`?o.protocol=`http:`:o.protocol===`wss:`&&(o.protocol=`https:`),![`http:`,`https:`].includes(o.protocol))return null;o.username=``,o.password=``;let s=o.origin===i.origin?Rn(r):``;return new URL(st(t,n,s),o.origin).href}catch{return null}}function _x(){return(_x=e((()=>{L(),sr()})))()}function vx(e,t){return e.request(`device.pair.setupCode`,t,{timeoutMs:Ft})}function yx(e){return vx(e,{includeQr:!1,joinUrl:!0})}function bx(e){return{client:e.client,connected:e.connected,devicePairSetupOpen:!1,devicePairSetupLifecycle:{phase:`selection`,access:`full`},devicePairSetupExpiryTimer:null,devicePairSetupCountdownTimer:null,onDevicePairSetupChange:e.onChange??(()=>{}),pendingCount:0}}function xx(e){return{devicePairSetupOpen:e.devicePairSetupOpen,devicePairSetupLifecycle:e.devicePairSetupLifecycle,devicePairPendingCount:e.pendingCount}}function Sx(e){e.devicePairSetupCountdownTimer&&=(clearInterval(e.devicePairSetupCountdownTimer),null)}function Cx(e,t){Sx(e);let n=e.devicePairSetupLifecycle,r=n.phase===`waiting`?n.setup.expiresAtMs:void 0;n.access!==`node`||!e.devicePairSetupOpen||typeof r!=`number`||r<=Date.now()||(e.devicePairSetupCountdownTimer=setInterval(()=>{(!e.devicePairSetupOpen||r<=Date.now())&&Sx(e),t()},1e3))}function wx(e){return typeof e.setupId==`string`&&e.setupId.length>0&&typeof e.expiresAtMs==`number`&&Number.isInteger(e.expiresAtMs)&&e.expiresAtMs>=0}function Tx(e){e.devicePairSetupExpiryTimer!==null&&(clearTimeout(e.devicePairSetupExpiryTimer),e.devicePairSetupExpiryTimer=null)}async function Ex(e,t){let n=e.client;if(!n||!e.connected)return{status:`unavailable`,message:`Gateway unavailable`};try{let e=await n.request(`device.pair.setupStatus`,{setupId:t});if(e?.completion===void 0){if(e?.deliveryUncertain===void 0)return{status:`missing`};let n=Mx(e.deliveryUncertain);return n?.setupId===t?{status:`delivery-uncertain`,outcome:n}:{status:`unavailable`,message:`Invalid setup status response`}}let r=jx(e.completion);return r?.setupId===t?{status:`found`,completion:r}:{status:`unavailable`,message:`Invalid setup status response`}}catch(e){return{status:`unavailable`,message:J(e)}}}function Dx(e,t){let n=e.devicePairSetupLifecycle;return n.phase===`waiting`&&n.setup.setupId===t||n.phase===`reconciling`&&n.setupId===t||n.phase===`error`&&n.source===`status`&&n.setupId===t}function Ox(e,t,n,r){if(Dx(e,t)){if(r.status===`found`){Px(e,r.completion);return}if(r.status===`delivery-uncertain`){Fx(e,r.outcome);return}e.devicePairSetupLifecycle=r.status===`missing`?{phase:`expired`,access:n}:{phase:`error`,source:`status`,access:n,setupId:t,message:r.message},e.onDevicePairSetupChange()}}async function kx(e,t){let n=e.devicePairSetupLifecycle;if(n.phase!==`waiting`||n.setup.setupId!==t)return;Tx(e),Sx(e);let r=n.access;e.devicePairSetupLifecycle={phase:`reconciling`,access:r,setupId:t},e.onDevicePairSetupChange(),Ox(e,t,r,await Ex(e,t))}function Ax(e,t){Tx(e);let n=()=>{let r=t.expiresAtMs-Date.now();if(r>0){e.devicePairSetupExpiryTimer=setTimeout(n,r);return}kx(e,t.setupId)};n()}function jx(e){if(!z(e))return null;let{setupId:t,deviceName:n,access:r}=e;if(typeof t!=`string`||t.length===0||r!==`full`&&r!==`limited`&&r!==`node`)return null;let i=typeof n==`string`?n.trim():``;return{setupId:t,access:r,...i?{deviceName:i}:{}}}function Mx(e){let t=jx(e);return t?{setupId:t.setupId,access:t.access}:null}function Nx(e,t,n){return Dx(e,t)?(Sx(e),Tx(e),e.devicePairSetupLifecycle=n,e.onDevicePairSetupChange(),!0):!1}function Px(e,t){return Nx(e,t.setupId,{phase:`success`,access:t.access,...t.deviceName?{deviceName:t.deviceName}:{}})}function Fx(e,t){return Nx(e,t.setupId,{phase:`delivery-uncertain`,access:t.access})}async function Ix(e){e.devicePairSetupOpen=!0}async function Lx(e){let t=e.client,n=e.devicePairSetupLifecycle,r=n.access;if(!t||!e.connected||e.devicePairSetupLifecycle.phase===`loading`||Bx.has(e))return;let i={};if(Bx.set(e,i),n.phase===`error`&&n.source===`status`){let t=await Ex(e,n.setupId);Bx.get(e)===i&&(Ox(e,n.setupId,r,t),Bx.delete(e));return}Tx(e),e.devicePairSetupLifecycle={phase:`loading`,access:r};try{let n=await vx(t,r===`full`?{}:r===`node`?{bootstrapProfile:`node`,includeQr:!1}:{bootstrapProfile:`limited`});if(Bx.get(e)!==i||e.client!==t||!e.connected||!e.devicePairSetupOpen)return;if(!wx(n))throw Error(`Gateway does not provide pairing lifecycle metadata. Update the Gateway and try again.`);e.devicePairSetupLifecycle={phase:`waiting`,access:n.access===`full`||n.access===`limited`||n.access===`node`?n.access:r,setup:n},Ax(e,n)}catch(n){Bx.get(e)===i&&e.client===t&&e.devicePairSetupOpen&&(e.devicePairSetupLifecycle={phase:`error`,source:`create`,access:r,message:J(n)})}finally{Bx.get(e)===i&&Bx.delete(e)}}async function Rx(e,t){(e.devicePairSetupLifecycle.phase===`selection`||e.devicePairSetupLifecycle.phase===`error`&&e.devicePairSetupLifecycle.source===`create`)&&e.devicePairSetupLifecycle.access!==t&&(e.devicePairSetupLifecycle={phase:`selection`,access:t})}function zx(e){Sx(e),Bx.delete(e),Tx(e),e.devicePairSetupOpen=!1,e.devicePairSetupLifecycle={phase:`selection`,access:`full`}}var Bx;function Vx(){return(Vx=e((()=>{mn(),Y(),Bx=new WeakMap})))()}function Hx(e,t,n=!1){let r=Math.max(0,Math.ceil((e-t)/1e3)),i=String(Math.floor(r/60));return`${n?i.padStart(2,`0`):i}:${String(r%60).padStart(2,`0`)}`}function Ux(){let e=Xr.getLocale();return sS?.locale!==e&&(sS={locale:e,units:{}}),sS}function Wx({value:e,unit:t,unitDisplay:n=`narrow`}){let r=Ux(),i=`${t}:${n}`;return(r.units[i]??=new Intl.NumberFormat(r.locale,{style:`unit`,unit:t,unitDisplay:n,maximumFractionDigits:0})).format(e)}function Gx(e,t){let n=Ux();return(n.relative??=new Intl.RelativeTimeFormat(n.locale,{numeric:`auto`,style:`narrow`})).format(e,t)}function Kx(e,t={}){let n=t.fallback??K(`common.unknown`);if(e==null||!Number.isFinite(e)||e<0)return n;let{value:r,unit:i}=jt(e);return i===`second`&&t.suffix!==!1?K(`common.justNow`):t.suffix===!1?Wx({value:r,unit:i}):Gx(-r,i)}function qx(e,t={}){let n=t.fallback??K(`common.na`);if(e==null||!Number.isFinite(e))return n;let r=e-Date.now(),i=r<=0,{value:a,unit:o}=jt(Math.abs(r));if(o===`second`)return t.suffix===!1?Wx({value:a,unit:o}):i?K(`common.justNow`):Gx(a,o);if(t.dateFallback&&o===`day`&&a>7)try{return new Intl.DateTimeFormat(Xr.getLocale(),{month:`short`,day:`numeric`}).format(new Date(e))}catch{}let s=i?-a:a;return t.suffix===!1?Wx({value:a,unit:o}):Gx(s,o)}function Jx(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`||typeof e==`symbol`)return String(e);try{let t=JSON.stringify(e);if(t!==void 0)return t}catch{}return e instanceof Error?J(e):Object.prototype.toString.call(e)}function Yx(e){return Xx()(e)}function Xx(e,t){let n;return r=>{let i=gr(r);return i===void 0?t??K(`common.na`):(n??=new Intl.DateTimeFormat(Xr.getLocale(),e??{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),n.format(new Date(i)))}}function Zx(e,t,n=K(`common.na`)){let r=gr(e);return r===void 0?n:new Date(r).toLocaleDateString(Xr.getLocale(),t)}function Qx(e,t,n=K(`common.na`)){let r=gr(e);return r===void 0?n:new Date(r).toLocaleTimeString(Xr.getLocale(),t??{timeStyle:`short`})}function $x(e,t,n=K(`common.na`)){let r=gr(e);return r===void 0?n:new Date(r).toLocaleString(Xr.getLocale(),t)}function eS(e){return!e||e.length===0?K(`common.none`):e.filter(e=>!!(e&&e.trim())).join(`, `)}function tS(e,t=120){return e.length<=t?e:`${Zn(e,Math.max(0,t-1))}…`}function nS(e,t){return e.length<=t?{text:e,truncated:!1,total:e.length}:{text:Zn(e,Math.max(0,t)),truncated:!0,total:e.length}}function rS(e,t){let n=Number(e);return Number.isFinite(n)?n:t}function iS(e,t=`$0.00`){return e==null||!Number.isFinite(e)?t:e===0?`$0.00`:`$${e.toFixed(e<.01?4:e<1?3:2)}`}function aS(e,t={}){return e==null||!Number.isFinite(e)?`0`:en(e,{thousandsSuffix:t.thousandsSuffix,millionsSuffix:`M`,trimTrailingZero:t.trimTrailingZero??!0,maxUnit:`billion`})}function oS(e){return e<1e6?aS(e):`${Math.floor(e/1e5)/10}M`}var sS;function cS(){return(cS=e((()=>{Pn(),bt(),q(),Y()})))()}function lS(){let e=globalThis.navigator;return/iPad|iPhone|iPod/u.test(e.userAgent)||e.platform===`MacIntel`&&e.maxTouchPoints>1}function uS(){return(uS=e((()=>{})))()}var dS,fS;function pS(){return(pS=e((()=>{I(),He(),Le(),G(),dS=class extends Re{constructor(...e){super(...e),this.mode=`expanded`,this.loading=!1}render(e){return Be}update(e,[t]){return this.element=e.element instanceof HTMLElement?e.element:void 0,this.mode=t,this.layout?this.layout.update(t):this.load(),Be}load(){!this.loading&&this.isConnected&&(this.loading=!0,U(async()=>{let{DebugOverlayLayout:e}=await import(`./debug-overlay-layout.runtime-C4v1gRfy.js`);return{DebugOverlayLayout:e}},__vite__mapDeps([178]),import.meta.url).then(({DebugOverlayLayout:e})=>{this.loading=!1,this.isConnected&&this.element?.isConnected&&(this.layout=new e(this.element),this.layout.update(this.mode))}).catch(e=>{this.loading=!1,console.error(`System busyness position controls could not load. Reload to retry.`,e)}))}disconnected(){this.layout?.disconnect()}reconnected(){this.layout?this.layout.reconnect():this.load()}},fS=ze(dS)})))()}function mS(e){return F`
<div
class="debug-overlay__placeholder debug-overlay__placeholder--${e}"
role="status"
aria-label=${K(`common.loading`)}
>
<div class="debug-overlay__placeholder-content" aria-hidden="true">
${e===`status`?F`<div class="debug-overlay__placeholder-vitals">
${[`cpu`,`memory`,`delayP99`].map(e=>F`<div class="debug-overlay__placeholder-vital">
<span>${K(`debug.overlay.${e}`)}</span>
<div class="skeleton debug-overlay__placeholder-value"></div>
<div class="skeleton debug-overlay__placeholder-line"></div>
</div>`)}
</div>`:e===`lanes`?F`<div class="debug-overlay__placeholder-lanes">
${[`lane`,`active`,`queued`,`blocked`].map(e=>F`<span>${K(`debug.lanes.${e}`)}</span>`)}
${Array.from({length:12},()=>F`<div class="skeleton debug-overlay__placeholder-line"></div>`)}
</div>`:F`<div class="debug-overlay__placeholder-rows">
${Array.from({length:e===`events`?3:2},()=>F`<div class="skeleton debug-overlay__placeholder-line"></div>`)}
</div>`}
</div>
</div>
`}function hS(){return F`${Object.values(gS).map(e=>F`<section class="debug-overlay__section" aria-busy="true">
<h3>${K(e.titleKey)}</h3>
${mS(e.id)}
</section>`)}`}var gS;function _S(){return(_S=e((()=>{I(),q(),gS={lanes:{id:`lanes`,titleKey:`debug.overlay.lanes`},status:{id:`status`,titleKey:`debug.overlay.status`},"active-runs":{id:`active-runs`,titleKey:`debug.overlay.activeRuns`},events:{id:`events`,titleKey:`debug.overlay.events`}}})))()}function vS(e){return e?.eventType===`openclaw:debug-overlay-request`&&e.detail&&`mode`in e.detail&&e.detail.mode===`minimized`?`minimized`:`expanded`}function yS(e,t){return SS({mode:e.pendingDebugOverlayMode,body:t.status===`error`?Ce({actionLabel:K(`common.retry`),error:t.error,stale:t.stale,subtitle:t.element.label,onRetry:()=>e.lazyCustomElements.retry()}):xS(e.pendingDebugOverlayMode),onToggleMode:()=>e.togglePendingDebugOverlayMode(),onClose:()=>e.lazyCustomElements.close()})}function bS(e,t,n){return e.key===`Escape`&&!e.defaultPrevented&&t!==`closed`&&(t!==`minimized`||n!==null&&e.composedPath().includes(n))}function xS(e){return e===`minimized`?F`<div class="debug-overlay__compact-loading" role="status">${K(`common.loading`)}</div>`:hS()}function SS({mode:e,body:t,onToggleMode:n,onClose:r}){return F`
<aside
${fS(e)}
class="debug-overlay ${e===`minimized`?`debug-overlay--minimized`:``}"
aria-label=${K(`debug.overlay.title`)}
>
<header
class="debug-overlay__header"
role="group"
tabindex="0"
aria-label=${K(`debug.overlay.move`)}
>
<div>
${e===`minimized`?Be:F`<div class="debug-overlay__eyebrow">${K(`debug.overlay.eyebrow`)}</div>`}
<h2>${K(`debug.overlay.title`)}</h2>
</div>
<div class="debug-overlay__controls">
<button
type="button"
class="debug-overlay__control"
aria-label=${K(e===`minimized`?`debug.overlay.expand`:`debug.overlay.minimize`)}
title=${K(e===`minimized`?`debug.overlay.expand`:`debug.overlay.minimize`)}
@click=${n}
>
${e===`minimized`?fe.maximize:fe.minimize}
</button>
<button
type="button"
class="debug-overlay__control debug-overlay__close"
aria-label=${K(`common.close`)}
@click=${r}
>
${fe.x}
</button>
</div>
</header>
<div class="debug-overlay__body">${t}</div>
</aside>
`}var CS;function wS(){return(wS=e((()=>{I(),be(),me(),j(),q(),pS(),_S(),CS=F`<openclaw-debug-overlay></openclaw-debug-overlay>`})))()}function TS(e){return e?.current.uploadsEnabled!==!1}function ES(){return K(`common.uploadsDisabled`)}function DS(e){if(!TS(e))throw Error(ES())}function OS(){return(OS=e((()=>{q()})))()}function kS(e,t=!1,n=!1){return t||e.phase===`reload-required`?`reload-required`:e.restartPending?`restarting`:e.suspensionPhase===`preparing`||e.suspensionPhase===`draining`?`suspending`:e.suspensionPhase===`prepared`?`suspended`:e.phase===`connecting`||e.phase===`starting`?e.phase:e.phase===`connected`?e.client?.recoveryScopeReady===!1||n?`restoring`:null:e.offlineStable?e.phase===`reconnecting`?`reconnecting`:`offline`:null}function AS(){return(AS=e((()=>{})))()}function jS(e,t=!1){return LS(e,e=>Ue(t?!e:e))}function MS(e,t){return LS(e,e=>e?t:Be)}function NS(e,t,n){return LS(e,e=>Ue(e?t:n))}var PS,FS,IS,LS;function RS(){return(RS=e((()=>{I(),He(),qe(),PS=`openclaw:presentation-changed`,FS=class extends Re{constructor(...e){super(...e),this.handlePresentationChange=()=>this.presentationChanged(this.binding)}updatePresentation(e){let t=this.binding?.owner;this.binding=typeof e==`boolean`?void 0:e,t!==this.binding?.owner&&(t?.removeEventListener(PS,this.handlePresentationChange),this.isConnected&&this.binding?.owner.addEventListener(PS,this.handlePresentationChange))}disconnected(){this.binding?.owner.removeEventListener(PS,this.handlePresentationChange)}reconnected(){this.binding?.owner.addEventListener(PS,this.handlePresentationChange),this.handlePresentationChange()}},IS=class extends FS{constructor(...e){super(...e),this.value=!1,this.project=()=>Be}presentationChanged(){typeof this.value!=`boolean`&&(!this.value.isPresented()||this.value.preview?.())&&this.setValue(this.render(this.value,this.project))}update(e,[t,n]){return this.value=t,this.project=n,this.updatePresentation(t),this.render(t,n)}render(e,t){return t(typeof e==`boolean`?e:e.isPresented())}},LS=ze(IS)})))()}function zS(e,t,n,r=!0,i=Be){return HS(e,t,n,r,i)}function BS(e,t,n,r=Be,i=!0){return F`<openclaw-plugin-view
.kind=${e}
.contributionKey=${t}
.props=${n}
.defaultView=${r}
.presented=${jS(i)}
></openclaw-plugin-view>`}var VS,HS;function US(){return(US=e((()=>{On(),I(),He(),S(),RS(),VS=class extends Re{constructor(...e){super(...e),this.pending=!1}update(e,t){this.args=t;let n=e.options?.host;return n instanceof Fn&&this.host!==n&&(this.disconnect(),this.host=n),this.connect(),this.render(...t)}connect(){this.isConnected&&this.host&&!this.consumer&&(this.consumer=new ir(this.host,{context:je,subscribe:!0,callback:e=>{this.runtime!==e?.plugins&&(this.unsubscribe?.(),this.runtime=e?.plugins,this.unsubscribe=this.runtime?.subscribe(()=>this.refresh()),this.refresh())}}))}refresh(){this.pending||(this.pending=!0,queueMicrotask(()=>{this.pending=!1,this.isConnected&&this.args&&this.setValue(this.render(...this.args))}))}disconnect(){this.unsubscribe?.(),this.unsubscribe=void 0,this.consumer?.hostDisconnected(),this.consumer&&this.host?.removeController(this.consumer),this.consumer=void 0,this.runtime=void 0}disconnected(){this.disconnect()}reconnected(){this.connect(),this.refresh()}render(e,t,n,r,i){return this.runtime?.selectedReplacement(e)?F`<openclaw-plugin-view
?data-plugin-composer=${e===`composer`}
.surface=${e}
.props=${t}
.defaultView=${n}
.replacementCompanion=${i}
.defaultHost=${this.host}
.presented=${jS(r)}
></openclaw-plugin-view>`:n}},HS=ze(VS)})))()}var WS,GS;function KS(){return(KS=e((()=>{l(),Ee(),v(),k(),se(),G(),WS=ve.buildId,GS=document.createElement(`style`),GS.textContent=m.cssText,document.head.append(GS);for(let[e,t]of[[`link[rel="icon"][type="image/svg+xml"]`,`favicon.svg`],[`link[rel="icon"][type="image/png"]`,`favicon-32.png`],[`link[rel="apple-touch-icon"]`,`apple-touch-icon.png`],[`link[rel="manifest"]`,`manifest.webmanifest`]]){let n=document.querySelector(e);n&&(n.href=w(t))}if(r(),Ie(),`serviceWorker`in navigator){let e=new URL(w(`sw.js`),window.location.origin);e.searchParams.set(`v`,WS),navigator.serviceWorker.addEventListener(`message`,e=>{u(e.data)&&C({canReload:()=>e.source===navigator.serviceWorker.controller}),e.data?.type===`sw-version-probe`&&e.ports[0]?.postMessage({version:WS})});let t=()=>U(async()=>{let{refreshControlUiServiceWorker:e}=await import(`./control-ui-boot-shared-xfDhIVun.js`).then(e=>(e.Ki(),e.qi));return{refreshControlUiServiceWorker:e}},__vite__mapDeps([10,2,3,4,5,6,7,8,9,1,11,12,13,17,18,19]),import.meta.url).then(({refreshControlUiServiceWorker:e})=>e()).catch(e=>{console.warn(`OpenClaw service worker refresh failed.`,e)});navigator.serviceWorker.addEventListener(`controllerchange`,()=>void t()),navigator.serviceWorker.register(e,{updateViaCache:`none`}).then(t).catch(e=>{console.warn(`OpenClaw service worker registration failed.`,e)})}})))()}export{jx as $,Vu as $a,Do as $c,cf as $i,qi as $l,Dv as $n,ll as $o,tm as $r,Hs as $s,ob as $t,Xx as A,yd as Aa,es as Ac,Lf as Ai,ua as Al,sy as An,zl as Ao,$g as Ar,vc as As,Gb as At,Qr as Au,Kx as B,nd as Ba,Go as Bc,Of as Bi,ga as Bl,Jv as Bn,Dl as Bo,Bh as Br,lc as Bs,wb as Bt,jr as Bu,bS as C,Od as Ca,is as Cc,ep as Ci,La as Cl,ky as Cn,cu as Co,N_ as Cr,Ec as Cs,Zb as Ct,ni as Cu,uS as D,Sd as Da,ns as Dc,Pf as Di,va as Dl,Cy as Dn,Kl as Do,a_ as Dr,bc as Ds,Xb as Dt,$r as Du,mS as E,Cd as Ea,as as Ec,Qf as Ei,ya as El,Ey as En,su as Eo,i_ as Er,Sc as Es,Jb as Et,q as Eu,Zx as F,rd as Fa,zo as Fc,zf as Fi,pa as Fl,ny as Fn,Gl as Fo,$h as Fr,mc as Fs,Fb as Ft,zr as Fu,rS as G,Xu as Ga,ko as Gc,bf as Gi,wa as Gl,Hv as Gn,_l as Go,Ah as Gr,rc as Gs,gb as Gt,br as Gu,Wx as H,$u as Ha,Uo as Hc,_f as Hi,ca as Hl,Yv as Hn,El as Ho,Ph as Hr,oc as Hs,Cb as Ht,wr as Hu,$x as I,id as Ia,Ho as Ic,jf as Ii,ba as Il,ty as In,Tl as Io,Xh as Ir,dc as Is,Rb as It,Lr as Iu,Px as J,qu as Ja,Mo as Jc,gf as Ji,na as Jl,Mv as Jn,Sl as Jo,zm as Jr,Ws as Js,ub as Jt,nS as K,Yu as Ka,jo as Kc,yf as Ki,Ta as Kl,Ev as Kn,gl as Ko,_h as Kr,ec as Ks,hb as Kt,eS as L,sd as La,Qo as Lc,Mf as Li,ma as Ll,Zv as Ln,bl as Lo,ig as Lr,fc as Ls,Eb as Lt,Rr as Lu,oS as M,_d as Ma,Xo as Mc,Nf as Mi,sa as Ml,ay as Mn,Il as Mo,lg as Mr,pc as Ms,Wb as Mt,Zr as Mu,iS as N,gd as Na,qo as Nc,If as Ni,fa as Nl,ry as Nn,ql as No,Cg as Nr,gc as Ns,Kb as Nt,Wr as Nu,lS as O,xd as Oa,os as Oc,Ff as Oi,Ea as Ol,fy as On,$l as Oo,r_ as Or,xc as Os,$b as Ot,ei as Ou,Hx as P,cd as Pa,Jo as Pc,Rf as Pi,Aa as Pl,iy as Pn,Xl as Po,_g as Pr,_c as Ps,Ib as Pt,Gr as Pu,Ix as Q,Hu as Qa,xo as Qc,df as Qi,aa as Ql,Av as Qn,ul as Qo,$p as Qr,Ks as Qs,db as Qt,Yx as R,od as Ra,Bo as Rc,Ef as Ri,_a as Rl,Qv as Rn,Cl as Ro,Yh as Rr,uc as Rs,Pb as Rt,kr as Ru,yS as S,kd as Sa,cs as Sc,tp as Si,Q as Sl,Ay as Sn,du as So,F_ as Sr,Dc as Ss,Bb as St,ri as Su,_S as T,wd as Ta,ts as Tc,$f as Ti,Ia as Tl,Dy as Tn,ou as To,g_ as Tr,Cc as Ts,Qb as Tt,ii as Tu,Jx as U,Qu as Ua,Ko as Uc,Cf as Ui,oa as Ul,qv as Un,hl as Uo,Nh as Ur,nc as Us,mb as Ut,Sr as Uu,Qx as V,td as Va,Vo as Vc,kf as Vi,Da as Vl,Kv as Vn,ml as Vo,Rh as Vr,cc as Vs,Ob as Vt,Er as Vu,cS as W,Zu as Wa,Fo as Wc,vf as Wi,Sa as Wl,Gv as Wn,vl as Wo,Mh as Wr,ic as Ws,vb as Wt,Cr as Wu,Vx as X,Wu as Xa,Ao as Xc,pf as Xi,Ki as Xl,Nv as Xn,pl as Xo,Um as Xr,Bs as Xs,lb as Xt,bx as Y,Ku as Ya,Ro as Yc,mf as Yi,ia as Yl,Rv as Yn,yl as Yo,Bm as Yr,$s as Ys,cb as Yt,Fx as Z,Uu as Za,Po as Zc,ff as Zi,ra as Zl,jv as Zn,fl as Zo,im as Zr,qs as Zs,pb as Zt,CS as _,Id as _a,fs as _c,lp as _i,Z as _l,zy as _n,pu as _o,rv as _r,Ic as _s,ix as _t,ci as _u,PS as a,Zd as aa,Ns as ac,Qp as ai,go as al,$y as an,Fu as ao,xv as ar,Xc as as,Cx as at,Vi as au,SS as b,jd as ba,ps as bc,bp as bi,Ca as bl,My as bn,mu as bo,Q_ as br,Nc as bs,Hb as bt,li as bu,jS as c,Jd as ca,Cs as cc,Rp as ci,_o as cl,Zy as cn,ju as co,vv as cr,el as cs,mx as ct,ji as cu,AS as d,Ud as da,ws as dc,Pp as di,So as dl,qy as dn,Ou as do,dv as dr,Gc as ds,fx as dt,J as du,lf as ea,Us as ec,em as ei,Eo as el,ab as en,Bu as eo,Ov as er,cl as es,Mx as et,Gi as eu,kS as f,Hd as fa,ys as fc,Np as fi,mo as fl,Uy as fn,Du as fo,fv as fr,Wc as fs,dx as ft,yi as fu,TS as g,Ld as ga,_s as gc,up as gi,Ra as gl,Py as gn,xu as go,iv as gr,Lc as gs,sx as gt,_i as gu,ES as h,zd as ha,hs as hc,Dp as hi,$a as hl,Iy as hn,Tu as ho,ov as hr,Rc as hs,ox as ht,pi as hu,zS as i,Qd as ia,Is as ic,zp as ii,ho as il,eb as in,Iu as io,Cv as ir,Zc as is,Rx as it,zi as iu,aS as j,vd as ja,Yo as jc,Jf as ji,X as jl,oy as jn,Wl as jo,e_ as jr,hc as js,ex as jt,K as ju,tS as k,bd as ka,$o as kc,qf as ki,ka as kl,vy as kn,Fl as ko,d_ as kr,yc as ks,zb as kt,Xr as ku,MS as l,Kd as la,js as lc,Fp as li,wo as ll,Yy as ln,ku as lo,hv as lr,qc as ls,hx as lt,Oi as lu,OS as m,Bd as ma,ms as mc,fp as mi,fo as ml,Vy as mn,Eu as mo,av as mr,Bc as ms,lx as mt,vi as mu,US as n,tf as na,Ls as nc,Vp as ni,Oo as nl,nb as nn,Ru as no,wv as nr,ol as ns,Lx as nt,Wi as nu,FS as o,Xd as oa,Ps as oc,jp as oi,yo as ol,Qy as on,Pu as oo,bv as or,$c as os,_x as ot,Bi as ou,DS as p,Vd as pa,vs as pc,Kp as pi,eo as pl,Hy as pn,Cu as po,sv as pr,Vc as ps,cx as pt,Y as pu,zx as q,Ju as qa,No as qc,hf as qi,Oa as ql,Tv as qn,xl as qo,vh as qr,tc as qs,_b as qt,BS as r,sf as ra,Fs as rc,Lp as ri,po as rl,tb as rn,Lu as ro,Sv as rr,al as rs,yx as rt,Ri as ru,RS as s,Yd as sa,Ms as sc,Mp as si,bo as sl,Xy as sn,Nu as so,yv as sr,Jc as ss,gx as st,Li as su,KS as t,nf as ta,Rs as tc,Yp as ti,vo as tl,ib as tn,zu as to,kv as tr,sl as ts,xx as tt,Xi as tu,NS as u,Wd as ua,Ts as uc,qp as ui,Co as ul,Jy as un,Au as uo,mv as ur,Kc as us,px as ut,Ci as uu,wS as v,Nd as va,us as vc,yp as vi,Ma as vl,Ly as vn,uu as vo,nv as vr,Fc as vs,rx as vt,oi as vu,gS as w,Td as wa,rs as wc,np as wi,la as wl,jy as wn,eu as wo,m_ as wr,Tc as ws,nx as wt,ti as wu,xS as x,Ad as xa,ss as xc,dp as xi,xa as xl,Ny as xn,lu as xo,$_ as xr,Oc as xs,Yb as xt,si as xu,vS as y,Md as ya,ls as yc,_p as yi,Na as yl,Fy as yn,Su as yo,ev as yr,Pc as ys,ax as yt,ai as yu,qx as z,ad as za,Wo as zc,Df as zi,ha as zl,Xv as zn,wl as zo,qh as zr,ac as zs,Tb as zt,Ar as zu};