UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 5.47 kB
import{n as e,r as t}from"./rolldown-runtime-CNOWq4Kh.js";import{AN as n,EN as r,GN as i,JN as a,ON as o,dT as s,fT as c}from"./_2_____________________________.js";import{A as l,k as ee}from"./deferred-ui-support-DZEPWjAk.js";import{F as u,J as te,O as ne,S as d,U as f,d as p,f as m,g as h,j as g,l as re,r as ie,s as ae,u as _,w as v,x as y}from"./_6____________________.js";import"./_1____________________________________.js";import{c as b,gt as x,h as S,yt as C}from"./markdown-runtime-CtlJb8xA.js";import{S as w,c as T,f as E,g as D,l as O,w as k}from"./settings-controls-runtime-CwXZmgDo.js";import{a as A,i as j,n as M,t as N}from"./consent-dialog-CiJWSKZS.js";import{c as P,f as F,g as oe,h as I,m as L,o as R,r as z,s as B,t as V}from"./overview-CG7I1zlA.js";import{a as H,i as U,r as W,t as G}from"./detail-shell-_r84UGhe.js";import{n as K,r as q}from"./recommended-prompts-D5rAPuHl.js";var se=t({renderPluginCatalogDetail:()=>le,renderPluginReadme:()=>J});function J(e){return e?(()=>{var t=X();return ie(t,`click`,x,!0),p(t,g(ee,{get html(){return S(e,{mode:`document`}).replaceAll(`<h1`,`<h2`).replaceAll(`</h1>`,`</h2>`)},class:`lit-content`,style:{display:`contents`}})),t})():g(O,{get children(){return g(T,{get message(){return a(`pluginsPage.detailNoReadme`)}})}})}function ce(e){let t,n=()=>e.value.plugin,r=()=>e.value.detail,i=()=>!!(e.state.installProgress&&e.state.installProgress.finishedAt===void 0),o=()=>n().catalog.imageUrl?e.state.iconUrls[n().catalog.imageUrl]:void 0,s=()=>r().author?.imageUrl?e.state.iconUrls[r().author.imageUrl]:void 0;return g(W,{get registerRemovalHeading(){return e.state.registerRemovalHeading},id:`plugin-catalog-detail`,get name(){return n().catalog.name},get summary(){return n().catalog.summary},get backHref(){return e.state.backHref},get backLabel(){return a(`tabs.plugins`)},get onBack(){return e.state.onBack},get icon(){return g(N,{get registerIcon(){return e.state.registerIcon},get slug(){return n().id},get name(){return n().catalog.name},get iconUrl(){return o()},get authorIconUrl(){return s()},get whiteBackground(){return m(()=>!!n().catalog.official)()?!!o():n().catalog.official},get loading(){return!!(n().catalog.imageUrl&&e.state.iconLoading?.(n().catalog.imageUrl)||r().author?.imageUrl&&e.state.iconLoading?.(r().author.imageUrl))}})},get titleAction(){return[m(()=>m(()=>!!(n().local.action===`install`||i()))()?g(j,{get reason(){return e.state.installBlockedReason},descriptionTarget:()=>t??null,get children(){return g(I,{get registerInstallAction(){return e.state.registerInstallAction},onButtonRef:e=>t=e,buttonClass:`btn oc-action plugin-catalog-detail__install`,primary:!0,get title(){return e.state.installTitle},get disabled(){return!e.state.canInstall},get busy(){return!!e.state.busy},get progress(){return e.state.installProgress},get onInstall(){return e.state.onInstall}})}}):void 0),m(()=>z(e.state.onAskPlugin,n().local.action!==`install`&&!i()))]},get identity(){return P(e.value)},get sidebar(){return B(e.value)},get recommendations(){return g(K,{get id(){return n().id},get name(){return n().catalog.name},get prompts(){return r().recommendedPrompts},get iconUrl(){return o()},get registerIcon(){return e.state.registerIcon},get busy(){return e.state.busy||e.state.promptBusy},get disabled(){return!!e.state.promptBlockedReason},get disabledReason(){return e.state.promptBlockedReason},get onSelect(){return e.state.onSelectPrompt}})},get panel(){return[m(()=>L(e.state.message,{busy:e.state.busy,onContinue:e.state.canInstall?e.state.onContinueInstall:void 0})),m(()=>R({contracts:r().contracts,uiCapabilities:r().uiCapabilities,skillsSection:e.state.skillsSection,skills:r().skills,tools:(r().contracts?.tools??[]).map(e=>({name:e})),mcpServers:r().mcpServers,mcpServerDetails:r().mcpServerDetails}))]},get readme(){return m(()=>!!r().readme)()?J(r().readme):void 0}})}function Y(){var e=Z(),t=e.firstChild.nextSibling,n=t.firstChild.nextSibling;return p(e,g(U,{}),t),p(n,()=>B(void 0,void 0,void 0,!0)),re(()=>a(`pluginsPage.detailLoading`),t=>{h(e,`aria-label`,t)}),e}function le(e){let t=u(()=>e.read),n=u(()=>t().receipt()),i=u(()=>e.result?.plugin.id),c=()=>t().value();return g(E,te({wide:!0,carapace:!0},{get children(){return g(v,{get on(){return i()??n()},get fallback(){return g(Y,{})},get children(){return g(d,{fallback:(t,n)=>g(s,{tone:`danger`,get action(){var t=Q();return t._$$click=()=>{e.onRetry(),n()},p(t,()=>a(`pluginsPage.tryAgain`)),t},get children(){return o(r(t()))}}),get children(){return[m(()=>c()),m(()=>m(()=>!e.connected)()?g(D,{get children(){return g(w,{get message(){return a(`pluginsPage.discoveryOffline`)}})}}):g(ne,{get when(){return e.result},get fallback(){return g(Y,{})},children:t=>g(ce,{get value(){return t()},state:e})}))]}})}})}}))}var X,Z,Q;function $(){return($=e((()=>{_(),f(),C(),b(),c(),l(),k(),n(),i(),M(),H(),G(),oe(),V(),F(),A(),q(),X=y(`<article class="plugin-catalog-detail__readme sidebar-markdown">`),Z=y(`<section class="plugin-catalog-detail plugin-catalog-detail--loading"><div class="plugin-catalog-detail__back skeleton"></div><div class=plugin-catalog-detail__content><div class=plugin-catalog-detail__main aria-hidden=true><div class="plugin-catalog-detail__loading-card skeleton"></div><div class="plugin-catalog-detail__loading-card skeleton"></div></div><aside class=plugin-catalog-detail__sidebar>`),Q=y(`<button type=button class="btn btn--sm">`),ae([`click`])})))()}export{$ as n,J as r,se as t};