dorkos 0.82.0 → 0.87.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.
- package/README.md +11 -0
- package/dist/bin/cli.js +12725 -4763
- package/dist/client/assets/{AboutPage-WmtNTKyp.js → AboutPage-BSUaz4JJ.js} +1 -1
- package/dist/client/assets/{AppearancePage-D7ZHuThu.js → AppearancePage-CXOeapnY.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-wUJCR3vL.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BnlmhnMf.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-BXKUjnNQ.js → BlintzCanvas-CPvaejf6.js} +23 -23
- package/dist/client/assets/{CanvasCsvContent-BLAtnhdQ.js → CanvasCsvContent-BQMcLeXX.js} +1 -1
- package/dist/client/assets/CanvasFileContent-DZAWEzyp.js +2 -0
- package/dist/client/assets/CanvasModel3dContent-CU-0WLIz.js +2 -0
- package/dist/client/assets/{CodeMirrorDiff-Cpi43Atp.js → CodeMirrorDiff-B705Z174.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-CviERH82.js → CodeMirrorEditor-CnoVRaAX.js} +1 -1
- package/dist/client/assets/ConnectionAccessLists-CLulSQsd.js +1 -0
- package/dist/client/assets/ConnectionsPage-5Yc0-dNp.js +1 -0
- package/dist/client/assets/{ConventionPage-Coim_h2z.js → ConventionPage-CPTqeeNZ.js} +3 -3
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-lqp1rgj8.js → FloatingTanStackRouterDevtools-CqogiFob-C3cf2ADt.js} +1 -1
- package/dist/client/assets/HandlePage-CUJPQsdv.js +1 -0
- package/dist/client/assets/{LexicalField-DPe-aAXb.js → LexicalField-ClgIzBq7.js} +1 -1
- package/dist/client/assets/{ManagesPage-BZS2TdZL.js → ManagesPage-CKzcFzKR.js} +1 -1
- package/dist/client/assets/{Model3dViewer-qs0tZlVU.js → Model3dViewer-CVVsdftR.js} +1 -1
- package/dist/client/assets/NamePage-CYHYXhrs.js +1 -0
- package/dist/client/assets/{NotificationsPage-gmiItsT0.js → NotificationsPage-D3m6Jrm2.js} +1 -1
- package/dist/client/assets/PermissionsPage-CviWqCJ3.js +1 -0
- package/dist/client/assets/{PersonalityPopover-Dej6dI7y.js → PersonalityPopover-BN1CFq8D.js} +1 -1
- package/dist/client/assets/PhotoPage-ytqVZP3t.js +1 -0
- package/dist/client/assets/{RoomsPage-3_HuXajd.js → RoomsPage-CoZd-4Xe.js} +1 -1
- package/dist/client/assets/RunsOnPopover-91nKS6qj.js +1 -0
- package/dist/client/assets/SessionsPage-DDrQLNW-.js +6 -0
- package/dist/client/assets/SkillsPage-2H6QD77F.js +1 -0
- package/dist/client/assets/TasksPage-ocRUPiec.js +1 -0
- package/dist/client/assets/ToolsPage-q3wxIc3n.js +2 -0
- package/dist/client/assets/{TopologyGraph-C-BTnRXU.js → TopologyGraph-DeRqfLBW.js} +2 -2
- package/dist/client/assets/{agent-browser-DT3ABR4l.js → agent-browser-C7Q5muxI.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-CVFODbIg.js → highlighted-body-KPVGNVTW-CYowLe07.js} +1 -1
- package/dist/client/assets/{index-ClnyhFUL.js → index-1dt_mWBC.js} +1 -1
- package/dist/client/assets/{index-DiFG9bwF.js → index-34_CucI4.js} +1 -1
- package/dist/client/assets/{index-DGr90Ygi.js → index-6F4HxV-x.js} +1 -1
- package/dist/client/assets/{index-CgakJfik.js → index-B029XwR8.js} +1 -1
- package/dist/client/assets/index-B4TIVWAq.js +1668 -0
- package/dist/client/assets/index-BUcM96PD.css +1 -0
- package/dist/client/assets/{index-ClmokM0M.js → index-BX9en7bH.js} +1 -1
- package/dist/client/assets/{index-BZaMgVdg.js → index-BeqTVkgE.js} +1 -1
- package/dist/client/assets/index-BkFaL4dr.js +1 -0
- package/dist/client/assets/index-Bv_P5_tJ.js +1 -0
- package/dist/client/assets/{index-Dh-3NGE9.js → index-BwbRY8dK.js} +1 -1
- package/dist/client/assets/{index-B3P6TTvD.js → index-BzVyUKXW.js} +3 -3
- package/dist/client/assets/{index-B8oHvyN5.js → index-C0oow5Fn.js} +1 -1
- package/dist/client/assets/{index-DN8DYUEX.js → index-CCLVR1so.js} +1 -1
- package/dist/client/assets/{index-J8BMKg6y.js → index-CEw2JwVz.js} +1 -1
- package/dist/client/assets/{index-DIkpB_1y.js → index-CKHPMgwE.js} +1 -1
- package/dist/client/assets/{index-Dm6W0lml.js → index-CbxbAPgT.js} +1 -1
- package/dist/client/assets/{index-D_gnDrw3.js → index-Cm0G2vDh.js} +1 -1
- package/dist/client/assets/{index-DiFc1nSZ.js → index-CpZi173j.js} +1 -1
- package/dist/client/assets/index-CqfEH_t6.js +1 -0
- package/dist/client/assets/index-CuEwCZKH.js +17 -0
- package/dist/client/assets/{index-Cca_q1vW.js → index-CvQeke9n.js} +9 -9
- package/dist/client/assets/{index-BuU7EEtP.js → index-CxZB8Cqj.js} +1 -1
- package/dist/client/assets/{index-DjY4p5H5.js → index-D45q57-5.js} +1 -1
- package/dist/client/assets/{index-kzr7_3di.js → index-D8fmSjjO.js} +11 -11
- package/dist/client/assets/{index-W25uMuZA.js → index-DDagpuEn.js} +1 -1
- package/dist/client/assets/{index-DbsvSNI-.js → index-DT3ci-3h.js} +1 -1
- package/dist/client/assets/{index-nEQI8fB2.js → index-D_Pj9S7y.js} +1 -1
- package/dist/client/assets/{index-DF5k9E7k.js → index-Da-4WWcu.js} +1 -1
- package/dist/client/assets/{index-PrqHZbD1.js → index-DsRm4kZF.js} +1 -1
- package/dist/client/assets/{index-CaZw0EC7.js → index-GiEn7nQQ.js} +1 -1
- package/dist/client/assets/{index-ByCzVYkU.js → index-SGZRUhq4.js} +1 -1
- package/dist/client/assets/index-VLhj4QNP.js +1 -0
- package/dist/client/assets/index-otf5JgVx.js +1 -0
- package/dist/client/assets/{index-lciid4H8.js → index-qWahGPGi.js} +1 -1
- package/dist/client/assets/{index-BrgOWbRQ.js → index-sMuUIc_W.js} +2 -2
- package/dist/client/assets/{index-DgjZhEr3.js → index-snpaQsNQ.js} +1 -1
- package/dist/client/assets/room-files-source-C3tzeG6y.js +6 -0
- package/dist/client/assets/{soul-file-BHeAw6R9.js → soul-file-tc6-HkDy.js} +1 -1
- package/dist/client/assets/{use-personality-commit-DyJAMzzb.js → use-personality-commit-vpAu5T8A.js} +1 -1
- package/dist/client/index.html +6 -5
- package/dist/drizzle/0107_productive_peter_parker.sql +5 -0
- package/dist/drizzle/0108_magical_morph.sql +2 -0
- package/dist/drizzle/0109_aspiring_union_jack.sql +5 -0
- package/dist/drizzle/0110_ambiguous_wendigo.sql +1 -0
- package/dist/drizzle/0111_community_redaction_cursor.sql +11 -0
- package/dist/drizzle/0112_account_drop_issuer.sql +18 -0
- package/dist/drizzle/0113_room_departed_seats.sql +14 -0
- package/dist/drizzle/0114_schedule_account.sql +1 -0
- package/dist/drizzle/0115_furry_starjammers.sql +1 -0
- package/dist/drizzle/meta/0107_snapshot.json +8966 -0
- package/dist/drizzle/meta/0108_snapshot.json +8980 -0
- package/dist/drizzle/meta/0109_snapshot.json +8987 -0
- package/dist/drizzle/meta/0110_snapshot.json +8994 -0
- package/dist/drizzle/meta/0111_snapshot.json +9062 -0
- package/dist/drizzle/meta/0112_snapshot.json +9055 -0
- package/dist/drizzle/meta/0113_snapshot.json +9147 -0
- package/dist/drizzle/meta/0114_snapshot.json +9154 -0
- package/dist/drizzle/meta/0115_snapshot.json +9146 -0
- package/dist/drizzle/meta/_journal.json +63 -0
- package/dist/server/index.js +103645 -79264
- package/dist/server/index.js.map +2 -2
- package/package.json +7 -9
- package/dist/client/assets/CanvasFileContent-VogEwZeM.js +0 -2
- package/dist/client/assets/CanvasModel3dContent-DCTC7eOc.js +0 -2
- package/dist/client/assets/ConnectionAccessLists-Be1b30nn.js +0 -1
- package/dist/client/assets/ConnectionsPage-BVN7GiuC.js +0 -1
- package/dist/client/assets/HandlePage-DnzPN8N_.js +0 -1
- package/dist/client/assets/NamePage-DyWqRDIe.js +0 -1
- package/dist/client/assets/PhotoPage-GtCoB8dK.js +0 -1
- package/dist/client/assets/RunsOnPopover-DbSoBFaL.js +0 -1
- package/dist/client/assets/SessionsPage-Dc_lqBom.js +0 -6
- package/dist/client/assets/SkillsPage-C0qMUkgs.js +0 -1
- package/dist/client/assets/TasksPage-DvzTPDnw.js +0 -1
- package/dist/client/assets/ToolsPage-Cwc96TTa.js +0 -2
- package/dist/client/assets/index-BUxNND2H.js +0 -1
- package/dist/client/assets/index-C08DUVQ4.css +0 -1
- package/dist/client/assets/index-CGqPFWQw.js +0 -1
- package/dist/client/assets/index-CN1plkKF.js +0 -1
- package/dist/client/assets/index-CXWMnEDK.js +0 -1
- package/dist/client/assets/index-DDXrdlj0.js +0 -1648
- package/dist/client/assets/index-DEA1uIWn.js +0 -1
- package/dist/client/assets/index-PRwgIfzy.js +0 -7
- package/dist/client/assets/room-files-source-CSKgcbkn.js +0 -11
- package/dist/client/assets/use-mesh-update-BP_UXq60.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,f as l,j as e,a as m,g as u,C as c,M as x,H as f}from"./index-
|
|
1
|
+
import{e as d,f as l,j as e,a as m,g as u,C as c,M as x,H as f}from"./index-B4TIVWAq.js";function h({kind:s}){const r="text-muted-foreground size-3.5 shrink-0";return s==="dm"?e.jsx(x,{"aria-hidden":!0,className:r}):e.jsx(f,{"aria-hidden":!0,className:r})}function g(s){return s===1?"1 member":`${s} members`}function j({member:s}){var i;const r=d(),n=l(s.id);if(n.isPending)return e.jsx(m,{className:"h-16 w-full"});if(n.isError)return e.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this member’s rooms."});const a=((i=n.data)==null?void 0:i.rooms)??[];return a.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:[s.isSelf?"You are":`${s.displayName} is`," not in any rooms yet."]}):e.jsx("div",{className:"flex flex-col",children:a.map(t=>{const o=e.jsxs(e.Fragment,{children:[e.jsx(h,{kind:t.kind}),e.jsx("span",{className:"min-w-0 truncate text-sm",children:u({kind:t.kind,slug:t.slug,title:t.name})}),e.jsx("span",{className:"text-muted-foreground ml-auto shrink-0 text-xs",children:g(t.memberCount)})]});return r?e.jsxs("button",{type:"button","data-slot":"profile-room-row",onClick:()=>void r({to:"/channels",search:{id:t.id}}),className:"focus-ring hover:bg-muted/50 flex h-9 items-center gap-2 rounded-md px-2 text-left transition-colors",children:[o,e.jsx(c,{"aria-hidden":!0,className:"text-muted-foreground/70 size-3.5 shrink-0"})]},t.id):e.jsx("div",{"data-slot":"profile-room-row",className:"flex h-9 items-center gap-2 rounded-md px-2",children:o},t.id)})})}export{j as RoomsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as y,j as e,aN as ce,cp as de,J as ue,aj as j,cP as B,cQ as G,cR as J,cS as Z,cT as F,cU as fe,ad as me,ah as pe,cV as xe,cW as ee,cX as he,cY as te,cZ as be,c_ as je,c$ as Y,d0 as ge,d1 as ve,d2 as T,d3 as Ne,d4 as E,d5 as Se,d6 as se,aP as Ee,u as ye,a as Ce,d7 as ke,d8 as we,d9 as Ae,da as Te,db as Le,dc as Ie}from"./index-B4TIVWAq.js";const Pe={duration:.12,ease:"easeOut"},$e={type:"spring",stiffness:320,damping:28};function ae({isSetHere:a,serverDefault:l,onUseServerDefault:i,warning:r,className:n,"data-testid":d}){const[f,p]=y.useState(!1),o=a?"set here":`server default · ${l??"none"}`,s=a&&!!i,m=e.jsxs("span",{className:j("text-3xs inline-flex h-5 items-center gap-1 rounded-full px-2 leading-none whitespace-nowrap",r?B.warning:B.neutral,s&&"hover:bg-accent hover:text-accent-foreground transition-colors",n),"data-testid":d,children:[r&&e.jsx(ce,{className:"size-2.5 shrink-0","aria-hidden":!0}),e.jsx(de,{mode:"wait",initial:!1,children:e.jsx(ue.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0,transition:$e},exit:{opacity:0},transition:Pe,children:o},o)})]});return s?e.jsxs(G,{open:f,onOpenChange:p,children:[e.jsx(J,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":`Set here${r?`: ${r}`:""}`,children:m})}),e.jsxs(Z,{className:"w-64 p-2",align:"start",children:[e.jsx(F,{children:"Where this value comes from"}),r&&e.jsx("p",{className:j("px-2 pt-1 text-xs",fe.warning),children:r}),e.jsxs("button",{type:"button",onClick:()=>{i(),p(!1)},className:"hover:bg-accent mt-1 w-full rounded-md px-2 py-1.5 text-left text-sm transition-colors","data-testid":d?`${d}-reset`:void 0,children:["Use server default",l?e.jsxs("span",{className:"text-muted-foreground block text-xs",children:["currently ",l]}):e.jsx("span",{className:"text-muted-foreground block text-xs",children:"the runtime picks, nothing is set"})]})]})]}):r?e.jsx("span",{title:r,"aria-label":`${o}: ${r}`,children:m}):m}const _e=["agents"];function Me(a){const l=me(),i=pe();return xe({...a!=null&&a.errorLabel?{meta:{errorLabel:a.errorLabel}}:{},mutationFn:r=>l.updateMeshAgent(r.id,r.updates),onSuccess:()=>{i.invalidateQueries({queryKey:["mesh","agents"]})},onSettled:()=>{i.invalidateQueries({queryKey:_e})}})}const ne="text-muted-foreground text-3xs font-medium tracking-wider uppercase";function w({label:a,valueLabel:l,options:i,selected:r,isSetHere:n,serverDefault:d,warning:f,onSelect:p,onInherit:o,testId:s,showHeader:m=!0,className:C,describedBy:h}){const S=ee(),[b,c]=y.useState(!1);return e.jsxs("div",{className:j("space-y-1",C),children:[m&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:ne,children:a}),!S&&e.jsx(ae,{isSetHere:n,serverDefault:d,warning:f,onUseServerDefault:o,"data-testid":`${s}-chip`})]}),e.jsxs(G,{open:b,onOpenChange:c,children:[e.jsx(J,{asChild:!0,children:e.jsxs("button",{type:"button",className:"border-input hover:bg-accent flex h-8 w-full items-center gap-1 rounded-md border px-2 text-sm transition-colors",...h?{"aria-describedby":h}:{},"data-testid":s,children:[e.jsx("span",{className:j("truncate",f?"text-amber-700 dark:text-amber-400":n?"md:text-foreground text-amber-700 dark:text-amber-400":"md:text-foreground text-emerald-700 dark:text-emerald-400"),children:l}),e.jsx(Ee,{className:"text-muted-foreground ml-auto size-3.5 shrink-0"})]})}),e.jsxs(Z,{className:"w-64 p-1",align:"start",children:[e.jsx(F,{children:a}),e.jsx("div",{className:"max-h-72 overflow-y-auto",children:i.map(u=>e.jsxs("button",{type:"button","data-testid":`${s}-option-${u.value}`,onClick:()=>{p(u.value),c(!1)},className:j("hover:bg-accent w-full rounded-md px-2 py-1.5 text-left text-sm transition-colors",u.value===r&&"bg-accent"),children:[u.label,u.hint&&e.jsx("span",{className:"text-muted-foreground block text-xs",children:u.hint})]},u.value))}),e.jsx("button",{type:"button",onClick:()=>{o(),c(!1)},className:"hover:bg-accent border-border text-muted-foreground mt-1 w-full border-t px-2 py-2 text-left text-xs transition-colors","data-testid":`${s}-inherit`,children:d?`Using server default: ${d}. Tap to restore`:"Use server default: the runtime picks"})]})]})]})}function Oe({agent:a,onUpdate:l,className:i}){var Q,V,q,z,K,W;const r=ee(),{data:n}=he(),{data:d,isPending:f}=te(),p=((Q=n==null?void 0:n.executionDefaults)==null?void 0:Q.runtime)??"claude-code",o=a.runtime??p,s=(V=n==null?void 0:n.executionDefaults)==null?void 0:V.perRuntime.find(t=>t.runtime===o),{data:m}=be({runtime:o}),C=a.model!=null,h=a.effort!=null,S=(s==null?void 0:s.model)??null,b=a.model??S,c=b?(m??[]).find(t=>t.value===b):void 0,u=(s==null?void 0:s.supportsEffort)??((q=je(d,o))==null?void 0:q.supportsEffort),L=u===void 0&&f,I=u!==!1,P=c?c.supportsEffort??!1:void 0,g=(z=n==null?void 0:n.claudeCode)==null?void 0:z.accounts,x=g==null?void 0:g.flatMap(t=>t.id===null?[]:[{id:t.id,label:Y(t.path,g),path:t.path}]),v=a.account??null,$=v!==null,_=n!=null&&n.claudeCode?Y(n.claudeCode.resolvedAccount,g??[]):null,M=Me({errorLabel:"Couldn’t change this agent’s account"}),O=y.useCallback(t=>{M.mutate({id:a.id,updates:{account:t}})},[a.id,M]),le=ge({agent:{runtime:a.runtime,model:a.model,effort:a.effort,account:a.account},defaultRuntime:p,serverDefaultModel:S,knownModels:ve(m),knownAccounts:x,accountsUnavailable:(K=n==null?void 0:n.claudeCode)==null?void 0:K.accountsUnavailable,modelSupportsEffort:P,runtimeSupportsEffort:u,runtimeLabel:t=>T(t).label}),N=t=>{var X;return((X=le.breakages.find(ie=>t.includes(ie.kind)))==null?void 0:X.message)??null},k=!L&&I&&P!==!1,U=a.effort??(s==null?void 0:s.effort)??null,H=T(o).label,re=o==="claude-code"&&x!==void 0&&(x.length>1||$),oe=N(["account-unregistered"]),D=(m??[]).some(t=>t.unverified),R=y.useId();return e.jsxs("div",{className:j("grid grid-cols-2 gap-3",i),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{label:"Model",valueLabel:(c==null?void 0:c.displayName)??b??"Automatic",options:[...(m??[]).map(t=>({value:t.value,label:t.displayName,hint:t.description}))],selected:b,isSetHere:C,serverDefault:(s==null?void 0:s.model)??null,warning:N(["model-unavailable"]),onSelect:t=>l({model:t}),onInherit:()=>l({model:null}),testId:"agent-model-row",describedBy:D?R:void 0}),D&&e.jsx(Ne,{id:R})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:ne,children:"Effort"}),(!r||!k)&&(h||k)&&e.jsx(ae,{isSetHere:h,serverDefault:s!=null&&s.effort?E(s.effort):null,warning:N(["effort-unsupported-runtime","effort-unsupported-model"]),onUseServerDefault:()=>l({effort:null}),"data-testid":"agent-effort-row-chip"})]}),L?e.jsx(A,{testId:"agent-effort-pending",text:`Checking what ${H} supports`,warning:null}):I?k?e.jsx(w,{label:"Effort",valueLabel:E(U),options:Se.filter(t=>!(c!=null&&c.supportedEffortLevels)||c.supportedEffortLevels.includes(t)).map(t=>({value:t,label:E(t)})),selected:U,isSetHere:h,serverDefault:s!=null&&s.effort?E(s.effort):null,warning:null,showHeader:!1,onSelect:t=>l({effort:t}),onInherit:()=>l({effort:null}),testId:"agent-effort-row"}):e.jsx(A,{testId:"agent-effort-unsupported-model",text:"This model doesn’t take an effort setting",warning:N(["effort-unsupported-model"])}):e.jsx(A,{testId:"agent-effort-unsupported-runtime",text:`Not supported by ${H}`,warning:N(["effort-unsupported-runtime"])})]}),re&&e.jsx(w,{label:"Account",valueLabel:v!==null?((W=x==null?void 0:x.find(t=>t.id===v))==null?void 0:W.label)??v:_??"Default account",options:(x??[]).map(t=>({value:t.id,label:t.label,hint:se(t.path)})),selected:v,isSetHere:$,serverDefault:_,warning:oe,onSelect:t=>O(t),onInherit:()=>O(null),testId:"agent-account-row",className:"col-span-full"})]})}function A({text:a,warning:l,testId:i}){return e.jsxs("div",{className:"flex h-8 flex-col justify-center","data-testid":i,children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:a}),l&&e.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-400",children:l})]})}const Ue="text-muted-foreground text-3xs font-medium tracking-wider uppercase";function De({member:a}){const{agent:l,projectPath:i,isPending:r,update:n}=ye(a),{data:d}=te();if(r)return e.jsx(Ce,{className:"h-24 w-full"});if(!l)return e.jsx("p",{className:"text-muted-foreground p-1 text-sm",children:"Couldn’t read this agent’s settings."});const f=d?Object.keys(d.capabilities):[l.runtime],p=f.includes(l.runtime)?f:[l.runtime,...f];return e.jsxs("div",{className:"space-y-3 p-1","data-slot":"profile-runs-on",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:Ue,children:"Runtime"}),e.jsxs(ke,{value:l.runtime??"claude-code",onValueChange:o=>n({runtime:o}),children:[e.jsx(we,{className:"h-8 text-sm",responsive:!1,children:e.jsx(Ae,{})}),e.jsx(Te,{children:p.map(o=>e.jsx(Le,{value:o,responsive:!1,children:T(o).label},o))})]})]}),e.jsx(Oe,{agent:l,onUpdate:n,className:"grid-cols-1"}),i&&e.jsxs("div",{className:"text-muted-foreground flex min-w-0 items-center gap-1.5",children:[e.jsx(Ie,{"aria-hidden":!0,className:"size-3.5 shrink-0"}),e.jsx("span",{className:"min-w-0 truncate font-mono text-xs",children:se(i)})]})]})}export{De as RunsOnPopover};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{e6 as ae,ez as ne,eA as ie,ad as z,r as d,eB as re,eC as oe,eD as le,eE as ce,bg as P,eF as ue,m as de,eG as me,eH as xe,j as e,eI as pe,eJ as fe,eK as ge,eL as I,am as D,eM as he,eN as F,cp as ve,J as w,eO as je,eP as be,bF as C,d2 as ye,eQ as Ce,aj as S,eR as O,eS as Ne,cq as R,cr as M,cs as A,eT as V,aE as K,eU as _,eV as we,eW as B,aP as Se,eX as $,eY as G,eZ as T,e_ as ke,e$ as Re,f0 as Me,ax as Ae,f1 as Pe,ay as Te,az as Le,aA as Ie,aB as Ee,f2 as ze,e as De,ah as Fe,f3 as Oe,f4 as Ve,a as Ke,f5 as _e,I as Be,f6 as $e,f7 as Ge,f8 as qe,aY as Qe}from"./index-B4TIVWAq.js";/**
|
|
2
|
+
* @license lucide-react v1.47.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const q={name:"git-fork",size:24,node:[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]};q.node;const Q=ae(q);function We(){const t=ne(),s=ie(r=>r.contextReadings),a=z(),i=d.useMemo(()=>Array.from(new Set(t.map(r=>r.runtime))),[t]),n=d.useCallback(r=>{const u={};return i.forEach((c,f)=>{var m;const p=(m=r[f])==null?void 0:m.data;if(!p)return;const v={};for(const h of p)h.contextWindow!=null&&(v[h.value]=h.contextWindow);u[c]=v}),u},[i]),l=re({queries:i.map(r=>oe(a,{runtime:r})),combine:n});return d.useMemo(()=>{var u;const r={total:0,known:0,unknown:0,warning:0,critical:0,autoCompacted:0};for(const c of t){r.total+=1;const f=c.model?(u=l[c.runtime])==null?void 0:u[c.model]:void 0,p=le(c,{reading:s[c.id]??null,window:f});p.autoCompactedAt&&(r.autoCompacted+=1),p.status==="known"?(r.known+=1,p.severity==="warning"?r.warning+=1:p.severity==="critical"&&(r.critical+=1)):r.unknown+=1}return r},[t,s,l])}function He(t,s,a){return t&&s!==void 0&&!a}function W(t,s,a,i="borderLeftColor"){const n=ce()??!1,l=He(t,a,n);return d.useMemo(()=>!l||!a?{animate:void 0,transition:void 0,pulsing:!1}:{animate:{[i]:[s,a,s]},transition:{[i]:{duration:2,repeat:1/0,ease:"easeInOut"}},pulsing:!0},[l,s,a,i])}function H({value:t,onCommit:s,onEnd:a}){const[i,n]=d.useState(!1),[l,r]=d.useState(""),u=d.useRef(null),c=d.useRef(!1),f=P(t),p=P(s),v=P(a);d.useEffect(()=>{if(!i)return;c.current=!1;const o=requestAnimationFrame(()=>{var x,k;(x=u.current)==null||x.focus(),(k=u.current)==null||k.select()});return()=>cancelAnimationFrame(o)},[i]);const m=d.useCallback(()=>{var o;n(!1),(o=v.read())==null||o()},[v]),h=d.useCallback(()=>{r(f.read()),n(!0)},[f]),j=d.useCallback(()=>{if(c.current)return;c.current=!0,m();const o=l.trim();o.length===0||o===f.read()||p.read()(o)},[m,l,f,p]),b=d.useCallback(()=>{c.current=!0,m()},[m]),y=d.useCallback(o=>{o.key==="Enter"?(o.preventDefault(),j()):o.key==="Escape"&&(o.preventDefault(),b())},[j,b]);return{isRenaming:i,renameValue:l,setRenameValue:r,inputRef:u,start:h,commit:j,cancel:b,handleKeyDown:y}}function U(t){const s=ue(t.id,{enabled:!1,fallback:t.permissionMode})??t.permissionMode,a=de(t.runtime),i=a==null?void 0:a.permissionModes.values.find(l=>l.id===s),n=i?me(i):xe(s);return{permissionMode:s,isFullPower:n}}function Y({children:t,onRename:s,onFork:a}){return!s&&!a?e.jsx(e.Fragment,{children:t}):e.jsxs(pe,{children:[e.jsx(fe,{asChild:!0,children:t}),e.jsxs(ge,{className:"w-44",children:[s&&e.jsxs(I,{onClick:s,children:[e.jsx(D,{className:"mr-2 size-4"}),"Rename"]}),s&&a&&e.jsx(he,{}),a&&e.jsxs(I,{onClick:a,children:[e.jsx(Q,{className:"mr-2 size-4"}),"Fork session"]})]})]})}const N="font-mono select-all";function E(t){try{return new Date(t).toLocaleString([],{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function Ue({session:t,expanded:s,onFork:a,className:i}){var f;const{permissionMode:n,isFullPower:l}=U(t),r=l?"Full power":Ne(n),{nameFor:u}=F(),c=t.account?u(t.account):null;return e.jsx(ve,{initial:!1,children:s&&e.jsx(w.div,{variants:be,initial:"initial",animate:"animate",exit:"exit",transition:je,className:"relative z-10 overflow-hidden","data-slot":"session-details-panel",children:e.jsxs("div",{className:S("text-muted-foreground text-2xs mx-2 space-y-1.5 px-3 pt-2 pb-2",i),children:[e.jsx(C,{label:"Session ID",align:"start",copyValue:t.id,valueClassName:N,children:t.id}),e.jsx(C,{label:"Created",align:"start",valueClassName:N,children:E(t.createdAt)}),e.jsx(C,{label:"Updated",align:"start",valueClassName:N,children:E(t.updatedAt)}),e.jsx(C,{label:"Runtime",align:"start",valueClassName:N,children:ye(t.runtime).label}),c&&e.jsx(C,{label:"Account",align:"start",copyValue:t.account,valueClassName:N,children:c}),e.jsx(C,{label:"Origin",align:"start",valueClassName:N,children:t.originLabel??((f=Ce(t.origin))==null?void 0:f.label)??"You"}),e.jsx(C,{label:"Permissions",align:"start",valueClassName:S(N,l&&O.power),children:r}),a&&e.jsxs("button",{type:"button",onClick:p=>{p.stopPropagation(),a(t.id)},className:"hover:bg-secondary/80 text-muted-foreground/60 hover:text-muted-foreground mt-1 inline-flex items-center gap-1 rounded px-1.5 py-0.5 transition-colors duration-100","aria-label":"Fork session",children:[e.jsx(Q,{className:"size-(--size-icon-xs)"}),e.jsx("span",{children:"Fork"})]})]})})})}function J({account:t,className:s}){const{isMultiAccount:a,nameFor:i}=F();if(!t||!a)return null;const n=i(t);return e.jsxs(R,{children:[e.jsx(M,{asChild:!0,children:e.jsx("span",{"aria-label":`Account: ${n}`,className:S("text-3xs max-w-24 shrink-0 truncate",s),children:n})}),e.jsx(A,{side:"top",sideOffset:4,children:t})]})}function Ye({session:t,isActive:s,onClick:a,onFork:i,onRename:n,isNew:l=!1}){const[r,u]=d.useState(!1),{isRenaming:c,renameValue:f,setRenameValue:p,inputRef:v,start:m,commit:h,handleKeyDown:j}=H({value:t.title,onCommit:g=>n==null?void 0:n(t.id,g)}),{isFullPower:b}=U(t),y=V(6e4),o=d.useMemo(()=>K(t.updatedAt),[t.updatedAt,y]),x=_(t.id),k=d.useCallback(g=>{g.stopPropagation(),u(se=>!se)},[]),X=d.useCallback(g=>{g.stopPropagation(),m()},[m]),{animate:Z,transition:ee,initial:te,pulsing:L}=Xe({isNew:l,borderState:x});return e.jsx(R,{children:e.jsxs(w.div,{"data-testid":"session-row",initial:te,animate:Z,transition:ee,"data-pulsing":L?"true":"false",style:L?void 0:{borderLeftColor:x.color},className:S("group relative rounded-lg border-l-2 transition-colors duration-150",s?"text-foreground":"hover:bg-secondary/60"),children:[s&&e.jsx(w.div,{layoutId:"active-session-bg",className:"bg-secondary absolute inset-0 rounded-lg",transition:{type:"spring",stiffness:280,damping:32}}),e.jsx(Y,{onRename:n?m:void 0,onFork:i?()=>i(t.id):void 0,children:e.jsx(M,{asChild:!0,disabled:x.kind==="idle",children:e.jsxs(w.div,{role:"button",tabIndex:0,"aria-current":s?"page":void 0,"aria-label":`Session: ${T(t.title)}. ${x.label}.`,onClick:a,onKeyDown:g=>{c||(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),a())},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:30},className:"relative z-10 cursor-pointer px-3 py-2",children:[e.jsxs("div",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"min-w-0 flex-1",children:o}),e.jsxs("span",{className:"flex flex-shrink-0 items-center gap-1",children:[e.jsx(we,{session:t}),x.kind==="pendingApproval"&&e.jsx(B,{className:"size-(--size-icon-xs) text-amber-500","aria-label":"Awaiting your approval"}),b&&e.jsx(Je,{}),n&&!c&&e.jsx("button",{type:"button",onClick:X,className:"text-muted-foreground/60 hover:text-muted-foreground rounded p-0.5 opacity-0 transition-opacity duration-150 group-hover:opacity-100 focus-visible:opacity-100 max-md:p-1.5 max-md:opacity-100","aria-label":"Rename session",children:e.jsx(D,{className:"size-(--size-icon-xs)"})}),e.jsx("button",{type:"button",onClick:k,className:S("rounded p-0.5 transition-opacity duration-150 max-md:p-1.5",r?"text-muted-foreground opacity-100":"text-muted-foreground/60 hover:text-muted-foreground opacity-0 group-hover:opacity-100 focus-visible:opacity-100 max-md:opacity-100"),"aria-label":"Session details","aria-expanded":r,children:e.jsx(w.div,{animate:{rotate:r?180:0},transition:{type:"spring",stiffness:400,damping:30},children:e.jsx(Se,{className:"size-(--size-icon-sm)"})})})]})]}),c?e.jsx("input",{ref:v,autoFocus:!0,value:f,onChange:g=>p(g.target.value),onBlur:h,onKeyDown:j,onClick:g=>g.stopPropagation(),className:"bg-background text-foreground mt-0.5 w-full rounded border px-1 text-xs outline-none","aria-label":"Session title"}):e.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[e.jsx($,{origin:t.origin,label:t.originLabel,className:"text-muted-foreground/50"}),e.jsx(G,{type:t.runtime,model:t.model,className:"text-muted-foreground/50"}),e.jsx(J,{account:t.account,className:"text-muted-foreground/60"}),e.jsx("div",{className:"text-muted-foreground/70 min-w-0 flex-1 truncate text-xs",title:n?"Click the pencil icon to rename":void 0,children:T(t.title)})]})]})})}),e.jsx(A,{side:"right",sideOffset:8,children:x.label}),e.jsx(Ue,{session:t,expanded:r,className:"border-border/30 border-t",...i?{onFork:i}:{}})]})})}function Je(){return e.jsxs(R,{children:[e.jsx(M,{asChild:!0,children:e.jsx("button",{type:"button",className:"inline-flex cursor-help","aria-label":ke,onClick:t=>t.stopPropagation(),children:e.jsx(Re,{className:`size-(--size-icon-xs) ${O.power}`})})}),e.jsx(A,{side:"top",sideOffset:4,children:"This chat runs commands without stopping for approval."})]})}function Xe({isNew:t,borderState:s}){const{animate:a,transition:i,pulsing:n}=W(s.pulse,s.color,s.dimColor);return d.useMemo(()=>{if(!(t||n))return{initial:void 0,animate:void 0,transition:void 0,pulsing:n};const r={...t?{opacity:1,y:0}:{},...a},u={...t?{opacity:{duration:.2,ease:[0,0,.2,1]},y:{duration:.2,ease:[0,0,.2,1]}}:{},...i};return{initial:t?{opacity:0,y:-8}:void 0,animate:r,transition:u,pulsing:n}},[t,n,a,i])}function Ze({session:t,isActive:s,onClick:a,onFork:i,onRename:n}){const{isRenaming:l,renameValue:r,setRenameValue:u,inputRef:c,start:f,commit:p,handleKeyDown:v}=H({value:t.title,onCommit:x=>n==null?void 0:n(t.id,x)}),m=_(t.id),h=V(6e4),j=d.useMemo(()=>K(t.updatedAt),[t.updatedAt,h]),{animate:b,transition:y,pulsing:o}=W(m.pulse,m.color,m.dimColor,"backgroundColor");return e.jsxs(R,{children:[e.jsx(Y,{onRename:n?f:void 0,onFork:i?()=>i(t.id):void 0,children:e.jsx(M,{asChild:!0,children:e.jsxs("button",{type:"button","data-testid":"session-row",onClick:a,className:S("flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-xs",Me,s?"bg-secondary text-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[e.jsx(w.span,{"aria-hidden":!0,"data-pulsing":o?"true":"false",animate:b,transition:y,style:o?void 0:{backgroundColor:m.color},className:"size-1.5 shrink-0 rounded-full"}),l?e.jsx("input",{ref:c,autoFocus:!0,value:r,onChange:x=>u(x.target.value),onBlur:p,onKeyDown:v,onClick:x=>x.stopPropagation(),className:"bg-background text-foreground min-w-0 flex-1 rounded border px-1 text-xs outline-none","aria-label":"Session title"}):e.jsx("span",{className:"min-w-0 flex-1 truncate",children:T(t.title)}),e.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[m.kind==="pendingApproval"&&e.jsx(B,{className:"size-(--size-icon-xs) text-amber-500","aria-label":"Awaiting approval"}),e.jsx($,{origin:t.origin,label:t.originLabel,className:"text-muted-foreground/50"}),e.jsx(G,{type:t.runtime,model:t.model,className:"text-muted-foreground/50"}),e.jsx(J,{account:t.account,className:"text-muted-foreground/60"}),e.jsx("span",{className:"text-muted-foreground/60 text-3xs",children:j})]})]})})}),m.kind!=="idle"&&e.jsx(A,{side:"right",sideOffset:8,children:m.label})]})}function et({variant:t,session:s,isActive:a,onClick:i,onFork:n,onRename:l,isNew:r}){return t==="compact"?e.jsx(Ze,{session:s,isActive:a,onClick:i,onFork:n,onRename:l}):e.jsx(Ye,{session:s,isActive:a,onClick:i,onFork:n,onRename:l,isNew:r})}function tt(){const{known:t,warning:s,critical:a,autoCompacted:i}=We(),n=s+a;if(t===0&&n===0&&i===0)return null;const l=n>0||i>0,r=l?a>0?"bg-red-500":n>0?"bg-amber-500":"bg-muted-foreground/40":"bg-emerald-500",u=l?[n>0?`${n} near full`:null,i>0?`${i} auto-compacted`:null].filter(Boolean).join(" · "):"All sessions have room.";return e.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 border-b px-3 py-1.5 text-xs","data-testid":"fleet-context-bar",children:[e.jsx("span",{className:`size-2 shrink-0 rounded-full ${r}`,"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:u})]})}function st({activeSessionId:t,groupedSessions:s,onSessionClick:a,onForkSession:i,onRenameSession:n}){const l=d.useId();return e.jsxs(Ae,{type:"scroll",className:"h-full",viewportClassName:"[&>div]:!block",children:[e.jsx(tt,{}),e.jsx(w.div,{layout:!0,children:e.jsx(Pe,{id:l,children:s.length>0?e.jsx(e.Fragment,{children:s.map(r=>{const u=s.length===1&&r.label==="Today";return e.jsxs(Te,{children:[!u&&e.jsx(Le,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:r.label}),e.jsx(Ie,{children:r.sessions.map(c=>e.jsx(Ee,{children:e.jsx(et,{variant:"full",session:c,isActive:c.id===t,onClick:()=>a(c.id),onFork:i,onRename:n})},c.id))})]},r.label)})}):e.jsx("div",{className:"flex h-32 items-center justify-center",children:e.jsx("p",{className:"text-muted-foreground/60 text-sm",children:"No conversations yet"})})})})]})}function at(t,s){return s===""?!0:(t.title??"").toLowerCase().includes(s)}function it({member:t}){var y;const s=((y=t.agent)==null?void 0:y.projectPath)??null,{sessions:a,isLoading:i,isError:n,activeSessionId:l}=ze(s),r=De(),u=z(),c=Fe(),f=Oe(s),[p,v]=d.useState(""),m=p.trim().toLowerCase(),h=d.useMemo(()=>Ve(a.filter(o=>at(o,m))),[a,m]);function j(o){!r||s===null||($e.getState().recordOpened("agent",s),r(Ge({dir:s,session:o})))}async function b(o){try{const x=await u.forkSession(o,void 0,s??void 0);await c.invalidateQueries({queryKey:qe.listRoot}),j(x.id)}catch(x){Qe.error("Couldn’t branch off this conversation.",{description:x instanceof Error?x.message:"The original is untouched."})}}return i?e.jsx(Ke,{className:"h-16 w-full"}):n?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Couldn’t read ",t.displayName,"’s conversations."]}):a.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["No conversations yet. ",t.displayName," starts one the first time you message it."]}):e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsx(_e,{"aria-hidden":!0,className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2"}),e.jsx(Be,{value:p,onChange:o=>v(o.target.value),placeholder:"Search conversations","aria-label":"Search conversations",className:"h-8 pl-7 text-sm"})]}),h.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["No conversation matches “",p.trim(),"”."]}):e.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:e.jsx(st,{activeSessionId:l,groupedSessions:h,onSessionClick:j,onForkSession:o=>void b(o),onRenameSession:(o,x)=>f.mutate({sessionId:o,title:x})})})]})}export{it as SessionsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ad as b,ag as B,eq as p,er as g,ah as w,cV as A,aY as z,es as M,j as e,et as O,r as d,aP as E,aj as N,B as j,aN as I,cP as y,eu as C,dI as q,dJ as K,dK as W,dL as Q,dM as U,dN as Y,dO as G,dP as J,e as H,ev as R,ew as V,aR as X,a as $,ex as Z,ey as L,W as P}from"./index-B4TIVWAq.js";function D(s){const t=b();return B({queryKey:p.status(s),queryFn:()=>t.getHarnessStatus(s),staleTime:3e4,refetchOnMount:"always"})}const ee={native:"reads it",projected:"shared",drifted:"out of date",dropped:"can’t see it",warned:"may not work",conflict:"blocked","pending-approval":"needs your OK"},se={native:"neutral",projected:"neutral",drifted:"info",dropped:"muted",warned:"warning",conflict:"warning","pending-approval":"warning"},k="\0",te=new Set(["native","projected"]);function _(s){return`${s.scope??"project"}${k}${s.artifact}${k}${s.source??""}${k}${s.name}`}function ne(s,t){return`${g[s]} ${ee[t]}`}function ae(s){return s.reason??s.target}function T(s,t){return t.flatMap(n=>{const a=s.cells[n];return a===void 0?[]:[{harness:n,cell:a}]})}function re(s,t){if(t.length===0)return!1;const n=T(s,t);return n.length===t.length&&n.every(({cell:a})=>{var r;return te.has(a.state)&&!((r=a.warnings)!=null&&r.length)})}function S(s){return`${s} ${s===1?"file":"files"}`}function le(s){return s===1?"One package is waiting for your approval.":`${s} packages are waiting for your approval.`}function ie(s){return`Shared with all ${s}`}function oe(s){return s===1?"1 agent file":`${s} agent files`}function ce(s){return`Every agent file ${s} cannot see — skills, rules, commands and more.`}function de(s){return s===1?"1 entry":`${s} entries`}function ue(s,t){return t.flatMap(n=>{const a=s.flatMap(r=>{const l=r.cells[n];return l===void 0||l.state!=="dropped"?[]:[{key:_(r),artifact:r.artifact,name:r.name,...l.reason===void 0?{}:{reason:l.reason}}]});return a.length===0?[]:[{harness:n,label:g[n],entries:a}]})}const xe={drop:"Not shared",warning:"Could not read",write:"Will be written",notice:"Notice"};function fe(s){return`${xe[s.kind]} · ${s.artifact} ${s.name}`}function me(s){const t=b(),n=w();return A({mutationFn:()=>t.syncHarness(s),meta:{errorLabel:"Couldn’t share your agent files"},onSuccess:a=>{n.setQueryData(p.status(s),a.status),z.success("Agent files updated.")}})}function he(s){const t=w();M("approval_resolved",()=>{t.invalidateQueries({queryKey:p.status(s)})})}function pe({result:s,onDismiss:t}){const{applied:n,removals:a,askedAbout:r}=s;return e.jsx(O,{variant:"neutral",onDismiss:t,dismissLabel:"Dismiss what changed","data-slot":"harness-sync-summary",children:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("p",{children:[e.jsx("span",{className:"font-medium",children:"Agent files updated."}),n>0&&e.jsxs(e.Fragment,{children:[" ",S(n)," written."]})]}),a.length>0&&e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs("p",{className:"font-medium",children:["Removed ",S(a.length)," DorkOS put here:"]}),e.jsx("ul",{className:"flex flex-col gap-0.5",children:a.map(({path:l,reason:c})=>e.jsxs("li",{className:"text-3xs flex flex-col",children:[e.jsx("code",{className:"font-mono",children:l}),e.jsx("span",{className:"opacity-80",children:c})]},l))})]}),r.length>0&&e.jsx("p",{children:le(r.length)})]})})}function ge(s){const{counts:t,sweepPreview:n}=s;return t.drifted>0||n.length>0?{message:"Some agent files are out of date.",variant:n.length>0?"warning":"info",actionable:!0}:t.conflicts>0?{message:"DorkOS can’t update some files. Something else is in the way.",variant:"warning",actionable:!1}:t.adoptable>0?{message:"Some skills live where only a few of your agents look.",variant:"info",actionable:!1}:null}function je({projectPath:s}){return he(s),null}function ve({projectPath:s}){const{data:t}=D(s),n=me(s),[a,r]=d.useState(!1),[l,c]=d.useState(!1);if(t===void 0||t.state!=="ready")return null;const u=e.jsx(je,{projectPath:s});if(n.data!==void 0&&!l)return e.jsxs(e.Fragment,{children:[u,e.jsx(pe,{result:n.data,onDismiss:()=>c(!0)})]});const o=ge(t);if(o===null)return u;const{removals:x,sweepPreview:m}=t,i=m.length;return e.jsxs(e.Fragment,{children:[u,e.jsx(O,{variant:o.variant,"data-slot":"harness-drift-banner",detailsOpen:a,details:i===0?void 0:e.jsx("ul",{className:"flex flex-col gap-0.5",children:x.map(({path:f,reason:v})=>e.jsxs("li",{className:"text-3xs flex flex-col",children:[e.jsx("code",{className:"font-mono",children:f}),e.jsx("span",{className:"opacity-80",children:v})]},f))}),actions:o.actionable?e.jsx(j,{size:"sm",variant:"outline",className:"h-6 text-xs",disabled:n.isPending,onClick:()=>{c(!1),n.mutate()},children:n.isPending?"Syncing…":"Sync now"}):void 0,children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("p",{children:o.message}),i>0&&e.jsxs("button",{type:"button","aria-expanded":a,onClick:()=>r(f=>!f),className:"text-3xs flex w-fit items-center gap-1 underline underline-offset-2 opacity-90 hover:opacity-100",children:["Syncing also removes ",S(i)," DorkOS put here",e.jsx(E,{"aria-hidden":!0,className:N("size-3 transition-transform",a&&"rotate-180")})]})]})})]})}function Ne(s){const t=b(),n=w();return A({mutationFn:a=>t.adoptHarness(s,a),meta:{errorLabel:"Couldn’t move that skill"},onSuccess:a=>{n.setQueryData(p.status(s),a.status),n.setQueriesData({queryKey:p.all,predicate:r=>{var l;return((l=r.state.data)==null?void 0:l.projectPath)===a.status.projectPath}},a.status)}})}const ye={neutral:y.neutral,info:y.info,warning:y.warning,muted:"border border-dashed border-border text-muted-foreground"};function ke({harness:s,cell:t}){var l;const n=ne(s,t.state),a=ae(t),r=(l=t.warnings)!=null&&l.length?t.warnings.join(" · "):void 0;return e.jsxs("li",{"aria-label":n,...a===void 0?{}:{title:a},className:N("text-3xs inline-flex items-center gap-1 rounded-full px-2 py-0.5 leading-tight",ye[se[t.state]]),children:[n,r!==void 0&&e.jsx("span",{role:"img","aria-label":"May not work",title:r,className:"inline-flex",children:e.jsx(I,{"aria-hidden":!0,className:"text-status-warning-fg size-2.5"})})]})}function Se(s){const t=s===void 0?-1:s.lastIndexOf("/"),n=t>0?s==null?void 0:s.slice(0,t):void 0;return n===void 0?"Lives where only some of your agents look. Move it to .agents/skills so every agent can read it.":`Lives in ${n}. Move it to .agents/skills so every agent can read it.`}function be(s,t){return`dorkos harness adopt ${s} --project ${t}`}const we="Share with every agent";function Ce(s,t,n){const a=`It moves from ${t} to .agents/skills/${s}`;return n?`${a}, and DorkOS leaves a link behind so Claude Code still finds it.`:`${a}, where every agent reads it.`}const De="for all your projects";function $e({row:s,enabled:t,projectPath:n,showEveryHarness:a}){var v;const[r,l]=d.useState(!1),[c,u]=d.useState(!1),o=Ne(n),x=T(s,t),m=re(s,t)&&!a,i=m&&!r,f=(v=o.data)==null?void 0:v.refusals[0];return e.jsxs("div",{role:"group","aria-label":s.name,className:"flex flex-col gap-1 py-1.5",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"min-w-0 shrink truncate text-xs font-medium",children:s.name}),s.scope==="global"&&e.jsx("span",{className:"text-muted-foreground text-3xs shrink-0",children:De}),s.source!==void 0&&e.jsx("span",{dir:"rtl",title:s.source,className:"text-muted-foreground text-3xs ml-auto min-w-0 truncate text-left font-mono",children:e.jsx("bdi",{dir:"ltr",children:s.source})})]}),e.jsxs("ul",{"aria-label":"Agent tools",className:"flex flex-wrap items-center gap-1",children:[m&&e.jsx("li",{children:e.jsxs("button",{type:"button","aria-expanded":!i,title:x.map(({harness:h})=>g[h]).join(" · "),onClick:()=>l(h=>!h),className:"bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground text-3xs focus-visible:ring-ring inline-flex items-center gap-1 rounded-full px-2 py-0.5 leading-tight transition-colors focus-visible:ring-2 focus-visible:outline-none",children:[ie(x.length),e.jsx(E,{"aria-hidden":!0,className:N("size-2.5 transition-transform",i&&"-rotate-90")})]})}),!i&&x.map(({harness:h,cell:F})=>e.jsx(ke,{harness:h,cell:F},h))]}),s.adoptable&&e.jsxs(e.Fragment,{children:[e.jsx("p",{role:"status","aria-live":"polite",className:"text-muted-foreground text-3xs",children:(f==null?void 0:f.reason)||Se(s.source)}),e.jsxs("p",{className:"text-muted-foreground text-3xs",children:["Run: ",e.jsx(C,{children:be(s.name,n)})]}),e.jsx("div",{children:e.jsx(j,{size:"sm",variant:"outline",className:"h-6 text-xs",disabled:o.isPending,onClick:()=>u(!0),children:we})}),e.jsx(q,{open:c,onOpenChange:u,children:e.jsxs(K,{children:[e.jsxs(W,{children:[e.jsxs(Q,{children:["Move ",s.name," so every agent can read it?"]}),e.jsx(U,{children:Ce(s.name,s.source??"",t.includes("claude-code"))})]}),e.jsxs(Y,{children:[e.jsx(G,{children:"Cancel"}),e.jsx(J,{onClick:()=>o.mutate(s.name),children:"Move it"})]})]})})]})]})}const Ae="https://dorkos.ai/docs/guides/cli-usage#agent-files";function Oe(){return e.jsxs(e.Fragment,{children:[e.jsx("span",{role:"status",className:"sr-only",children:"Loading skills…"}),e.jsx("div",{"aria-hidden":!0,className:"flex flex-col gap-3 py-1",children:[0,1,2].map(s=>e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx($,{className:"h-3 w-32"}),e.jsx($,{className:"h-3 w-48"})]},s))})]})}function Ee({projectPath:s,showBrowseLink:t=!0}){const{data:n,isPending:a,error:r,refetch:l}=D(s),[c,u]=d.useState(!1),o=d.useId(),x=H();if(a)return e.jsx(Oe,{});if(r)return e.jsxs("div",{className:"flex items-center gap-2 py-2",children:[e.jsx("p",{className:"text-destructive text-xs",children:"Couldn’t load skills."}),e.jsx(j,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>void l(),children:"Retry"})]});if(n.state!=="ready")return e.jsx(He,{status:n});const m=n.rows.filter(i=>i.artifact==="skill");return m.length===0?e.jsxs("div",{className:"flex flex-col items-start gap-1 py-2",children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:"No skills here yet."}),t&&x&&e.jsxs(j,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground h-6 px-1 text-xs",onClick:()=>void x({to:"/marketplace",search:{type:"skill-pack"}}),children:[e.jsx(R,{"aria-hidden":!0,className:"mr-1.5 size-3.5"}),"Browse skill-packs"]})]}):e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 pb-1",children:[e.jsx(V,{htmlFor:o,className:"text-muted-foreground text-3xs",children:"Show every agent tool"}),e.jsx(X,{id:o,size:"sm",checked:c,onCheckedChange:u})]}),e.jsx("div",{className:"divide-border divide-y",children:m.map(i=>e.jsx($e,{row:i,enabled:n.enabled,projectPath:n.projectPath,showEveryHarness:c},_(i)))})]})}function He({status:s}){return s.state==="not-set-up"?e.jsxs("div",{className:"flex flex-col gap-1 py-2",children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:"DorkOS isn’t sharing agent files for this folder yet."}),e.jsxs("p",{className:"text-muted-foreground text-3xs",children:["Run ",e.jsx(C,{children:"dorkos harness sync --fix"})," in this folder to set it up."]}),e.jsx(Z,{href:Ae,className:"text-3xs text-muted-foreground hover:text-foreground underline underline-offset-2",children:"How agent file sharing works"})]}):s.state==="unreadable"?e.jsxs("div",{className:"flex flex-col gap-1 py-2",children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:"DorkOS can’t read this folder’s agent file settings."}),s.detail!==void 0&&e.jsx("p",{className:"text-muted-foreground text-3xs",children:s.detail})]}):e.jsx("p",{className:"text-muted-foreground py-2 text-xs",children:"Agent file sharing runs in the DorkOS app."})}function Re({group:s}){const[t,n]=d.useState(!1);return e.jsxs(L,{open:t,onOpenChange:n,trigger:e.jsxs("span",{className:"text-xs",children:["Not shared with ",s.label]}),badge:e.jsx(P,{variant:"secondary",size:"xs",className:"whitespace-nowrap",children:oe(s.entries.length)}),children:[e.jsx("p",{className:"text-muted-foreground text-3xs px-4 pt-3",children:ce(s.label)}),e.jsx("ul",{className:"space-y-2 px-4 pt-2 pb-3",children:s.entries.map(a=>e.jsxs("li",{className:"flex flex-col gap-0.5",children:[e.jsxs("span",{className:"text-3xs font-medium",children:[a.artifact," ",a.name]}),a.reason!==void 0&&e.jsx("span",{className:"text-muted-foreground text-3xs",children:a.reason})]},a.key))})]})}function Le({rows:s,enabled:t}){const n=ue(s,t);return n.length===0?null:e.jsx("div",{className:"flex flex-col gap-1.5",children:n.map(a=>e.jsx(Re,{group:a},a.harness))})}function Pe({entries:s}){const[t,n]=d.useState(!1);return s.length===0?null:e.jsx(L,{open:t,onOpenChange:n,trigger:e.jsx("span",{className:"text-xs",children:"Project-level notices"}),badge:e.jsx(P,{variant:"secondary",size:"xs",className:"whitespace-nowrap",children:de(s.length)}),children:e.jsx("ul",{className:"space-y-2 px-4 pb-3",children:s.map(a=>e.jsxs("li",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:N("text-3xs font-medium",a.kind==="notice"&&"text-muted-foreground font-normal"),children:fe(a)}),e.jsx("span",{className:"text-muted-foreground text-3xs",children:a.reason})]},`${a.kind} ${a.artifact} ${a.source??""} ${a.name}`))})})}function _e({command:s}){return e.jsx(C,{className:"break-normal",children:s.split(" ").map((t,n)=>e.jsxs(d.Fragment,{children:[n>0&&" ",e.jsx("span",{className:"whitespace-nowrap",children:t})]},`${n}-${t}`))})}function Te({notEnabled:s}){return s.length===0?null:e.jsx("div",{className:"flex flex-col gap-1.5 py-1",children:s.map(({harness:t,why:n,signal:a})=>e.jsxs("div",{title:a,className:"flex flex-col gap-0.5",children:[e.jsx("p",{className:"text-xs font-medium",children:n==="dorkos-runtime"?`DorkOS runs ${g[t]} here, but this folder isn’t sharing to it.`:`${g[t]} files are in this folder, but DorkOS isn’t sharing to it.`}),e.jsxs("p",{className:"text-muted-foreground text-3xs",children:["Run ",e.jsx(_e,{command:`dorkos harness sync --fix --enable ${t}`})," in this folder to turn it on."]})]},t))})}function Fe({projectPath:s}){const t=H(),{data:n}=D(s),a=(n==null?void 0:n.state)==="ready"?n:null;return e.jsxs("div",{className:"flex flex-col gap-2","data-slot":"profile-skills",children:[e.jsx(ve,{projectPath:s}),a&&e.jsx(Te,{notEnabled:a.notEnabled}),e.jsx(Ee,{projectPath:s,showBrowseLink:!1}),a&&e.jsx(Le,{rows:a.rows,enabled:a.enabled}),a&&e.jsx(Pe,{entries:a.projectLevel}),t&&e.jsxs(j,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground w-full",onClick:()=>void t({to:"/marketplace",search:{type:"skill-pack"}}),children:[e.jsx(R,{"aria-hidden":!0,className:"mr-1.5 size-3.5"}),"Browse skill-packs"]})]})}function ze({member:s}){var n;const t=((n=s.agent)==null?void 0:n.projectPath)??null;return t===null?e.jsx("p",{className:"text-muted-foreground text-sm",children:"This agent’s folder isn’t known here."}):e.jsx(Fe,{projectPath:t})}export{ze as SkillsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aq as F,ae as w,ar as U,as as D,at as L,au as B,av as G,r as o,j as e,aw as $,ax as O,ay as p,az as f,aA as j,aB as g,aC as k,aD as E,aE as N,aF as P,aG as X,aH as _,aI as q,aJ as H,aK as J,aL as K}from"./index-B4TIVWAq.js";const V=5;function W({status:t}){switch(t){case"running":return e.jsx(E,{size:"xs",className:"text-status-info shrink-0"});case"completed":return e.jsx(J,{className:"size-3 shrink-0 text-green-500","aria-hidden":!0});case"failed":return e.jsx(H,{className:"text-destructive size-3 shrink-0","aria-hidden":!0});case"cancelled":return e.jsx(q,{className:"text-muted-foreground size-3 shrink-0","aria-hidden":!0});case"skipped":return e.jsx(_,{className:"text-muted-foreground size-3 shrink-0","aria-hidden":!0});case"blocked":return e.jsx(X,{className:"text-status-warning-dot size-3 shrink-0","aria-hidden":!0});default:return null}}function Q(t){if(t===null)return"";if(t<1e3)return"< 1s";const n=Math.floor(t/1e3);if(n<60)return`${n}s`;const a=Math.floor(n/60),i=n%60;return`${a}m ${i}s`}function Y({run:t,scheduleName:n}){return e.jsx(g,{children:e.jsxs(k,{className:"text-sm",children:[e.jsx(E,{size:"xs",className:"text-status-info shrink-0"}),e.jsx("span",{className:"truncate",children:n}),t.startedAt&&e.jsx("span",{className:"text-muted-foreground/50 ml-auto shrink-0 text-xs",children:N(t.startedAt)})]})})}function Z({schedule:t,onEdit:n}){return e.jsx(g,{children:e.jsxs(k,{onClick:()=>n(t.id),className:"text-sm",children:[e.jsx(P,{className:"text-muted-foreground/50 size-3 shrink-0","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:t.name}),t.nextRun&&e.jsx("span",{className:"text-muted-foreground/50 ml-auto shrink-0 text-xs",children:N(t.nextRun)})]})})}function ee({run:t,scheduleName:n}){const a=t.status==="running"&&t.finishedAt?t.error?"failed":"completed":t.status;return e.jsx(g,{children:e.jsxs(k,{className:"text-sm",children:[e.jsx(W,{status:a}),e.jsx("span",{className:"truncate",children:n}),e.jsxs("span",{className:"text-muted-foreground/50 ml-auto flex shrink-0 items-center gap-1.5 text-xs",children:[t.durationMs!==null&&e.jsx("span",{children:Q(t.durationMs)}),t.finishedAt&&e.jsx("span",{children:N(t.finishedAt)})]})]})})}function se({available:t,agentId:n}){const a=F(),i=w(s=>s.setTasksAgentFilter),R=w(s=>s.setTasksEditScheduleId),u=t,{data:x=[]}=U(u),{data:I=0}=D(u),{data:T=[]}=L(void 0,u),{data:S=[]}=B(),{openWithTemplate:y}=G(),v=[S[0],S[2]].filter(Boolean),l=o.useMemo(()=>n?x.filter(s=>s.agentId===n):x,[n,x]),d=o.useMemo(()=>{const s=new Map;for(const r of l)s.set(r.id,r.name);return s},[l]),A=o.useMemo(()=>T.filter(s=>d.has(s.scheduleId)),[T,d]),{runningRuns:b,recentRuns:C}=o.useMemo(()=>{const s=[],r=[];for(const c of A)c.finishedAt!=null||c.status!=="running"?r.push(c):s.push(c);return r.sort((c,h)=>(h.finishedAt??h.createdAt).localeCompare(c.finishedAt??c.createdAt)),{runningRuns:s,recentRuns:r.slice(0,V)}},[A]),M=o.useMemo(()=>l.filter(s=>s.enabled&&s.status==="active"&&s.nextRun).sort((s,r)=>(s.nextRun??"").localeCompare(r.nextRun??"")),[l]),m=()=>{n&&(i(n),R(null)),a.open()},z=s=>{R(s),i(null),a.open()};return l.length===0?e.jsxs("div",{className:"flex flex-col gap-3 px-3 py-4",children:[e.jsx("p",{className:"text-muted-foreground/70 text-xs",children:"No schedules yet."}),v.length>0&&e.jsx("div",{className:"space-y-2",children:v.map(s=>e.jsxs("div",{className:"rounded-lg border p-3 text-sm",children:[e.jsx("div",{className:"font-medium",children:s.name}),e.jsx("p",{className:"text-muted-foreground text-xs",children:$(s.cron)}),e.jsx("button",{type:"button",onClick:()=>{y(s),m()},className:"text-primary mt-2 text-xs hover:underline",children:"+ Use preset"})]},s.id))}),e.jsx("button",{onClick:m,className:"text-muted-foreground hover:text-foreground text-xs transition-colors",children:"Open Schedules →"})]}):e.jsx(O,{type:"scroll",className:"h-full",children:e.jsxs("div",{className:"pr-1",children:[b.length>0&&e.jsxs(p,{children:[e.jsxs(f,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:["Running",e.jsx("span",{className:"text-muted-foreground/50 ml-auto text-xs font-normal normal-case",children:I})]}),e.jsx(j,{children:b.map(s=>e.jsx(Y,{run:s,scheduleName:d.get(s.scheduleId)??"Unknown"},s.id))})]}),M.length>0&&e.jsxs(p,{children:[e.jsx(f,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:"Upcoming"}),e.jsx(j,{children:M.map(s=>e.jsx(Z,{schedule:s,onEdit:z},s.id))})]}),C.length>0&&e.jsxs(p,{children:[e.jsx(f,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:"Recent Runs"}),e.jsx(j,{children:C.map(s=>e.jsx(ee,{run:s,scheduleName:d.get(s.scheduleId)??"Unknown"},s.id))})]}),e.jsx("div",{className:"px-3 py-2",children:e.jsx("button",{onClick:m,className:"text-muted-foreground hover:text-foreground text-xs transition-colors",children:"Open Schedules →"})})]})})}function ne({member:t}){var i;const n=K(),a=((i=t.agent)==null?void 0:i.manifestId)??null;return e.jsx("div",{className:"min-h-0 flex-1","data-slot":"profile-tasks",children:e.jsx(se,{available:n,agentId:a})})}export{ne as TasksPage};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ad as G,ag as Fe,cV as se,ah as ge,fL as De,fM as pe,r as l,j as n,cv as F,cw as D,fN as fe,B as f,P as xe,fO as te,ew as L,I as Q,d7 as Le,d8 as _e,d9 as $e,da as Ke,db as Be,fP as ce,bC as Ue,fQ as Ve,C as X,aj as le,fR as ae,cq as ve,cr as je,W as qe,cs as Ne,bF as _,aQ as He,fS as de,aD as ee,dz as Ye,dA as Qe,dB as We,dC as Ge,dD as J,ak as Ze,dF as Je,aR as Xe,fT as en,fd as nn,fU as sn,fV as tn,m as an,a as ne,fW as rn,u as on}from"./index-B4TIVWAq.js";import{a as cn}from"./agent-browser-C7Q5muxI.js";function ln(e,s){const t=G();return Fe({queryKey:["mcp-config",e,s??null],queryFn:()=>t.getMcpConfig(e,{runtime:s??void 0}),enabled:!!e,staleTime:3e4})}function be(e,s){e.invalidateQueries({queryKey:De.mcpServers(s)}),e.invalidateQueries({queryKey:["mcp-config"]})}function Se(e){const s=G(),t=ge();return se({mutationFn:async({input:i,approval:a})=>a?(await s.grantApproval(a.approvalId),e(s,i,a.approvalToken)):e(s,i),onSuccess:(i,{input:a})=>{i.status==="ok"&&be(t,a.agentId)}})}function ye(){return Se((e,s,t)=>e.addAgentMcpServer(s,t?{approvalToken:t}:void 0))}function dn(){return Se((e,s,t)=>e.importAgentMcpServer(s,t?{approvalToken:t}:void 0))}function re(e){const s=G(),t=ge();return se({mutationFn:({agentId:i,name:a})=>e(s,i,a),onSuccess:(i,{agentId:a})=>be(t,a)})}function un(){return re((e,s,t)=>e.removeAgentMcpServer(s,t))}function mn(){return re((e,s,t)=>e.enableAgentMcpServer(s,t))}function hn(){return re((e,s,t)=>e.disableAgentMcpServer(s,t))}function gn(){const e=G();return se({mutationFn:({agentId:s,name:t})=>e.testAgentMcpServer(s,t)})}function pn({agentId:e,serverName:s,onDone:t}){const i=pe(e,s),{start:a}=i,r=l.useRef(!1);return l.useEffect(()=>{r.current||(r.current=!0,a())},[a]),n.jsx(F,{children:n.jsxs(D,{className:"space-y-2",children:[n.jsxs("p",{className:"text-sm font-medium",children:["Sign in to ",s]}),n.jsx("p",{className:"text-muted-foreground text-xs",children:"This server needs you to sign in before your agent can use it."}),n.jsx(fe,{flow:i,serverName:s,failedActions:n.jsxs(n.Fragment,{children:[n.jsx(f,{variant:"secondary",size:"sm",onClick:()=>i.start(),className:"focus-visible:ring-2",children:"Try again"}),n.jsx(f,{variant:"ghost",size:"sm",onClick:t,className:"focus-visible:ring-2",children:"Later"})]}),connectedActions:n.jsx(f,{variant:"ghost",size:"sm",onClick:t,className:"focus-visible:ring-2",children:"Done"})}),i.state.step!=="failed"&&i.state.step!=="connected"&&n.jsx(f,{variant:"ghost",size:"sm",onClick:t,className:"focus-visible:ring-2",children:"Later"})]})})}const fn=["stdio","http","sse"],xn=/^[a-zA-Z0-9_-]+$/;function ue(e){const s={};for(const t of e.split(`
|
|
2
|
+
`)){const i=t.trim();if(!i)continue;const a=i.indexOf("=");if(a===-1)continue;const r=i.slice(0,a).trim();r&&(s[r]=i.slice(a+1).trim())}return s}function me(e){return e.trim().length?e.trim().split(/\s+/):[]}function vn(e,s){if(e.status!=="ok")return!1;const t=e.servers.find(a=>a.name===s),i=t==null?void 0:t.connection;return i!==void 0&&"authKind"in i&&i.authKind==="oauth2"}function jn({agentId:e,agentLabel:s,supportedTransports:t,onAdded:i,oauthDetectedFor:a=null}){const r=ye(),[c,u]=l.useState(!1),[h,x]=l.useState(""),[p,m]=l.useState(t[0]??"stdio"),o=t.includes(p)?p:t[0]??"stdio",[v,C]=l.useState(""),[b,k]=l.useState(""),[j,E]=l.useState(""),[y,M]=l.useState(""),[P,A]=l.useState(""),[O,R]=l.useState(null),[T,I]=l.useState(null),[Z,U]=l.useState(null),[K,V]=l.useState(null),B=xn.test(h)&&h.length<=64,q=o==="stdio"?v.trim().length>0:y.trim().length>0,d=B&&q&&!r.isPending,N=l.useCallback(()=>o==="stdio"?{transport:"stdio",command:v.trim(),args:me(b),env:ue(j)}:{transport:o,url:y.trim(),headers:ue(P)},[o,v,b,j,y,P]),w=l.useCallback(()=>({agentId:e,name:h.trim(),connection:N()}),[e,h,N]),z=l.useCallback(()=>{u(!1),R(null),I(null),x(""),m(t[0]??"stdio"),C(""),k(""),E(""),M(""),A("")},[t]),oe=l.useCallback(g=>{i({name:g.name,transport:g.connection.transport}),z()},[i,z]),H=l.useCallback((g,S)=>{const Ie=vn(g,S.name);oe(S),Ie&&U(S.name)},[oe]),ze=l.useCallback(async()=>{I(null);const g=w();try{const S=await r.mutateAsync({input:g});S.status==="approval_required"?R(S.approval):H(S,g)}catch(S){I(S instanceof Error?S.message:"Couldn’t add the server.")}},[r,w,H]),Ee=l.useCallback(async()=>{if(!O)return;I(null);const g=w();try{const S=await r.mutateAsync({input:g,approval:O});S.status==="ok"?H(S,g):I("The server still needs approval. Try again.")}catch(S){I(S instanceof Error?S.message:"Couldn’t add the server.")}},[r,w,O,H]),Y=Z??(a&&a!==K?a:null),Pe=l.useCallback(()=>{V(Y),U(null)},[Y]),Re=l.useMemo(()=>[v.trim(),...me(b)].filter(Boolean).join(" "),[v,b]);return Y?n.jsx(pn,{agentId:e,serverName:Y,onDone:Pe}):c?O?n.jsx(F,{children:n.jsxs(D,{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(te,{className:"mt-0.5 size-4 shrink-0 text-amber-500"}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("p",{className:"text-sm font-medium",children:["Confirm this server for ",s]}),n.jsx("p",{className:"text-muted-foreground text-xs",children:o==="stdio"?"This command runs on your machine whenever the agent starts a session.":"The agent connects to this URL whenever it starts a session."})]})]}),n.jsx("pre",{className:"bg-muted text-foreground overflow-x-auto rounded-md px-3 py-2 font-mono text-xs",children:o==="stdio"?Re:y.trim()}),T&&n.jsx("p",{className:"text-destructive text-xs",children:T}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(f,{variant:"ghost",size:"sm",onClick:()=>R(null),disabled:r.isPending,className:"focus-visible:ring-2",children:"Back"}),n.jsx(f,{size:"sm",onClick:Ee,disabled:r.isPending,className:"focus-visible:ring-2",children:r.isPending?"Adding…":"Confirm & add"})]})]})}):n.jsx(F,{children:n.jsxs(D,{className:"space-y-3",children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(L,{htmlFor:"mcp-name",children:"Name"}),n.jsx(Q,{id:"mcp-name",value:h,onChange:g=>x(g.target.value),placeholder:"my-server","aria-invalid":h.length>0&&!B}),h.length>0&&!B&&n.jsx("p",{className:"text-destructive text-xs",children:"Letters, numbers, dashes, underscores only."})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(L,{htmlFor:"mcp-transport",children:"Transport"}),n.jsxs(Le,{value:o,onValueChange:g=>m(g),children:[n.jsx(_e,{id:"mcp-transport",className:"w-full",children:n.jsx($e,{})}),n.jsx(Ke,{children:t.map(g=>n.jsx(Be,{value:g,children:g},g))})]})]}),o==="stdio"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(L,{htmlFor:"mcp-command",children:"Command"}),n.jsx(Q,{id:"mcp-command",value:v,onChange:g=>C(g.target.value),placeholder:"npx",className:"font-mono"})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(L,{htmlFor:"mcp-args",children:"Arguments"}),n.jsx(Q,{id:"mcp-args",value:b,onChange:g=>k(g.target.value),placeholder:"-y @modelcontextprotocol/server-filesystem",className:"font-mono"})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(L,{htmlFor:"mcp-env",children:"Environment (KEY=VALUE per line)"}),n.jsx(ce,{id:"mcp-env",value:j,onChange:g=>E(g.target.value),placeholder:"API_KEY=…",rows:2,className:"font-mono text-xs"})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(L,{htmlFor:"mcp-url",children:"URL"}),n.jsx(Q,{id:"mcp-url",value:y,onChange:g=>M(g.target.value),placeholder:"https://example.com/mcp",className:"font-mono"})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(L,{htmlFor:"mcp-headers",children:"Headers (KEY=VALUE per line)"}),n.jsx(ce,{id:"mcp-headers",value:P,onChange:g=>A(g.target.value),placeholder:"Authorization=Bearer …",rows:2,className:"font-mono text-xs"})]})]}),T&&n.jsx("p",{className:"text-destructive text-xs",children:T}),n.jsx(Ue,{}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(f,{variant:"ghost",size:"sm",onClick:z,className:"focus-visible:ring-2",children:"Cancel"}),n.jsx(f,{size:"sm",onClick:ze,disabled:!d,className:"focus-visible:ring-2",children:"Continue"})]})]})}):n.jsxs(f,{variant:"outline",size:"sm",onClick:()=>u(!0),className:"focus-visible:ring-2",children:[n.jsx(xe,{className:"size-4"}),"Add server"]})}const Nn={connected:"connected","needs-auth":"needs-sign-in",pending:"connecting",disabled:"off"},bn=["validation","invalid config","invalid configuration","missing required","command not found","enoent"];function ie(e){if(!e)return"cant-reach";const s=e.toLowerCase();return bn.some(t=>s.includes(t))?"setup-problem":"cant-reach"}function Ce(e){return e.transport==="stdio"||e.authKind==="oauth2"?!1:Object.keys(e.headers).some(s=>s.toLowerCase()==="authorization")}function Sn(e){const{connection:s,authStatus:t}=e;return s.transport!=="stdio"&&s.authKind==="oauth2"?!0:t!==void 0}function we(e){const{enabled:s,testedOk:t,signedInNow:i,runtimeStatus:a,runtimeError:r,authStatus:c,ownKey:u}=e;return s?t?"connected":i?"signed-in":a==="failed"?ie(r):c==="connected"&&a==="needs-auth"?"signed-in":c==="needs-auth"&&(a==="connected"||a==="pending")?"needs-sign-in":a?Nn[a]:c==="connected"?"signed-in":c==="needs-auth"?"needs-sign-in":u?"uses-your-key":"not-checked":"off"}function yn(e){const{statusKey:s,testResult:t,signedInNow:i}=e;return s==="off"||i?!1:(t==null?void 0:t.needsAuth)===!0?!0:s==="needs-sign-in"}function Cn(e){const{stamped:s,signedInNow:t,authStatus:i,rosterUpdatedAt:a}=e;if(!s)return;const{result:r}=s;if(!(t&&r.needsAuth===!0)&&!(s.at<=a&&(i==="needs-auth"&&r.ok||i==="connected"&&r.needsAuth===!0)))return r}function wn(e){const{status:s,probe:t}=e;return s==="off"||!t||t.ok?s:t.needsAuth===!0?"needs-sign-in":ie(t.error)}const W={attention:0,working:1,elsewhere:2,off:3};function kn(e){return e==="off"?W.off:e==="needs-sign-in"||e==="cant-reach"||e==="setup-problem"?W.attention:W.working}function An(e){const{managed:s,live:t,discovered:i}=e;return[...s.map(r=>{var c,u;return{name:r.name,band:kn(we({enabled:r.enabled,testedOk:!1,signedInNow:!1,runtimeStatus:(c=t.get(r.name))==null?void 0:c.status,runtimeError:(u=t.get(r.name))==null?void 0:u.error,authStatus:r.authStatus,ownKey:Ce(r.connection)}))}}),...i.map(r=>({name:r.name,band:W.elsewhere}))].map((r,c)=>({entry:r,index:c})).sort((r,c)=>r.entry.band-c.entry.band||r.index-c.index).map(({entry:r})=>r.name)}function Tn(e){const{frozen:s,present:t}=e,i=new Set(t),a=new Set(s);return{ordered:s.filter(r=>i.has(r)),added:t.filter(r=>!a.has(r))}}function Mn(){const e=Ve(null);return({bothSettled:s,managed:t,live:i,discovered:a,present:r})=>{e.read()===null&&s&&r.length>0&&e.write(An({managed:t,live:i,discovered:a}));const{ordered:c,added:u}=Tn({frozen:e.read()??[],present:r});return u.length>0&&e.read()!==null&&e.write([...c,...u]),[...c,...u]}}const ke={"needs-sign-in":{label:"Needs sign-in",tooltip:"Sign in to let this agent use the server.",tone:"attention"},"signing-in":{label:"Signing in…",tooltip:"A sign-in is in progress. Finish it in the tab that opened.",tone:"attention"},connected:{label:"Connected",tooltip:"This server answered, and its tools are available to the agent.",tone:"calm"},"signed-in":{label:"Signed in",tooltip:"DorkOS has a sign-in for this server. Use Test to check it responds.",tone:"calm"},"uses-your-key":{label:"Uses your key",tooltip:"This server is authenticated with a key you supplied, not one DorkOS holds.",tone:"calm"},"cant-reach":{label:"Can’t reach",tooltip:"The server did not answer. Open Details for what it said.",tone:"error"},"setup-problem":{label:"Setup problem",tooltip:"This server’s setup is wrong, so it could not start. Open Details for the reason.",tone:"error"},connecting:{label:"Connecting…",tooltip:"The agent is connecting to this server.",tone:"calm"},"not-checked":{label:"Not checked yet",tooltip:"Nothing has contacted this server yet, so there is nothing to report.",tone:"calm"},off:{label:"Off",tooltip:"Turned off. Its tools are not given to the agent.",tone:"calm"}},On={"needs-sign-in":"sign-in","signing-in":"none",connected:"none","signed-in":"test","uses-your-key":"test","cant-reach":"try-again","setup-problem":"try-again",connecting:"none","not-checked":"test",off:"none"};function zn(e){return On[e]}function En({toolCount:e,justSignedIn:s}){const t=s?"Signed in just now. ":"";return e===null?`${t||"This server answered. "}Its tools are available.`:`${t}${e} tool${e===1?"":"s"} available.`}function Pn(e,s){switch(e){case"needs-sign-in":return`Sign in to ${s.displayName} so this agent can use its tools.`;case"signing-in":return null;case"connected":return En(s);case"signed-in":return s.justSignedIn?"Signed in just now. Test to check the server responds.":"DorkOS has a sign-in for this server. Test to check it responds.";case"uses-your-key":return"You added an access key when setting this up.";case"cant-reach":return"This server didn’t answer. It may be down.";case"setup-problem":return"This server’s setup has a problem.";case"connecting":return"Connecting to this server.";case"not-checked":return"Nothing has checked this server yet.";case"off":return"Turned off. The agent doesn’t see this server."}}function Rn(e){const{connection:s,authStatus:t,clientOrigin:i}=e;return s.transport==="stdio"?"None. This server doesn’t need one.":s.authKind==="oauth2"?i==="manual"?`OAuth: using your own app credentials, ${t==="connected"?"signed in, and it renews automatically":"not signed in yet"}. DorkOS holds the key; the agent never sees it.`:t==="connected"?"OAuth: signed in, and it renews automatically. DorkOS holds the key; the agent never sees it.":"OAuth: DorkOS will hold the key for you; the agent never sees it.":Object.keys(s.headers).some(r=>r.toLowerCase()==="authorization")?"Access key: you added a key when setting this up.":t===void 0?"Nothing has checked this yet.":"None. This server doesn’t need one."}function In(e){if(e.transport==="stdio")return`Runs \`${e.command}\` on this computer`;const s=Fn(e.url);return s?`${s} (web service)`:`${e.url} (web service)`}function Fn(e){try{return new URL(e).host}catch{return null}}const Dn={agent:"Added to this agent through DorkOS",project:"From this project, declared in its config files",plugin:"Comes with a plugin",computer:"From your computer-wide config"},Ln={agent:"Added to this agent through DorkOS.",project:"From this project’s config. Add it to manage it here.",plugin:"Comes with a plugin. Add it to manage it here.",computer:"From your computer-wide config. Add it to manage it here."},_n=[{runtime:"claude-code",pattern:/^plugin:([^:]+):(.+)$/,read:e=>({pluginName:e[1],displayName:e[2]})},{runtime:"claude-code",pattern:/^plugin:(.+)$/,read:e=>({pluginName:e[1],displayName:e[1]})}];function Ae(e){for(const s of _n){const t=e.match(s.pattern);if(!t)continue;const{displayName:i,pluginName:a}=s.read(t);if(!(!i||!a))return{displayName:i,pluginName:a,rawName:e}}return{displayName:e,pluginName:null,rawName:e}}function $n(e,s){return s.pluginName?"plugin":e.scope==="project"||e.scope==="local"?"project":e.scope==="user"?"computer":null}const Kn="This agent’s runtime loads this server. Add it to manage it here.";function Te(e,s){return e==="plugin"&&s?`Comes with the ${s} plugin`:Dn[e]}function Bn(e,s){return e===null?Kn:e==="plugin"&&s?`Comes with the ${s} plugin. Add it to manage it here.`:Ln[e]}const Un=ae("border-border/60 relative overflow-hidden rounded-md border px-3 py-2.5 transition-colors",{variants:{managed:{true:"bg-card",false:"bg-muted/30"},dimmed:{true:"opacity-65",false:""}},defaultVariants:{managed:!0,dimmed:!1}}),Vn=ae("pointer-events-none absolute inset-y-0 left-0 w-0.5",{variants:{tone:{calm:"hidden",attention:"bg-status-warning",error:"bg-status-error"}},defaultVariants:{tone:"calm"}}),qn=ae("shrink-0 rounded-full px-2 py-0.5 text-2xs leading-4 font-medium whitespace-nowrap",{variants:{chip:{success:"bg-status-success-bg text-status-success-fg",info:"bg-status-info-bg text-status-info-fg",warning:"bg-status-warning-bg text-status-warning-fg",error:"bg-status-error-bg text-status-error-fg",neutral:"bg-muted text-muted-foreground"}},defaultVariants:{chip:"neutral"}}),Hn={connected:"success","signed-in":"info","needs-sign-in":"warning","signing-in":"warning","cant-reach":"error","setup-problem":"error","uses-your-key":"neutral",connecting:"neutral","not-checked":"neutral",off:"neutral"};function Yn({status:e}){const s=ke[e];return n.jsxs(ve,{children:[n.jsx(je,{asChild:!0,children:n.jsx("span",{className:qn({chip:Hn[e]}),children:s.label})}),n.jsx(Ne,{children:s.tooltip})]})}function Qn({scope:e,pluginName:s}){return n.jsxs(ve,{children:[n.jsx(je,{asChild:!0,children:n.jsx(qe,{size:"xs",tone:"neutral",variant:"secondary",className:"shrink-0 font-normal",children:e})}),n.jsx(Ne,{children:Te(e,s)})]})}function Me({displayName:e,rawName:s,scope:t,pluginName:i,status:a,sentence:r,managed:c,toggle:u,actions:h,children:x,details:p,defaultDetailsOpen:m=!1}){const[o,v]=l.useState(m),C=l.useId(),b=ke[a].tone;return n.jsxs("div",{"data-mcp-server":s,className:le(Un({managed:c,dimmed:a==="off"}),"mb-2 last:mb-0"),children:[n.jsx("span",{className:Vn({tone:b}),"aria-hidden":!0}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:e}),t&&n.jsx(Qn,{scope:t,pluginName:i}),n.jsx(Yn,{status:a}),u]}),r&&n.jsx("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:r}),x,h&&n.jsx("div",{className:"mt-2 flex items-center gap-1",children:h}),p&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",onClick:()=>v(k=>!k),"aria-expanded":o,"aria-controls":C,className:"text-muted-foreground hover:text-foreground mt-2 flex items-center gap-1 text-xs focus-visible:ring-2",children:[n.jsx(X,{className:le("size-3 transition-transform",o&&"rotate-90"),"aria-hidden":!0}),"Details"]}),o&&n.jsxs("div",{id:C,children:[p,n.jsxs("button",{type:"button",onClick:()=>v(!1),className:"text-muted-foreground hover:text-foreground mt-2 flex items-center gap-1 text-xs focus-visible:ring-2",children:[n.jsx(X,{className:"size-3 -rotate-90","aria-hidden":!0}),"Collapse details"]})]})]})]})}const Wn=3,$="text-muted-foreground/70";function Gn({tools:e}){const[s,t]=l.useState(!1),i=s?e:e.slice(0,Wn),a=e.length-i.length;return n.jsxs("div",{className:"mt-1.5",children:[i.map(r=>n.jsxs("div",{className:"border-border/40 flex items-baseline gap-2 border-b py-1 last:border-b-0",children:[n.jsx("code",{className:"text-foreground text-2xs shrink-0 font-mono",children:r.name}),r.description&&n.jsx("span",{className:"text-muted-foreground text-2xs truncate",children:r.description})]},r.name)),a>0&&n.jsxs("button",{type:"button",onClick:()=>t(!0),className:"text-muted-foreground hover:text-foreground mt-1 flex items-center gap-1 text-xs focus-visible:ring-2",children:[n.jsx(X,{className:"size-3","aria-hidden":!0}),"Show ",a," more"]})]})}function Zn(e){const{scope:s,pluginName:t,connection:i}=e;return s==="plugin"&&t?`Comes with the ${t} plugin`:i?In(i):s?Te(s,t):null}function Oe({connection:e,authStatus:s,authClientOrigin:t,scope:i,pluginName:a,rawName:r,displayName:c,toolCount:u,tools:h,serverInfo:x,alsoUsedBy:p,error:m}){const o=Zn({scope:i,pluginName:a,connection:e});return n.jsxs("div",{className:"border-border/60 text-muted-foreground mt-2 space-y-1 border-t pt-2 text-xs leading-relaxed",children:[e&&n.jsx(_,{label:"Sign-in",align:"start",wrap:!0,labelClassName:$,children:n.jsxs("span",{className:"inline-flex items-start gap-1.5",children:[n.jsx(He,{className:"mt-0.5 size-3 shrink-0","aria-hidden":!0}),Rn({connection:e,authStatus:s,clientOrigin:t})]})}),o&&n.jsx(_,{label:"Source",align:"start",wrap:!0,labelClassName:$,children:o}),r!==c&&n.jsx(_,{label:"Raw id",align:"start",wrap:!0,labelClassName:$,children:n.jsx("code",{className:"text-2xs font-mono",children:r})}),x&&n.jsx(_,{label:"Server",align:"start",wrap:!0,labelClassName:$,children:x}),p&&n.jsx(_,{label:"Also used by",align:"start",wrap:!0,labelClassName:$,children:p}),typeof u=="number"&&n.jsx(_,{label:"Tools",align:"start",labelClassName:$,children:u}),h&&h.length>0&&n.jsx(Gn,{tools:h}),m&&n.jsx(_,{label:"Error",align:"start",wrap:!0,labelClassName:$,children:n.jsx("code",{className:"text-2xs font-mono break-all",children:m})})]})}function Jn({flow:e,serverName:s}){return n.jsxs(n.Fragment,{children:[n.jsx(fe,{flow:e,serverName:s,failedActions:n.jsxs(n.Fragment,{children:[n.jsx(f,{variant:"secondary",size:"sm",onClick:()=>e.start(),className:"focus-visible:ring-2",children:"Try again"}),n.jsx(f,{variant:"ghost",size:"sm",onClick:()=>e.reset(),className:"focus-visible:ring-2",children:"Dismiss"})]}),connectedActions:n.jsx(f,{variant:"ghost",size:"sm",onClick:()=>e.reset(),className:"focus-visible:ring-2",children:"Dismiss"})}),(e.state.step==="disclosure"||e.state.step==="waiting")&&n.jsx("div",{className:"mt-2",children:n.jsx(f,{variant:"ghost",size:"sm",onClick:()=>e.reset(),"aria-label":`Cancel signing in to ${s}`,className:"focus-visible:ring-2",children:"Cancel"})})]})}function Xn({server:e,agentId:s,live:t,testResult:i,rosterUpdatedAt:a,testing:r,busy:c,onToggle:u,onTest:h,onRemove:x}){const p=pe(s,e.name),m=p.state.step==="connected",o=Cn({stamped:i,signedInNow:m,authStatus:e.authStatus,rosterUpdatedAt:a}),v=Ce(e.connection),C=we({enabled:e.enabled,testedOk:(o==null?void 0:o.ok)===!0,signedInNow:m,runtimeStatus:t==null?void 0:t.status,runtimeError:t==null?void 0:t.error,authStatus:e.authStatus,ownKey:v}),b=p.state.step==="starting",k=p.state.step==="disclosure"||p.state.step==="waiting"||b,j=k?"signing-in":C,E=yn({statusKey:C,testResult:o,signedInNow:m})&&(p.state.step==="idle"||b),y=Ae(e.name),M=o!=null&&o.ok?o.toolCount??null:p.state.toolCount,P=k?j:wn({status:j,probe:o}),A=Pn(P,{displayName:y.displayName,toolCount:M,justSignedIn:m}),O=k?"none":zn(P),R=Sn({connection:e.connection,authStatus:e.authStatus});return n.jsx(Me,{displayName:y.displayName,rawName:e.name,scope:"agent",pluginName:y.pluginName,status:j,sentence:A,managed:!0,toggle:n.jsx(Xe,{checked:e.enabled,onCheckedChange:T=>u(e.name,T),disabled:c,"aria-label":`Enable ${e.name}`}),actions:n.jsxs(n.Fragment,{children:[E&&n.jsxs(f,{variant:"default",size:"sm",onClick:()=>p.start(),disabled:c||b,"aria-label":`Sign in to ${e.name}`,className:"gap-1.5 focus-visible:ring-2",children:[n.jsx(de,{className:"size-3.5","aria-hidden":!0}),"Sign in"]}),!E&&O==="try-again"&&n.jsxs(f,{variant:"outline",size:"sm",onClick:()=>h(e.name),disabled:r||c,"aria-label":`Try ${e.name} again`,className:"gap-1.5 focus-visible:ring-2",children:[r?n.jsx(ee,{size:"xs"}):null,"Try again"]}),!E&&O==="test"&&n.jsx(f,{variant:"outline",size:"sm",onClick:()=>h(e.name),disabled:r||c,className:"focus-visible:ring-2",children:r?n.jsx(ee,{size:"xs"}):"Test"}),n.jsxs(Ye,{children:[n.jsx(Qe,{asChild:!0,children:n.jsx(f,{variant:"ghost",size:"sm","aria-label":`More actions for ${e.name}`,className:"ml-auto focus-visible:ring-2",children:n.jsx(We,{className:"size-4","aria-hidden":!0})})}),n.jsxs(Ge,{align:"end",children:[n.jsxs(J,{onSelect:()=>h(e.name),disabled:r||c,children:[n.jsx(Ze,{className:"size-3.5","aria-hidden":!0}),"Test"]}),R&&n.jsxs(J,{onSelect:()=>p.start(),disabled:c,children:[n.jsx(de,{className:"size-3.5","aria-hidden":!0}),"Sign in again"]}),n.jsx(Je,{}),n.jsx(J,{variant:"destructive",onSelect:()=>x(e.name),disabled:c,children:"Remove"})]})]})]}),details:n.jsx(Oe,{connection:e.connection,authStatus:e.authStatus,authClientOrigin:e.authClientOrigin,scope:"agent",pluginName:y.pluginName,rawName:y.rawName,displayName:y.displayName,toolCount:M,error:(o==null?void 0:o.ok)===!1?o.error:t==null?void 0:t.error}),children:n.jsx(Jn,{flow:p,serverName:y.displayName})})}function es(e){switch(e.status){case"connected":return"connected";case"failed":return ie(e.error);case"needs-auth":return"needs-sign-in";case"pending":return"connecting";case"disabled":return"off";default:return"not-checked"}}function ns(e){const{displayName:s,scope:t,pluginName:i}=e,a=ss(t,i);return`${s} ${a}. Manage it here to enable, disable, or sign in from DorkOS.`}function ss(e,s){return e==="plugin"&&s?`comes with the ${s} plugin`:e==="project"?"comes from this project’s own config":e==="computer"?"comes from your computer-wide config":"is loaded by this agent’s runtime"}function ts({entry:e,agentId:s,agentLabel:t,canImport:i}){const a=dn(),[r,c]=l.useState(null),[u,h]=l.useState(null),x=l.useCallback(async()=>{h(null);try{const j=await a.mutateAsync({input:{agentId:s,name:e.name}});j.status==="approval_required"&&c(j.approval)}catch(j){h(j instanceof Error?j.message:"Couldn’t add the server.")}},[a,s,e.name]),p=l.useCallback(async()=>{if(r){h(null);try{(await a.mutateAsync({input:{agentId:s,name:e.name},approval:r})).status!=="ok"&&h("Adding it still needs approval. Try again.")}catch(j){h(j instanceof Error?j.message:"Couldn’t add the server.")}}},[a,s,e.name,r]),m=Ae(e.name),o=$n(e,m),v=o!==null,C=m.rawName!==m.displayName,b=e.error!==void 0,k=v||C||b;return r?n.jsxs("div",{className:"border-border/60 mb-2 space-y-3 rounded-md border p-3 last:mb-0",children:[n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(te,{className:"text-status-warning mt-0.5 size-4 shrink-0","aria-hidden":!0}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("p",{className:"text-sm font-medium",children:["Add “",m.displayName,"” to ",t,"?"]}),n.jsx("p",{className:"text-muted-foreground text-xs leading-relaxed",children:ns({displayName:m.displayName,scope:o,pluginName:m.pluginName})})]})]}),u&&n.jsx("p",{className:"text-destructive text-xs",children:u}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(f,{variant:"ghost",size:"sm",onClick:()=>c(null),disabled:a.isPending,className:"focus-visible:ring-2",children:"Cancel"}),n.jsx(f,{size:"sm",onClick:p,disabled:a.isPending,className:"focus-visible:ring-2",children:a.isPending?"Adding…":"Add to agent"})]})]}):n.jsx(Me,{displayName:m.displayName,rawName:e.name,scope:o,pluginName:m.pluginName,status:es(e),sentence:Bn(o,m.pluginName),managed:!1,actions:i?n.jsxs(n.Fragment,{children:[n.jsxs(f,{variant:"outline",size:"sm",onClick:x,disabled:a.isPending,"aria-label":`Add ${e.name} to agent`,className:"gap-1.5 focus-visible:ring-2",children:[a.isPending?n.jsx(ee,{size:"xs"}):n.jsx(xe,{className:"size-(--size-icon-xs)","aria-hidden":!0}),"Add to agent"]}),u&&n.jsx("p",{className:"text-destructive text-xs",children:u})]}):void 0,details:k?n.jsx(Oe,{scope:o,pluginName:m.pluginName,rawName:m.rawName,displayName:m.displayName,error:e.error}):void 0})}function as(e,s){return{agentId:e,name:s.server.name,connection:s.server.connection}}function rs(e){const s=e.sites.filter(t=>!t.expired).map(t=>t.site);return s.length<=3?s.join(", "):`${s.slice(0,3).join(", ")} and ${s.length-3} more`}function is({agentId:e,agentLabel:s}){const t=en(),i=ye(),[a,r]=l.useState(null),[c,u]=l.useState(null),h=l.useCallback(async o=>{if(t.data){u(null);try{const v=await i.mutateAsync({input:as(e,t.data),...o?{approval:o}:{}});v.status!=="approval_required"?r(null):o?u("The browser still needs approval. Try again."):r(v.approval)}catch(v){u(v instanceof Error?v.message:"Couldn’t add the browser.")}}},[i,e,t.data]);if(!t.data)return null;const x=t.data,p=rs(x),m=`${x.loginCommand} <site>`;return n.jsx(F,{children:n.jsxs(D,{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-start gap-2",children:[a?n.jsx(te,{className:"mt-0.5 size-4 shrink-0 text-amber-500"}):n.jsx(nn,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsxs("div",{className:"min-w-0 space-y-1",children:[n.jsx("p",{className:"text-sm font-medium",children:a?`Confirm the signed-in browser for ${s}`:"Signed-in browser"}),n.jsx("p",{className:"text-muted-foreground text-xs",children:a?"This command runs on your machine whenever the agent starts a session. Each session gets its own browser, so agents working at the same time never share one.":"A web browser that starts signed in to the sites you saved. The agent never sees your passwords."}),x.saved?n.jsxs("p",{className:"text-xs",children:["Signed in to ",p,"."]}):n.jsxs("p",{className:"text-xs text-amber-600 dark:text-amber-500",children:["No sign-ins saved yet, so it starts signed out. Run"," ",n.jsx("code",{className:"font-mono",children:m}),n.jsx(sn,{value:m,label:"Copy the sign-in command",size:"xs",className:"mx-0.5 inline-flex align-middle"})," ","in a terminal first."]})]})]}),a&&n.jsx("pre",{className:"bg-muted text-foreground overflow-x-auto rounded-md px-3 py-2 font-mono text-xs",children:[x.server.connection.command,...x.server.connection.args].join(" ")}),c&&n.jsx("p",{className:"text-destructive text-xs",children:c}),n.jsxs("div",{className:"flex justify-end gap-2",children:[a&&n.jsx(f,{variant:"ghost",size:"sm",onClick:()=>r(null),disabled:i.isPending,className:"focus-visible:ring-2",children:"Back"}),n.jsx(f,{variant:a?"default":"outline",size:"sm",onClick:()=>void h(a??void 0),disabled:i.isPending,className:"focus-visible:ring-2",children:i.isPending?"Adding…":a?"Confirm & add":"Give it the browser"})]})]})})}const os={codex:["stdio","http"],opencode:["stdio","http"]};function he(e){return os[e]??fn}function cs(){const{open:e}=rn();return n.jsxs("p",{className:"text-muted-foreground text-xs leading-relaxed",children:["Want other apps to use DorkOS as an MCP server instead? That is the other direction."," ",n.jsx(f,{variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>e("tools","external-mcp"),children:"See Settings → Tools"})]})}function ls({agent:e,projectPath:s}){var q;const t=tn(e.id),i=ln(s,e.runtime),a=i.data,r=an(e.runtime),c=(r==null?void 0:r.supportsManagedMcpServers)??!0,u=mn(),h=hn(),x=un(),p=gn(),[m,o]=l.useState({}),[v,C]=l.useState(null),[b,k]=l.useState(null),j=Mn(),E=l.useCallback((d,N)=>{(N?u:h).mutate({agentId:e.id,name:d})},[e.id,u,h]),y=l.useCallback(d=>{x.mutate({agentId:e.id,name:d}),o(N=>{const w={...N};return delete w[d],w})},[e.id,x]),M=l.useCallback(async d=>{C(d);try{const N=await p.mutateAsync({agentId:e.id,name:d});o(w=>({...w,[d]:{result:N,at:Date.now()}}))}finally{C(null)}},[e.id,p]),P=l.useCallback(({name:d,transport:N})=>{k(d),N!=="stdio"&&M(d).catch(()=>{})},[M]),A=t.data??[],O=new Set(A.map(d=>d.name)),R=new Map(((a==null?void 0:a.servers)??[]).map(d=>[d.name,d])),T=((a==null?void 0:a.servers)??[]).filter(d=>!O.has(d.name)),I=u.isPending||h.isPending||x.isPending,Z=A.some(d=>cn(d.connection)!==void 0),U=c&&!t.isPending&&!Z&&he(e.runtime).includes("stdio"),K=new Map;A.forEach((d,N)=>K.set(d.name,{kind:"managed",index:N})),T.forEach((d,N)=>K.set(d.name,{kind:"discovered",index:N}));const V=j({bothSettled:!t.isPending&&!i.isPending,managed:A,live:R,discovered:T,present:[...A.map(d=>d.name),...T.map(d=>d.name)]});function B(d){const N=K.get(d);if(!N)return null;if(N.kind==="managed"){const z=A[N.index];return n.jsx(Xn,{server:z,agentId:e.id,live:R.get(z.name),testResult:m[z.name],rosterUpdatedAt:t.dataUpdatedAt,testing:v===z.name,busy:I,onToggle:E,onTest:M,onRemove:y},z.name)}const w=T[N.index];return n.jsx(ts,{entry:w,agentId:e.id,agentLabel:e.displayName??e.name,canImport:c},w.name)}return n.jsxs("section",{className:"space-y-3","aria-label":"MCP servers",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-sm font-semibold",children:"MCP Servers"}),c&&n.jsx(jn,{agentId:e.id,agentLabel:e.displayName??e.name,supportedTransports:he(e.runtime),onAdded:P,oauthDetectedFor:b&&((q=m[b])==null?void 0:q.result.needsAuth)===!0?b:null})]}),n.jsx(cs,{}),U&&n.jsx(is,{agentId:e.id,agentLabel:e.displayName??e.name}),!c&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"This agent’s runtime can’t run DorkOS-managed MCP servers yet. Any servers below show read-only status."}),t.isLoading?n.jsx(F,{children:n.jsxs(D,{className:"space-y-2",children:[n.jsx(ne,{className:"h-5 w-full"}),n.jsx(ne,{className:"h-5 w-3/4"})]})}):t.isError?n.jsx(F,{children:n.jsxs(D,{className:"flex items-center justify-between gap-2",children:[n.jsx("p",{className:"text-destructive text-sm",children:"Couldn’t load managed servers."}),n.jsx(f,{variant:"outline",size:"sm",onClick:()=>t.refetch(),className:"focus-visible:ring-2",children:"Retry"})]})}):V.length===0?n.jsx(F,{children:n.jsx(D,{children:n.jsxs("p",{className:"text-muted-foreground text-sm",children:["No MCP servers yet."," ",c?"Add one to give this agent tools from an external server.":"This runtime can’t run managed servers."]})})}):n.jsx(F,{children:n.jsx(D,{children:V.map(B)})})]})}function ms({member:e}){const{agent:s,projectPath:t,isPending:i}=on(e);return i?n.jsx(ne,{className:"h-32 w-full"}):!s||t===null?n.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this agent’s MCP servers."}):n.jsx(ls,{agent:s,projectPath:t})}export{ms as ToolsPage};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
* @license lucide-react v1.
|
|
1
|
+
import{e6 as PRn,gT as ORn,gB as NRn,r as on,j as de,gd as Kan,g2 as $Rn,gU as DRn,gV as LRn,gW as _Rn,J as MN,cp as A2e,B as Wan,gX as Van,aj as r2,e$ as M2e,aF as C2e,aE as FRn,W as jN,gY as wK,P as RRn,dx as e2e,dw as BRn,gZ as JRn,X as GRn,g_ as HRn,g$ as qRn,h0 as Fhn,dr as zRn,h1 as URn,h2 as XRn,es as KRn,h3 as WRn,h4 as VRn,dV as QRn,h5 as YRn,dW as ZRn,dY as eBn,dZ as nBn,bg as VX,fQ as tBn,aD as Rhn,Q as iBn,h6 as rBn,fd as cBn,h7 as uBn,e1 as oBn,dI as sBn,dJ as fBn,dK as lBn,dL as hBn,dM as aBn,dN as dBn,dO as bBn,dP as wBn}from"./index-B4TIVWAq.js";/**
|
|
2
|
+
* @license lucide-react v1.47.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{q as t,_ as c,s as a,v as l,w as e,x as s,y as m}from"./index-B4TIVWAq.js";function S(o){if(o.transport!=="stdio"||!o.args)return;const r=o.args;if(!r.some(i=>i.startsWith("@playwright/mcp")))return;const g=r.indexOf("--storage-state");if(g!==-1)return r[g+1];const n=r.find(i=>i.startsWith("--storage-state="));return n==null?void 0:n.slice(16)}const u=t({name:e(),value:e(),domain:e(),path:e(),expires:l(),httpOnly:a(),secure:a(),sameSite:c(["Strict","Lax","None"])}).passthrough(),h=t({origin:e(),localStorage:s(t({name:e(),value:e()}))}).passthrough();t({cookies:s(u),origins:s(h).default([])}).passthrough();const d=t({site:e(),cookies:l().int(),expiresAt:e().nullable(),expired:a(),pageStorage:a()});t({stateFile:e(),saved:a(),savedAt:e().nullable(),sites:s(d),loginCommand:e(),server:t({name:e(),connection:t({transport:m("stdio"),command:e(),args:s(e()),env:t({}).catchall(e())})})});export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,S as d,E as p,j as E,c as f}from"./index-
|
|
1
|
+
import{r,S as d,E as p,j as E,c as f}from"./index-B4TIVWAq.js";var j=({code:i,language:e,maxHeight:o,raw:a,className:u,startLine:m,lineNumbers:n,...h})=>{let{shikiTheme:l}=r.useContext(d),t=p(),[c,s]=r.useState(a);return r.useEffect(()=>{if(!t){s(a);return}let g=t.highlight({code:i,language:e,themes:l},x=>{s(x)});g&&s(g)},[i,e,l,t,a]),E.jsx(f,{className:u,language:e,lineNumbers:n,maxHeight:o,result:c,startLine:m,...h})};export{j as HighlightedCodeBlockBody};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,L as i,i as n,c as $,f as y,l as P,s as X,t as O}from"./index-B3P6TTvD.js";import{defineCSSCompletionSource as m}from"./index-W25uMuZA.js";import{L as c,E as S}from"./index-nEQI8fB2.js";import"./index-DDXrdlj0.js";const f=110,l=1,s=2,r=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function e(T){return T>=65&&T<=90||T>=97&&T<=122||T>=161}function p(T){return T>=48&&T<=57}const W=new S((T,Q)=>{if(T.next==40){let a=T.peek(-1);(e(a)||p(a)||a==95||a==45)&&T.acceptToken(s,1)}}),d=new S(T=>{if(r.indexOf(T.peek(-1))>-1){let{next:Q}=T;(e(Q)||Q==95||Q==35||Q==46||Q==91||Q==58||Q==45)&&T.acceptToken(f)}}),Z=new S(T=>{if(r.indexOf(T.peek(-1))<0){let{next:Q}=T;if(Q==37&&(T.advance(),T.acceptToken(l)),e(Q)){do T.advance();while(e(T.next));T.acceptToken(l)}}}),w=X({"import charset namespace keyframes media supports when":O.definitionKeyword,"from to selector":O.keyword,NamespaceName:O.namespace,KeyframeName:O.labelName,TagName:O.tagName,ClassName:O.className,PseudoClassName:O.constant(O.className),IdName:O.labelName,"FeatureName PropertyName PropertyVariable":O.propertyName,AttributeName:O.attributeName,NumberLiteral:O.number,KeywordQuery:O.keyword,UnaryQueryOp:O.operatorKeyword,"CallTag ValueName":O.atom,VariableName:O.variableName,"AtKeyword Interpolation":O.special(O.variableName),Callee:O.operatorKeyword,Unit:O.unit,"UniversalSelector NestingSelector":O.definitionOperator,MatchOp:O.compareOperator,"ChildOp SiblingOp, LogicOp":O.logicOperator,BinOp:O.arithmeticOperator,Important:O.modifier,"Comment LineComment":O.blockComment,ColorLiteral:O.color,"ParenthesizedContent StringLiteral":O.string,Escape:O.special(O.string),": ...":O.punctuation,"PseudoOp #":O.derefOperator,"; ,":O.separator,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),z={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},h={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":160,"@keyframes":166,"@supports":178},g=c.deserialize({version:14,states:"@^O!gQWOOO!nQaO'#CeOOQP'#Cd'#CdO$RQWO'#CgO$xQaO'#EaO%cQWO'#CiO%kQWO'#DZO%pQWO'#D^O%uQaO'#DfOOQP'#Es'#EsO'YQWO'#DlO'yQWO'#DyO(QQWO'#D{O(xQWO'#D}O)TQWO'#EQO'bQWO'#EWO)YQ`O'#FTO)]Q`O'#FTO)hQ`O'#FTO)vQWO'#EYOOQO'#Er'#ErOOQO'#FV'#FVOOQO'#Ec'#EcO){QWO'#EqO*WQWO'#EqQOQWOOOOQP'#Ch'#ChOOQP,59R,59RO$RQWO,59RO*bQWO'#EdO+PQWO,58|O+_QWO,59TO%kQWO,59uO%pQWO,59xO*bQWO,59{O*bQWO,59}OOQO'#De'#DeO*bQWO,5:OO,bQpO'#E}O,iQWO'#DkOOQO,58|,58|O(QQWO,58|O,pQWO,5:{OOQO,5:{,5:{OOQT'#Cl'#ClO-UQeO,59TO.cQ[O,59TOOQP'#D]'#D]OOQP,59u,59uOOQO'#D_'#D_O.hQpO,59xOOQO'#EZ'#EZO.pQ`O,5;oOOQO,5;o,5;oO/OQWO,5:WO/VQWO,5:WOOQS'#Dn'#DnO/rQWO'#DsO/yQ!fO'#FRO0eQWO'#DtOOQS'#FS'#FSO+YQWO,5:eO'bQWO'#DrOOQS'#Cu'#CuO(QQWO'#CwO0jQ!hO'#CyO2^Q!fO,5:gO2oQWO'#DWOOQS'#Ex'#ExO(QQWO'#DQOOQO'#EP'#EPO2tQWO,5:iO2yQWO,5:iOOQO'#ES'#ESO3RQWO,5:lO3WQ!fO,5:rO3iQ`O'#EkO.pQ`O,5;oOO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estingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName ) ArgList , PseudoClassName ArgList VariableName AtKeyword PropertyVariable ValueName ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral Escape Interpolation BinaryExpression BinOp LogicOp UnaryExpression UnaryQueryOp CallExpression ] SubscriptExpression [ CallLiteral CallTag ParenthesizedContent IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp InterpolatedSelector ; when } { Block ImportStatement import KeywordQuery FeatureQuery FeatureName BinaryQuery UnaryQuery ParenthesizedQuery SelectorQuery selector CallQuery ArgList SubscriptQuery MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports DetachedRuleSet PropertyName Declaration Important Inclusion IdSelector ClassSelector Inclusion CallExpression",maxTerm:133,nodeProps:[["isolate",-3,3,4,30,""],["openedBy",17,"(",59,"{"],["closedBy",26,")",60,"}"]],propSources:[w],skippedNodes:[0,3,4],repeatNodeCount:10,tokenData:"!2q~R!ZOX$tX^%l^p$tpq%lqr)Ors-xst/ltu6Zuv$tvw8^wx:Uxy;syz<Uz{<Z{|<t|}BQ}!OBc!O!PDo!P!QFY!Q![Jw![!]Kr!]!^Ln!^!_MP!_!`M{!`!aNl!a!b$t!b!c! m!c!}!&R!}#O!'y#O#P$t#P#Q!([#Q#R!(m#R#T$t#T#o!&R#o#p!)S#p#q!(m#q#r!)e#r#s!)v#s#y$t#y#z%l#z$f$t$f$g%l$g#BY$t#BY#BZ%l#BZ$IS$t$IS$I_%l$I_$I|$t$I|$JO%l$JO$JT$t$JT$JU%l$JU$KV$t$KV$KW%l$KW&FU$t&FU&FV%l&FV;'S$t;'S;=`!2k<%lO$t`$wSOy%Tz;'S%T;'S;=`%f<%lO%T`%YS|`Oy%Tz;'S%T;'S;=`%f<%lO%T`%iP;=`<%l%T~%qh#d~OX%TX^']^p%Tpq']qy%Tz#y%T#y#z']#z$f%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1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[d,Z,W,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:T=>z[T]||-1},{term:23,get:T=>h[T]||-1}],tokenPrec:2180}),o=i.define({name:"less",parser:g.configure({props:[n.add({Declaration:$()}),y.add({Block:P})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"@-"}}),u=m(T=>T.name=="VariableName"||T.name=="AtKeyword");function G(){return new t(o,o.data.of({autocomplete:u}))}export{G as less,u as lessCompletionSource,o as lessLanguage};
|
|
1
|
+
import{a as t,L as i,i as n,c as $,f as y,l as P,s as X,t as O}from"./index-BzVyUKXW.js";import{defineCSSCompletionSource as m}from"./index-DDagpuEn.js";import{L as c,E as S}from"./index-D_Pj9S7y.js";import"./index-B4TIVWAq.js";const f=110,l=1,s=2,r=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function e(T){return T>=65&&T<=90||T>=97&&T<=122||T>=161}function p(T){return T>=48&&T<=57}const W=new S((T,Q)=>{if(T.next==40){let a=T.peek(-1);(e(a)||p(a)||a==95||a==45)&&T.acceptToken(s,1)}}),d=new S(T=>{if(r.indexOf(T.peek(-1))>-1){let{next:Q}=T;(e(Q)||Q==95||Q==35||Q==46||Q==91||Q==58||Q==45)&&T.acceptToken(f)}}),Z=new S(T=>{if(r.indexOf(T.peek(-1))<0){let{next:Q}=T;if(Q==37&&(T.advance(),T.acceptToken(l)),e(Q)){do T.advance();while(e(T.next));T.acceptToken(l)}}}),w=X({"import charset namespace keyframes media supports when":O.definitionKeyword,"from to selector":O.keyword,NamespaceName:O.namespace,KeyframeName:O.labelName,TagName:O.tagName,ClassName:O.className,PseudoClassName:O.constant(O.className),IdName:O.labelName,"FeatureName PropertyName PropertyVariable":O.propertyName,AttributeName:O.attributeName,NumberLiteral:O.number,KeywordQuery:O.keyword,UnaryQueryOp:O.operatorKeyword,"CallTag ValueName":O.atom,VariableName:O.variableName,"AtKeyword Interpolation":O.special(O.variableName),Callee:O.operatorKeyword,Unit:O.unit,"UniversalSelector NestingSelector":O.definitionOperator,MatchOp:O.compareOperator,"ChildOp SiblingOp, LogicOp":O.logicOperator,BinOp:O.arithmeticOperator,Important:O.modifier,"Comment LineComment":O.blockComment,ColorLiteral:O.color,"ParenthesizedContent StringLiteral":O.string,Escape:O.special(O.string),": ...":O.punctuation,"PseudoOp #":O.derefOperator,"; ,":O.separator,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),z={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},h={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":160,"@keyframes":166,"@supports":178},g=c.deserialize({version:14,states:"@^O!gQWOOO!nQaO'#CeOOQP'#Cd'#CdO$RQWO'#CgO$xQaO'#EaO%cQWO'#CiO%kQWO'#DZO%pQWO'#D^O%uQaO'#DfOOQP'#Es'#EsO'YQWO'#DlO'yQWO'#DyO(QQWO'#D{O(xQWO'#D}O)TQWO'#EQO'bQWO'#EWO)YQ`O'#FTO)]Q`O'#FTO)hQ`O'#FTO)vQWO'#EYOOQO'#Er'#ErOOQO'#FV'#FVOOQO'#Ec'#EcO){QWO'#EqO*WQWO'#EqQOQWOOOOQP'#Ch'#ChOOQP,59R,59RO$RQWO,59RO*bQWO'#EdO+PQWO,58|O+_QWO,59TO%kQWO,59uO%pQWO,59xO*bQWO,59{O*bQWO,59}OOQO'#De'#DeO*bQWO,5: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Q%n$mR&U%nQ$h#YR%i$hQ$s#fR%r$sQ#q![R$|#qQ%W$PR%{%WQ!o`Q#c!UT$T!o#cQ%[$UR&O%[QiOR#ZwVfOhwUSOhwQ!wmQ#RrQ#SsQ#TuQ$k#^Q$}#rR%a$YR$l#^R$n#`Q!d[S#Uv$gQ#[yQ#f!XQ#u!bQ#|!gQ$U!qQ$]!{d$c#U#`$d$e$m$u%g%m%t&TQ$o#bQ$y#oQ%P#wQ%Q#yS%Y$U%[Q%d$_Q%e$bQ%q$rR%}%ZQzSQ!pbQ!|nQ%b$YR&Q%aQ#YvR%h$gR#g!XQ!_ZQ#e!WQ$x#mR&V%sW![Z!W#m%sQ!m_Q#j!ZQ#t!`Q$w#lR${#pVcOhwSgOwR!sh",nodeNames:"⚠ Unit ( Comment LineComment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName ) ArgList , PseudoClassName ArgList VariableName AtKeyword PropertyVariable ValueName ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral Escape Interpolation BinaryExpression BinOp LogicOp UnaryExpression UnaryQueryOp CallExpression ] SubscriptExpression [ CallLiteral CallTag ParenthesizedContent IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp InterpolatedSelector ; when } { Block ImportStatement import KeywordQuery FeatureQuery FeatureName BinaryQuery UnaryQuery ParenthesizedQuery SelectorQuery selector CallQuery ArgList SubscriptQuery MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports DetachedRuleSet PropertyName Declaration Important Inclusion IdSelector ClassSelector Inclusion CallExpression",maxTerm:133,nodeProps:[["isolate",-3,3,4,30,""],["openedBy",17,"(",59,"{"],["closedBy",26,")",60,"}"]],propSources:[w],skippedNodes:[0,3,4],repeatNodeCount:10,tokenData:"!2q~R!ZOX$tX^%l^p$tpq%lqr)Ors-xst/ltu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=`O!+v]!,wXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!+v<%lO!+v]!-gP;=`<%l!+vm!-oU|`Oy!*kyz!+vz;'S!*k;'S;=`!.R;=`<%l!+v<%lO!*km!.UXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!*k<%lO!+vm!.tP;=`<%l!*km!.|Z|`OY!.wYZ%TZw!.wwx!+cxy!.wyz!/oz#O!.w#O#P!1^#P;'S!.w;'S;=`!2e<%lO!.w]!/rWOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W<%lO!/o]!0_RO;'S!/o;'S;=`!0h;=`O!/o]!0kXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!/o<%lO!/o]!1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[d,Z,W,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:T=>z[T]||-1},{term:23,get:T=>h[T]||-1}],tokenPrec:2180}),o=i.define({name:"less",parser:g.configure({props:[n.add({Declaration:$()}),y.add({Block:P})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"@-"}}),u=m(T=>T.name=="VariableName"||T.name=="AtKeyword");function G(){return new t(o,o.data.of({autocomplete:u}))}export{G as less,u as lessCompletionSource,o as lessLanguage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as st,g as Z,h as v,X as it,N as Ee,s as Ie,T as H,p as ot,t as m,e as F,j as P,Y as z,a as fe,o as at,Z as lt,E as ht,_ as ft,$ as ut,a0 as dt,U as pt,a1 as ct,q as mt,f as Me,i as gt,a2 as kt,m as ue,a3 as Lt}from"./index-B3P6TTvD.js";import{html as bt,htmlCompletionSource as wt}from"./index-ClmokM0M.js";import"./index-DDXrdlj0.js";import"./index-nEQI8fB2.js";import"./index-W25uMuZA.js";import"./index-DgjZhEr3.js";class _{static create(e,r,n,s,i){let o=s+(s<<8)+e+(r<<4)|0;return new _(e,r,n,o,i,[],[])}constructor(e,r,n,s,i,o,a){this.type=e,this.value=r,this.from=n,this.hash=s,this.end=i,this.children=o,this.positions=a,this.hashProp=[[v.contextHash,s]]}addChild(e,r){e.prop(v.contextHash)!=this.hash&&(e=new H(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new H(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(s,i,o)=>new H(Z.none,s,i,o,this.hashProp)})}}var u;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(u||(u={}));class St{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class Ct{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return O(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let s=r;s<e;s++)n+=this.text.charCodeAt(s)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function de(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==u.OrderedList?oe:ie)(r,e,!1);return n>0&&(t.type!=u.BulletList||se(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const He={[u.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(k(u.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(A(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[u.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[u.OrderedList]:de,[u.BulletList]:de,[u.Document](){return!0}};function A(t){return t==32||t==9||t==10||t==13}function O(t,e=0){for(;e<t.length&&A(t.charCodeAt(e));)e++;return e}function pe(t,e,r){for(;e>r&&A(t.charCodeAt(e-1));)e--;return e}function Pe(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function ve(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function se(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let s=t.pos+1;s<t.text.length;s++){let i=t.text.charCodeAt(s);if(i==t.next)n++;else if(!A(i))return-1}return r&&t.next==45&&Re(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(De.SetextHeading)>-1||n<3?-1:1}function Ne(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function ie(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||A(t.text.charCodeAt(t.pos+1)))&&(!r||Ne(e,u.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function oe(t,e,r){let n=t.pos,s=t.next;for(;s>=48&&s<=57;){n++;if(n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||s!=46&&s!=41||n<t.text.length-1&&!A(t.text.charCodeAt(n+1))||r&&!Ne(e,u.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function ye(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function Re(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&A(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const W=/^[ \t]*$/,Oe=/-->/,Te=/\?>/,ee=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Oe],[/^\s*<\?/,Te],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,W],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,W]];function ze(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let s=0,i=ee.length-(r?1:0);s<i;s++)if(ee[s][0].test(n))return s;return-1}function ce(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function x(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==u.CodeText?t[n].to=r:t.push(k(u.CodeText,e,r))}const $={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),s=t.lineStart+n,i=t.lineStart+e.text.length,o=[],a=[];for(x(o,s,i);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){x(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let h of a)h.type==u.CodeText?x(o,h.from,h.to):o.push(h);a=[]}x(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);i=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<i&&x(o,l,i)}}return a.length&&(a=a.filter(l=>l.type!=u.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-s).finish(u.CodeBlock,i-s),s),!0},FencedCode(t,e){let r=Pe(e);if(r<0)return!1;let n=t.lineStart+e.pos,s=e.next,i=r-e.pos,o=e.skipSpace(r),a=pe(e.text,e.text.length,o),l=[k(u.CodeMark,n,n+i)];o<a&&l.push(k(u.CodeInfo,t.lineStart+o,t.lineStart+a));for(let h=!0,f=!0,p=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==s;)d++;if(d-e.pos>=i&&e.skipSpace(d)==e.text.length){for(let c of e.markers)l.push(c);f&&p&&x(l,t.lineStart-1,t.lineStart),l.push(k(u.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{p=!0,h||(x(l,t.lineStart-1,t.lineStart),f=!1);for(let g of e.markers)l.push(g);let c=t.lineStart+e.basePos,L=t.lineStart+e.text.length;c<L&&(x(l,c,L),f=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish(u.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=ve(e);return r<0?!1:(t.startContext(u.Blockquote,e.pos),t.addNode(u.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(se(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(u.HorizontalRule,r),!0},BulletList(t,e){let r=ie(e,t,!1);if(r<0)return!1;t.block.type!=u.BulletList&&t.startContext(u.BulletList,e.basePos,e.next);let n=ce(e,e.pos+1);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=oe(e,t,!1);if(r<0)return!1;t.block.type!=u.OrderedList&&t.startContext(u.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=ce(e,e.pos+r);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=ye(e);if(r<0)return!1;let n=e.pos,s=t.lineStart+n,i=pe(e.text,e.text.length,n),o=i;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==i||o==n||!A(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(u.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,o),s+r+1),-s);o<e.text.length&&a.write(u.HeaderMark,o-n,i-n);let l=a.finish(u.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,s),!0},HTMLBlock(t,e){let r=ze(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,s=ee[r][1],i=[],o=s!=W;for(;!s.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)i.push(h)}o&&t.nextLine();let a=s==Oe?u.CommentBlock:s==Te?u.ProcessingInstructionBlock:u.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(i,-n).finish(a,l-n),n),!0},SetextHeading:void 0};class At{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let s=n.content+`
|
|
1
|
+
import{P as st,g as Z,h as v,X as it,N as Ee,s as Ie,T as H,p as ot,t as m,e as F,j as P,Y as z,a as fe,o as at,Z as lt,E as ht,_ as ft,$ as ut,a0 as dt,U as pt,a1 as ct,q as mt,f as Me,i as gt,a2 as kt,m as ue,a3 as Lt}from"./index-BzVyUKXW.js";import{html as bt,htmlCompletionSource as wt}from"./index-BX9en7bH.js";import"./index-B4TIVWAq.js";import"./index-D_Pj9S7y.js";import"./index-DDagpuEn.js";import"./index-snpaQsNQ.js";class _{static create(e,r,n,s,i){let o=s+(s<<8)+e+(r<<4)|0;return new _(e,r,n,o,i,[],[])}constructor(e,r,n,s,i,o,a){this.type=e,this.value=r,this.from=n,this.hash=s,this.end=i,this.children=o,this.positions=a,this.hashProp=[[v.contextHash,s]]}addChild(e,r){e.prop(v.contextHash)!=this.hash&&(e=new H(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new H(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(s,i,o)=>new H(Z.none,s,i,o,this.hashProp)})}}var u;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(u||(u={}));class St{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}}class Ct{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return O(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let s=r;s<e;s++)n+=this.text.charCodeAt(s)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}}function de(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==u.OrderedList?oe:ie)(r,e,!1);return n>0&&(t.type!=u.BulletList||se(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}const He={[u.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(k(u.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(A(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[u.ListItem](t,e,r){return r.indent<r.baseIndent+t.value&&r.next>-1?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[u.OrderedList]:de,[u.BulletList]:de,[u.Document](){return!0}};function A(t){return t==32||t==9||t==10||t==13}function O(t,e=0){for(;e<t.length&&A(t.charCodeAt(e));)e++;return e}function pe(t,e,r){for(;e>r&&A(t.charCodeAt(e-1));)e--;return e}function Pe(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function ve(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function se(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let s=t.pos+1;s<t.text.length;s++){let i=t.text.charCodeAt(s);if(i==t.next)n++;else if(!A(i))return-1}return r&&t.next==45&&Re(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(De.SetextHeading)>-1||n<3?-1:1}function Ne(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function ie(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||A(t.text.charCodeAt(t.pos+1)))&&(!r||Ne(e,u.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function oe(t,e,r){let n=t.pos,s=t.next;for(;s>=48&&s<=57;){n++;if(n==t.text.length)return-1;s=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||s!=46&&s!=41||n<t.text.length-1&&!A(t.text.charCodeAt(n+1))||r&&!Ne(e,u.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function ye(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let r=e-t.pos;return r>6?-1:r}function Re(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&A(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}const W=/^[ \t]*$/,Oe=/-->/,Te=/\?>/,ee=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Oe],[/^\s*<\?/,Te],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,W],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,W]];function ze(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let s=0,i=ee.length-(r?1:0);s<i;s++)if(ee[s][0].test(n))return s;return-1}function ce(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.countIndent(t.skipSpace(e),e,r);return n>=r+5?r+1:n}function x(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==u.CodeText?t[n].to=r:t.push(k(u.CodeText,e,r))}const $={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),s=t.lineStart+n,i=t.lineStart+e.text.length,o=[],a=[];for(x(o,s,i);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){x(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<r)break;{if(a.length){for(let h of a)h.type==u.CodeText?x(o,h.from,h.to):o.push(h);a=[]}x(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);i=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<i&&x(o,l,i)}}return a.length&&(a=a.filter(l=>l.type!=u.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-s).finish(u.CodeBlock,i-s),s),!0},FencedCode(t,e){let r=Pe(e);if(r<0)return!1;let n=t.lineStart+e.pos,s=e.next,i=r-e.pos,o=e.skipSpace(r),a=pe(e.text,e.text.length,o),l=[k(u.CodeMark,n,n+i)];o<a&&l.push(k(u.CodeInfo,t.lineStart+o,t.lineStart+a));for(let h=!0,f=!0,p=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==s;)d++;if(d-e.pos>=i&&e.skipSpace(d)==e.text.length){for(let c of e.markers)l.push(c);f&&p&&x(l,t.lineStart-1,t.lineStart),l.push(k(u.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{p=!0,h||(x(l,t.lineStart-1,t.lineStart),f=!1);for(let g of e.markers)l.push(g);let c=t.lineStart+e.basePos,L=t.lineStart+e.text.length;c<L&&(x(l,c,L),f=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish(u.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=ve(e);return r<0?!1:(t.startContext(u.Blockquote,e.pos),t.addNode(u.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(se(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode(u.HorizontalRule,r),!0},BulletList(t,e){let r=ie(e,t,!1);if(r<0)return!1;t.block.type!=u.BulletList&&t.startContext(u.BulletList,e.basePos,e.next);let n=ce(e,e.pos+1);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},OrderedList(t,e){let r=oe(e,t,!1);if(r<0)return!1;t.block.type!=u.OrderedList&&t.startContext(u.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=ce(e,e.pos+r);return t.startContext(u.ListItem,e.basePos,n-e.baseIndent),t.addNode(u.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),null},ATXHeading(t,e){let r=ye(e);if(r<0)return!1;let n=e.pos,s=t.lineStart+n,i=pe(e.text,e.text.length,n),o=i;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==i||o==n||!A(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(u.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,o),s+r+1),-s);o<e.text.length&&a.write(u.HeaderMark,o-n,i-n);let l=a.finish(u.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,s),!0},HTMLBlock(t,e){let r=ze(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,s=ee[r][1],i=[],o=s!=W;for(;!s.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)i.push(h)}o&&t.nextLine();let a=s==Oe?u.CommentBlock:s==Te?u.ProcessingInstructionBlock:u.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(i,-n).finish(a,l-n),n),!0},SetextHeading:void 0};class At{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let s=n.content+`
|
|
2
2
|
`+r.scrub(),i=this.advance(s);return i>-1&&i<s.length?this.complete(e,n,i):!1}finish(e,r){return(this.stage==2||this.stage==3)&&O(r.content,this.pos)==r.content.length?this.complete(e,r,r.content.length):!1}complete(e,r,n){return e.addLeafElement(r,k(u.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Qe(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(k(u.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(qe(e,O(e,this.pos),this.start)))return-1}else if(this.stage==2){let r=O(e,this.pos),n=0;if(r>this.pos){let s=Ze(e,r,this.start);if(s){let i=V(e,s.to-this.start);i>0&&(this.nextStage(s),n=i)}}return n||(n=V(e,this.pos)),n>0&&n<e.length?n:-1}else return V(e,this.pos)}}}function V(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!A(r))return-1}return e}class xt{nextLine(e,r,n){let s=r.depth<e.stack.length?-1:Re(r),i=r.next;if(s<0)return!1;let o=k(u.HeaderMark,e.lineStart+r.pos,e.lineStart+s);return e.nextLine(),e.addLeafElement(n,k(i==61?u.SetextHeading1:u.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),o])),!0}finish(){return!1}}const De={LinkReference(t,e){return e.content.charCodeAt(0)==91?new At(e):null},SetextHeading(){return new xt}},Bt=[(t,e)=>ye(e)>=0,(t,e)=>Pe(e)>=0,(t,e)=>ve(e)>=0,(t,e)=>ie(e,t,!0)>=0,(t,e)=>oe(e,t,!0)>=0,(t,e)=>se(e,t,!0)>=0,(t,e)=>ze(e,t,!0)>=0],Et={text:"",end:0};class It{constructor(e,r,n,s){this.parser=e,this.input=r,this.ranges=s,this.line=new Ct,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=s[s.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=s[0].from,this.block=_.create(u.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new Pt(n,r):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let s=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!s||e.markers[n].from<s.end);){let i=e.markers[n++];this.addNode(i.type,i.from,i.to)}if(!s)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let s=n(this,e);if(s!=!1){if(s==!0)return null;e.forward();continue e}}break}let r=new St(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let s=n(this,r);s&&r.parsers.push(s)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,r))break e}for(let n of r.parsers)if(n.nextLine(this,e,r))return null;r.content+=`
|
|
3
3
|
`+e.scrub();for(let n of e.markers)r.marks.push(n)}return this.finishLeaf(r),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let r=this.fragments.takeNodes(this);return r?(this.absoluteLineStart+=r,this.lineStart=Ve(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let r=Et;if(r.end=e,e>=this.to)r.text="";else if(r.text=this.lineChunkAt(e),r.end+=r.text.length,this.ranges.length>1){let n=this.absoluteLineStart,s=this.rangeI;for(;this.ranges[s].to<r.end;){s++;let i=this.ranges[s].from,o=this.lineChunkAt(i);r.end=i+o.length,r.text=r.text.slice(0,this.ranges[s-1].to-n)+o,n=r.end-r.text.length}}return r}readLine(){let{line:e}=this,{text:r,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(r);e.depth<this.stack.length;e.depth++){let s=this.stack[e.depth],i=this.parser.skipContextMarkup[s.type];if(!i)throw new Error("Unhandled block context "+u[s.type]);let o=this.line.markers.length;if(!i(s,this,e)){this.line.markers.length>o&&(s.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let r=this.input.chunk(e),n;if(this.input.lineChunks)n=r==`
|
|
4
4
|
`?"":r;else{let s=r.indexOf(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as Ce}from"./index-DDXrdlj0.js";import{a4 as xe,a5 as Ee,a6 as _e,a7 as Te,a8 as Oe,a9 as $e,aa as Le,ab as Me,ac as We,ad as Be,ae as Ne,af as Ke,ag as we,ah as De,q as Y,ai as He,aj as Se,ak as Ie,al as je,am as Ae,an as Ue,ao as ze,ap as Ge,aq as Re,$ as Fe,Z as pe,ar as Pe,E as g,as as Ve,t as a,at as qe,au as Je,S as Ye,av as Ze}from"./index-B3P6TTvD.js";function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ie.apply(null,arguments)}function Qe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ce=function(t){t===void 0&&(t={});var r=t,n=r.crosshairCursor,h=n===void 0?!1:n,o=[];t.closeBracketsKeymap!==!1&&(o=o.concat(xe)),t.defaultKeymap!==!1&&(o=o.concat(Ee)),t.searchKeymap!==!1&&(o=o.concat(_e)),t.historyKeymap!==!1&&(o=o.concat(Te)),t.foldKeymap!==!1&&(o=o.concat(Oe)),t.completionKeymap!==!1&&(o=o.concat($e)),t.lintKeymap!==!1&&(o=o.concat(Le));var i=[];return t.lineNumbers!==!1&&i.push(Me()),t.highlightActiveLineGutter!==!1&&i.push(We()),t.highlightSpecialChars!==!1&&i.push(Be()),t.history!==!1&&i.push(Ne()),t.foldGutter!==!1&&i.push(Ke()),t.drawSelection!==!1&&i.push(we()),t.dropCursor!==!1&&i.push(De()),t.allowMultipleSelections!==!1&&i.push(Y.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&i.push(He()),t.syntaxHighlighting!==!1&&i.push(Se(Pe,{fallback:!0})),t.bracketMatching!==!1&&i.push(Ie()),t.closeBrackets!==!1&&i.push(je()),t.autocompletion!==!1&&i.push(Ae()),t.rectangularSelection!==!1&&i.push(Ue()),h!==!1&&i.push(ze()),t.highlightActiveLine!==!1&&i.push(Ge()),t.highlightSelectionMatches!==!1&&i.push(Re()),t.tabSize&&typeof t.tabSize=="number"&&i.push(Fe.of(" ".repeat(t.tabSize))),i.concat([pe.of(o.flat())]).filter(Boolean)};const Xe="#e5c07b",he="#e06c75",et="#56b6c2",tt="#ffffff",J="#abb2bf",re="#7d8799",at="#61afef",it="#98c379",ue="#d19a66",rt="#c678dd",nt="#21252b",de="#2c313a",fe="#282c34",ee="#353a42",ot="#3E4451",me="#528bff",st=g.theme({"&":{color:J,backgroundColor:fe},".cm-content":{caretColor:me},".cm-cursor, .cm-dropCursor":{borderLeftColor:me},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ot},".cm-panels":{backgroundColor:nt,color:J},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:fe,color:re,border:"none"},".cm-activeLineGutter":{backgroundColor:de},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ee},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ee,borderBottomColor:ee},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:de,color:J}}},{dark:!0}),lt=Ve.define([{tag:a.keyword,color:rt},{tag:[a.name,a.deleted,a.character,a.propertyName,a.macroName],color:he},{tag:[a.function(a.variableName),a.labelName],color:at},{tag:[a.color,a.constant(a.name),a.standard(a.name)],color:ue},{tag:[a.definition(a.name),a.separator],color:J},{tag:[a.typeName,a.className,a.number,a.changed,a.annotation,a.modifier,a.self,a.namespace],color:Xe},{tag:[a.operator,a.operatorKeyword,a.url,a.escape,a.regexp,a.link,a.special(a.string)],color:et},{tag:[a.meta,a.comment],color:re},{tag:a.strong,fontWeight:"bold"},{tag:a.emphasis,fontStyle:"italic"},{tag:a.strikethrough,textDecoration:"line-through"},{tag:a.link,color:re,textDecoration:"underline"},{tag:a.heading,fontWeight:"bold",color:he},{tag:[a.atom,a.bool,a.special(a.variableName)],color:ue},{tag:[a.processingInstruction,a.string,a.inserted],color:it},{tag:a.invalid,color:tt}]),ct=[st,Se(lt)];var ht=g.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),ut=function(t){t===void 0&&(t={});var r=t,n=r.indentWithTab,h=n===void 0?!0:n,o=r.editable,i=o===void 0?!0:o,b=r.readOnly,_=b===void 0?!1:b,v=r.theme,S=v===void 0?"light":v,p=r.placeholder,y=p===void 0?"":p,m=r.basicSetup,u=m===void 0?!0:m,l=[];switch(h&&l.unshift(pe.of([qe])),u&&(typeof u=="boolean"?l.unshift(ce()):l.unshift(ce(u))),y&&l.unshift(Je(y)),S){case"light":l.push(ht);break;case"dark":l.push(ct);break;case"none":break;default:l.push(S);break}return i===!1&&l.push(g.editable.of(!1)),_&&l.push(Y.readOnly.of(!0)),[...l]},dt=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class ft{constructor(t,r){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=r,this.timeoutMS=r,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(r=>{try{r()}catch(n){console.error("TimeoutLatch callback error:",n)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class ge{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var te=null,mt=()=>typeof window>"u"?new ge:(te||(te=new ge),te),gt=g.theme({"& .cm-scroller":{height:"100% !important"}}),be=null,ae=null;function bt(e,t,r,n,h,o){if(!e&&!t&&!r&&!n&&!h&&!o)return null;var i=JSON.stringify({height:e,minHeight:t,maxHeight:r,width:n,minWidth:h,maxWidth:o});return i===be||(be=i,ae=g.theme({"&":{height:e,minHeight:t,maxHeight:r,width:n,minWidth:h,maxWidth:o}})),ae}var ve=Ze.define(),vt=200,St=[];function pt(e){var t=e.value,r=e.selection,n=e.onChange,h=e.onStatistics,o=e.onCreateEditor,i=e.onUpdate,b=e.extensions,_=b===void 0?St:b,v=e.autoFocus,S=e.theme,p=S===void 0?"light":S,y=e.height,m=y===void 0?null:y,u=e.minHeight,l=u===void 0?null:u,W=e.maxHeight,B=W===void 0?null:W,N=e.width,K=N===void 0?null:N,w=e.minWidth,D=w===void 0?null:w,H=e.maxWidth,I=H===void 0?null:H,j=e.placeholder,A=j===void 0?"":j,U=e.editable,z=U===void 0?!0:U,G=e.readOnly,T=G===void 0?!1:G,k=e.indentWithTab,O=k===void 0?!0:k,$=e.basicSetup,R=$===void 0?!0:$,F=e.root,L=e.initialState,P=c.useState(),C=P[0],ne=P[1],oe=c.useState(),s=oe[0],V=oe[1],se=c.useState(),Z=se[0],Q=se[1],d=c.useState(()=>({current:null}))[0],q=c.useState(()=>({current:null}))[0],le=bt(m,l,B,K,D,I),ye=g.updateListener.of(f=>{if(f.docChanged&&typeof n=="function"&&!f.transactions.some(X=>X.annotation(ve))){d.current?d.current.reset():(d.current=new ft(()=>{if(q.current){var X=q.current;q.current=null,X()}d.current=null},vt),mt().add(d.current));var x=f.state.doc,E=x.toString();n(E,f)}h&&h(dt(f))}),ke=ut({theme:p,editable:z,readOnly:T,placeholder:A,indentWithTab:O,basicSetup:R}),M=[ye,...le?[le]:[],gt,...ke];return i&&typeof i=="function"&&M.push(g.updateListener.of(i)),M=M.concat(_),c.useLayoutEffect(()=>{if(C&&!Z){var f={doc:t,selection:r,extensions:M},x=L?Y.fromJSON(L.json,f,L.fields):Y.create(f);if(Q(x),!s){var E=new g({state:x,parent:C,root:F});V(E),o&&o(E,x)}}return()=>{s&&(Q(void 0),V(void 0))}},[C,Z]),c.useEffect(()=>{e.container&&ne(e.container)},[e.container]),c.useEffect(()=>()=>{s&&(s.destroy(),V(void 0)),d.current&&(d.current.cancel(),d.current=null)},[s]),c.useEffect(()=>{v&&s&&s.focus()},[v,s]),c.useEffect(()=>{s&&s.dispatch({effects:Ye.reconfigure.of(M)})},[p,_,m,l,B,K,D,I,A,z,T,O,R,n,i]),c.useEffect(()=>{if(t!==void 0){var f=s?s.state.doc.toString():"";if(s&&t!==f){var x=d.current&&!d.current.isDone,E=()=>{s&&t!==s.state.doc.toString()&&s.dispatch({changes:{from:0,to:s.state.doc.toString().length,insert:t||""},annotations:[ve.of(!0)]})};x?q.current=E:E()}}},[t,s]),{state:Z,setState:Q,view:s,setView:V,container:C,setContainer:ne}}var yt=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],kt=c.forwardRef((e,t)=>{var r=e.className,n=e.value,h=n===void 0?"":n,o=e.selection,i=e.extensions,b=i===void 0?[]:i,_=e.onChange,v=e.onStatistics,S=e.onCreateEditor,p=e.onUpdate,y=e.autoFocus,m=e.theme,u=m===void 0?"light":m,l=e.height,W=e.minHeight,B=e.maxHeight,N=e.width,K=e.minWidth,w=e.maxWidth,D=e.basicSetup,H=e.placeholder,I=e.indentWithTab,j=e.editable,A=e.readOnly,U=e.root,z=e.initialState,G=Qe(e,yt),T=c.useRef(null),k=pt({root:U,value:h,autoFocus:y,theme:u,height:l,minHeight:W,maxHeight:B,width:N,minWidth:K,maxWidth:w,basicSetup:D,placeholder:H,indentWithTab:I,editable:j,readOnly:A,selection:o,onChange:_,onStatistics:v,onCreateEditor:S,onUpdate:p,extensions:b,initialState:z}),O=k.state,$=k.view,R=k.container,F=k.setContainer;c.useImperativeHandle(t,()=>({editor:T.current,state:O,view:$}),[T,R,O,$]);var L=c.useCallback(C=>{T.current=C,F(C)},[F]);if(typeof h!="string")throw new Error("value must be typeof string but got "+typeof h);var P=typeof u=="string"?"cm-theme-"+u:"cm-theme";return Ce.jsx("div",ie({ref:L,className:""+P+(r?" "+r:"")},G))});kt.displayName="CodeMirror";export{kt as R};
|
|
1
|
+
import{r as c,j as Ce}from"./index-B4TIVWAq.js";import{a4 as xe,a5 as Ee,a6 as _e,a7 as Te,a8 as Oe,a9 as $e,aa as Le,ab as Me,ac as We,ad as Be,ae as Ne,af as Ke,ag as we,ah as De,q as Y,ai as He,aj as Se,ak as Ie,al as je,am as Ae,an as Ue,ao as ze,ap as Ge,aq as Re,$ as Fe,Z as pe,ar as Pe,E as g,as as Ve,t as a,at as qe,au as Je,S as Ye,av as Ze}from"./index-BzVyUKXW.js";function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ie.apply(null,arguments)}function Qe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ce=function(t){t===void 0&&(t={});var r=t,n=r.crosshairCursor,h=n===void 0?!1:n,o=[];t.closeBracketsKeymap!==!1&&(o=o.concat(xe)),t.defaultKeymap!==!1&&(o=o.concat(Ee)),t.searchKeymap!==!1&&(o=o.concat(_e)),t.historyKeymap!==!1&&(o=o.concat(Te)),t.foldKeymap!==!1&&(o=o.concat(Oe)),t.completionKeymap!==!1&&(o=o.concat($e)),t.lintKeymap!==!1&&(o=o.concat(Le));var i=[];return t.lineNumbers!==!1&&i.push(Me()),t.highlightActiveLineGutter!==!1&&i.push(We()),t.highlightSpecialChars!==!1&&i.push(Be()),t.history!==!1&&i.push(Ne()),t.foldGutter!==!1&&i.push(Ke()),t.drawSelection!==!1&&i.push(we()),t.dropCursor!==!1&&i.push(De()),t.allowMultipleSelections!==!1&&i.push(Y.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&i.push(He()),t.syntaxHighlighting!==!1&&i.push(Se(Pe,{fallback:!0})),t.bracketMatching!==!1&&i.push(Ie()),t.closeBrackets!==!1&&i.push(je()),t.autocompletion!==!1&&i.push(Ae()),t.rectangularSelection!==!1&&i.push(Ue()),h!==!1&&i.push(ze()),t.highlightActiveLine!==!1&&i.push(Ge()),t.highlightSelectionMatches!==!1&&i.push(Re()),t.tabSize&&typeof t.tabSize=="number"&&i.push(Fe.of(" ".repeat(t.tabSize))),i.concat([pe.of(o.flat())]).filter(Boolean)};const Xe="#e5c07b",he="#e06c75",et="#56b6c2",tt="#ffffff",J="#abb2bf",re="#7d8799",at="#61afef",it="#98c379",ue="#d19a66",rt="#c678dd",nt="#21252b",de="#2c313a",fe="#282c34",ee="#353a42",ot="#3E4451",me="#528bff",st=g.theme({"&":{color:J,backgroundColor:fe},".cm-content":{caretColor:me},".cm-cursor, .cm-dropCursor":{borderLeftColor:me},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ot},".cm-panels":{backgroundColor:nt,color:J},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:fe,color:re,border:"none"},".cm-activeLineGutter":{backgroundColor:de},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ee},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ee,borderBottomColor:ee},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:de,color:J}}},{dark:!0}),lt=Ve.define([{tag:a.keyword,color:rt},{tag:[a.name,a.deleted,a.character,a.propertyName,a.macroName],color:he},{tag:[a.function(a.variableName),a.labelName],color:at},{tag:[a.color,a.constant(a.name),a.standard(a.name)],color:ue},{tag:[a.definition(a.name),a.separator],color:J},{tag:[a.typeName,a.className,a.number,a.changed,a.annotation,a.modifier,a.self,a.namespace],color:Xe},{tag:[a.operator,a.operatorKeyword,a.url,a.escape,a.regexp,a.link,a.special(a.string)],color:et},{tag:[a.meta,a.comment],color:re},{tag:a.strong,fontWeight:"bold"},{tag:a.emphasis,fontStyle:"italic"},{tag:a.strikethrough,textDecoration:"line-through"},{tag:a.link,color:re,textDecoration:"underline"},{tag:a.heading,fontWeight:"bold",color:he},{tag:[a.atom,a.bool,a.special(a.variableName)],color:ue},{tag:[a.processingInstruction,a.string,a.inserted],color:it},{tag:a.invalid,color:tt}]),ct=[st,Se(lt)];var ht=g.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),ut=function(t){t===void 0&&(t={});var r=t,n=r.indentWithTab,h=n===void 0?!0:n,o=r.editable,i=o===void 0?!0:o,b=r.readOnly,_=b===void 0?!1:b,v=r.theme,S=v===void 0?"light":v,p=r.placeholder,y=p===void 0?"":p,m=r.basicSetup,u=m===void 0?!0:m,l=[];switch(h&&l.unshift(pe.of([qe])),u&&(typeof u=="boolean"?l.unshift(ce()):l.unshift(ce(u))),y&&l.unshift(Je(y)),S){case"light":l.push(ht);break;case"dark":l.push(ct);break;case"none":break;default:l.push(S);break}return i===!1&&l.push(g.editable.of(!1)),_&&l.push(Y.readOnly.of(!0)),[...l]},dt=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class ft{constructor(t,r){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=r,this.timeoutMS=r,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(r=>{try{r()}catch(n){console.error("TimeoutLatch callback error:",n)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class ge{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var te=null,mt=()=>typeof window>"u"?new ge:(te||(te=new ge),te),gt=g.theme({"& .cm-scroller":{height:"100% !important"}}),be=null,ae=null;function bt(e,t,r,n,h,o){if(!e&&!t&&!r&&!n&&!h&&!o)return null;var i=JSON.stringify({height:e,minHeight:t,maxHeight:r,width:n,minWidth:h,maxWidth:o});return i===be||(be=i,ae=g.theme({"&":{height:e,minHeight:t,maxHeight:r,width:n,minWidth:h,maxWidth:o}})),ae}var ve=Ze.define(),vt=200,St=[];function pt(e){var t=e.value,r=e.selection,n=e.onChange,h=e.onStatistics,o=e.onCreateEditor,i=e.onUpdate,b=e.extensions,_=b===void 0?St:b,v=e.autoFocus,S=e.theme,p=S===void 0?"light":S,y=e.height,m=y===void 0?null:y,u=e.minHeight,l=u===void 0?null:u,W=e.maxHeight,B=W===void 0?null:W,N=e.width,K=N===void 0?null:N,w=e.minWidth,D=w===void 0?null:w,H=e.maxWidth,I=H===void 0?null:H,j=e.placeholder,A=j===void 0?"":j,U=e.editable,z=U===void 0?!0:U,G=e.readOnly,T=G===void 0?!1:G,k=e.indentWithTab,O=k===void 0?!0:k,$=e.basicSetup,R=$===void 0?!0:$,F=e.root,L=e.initialState,P=c.useState(),C=P[0],ne=P[1],oe=c.useState(),s=oe[0],V=oe[1],se=c.useState(),Z=se[0],Q=se[1],d=c.useState(()=>({current:null}))[0],q=c.useState(()=>({current:null}))[0],le=bt(m,l,B,K,D,I),ye=g.updateListener.of(f=>{if(f.docChanged&&typeof n=="function"&&!f.transactions.some(X=>X.annotation(ve))){d.current?d.current.reset():(d.current=new ft(()=>{if(q.current){var X=q.current;q.current=null,X()}d.current=null},vt),mt().add(d.current));var x=f.state.doc,E=x.toString();n(E,f)}h&&h(dt(f))}),ke=ut({theme:p,editable:z,readOnly:T,placeholder:A,indentWithTab:O,basicSetup:R}),M=[ye,...le?[le]:[],gt,...ke];return i&&typeof i=="function"&&M.push(g.updateListener.of(i)),M=M.concat(_),c.useLayoutEffect(()=>{if(C&&!Z){var f={doc:t,selection:r,extensions:M},x=L?Y.fromJSON(L.json,f,L.fields):Y.create(f);if(Q(x),!s){var E=new g({state:x,parent:C,root:F});V(E),o&&o(E,x)}}return()=>{s&&(Q(void 0),V(void 0))}},[C,Z]),c.useEffect(()=>{e.container&&ne(e.container)},[e.container]),c.useEffect(()=>()=>{s&&(s.destroy(),V(void 0)),d.current&&(d.current.cancel(),d.current=null)},[s]),c.useEffect(()=>{v&&s&&s.focus()},[v,s]),c.useEffect(()=>{s&&s.dispatch({effects:Ye.reconfigure.of(M)})},[p,_,m,l,B,K,D,I,A,z,T,O,R,n,i]),c.useEffect(()=>{if(t!==void 0){var f=s?s.state.doc.toString():"";if(s&&t!==f){var x=d.current&&!d.current.isDone,E=()=>{s&&t!==s.state.doc.toString()&&s.dispatch({changes:{from:0,to:s.state.doc.toString().length,insert:t||""},annotations:[ve.of(!0)]})};x?q.current=E:E()}}},[t,s]),{state:Z,setState:Q,view:s,setView:V,container:C,setContainer:ne}}var yt=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],kt=c.forwardRef((e,t)=>{var r=e.className,n=e.value,h=n===void 0?"":n,o=e.selection,i=e.extensions,b=i===void 0?[]:i,_=e.onChange,v=e.onStatistics,S=e.onCreateEditor,p=e.onUpdate,y=e.autoFocus,m=e.theme,u=m===void 0?"light":m,l=e.height,W=e.minHeight,B=e.maxHeight,N=e.width,K=e.minWidth,w=e.maxWidth,D=e.basicSetup,H=e.placeholder,I=e.indentWithTab,j=e.editable,A=e.readOnly,U=e.root,z=e.initialState,G=Qe(e,yt),T=c.useRef(null),k=pt({root:U,value:h,autoFocus:y,theme:u,height:l,minHeight:W,maxHeight:B,width:N,minWidth:K,maxWidth:w,basicSetup:D,placeholder:H,indentWithTab:I,editable:j,readOnly:A,selection:o,onChange:_,onStatistics:v,onCreateEditor:S,onUpdate:p,extensions:b,initialState:z}),O=k.state,$=k.view,R=k.container,F=k.setContainer;c.useImperativeHandle(t,()=>({editor:T.current,state:O,view:$}),[T,R,O,$]);var L=c.useCallback(C=>{T.current=C,F(C)},[F]);if(typeof h!="string")throw new Error("value must be typeof string but got "+typeof h);var P=typeof u=="string"?"cm-theme-"+u:"cm-theme";return Ce.jsx("div",ie({ref:L,className:""+P+(r?" "+r:"")},G))});kt.displayName="CodeMirror";export{kt as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as t,j as e,J as l,K as i,B as r}from"./index-
|
|
1
|
+
import{G as t,j as e,J as l,K as i,B as r}from"./index-B4TIVWAq.js";import{T as x,L as p,N as u}from"./index-B4TIVWAq.js";function d(){const{pendingOffer:s,pendingOfferId:a,acceptOffer:n,declineOffer:o}=t();return!s||a===null||!s.offerLine?null:e.jsxs(l.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"group","aria-label":"DorkBot suggestion",className:"bg-secondary/60 mt-1.5 flex flex-col gap-2 rounded-lg border p-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"mt-0.5 shrink-0",children:[e.jsx(i,{size:18,className:"dark:hidden"}),e.jsx(i,{variant:"white",size:18,className:"hidden dark:block"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:s.offerLine})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-6",children:[e.jsx(r,{size:"sm",onClick:()=>n(a),children:"Show me"}),e.jsx(r,{size:"sm",variant:"ghost",onClick:()=>o(a),children:"Later"})]})]})}export{x as TOUR_DEFINITIONS,p as TourHost,d as TourOfferChips,u as useTourOccasions,t as useTours};
|