UNPKG

decocms

Version:

Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools

2 lines (1 loc) • 3.22 kB
import{c as x,b as p,j as c,r as h,m as S,a9 as b}from"./index-DoEtSiIe.js";import{a as g,b as j,A as w}from"./alert-C5EpdwBA.js";import{c as y}from"./section-array-field-yz7QHNSD.js";function k(t){const e=x.c(4),{text:r}=t;let o;e[0]!==r?(o=r.split("`").map(N),e[0]=r,e[1]=o):o=e[1];let s;return e[2]!==o?(s=c.jsx(c.Fragment,{children:o}),e[2]=o,e[3]=s):s=e[3],s}function N(t,e){return e%2===1?c.jsx("code",{className:"whitespace-nowrap rounded bg-muted px-1 py-px font-mono text-[0.85em] text-foreground",children:t},e):c.jsx(h.Fragment,{children:t},e)}const D={quickstart:"decoServe.docs.quickstart",siteEditor:"decoServe.docs.siteEditor",serve:"decoServe.docs.serve",schema:"decoServe.docs.schema",troubleshooting:"decoServe.docs.troubleshooting"};function R(t){const e=x.c(20),{links:r,className:o}=t,s=p();let n;e[0]!==s?(n=s("decoServe.docs.heading"),e[0]=s,e[1]=n):n=e[1];let a;e[2]!==o?(a=S("flex flex-col gap-2 text-sm",o),e[2]=o,e[3]=a):a=e[3];let i;e[4]!==s?(i=s("decoServe.docs.heading"),e[4]=s,e[5]=i):i=e[5];let l;e[6]!==i?(l=c.jsx("span",{className:"text-muted-foreground",children:i}),e[6]=i,e[7]=l):l=e[7];let d;if(e[8]!==r||e[9]!==s){let u;e[11]!==s?(u=v=>c.jsxs("a",{href:y[v],target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[s(D[v]),c.jsx(b,{"aria-hidden":"true",className:"size-3.5"}),c.jsx("span",{className:"sr-only",children:s("decoServe.docs.newTab")})]},v),e[11]=s,e[12]=u):u=e[12],d=r.map(u),e[8]=r,e[9]=s,e[10]=d}else d=e[10];let f;e[13]!==d?(f=c.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:d}),e[13]=d,e[14]=f):f=e[14];let m;return e[15]!==n||e[16]!==a||e[17]!==l||e[18]!==f?(m=c.jsxs("nav",{"aria-label":n,className:a,children:[l,f]}),e[15]=n,e[16]=a,e[17]=l,e[18]=f,e[19]=m):m=e[19],m}function T(t,e,r){switch(e.reason){case"not-answering":return{title:t("decoServe.state.notAnswering.title"),body:t("decoServe.state.notAnswering.short",{host:r})};case"outdated":return{title:t("decoServe.state.outdated.title"),body:t("decoServe.state.outdated.body",{host:r})};case"version-mismatch":return{title:t("decoServe.state.versionMismatch.title"),body:t("decoServe.state.versionMismatch.body",{host:r})};case"not-deco-serve":return{title:t("decoServe.state.notDecoServe.title",{host:r}),body:t("decoServe.state.notDecoServe.body",{host:r})};case"error":return{title:t("decoServe.state.error.title"),body:t("decoServe.state.error.body",{detail:e.detail??""})}}}function C(){const t=x.c(11),e=p();let r;t[0]!==e?(r=e("decoServe.lna.deniedTitle"),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==r?(o=c.jsx(g,{className:"line-clamp-none",children:r}),t[2]=r,t[3]=o):o=t[3];let s;t[4]!==e?(s=e("decoServe.lna.deniedBody"),t[4]=e,t[5]=s):s=t[5];let n;t[6]!==s?(n=c.jsx(j,{children:s}),t[6]=s,t[7]=n):n=t[7];let a;return t[8]!==o||t[9]!==n?(a=c.jsx(w,{variant:"destructive",children:c.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[o,n]})}),t[8]=o,t[9]=n,t[10]=a):a=t[10],a}function _(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}export{R as D,C as L,k as R,T as s,_ as w};