@zhanguym/chatroom 1.2.0-beta.0 → 1.2.0-beta.1
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/dist/app/application.d.ts +2 -0
- package/dist/app/application.js +7 -1
- package/dist/app/lifecycle.js +6 -0
- package/dist/auth/auth-service.js +5 -1
- package/dist/infrastructure/database/custom-mcp-repository.d.ts +9 -0
- package/dist/infrastructure/database/custom-mcp-repository.js +37 -0
- package/dist/infrastructure/database/mcp-tool-settings-repository.d.ts +1 -0
- package/dist/infrastructure/database/mcp-tool-settings-repository.js +6 -0
- package/dist/infrastructure/database/schema.d.ts +1 -1
- package/dist/infrastructure/database/schema.js +9 -0
- package/dist/mcp/custom/manager.d.ts +54 -0
- package/dist/mcp/custom/manager.js +494 -0
- package/dist/mcp/custom/oauth.d.ts +38 -0
- package/dist/mcp/custom/oauth.js +116 -0
- package/dist/mcp/custom/types.d.ts +42 -0
- package/dist/mcp/custom/types.js +1 -0
- package/dist/mcp/server/create-mcp-server.d.ts +2 -1
- package/dist/mcp/server/create-mcp-server.js +4 -3
- package/dist/mcp/server/tool-control.d.ts +5 -0
- package/dist/mcp/server/tool-control.js +17 -0
- package/dist/native/linux/chatroom-computer-helper +0 -0
- package/dist/native/macos/ChatRoomComputerHelper.app/Contents/MacOS/chatroom-computer-helper +0 -0
- package/dist/native/windows/chatroom-computer-helper.exe +0 -0
- package/dist/plugins/computer/computer-schemas.d.ts +8 -8
- package/dist/plugins/types.d.ts +2 -0
- package/dist/plugins/web/api-types.d.ts +2 -0
- package/dist/plugins/web/http/api-router.js +3 -0
- package/dist/plugins/web/http/custom-mcp-api-router.d.ts +6 -0
- package/dist/plugins/web/http/custom-mcp-api-router.js +114 -0
- package/dist/plugins/web/plugin.js +1 -1
- package/dist/plugins/web/runtime.d.ts +3 -1
- package/dist/plugins/web/runtime.js +3 -1
- package/dist/web/assets/{AgentView-DQr-5aLK.js → AgentView-BEA5mQVv.js} +3 -3
- package/dist/web/assets/{CloudView-B2VBut3O.js → CloudView-BGcVSE22.js} +1 -1
- package/dist/web/assets/CodeViewer.vue_vue_type_script_setup_true_lang-DfPmlGC0.js +3 -0
- package/dist/web/assets/ComputerView-Bz2Wsz2X.css +1 -0
- package/dist/web/assets/{ComputerView-CIFF1zUb.js → ComputerView-D6_NSXKb.js} +1 -1
- package/dist/web/assets/{MarkdownContent-DRZp88_G.js → MarkdownContent-DCkAALOF.js} +1 -1
- package/dist/web/assets/McpToolsView--8UloObb.js +2 -0
- package/dist/web/assets/McpToolsView-DdYOoY9_.css +1 -0
- package/dist/web/assets/{OperationsView-B_Nv1Mgi.js → OperationsView-CqgAPnSL.js} +2 -2
- package/dist/web/assets/{ProcessesView-5K8wNiPC.js → ProcessesView-DC0tjiYU.js} +2 -2
- package/dist/web/assets/{StateChip.vue_vue_type_script_setup_true_lang-CQEj-YRM.js → StateChip.vue_vue_type_script_setup_true_lang-D_LKEtqT.js} +1 -1
- package/dist/web/assets/SystemLogsView-DkTeUr2k.js +1 -0
- package/dist/web/assets/{TerminalView-DNaKG3II.css → TerminalView-Coze7IMj.css} +1 -1
- package/dist/web/assets/{TerminalView-Dvyy2GKF.js → TerminalView-DEP1U0aW.js} +2 -2
- package/dist/web/assets/VSelect-B5-t612C.js +1 -0
- package/dist/web/assets/VSheet-CNayLacf.js +1 -0
- package/dist/web/assets/VSpacer-BYe3Z99W.js +1 -0
- package/dist/web/assets/{VSwitch-CvQYU48e.js → VSwitch-cVRCnipJ.js} +1 -1
- package/dist/web/assets/{VTabs-CftrBFlF.js → VTabs-HKX286IT.js} +1 -1
- package/dist/web/assets/{VTextarea-Dcui00tn.js → VTextarea-ypCBuKI-.js} +1 -1
- package/dist/web/assets/WorkspaceDownloadPreview-qwbTkU59.js +1 -0
- package/dist/web/assets/{WorkspaceMediaPreview-ctIyG3Ru.js → WorkspaceMediaPreview-D28Yf2yb.js} +3 -3
- package/dist/web/assets/{WorkspacePdfPreview-CeizxEAH.js → WorkspacePdfPreview-BfZSPcR-.js} +1 -1
- package/dist/web/assets/{WorkspacesView-DcmqHGvr.js → WorkspacesView-CsCGtk5H.js} +2 -2
- package/dist/web/assets/{index-BRI_re-n.css → index-BCUxnASh.css} +1 -1
- package/dist/web/assets/index-CFhV1jOj.js +19 -0
- package/dist/web/assets/{useMasterDetailFocus-DR5N95_A.js → useMasterDetailFocus-CMJXBPPp.js} +1 -1
- package/dist/web/assets/useOperationLabels-DSbMa9Eb.js +1 -0
- package/dist/web/index.html +2 -2
- package/dist/web/transport-sw.js +6 -0
- package/package.json +2 -1
- package/dist/web/assets/CodeViewer.vue_vue_type_script_setup_true_lang-DkN8x_6L.js +0 -3
- package/dist/web/assets/ComputerView-DWzfSYJ7.css +0 -1
- package/dist/web/assets/McpToolsView-CSEru3ck.js +0 -1
- package/dist/web/assets/McpToolsView-DjxPbTHj.css +0 -1
- package/dist/web/assets/SystemLogsView-CBINILPo.js +0 -1
- package/dist/web/assets/VSelect-CBX17QQj.js +0 -1
- package/dist/web/assets/VSpacer-9N_Ffoce.js +0 -1
- package/dist/web/assets/WorkspaceDownloadPreview-DzM2p_xl.js +0 -1
- package/dist/web/assets/index-DTyxBHlJ.js +0 -19
- package/dist/web/assets/useOperationLabels-Dou4m0ac.js +0 -1
- /package/dist/web/assets/{CodeViewer-CH1DEJge.css → VSheet-CH1DEJge.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as A,o as J,i as q,v as x,s as _,y as L,d as G,u as Q,c as f,e as b,f as s,k as a,p as u,g as e,l as j,E as H,q as m,t as i,h as P,F as O,a4 as X,m as k,C as z,R as Y,S as Z,b4 as R,af as ee,z as F,O as te,P as oe,Q as le,T as ae,I as ie,bk as se,a3 as re}from"./index-
|
|
1
|
+
import{$ as A,o as J,i as q,v as x,s as _,y as L,d as G,u as Q,c as f,e as b,f as s,k as a,p as u,g as e,l as j,E as H,q as m,t as i,h as P,F as O,a4 as X,m as k,C as z,R as Y,S as Z,b4 as R,af as ee,z as F,O as te,P as oe,Q as le,T as ae,I as ie,bk as se,a3 as re}from"./index-CFhV1jOj.js";import{V as W}from"./VSwitch-cVRCnipJ.js";import{V as ne}from"./VSpacer-BYe3Z99W.js";function ue(){const y=_(null),o=_(""),I=_(!1),r=_(""),S=_(!1),h=_(!1),p=_(null),w=_(null),c=A(),V=_(!1),d=x(()=>h.value||S.value||w.value!==null),g=x(()=>{const t=new Set(y.value?.entitlements.map(l=>l.service)??[]);return t.has("remote_mcp")&&t.has("remote_web")}),D=x(()=>{const t=(y.value?.entitlements??[]).map(l=>l.validUntil).filter(l=>!!l).map(l=>Date.parse(l)).filter(Number.isFinite);return t.length?Math.min(...t):null});J(()=>{T()});function C(t){o.value=L(t),I.value=!0}async function T(){if(d.value)return;const t=c.begin();try{const l=await q("/cloud/status",{signal:t.signal});c.isCurrent(t)&&(y.value=l)}catch(l){c.isCurrent(t)&&C(l)}}async function E(){if(d.value)return;const t=c.begin();h.value=!0;try{const l=await q("/cloud/sync",{method:"POST",signal:t.signal});c.isCurrent(t)&&(y.value=l)}catch(l){c.isCurrent(t)&&C(l)}finally{h.value=!1}}async function M(){if(V.value)return;V.value=!0;const t=window.open("","_blank");t&&(t.opener=null);try{const l=await q("/cloud/management",{method:"POST"});t?t.location.href=l.url:window.location.assign(l.url)}catch(l){t?.close(),C(l)}finally{V.value=!1}}function B(t,l){if(!d.value){if(l){U(t,!0);return}p.value=t}}async function N(){const t=p.value;t&&(await U(t,!1),w.value===null&&(p.value=null))}async function U(t,l){if(!y.value||d.value)return;const $=c.begin();w.value=t;try{const n=await q(`/cloud/services/${t}`,{method:"POST",body:JSON.stringify({enabled:l}),signal:$.signal});c.isCurrent($)&&(y.value=n)}catch(n){c.isCurrent($)&&C(n)}finally{w.value===t&&(w.value=null)}}async function K(){if(!r.value.trim()||d.value)return;const t=c.begin(),l=r.value.trim();S.value=!0;try{const $=await q("/cloud/restore",{method:"POST",body:JSON.stringify({recoveryKey:l}),timeoutMs:12e4,signal:t.signal});if(!c.isCurrent(t))return;y.value=$.status,r.value=""}catch($){c.isCurrent(t)&&C($)}finally{S.value=!1}}return{status:y,error:o,errorVisible:I,recoveryKey:r,restoring:S,refreshing:h,managing:V,busy:d,confirmationService:p,serviceUpdating:w,subscribed:g,subscriptionExpiry:D,load:T,refresh:E,manage:M,requestServiceChange:B,confirmDisableService:N,restore:K}}const ce={class:"cloud-view"},de={class:"cloud-row"},ve={class:"cloud-row-main"},me={class:"cloud-row-title"},fe={class:"cloud-row-value"},ye={class:"cloud-row-actions"},he={class:"cloud-row"},pe={class:"cloud-row-main"},_e={class:"cloud-row-title"},be={key:0,class:"cloud-row-value mono"},we={key:1,class:"cloud-row-value"},ge={class:"cloud-row"},Ce={class:"cloud-row-main"},$e={class:"cloud-row-title"},Ve={key:0,class:"cloud-row-value mono"},ke={key:1,class:"cloud-row-value"},Se={class:"cloud-row"},xe={class:"cloud-row-main"},De={class:"cloud-row-title"},Te={class:"cloud-row-value"},Ue={class:"cloud-restore-row"},qe={key:3,class:"cloud-loading"},Ie={class:"cloud-row cloud-installation-row"},Me={class:"cloud-row-main"},Be={class:"cloud-row-title"},Ke={class:"cloud-row-value mono installation-id"},Ne=G({__name:"CloudView",setup(y){const o=Q(),I=ue(),{status:r,error:S,errorVisible:h,recoveryKey:p,restoring:w,refreshing:c,managing:V,busy:d,confirmationService:g,serviceUpdating:D,subscribed:C,subscriptionExpiry:T,refresh:E,manage:M,requestServiceChange:B,confirmDisableService:N,restore:U}=I,K=x(()=>C.value?T.value===null?o.t("$vuetify.chatroom.cloud.active"):`${o.t("$vuetify.chatroom.cloud.expires")} ${new Intl.DateTimeFormat(re(o.current.value),{dateStyle:"medium",timeStyle:"short"}).format(new Date(T.value))}`:o.t("$vuetify.chatroom.cloud.inactiveDescription")),t=x(()=>g.value==="remote_web"?o.t("$vuetify.chatroom.cloud.disableWebTitle"):o.t("$vuetify.chatroom.cloud.disableMcpTitle")),l=x(()=>g.value==="remote_web"?o.t("$vuetify.chatroom.cloud.disableWebDescription"):o.t("$vuetify.chatroom.cloud.disableMcpDescription"));return($,n)=>(f(),b(O,null,[s("div",ce,[a(F,{class:"panel-card cloud-panel"},{default:u(()=>[e(r)?.lastError?(f(),j(H,{key:0,type:"error",variant:"tonal",density:"compact",class:"ma-3"},{default:u(()=>[m(i(e(r).lastError),1)]),_:1})):P("",!0),e(r)&&e(C)?(f(),b(O,{key:1},[s("div",de,[s("div",ve,[s("div",me,i(e(o).t("$vuetify.chatroom.cloud.subscription")),1),s("div",fe,i(K.value),1)]),s("div",ye,[a(X,{color:"success",size:"small",variant:"tonal"},{default:u(()=>[m(i(e(o).t("$vuetify.chatroom.cloud.active")),1)]),_:1}),a(k,{icon:"$mdiRefresh",size:"small",variant:"text",loading:e(c),disabled:e(d),"aria-label":e(o).t("$vuetify.chatroom.cloud.refresh"),onClick:e(E)},null,8,["loading","disabled","aria-label","onClick"]),a(k,{variant:"text",size:"small",disabled:!e(r).installationId||e(d),loading:e(V),onClick:e(M)},{default:u(()=>[m(i(e(o).t("$vuetify.chatroom.cloud.manage")),1)]),_:1},8,["disabled","loading","onClick"])])]),a(z),s("div",he,[s("div",pe,[s("div",_e,i(e(o).t("$vuetify.chatroom.cloud.remoteMcp")),1),e(r).mcpUrl?(f(),b("div",be,i(e(r).mcpUrl),1)):(f(),b("div",we,i(e(o).t("$vuetify.chatroom.cloud.remoteMcpDescription")),1))]),a(W,{"model-value":e(r).desiredServices.remote_mcp,loading:e(D)==="remote_mcp",disabled:e(d),"aria-label":e(o).t("$vuetify.chatroom.cloud.remoteMcp"),"onUpdate:modelValue":n[0]||(n[0]=v=>e(B)("remote_mcp",!!v))},null,8,["model-value","loading","disabled","aria-label"])]),a(z),s("div",ge,[s("div",Ce,[s("div",$e,i(e(o).t("$vuetify.chatroom.cloud.remoteWeb")),1),e(r).webUrl?(f(),b("div",Ve,i(e(r).webUrl),1)):(f(),b("div",ke,i(e(o).t("$vuetify.chatroom.cloud.remoteWebDescription")),1))]),a(W,{"model-value":e(r).desiredServices.remote_web,loading:e(D)==="remote_web",disabled:e(d),"aria-label":e(o).t("$vuetify.chatroom.cloud.remoteWeb"),"onUpdate:modelValue":n[1]||(n[1]=v=>e(B)("remote_web",!!v))},null,8,["model-value","loading","disabled","aria-label"])])],64)):e(r)?(f(),b(O,{key:2},[s("div",Se,[s("div",xe,[s("div",De,i(e(o).t("$vuetify.chatroom.cloud.subscription")),1),s("div",Te,i(K.value),1)]),a(k,{color:"primary",variant:"flat",size:"small",disabled:!e(r).installationId||e(d),loading:e(V),onClick:e(M)},{default:u(()=>[m(i(e(o).t("$vuetify.chatroom.cloud.purchase")),1)]),_:1},8,["disabled","loading","onClick"])]),a(z),s("div",Ue,[a(Y,{modelValue:e(p),"onUpdate:modelValue":n[2]||(n[2]=v=>R(p)?p.value=v:null),placeholder:e(o).t("$vuetify.chatroom.cloud.recoveryKey"),"aria-label":e(o).t("$vuetify.chatroom.cloud.recoveryKey"),type:"password",density:"compact",variant:"outlined","hide-details":"",autocomplete:"off",onKeyup:Z(e(U),["enter"])},null,8,["modelValue","placeholder","aria-label","onKeyup"]),a(k,{loading:e(w),disabled:!e(r).installationId||!e(p).trim()||e(d),variant:"tonal",size:"small",onClick:e(U)},{default:u(()=>[m(i(e(o).t("$vuetify.chatroom.cloud.restoreAction")),1)]),_:1},8,["loading","disabled","onClick"])])],64)):(f(),b("div",qe,[a(ee,{indeterminate:"",size:"20",width:"2"})])),e(r)?(f(),b(O,{key:4},[a(z),s("div",Ie,[s("div",Me,[s("div",Be,i(e(o).t("$vuetify.chatroom.cloud.installationId")),1),s("div",Ke,i(e(r).installationId||"—"),1)])])],64)):P("",!0)]),_:1})]),a(ie,{"model-value":e(g)!==null,width:"auto","max-width":"32rem","onUpdate:modelValue":n[4]||(n[4]=v=>!v&&(g.value=null))},{default:u(()=>[a(F,null,{default:u(()=>[a(te,{"prepend-icon":"$mdiAlertCircleOutline",class:"text-error"},{default:u(()=>[a(oe,null,{default:u(()=>[m(i(t.value),1)]),_:1})]),_:1}),a(le,null,{default:u(()=>[m(i(l.value),1)]),_:1}),a(ae,null,{default:u(()=>[a(ne),a(k,{variant:"text",disabled:e(d),onClick:n[3]||(n[3]=v=>g.value=null)},{default:u(()=>[m(i(e(o).t("$vuetify.chatroom.common.cancel")),1)]),_:1},8,["disabled"]),a(k,{color:"error",variant:"flat",loading:e(D)===e(g),onClick:e(N)},{default:u(()=>[m(i(e(o).t("$vuetify.chatroom.cloud.disableConfirm")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["model-value"]),a(se,{modelValue:e(h),"onUpdate:modelValue":n[6]||(n[6]=v=>R(h)?h.value=v:null),color:"error",location:"top",timeout:6e3},{actions:u(()=>[a(k,{variant:"text",onClick:n[5]||(n[5]=v=>h.value=!1)},{default:u(()=>[m(i(e(o).t("$vuetify.chatroom.common.close")),1)]),_:1})]),default:u(()=>[m(i(e(S))+" ",1)]),_:1},8,["modelValue"])],64))}});export{Ne as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{d as F,u as M,w as $,a6 as N,b as O,c as i,l as k,n as x,p as R,e as p,F as z,f as b,k as s,R as j,g as r,m as C,h as _,C as G,t as B,s as u,v as L,c9 as I}from"./index-CFhV1jOj.js";import{V as U}from"./VSheet-CNayLacf.js";import{V as W}from"./VSpacer-BYe3Z99W.js";const P={class:"code-toolbar"},q={class:"code-actions"},J={key:1,class:"code-copy-error",role:"alert"},Q=["innerHTML"],X={key:1},K=2e5,Y=120,te=F({__name:"CodeViewer",props:{value:{},text:{},filename:{default:"chatroom-output.txt"},language:{},toolbar:{type:Boolean,default:!0},showDownload:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0}},setup(o){const e=o,y=u(""),V=u(""),c=u(!0),d=u(null),a=M(),v=u("");let l=null,h=0;const m=L(()=>e.text??JSON.stringify(e.value??null,null,2)),g=L(()=>{const n=V.value.toLocaleLowerCase();return n?m.value.split(`
|
|
2
|
+
`).filter(t=>t.toLocaleLowerCase().includes(n)).join(`
|
|
3
|
+
`):m.value});$(y,n=>{l&&clearTimeout(l),l=setTimeout(()=>{V.value=n,l=null},Y)}),$([g,()=>e.filename,()=>e.language,()=>e.value!==void 0,()=>e.highlight],async(n,t,f)=>{const D=++h;f(()=>{h+=1}),d.value=null;const w=g.value;if(!e.highlight||!w||w.length>K)return;const E={filename:e.filename,language:e.language??(e.value!==void 0?"json":null)};try{const{highlightSource:H}=await N(async()=>{const{highlightSource:A}=await import("./syntax-highlight-C_fuMcwC.js");return{highlightSource:A}},[]);if(D!==h)return;d.value=H(w,E)}catch{}},{immediate:!0}),O(()=>{l&&clearTimeout(l),h+=1});async function T(){v.value="";try{await navigator.clipboard.writeText(m.value)}catch{v.value=a.t("$vuetify.chatroom.code.copyFailed")}}function S(){I(new Blob([m.value],{type:"text/plain;charset=utf-8"}),e.filename)}return(n,t)=>(i(),k(U,{border:o.toolbar,rounded:o.toolbar?"lg":0,"overflow-hidden":"",class:x(["code-viewer",{"code-viewer-plain":!o.toolbar}])},{default:R(()=>[o.toolbar?(i(),p(z,{key:0},[b("div",P,[s(j,{modelValue:y.value,"onUpdate:modelValue":t[0]||(t[0]=f=>y.value=f),placeholder:r(a).t("$vuetify.chatroom.code.search"),"aria-label":r(a).t("$vuetify.chatroom.code.search"),"prepend-inner-icon":"$mdiMagnify",density:"compact","hide-details":"",class:"code-search"},null,8,["modelValue","placeholder","aria-label"]),s(W),b("div",q,[s(C,{icon:"$mdiContentCopy",size:"small",variant:"text","aria-label":r(a).t("$vuetify.chatroom.code.copy"),onClick:T},null,8,["aria-label"]),s(C,{icon:c.value?"$mdiWrap":"$mdiFormatAlignLeft",size:"small",variant:"text","aria-label":r(a).t(c.value?"$vuetify.chatroom.code.disableWrap":"$vuetify.chatroom.code.enableWrap"),onClick:t[1]||(t[1]=f=>c.value=!c.value)},null,8,["icon","aria-label"]),o.showDownload?(i(),k(C,{key:0,icon:"$mdiDownloadOutline",size:"small",variant:"text","aria-label":r(a).t("$vuetify.chatroom.code.download"),onClick:S},null,8,["aria-label"])):_("",!0)])]),s(G)],64)):_("",!0),v.value?(i(),p("div",J,B(v.value),1)):_("",!0),b("pre",{class:x(["code-block",{wrap:c.value}])},[d.value?(i(),p("code",{key:0,class:"hljs",innerHTML:d.value},null,8,Q)):(i(),p("code",X,B(g.value||r(a).t("$vuetify.chatroom.code.noOutput")),1))],2)]),_:1},8,["border","rounded","class"]))}});export{te as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.computer-operation-scroll[data-v-02625c1a]{overflow-y:auto;overscroll-behavior:contain}.computer-operation-list[data-v-02625c1a]{padding-block:4px}.computer-operation-list[data-v-02625c1a] .v-list-item{min-height:52px;padding-inline:18px}.computer-operation-list[data-v-02625c1a] .v-list-item-title,.computer-operation-list[data-v-02625c1a] .v-list-item-subtitle{font-size:12px}.computer-preview-heading[data-v-38c2f32d]{min-width:0}.computer-preview-time[data-v-38c2f32d]{margin-top:2px;color:rgb(var(--v-theme-on-surface),.52);font-size:11px}.computer-preview-content[data-v-38c2f32d]{padding:14px}.computer-screen-shell[data-v-38c2f32d]{overflow:hidden;border:1px solid rgba(var(--v-border-color),var(--v-border-opacity));border-radius:10px;background:rgb(var(--v-theme-surface))}.computer-screen-shell img[data-v-38c2f32d]{display:block;width:100%;height:auto;object-fit:contain}.computer-screen-empty[data-v-38c2f32d]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px;border:1px dashed rgba(var(--v-border-color),var(--v-border-opacity));border-radius:10px;background:rgb(var(--v-theme-surface));color:rgb(var(--v-theme-on-surface),.68);text-align:center}.computer-preview-meta[data-v-38c2f32d]{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr));gap:10px;margin-top:10px}.computer-preview-meta>div[data-v-38c2f32d]{display:flex;min-width:0;flex-direction:column;gap:2px;padding:8px 10px;border-radius:8px;background:rgb(var(--v-theme-on-surface),.04)}.computer-preview-meta span[data-v-38c2f32d]{color:rgb(var(--v-theme-on-surface),.7);font-size:11px}.computer-preview-meta strong[data-v-38c2f32d]{color:rgb(var(--v-theme-on-surface),.92);font-size:12px;font-weight:650}@media(max-width:900px){.computer-preview-meta[data-v-38c2f32d]{grid-template-columns:1fr}}.computer-status-list[data-v-12975eaa]{display:flex;flex-direction:column;gap:2px;padding:12px 18px}.computer-status-row[data-v-12975eaa]{display:flex;min-height:36px;align-items:center;justify-content:space-between;gap:16px}.computer-status-label[data-v-12975eaa]{color:rgb(var(--v-theme-on-surface),.76);font-size:13px;font-weight:500}.computer-status-value[data-v-12975eaa]{color:rgb(var(--v-theme-on-surface),.94);font-size:13px;font-weight:600}.computer-permission-value[data-v-12975eaa]{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:10px}.computer-permission-state[data-v-12975eaa]{font-size:13px;font-weight:600;white-space:nowrap}.computer-permission-state.is-granted[data-v-12975eaa]{color:rgb(var(--v-theme-success))}.computer-permission-state.is-denied[data-v-12975eaa]{color:rgb(var(--v-theme-warning))}.computer-permission-state.is-muted[data-v-12975eaa]{color:rgb(var(--v-theme-on-surface),.72)}.computer-permission-btn[data-v-12975eaa]{padding-inline:10px;font-size:12px;font-weight:650}.computer-permission-alert[data-v-12975eaa]{margin-top:8px}.computer-settings-list[data-v-12975eaa],.computer-display-list[data-v-12975eaa]{padding-block:4px}.computer-settings-list[data-v-12975eaa] .v-list-item,.computer-display-list[data-v-12975eaa] .v-list-item{min-height:48px;padding-inline:18px}.computer-settings-list[data-v-12975eaa] .v-list-item-title,.computer-display-list[data-v-12975eaa] .v-list-item-title,.computer-display-list[data-v-12975eaa] .v-list-item-subtitle{font-size:12px}@media(max-width:900px){.computer-status-row[data-v-12975eaa]{min-height:40px}}.computer-view[data-v-2084f1f6]{display:flex;flex-direction:column;gap:14px;font-size:14px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as _e}from"./useOperationLabels-Dou4m0ac.js";import{d as X,u as ie,c as d,l as w,p as m,f as l,t as c,g as s,k as p,m as J,C as W,W as se,e as q,F as ae,j as de,Y as H,a1 as Ce,q as C,a2 as Se,bh as pe,a3 as ve,Q as re,z as Q,_ as K,w as fe,h as _,E as j,D as Re,V as Be,v as oe,s as k,n as ce,$ as G,a0 as xe,i as A,y as qe,a7 as ye}from"./index-DTyxBHlJ.js";import{_ as Pe}from"./StateChip.vue_vue_type_script_setup_true_lang-CQEj-YRM.js";import{V as me}from"./VSwitch-CvQYU48e.js";const Ie={class:"panel-header compact-header"},Ae={class:"panel-title"},Ve={class:"computer-operation-scroll"},Le=X({__name:"ComputerOperations",props:{operations:{},busy:{type:Boolean}},emits:["refresh"],setup(e,{emit:S}){const r=S,t=ie(),{sourceLabel:v}=_e();function f(a){if(a.action==="snapshot")return t.t("$vuetify.chatroom.computer.log.snapshot");if(a.action==="settings.set")return t.t("$vuetify.chatroom.computer.log.settings");if(a.action!=="action")return a.action;const o=b(a.input),n=Array.isArray(o.actions)?o.actions:[];return n.length?n.map(g).join(" · "):t.t("$vuetify.chatroom.computer.log.action")}function g(a){const o=b(a),n=String(o.type??"action"),h=typeof o.elementId=="number"?` #${o.elementId}`:"";switch(n){case"activate_app":return t.t("$vuetify.chatroom.computer.log.activateApp",String(o.app??""));case"activate_window":return t.t("$vuetify.chatroom.computer.log.activateWindow",h.trim());case"click":return t.t("$vuetify.chatroom.computer.log.click",h.trim()||y(o));case"double_click":return t.t("$vuetify.chatroom.computer.log.doubleClick",h.trim()||y(o));case"right_click":return t.t("$vuetify.chatroom.computer.log.rightClick",h.trim()||y(o));case"move":return t.t("$vuetify.chatroom.computer.log.move",y(o));case"drag":return t.t("$vuetify.chatroom.computer.log.drag");case"scroll":return t.t("$vuetify.chatroom.computer.log.scroll",String(o.deltaY??0));case"keypress":return t.t("$vuetify.chatroom.computer.log.keypress",Array.isArray(o.keys)?o.keys.join("+"):"");case"type_text":case"set_value":return t.t("$vuetify.chatroom.computer.log.typeText",String(o.characters??0));case"invoke":return t.t("$vuetify.chatroom.computer.log.invoke",h.trim());case"select_text":return t.t("$vuetify.chatroom.computer.log.selectText",h.trim());case"move_window":return t.t("$vuetify.chatroom.computer.log.moveWindow",h.trim());case"resize_window":return t.t("$vuetify.chatroom.computer.log.resizeWindow",h.trim());case"wait":return t.t("$vuetify.chatroom.computer.log.wait",String(o.ms??0));default:return n}}function y(a){return`(${Math.round(Number(a.x??0))}, ${Math.round(Number(a.y??0))})`}function b(a){return a&&typeof a=="object"?a:{}}return(a,o)=>(d(),w(Q,{rounded:"xl",variant:"flat",border:"",class:"panel-card"},{default:m(()=>[l("div",Ie,[l("div",Ae,c(s(t).t("$vuetify.chatroom.computer.recentOperations")),1),p(J,{size:"small",variant:"text",icon:"$mdiRefresh",loading:e.busy,"aria-label":s(t).t("$vuetify.chatroom.computer.refreshOperations"),onClick:o[0]||(o[0]=n=>r("refresh"))},null,8,["loading","aria-label"])]),p(W),l("div",Ve,[e.operations.length?(d(),w(se,{key:0,lines:"two",density:"compact",class:"computer-operation-list"},{default:m(()=>[(d(!0),q(ae,null,de(e.operations,n=>(d(),w(H,{key:n.operationId},{append:m(()=>[p(Pe,{value:n.status},null,8,["value"])]),default:m(()=>[p(Ce,null,{default:m(()=>[C(c(f(n)),1)]),_:2},1024),p(Se,null,{default:m(()=>[C(c(s(pe)(n.startedAt,s(ve)(s(t).current.value)))+" · "+c(s(v)(n.source)),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})):(d(),w(re,{key:1,class:"muted"},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.noOperations")),1)]),_:1}))])]),_:1}))}}),Oe=K(Le,[["__scopeId","data-v-e1119403"]]),ze={class:"panel-header compact-header"},De={class:"computer-preview-heading"},Te={class:"panel-title"},Ee={key:0,class:"computer-preview-time"},Ne=["aria-busy"],Ue=["src","alt"],We={key:2,class:"computer-screen-empty"},je={key:3,class:"computer-preview-meta"},Fe={class:"text-truncate"},Me=X({__name:"ComputerPreview",props:{preview:{},enabled:{type:Boolean},busy:{type:Boolean},remotePreviewBlocked:{type:Boolean}},emits:["refresh"],setup(e,{emit:S}){const r=e,t=S,v=ie(),f=oe(()=>{const a=r.preview;return a?.screenshot?"/api/computer/preview/image?snapshotId="+encodeURIComponent(a.snapshotId)+"&v="+encodeURIComponent(String(a.revision)):""}),g=k(!1),y=k(!1);fe(f,a=>{g.value=!!a,y.value=!1},{immediate:!0});const b=oe(()=>{const a=r.preview?.capturedAt;return a?pe(a,ve(v.current.value)):""});return(a,o)=>(d(),w(Q,{rounded:"xl",variant:"flat",border:"",class:"panel-card"},{default:m(()=>[l("div",ze,[l("div",De,[l("div",Te,c(s(v).t("$vuetify.chatroom.computer.latestScreen")),1),b.value?(d(),q("div",Ee,c(s(v).t("$vuetify.chatroom.computer.capturedAt",b.value)),1)):_("",!0)]),p(J,{size:"small",variant:"tonal","prepend-icon":"$mdiRefresh",loading:e.busy,disabled:!e.enabled,onClick:o[0]||(o[0]=n=>t("refresh"))},{default:m(()=>[C(c(s(v).t("$vuetify.chatroom.computer.refreshScreen")),1)]),_:1},8,["loading","disabled"])]),p(W),p(re,{class:"computer-preview-content"},{default:m(()=>[e.remotePreviewBlocked?(d(),w(j,{key:0,type:"info",variant:"tonal",density:"compact",class:"mb-3"},{default:m(()=>[C(c(s(v).t("$vuetify.chatroom.computer.remoteDisabled")),1)]),_:1})):_("",!0),f.value?(d(),q("div",{key:1,class:"computer-screen-shell","aria-busy":g.value},[g.value?(d(),w(Re,{key:0,indeterminate:""})):_("",!0),y.value?(d(),w(j,{key:1,type:"error",variant:"tonal"},{default:m(()=>[C(c(s(v).t("$vuetify.chatroom.common.imageLoadFailed")),1)]),_:1})):(d(),q("img",{key:f.value,decoding:"async",onLoad:o[1]||(o[1]=n=>g.value=!1),onError:o[2]||(o[2]=n=>{g.value=!1,y.value=!0}),src:f.value,alt:s(v).t("$vuetify.chatroom.computer.latestScreen")},null,40,Ue))],8,Ne)):(d(),q("div",We,[p(Be,{icon:"$mdiMonitorScreenshot",size:"42"}),l("span",null,c(s(v).t("$vuetify.chatroom.computer.noSnapshot")),1)])),e.preview?(d(),q("div",je,[l("div",null,[l("span",null,c(s(v).t("$vuetify.chatroom.computer.activeApp")),1),l("strong",null,c(e.preview.activeApp||"—"),1)]),l("div",null,[l("span",null,c(s(v).t("$vuetify.chatroom.computer.activeWindow")),1),l("strong",Fe,c(e.preview.activeWindow||"—"),1)]),l("div",null,[l("span",null,c(s(v).t("$vuetify.chatroom.computer.elements")),1),l("strong",null,c(e.preview.elementCount),1)])])):_("",!0)]),_:1})]),_:1}))}}),Ye=K(Me,[["__scopeId","data-v-f2938466"]]),Ge={class:"panel-header compact-header"},He={class:"panel-title"},Je={class:"computer-status-row"},Qe={class:"computer-status-label"},Xe={class:"computer-status-value"},Ke={class:"computer-status-row"},Ze={class:"computer-status-label"},et={class:"computer-status-value"},tt={class:"computer-status-row"},st={class:"computer-status-label"},at={class:"computer-permission-value"},ot={class:"computer-status-row"},it={class:"computer-status-label"},rt={class:"computer-permission-value"},nt={class:"panel-header compact-header"},lt={class:"panel-title"},ut=X({__name:"ComputerStatus",props:{status:{},settingsBusy:{type:Boolean},permissionBusy:{},permissionRequestsAllowed:{type:Boolean}},emits:["updateSetting","requestPermission"],setup(e,{emit:S}){const r=S,t=ie();function v(a){return t.t(`$vuetify.chatroom.computer.platformStates.${a}`)}function f(a){return t.t(`$vuetify.chatroom.computer.helperStates.${a}`)}function g(a){return t.t(`$vuetify.chatroom.computer.permissionStates.${a}`)}function y(a){return a==="granted"?"is-granted":a==="denied"?"is-denied":"is-muted"}function b(a){const o=a.primary?` · ${t.t("$vuetify.chatroom.computer.primaryDisplay")}`:"";return`${a.width}×${a.height} · ${a.scale}x${o}`}return(a,o)=>e.status?(d(),q(ae,{key:0},[p(Q,{rounded:"xl",variant:"flat",border:"",class:"panel-card"},{default:m(()=>[l("div",Ge,[l("div",He,c(s(t).t("$vuetify.chatroom.computer.title")),1)]),p(W),p(re,{class:"computer-status-list"},{default:m(()=>[e.status.unavailableReason==="no_x11_session"?(d(),w(j,{key:0,type:"info",variant:"tonal",density:"compact"},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.noX11Session")),1)]),_:1})):_("",!0),l("div",Je,[l("span",Qe,c(s(t).t("$vuetify.chatroom.computer.platform")),1),l("strong",Xe,c(v(e.status.platform)),1)]),l("div",Ke,[l("span",Ze,c(s(t).t("$vuetify.chatroom.computer.helper")),1),l("strong",et,c(f(e.status.helper)),1)]),l("div",tt,[l("span",st,c(s(t).t("$vuetify.chatroom.computer.accessibility")),1),l("div",at,[l("strong",{class:ce(["computer-permission-state",y(e.status.permissions.accessibility)])},c(g(e.status.permissions.accessibility)),3),e.status.platform==="macos"&&e.status.permissions.accessibility!=="granted"?(d(),w(J,{key:0,class:"computer-permission-btn",color:"primary",size:"small",variant:"tonal",loading:e.permissionBusy==="accessibility",disabled:!e.permissionRequestsAllowed||e.permissionBusy!==null,onClick:o[0]||(o[0]=n=>r("requestPermission","accessibility"))},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.requestPermission")),1)]),_:1},8,["loading","disabled"])):_("",!0)])]),l("div",ot,[l("span",it,c(s(t).t("$vuetify.chatroom.computer.screenRecording")),1),l("div",rt,[l("strong",{class:ce(["computer-permission-state",y(e.status.permissions.screenRecording)])},c(g(e.status.permissions.screenRecording)),3),e.status.platform==="macos"&&e.status.permissions.screenRecording!=="granted"?(d(),w(J,{key:0,class:"computer-permission-btn",color:"primary",size:"small",variant:"tonal",loading:e.permissionBusy==="screenRecording",disabled:!e.permissionRequestsAllowed||e.permissionBusy!==null,onClick:o[1]||(o[1]=n=>r("requestPermission","screenRecording"))},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.requestPermission")),1)]),_:1},8,["loading","disabled"])):_("",!0)])]),e.status.platform==="macos"&&!e.permissionRequestsAllowed&&(e.status.permissions.accessibility!=="granted"||e.status.permissions.screenRecording!=="granted")?(d(),w(j,{key:1,type:"info",variant:"tonal",density:"compact",class:"computer-permission-alert"},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.permissionLocalOnly")),1)]),_:1})):_("",!0)]),_:1}),p(W),p(se,{density:"compact",class:"computer-settings-list"},{default:m(()=>[p(H,{title:s(t).t("$vuetify.chatroom.computer.enabled")},{append:m(()=>[p(me,{"model-value":e.status.settings.enabled,"aria-label":s(t).t("$vuetify.chatroom.computer.enabled"),disabled:e.settingsBusy,"onUpdate:modelValue":o[2]||(o[2]=n=>r("updateSetting","enabled",!!n))},null,8,["model-value","aria-label","disabled"])]),_:1},8,["title"]),p(H,{title:s(t).t("$vuetify.chatroom.computer.remoteAccess")},{append:m(()=>[p(me,{"model-value":e.status.settings.remoteAccess,"aria-label":s(t).t("$vuetify.chatroom.computer.remoteAccess"),disabled:e.settingsBusy,"onUpdate:modelValue":o[3]||(o[3]=n=>r("updateSetting","remoteAccess",!!n))},null,8,["model-value","aria-label","disabled"])]),_:1},8,["title"])]),_:1})]),_:1}),e.status.displays.length?(d(),w(Q,{key:0,rounded:"xl",variant:"flat",border:"",class:"panel-card"},{default:m(()=>[l("div",nt,[l("div",lt,c(s(t).t("$vuetify.chatroom.computer.displays")),1)]),p(W),p(se,{density:"compact",class:"computer-display-list"},{default:m(()=>[(d(!0),q(ae,null,de(e.status.displays,n=>(d(),w(H,{key:n.id,title:n.name,subtitle:b(n)},null,8,["title","subtitle"]))),128))]),_:1})]),_:1})):_("",!0)],64)):_("",!0)}}),ct=K(ut,[["__scopeId","data-v-fbaed594"]]);function mt(e,S){const r=k(null),t=k(null),v=k([]),f=k(""),g=k(!1),y=k(!1),b=k(!1),a=k(!1),o=k(null),n=G(),h=G(),L=G(),O=G(),$=new Set,T=new Map;let P=!1,z=!1,E=null,D=!1;window.addEventListener("focus",le),Z(),xe(()=>{window.removeEventListener("focus",le),D=!0,P=!1,$.clear(),T.clear(),n.invalidate(),h.invalidate(),L.invalidate(),O.invalidate()});const ne=oe(()=>["localhost","127.0.0.1","::1","[::1]"].includes(window.location.hostname));fe(e,()=>{he(S())});async function Z(){f.value="",P=!1,$.clear(),O.invalidate(),await Promise.all([F(),M(),te()])}async function he(i){if(i===null){await Z();return}const u=[];if(i.status&&u.push(F()),i.preview&&(!i.previewSnapshotId||t.value?.snapshotId!==i.previewSnapshotId)&&u.push(te()),i.operationsReset)P=!1,$.clear(),O.invalidate(),u.push(M());else if(i.operationIds.length){for(const R of i.operationIds)$.add(R);P&&!z?u.push(ee()):z||u.push(M())}await Promise.all(u)}async function F(){const i=n.begin();try{const u=await A("/computer/status",{signal:i.signal});n.isCurrent(i)&&(r.value=u)}catch(u){n.isCurrent(i)&&V(u)}}async function M(){const i=L.begin();z=!0,a.value=!0;try{const u=await A("/operations?pluginId=computer&limit=50",{signal:i.signal});if(D||!L.isCurrent(i))return;v.value=u,P=!0}catch(u){L.isCurrent(i)&&V(u)}finally{L.isCurrent(i)&&(z=!1,a.value=!1)}L.isCurrent(i)&&$.size&&await ee()}async function ge(i){if(D||!i.length)return;const u=O.begin(),R=await Promise.allSettled(i.map(async I=>{try{return await A("/operations/"+encodeURIComponent(I),{signal:u.signal})}catch(x){if(x instanceof ye&&x.status===404)return null;throw x}}));if(D||!O.isCurrent(u))return;const B=[...v.value];for(let I=0;I<R.length;I+=1){const x=R[I],N=i[I];if(x.status==="rejected"){const Y=(T.get(N)??0)+1;Y<=1?(T.set(N,Y),$.add(N)):(T.delete(N),V(x.reason));continue}T.delete(N);const U=x.value;if(!U||U.pluginId!=="computer")continue;const ue=B.findIndex(Y=>Y.operationId===U.operationId);ue>=0?B[ue]=U:B.push(U)}B.sort((I,x)=>x.startedAt.localeCompare(I.startedAt)),v.value=B.slice(0,50)}function ee(){return E||(E=Promise.resolve().then(async()=>{for(;!D&&P&&!z&&$.size;){const i=[...$];$.clear(),await ge(i)}}).finally(()=>{E=null,!D&&P&&!z&&$.size&&ee()}),E)}async function te(){const i=h.begin();g.value=!1;try{const u=await A("/computer/preview",{signal:i.signal});h.isCurrent(i)&&(t.value=u)}catch(u){if(!h.isCurrent(i))return;if(dt(u)){t.value=null,g.value=!0;return}V(u)}}async function le(){if(r.value?.unavailableReason==="no_x11_session"){await F();return}if(r.value?.platform!=="macos"||r.value.permissions.accessibility==="granted"&&r.value.permissions.screenRecording==="granted")return;const i=n.begin();try{const u=await A("/computer/status",{signal:i.signal});n.isCurrent(i)&&(r.value=u)}catch{}}async function we(i,u){if(!b.value){b.value=!0,f.value="";try{await A("/computer/settings",{method:"PATCH",body:JSON.stringify({[i]:u})}),await Promise.all([F(),te()])}catch(R){V(R)}finally{b.value=!1}}}async function be(i){if(!ne.value||o.value)return;o.value=i,f.value="";const u=i==="accessibility"?"/computer/permissions/accessibility/request":"/computer/permissions/screen-recording/request",R=n.begin();try{const B=await A(u,{method:"POST",signal:R.signal});n.isCurrent(R)&&(r.value=B)}catch(B){n.isCurrent(R)&&V(B)}finally{o.value=null}}async function $e(){if(y.value)return;const i=h.begin();y.value=!0,f.value="";try{const u=await A("/computer/snapshot",{method:"POST",signal:i.signal});if(!h.isCurrent(i))return;t.value=u,g.value=!1}catch(u){h.isCurrent(i)&&V(u)}finally{y.value=!1}}async function ke(){f.value="",P=!1,$.clear(),O.invalidate(),await M()}function V(i){f.value||(f.value=qe(i))}return{status:r,preview:t,operations:v,error:f,remotePreviewBlocked:g,snapshotBusy:y,settingsBusy:b,operationsBusy:a,permissionBusy:o,permissionRequestsAllowed:ne,load:Z,updateSetting:we,requestPermission:be,refreshSnapshot:$e,refreshOperations:ke}}function dt(e){return!(e instanceof ye)||e.code!=="FORBIDDEN"||!e.details||typeof e.details!="object"?!1:"reason"in e.details&&e.details.reason==="remote_computer_disabled"}const pt={class:"computer-view"},vt=X({__name:"ComputerView",props:{revision:{},changes:{}},setup(e){const S=e,r=mt(()=>S.revision,()=>S.changes);return(t,v)=>(d(),q("div",pt,[s(r).error.value?(d(),w(j,{key:0,type:"error",variant:"tonal"},{default:m(()=>[C(c(s(r).error.value),1)]),_:1})):_("",!0),p(Ye,{preview:s(r).preview.value,enabled:s(r).status.value?.settings.enabled??!1,busy:s(r).snapshotBusy.value,"remote-preview-blocked":s(r).remotePreviewBlocked.value,onRefresh:s(r).refreshSnapshot},null,8,["preview","enabled","busy","remote-preview-blocked","onRefresh"]),p(Oe,{operations:s(r).operations.value,busy:s(r).operationsBusy.value,onRefresh:s(r).refreshOperations},null,8,["operations","busy","onRefresh"]),p(ct,{status:s(r).status.value,"settings-busy":s(r).settingsBusy.value,"permission-busy":s(r).permissionBusy.value,"permission-requests-allowed":s(r).permissionRequestsAllowed.value,onUpdateSetting:s(r).updateSetting,onRequestPermission:s(r).requestPermission},null,8,["status","settings-busy","permission-busy","permission-requests-allowed","onUpdateSetting","onRequestPermission"])]))}}),wt=K(vt,[["__scopeId","data-v-2084f1f6"]]);export{wt as default};
|
|
1
|
+
import{u as _e}from"./useOperationLabels-DSbMa9Eb.js";import{d as X,u as ie,c as d,l as w,p as m,f as l,t as c,g as s,k as p,m as J,C as W,W as se,e as P,F as ae,j as de,Y as H,a1 as Ce,q as C,a2 as Se,b6 as pe,a3 as ve,Q as re,z as Q,_ as K,w as fe,h as _,E as j,D as Re,V as Be,v as oe,s as k,n as ce,$ as G,a0 as qe,i as A,y as Pe,a7 as ye}from"./index-CFhV1jOj.js";import{_ as xe}from"./StateChip.vue_vue_type_script_setup_true_lang-D_LKEtqT.js";import{V as me}from"./VSwitch-cVRCnipJ.js";const Ie={class:"panel-header compact-header"},Ae={class:"panel-title"},Ve={class:"computer-operation-scroll"},Le=X({__name:"ComputerOperations",props:{operations:{},busy:{type:Boolean}},emits:["refresh"],setup(e,{emit:S}){const r=S,t=ie(),{sourceLabel:v}=_e();function f(a){if(a.action==="snapshot")return t.t("$vuetify.chatroom.computer.log.snapshot");if(a.action==="settings.set")return t.t("$vuetify.chatroom.computer.log.settings");if(a.action!=="action")return a.action;const o=b(a.input),n=Array.isArray(o.actions)?o.actions:[];return n.length?n.map(g).join(" · "):t.t("$vuetify.chatroom.computer.log.action")}function g(a){const o=b(a),n=String(o.type??"action"),h=typeof o.elementId=="number"?` #${o.elementId}`:"";switch(n){case"activate_app":return t.t("$vuetify.chatroom.computer.log.activateApp",String(o.app??""));case"activate_window":return t.t("$vuetify.chatroom.computer.log.activateWindow",h.trim());case"click":return t.t("$vuetify.chatroom.computer.log.click",h.trim()||y(o));case"double_click":return t.t("$vuetify.chatroom.computer.log.doubleClick",h.trim()||y(o));case"right_click":return t.t("$vuetify.chatroom.computer.log.rightClick",h.trim()||y(o));case"move":return t.t("$vuetify.chatroom.computer.log.move",y(o));case"drag":return t.t("$vuetify.chatroom.computer.log.drag");case"scroll":return t.t("$vuetify.chatroom.computer.log.scroll",String(o.deltaY??0));case"keypress":return t.t("$vuetify.chatroom.computer.log.keypress",Array.isArray(o.keys)?o.keys.join("+"):"");case"type_text":case"set_value":return t.t("$vuetify.chatroom.computer.log.typeText",String(o.characters??0));case"invoke":return t.t("$vuetify.chatroom.computer.log.invoke",h.trim());case"select_text":return t.t("$vuetify.chatroom.computer.log.selectText",h.trim());case"move_window":return t.t("$vuetify.chatroom.computer.log.moveWindow",h.trim());case"resize_window":return t.t("$vuetify.chatroom.computer.log.resizeWindow",h.trim());case"wait":return t.t("$vuetify.chatroom.computer.log.wait",String(o.ms??0));default:return n}}function y(a){return`(${Math.round(Number(a.x??0))}, ${Math.round(Number(a.y??0))})`}function b(a){return a&&typeof a=="object"?a:{}}return(a,o)=>(d(),w(Q,{rounded:"lg",variant:"flat",border:"",class:"panel-card"},{default:m(()=>[l("div",Ie,[l("div",Ae,c(s(t).t("$vuetify.chatroom.computer.recentOperations")),1),p(J,{size:"small",variant:"text",icon:"$mdiRefresh",loading:e.busy,"aria-label":s(t).t("$vuetify.chatroom.computer.refreshOperations"),onClick:o[0]||(o[0]=n=>r("refresh"))},null,8,["loading","aria-label"])]),p(W),l("div",Ve,[e.operations.length?(d(),w(se,{key:0,lines:"two",density:"compact",class:"computer-operation-list"},{default:m(()=>[(d(!0),P(ae,null,de(e.operations,n=>(d(),w(H,{key:n.operationId},{append:m(()=>[p(xe,{value:n.status},null,8,["value"])]),default:m(()=>[p(Ce,null,{default:m(()=>[C(c(f(n)),1)]),_:2},1024),p(Se,null,{default:m(()=>[C(c(s(pe)(n.startedAt,s(ve)(s(t).current.value)))+" · "+c(s(v)(n.source)),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})):(d(),w(re,{key:1,class:"muted"},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.noOperations")),1)]),_:1}))])]),_:1}))}}),Oe=K(Le,[["__scopeId","data-v-02625c1a"]]),ze={class:"panel-header compact-header"},De={class:"computer-preview-heading"},Te={class:"panel-title"},Ee={key:0,class:"computer-preview-time"},Ne=["aria-busy"],Ue=["src","alt"],We={key:2,class:"computer-screen-empty"},je={key:3,class:"computer-preview-meta"},Fe={class:"text-truncate"},Me=X({__name:"ComputerPreview",props:{preview:{},enabled:{type:Boolean},busy:{type:Boolean},remotePreviewBlocked:{type:Boolean}},emits:["refresh"],setup(e,{emit:S}){const r=e,t=S,v=ie(),f=oe(()=>{const a=r.preview;return a?.screenshot?"/api/computer/preview/image?snapshotId="+encodeURIComponent(a.snapshotId)+"&v="+encodeURIComponent(String(a.revision)):""}),g=k(!1),y=k(!1);fe(f,a=>{g.value=!!a,y.value=!1},{immediate:!0});const b=oe(()=>{const a=r.preview?.capturedAt;return a?pe(a,ve(v.current.value)):""});return(a,o)=>(d(),w(Q,{rounded:"lg",variant:"flat",border:"",class:"panel-card"},{default:m(()=>[l("div",ze,[l("div",De,[l("div",Te,c(s(v).t("$vuetify.chatroom.computer.latestScreen")),1),b.value?(d(),P("div",Ee,c(s(v).t("$vuetify.chatroom.computer.capturedAt",b.value)),1)):_("",!0)]),p(J,{size:"small",variant:"tonal","prepend-icon":"$mdiRefresh",loading:e.busy,disabled:!e.enabled,onClick:o[0]||(o[0]=n=>t("refresh"))},{default:m(()=>[C(c(s(v).t("$vuetify.chatroom.computer.refreshScreen")),1)]),_:1},8,["loading","disabled"])]),p(W),p(re,{class:"computer-preview-content"},{default:m(()=>[e.remotePreviewBlocked?(d(),w(j,{key:0,type:"info",variant:"tonal",density:"compact",class:"mb-3"},{default:m(()=>[C(c(s(v).t("$vuetify.chatroom.computer.remoteDisabled")),1)]),_:1})):_("",!0),f.value?(d(),P("div",{key:1,class:"computer-screen-shell","aria-busy":g.value},[g.value?(d(),w(Re,{key:0,indeterminate:""})):_("",!0),y.value?(d(),w(j,{key:1,type:"error",variant:"tonal"},{default:m(()=>[C(c(s(v).t("$vuetify.chatroom.common.imageLoadFailed")),1)]),_:1})):(d(),P("img",{key:f.value,decoding:"async",onLoad:o[1]||(o[1]=n=>g.value=!1),onError:o[2]||(o[2]=n=>{g.value=!1,y.value=!0}),src:f.value,alt:s(v).t("$vuetify.chatroom.computer.latestScreen")},null,40,Ue))],8,Ne)):(d(),P("div",We,[p(Be,{icon:"$mdiMonitorScreenshot",size:"42"}),l("span",null,c(s(v).t("$vuetify.chatroom.computer.noSnapshot")),1)])),e.preview?(d(),P("div",je,[l("div",null,[l("span",null,c(s(v).t("$vuetify.chatroom.computer.activeApp")),1),l("strong",null,c(e.preview.activeApp||"—"),1)]),l("div",null,[l("span",null,c(s(v).t("$vuetify.chatroom.computer.activeWindow")),1),l("strong",Fe,c(e.preview.activeWindow||"—"),1)]),l("div",null,[l("span",null,c(s(v).t("$vuetify.chatroom.computer.elements")),1),l("strong",null,c(e.preview.elementCount),1)])])):_("",!0)]),_:1})]),_:1}))}}),Ye=K(Me,[["__scopeId","data-v-38c2f32d"]]),Ge={class:"panel-header compact-header"},He={class:"panel-title"},Je={class:"computer-status-row"},Qe={class:"computer-status-label"},Xe={class:"computer-status-value"},Ke={class:"computer-status-row"},Ze={class:"computer-status-label"},et={class:"computer-status-value"},tt={class:"computer-status-row"},st={class:"computer-status-label"},at={class:"computer-permission-value"},ot={class:"computer-status-row"},it={class:"computer-status-label"},rt={class:"computer-permission-value"},nt={class:"panel-header compact-header"},lt={class:"panel-title"},ut=X({__name:"ComputerStatus",props:{status:{},settingsBusy:{type:Boolean},permissionBusy:{},permissionRequestsAllowed:{type:Boolean}},emits:["updateSetting","requestPermission"],setup(e,{emit:S}){const r=S,t=ie();function v(a){return t.t(`$vuetify.chatroom.computer.platformStates.${a}`)}function f(a){return t.t(`$vuetify.chatroom.computer.helperStates.${a}`)}function g(a){return t.t(`$vuetify.chatroom.computer.permissionStates.${a}`)}function y(a){return a==="granted"?"is-granted":a==="denied"?"is-denied":"is-muted"}function b(a){const o=a.primary?` · ${t.t("$vuetify.chatroom.computer.primaryDisplay")}`:"";return`${a.width}×${a.height} · ${a.scale}x${o}`}return(a,o)=>e.status?(d(),P(ae,{key:0},[p(Q,{rounded:"lg",variant:"flat",border:"",class:"panel-card"},{default:m(()=>[l("div",Ge,[l("div",He,c(s(t).t("$vuetify.chatroom.computer.title")),1)]),p(W),p(re,{class:"computer-status-list"},{default:m(()=>[e.status.unavailableReason==="no_x11_session"?(d(),w(j,{key:0,type:"info",variant:"tonal",density:"compact"},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.noX11Session")),1)]),_:1})):_("",!0),l("div",Je,[l("span",Qe,c(s(t).t("$vuetify.chatroom.computer.platform")),1),l("strong",Xe,c(v(e.status.platform)),1)]),l("div",Ke,[l("span",Ze,c(s(t).t("$vuetify.chatroom.computer.helper")),1),l("strong",et,c(f(e.status.helper)),1)]),l("div",tt,[l("span",st,c(s(t).t("$vuetify.chatroom.computer.accessibility")),1),l("div",at,[l("strong",{class:ce(["computer-permission-state",y(e.status.permissions.accessibility)])},c(g(e.status.permissions.accessibility)),3),e.status.platform==="macos"&&e.status.permissions.accessibility!=="granted"?(d(),w(J,{key:0,class:"computer-permission-btn",color:"primary",size:"small",variant:"tonal",loading:e.permissionBusy==="accessibility",disabled:!e.permissionRequestsAllowed||e.permissionBusy!==null,onClick:o[0]||(o[0]=n=>r("requestPermission","accessibility"))},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.requestPermission")),1)]),_:1},8,["loading","disabled"])):_("",!0)])]),l("div",ot,[l("span",it,c(s(t).t("$vuetify.chatroom.computer.screenRecording")),1),l("div",rt,[l("strong",{class:ce(["computer-permission-state",y(e.status.permissions.screenRecording)])},c(g(e.status.permissions.screenRecording)),3),e.status.platform==="macos"&&e.status.permissions.screenRecording!=="granted"?(d(),w(J,{key:0,class:"computer-permission-btn",color:"primary",size:"small",variant:"tonal",loading:e.permissionBusy==="screenRecording",disabled:!e.permissionRequestsAllowed||e.permissionBusy!==null,onClick:o[1]||(o[1]=n=>r("requestPermission","screenRecording"))},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.requestPermission")),1)]),_:1},8,["loading","disabled"])):_("",!0)])]),e.status.platform==="macos"&&!e.permissionRequestsAllowed&&(e.status.permissions.accessibility!=="granted"||e.status.permissions.screenRecording!=="granted")?(d(),w(j,{key:1,type:"info",variant:"tonal",density:"compact",class:"computer-permission-alert"},{default:m(()=>[C(c(s(t).t("$vuetify.chatroom.computer.permissionLocalOnly")),1)]),_:1})):_("",!0)]),_:1}),p(W),p(se,{density:"compact",class:"computer-settings-list"},{default:m(()=>[p(H,{title:s(t).t("$vuetify.chatroom.computer.enabled")},{append:m(()=>[p(me,{"model-value":e.status.settings.enabled,"aria-label":s(t).t("$vuetify.chatroom.computer.enabled"),disabled:e.settingsBusy,"onUpdate:modelValue":o[2]||(o[2]=n=>r("updateSetting","enabled",!!n))},null,8,["model-value","aria-label","disabled"])]),_:1},8,["title"]),p(H,{title:s(t).t("$vuetify.chatroom.computer.remoteAccess")},{append:m(()=>[p(me,{"model-value":e.status.settings.remoteAccess,"aria-label":s(t).t("$vuetify.chatroom.computer.remoteAccess"),disabled:e.settingsBusy,"onUpdate:modelValue":o[3]||(o[3]=n=>r("updateSetting","remoteAccess",!!n))},null,8,["model-value","aria-label","disabled"])]),_:1},8,["title"])]),_:1})]),_:1}),e.status.displays.length?(d(),w(Q,{key:0,rounded:"lg",variant:"flat",border:"",class:"panel-card"},{default:m(()=>[l("div",nt,[l("div",lt,c(s(t).t("$vuetify.chatroom.computer.displays")),1)]),p(W),p(se,{density:"compact",class:"computer-display-list"},{default:m(()=>[(d(!0),P(ae,null,de(e.status.displays,n=>(d(),w(H,{key:n.id,title:n.name,subtitle:b(n)},null,8,["title","subtitle"]))),128))]),_:1})]),_:1})):_("",!0)],64)):_("",!0)}}),ct=K(ut,[["__scopeId","data-v-12975eaa"]]);function mt(e,S){const r=k(null),t=k(null),v=k([]),f=k(""),g=k(!1),y=k(!1),b=k(!1),a=k(!1),o=k(null),n=G(),h=G(),L=G(),O=G(),$=new Set,T=new Map;let x=!1,z=!1,E=null,D=!1;window.addEventListener("focus",le),Z(),qe(()=>{window.removeEventListener("focus",le),D=!0,x=!1,$.clear(),T.clear(),n.invalidate(),h.invalidate(),L.invalidate(),O.invalidate()});const ne=oe(()=>["localhost","127.0.0.1","::1","[::1]"].includes(window.location.hostname));fe(e,()=>{he(S())});async function Z(){f.value="",x=!1,$.clear(),O.invalidate(),await Promise.all([F(),M(),te()])}async function he(i){if(i===null){await Z();return}const u=[];if(i.status&&u.push(F()),i.preview&&(!i.previewSnapshotId||t.value?.snapshotId!==i.previewSnapshotId)&&u.push(te()),i.operationsReset)x=!1,$.clear(),O.invalidate(),u.push(M());else if(i.operationIds.length){for(const R of i.operationIds)$.add(R);x&&!z?u.push(ee()):z||u.push(M())}await Promise.all(u)}async function F(){const i=n.begin();try{const u=await A("/computer/status",{signal:i.signal});n.isCurrent(i)&&(r.value=u)}catch(u){n.isCurrent(i)&&V(u)}}async function M(){const i=L.begin();z=!0,a.value=!0;try{const u=await A("/operations?pluginId=computer&limit=50",{signal:i.signal});if(D||!L.isCurrent(i))return;v.value=u,x=!0}catch(u){L.isCurrent(i)&&V(u)}finally{L.isCurrent(i)&&(z=!1,a.value=!1)}L.isCurrent(i)&&$.size&&await ee()}async function ge(i){if(D||!i.length)return;const u=O.begin(),R=await Promise.allSettled(i.map(async I=>{try{return await A("/operations/"+encodeURIComponent(I),{signal:u.signal})}catch(q){if(q instanceof ye&&q.status===404)return null;throw q}}));if(D||!O.isCurrent(u))return;const B=[...v.value];for(let I=0;I<R.length;I+=1){const q=R[I],N=i[I];if(q.status==="rejected"){const Y=(T.get(N)??0)+1;Y<=1?(T.set(N,Y),$.add(N)):(T.delete(N),V(q.reason));continue}T.delete(N);const U=q.value;if(!U||U.pluginId!=="computer")continue;const ue=B.findIndex(Y=>Y.operationId===U.operationId);ue>=0?B[ue]=U:B.push(U)}B.sort((I,q)=>q.startedAt.localeCompare(I.startedAt)),v.value=B.slice(0,50)}function ee(){return E||(E=Promise.resolve().then(async()=>{for(;!D&&x&&!z&&$.size;){const i=[...$];$.clear(),await ge(i)}}).finally(()=>{E=null,!D&&x&&!z&&$.size&&ee()}),E)}async function te(){const i=h.begin();g.value=!1;try{const u=await A("/computer/preview",{signal:i.signal});h.isCurrent(i)&&(t.value=u)}catch(u){if(!h.isCurrent(i))return;if(dt(u)){t.value=null,g.value=!0;return}V(u)}}async function le(){if(r.value?.unavailableReason==="no_x11_session"){await F();return}if(r.value?.platform!=="macos"||r.value.permissions.accessibility==="granted"&&r.value.permissions.screenRecording==="granted")return;const i=n.begin();try{const u=await A("/computer/status",{signal:i.signal});n.isCurrent(i)&&(r.value=u)}catch{}}async function we(i,u){if(!b.value){b.value=!0,f.value="";try{await A("/computer/settings",{method:"PATCH",body:JSON.stringify({[i]:u})}),await Promise.all([F(),te()])}catch(R){V(R)}finally{b.value=!1}}}async function be(i){if(!ne.value||o.value)return;o.value=i,f.value="";const u=i==="accessibility"?"/computer/permissions/accessibility/request":"/computer/permissions/screen-recording/request",R=n.begin();try{const B=await A(u,{method:"POST",signal:R.signal});n.isCurrent(R)&&(r.value=B)}catch(B){n.isCurrent(R)&&V(B)}finally{o.value=null}}async function $e(){if(y.value)return;const i=h.begin();y.value=!0,f.value="";try{const u=await A("/computer/snapshot",{method:"POST",signal:i.signal});if(!h.isCurrent(i))return;t.value=u,g.value=!1}catch(u){h.isCurrent(i)&&V(u)}finally{y.value=!1}}async function ke(){f.value="",x=!1,$.clear(),O.invalidate(),await M()}function V(i){f.value||(f.value=Pe(i))}return{status:r,preview:t,operations:v,error:f,remotePreviewBlocked:g,snapshotBusy:y,settingsBusy:b,operationsBusy:a,permissionBusy:o,permissionRequestsAllowed:ne,load:Z,updateSetting:we,requestPermission:be,refreshSnapshot:$e,refreshOperations:ke}}function dt(e){return!(e instanceof ye)||e.code!=="FORBIDDEN"||!e.details||typeof e.details!="object"?!1:"reason"in e.details&&e.details.reason==="remote_computer_disabled"}const pt={class:"computer-view"},vt=X({__name:"ComputerView",props:{revision:{},changes:{}},setup(e){const S=e,r=mt(()=>S.revision,()=>S.changes);return(t,v)=>(d(),P("div",pt,[s(r).error.value?(d(),w(j,{key:0,type:"error",variant:"tonal"},{default:m(()=>[C(c(s(r).error.value),1)]),_:1})):_("",!0),p(Ye,{preview:s(r).preview.value,enabled:s(r).status.value?.settings.enabled??!1,busy:s(r).snapshotBusy.value,"remote-preview-blocked":s(r).remotePreviewBlocked.value,onRefresh:s(r).refreshSnapshot},null,8,["preview","enabled","busy","remote-preview-blocked","onRefresh"]),p(Oe,{operations:s(r).operations.value,busy:s(r).operationsBusy.value,onRefresh:s(r).refreshOperations},null,8,["operations","busy","onRefresh"]),p(ct,{status:s(r).status.value,"settings-busy":s(r).settingsBusy.value,"permission-busy":s(r).permissionBusy.value,"permission-requests-allowed":s(r).permissionRequestsAllowed.value,onUpdateSetting:s(r).updateSetting,onRequestPermission:s(r).requestPermission},null,8,["status","settings-busy","permission-busy","permission-requests-allowed","onUpdateSetting","onRequestPermission"])]))}}),wt=K(vt,[["__scopeId","data-v-2084f1f6"]]);export{wt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{highlightSource as yn}from"./syntax-highlight-C_fuMcwC.js";import{d as Bn,c as ve,e as De,t as Tn,v as zn,_ as Sn}from"./index-
|
|
1
|
+
import{highlightSource as yn}from"./syntax-highlight-C_fuMcwC.js";import{d as Bn,c as ve,e as De,t as Tn,v as zn,_ as Sn}from"./index-CFhV1jOj.js";const we={};function jn(e){let n=we[e];if(n)return n;n=we[e]=[];for(let t=0;t<128;t++){const i=String.fromCharCode(t);n.push(i)}for(let t=0;t<e.length;t++){const i=e.charCodeAt(t);n[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return n}function X(e,n){typeof n!="string"&&(n=X.defaultChars);const t=jn(n);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let r="";for(let o=0,s=i.length;o<s;o+=3){const u=parseInt(i.slice(o+1,o+3),16);if(u<128){r+=t[u];continue}if((u&224)===192&&o+3<s){const l=parseInt(i.slice(o+4,o+6),16);if((l&192)===128){const c=u<<6&1984|l&63;c<128?r+="��":r+=String.fromCharCode(c),o+=3;continue}}if((u&240)===224&&o+6<s){const l=parseInt(i.slice(o+4,o+6),16),c=parseInt(i.slice(o+7,o+9),16);if((l&192)===128&&(c&192)===128){const h=u<<12&61440|l<<6&4032|c&63;h<2048||h>=55296&&h<=57343?r+="���":r+=String.fromCharCode(h),o+=6;continue}}if((u&248)===240&&o+9<s){const l=parseInt(i.slice(o+4,o+6),16),c=parseInt(i.slice(o+7,o+9),16),h=parseInt(i.slice(o+10,o+12),16);if((l&192)===128&&(c&192)===128&&(h&192)===128){let f=u<<18&1835008|l<<12&258048|c<<6&4032|h&63;f<65536||f>1114111?r+="����":(f-=65536,r+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}r+="�"}return r})}X.defaultChars=";/?:@&=+$,#";X.componentChars="";const Ae={};function In(e){let n=Ae[e];if(n)return n;n=Ae[e]=[];for(let t=0;t<128;t++){const i=String.fromCharCode(t);/^[0-9a-z]$/i.test(i)?n.push(i):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}function O(e,n,t){typeof n!="string"&&(t=n,n=O.defaultChars),typeof t>"u"&&(t=!0);const i=In(n);let r="";for(let o=0,s=e.length;o<s;o++){const u=e.charCodeAt(o);if(t&&u===37&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){r+=e.slice(o,o+3),o+=2;continue}if(u<128){r+=i[u];continue}if(u>=55296&&u<=57343){if(u>=55296&&u<=56319&&o+1<s){const l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){r+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(e[o])}return r}O.defaultChars=";/?:@&=+$,-_.!~*'()#";O.componentChars="-_.!~*'()";function _e(e){let n="";return n+=e.protocol||"",n+=e.slashes?"//":"",n+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?n+="["+e.hostname+"]":n+=e.hostname||"",n+=e.port?":"+e.port:"",n+=e.pathname||"",n+=e.search||"",n+=e.hash||"",n}function ie(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Jn=/^([a-z0-9.+-]+:)/i,Mn=/:[0-9]*$/,Pn=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Ln=["<",">",'"',"`"," ","\r",`
|
|
2
2
|
`," "],Nn=["{","}","|","\\","^","`"].concat(Ln),On=["'"].concat(Nn),Ee=["%","/","?",";","#"].concat(On),Fe=["/","?","#"],$n=255,ye=/^[+a-z0-9A-Z_-]{0,63}$/,qn=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Be={javascript:!0,"javascript:":!0},Te={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ge(e,n){if(e&&e instanceof ie)return e;const t=new ie;return t.parse(e,n),t}ie.prototype.parse=function(e,n){let t,i,r,o=e;if(o=o.trim(),!n&&e.split("#").length===1){const c=Pn.exec(o);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=Jn.exec(o);if(s&&(s=s[0],t=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(n||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=o.substr(0,2)==="//",r&&!(s&&Be[s])&&(o=o.substr(2),this.slashes=!0)),!Be[s]&&(r||s&&!Te[s])){let c=-1;for(let a=0;a<Fe.length;a++)i=o.indexOf(Fe[a]),i!==-1&&(c===-1||i<c)&&(c=i);let h,f;c===-1?f=o.lastIndexOf("@"):f=o.lastIndexOf("@",c),f!==-1&&(h=o.slice(0,f),o=o.slice(f+1),this.auth=h),c=-1;for(let a=0;a<Ee.length;a++)i=o.indexOf(Ee[a]),i!==-1&&(c===-1||i<c)&&(c=i);c===-1&&(c=o.length),o[c-1]===":"&&c--;const d=o.slice(0,c);o=o.slice(c),this.parseHost(d),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const a=this.hostname.split(/\./);for(let b=0,g=a.length;b<g;b++){const x=a[b];if(x&&!x.match(ye)){let C="";for(let m=0,_=x.length;m<_;m++)x.charCodeAt(m)>127?C+="x":C+=x[m];if(!C.match(ye)){const m=a.slice(0,b),_=a.slice(b+1),k=x.match(qn);k&&(m.push(k[1]),_.unshift(k[2])),_.length&&(o=_.join(".")+o),this.hostname=m.join(".");break}}}}this.hostname.length>$n&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const u=o.indexOf("#");u!==-1&&(this.hash=o.substr(u),o=o.slice(0,u));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),Te[t]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ie.prototype.parseHost=function(e){let n=Mn.exec(e);n&&(n=n[0],n!==":"&&(this.port=n.substr(1)),e=e.substr(0,e.length-n.length)),e&&(this.hostname=e)};const Un=Object.freeze(Object.defineProperty({__proto__:null,decode:X,encode:O,format:_e,parse:ge},Symbol.toStringTag,{value:"Module"})),Ke=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ge=/[\0-\x1F\x7F-\x9F]/,Zn=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,me=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52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81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,Ve=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,Qe=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Wn=Object.freeze(Object.defineProperty({__proto__:null,Any:Ke,Cc:Ge,Cf:Zn,P:me,S:Ve,Z:Qe},Symbol.toStringTag,{value:"Module"})),Xn=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function Yn(e){return e===0||e>=55296&&e<=57343||e>1114111}function Hn(e){return Yn(e)?65533:e>=128&&e<=159&&Xn[e-128]||e}function Kn(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(Hn(e))}const J=(()=>{const e=new Uint8Array(127);let n=0;for(let t=33;t<=126;t++)t!==34&&t!==36&&t!==92&&(e[t]=n++);return e})();function Gn(e,n,t,i,r,o){const u=e.length,l=o*90;let c=0;const h=()=>{const D=J[e.charCodeAt(c++)];return D<o?D:D*91-l+J[e.charCodeAt(c++)]},f=t-i,d=t+r,p=new Int32Array(d);p.fill(-1,i,o),p.fill(-1,o+f,d);const a=new Int32Array(d),b=new Int32Array(d);function g(D,y){let w=0,B=y;const j=y+D;for(;B<j;){const I=J[e.charCodeAt(c++)];if(I<89)w+=I,p[B++]=w;else if(I===89){let z=J[e.charCodeAt(c++)]+2;for(;z--;)p[B++]=++w}else{const z=J[e.charCodeAt(c++)];w+=89+(z<90?z*91+J[e.charCodeAt(c++)]:J[e.charCodeAt(c++)]*8281+J[e.charCodeAt(c++)]*91+J[e.charCodeAt(c++)]),p[B++]=w}}}g(i,0),g(f,o);const x=new Int32Array(r*2);let C=0,m=0;function _(D,y){for(let w=0;w<D;w++){const B=y+w,j=h(),I=h();x[m*2]=j,x[m*2+1]=I,m+=1,a[B]=C;const z=(p[j]<0?b[j]:1)+(p[I]<0?b[I]:1);b[B]=z,C+=z}}_(r-o+i,o+f),_(o-i,i);const k=new Uint16Array(C);let v=0;for(let D=0;D<m;D++)for(let y=0;y<2;y++){const w=x[D*2+y],B=p[w];if(B<0){let j=a[w];const I=j+b[w];for(;j<I;)k[v++]=k[j++]}else k[v++]=B}const A=new Uint16Array(n);let F=0;for(;c<u;){let D=J[e.charCodeAt(c++)];D>=o&&(D=D*91-l+J[e.charCodeAt(c++)]);const y=p[D];if(y<0){let w=a[D];const B=w+b[D];for(;w<B;)A[F++]=k[w++]}else A[F++]=y}return A}const Vn=Gn("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%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[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var T;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(T||(T={}));var S;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})(S||(S={}));const oe=32,en=21,Qn=2097151,ke=2047;let nn=0;function et(e){const n=e>>>en;return n===ke?nn:n}function nt(e){return e-S.ZERO>>>0<=9}function tt(e){return(e|oe)-S.LOWER_A>>>0<=5}function rt(e){return(e|oe)-S.LOWER_A>>>0<=25}var ze;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ze||(ze={}));var Se;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Se||(Se={}));function it(e,n,t,i){const r=(n&T.BRANCH_LENGTH)>>7,o=n&T.JUMP_TABLE;if(o){if(r===0)return i===o?t:-1;const l=i-o;if(l>>>0>=r)return-1;const c=e[t+l];return c===0?-1:t+r+c-1&65535}if(r===0)return-1;const s=r+1>>1,u=t+s+r;for(let l=0;l<r;l++){const h=e[t+(l>>1)]>>((l&1)<<3)&255;if(h===i){const f=t+s+l;return u+e[f]&65535}if(h>i)return-1}return-1}function je(e,n,t){return t===1?String.fromCharCode(e[n]&T.VALUE_MASK):t===2?String.fromCharCode(e[n+1]):String.fromCharCode(e[n+1],e[n+2])}function ot(e,n,t){let i=n+1,r=0,o=i;if(i<t&&(e.charCodeAt(i)|oe)===S.LOWER_X)for(i+=1,o=i;i<t;){const u=e.charCodeAt(i);if(nt(u))r=r*16+(u-S.ZERO);else if(tt(u))r=r*16+((u|oe)-S.LOWER_A+10);else break;i+=1}else for(;i<t;){const u=e.charCodeAt(i)-S.ZERO;if(u>>>0>9)break;r=r*10+u,i+=1}if(i===o)return 0;i<t&&e.charCodeAt(i)===S.SEMI&&(i+=1),r>1114111&&(r=1114112);let s=i-n;return s>=ke&&(nn=s,s=ke),s<<en|r}function st(e,n,t){const i=Vn;let r=e.indexOf("&");if(r<0)return e;const o=e.length;let s=0,u="";const l=i[0],c=l&T.JUMP_TABLE,h=(l&T.BRANCH_LENGTH)>>7;do{const f=r+1,d=e.charCodeAt(f);let p,a;if(d===S.NUM){const b=ot(e,f,o);p=et(b),p>0&&e.charCodeAt(f+p-1)!==S.SEMI&&(p=0),a=p===0?"":Kn(b&Qn)}else if(rt(d)){p=0,a="";const b=d-c;let g;if(b>>>0<h){const k=i[1+b];g=k===0?-1:h+k&65535}else g=-1;let x=0,C=0,m=g<0?0:i[g],_=f+1;e:for(;_<o;){for(;(m&(T.VALUE_LENGTH|T.FLAG13))===0&&(m&T.JUMP_TABLE)!==0;){const F=m&T.JUMP_TABLE,D=(m&T.BRANCH_LENGTH)>>7;if(D===0){if(e.charCodeAt(_)!==F)break e;g+=1}else{const y=e.charCodeAt(_)-F;if(y>>>0>=D)break e;const w=i[g+1+y];if(w===0)break e;g=g+D+w&65535}if(m=i[g],_+=1,_>=o)break e}if((m&(T.VALUE_LENGTH|T.FLAG13))===T.FLAG13){const F=(m&T.BRANCH_LENGTH)>>7;if(e.charCodeAt(_)!==(m&T.JUMP_TABLE))break;_+=1;const D=F-1;let y=g+1,w=0;for(;w+1<D;w+=2){const B=i[y];if(e.charCodeAt(_)!==(B&255)||(_+=1,e.charCodeAt(_)!==(B>>8&255)))break e;_+=1,y+=1}if(w<D){if(e.charCodeAt(_)!==(i[y]&255))break;_+=1}g+=1+(F>>1),m=i[g];continue}const k=m>>>14,v=e.charCodeAt(_);if(k!==0){if(v===S.SEMI){p=_-f+1,a=k===1?String.fromCharCode(m&T.VALUE_MASK):je(i,g,k);break}if(k===1)break}const A=it(i,m,g+(k||1),v);if(A<0)break;g=A,m=i[g],_+=1}a===""&&p>0&&(a=je(i,x,C))}else p=0,a="";p===0||t?r=f:(s<r&&(u+=e.slice(s,r)),u+=a,r=s=f+p),e.charCodeAt(r)!==S.AMP&&(r=e.indexOf("&",r))}while(r>=0);return u+e.slice(s)}function tn(e){return st(e,!0,!1)}var ut=class{src_Any=Ke.source;src_Cc=Ge.source;src_Z=Qe.source;src_P=me.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,n,t=4){const i=this.escapeRE(e),r=this.escapeRE(n),o=`(?:(?!${this.src_ZCc}|${i}|${r}).)`;let s=`${i}${o}{0,1000}${r}`;for(let u=2;u<=t;u++)s=`${i}(?:${o}|${s}){0,1000}${r}`;return s}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",n=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${n}|::(?:${e}:){5}${n}|(?:${e})?::(?:${e}:){4}${n}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${n}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${n}|(?:(?:${e}:){0,3}${e})?::${e}:${n}|(?:(?:${e}:){0,4}${e})?::${n}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},le={validate:(e,n,t)=>{const i=t.re.get_http_validator();i.lastIndex=n;const r=i.exec(e);return r?r[0].length:0},normalize:(e,n)=>n.normalize(e)},lt={"http:":le,"https:":le,"ftp:":le,"//":{validate:function(e,n,t){const i=t.re.get_relative_proto_validator();i.lastIndex=n;const r=i.exec(e);return r?n>=3&&e[n-3]===":"||n>=3&&e[n-3]==="/"?0:r[0].length:0},normalize:(e,n)=>n.normalize(e)},"mailto:":{validate:function(e,n,t){const i=t.re.get_mailto_validator();i.lastIndex=n;const r=i.exec(e);return r?r[0].length:0},normalize:(e,n)=>n.normalize(e)}},ct="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",at="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function ht(){const e=at.split("|");return ct.split("|").forEach(n=>{const t=n.indexOf(":"),i=n.slice(0,t);for(const r of n.slice(t+1))e.push(i+r)}),e}var ft={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:ht(),urlAuth:!1,maxLength:1e4},Ie=class{schema;index;lastIndex;raw;text;url;constructor(e,n,t,i){const r=e.slice(t,i);this.schema=n.toLowerCase(),this.index=t,this.lastIndex=i,this.raw=r,this.text=r,this.url=r}},pt=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:n,...t}=e;this.__opts__={...ft,...t},this.__schemas__={...lt},this.re=n||new ut,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,n=null){if(!n)delete this.__schemas__[e];else{const t={normalize:(i,r)=>r.normalize(i),...n};this.__schemas__[e]=t}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let n,t;for(t=this.re.get_schema_search(),t.lastIndex=0;(n=t.exec(e))!==null;)if(this.testSchemaAt(e,n[2],t.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(t=this.re.get_fuzzy_link_search(),t.lastIndex=0,t.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),r=this.re.get_mail_name_validator();for(i.lastIndex=0;(n=i.exec(e))!==null;){const o=e.slice(Math.max(0,n.index-65),n.index);if(r.test(o))return!0}}return!1}testSchemaAt(e,n,t){return this.__schemas__[n.toLowerCase()]?this.__schemas__[n.toLowerCase()].validate(e.slice(0,t+this.__opts__.maxLength),t,this):0}match(e){const n=[],t=this.re.get_schema_search();let i,r,o,s,u,l,c=!1,h=!1,f=!1,d=0;if(!e.length)return null;for(t.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(r=this.re.get_fuzzy_mail_host_search(),r.lastIndex=0,o=this.re.get_mail_name_validator());;){const p=Math.max(d-1,0);if(r&&o&&!f&&(!u||u.index<d))for(r.lastIndex<p&&(r.lastIndex=p);;){const C=r.exec(e);if(!C){f=!0,u=void 0;break}const m=o.exec(e.slice(Math.max(0,C.index-65),C.index));if(m){if(u={schema:"mailto:",index:C.index-m[1].length,lastIndex:C.index+C[0].length},u.index>=d)break;r.lastIndex<p&&(r.lastIndex=p)}}if(i&&!h&&(!s||s.index<d))for(i.lastIndex<p&&(i.lastIndex=p);;){const C=i.exec(e);if(!C){h=!0,s=void 0;break}if(s={schema:"",index:C.index+C[1].length,lastIndex:C.index+C[0].length},s.index>=d)break;i.lastIndex<p&&(i.lastIndex=p)}let a=u;(!a||s&&(s.index<a.index||s.index===a.index&&s.lastIndex>a.lastIndex))&&(a=s);let b;if(!c)for(;;){if(!l){t.lastIndex<p&&(t.lastIndex=p);const _=t.exec(e);if(!_){c=!0;break}l={schema:_[2],index:_.index+_[1].length,lastIndex:_.index+_[0].length}}if(l.index<d){l=void 0;continue}if(a&&l.index>a.index)break;const C=l;l=void 0;const m=this.testSchemaAt(e,C.schema,C.lastIndex);if(m){b={schema:C.schema,index:C.index,lastIndex:C.lastIndex+m};break}}let g=b;if((!g||u&&(u.index<g.index||u.index===g.index&&u.lastIndex>g.lastIndex))&&(g=u),(!g||s&&(s.index<g.index||s.index===g.index&&s.lastIndex>g.lastIndex))&&(g=s),!g)break;g===u?u=void 0:g===s&&(s=void 0);const x=new Ie(e,g.schema,g.index,g.lastIndex);x.schema?this.__schemas__[x.schema].normalize(x,this):this.normalize(x),n.push(x),d=g.lastIndex}return n.length?n:null}matchAtStart(e){if(!e.length)return null;const n=this.re.get_schema_at_start().exec(e);if(!n)return null;const t=this.testSchemaAt(e,n[2],n[0].length);if(!t)return null;const i=new Ie(e,n[2],n.index+n[1].length,n.index+n[0].length+t);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,n=!1){return e=Array.isArray(e)?e:[e],n?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}};const W=2147483647,M=36,Re=1,H=26,dt=38,_t=700,rn=72,on=128,sn="-",gt=/^xn--/,kt=/[^\0-\x7F]/,mt=/[\x2E\u3002\uFF0E\uFF61]/g,Rt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ce=M-Re,P=Math.floor,ae=String.fromCharCode;function $(e){throw new RangeError(Rt[e])}function bt(e,n){const t=[];let i=e.length;for(;i--;)t[i]=n(e[i]);return t}function un(e,n){const t=e.split("@");let i="";t.length>1&&(i=t[0]+"@",e=t[1]),e=e.replace(mt,".");const r=e.split("."),o=bt(r,n).join(".");return i+o}function ln(e){const n=[];let t=0;const i=e.length;for(;t<i;){const r=e.charCodeAt(t++);if(r>=55296&&r<=56319&&t<i){const o=e.charCodeAt(t++);(o&64512)==56320?n.push(((r&1023)<<10)+(o&1023)+65536):(n.push(r),t--)}else n.push(r)}return n}const xt=e=>String.fromCodePoint(...e),Ct=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:M},Je=function(e,n){return e+22+75*(e<26)-((n!=0)<<5)},cn=function(e,n,t){let i=0;for(e=t?P(e/_t):e>>1,e+=P(e/n);e>ce*H>>1;i+=M)e=P(e/ce);return P(i+(ce+1)*e/(e+dt))},an=function(e){const n=[],t=e.length;let i=0,r=on,o=rn,s=e.lastIndexOf(sn);s<0&&(s=0);for(let u=0;u<s;++u)e.charCodeAt(u)>=128&&$("not-basic"),n.push(e.charCodeAt(u));for(let u=s>0?s+1:0;u<t;){const l=i;for(let h=1,f=M;;f+=M){u>=t&&$("invalid-input");const d=Ct(e.charCodeAt(u++));d>=M&&$("invalid-input"),d>P((W-i)/h)&&$("overflow"),i+=d*h;const p=f<=o?Re:f>=o+H?H:f-o;if(d<p)break;const a=M-p;h>P(W/a)&&$("overflow"),h*=a}const c=n.length+1;o=cn(i-l,c,l==0),P(i/c)>W-r&&$("overflow"),r+=P(i/c),i%=c,n.splice(i++,0,r)}return String.fromCodePoint(...n)},hn=function(e){const n=[];e=ln(e);const t=e.length;let i=on,r=0,o=rn;for(const l of e)l<128&&n.push(ae(l));const s=n.length;let u=s;for(s&&n.push(sn);u<t;){let l=W;for(const h of e)h>=i&&h<l&&(l=h);const c=u+1;l-i>P((W-r)/c)&&$("overflow"),r+=(l-i)*c,i=l;for(const h of e)if(h<i&&++r>W&&$("overflow"),h===i){let f=r;for(let d=M;;d+=M){const p=d<=o?Re:d>=o+H?H:d-o;if(f<p)break;const a=f-p,b=M-p;n.push(ae(Je(p+a%b,0))),f=P(a/b)}n.push(ae(Je(f,0))),o=cn(r,c,u===s),r=0,++u}++r,++i}return n.join("")},vt=function(e){return un(e,function(n){return gt.test(n)?an(n.slice(4).toLowerCase()):n})},Dt=function(e){return un(e,function(n){return kt.test(n)?"xn--"+hn(n):n})},Me={version:"2.3.1",ucs2:{decode:ln,encode:xt},decode:an,encode:hn,toASCII:Dt,toUnicode:vt};var Pe=Object.defineProperty,fn=(e,n)=>{let t={};for(var i in e)Pe(t,i,{get:e[i],enumerable:!0});return Pe(t,Symbol.toStringTag,{value:"Module"}),t},wt=fn({arrayReplaceAt:()=>At,asciiTrim:()=>ue,callable:()=>pn,escapeHtml:()=>q,escapeRE:()=>Jt,fromCodePoint:()=>K,isMdAsciiPunct:()=>Q,isPunctChar:()=>_n,isPunctCharCode:()=>V,isSpace:()=>E,isValidEntityCode:()=>be,isWhiteSpace:()=>G,lib:()=>Mt,normalizeReference:()=>se,unescapeAll:()=>Y,unescapeMd:()=>Bt});function pn(e){const n=function(...t){return Reflect.construct(e,t,new.target&&new.target!==n?new.target:e)};return Object.defineProperty(n,"name",{value:e.name}),Object.setPrototypeOf(n,e),n.prototype=e.prototype,n}function At(e,n,t){return[].concat(e.slice(0,n),t,e.slice(n+1))}function be(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function K(e){if(e>65535){e-=65536;const n=55296+(e>>10),t=56320+(e&1023);return String.fromCharCode(n,t)}return String.fromCharCode(e)}var dn=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Et=new RegExp(`${dn.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Ft=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function yt(e,n){if(n.charCodeAt(0)===35&&Ft.test(n)){const i=n[1].toLowerCase()==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return be(i)?K(i):e}const t=tn(e);return t!==e?t:e}function Bt(e){return e.indexOf("\\")<0?e:e.replace(dn,"$1")}function Y(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Et,function(n,t,i){return t||yt(n,i)})}var Tt=/[&<>"]/,zt=/[&<>"]/g,St={"&":"&","<":"<",">":">",'"':"""};function jt(e){return St[e]}function q(e){return Tt.test(e)?e.replace(zt,jt):e}var It=/[.?*+^$[\]\\(){}|-]/g;function Jt(e){return e.replace(It,"\\$&")}function E(e){switch(e){case 9:case 32:return!0}return!1}function G(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function _n(e){return me.test(e)||Ve.test(e)}function V(e){return _n(K(e))}function Q(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function se(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function Le(e){return e===32||e===9||e===10||e===13}function ue(e){let n=0;for(;n<e.length&&Le(e.charCodeAt(n));n++);let t=e.length-1;for(;t>=n&&Le(e.charCodeAt(t));t--);return e.slice(n,t+1)}var Mt={mdurl:Un,ucmicro:Wn};function Pt(e,n,t){let i,r,o,s;const u=e.posMax,l=e.pos;for(e.pos=n+1,i=1;e.pos<u;){if(o=e.src.charCodeAt(e.pos),o===93&&(i--,i===0)){r=!0;break}if(s=e.pos,e.md.inline.skipToken(e),o===91){if(s===e.pos-1)i++;else if(t)return e.pos=l,-1}}let c=-1;return r&&(c=e.pos),e.pos=l,c}function Lt(e,n,t){let i,r=n;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(r)===60){for(r++;r<t;){if(i=e.charCodeAt(r),i===10||i===60)return o;if(i===62)return o.pos=r+1,o.str=Y(e.slice(n+1,r)),o.ok=!0,o;if(i===92&&r+1<t){r+=2;continue}r++}return o}let s=0;for(;r<t&&(i=e.charCodeAt(r),!(i===32||i<32||i===127));){if(i===92&&r+1<t){if(e.charCodeAt(r+1)===32){r++;continue}r+=2;continue}if(i===40&&(s++,s>32))return o;if(i===41){if(s===0)break;s--}r++}return n===r||s!==0||(o.str=Y(e.slice(n,r)),o.pos=r,o.ok=!0),o}function Nt(e,n,t,i){let r,o=n;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)s.str=i.str,s.marker=i.marker;else{if(o>=t)return s;let u=e.charCodeAt(o);if(u!==34&&u!==39&&u!==40)return s;n++,o++,u===40&&(u=41),s.marker=u}for(;o<t;){if(r=e.charCodeAt(o),r===s.marker)return s.pos=o+1,s.str+=Y(e.slice(n,o)),s.ok=!0,s;if(r===40&&s.marker===41)return s;r===92&&o+1<t&&o++,o++}return s.can_continue=!0,s.str+=Y(e.slice(n,o)),s}var Ot=fn({parseLinkDestination:()=>Lt,parseLinkLabel:()=>Pt,parseLinkTitle:()=>Nt});function ee(e){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ee(e)}function $t(e,n){if(ee(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n);if(ee(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function qt(e){var n=$t(e,"string");return ee(n)=="symbol"?n:n+""}function R(e,n,t){return(n=qt(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Z=class{constructor(e,n,t){R(this,"map",null),R(this,"level",0),R(this,"children",null),R(this,"content",""),R(this,"markup",""),R(this,"info",""),R(this,"block",!1),R(this,"hidden",!1),this.type=e,this.tag=n,this.attrs=null,this.nesting=t,this.meta=null}attrIndex(e){if(!this.attrs)return-1;const n=this.attrs;for(let t=0,i=n.length;t<i;t++)if(n[t][0]===e)return t;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,n){const t=this.attrIndex(e),i=[e,n];t<0?this.attrPush(i):this.attrs[t]=i}attrGet(e){const n=this.attrIndex(e);let t=null;return n>=0&&(t=this.attrs[n][1]),t}attrJoin(e,n){const t=this.attrIndex(e);t<0?this.attrPush([e,n]):this.attrs[t][1]=`${this.attrs[t][1]} ${n}`}},ne=class{constructor(){R(this,"__rules__",[]),R(this,"__cache__",null)}__find__(e){for(let n=0;n<this.__rules__.length;n++)if(this.__rules__[n].name===e)return n;return-1}__compile__(){const e=new Set;this.__rules__.forEach(n=>{n.enabled&&n.alt.forEach(t=>{t&&e.add(t)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach(n=>{n.enabled&&this.__cache__[""].push(n.fn)}),e.forEach(n=>{this.__cache__[n]=[],this.__rules__.forEach(t=>{t.enabled&&t.alt.indexOf(n)>=0&&this.__cache__[n].push(t.fn)})})}at(e,n,t={}){const i=this.__find__(e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__[i].fn=n,this.__rules__[i].alt=t.alt||[],this.__cache__=null}before(e,n,t,i={}){const r=this.__find__(e);if(r===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(r,0,{name:n,enabled:!0,fn:t,alt:i.alt||[]}),this.__cache__=null}after(e,n,t,i={}){const r=this.__find__(e);if(r===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(r+1,0,{name:n,enabled:!0,fn:t,alt:i.alt||[]}),this.__cache__=null}push(e,n,t={}){this.__rules__.push({name:e,enabled:!0,fn:n,alt:t.alt||[]}),this.__cache__=null}enable(e,n=!1){Array.isArray(e)||(e=[e]);const t=[];return e.forEach(i=>{const r=this.__find__(i);if(r<0){if(n)return;throw new Error(`Rules manager: invalid rule name ${i}`)}this.__rules__[r].enabled=!0,t.push(i)}),this.__cache__=null,t}enableOnly(e,n=!1){Array.isArray(e)||(e=[e]),this.__rules__.forEach(t=>{t.enabled=!1}),this.enable(e,n)}disable(e,n=!1){Array.isArray(e)||(e=[e]);const t=[];return e.forEach(i=>{const r=this.__find__(i);if(r<0){if(n)return;throw new Error(`Rules manager: invalid rule name ${i}`)}this.__rules__[r].enabled=!1,t.push(i)}),this.__cache__=null,t}getRules(e){return this.__cache__||this.__compile__(),this.__cache__[e]||[]}},L={};L.code_inline=function(e,n,t,i,r){const o=e[n];return`<code${r.renderAttrs(o)}>${q(o.content)}</code>`};L.code_block=function(e,n,t,i,r){const o=e[n];return`<pre${r.renderAttrs(o)}><code>${q(e[n].content)}</code></pre>
|
|
3
3
|
`};L.fence=function(e,n,t,i,r){const o=e[n],s=o.info?Y(o.info).trim():"";let u="",l="";if(s){const h=s.split(/(\s+)/g);u=h[0],l=h.slice(2).join("")}let c;if(t.highlight?c=t.highlight(o.content,u,l)||q(o.content):c=q(o.content),c.indexOf("<pre")===0)return c+`
|
|
4
4
|
`;if(s){const h=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];h<0?f.push(["class",`${t.langPrefix}${u}`]):(f[h]=[f[h][0],f[h][1]],f[h][1]+=` ${t.langPrefix}${u}`);const d={attrs:f};return`<pre><code${r.renderAttrs(d)}>${c}</code></pre>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as ae,x as ve,u as le,w as fe,c as m,l as T,I as de,p as r,k as o,z as L,P as re,q as f,t as i,Q as ue,E as W,h as _,f as h,m as V,R as G,e as k,F as H,V as he,T as Z,J as ne,s as C,b8 as Q,i as P,y as j,_ as oe,o as ee,b5 as ye,D as ce,j as X,C as me,O as ge,$ as be,g as F,v as _e}from"./index-CFhV1jOj.js";import{V as we}from"./VSelect-B5-t612C.js";import{V as se}from"./VTextarea-ypCBuKI-.js";import{V as te}from"./VSpacer-BYe3Z99W.js";import{V as Y}from"./VSwitch-cVRCnipJ.js";import{a as ie,V as Ve}from"./VTabs-HKX286IT.js";import"./VSheet-CNayLacf.js";const ke=["aria-label"],Ce={key:1,class:"text-caption text-medium-emphasis"},xe={key:4,class:"text-caption text-medium-emphasis"},$e=ae({__name:"CustomMcpDialog",props:ne({server:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:ne(["saved"],["update:modelValue"]),setup(q,{emit:I}){const d=q,g=ve(q,"modelValue"),U=I,x=le(),n=t=>x.t("$vuetify.chatroom.customMcp."+t),b=C(!1),z=C(!1),y=C(!1),$=C(""),v=C(""),R=C(!1),a=Q({name:"",type:"http",authMode:"auto",command:"",args:"",cwd:"",url:"",env:"",headers:""});fe([g,()=>d.server],()=>{if(!g.value)return;const t=d.server;Object.assign(a,{name:t?.name??"",type:t?.type??"http",authMode:t?.authMode??"auto",command:t?.command??"",args:t?.args?.map(e=>/[\s"']/.test(e)?JSON.stringify(e):e).join(" ")??"",cwd:t?.cwd??"",url:t?.url??"",env:"",headers:""}),y.value=!1,$.value="",v.value="",R.value=!1},{immediate:!0});function B(t){if(!t.trim())return{};const e=JSON.parse(t);if(!e||typeof e!="object"||Array.isArray(e)||Object.values(e).some(c=>typeof c!="string"))throw new Error(n("invalidMap"));return e}function N(t){const e=t.trim();if(!e)return[];if(e.startsWith("[")){const A=JSON.parse(e);if(!Array.isArray(A)||A.some(O=>typeof O!="string"))throw new Error(n("invalidArgs"));return A}const c=[];let E="",D=null,J=!1;for(let A=0;A<e.length;A++){const O=e[A];!D&&/\s/.test(O)?(J&&c.push(E),E="",J=!1):O==="'"||O==='"'?D===O?D=null:D?E+=O:(D=O,J=!0):O==="\\"&&D!=="'"&&A+1<e.length&&/[\s"'\\]/.test(e[A+1])?(E+=e[++A],J=!0):(E+=O,J=!0)}if(D)throw new Error(n("invalidArgs"));return J&&c.push(E),c}function K(t){if(!t.trim())return{};if(t.trim().startsWith("{"))return B(t);const e={};for(const c of t.split(`
|
|
2
|
+
`)){if(!c.trim())continue;const E=c.indexOf("=");if(E<=0)throw new Error(n("invalidEnv"));e[c.slice(0,E).trim()]=c.slice(E+1)}return e}function S(){if(!a.name.trim())throw new Error(n("nameRequired"));if(a.type==="http"){if(!a.url.trim())throw new Error(n("urlRequired"));return{name:a.name.trim(),type:a.type,url:a.url.trim(),authMode:a.authMode,...a.authMode==="headers"&&(a.headers.trim()||!d.server)?{headers:B(a.headers)}:{},...d.server?{}:{enabled:!0}}}if(!a.command.trim())throw new Error(n("commandRequired"));return{name:a.name.trim(),type:a.type,command:a.command.trim(),args:N(a.args),cwd:a.cwd.trim(),...a.env.trim()||!d.server?{env:K(a.env)}:{},...d.server?{}:{enabled:!0}}}async function u(){if(!(b.value||z.value)){b.value=!0,$.value="";try{await P(d.server?"/mcp/servers/"+encodeURIComponent(d.server.id):"/mcp/servers",{method:d.server?"PATCH":"POST",body:JSON.stringify(S()),timeoutMs:3e4}),g.value=!1,U("saved")}catch(t){$.value=j(t)}finally{b.value=!1}}}async function p(){if(!(z.value||b.value)){z.value=!0,$.value="",v.value="",R.value=!1;try{const t=await P(d.server?"/mcp/servers/"+encodeURIComponent(d.server.id)+"/test":"/mcp/servers/test",{method:"POST",...d.server?{}:{body:JSON.stringify(S())},timeoutMs:25e3});R.value=!!t.authRequired,v.value=t.authRequired?n("testAuthRequired"):n("testSuccess").replace("{0}",String(t.tools))}catch(t){$.value=j(t)}finally{z.value=!1}}}return(t,e)=>(m(),T(de,{modelValue:g.value,"onUpdate:modelValue":e[12]||(e[12]=c=>g.value=c),"max-width":"720",scrollable:""},{default:r(()=>[o(L,null,{default:r(()=>[o(re,null,{default:r(()=>[f(i(n(q.server?"edit":"add")),1)]),_:1}),o(ue,{class:"custom-mcp-form"},{default:r(()=>[$.value?(m(),T(W,{key:0,type:"error",variant:"tonal",density:"compact"},{default:r(()=>[f(i($.value),1)]),_:1})):_("",!0),v.value?(m(),T(W,{key:1,type:R.value?"info":"success",variant:"tonal",density:"compact"},{default:r(()=>[f(i(v.value),1)]),_:1},8,["type"])):_("",!0),h("div",{class:"custom-mcp-transport",role:"group","aria-label":n("transport")},[o(V,{size:"small",rounded:"lg",variant:a.type==="http"?"tonal":"outlined",color:a.type==="http"?"primary":void 0,"aria-pressed":a.type==="http",onClick:e[0]||(e[0]=c=>a.type="http")},{default:r(()=>[f(i(n("remote")),1)]),_:1},8,["variant","color","aria-pressed"]),o(V,{size:"small",rounded:"lg",variant:a.type==="stdio"?"tonal":"outlined",color:a.type==="stdio"?"primary":void 0,"aria-pressed":a.type==="stdio",onClick:e[1]||(e[1]=c=>a.type="stdio")},{default:r(()=>[f(i(n("local")),1)]),_:1},8,["variant","color","aria-pressed"])],8,ke),o(G,{modelValue:a.name,"onUpdate:modelValue":e[2]||(e[2]=c=>a.name=c),label:n("name"),variant:"outlined",density:"comfortable","hide-details":""},null,8,["modelValue","label"]),a.type==="http"?(m(),k(H,{key:2},[o(G,{modelValue:a.url,"onUpdate:modelValue":e[3]||(e[3]=c=>a.url=c),label:"MCP Server URL",placeholder:"https://example.com/mcp",variant:"outlined",density:"comfortable","hide-details":""},null,8,["modelValue"]),o(we,{modelValue:a.authMode,"onUpdate:modelValue":e[4]||(e[4]=c=>a.authMode=c),label:n("authMode"),items:[{title:n("authAuto"),value:"auto"},{title:n("authNone"),value:"none"},{title:n("authHeaders"),value:"headers"}],variant:"outlined",density:"comfortable","hide-details":""},null,8,["modelValue","label","items"]),a.authMode==="headers"?(m(),T(se,{key:0,modelValue:a.headers,"onUpdate:modelValue":e[5]||(e[5]=c=>a.headers=c),label:n("headers"),placeholder:'{"X-API-Key":"..."}',rows:"2","auto-grow":"",variant:"outlined",density:"comfortable","hide-details":""},null,8,["modelValue","label"])):_("",!0),a.authMode==="auto"?(m(),k("div",Ce,i(n("authHint")),1)):_("",!0)],64)):(m(),k(H,{key:3},[o(G,{modelValue:a.command,"onUpdate:modelValue":e[6]||(e[6]=c=>a.command=c),label:n("command"),placeholder:"npx",variant:"outlined",density:"comfortable","hide-details":""},null,8,["modelValue","label"]),o(G,{modelValue:a.args,"onUpdate:modelValue":e[7]||(e[7]=c=>a.args=c),label:n("argsSimple"),placeholder:"-y @modelcontextprotocol/server-filesystem /path",variant:"outlined",density:"comfortable","hide-details":""},null,8,["modelValue","label"]),o(V,{variant:"text",size:"small",class:"align-self-start",onClick:e[8]||(e[8]=c=>y.value=!y.value)},{default:r(()=>[o(he,{icon:y.value?"$mdiChevronUp":"$mdiChevronDown",start:""},null,8,["icon"]),f(" "+i(n("advanced")),1)]),_:1}),y.value?(m(),k(H,{key:0},[o(G,{modelValue:a.cwd,"onUpdate:modelValue":e[9]||(e[9]=c=>a.cwd=c),label:n("cwd"),variant:"outlined",density:"comfortable","hide-details":""},null,8,["modelValue","label"]),o(se,{modelValue:a.env,"onUpdate:modelValue":e[10]||(e[10]=c=>a.env=c),label:n("envSimple"),placeholder:"KEY=value",rows:"2","auto-grow":"",variant:"outlined",density:"comfortable","hide-details":""},null,8,["modelValue","label"])],64)):_("",!0)],64)),q.server&&(q.server.envKeys.length||q.server.headerKeys.length)?(m(),k("div",xe,i(n("secretsHint"))+" "+i([...q.server.envKeys,...q.server.headerKeys].join(", ")),1)):_("",!0)]),_:1}),o(Z,{class:"flex-wrap"},{default:r(()=>[o(V,{variant:"text",loading:z.value,disabled:b.value,onClick:p},{default:r(()=>[f(i(n("test")),1)]),_:1},8,["loading","disabled"]),o(te),o(V,{variant:"text",disabled:b.value||z.value,onClick:e[11]||(e[11]=c=>g.value=!1)},{default:r(()=>[f(i(n("cancel")),1)]),_:1},8,["disabled"]),o(V,{color:"primary",loading:b.value,disabled:z.value,onClick:u},{default:r(()=>[f(i(n("save")),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Me=oe($e,[["__scopeId","data-v-828952e7"]]),Te={class:"custom-mcp-view"},Ue={class:"d-flex align-center justify-end ga-2"},Se={class:"d-flex align-center ga-1"},Ie={class:"empty-inline"},ze={class:"custom-mcp-header"},Re={class:"min-w-0"},Ee={class:"panel-title"},Ae={class:"text-caption text-medium-emphasis text-truncate"},Oe={key:0,class:"text-error text-body-2 px-4 pb-2"},Pe={key:0,class:"empty-inline"},qe={class:"min-w-0"},Be={class:"text-body-2 font-weight-medium"},Ne=["title"],De=ae({__name:"CustomMcpView",setup(q){const I=le(),d=s=>I.t("$vuetify.chatroom.customMcp."+s),g=C([]),U=C(!1),x=C(""),n=C(""),b=C(!1),z=C(null),y=C(null),$=Q(new Set),v=Q(new Set);let R=null,a=null,B=null;const N=()=>{R!==null&&window.clearInterval(R),B!==null&&window.clearTimeout(B),R=null,B=null,a=null},K=s=>{s.origin===window.location.origin&&s.data?.type==="chatroom:mcp-oauth-completed"&&(N(),s.data.success===!1&&(n.value=d("authFailed")),S())};ee(()=>window.addEventListener("message",K)),ye(()=>{N(),window.removeEventListener("message",K)}),ee(()=>{S()});async function S(){U.value=!0,x.value="";try{g.value=await P("/mcp/servers"),R!==null&&g.value.some(s=>s.id===a&&s.status==="connected")&&N()}catch(s){x.value=j(s)}finally{U.value=!1}}function u(){z.value=null,b.value=!0}function p(s){z.value=s,b.value=!0}function t(s){$.has(s)?$.delete(s):$.add(s)}async function e(s,M){if(!v.has(s)){v.add(s),x.value="";try{await M(),await S()}catch(l){x.value=j(l)}finally{v.delete(s)}}}async function c(s,M){await e(s.id,()=>P("/mcp/servers/"+encodeURIComponent(s.id),{method:"PATCH",body:JSON.stringify({enabled:M}),timeoutMs:3e4}))}async function E(s){await e(s.id,()=>P("/mcp/servers/"+encodeURIComponent(s.id)+"/refresh",{method:"POST",timeoutMs:3e4}))}async function D(s){if(v.has(s.id))return;const M=window.open("","chatroom-mcp-login","width=620,height=760");if(!M){n.value=d("popupBlocked");return}v.add(s.id),n.value="";try{const{authorizationUrl:l}=await P("/mcp/servers/"+encodeURIComponent(s.id)+"/authorize",{method:"POST",timeoutMs:3e4});M.location.href=l,N(),a=s.id,R=window.setInterval(()=>{S()},2500),B=window.setTimeout(()=>{N(),S()},600*1e3)}catch(l){M.close(),n.value=j(l)}finally{v.delete(s.id),await S()}}async function J(s){await e(s.id,()=>P("/mcp/servers/"+encodeURIComponent(s.id)+"/revoke",{method:"POST"}))}async function A(){const s=y.value;s&&(await e(s.id,()=>P("/mcp/servers/"+encodeURIComponent(s.id),{method:"DELETE"})),x.value||(y.value=null))}async function O(s,M){await e(s.name,()=>P("/mcp/tools/"+encodeURIComponent(s.name),{method:"PATCH",body:JSON.stringify({enabled:M})}))}return(s,M)=>(m(),k("div",Te,[x.value||n.value?(m(),T(W,{key:0,type:"error",variant:"tonal",density:"compact"},{default:r(()=>[f(i(x.value||n.value),1)]),_:1})):_("",!0),h("div",Ue,[h("div",Se,[o(V,{icon:"$mdiRefresh",size:"small",variant:"text",loading:U.value,"aria-label":d("refresh"),onClick:S},null,8,["loading","aria-label"]),o(V,{color:"primary","prepend-icon":"$mdiPlus",size:"small",onClick:u},{default:r(()=>[f(i(d("add")),1)]),_:1})])]),U.value&&!g.value.length?(m(),T(ce,{key:1,indeterminate:""})):_("",!0),!U.value&&!g.value.length?(m(),T(L,{key:2,class:"panel-card"},{default:r(()=>[h("div",Ie,i(d("empty")),1)]),_:1})):_("",!0),(m(!0),k(H,null,X(g.value,l=>(m(),T(L,{key:l.id,class:"panel-card"},{default:r(()=>[h("div",ze,[h("div",Re,[h("div",Ee,i(l.name),1),h("div",Ae,i(l.type==="stdio"?"stdio":"Streamable HTTP")+" · "+i(l.status==="connected"?d("connected"):l.status==="connecting"?d("connecting"):l.status==="disabled"?d("disabled"):l.status==="auth_required"?d("authRequired"):d("error"))+" · "+i(l.tools.length)+" "+i(d("tools")),1)]),o(Y,{"model-value":l.enabled,color:"primary",density:"compact","hide-details":"",inset:"",loading:v.has(l.id),disabled:v.has(l.id),"aria-label":l.name,"onUpdate:modelValue":w=>c(l,!!w)},null,8,["model-value","loading","disabled","aria-label","onUpdate:modelValue"])]),l.error?(m(),k("div",Oe,i(l.error),1)):_("",!0),o(Z,{class:"flex-wrap ga-1"},{default:r(()=>[o(V,{variant:"text",size:"small","append-icon":$.has(l.id)?"$mdiChevronUp":"$mdiChevronDown",onClick:w=>t(l.id)},{default:r(()=>[f(i(d("tools")),1)]),_:1},8,["append-icon","onClick"]),o(te),l.type==="http"&&l.authMode==="auto"&&(l.status==="auth_required"||l.authorized)?(m(),T(V,{key:0,variant:l.status==="auth_required"?"tonal":"text",color:l.status==="auth_required"?"primary":void 0,size:"small",loading:v.has(l.id),onClick:w=>D(l)},{default:r(()=>[f(i(d(l.status==="connected"?"reauthorize":"authorize")),1)]),_:2},1032,["variant","color","loading","onClick"])):_("",!0),l.type==="http"&&l.authMode==="auto"&&l.status==="connected"?(m(),T(V,{key:1,variant:"text",size:"small",disabled:v.has(l.id),onClick:w=>J(l)},{default:r(()=>[f(i(d("revoke")),1)]),_:1},8,["disabled","onClick"])):_("",!0),o(V,{variant:"text",size:"small",disabled:v.has(l.id),onClick:w=>p(l)},{default:r(()=>[f(i(d("edit")),1)]),_:1},8,["disabled","onClick"]),o(V,{variant:"text",size:"small",loading:v.has(l.id),disabled:!l.enabled,onClick:w=>E(l)},{default:r(()=>[f(i(d("refresh")),1)]),_:1},8,["loading","disabled","onClick"]),o(V,{variant:"text",color:"error",size:"small",disabled:v.has(l.id),onClick:w=>y.value=l},{default:r(()=>[f(i(d("delete")),1)]),_:1},8,["disabled","onClick"])]),_:2},1024),$.has(l.id)?(m(),k(H,{key:1},[o(me),l.tools.length?_("",!0):(m(),k("div",Pe,i(d("noTools")),1)),(m(!0),k(H,null,X(l.tools,w=>(m(),k("div",{key:w.name,class:"custom-mcp-tool-row"},[h("div",qe,[h("div",Be,i(w.title),1),h("div",{class:"text-caption text-medium-emphasis text-truncate",title:w.description},i(w.name),9,Ne)]),o(Y,{"model-value":w.enabled,color:"primary",density:"compact","hide-details":"",inset:"",loading:v.has(w.name),disabled:v.has(w.name)||!l.enabled,"aria-label":w.title,"onUpdate:modelValue":pe=>O(w,!!pe)},null,8,["model-value","loading","disabled","aria-label","onUpdate:modelValue"])]))),128))],64)):_("",!0)]),_:2},1024))),128)),o(Me,{modelValue:b.value,"onUpdate:modelValue":M[0]||(M[0]=l=>b.value=l),server:z.value,onSaved:S},null,8,["modelValue","server"]),o(de,{"model-value":!!y.value,width:"auto","max-width":"32rem",persistent:!!(y.value&&v.has(y.value.id)),"onUpdate:modelValue":M[2]||(M[2]=l=>!l&&(y.value=null))},{default:r(()=>[y.value?(m(),T(L,{key:0},{default:r(()=>[o(ge,{"prepend-icon":"$mdiAlertCircleOutline",class:"text-error"},{default:r(()=>[o(re,null,{default:r(()=>[f(i(d("delete")),1)]),_:1})]),_:1}),o(ue,null,{default:r(()=>[f(i(d("deleteConfirm").replace("{0}",y.value.name)),1)]),_:1}),o(Z,null,{default:r(()=>[o(te),o(V,{variant:"text",disabled:v.has(y.value.id),onClick:M[1]||(M[1]=l=>y.value=null)},{default:r(()=>[f(i(d("cancel")),1)]),_:1},8,["disabled"]),o(V,{color:"error",variant:"flat",loading:v.has(y.value.id),onClick:A},{default:r(()=>[f(i(d("delete")),1)]),_:1},8,["loading"])]),_:1})]),_:1})):_("",!0)]),_:1},8,["model-value","persistent"])]))}}),Je=oe(De,[["__scopeId","data-v-f2c6da95"]]),He={class:"mcp-tools-shell"},Le={key:1,class:"mcp-tools-view"},je={class:"panel-header"},Ke={class:"panel-title"},Fe={class:"mcp-tool-group-header"},Ge={class:"min-w-0"},We={class:"panel-title"},Qe={class:"mcp-tool-list"},Xe=["title"],Ye={class:"mcp-tool-heading"},Ze={class:"empty-inline"},et=ae({__name:"McpToolsView",setup(q){const I=le(),d=C("builtIn"),g=C([]),U=C(!1),x=C(""),n=Q(new Set),b=be(),z=_e(()=>{const u=new Map;for(const p of g.value){if(p.pluginId==="custom-mcp")continue;const t=u.get(p.pluginId)??[];t.push(p),u.set(p.pluginId,t)}return[...u.entries()].map(([p,t])=>({pluginId:p,tools:t}))});ee(()=>{y()});async function y(){if(n.size)return;const u=b.begin();U.value=!0,x.value="";try{const p=await P("/mcp/tools",{signal:u.signal});b.isCurrent(u)&&(g.value=p)}catch(p){b.isCurrent(u)&&(x.value=j(p))}finally{b.isCurrent(u)&&(U.value=!1)}}async function $(u,p){if(!(n.has(u.name)||u.enabled===p)){b.invalidate(),U.value=!1,n.add(u.name),x.value="";try{const t=await P(`/mcp/tools/${encodeURIComponent(u.name)}`,{method:"PATCH",body:JSON.stringify({enabled:p})});g.value=g.value.map(e=>e.name===t.name?t:e)}catch(t){x.value=j(t)}finally{n.delete(u.name)}}}async function v(u,p){const t=u.tools.filter(e=>e.enabled!==p&&!n.has(e.name));await Promise.all(t.map(e=>$(e,p)))}function R(u){return["workspace","process","computer","agent"].includes(u)?I.t(`$vuetify.chatroom.mcpTools.plugins.${u}`):u}const a=new Set(["workspace_list","workspace_info","workspace_file_get","process_start","process_read","process_write","process_kill","computer_snapshot","computer_action","agent_providers","agent_provider_details","agent_models","agent_sessions","agent_create","agent_send","agent_steer","agent_review","agent_history","agent_configure","agent_respond","agent_interrupt","agent_switch_provider"]);function B(u){return a.has(u.name)?I.t("$vuetify.chatroom.mcpTools.tools."+u.name+".title"):u.title}function N(u){return a.has(u.name)?I.t("$vuetify.chatroom.mcpTools.tools."+u.name+".description"):u.description}function K(u){return u.tools.some(p=>p.enabled)}function S(u){return u.tools.every(p=>p.enabled)}return(u,p)=>(m(),k("div",He,[o(Ve,{modelValue:d.value,"onUpdate:modelValue":p[0]||(p[0]=t=>d.value=t),color:"primary",density:"compact"},{default:r(()=>[o(ie,{value:"builtIn"},{default:r(()=>[f(i(F(I).t("$vuetify.chatroom.customMcp.builtIn")),1)]),_:1}),o(ie,{value:"custom"},{default:r(()=>[f(i(F(I).t("$vuetify.chatroom.customMcp.custom")),1)]),_:1})]),_:1},8,["modelValue"]),d.value==="custom"?(m(),T(Je,{key:0})):(m(),k("div",Le,[x.value?(m(),T(W,{key:0,type:"error",variant:"tonal",density:"compact"},{default:r(()=>[f(i(x.value),1)]),_:1})):_("",!0),o(L,{class:"panel-card"},{default:r(()=>[h("div",je,[h("div",null,[h("div",Ke,i(F(I).t("$vuetify.chatroom.mcpTools.title")),1)]),o(V,{class:"mcp-tools-refresh",icon:"$mdiRefresh",size:"small",variant:"text",loading:U.value,disabled:n.size>0,"aria-label":F(I).t("$vuetify.chatroom.mcpTools.refresh"),onClick:y},null,8,["loading","disabled","aria-label"])])]),_:1}),U.value&&!g.value.length?(m(),T(ce,{key:1,indeterminate:"",rounded:""})):_("",!0),(m(!0),k(H,null,X(z.value,t=>(m(),T(L,{key:t.pluginId,class:"panel-card mcp-tool-group"},{default:r(()=>[h("div",Fe,[h("div",Ge,[h("div",We,i(R(t.pluginId)),1)]),o(Y,{class:"mcp-tool-switch","model-value":S(t),indeterminate:K(t)&&!S(t),color:"primary",density:"compact","hide-details":"",inset:"",disabled:t.tools.some(e=>n.has(e.name)),"aria-label":F(I).t("$vuetify.chatroom.mcpTools.togglePlugin",R(t.pluginId)),"onUpdate:modelValue":e=>v(t,!!e)},null,8,["model-value","indeterminate","disabled","aria-label","onUpdate:modelValue"])]),o(me),h("div",Qe,[(m(!0),k(H,null,X(t.tools,e=>(m(),k("div",{key:e.name,class:"mcp-tool-row"},[h("div",{class:"mcp-tool-copy",title:N(e)},[h("div",Ye,[h("strong",null,i(B(e)),1),h("code",null,i(e.name),1)])],8,Xe),o(Y,{class:"mcp-tool-switch","model-value":e.enabled,color:"primary",density:"compact","hide-details":"",inset:"",loading:n.has(e.name),"aria-label":B(e),"onUpdate:modelValue":c=>$(e,!!c)},null,8,["model-value","loading","aria-label","onUpdate:modelValue"])]))),128))])]),_:2},1024))),128)),!U.value&&!g.value.length?(m(),T(L,{key:2,class:"panel-card"},{default:r(()=>[h("div",Ze,i(F(I).t("$vuetify.chatroom.mcpTools.empty")),1)]),_:1})):_("",!0)]))]))}}),dt=oe(et,[["__scopeId","data-v-153efee2"]]);export{dt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.custom-mcp-transport[data-v-828952e7]{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.custom-mcp-form[data-v-828952e7]{display:grid;grid-template-columns:minmax(0,1fr);gap:20px}.custom-mcp-view[data-v-f2c6da95]{display:grid;gap:14px}.custom-mcp-header[data-v-f2c6da95],.custom-mcp-tool-row[data-v-f2c6da95]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:12px 16px}.custom-mcp-tool-row+.custom-mcp-tool-row[data-v-f2c6da95]{border-top:1px solid rgba(var(--v-border-color),var(--v-border-opacity))}.mcp-tools-shell[data-v-153efee2],.mcp-tools-view[data-v-153efee2]{display:grid;gap:14px}.mcp-tools-refresh[data-v-153efee2]{flex:0 0 auto}.mcp-tool-group-header[data-v-153efee2],.mcp-tool-row[data-v-153efee2]{display:grid;grid-template-columns:minmax(0,1fr) 52px;align-items:center;column-gap:18px}.mcp-tool-group-header[data-v-153efee2]{min-height:56px;padding:10px 18px}.mcp-tool-list[data-v-153efee2]{display:grid}.mcp-tool-row[data-v-153efee2]{min-width:0;min-height:54px;padding:8px 18px;border-bottom:1px solid rgb(var(--v-theme-outline),.08)}.mcp-tool-row[data-v-153efee2]:last-child{border-bottom:0}.mcp-tool-copy[data-v-153efee2]{width:100%;min-width:0}.mcp-tool-heading[data-v-153efee2]{display:flex;min-width:0;align-items:baseline;gap:12px}.mcp-tool-heading strong[data-v-153efee2],.mcp-tool-heading code[data-v-153efee2]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mcp-tool-heading strong[data-v-153efee2]{flex:0 1 auto;font-size:13px;font-weight:650}.mcp-tool-heading code[data-v-153efee2]{flex:1 1 0;color:rgb(var(--v-theme-on-surface),.52);font-size:11px}.mcp-tool-switch[data-v-153efee2]{justify-self:end}.mcp-tool-switch[data-v-153efee2] .v-input__control,.mcp-tool-switch[data-v-153efee2] .v-selection-control{inline-size:max-content}.mcp-tool-switch[data-v-153efee2] .v-selection-control{flex:0 0 auto}@media(max-width:640px){.mcp-tools-shell[data-v-153efee2]{display:grid;gap:14px}.mcp-tools-view[data-v-153efee2]{gap:12px}.mcp-tool-group-header[data-v-153efee2],.mcp-tool-row[data-v-153efee2]{column-gap:10px;padding-inline:14px}.mcp-tool-group-header[data-v-153efee2]{min-height:54px}.mcp-tool-row[data-v-153efee2]{min-height:52px;padding-block:7px}.mcp-tool-heading[data-v-153efee2]{gap:8px}}@media(max-width:380px){.mcp-tool-group-header[data-v-153efee2],.mcp-tool-row[data-v-153efee2]{column-gap:8px;padding-inline:12px}.mcp-tool-heading[data-v-153efee2]{gap:6px}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as ae,a0 as be,w as Z,i as Q,y as W,a7 as de,s as C,d as ie,u as re,c as f,l as O,p as u,f as i,m as H,g as e,h as B,t as l,
|
|
1
|
+
import{$ as ae,a0 as be,w as Z,i as Q,y as W,a7 as de,s as C,d as ie,u as re,c as f,l as O,p as u,f as i,m as H,g as e,h as B,t as l,b6 as _e,a3 as ke,k as s,C as oe,e as P,q as $,z as ee,v as we,F as pe,j as Ce,n as Ve,bs as Se,b7 as Ae,b3 as xe,ab as ve,b as Me,ae as Oe,X as Be,b4 as Re,E as le,af as Le,O as Te,P as De,Q as qe,T as Ee,I as ze}from"./index-CFhV1jOj.js";import{c as Ue}from"./entity-refresh-queue-wQii8Dl5.js";import{u as Pe}from"./useMasterDetailFocus-CMJXBPPp.js";import{u as me}from"./useOperationLabels-DSbMa9Eb.js";import{_ as Y}from"./CodeViewer.vue_vue_type_script_setup_true_lang-DfPmlGC0.js";import{_ as he}from"./StateChip.vue_vue_type_script_setup_true_lang-D_LKEtqT.js";import{V as Fe,a as ne,b as He,c as se}from"./VTabs-HKX286IT.js";import{V as Ne}from"./VSpacer-BYe3Z99W.js";import"./VSheet-CNayLacf.js";const X=50,j=1e3;function je(a,h){const o=C([]),n=C(null),m=C(null),V=C("all"),r=C(!1),R=C(!1),y=C(!1),c=C(!1),p=C(""),I=C(!1),w=ae(),_=ae(),S=ae(),L=new Map;let T=!1,A=null,D=0,g=!1;const z=Ue({keyOf:t=>t.operationId,merge:(t,d)=>d,isReady:()=>T,isLoading:()=>r.value,isDisposed:()=>g,refreshAll:N,applyBatch:k});be(()=>{g=!0,T=!1,z.reset(),L.clear(),w.invalidate(),_.invalidate(),S.invalidate()}),Z(V,()=>{T=!1,A=null,z.reset(),S.invalidate(),N()},{immediate:!0}),Z(a,()=>{$e(h())}),Z(n,()=>{D+=1,q(D)});function J(t,d=null){const v=new URLSearchParams({limit:String(t)});return V.value!=="all"&&v.set("status",V.value),d&&(v.set("beforeStartedAt",d.startedAt),v.set("beforeOperationId",d.operationId)),`/operations?${v}`}async function N(){if(g)return;T=!1;const t=w.begin();r.value=!0,R.value=!1,p.value="";try{const d=await Q(J(X),{signal:t.signal});if(g||!w.isCurrent(t))return;if(o.value=d.slice(0,j),I.value=!1,A=fe(d),y.value=d.length===X,T=!0,n.value){const v=d.find(x=>x.operationId===n.value);v?(_.invalidate(),m.value=v):q(D)}}catch(d){w.isCurrent(t)&&(p.value=W(d))}finally{w.isCurrent(t)&&(r.value=!1,T&&z.drain())}}async function te(){if(r.value||R.value||!y.value)return;const t=w.begin(),d=A;R.value=!0;try{const v=await Q(J(X,d),{signal:t.signal});if(g||!w.isCurrent(t))return;v.length&&(A=fe(v));const x=new Set(o.value.map(M=>M.operationId)),G=[...o.value,...v.filter(M=>!x.has(M.operationId))];o.value=G.slice(0,j),I.value=G.length>j||o.value.length>=j&&v.length===X,y.value=!I.value&&v.length===X}catch(v){w.isCurrent(t)&&(p.value=W(v))}finally{w.isCurrent(t)&&(R.value=!1)}}async function k(t){if(g||!t.length)return;const d=S.begin(),v=n.value,x=D,G=await Promise.allSettled(t.map(async U=>{try{return await Q(`/operations/${encodeURIComponent(U.operationId)}`,{signal:d.signal})}catch(E){if(E instanceof de&&E.status===404)return null;throw E}}));if(g||!S.isCurrent(d))return;let M=[...o.value];for(let U=0;U<G.length;U+=1){const E=G[U],ce=t[U];if(E.status==="rejected"){b(ce,E.reason);continue}L.delete(ce.operationId);const F=E.value;if(!F)continue;const K=M.findIndex(Ie=>Ie.operationId===F.operationId);Ge(F,V.value)?K>=0?M[K]=F:M.push(F):K>=0&&M.splice(K,1),n.value===F.operationId&&v===F.operationId&&D===x&&(_.invalidate(),m.value=F)}M.sort((U,E)=>E.startedAt.localeCompare(U.startedAt)||E.operationId.localeCompare(U.operationId)),M.length>j&&(I.value=!0,y.value=!1),o.value=M.slice(0,j)}function b(t,d){const v=(L.get(t.operationId)??0)+1;if(v<=1&&!g){L.set(t.operationId,v),z.enqueue([t]);return}L.delete(t.operationId),p.value=W(d)}async function q(t=D){const d=n.value,v=_.begin();if(!d){m.value=null;return}try{const x=await Q(`/operations/${encodeURIComponent(d)}`,{signal:v.signal});_.isCurrent(v)&&n.value===d&&D===t&&(m.value=x)}catch(x){if(!_.isCurrent(v))return;if(x instanceof de&&x.status===404){n.value===d&&D===t&&ue();return}p.value=W(x)}}async function ye(){if(c.value)return!1;c.value=!0,p.value="",w.invalidate(),S.invalidate(),_.invalidate();try{return await Q("/operations",{method:"DELETE"}),n.value=null,m.value=null,T=!1,A=null,await N(),!0}catch(t){return p.value=W(t),!1}finally{c.value=!1}}function ge(t){n.value=t.operationId,m.value=t}function ue(){n.value=null,m.value=null,_.invalidate()}function $e(t){if(!g){if(t===null){z.enqueue(null);return}if(!t.clearAll){z.enqueue(t.changes);return}S.invalidate(),L.clear(),z.reset(),n.value=null,m.value=null,_.invalidate(),o.value=[],A=null,y.value=!1,I.value=!1,T=!1,N()}}return{events:o,selected:n,detail:m,filter:V,loading:r,loadingMore:R,hasMore:y,clearing:c,error:p,limitReached:I,loadInitial:N,loadMore:te,select:ge,clearSelection:ue,clearHistory:ye}}function fe(a){const h=a.at(-1);return h?{startedAt:h.startedAt,operationId:h.operationId}:null}function Ge(a,h){return h==="all"||a.status===h}const Qe={class:"panel-header operation-detail-header"},We={class:"min-w-0 detail-header-title"},Xe={class:"panel-title text-truncate"},Ze={class:"panel-subtitle"},Je={class:"detail-facts"},Ke={class:"mono"},Ye={key:0},et={class:"mono"},tt={class:"empty-panel"},at=ie({__name:"OperationDetail",props:{event:{},showBack:{type:Boolean}},emits:["back"],setup(a){const h=a,o=C("input"),n=re(),{actionLabel:m,sourceLabel:V}=me(),r=we(()=>R(h.event?.output));function R(y){if(!y||typeof y!="object"||Array.isArray(y))return null;const c=y;if(typeof c.stdout!="string"&&typeof c.stderr!="string")return null;const p=typeof c.stdout=="string"?c.stdout:"",I=typeof c.stderr=="string"&&c.stderr?`
|
|
2
2
|
|
|
3
3
|
[stderr]
|
|
4
|
-
${c.stderr}`:"";return`${p}${I}`}return(y,c)=>a.event?(f(),O(ee,{key:0,class:"panel-card"},{default:u(()=>[i("div",Qe,[a.showBack?(f(),O(H,{key:0,icon:"$mdiArrowLeft",size:"small",variant:"text","aria-label":e(n).t("$vuetify.chatroom.operations.back"),onClick:c[0]||(c[0]=p=>y.$emit("back"))},null,8,["aria-label"])):B("",!0),i("div",We,[i("div",Xe,l(e(m)(a.event.pluginId,a.event.action)),1),i("div",Ze,l(e(V)(a.event.source))+" · "+l(e(_e)(a.event.startedAt,e(ke)(e(n).current.value))),1)]),s(he,{value:a.event.status},null,8,["value"])]),s(oe),i("div",Je,[i("div",null,[i("span",null,l(e(n).t("$vuetify.chatroom.detail.plugin")),1),i("strong",Ke,l(a.event.pluginId),1)]),i("div",null,[i("span",null,l(e(n).t("$vuetify.chatroom.detail.duration")),1),i("strong",null,l(a.event.durationMs===null?e(n).t("$vuetify.chatroom.statuses.running"):`${a.event.durationMs} ms`),1)]),a.event.processId?(f(),P("div",Ye,[i("span",null,l(e(n).t("$vuetify.chatroom.detail.process")),1),i("strong",et,l(a.event.processId.slice(0,16)),1)])):B("",!0)]),s(Fe,{modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=p=>o.value=p),density:"compact",class:"detail-tabs"},{default:u(()=>[s(ne,{value:"input"},{default:u(()=>[$(l(e(n).t("$vuetify.chatroom.detail.input")),1)]),_:1}),s(ne,{value:"output"},{default:u(()=>[$(l(e(n).t("$vuetify.chatroom.detail.output")),1)]),_:1}),a.event.error?(f(),O(ne,{key:0,value:"failure"},{default:u(()=>[$(l(e(n).t("$vuetify.chatroom.detail.error")),1)]),_:1})):B("",!0)]),_:1},8,["modelValue"]),s(oe),s(He,{modelValue:o.value,"onUpdate:modelValue":c[2]||(c[2]=p=>o.value=p),touch:!1},{default:u(()=>[s(se,{value:"input",class:"pa-3"},{default:u(()=>[s(Y,{value:a.event.input},null,8,["value"])]),_:1}),s(se,{value:"output",class:"pa-3"},{default:u(()=>[r.value!==null?(f(),O(Y,{key:0,text:r.value??"",filename:"operation-terminal.txt",highlight:a.event.status!=="running"},null,8,["text","highlight"])):(f(),O(Y,{key:1,value:a.event.output,highlight:a.event.status!=="running"},null,8,["value","highlight"]))]),_:1}),a.event.error?(f(),O(se,{key:0,value:"failure",class:"pa-3"},{default:u(()=>[s(Y,{value:a.event.error},null,8,["value"])]),_:1})):B("",!0)]),_:1},8,["modelValue"])]),_:1})):(f(),O(ee,{key:1,class:"panel-card"},{default:u(()=>[i("div",tt,l(e(n).t("$vuetify.chatroom.operations.select")),1)]),_:1}))}}),lt={key:0,class:"responsive-record-list"},nt=["aria-current","data-operation-id","onClick"],st={class:"responsive-record-main"},ot={class:"responsive-record-title"},it={class:"responsive-record-subtitle mono"},rt={class:"responsive-record-meta"},ut={class:"responsive-record-side"},ct={key:1,class:"empty-inline"},dt=ie({__name:"OperationTable",props:{events:{},selected:{}},emits:["select"],setup(a){const h=re(),{actionLabel:o,sourceLabel:n}=me();return(m,V)=>a.events.length?(f(),P("div",lt,[(f(!0),P(pe,null,Ce(a.events,r=>(f(),P("button",{key:r.operationId,type:"button",class:Ve(["responsive-record-row",{"selected-row":a.selected===r.operationId}]),"aria-current":a.selected===r.operationId?"true":void 0,"data-operation-id":r.operationId,onClick:R=>m.$emit("select",r)},[i("div",st,[i("div",ot,l(e(o)(r.pluginId,r.action)),1),i("div",it,l(r.pluginId),1)]),i("div",rt,[i("span",null,l(e(Se)(r.startedAt)),1),i("span",null,l(e(n)(r.source)),1),i("span",null,l(r.durationMs===null?e(h).t("$vuetify.chatroom.statuses.running"):e(Ae)(r.durationMs)),1)]),i("div",ut,[s(he,{value:r.status},null,8,["value"])])],10,nt))),128))])):(f(),P("div",ct,l(e(h).t("$vuetify.chatroom.operations.empty")),1))}}),vt={ref:"layout",class:"master-detail-layout operations-layout"},ft={key:0,class:"master-pane"},pt={class:"panel-header operations-header"},mt={class:"panel-title"},ht={class:"panel-subtitle"},yt={class:"operations-controls"},gt={key:1,ref:"detailPane",class:"detail-pane",tabindex:"-1"},
|
|
4
|
+
${c.stderr}`:"";return`${p}${I}`}return(y,c)=>a.event?(f(),O(ee,{key:0,class:"panel-card"},{default:u(()=>[i("div",Qe,[a.showBack?(f(),O(H,{key:0,icon:"$mdiArrowLeft",size:"small",variant:"text","aria-label":e(n).t("$vuetify.chatroom.operations.back"),onClick:c[0]||(c[0]=p=>y.$emit("back"))},null,8,["aria-label"])):B("",!0),i("div",We,[i("div",Xe,l(e(m)(a.event.pluginId,a.event.action)),1),i("div",Ze,l(e(V)(a.event.source))+" · "+l(e(_e)(a.event.startedAt,e(ke)(e(n).current.value))),1)]),s(he,{value:a.event.status},null,8,["value"])]),s(oe),i("div",Je,[i("div",null,[i("span",null,l(e(n).t("$vuetify.chatroom.detail.plugin")),1),i("strong",Ke,l(a.event.pluginId),1)]),i("div",null,[i("span",null,l(e(n).t("$vuetify.chatroom.detail.duration")),1),i("strong",null,l(a.event.durationMs===null?e(n).t("$vuetify.chatroom.statuses.running"):`${a.event.durationMs} ms`),1)]),a.event.processId?(f(),P("div",Ye,[i("span",null,l(e(n).t("$vuetify.chatroom.detail.process")),1),i("strong",et,l(a.event.processId.slice(0,16)),1)])):B("",!0)]),s(Fe,{modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=p=>o.value=p),density:"compact",class:"detail-tabs"},{default:u(()=>[s(ne,{value:"input"},{default:u(()=>[$(l(e(n).t("$vuetify.chatroom.detail.input")),1)]),_:1}),s(ne,{value:"output"},{default:u(()=>[$(l(e(n).t("$vuetify.chatroom.detail.output")),1)]),_:1}),a.event.error?(f(),O(ne,{key:0,value:"failure"},{default:u(()=>[$(l(e(n).t("$vuetify.chatroom.detail.error")),1)]),_:1})):B("",!0)]),_:1},8,["modelValue"]),s(oe),s(He,{modelValue:o.value,"onUpdate:modelValue":c[2]||(c[2]=p=>o.value=p),touch:!1},{default:u(()=>[s(se,{value:"input",class:"pa-3"},{default:u(()=>[s(Y,{value:a.event.input},null,8,["value"])]),_:1}),s(se,{value:"output",class:"pa-3"},{default:u(()=>[r.value!==null?(f(),O(Y,{key:0,text:r.value??"",filename:"operation-terminal.txt",highlight:a.event.status!=="running"},null,8,["text","highlight"])):(f(),O(Y,{key:1,value:a.event.output,highlight:a.event.status!=="running"},null,8,["value","highlight"]))]),_:1}),a.event.error?(f(),O(se,{key:0,value:"failure",class:"pa-3"},{default:u(()=>[s(Y,{value:a.event.error},null,8,["value"])]),_:1})):B("",!0)]),_:1},8,["modelValue"])]),_:1})):(f(),O(ee,{key:1,class:"panel-card"},{default:u(()=>[i("div",tt,l(e(n).t("$vuetify.chatroom.operations.select")),1)]),_:1}))}}),lt={key:0,class:"responsive-record-list"},nt=["aria-current","data-operation-id","onClick"],st={class:"responsive-record-main"},ot={class:"responsive-record-title"},it={class:"responsive-record-subtitle mono"},rt={class:"responsive-record-meta"},ut={class:"responsive-record-side"},ct={key:1,class:"empty-inline"},dt=ie({__name:"OperationTable",props:{events:{},selected:{}},emits:["select"],setup(a){const h=re(),{actionLabel:o,sourceLabel:n}=me();return(m,V)=>a.events.length?(f(),P("div",lt,[(f(!0),P(pe,null,Ce(a.events,r=>(f(),P("button",{key:r.operationId,type:"button",class:Ve(["responsive-record-row",{"selected-row":a.selected===r.operationId}]),"aria-current":a.selected===r.operationId?"true":void 0,"data-operation-id":r.operationId,onClick:R=>m.$emit("select",r)},[i("div",st,[i("div",ot,l(e(o)(r.pluginId,r.action)),1),i("div",it,l(r.pluginId),1)]),i("div",rt,[i("span",null,l(e(Se)(r.startedAt)),1),i("span",null,l(e(n)(r.source)),1),i("span",null,l(r.durationMs===null?e(h).t("$vuetify.chatroom.statuses.running"):e(Ae)(r.durationMs)),1)]),i("div",ut,[s(he,{value:r.status},null,8,["value"])])],10,nt))),128))])):(f(),P("div",ct,l(e(h).t("$vuetify.chatroom.operations.empty")),1))}}),vt={ref:"layout",class:"master-detail-layout operations-layout"},ft={key:0,class:"master-pane"},pt={class:"panel-header operations-header"},mt={class:"panel-title"},ht={class:"panel-subtitle"},yt={class:"operations-controls"},gt={key:1,ref:"detailPane",class:"detail-pane",tabindex:"-1"},At=ie({__name:"OperationsView",props:{revision:{},changes:{}},setup(a){const h=a,o=re(),{mdAndDown:n}=xe(),m=ve("loadSentinel"),V=ve("listScroller"),r=C(!1),{focusDetail:R,focusMaster:y}=Pe(n),c=je(()=>h.revision,()=>h.changes),{events:p,selected:I,detail:w,filter:_,loadingMore:S,hasMore:L,clearing:T,error:A,limitReached:D}=c;let g=null;Z(m,k=>{g?.disconnect(),g=null,k&&(g=new IntersectionObserver(b=>{b.some(q=>q.isIntersecting)&&c.loadMore()},{rootMargin:"240px 0px"}),g.observe(k))},{flush:"post"}),Z(()=>[p.value.length,L.value,S.value],()=>{z()},{flush:"post"}),Me(()=>g?.disconnect());async function z(){await Oe();const k=m.value;if(!k||S.value||!L.value)return;const b=V.value?.getBoundingClientRect().bottom??window.innerHeight;k.getBoundingClientRect().top<=Math.min(b,window.innerHeight)+240&&c.loadMore()}function J(k){c.select(k),R()}function N(){const k=I.value;c.clearSelection(),k&&y(`[data-operation-id="${CSS.escape(k)}"]`)}async function te(){await c.clearHistory()&&(r.value=!1)}return(k,b)=>(f(),P(pe,null,[i("div",vt,[!e(n)||!e(I)?(f(),P("div",ft,[s(ee,{class:"panel-card"},{default:u(()=>[i("div",pt,[i("div",null,[i("div",mt,l(e(o).t("$vuetify.chatroom.operations.title")),1),i("div",ht,l(e(o).t("$vuetify.chatroom.operations.subtitle")),1)]),i("div",yt,[s(Be,{modelValue:e(_),"onUpdate:modelValue":b[0]||(b[0]=q=>Re(_)?_.value=q:null),mandatory:"",variant:"text",class:"record-filters"},{default:u(()=>[s(H,{value:"all",size:"small"},{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.all")),1)]),_:1}),s(H,{value:"running",size:"small"},{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.running")),1)]),_:1}),s(H,{value:"error",size:"small"},{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.errors")),1)]),_:1}),s(H,{value:"success",size:"small"},{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.success")),1)]),_:1})]),_:1},8,["modelValue"]),s(H,{"prepend-icon":"$mdiDeleteSweepOutline",variant:"text",size:"small",class:"operations-clear",disabled:!e(p).length,onClick:b[1]||(b[1]=q=>r.value=!0)},{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.clear")),1)]),_:1},8,["disabled"])])]),s(oe),e(A)?(f(),O(le,{key:0,type:"error",variant:"tonal",density:"compact"},{default:u(()=>[$(l(e(A)),1)]),_:1})):B("",!0),i("div",{ref_key:"listScroller",ref:V,class:"operation-scroll-area"},[s(dt,{events:e(p),selected:e(I),onSelect:J},null,8,["events","selected"]),e(D)?(f(),O(le,{key:0,type:"info",variant:"tonal",density:"compact",class:"operation-window-limit"},{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.windowLimit")),1)]),_:1})):B("",!0),e(L)||e(S)?(f(),P("div",{key:1,ref_key:"loadSentinel",ref:m,class:"operation-load-sentinel","aria-hidden":"true"},[e(S)?(f(),O(Le,{key:0,indeterminate:"",size:"20",width:"2"})):B("",!0)],512)):B("",!0)],512)]),_:1})])):B("",!0),!e(n)||e(I)?(f(),P("div",gt,[e(n)&&e(I)&&e(A)?(f(),O(le,{key:0,type:"error",variant:"tonal",density:"compact"},{default:u(()=>[$(l(e(A)),1)]),_:1})):B("",!0),s(at,{event:e(w),"show-back":e(n),onBack:N},null,8,["event","show-back"])],512)):B("",!0)],512),s(ze,{modelValue:r.value,"onUpdate:modelValue":b[3]||(b[3]=q=>r.value=q),width:"auto","max-width":"32rem"},{default:u(()=>[s(ee,null,{default:u(()=>[s(Te,{"prepend-icon":"$mdiAlertCircleOutline",class:"text-error"},{default:u(()=>[s(De,null,{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.clearTitle")),1)]),_:1})]),_:1}),s(qe,null,{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.clearDescription")),1)]),_:1}),s(Ee,null,{default:u(()=>[s(Ne),s(H,{variant:"text",onClick:b[2]||(b[2]=q=>r.value=!1)},{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.common.cancel")),1)]),_:1}),s(H,{color:"error",variant:"flat",loading:e(T),onClick:te},{default:u(()=>[$(l(e(o).t("$vuetify.chatroom.operations.clearConfirm")),1)]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}});export{At as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{$ as se,a0 as we,w as oe,i as F,y as G,s as E,a7 as ce,v as ie,d as ee,u as de,c as $,l as T,p as x,f as a,m as j,g as t,h as L,t as u,q as ue,a8 as pe,k as y,W as fe,Y as me,a9 as ve,C as H,z as Y,o as xe,
|
|
1
|
+
import{$ as se,a0 as we,w as oe,i as F,y as G,s as E,a7 as ce,v as ie,d as ee,u as de,c as $,l as T,p as x,f as a,m as j,g as t,h as L,t as u,q as ue,a8 as pe,k as y,W as fe,Y as me,a9 as ve,C as H,z as Y,o as xe,b5 as Se,e as P,V as ae,F as Oe,j as Ae,S as re,ac as Q,n as ne,b6 as De,a3 as Te,b7 as Pe,af as Ve,b3 as Be,E as Le}from"./index-CFhV1jOj.js";import{c as Re}from"./entity-refresh-queue-wQii8Dl5.js";import{u as qe}from"./useMasterDetailFocus-CMJXBPPp.js";import{_ as le}from"./CodeViewer.vue_vue_type_script_setup_true_lang-DfPmlGC0.js";import{_ as ye}from"./StateChip.vue_vue_type_script_setup_true_lang-D_LKEtqT.js";import"./VSheet-CNayLacf.js";import"./VSpacer-BYe3Z99W.js";const Z=512*1024;function ze(e,c){const r=e+c;return r.length<=Z?r:`[earlier output truncated]
|
|
2
2
|
`+r.slice(-Z)}function Me(e,c){const r=E([]),f=E(null),d=E(null),n=E(""),g=E(!1),s=se(),h=se();let q=!1,V=!1;const R=new Map,z=new Set;let O=0,v=null,_=!1,A=!1;const M=Re({keyOf:o=>o.processId,merge:Ne,isReady:()=>V,isLoading:()=>g.value,isDisposed:()=>A,refreshAll:J,applyBatch:$e});we(()=>{A=!0,v?.close(),v=null,_=!1,V=!1,M.reset(),R.clear(),s.invalidate(),h.invalidate();for(const o of z)o.abort();z.clear()});const he=ie(()=>{if(!d.value)return"";const o=d.value.stderr?`
|
|
3
3
|
|
|
4
4
|
[stderr]
|
|
5
|
-
${d.value.stderr}`:"";return`${d.value.stdout}${o}`});oe(e,()=>{if(!q){q=!0,J();return}M.enqueue(c())},{immediate:!0}),oe(f,()=>{O+=1,h.invalidate(),v?.close(),v=null,_=!1;const o=f.value;o&&(typeof EventSource>"u"?U(O):ge(o,O))});async function J(){if(A)return;V=!1;const o=s.begin();g.value=!0,n.value="";try{const p=await F("/processes",{signal:o.signal});if(A||!s.isCurrent(o))return;r.value=p,V=!0,f.value&&!p.some(l=>l.processId===f.value)?K():f.value&&!v&&U()}catch(p){s.isCurrent(o)&&(n.value=G(p))}finally{s.isCurrent(o)&&(g.value=!1,V&&M.drain())}}async function $e(o){if(A||!o.length)return;const p=s.begin();n.value="";const l=f.value,b=O,k=await Promise.allSettled(o.map(async i=>{if(i.deleted)return{processId:i.processId,deleted:!0};try{if(i.processId===l&&_)return{processId:i.processId,deleted:!1,summary:null,snapshot:null};if(i.processId===l){const D=await F(`/processes/${encodeURIComponent(i.processId)}`,{signal:p.signal});return{processId:i.processId,deleted:!1,summary:W(D),snapshot:D}}if(i.output&&!i.summary)return{processId:i.processId,deleted:!1,summary:null,snapshot:null};const I=await F(`/processes/${encodeURIComponent(i.processId)}/summary`,{signal:p.signal});return{processId:i.processId,deleted:!1,summary:I,snapshot:null}}catch(I){if(X(I))return{processId:i.processId,deleted:!0};throw I}}));if(A||!s.isCurrent(p))return;let S=[...r.value];for(let i=0;i<k.length;i+=1){const I=k[i],D=o[i];if(I.status==="rejected"){Ie(D,I.reason);continue}R.delete(D.processId);const w=I.value;if(w.deleted){S=S.filter(C=>C.processId!==w.processId),f.value===w.processId&&K();continue}if(w.summary){const C=S.findIndex(m=>m.processId===w.processId);C>=0?S[C]=w.summary:S.push(w.summary)}w.snapshot&&f.value===w.processId&&l===w.processId&&O===b&&!_&&(h.invalidate(),d.value=w.snapshot)}r.value=S.sort((i,I)=>I.startedAt.localeCompare(i.startedAt))}function Ie(o,p){const l=(R.get(o.processId)??0)+1;if(l<=1&&!A){R.set(o.processId,l),M.enqueue([o]);return}R.delete(o.processId),n.value=G(p)}function ge(o,p){const l=new EventSource(`/api/processes/${encodeURIComponent(o)}/stream`);v=l;const b={stdout:new TextDecoder,stderr:new TextDecoder},k={stdout:"",stderr:""};let S=null;const i=()=>!A&&v===l&&f.value===o&&O===p,I=()=>{S!==null&&clearTimeout(S),S=null,k.stdout="",k.stderr=""},D=()=>{if(!i()||!_||!d.value){I();return}if(!k.stdout&&!k.stderr)return;const C={...d.value};for(const m of["stdout","stderr"]){const B=k[m];B&&(C.outputTruncated||=C[m].length+B.length>Z,C[m]=ze(C[m],B))}d.value=C,I()},w=()=>{I(),_=!1,l.close(),v=null,U(p)};l.addEventListener("snapshot",C=>{if(i())try{const m=JSON.parse(C.data);I(),b.stdout=new TextDecoder,b.stderr=new TextDecoder,h.invalidate(),d.value=m,_=m.state==="running",_e(m),_||(l.close(),v=null)}catch{w()}}),l.addEventListener("output",C=>{if(!(!i()||!_||!d.value))try{const m=JSON.parse(C.data);if(m.stream!=="stdout"&&m.stream!=="stderr")return;const B=atob(m.bytes),N=Uint8Array.from(B,ke=>ke.charCodeAt(0)),te=b[m.stream].decode(N,{stream:!0});if(!te)return;k[m.stream]+=te,k[m.stream].length>=64*1024?D():S===null&&(S=setTimeout(D,50))}catch{w()}}),l.addEventListener("exit",C=>{if(i())try{D();const m=JSON.parse(C.data);h.invalidate(),d.value?d.value={...d.value,...m,outputTruncated:d.value.outputTruncated||m.outputTruncated}:U(p);const B=r.value.findIndex(N=>N.processId===o);if(B>=0){const N=[...r.value];N[B]=W(m),r.value=N}}catch{U(p)}finally{I(),_=!1,l.close(),v=null}}),l.onerror=()=>{i()&&(I(),_=!1)}}function _e(o){const p=r.value.findIndex(b=>b.processId===o.processId);if(p<0)return;const l=[...r.value];l[p]=W(o),r.value=l}async function U(o=O){const p=h.begin(),l=f.value;if(!l){d.value=null;return}try{const b=await F(`/processes/${encodeURIComponent(l)}`,{signal:p.signal});h.isCurrent(p)&&f.value===l&&O===o&&!_&&(d.value=b)}catch(b){if(!h.isCurrent(p))return;if(X(b)){K(),J();return}n.value=G(b)}}async function Ce(o,p){if(A)return;n.value="";const l=new AbortController;z.add(l);let b=!1;try{await F(`/processes/${encodeURIComponent(o)}/${p?"kill":"terminate"}`,{method:"POST",signal:l.signal})}catch(k){if(A||l.signal.aborted)return;if(!X(k)){n.value=G(k);return}b=k instanceof ce&&k.code==="NOT_FOUND"}finally{z.delete(l)}A||l.signal.aborted||(M.enqueue([{processId:o,summary:!0,output:!0,deleted:b}]),V&&await M.drain())}function be(o){f.value!==o&&(d.value=null,f.value=o)}function K(){v?.close(),v=null,_=!1,f.value=null,d.value=null,h.invalidate()}return{items:r,selected:f,detail:d,error:n,loading:g,processOutput:he,loadInitial:J,select:be,clearSelection:K,stop:Ce}}function Ne(e,c){return{processId:c.processId,output:!!(e?.output||c.output),summary:!!(e?.summary||c.summary),deleted:!!(e?.deleted||c.deleted)}}function W(e){return{processId:e.processId,command:e.command,args:e.args,state:e.state,startedAt:e.startedAt,durationMs:e.durationMs}}function X(e){return e instanceof ce&&(e.code==="NOT_FOUND"||e.code==="CONFLICT")}const Ee={class:"panel-header process-detail-header"},Ue={class:"min-w-0 detail-header-title"},Fe={class:"panel-title text-truncate"},je={class:"panel-subtitle mono text-truncate"},Je={class:"process-detail-actions"},Ke={class:"process-output"},Ge={class:"process-full-command"},He={class:"detail-section-label"},Qe={class:"detail-facts"},We={class:"empty-panel"},Xe=ee({__name:"ProcessDetail",props:{detail:{},output:{},compact:{type:Boolean}},emits:["back","stop"],setup(e){const c=e,r=de(),f=ie(()=>c.detail?[c.detail.command,...c.detail.args].map(d).join(" "):"");function d(n){return n?/^[A-Za-z0-9_@%+=:,./-]+$/.test(n)?n:`'${n.replaceAll("'","'\\''")}'`:"''"}return(n,g)=>e.detail?($(),T(Y,{key:0,class:"panel-card process-detail-card"},{default:x(()=>[a("div",Ee,[e.compact?($(),T(j,{key:0,icon:"$mdiArrowLeft",size:"small",variant:"text","aria-label":t(r).t("$vuetify.chatroom.processes.back"),onClick:g[0]||(g[0]=s=>n.$emit("back"))},null,8,["aria-label"])):L("",!0),a("div",Ue,[a("div",Fe,u(e.detail.command),1),a("div",je,u(e.detail.processId),1)]),a("div",Je,[e.detail.state!=="running"?($(),T(ye,{key:0,value:e.detail.state},null,8,["value"])):L("",!0),e.detail.state==="running"?($(),T(j,{key:1,"prepend-icon":"$mdiStopCircleOutline",size:"x-small",variant:"tonal",color:"warning",class:"detail-action-btn",onClick:g[1]||(g[1]=s=>n.$emit("stop",e.detail.processId,!1))},{default:x(()=>[ue(u(t(r).t("$vuetify.chatroom.processes.terminate")),1)]),_:1})):L("",!0),e.detail.state==="running"?($(),T(pe,{key:2},{activator:x(({props:s})=>[y(j,ve(s,{icon:"$mdiDotsHorizontal",size:"x-small",variant:"text",class:"detail-icon-btn","aria-label":t(r).t("$vuetify.chatroom.processes.moreActions")}),null,16,["aria-label"])]),default:x(()=>[y(fe,{density:"compact"},{default:x(()=>[y(me,{title:t(r).t("$vuetify.chatroom.processes.kill"),"prepend-icon":"$mdiCloseOctagonOutline",onClick:g[2]||(g[2]=s=>n.$emit("stop",e.detail.processId,!0))},null,8,["title"])]),_:1})]),_:1})):L("",!0)])]),y(H),a("div",Ke,[y(le,{text:e.output,filename:"output.txt",highlight:e.detail.state!=="running"},null,8,["text","highlight"])]),y(H),a("div",Ge,[a("div",He,u(t(r).t("$vuetify.chatroom.processes.fullCommand")),1),y(le,{text:f.value,filename:"command.sh",language:"bash",toolbar:!1},null,8,["text"])]),y(H),a("div",Qe,[a("div",null,[a("span",null,u(t(r).t("$vuetify.chatroom.processes.pid")),1),a("strong",null,u(e.detail.pid??"—"),1)]),a("div",null,[a("span",null,u(t(r).t("$vuetify.chatroom.processes.exit")),1),a("strong",null,u(e.detail.exitCode??"—"),1)]),a("div",null,[a("span",null,u(t(r).t("$vuetify.chatroom.processes.timeout")),1),a("strong",null,u(e.detail.timedOut?t(r).t("$vuetify.chatroom.processes.yes"):t(r).t("$vuetify.chatroom.processes.no")),1)])])]),_:1})):($(),T(Y,{key:1,class:"panel-card"},{default:x(()=>[a("div",We,u(t(r).t("$vuetify.chatroom.processes.select")),1)]),_:1}))}}),Ye={class:"panel-header"},Ze={class:"panel-title"},et={class:"panel-subtitle"},tt={key:0,class:"panel-error",role:"alert"},st={key:1,class:"process-record-list",role:"grid"},ot={class:"process-record-header",role:"row"},at={role:"columnheader"},rt={role:"columnheader"},nt={role:"columnheader"},lt={class:"process-record-duration",role:"columnheader"},ct={role:"columnheader"},it=["aria-selected","data-process-id","onClick","onKeydown"],dt={class:"process-record-main"},ut=["title"],pt=["title"],ft={class:"process-record-meta"},mt={class:"process-record-started",role:"gridcell"},vt={class:"process-record-duration",role:"gridcell"},yt={class:"process-record-side",role:"gridcell"},ht={key:2,class:"empty-inline"},$t=ee({__name:"ProcessList",props:{items:{},selected:{},error:{}},emits:["select","stop"],setup(e){const c=de(),r=E(Date.now());let f=null;xe(()=>{f=setInterval(()=>r.value=Date.now(),1e3)}),Se(()=>{f&&clearInterval(f)});function d(n){return n.state==="running"?Math.max(0,r.value-Date.parse(n.startedAt)):n.durationMs}return(n,g)=>($(),T(Y,{class:"panel-card"},{default:x(()=>[a("div",Ye,[a("div",null,[a("div",Ze,u(t(c).t("$vuetify.chatroom.processes.title")),1),a("div",et,u(t(c).t("$vuetify.chatroom.processes.subtitle")),1)])]),y(H),e.error?($(),P("div",tt,[y(ae,{icon:"$mdiAlertCircleOutline",size:"18"}),a("span",null,u(e.error),1)])):L("",!0),e.items.length?($(),P("div",st,[a("div",ot,[a("span",at,u(t(c).t("$vuetify.chatroom.processes.command")),1),a("span",rt,u(t(c).t("$vuetify.chatroom.processes.arguments")),1),a("span",nt,u(t(c).t("$vuetify.chatroom.processes.started")),1),a("span",lt,u(t(c).t("$vuetify.chatroom.processes.duration")),1),a("span",ct,u(t(c).t("$vuetify.chatroom.processes.state")),1)]),($(!0),P(Oe,null,Ae(e.items,s=>($(),P("div",{key:s.processId,role:"row",tabindex:"0",class:ne(["process-record-row",{"selected-row":e.selected===s.processId}]),"aria-selected":e.selected===s.processId,"data-process-id":s.processId,onClick:h=>n.$emit("select",s.processId),onKeydown:[re(Q(h=>n.$emit("select",s.processId),["self"]),["enter"]),re(Q(h=>n.$emit("select",s.processId),["self","prevent"]),["space"])]},[a("div",dt,[a("div",{class:"process-record-command mono",role:"gridcell",title:s.command},u(s.command),9,ut),a("div",{class:ne(["process-record-args mono",{muted:!s.args.length}]),role:"gridcell",title:s.args.join(" ")},u(s.args.length?s.args.join(" "):"—"),11,pt)]),a("div",ft,[a("div",mt,u(t(De)(s.startedAt,t(Te)(t(c).current.value))),1),a("div",vt,u(t(Pe)(d(s))),1)]),a("div",yt,[s.state!=="running"?($(),T(ye,{key:0,value:s.state},null,8,["value"])):($(),P("div",{key:1,class:"process-actions",onClick:g[0]||(g[0]=Q(()=>{},["stop"]))},[y(j,{size:"x-small",variant:"text",class:"table-action-btn","aria-label":t(c).t("$vuetify.chatroom.processes.terminate"),onClick:h=>n.$emit("stop",s.processId,!1)},{default:x(()=>[y(Ve,{indeterminate:"",color:"warning",size:22,width:2},{default:x(()=>[y(ae,{icon:"$mdiStop",size:"12"})]),_:1})]),_:1},8,["aria-label","onClick"]),y(pe,null,{activator:x(({props:h})=>[y(j,ve({ref_for:!0},h,{icon:"$mdiDotsHorizontal",size:"x-small",variant:"text",class:"table-action-btn","aria-label":t(c).t("$vuetify.chatroom.processes.moreActions")}),null,16,["aria-label"])]),default:x(()=>[y(fe,{density:"compact"},{default:x(()=>[y(me,{title:t(c).t("$vuetify.chatroom.processes.kill"),"prepend-icon":"$mdiCloseOctagonOutline",onClick:h=>n.$emit("stop",s.processId,!0)},null,8,["title","onClick"])]),_:2},1024)]),_:2},1024)]))])],42,it))),128))])):($(),P("div",ht,u(t(c).t("$vuetify.chatroom.processes.empty")),1))]),_:1}))}}),It={ref:"layout",class:"master-detail-layout processes-layout"},gt={key:0,class:"master-pane"},_t={key:1,ref:"detailPane",class:"detail-pane",tabindex:"-1"},Ot=ee({__name:"ProcessesView",props:{revision:{},changes:{}},setup(e){const c=e,{mdAndDown:r}=Be(),{focusDetail:f,focusMaster:d}=qe(r),n=Me(()=>c.revision,()=>c.changes),{items:g,selected:s,detail:h,error:q,processOutput:V}=n;function R(v){n.select(v),f()}function z(){const v=s.value;n.clearSelection(),v&&d(`[data-process-id="${CSS.escape(v)}"]`)}function O(v,_){n.stop(v,_)}return(v,_)=>($(),P("div",It,[!t(r)||!t(s)?($(),P("div",gt,[y($t,{items:t(g),selected:t(s),error:t(q),onSelect:R,onStop:O},null,8,["items","selected","error"])])):L("",!0),!t(r)||t(s)?($(),P("div",_t,[t(r)&&t(s)&&t(q)?($(),T(Le,{key:0,type:"error",variant:"tonal",density:"compact"},{default:x(()=>[ue(u(t(q)),1)]),_:1})):L("",!0),y(Xe,{detail:t(h),output:t(V),compact:t(r),onBack:z,onStop:O},null,8,["detail","output","compact"])],512)):L("",!0)],512))}});export{Ot as default};
|
|
5
|
+
${d.value.stderr}`:"";return`${d.value.stdout}${o}`});oe(e,()=>{if(!q){q=!0,J();return}M.enqueue(c())},{immediate:!0}),oe(f,()=>{O+=1,h.invalidate(),v?.close(),v=null,_=!1;const o=f.value;o&&(typeof EventSource>"u"?U(O):ge(o,O))});async function J(){if(A)return;V=!1;const o=s.begin();g.value=!0,n.value="";try{const p=await F("/processes",{signal:o.signal});if(A||!s.isCurrent(o))return;r.value=p,V=!0,f.value&&!p.some(l=>l.processId===f.value)?K():f.value&&!v&&U()}catch(p){s.isCurrent(o)&&(n.value=G(p))}finally{s.isCurrent(o)&&(g.value=!1,V&&M.drain())}}async function $e(o){if(A||!o.length)return;const p=s.begin();n.value="";const l=f.value,b=O,k=await Promise.allSettled(o.map(async i=>{if(i.deleted)return{processId:i.processId,deleted:!0};try{if(i.processId===l&&_)return{processId:i.processId,deleted:!1,summary:null,snapshot:null};if(i.processId===l){const D=await F(`/processes/${encodeURIComponent(i.processId)}`,{signal:p.signal});return{processId:i.processId,deleted:!1,summary:W(D),snapshot:D}}if(i.output&&!i.summary)return{processId:i.processId,deleted:!1,summary:null,snapshot:null};const I=await F(`/processes/${encodeURIComponent(i.processId)}/summary`,{signal:p.signal});return{processId:i.processId,deleted:!1,summary:I,snapshot:null}}catch(I){if(X(I))return{processId:i.processId,deleted:!0};throw I}}));if(A||!s.isCurrent(p))return;let S=[...r.value];for(let i=0;i<k.length;i+=1){const I=k[i],D=o[i];if(I.status==="rejected"){Ie(D,I.reason);continue}R.delete(D.processId);const w=I.value;if(w.deleted){S=S.filter(C=>C.processId!==w.processId),f.value===w.processId&&K();continue}if(w.summary){const C=S.findIndex(m=>m.processId===w.processId);C>=0?S[C]=w.summary:S.push(w.summary)}w.snapshot&&f.value===w.processId&&l===w.processId&&O===b&&!_&&(h.invalidate(),d.value=w.snapshot)}r.value=S.sort((i,I)=>I.startedAt.localeCompare(i.startedAt))}function Ie(o,p){const l=(R.get(o.processId)??0)+1;if(l<=1&&!A){R.set(o.processId,l),M.enqueue([o]);return}R.delete(o.processId),n.value=G(p)}function ge(o,p){const l=new EventSource(`/api/processes/${encodeURIComponent(o)}/stream`);v=l;const b={stdout:new TextDecoder,stderr:new TextDecoder},k={stdout:"",stderr:""};let S=null;const i=()=>!A&&v===l&&f.value===o&&O===p,I=()=>{S!==null&&clearTimeout(S),S=null,k.stdout="",k.stderr=""},D=()=>{if(!i()||!_||!d.value){I();return}if(!k.stdout&&!k.stderr)return;const C={...d.value};for(const m of["stdout","stderr"]){const B=k[m];B&&(C.outputTruncated||=C[m].length+B.length>Z,C[m]=ze(C[m],B))}d.value=C,I()},w=()=>{I(),_=!1,l.close(),v=null,U(p)};l.addEventListener("snapshot",C=>{if(i())try{const m=JSON.parse(C.data);I(),b.stdout=new TextDecoder,b.stderr=new TextDecoder,h.invalidate(),d.value=m,_=m.state==="running",_e(m),_||(l.close(),v=null)}catch{w()}}),l.addEventListener("output",C=>{if(!(!i()||!_||!d.value))try{const m=JSON.parse(C.data);if(m.stream!=="stdout"&&m.stream!=="stderr")return;const B=atob(m.bytes),N=Uint8Array.from(B,ke=>ke.charCodeAt(0)),te=b[m.stream].decode(N,{stream:!0});if(!te)return;k[m.stream]+=te,k[m.stream].length>=64*1024?D():S===null&&(S=setTimeout(D,50))}catch{w()}}),l.addEventListener("exit",C=>{if(i())try{D();const m=JSON.parse(C.data);h.invalidate(),d.value?d.value={...d.value,...m,outputTruncated:d.value.outputTruncated||m.outputTruncated}:U(p);const B=r.value.findIndex(N=>N.processId===o);if(B>=0){const N=[...r.value];N[B]=W(m),r.value=N}}catch{U(p)}finally{I(),_=!1,l.close(),v=null}}),l.onerror=()=>{i()&&(I(),_=!1)}}function _e(o){const p=r.value.findIndex(b=>b.processId===o.processId);if(p<0)return;const l=[...r.value];l[p]=W(o),r.value=l}async function U(o=O){const p=h.begin(),l=f.value;if(!l){d.value=null;return}try{const b=await F(`/processes/${encodeURIComponent(l)}`,{signal:p.signal});h.isCurrent(p)&&f.value===l&&O===o&&!_&&(d.value=b)}catch(b){if(!h.isCurrent(p))return;if(X(b)){K(),J();return}n.value=G(b)}}async function Ce(o,p){if(A)return;n.value="";const l=new AbortController;z.add(l);let b=!1;try{await F(`/processes/${encodeURIComponent(o)}/${p?"kill":"terminate"}`,{method:"POST",signal:l.signal})}catch(k){if(A||l.signal.aborted)return;if(!X(k)){n.value=G(k);return}b=k instanceof ce&&k.code==="NOT_FOUND"}finally{z.delete(l)}A||l.signal.aborted||(M.enqueue([{processId:o,summary:!0,output:!0,deleted:b}]),V&&await M.drain())}function be(o){f.value!==o&&(d.value=null,f.value=o)}function K(){v?.close(),v=null,_=!1,f.value=null,d.value=null,h.invalidate()}return{items:r,selected:f,detail:d,error:n,loading:g,processOutput:he,loadInitial:J,select:be,clearSelection:K,stop:Ce}}function Ne(e,c){return{processId:c.processId,output:!!(e?.output||c.output),summary:!!(e?.summary||c.summary),deleted:!!(e?.deleted||c.deleted)}}function W(e){return{processId:e.processId,command:e.command,args:e.args,state:e.state,startedAt:e.startedAt,durationMs:e.durationMs}}function X(e){return e instanceof ce&&(e.code==="NOT_FOUND"||e.code==="CONFLICT")}const Ee={class:"panel-header process-detail-header"},Ue={class:"min-w-0 detail-header-title"},Fe={class:"panel-title text-truncate"},je={class:"panel-subtitle mono text-truncate"},Je={class:"process-detail-actions"},Ke={class:"process-output"},Ge={class:"process-full-command"},He={class:"detail-section-label"},Qe={class:"detail-facts"},We={class:"empty-panel"},Xe=ee({__name:"ProcessDetail",props:{detail:{},output:{},compact:{type:Boolean}},emits:["back","stop"],setup(e){const c=e,r=de(),f=ie(()=>c.detail?[c.detail.command,...c.detail.args].map(d).join(" "):"");function d(n){return n?/^[A-Za-z0-9_@%+=:,./-]+$/.test(n)?n:`'${n.replaceAll("'","'\\''")}'`:"''"}return(n,g)=>e.detail?($(),T(Y,{key:0,class:"panel-card process-detail-card"},{default:x(()=>[a("div",Ee,[e.compact?($(),T(j,{key:0,icon:"$mdiArrowLeft",size:"small",variant:"text","aria-label":t(r).t("$vuetify.chatroom.processes.back"),onClick:g[0]||(g[0]=s=>n.$emit("back"))},null,8,["aria-label"])):L("",!0),a("div",Ue,[a("div",Fe,u(e.detail.command),1),a("div",je,u(e.detail.processId),1)]),a("div",Je,[e.detail.state!=="running"?($(),T(ye,{key:0,value:e.detail.state},null,8,["value"])):L("",!0),e.detail.state==="running"?($(),T(j,{key:1,"prepend-icon":"$mdiStopCircleOutline",size:"x-small",variant:"tonal",color:"warning",class:"detail-action-btn",onClick:g[1]||(g[1]=s=>n.$emit("stop",e.detail.processId,!1))},{default:x(()=>[ue(u(t(r).t("$vuetify.chatroom.processes.terminate")),1)]),_:1})):L("",!0),e.detail.state==="running"?($(),T(pe,{key:2},{activator:x(({props:s})=>[y(j,ve(s,{icon:"$mdiDotsHorizontal",size:"x-small",variant:"text",class:"detail-icon-btn","aria-label":t(r).t("$vuetify.chatroom.processes.moreActions")}),null,16,["aria-label"])]),default:x(()=>[y(fe,{density:"compact"},{default:x(()=>[y(me,{title:t(r).t("$vuetify.chatroom.processes.kill"),"prepend-icon":"$mdiCloseOctagonOutline",onClick:g[2]||(g[2]=s=>n.$emit("stop",e.detail.processId,!0))},null,8,["title"])]),_:1})]),_:1})):L("",!0)])]),y(H),a("div",Ke,[y(le,{text:e.output,filename:"output.txt",highlight:e.detail.state!=="running"},null,8,["text","highlight"])]),y(H),a("div",Ge,[a("div",He,u(t(r).t("$vuetify.chatroom.processes.fullCommand")),1),y(le,{text:f.value,filename:"command.sh",language:"bash",toolbar:!1},null,8,["text"])]),y(H),a("div",Qe,[a("div",null,[a("span",null,u(t(r).t("$vuetify.chatroom.processes.pid")),1),a("strong",null,u(e.detail.pid??"—"),1)]),a("div",null,[a("span",null,u(t(r).t("$vuetify.chatroom.processes.exit")),1),a("strong",null,u(e.detail.exitCode??"—"),1)]),a("div",null,[a("span",null,u(t(r).t("$vuetify.chatroom.processes.timeout")),1),a("strong",null,u(e.detail.timedOut?t(r).t("$vuetify.chatroom.processes.yes"):t(r).t("$vuetify.chatroom.processes.no")),1)])])]),_:1})):($(),T(Y,{key:1,class:"panel-card"},{default:x(()=>[a("div",We,u(t(r).t("$vuetify.chatroom.processes.select")),1)]),_:1}))}}),Ye={class:"panel-header"},Ze={class:"panel-title"},et={class:"panel-subtitle"},tt={key:0,class:"panel-error",role:"alert"},st={key:1,class:"process-record-list",role:"grid"},ot={class:"process-record-header",role:"row"},at={role:"columnheader"},rt={role:"columnheader"},nt={role:"columnheader"},lt={class:"process-record-duration",role:"columnheader"},ct={role:"columnheader"},it=["aria-selected","data-process-id","onClick","onKeydown"],dt={class:"process-record-main"},ut=["title"],pt=["title"],ft={class:"process-record-meta"},mt={class:"process-record-started",role:"gridcell"},vt={class:"process-record-duration",role:"gridcell"},yt={class:"process-record-side",role:"gridcell"},ht={key:2,class:"empty-inline"},$t=ee({__name:"ProcessList",props:{items:{},selected:{},error:{}},emits:["select","stop"],setup(e){const c=de(),r=E(Date.now());let f=null;xe(()=>{f=setInterval(()=>r.value=Date.now(),1e3)}),Se(()=>{f&&clearInterval(f)});function d(n){return n.state==="running"?Math.max(0,r.value-Date.parse(n.startedAt)):n.durationMs}return(n,g)=>($(),T(Y,{class:"panel-card"},{default:x(()=>[a("div",Ye,[a("div",null,[a("div",Ze,u(t(c).t("$vuetify.chatroom.processes.title")),1),a("div",et,u(t(c).t("$vuetify.chatroom.processes.subtitle")),1)])]),y(H),e.error?($(),P("div",tt,[y(ae,{icon:"$mdiAlertCircleOutline",size:"18"}),a("span",null,u(e.error),1)])):L("",!0),e.items.length?($(),P("div",st,[a("div",ot,[a("span",at,u(t(c).t("$vuetify.chatroom.processes.command")),1),a("span",rt,u(t(c).t("$vuetify.chatroom.processes.arguments")),1),a("span",nt,u(t(c).t("$vuetify.chatroom.processes.started")),1),a("span",lt,u(t(c).t("$vuetify.chatroom.processes.duration")),1),a("span",ct,u(t(c).t("$vuetify.chatroom.processes.state")),1)]),($(!0),P(Oe,null,Ae(e.items,s=>($(),P("div",{key:s.processId,role:"row",tabindex:"0",class:ne(["process-record-row",{"selected-row":e.selected===s.processId}]),"aria-selected":e.selected===s.processId,"data-process-id":s.processId,onClick:h=>n.$emit("select",s.processId),onKeydown:[re(Q(h=>n.$emit("select",s.processId),["self"]),["enter"]),re(Q(h=>n.$emit("select",s.processId),["self","prevent"]),["space"])]},[a("div",dt,[a("div",{class:"process-record-command mono",role:"gridcell",title:s.command},u(s.command),9,ut),a("div",{class:ne(["process-record-args mono",{muted:!s.args.length}]),role:"gridcell",title:s.args.join(" ")},u(s.args.length?s.args.join(" "):"—"),11,pt)]),a("div",ft,[a("div",mt,u(t(De)(s.startedAt,t(Te)(t(c).current.value))),1),a("div",vt,u(t(Pe)(d(s))),1)]),a("div",yt,[s.state!=="running"?($(),T(ye,{key:0,value:s.state},null,8,["value"])):($(),P("div",{key:1,class:"process-actions",onClick:g[0]||(g[0]=Q(()=>{},["stop"]))},[y(j,{size:"x-small",variant:"text",class:"table-action-btn","aria-label":t(c).t("$vuetify.chatroom.processes.terminate"),onClick:h=>n.$emit("stop",s.processId,!1)},{default:x(()=>[y(Ve,{indeterminate:"",color:"warning",size:22,width:2},{default:x(()=>[y(ae,{icon:"$mdiStop",size:"12"})]),_:1})]),_:1},8,["aria-label","onClick"]),y(pe,null,{activator:x(({props:h})=>[y(j,ve({ref_for:!0},h,{icon:"$mdiDotsHorizontal",size:"x-small",variant:"text",class:"table-action-btn","aria-label":t(c).t("$vuetify.chatroom.processes.moreActions")}),null,16,["aria-label"])]),default:x(()=>[y(fe,{density:"compact"},{default:x(()=>[y(me,{title:t(c).t("$vuetify.chatroom.processes.kill"),"prepend-icon":"$mdiCloseOctagonOutline",onClick:h=>n.$emit("stop",s.processId,!0)},null,8,["title","onClick"])]),_:2},1024)]),_:2},1024)]))])],42,it))),128))])):($(),P("div",ht,u(t(c).t("$vuetify.chatroom.processes.empty")),1))]),_:1}))}}),It={ref:"layout",class:"master-detail-layout processes-layout"},gt={key:0,class:"master-pane"},_t={key:1,ref:"detailPane",class:"detail-pane",tabindex:"-1"},At=ee({__name:"ProcessesView",props:{revision:{},changes:{}},setup(e){const c=e,{mdAndDown:r}=Be(),{focusDetail:f,focusMaster:d}=qe(r),n=Me(()=>c.revision,()=>c.changes),{items:g,selected:s,detail:h,error:q,processOutput:V}=n;function R(v){n.select(v),f()}function z(){const v=s.value;n.clearSelection(),v&&d(`[data-process-id="${CSS.escape(v)}"]`)}function O(v,_){n.stop(v,_)}return(v,_)=>($(),P("div",It,[!t(r)||!t(s)?($(),P("div",gt,[y($t,{items:t(g),selected:t(s),error:t(q),onSelect:R,onStop:O},null,8,["items","selected","error"])])):L("",!0),!t(r)||t(s)?($(),P("div",_t,[t(r)&&t(s)&&t(q)?($(),T(Le,{key:0,type:"error",variant:"tonal",density:"compact"},{default:x(()=>[ue(u(t(q)),1)]),_:1})):L("",!0),y(Xe,{detail:t(h),output:t(V),compact:t(r),onBack:z,onStop:O},null,8,["detail","output","compact"])],512)):L("",!0)],512))}});export{At as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n,u,c as i,l as d,a4 as p,p as v,q as m,t as f,v as s,
|
|
1
|
+
import{d as n,u,c as i,l as d,a4 as p,p as v,q as m,t as f,v as s,bw as C}from"./index-CFhV1jOj.js";const h=n({__name:"StateChip",props:{value:{}},setup(l){const e=l,t=u(),c=s(()=>({running:"warning",success:"success",exited:"success",error:"error",failed:"error",cancelled:"default",killed:"default"})[e.value]??"default"),r=s(()=>e.value==="running"?"$mdiProgressClock":e.value==="success"||e.value==="exited"?"$mdiCheckCircleOutline":e.value==="error"||e.value==="failed"?"$mdiAlertCircleOutline":"$mdiCircleOutline"),o=s(()=>{const a=C(e.value);return a?t.t(a):e.value});return(a,_)=>(i(),d(p,{class:"state-chip",color:c.value,"prepend-icon":r.value,size:"small",variant:"tonal"},{default:v(()=>[m(f(o.value),1)]),_:1},8,["color","prepend-icon"]))}});export{h as _};
|