cognova 0.2.7 → 0.2.9
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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{Bb9LNSu_.js → -JdScH3W.js} +1 -1
- package/.output/public/_nuxt/{A5lrd5_j.js → 0EY9Msdx.js} +1 -1
- package/.output/public/_nuxt/{BsXPllgv.js → 1lOC4Si0.js} +1 -1
- package/.output/public/_nuxt/{CeDxLTxX.js → 1zIQX9mh.js} +1 -1
- package/.output/public/_nuxt/{D3V98LVR.js → 4Qy4OdWt.js} +1 -1
- package/.output/public/_nuxt/{MdebRWqA.js → 4nN41Tyd.js} +1 -1
- package/.output/public/_nuxt/{BrICHPil.js → 5MZBbx-H.js} +1 -1
- package/.output/public/_nuxt/{Brqrl-cH.js → 6lIxuL6n.js} +1 -1
- package/.output/public/_nuxt/AUdD1uDD.js +1 -0
- package/.output/public/_nuxt/{B9Kd_0HK.js → B-513wJW.js} +1 -1
- package/.output/public/_nuxt/{CNwGp6eP.js → B1vDCixB.js} +1 -1
- package/.output/public/_nuxt/{deSeNTOh.js → B2MVZlI-.js} +1 -1
- package/.output/public/_nuxt/{CVr40yKH.js → B5JDxHxC.js} +1 -1
- package/.output/public/_nuxt/{CvMqUdkl.js → B63LIwsW.js} +3 -3
- package/.output/public/_nuxt/{C5nfaH9w.js → B6bnHNWY.js} +1 -1
- package/.output/public/_nuxt/{BaJEGr8G.js → B6wYZD_K.js} +1 -1
- package/.output/public/_nuxt/{_16_b82K.js → B8Ou5yh2.js} +1 -1
- package/.output/public/_nuxt/{BaVaTug8.js → BE4Ndhrq.js} +1 -1
- package/.output/public/_nuxt/{CphXSvBo.js → BES6FzF5.js} +1 -1
- package/.output/public/_nuxt/{BmTCDcNm.js → BE_OHTBv.js} +1 -1
- package/.output/public/_nuxt/{CBrXB4hk.js → BJ8jbKuq.js} +1 -1
- package/.output/public/_nuxt/{vM-wdhkZ.js → BNBGEa-U.js} +1 -1
- package/.output/public/_nuxt/{XzRnkkwG.js → BOGXUgGg.js} +1 -1
- package/.output/public/_nuxt/BQ1T6zWA.js +1 -0
- package/.output/public/_nuxt/{Bb1B0ntt.js → BVc_fOF1.js} +1 -1
- package/.output/public/_nuxt/{B-5roYpk.js → BX6vcvkp.js} +1 -1
- package/.output/public/_nuxt/{CLZS246x.js → BYIq3eP8.js} +1 -1
- package/.output/public/_nuxt/{B_28CKij.js → BZqdzrSw.js} +2 -2
- package/.output/public/_nuxt/{D-wVwRIx.js → BaYtugUf.js} +1 -1
- package/.output/public/_nuxt/{EgYyfo1g.js → Be5L93GM.js} +3 -3
- package/.output/public/_nuxt/{BLszW9T3.js → BfECQayu.js} +1 -1
- package/.output/public/_nuxt/{Ci-MVdCd.js → BgG2k-zy.js} +1 -1
- package/.output/public/_nuxt/BhnONkIm.js +1 -0
- package/.output/public/_nuxt/{BjFs8Ujb.js → BjI5wb_q.js} +1 -1
- package/.output/public/_nuxt/{CK5Ef4YR.js → Bk9-HxOg.js} +1 -1
- package/.output/public/_nuxt/{MzEmU9ER.js → BltasKce.js} +1 -1
- package/.output/public/_nuxt/{BvuV9uCn.js → Bp9kHdw6.js} +1 -1
- package/.output/public/_nuxt/{CnW8zyuA.js → Bsdcw5gr.js} +1 -1
- package/.output/public/_nuxt/{Zjvb5YJR.js → BsnhHCOa.js} +1 -1
- package/.output/public/_nuxt/{DMsHLHmB.js → BwJVN9k0.js} +1 -1
- package/.output/public/_nuxt/{CgQKyBSS.js → BwVt3BzR.js} +1 -1
- package/.output/public/_nuxt/{Bc0NIKN7.js → BwdxQyyo.js} +1 -1
- package/.output/public/_nuxt/{CfWDee_q.js → BzTjmQCD.js} +1 -1
- package/.output/public/_nuxt/{RRoc4m9d.js → C1FhgWcI.js} +1 -1
- package/.output/public/_nuxt/{DvgLoqaC.js → C2DZeD9G.js} +1 -1
- package/.output/public/_nuxt/{B43p0So7.js → C3JOLqW1.js} +1 -1
- package/.output/public/_nuxt/{atVSHCxP.js → C4ScCUjy.js} +1 -1
- package/.output/public/_nuxt/{Bn8loaeQ.js → C6HEirAm.js} +1 -1
- package/.output/public/_nuxt/{BLL1JLwq.js → C6UTTaCP.js} +1 -1
- package/.output/public/_nuxt/{DNpsjOxN.js → C8gtQaKB.js} +1 -1
- package/.output/public/_nuxt/{BhOIdu3Z.js → C8tXHRIo.js} +1 -1
- package/.output/public/_nuxt/{DaiWSWdm.js → C8wa4Wh4.js} +1 -1
- package/.output/public/_nuxt/{DZdh7_lh.js → CDradKPE.js} +1 -1
- package/.output/public/_nuxt/{DB3y_21M.js → CEJh-OAl.js} +1 -1
- package/.output/public/_nuxt/CGfVTQUF.js +1 -0
- package/.output/public/_nuxt/{Dx2Tgm6S.js → CGgZuPnb.js} +1 -1
- package/.output/public/_nuxt/{CwaMSU1O.js → CH8kNq6W.js} +1 -1
- package/.output/public/_nuxt/{NlScC3GW.js → CIJ2MJdc.js} +1 -1
- package/.output/public/_nuxt/{CzTTKfet.js → CIUZAp6g.js} +1 -1
- package/.output/public/_nuxt/{CwCEQ4Dw.js → CXBOHJ2W.js} +1 -1
- package/.output/public/_nuxt/{BJ_GgKV0.js → CY3x8iy3.js} +1 -1
- package/.output/public/_nuxt/{ByfSJZV6.js → CaLO8sre.js} +1 -1
- package/.output/public/_nuxt/{jeu3Xx8e.js → CbTu13wM.js} +1 -1
- package/.output/public/_nuxt/{CjYUi9c8.js → CfO_d5gC.js} +1 -1
- package/.output/public/_nuxt/{DpYns7cT.js → Clr3MHUr.js} +1 -1
- package/.output/public/_nuxt/{1Hz98MKF.js → Cmdr5BNz.js} +1 -1
- package/.output/public/_nuxt/{DZ_azKLI.js → Cmj-BR0q.js} +1 -1
- package/.output/public/_nuxt/{CSQ-nblB.js → Cn83lLUb.js} +1 -1
- package/.output/public/_nuxt/{BdCB2PoJ.js → CqMgz85Z.js} +1 -1
- package/.output/public/_nuxt/{Dkzqkzki.js → CrW6y2-s.js} +1 -1
- package/.output/public/_nuxt/{DAs574wU.js → CrjNndEO.js} +1 -1
- package/.output/public/_nuxt/{CB8_A8N4.js → Cs_udj6A.js} +1 -1
- package/.output/public/_nuxt/{qW7F87d8.js → CsbHYpNi.js} +3 -3
- package/.output/public/_nuxt/{DuOsLoVR.js → CwKe2KkK.js} +1 -1
- package/.output/public/_nuxt/{Db5XIfWS.js → CwOUYOe5.js} +1 -1
- package/.output/public/_nuxt/{0J8pJb0Z.js → CybU4a95.js} +1 -1
- package/.output/public/_nuxt/{WWNeb45u.js → CziltI1u.js} +1 -1
- package/.output/public/_nuxt/{DgPiIWA2.js → CzurfTnt.js} +1 -1
- package/.output/public/_nuxt/{DAFasgHH.js → D-O8wAju.js} +1 -1
- package/.output/public/_nuxt/{CJ85o8FK.js → D1t0272g.js} +1 -1
- package/.output/public/_nuxt/D3RROe4s.js +1 -0
- package/.output/public/_nuxt/{Cedv1M65.js → D5G5UL_g.js} +1 -1
- package/.output/public/_nuxt/{1IuG3yiQ.js → D76Dw8rw.js} +1 -1
- package/.output/public/_nuxt/{w3t8WD8v.js → D7DTZ0iS.js} +1 -1
- package/.output/public/_nuxt/{C6Kc4XvS.js → D7WbsJsa.js} +1 -1
- package/.output/public/_nuxt/D7iYVmH6.js +1 -0
- package/.output/public/_nuxt/{CXuKrnTA.js → D8gh62A0.js} +1 -1
- package/.output/public/_nuxt/{CW8xtqwN.js → DA2RowFe.js} +1 -1
- package/.output/public/_nuxt/{4bC1z31I.js → DBKxzQ3U.js} +1 -1
- package/.output/public/_nuxt/DBuW01Fx.js +1 -0
- package/.output/public/_nuxt/{B7-0ADn3.js → DCL9gWFw.js} +1 -1
- package/.output/public/_nuxt/{NBE83ZQn.js → DGJKfutb.js} +1 -1
- package/.output/public/_nuxt/{B5OWqWCh.js → DHScQdvh.js} +1 -1
- package/.output/public/_nuxt/{BTk5mgdf.js → DI1FIvaM.js} +1 -1
- package/.output/public/_nuxt/{0LyRrTRM.js → DJ4pqxg-.js} +1 -1
- package/.output/public/_nuxt/{DImdNj-F.js → DJoRBCVm.js} +1 -1
- package/.output/public/_nuxt/{DfpSaqgV.js → DLuRYg2p.js} +1 -1
- package/.output/public/_nuxt/DMy2sxuC.js +1 -0
- package/.output/public/_nuxt/{BJi2ZHtT.js → DQd-GXKJ.js} +1 -1
- package/.output/public/_nuxt/{CpC3C9gj.js → DSgubznn.js} +1 -1
- package/.output/public/_nuxt/{BZFXnEwe.js → DSynhNOO.js} +1 -1
- package/.output/public/_nuxt/{BsPj3ifk.js → DTrFhdRO.js} +1 -1
- package/.output/public/_nuxt/{BNlugvM3.js → DTu0K_pX.js} +1 -1
- package/.output/public/_nuxt/{DV0JMebZ.js → DUDbJONU.js} +1 -1
- package/.output/public/_nuxt/{C14DGwaT.js → DYu_NYj3.js} +1 -1
- package/.output/public/_nuxt/{Bf34lExB.js → D_tCgCFX.js} +1 -1
- package/.output/public/_nuxt/{pkbwpgSD.js → DdXVAzIg.js} +1 -1
- package/.output/public/_nuxt/DfIqFkyp.js +1 -0
- package/.output/public/_nuxt/{BoPAYize.js → Dj2opPDu.js} +1 -1
- package/.output/public/_nuxt/{Drr-RSSP.js → DjmFlCHK.js} +1 -1
- package/.output/public/_nuxt/{DgKeJf5C.js → DkhxRAb3.js} +1 -1
- package/.output/public/_nuxt/DlSJ4TF_.js +1 -0
- package/.output/public/_nuxt/{S4a_N6rD.js → DmmQUhEb.js} +1 -1
- package/.output/public/_nuxt/{CG0fS-BQ.js → DvATBMPl.js} +1 -1
- package/.output/public/_nuxt/{CxJr4mB0.js → DwAJIRGg.js} +1 -1
- package/.output/public/_nuxt/{CjRmY2OQ.js → FYOLNuMV.js} +1 -1
- package/.output/public/_nuxt/Gy6_ehml.js +1 -0
- package/.output/public/_nuxt/{zBoPDS4z.js → HPOXd4gt.js} +1 -1
- package/.output/public/_nuxt/{HCCuOAgZ.js → HlbU_z9a.js} +1 -1
- package/.output/public/_nuxt/{DsKy-gee.js → JQV21WEV.js} +1 -1
- package/.output/public/_nuxt/{JJIcQEna.js → NusIKwmA.js} +1 -1
- package/.output/public/_nuxt/{HC3657Xq.js → OrcbFmB1.js} +1 -1
- package/.output/public/_nuxt/{fTEmwfo4.js → Oy4_RPEZ.js} +1 -1
- package/.output/public/_nuxt/{Dpp5cOwJ.js → Pa936BQP.js} +1 -1
- package/.output/public/_nuxt/PzQHm02e.js +1 -0
- package/.output/public/_nuxt/{Dysa6np_.js → REP2-rzf.js} +1 -1
- package/.output/public/_nuxt/{-2wkydbj.js → RRbnMIVe.js} +1 -1
- package/.output/public/_nuxt/{CzqLfT8k.js → TGVM5w2K.js} +1 -1
- package/.output/public/_nuxt/UbZP7wjm.js +1 -0
- package/.output/public/_nuxt/{BW-E-Sar.js → XJYoLoTi.js} +1 -1
- package/.output/public/_nuxt/{CrjKigv8.js → a9_LvIZ4.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/613faa5d-8ace-45e0-8274-b611cc4fd1ad.json +1 -0
- package/.output/public/_nuxt/entry.DkvuF_CR.css +1 -0
- package/.output/public/_nuxt/{CwJR22-0.js → fVkHtgGF.js} +1 -1
- package/.output/public/_nuxt/{sdvIKLwS.js → hm3ShyaF.js} +1 -1
- package/.output/public/_nuxt/{CqiOV9n1.js → k16puyWi.js} +1 -1
- package/.output/public/_nuxt/{B8Kve-DH.js → myNwwtfj.js} +1 -1
- package/.output/public/_nuxt/{DxR8g9So.js → nTCVPCKg.js} +1 -1
- package/.output/public/_nuxt/{DytaiikM.js → pHQcHl8n.js} +1 -1
- package/.output/public/_nuxt/{Cebw7Q7c.js → pNqWPbXW.js} +1 -1
- package/.output/public/_nuxt/{Cow1TrPj.js → qWWnsfRV.js} +1 -1
- package/.output/public/_nuxt/{DCco_rlV.js → rRYEvKFu.js} +1 -1
- package/.output/public/_nuxt/{hqpqUuXS.js → svWfwR0T.js} +1 -1
- package/.output/public/_nuxt/{BMLwzSDu.js → wgX1ldgZ.js} +1 -1
- package/.output/public/_nuxt/{CEfkp9Rl.js → xrh9hzzH.js} +2 -2
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +1 -1
- package/.output/server/chunks/build/{settings-DuT6LGJZ.mjs → settings-B2KXoGcz.mjs} +1679 -203
- package/.output/server/chunks/build/settings-B2KXoGcz.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +4 -4
- package/.output/server/chunks/nitro/nitro.mjs +922 -866
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/app/pages/settings.vue +581 -6
- package/package.json +1 -1
- package/server/api/skills/import.post.ts +1 -1
- package/server/bridge/adapters/telegram.ts +84 -9
- package/.output/public/_nuxt/B-YQztaH.js +0 -1
- package/.output/public/_nuxt/B1gFtqXK.js +0 -1
- package/.output/public/_nuxt/BTfZ7nek.js +0 -1
- package/.output/public/_nuxt/BbPnqQJ0.js +0 -1
- package/.output/public/_nuxt/BhSWIRpp.js +0 -1
- package/.output/public/_nuxt/By6kmkhJ.js +0 -1
- package/.output/public/_nuxt/C4XVJnNJ.js +0 -1
- package/.output/public/_nuxt/CkvyAKbu.js +0 -1
- package/.output/public/_nuxt/D2f7BlK2.js +0 -1
- package/.output/public/_nuxt/D2lmhTjQ.js +0 -1
- package/.output/public/_nuxt/D64-rCSQ.js +0 -1
- package/.output/public/_nuxt/DGP2JJt8.js +0 -1
- package/.output/public/_nuxt/builds/meta/9863fe43-d78c-4b29-a1e8-e6de61119507.json +0 -1
- package/.output/public/_nuxt/entry._7ZkP07A.css +0 -1
- package/.output/public/_nuxt/f7zDjk6q.js +0 -1
- package/.output/server/chunks/build/settings-DuT6LGJZ.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j,e as S,q as it,a2 as dt,G as c,R as s,ab as a,ai as U,aj as A,a9 as h,ae as k,U as p,C as o,ao as G,N as q,c as x,al as T,Q as b,S as l,a4 as w,a3 as D,bI as H,bg as ct,bl as rt,f as M,bJ as ut,ag as mt,T as n,_ as pt,W as ft,aa as g}from"./CvMqUdkl.js";import{_ as _t,c as vt}from"./Bb1B0ntt.js";import{_ as gt}from"./atVSHCxP.js";import{d as yt,_ as xt,u as ht}from"./Dpp5cOwJ.js";import{_ as bt}from"./Zjvb5YJR.js";import{_ as kt}from"./B_28CKij.js";import{_ as wt}from"./BTfZ7nek.js";import{p as Ct}from"./EgYyfo1g.js";import{u as $t}from"./BvuV9uCn.js";import{u as Ut}from"./BNlugvM3.js";import{u as Tt}from"./DZ_azKLI.js";import"./Vcq4gwWv.js";import"./88opOQSr.js";import"./iik6CYzq.js";import"./B7-0ADn3.js";import"./CqkleIqs.js";import"./Cow1TrPj.js";const zt={key:0,class:"space-y-1"},Bt=["onClick"],Ft=["onClick"],St={key:1,class:"text-sm text-dimmed italic"},At=j({__name:"ViewToc",props:{links:{}},setup(f){const i=S(null);function u(_){const d=document.getElementById(_);d&&d.scrollIntoView({behavior:"smooth",block:"start"})}return it(()=>{const _=document.querySelectorAll("h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]"),d=new IntersectionObserver(t=>{for(const m of t)if(m.isIntersecting){i.value=m.target.id;break}},{rootMargin:"-80px 0px -80% 0px"});_.forEach(t=>d.observe(t)),dt(()=>d.disconnect())}),(_,d)=>f.links.length?(s(),c("nav",zt,[d[0]||(d[0]=a("p",{class:"text-sm font-semibold text-muted mb-3"}," On this page ",-1)),(s(!0),c(U,null,A(f.links,t=>(s(),c(U,{key:t.id},[a("button",{type:"button",class:p(["block w-full text-left text-sm py-1 hover:text-primary transition-colors",[o(i)===t.id?"text-primary font-medium":"text-dimmed",t.depth===2&&"pl-0",t.depth===3&&"pl-4",t.depth>=4&&"pl-8"]]),onClick:m=>u(t.id)},k(t.text),11,Bt),t.children?.length?(s(!0),c(U,{key:0},A(t.children,m=>(s(),c("button",{key:m.id,type:"button",class:p(["block w-full text-left text-sm py-1 hover:text-primary transition-colors pl-4",o(i)===m.id?"text-primary font-medium":"text-dimmed"]),onClick:E=>u(m.id)},k(m.text),11,Ft))),128)):h("",!0)],64))),128))])):(s(),c("div",St," No headings found "))}}),qt=Object.assign(At,{__name:"ViewToc"}),Dt={slots:{root:"hidden overflow-y-auto lg:block lg:max-h-[calc(100vh-var(--ui-header-height))] lg:sticky lg:top-(--ui-header-height) py-8 lg:ps-4 lg:-ms-4 lg:pe-6.5",container:"relative",top:"sticky -top-8 -mt-8 pointer-events-none z-[1]",topHeader:"h-8 bg-default -mx-4 px-4",topBody:"bg-default relative pointer-events-auto flex flex-col -mx-4 px-4",topFooter:"h-8 bg-gradient-to-b from-default -mx-4 px-4"}},Et={__name:"UPageAside",props:{as:{type:null,required:!1,default:"aside"},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(f){const i=f,u=G(),_=q(),d=x(()=>T({extend:T(Dt),..._.ui?.pageAside||{}})());return(t,m)=>(s(),b(o(D),{as:f.as,"data-slot":"root",class:p(d.value.root({class:[i.ui?.root,i.class]}))},{default:l(()=>[a("div",{"data-slot":"container",class:p(d.value.container({class:i.ui?.container}))},[u.top?(s(),c("div",{key:0,"data-slot":"top",class:p(d.value.top({class:i.ui?.top}))},[a("div",{"data-slot":"topHeader",class:p(d.value.topHeader({class:i.ui?.topHeader}))},null,2),a("div",{"data-slot":"topBody",class:p(d.value.topBody({class:i.ui?.topBody}))},[w(t.$slots,"top")],2),a("div",{"data-slot":"topFooter",class:p(d.value.topFooter({class:i.ui?.topFooter}))},null,2)],2)):h("",!0),w(t.$slots,"default"),w(t.$slots,"bottom")],2)]),_:3},8,["as","class"]))}},It={base:"mt-8 pb-24 space-y-12"},Pt={__name:"UPageBody",props:{as:{type:null,required:!1},class:{type:null,required:!1}},setup(f){const i=f,u=q(),_=x(()=>T({extend:T(It),...u.ui?.pageBody||{}}));return(d,t)=>(s(),b(o(D),{as:f.as,class:p(_.value({class:i.class}))},{default:l(()=>[w(d.$slots,"default")]),_:3},8,["as","class"]))}},Lt={slots:{root:"flex flex-col lg:grid lg:grid-cols-10 lg:gap-10",left:"lg:col-span-2",center:"lg:col-span-8",right:"lg:col-span-2 order-first lg:order-last"},variants:{left:{true:""},right:{true:""}},compoundVariants:[{left:!0,right:!0,class:{center:"lg:col-span-6"}},{left:!1,right:!1,class:{center:"lg:col-span-10"}}]},Nt={__name:"UPage",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(f){const i=f,u=G(),_=q(),d=x(()=>T({extend:T(Lt),..._.ui?.page||{}})({left:!!u.left,right:!!u.right}));return(t,m)=>(s(),b(o(D),{as:f.as,"data-slot":"root",class:p(d.value.root({class:[i.ui?.root,i.class]}))},{default:l(()=>[u.left?(s(),b(o(H),{key:0,"data-slot":"left",class:p(d.value.left({class:i.ui?.left}))},{default:l(()=>[w(t.$slots,"left")]),_:3},8,["class"])):h("",!0),a("div",{"data-slot":"center",class:p(d.value.center({class:i.ui?.center}))},[w(t.$slots,"default")],2),u.right?(s(),b(o(H),{key:1,"data-slot":"right",class:p(d.value.right({class:i.ui?.right}))},{default:l(()=>[w(t.$slots,"right")]),_:3},8,["class"])):h("",!0)]),_:3},8,["as","class"]))}},Vt=vt(gt),Ot={key:0,class:"py-24 text-center"},Rt={key:1,class:"py-24 text-center"},Ht={key:2,class:"py-24 text-center"},Mt={key:3,class:"py-24 text-center"},jt={class:"flex items-center justify-between mb-4"},Gt={class:"text-2xl font-bold"},Jt={class:"flex items-center gap-2"},Qt={class:"border border-default rounded-lg overflow-hidden"},Wt={class:"flex items-center justify-between mb-4"},Kt={class:"text-2xl font-bold"},Xt={class:"flex items-center gap-2"},Yt={class:"flex flex-wrap items-center gap-4 text-sm text-dimmed mb-6"},Zt={key:0,class:"flex items-center gap-1.5"},te={class:"flex items-center gap-1.5"},ee={key:1,class:"flex items-center gap-1.5"},oe={key:2,class:"flex items-center gap-1.5"},se={class:"flex gap-1"},ae={key:0,class:"border border-default rounded-lg overflow-hidden"},ne={class:"prose prose-primary dark:prose-invert max-w-none"},we=j({__name:"[uuid]",async setup(f){let i,u;const _=ct(),d=x(()=>_.params.uuid),{data:t,error:m,status:E}=([i,u]=rt(()=>$t(`/api/documents/${d.value}/public`,"$x-U1b672rk")),i=await i,u(),i),B=S([]);M(()=>t.value?.data?.content,async r=>{if(r)try{const e=await Ct(r);B.value=e.toc?.links||[]}catch(e){console.error("Failed to parse markdown for TOC:",e),B.value=[]}},{immediate:!0});const J=x(()=>m.value?.statusCode===404),Q=x(()=>m.value?.statusCode===403),W=x(()=>t.value?.data?.document?.fileType==="markdown"),K=x(()=>t.value?.data?.document?.fileType==="text"),X=x(()=>t.value?.data?.document?.fileType==="binary"),Y=x(()=>yt(t.value?.data?.document?.path||""));ut({title:()=>t.value?.data?.document?.title||"Document",description:"Shared document from Cognova",robots:()=>t.value?.data?.document?.shareType==="public"?"index, follow":"noindex, nofollow"});const{isAuthenticated:I}=Ut(),{viewSourceMode:P}=Tt(),C=S(P.value);M(C,r=>P.value=r);const L=mt(),{copy:Z}=ht();async function N(){const r=t.value?.data?.content;if(!r)return;await Z(r)?L.add({title:"Copied to clipboard",icon:"i-lucide-check",color:"success"}):L.add({title:"Failed to copy",icon:"i-lucide-x",color:"error"})}function V(){const r=t.value?.data?.content,e=t.value?.data?.document?.path;if(!r||!e)return;const y=e.split("/").pop()||"document.txt",v=new Blob([r],{type:"text/plain;charset=utf-8"}),z=URL.createObjectURL(v),$=document.createElement("a");$.href=z,$.download=y,$.click(),URL.revokeObjectURL(z)}function O(r){return r?new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):""}return(r,e)=>{const y=pt,v=ft,z=Vt,$=xt,R=_t,tt=bt,et=qt,ot=Et,st=kt,at=Pt,nt=Nt,lt=wt;return s(),b(lt,{class:"py-8"},{default:l(()=>[o(J)?(s(),c("div",Ot,[n(y,{name:"i-lucide-file-x",class:"size-16 mx-auto mb-4 text-dimmed"}),e[2]||(e[2]=a("h1",{class:"text-2xl font-bold mb-2"}," Document Not Found ",-1)),e[3]||(e[3]=a("p",{class:"text-dimmed mb-6"}," This document doesn't exist or has been deleted. ",-1)),n(v,{to:"/",variant:"soft"},{default:l(()=>[...e[1]||(e[1]=[g(" Go Home ",-1)])]),_:1})])):o(Q)?(s(),c("div",Rt,[n(y,{name:"i-lucide-lock",class:"size-16 mx-auto mb-4 text-dimmed"}),e[5]||(e[5]=a("h1",{class:"text-2xl font-bold mb-2"}," Access Denied ",-1)),e[6]||(e[6]=a("p",{class:"text-dimmed mb-6"}," This document is not publicly shared. ",-1)),n(v,{to:"/login",variant:"soft"},{default:l(()=>[...e[4]||(e[4]=[g(" Sign In ",-1)])]),_:1})])):o(X)&&o(t)?.data?(s(),c("div",Ht,[n(y,{name:"i-lucide-file-warning",class:"size-16 mx-auto mb-4 text-dimmed"}),e[8]||(e[8]=a("h1",{class:"text-2xl font-bold mb-2"}," Cannot Preview This File ",-1)),e[9]||(e[9]=a("p",{class:"text-dimmed mb-6"}," Binary files cannot be previewed. ",-1)),n(v,{to:"/",variant:"soft"},{default:l(()=>[...e[7]||(e[7]=[g(" Go Home ",-1)])]),_:1})])):o(E)==="pending"?(s(),c("div",Mt,[n(y,{name:"i-lucide-loader-2",class:"size-8 mx-auto animate-spin text-dimmed"})])):o(K)&&o(t)?.data?.content?(s(),c(U,{key:4},[a("div",jt,[a("h1",Gt,k(o(t).data.document.title),1),a("div",Jt,[n(v,{icon:"i-lucide-copy",variant:"ghost",size:"sm",onClick:N},{default:l(()=>[...e[10]||(e[10]=[g(" Copy ",-1)])]),_:1}),n(v,{icon:"i-lucide-download",variant:"ghost",size:"sm",onClick:V},{default:l(()=>[...e[11]||(e[11]=[g(" Download ",-1)])]),_:1}),o(I)?(s(),b(v,{key:0,icon:"i-lucide-pencil",variant:"soft",size:"sm",to:`/docs?path=${encodeURIComponent(o(t).data.document.path)}`},{default:l(()=>[...e[12]||(e[12]=[g(" Edit ",-1)])]),_:1},8,["to"])):h("",!0)])]),a("div",Qt,[n(R,null,{fallback:l(()=>[n($,{class:"h-96"})]),default:l(()=>[n(z,{"model-value":o(t).data.content,language:o(Y),"read-only":!0,class:"max-h-[80vh]"},null,8,["model-value","language"])]),_:1})])],64)):o(W)&&o(t)?.data?.content?(s(),c(U,{key:5},[a("div",Wt,[a("h1",Kt,k(o(t).data.document.title),1),a("div",Xt,[n(v,{icon:o(C)?"i-lucide-eye":"i-lucide-code",variant:"ghost",size:"sm",onClick:e[0]||(e[0]=F=>C.value=!o(C))},{default:l(()=>[g(k(o(C)?"Preview":"Source"),1)]),_:1},8,["icon"]),n(v,{icon:"i-lucide-copy",variant:"ghost",size:"sm",onClick:N},{default:l(()=>[...e[13]||(e[13]=[g(" Copy ",-1)])]),_:1}),n(v,{icon:"i-lucide-download",variant:"ghost",size:"sm",onClick:V},{default:l(()=>[...e[14]||(e[14]=[g(" Download ",-1)])]),_:1}),o(I)?(s(),b(v,{key:0,icon:"i-lucide-pencil",variant:"soft",size:"sm",to:`/docs?path=${encodeURIComponent(o(t).data.document.path)}`},{default:l(()=>[...e[15]||(e[15]=[g(" Edit ",-1)])]),_:1},8,["to"])):h("",!0)])]),a("div",Yt,[o(t).data.document.creatorName?(s(),c("div",Zt,[n(y,{name:"i-lucide-user",class:"size-4"}),a("span",null,k(o(t).data.document.creatorName),1)])):h("",!0),a("div",te,[n(y,{name:"i-lucide-calendar",class:"size-4"}),a("span",null,k(O(o(t).data.document.createdAt)),1)]),o(t).data.document.modifiedAt?(s(),c("div",ee,[n(y,{name:"i-lucide-pencil",class:"size-4"}),a("span",null,"Updated "+k(O(o(t).data.document.modifiedAt)),1)])):h("",!0),o(t).data.document.tags?.length?(s(),c("div",oe,[n(y,{name:"i-lucide-tags",class:"size-4"}),a("div",se,[(s(!0),c(U,null,A(o(t).data.document.tags,F=>(s(),b(tt,{key:F,color:"neutral",variant:"subtle",size:"sm"},{default:l(()=>[g(k(F),1)]),_:2},1024))),128))])])):h("",!0)]),o(C)?(s(),c("div",ae,[n(R,null,{fallback:l(()=>[n($,{class:"h-96"})]),default:l(()=>[n(z,{"model-value":o(t).data.content,language:"markdown","read-only":!0,class:"max-h-[80vh]"},null,8,["model-value"])]),_:1})])):(s(),b(nt,{key:1},{left:l(()=>[n(ot,null,{default:l(()=>[n(et,{links:o(B)},null,8,["links"])]),_:1})]),default:l(()=>[n(at,null,{default:l(()=>[a("div",ne,[n(st,{value:o(t).data.content},null,8,["value"])])]),_:1})]),_:1}))],64)):h("",!0)]),_:1})}}});export{we as default};
|
|
1
|
+
import{a as j,e as S,q as it,a2 as dt,G as c,R as s,ab as a,aj as U,ak as A,a9 as h,ae as k,U as p,C as o,ao as G,N as q,c as x,am as T,Q as b,S as l,a4 as w,a3 as D,bI as H,bg as ct,bl as rt,f as M,bJ as ut,ag as mt,T as n,_ as pt,W as ft,aa as g}from"./B63LIwsW.js";import{_ as _t,c as vt}from"./BVc_fOF1.js";import{_ as gt}from"./C4ScCUjy.js";import{d as yt,_ as xt,u as ht}from"./Pa936BQP.js";import{_ as bt}from"./BsnhHCOa.js";import{_ as kt}from"./BZqdzrSw.js";import{_ as wt}from"./D7iYVmH6.js";import{p as Ct}from"./Be5L93GM.js";import{u as $t}from"./Bp9kHdw6.js";import{u as Ut}from"./DTu0K_pX.js";import{u as Tt}from"./Cmj-BR0q.js";import"./Vcq4gwWv.js";import"./88opOQSr.js";import"./iik6CYzq.js";import"./DCL9gWFw.js";import"./CqkleIqs.js";import"./qWWnsfRV.js";const zt={key:0,class:"space-y-1"},Bt=["onClick"],Ft=["onClick"],St={key:1,class:"text-sm text-dimmed italic"},At=j({__name:"ViewToc",props:{links:{}},setup(f){const i=S(null);function u(_){const d=document.getElementById(_);d&&d.scrollIntoView({behavior:"smooth",block:"start"})}return it(()=>{const _=document.querySelectorAll("h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]"),d=new IntersectionObserver(t=>{for(const m of t)if(m.isIntersecting){i.value=m.target.id;break}},{rootMargin:"-80px 0px -80% 0px"});_.forEach(t=>d.observe(t)),dt(()=>d.disconnect())}),(_,d)=>f.links.length?(s(),c("nav",zt,[d[0]||(d[0]=a("p",{class:"text-sm font-semibold text-muted mb-3"}," On this page ",-1)),(s(!0),c(U,null,A(f.links,t=>(s(),c(U,{key:t.id},[a("button",{type:"button",class:p(["block w-full text-left text-sm py-1 hover:text-primary transition-colors",[o(i)===t.id?"text-primary font-medium":"text-dimmed",t.depth===2&&"pl-0",t.depth===3&&"pl-4",t.depth>=4&&"pl-8"]]),onClick:m=>u(t.id)},k(t.text),11,Bt),t.children?.length?(s(!0),c(U,{key:0},A(t.children,m=>(s(),c("button",{key:m.id,type:"button",class:p(["block w-full text-left text-sm py-1 hover:text-primary transition-colors pl-4",o(i)===m.id?"text-primary font-medium":"text-dimmed"]),onClick:E=>u(m.id)},k(m.text),11,Ft))),128)):h("",!0)],64))),128))])):(s(),c("div",St," No headings found "))}}),qt=Object.assign(At,{__name:"ViewToc"}),Dt={slots:{root:"hidden overflow-y-auto lg:block lg:max-h-[calc(100vh-var(--ui-header-height))] lg:sticky lg:top-(--ui-header-height) py-8 lg:ps-4 lg:-ms-4 lg:pe-6.5",container:"relative",top:"sticky -top-8 -mt-8 pointer-events-none z-[1]",topHeader:"h-8 bg-default -mx-4 px-4",topBody:"bg-default relative pointer-events-auto flex flex-col -mx-4 px-4",topFooter:"h-8 bg-gradient-to-b from-default -mx-4 px-4"}},Et={__name:"UPageAside",props:{as:{type:null,required:!1,default:"aside"},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(f){const i=f,u=G(),_=q(),d=x(()=>T({extend:T(Dt),..._.ui?.pageAside||{}})());return(t,m)=>(s(),b(o(D),{as:f.as,"data-slot":"root",class:p(d.value.root({class:[i.ui?.root,i.class]}))},{default:l(()=>[a("div",{"data-slot":"container",class:p(d.value.container({class:i.ui?.container}))},[u.top?(s(),c("div",{key:0,"data-slot":"top",class:p(d.value.top({class:i.ui?.top}))},[a("div",{"data-slot":"topHeader",class:p(d.value.topHeader({class:i.ui?.topHeader}))},null,2),a("div",{"data-slot":"topBody",class:p(d.value.topBody({class:i.ui?.topBody}))},[w(t.$slots,"top")],2),a("div",{"data-slot":"topFooter",class:p(d.value.topFooter({class:i.ui?.topFooter}))},null,2)],2)):h("",!0),w(t.$slots,"default"),w(t.$slots,"bottom")],2)]),_:3},8,["as","class"]))}},It={base:"mt-8 pb-24 space-y-12"},Pt={__name:"UPageBody",props:{as:{type:null,required:!1},class:{type:null,required:!1}},setup(f){const i=f,u=q(),_=x(()=>T({extend:T(It),...u.ui?.pageBody||{}}));return(d,t)=>(s(),b(o(D),{as:f.as,class:p(_.value({class:i.class}))},{default:l(()=>[w(d.$slots,"default")]),_:3},8,["as","class"]))}},Lt={slots:{root:"flex flex-col lg:grid lg:grid-cols-10 lg:gap-10",left:"lg:col-span-2",center:"lg:col-span-8",right:"lg:col-span-2 order-first lg:order-last"},variants:{left:{true:""},right:{true:""}},compoundVariants:[{left:!0,right:!0,class:{center:"lg:col-span-6"}},{left:!1,right:!1,class:{center:"lg:col-span-10"}}]},Nt={__name:"UPage",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(f){const i=f,u=G(),_=q(),d=x(()=>T({extend:T(Lt),..._.ui?.page||{}})({left:!!u.left,right:!!u.right}));return(t,m)=>(s(),b(o(D),{as:f.as,"data-slot":"root",class:p(d.value.root({class:[i.ui?.root,i.class]}))},{default:l(()=>[u.left?(s(),b(o(H),{key:0,"data-slot":"left",class:p(d.value.left({class:i.ui?.left}))},{default:l(()=>[w(t.$slots,"left")]),_:3},8,["class"])):h("",!0),a("div",{"data-slot":"center",class:p(d.value.center({class:i.ui?.center}))},[w(t.$slots,"default")],2),u.right?(s(),b(o(H),{key:1,"data-slot":"right",class:p(d.value.right({class:i.ui?.right}))},{default:l(()=>[w(t.$slots,"right")]),_:3},8,["class"])):h("",!0)]),_:3},8,["as","class"]))}},Vt=vt(gt),Ot={key:0,class:"py-24 text-center"},Rt={key:1,class:"py-24 text-center"},Ht={key:2,class:"py-24 text-center"},Mt={key:3,class:"py-24 text-center"},jt={class:"flex items-center justify-between mb-4"},Gt={class:"text-2xl font-bold"},Jt={class:"flex items-center gap-2"},Qt={class:"border border-default rounded-lg overflow-hidden"},Wt={class:"flex items-center justify-between mb-4"},Kt={class:"text-2xl font-bold"},Xt={class:"flex items-center gap-2"},Yt={class:"flex flex-wrap items-center gap-4 text-sm text-dimmed mb-6"},Zt={key:0,class:"flex items-center gap-1.5"},te={class:"flex items-center gap-1.5"},ee={key:1,class:"flex items-center gap-1.5"},oe={key:2,class:"flex items-center gap-1.5"},se={class:"flex gap-1"},ae={key:0,class:"border border-default rounded-lg overflow-hidden"},ne={class:"prose prose-primary dark:prose-invert max-w-none"},we=j({__name:"[uuid]",async setup(f){let i,u;const _=ct(),d=x(()=>_.params.uuid),{data:t,error:m,status:E}=([i,u]=rt(()=>$t(`/api/documents/${d.value}/public`,"$x-U1b672rk")),i=await i,u(),i),B=S([]);M(()=>t.value?.data?.content,async r=>{if(r)try{const e=await Ct(r);B.value=e.toc?.links||[]}catch(e){console.error("Failed to parse markdown for TOC:",e),B.value=[]}},{immediate:!0});const J=x(()=>m.value?.statusCode===404),Q=x(()=>m.value?.statusCode===403),W=x(()=>t.value?.data?.document?.fileType==="markdown"),K=x(()=>t.value?.data?.document?.fileType==="text"),X=x(()=>t.value?.data?.document?.fileType==="binary"),Y=x(()=>yt(t.value?.data?.document?.path||""));ut({title:()=>t.value?.data?.document?.title||"Document",description:"Shared document from Cognova",robots:()=>t.value?.data?.document?.shareType==="public"?"index, follow":"noindex, nofollow"});const{isAuthenticated:I}=Ut(),{viewSourceMode:P}=Tt(),C=S(P.value);M(C,r=>P.value=r);const L=mt(),{copy:Z}=ht();async function N(){const r=t.value?.data?.content;if(!r)return;await Z(r)?L.add({title:"Copied to clipboard",icon:"i-lucide-check",color:"success"}):L.add({title:"Failed to copy",icon:"i-lucide-x",color:"error"})}function V(){const r=t.value?.data?.content,e=t.value?.data?.document?.path;if(!r||!e)return;const y=e.split("/").pop()||"document.txt",v=new Blob([r],{type:"text/plain;charset=utf-8"}),z=URL.createObjectURL(v),$=document.createElement("a");$.href=z,$.download=y,$.click(),URL.revokeObjectURL(z)}function O(r){return r?new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):""}return(r,e)=>{const y=pt,v=ft,z=Vt,$=xt,R=_t,tt=bt,et=qt,ot=Et,st=kt,at=Pt,nt=Nt,lt=wt;return s(),b(lt,{class:"py-8"},{default:l(()=>[o(J)?(s(),c("div",Ot,[n(y,{name:"i-lucide-file-x",class:"size-16 mx-auto mb-4 text-dimmed"}),e[2]||(e[2]=a("h1",{class:"text-2xl font-bold mb-2"}," Document Not Found ",-1)),e[3]||(e[3]=a("p",{class:"text-dimmed mb-6"}," This document doesn't exist or has been deleted. ",-1)),n(v,{to:"/",variant:"soft"},{default:l(()=>[...e[1]||(e[1]=[g(" Go Home ",-1)])]),_:1})])):o(Q)?(s(),c("div",Rt,[n(y,{name:"i-lucide-lock",class:"size-16 mx-auto mb-4 text-dimmed"}),e[5]||(e[5]=a("h1",{class:"text-2xl font-bold mb-2"}," Access Denied ",-1)),e[6]||(e[6]=a("p",{class:"text-dimmed mb-6"}," This document is not publicly shared. ",-1)),n(v,{to:"/login",variant:"soft"},{default:l(()=>[...e[4]||(e[4]=[g(" Sign In ",-1)])]),_:1})])):o(X)&&o(t)?.data?(s(),c("div",Ht,[n(y,{name:"i-lucide-file-warning",class:"size-16 mx-auto mb-4 text-dimmed"}),e[8]||(e[8]=a("h1",{class:"text-2xl font-bold mb-2"}," Cannot Preview This File ",-1)),e[9]||(e[9]=a("p",{class:"text-dimmed mb-6"}," Binary files cannot be previewed. ",-1)),n(v,{to:"/",variant:"soft"},{default:l(()=>[...e[7]||(e[7]=[g(" Go Home ",-1)])]),_:1})])):o(E)==="pending"?(s(),c("div",Mt,[n(y,{name:"i-lucide-loader-2",class:"size-8 mx-auto animate-spin text-dimmed"})])):o(K)&&o(t)?.data?.content?(s(),c(U,{key:4},[a("div",jt,[a("h1",Gt,k(o(t).data.document.title),1),a("div",Jt,[n(v,{icon:"i-lucide-copy",variant:"ghost",size:"sm",onClick:N},{default:l(()=>[...e[10]||(e[10]=[g(" Copy ",-1)])]),_:1}),n(v,{icon:"i-lucide-download",variant:"ghost",size:"sm",onClick:V},{default:l(()=>[...e[11]||(e[11]=[g(" Download ",-1)])]),_:1}),o(I)?(s(),b(v,{key:0,icon:"i-lucide-pencil",variant:"soft",size:"sm",to:`/docs?path=${encodeURIComponent(o(t).data.document.path)}`},{default:l(()=>[...e[12]||(e[12]=[g(" Edit ",-1)])]),_:1},8,["to"])):h("",!0)])]),a("div",Qt,[n(R,null,{fallback:l(()=>[n($,{class:"h-96"})]),default:l(()=>[n(z,{"model-value":o(t).data.content,language:o(Y),"read-only":!0,class:"max-h-[80vh]"},null,8,["model-value","language"])]),_:1})])],64)):o(W)&&o(t)?.data?.content?(s(),c(U,{key:5},[a("div",Wt,[a("h1",Kt,k(o(t).data.document.title),1),a("div",Xt,[n(v,{icon:o(C)?"i-lucide-eye":"i-lucide-code",variant:"ghost",size:"sm",onClick:e[0]||(e[0]=F=>C.value=!o(C))},{default:l(()=>[g(k(o(C)?"Preview":"Source"),1)]),_:1},8,["icon"]),n(v,{icon:"i-lucide-copy",variant:"ghost",size:"sm",onClick:N},{default:l(()=>[...e[13]||(e[13]=[g(" Copy ",-1)])]),_:1}),n(v,{icon:"i-lucide-download",variant:"ghost",size:"sm",onClick:V},{default:l(()=>[...e[14]||(e[14]=[g(" Download ",-1)])]),_:1}),o(I)?(s(),b(v,{key:0,icon:"i-lucide-pencil",variant:"soft",size:"sm",to:`/docs?path=${encodeURIComponent(o(t).data.document.path)}`},{default:l(()=>[...e[15]||(e[15]=[g(" Edit ",-1)])]),_:1},8,["to"])):h("",!0)])]),a("div",Yt,[o(t).data.document.creatorName?(s(),c("div",Zt,[n(y,{name:"i-lucide-user",class:"size-4"}),a("span",null,k(o(t).data.document.creatorName),1)])):h("",!0),a("div",te,[n(y,{name:"i-lucide-calendar",class:"size-4"}),a("span",null,k(O(o(t).data.document.createdAt)),1)]),o(t).data.document.modifiedAt?(s(),c("div",ee,[n(y,{name:"i-lucide-pencil",class:"size-4"}),a("span",null,"Updated "+k(O(o(t).data.document.modifiedAt)),1)])):h("",!0),o(t).data.document.tags?.length?(s(),c("div",oe,[n(y,{name:"i-lucide-tags",class:"size-4"}),a("div",se,[(s(!0),c(U,null,A(o(t).data.document.tags,F=>(s(),b(tt,{key:F,color:"neutral",variant:"subtle",size:"sm"},{default:l(()=>[g(k(F),1)]),_:2},1024))),128))])])):h("",!0)]),o(C)?(s(),c("div",ae,[n(R,null,{fallback:l(()=>[n($,{class:"h-96"})]),default:l(()=>[n(z,{"model-value":o(t).data.content,language:"markdown","read-only":!0,class:"max-h-[80vh]"},null,8,["model-value"])]),_:1})])):(s(),b(nt,{key:1},{left:l(()=>[n(ot,null,{default:l(()=>[n(et,{links:o(B)},null,8,["links"])]),_:1})]),default:l(()=>[n(at,null,{default:l(()=>[a("div",ne,[n(st,{value:o(t).data.content},null,8,["value"])])]),_:1})]),_:1}))],64)):h("",!0)]),_:1})}}});export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./DlAUqK2U.js";import{ad as s,G as a,R as i,ab as t,ae as r}from"./
|
|
1
|
+
import{_ as o}from"./DlAUqK2U.js";import{ad as s,G as a,R as i,ab as t,ae as r}from"./B63LIwsW.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,h)=>(i(),a("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.statusCode)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusMessage)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-e0213155"]]);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o,G as a,R as n,T as r,_ as p}from"./
|
|
1
|
+
import{a as o,G as a,R as n,T as r,_ as p}from"./B63LIwsW.js";const i={class:"h-full flex items-center justify-center bg-muted/50"},l=o({__name:"CodeEditorFallback",setup(s){return(t,e)=>{const c=p;return n(),a("div",i,[r(c,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])}}}),u=Object.assign(l,{__name:"EditorCodeEditorFallback"}),m={md:"markdown",mdx:"markdown",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",json:"json",jsonc:"json",html:"html",htm:"html",css:"css",scss:"css",less:"css",vue:"vue",svelte:"html",py:"python",pyi:"python",sql:"sql",yaml:"yaml",yml:"yaml",toml:"yaml",sh:"bash",bash:"bash",zsh:"bash",go:"go",rs:"rust",dockerfile:"dockerfile",java:"java",c:"cpp",h:"cpp",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",hxx:"cpp",xml:"xml",svg:"xml",xsl:"xml",xslt:"xml",plist:"xml"};function x(s){const t=s.split(".").pop()?.toLowerCase()||"",e=s.toLowerCase();return e==="dockerfile"||e.endsWith("/dockerfile")?"dockerfile":e==="makefile"||e.endsWith("/makefile")?"bash":m[t]||"plaintext"}function h(s){const t=s.split(".").pop()?.toLowerCase()||"";return t==="md"||t==="mdx"}function y(){async function s(t){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(t),!0}catch{}try{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.left="-9999px",e.style.top="-9999px",document.body.appendChild(e),e.focus(),e.select();const c=document.execCommand("copy");return document.body.removeChild(e),c}catch{return!1}}return{copy:s}}export{u as _,x as d,h as i,y as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a,n as i}from"./B63LIwsW.js";import{u}from"./DTu0K_pX.js";const r=a(()=>{const{isAuthenticated:e,isPending:t}=u();if(!t.value&&!e.value)return i("/login")});export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as M}from"./
|
|
1
|
+
import{_ as M}from"./B6wYZD_K.js";import{a as V,G as i,R as s,ab as u,a9 as b,T as r,_ as q,ae as v,Q as p,S as c,aa as _,aj as w,ak as $,W as B,bg as G,an as Q,ag as W,e as h,c as N,q as A,C as o,ai as H,af as J}from"./B63LIwsW.js";import{_ as K,a as X}from"./Cmdr5BNz.js";import{_ as Y}from"./Cs_udj6A.js";import{_ as Z}from"./BsnhHCOa.js";import"./HlbU_z9a.js";import"./hm3ShyaF.js";import"./qWWnsfRV.js";const ee={class:"p-4 rounded-lg border border-default bg-elevated/50 hover:bg-elevated transition-colors"},te={class:"flex items-start justify-between gap-2 mb-2"},se={class:"flex items-center gap-2 min-w-0"},le={class:"font-medium truncate"},ae={class:"flex items-center gap-1.5 shrink-0"},ie={class:"text-sm text-muted line-clamp-2 mb-3"},ne={key:0,class:"flex flex-wrap gap-1 mb-3"},oe={key:1,class:"flex items-center gap-1 mb-3 text-xs text-dimmed"},re={class:"flex items-center justify-between"},ce={key:0,class:"text-xs text-dimmed"},de={key:1},ue={class:"flex items-center gap-1.5"},me=V({__name:"LibraryCard",props:{skill:{}},emits:["install","update"],setup(a,{emit:U}){const x=U;return(k,l)=>{const g=q,y=Z,m=B;return s(),i("div",ee,[u("div",te,[u("div",se,[r(g,{name:"i-lucide-puzzle",class:"size-4 shrink-0 text-primary"}),u("span",le,v(a.skill.name),1)]),u("div",ae,[a.skill.installed&&!a.skill.hasUpdate?(s(),p(y,{key:0,variant:"subtle",color:"success",size:"xs"},{default:c(()=>[...l[2]||(l[2]=[_(" Installed ",-1)])]),_:1})):b("",!0),a.skill.hasUpdate?(s(),p(y,{key:1,variant:"subtle",color:"warning",size:"xs"},{default:c(()=>[...l[3]||(l[3]=[_(" Update available ",-1)])]),_:1})):b("",!0),r(y,{variant:"subtle",color:"neutral",size:"xs"},{default:c(()=>[_(" v"+v(a.skill.version),1)]),_:1})])]),u("p",ie,v(a.skill.description),1),a.skill.tags.length>0?(s(),i("div",ne,[(s(!0),i(w,null,$(a.skill.tags,n=>(s(),p(y,{key:n,variant:"subtle",color:n==="official"?"primary":"neutral",size:"xs"},{default:c(()=>[_(v(n),1)]),_:2},1032,["color"]))),128))])):b("",!0),a.skill.requiresSecrets.length>0?(s(),i("div",oe,[r(g,{name:"i-lucide-key-round",class:"size-3 shrink-0"}),u("span",null,"Requires: "+v(a.skill.requiresSecrets.join(", ")),1)])):b("",!0),u("div",re,[a.skill.author?(s(),i("span",ce," by "+v(a.skill.author),1)):(s(),i("span",de)),u("div",ue,[r(m,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-external-link",to:`https://github.com/Patrity/cognova-skills/tree/main/${a.skill.name}`,target:"_blank"},{default:c(()=>[...l[4]||(l[4]=[_(" View ",-1)])]),_:1},8,["to"]),a.skill.installed?a.skill.hasUpdate?(s(),p(m,{key:1,size:"xs",color:"warning",variant:"soft",icon:"i-lucide-refresh-cw",onClick:l[1]||(l[1]=n=>x("update",a.skill.name))},{default:c(()=>[...l[6]||(l[6]=[_(" Update ",-1)])]),_:1})):b("",!0):(s(),p(m,{key:0,size:"xs",icon:"i-lucide-download",onClick:l[0]||(l[0]=n=>x("install",a.skill.name))},{default:c(()=>[...l[5]||(l[5]=[_(" Install ",-1)])]),_:1}))])])])}}}),fe=Object.assign(me,{__name:"SkillsLibraryCard"}),ke={class:"flex flex-1 min-w-0"},ye={class:"p-4"},_e={key:0,class:"flex flex-wrap gap-1.5 mb-4"},ve={key:1,class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},ge={key:2,class:"flex flex-col items-center justify-center py-16 text-dimmed"},pe={key:3,class:"text-center py-12 text-muted text-sm"},be={key:4,class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},Te=V({__name:"library",setup(a){const U=G(),x=Q(),k=W(),l=h([]),g=h(!0),y=h(null),m=h(""),n=h(null),C=N(()=>{const e=new Set;for(const t of l.value)for(const f of t.tags)e.add(f);return[...e].sort()}),L=N(()=>{let e=l.value;if(n.value&&(e=e.filter(t=>t.tags.includes(n.value))),m.value.trim()){const t=m.value.toLowerCase();e=e.filter(f=>f.name.toLowerCase().includes(t)||f.description.toLowerCase().includes(t)||f.author.toLowerCase().includes(t))}return e});function j(e){n.value=n.value===e?null:e}async function S(){g.value=!0;try{const e=await $fetch("/api/skills/library");l.value=e.data}catch{k.add({title:"Failed to load skills library",color:"error"})}finally{g.value=!1}}async function T(e){y.value=e;try{await $fetch("/api/skills/library/install",{method:"POST",body:{name:e}}),k.add({title:`Installed ${e}`,color:"success"}),await S()}catch(t){const f=t instanceof Error?t.message:"Failed to install skill";k.add({title:f,color:"error"})}finally{y.value=null}}async function P(e){y.value=e;try{await $fetch(`/api/skills/${e}/files/delete`,{method:"POST",body:{path:"."}}).catch(()=>{}),await $fetch("/api/skills/library/install",{method:"POST",body:{name:e}}),k.add({title:`Updated ${e}`,color:"success"}),await S()}catch{k.add({title:`Failed to update ${e}`,color:"error"})}finally{y.value=null}}return A(async()=>{await S();const e=U.query.install;if(e){x.replace({query:{}});const t=l.value.find(f=>f.name===e);t&&!t.installed?(k.add({title:`Installing ${e} from docs...`,color:"info"}),await T(e)):t?.installed?k.add({title:`${e} is already installed`,color:"neutral"}):k.add({title:`Skill "${e}" not found in library`,color:"warning"})}}),(e,t)=>{const f=M,I=B,R=J,F=X,z=Y,O=q,D=fe,E=K;return s(),i("div",ke,[r(E,{id:"skills-library",grow:""},{header:c(()=>[r(F,{title:"Skills Library"},{right:c(()=>[r(f,{modelValue:o(m),"onUpdate:modelValue":t[0]||(t[0]=d=>H(m)?m.value=d:null),icon:"i-lucide-search",placeholder:"Search library...",size:"sm",class:"w-48"},null,8,["modelValue"]),r(R,{to:"/skills"},{default:c(()=>[r(I,{icon:"i-lucide-arrow-left",variant:"ghost",color:"neutral",size:"sm"},{default:c(()=>[...t[1]||(t[1]=[_(" My Skills ",-1)])]),_:1})]),_:1})]),_:1})]),body:c(()=>[u("div",ye,[o(C).length>0&&!o(g)?(s(),i("div",_e,[(s(!0),i(w,null,$(o(C),d=>(s(),p(I,{key:d,size:"xs",variant:o(n)===d?"solid":"outline",color:d==="official"?"primary":"neutral",onClick:he=>j(d)},{default:c(()=>[_(v(d),1)]),_:2},1032,["variant","color","onClick"]))),128))])):b("",!0),o(g)?(s(),i("div",ve,[(s(),i(w,null,$(6,d=>u("div",{key:d,class:"p-4 rounded-lg border border-default bg-elevated/50"},[r(z,{class:"h-4 w-24 mb-2"}),r(z,{class:"h-3 w-full mb-1"}),r(z,{class:"h-3 w-2/3"})])),64))])):o(l).length===0?(s(),i("div",ge,[r(O,{name:"i-lucide-library",class:"size-12 mb-4"}),t[2]||(t[2]=u("p",{class:"text-lg font-medium"}," No community skills available ",-1)),t[3]||(t[3]=u("p",{class:"text-sm mt-1"}," The skills registry is empty or hasn't synced yet. ",-1))])):o(L).length===0?(s(),i("div",pe," No skills matching "+v(o(n)?`"${o(n)}"`:"")+" "+v(o(m)?`"${o(m)}"`:""),1)):(s(),i("div",be,[(s(!0),i(w,null,$(o(L),d=>(s(),p(D,{key:d.name,skill:d,onInstall:T,onUpdate:P},null,8,["skill"]))),128))]))])]),_:1})])}}});export{Te as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,aR as x,aQ as T,aP as N,a_ as C,Q as h,R as y,S as f,a4 as g,C as e,a3 as q,e as u,c as B,f as $,q as A,be as D,T as F,V as I,a9 as M,bf as P,k as V}from"./
|
|
1
|
+
import{a as b,aR as x,aQ as T,aP as N,a_ as C,Q as h,R as y,S as f,a4 as g,C as e,a3 as q,e as u,c as B,f as $,q as A,be as D,T as F,V as I,a9 as M,bf as P,k as V}from"./B63LIwsW.js";import{u as H}from"./DlSJ4TF_.js";const[O,E]=x("CollapsibleRoot");var S=b({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(l,{expose:i,emit:n}){const o=l,s=T(o,"open",n,{defaultValue:o.defaultOpen,passive:o.open===void 0}),{disabled:r,unmountOnHide:p}=N(o);return E({contentId:"",disabled:r,open:s,unmountOnHide:p,onOpenToggle:()=>{r.value||(s.value=!s.value)}}),i({open:s}),C(),(d,v)=>(y(),h(e(q),{as:d.as,"as-child":o.asChild,"data-state":e(s)?"open":"closed","data-disabled":e(r)?"":void 0},{default:f(()=>[g(d.$slots,"default",{open:e(s)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),G=S,Q=b({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(l,{emit:i}){const n=l,o=i,t=O();t.contentId||=H(void 0,"reka-collapsible-content");const s=u(),{forwardRef:r,currentElement:p}=C(),d=u(0),v=u(0),R=B(()=>t.open.value),m=u(R.value),c=u();$(()=>[R.value,s.value?.present],async()=>{await V();const a=p.value;if(!a)return;c.value=c.value||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const _=a.getBoundingClientRect();v.value=_.height,d.value=_.width,m.value||(a.style.transitionDuration=c.value.transitionDuration,a.style.animationName=c.value.animationName)},{immediate:!0});const w=B(()=>m.value&&t.open.value);return A(()=>{requestAnimationFrame(()=>{m.value=!1})}),D(p,"beforematch",a=>{requestAnimationFrame(()=>{t.onOpenToggle(),o("contentFound")})}),(a,_)=>(y(),h(e(P),{ref_key:"presentRef",ref:s,present:a.forceMount||e(t).open.value,"force-mount":!0},{default:f(({present:k})=>[F(e(q),I(a.$attrs,{id:e(t).contentId,ref:e(r),"as-child":n.asChild,as:a.as,hidden:k?void 0:e(t).unmountOnHide.value?"":"until-found","data-state":w.value?void 0:e(t).open.value?"open":"closed","data-disabled":e(t).disabled?.value?"":void 0,style:{"--reka-collapsible-content-height":`${v.value}px`,"--reka-collapsible-content-width":`${d.value}px`}}),{default:f(()=>[!e(t).unmountOnHide.value||k?g(a.$slots,"default",{key:0}):M("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]),_:3},8,["present"]))}}),J=Q,j=b({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(l){const i=l;C();const n=O();return(o,t)=>(y(),h(e(q),{type:o.as==="button"?"button":void 0,as:o.as,"as-child":i.asChild,"aria-controls":e(n).contentId,"aria-expanded":e(n).open.value,"data-state":e(n).open.value?"open":"closed","data-disabled":e(n).disabled?.value?"":void 0,disabled:e(n).disabled?.value,onClick:e(n).onOpenToggle},{default:f(()=>[g(o.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"]))}}),K=j;export{K as C,J as a,G as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as c,t as d}from"./
|
|
1
|
+
import{v as c,t as d}from"./Be5L93GM.js";import{d as A,e as P,p as B}from"./Be5L93GM.js";import{T as H,f as j,i as L,a as M,b as _,n as E,u as G}from"./iik6CYzq.js";import"./B63LIwsW.js";import"./88opOQSr.js";import"./BZqdzrSw.js";import"./DCL9gWFw.js";import"./BVc_fOF1.js";import"./CqkleIqs.js";function S(i){const r=i;return async t=>{const a=[],h=[];c(t,s=>{const e=s;if(!["pre","code"].includes(e.tagName))return!1;const o=e.properties?.language!==void 0&&e.properties?.language!=="text",p=!!e.properties?.highlights;return o||p},s=>{const e=s,o=typeof e.properties.highlights=="string"?e.properties.highlights.split(/[,\s]+/).map(Number):Array.isArray(e.properties.highlights)?e.properties.highlights.map(Number):[],p=r.highlighter(d(s),e.properties.language,r.theme,{highlights:o.filter(Boolean),meta:e.properties.meta}).then(({tree:n,className:g,style:l,inlineStyle:m})=>{e.properties.className=((e.properties.className||"")+" "+g).trim(),e.properties.style=((e.properties.style||"")+" "+m).trim(),e.children[0]?.tagName==="code"?e.children[0].children=n:e.children=n[0].children||n,l&&h.push(l)});a.push(p)}),a.length&&(await Promise.all(a),t.children.push({type:"element",tagName:"style",children:[{type:"text",value:u(h.join(""))}],properties:{}}))}}const u=i=>{const r=i.split("}").filter(t=>!!t.trim()).map(t=>t.trim()+"}");return Array.from(new Set(r)).join("")};export{H as TEXT_TAGS,A as createMarkdownParser,P as createParseProcessor,j as flatUnwrap,L as isTag,M as isText,_ as nodeChildren,E as nodeTextContent,B as parseMarkdown,S as rehypeHighlight,G as unwrap};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as al}from"./a9_LvIZ4.js";import{_ as sl,a as ol}from"./Cmdr5BNz.js";import{_ as nl}from"./B6wYZD_K.js";import{_ as il}from"./DmmQUhEb.js";import{a as dl,ag as rl,ah as R,e as p,f as ul,q as ml,Q as ge,S as n,R as r,T as a,ab as o,G as u,ai as H,C as t,W as cl,aa as c,aj as x,ak as I,a9 as U,_ as pl,ae as w,U as fl,al as be}from"./B63LIwsW.js";import{_ as gl}from"./CwKe2KkK.js";import{_ as bl}from"./wgX1ldgZ.js";import{_ as vl}from"./D7WbsJsa.js";import{_ as yl}from"./Cs_udj6A.js";import{_ as wl}from"./BaYtugUf.js";import{_ as hl}from"./Bsdcw5gr.js";import{_ as xl}from"./BVc_fOF1.js";import{_ as kl}from"./DdXVAzIg.js";import{_ as _l}from"./4nN41Tyd.js";import{u as Pl,d as fe}from"./Clr3MHUr.js";import{u as Ul}from"./DTu0K_pX.js";import"./hm3ShyaF.js";import"./HlbU_z9a.js";import"./qWWnsfRV.js";import"./D7DTZ0iS.js";import"./88opOQSr.js";import"./B-513wJW.js";import"./DMy2sxuC.js";import"./DwAJIRGg.js";import"./D-O8wAju.js";import"./CziltI1u.js";import"./C6HEirAm.js";import"./nTCVPCKg.js";import"./DlSJ4TF_.js";import"./BsnhHCOa.js";import"./D1t0272g.js";import"./CY3x8iy3.js";import"./DQd-GXKJ.js";import"./4Qy4OdWt.js";import"./DJoRBCVm.js";import"./D8gh62A0.js";import"./CrW6y2-s.js";import"./AUdD1uDD.js";const Sl={class:"p-6"},Vl={class:"space-y-8 max-w-2xl mx-auto py-6"},Cl={class:"py-6"},Al={class:"flex items-center justify-between mb-6"},Il={class:"text-sm bg-elevated px-2 py-0.5 rounded"},Bl={class:"text-dimmed"},El={class:"text-dimmed text-sm"},$l={class:"flex gap-2 justify-end"},Dl={class:"py-12 text-center"},Ml={class:"py-6"},Ll={class:"flex items-center justify-between mb-6"},Nl={key:0,class:"space-y-3"},Tl={key:1,class:"py-12 text-center"},Rl={key:2,class:"space-y-3"},Hl=["onClick"],Ol={class:"flex items-center justify-between"},Fl={class:"flex items-center gap-3"},jl={class:"font-medium"},zl={class:"text-sm text-dimmed ml-2"},ql={class:"flex items-center gap-3"},Kl={key:0,class:"text-xs text-dimmed mt-1 pl-8"},Gl={class:"max-w-2xl mx-auto py-6"},Yl={class:"mb-8"},Wl={class:"flex gap-2"},Jl={key:0,class:"space-y-3"},Ql={key:1,class:"space-y-2"},Xl={class:"flex items-center justify-between px-4 py-3"},Zl={class:"flex items-center gap-3"},et={class:"font-medium"},lt={key:0,class:"border-t border-default px-4 py-3 space-y-2 bg-elevated/50"},tt={class:"text-sm text-dimmed capitalize"},at={class:"mt-6"},st={class:"space-y-8 max-w-xl mx-auto py-6"},ot={class:"space-y-4"},nt={class:"text-lg font-semibold"},it={class:"flex justify-end gap-2 pt-4"},dt={class:"mb-4"},rt={class:"bg-elevated px-2 py-0.5 rounded"},ut={class:"flex justify-end gap-2 pt-6"},mt={class:"space-y-4"},ct={key:0,class:"flex items-start gap-2 rounded-lg bg-error/10 border border-error/20 p-3 text-sm"},pt={class:"mt-1 space-y-0.5"},ft={class:"text-xs bg-elevated px-1.5 py-0.5 rounded"},gt={class:"flex justify-end gap-2 pt-4"},bt={class:"mb-4"},vt={class:"flex justify-end gap-2 pt-6"},yt={class:"flex items-center gap-2"},wt={class:"text-lg font-semibold"},ht={class:"space-y-4"},xt={key:0,class:"flex items-start gap-2 rounded-lg bg-elevated p-3 text-sm"},kt={class:"text-dimmed"},_t={class:"bg-elevated px-1 py-0.5 rounded text-xs"},Pt={key:0,class:"flex items-start gap-2 rounded-lg bg-error/10 border border-error/20 p-3 text-sm"},Ut={class:"space-y-2"},St=["checked","onChange"],Vt={class:"text-sm"},Ct={class:"grid grid-cols-2 gap-4"},At={class:"grid grid-cols-2 gap-4"},It={class:"flex justify-end gap-2 pt-4"},ba=dl({__name:"settings",setup(Bt){const{user:ve,updateProfile:ye,changeEmail:we,changePassword:he}=Ul(),d=rl(),{updatePreferences:xe}=Pl(),O=R({name:""}),X=p(!1),E=R({newEmail:""}),Z=p(!1),h=R({currentPassword:"",newPassword:"",confirmPassword:""}),ee=p(!1),$=p([]),le=p(!1),B=p(!1),D=p(!1),F=p(null),te=p(!1),_=p(null),b=R({key:"",value:"",description:""});ul(()=>ve.value,i=>{i&&(O.name=i.name||"",E.newEmail=i.email||"")},{immediate:!0});async function G(){le.value=!0;try{const{data:i}=await $fetch("/api/secrets");$.value=i}catch{d.add({title:"Failed to load secrets",color:"error"})}le.value=!1}const ke=[{label:"Account",icon:"i-lucide-user",value:"account",slot:"account"},{label:"Secrets",icon:"i-lucide-key",value:"secrets",slot:"secrets"},{label:"Integrations",icon:"i-lucide-plug",value:"integrations",slot:"integrations"},{label:"App",icon:"i-lucide-settings",value:"app",slot:"app"}],_e=[{accessorKey:"key",header:"Key"},{accessorKey:"description",header:"Description"},{accessorKey:"updatedAt",header:"Last Updated"},{accessorKey:"actions",header:""}];function Pe(){_.value=null,b.key="",b.value="",b.description="",B.value=!0}function Ue(i){_.value=i,b.key=i.key,b.value="",b.description=i.description||"",B.value=!0}function Se(i){F.value=i,D.value=!0}async function Ve(){if(!b.key||!_.value&&!b.value){d.add({title:"Missing fields",description:_.value?"Key is required.":"Key and value are required.",color:"error"});return}te.value=!0;try{_.value?(await $fetch(`/api/secrets/${_.value.key}`,{method:"PUT",body:{value:b.value||void 0,description:b.description||void 0}}),d.add({title:"Secret updated",color:"success"})):(await $fetch("/api/secrets",{method:"POST",body:{key:b.key,value:b.value,description:b.description||void 0}}),d.add({title:"Secret created",color:"success"})),B.value=!1,await G()}catch(i){const e=i;d.add({title:_.value?"Failed to update secret":"Failed to create secret",description:e.data?.message||"An error occurred",color:"error"})}te.value=!1}async function Ce(){if(F.value)try{await $fetch(`/api/secrets/${F.value.key}`,{method:"DELETE"}),d.add({title:"Secret deleted",color:"success"}),D.value=!1,F.value=null,await G()}catch{d.add({title:"Failed to delete secret",color:"error"})}}function Ae(i){return new Date(i).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}const C=p(""),ae=p(!1);async function Ie(){try{const{data:i}=await $fetch("/api/secrets/APP_URL");C.value=i.value||""}catch{C.value=""}}async function Be(){ae.value=!0;try{C.value?$.value.some(e=>e.key==="APP_URL")?await $fetch("/api/secrets/APP_URL",{method:"PUT",body:{value:C.value,description:"Public URL for webhooks and auth callbacks"}}):await $fetch("/api/secrets",{method:"POST",body:{key:"APP_URL",value:C.value,description:"Public URL for webhooks and auth callbacks"}}):$.value.some(e=>e.key==="APP_URL")&&await $fetch("/api/secrets/APP_URL",{method:"DELETE"}),d.add({title:"Public URL saved",description:"Restart running integrations for changes to take effect.",color:"success"}),await G()}catch{d.add({title:"Failed to save URL",color:"error"})}ae.value=!1}const S=p({...fe}),se=p(!1),oe=p(!1),j=p(new Set),Ee=[{key:"task",label:"Tasks",icon:"i-lucide-check-square",subtypes:["create","edit","delete","restore"]},{key:"project",label:"Projects",icon:"i-lucide-folder",subtypes:["create","edit","delete"]},{key:"agent",label:"Agents",icon:"i-lucide-bot",subtypes:["create","edit","delete","run","complete","fail","cancel"]},{key:"document",label:"Documents",icon:"i-lucide-file-text",subtypes:["edit","delete","restore"]},{key:"memory",label:"Memories",icon:"i-lucide-brain",subtypes:["create","delete"]},{key:"reminder",label:"Reminders",icon:"i-lucide-bell",subtypes:["create"]},{key:"secret",label:"Secrets",icon:"i-lucide-key-round",subtypes:["create","edit","delete"]},{key:"hook",label:"Hooks",icon:"i-lucide-webhook",subtypes:["create"]},{key:"conversation",label:"Conversations",icon:"i-lucide-message-square",subtypes:["delete"]},{key:"bridge",label:"Bridges",icon:"i-lucide-plug",subtypes:["create","edit","delete","complete","fail"]}];async function $e(){se.value=!0;try{const{data:i}=await $fetch("/api/settings");S.value={...fe,...i.notifications}}catch{S.value={...fe}}se.value=!1}async function De(){oe.value=!0;try{await $fetch("/api/settings",{method:"PUT",body:{notifications:S.value}}),xe(S.value),d.add({title:"Notification preferences saved",color:"success"})}catch{d.add({title:"Failed to save preferences",color:"error"})}oe.value=!1}function Me(i){j.value.has(i)?j.value.delete(i):j.value.add(i)}function Le(i,e){S.value[i]={...S.value[i],enabled:e}}function Ne(i,e,P){const V=S.value[i];S.value[i]={...V,subtypes:{...V?.subtypes,[e]:P}}}const ne=p([]),ie=p(!1),M=p(!1),de=p(!1),L=p(!1),z=p(null),k=R({platform:"telegram",name:""}),N=p(!1),y=p(null),re=p(!1),s=R({name:"",botUsername:"",allowedChatIds:"",listenMode:"mentions",guildId:"",channelId:"",strategy:"imsg",allowedNumbers:"",blueBubblesUrl:"",enabledServices:[],account:"",imapHost:"",imapPort:"",smtpHost:"",smtpPort:"",emailAddress:""}),Te=[{value:"mentions",label:"Mentions & DMs"},{value:"dm",label:"DMs only"},{value:"all",label:"All messages"}],Re=[{value:"imsg",label:"Local (imsg CLI)"},{value:"bluebubbles",label:"BlueBubbles"}],He=[{value:"gmail",label:"Gmail"},{value:"calendar",label:"Calendar"},{value:"drive",label:"Drive"},{value:"contacts",label:"Contacts"},{value:"tasks",label:"Tasks"}],Oe={telegram:"My Telegram Bot",discord:"My Discord Bot",imessage:"iMessage Bridge",google:"Google Suite",email:"Work Email"},Y={telegram:["TELEGRAM_BOT_TOKEN"],discord:["DISCORD_BOT_TOKEN"],imessage:[],google:[],email:[]},W=[{value:"telegram",label:"Telegram",icon:"i-lucide-send"},{value:"discord",label:"Discord",icon:"i-lucide-message-circle"},{value:"imessage",label:"iMessage",icon:"i-lucide-smartphone"},{value:"google",label:"Google Suite",icon:"i-lucide-mail"},{value:"email",label:"Email (IMAP)",icon:"i-lucide-at-sign"}];function J(i){const e=Y[i];if(!e.length)return[];const P=new Set($.value.map(V=>V.key));return e.filter(V=>!P.has(V))}const Fe={connected:"text-success",disconnected:"text-dimmed",error:"text-error",unconfigured:"text-dimmed"};async function q(){ie.value=!0;try{const{data:i}=await $fetch("/api/bridges");ne.value=i}catch{d.add({title:"Failed to load integrations",color:"error"})}ie.value=!1}function je(i){y.value=i,s.name=i.name;const e=i.config?JSON.parse(i.config):{};switch(s.botUsername="",s.allowedChatIds="",s.listenMode="mentions",s.guildId="",s.channelId="",s.strategy="imsg",s.allowedNumbers="",s.blueBubblesUrl="",s.enabledServices=[],s.account="",s.imapHost="",s.imapPort="",s.smtpHost="",s.smtpPort="",s.emailAddress="",i.platform){case"telegram":s.botUsername=e.botUsername||"",s.allowedChatIds=(e.allowedChatIds||[]).join(", ");break;case"discord":s.listenMode=e.listenMode||"mentions",s.guildId=e.guildId||"",s.channelId=e.channelId||"";break;case"imessage":s.strategy=e.strategy||"imsg",s.allowedNumbers=(e.allowedNumbers||[]).join(", "),s.blueBubblesUrl=e.blueBubblesUrl||"";break;case"google":s.enabledServices=e.enabledServices||[],s.account=e.account||"";break;case"email":s.imapHost=e.imapHost||"",s.imapPort=e.imapPort?.toString()||"",s.smtpHost=e.smtpHost||"",s.smtpPort=e.smtpPort?.toString()||"",s.emailAddress=e.emailAddress||"";break}N.value=!0}async function ze(){if(!y.value)return;const i=y.value.platform;let e={};switch(y.value.config&&(e=JSON.parse(y.value.config)),i){case"telegram":e.botUsername=s.botUsername||void 0,e.allowedChatIds=s.allowedChatIds?s.allowedChatIds.split(",").map(P=>P.trim()).filter(Boolean):void 0;break;case"discord":e.listenMode=s.listenMode,e.guildId=s.guildId||void 0,e.channelId=s.channelId||void 0;break;case"imessage":e.strategy=s.strategy,e.allowedNumbers=s.allowedNumbers?s.allowedNumbers.split(",").map(P=>P.trim()).filter(Boolean):void 0,e.blueBubblesUrl=s.blueBubblesUrl||void 0;break;case"google":e.enabledServices=s.enabledServices,e.account=s.account||void 0;break;case"email":e.imapHost=s.imapHost||void 0,e.imapPort=s.imapPort?Number(s.imapPort):void 0,e.smtpHost=s.smtpHost||void 0,e.smtpPort=s.smtpPort?Number(s.smtpPort):void 0,e.emailAddress=s.emailAddress||void 0;break}re.value=!0;try{await $fetch(`/api/bridges/${y.value.id}`,{method:"PUT",body:{name:s.name,config:e}}),d.add({title:"Integration updated",color:"success"}),N.value=!1,await q()}catch(P){const V=P;d.add({title:"Failed to update integration",description:V.data?.message,color:"error"})}re.value=!1}function qe(){k.platform="telegram",k.name="",M.value=!0}async function Ke(){if(!k.name){d.add({title:"Name is required",color:"error"});return}const i=J(k.platform);if(i.length){d.add({title:"Missing required secrets",description:`Add ${i.join(", ")} in the Secrets tab first.`,color:"error"});return}de.value=!0;try{await $fetch("/api/bridges",{method:"POST",body:{platform:k.platform,name:k.name}}),d.add({title:"Integration created",color:"success"}),M.value=!1,await q()}catch(e){const P=e;d.add({title:"Failed to create integration",description:P.data?.message,color:"error"})}de.value=!1}async function Ge(i){try{await $fetch(`/api/bridges/${i.id}`,{method:"PUT",body:{enabled:!i.enabled}}),await q()}catch{d.add({title:"Failed to update integration",color:"error"})}}function Ye(i){z.value=i,L.value=!0}async function We(){if(z.value)try{await $fetch(`/api/bridges/${z.value.id}`,{method:"DELETE"}),d.add({title:"Integration deleted",color:"success"}),L.value=!1,z.value=null,await q()}catch{d.add({title:"Failed to delete integration",color:"error"})}}ml(()=>{G(),$e(),q(),Ie()});async function Je(){X.value=!0;const i=await ye({name:O.name});i.error?d.add({title:"Update failed",description:i.error.message,color:"error"}):d.add({title:"Profile updated",description:"Your name has been updated successfully.",color:"success"}),X.value=!1}async function Qe(){if(!E.newEmail){d.add({title:"Email required",description:"Please enter a new email address.",color:"error"});return}Z.value=!0;const i=await we(E.newEmail);i.error?d.add({title:"Email change failed",description:i.error.message,color:"error"}):d.add({title:"Email updated",description:"Your email has been changed successfully.",color:"success"}),Z.value=!1}async function Xe(){if(h.newPassword!==h.confirmPassword){d.add({title:"Passwords do not match",description:"Please make sure your new passwords match.",color:"error"});return}if(!h.currentPassword||!h.newPassword){d.add({title:"Missing fields",description:"Please fill in all password fields.",color:"error"});return}ee.value=!0;const i=await he({currentPassword:h.currentPassword,newPassword:h.newPassword});i.error?d.add({title:"Password change failed",description:i.error.message,color:"error"}):(d.add({title:"Password changed",description:"Your password has been changed successfully.",color:"success"}),h.currentPassword="",h.newPassword="",h.confirmPassword=""),ee.value=!1}return(i,e)=>{const P=al,V=ol,f=nl,m=il,g=cl,Q=gl,ue=bl,A=pl,Ze=vl,T=yl,me=wl,el=hl,ll=xl,K=kl,ce=_l,tl=sl;return r(),ge(tl,{id:"settings",grow:""},{default:n(()=>[a(V,{title:"Settings"},{right:n(()=>[a(P)]),_:1}),o("div",Sl,[a(ll,null,{fallback:n(()=>[o("div",st,[a(T,{class:"h-10 w-full"}),o("div",ot,[a(T,{class:"h-5 w-20"}),a(T,{class:"h-10 w-full"}),a(T,{class:"h-10 w-28"})])])]),default:n(()=>[a(el,{items:ke,"default-value":"account",class:"w-full mx-auto",ui:{list:"max-w-xl"}},{account:n(()=>[o("div",Vl,[o("div",null,[e[38]||(e[38]=o("h3",{class:"text-lg font-semibold mb-4"}," Profile ",-1)),a(Q,{state:t(O),class:"space-y-4",onSubmit:Je},{default:n(()=>[a(m,{label:"Name",name:"name"},{default:n(()=>[a(f,{modelValue:t(O).name,"onUpdate:modelValue":e[0]||(e[0]=l=>t(O).name=l),placeholder:"Your name",class:"w-full"},null,8,["modelValue"])]),_:1}),a(g,{type:"submit",loading:t(X)},{default:n(()=>[...e[37]||(e[37]=[c(" Save Name ",-1)])]),_:1},8,["loading"])]),_:1},8,["state"])]),a(ue),o("div",null,[e[40]||(e[40]=o("h3",{class:"text-lg font-semibold mb-4"}," Email Address ",-1)),a(Q,{state:t(E),class:"space-y-4",onSubmit:Qe},{default:n(()=>[a(m,{label:"Email",name:"newEmail"},{default:n(()=>[a(f,{modelValue:t(E).newEmail,"onUpdate:modelValue":e[1]||(e[1]=l=>t(E).newEmail=l),type:"email",placeholder:"your@email.com",class:"w-full"},null,8,["modelValue"])]),_:1}),a(g,{type:"submit",loading:t(Z)},{default:n(()=>[...e[39]||(e[39]=[c(" Change Email ",-1)])]),_:1},8,["loading"])]),_:1},8,["state"])]),a(ue),o("div",null,[e[42]||(e[42]=o("h3",{class:"text-lg font-semibold mb-4"}," Change Password ",-1)),a(Q,{state:t(h),class:"space-y-4",onSubmit:Xe},{default:n(()=>[a(m,{label:"Current Password",name:"currentPassword"},{default:n(()=>[a(f,{modelValue:t(h).currentPassword,"onUpdate:modelValue":e[2]||(e[2]=l=>t(h).currentPassword=l),type:"password",class:"w-full"},null,8,["modelValue"])]),_:1}),a(m,{label:"New Password",name:"newPassword"},{default:n(()=>[a(f,{modelValue:t(h).newPassword,"onUpdate:modelValue":e[3]||(e[3]=l=>t(h).newPassword=l),type:"password",class:"w-full"},null,8,["modelValue"])]),_:1}),a(m,{label:"Confirm New Password",name:"confirmPassword"},{default:n(()=>[a(f,{modelValue:t(h).confirmPassword,"onUpdate:modelValue":e[4]||(e[4]=l=>t(h).confirmPassword=l),type:"password",class:"w-full"},null,8,["modelValue"])]),_:1}),a(g,{type:"submit",loading:t(ee)},{default:n(()=>[...e[41]||(e[41]=[c(" Change Password ",-1)])]),_:1},8,["loading"])]),_:1},8,["state"])])])]),secrets:n(()=>[o("div",Cl,[o("div",Al,[e[44]||(e[44]=o("div",null,[o("h3",{class:"text-lg font-semibold"}," Secrets "),o("p",{class:"text-sm text-dimmed"}," Encrypted key-value store for skills and integrations. ")],-1)),a(g,{icon:"i-lucide-plus",onClick:Pe},{default:n(()=>[...e[43]||(e[43]=[c(" Add Secret ",-1)])]),_:1})]),a(Ze,{columns:_e,data:t($),loading:t(le)},{"key-cell":n(({row:l})=>[o("code",Il,w(l.original.key),1)]),"description-cell":n(({row:l})=>[o("span",Bl,w(l.original.description||"—"),1)]),"updatedAt-cell":n(({row:l})=>[o("span",El,w(Ae(l.original.updatedAt)),1)]),"actions-cell":n(({row:l})=>[o("div",$l,[a(g,{variant:"ghost",icon:"i-lucide-pencil",size:"xs",onClick:v=>Ue(l.original)},null,8,["onClick"]),a(g,{variant:"ghost",color:"error",icon:"i-lucide-trash-2",size:"xs",onClick:v=>Se(l.original)},null,8,["onClick"])])]),empty:n(()=>[o("div",Dl,[a(A,{name:"i-lucide-key",class:"size-12 mx-auto mb-4 text-dimmed"}),e[45]||(e[45]=o("p",{class:"text-dimmed"}," No secrets yet. Add one to get started. ",-1))])]),_:1},8,["data","loading"])])]),integrations:n(()=>[o("div",Ml,[o("div",Ll,[e[47]||(e[47]=o("div",null,[o("h3",{class:"text-lg font-semibold"}," Integrations "),o("p",{class:"text-sm text-dimmed"}," Connect external platforms to the message bridge. ")],-1)),a(g,{icon:"i-lucide-plus",onClick:qe},{default:n(()=>[...e[46]||(e[46]=[c(" Add Integration ",-1)])]),_:1})]),t(ie)?(r(),u("div",Nl,[(r(),u(x,null,I(3,l=>a(T,{key:l,class:"h-16 w-full"})),64))])):t(ne).length===0?(r(),u("div",Tl,[a(A,{name:"i-lucide-plug",class:"size-12 mx-auto mb-4 text-dimmed"}),e[48]||(e[48]=o("p",{class:"text-dimmed"}," No integrations configured. ",-1)),e[49]||(e[49]=o("p",{class:"text-sm text-dimmed mt-1"}," Connect Telegram, Discord, iMessage, or Google Suite. ",-1))])):(r(),u("div",Rl,[(r(!0),u(x,null,I(t(ne),l=>(r(),u("div",{key:l.id,class:"border border-default rounded-lg px-4 py-3 cursor-pointer hover:bg-elevated/50 transition-colors",onClick:v=>je(l)},[o("div",Ol,[o("div",Fl,[a(A,{name:W.find(v=>v.value===l.platform)?.icon||"i-lucide-plug",class:"size-5 text-dimmed"},null,8,["name"]),o("div",null,[o("span",jl,w(l.name),1),o("span",zl,w(W.find(v=>v.value===l.platform)?.label),1)])]),o("div",ql,[o("span",{class:fl(["text-xs capitalize",Fe[l.healthStatus]||"text-dimmed"])},w(l.healthStatus),3),a(me,{"model-value":l.enabled,onClick:e[5]||(e[5]=be(()=>{},["stop"])),"onUpdate:modelValue":v=>Ge(l)},null,8,["model-value","onUpdate:modelValue"]),a(g,{variant:"ghost",color:"error",icon:"i-lucide-trash-2",size:"xs",onClick:be(v=>Ye(l),["stop"])},null,8,["onClick"])])]),l.healthMessage?(r(),u("p",Kl,w(l.healthMessage),1)):U("",!0)],8,Hl))),128))]))])]),app:n(()=>[o("div",Gl,[o("div",Yl,[e[51]||(e[51]=o("h3",{class:"text-lg font-semibold mb-1"}," Public URL ",-1)),e[52]||(e[52]=o("p",{class:"text-sm text-dimmed mb-4"}," The publicly accessible URL for this instance. Used for Telegram webhooks, auth callbacks, and other integrations that need to reach your server. ",-1)),o("div",Wl,[a(f,{modelValue:t(C),"onUpdate:modelValue":e[6]||(e[6]=l=>H(C)?C.value=l:null),placeholder:"https://example.com",class:"flex-1"},null,8,["modelValue"]),a(g,{loading:t(ae),onClick:Be},{default:n(()=>[...e[50]||(e[50]=[c(" Save ",-1)])]),_:1},8,["loading"])]),e[53]||(e[53]=o("p",{class:"text-xs text-dimmed mt-2"}," Leave empty to use long-polling for Telegram instead of webhooks. Changes require restarting running integrations. ",-1))]),a(ue,{class:"mb-8"}),e[55]||(e[55]=o("div",{class:"mb-6"},[o("h3",{class:"text-lg font-semibold mb-1"}," Notification Preferences "),o("p",{class:"text-sm text-dimmed"}," Choose which resource changes show toast notifications. ")],-1)),t(se)?(r(),u("div",Jl,[(r(),u(x,null,I(5,l=>a(T,{key:l,class:"h-12 w-full"})),64))])):(r(),u("div",Ql,[(r(),u(x,null,I(Ee,l=>o("div",{key:l.key,class:"border border-default rounded-lg"},[o("div",Xl,[o("div",Zl,[a(g,{variant:"ghost",size:"xs",icon:t(j).has(l.key)?"i-lucide-chevron-down":"i-lucide-chevron-right",onClick:v=>Me(l.key)},null,8,["icon","onClick"]),a(A,{name:l.icon,class:"size-5 text-dimmed"},null,8,["name"]),o("span",et,w(l.label),1)]),a(me,{"model-value":t(S)[l.key]?.enabled??!1,"onUpdate:modelValue":v=>Le(l.key,v)},null,8,["model-value","onUpdate:modelValue"])]),t(j).has(l.key)&&t(S)[l.key]?.enabled?(r(),u("div",lt,[(r(!0),u(x,null,I(l.subtypes,v=>(r(),u("div",{key:v,class:"flex items-center justify-between pl-11"},[o("span",tt,w(v),1),a(me,{"model-value":t(S)[l.key]?.subtypes?.[v]!==!1,size:"sm","onUpdate:modelValue":pe=>Ne(l.key,v,pe)},null,8,["model-value","onUpdate:modelValue"])]))),128))])):U("",!0)])),64))])),o("div",at,[a(g,{loading:t(oe),onClick:De},{default:n(()=>[...e[54]||(e[54]=[c(" Save Preferences ",-1)])]),_:1},8,["loading"])])])]),_:1})]),_:1})]),a(K,{open:t(B),"onUpdate:open":e[11]||(e[11]=l=>H(B)?B.value=l:null)},{header:n(()=>[o("h3",nt,w(t(_)?"Edit Secret":"Add Secret"),1)]),body:n(()=>[a(Q,{state:t(b),class:"space-y-4",onSubmit:Ve},{default:n(()=>[a(m,{label:"Key",name:"key",hint:t(_)?"":"SCREAMING_SNAKE_CASE"},{default:n(()=>[a(f,{modelValue:t(b).key,"onUpdate:modelValue":e[7]||(e[7]=l=>t(b).key=l),disabled:!!t(_),placeholder:"MY_API_KEY",class:"w-full font-mono"},null,8,["modelValue","disabled"])]),_:1},8,["hint"]),a(m,{label:"Value",name:"value",hint:t(_)?"Leave empty to keep current value":""},{default:n(()=>[a(f,{modelValue:t(b).value,"onUpdate:modelValue":e[8]||(e[8]=l=>t(b).value=l),type:"password",placeholder:t(_)?"••••••••":"Secret value",class:"w-full"},null,8,["modelValue","placeholder"])]),_:1},8,["hint"]),a(m,{label:"Description",name:"description"},{default:n(()=>[a(f,{modelValue:t(b).description,"onUpdate:modelValue":e[9]||(e[9]=l=>t(b).description=l),placeholder:"Optional description",class:"w-full"},null,8,["modelValue"])]),_:1}),o("div",it,[a(g,{variant:"ghost",onClick:e[10]||(e[10]=l=>B.value=!1)},{default:n(()=>[...e[56]||(e[56]=[c(" Cancel ",-1)])]),_:1}),a(g,{type:"submit",loading:t(te)},{default:n(()=>[c(w(t(_)?"Update":"Create"),1)]),_:1},8,["loading"])])]),_:1},8,["state"])]),_:1},8,["open"]),a(K,{open:t(D),"onUpdate:open":e[13]||(e[13]=l=>H(D)?D.value=l:null)},{header:n(()=>[...e[57]||(e[57]=[o("h3",{class:"text-lg font-semibold"}," Delete Secret ",-1)])]),body:n(()=>[o("p",dt,[e[58]||(e[58]=c(" Are you sure you want to delete ",-1)),o("code",rt,w(t(F)?.key),1),e[59]||(e[59]=c("? ",-1))]),e[62]||(e[62]=o("p",{class:"text-sm text-dimmed"}," This action cannot be undone. Any skills using this secret will stop working. ",-1)),o("div",ut,[a(g,{variant:"ghost",onClick:e[12]||(e[12]=l=>D.value=!1)},{default:n(()=>[...e[60]||(e[60]=[c(" Cancel ",-1)])]),_:1}),a(g,{color:"error",onClick:Ce},{default:n(()=>[...e[61]||(e[61]=[c(" Delete ",-1)])]),_:1})])]),_:1},8,["open"]),a(K,{open:t(M),"onUpdate:open":e[17]||(e[17]=l=>H(M)?M.value=l:null)},{header:n(()=>[...e[63]||(e[63]=[o("h3",{class:"text-lg font-semibold"}," Add Integration ",-1)])]),body:n(()=>[o("div",mt,[a(m,{label:"Platform",name:"platform"},{default:n(()=>[a(ce,{modelValue:t(k).platform,"onUpdate:modelValue":e[14]||(e[14]=l=>t(k).platform=l),items:W,"value-key":"value",class:"w-full"},null,8,["modelValue"])]),_:1}),J(t(k).platform).length?(r(),u("div",ct,[a(A,{name:"i-lucide-alert-triangle",class:"size-4 mt-0.5 text-error shrink-0"}),o("div",null,[e[64]||(e[64]=o("p",{class:"font-medium text-error"}," Missing required secrets ",-1)),e[65]||(e[65]=o("p",{class:"text-dimmed mt-1"}," Add the following in Settings → Secrets before creating: ",-1)),o("ul",pt,[(r(!0),u(x,null,I(J(t(k).platform),l=>(r(),u("li",{key:l},[o("code",ft,w(l),1)]))),128))])])])):U("",!0),a(m,{label:"Name",name:"name"},{default:n(()=>[a(f,{modelValue:t(k).name,"onUpdate:modelValue":e[15]||(e[15]=l=>t(k).name=l),placeholder:Oe[t(k).platform],class:"w-full"},null,8,["modelValue","placeholder"])]),_:1}),o("div",gt,[a(g,{variant:"ghost",onClick:e[16]||(e[16]=l=>M.value=!1)},{default:n(()=>[...e[66]||(e[66]=[c(" Cancel ",-1)])]),_:1}),a(g,{loading:t(de),disabled:J(t(k).platform).length>0,onClick:Ke},{default:n(()=>[...e[67]||(e[67]=[c(" Create ",-1)])]),_:1},8,["loading","disabled"])])])]),_:1},8,["open"]),a(K,{open:t(L),"onUpdate:open":e[19]||(e[19]=l=>H(L)?L.value=l:null)},{header:n(()=>[...e[68]||(e[68]=[o("h3",{class:"text-lg font-semibold"}," Delete Integration ",-1)])]),body:n(()=>[o("p",bt,[e[69]||(e[69]=c(" Are you sure you want to delete ",-1)),o("strong",null,w(t(z)?.name),1),e[70]||(e[70]=c("? ",-1))]),e[73]||(e[73]=o("p",{class:"text-sm text-dimmed"}," This will remove the integration and all associated message history. ",-1)),o("div",vt,[a(g,{variant:"ghost",onClick:e[18]||(e[18]=l=>L.value=!1)},{default:n(()=>[...e[71]||(e[71]=[c(" Cancel ",-1)])]),_:1}),a(g,{color:"error",onClick:We},{default:n(()=>[...e[72]||(e[72]=[c(" Delete ",-1)])]),_:1})])]),_:1},8,["open"]),a(K,{open:t(N),"onUpdate:open":e[36]||(e[36]=l=>H(N)?N.value=l:null)},{header:n(()=>[o("div",yt,[a(A,{name:W.find(l=>l.value===t(y)?.platform)?.icon||"i-lucide-plug",class:"size-5"},null,8,["name"]),o("h3",wt," Configure "+w(t(y)?.name),1)])]),body:n(()=>[o("div",ht,[t(y)&&Y[t(y).platform].length?(r(),u("div",xt,[a(A,{name:"i-lucide-info",class:"size-4 mt-0.5 text-dimmed shrink-0"}),o("span",kt,[e[74]||(e[74]=c(" Requires ",-1)),(r(!0),u(x,null,I(Y[t(y).platform],(l,v)=>(r(),u(x,{key:l},[o("code",_t,w(l),1),v<Y[t(y).platform].length-1?(r(),u(x,{key:0},[c(", ")],64)):U("",!0)],64))),128)),e[75]||(e[75]=c(" in the Secrets tab. ",-1))])])):U("",!0),a(m,{label:"Name",name:"name"},{default:n(()=>[a(f,{modelValue:t(s).name,"onUpdate:modelValue":e[20]||(e[20]=l=>t(s).name=l),placeholder:"Integration name",class:"w-full"},null,8,["modelValue"])]),_:1}),t(y)?.platform==="telegram"?(r(),u(x,{key:1},[a(m,{label:"Bot Username",name:"botUsername",hint:"Without the @ prefix"},{default:n(()=>[a(f,{modelValue:t(s).botUsername,"onUpdate:modelValue":e[21]||(e[21]=l=>t(s).botUsername=l),placeholder:"my_bot",class:"w-full"},null,8,["modelValue"])]),_:1}),a(m,{label:"Allowed Chat IDs",name:"allowedChatIds",hint:"Comma-separated. Leave empty for all."},{default:n(()=>[a(f,{modelValue:t(s).allowedChatIds,"onUpdate:modelValue":e[22]||(e[22]=l=>t(s).allowedChatIds=l),placeholder:"123456, -100789",class:"w-full"},null,8,["modelValue"])]),_:1})],64)):U("",!0),t(y)?.platform==="discord"?(r(),u(x,{key:2},[a(m,{label:"Listen Mode",name:"listenMode"},{default:n(()=>[a(ce,{modelValue:t(s).listenMode,"onUpdate:modelValue":e[23]||(e[23]=l=>t(s).listenMode=l),items:Te,"value-key":"value",class:"w-full"},null,8,["modelValue"])]),_:1}),a(m,{label:"Server ID",name:"guildId",hint:"Optional. Limit to one server."},{default:n(()=>[a(f,{modelValue:t(s).guildId,"onUpdate:modelValue":e[24]||(e[24]=l=>t(s).guildId=l),placeholder:"Discord server ID",class:"w-full"},null,8,["modelValue"])]),_:1}),a(m,{label:"Channel ID",name:"channelId",hint:"Optional. Limit to one channel (for 'all' mode)."},{default:n(()=>[a(f,{modelValue:t(s).channelId,"onUpdate:modelValue":e[25]||(e[25]=l=>t(s).channelId=l),placeholder:"Discord channel ID",class:"w-full"},null,8,["modelValue"])]),_:1})],64)):U("",!0),t(y)?.platform==="imessage"?(r(),u(x,{key:3},[a(m,{label:"Strategy",name:"strategy"},{default:n(()=>[a(ce,{modelValue:t(s).strategy,"onUpdate:modelValue":e[26]||(e[26]=l=>t(s).strategy=l),items:Re,"value-key":"value",class:"w-full"},null,8,["modelValue"])]),_:1}),t(s).strategy==="bluebubbles"&&!t($).some(l=>l.key==="BLUEBUBBLES_PASSWORD")?(r(),u("div",Pt,[a(A,{name:"i-lucide-alert-triangle",class:"size-4 mt-0.5 text-error shrink-0"}),e[76]||(e[76]=o("span",{class:"text-dimmed"},[c(" BlueBubbles requires secret "),o("code",{class:"text-xs bg-elevated px-1.5 py-0.5 rounded"},"BLUEBUBBLES_PASSWORD"),c(" in the Secrets tab. ")],-1))])):U("",!0),t(s).strategy==="bluebubbles"?(r(),ge(m,{key:1,label:"BlueBubbles URL",name:"blueBubblesUrl"},{default:n(()=>[a(f,{modelValue:t(s).blueBubblesUrl,"onUpdate:modelValue":e[27]||(e[27]=l=>t(s).blueBubblesUrl=l),placeholder:"http://192.168.1.100:1234",class:"w-full"},null,8,["modelValue"])]),_:1})):U("",!0),a(m,{label:"Allowed Numbers",name:"allowedNumbers",hint:"Comma-separated. Leave empty for all."},{default:n(()=>[a(f,{modelValue:t(s).allowedNumbers,"onUpdate:modelValue":e[28]||(e[28]=l=>t(s).allowedNumbers=l),placeholder:"+15551234567, +15559876543",class:"w-full"},null,8,["modelValue"])]),_:1})],64)):U("",!0),t(y)?.platform==="google"?(r(),u(x,{key:4},[a(m,{label:"Enabled Services",name:"enabledServices"},{default:n(()=>[o("div",Ut,[(r(),u(x,null,I(He,l=>o("label",{key:l.value,class:"flex items-center gap-2 cursor-pointer"},[o("input",{type:"checkbox",checked:t(s).enabledServices.includes(l.value),class:"rounded",onChange:v=>t(s).enabledServices.includes(l.value)?t(s).enabledServices=t(s).enabledServices.filter(pe=>pe!==l.value):t(s).enabledServices.push(l.value)},null,40,St),o("span",Vt,w(l.label),1)])),64))])]),_:1}),a(m,{label:"Google Account",name:"account",hint:"Email used with gogcli"},{default:n(()=>[a(f,{modelValue:t(s).account,"onUpdate:modelValue":e[29]||(e[29]=l=>t(s).account=l),placeholder:"user@gmail.com",class:"w-full"},null,8,["modelValue"])]),_:1})],64)):U("",!0),t(y)?.platform==="email"?(r(),u(x,{key:5},[a(m,{label:"Email Address",name:"emailAddress"},{default:n(()=>[a(f,{modelValue:t(s).emailAddress,"onUpdate:modelValue":e[30]||(e[30]=l=>t(s).emailAddress=l),placeholder:"user@example.com",class:"w-full"},null,8,["modelValue"])]),_:1}),o("div",Ct,[a(m,{label:"IMAP Host",name:"imapHost"},{default:n(()=>[a(f,{modelValue:t(s).imapHost,"onUpdate:modelValue":e[31]||(e[31]=l=>t(s).imapHost=l),placeholder:"imap.example.com",class:"w-full"},null,8,["modelValue"])]),_:1}),a(m,{label:"IMAP Port",name:"imapPort"},{default:n(()=>[a(f,{modelValue:t(s).imapPort,"onUpdate:modelValue":e[32]||(e[32]=l=>t(s).imapPort=l),placeholder:"993",class:"w-full"},null,8,["modelValue"])]),_:1})]),o("div",At,[a(m,{label:"SMTP Host",name:"smtpHost"},{default:n(()=>[a(f,{modelValue:t(s).smtpHost,"onUpdate:modelValue":e[33]||(e[33]=l=>t(s).smtpHost=l),placeholder:"smtp.example.com",class:"w-full"},null,8,["modelValue"])]),_:1}),a(m,{label:"SMTP Port",name:"smtpPort"},{default:n(()=>[a(f,{modelValue:t(s).smtpPort,"onUpdate:modelValue":e[34]||(e[34]=l=>t(s).smtpPort=l),placeholder:"587",class:"w-full"},null,8,["modelValue"])]),_:1})])],64)):U("",!0),o("div",It,[a(g,{variant:"ghost",onClick:e[35]||(e[35]=l=>N.value=!1)},{default:n(()=>[...e[77]||(e[77]=[c(" Cancel ",-1)])]),_:1}),a(g,{loading:t(re),onClick:ze},{default:n(()=>[...e[78]||(e[78]=[c(" Save ",-1)])]),_:1},8,["loading"])])])]),_:1},8,["open"])]),_:1})}}});export{ba as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as t,c as o,Q as r,R as l,U as i,_ as u,
|
|
1
|
+
import{N as t,c as o,Q as r,R as l,U as i,_ as u,am as e}from"./B63LIwsW.js";const p={base:"size-4 shrink-0 align-sub"},d={__name:"ProseIcon",props:{name:{type:String,required:!0},class:{type:null,required:!1}},setup(s){const a=s,n=t(),c=o(()=>e({extend:e(p),...n.ui?.prose?.icon||{}}));return(m,f)=>(l(),r(u,{name:s.name,class:i(c.value({class:a.class}))},null,8,["name","class"]))}};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as y,M as q,N as g,O as m,P as k,c as v,Q as B,R as C,S as _,T as u,_ as d,C as e,U as c,V as h,W as b}from"./
|
|
1
|
+
import{L as y,M as q,N as g,O as m,P as k,c as v,Q as B,R as C,S as _,T as u,_ as d,C as e,U as c,V as h,W as b}from"./B63LIwsW.js";const M=Object.assign({inheritAttrs:!1},{__name:"UColorModeButton",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(p){const a=p,{t:n}=y(),i=q(),o=g(),f=m(k(a,"icon")),l=v({get(){return i.value==="dark"},set(r){i.preference=r?"dark":"light"}});return(r,t)=>(C(),B(b,h({...e(f),"aria-label":l.value?e(n)("colorMode.switchToLight"):e(n)("colorMode.switchToDark"),...r.$attrs},{onClick:t[0]||(t[0]=s=>l.value=!l.value)}),{leading:_(({ui:s})=>[u(d,{class:c(s.leadingIcon({class:[a.ui?.leadingIcon,"hidden dark:inline-block"]})),name:e(o).ui.icons.dark},null,8,["class","name"]),u(d,{class:c(s.leadingIcon({class:[a.ui?.leadingIcon,"dark:hidden"]})),name:e(o).ui.icons.light},null,8,["class","name"])]),_:1},16))}});export{M as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"613faa5d-8ace-45e0-8274-b611cc4fd1ad","timestamp":1771734672692}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"613faa5d-8ace-45e0-8274-b611cc4fd1ad","timestamp":1771734672692,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|