1import{C as E,r as z,D as q,i as c,d as I,E as U,p as a,z as v,x as S,a as e,n as H,F as Z,t as y,k as Y,l as le,u as R,o as G,G as Ae,T as X,c as p,f as w,H as Se,s as f,I as N,y as t,J as W,h as ce,_ as ee,K as $e,w as Le,L as Be,j as K,M as ue}from"./index.b2e088d7.js";import{_ as Me}from"./logo.34cb18c3.js";import{P as de}from"./paperclip.ac39c79e.js";import{C as pe}from"./credit-card.0460fd0f.js";import{K as Pe}from"./key-round.9c061266.js";import{b as ze,a as Ee}from"./instanceNavigation.0f50ad3e.js";import{F as ae,p as je,d as Ne,g as Ue,a as Re,h as Oe,b as Fe,m as De,s as qe}from"./firstInstanceOnboarding.7787bbf4.js";import{A as me}from"./arrow-left.bb40fa57.js";import{M as fe}from"./monitor.6b000f89.js";import{u as He}from"./useInstanceUpgrade.63c4bd98.js";import{_ as Ke}from"./StatusBadge.vue_vue_type_script_setup_true_lang.f6d7f9d4.js";import{d as Ve}from"./instanceStatusPresentation.3c0d0e7c.js";import{C as We}from"./chevron-right.795f716b.js";import{L as Ye}from"./loader-circle.0aae17ab.js";import{A as Ge}from"./arrow-up.9d6f32b5.js";import{V as Qe}from"./useToast.042a6fce.js";import{T as Je}from"./triangle-alert.c1fc9ad6.js";import{u as Ze}from"./useConfirm.9b89cac8.js";import"./bot.221db697.js";import"./zap.8b7c7a11.js";import"./logs.59dd6f41.js";import"./settings.7cc94487.js";const ve=E("building-2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);const Xe=E("compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const he=E("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);const et=E("life-buoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);const ye=E("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);const xe=E("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);const be=E("user-cog",[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),ge="openclaw_app_theme",Q=["dark","light","system"],_e="(prefers-color-scheme: dark)";function tt(n){return n==="light"||n==="dark"||n==="system"}function ke(n){return n!=="system"?n:typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia(_e).matches?"dark":"light"}function oe(n){const s=Q.indexOf(n);return Q[(s+1)%Q.length]}function nt(){try{const n=localStorage.getItem(ge);if(tt(n))return n}catch{}return"system"}const A=z(nt()),we=z(ke(A.value));function st(n){document.documentElement.setAttribute("data-theme",n)}function te(n){const s=ke(n);we.value=s,st(s)}q(A,n=>{te(n);try{localStorage.setItem(ge,n)}catch{}});te(A.value);if(typeof window<"u"&&typeof window.matchMedia=="function"){const n=window.matchMedia(_e),s=()=>{A.value==="system"&&te("system")};typeof n.addEventListener=="function"?n.addEventListener("change",s):n.addListener(s)}function ne(){const n=()=>{A.value=oe(A.value)},s=c(()=>{const r=oe(A.value);return`Theme: ${A.value}. Switch to ${r}.`});return{theme:we,themePreference:A,toggle:n,toggleLabel:s}}const at=[{to:"/app/account",icon:be,label:"Account"},{to:"/app/paperclip",icon:de,label:"Paperclip"},{to:"/app/billing",icon:pe,label:"Billing"},{to:"/app/business-account",icon:ve,label:"Business account"},{to:"/app/developer",icon:Pe,label:"API tokens"},{to:"/app/support",icon:et,label:"Support"}];function ot(){return[...at]}const rt=["onClick"],J=I({__name:"SidebarLink",props:{to:{},icon:{},label:{},exact:{type:Boolean,default:!1}},setup(n){return(s,r)=>{const i=U("router-link");return a(),v(i,{to:n.to,custom:""},{default:S(({isActive:x,isExactActive:_,navigate:d})=>[e("button",{onClick:d,class:H(["flex items-center gap-2.5 w-full px-2.5 py-2 rounded-md text-sm transition-colors no-u
1nderline text-left",(n.exact?_:x)?"bg-[var(--brand-10)] text-brand font-medium":"text-[var(--text-2)] hover:text-[var(--text-0)] hover:bg-[var(--surface-1)]"])},[(a(),v(Z(n.icon),{size:18,class:"shrink-0"})),e("span",null,y(n.label),1)],10,rt)]),_:1},8,["to"])}}}),it={key:0,class:"pointer-events-none fixed inset-y-0 right-0 z-40 flex items-start justify-end p-4 md:p-6"},lt={class:"pointer-events-auto mt-16 flex min-h-[40vh] w-[min(26rem,calc(100vw-2rem))] flex-col rounded-2xl border border-[var(--border-1)] bg-[var(--surface-1)] p-4 shadow-[var(--shadow-lift)] md:mt-20"},ct={class:"flex items-start justify-between gap-3"},ut={class:"mt-1 text-sm font-semibold text-[var(--text-0)]"},dt={class:"rounded-full bg-paper-0 px-2 py-1 text-[11px] text-[var(--text-2)]"},pt={class:"mt-3 text-sm leading-6 text-[var(--text-1)]"},mt={key:0,class:"mt-3 rounded-lg bg-paper-0 px-3 py-2 text-xs leading-5 text-[var(--text-1)]"},ft={key:1,class:"mt-3 flex"},vt=["disabled"],ht={key:2,class:"mt-2 text-xs leading-5 text-[var(--text-2)]"},yt={class:"mt-auto pt-6"},xt={class:"h-1.5 overflow-hidden rounded-full bg-paper-0"},bt={class:"mt-4 flex items-center justify-between gap-2"},gt={class:"flex items-center gap-2"},_t=["disabled"],kt=I({__name:"InstanceSidebarTour",props:{instanceId:{},items:{}},setup(n){const s={"":{description:"Overview is your control room. Check deploy status, quick actions, instance health, and update the instance from here when you need to move it onto a newer version."},chat:{description:"Start here to talk to your agent directly, test ideas, and get a feel for how it responds before you wire up other channels.",prompt:'Say "Hello" to your agent here and start getting a feel for how it responds. Treat this like the start of a relationship, not just a smoke test.',promptActionLabel:'Send "Hello"',promptActionPendingText:"Weâre waiting for the instance to start. Once it is running, you can send this message from here."},messaging:{description:"Channels is where you connect Telegram, Slack, or WhatsApp after launch. Once connected, your can chat with your agent through any of these channels."},"ai-model":{description:"AI Model is where you choose the default model your agent uses to respond to user messages, set fallback models for provider rejections such as limit exhaustion, and add multiple providers, even of the same type. OpenClaw will rotate across available providers automatically so your agent can keep using the ones that work right now."},agents:{description:"Agents lets you split work across specialized personas or capabilities. Use it when one general-purpose agent stops being enough."},addons:{description:"Addons is where you extend the runtime. We recommend turning on web search and web fetch first. If you need local browser control, use Agent Browser Bridge or the Chrome extension."},workspace:{description:"Workspace is where your agent gets durable files and context. This becomes powerful once you move from quick chats into reusable notes, docs, and prompts."},skills:{description:"Skills is where you install capabilities from ClawHub or review skills your agent created for you after you asked it to save something important as a skill."},cron:{description:"Cron Jobs schedules recurring work. You can create jobs here directly, or just ask your agent to create one and then review or edit it here afterward."},environment:{description:"Environment is where you pass keys and other secrets to the agent. Once a secret is here, you can tell the agent which environment name to use and it can pick it up itself."},settings:{description:"Settings is where you enable or disable agent extensions such as Memory Wiki, QMD memory, Lossless Context, or ACP (Agent Control Protocol)."},usage:{description:"Usage shows how the instance is consuming tokens and spend over time. Once you have real activity, this is where you decide whether the setup is efficient."},logs:{description:"Logs gives you the raw pod output for the current instance. Use it when you need to verify startup behavior, inspect runtime errors, or confirm what OpenClaw is doing right now."}},r=n,i=Y(),x=le(),_=R(),d=z(!1),u=z(0),o=c(()=>_.getters["auth/user"]?.id??null),m=c(()=>_.getters["instances/status"]),l=c(()=>r.items.filter(g=>s[g.pathSuffix]).map(g=>({...g,...s[g.pathSuffix]}))),k=c(()=>l.value[u.value]??null),B=c(()=>u.value===0),M=c(()=>u.value>=l.value.length-1),P=c(()=>k.value?.pathSuffix!=="chat"?!0:m.value?.status==="running"&&m.value?.pod_ready===!0),C=c(()=>!k.value?.promptActionLabel||!P.value),j=c(()=>l.value.length<=1?100:(u.value+1)/l.value.length*100);function $(g){return g.exact?i.path===g.to:i.path===g.to||i.path.startsWith(`${g.to}/`)}function h(){const g=l.value.findIndex(F=>$(F));g>=0&&(u.value=g)}function L(){if(!o.value||!r.instanceId){d.value=!1;return}if(Ue(o.value)===r.instanceId){d.value=!0,h();return}if(Re(o.value)===r.instanceId){d.value=!0,h();return}if(Oe(o.value)||Fe(o.value)){d.value=!1;return}d.value=!1}function b(){o.value&&(De(o.value),d.value=!1)}function T(){o.value&&(je(o.value,r.instanceId),d.value=!1)}function O(){o.value&&(Ne(o.value),d.value=!1)}function Ie(){C.value||k.value?.pathSuffix==="chat"&&window.dispatchEvent(new CustomEvent("openclaw-tour-chat-send",{detail:{message:"Hello"}}))}
1async function Ce(){if(B.value)return;const g=l.value[u.value-1];g&&await x.push(g.to)}async function Te(){if(M.value){b();return}const g=l.value[u.value+1];if(!g){b();return}await x.push(g.to)}q(()=>[i.path,r.instanceId,o.value],()=>{L(),d.value&&h()},{immediate:!0});function se(){L(),d.value&&h()}return G(()=>{window.addEventListener(ae,se)}),Ae(()=>{window.removeEventListener(ae,se)}),(g,F)=>(a(),v(X,{to:"body"},[d.value&&k.value?(a(),p("div",it,[e("section",lt,[e("div",ct,[e("div",null,[F[0]||(F[0]=e("p",{class:"text-[11px] font-medium uppercase tracking-[0.18em] text-brand"},"Lobsterland Tour",-1)),e("h3",ut,y(k.value.label),1)]),e("span",dt,y(u.value+1)+" / "+y(l.value.length),1)]),e("p",pt,y(k.value.description),1),k.value.prompt?(a(),p("p",mt,y(k.value.prompt),1)):w("",!0),k.value.promptActionLabel?(a(),p("div",ft,[e("button",{type:"button",class:"btn-primary btn-sm",disabled:C.value,onClick:Ie},y(k.value.promptActionLabel),9,vt)])):w("",!0),k.value.promptActionPendingText&&C.value?(a(),p("p",ht,y(k.value.promptActionPendingText),1)):w("",!0),e("div",yt,[e("div",xt,[e("div",{class:"h-full rounded-full bg-brand transition-all duration-200",style:Se({width:`${j.value}%`})},null,4)]),e("div",bt,[e("div",{class:"flex items-center gap-2"},[e("button",{type:"button",class:"btn-ghost btn-sm",onClick:T}," Show later "),e("button",{type:"button",class:"btn-ghost btn-sm",onClick:O}," Close ")]),e("div",gt,[e("button",{type:"button",class:"btn-secondary btn-sm",disabled:B.value,onClick:Ce}," Back ",8,_t),e("button",{type:"button",class:"btn-primary btn-sm",onClick:Te},y(M.value?"Finish":"Next"),1)])])])])])):w("",!0)]))}}),wt={class:"flex h-full min-h-0 flex-col w-60 border-r border-[var(--border-0)] bg-paper-1 px-3 py-4 overflow-hidden"},It={class:"flex-1 min-h-0 overflow-y-auto overflow-x-hidden pr-1"},Ct={class:"flex flex-col gap-4 mb-4"},Tt={class:"px-2.5 pb-0.5 text-[10px] font-medium uppercase tracking-wider text-[var(--text-3)]"},At={key:1,class:"px-2 mb-1"},St={class:"flex flex-col gap-0.5"},$t={class:"border-t border-[var(--border-0)] pt-3"},Lt={class:"flex items-center gap-2.5 px-2"},Bt=["src","alt"],Mt={key:1,class:"w-8 h-8 rounded-full bg-paper-3 flex items-center justify-center"},Pt={class:"text-xs text-[var(--text-2)]"},zt={class:"flex-1 min-w-0"},Et={class:"text-sm text-[var(--text-0)] truncate"},jt=["aria-label"],Nt=I({__name:"AppSidebar",setup(n){const s=R(),r=Y(),i=le(),{theme:x,themePreference:_,toggle:d,toggleLabel:u}=ne(),o=c(()=>s.getters["auth/user"]),m=c(()=>(o.value?.display_name??o.value?.email??"").charAt(0).toUpperCase()),l=c(()=>r.params.id),k=c(()=>typeof l.value=="string"&&l.value.length>0),B=ot(),M=c(()=>s.getters["instances/current"]),P=c(()=>l.value?ze(l.value,M.value??void 0):[]),C=c(()=>l.value?Ee(l.value,M.value??void 0):[]);async function j(){if(!l.value)return;const $=s.getters["auth/user"]?.id;if(!$)return;qe($,l.value);const h=P.value[0];h&&await i.push(h.to)}return($,h)=>{const L=U("router-link");return a(),p("aside",wt,[f(L,{to:"/app/instances",class:"flex items-center gap-2.5 px-2 mb-6 no-underline"},{default:S(()=>[...h[1]||(h[1]=[e("img",{src:Me,alt:"Lobsterland logo",class:"w-8 h-8 object-contain"},null,-1),e("span",{class:"text-[var(--text-0)] font-display font-semibold text-base"},"Lobsterland",-1)])]),_:1}),e("div",It,[k.value?(a(),p(N,{key:0},[f(L,{to:"/app/instances",class:"flex items-center gap-2 px-2 py-1.5 text-sm text-[var(--text-2)] hover:text-[var(--text-0)] no-underline mb-2"},{default:S(()=>[f(t(me),{size:16}),h[2]||(h[2]=e("span",null,"Back to Instances",-1))]),_:1}),e("nav",Ct,[(a(!0),p(N,null,W(C.value,b=>(a(),p("div",{key:b.id,class:"flex flex-col gap-0.5"},[e("p",Tt,y(b.label),1),(a(!0),p(N,null,W(b.items,T=>(a(),v(J,{key:T.to,to:T.to,icon:T.icon,label:T.label,exact:T.exact},null,8,["to","icon","label","exact"]))),128))]))),128)),l.value?(a(),p("button",{key:0,type:"button",class:"flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-left text-sm text-[var(--text-2)] transition-colors hover:bg-[var(--surface-1)] hover:text-[var(--text-0)]",onClick:j},[f(t(Xe),{size:18,class:"shrink-0"}),h[3]||(h[3]=e("span",null,"Onboarding tour",-1))])):w("",!0)]),l.value?(a(),v(kt,{key:0,"instance-id":l.value,items:P.value},null,8,["instance-id","items"])):w("",!0),h[4]||(h[4]=e("div",{class:"divider"},null,-1))],64)):w("",!0),k.value?(a(),p("div",At,[...h[5]||(h[5]=[e("p",{class:"text-xs font-medium text-[var(--text-3)] uppercase tracking-wider"},"Account",-1)])])):w("",!0),e("nav",St,[k.value?w("",!0):(a(),v(J,{key:0,to:"/app/instances",icon:t(he),label:"Instances"},null,8,["icon"])),(a(!0),p(N,null,W(t(B),b=>(a(),v(J,{key:b.to,to:b.to,icon:b.icon,label:b.label},null,8,["to","icon","label"]))),128))])]),e("div",$t,[e("div",Lt,[o.value?.avatar_url?(a(),p("img",{key:0,src:o.value.avatar_url,alt:o.value.display_name??"User",class:"w-8 h-8 rounded-full"},null,8,Bt)):(a(),p("div",Mt,[e("span",Pt,y(m.value),1)])),e("div",zt,[e("p",Et,y(o.value?.display_name??o.value?.email??""),1)]),e("button",{onClick:h[0]||(h[0]=(...b)=>t(d)&&t(d)(...b)),class:"btn-icon p-1.5 text-[var(--text-3)] hover:text-[var(--text-0)]","aria-label":t(u)},[t(_)==="system"?(a(),v(t(fe),{key:0,size:16})):t(x)==="dark"?(a(),v(t(ye),{key:1,size:16})):(a(),v(t(xe),{key:2,size:16}
1))],8,jt)])])])}}}),Ut={class:"grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center h-14 px-4 md:px-6 gap-3 border-b border-[var(--border-0)] bg-paper-1/50 backdrop-blur-sm shrink-0"},Rt={class:"flex items-center gap-2 min-w-0 flex-wrap"},Ot={class:"text-sm font-medium text-[var(--text-0)] truncate"},Ft={key:1,class:"text-sm font-semibold text-[var(--text-0)]"},Dt={class:"flex justify-center min-w-0"},qt=["disabled"],Ht={class:"flex items-center justify-end gap-2"},Kt=["aria-label"],Vt=I({__name:"AppHeader",setup(n){const s=R(),r=Y(),{theme:i,themePreference:x,toggle:_,toggleLabel:d}=ne(),u=c(()=>s.getters["instances/current"]),o=c(()=>r.params.id),{applyUpdate:m,isProvisioningOrStarting:l,latestVersion:k,refreshUpdateAvailability:B,updateAvailable:M,updateLoading:P}=He(()=>o.value),C=c(()=>o.value?u.value?.name??u.value?.id?.slice(0,8)??"Instance":null),j=c(()=>C.value?Ve(s.getters["instances/status"],u.value?.status):null),$=c(()=>{const L=r.name;return{home:"Instances",billing:"Billing",account:"Account",paperclip:"Paperclip",support:"Support",setup:"New Instance"}[L??""]??"Lobsterland"}),h=c(()=>!!o.value&&M.value);return G(()=>{o.value&&B()}),q(o,()=>{o.value&&B()}),(L,b)=>{const T=U("router-link");return a(),p("header",Ut,[e("div",Rt,[C.value?(a(),p(N,{key:0},[f(T,{to:"/app/instances",class:"flex items-center gap-1 text-sm text-[var(--text-2)] hover:text-[var(--text-0)] no-underline"},{default:S(()=>[f(t(me),{size:16}),b[2]||(b[2]=e("span",{class:"hidden sm:inline"},"Instances",-1))]),_:1}),f(t(We),{size:14,class:"text-[var(--text-3)]"}),e("span",Ot,y(C.value),1),j.value?(a(),v(Ke,{key:0,status:j.value},null,8,["status"])):w("",!0)],64)):(a(),p("span",Ft,y($.value),1))]),e("div",Dt,[h.value?(a(),p("button",{key:0,class:"badge badge-ok px-3 py-1.5 text-xs font-semibold transition-colors hover:bg-[color-mix(in_srgb,var(--ok-500)_18%,transparent)] disabled:cursor-not-allowed disabled:opacity-60",disabled:t(P)||t(l),onClick:b[0]||(b[0]=(...O)=>t(m)&&t(m)(...O))},[t(P)?(a(),v(t(Ye),{key:0,size:12,class:"animate-spin"})):(a(),v(t(Ge),{key:1,size:12})),ce(" Upgrade to "+y(t(k)),1)],8,qt)):w("",!0)]),e("div",Ht,[e("button",{onClick:b[1]||(b[1]=(...O)=>t(_)&&t(_)(...O)),class:"btn-icon p-2 text-[var(--text-3)] hover:text-[var(--text-0)] md:hidden","aria-label":t(d)},[t(x)==="system"?(a(),v(t(fe),{key:0,size:18})):t(i)==="dark"?(a(),v(t(ye),{key:1,size:18})):(a(),v(t(xe),{key:2,size:18}))],8,Kt)])])}}}),Wt=["onClick"],D=I({__name:"BottomNavItem",props:{to:{},icon:{},label:{}},setup(n){return(s,r)=>{const i=U("router-link");return a(),v(i,{to:n.to,custom:""},{default:S(({isActive:x,navigate:_})=>[e("button",{onClick:_,class:H(["flex flex-col items-center gap-0.5 px-3 py-1 text-[10px] transition-colors",x?"text-brand":"text-[var(--text-3)]"])},[(a(),v(Z(n.icon),{size:20})),e("span",null,y(n.label),1)],10,Wt)]),_:1},8,["to"])}}}),Yt={class:"fixed bottom-0 inset-x-0 z-40 flex items-center justify-around h-14 border-t border-[var(--border-0)] bg-paper-1/95 backdrop-blur-sm safe-area-bottom"},Gt=I({__name:"AppBottomNav",setup(n){return(s,r)=>(a(),p("nav",Yt,[f(D,{to:"/app/instances",icon:t(he),label:"Home"},null,8,["icon"]),f(D,{to:"/app/paperclip",icon:t(de),label:"Paperclip"},null,8,["icon"]),f(D,{to:"/app/billing",icon:t(pe),label:"Billing"},null,8,["icon"]),f(D,{to:"/app/business-account",icon:t(ve),label:"Business"},null,8,["icon"]),f(D,{to:"/app/account",icon:t(be),label:"Account"},null,8,["icon"])]))}}),Qt=ee(Gt,[["__scopeId","data-v-f63f82fd"]]),Jt=I({__name:"AppToaster",setup(n){const{theme:s}=ne();return(r,i)=>(a(),v(t(Qe),{position:"bottom-right",theme:t(s),"rich-colors":""},null,8,["theme"]))}}),Zt={class:"flex-1 min-w-0"},Xt=I({__name:"BillingBanner",setup(n){const s=R(),r=c(()=>s.getters["billing/status"]),i=c(()=>r.value?.status_message??"Action required: check your billing status."),x=c(()=>r.value?.status_severity??"warning");return(_,d)=>{const u=U("router-link");return a(),p("div",{class:H(["flex items-center gap-3 px-4 md:px-6 py-2.5 text-sm border-b",x.value==="warning"?"bg-[var(--warn-10)] border-[var(--warn-20)] text-warn-500":"bg-[var(--danger-10)] border-[var(--danger-20)] text-danger-500"])},[f(t(Je),{size:16,class:"shrink-0"}),e("p",Zt,y(i.value),1),f(u,{to:"/app/billing",class:"btn-sm btn-secondary shrink-0 no-underline text-[var(--text-0)]"},{default:S(()=>[...d[0]||(d[0]=[ce(" Open Billing ",-1)])]),_:1})],2)}}}),en={key:0,class:"mt-3 max-h-48 overflow-y-auto rounded-lg border border-[var(--border-0)] bg-paper-1 p-3 space-y-1"},tn={class:"mt-4 flex items-center justify-end gap-2"},re="confirm-dialog-title",ie="confirm-dialog-desc",nn=I({__name:"ConfirmDialog",setup(n){const{state:s,accept:r,cancel:i}=Ze(),x=z(null),_=z(null);return q(()=>s.value.open,async d=>{d&&(await Be(),_.value?.focus()||x.value?.focus())}),(d,u)=>(a(),v(X,{to:"body"},[t(s).open?(a(),p("div",{key:0,class:"fixed inset-0 z-[60] flex items-center justify-center bg-black/45 backdrop-blur-sm p-4",onClick:u[2]||(u[2]=Le((...o)=>t(i)&&t(i)(...o),["self"])),onKeydown:u[3]||(u[3]=$e((...o)=>t(i)&&t(i)(...o),["esc"]))},[e("div",{ref_key:"dialogRef",ref:x,class:"card max-w-md w-full",role:"dialog","aria-modal":"true","aria-labelledby":re,"aria-describedby":ie,tabindex:"-1"},[e("p",{id:re,class:"text-base font-semibold text-[var(--text-0)]"},y(t(s).title),1),e("p",{id:ie,class:"text-sm text-[var(--text-2)] mt-2"},y(t(s).message),1),t(s).details.length?(a(),p("ul",en,[(a(!0),p(N,null,W(t(s).details,o=>(a(),p("li",{key:o,class:"font-mono text-xs text-[var(--text-2)] break-all"},y(o),1))),128))])):w("",!0),e("div",tn,[e("button",{ref_key:"cancelRef",ref:_,type:"button",class:"btn-secondary btn-sm",onClick:u[0]||(u[0]=(...o)=>t(i)&&t(i)(...o))},y(t(s).cancelText),513),e("button",{type:"button",class:H(t(s).danger?"btn-danger btn-sm":"btn-primary btn-sm"),onClick:u[1]||(u[1]=(...o)=>t(r)&&t(r)(...o))}
1,y(t(s).confirmText),3)])],512)],32)):w("",!0)]))}});function sn(n,s){return n!=null?{decisionKnown:!0,consented:n}:typeof s=="boolean"?{decisionKnown:!0,consented:s}:{decisionKnown:!1,consented:null}}const an={key:0,class:"fixed z-50 left-3 right-3 bottom-16 md:bottom-4 md:left-auto md:right-4 md:max-w-md card",role:"dialog","aria-live":"polite","aria-label":"Cookie consent"},V="openclaw.cookie.analytics",on=I({__name:"ConsentBanner",setup(n){const s=R(),r=z(!1),i=c(()=>s.getters["auth/user"]),x=c(()=>!!i.value&&!r.value);function _(){try{const m=localStorage.getItem(V);if(m==="accepted")return!0;if(m==="declined")return!1}catch{}return null}async function d(m){try{localStorage.setItem(V,m?"accepted":"declined")}catch{}r.value=!0,await s.dispatch("auth/updatePreferences",{cookie_consent_analytics:m}),await K(m)}async function u(){await d(!0)}async function o(){await d(!1)}return q(()=>i.value?.cookie_consent_analytics,async m=>{if(typeof m=="boolean"&&r.value){try{localStorage.setItem(V,m?"accepted":"declined")}catch{}await K(m)}}),G(async()=>{const m=_(),l=sn(m,i.value?.cookie_consent_analytics);if(m!=null){r.value=!0,typeof i.value?.cookie_consent_analytics=="boolean"&&i.value.cookie_consent_analytics!==m&&await s.dispatch("auth/updatePreferences",{cookie_consent_analytics:m}),await K(m);return}if(l.decisionKnown&&l.consented!=null){r.value=!0;try{localStorage.setItem(V,l.consented?"accepted":"declined")}catch{}await K(l.consented)}}),(m,l)=>(a(),v(X,{to:"body"},[f(ue,{name:"consent-slide"},{default:S(()=>[x.value?(a(),p("div",an,[l[0]||(l[0]=e("p",{class:"text-sm font-semibold text-[var(--text-0)]"},"Analytics cookies",-1)),l[1]||(l[1]=e("p",{class:"text-xs text-[var(--text-2)] mt-1"}," Allow anonymous product analytics to help improve Lobsterland. ",-1)),e("div",{class:"mt-3 flex items-center justify-end gap-2"},[e("button",{type:"button",class:"btn-secondary btn-sm",onClick:o},"Decline"),e("button",{type:"button",class:"btn-primary btn-sm",onClick:u},"Allow")])])):w("",!0)]),_:1})]))}}),rn=ee(on,[["__scopeId","data-v-dcaf1684"]]);function ln(n,s,r){if(n==="setup"||n==="billing"||!s||!r||r.billing_enforced===!1)return!1;if(!r.has_subscription)return!0;const i=r.active_instances_used??0,x=r.instance_limit??0;return i>x}const cn={class:"flex h-screen overflow-hidden bg-paper-0"},un={class:"flex flex-1 flex-col min-w-0 min-h-0"},dn=I({__name:"AppLayout",setup(n){const s=Y(),r=R(),i=c(()=>s.name==="instance-chat"||s.name==="instance-logs"),x=c(()=>ln(s.name,!!r.getters["billing/loaded"],r.getters["billing/status"]));return G(async()=>{await Promise.all([r.dispatch("billing/loadBilling"),r.dispatch("businessAccount/loadSummary"),r.dispatch("instances/fetchList")])}),(_,d)=>{const u=U("router-view");return a(),p("div",cn,[f(Nt,{class:"hidden md:flex"}),e("div",un,[f(Vt),x.value?(a(),v(Xt,{key:0})):w("",!0),e("main",{class:H(["flex-1 flex flex-col min-h-0 p-4 md:p-6 pb-20 md:pb-6",i.value?"overflow-hidden":"overflow-y-auto"])},[f(u,null,{default:S(({Component:o})=>[f(ue,{name:"route-fade",mode:"out-in"},{default:S(()=>[(a(),v(Z(o)))]),_:2},1024)]),_:1})],2)]),f(Qt,{class:"md:hidden"}),f(rn),f(nn),f(Jt)])}}}),zn=ee(dn,[["__scopeId","data-v-ad7dd814"]]);export{zn as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.