astronaut-cms 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +84 -3
  3. package/dist/admin/THIRD_PARTY_LICENSES.md +7598 -0
  4. package/dist/admin/assets/assistant-DkS355co.js +201 -0
  5. package/dist/admin/assets/badge-BXsOvOPX.js +1 -0
  6. package/dist/admin/assets/changes-Ba0G_GN1.js +1 -0
  7. package/dist/admin/assets/client-VKp75fDU.js +5 -0
  8. package/dist/admin/assets/clsx-DB0hHKMi.js +1 -0
  9. package/dist/admin/assets/collapsible-B6P_J0Bg.js +1 -0
  10. package/dist/admin/assets/collapsible-item-UaoJaaPw.js +1 -0
  11. package/dist/admin/assets/collections._collection-BE1enDCq.js +1 -0
  12. package/dist/admin/assets/collections._collection._entry-D3UksnCo.js +52 -0
  13. package/dist/admin/assets/collections._collection.index-BN5d8UIY.js +1 -0
  14. package/dist/admin/assets/component-lookup-CUCiK8Xh.js +4 -0
  15. package/dist/admin/assets/config-Pm_BHLNT.js +1 -0
  16. package/dist/admin/assets/copy-DezZzPMV.js +1 -0
  17. package/dist/admin/assets/css-BGIxQoYs.js +1 -0
  18. package/dist/admin/assets/css-DgaLhXQH.js +1 -0
  19. package/dist/admin/assets/diff-woXpYk--.js +1 -0
  20. package/dist/admin/assets/dist-DzkcSBZl.js +1 -0
  21. package/dist/admin/assets/dist-UbA1s2kM.js +1 -0
  22. package/dist/admin/assets/docx-BctAmX91.js +56 -0
  23. package/dist/admin/assets/editor-FGqMznBK.js +2 -0
  24. package/dist/admin/assets/empty-DSBYiI_7.js +1 -0
  25. package/dist/admin/assets/entry-link-CQLN2Zpf.js +158 -0
  26. package/dist/admin/assets/error-banner-yskeRXe8.js +159 -0
  27. package/dist/admin/assets/errors-DkJ5E_ak.js +1 -0
  28. package/dist/admin/assets/field-BDK5tt3J.js +41 -0
  29. package/dist/admin/assets/field-schema-CacrjSYw.js +1 -0
  30. package/dist/admin/assets/file-text-BzBif8ui.js +1 -0
  31. package/dist/admin/assets/github-dark-C-LZuMrd.js +1 -0
  32. package/dist/admin/assets/github-light-EUqPIrTm.js +1 -0
  33. package/dist/admin/assets/highlighted-body-JLMTFACH-CIQujGv2.js +1 -0
  34. package/dist/admin/assets/html-CvFb5cGI.js +1 -0
  35. package/dist/admin/assets/javascript-BzbQS41l.js +1 -0
  36. package/dist/admin/assets/javascript-CpIGwZ_Y.js +1 -0
  37. package/dist/admin/assets/json-qhed-kSA.js +1 -0
  38. package/dist/admin/assets/jsx-Bz0zcwM4.js +1 -0
  39. package/dist/admin/assets/lib-CMURo-7A.js +21 -0
  40. package/dist/admin/assets/library-Cr3f75Es.js +1 -0
  41. package/dist/admin/assets/list-skeleton-BdTNfVXs.js +1 -0
  42. package/dist/admin/assets/markdown-BYOwaDjH.js +1 -0
  43. package/dist/admin/assets/matchContext-Bq5Es9aD.js +2 -0
  44. package/dist/admin/assets/media-browser-9-CPTCks.js +1 -0
  45. package/dist/admin/assets/media._library-BfFaEZLR.js +1 -0
  46. package/dist/admin/assets/mermaid-WFAXDIZX-CJ3hhA0i.js +1 -0
  47. package/dist/admin/assets/page-header-B4nvAsVA.js +1 -0
  48. package/dist/admin/assets/pdf-DgessaF0.js +106 -0
  49. package/dist/admin/assets/python-gzcpVVnB.js +1 -0
  50. package/dist/admin/assets/react-kbcsfQYH.js +1 -0
  51. package/dist/admin/assets/rolldown-runtime-BWaJ3C7D.js +1 -0
  52. package/dist/admin/assets/routes-CBt04sNR.js +1 -0
  53. package/dist/admin/assets/routes-D7tEdYGV.js +1 -0
  54. package/dist/admin/assets/save-actions-Cz0TkpcP.js +32 -0
  55. package/dist/admin/assets/select-Bv2EoLhN.js +1 -0
  56. package/dist/admin/assets/separator-DlYj_PoQ.js +3 -0
  57. package/dist/admin/assets/shell-DBEiq06l.js +1 -0
  58. package/dist/admin/assets/shellscript-CLZ0U2zV.js +1 -0
  59. package/dist/admin/assets/skeleton-CKiqTaRh.js +1 -0
  60. package/dist/admin/assets/sql-CEbI0hMM.js +1 -0
  61. package/dist/admin/assets/syntax-BAXqRKRO.js +8 -0
  62. package/dist/admin/assets/toggle-Y2UpJZyU.js +1 -0
  63. package/dist/admin/assets/toml-BPTmHmyx.js +1 -0
  64. package/dist/admin/assets/tsx-udAQXfEw.js +1 -0
  65. package/dist/admin/assets/typescript-bsJCZSQ-.js +1 -0
  66. package/dist/admin/assets/ui.module.css-WaO_77ml.js +56 -0
  67. package/dist/admin/assets/use-entries-B2lsaiK9.js +1 -0
  68. package/dist/admin/assets/useSelector-CWr3iU9K.js +1 -0
  69. package/dist/admin/assets/yaml-rwi0_p6S.js +1 -0
  70. package/dist/admin/assets/zwitch-Wwuax-dJ.js +1 -0
  71. package/dist/admin/bootstrap.d.ts +1 -0
  72. package/dist/admin/bootstrap.js +1 -0
  73. package/dist/admin/editor.d.ts +57 -0
  74. package/dist/admin/editor.js +1 -0
  75. package/dist/server/assets.d.ts +2 -0
  76. package/dist/server/assets.js +30 -0
  77. package/dist/server/chunks/anchors-DuZ1fokt.js +86 -0
  78. package/dist/server/chunks/auth-DJP9ryVd.js +44 -0
  79. package/dist/server/chunks/cms-markers-CUqrOnfA.js +78 -0
  80. package/dist/server/chunks/component-lookup-DAFg_Qg8.js +128 -0
  81. package/dist/server/chunks/config-WQqG4mNH.d.ts +193 -0
  82. package/dist/server/chunks/digest-BYzWNJea.js +753 -0
  83. package/dist/server/chunks/entry-checks-CKMag1G4.js +608 -0
  84. package/dist/server/chunks/field-schema-CfdN75jT.js +48 -0
  85. package/dist/server/chunks/http-BnsNh57m.d.ts +35 -0
  86. package/dist/server/chunks/i18n-BPmx7ESy.d.ts +15 -0
  87. package/dist/server/chunks/index-CYbkNvu5.d.ts +22 -0
  88. package/dist/server/chunks/media-BhqUVVYY.js +223 -0
  89. package/dist/server/chunks/paths-CEW9fvg8.js +17 -0
  90. package/dist/server/chunks/paths-Dztx2eUw.js +13 -0
  91. package/dist/server/chunks/types-DOR5XaJO.js +397 -0
  92. package/dist/server/chunks/types-Dkx4Xovf.d.ts +359 -0
  93. package/dist/server/chunks/types-DwA-C6Br.d.ts +266 -0
  94. package/dist/server/chunks/user-config-DoypbpQf.js +283 -0
  95. package/dist/server/chunks/xml-D8qPILJU.js +81 -0
  96. package/dist/server/config.d.ts +3 -0
  97. package/dist/server/config.js +18 -0
  98. package/dist/server/content.d.ts +48 -0
  99. package/dist/server/content.js +89 -0
  100. package/dist/server/endpoint.d.ts +11 -0
  101. package/dist/server/endpoint.js +2712 -0
  102. package/dist/server/integration.d.ts +7 -0
  103. package/dist/server/integration.js +1174 -0
  104. package/dist/server/internal.d.ts +65 -0
  105. package/dist/server/internal.js +30 -0
  106. package/dist/server/server-local.d.ts +453 -0
  107. package/dist/server/server-local.js +336 -0
  108. package/dist/styles/THIRD_PARTY_LICENSES.md +193 -0
  109. package/dist/styles/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  110. package/dist/styles/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  111. package/dist/styles/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  112. package/dist/styles/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  113. package/dist/styles/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  114. package/dist/styles/styles.css +3 -0
  115. package/package.json +151 -5
  116. package/src/astro/Image.astro +28 -0
  117. package/src/astro/Video.astro +44 -0
  118. package/src/astro/admin.astro +137 -0
  119. package/src/astro/licenses.ts +5 -0
@@ -0,0 +1 @@
1
+ import{a as e}from"./error-banner-yskeRXe8.js";import{i as t,m as n,n as r}from"./separator-DlYj_PoQ.js";import"react";import{jsx as i}from"react/jsx-runtime";function a({className:n}){return/* @__PURE__ */ i(e,{className:t(`transition-transform group-data-[state=open]/disclosure:rotate-90`,n)})}var o=r(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s({className:e,variant:r=`default`,asChild:a=!1,...s}){return/* @__PURE__ */ i(a?n:`span`,{"data-slot":`badge`,"data-variant":r,className:t(o({variant:r}),e),...s})}export{a as n,s as t};
@@ -0,0 +1 @@
1
+ import{o as e,r as t}from"./separator-DlYj_PoQ.js";import{o as n}from"./use-entries-B2lsaiK9.js";import{D as r,f as i,r as a,t as o,z as s}from"./error-banner-yskeRXe8.js";import{C as c,E as l,a as u,o as d,s as f}from"./client-VKp75fDU.js";import{t as p}from"./config-Pm_BHLNT.js";import{a as m,l as h,r as g,s as _,t as v}from"./page-header-B4nvAsVA.js";import{n as y,t as b}from"./entry-link-CQLN2Zpf.js";import{t as x}from"./collapsible-item-UaoJaaPw.js";import{n as S}from"./collapsible-B6P_J0Bg.js";import{t as C}from"./badge-BXsOvOPX.js";import{a as w,i as T,n as E,r as D,t as O}from"./empty-DSBYiI_7.js";import{t as k}from"./list-skeleton-BdTNfVXs.js";import{useEffect as A,useState as j}from"react";import{Fragment as M,jsx as N,jsxs as P}from"react/jsx-runtime";var F={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};F.node;var I=t(F),L={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};L.node;var R=t(L),z={name:`file-plus-corner`,size:24,node:[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]],aliases:[`file-plus-2`]};z.node;var B=t(z),V={name:`file-symlink`,size:24,node:[[`path`,{d:`M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7`,key:`huwfnr`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m10 18 3-3-3-3`,key:`18f6ys`}]]};V.node;var H=t(V),U={name:`file-x-corner`,size:24,node:[[`path`,{d:`M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5`,key:`1jo35a`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m15 17 5 5`,key:`36xl1x`}],[`path`,{d:`m20 17-5 5`,key:`vdz27y`}]],aliases:[`file-x-2`]};U.node;var W=t(U);function G(e){let{path:t}=e;for(let[n,r]of Object.entries(p.collections)){let a=c(n);if(r.loaderFileName){if(t===r.loaderFileName)return{...e,collection:n,label:a};continue}let o=i(r,t);if(o)return{...e,collection:n,entryId:o.id,label:r.singleton?.translations.length===0?a:`${a} / ${o.id}`}}let n=r(p.media).map(e=>s(t,e)).find(e=>e!=null);return{...e,label:n??t}}var K={added:{icon:B,variant:`default`,label:e=>e.changes.added},modified:{icon:R,variant:`secondary`,label:e=>e.changes.modified},deleted:{icon:W,variant:`destructive`,label:e=>e.changes.deleted},renamed:{icon:H,variant:`outline`,label:e=>e.changes.renamed}};function q({change:t}){let{t:n}=e(),r=G(t),{icon:i,variant:o,label:s}=K[r.kind],c=d(t),[l,f]=j(!1);return A(()=>{l&&u(t)},[l,t]),/* @__PURE__ */ P(x,{open:l,onOpenChange:f,role:`listitem`,icon:/* @__PURE__ */ N(i,{}),label:/* @__PURE__ */ P(M,{children:[/* @__PURE__ */ N(h,{children:r.label}),r.previousPath&&/* @__PURE__ */ P(m,{className:`flex items-center gap-1`,children:[/* @__PURE__ */ N(I,{className:`size-3 shrink-0`,"aria-hidden":`true`}),/* @__PURE__ */ N(`span`,{className:`truncate`,children:r.previousPath})]})]}),children:[/* @__PURE__ */ P(g,{children:[c&&/* @__PURE__ */ N(a,{className:`size-4 text-muted-foreground`,"aria-label":n(e=>e.changes.reviewed)}),/* @__PURE__ */ N(C,{variant:o,children:n(s)}),r.collection&&r.entryId&&r.kind!==`deleted`&&/* @__PURE__ */ N(b,{collection:r.collection,entryId:r.entryId})]}),/* @__PURE__ */ N(S,{className:`basis-full`,children:r.patch?/* @__PURE__ */ N(y,{code:r.patch,language:`diff`}):/* @__PURE__ */ N(`p`,{className:`text-xs text-muted-foreground`,children:n(e=>e.changes.noDiff)})})]})}function J({changes:t}){let{t:n}=e(),r=f(t);return t.length===0?/* @__PURE__ */ N(O,{children:/* @__PURE__ */ P(D,{children:[/* @__PURE__ */ N(T,{variant:`icon`,children:/* @__PURE__ */ N(l,{})}),/* @__PURE__ */ N(w,{children:n(e=>e.changes.none)}),/* @__PURE__ */ N(E,{children:n(e=>e.changes.empty)})]})}):/* @__PURE__ */ P(`div`,{className:`space-y-2`,children:[/* @__PURE__ */ N(`p`,{className:`text-sm text-muted-foreground`,children:n(e=>e.changes.reviewProgress,{reviewed:r,count:t.length})}),/* @__PURE__ */ N(_,{children:t.map(e=>/* @__PURE__ */ N(q,{change:e},`${e.kind}:${e.path}`))})]})}function Y(){let{t}=e(),{data:r,error:i}=n();return i?/* @__PURE__ */ N(o,{children:t(e=>e.changes.failedLoad,{message:i.message})}):r?/* @__PURE__ */ P(`div`,{className:`mx-auto flex min-h-0 w-full max-w-4xl flex-1 flex-col`,children:[/* @__PURE__ */ N(v,{title:t(e=>e.changes.title)}),/* @__PURE__ */ N(`div`,{className:`min-h-0 flex-1 overflow-y-auto pr-1`,children:/* @__PURE__ */ N(J,{changes:r})})]}):/* @__PURE__ */ N(k,{})}export{Y as component};
@@ -0,0 +1,5 @@
1
+ import{$ as e,At as t,C as n,Dt as r,Et as i,F as a,G as o,I as s,K as c,M as l,Mt as u,Ot as d,Tt as f,V as p,Z as m,c as h,ct as g,d as _,dt as v,g as y,ht as b,jt as x,kt as S,n as C,ot as w,p as T,q as ee,rt as E,t as te,v as ne,vt as D,wt as O,y as re}from"./error-banner-yskeRXe8.js";import{a as k,c as ie,f as A,h as ae,i as j,l as oe,m as se,n as ce,o as M,p as le,r as N,s as ue,t as de,u as fe,v as P}from"./separator-DlYj_PoQ.js";import{C as pe,a as me,c as he,f as ge,i as F,m as _e,o as ve,p as ye,r as be,s as xe,v as Se}from"./matchContext-Bq5Es9aD.js";import{A as Ce,B as we,C as Te,D as Ee,E as De,F as I,G as Oe,H as ke,I as L,J as Ae,K as je,L as Me,N as Ne,O as Pe,T as Fe,U as Ie,V as Le,W as Re,X as ze,Y as Be,a as Ve,j as He,k as Ue,q as We,w as Ge}from"./media-browser-9-CPTCks.js";import{t as R}from"./useSelector-CWr3iU9K.js";import{A as Ke,G as qe,K as Je,L as Ye,M as Xe,N as Ze,U as Qe,V as $e,W as et,_ as tt,_t as nt,at as rt,ct as it,dt as at,et as ot,ft as st,ht as ct,it as lt,j as ut,mt as dt,nt as ft,pt,rt as mt,st as ht,ut as gt,v as _t}from"./field-BDK5tt3J.js";import{t as z}from"./config-Pm_BHLNT.js";import{a as vt,d as yt,f as bt,i as xt,n as St,o as Ct,s as wt,u as Tt}from"./component-lookup-CUCiK8Xh.js";import{t as Et}from"./errors-DkJ5E_ak.js";import{n as Dt,t as Ot}from"./file-text-BzBif8ui.js";import{_ as kt,a as At,c as jt,i as Mt,n as Nt,o as Pt,p as Ft,r as It,t as Lt,u as Rt}from"./use-entries-B2lsaiK9.js";import{t as zt}from"./skeleton-CKiqTaRh.js";import{m as Bt,r as Vt}from"./routes-D7tEdYGV.js";import{n as Ht,t as Ut}from"./react-kbcsfQYH.js";import{t as Wt}from"./list-skeleton-BdTNfVXs.js";import*as B from"react";import Gt,{Component as Kt,Fragment as qt,createElement as Jt,useEffect as Yt,useMemo as Xt,useState as Zt}from"react";import{Fragment as Qt,jsx as V,jsxs as H}from"react/jsx-runtime";import{createRoot as $t}from"react-dom/client";import{collectionIcons as en,components as tn}from"virtual:astronaut-cms/user-config";var nn=Object.defineProperty,rn=(e,t)=>nn(e,`name`,{value:t,configurable:!0}),an=!1;function on(){let[e,t]=B.useState(an);return B.useEffect(()=>{an||(an=!0,t(!0))},[]),e}rn(on,`useIsHydrated`);var sn=B.useSyncExternalStore;function cn(){return()=>{}}rn(cn,`subscribe`);function ln(){return sn(cn,()=>!0,()=>!1)}rn(ln,`useIsHydratedModern`);var un=typeof sn==`function`?ln:on,dn=Object.defineProperty,U=(e,t)=>dn(e,`name`,{value:t,configurable:!0}),fn=`rovingFocusGroup.onEntryFocus`,pn={bubbles:!1,cancelable:!0},mn=`RovingFocusGroup`,[hn,gn,_n]=bt(mn),[vn,yn]=t(mn,[_n]),bn={Vertical:`vertical`,Horizontal:`horizontal`},xn={LTR:`ltr`,RTL:`rtl`},[Sn,Cn]=vn(mn),wn=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ U(function(e,t){return/* @__PURE__ */ V(hn.Provider,{scope:e.__scopeRovingFocusGroup,children:/* @__PURE__ */ V(hn.Slot,{scope:e.__scopeRovingFocusGroup,children:/* @__PURE__ */ V(Tn,{...e,ref:t})})})},`RovingFocusGroup`)),Tn=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ U(function(e,t){let{__scopeRovingFocusGroup:n,orientation:i,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=B.useRef(null),m=P(t,p),h=yt(o),[g,_]=r({prop:s,defaultProp:c??null,onChange:l,caller:mn}),[v,y]=B.useState(!1),b=nt(u),S=gn(n),C=B.useRef(!1),[w,T]=B.useState(0);return B.useEffect(()=>{let e=p.current;if(e)return e.addEventListener(fn,b),()=>e.removeEventListener(fn,b)},[b]),/* @__PURE__ */ V(Sn,{scope:n,orientation:i,dir:h,loop:a,currentTabStopId:g,onItemFocus:B.useCallback(e=>_(e),[_]),onItemShiftTab:B.useCallback(()=>y(!0),[]),onFocusableItemAdd:B.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:B.useCallback(()=>T(e=>e-1),[]),children:/* @__PURE__ */ V(A.div,{tabIndex:v||w===0?-1:0,"data-orientation":i,...f,ref:m,style:{outline:`none`,...e.style},onMouseDown:x(e.onMouseDown,()=>{C.current=!0}),onFocus:x(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(fn,pn);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);jn([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),d)}}C.current=!1}),onBlur:x(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),En=`RovingFocusGroupItem`,Dn=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ U(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=S(),l=a||c,d=Cn(En,n),f=d.currentTabStopId===l,p=gn(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d,_=un();return u(()=>{if(_&&r)return m(),()=>h()},[_,r,m,h]),B.useEffect(()=>{if(!_&&r)return m(),()=>h()},[_,r,m,h]),/* @__PURE__ */ V(hn.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:/* @__PURE__ */ V(A.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:x(e.onMouseDown,e=>{r?d.onItemFocus(l):e.preventDefault()}),onFocus:x(e.onFocus,()=>d.onItemFocus(l)),onKeyDown:x(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=An(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?Mn(n,r+1):n.slice(r+1)}setTimeout(()=>jn(n))}}),children:typeof o==`function`?o({isCurrentTabStop:f,hasTabStop:g!=null}):o})})},`RovingFocusGroupItem`)),On={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function kn(e,t){return t===xn.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}U(kn,`getDirectionAwareKey`);function An(e,t,n){let r=kn(e.key,n);if(!(t===bn.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===bn.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return On[r]}U(An,`getFocusIntent`);function jn(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}U(jn,`focusFirst`);function Mn(e,t){return e.map((n,r)=>e[(t+r)%e.length])}U(Mn,`wrapArray`),i({jitless:!0});var Nn={type:`3rdParty`,init(e){oe(e.options.react),ie(e)}};function Pn({i18n:e,defaultNS:t,children:n}){let r=Xt(()=>({i18n:e,defaultNS:t}),[e,t]);return Jt(ue.Provider,{value:r},n)}var Fn=process.env.NODE_ENV===`production`?void 0:B.createContext(void 0);function In(e,t){return/* @__PURE__ */ V(Fn.Provider,{value:t,children:e})}var Ln=class extends B.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;if(e){let t=B.createElement(this.props.errorComponent??Rn,{error:e[0],reset:this.reset});return process.env.NODE_ENV===`production`?t:In(t,`errorComponent`)}return this.props.children}};function Rn({error:e}){let[t,n]=B.useState(process.env.NODE_ENV!==`production`);return/* @__PURE__ */ H(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[/* @__PURE__ */ H(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[/* @__PURE__ */ V(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),/* @__PURE__ */ V(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),/* @__PURE__ */ V(`div`,{style:{height:`.25rem`}}),t?/* @__PURE__ */ V(`div`,{children:/* @__PURE__ */ V(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?/* @__PURE__ */ V(`code`,{children:e.message}):null})}):null]})}var zn=()=>!0,Bn=()=>!1;function Vn({children:e,fallback:t=null}){return/* @__PURE__ */ V(Gt.Fragment,{children:Hn()?e:t})}function Hn(e=!0){return Gt.useSyncExternalStore(Un,zn,e?Bn:zn)}function Un(){return()=>{}}/* @__NO_SIDE_EFFECTS__ */
2
+ function Wn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Gn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Kn=[],qn=0,{link:Jn,unlink:Yn,propagate:Xn,checkDirty:Zn,shallowPropagate:Qn}=/* @__PURE__ */ Wn({update(e){return e._update()},notify(e){Kn[er++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,rr(e))}}),$n=0,er=0,W,tr=0;function nr(e){try{++tr,e()}finally{--tr||ir()}}function rr(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Yn(n,e)}function ir(){if(!(tr>0)){for(;$n<er;){let e=Kn[$n];Kn[$n++]=void 0,e.notify()}$n=0,er=0}}function ar(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return W!==void 0&&Jn(i,W,qn),i._snapshot},subscribe(e){let t=Gn(e),n={current:!1},r=or(()=>{i.get(),n.current?(W=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=W,o=t?.compare??Object.is;if(n)W=i,++qn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{W=a,n&&(i.flags&=-5),rr(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Zn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Qn(e)}}else e&32&&(i.flags=e&-33);return W!==void 0&&Jn(i,W,qn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Xn(e),Qn(e),ir())}},i}function or(e){let t=()=>{let t=W;W=n,++qn,n.depsTail=void 0,n.flags=6;try{return e()}finally{W=t,n.flags&=-5,rr(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Zn(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,rr(this)}};return t(),n}function sr(e){let t=F(),n=`not-found-${R(t.stores.location,e=>e.pathname)}-${R(t.stores.status)}`;return/* @__PURE__ */ V(Ln,{getResetKey:()=>n,onCatch:(t,n)=>{if(ye(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(ye(t))return e.fallback?.(t);throw t},children:e.children})}function cr(){return/* @__PURE__ */ V(`p`,{children:`Not Found`})}function lr(e,t,n){if(!t.options.notFoundComponent){if(e.options.defaultNotFoundComponent){let t=/* @__PURE__ */ V(e.options.defaultNotFoundComponent,{...n});return process.env.NODE_ENV===`production`?t:In(t,`notFoundComponent`)}return process.env.NODE_ENV!==`production`&&(t.options.notFoundComponent||console.warn(`Warning: A notFoundError was encountered on the route with ID "${t.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`)),/* @__PURE__ */ V(cr,{})}let r=/* @__PURE__ */ V(t.options.notFoundComponent,{...n});return process.env.NODE_ENV===`production`?r:In(r,`notFoundComponent`)}function ur(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;if(!n)return null;let r=/* @__PURE__ */ V(n,{});return process.env.NODE_ENV===`production`?r:In(r,`pendingComponent`)}var dr=(e,t)=>e[0]===t[0]&&e[1]===t[1],fr=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,pr=B.memo(function({routeId:e}){let t=F(),n=t.stores.getMatchStore(e);return mr(t,R(n))});function mr(e,t){let n=e.routesById[t.routeId],r=ur(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=fr(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=/* @__PURE__ */ V(hr,{match:t});s&&(l=/* @__PURE__ */ V(Vn,{fallback:r,children:l})),o&&(l=/* @__PURE__ */ V(sr,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;let n=B.createElement(o,e);return process.env.NODE_ENV===`production`?n:In(n,`notFoundComponent`)},children:l})),i&&(l=/* @__PURE__ */ V(Ln,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(ye(e))throw e.routeId??=t.routeId,e;process.env.NODE_ENV!==`production`&&console.warn(`Warning: Error in route match: ${t.id}`),a?.(e,n)},children:l})),c&&(l=/* @__PURE__ */ V(B.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?/* @__PURE__ */ V(be.Provider,{value:t.routeId,children:/* @__PURE__ */ H(u,{children:[l,null]})}):/* @__PURE__ */ H(be.Provider,{value:t.routeId,children:[l,null]})}var hr=B.memo(function({match:e}){let t=F(),n=e.routeId,r=t.routesById[n],i=B.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=B.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?/* @__PURE__ */ V(e,{},i):/* @__PURE__ */ V(gr,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!fr(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return ur(t,r)}if(e.status===`notFound`)return lr(t,r,e.error);if(e.status===`error`)throw e.error;return a}),gr=B.memo(function(){if(process.env.NODE_ENV!==`production`){let e=B.useContext(Fn);e&&console.warn(`Warning: An <Outlet /> was rendered inside a ${e}. <Outlet /> should only be rendered inside a route component.`)}let e=F(),t=B.useContext(be),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=R(a,e=>[!!e._notFound,e.error],{compare:dr}),i=R(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return lr(e,e.routesById[t],r);if(!i)return null;let a=/* @__PURE__ */ V(pr,{routeId:i});return t===`__root__`?/* @__PURE__ */ V(B.Suspense,{fallback:ur(e),children:a}):a});function _r(e,t){let n=e[1];e.length=0,n?.(t)}function vr({t:e}){let t=F(),n=t._rendered??=[],r=process.env.NODE_ENV===`production`?void 0:B.useRef(!1);return t.startTransition=(r,i)=>new Promise(a=>{_r(n,!1),n.push(i,a),e(t),B.startTransition(r)}),Ie(()=>{let e=t.history.subscribe(t.load);if(r?.current)return e;r&&(r.current=!0),t.updateLatestLocation();let i=t.latestLocation,a=t.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Se(i.publicHref)!==Se(a.publicHref))return t.commitLocation({...a,replace:!0,ignoreBlocker:!0}),e;let o=t.stores.resolvedLocation.get();return o?.href===i.href&&o.state.__TSR_key===i.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...xe(o,o)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function yr(){let e=F(),t=e.routesById[ge],n=ur(e,t),r=/* @__PURE__ */ H(Qt,{children:[/* @__PURE__ */ V(vr,{t:B.useState()[1]}),e.ssr?/* @__PURE__ */ V(br,{}):/* @__PURE__ */ V(B.Suspense,{fallback:n,children:/* @__PURE__ */ V(br,{})})]});return e.options.InnerWrap?/* @__PURE__ */ V(e.options.InnerWrap,{children:r}):r}function br(){let e=F(),t=e._rendered,n=R(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;Ie(()=>{t[0]===n&&_r(t,!0)},[t,n]);let a=i?/* @__PURE__ */ V(pr,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:/* @__PURE__ */ V(Ln,{getResetKey:()=>r,onCatch:process.env.NODE_ENV===`production`?void 0:e=>{console.warn(`Warning: The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`),console.warn(`Warning:`,e)},children:a})}function xr(){let e=F();return B.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e,R(e.stores.location,e=>e.href),R(e.stores.resolvedLocation,e=>e?.href),R(e.stores.status)])}function Sr(e){let t=F();return R(t.stores.matches,ke(e,t))}var Cr=e=>({createMutableStore:ar,createReadonlyStore:ar,batch:nr}),wr=e=>new Tr(e),Tr=class extends ve{constructor(e){super(e,Cr)}};function Er({router:e,children:t,...n}){pe(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=/* @__PURE__ */ V(me.Provider,{value:e,children:t});return e.options.Wrap?/* @__PURE__ */ V(e.options.Wrap,{children:r}):r}function Dr({router:e,...t}){return/* @__PURE__ */ V(Er,{router:e,...t,children:/* @__PURE__ */ V(yr,{})})}var Or=Object.defineProperty,G=(e,t)=>Or(e,`name`,{value:t,configurable:!0}),kr=[`Enter`,` `],Ar=[`ArrowDown`,`PageUp`,`Home`],jr=[`ArrowUp`,`PageDown`,`End`],Mr=[...Ar,...jr];[...kr],[...kr];var Nr=`Menu`,[Pr,Fr,Ir]=bt(Nr),[K,Lr]=t(Nr,[Ir,it,yn]),Rr=it(),zr=yn(),[Br,Vr]=K(Nr),[Hr,Ur]=K(Nr),Wr=/* @__PURE__ */ G(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Rr(t),[c,l]=B.useState(null),u=B.useRef(!1),d=nt(a),f=yt(i);return B.useEffect(()=>{let e=/* @__PURE__ */ G(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=/* @__PURE__ */ G(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),B.useEffect(()=>{if(!n)return;let e=/* @__PURE__ */ G(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),/* @__PURE__ */ V(lt,{...s,children:/* @__PURE__ */ V(Br,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:/* @__PURE__ */ V(Hr,{scope:t,onClose:B.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Gr=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{__scopeMenu:n,...r}=e,i=Rr(n);return/* @__PURE__ */ V(rt,{...i,...r,ref:t})},`MenuAnchor`)),Kr=`MenuPortal`,[qr,Jr]=K(Kr,{forceMount:void 0}),Yr=/* @__PURE__ */ G(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Vr(Kr,t);return/* @__PURE__ */ V(qr,{scope:t,forceMount:n,children:/* @__PURE__ */ V(d,{present:n||a.open,children:/* @__PURE__ */ V(mt,{asChild:!0,container:i,children:r})})})},`MenuPortal`),q=`MenuContent`,[Xr,Zr]=K(q),Qr=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let n=Jr(q,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Vr(q,e.__scopeMenu),o=Ur(q,e.__scopeMenu);return/* @__PURE__ */ V(Pr.Provider,{scope:e.__scopeMenu,children:/* @__PURE__ */ V(d,{present:r||a.open,children:/* @__PURE__ */ V(Pr.Slot,{scope:e.__scopeMenu,children:o.modal?/* @__PURE__ */ V($r,{...i,ref:t}):/* @__PURE__ */ V(ei,{...i,ref:t})})})})},`MenuContent`)),$r=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let n=Vr(q,e.__scopeMenu),r=B.useRef(null),i=P(t,r);return B.useEffect(()=>{let e=r.current;if(e)return ft(e)},[]),/* @__PURE__ */ V(ni,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:x(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),ei=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let n=Vr(q,e.__scopeMenu);return/* @__PURE__ */ V(ni,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),ti=ae(`MenuContent.ScrollLock`),ni=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Vr(q,n),_=Ur(q,n),v=Rr(n),y=zr(n),b=Fr(n),[S,C]=B.useState(null),w=B.useRef(null),[T,ee]=B.useState(null);st(T);let{nodes:E,registry:te}=pt(),ne=!!(i||m),D=P(t,w,g.onContentChange,ee),O=B.useRef(0),re=B.useRef(``),k=B.useRef(0),ie=B.useRef(null),A=B.useRef(`right`),ae=B.useRef(0),j=B.useMemo(()=>m?[w,...E.map(e=>({current:e}))]:[],[w,E,m]),oe=m?ot:B.Fragment,se=m?{as:ti,allowPinchZoom:!0,shards:j}:void 0,ce=/* @__PURE__ */ G(e=>{let t=re.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Ti(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){re.current=e,window.clearTimeout(O.current),e!==``&&(O.current=window.setTimeout(()=>s(``),1e3))}G(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);B.useEffect(()=>()=>window.clearTimeout(O.current),[]),dt();let M=B.useCallback(e=>A.current===ie.current?.side&&Di(e,ie.current?.area),[]);return/* @__PURE__ */ V(Xr,{scope:n,searchRef:re,onItemEnter:B.useCallback(e=>{M(e)&&e.preventDefault()},[M]),onItemLeave:B.useCallback(e=>{M(e)||(w.current?.focus(),C(null))},[M]),onTriggerLeave:B.useCallback(e=>{M(e)&&e.preventDefault()},[M]),pointerGraceTimerRef:k,onPointerGraceIntentChange:B.useCallback(e=>{ie.current=e},[]),children:/* @__PURE__ */ V(at,{registry:ne?te:null,children:/* @__PURE__ */ V(oe,{...se,children:/* @__PURE__ */ V(gt,{asChild:!0,trapped:i,branches:E,onMountAutoFocus:x(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:/* @__PURE__ */ V(ct,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:/* @__PURE__ */ V(wn,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:x(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:/* @__PURE__ */ V(ht,{role:`menu`,"aria-orientation":`vertical`,"data-state":bi(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:D,style:{outline:`none`,...h.style},onKeyDown:x(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ce(e.key));let i=w.current;if(e.target!==i||!Mr.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);jr.includes(e.key)&&a.reverse(),Ci(a)}),onBlur:x(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),re.current=``)}),onPointerMove:x(e.onPointerMove,Oi(e=>{let t=e.target,n=ae.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ae.current?`right`:`left`;A.current=t,ae.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),ri=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{__scopeMenu:n,...r}=e;return/* @__PURE__ */ V(A.div,{role:`group`,...r,ref:t})},`MenuGroup`)),ii=`MenuItem`,ai=`menu.itemSelect`,oi=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=B.useRef(null),o=Ur(ii,e.__scopeMenu),s=Zr(ii,e.__scopeMenu),c=P(t,a),l=B.useRef(!1),u=/* @__PURE__ */ G(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(ai,{bubbles:!0,cancelable:!0});e.addEventListener(ai,e=>r?.(e),{once:!0}),le(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return/* @__PURE__ */ V(si,{...i,ref:c,disabled:n,onClick:x(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:x(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:x(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&kr.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),si=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Zr(ii,n),s=zr(n),c=B.useRef(null),l=P(t,c),[u,d]=B.useState(!1),[f,p]=B.useState(``);return B.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),/* @__PURE__ */ V(Pr.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:/* @__PURE__ */ V(Dn,{asChild:!0,...s,focusable:!r,children:/* @__PURE__ */ V(A.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:x(e.onPointerMove,Oi(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:x(e.onPointerLeave,Oi(e=>o.onItemLeave(e))),onFocus:x(e.onFocus,()=>d(!0)),onBlur:x(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[ci,li]=K(`MenuRadioGroup`,{value:void 0,onValueChange:/* @__PURE__ */ G(()=>{},`onValueChange`)}),ui=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{value:n,onValueChange:r,...i}=e,a=nt(r);return/* @__PURE__ */ V(ci,{scope:e.__scopeMenu,value:n,onValueChange:a,children:/* @__PURE__ */ V(ri,{...i,ref:t})})},`MenuRadioGroup`)),di=`MenuRadioItem`,fi=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{value:n,...r}=e,i=li(di,e.__scopeMenu),a=n===i.value;return/* @__PURE__ */ V(mi,{scope:e.__scopeMenu,checked:a,children:/* @__PURE__ */ V(oi,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Si(a),onSelect:x(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),pi=`MenuItemIndicator`,[mi,hi]=K(pi,{checked:!1}),gi=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=hi(pi,n);return/* @__PURE__ */ V(d,{present:r||xi(a.checked)||a.checked===!0,children:/* @__PURE__ */ V(A.span,{...i,ref:t,"data-state":Si(a.checked)})})},`MenuItemIndicator`)),_i=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ G(function(e,t){let{__scopeMenu:n,...r}=e;return/* @__PURE__ */ V(A.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[vi,yi]=K(`MenuSub`);function bi(e){return e?`open`:`closed`}G(bi,`getOpenState`);function xi(e){return e===`indeterminate`}G(xi,`isIndeterminate`);function Si(e){return xi(e)?`indeterminate`:e?`checked`:`unchecked`}G(Si,`getCheckedState`);function Ci(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}G(Ci,`focusFirst`);function wi(e,t){return e.map((n,r)=>e[(t+r)%e.length])}G(wi,`wrapArray`);function Ti(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=wi(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}G(Ti,`getNextMatch`);function Ei(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}G(Ei,`isPointInPolygon`);function Di(e,t){return t?Ei({x:e.clientX,y:e.clientY},t):!1}G(Di,`isPointerInGraceArea`);function Oi(e){return t=>t.pointerType===`mouse`?e(t):void 0}G(Oi,`whenMouse`);var ki=Object.defineProperty,J=(e,t)=>ki(e,`name`,{value:t,configurable:!0}),Ai=`DropdownMenu`,[ji,Mi]=t(Ai,[Lr]),Y=Lr(),[Ni,Pi]=ji(Ai),Fi=/* @__PURE__ */ J(e=>{let{__scopeDropdownMenu:t,children:n,dir:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=Y(t),u=B.useRef(null),[d,f]=r({prop:a,defaultProp:o??!1,onChange:s,caller:Ai});return/* @__PURE__ */ V(Ni,{scope:t,triggerId:S(),triggerRef:u,contentId:S(),open:d,onOpenChange:f,onOpenToggle:B.useCallback(()=>f(e=>!e),[f]),modal:c,children:/* @__PURE__ */ V(Wr,{...l,open:d,onOpenChange:f,dir:i,modal:c,children:n})})},`DropdownMenu`),Ii=`DropdownMenuTrigger`,Li=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ J(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Pi(Ii,n),o=Y(n),s=P(t,a.triggerRef);return/* @__PURE__ */ V(Gr,{asChild:!0,...o,children:/* @__PURE__ */ V(A.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:x(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:x(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Ri=/* @__PURE__ */ J(e=>{let{__scopeDropdownMenu:t,...n}=e,r=Y(t);return/* @__PURE__ */ V(Yr,{...r,...n})},`DropdownMenuPortal`),zi=`DropdownMenuContent`,Bi=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ J(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Pi(zi,n),a=Y(n),o=B.useRef(!1);return/* @__PURE__ */ V(Qr,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:x(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:x(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Vi=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ J(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Y(n);return/* @__PURE__ */ V(oi,{...i,...r,ref:t})},`DropdownMenuItem`)),Hi=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ J(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Y(n);return/* @__PURE__ */ V(ui,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),Ui=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ J(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Y(n);return/* @__PURE__ */ V(fi,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Wi=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ J(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Y(n);return/* @__PURE__ */ V(gi,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),Gi=/* @__PURE__ */ B.forwardRef(/* @__PURE__ */ J(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Y(n);return/* @__PURE__ */ V(_i,{...i,...r,ref:t})},`DropdownMenuSeparator`));function Ki(e,t){let n=e.indexOf(`/`),r=n===-1?e:e.slice(0,n);return t.includes(r)?r:null}function qi(e,t){let n=Ki(e,t);return n?{locale:n,slug:e.slice(n.length+1)}:{locale:null,slug:e}}function Ji(e,t){return t?`${e}/${t}`:e}var Yi=(e,t)=>Iterator.from(e).every(e=>Ki(e,t)!==null);function Xi(e,t,n){return n.map(n=>{let r=Ji(n,t);return{locale:n,id:r,exists:e.has(r)}})}var Zi=/* @__PURE__ */ new Map;function Qi(e){let t=Zi.get(e);if(t===void 0){try{t=new Intl.DisplayNames([e],{type:`language`}).of(e)??e}catch{t=e}Zi.set(e,t)}return t}var $i=/^[a-zA-Z0-9_-]{1,64}$/,ea=e=>[`writeEntry_${e}`,`editEntry_${e}`];function ta(e,t){let n=ea(e).find(e=>!$i.test(e));if(n)return`"${n}" is not a usable tool name (letters, digits, "_" and "-" only, at most 64 characters).`;try{for(let e of[xt(t),wt(t)])O(e,{target:`draft-2020-12`,io:`input`})}catch(e){return`its schema cannot be described to an agent: ${Et(e)}`}return null}function na(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{label:t.label,description:t.description??void 0,kind:t.kind===`text`?`inline`:`block`,children:typeof t.children==`object`?na(t.children):t.children,collections:t.collections.length?t.collections:void 0}]))}function ra(e,t){return Object.fromEntries(St(e).filter(([e])=>t.includes(e)).map(([e,t])=>[e,{props:O(Tt(t.props),{target:`draft-2020-12`,io:`input`}),summary:t.summary??void 0}]))}function ia(e){return{collections:Object.fromEntries(Object.entries(e.collections).map(([e,t])=>[e,{label:Dt(t),description:t.description??null,type:t.type,formats:_(t.loaderPattern,t.loaderFileName),reorderable:t.sort===`file`,singleton:T(t)}])),mediaReferences:n(e.media),i18n:e.contentI18n,components:na(e.components)}}var aa=e=>typeof e==`object`&&!!e&&`error`in e;function X(e){return e}var Z=D().describe(`Id of an entry, as listEntries reports it (e.g. "about").`),oa=w(`mode`,[b({mode:v(`lines`),startLine:g().describe(`First line to replace, 1-based and inclusive.`),endLine:g().describe(`Last line to replace, 1-based and inclusive.`),text:D().describe(`Replacement text, which may span any number of lines.`)}),b({mode:v(`replace`),find:D().describe(`Exact text to find. Only the first occurrence is replaced.`),replace:D().describe(`Text to put in its place.`)})]).describe(`One edit to the markdown body, by line range or by text replacement.`).optional();function sa(e,t){let n={...e};for(let[e,r]of Object.entries(t))r==null?delete n[e]:n[e]=r;return n}function ca(e,t){if(!t)return{body:e};if(t.mode===`lines`){let n=e.split(`
3
+ `);if(t.startLine<1||t.startLine>n.length||t.endLine<t.startLine)return{error:`Invalid line range ${t.startLine}-${t.endLine} for a ${n.length}-line body.`};let r=Math.min(t.endLine,n.length);return{body:n.toSpliced(t.startLine-1,r-t.startLine+1,...t.text.split(`
4
+ `)).join(`
5
+ `)}}return e.includes(t.find)?{body:e.replace(t.find,()=>t.replace)}:{error:`Body text to replace was not found.`}}function la(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{...t,execute:async e=>{try{return await t.execute(e)}catch(e){if(e instanceof o)return{error:e.message};throw e}}}]))}function ua({call:t,config:n}){let r=vt(n.collections).describe(`Name of a content or data collection.`),i=l(n.media),o=e(i).describe(`Media library holding the file, as listMedia reports it.`),s=t=>{let[n,...r]=T(t);return n?e([n,...r]).describe(`Id of the collection's entry, one per language when localized.`):Z};function c(e,n){let r=n.type===`content`,i=r?`frontmatter`:`fields`,a={title:`Write ${e} entry`,description:`Create or fully overwrite an entry in the "${e}" ${n.type} collection. \`data\` is the entry's ${i}, described by this tool's schema${r?", and `body` its markdown content":``}. Use editEntry_${e} to change only part of an existing entry.`},o=xt(n).describe(`Complete ${i} of the "${e}" entry.`),c=Ct(n).describe(`File format to store the entry in, which decides its file extension.`);return X(r?{...a,inputSchema:b({id:s(n),data:o,body:D().describe(`Complete markdown body, replacing whatever is there.`),format:c}),execute:({id:n,data:r,body:i,format:a})=>t(`saveEntry`,{collection:e,id:n,entry:{data:r,body:i,format:a}})}:{...a,inputSchema:b({id:s(n),data:o,format:c}),execute:({id:n,data:r,format:i})=>t(`saveEntry`,{collection:e,id:n,entry:{data:r,body:``,format:i}})})}function u(e,n){let r=n.type===`content`,i=r?`frontmatter fields`:`fields`,a={title:`Edit ${e} entry`,description:`Partially update an existing entry in the "${e}" ${n.type} collection. \`data\` changes only the ${i} you provide; set a field to null to remove it.${r?" `body` edits the markdown by line range or text replacement, and both are optional.":``}`},o=wt(n).describe(`${r?`Frontmatter fields`:`Fields`} to change. Omitted fields keep their value; null removes one.`),c=async(n,r,i)=>{let a=await t(`getEntry`,{collection:e,id:n}),o=ca(a.body,i);return aa(o)?o:t(`saveEntry`,{collection:e,id:n,entry:{data:r?sa(a.data,r):a.data,body:o.body,format:a.format,expectedVersion:a.version}})};return X(r?{...a,inputSchema:b({id:s(n),data:o.optional(),body:oa}),execute:({id:e,data:t,body:n})=>c(e,t,n)}:{...a,inputSchema:b({id:s(n),data:o}),execute:({id:e,data:t})=>c(e,t)})}let d=Object.fromEntries(Object.entries(n.collections).filter(([e,t])=>ta(e,t)===null).flatMap(([e,t])=>[[`writeEntry_${e}`,c(e,t)],[`editEntry_${e}`,u(e,t)]])),f=[...new Set(St(n.components).map(([e])=>e))],p=f.length?{getComponents:X({title:`Describe MDX components`,description:'Describe MDX components by name: the JSON Schema of their `props` and the prop that names an instance. getContentModel lists every component with what it is for, its kind and its children. In an MDX body a component is a JSX tag with literal props: a string in quotes (`title="Hi"`) and any other value as JSON in braces (`count={3}`, `items={[{ "label": "A" }]}`), never a variable, spread or other expression. A `block` component stands on lines of its own, an `inline` one within a line of text. Between its tags goes markdown with top-level components when its children are "markdown", only its listed child components when they are a set, and nothing when it has none, so the tag closes itself (`<Name />`). A component listing `collections` renders their entries, so what it shows is changed by editing those entries, not the component. Besides components, a body may only use `<div>` and `<span>` with a literal `class`. A body never imports anything, every component is available by name.',inputSchema:b({names:E(e(f)).min(1).describe(`Components to describe, as getContentModel lists them.`)}),annotations:{readOnly:!0},execute:async({names:e})=>ra(n.components,e)})}:{};return la({getContentModel:X({title:`Describe the content model`,description:`Describe this site's content model: which collections exist, whether each stores data or content, the file formats it accepts, how image and file fields spell a media reference, the site's content languages, and the MDX components an entry body may use. Call this first when you do not already know the site.`,inputSchema:b({}),annotations:{readOnly:!0},execute:async()=>ia(n)}),...p,listEntries:X({title:`List entries`,description:`List the ids of all entries in a collection. Ids are what every other entry tool takes.`,inputSchema:b({collection:r}),annotations:{readOnly:!0,untrustedOutput:!0},execute:({collection:e})=>t(`listEntries`,{collection:e})}),getEntry:X({title:`Read an entry`,description:"Read an entry's full content: its `data` fields, its markdown `body`, the `format` it is stored in and the `version` a write may carry.",inputSchema:b({collection:r,id:Z}),annotations:{readOnly:!0,untrustedOutput:!0},execute:({collection:e,id:n})=>t(`getEntry`,{collection:e,id:n})}),reorderEntries:X({title:`Reorder a collection`,description:`Reorder a collection the content model marks reorderable by giving the complete ordered list of entry ids. Every existing id must appear exactly once.`,inputSchema:b({collection:r,ids:E(Z).describe(`Every id in the collection, in the order they should take.`)}),execute:({collection:e,ids:n})=>t(`reorderEntries`,{collection:e,ids:n})}),renameEntry:X({title:`Rename an entry`,description:`Rename an entry (change its id) while keeping its content. Fails if an entry with the new id already exists, and in a singleton collection.`,inputSchema:b({collection:r,id:Z,newId:D().describe(`Id to move the entry to, which must be free.`)}),execute:({collection:e,id:n,newId:r})=>t(`renameEntry`,{collection:e,id:n,newId:r})}),duplicateEntry:X({title:`Duplicate an entry`,description:`Duplicate an entry under a new id, copying its data and body. Fails if an entry with the new id already exists, and in a singleton collection.`,inputSchema:b({collection:r,id:Z.describe(`Id of the entry to copy.`),newId:D().describe(`Id for the copy, which must be free.`)}),execute:({collection:e,id:n,newId:r})=>t(`duplicateEntry`,{collection:e,id:n,newId:r})}),deleteEntry:X({title:`Delete an entry`,description:`Delete an entry. The deletion joins the pending changeset, so a human still reviews it before it is published. Fails in a singleton collection.`,inputSchema:b({collection:r,id:Z}),annotations:{destructive:!0},execute:({collection:e,id:n})=>t(`deleteEntry`,{collection:e,id:n})}),listMedia:X({title:`List media files`,description:"List all media files (images and documents) of every media library. `library` and `path` address a file for renameMedia and deleteMedia; `ref` is the value to write into an image or file field, verbatim.",inputSchema:b({}),annotations:{readOnly:!0,untrustedOutput:!0},execute:async()=>(await Promise.all(i.map(async e=>(await t(`listMedia`,{library:e})).map(t=>({library:e,...t,ref:a({library:e,path:t.path},n.media)}))))).flat()}),renameMedia:X({title:`Rename a media file`,description:`Rename or move a media file within its library. Refused while content still references the file, since references keep the old path. Update the entries first.`,inputSchema:b({library:o,oldPath:D().describe(`Current path of the file, as listMedia reports it.`),newPath:D().describe(`Path to move it to, in the same form.`)}),annotations:{destructive:!0},execute:({library:e,oldPath:n,newPath:r})=>t(`renameMedia`,{library:e,from:n,to:r})}),deleteMedia:X({title:`Delete a media file`,description:`Delete a media file. Refused while content still references it. In an object store the file is moved to the library's trash rather than dropped.`,inputSchema:b({library:o,path:D().describe(`Path of the file, as listMedia reports it.`)}),annotations:{destructive:!0},execute:e=>t(`deleteMedia`,e)}),getChanges:X({title:`List pending changes`,description:`List the changes pending in the current changeset: every file changed since the last publish, with how it changed. Only a human can publish or discard them.`,inputSchema:b({}),annotations:{readOnly:!0,untrustedOutput:!0},execute:async()=>(await t(`getChanges`,{})).map(({path:e,kind:t,previousPath:n})=>({path:e,kind:t,previousPath:n}))}),...d})}var da={...z,components:tn},fa=ua({call:y,config:da}),pa=e=>({content:[{type:`text`,text:JSON.stringify(e)}]});async function ma(e,t){let n=e.inputSchema.safeParse(t??{});return n.success?pa(await e.execute(n.data)):pa({error:`Invalid arguments: ${f(n.error)}`})}var ha=({readOnly:e,destructive:t,untrustedOutput:n})=>({readOnlyHint:e===!0,consequentialHint:t===!0,untrustedContentHint:n===!0});async function ga(e,t,n,r){try{if(!$i.test(t))throw Error(`not a usable tool name`);await e.registerTool({name:t,title:n.title,description:n.description,inputSchema:O(n.inputSchema,{target:`draft-2020-12`,io:`input`}),annotations:ha(n.annotations??{}),execute:e=>ma(n,e)},{signal:r})}catch(e){console.error(`[astronaut-cms] Could not expose "${t}" over WebMCP:`,e)}}async function _a(e){let t=document.modelContext;t&&!e.aborted&&await Promise.all(Object.entries(fa).map(([n,r])=>ga(t,n,r,e)))}function va(){Yt(()=>{if(!z.webmcp)return;let e=new AbortController;return _a(e.signal),()=>e.abort()},[])}var ya={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};ya.node;var ba=N(ya),xa={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};xa.node;var Sa=N(xa),Ca={name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]};Ca.node;var wa=N(Ca),Ta={name:`git-compare-arrows`,size:24,node:[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]};Ta.node;var Ea=N(Ta),Da={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};Da.node;var Oa=N(Da),ka={name:`languages`,size:24,node:[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]};ka.node;var Aa=N(ka),ja={name:`notebook-pen`,size:24,node:[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]};ja.node;var Ma=N(ja),Na={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};Na.node;var Pa=N(Na),Fa={name:`scale`,size:24,node:[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]};Fa.node;var Ia=N(Fa);function La(e){return Dt(z.collections[e]??{name:e})}function Ra(e){let t=z.collections[e];return t?.description??fe.t(e=>t?.loaderType===`file`?e.collection.fileCollection:t?.type===`content`?e.collection.contentCollection:e.collection.dataCollection)}function za(e){let t=z.collections[e];return en[e]??(t?.loaderType===`file`?Ot:t?.type===`content`?Ma:Sa)}function Ba(e){return!!z.collections[e]?.singleton}var Va=z.ai,Ha=Va!=null,Ua=768;function Wa(){let[e,t]=B.useState(void 0);return B.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<Ua)};return e.addEventListener(`change`,n),t(window.innerWidth<Ua),()=>e.removeEventListener(`change`,n)},[]),!!e}function Ga({...e}){return/* @__PURE__ */ V(Re,{"data-slot":`sheet`,...e})}function Ka({...e}){return/* @__PURE__ */ V(Be,{"data-slot":`sheet-portal`,...e})}function qa({className:e,...t}){return/* @__PURE__ */ V(Ae,{"data-slot":`sheet-overlay`,className:j(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Ja({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return/* @__PURE__ */ H(Ka,{children:[/* @__PURE__ */ V(qa,{}),/* @__PURE__ */ H(je,{"data-slot":`sheet-content`,"data-side":n,className:j(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...i,children:[t,r&&/* @__PURE__ */ V(Oe,{"data-slot":`sheet-close`,asChild:!0,children:/* @__PURE__ */ H(C,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[/* @__PURE__ */ V($e,{}),/* @__PURE__ */ V(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function Ya({className:e,...t}){return/* @__PURE__ */ V(`div`,{"data-slot":`sheet-header`,className:j(`flex flex-col gap-0.5 p-4`,e),...t})}function Xa({className:e,...t}){return/* @__PURE__ */ V(ze,{"data-slot":`sheet-title`,className:j(`font-heading text-base font-medium text-foreground`,e),...t})}function Za({className:e,...t}){return/* @__PURE__ */ V(We,{"data-slot":`sheet-description`,className:j(`text-sm text-muted-foreground`,e),...t})}var Qa=`sidebar_state`,$a=604800,eo=`16rem`,to=`18rem`,no=`3rem`,ro=`b`,io=B.createContext(null);function Q(){let e=B.useContext(io);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function ao({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=Wa(),[c,l]=B.useState(!1),[u,d]=B.useState(e),f=t??u,p=B.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${Qa}=${t}; path=/; max-age=${$a}`},[n,f]),m=B.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);B.useEffect(()=>{let e=e=>{e.key===ro&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=B.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return/* @__PURE__ */ V(io.Provider,{value:g,children:/* @__PURE__ */ V(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":eo,"--sidebar-width-icon":no,...i},className:j(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})}function oo({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Q();return n===`none`?/* @__PURE__ */ V(`div`,{"data-slot":`sidebar`,className:j(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?/* @__PURE__ */ V(Ga,{open:l,onOpenChange:u,...o,children:/* @__PURE__ */ H(Ja,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":to},side:e,children:[/* @__PURE__ */ H(Ya,{className:`sr-only`,children:[/* @__PURE__ */ V(Xa,{children:`Sidebar`}),/* @__PURE__ */ V(Za,{children:`Displays the mobile sidebar.`})]}),/* @__PURE__ */ V(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):/* @__PURE__ */ H(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[/* @__PURE__ */ V(`div`,{"data-slot":`sidebar-gap`,className:j(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),/* @__PURE__ */ V(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:j(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...o,children:/* @__PURE__ */ V(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function so({className:e,onClick:t,...n}){let{toggleSidebar:r}=Q();return/* @__PURE__ */ H(C,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,className:j(e),onClick:e=>{t?.(e),r()},...n,children:[/* @__PURE__ */ V(Pa,{}),/* @__PURE__ */ V(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function co({className:e,...t}){return/* @__PURE__ */ V(`main`,{"data-slot":`sidebar-inset`,className:j(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function lo({className:e,...t}){return/* @__PURE__ */ V(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:j(`flex flex-col gap-2 p-2`,e),...t})}function uo({className:e,...t}){return/* @__PURE__ */ V(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:j(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function fo({className:e,...t}){return/* @__PURE__ */ V(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:j(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function po({className:e,asChild:t=!1,...n}){return/* @__PURE__ */ V(t?se:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:j(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,e),...n})}function mo({className:e,...t}){return/* @__PURE__ */ V(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:j(`flex w-full min-w-0 flex-col gap-0`,e),...t})}function ho({className:e,...t}){return/* @__PURE__ */ V(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:j(`group/menu-item relative`,e),...t})}var go=ce(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function _o({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let s=e?se:`button`,{isMobile:c,state:l}=Q(),u=/* @__PURE__ */ V(s,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:j(go({variant:n,size:r}),a),...o});return i?(typeof i==`string`&&(i={children:i}),/* @__PURE__ */ H(Qe,{children:[/* @__PURE__ */ V(Je,{asChild:!0,children:u}),/* @__PURE__ */ V(et,{side:`right`,align:`center`,hidden:l!==`collapsed`||c,...i})]})):u}function vo({className:e,...t}){return/* @__PURE__ */ V(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:j(`pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground`,e),...t})}var yo=`data:image/webp;base64,UklGRiQFAABXRUJQVlA4WAoAAAAQAAAAPwAAPwAAQUxQSFkBAAABCriRbbttMAhtAxi0gBLQByVFCFGCvGLGMkUwRMphC2Qkm6IAkpH35uNfFXD/exHByG0kRckynQa69gk0NcpvuvWoGU9krKOaLo88m8bFS7+Zbc5KlZcitkVWDabOSGWV2SC9/VpvjOWnpG0Jy+GmpVKGrch7801r5xRz/M7fxooU35DgUTeW1EcakbwuN9ZUJibrx9pZlHp5CV7Xzqp8vXTTf1xuLKuP/nlkurGuyvn29ucAUs619t4GIsNTyjmGuZx21eEGpKTH3DqYQpLMvnB8ZgeqNQ5WHhkPHFCKx2KKRAvyxUGlF/WxSJQ3WFRuZlh4092AZY1GRmi0QaNjNDJBI3jwJ/hH8B/Ct1t8v8H3W/y4gR+34OMmftzGzxvweQs/b8LnbXzdAK9b8HUTvG6D1434uhVeN8PrdnhugOcWeG5C5zZ4bmyfWz9b5lZ0bv6PuR3+34AAVlA4IKQDAAAQEQCdASpAAEAAPpE+lkkloyGhLBgLMLASCWQAwvYA427arTIN5XmPT5nIZ359qre8uQftVxm6S+aR5DPqH2DOlQvEfGiK7kxafBDoFT57Hj/1zCU2hk93RRz1v0kTbBy1SSb7ufBL5aVCLIOhKYl7M3zEILU0/3x+oSJEz0mYSxz7oiaug4xu3hYCia2XVsgAAP7/OiZ1H5KNyvutWp9GWmAHYVBMY6+8xo3IDjv+I9Qwu5DcvgaI7aG2IvqlWW1u7x0pki1jcRkGhGBMSBY3nyJFNoAsU7f8a6iw3yw1kGb7joNvwh0gA3XnwhYlRg4VFlGnCFQj7WtIMtI55cQl+e1eFtEOEieu9Y2OP+5VGFY09NnsRDoPmEGXgtf5JAjEpvhs2Q8ceUULqO8qO+EfpGDVCYiJ7W1lOD88S9+/mR0+2UBydar2bbDWHkOiO0w+yacO8kL9HSeOjsvgj9h96XKX5yPNYPcZD0x92uufg7BgpOlOkMpe6GrGabK5oanwe/hMhj6OUpsbQyBpSASCCa96AEtkrO6GEZuKn72nqyYOjLB9wK9axeeaRDDHU8VE7/ZCOg9+T36nEcPlKmZm0knc4sXl/4V5I+NRnGKn+GCp7xCTSNaYt+uNqwAEtrEUidJr/P94QkroM8K0RbWhcvFsVTIGP6xHjsBMA26mAPn4v3OgfgOMXaC5Q3lFKfPmu7BJi1UtnqnXGfcrWt8P/nn40PsAM1TXNwpu8/FwnzsHSxq/+8dDFQhmyxE5XbH70oXakGLhpyT8QfKc8W2UuBJ3hs3GZau6Po2DPdM8K698I4/5n3mUgtQvzUJ7h091d4bd+BhkpPuMckHPTa8uuv+Zzu3/SwmIccv27sNRI7bWSTqinZAZ0sXVqt2P0J5ApY0J/XogAXafIBuRv8d6hw+H5WKKfyfSkY48CTC6+wp6/vjSaMdFHUQae/mf8KF3eLbIZ75r2V2FN8crkLK3BzvM1JNxYCCPUOwibBcqaJTD12KrBlUZ1BbRlIcmaL9fHRyj75x8v9fpa5QmDt6AWjwlH1X8I5/Bpl7Y9hU7uCrHislKsAkalP8B1qRe22b1DPQ8ScKCmqp8IUeJ1dx36m64B3EWIcJByOfSzgB+GZXfPSYbrc/seTRQI8d2hXpTX4aT1OvHfK5lmWbEkkYVRAyuQcWftPpBtlFaE/1fI/tzFcKzEyXjOVIwbVOKLvMYJZ33JIsMqfHIghbODydp05oAAA==`,bo={repo:Oa,s3:wa};function xo({to:e,params:t,icon:n,label:r,badge:i}){let{setOpenMobile:a}=Q(),o=xr();return/* @__PURE__ */ H(ho,{children:[/* @__PURE__ */ V(_o,{asChild:!0,isActive:!!o({to:e,params:t,fuzzy:!0}),onClick:()=>a(!1),children:/* @__PURE__ */ H(k,{to:e,params:t??{},children:[/* @__PURE__ */ V(n,{}),/* @__PURE__ */ V(`span`,{children:r})]})}),i]})}function So(){let{t:e}=M(),{setOpenMobile:t}=Q(),n=Pt().data?.length??0;return/* @__PURE__ */ H(oo,{children:[/* @__PURE__ */ V(lo,{children:/* @__PURE__ */ V(mo,{children:/* @__PURE__ */ V(ho,{children:/* @__PURE__ */ V(_o,{asChild:!0,size:`lg`,onClick:()=>t(!1),children:/* @__PURE__ */ H(k,{to:`/`,className:`text-base font-semibold`,children:[/* @__PURE__ */ V(`img`,{src:yo,alt:``,className:`size-8`}),/* @__PURE__ */ V(`span`,{children:e(e=>e.layout.appName)})]})})})})}),/* @__PURE__ */ H(uo,{children:[/* @__PURE__ */ H(fo,{children:[/* @__PURE__ */ V(po,{children:e(e=>e.layout.collections)}),/* @__PURE__ */ V(mo,{children:Object.keys(z.collections).map(e=>/* @__PURE__ */ V(xo,{to:`/collections/$collection`,params:{collection:e},icon:za(e),label:La(e)},e))})]}),/* @__PURE__ */ H(fo,{children:[/* @__PURE__ */ V(po,{children:e(e=>e.layout.workspace)}),/* @__PURE__ */ H(mo,{children:[l(z.media).map(e=>/* @__PURE__ */ V(xo,{to:`/media/$library`,params:{library:e},icon:bo[e],label:Ye(e)},e)),/* @__PURE__ */ V(xo,{to:`/changes`,icon:Ea,label:e(e=>e.changes.title),badge:n>0&&/* @__PURE__ */ V(vo,{children:n})}),Ha&&/* @__PURE__ */ V(xo,{to:`/assistant`,icon:ba,label:e(e=>e.ai.title)})]})]})]})]})}function Co(e){return Xt(()=>{if(!z.contentI18n||!e)return null;let t=new Set(e.map(e=>e.id));return Yi(t,z.contentI18n.locales)?{...z.contentI18n,ids:t}:null},[e])}function wo(e,t){let{locale:n,slug:r}=qi(t,e?.locales??[]),i=e?n??e.defaultLocale:null;return{activeLocale:i,subDir:r,browseDir:i?Ji(i,r):t}}var To=(e,t)=>e.ids.values().filter(n=>Ki(n,e.locales)===t).reduce(e=>e+1,0),Eo={en:{translation:{common:{cancel:`Cancel`,close:`Close`,confirm:`Confirm`,delete:`Delete`,deleting:`Deleting...`,save:`Save`,saving:`Saving...`,discard:`Discard`,remove:`Remove`,rename:`Rename`,renaming:`Renaming...`,duplicating:`Duplicating...`,replace:`Replace`,upload:`Upload`,uploading:`Uploading...`,optimizing:`Optimizing...`,create:`Create`,signOut:`Sign out`,overwrite:`Overwrite`,undo:`Undo`,redo:`Redo`,copyCode:`Copy code`},layout:{appName:`Astronaut CMS`,collections:`Collections`,workspace:`Workspace`,breadcrumbRoot:`CMS`,licenses:`Third-party licenses`,toggleSidebar:`Toggle sidebar`},dashboard:{noCollections:`No collections found`,defineCollections:`Define collections in your content.config.ts`,fields:`Fields: {{count}}`},collection:{newEntry:`New Entry`,noEntries:`No entries yet`,contentCollection:`Content collection`,dataCollection:`Data collection`,fileCollection:`File collection`,entries:`Entries: {{count}}`,failedLoad:`Failed to load entries: {{message}}`,entryCreated:`Entry created`,entryDeleted:`Entry deleted`},entry:{unsavedChanges:`Unsaved changes`,unsavedChangesMessage:`You have unsaved changes. Do you want to discard them and leave?`,deleteEntry:`Delete entry`,deleteEntryMessage:`Delete "{{id}}"? This takes effect when you publish.`,discardDraft:`Discard new entry`,discardDraftMessage:`Discard "{{id}}"? It has not been saved yet.`,changesSaved:`Changes saved`,staleWrite:`This entry changed since you opened it. Reload to see the current version, then apply your edit again.`,duplicate:`Duplicate`,renameEntry:`Rename entry`,duplicateEntry:`Duplicate entry`,entryRenamed:`Entry renamed`,entryDuplicated:`Entry duplicated`,noSchemaShort:`No schema available.`,modified:`modified`,failedLoad:`Failed to load entry: {{message}}`},media:{wrongType:`"{{name}}" is not of a type this media library accepts.`,tooLarge:`File is larger than the {{size}} limit for this media library.`,tooSmall:`File is smaller than the {{size}} minimum for this media library.`,libraries:{repo:`Media`,s3:`Cloud Media`},tryLibrary:`Upload it to "{{library}}" instead.`,noFiles:`No media files`,preview:`Preview {{name}}`,deleteFile:`Delete file`,deleteFileMessage:`Delete "{{name}}"?`,deleted:`File deleted`,renamed:`File renamed`,uploaded:`File uploaded`,replaced:`File replaced`,replaceFile:`Replace file`,replaceFileMessage:`Replace "{{name}}" with "{{file}}"? Content that references it shows the new file.`,replaceType:`Pick a file of the same type as "{{name}}" to replace it.`,optimizeFailed:`Could not process "{{name}}".`,uploadExists:`A file already exists at "{{path}}". Use a different name, or replace it deliberately.`,uploadFailed:`Upload failed ({{status}}).`,fileExists:`File already exists`,fileExistsMessage:`A file named "{{name}}" already exists. Overwrite it?`,renameFile:`Rename file`,current:`Current: {{name}}`,newFolder:`New folder`,selectMedia:`Select Media`,filterPlaceholder:`Filter files...`,failedLoad:`Failed to load media: {{message}}`,immediate:`Uploads and deletions take effect immediately.`,unusedOnly:`Unused only`,checkUsage:`Check usage`,unused:`Unused`,uses:`Uses: {{count}}`,unusedCount:`Unused: {{count}} / {{total}}`,staleTitle:`References to missing files: {{count}}`,scanningReferences:`Checking what content references...`,noUnused:`Every file is referenced by content.`,usedBy:`It is referenced by the entries below.`,deleteReferenced:`Deleting it will break them.`,renameReferenced:`Renaming it will break them, since references keep the old path.`,referencesUnavailable:`Could not check references: {{message}}`,trash:`Trash`,trashHint:`Deleted files are kept here until the bucket's lifecycle rule removes them. They stay readable at their public URL until then.`,deletedAt:`Deleted {{when}}`,restore:`Restore`,restoring:`Restoring...`,restored:`File restored`,purged:`File deleted permanently`,purge:`Delete permanently`,purgeTitle:`Delete permanently`,purgeMessage:`Permanently delete "{{name}}"? This cannot be undone.`},publish:{publish:`Publish`,publishing:`Publishing...`,published:`Branch merged into the default branch`,preview:`Preview`,update:`Update`,updating:`Updating...`,updated:`Latest changes merged into your branch`,viewPullRequest:`View pull request`,viewMergeRequest:`View merge request`,discarding:`Discarding...`,review:`Review changes`,confirmTitle:`Publish and take responsibility`,confirmMessage:`You are publishing all pending changes, including any content written by the AI assistant or a browser agent. By publishing, you confirm that you have reviewed them, checked their facts, and take full editorial responsibility for them.`,confirm:`I take responsibility, publish`,stale:`The changes were updated after your review. Review them again before publishing.`,mergeConflict:`Merge conflict. Your branch and the default branch have diverged. Please contact an admin to resolve.`},changes:{title:`Changes`,pending:`Pending changes: {{count}}`,none:`No pending changes`,empty:`Nothing has changed since the last publish.`,added:`Added`,modified:`Edited`,deleted:`Deleted`,renamed:`Renamed`,openEntry:`Open`,noDiff:`No preview available for this file. Open the entry or the file itself to review it.`,reviewed:`Reviewed`,reviewProgress:`Reviewed: {{reviewed}} / {{count}}. Open every change before you can publish.`,discardAll:`Discard all`,discardAllMessage:`Discard these {{count}} changes? They are not published anywhere and cannot be recovered.`,discardAllLocal:`Changes staged in git are kept.`,discarded:`Pending changes discarded`,failedLoad:`Failed to load changes: {{message}}`},i18n:{language:`Language`,translated:`Translated into {{language}}`,missingTranslation:`Not translated into {{language}}`,createTranslation:`Create the {{language}} translation from this entry`,noEntriesInLanguage:`Nothing in {{language}} yet`,translationCreated:`Translation created from this entry`},newEntryDialog:{title:`New Entry in {{collection}}`,entryId:`Entry ID`,placeholder:`my-entry`,validationHint:`Letters, numbers, hyphens, underscores, and / for nested folders`,segmentHint:`Letters, numbers, hyphens, and underscores`,format:`Format`},validation:{empty:`Enter a name.`,characters:`Use only letters, numbers, hyphens, and underscores.`,nestedCharacters:`Use only letters, numbers, hyphens, and underscores, with / between folders.`,absolute:`Use a relative path without backslashes.`,segments:`Remove empty, . and .. parts from the path.`,exists:`"{{name}}" already exists.`},errors:{somethingWentWrong:`Something went wrong`,tryAgain:`Try again`},editors:{duplicate:`Duplicate`,fragment:`Fragment`,inspector:`Inspector`,invalidJson:`This is not valid JSON, so it is not saved yet.`,noItems:`No items yet.`,noChildren:`No contents yet.`,searchEntries:`Search entries...`,browse:`Browse`,clear:`Clear`,setValue:`Set value`,addItem:`Add item`,add:`Add`,newKey:`New key`,variant:`Variant`,raw:`raw`,image:`image`,file:`file`,selectFrom:`Select from {{collection}}`,loading:`Loading...`,items:`Items: {{count}}`,item:`Item {{index}}`,required:`Required`,choose:`Choose`,reorder:`Drag to reorder`,actions:`Actions`,moveUp:`Move up`,moveDown:`Move down`,addNamed:`Add {{label}}`,addChild:`Add`,missingProps:`Missing: {{props}}`,sourceOnly:`Also contains content that can only be edited in the source view.`,contents:`Contents`,noProps:`This component has no properties.`,editCollection:`Edit the entries in {{collection}}`,outline:`Outline`,outlineEmpty:`The blocks of the body are listed here, to reorder them.`,emptyLine:`Type, or press / to insert`,insert:`Insert`,searchInsert:`Search blocks and components...`,nothingFound:`Nothing found.`,text:`Text`,components:`Components`,clipboard:`Clipboard`,blocks:{paragraph:`Paragraph`,heading:`Heading {{level}}`,bulletList:`Bulleted list`,numberedList:`Numbered list`,quote:`Quote`,code:`Code block`,table:`Table`,image:`Image`,divider:`Divider`},copy:`Copy`,cut:`Cut`,paste:`Paste`,pasteInvalid:`The clipboard holds no content that can be read.`,pasteMisplaced:`{{names}} cannot be pasted here.`,pasteUnfit:`This content cannot be pasted here.`,clipboardDenied:`The browser denied access to the clipboard.`},ai:{title:`AI Assistant`,emptyTitle:`How can I help?`,emptyDescription:`I am an AI system. Ask me to create, edit, or organize your content, then review my changes before you publish them.`,placeholder:`Ask the AI assistant to change your content...`,errorTitle:`The AI assistant couldn't complete your request`,retry:`Retry`,attach:`Attach files`,newChat:`New chat`,saveToLibrary:`Save to media library`,attachError:`Could not read one of the attached files.`,thinking:`Thinking...`,thoughtBriefly:`Thought for a few seconds`,thoughtFor:`Thought for {{seconds}}s`,working:`Working...`,send:`Send`,stop:`Stop`,scrollToEnd:`Scroll to the latest message`,toolInput:`Parameters`,toolOutput:`Result`,toolError:`Error`,model:`Model`,reasoning:`Thinking effort`,reasoningLow:`Low`,reasoningMedium:`Medium`,reasoningHigh:`High`,keyTitle:`Your AI provider key`,keyDescription:`This deployment asks each editor for their own key. It is sent straight to the AI gateway, never to this site, and it is forgotten when you close the tab.`,keyPlaceholder:`sk-...`,keySubmit:`Start using the AI assistant`,keyForget:`Forget key`,tools:{wrote:`Wrote {{collection}} / {{id}}`,edited:`Edited {{collection}} / {{id}}`,deletedEntry:`Deleted {{collection}} / {{id}}`,renamedEntry:`Renamed {{collection}} / {{id}} to {{newId}}`,duplicatedEntry:`Duplicated {{collection}} / {{id}} as {{newId}}`,reordered:`Reordered {{collection}}`,renamedMedia:`Renamed {{oldPath}} to {{newPath}}`,deletedMedia:`Deleted {{path}}`}}}},de:{translation:{common:{cancel:`Abbrechen`,close:`Schließen`,confirm:`Bestätigen`,delete:`Löschen`,deleting:`Wird gelöscht...`,save:`Speichern`,saving:`Speichern...`,discard:`Verwerfen`,remove:`Entfernen`,rename:`Umbenennen`,renaming:`Wird umbenannt...`,duplicating:`Wird dupliziert...`,replace:`Ersetzen`,upload:`Hochladen`,uploading:`Hochladen...`,optimizing:`Optimieren...`,create:`Erstellen`,signOut:`Abmelden`,overwrite:`Überschreiben`,undo:`Rückgängig`,redo:`Wiederholen`,copyCode:`Code kopieren`},layout:{appName:`Astronaut CMS`,collections:`Sammlungen`,workspace:`Arbeitsbereich`,breadcrumbRoot:`CMS`,licenses:`Lizenzen Dritter`,toggleSidebar:`Seitenleiste ein- oder ausblenden`},dashboard:{noCollections:`Keine Sammlungen gefunden`,defineCollections:`Definieren Sie Sammlungen in Ihrer content.config.ts`,fields:`Felder: {{count}}`},collection:{newEntry:`Neuer Eintrag`,noEntries:`Noch keine Einträge`,contentCollection:`Inhaltssammlung`,dataCollection:`Datensammlung`,fileCollection:`Dateisammlung`,entries:`Einträge: {{count}}`,failedLoad:`Einträge konnten nicht geladen werden: {{message}}`,entryCreated:`Eintrag erstellt`,entryDeleted:`Eintrag gelöscht`},entry:{unsavedChanges:`Ungespeicherte Änderungen`,unsavedChangesMessage:`Sie haben ungespeicherte Änderungen. Möchten Sie diese verwerfen und die Seite verlassen?`,deleteEntry:`Eintrag löschen`,deleteEntryMessage:`„{{id}}“ löschen? Das wird beim Veröffentlichen wirksam.`,discardDraft:`Neuen Eintrag verwerfen`,discardDraftMessage:`„{{id}}“ verwerfen? Er wurde noch nicht gespeichert.`,changesSaved:`Änderungen gespeichert`,staleWrite:`Dieser Eintrag hat sich seit dem Öffnen geändert. Lade neu, um die aktuelle Fassung zu sehen, und wende deine Änderung erneut an.`,duplicate:`Duplizieren`,renameEntry:`Eintrag umbenennen`,duplicateEntry:`Eintrag duplizieren`,entryRenamed:`Eintrag umbenannt`,entryDuplicated:`Eintrag dupliziert`,noSchemaShort:`Kein Schema verfügbar.`,modified:`geändert`,failedLoad:`Eintrag konnte nicht geladen werden: {{message}}`},media:{wrongType:`„{{name}}“ hat keinen Dateityp, den diese Medienbibliothek akzeptiert.`,tooLarge:`Die Datei überschreitet die Grenze von {{size}} für diese Medienbibliothek.`,tooSmall:`Die Datei unterschreitet das Minimum von {{size}} für diese Medienbibliothek.`,libraries:{repo:`Medien`,s3:`Cloud-Medien`},tryLibrary:`Lade sie stattdessen in „{{library}}“ hoch.`,noFiles:`Keine Mediendateien`,preview:`Vorschau von {{name}}`,deleteFile:`Datei löschen`,deleteFileMessage:`„{{name}}“ löschen?`,deleted:`Datei gelöscht`,renamed:`Datei umbenannt`,uploaded:`Datei hochgeladen`,replaced:`Datei ersetzt`,replaceFile:`Datei ersetzen`,replaceFileMessage:`„{{name}}“ durch „{{file}}“ ersetzen? Inhalte, die darauf verweisen, zeigen dann die neue Datei.`,replaceType:`Wählen Sie eine Datei desselben Typs wie „{{name}}“, um sie zu ersetzen.`,optimizeFailed:`„{{name}}“ konnte nicht verarbeitet werden.`,uploadExists:`Unter „{{path}}“ existiert bereits eine Datei. Wählen Sie einen anderen Namen oder ersetzen Sie sie bewusst.`,uploadFailed:`Upload fehlgeschlagen ({{status}}).`,fileExists:`Datei existiert bereits`,fileExistsMessage:`Eine Datei mit dem Namen "{{name}}" existiert bereits. Überschreiben?`,renameFile:`Datei umbenennen`,current:`Aktuell: {{name}}`,newFolder:`Neuer Ordner`,selectMedia:`Medien auswählen`,filterPlaceholder:`Dateien filtern...`,failedLoad:`Medien konnten nicht geladen werden: {{message}}`,immediate:`Uploads und Löschungen wirken sofort.`,unusedOnly:`Nur unbenutzte`,checkUsage:`Verwendung prüfen`,unused:`Unbenutzt`,uses:`Verwendungen: {{count}}`,unusedCount:`Unbenutzt: {{count}} / {{total}}`,staleTitle:`Referenzen auf fehlende Dateien: {{count}}`,scanningReferences:`Prüfe, worauf Inhalte verweisen...`,noUnused:`Jede Datei wird von Inhalten referenziert.`,usedBy:`Die folgenden Einträge verweisen darauf.`,deleteReferenced:`Ein Löschen macht sie ungültig.`,renameReferenced:`Ein Umbenennen macht sie ungültig, da Referenzen den alten Pfad behalten.`,referencesUnavailable:`Referenzen konnten nicht geprüft werden: {{message}}`,trash:`Papierkorb`,trashHint:`Gelöschte Dateien bleiben hier, bis die Lifecycle-Regel des Buckets sie entfernt. Bis dahin sind sie weiterhin über ihre öffentliche URL lesbar.`,deletedAt:`Gelöscht {{when}}`,restore:`Wiederherstellen`,restoring:`Wird wiederhergestellt...`,restored:`Datei wiederhergestellt`,purged:`Datei endgültig gelöscht`,purge:`Endgültig löschen`,purgeTitle:`Endgültig löschen`,purgeMessage:`"{{name}}" endgültig löschen? Das kann nicht rückgängig gemacht werden.`},publish:{publish:`Veröffentlichen`,publishing:`Veröffentlichen...`,published:`Branch wurde in den Standard-Branch übernommen`,preview:`Vorschau`,update:`Aktualisieren`,updating:`Aktualisieren...`,updated:`Neueste Änderungen in Ihren Branch übernommen`,viewPullRequest:`Pull Request anzeigen`,viewMergeRequest:`Merge Request anzeigen`,discarding:`Verwerfen...`,review:`Änderungen prüfen`,confirmTitle:`Veröffentlichen und Verantwortung übernehmen`,confirmMessage:`Sie veröffentlichen alle ausstehenden Änderungen, einschließlich aller Inhalte, die der KI-Assistent oder ein Browser-Agent geschrieben hat. Mit der Veröffentlichung bestätigen Sie, dass Sie sie geprüft und ihre Fakten kontrolliert haben, und übernehmen die volle redaktionelle Verantwortung dafür.`,confirm:`Ich übernehme die Verantwortung, veröffentlichen`,stale:`Die Änderungen wurden nach Ihrer Prüfung aktualisiert. Prüfen Sie sie erneut, bevor Sie veröffentlichen.`,mergeConflict:`Merge-Konflikt. Ihr Branch und der Standard-Branch sind auseinandergelaufen. Bitte wenden Sie sich an einen Administrator.`},changes:{title:`Änderungen`,pending:`Ausstehende Änderungen: {{count}}`,none:`Keine ausstehenden Änderungen`,empty:`Seit der letzten Veröffentlichung hat sich nichts geändert.`,added:`Neu`,modified:`Bearbeitet`,deleted:`Gelöscht`,renamed:`Umbenannt`,openEntry:`Öffnen`,noDiff:`Für diese Datei ist keine Vorschau verfügbar. Öffnen Sie den Eintrag oder die Datei selbst, um sie zu prüfen.`,reviewed:`Geprüft`,reviewProgress:`Geprüft: {{reviewed}} / {{count}}. Öffnen Sie jede Änderung, bevor Sie veröffentlichen können.`,discardAll:`Alle verwerfen`,discardAllMessage:`Diese {{count}} Änderungen verwerfen? Sie sind nirgends veröffentlicht und können nicht wiederhergestellt werden.`,discardAllLocal:`Mit git vorgemerkte Änderungen bleiben erhalten.`,discarded:`Ausstehende Änderungen verworfen`,failedLoad:`Änderungen konnten nicht geladen werden: {{message}}`},i18n:{language:`Sprache`,translated:`Übersetzt nach {{language}}`,missingTranslation:`Nicht übersetzt nach {{language}}`,createTranslation:`Übersetzung nach {{language}} aus diesem Eintrag erstellen`,noEntriesInLanguage:`Noch nichts auf {{language}}`,translationCreated:`Übersetzung aus diesem Eintrag erstellt`},newEntryDialog:{title:`Neuer Eintrag in {{collection}}`,entryId:`Eintrags-ID`,placeholder:`mein-eintrag`,validationHint:`Buchstaben, Zahlen, Bindestriche, Unterstriche und / für verschachtelte Ordner`,segmentHint:`Buchstaben, Zahlen, Bindestriche und Unterstriche`,format:`Format`},validation:{empty:`Geben Sie einen Namen ein.`,characters:`Verwenden Sie nur Buchstaben, Zahlen, Bindestriche und Unterstriche.`,nestedCharacters:`Verwenden Sie nur Buchstaben, Zahlen, Bindestriche und Unterstriche, mit / zwischen Ordnern.`,absolute:`Verwenden Sie einen relativen Pfad ohne Backslashes.`,segments:`Entfernen Sie leere, . und .. Teile aus dem Pfad.`,exists:`„{{name}}“ existiert bereits.`},errors:{somethingWentWrong:`Etwas ist schiefgelaufen`,tryAgain:`Erneut versuchen`},editors:{duplicate:`Duplizieren`,fragment:`Fragment`,inspector:`Inspektor`,invalidJson:`Das ist kein gültiges JSON, daher wird es noch nicht gespeichert.`,noItems:`Noch keine Elemente.`,noChildren:`Noch keine Inhalte.`,searchEntries:`Einträge durchsuchen...`,browse:`Durchsuchen`,clear:`Leeren`,setValue:`Wert setzen`,addItem:`Element hinzufügen`,add:`Hinzufügen`,newKey:`Neuer Schlüssel`,variant:`Variante`,raw:`roh`,image:`Bild`,file:`Datei`,selectFrom:`Auswählen aus {{collection}}`,loading:`Laden...`,items:`Elemente: {{count}}`,item:`Element {{index}}`,required:`Pflichtfeld`,choose:`Auswählen`,reorder:`Zum Umsortieren ziehen`,actions:`Aktionen`,moveUp:`Nach oben`,moveDown:`Nach unten`,addNamed:`{{label}} hinzufügen`,addChild:`Hinzufügen`,missingProps:`Fehlt: {{props}}`,sourceOnly:`Enthält außerdem Inhalte, die nur in der Quelltextansicht bearbeitet werden können.`,contents:`Inhalt`,noProps:`Diese Komponente hat keine Eigenschaften.`,editCollection:`Einträge in {{collection}} bearbeiten`,outline:`Gliederung`,outlineEmpty:`Hier werden die Blöcke des Inhalts zum Umsortieren aufgelistet.`,emptyLine:`Schreiben oder / zum Einfügen drücken`,insert:`Einfügen`,searchInsert:`Blöcke und Komponenten suchen...`,nothingFound:`Nichts gefunden.`,text:`Text`,components:`Komponenten`,clipboard:`Zwischenablage`,blocks:{paragraph:`Absatz`,heading:`Überschrift {{level}}`,bulletList:`Aufzählung`,numberedList:`Nummerierte Liste`,quote:`Zitat`,code:`Codeblock`,table:`Tabelle`,image:`Bild`,divider:`Trennlinie`},copy:`Kopieren`,cut:`Ausschneiden`,paste:`Einfügen`,pasteInvalid:`Die Zwischenablage enthält keinen lesbaren Inhalt.`,pasteMisplaced:`{{names}} kann hier nicht eingefügt werden.`,pasteUnfit:`Dieser Inhalt kann hier nicht eingefügt werden.`,clipboardDenied:`Der Browser hat den Zugriff auf die Zwischenablage verweigert.`},ai:{title:`KI-Assistent`,emptyTitle:`Wie kann ich helfen?`,emptyDescription:`Ich bin ein KI-System. Bitte mich, Inhalte zu erstellen, zu bearbeiten oder zu ordnen, und prüfe meine Änderungen, bevor du sie veröffentlichst.`,placeholder:`Bitte den KI-Assistenten, deine Inhalte zu ändern...`,errorTitle:`Der KI-Assistent konnte deine Anfrage nicht abschließen`,retry:`Erneut versuchen`,attach:`Dateien anhängen`,newChat:`Neuer Chat`,saveToLibrary:`In Medienbibliothek speichern`,attachError:`Eine der angehängten Dateien konnte nicht gelesen werden.`,thinking:`Denkt nach...`,thoughtBriefly:`Hat einige Sekunden nachgedacht`,thoughtFor:`Hat {{seconds}}s nachgedacht`,working:`Arbeitet...`,send:`Senden`,stop:`Stoppen`,scrollToEnd:`Zur neuesten Nachricht scrollen`,toolInput:`Parameter`,toolOutput:`Ergebnis`,toolError:`Fehler`,model:`Modell`,reasoning:`Denkaufwand`,reasoningLow:`Niedrig`,reasoningMedium:`Mittel`,reasoningHigh:`Hoch`,keyTitle:`Dein Schlüssel für den KI-Anbieter`,keyDescription:`Diese Installation fragt jede Person nach einem eigenen Schlüssel. Er geht direkt an das KI-Gateway, nie an diese Website, und wird beim Schließen des Tabs vergessen.`,keyPlaceholder:`sk-...`,keySubmit:`KI-Assistenten verwenden`,keyForget:`Schlüssel vergessen`,tools:{wrote:`{{collection}} / {{id}} geschrieben`,edited:`{{collection}} / {{id}} bearbeitet`,deletedEntry:`{{collection}} / {{id}} gelöscht`,renamedEntry:`{{collection}} / {{id}} in {{newId}} umbenannt`,duplicatedEntry:`{{collection}} / {{id}} als {{newId}} dupliziert`,reordered:`{{collection}} neu sortiert`,renamedMedia:`{{oldPath}} in {{newPath}} umbenannt`,deletedMedia:`{{path}} gelöscht`}}}}},Do=Object.keys(Eo),Oo=`astronaut-cms:ui-locale`,ko=localStorage.getItem(Oo);function Ao(e){localStorage.setItem(Oo,e),fe.changeLanguage(e)}fe.use(Nn).init({resources:Eo,lng:ko&&Do.includes(ko)?ko:z.locale,fallbackLng:`en`,interpolation:{escapeValue:!1}});var jo=fe;function Mo({...e}){return/* @__PURE__ */ V(Fi,{"data-slot":`dropdown-menu`,...e})}function No({...e}){return/* @__PURE__ */ V(Li,{"data-slot":`dropdown-menu-trigger`,...e})}function Po({className:e,align:t=`start`,sideOffset:n=4,...r}){return/* @__PURE__ */ V(Ri,{children:/* @__PURE__ */ V(Bi,{"data-slot":`dropdown-menu-content`,sideOffset:n,align:t,className:j(`z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r})})}function Fo({className:e,inset:t,variant:n=`default`,...r}){return/* @__PURE__ */ V(Vi,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:j(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function Io({...e}){return/* @__PURE__ */ V(Hi,{"data-slot":`dropdown-menu-radio-group`,...e})}function Lo({className:e,children:t,inset:n,...r}){return/* @__PURE__ */ H(Ui,{"data-slot":`dropdown-menu-radio-item`,"data-inset":n,className:j(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[/* @__PURE__ */ V(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:/* @__PURE__ */ V(Wi,{children:/* @__PURE__ */ V(Ht,{})})}),t]})}function Ro({className:e,...t}){return/* @__PURE__ */ V(Gi,{"data-slot":`dropdown-menu-separator`,className:j(`-mx-1 my-1 h-px bg-border`,e),...t})}function zo(){let{i18n:e}=M();return/* @__PURE__ */ H(Mo,{children:[/* @__PURE__ */ V(No,{asChild:!0,children:/* @__PURE__ */ H(C,{variant:`ghost`,size:`sm`,"aria-label":Qi(e.language),children:[/* @__PURE__ */ V(Aa,{}),e.language]})}),/* @__PURE__ */ V(Po,{align:`end`,children:/* @__PURE__ */ V(Io,{value:e.language,onValueChange:Ao,children:Do.map(e=>/* @__PURE__ */ V(Lo,{value:e,children:Qi(e)},e))})})]})}function Bo(){let{t:e}=M(),t=Le({strict:!1}),n=we({strict:!1}),r=t?.collection,i=Sr({select:e=>e.at(-1)?.routeId}),a=Co(Rt(r??``).data),o=[{label:e(e=>e.layout.breadcrumbRoot),to:`/`}];if(i===`/changes`)o.push({label:e(e=>e.changes.title)});else if(i===`/assistant`)o.push({label:e(e=>e.ai.title)});else if(t.library)o.push({label:Ye(t.library)});else if(r&&Ba(r))o.push({label:La(r)});else if(r){let{locale:e,slug:i}=qi(t.entry?Ne(t.entry):n.dir??``,a?.locales??[]),s=t=>({to:`/collections/$collection`,params:{collection:r},search:{dir:e?Ji(e,t):t}});o.push({label:La(r),...s(``)});for(let e of He(i))o.push({label:e.name,...s(e.path)});t.entry&&o.push({label:p(t.entry)})}return/* @__PURE__ */ H(`header`,{className:`flex h-12 shrink-0 items-center gap-2 border-b border-border px-4`,children:[/* @__PURE__ */ V(Ze,{label:e(e=>e.layout.toggleSidebar),shortcut:[`mod`,`B`],children:/* @__PURE__ */ V(so,{"aria-label":e(e=>e.layout.toggleSidebar)})}),/* @__PURE__ */ V(de,{orientation:`vertical`,className:`data-vertical:h-4`}),/* @__PURE__ */ V(Fe,{children:/* @__PURE__ */ V(Pe,{children:o.map((e,t)=>/* @__PURE__ */ H(qt,{children:[t>0&&/* @__PURE__ */ V(Ce,{}),/* @__PURE__ */ V(De,{children:t<o.length-1&&e.to?/* @__PURE__ */ V(Ee,{asChild:!0,children:/* @__PURE__ */ V(k,{to:e.to,params:e.params??{},search:e.search??{},children:e.label})}):/* @__PURE__ */ V(Ue,{children:e.label})})]},`${e.to??``}-${e.search?.dir??``}-${e.label}`))})}),/* @__PURE__ */ H(`div`,{className:`ml-auto flex items-center`,children:[/* @__PURE__ */ V(Xe,{asChild:!0,size:`icon-sm`,label:e(e=>e.layout.licenses),children:/* @__PURE__ */ V(`a`,{href:Vt(Bt),target:`_blank`,rel:`noopener noreferrer`,children:/* @__PURE__ */ V(Ia,{})})}),/* @__PURE__ */ V(zo,{})]})]})}function Vo(e){return e.normalize(`NFKD`).toLowerCase().match(/[a-z0-9]+/g)?.join(`-`)??``}function Ho(e,t){return e.replaceAll(`{branch}`,()=>t).replaceAll(`{slug}`,()=>Vo(t))}async function Uo(e){let t=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e));return new Uint8Array(t).toHex()}function Wo(e){let t=e.map(({kind:e,path:t,previousPath:n,patch:r,version:i})=>JSON.stringify([e,t,n,r,i])).sort();return Uo(JSON.stringify(t))}var Go=Ut()(()=>({reviewed:/* @__PURE__ */ new Map}));function Ko(e,t){let n=e.get(t.path);return n?.kind===t.kind&&n.previousPath===t.previousPath&&n.patch===t.patch&&n.version===t.version}function qo(e){Go.setState(t=>Ko(t.reviewed,e)?t:{reviewed:new Map(t.reviewed).set(e.path,e)})}function Jo(){Go.setState({reviewed:/* @__PURE__ */ new Map})}function Yo(e){return Go(({reviewed:t})=>Ko(t,e))}function Xo(e){return Go(({reviewed:t})=>e.filter(e=>Ko(t,e)).length)}function Zo(){let{t:e}=M(),t=At(),n=Pt(),r=Ft(),i=kt(),a=jt(),o=Ge(),[s,c]=Zt(null),[l,u]=Zt(!1),{publish:d,update:f}=z.capabilities,p=n.data?.length??0,m=Xo(n.data??[]),h=t.data?.behind??0,g=t.data?.branch,_=g&&z.previewUrl?Ho(z.previewUrl,g):null,v=r.isPending||i.isPending||a.isPending||n.isFetching,y=async()=>{if(!n.data||m<p){c(null),Ke(e(e=>e.publish.stale),`error`);return}u(!0);let t=await Wo(n.data).finally(()=>u(!1));o(r,t,{success:e(e=>e.publish.published),onSuccess:()=>{c(null),Jo()},describeError:t=>ne(t)?e(e=>e.publish.stale):void 0})};return/* @__PURE__ */ H(`div`,{className:`flex items-center gap-2`,children:[f&&/* @__PURE__ */ V(C,{variant:`outline`,size:`sm`,onClick:()=>o(i,void 0,{success:e(e=>e.publish.updated)}),disabled:v||h===0,children:i.isPending?e(e=>e.publish.updating):e(e=>e.publish.update)}),/* @__PURE__ */ V(C,{variant:`outline`,size:`sm`,onClick:()=>c(`discard`),disabled:v||p===0,children:a.isPending?e(e=>e.publish.discarding):e(e=>e.changes.discardAll)}),_&&/* @__PURE__ */ V(C,{variant:`outline`,size:`sm`,asChild:!0,children:/* @__PURE__ */ V(`a`,{href:_,target:`_blank`,rel:`noopener noreferrer`,children:e(e=>e.publish.preview)})}),d&&(m<p?/* @__PURE__ */ V(C,{size:`sm`,asChild:!0,children:/* @__PURE__ */ V(k,{to:`/changes`,children:e(e=>e.publish.review)})}):/* @__PURE__ */ V(C,{size:`sm`,onClick:()=>c(`publish`),disabled:v||p===0,children:r.isPending?e(e=>e.publish.publishing):e(e=>e.publish.publish)})),/* @__PURE__ */ V(Te,{open:s===`publish`,title:e(e=>e.publish.confirmTitle),description:e(e=>e.publish.confirmMessage),confirmLabel:e(e=>e.publish.confirm),pendingLabel:e(e=>e.publish.publishing),isPending:l||r.isPending,onConfirm:()=>void y(),onCancel:()=>c(null)}),/* @__PURE__ */ V(Te,{open:s===`discard`,title:e(e=>e.changes.discardAll),description:/* @__PURE__ */ H(Qt,{children:[/* @__PURE__ */ V(`p`,{children:e(e=>e.changes.discardAllMessage,{count:p})}),z.storageType===`local`&&/* @__PURE__ */ V(`p`,{className:`mt-2`,children:e(e=>e.changes.discardAllLocal)}),/* @__PURE__ */ V(`ul`,{className:`mt-2 max-h-48 overflow-y-auto font-mono text-xs`,children:n.data?.map(e=>/* @__PURE__ */ V(`li`,{className:`truncate`,children:e.path},e.path))})]}),confirmLabel:e(e=>e.common.discard),pendingLabel:e(e=>e.publish.discarding),isPending:a.isPending,variant:`destructive`,onConfirm:()=>o(a,void 0,{success:e(e=>e.changes.discarded),onSuccess:()=>{c(null),Jo()}}),onCancel:()=>c(null)})]})}function Qo(){let{t:e}=M(),t=At(),n=Pt().data?.length??0,r=t.data?.changeRequestUrl,i=z.storageType===`gitlab`?e(e=>e.publish.viewMergeRequest):e(e=>e.publish.viewPullRequest);return/* @__PURE__ */ V(`div`,{className:`border-t border-border bg-muted px-4 py-2`,children:/* @__PURE__ */ H(`div`,{className:`flex items-center justify-between gap-3`,children:[/* @__PURE__ */ H(`div`,{className:`flex min-w-0 items-center gap-3 text-sm`,children:[n===0?/* @__PURE__ */ V(`span`,{className:`text-muted-foreground`,children:e(e=>e.changes.none)}):/* @__PURE__ */ V(k,{to:`/changes`,className:`font-medium underline-offset-4 hover:underline`,children:e(e=>e.changes.pending,{count:n})}),r&&/* @__PURE__ */ V(`a`,{href:r,target:`_blank`,rel:`noopener noreferrer`,className:`truncate text-primary underline hover:text-primary/80`,children:i})]}),/* @__PURE__ */ H(`div`,{className:`flex items-center gap-2`,children:[/* @__PURE__ */ V(Zo,{}),z.storageType!==`local`&&/* @__PURE__ */ V(C,{variant:`ghost`,size:`sm`,onClick:()=>{re().finally(()=>window.location.reload())},children:e(e=>e.common.signOut)})]})]})})}var $=Me({component:ts}),$o=class extends Kt{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Astronaut CMS render error:`,e,t.componentStack)}render(){return this.state.error?/* @__PURE__ */ V(es,{error:this.state.error,onReset:()=>this.setState({error:null})}):this.props.children}};function es({error:e,onReset:t}){let{t:n}=M();return/* @__PURE__ */ V(`div`,{className:`flex min-h-screen items-center justify-center bg-background p-6`,children:/* @__PURE__ */ V(te,{className:`max-w-md`,title:n(e=>e.errors.somethingWentWrong),action:/* @__PURE__ */ V(C,{size:`sm`,onClick:t,children:n(e=>e.errors.tryAgain)}),children:e.message})})}function ts(){let e=!document.cookie.split(`; `).includes(`sidebar_state=false`);return/* @__PURE__ */ H($o,{children:[/* @__PURE__ */ H(ao,{defaultOpen:e,"data-astronaut-cms":!0,className:`h-svh overflow-hidden text-foreground`,children:[/* @__PURE__ */ V(So,{}),/* @__PURE__ */ H(co,{className:`min-w-0`,children:[/* @__PURE__ */ V(Bo,{}),/* @__PURE__ */ V(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden p-6`,children:/* @__PURE__ */ V(gr,{})}),/* @__PURE__ */ V(Qo,{})]})]}),/* @__PURE__ */ V(ut,{})]})}var ns=L(`/`)({component:I(()=>import(`./routes-CBt04sNR.js`),`component`)}),rs=L(`/assistant`)({component:I(()=>import(`./assistant-DkS355co.js`).then(e=>e.t),`component`)}),is=L(`/changes`)({loader:()=>c(Lt),pendingComponent:Wt,component:I(()=>import(`./changes-Ba0G_GN1.js`),`component`)}),as=L(`/collections/$collection`)({component:I(()=>import(`./collections._collection-BE1enDCq.js`),`component`)}),os=L(`/media/$library`)({params:{parse:({library:e})=>{let t=s(z.media,e);if(!t)throw _e();return{library:t}},stringify:({library:e})=>({library:e})},validateSearch:e=>{let t=typeof e.dir==`string`?e.dir:``;return t?{dir:t}:{}},loader:({params:{library:e}})=>Promise.all([c(tt(e)),c(_t(e))]),pendingComponent:ss,component:I(()=>import(`./media._library-BfFaEZLR.js`),`component`)});function ss(){return/* @__PURE__ */ V(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-4`,children:[1,2,3,4,5,6].map(e=>/* @__PURE__ */ V(Ve,{},e))})}var cs=L(`/collections/$collection/`)({loader:({params:{collection:e}})=>Promise.all([c(Nt(e)),z.collections[e]?.loaderType===`file`&&c(Mt(e))]),pendingComponent:Wt,component:I(()=>import(`./collections._collection.index-BN5d8UIY.js`),`component`),validateSearch:e=>{let t=typeof e.dir==`string`?e.dir:``;return t?{dir:t}:{}}});function ls(){return/* @__PURE__ */ H(`div`,{className:`space-y-4`,children:[/* @__PURE__ */ V(zt,{className:`h-8 w-48`}),/* @__PURE__ */ V(zt,{className:`h-64 rounded-lg`})]})}var us=L(`/collections/$collection/$entry`)({component:I(()=>import(`./collections._collection._entry-D3UksnCo.js`).then(e=>e.t),`component`),validateSearch:e=>{let t=typeof e.new==`string`?h(e.new):null;return t?{new:t}:{}},loaderDeps:({search:e})=>({isNew:e.new!==void 0}),loader:({params:{collection:e,entry:t},deps:{isNew:n}})=>Promise.all([c(Nt(e)),!n&&c(It(e,t))]),pendingComponent:ls}),ds=ns.update({id:`/`,path:`/`,getParentRoute:()=>$}),fs=rs.update({id:`/assistant`,path:`/assistant`,getParentRoute:()=>$}),ps=is.update({id:`/changes`,path:`/changes`,getParentRoute:()=>$}),ms=as.update({id:`/collections/$collection`,path:`/collections/$collection`,getParentRoute:()=>$}),hs=os.update({id:`/media/$library`,path:`/media/$library`,getParentRoute:()=>$}),gs=cs.update({id:`/`,path:`/`,getParentRoute:()=>ms}),_s={CollectionsCollectionEntryRoute:us.update({id:`/$entry`,path:`/$entry`,getParentRoute:()=>ms}),CollectionsCollectionIndexRoute:gs},vs={IndexRoute:ds,AssistantRoute:fs,ChangesRoute:ps,CollectionsCollectionRoute:ms._addFileChildren(_s),MediaLibraryRoute:hs},ys=wr({routeTree:$._addFileChildren(vs)._addFileTypes(),history:he(),defaultPreload:`intent`,defaultPreloadStaleTime:0,scrollRestoration:!0});function bs(){return va(),/* @__PURE__ */ V(Pn,{i18n:jo,children:/* @__PURE__ */ V(m,{client:ee,children:/* @__PURE__ */ V(qe,{children:/* @__PURE__ */ V(Dr,{router:ys})})})})}var xs=window.matchMedia(`(prefers-color-scheme: dark)`),Ss=e=>document.documentElement.classList.toggle(`dark`,e);Ss(xs.matches),xs.addEventListener(`change`,e=>Ss(e.matches));function Cs(e){$t(e).render(/* @__PURE__ */ V(bs,{}))}export{aa as A,La as C,ba as D,Ea as E,Xi as F,gr as I,wn as L,Ji as M,Qi as N,fa as O,qi as P,Dn as R,za as S,Oa as T,Ga as _,qo as a,Va as b,Mo as c,Ro as d,No as f,Q as g,Co as h,os as i,ia as j,da as k,Po as l,To as m,Cs as mount,ls as n,Yo as o,wo as p,cs as r,Xo as s,us as t,Fo as u,Ja as v,Ba as w,Ra as x,Xa as y,yn as z};
@@ -0,0 +1 @@
1
+ function e(t){var n,r,i=``;if(typeof t==`string`||typeof t==`number`)i+=t;else if(typeof t==`object`){if(Array.isArray(t)){var a=t.length;for(n=0;n<a;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=` `),i+=r)}else for(r in t)t[r]&&(i&&(i+=` `),i+=r)}return i}function t(){for(var t,n,r=0,i=``,a=arguments.length;r<a;r++)(t=arguments[r])&&(n=e(t))&&(i&&(i+=` `),i+=n);return i}export{t};
@@ -0,0 +1 @@
1
+ import{At as e,Dt as t,Mt as n,Ot as r,jt as i,kt as a}from"./error-banner-yskeRXe8.js";import{f as o,v as s}from"./separator-DlYj_PoQ.js";import*as c from"react";import{jsx as l}from"react/jsx-runtime";var u=Object.defineProperty,d=(e,t)=>u(e,`name`,{value:t,configurable:!0}),f=`Collapsible`,[p,m]=e(f),[h,g]=p(f),_=/* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e,n){let{__scopeCollapsible:r,open:i,defaultOpen:s,disabled:u,onOpenChange:d,...p}=e,[m,g]=t({prop:i,defaultProp:s??!1,onChange:d,caller:f});return/* @__PURE__ */ l(h,{scope:r,disabled:u,contentId:a(),open:m,onOpenToggle:c.useCallback(()=>g(e=>!e),[g]),children:/* @__PURE__ */ l(o.div,{"data-state":C(m),"data-disabled":u?``:void 0,...p,ref:n})})},`Collapsible`)),v=`CollapsibleTrigger`,y=/* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e,t){let{__scopeCollapsible:n,...r}=e,a=g(v,n);return/* @__PURE__ */ l(o.button,{type:`button`,"aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open||!1,"data-state":C(a.open),"data-disabled":a.disabled?``:void 0,disabled:a.disabled,...r,ref:t,onClick:i(e.onClick,a.onOpenToggle)})},`CollapsibleTrigger`)),b=`CollapsibleContent`,x=/* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e,t){let{forceMount:n,...i}=e,a=g(b,e.__scopeCollapsible);return/* @__PURE__ */ l(r,{present:n||a.open,children:({present:e})=>/* @__PURE__ */ l(S,{...i,ref:t,present:e})})},`CollapsibleContent`)),S=/* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e,t){let{__scopeCollapsible:r,present:i,children:a,...u}=e,d=g(b,r),[f,p]=c.useState(i),m=c.useRef(null),h=s(t,m),_=c.useRef(0),v=_.current,y=c.useRef(0),x=y.current,S=d.open||f,w=c.useRef(S),T=c.useRef(void 0);return c.useEffect(()=>{let e=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(e)},[]),n(()=>{let e=m.current;if(e){T.current=T.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();_.current=t.height,y.current=t.width,w.current||(e.style.transitionDuration=T.current.transitionDuration,e.style.animationName=T.current.animationName),p(i)}},[d.open,i]),/* @__PURE__ */ l(o.div,{"data-state":C(d.open),"data-disabled":d.disabled?``:void 0,id:d.contentId,hidden:!S,...u,ref:h,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:S&&a})},`CollapsibleContentImpl`));function C(e){return e?`open`:`closed`}d(C,`getState`);function w({...e}){return/* @__PURE__ */ l(_,{"data-slot":`collapsible`,...e})}function T({...e}){return/* @__PURE__ */ l(y,{"data-slot":`collapsible-trigger`,...e})}function E({...e}){return/* @__PURE__ */ l(x,{"data-slot":`collapsible-content`,...e})}export{E as n,T as r,w as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./badge-BXsOvOPX.js";import{r as t,t as n}from"./collapsible-B6P_J0Bg.js";import{c as r,i,n as a}from"./page-header-B4nvAsVA.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({open:c,onOpenChange:l,handle:u,icon:d,label:f,children:p,...m}){return/* @__PURE__ */ o(n,{open:c,onOpenChange:l,asChild:!0,children:/* @__PURE__ */ s(a,{variant:`outline`,size:`sm`,...m,children:[u,/* @__PURE__ */ s(t,{className:`group/disclosure flex min-w-0 flex-1 items-center gap-2.5 text-left`,children:[/* @__PURE__ */ s(r,{variant:`icon`,className:`text-muted-foreground`,children:[/* @__PURE__ */ o(e,{}),d]}),/* @__PURE__ */ o(i,{className:`min-w-0`,children:f})]}),p]})})}export{c as t};
@@ -0,0 +1 @@
1
+ import{I as e}from"./client-VKp75fDU.js";import{jsx as t}from"react/jsx-runtime";function n(){return/* @__PURE__ */ t(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:/* @__PURE__ */ t(e,{})})}export{n as component};