const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./workboard-card-chip.runtime-CA0GB22y.js","./rolldown-runtime-DkW27tQK.js","./control-ui-foundation-CeFMP1Ly.js","./control-ui-core-pH6nakZ-.js","./lit-runtime-BEtFSUCp.js","./control-ui-core-DGVkFhVB.js","./control-ui-core-Br5DB0Zj.js","./gateway-runtime-DUNO4Mi1.js","./control-ui-core-C8H8-RSs.css","./normalization-m-N_6hXH.js","./control-ui-boot-Cdpgu1Gm.js","./control-ui-boot-wpHCbPL9.js","./control-ui-boot-gfE6fZcA.js","./config-runtime-C4gfjhZc.js","./control-ui-boot-CKTkvwFZ.js","./control-ui-boot-BPFwXC8p.js","./control-ui-boot-DdPrPuw0.js","./control-ui-boot-9_2QGLIL.js","./control-ui-boot-J-x6DHHT.js","./control-ui-boot-B1lcIXow.js","./control-ui-boot-Clhp68JE.js","./control-ui-boot-D1DWJlBr.js","./control-ui-boot-BW_XZcbY.js","./control-ui-boot-__AsqpzJ.css","./markdown-runtime-BcrsAQtF.js","./board-view-placeholder-g-63KOYw.js","./board-view-DX4lsdQG.js","./board-view-DEfofU9J.js","./board-view-Cufc5TOV.css"])))=>i.map(i=>d[i]); import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{Nr as t,Pr as n,bn as r}from"./control-ui-foundation-CeFMP1Ly.js";import{Ao as i,Ft as a,Ga as o,Nt as s,Wa as c,jo as l,jt as u}from"./control-ui-core-pH6nakZ-.js";import{G as d,J as f,W as p}from"./lit-runtime-BEtFSUCp.js";import{Nt as m,Pt as h}from"./control-ui-core-DGVkFhVB.js";import{Ht as g,Lt as _,Rt as v,qt as y}from"./control-ui-core-Br5DB0Zj.js";import{Mo as b,No as x,on as S,yn as C}from"./control-ui-boot-Cdpgu1Gm.js";function w(e){let t=/^data:([^;]+);base64,(.+)$/.exec(e);if(!t)return null;let n=t[1],r=t[2];return n&&r?{mimeType:n,content:r}:null}function T(e){return e?.length?e.map(e=>{let t=u(e),n=t?w(t):null;if(!n)throw Error(y(`chat.sendErrors.outboxPayloadMissing`));return{type:n.mimeType.startsWith(`image/`)?`image`:`file`,mimeType:n.mimeType,fileName:e.fileName,content:n.content}}):void 0}function E(e){return e?.length?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e,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:i(),dataUrl:`data:${n};base64,${r}`,mimeType:n,fileName:typeof t.fileName==`string`?t.fileName:void 0}]}):[]}function D(){return(D=e((()=>{g(),l(),s()})))()}function O(e,t){let n=1,r=t.length;if(r>A)return!1;for(let t of e){let e=t.browserAnnotation;if(e&&(n+=1,r+=e.modelContext.length,n>k||r>A))return!1}return!0}var k,A;function j(){return(j=e((()=>{k=4,A=8e3})))()}function M(e,t,n,r={}){if(!t.browserAnnotation)return!1;let i=t.browserAnnotation.modelContext,s=e.getOwner(),c=e.getSessionKey(),l=e.getAttachments(),u=l.findIndex(e=>e.id===t.id);if(u<0)return!1;e.setAttachments(l.filter(e=>e.id!==t.id)),e.requestUpdate(),e.focusComposer();let d=r.releasePayload??a,f=!1,p=()=>{f||(f=!0,d(t.id))},m=r.presentToast??o;return m({message:n.removed,actionLabel:n.undo,onAction:()=>{if(f)return;if(e.getOwner()!==s||e.getSessionKey()!==c){p();return}let r=e.getAttachments();if(r.some(e=>e.id===t.id)){f=!0;return}if(!O(r,i)){p(),m({message:n.undoUnavailable});return}f=!0;let a=Math.min(u,r.length);e.setAttachments([...r.slice(0,a),t,...r.slice(a)]),e.requestUpdate(),e.focusRestoredAnnotation(t.id)},onDismiss:e=>{e!==`action`&&p()}})||p(),!0}function N(){return(N=e((()=>{c(),s(),j()})))()}function P(){return m(`openclaw-workboard-card-chip`,()=>t(()=>import(`./workboard-card-chip.runtime-CA0GB22y.js`),__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,24]),import.meta.url))}async function F(){return!customElements.get(`openclaw-board-view`)&&(V??=x()?t(()=>import(`./board-view-placeholder-g-63KOYw.js`),__vite__mapDeps([25,1,2,3,4,5,6,7,8]),import.meta.url):t(()=>import(`./board-view-DX4lsdQG.js`),__vite__mapDeps([26,6,1,2,3,4,5,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,27,28]),import.meta.url),await V,!0)}function I(e){return y(e===`left`?`chat.board.dockLeft`:e===`bottom`?`chat.board.dockBottom`:`chat.board.dockRight`)}function L(e){if(!e.hasBoard)return d;let t=e.face===`chat`?`chat`:e.dock===`hidden`?`dashboard`:`split`,n=e.canChangeDock?C({value:t,ariaLabel:y(`chat.board.faceLabel`),options:[{value:`chat`,label:y(`chat.board.chatFace`)},{value:`split`,label:y(`chat.board.splitFace`)},{value:`dashboard`,label:y(`chat.board.dashboardFace`)}],onChange:t=>e.onSelectMode(t)}):C({value:e.face,ariaLabel:y(`chat.board.faceLabel`),options:[{value:`chat`,label:y(`chat.board.chatFace`)},{value:`dashboard`,label:y(`chat.board.dashboardFace`)}],onChange:t=>e.onSelectMode(t)}),r=e.dock===`hidden`?null:e.dock,i=t===`split`&&e.canChangeDock&&r!==null;return f`