@xopcai/xopc 0.0.409 → 0.0.410
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-lMrejpsz.js → agent-avatar-dicebear-ColV_Z1C.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-lXwR3Rff.js → agent-defaults-settings-panel-rgRXzBCX.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-DFwBf95X.js → agents-C1rSl_yE.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-Cja3eV7H.js → app-management-settings-panel-B-Cl1lzt.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Dzhmj_ZO.js → appearance-settings-byEnJz9H.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-C3xbCdYa.js → apps-page-BfVMfjkC.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-D4r4P5uG.js → archive-plugin-BXssEuq3.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BlNe3DXU.js → automations-page-C-puATkS.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-CWvHbJBK.js → automations-workspace-b7MTHd-X.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-DuN5L6lm.js → binary-plugins-DBz_2AhG.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DUSVn51h.js → block-editor-BOO5kjIl.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BtvOURHQ.js → browser-automations-page-DMqDOJgO.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-C_OeE79S.js → browser-settings-page-KZStwhX7.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-BKF6q_tC.js → capabilities-page-DeJuO2rf.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-B7qOaUZs.js → capabilities-settings-panel-DPxL_3Km.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-oBPqUlbj.js → capability-header-actions-yfPUz5Wt.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-3M9-anCN.js → channels-Cp4F9zPz.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BLs3NaOP.js → chat-terminal-dock-Dlzn80cK.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-LaekhDG6.js → computer-settings-page-BXhmUWbA.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-DJP1n1_n.js → connector-service-page-B1oJCj74.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-DmQqMy6l.js → connectors-page-Da_M7h3m.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-DVlbwrYg.js → date-picker-DGjpqOKx.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BhElpD_6.js → dependency-picker-BfWUD3LG.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-ByvV-cDD.js → desktop-pet-CPEi55Vt.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BBruQu-_.js → desktop-pet-settings-CmQ_H-nM.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-C3zOy8PO.js → device-pairing-wizard-BeTjXc3C.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-QZ0p-uNa.js → directory-picker-path-field-CwT1LcLR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DoVPUHu_.js → extension-debug-page-DX-hX_d0.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BNe8n3iJ.js → extension-page-Cji87mN9.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DxNpjGJD.js → extension-settings-page-BulzpwBD.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CzrFZ0lB.js → gateway-settings-CIdEroWr.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-DrZq5KTj.js → highlighted-body-KQOG7T2V-BgTqMa_d.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-cXmd8x0S.js → home-page-BSbYrVda.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-C6su4n9B.js → image-generation-api-BfPYnMoc.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CsXYryWS.js → imports-page-DYSOfHfw.js} +1 -1
- package/dist/gateway/static/root/assets/{index-uAJlrGvo.js → index-D2hEKnTM.js} +116 -116
- package/dist/gateway/static/root/assets/index-SmKNPEmJ.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-GYKLt0oF.js → keyboard-shortcuts-settings-BwsGM6Yd.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-Dw-i6VkX.js → local-app-workbench-page-K6UR6cAx.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-DslilwNE.js → local-apps-page-gkdwtjDE.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-4N8bGPIE.js → logs-page-BAQNYk0e.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-CPmxI1k0.js → management-settings-CMVRLGox.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-s6EqtAUQ.js → media-plugins-DQJXvbr_.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-Cx0bXBqu.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-CjTm5gxS.js → note-detail-panel-1GCqp26U.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-B7RA-WsY.js +1 -0
- package/dist/gateway/static/root/assets/{notes-page-DkESStKc.js → notes-page-DnjlEdzM.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-eyzTNrCe.js → page-context-capture-button-BAwI_3uh.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-DZxbFQvF.js → personal-page-XoLrcR0U.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-BjVLbxZM.js → plugin-details-dialog-BjzIp3T5.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-7pUtUL4O.js → preview-open-alternatives-2YjwlRHu.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BPWSqtRt.js → product-open-page-Bfqez8Je.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-COo4zwp9.js → product-preview-content-D7wLwrqj.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-CrIH6nEy.js → project-detail-page-1ueRCmXg.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-D4swvBmH.js → projects-page-CDQycMPo.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DltfIMtv.js → remote-access-hub-YvVmZA4K.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CNCx2RnO.js → runtime-tools-settings-panel-DSsANtha.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-nRDA2XfI.js → schema-form-vbhv4JE6.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-CfYU53aw.js → sessions-page-B3rPljgr.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Ch20Ptzp.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-_ALUREPr.js → settings-form-section-4nn0sb6v.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-29ptuMYZ.js → settings-page-_HB9FC08.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-DZgVMRXr.js → setup-status-panel-L1HHrvzi.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-C2LHd_Nl.js → share-preview-page-C4lC0W3d.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-C5MTc6t-.js → shares-settings-DtHZ9z5K.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-C-T0K7Oo.js → skill-api-CyO89DKl.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-BcdA9ezU.js → skill-reload-api-Drg356Pb.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-BMw8XbKL.js → skills-page-XhCLHKlK.js} +1 -1
- package/dist/gateway/static/root/assets/{style-DR0-RKaL.js → style-DTLpCnuA.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-2Kr9Y-FJ.js → system-settings-panel-bSogz4S-.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-7kPco8Ys.js → task-detail-page-CSv2x4q-.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-D53wxq60.js → tracing-settings-page-CZ5XLQmX.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-DcDUSAjv.js → tunnel-api-DOUyF9Ew.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Hut0SDqn.js → usage-page-Bv3fdfw1.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-C4TUlpsu.js → use-autosave-D0MhLMD2.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-KRy50OBd.js → user-model-page-BD7WvhI0.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-CMdihbPb.js → voice-api-key-field-Ds_ADBQH.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Bd9HLsds.js → work-discovery-overlay-CDJp2_l2.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-C9mAiHBd.js → workflow-run-setup-panel-CR4fRhZZ.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-CGg4GWwt.js → workflows-page-BeJw5liC.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-ClQKM2RA.js → xopc-cloud-account-card-Di-oEpCt.js} +1 -1
- package/dist/gateway/static/root/index.html +2 -2
- package/dist/package.js +1 -1
- package/dist/src/agent/background-review/prompts.d.ts +8 -0
- package/dist/src/agent/background-review/prompts.js +9 -2
- package/dist/src/agent/background-review/run-background-review.js +73 -11
- package/dist/src/agent/inbound/attachment-pipeline.d.ts +2 -0
- package/dist/src/agent/inbound/attachment-pipeline.js +10 -5
- package/dist/src/agent/tools/factory.js +15 -1
- package/dist/src/agent/tools/session-recall-tool.d.ts +3 -0
- package/dist/src/agent/tools/session-recall-tool.js +3 -0
- package/dist/src/agent/tools/session-search-tool.d.ts +3 -0
- package/dist/src/agent/tools/session-search-tool.js +20 -4
- package/dist/src/gateway/service.js +11 -11
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/knowledge-memory/repository.d.ts +3 -1
- package/dist/src/knowledge-memory/repository.js +10 -3
- package/dist/src/memory-learning/forget-capture.d.ts +14 -0
- package/dist/src/memory-learning/forget-capture.js +100 -0
- package/dist/src/memory-learning/forgotten-history.d.ts +5 -0
- package/dist/src/memory-learning/forgotten-history.js +33 -0
- package/dist/src/memory-learning/work-capture.js +2 -1
- package/dist/src/session/store.d.ts +1 -0
- package/dist/src/storage/sqlite/fts.d.ts +4 -0
- package/dist/src/storage/sqlite/fts.js +13 -4
- package/dist/src/storage/sqlite/session-repository.js +6 -3
- package/dist/src/storage/sqlite/transcript-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/transcript-repository.js +14 -12
- package/dist/src/user-model/capture/semantic.d.ts +18 -1
- package/dist/src/user-model/capture/semantic.js +26 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/index-BZlryZm8.css +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-Ba-WQCki.js +0 -1
- package/dist/gateway/static/root/assets/note-image-lightbox-hbSbEEfN.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BJBoWYbO.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{g as i}from"./chunk-KS7C4IRE-B2HK1psj.js";import{t as a}from"./popover-select-DGKUpVsz.js";import{t as o}from"./plus-Q2yW6OE7.js";import{t as s}from"./x-B_N4OPjy.js";import{t as c}from"./messages-D__oW2yE.js";import{t as l}from"./cn-0WouolD0.js";import{i as u,n as d,r as f}from"./locale-store-D_migb9R.js";import{a as p,n as m,o as h,r as g,s as _,t as v}from"./dist-BGTk37IG.js";import{s as y}from"./session-api-aQLptIs9.js";import{i as b}from"./vendor-swr-BIWyz7Rc.js";import{t as x}from"./button-aIC072nz.js";import{t as S}from"./skeleton-BI5TyibZ.js";import{i as C,o as w}from"./settings-shell-dialog-layer-BU3UuiJr.js";import{Do as T,Mu as E,Of as D,Un as O,Wl as k,af as A,bs as j,do as ee,eu as M,fo as N,of as P,ql as te,rd as ne}from"./index-uAJlrGvo.js";import{n as F,r as I,t as L}from"./settings-page-layout-Dx5S-Msc.js";import{t as R}from"./device-pairing-wizard-C3zOy8PO.js";var z=n(),B=e(t(),1),V=r();async function H(e=`GET`,t,n){let r=await u(f(`/api/endpoint-tools/target-authorizations`+(n?`/`+encodeURIComponent(n):``)),{method:e,...t?{body:JSON.stringify(t)}:{}});if(!r.ok)throw Error(r.status===403?`owner`:`unavailable`);return(await r.json()).payload}function re({devices:e,zh:t}){let n=b(`device-single-call-grants`,()=>H(),{refreshInterval:5e3,shouldRetryOnError:!1}),r=b(n.error?null:`device-grant-conversations`,()=>y({limit:100}),{shouldRetryOnError:!1}),[i,o]=(0,B.useState)(``),[s,c]=(0,B.useState)(``),[l,u]=(0,B.useState)(``),[d,f]=(0,B.useState)(`weather`),[p,m]=(0,B.useState)(`approximate`),[h,g]=(0,B.useState)(`restaurant`),[_,v]=(0,B.useState)(!1),[C,w]=(0,B.useState)(!1);if(n.error)return null;let T=e.flatMap(e=>e.endpoints.map(t=>({...t,label:e.displayName+` · `+e.platform+` · `+e.id.slice(-8)}))),E=T.find(e=>e.endpointId===l)?.tools.find(e=>e.descriptor.name.endsWith(`.device.get_location`))?.descriptor.name,D=async()=>{if(!(!E||!i||!s)){v(!0),w(!1);try{await H(`POST`,{conversationId:i,requestorPrincipalId:s,targetEndpointId:l,toolName:E,arguments:{purpose:d,precision:p,...d===`nearby`?{category:h}:{}}}),await n.mutate()}catch{w(!0)}finally{v(!1)}}};return(0,V.jsxs)(`section`,{className:`mb-5 rounded-xl border border-edge bg-surface-base p-4`,children:[(0,V.jsx)(`h3`,{className:`font-semibold text-fg`,children:t?`跨设备单次授权`:`Single-call device authorization`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t?`为指定会话和来源设备授权一次定位查询,60 秒后失效。目标设备仍需确认;授权后请在来源设备继续请求。`:`Authorize one location query for a conversation and source device. Expires in 60 seconds; target-device consent is still required. Continue the request from the source device.`}),n.isLoading||r.isLoading?(0,V.jsx)(S,{className:`mt-3 h-28`}):(0,V.jsxs)(`div`,{className:`mt-3 grid gap-3 sm:grid-cols-2`,children:[(0,V.jsx)(a,{value:i,onChange:o,placeholder:t?`选择会话`:`Conversation`,ariaLabel:t?`会话`:`Conversation`,options:(r.data?.items??[]).map(e=>({value:e.key,label:e.name||e.key}))}),(0,V.jsx)(a,{value:s,onChange:c,placeholder:t?`消息来源设备`:`Source device`,ariaLabel:t?`消息来源设备`:`Source device`,options:e.filter(e=>e.endpoints.length>0).map(e=>({value:e.id,label:e.displayName+` · `+e.platform+` · `+e.id.slice(-8)}))}),(0,V.jsx)(a,{value:l,onChange:u,placeholder:t?`使用哪台设备的位置`:`Location device`,ariaLabel:t?`目标设备`:`Target device`,options:T.filter(e=>e.tools.some(e=>e.descriptor.name.endsWith(`.device.get_location`))).map(e=>({value:e.endpointId,label:e.label}))}),(0,V.jsx)(a,{placeholder:t?`用途`:`Purpose`,value:d,onChange:e=>f(e),ariaLabel:t?`用途`:`Purpose`,options:[{value:`weather`,label:t?`查询天气`:`Weather`},{value:`nearby`,label:t?`附近地点`:`Nearby places`}],allowEmpty:!1}),(0,V.jsx)(a,{placeholder:t?`精度`:`Precision`,value:p,onChange:e=>m(e),ariaLabel:t?`精度`:`Precision`,options:[{value:`approximate`,label:t?`大致位置`:`Approximate`},{value:`precise`,label:t?`精确位置`:`Precise`}],allowEmpty:!1}),d===`nearby`?(0,V.jsx)(a,{placeholder:t?`地点类型`:`Category`,value:h,onChange:g,ariaLabel:t?`附近地点类型`:`Place category`,options:[`restaurant`,`cafe`,`pharmacy`,`park`].map((e,n)=>({value:e,label:t?[`餐厅`,`咖啡馆`,`药店`,`公园`][n]:e})),allowEmpty:!1}):null,(0,V.jsx)(x,{variant:`primary`,disabled:_||!i||!s||!E,onClick:()=>void D(),children:t?`允许一次`:`Allow once`})]}),C?(0,V.jsx)(`p`,{role:`alert`,className:`mt-2 text-sm text-fg-muted`,children:t?`授权失败,请检查设备连接后重试。`:`Authorization failed. Check the device connection.`}):null,(0,V.jsx)(`div`,{className:`mt-3 space-y-2`,children:n.data?.map(r=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-sm text-fg-muted`,children:[(0,V.jsxs)(`span`,{children:[e.find(e=>e.endpoints.some(e=>e.endpointId===r.targetEndpointId))?.displayName??(t?`设备`:`Device`),` · `,r.state===`running`?t?`执行中`:`Running`:t?`等待本次调用`:`Awaiting one call`]}),(0,V.jsx)(x,{disabled:_,onClick:()=>{v(!0),H(`DELETE`,void 0,r.id).then(()=>n.mutate()).catch(()=>w(!0)).finally(()=>v(!1))},children:t?`撤销`:`Revoke`})]},r.id))})]})}var U=720*60*60*1e3;function W(e){let t=[e.access,e.principal].filter(e=>e!==null);return t.length>0&&t.every(e=>e.revokedAt!==void 0)}function G(e){return W(e)?`revoked`:e.endpoints.length>0?`online`:`offline`}function ie(e){return new Set(e.endpoints.flatMap(e=>e.tools.map(({descriptor:e})=>e.name))).size}function ae(e,t=Date.now()){return G(e)===`offline`?(e.lastSeenAt??e.createdAt)<t-U:!1}function oe(e,t,n=Date.now()){let r=t.query.trim().toLocaleLowerCase();return e.filter(e=>{let i=G(e),a=t.status===`all`||(t.status===`active`?i!==`revoked`:t.status===`stale`?ae(e,n):i===t.status),o=!t.platform||e.platform===t.platform,s=!r||[e.displayName,e.id,e.kind,e.platform].some(e=>e.toLocaleLowerCase().includes(r));return a&&o&&s})}function se(e){return e.length>8?e.slice(-8):e}function ce(e){let t=(0,z.c)(61),{device:n,busy:r,onClose:i,onRevoke:a,onRename:o}=e,u=d(le),f;t[0]===u?f=t[1]:(f=c(u),t[0]=u,t[1]=f);let y=f.endpointToolsSettings,b=u===`zh`?`zh-CN`:`en`,S;t[2]===b?S=t[3]:(S=new Intl.DateTimeFormat(b,{dateStyle:`medium`,timeStyle:`short`}),t[2]=b,t[3]=S);let T=S,E;t[4]===n?E=t[5]:(E=n?G(n):`offline`,t[4]=n,t[5]=E);let D=E,O=n!==null,k;t[6]===i?k=t[7]:(k=e=>!e&&i(),t[6]=i,t[7]=k);let A;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,V.jsx)(p,{className:l(`xopc-dialog-overlay fixed inset-0 bg-scrim`,w)}),t[8]=A):A=t[8];let j;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(j=l(`xopc-drawer-right fixed right-0 top-0 flex size-full max-w-lg flex-col border-l border-edge bg-surface-overlay shadow-popover outline-none`,C),t[9]=j):j=t[9];let ee=n?.displayName??y.deviceDetails,M;t[10]===ee?M=t[11]:(M=(0,V.jsx)(_,{className:`truncate text-base font-semibold text-fg`,children:ee}),t[10]=ee,t[11]=M);let N;t[12]===n?N=t[13]:(N=n?(0,V.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[n.kind,` · `,n.platform,` · `,se(n.id)]}):null,t[12]=n,t[13]=N);let P;t[14]!==M||t[15]!==N?(P=(0,V.jsxs)(`div`,{className:`min-w-0`,children:[M,N]}),t[14]=M,t[15]=N,t[16]=P):P=t[16];let ne;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,V.jsx)(s,{className:`size-5`,"aria-hidden":!0}),t[17]=ne):ne=t[17];let F;t[18]===y.close?F=t[19]:(F=(0,V.jsx)(m,{asChild:!0,children:(0,V.jsx)(x,{variant:`ghost`,className:`size-9 shrink-0 p-0`,"aria-label":y.close,children:ne})}),t[18]=y.close,t[19]=F);let I;t[20]!==P||t[21]!==F?(I=(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[P,F]}),t[20]=P,t[21]=F,t[22]=I):I=t[22];let L;t[23]!==y.accessActive||t[24]!==y.accessRevoked||t[25]!==y.accessTitle||t[26]!==y.createdAt||t[27]!==y.endpointCount||t[28]!==y.endpointsTitle||t[29]!==y.identityId||t[30]!==y.identityTitle||t[31]!==y.lastSeen||t[32]!==y.never||t[33]!==y.noAccessIdentity||t[34]!==y.noOnlineEndpoints||t[35]!==y.noPermissions||t[36]!==y.permissions||t[37]!==y.status||t[38]!==y.statusLabel||t[39]!==y.toolCount||t[40]!==n||t[41]!==T||t[42]!==u||t[43]!==o||t[44]!==D?(L=n?(0,V.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto p-4`,children:[n.principal&&D!==`revoked`&&o?(0,V.jsx)(ue,{device:n,zh:u===`zh`,onRename:o},`${n.id}:${n.settingsRevision??0}`):null,(0,V.jsxs)(`dl`,{className:`grid grid-cols-2 gap-3 rounded-xl bg-surface-hover/40 p-4`,children:[(0,V.jsx)(K,{label:y.statusLabel,value:y.status[D]}),(0,V.jsx)(K,{label:y.lastSeen,value:n.lastSeenAt?T.format(n.lastSeenAt):y.never}),(0,V.jsx)(K,{label:y.endpointCount,value:String(n.endpoints.length)}),(0,V.jsx)(K,{label:y.toolCount,value:String(ie(n))})]}),(0,V.jsxs)(`section`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:y.accessTitle}),(0,V.jsx)(`div`,{className:`mt-2 rounded-xl border border-edge-subtle bg-surface-base p-3 text-xs text-fg-muted`,children:n.access?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`p`,{children:n.access.revokedAt?y.accessRevoked:y.accessActive}),(0,V.jsx)(`p`,{className:`mt-1`,children:n.access.requestProofVersion===1?u===`zh`?`设备请求签名已启用`:`Device request signing enabled`:u===`zh`?`旧版兼容:尚未启用请求签名`:`Legacy compatibility: request signing not enabled`}),(0,V.jsxs)(`p`,{className:`mt-1 break-words`,children:[y.permissions,`: `,n.access.scopes.join(`, `)||y.noPermissions]})]}):(0,V.jsx)(`p`,{children:y.noAccessIdentity})})]}),(0,V.jsxs)(`section`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:y.endpointsTitle}),(0,V.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[n.endpoints.length===0?(0,V.jsx)(`p`,{className:`text-sm text-fg-muted`,children:y.noOnlineEndpoints}):null,n.endpoints.map(e=>(0,V.jsxs)(`article`,{className:`rounded-xl border border-edge-subtle bg-surface-base p-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,V.jsx)(`p`,{className:`min-w-0 break-all text-xs font-medium text-fg`,children:e.endpointId}),(0,V.jsxs)(`span`,{className:`text-xs text-fg-muted`,children:[y.status[e.availability],` · v`,e.appVersion]})]}),(0,V.jsx)(`div`,{className:`mt-3 space-y-2`,children:e.tools.map(e=>{let{descriptor:t}=e;return(0,V.jsxs)(`div`,{className:`rounded-lg bg-surface-hover/50 px-3 py-2`,children:[(0,V.jsx)(`p`,{className:`break-all text-xs font-medium text-fg`,children:t.title}),(0,V.jsxs)(`p`,{className:`mt-0.5 break-words text-xs text-fg-subtle`,children:[t.requiresForeground?u===`zh`?`需要设备在前台 · `:`Requires foreground · `:``,t.confirmation===`always`?u===`zh`?`每次确认`:`Confirm each time`:u===`zh`?`按已授权范围调用`:`Uses the authorized scope`]})]},t.name)})})]},e.connectionId))]})]}),(0,V.jsxs)(`section`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:y.identityTitle}),n.principal&&D!==`revoked`&&o?(0,V.jsx)(ue,{device:n,zh:u===`zh`,onRename:o},`${n.id}:${n.settingsRevision??0}`):null,(0,V.jsxs)(`dl`,{className:`mt-2 rounded-xl border border-edge-subtle bg-surface-base p-3 text-xs`,children:[(0,V.jsx)(K,{label:y.identityId,value:n.id,breakAll:!0}),(0,V.jsx)(`div`,{className:`mt-3`,children:(0,V.jsx)(K,{label:y.createdAt,value:T.format(n.createdAt)})})]})]})]}):null,t[23]=y.accessActive,t[24]=y.accessRevoked,t[25]=y.accessTitle,t[26]=y.createdAt,t[27]=y.endpointCount,t[28]=y.endpointsTitle,t[29]=y.identityId,t[30]=y.identityTitle,t[31]=y.lastSeen,t[32]=y.never,t[33]=y.noAccessIdentity,t[34]=y.noOnlineEndpoints,t[35]=y.noPermissions,t[36]=y.permissions,t[37]=y.status,t[38]=y.statusLabel,t[39]=y.toolCount,t[40]=n,t[41]=T,t[42]=u,t[43]=o,t[44]=D,t[45]=L):L=t[45];let R;t[46]!==r||t[47]!==y.removeDevice||t[48]!==y.revoking||t[49]!==n||t[50]!==a||t[51]!==D?(R=n&&D!==`revoked`?(0,V.jsx)(`div`,{className:`shrink-0 border-t border-edge px-4 py-3`,children:(0,V.jsxs)(x,{variant:`secondary`,className:`w-full text-danger`,disabled:r,onClick:()=>a(n),children:[(0,V.jsx)(te,{className:`size-4`,"aria-hidden":!0}),r?y.revoking:y.removeDevice]})}):null,t[46]=r,t[47]=y.removeDevice,t[48]=y.revoking,t[49]=n,t[50]=a,t[51]=D,t[52]=R):R=t[52];let B;t[53]!==I||t[54]!==L||t[55]!==R?(B=(0,V.jsxs)(h,{children:[A,(0,V.jsxs)(g,{className:j,"aria-describedby":void 0,children:[I,L,R]})]}),t[53]=I,t[54]=L,t[55]=R,t[56]=B):B=t[56];let H;return t[57]!==B||t[58]!==O||t[59]!==k?(H=(0,V.jsx)(v,{open:O,onOpenChange:k,children:B}),t[57]=B,t[58]=O,t[59]=k,t[60]=H):H=t[60],H}function le(e){return e.language}function K(e){let t=(0,z.c)(10),{label:n,value:r,breakAll:i}=e,a=i===void 0?!1:i,o;t[0]===n?o=t[1]:(o=(0,V.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:n}),t[0]=n,t[1]=o);let s=a&&`break-all font-mono text-xs`,c;t[2]===s?c=t[3]:(c=l(`mt-1 text-sm text-fg`,s),t[2]=s,t[3]=c);let u;t[4]!==c||t[5]!==r?(u=(0,V.jsx)(`dd`,{className:c,children:r}),t[4]=c,t[5]=r,t[6]=u):u=t[6];let d;return t[7]!==o||t[8]!==u?(d=(0,V.jsxs)(`div`,{className:`min-w-0`,children:[o,u]}),t[7]=o,t[8]=u,t[9]=d):d=t[9],d}function ue({device:e,zh:t,onRename:n}){let[r,i]=(0,B.useState)(e.displayName),[a,o]=(0,B.useState)(!1),[s,c]=(0,B.useState)(!1);return(0,V.jsxs)(`form`,{className:`space-y-2`,onSubmit:async t=>{if(t.preventDefault(),!(a||!r.trim())){o(!0),c(!1);try{await n(e,r.trim())}catch{c(!0)}finally{o(!1)}}},children:[(0,V.jsxs)(`label`,{className:`block text-sm text-fg`,children:[t?`设备名称`:`Device name`,(0,V.jsx)(`input`,{value:r,maxLength:80,onChange:e=>i(e.target.value),className:`mt-2 h-10 w-full rounded-lg border border-edge bg-surface-inset px-3 text-fg`})]}),(0,V.jsx)(x,{type:`submit`,variant:`secondary`,disabled:a||!r.trim()||r.trim()===e.displayName,children:a?t?`保存中…`:`Saving…`:t?`保存名称`:`Save name`}),s?(0,V.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:t?`保存失败,请刷新设备信息后重试。`:`Unable to save. Refresh device information and retry.`}):null]})}function de(e){let t=(0,z.c)(19),{onPaired:n}=e,[r,a]=i(),s=d(pe),l;t[0]===s?l=t[1]:(l=c(s),t[0]=s,t[1]=l);let u=l.endpointToolsSettings.deviceAccess,f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f={open:!1},t[2]=f):f=t[2];let[p,m]=(0,B.useState)(f),h,g;t[3]!==r||t[4]!==a?(h=()=>{let e=r.get(`startDevicePairing`);e!==`mobile`&&e!==`browser`||(m({open:!0,target:e}),a(fe,{replace:!0}))},g=[r,a],t[3]=r,t[4]=a,t[5]=h,t[6]=g):(h=t[5],g=t[6]),(0,B.useEffect)(h,g);let _,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>m({open:!0}),v=(0,V.jsx)(o,{className:`size-4`,"aria-hidden":!0}),t[7]=_,t[8]=v):(_=t[7],v=t[8]);let y;t[9]===u.addDevice?y=t[10]:(y=(0,V.jsxs)(x,{variant:`primary`,onClick:_,children:[v,u.addDevice]}),t[9]=u.addDevice,t[10]=y);let b;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>m(t=>({...t,open:e})),t[11]=b):b=t[11];let S;t[12]!==p.open||t[13]!==p.target||t[14]!==n?(S=(0,V.jsx)(R,{open:p.open,onOpenChange:b,onPaired:n,targetKind:p.target}),t[12]=p.open,t[13]=p.target,t[14]=n,t[15]=S):S=t[15];let C;return t[16]!==y||t[17]!==S?(C=(0,V.jsxs)(V.Fragment,{children:[y,S]}),t[16]=y,t[17]=S,t[18]=C):C=t[18],C}function fe(e){let t=new URLSearchParams(e);return t.delete(`startDevicePairing`),t}function pe(e){return e.language}async function q(e){let t=await e.json().catch(()=>null);if(!e.ok||t?.payload===void 0)throw Error(t?.error?.message??`Endpoint management request failed: ${e.status}`);return t.payload}function me(){return f(`/api/endpoint-tools/devices`)}function he(e){let t=new URLSearchParams({page:String(e.page),pageSize:String(e.pageSize)});return e.query.trim()&&t.set(`query`,e.query.trim()),e.principalId&&t.set(`principalId`,e.principalId),e.status&&t.set(`status`,e.status),e.effect&&t.set(`effect`,e.effect),f(`/api/endpoint-tools/invocations?${t}`)}async function ge(){return q(await u(me()))}async function _e(e){let t=Array.from({length:Math.ceil(e.length/100)},(t,n)=>e.slice(n*100,(n+1)*100));await Promise.all(t.map(async e=>{await q(await u(f(`/api/endpoint-tools/devices/revoke`),{method:`POST`,body:JSON.stringify({ids:e})}))}))}async function ve(e){return q(await u(he(e)))}async function ye(e,t,n){await q(await u(f(`/api/endpoint-tools/devices/${encodeURIComponent(e)}`),{method:`PATCH`,body:JSON.stringify({nickname:t,expectedRevision:n})}))}var be=5e3,J=20,xe=20;function Se(e){return e===`online`||e===`succeeded`?`bg-success-soft text-success`:e===`running`?`bg-accent-soft text-accent-fg`:e===`failed`||e===`revoked`?`bg-danger-soft text-danger`:`bg-surface-hover text-fg-muted`}function Ce(e){let t=(0,z.c)(5),{status:n,label:r}=e,i;t[0]===n?i=t[1]:(i=l(`rounded-full px-2 py-0.5 text-xs font-medium`,Se(n)),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,V.jsx)(`span`,{className:i,children:r}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function we(){let e=d(e=>e.language),t=c(e).endpointToolsSettings,[n,r]=i(),o=n.get(`view`)===`activity`?`activity`:`devices`,[s,u]=(0,B.useState)(null),[f,p]=(0,B.useState)([]),[m,h]=(0,B.useState)(!1),[g,_]=(0,B.useState)(!1),[v,y]=(0,B.useState)(``),[S,C]=(0,B.useState)(`active`),[w,R]=(0,B.useState)(``),[z,H]=(0,B.useState)(1),[U,W]=(0,B.useState)(()=>new Set),[le,K]=(0,B.useState)(``),[ue]=T(le,250),[fe,pe]=(0,B.useState)(``),[q,Se]=(0,B.useState)(``),[we,Te]=(0,B.useState)(``),[Ee,Y]=(0,B.useState)(1),De={page:Ee,pageSize:xe,query:ue,principalId:fe,status:q,effect:we},X=b(me(),ge,{refreshInterval:be}),Z=b(o===`activity`?he(De):null,()=>ve(De),{refreshInterval:be,keepPreviousData:!0}),Oe=(0,B.useMemo)(()=>new Intl.DateTimeFormat(e===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}),[e]);if(X.isLoading&&!X.data)return(0,V.jsx)(I,{children:(0,V.jsx)(O,{sections:2})});let Q=X.data??[],ke=Z.data?.items??[],Ae=Q.filter(e=>G(e)===`online`).length,je=Q.filter(e=>G(e)!==`revoked`).length,Me=Q.filter(e=>ae(e)).length,Ne=[...new Set(Q.map(e=>e.platform))].toSorted(),Pe=oe(Q,{query:v,status:S,platform:w}),Fe=Math.max(1,Math.ceil(Pe.length/J)),$=Math.min(z,Fe),Ie=Pe.slice(($-1)*J,$*J),Le=Ie.reduce((e,t)=>(G(t)!==`revoked`&&e.push(t.id),e),[]),Re=Le.length>0&&Le.every(e=>U.has(e)),ze=e=>{r(t=>{let n=new URLSearchParams(t);return e===`devices`?n.delete(`view`):n.set(`view`,e),n},{replace:!0})},Be=async()=>{await Promise.all([X.mutate(),o===`activity`?Z.mutate():Promise.resolve()])},Ve=async()=>{if(!(f.length===0||m)){h(!0),_(!1);try{await _e(f.map(e=>e.id)),p([]),W(new Set),await X.mutate()}catch{_(!0)}finally{h(!1)}}},He=e=>{e(),H(1),W(new Set)};return(0,V.jsxs)(I,{children:[(0,V.jsx)(F,{title:t.title,subtitle:t.subtitle,actions:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ee,{className:`size-9 shrink-0 p-0`,label:t.refresh,onClick:Be}),(0,V.jsx)(de,{onPaired:()=>void X.mutate()})]})}),X.error||Z.error?(0,V.jsx)(`div`,{className:`rounded-xl bg-danger-soft px-4 py-3 text-sm text-danger`,children:t.loadError}):null,(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[{label:t.activeDevices,value:je,filter:`active`},{label:t.onlineDevices,value:Ae,filter:`online`},{label:t.staleDevices,value:Me,filter:`stale`}].map(({label:e,value:t,filter:n})=>(0,V.jsxs)(`button`,{type:`button`,className:l(`touch-target rounded-xl px-4 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,S===n?`bg-surface-active`:`bg-surface-hover/20 hover:bg-surface-hover/50`),"aria-pressed":S===n,onClick:()=>{He(()=>C(n)),ze(`devices`)},children:[(0,V.jsx)(`span`,{className:`text-xs text-fg-muted`,children:e}),(0,V.jsx)(`span`,{className:`mt-1 block text-2xl font-semibold text-fg`,children:t})]},n))}),(0,V.jsx)(j,{items:[{id:`devices`,label:t.devicesTab,icon:E,count:je},{id:`activity`,label:t.activityTab,icon:D,count:Z.data?.total}],activeTab:o,onChange:ze,ariaLabel:t.viewsAria,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`}),(0,V.jsxs)(L,{id:`devices`,activeTab:o,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`,title:t.devicesTitle,hint:t.devicesHint,children:[(0,V.jsx)(re,{devices:Q,zh:e===`zh`}),(0,V.jsxs)(`div`,{className:`mb-4 grid gap-2 sm:grid-cols-[minmax(0,1fr)_11rem_11rem]`,children:[(0,V.jsxs)(`label`,{className:`relative block`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:t.searchDevices}),(0,V.jsx)(M,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,V.jsx)(`input`,{type:`search`,"aria-label":t.searchDevices,value:v,placeholder:t.searchDevices,className:`h-10 w-full rounded-lg border border-edge bg-surface-inset pl-9 pr-3 text-base text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:text-sm`,onChange:e=>He(()=>y(e.target.value))})]}),(0,V.jsx)(a,{value:S,options:[{value:`active`,label:t.filterActive},{value:`online`,label:t.status.online},{value:`offline`,label:t.status.offline},{value:`stale`,label:t.filterStale},{value:`revoked`,label:t.status.revoked},{value:`all`,label:t.filterAll}],placeholder:t.statusLabel,allowEmpty:!1,ariaLabel:t.statusLabel,onChange:e=>He(()=>C(e))}),(0,V.jsx)(a,{value:w,options:Ne.map(e=>({value:e,label:e})),placeholder:t.allPlatforms,emptyLabel:t.allPlatforms,ariaLabel:t.platformLabel,onChange:e=>He(()=>R(e))})]}),U.size>0?(0,V.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3 rounded-xl bg-accent-soft px-3 py-2`,children:[(0,V.jsx)(`p`,{className:`text-sm font-medium text-accent-fg`,children:t.selectedCount.replace(`{{count}}`,String(U.size))}),(0,V.jsxs)(x,{variant:`secondary`,className:`text-danger`,onClick:()=>{_(!1),p(Q.filter(e=>U.has(e.id)))},children:[(0,V.jsx)(te,{className:`size-4`,"aria-hidden":!0}),t.removeSelected]})]}):null,Q.length===0?(0,V.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noDevices}):Pe.length===0?(0,V.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noMatchingDevices}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`flex min-h-10 items-center gap-3 border-b border-edge-subtle px-1`,children:(0,V.jsxs)(`label`,{className:l(`touch-target flex items-center gap-2 text-xs text-fg-muted`,Le.length>0?`cursor-pointer`:`cursor-not-allowed opacity-50`),children:[(0,V.jsx)(`input`,{type:`checkbox`,"aria-label":t.selectPage,checked:Re,disabled:Le.length===0,className:`size-4 accent-accent`,onChange:e=>{W(t=>{let n=new Set(t);for(let t of Le)e.target.checked?n.add(t):n.delete(t);return n})}}),t.selectPage]})}),(0,V.jsx)(`ul`,{className:`divide-y divide-edge-subtle`,children:Ie.map(e=>{let n=G(e),r=e.kind===`mobile`?k:ne;return(0,V.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`label`,{className:l(`touch-target flex size-10 shrink-0 items-center justify-center`,n===`revoked`?`cursor-not-allowed opacity-40`:`cursor-pointer`),children:(0,V.jsx)(`input`,{type:`checkbox`,checked:U.has(e.id),disabled:n===`revoked`,"aria-label":t.selectDevice.replace(`{{name}}`,e.displayName),className:`size-4 accent-accent`,onChange:t=>{W(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})}})}),(0,V.jsxs)(`button`,{type:`button`,className:`touch-target flex min-w-0 flex-1 items-center gap-3 py-3 text-left hover:bg-surface-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>u(e),children:[(0,V.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-inset text-fg-muted`,children:(0,V.jsx)(r,{className:`size-4`,"aria-hidden":!0})}),(0,V.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.displayName}),(0,V.jsx)(Ce,{status:n,label:t.status[n]})]}),(0,V.jsxs)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:[e.platform,` · `,se(e.id),` · `,t.lastSeen,`: `,e.lastSeenAt?Oe.format(e.lastSeenAt):t.never]})]}),(0,V.jsx)(`span`,{className:`hidden shrink-0 text-right text-xs text-fg-muted sm:block`,children:t.endpointSummary.replace(`{{endpoints}}`,String(e.endpoints.length)).replace(`{{tools}}`,String(ie(e)))}),(0,V.jsx)(A,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0})]})]},e.id)})}),(0,V.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-edge-subtle pt-3`,children:[(0,V.jsx)(`p`,{className:`text-xs text-fg-muted`,children:t.paginationSummary.replace(`{{from}}`,String(($-1)*J+1)).replace(`{{to}}`,String(Math.min($*J,Pe.length))).replace(`{{total}}`,String(Pe.length))}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(x,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.previousPage,disabled:$<=1,onClick:()=>H(e=>Math.max(1,e-1)),children:(0,V.jsx)(P,{className:`size-4`,"aria-hidden":!0})}),(0,V.jsx)(x,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.nextPage,disabled:$>=Fe,onClick:()=>H(e=>Math.min(Fe,e+1)),children:(0,V.jsx)(A,{className:`size-4`,"aria-hidden":!0})})]})]})]})]}),(0,V.jsxs)(L,{id:`activity`,activeTab:o,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`,title:t.callsTitle,hint:t.callsHint,children:[(0,V.jsxs)(`div`,{className:`mb-4 grid gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,V.jsxs)(`label`,{className:`relative block sm:col-span-2 lg:col-span-1`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:t.searchActivity}),(0,V.jsx)(M,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,V.jsx)(`input`,{type:`search`,"aria-label":t.searchActivity,value:le,placeholder:t.searchActivity,className:`h-10 w-full rounded-lg border border-edge bg-surface-inset pl-9 pr-3 text-base text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:text-sm`,onChange:e=>{K(e.target.value),Y(1)}})]}),(0,V.jsx)(a,{value:fe,options:Q.map(e=>({value:e.id,label:`${e.displayName} · ${se(e.id)}`})),placeholder:t.allDevices,emptyLabel:t.allDevices,ariaLabel:t.deviceLabel,onChange:e=>{pe(e),Y(1)}}),(0,V.jsx)(a,{value:q,options:[{value:`running`,label:t.status.running},{value:`succeeded`,label:t.status.succeeded},{value:`failed`,label:t.status.failed}],placeholder:t.allStatuses,emptyLabel:t.allStatuses,ariaLabel:t.statusLabel,onChange:e=>{Se(e),Y(1)}}),(0,V.jsx)(a,{value:we,options:[{value:`read`,label:t.effects.read},{value:`write`,label:t.effects.write},{value:`destructive`,label:t.effects.destructive}],placeholder:t.allEffects,emptyLabel:t.allEffects,ariaLabel:t.effectLabel,onChange:e=>{Te(e),Y(1)}})]}),Z.isLoading&&!Z.data?(0,V.jsx)(O,{sections:1}):null,ke.length===0&&!Z.isLoading?(0,V.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noMatchingCalls}):null,(0,V.jsx)(`div`,{className:`space-y-2`,children:ke.map(e=>(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 rounded-lg bg-surface-base/55 px-3 py-2.5`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{className:`break-all text-sm font-medium text-fg`,children:e.toolName}),(0,V.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[Oe.format(e.startedAt),` · `,t.effects[e.effect],` · `,e.endpointId]}),e.errorMessage?(0,V.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:e.errorMessage}):null]}),(0,V.jsx)(Ce,{status:e.status,label:t.status[e.status]})]},e.id))}),Z.data&&Z.data.total>0?(0,V.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-edge-subtle pt-3`,children:[(0,V.jsx)(`p`,{className:`text-xs text-fg-muted`,children:t.paginationSummary.replace(`{{from}}`,String((Z.data.page-1)*Z.data.pageSize+1)).replace(`{{to}}`,String(Math.min(Z.data.page*Z.data.pageSize,Z.data.total))).replace(`{{total}}`,String(Z.data.total))}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(x,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.previousPage,disabled:Z.data.page<=1,onClick:()=>Y(e=>Math.max(1,e-1)),children:(0,V.jsx)(P,{className:`size-4`,"aria-hidden":!0})}),(0,V.jsx)(x,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.nextPage,disabled:Z.data.page>=Z.data.totalPages,onClick:()=>Y(e=>Math.min(Z.data.totalPages,e+1)),children:(0,V.jsx)(A,{className:`size-4`,"aria-hidden":!0})})]})]}):null]}),(0,V.jsx)(ce,{device:s,busy:m,onRename:async(e,t)=>{await ye(e.id,t,e.settingsRevision??0),u((await X.mutate())?.find(t=>t.id===e.id)??null)},onClose:()=>u(null),onRevoke:e=>{u(null),_(!1),p([e])}}),(0,V.jsx)(N,{open:f.length>0,title:f.length>1?t.removeManyTitle:t.removeTitle,description:`${f.length>1?t.removeManyDescription.replace(`{{count}}`,String(f.length)):t.removeDescription.replace(`{{name}}`,f[0]?.displayName??``)}${g?`\n\n${t.revokeError}`:``}`,confirmLabel:m?t.revoking:t.removeDevice,cancelLabel:t.cancel,destructive:!0,onConfirm:()=>void Ve(),onCancel:()=>{m||p([])}})]})}export{we as EndpointToolsManagementSettings};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{g as i}from"./chunk-KS7C4IRE-B2HK1psj.js";import{t as a}from"./popover-select-DGKUpVsz.js";import{t as o}from"./plus-Q2yW6OE7.js";import{t as s}from"./x-B_N4OPjy.js";import{t as c}from"./messages-D__oW2yE.js";import{t as l}from"./cn-0WouolD0.js";import{i as u,n as d,r as f}from"./locale-store-D_migb9R.js";import{a as p,n as m,o as h,r as g,s as _,t as v}from"./dist-BGTk37IG.js";import{s as y}from"./session-api-aQLptIs9.js";import{i as b}from"./vendor-swr-BIWyz7Rc.js";import{t as x}from"./button-aIC072nz.js";import{t as S}from"./skeleton-BI5TyibZ.js";import{i as C,o as w}from"./settings-shell-dialog-layer-BU3UuiJr.js";import{Do as T,Mu as E,Of as D,Un as O,Wl as k,af as A,bs as j,do as ee,eu as M,fo as N,of as P,ql as te,rd as ne}from"./index-D2hEKnTM.js";import{n as F,r as I,t as L}from"./settings-page-layout-Dx5S-Msc.js";import{t as R}from"./device-pairing-wizard-BeTjXc3C.js";var z=n(),B=e(t(),1),V=r();async function H(e=`GET`,t,n){let r=await u(f(`/api/endpoint-tools/target-authorizations`+(n?`/`+encodeURIComponent(n):``)),{method:e,...t?{body:JSON.stringify(t)}:{}});if(!r.ok)throw Error(r.status===403?`owner`:`unavailable`);return(await r.json()).payload}function re({devices:e,zh:t}){let n=b(`device-single-call-grants`,()=>H(),{refreshInterval:5e3,shouldRetryOnError:!1}),r=b(n.error?null:`device-grant-conversations`,()=>y({limit:100}),{shouldRetryOnError:!1}),[i,o]=(0,B.useState)(``),[s,c]=(0,B.useState)(``),[l,u]=(0,B.useState)(``),[d,f]=(0,B.useState)(`weather`),[p,m]=(0,B.useState)(`approximate`),[h,g]=(0,B.useState)(`restaurant`),[_,v]=(0,B.useState)(!1),[C,w]=(0,B.useState)(!1);if(n.error)return null;let T=e.flatMap(e=>e.endpoints.map(t=>({...t,label:e.displayName+` · `+e.platform+` · `+e.id.slice(-8)}))),E=T.find(e=>e.endpointId===l)?.tools.find(e=>e.descriptor.name.endsWith(`.device.get_location`))?.descriptor.name,D=async()=>{if(!(!E||!i||!s)){v(!0),w(!1);try{await H(`POST`,{conversationId:i,requestorPrincipalId:s,targetEndpointId:l,toolName:E,arguments:{purpose:d,precision:p,...d===`nearby`?{category:h}:{}}}),await n.mutate()}catch{w(!0)}finally{v(!1)}}};return(0,V.jsxs)(`section`,{className:`mb-5 rounded-xl border border-edge bg-surface-base p-4`,children:[(0,V.jsx)(`h3`,{className:`font-semibold text-fg`,children:t?`跨设备单次授权`:`Single-call device authorization`}),(0,V.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t?`为指定会话和来源设备授权一次定位查询,60 秒后失效。目标设备仍需确认;授权后请在来源设备继续请求。`:`Authorize one location query for a conversation and source device. Expires in 60 seconds; target-device consent is still required. Continue the request from the source device.`}),n.isLoading||r.isLoading?(0,V.jsx)(S,{className:`mt-3 h-28`}):(0,V.jsxs)(`div`,{className:`mt-3 grid gap-3 sm:grid-cols-2`,children:[(0,V.jsx)(a,{value:i,onChange:o,placeholder:t?`选择会话`:`Conversation`,ariaLabel:t?`会话`:`Conversation`,options:(r.data?.items??[]).map(e=>({value:e.key,label:e.name||e.key}))}),(0,V.jsx)(a,{value:s,onChange:c,placeholder:t?`消息来源设备`:`Source device`,ariaLabel:t?`消息来源设备`:`Source device`,options:e.filter(e=>e.endpoints.length>0).map(e=>({value:e.id,label:e.displayName+` · `+e.platform+` · `+e.id.slice(-8)}))}),(0,V.jsx)(a,{value:l,onChange:u,placeholder:t?`使用哪台设备的位置`:`Location device`,ariaLabel:t?`目标设备`:`Target device`,options:T.filter(e=>e.tools.some(e=>e.descriptor.name.endsWith(`.device.get_location`))).map(e=>({value:e.endpointId,label:e.label}))}),(0,V.jsx)(a,{placeholder:t?`用途`:`Purpose`,value:d,onChange:e=>f(e),ariaLabel:t?`用途`:`Purpose`,options:[{value:`weather`,label:t?`查询天气`:`Weather`},{value:`nearby`,label:t?`附近地点`:`Nearby places`}],allowEmpty:!1}),(0,V.jsx)(a,{placeholder:t?`精度`:`Precision`,value:p,onChange:e=>m(e),ariaLabel:t?`精度`:`Precision`,options:[{value:`approximate`,label:t?`大致位置`:`Approximate`},{value:`precise`,label:t?`精确位置`:`Precise`}],allowEmpty:!1}),d===`nearby`?(0,V.jsx)(a,{placeholder:t?`地点类型`:`Category`,value:h,onChange:g,ariaLabel:t?`附近地点类型`:`Place category`,options:[`restaurant`,`cafe`,`pharmacy`,`park`].map((e,n)=>({value:e,label:t?[`餐厅`,`咖啡馆`,`药店`,`公园`][n]:e})),allowEmpty:!1}):null,(0,V.jsx)(x,{variant:`primary`,disabled:_||!i||!s||!E,onClick:()=>void D(),children:t?`允许一次`:`Allow once`})]}),C?(0,V.jsx)(`p`,{role:`alert`,className:`mt-2 text-sm text-fg-muted`,children:t?`授权失败,请检查设备连接后重试。`:`Authorization failed. Check the device connection.`}):null,(0,V.jsx)(`div`,{className:`mt-3 space-y-2`,children:n.data?.map(r=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-sm text-fg-muted`,children:[(0,V.jsxs)(`span`,{children:[e.find(e=>e.endpoints.some(e=>e.endpointId===r.targetEndpointId))?.displayName??(t?`设备`:`Device`),` · `,r.state===`running`?t?`执行中`:`Running`:t?`等待本次调用`:`Awaiting one call`]}),(0,V.jsx)(x,{disabled:_,onClick:()=>{v(!0),H(`DELETE`,void 0,r.id).then(()=>n.mutate()).catch(()=>w(!0)).finally(()=>v(!1))},children:t?`撤销`:`Revoke`})]},r.id))})]})}var U=720*60*60*1e3;function W(e){let t=[e.access,e.principal].filter(e=>e!==null);return t.length>0&&t.every(e=>e.revokedAt!==void 0)}function G(e){return W(e)?`revoked`:e.endpoints.length>0?`online`:`offline`}function ie(e){return new Set(e.endpoints.flatMap(e=>e.tools.map(({descriptor:e})=>e.name))).size}function ae(e,t=Date.now()){return G(e)===`offline`?(e.lastSeenAt??e.createdAt)<t-U:!1}function oe(e,t,n=Date.now()){let r=t.query.trim().toLocaleLowerCase();return e.filter(e=>{let i=G(e),a=t.status===`all`||(t.status===`active`?i!==`revoked`:t.status===`stale`?ae(e,n):i===t.status),o=!t.platform||e.platform===t.platform,s=!r||[e.displayName,e.id,e.kind,e.platform].some(e=>e.toLocaleLowerCase().includes(r));return a&&o&&s})}function se(e){return e.length>8?e.slice(-8):e}function ce(e){let t=(0,z.c)(61),{device:n,busy:r,onClose:i,onRevoke:a,onRename:o}=e,u=d(le),f;t[0]===u?f=t[1]:(f=c(u),t[0]=u,t[1]=f);let y=f.endpointToolsSettings,b=u===`zh`?`zh-CN`:`en`,S;t[2]===b?S=t[3]:(S=new Intl.DateTimeFormat(b,{dateStyle:`medium`,timeStyle:`short`}),t[2]=b,t[3]=S);let T=S,E;t[4]===n?E=t[5]:(E=n?G(n):`offline`,t[4]=n,t[5]=E);let D=E,O=n!==null,k;t[6]===i?k=t[7]:(k=e=>!e&&i(),t[6]=i,t[7]=k);let A;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,V.jsx)(p,{className:l(`xopc-dialog-overlay fixed inset-0 bg-scrim`,w)}),t[8]=A):A=t[8];let j;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(j=l(`xopc-drawer-right fixed right-0 top-0 flex size-full max-w-lg flex-col border-l border-edge bg-surface-overlay shadow-popover outline-none`,C),t[9]=j):j=t[9];let ee=n?.displayName??y.deviceDetails,M;t[10]===ee?M=t[11]:(M=(0,V.jsx)(_,{className:`truncate text-base font-semibold text-fg`,children:ee}),t[10]=ee,t[11]=M);let N;t[12]===n?N=t[13]:(N=n?(0,V.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[n.kind,` · `,n.platform,` · `,se(n.id)]}):null,t[12]=n,t[13]=N);let P;t[14]!==M||t[15]!==N?(P=(0,V.jsxs)(`div`,{className:`min-w-0`,children:[M,N]}),t[14]=M,t[15]=N,t[16]=P):P=t[16];let ne;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,V.jsx)(s,{className:`size-5`,"aria-hidden":!0}),t[17]=ne):ne=t[17];let F;t[18]===y.close?F=t[19]:(F=(0,V.jsx)(m,{asChild:!0,children:(0,V.jsx)(x,{variant:`ghost`,className:`size-9 shrink-0 p-0`,"aria-label":y.close,children:ne})}),t[18]=y.close,t[19]=F);let I;t[20]!==P||t[21]!==F?(I=(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[P,F]}),t[20]=P,t[21]=F,t[22]=I):I=t[22];let L;t[23]!==y.accessActive||t[24]!==y.accessRevoked||t[25]!==y.accessTitle||t[26]!==y.createdAt||t[27]!==y.endpointCount||t[28]!==y.endpointsTitle||t[29]!==y.identityId||t[30]!==y.identityTitle||t[31]!==y.lastSeen||t[32]!==y.never||t[33]!==y.noAccessIdentity||t[34]!==y.noOnlineEndpoints||t[35]!==y.noPermissions||t[36]!==y.permissions||t[37]!==y.status||t[38]!==y.statusLabel||t[39]!==y.toolCount||t[40]!==n||t[41]!==T||t[42]!==u||t[43]!==o||t[44]!==D?(L=n?(0,V.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto p-4`,children:[n.principal&&D!==`revoked`&&o?(0,V.jsx)(ue,{device:n,zh:u===`zh`,onRename:o},`${n.id}:${n.settingsRevision??0}`):null,(0,V.jsxs)(`dl`,{className:`grid grid-cols-2 gap-3 rounded-xl bg-surface-hover/40 p-4`,children:[(0,V.jsx)(K,{label:y.statusLabel,value:y.status[D]}),(0,V.jsx)(K,{label:y.lastSeen,value:n.lastSeenAt?T.format(n.lastSeenAt):y.never}),(0,V.jsx)(K,{label:y.endpointCount,value:String(n.endpoints.length)}),(0,V.jsx)(K,{label:y.toolCount,value:String(ie(n))})]}),(0,V.jsxs)(`section`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:y.accessTitle}),(0,V.jsx)(`div`,{className:`mt-2 rounded-xl border border-edge-subtle bg-surface-base p-3 text-xs text-fg-muted`,children:n.access?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`p`,{children:n.access.revokedAt?y.accessRevoked:y.accessActive}),(0,V.jsx)(`p`,{className:`mt-1`,children:n.access.requestProofVersion===1?u===`zh`?`设备请求签名已启用`:`Device request signing enabled`:u===`zh`?`旧版兼容:尚未启用请求签名`:`Legacy compatibility: request signing not enabled`}),(0,V.jsxs)(`p`,{className:`mt-1 break-words`,children:[y.permissions,`: `,n.access.scopes.join(`, `)||y.noPermissions]})]}):(0,V.jsx)(`p`,{children:y.noAccessIdentity})})]}),(0,V.jsxs)(`section`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:y.endpointsTitle}),(0,V.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[n.endpoints.length===0?(0,V.jsx)(`p`,{className:`text-sm text-fg-muted`,children:y.noOnlineEndpoints}):null,n.endpoints.map(e=>(0,V.jsxs)(`article`,{className:`rounded-xl border border-edge-subtle bg-surface-base p-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,V.jsx)(`p`,{className:`min-w-0 break-all text-xs font-medium text-fg`,children:e.endpointId}),(0,V.jsxs)(`span`,{className:`text-xs text-fg-muted`,children:[y.status[e.availability],` · v`,e.appVersion]})]}),(0,V.jsx)(`div`,{className:`mt-3 space-y-2`,children:e.tools.map(e=>{let{descriptor:t}=e;return(0,V.jsxs)(`div`,{className:`rounded-lg bg-surface-hover/50 px-3 py-2`,children:[(0,V.jsx)(`p`,{className:`break-all text-xs font-medium text-fg`,children:t.title}),(0,V.jsxs)(`p`,{className:`mt-0.5 break-words text-xs text-fg-subtle`,children:[t.requiresForeground?u===`zh`?`需要设备在前台 · `:`Requires foreground · `:``,t.confirmation===`always`?u===`zh`?`每次确认`:`Confirm each time`:u===`zh`?`按已授权范围调用`:`Uses the authorized scope`]})]},t.name)})})]},e.connectionId))]})]}),(0,V.jsxs)(`section`,{children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:y.identityTitle}),n.principal&&D!==`revoked`&&o?(0,V.jsx)(ue,{device:n,zh:u===`zh`,onRename:o},`${n.id}:${n.settingsRevision??0}`):null,(0,V.jsxs)(`dl`,{className:`mt-2 rounded-xl border border-edge-subtle bg-surface-base p-3 text-xs`,children:[(0,V.jsx)(K,{label:y.identityId,value:n.id,breakAll:!0}),(0,V.jsx)(`div`,{className:`mt-3`,children:(0,V.jsx)(K,{label:y.createdAt,value:T.format(n.createdAt)})})]})]})]}):null,t[23]=y.accessActive,t[24]=y.accessRevoked,t[25]=y.accessTitle,t[26]=y.createdAt,t[27]=y.endpointCount,t[28]=y.endpointsTitle,t[29]=y.identityId,t[30]=y.identityTitle,t[31]=y.lastSeen,t[32]=y.never,t[33]=y.noAccessIdentity,t[34]=y.noOnlineEndpoints,t[35]=y.noPermissions,t[36]=y.permissions,t[37]=y.status,t[38]=y.statusLabel,t[39]=y.toolCount,t[40]=n,t[41]=T,t[42]=u,t[43]=o,t[44]=D,t[45]=L):L=t[45];let R;t[46]!==r||t[47]!==y.removeDevice||t[48]!==y.revoking||t[49]!==n||t[50]!==a||t[51]!==D?(R=n&&D!==`revoked`?(0,V.jsx)(`div`,{className:`shrink-0 border-t border-edge px-4 py-3`,children:(0,V.jsxs)(x,{variant:`secondary`,className:`w-full text-danger`,disabled:r,onClick:()=>a(n),children:[(0,V.jsx)(te,{className:`size-4`,"aria-hidden":!0}),r?y.revoking:y.removeDevice]})}):null,t[46]=r,t[47]=y.removeDevice,t[48]=y.revoking,t[49]=n,t[50]=a,t[51]=D,t[52]=R):R=t[52];let B;t[53]!==I||t[54]!==L||t[55]!==R?(B=(0,V.jsxs)(h,{children:[A,(0,V.jsxs)(g,{className:j,"aria-describedby":void 0,children:[I,L,R]})]}),t[53]=I,t[54]=L,t[55]=R,t[56]=B):B=t[56];let H;return t[57]!==B||t[58]!==O||t[59]!==k?(H=(0,V.jsx)(v,{open:O,onOpenChange:k,children:B}),t[57]=B,t[58]=O,t[59]=k,t[60]=H):H=t[60],H}function le(e){return e.language}function K(e){let t=(0,z.c)(10),{label:n,value:r,breakAll:i}=e,a=i===void 0?!1:i,o;t[0]===n?o=t[1]:(o=(0,V.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:n}),t[0]=n,t[1]=o);let s=a&&`break-all font-mono text-xs`,c;t[2]===s?c=t[3]:(c=l(`mt-1 text-sm text-fg`,s),t[2]=s,t[3]=c);let u;t[4]!==c||t[5]!==r?(u=(0,V.jsx)(`dd`,{className:c,children:r}),t[4]=c,t[5]=r,t[6]=u):u=t[6];let d;return t[7]!==o||t[8]!==u?(d=(0,V.jsxs)(`div`,{className:`min-w-0`,children:[o,u]}),t[7]=o,t[8]=u,t[9]=d):d=t[9],d}function ue({device:e,zh:t,onRename:n}){let[r,i]=(0,B.useState)(e.displayName),[a,o]=(0,B.useState)(!1),[s,c]=(0,B.useState)(!1);return(0,V.jsxs)(`form`,{className:`space-y-2`,onSubmit:async t=>{if(t.preventDefault(),!(a||!r.trim())){o(!0),c(!1);try{await n(e,r.trim())}catch{c(!0)}finally{o(!1)}}},children:[(0,V.jsxs)(`label`,{className:`block text-sm text-fg`,children:[t?`设备名称`:`Device name`,(0,V.jsx)(`input`,{value:r,maxLength:80,onChange:e=>i(e.target.value),className:`mt-2 h-10 w-full rounded-lg border border-edge bg-surface-inset px-3 text-fg`})]}),(0,V.jsx)(x,{type:`submit`,variant:`secondary`,disabled:a||!r.trim()||r.trim()===e.displayName,children:a?t?`保存中…`:`Saving…`:t?`保存名称`:`Save name`}),s?(0,V.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:t?`保存失败,请刷新设备信息后重试。`:`Unable to save. Refresh device information and retry.`}):null]})}function de(e){let t=(0,z.c)(19),{onPaired:n}=e,[r,a]=i(),s=d(pe),l;t[0]===s?l=t[1]:(l=c(s),t[0]=s,t[1]=l);let u=l.endpointToolsSettings.deviceAccess,f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f={open:!1},t[2]=f):f=t[2];let[p,m]=(0,B.useState)(f),h,g;t[3]!==r||t[4]!==a?(h=()=>{let e=r.get(`startDevicePairing`);e!==`mobile`&&e!==`browser`||(m({open:!0,target:e}),a(fe,{replace:!0}))},g=[r,a],t[3]=r,t[4]=a,t[5]=h,t[6]=g):(h=t[5],g=t[6]),(0,B.useEffect)(h,g);let _,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>m({open:!0}),v=(0,V.jsx)(o,{className:`size-4`,"aria-hidden":!0}),t[7]=_,t[8]=v):(_=t[7],v=t[8]);let y;t[9]===u.addDevice?y=t[10]:(y=(0,V.jsxs)(x,{variant:`primary`,onClick:_,children:[v,u.addDevice]}),t[9]=u.addDevice,t[10]=y);let b;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>m(t=>({...t,open:e})),t[11]=b):b=t[11];let S;t[12]!==p.open||t[13]!==p.target||t[14]!==n?(S=(0,V.jsx)(R,{open:p.open,onOpenChange:b,onPaired:n,targetKind:p.target}),t[12]=p.open,t[13]=p.target,t[14]=n,t[15]=S):S=t[15];let C;return t[16]!==y||t[17]!==S?(C=(0,V.jsxs)(V.Fragment,{children:[y,S]}),t[16]=y,t[17]=S,t[18]=C):C=t[18],C}function fe(e){let t=new URLSearchParams(e);return t.delete(`startDevicePairing`),t}function pe(e){return e.language}async function q(e){let t=await e.json().catch(()=>null);if(!e.ok||t?.payload===void 0)throw Error(t?.error?.message??`Endpoint management request failed: ${e.status}`);return t.payload}function me(){return f(`/api/endpoint-tools/devices`)}function he(e){let t=new URLSearchParams({page:String(e.page),pageSize:String(e.pageSize)});return e.query.trim()&&t.set(`query`,e.query.trim()),e.principalId&&t.set(`principalId`,e.principalId),e.status&&t.set(`status`,e.status),e.effect&&t.set(`effect`,e.effect),f(`/api/endpoint-tools/invocations?${t}`)}async function ge(){return q(await u(me()))}async function _e(e){let t=Array.from({length:Math.ceil(e.length/100)},(t,n)=>e.slice(n*100,(n+1)*100));await Promise.all(t.map(async e=>{await q(await u(f(`/api/endpoint-tools/devices/revoke`),{method:`POST`,body:JSON.stringify({ids:e})}))}))}async function ve(e){return q(await u(he(e)))}async function ye(e,t,n){await q(await u(f(`/api/endpoint-tools/devices/${encodeURIComponent(e)}`),{method:`PATCH`,body:JSON.stringify({nickname:t,expectedRevision:n})}))}var be=5e3,J=20,xe=20;function Se(e){return e===`online`||e===`succeeded`?`bg-success-soft text-success`:e===`running`?`bg-accent-soft text-accent-fg`:e===`failed`||e===`revoked`?`bg-danger-soft text-danger`:`bg-surface-hover text-fg-muted`}function Ce(e){let t=(0,z.c)(5),{status:n,label:r}=e,i;t[0]===n?i=t[1]:(i=l(`rounded-full px-2 py-0.5 text-xs font-medium`,Se(n)),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,V.jsx)(`span`,{className:i,children:r}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function we(){let e=d(e=>e.language),t=c(e).endpointToolsSettings,[n,r]=i(),o=n.get(`view`)===`activity`?`activity`:`devices`,[s,u]=(0,B.useState)(null),[f,p]=(0,B.useState)([]),[m,h]=(0,B.useState)(!1),[g,_]=(0,B.useState)(!1),[v,y]=(0,B.useState)(``),[S,C]=(0,B.useState)(`active`),[w,R]=(0,B.useState)(``),[z,H]=(0,B.useState)(1),[U,W]=(0,B.useState)(()=>new Set),[le,K]=(0,B.useState)(``),[ue]=T(le,250),[fe,pe]=(0,B.useState)(``),[q,Se]=(0,B.useState)(``),[we,Te]=(0,B.useState)(``),[Ee,Y]=(0,B.useState)(1),De={page:Ee,pageSize:xe,query:ue,principalId:fe,status:q,effect:we},X=b(me(),ge,{refreshInterval:be}),Z=b(o===`activity`?he(De):null,()=>ve(De),{refreshInterval:be,keepPreviousData:!0}),Oe=(0,B.useMemo)(()=>new Intl.DateTimeFormat(e===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}),[e]);if(X.isLoading&&!X.data)return(0,V.jsx)(I,{children:(0,V.jsx)(O,{sections:2})});let Q=X.data??[],ke=Z.data?.items??[],Ae=Q.filter(e=>G(e)===`online`).length,je=Q.filter(e=>G(e)!==`revoked`).length,Me=Q.filter(e=>ae(e)).length,Ne=[...new Set(Q.map(e=>e.platform))].toSorted(),Pe=oe(Q,{query:v,status:S,platform:w}),Fe=Math.max(1,Math.ceil(Pe.length/J)),$=Math.min(z,Fe),Ie=Pe.slice(($-1)*J,$*J),Le=Ie.reduce((e,t)=>(G(t)!==`revoked`&&e.push(t.id),e),[]),Re=Le.length>0&&Le.every(e=>U.has(e)),ze=e=>{r(t=>{let n=new URLSearchParams(t);return e===`devices`?n.delete(`view`):n.set(`view`,e),n},{replace:!0})},Be=async()=>{await Promise.all([X.mutate(),o===`activity`?Z.mutate():Promise.resolve()])},Ve=async()=>{if(!(f.length===0||m)){h(!0),_(!1);try{await _e(f.map(e=>e.id)),p([]),W(new Set),await X.mutate()}catch{_(!0)}finally{h(!1)}}},He=e=>{e(),H(1),W(new Set)};return(0,V.jsxs)(I,{children:[(0,V.jsx)(F,{title:t.title,subtitle:t.subtitle,actions:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ee,{className:`size-9 shrink-0 p-0`,label:t.refresh,onClick:Be}),(0,V.jsx)(de,{onPaired:()=>void X.mutate()})]})}),X.error||Z.error?(0,V.jsx)(`div`,{className:`rounded-xl bg-danger-soft px-4 py-3 text-sm text-danger`,children:t.loadError}):null,(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[{label:t.activeDevices,value:je,filter:`active`},{label:t.onlineDevices,value:Ae,filter:`online`},{label:t.staleDevices,value:Me,filter:`stale`}].map(({label:e,value:t,filter:n})=>(0,V.jsxs)(`button`,{type:`button`,className:l(`touch-target rounded-xl px-4 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,S===n?`bg-surface-active`:`bg-surface-hover/20 hover:bg-surface-hover/50`),"aria-pressed":S===n,onClick:()=>{He(()=>C(n)),ze(`devices`)},children:[(0,V.jsx)(`span`,{className:`text-xs text-fg-muted`,children:e}),(0,V.jsx)(`span`,{className:`mt-1 block text-2xl font-semibold text-fg`,children:t})]},n))}),(0,V.jsx)(j,{items:[{id:`devices`,label:t.devicesTab,icon:E,count:je},{id:`activity`,label:t.activityTab,icon:D,count:Z.data?.total}],activeTab:o,onChange:ze,ariaLabel:t.viewsAria,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`}),(0,V.jsxs)(L,{id:`devices`,activeTab:o,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`,title:t.devicesTitle,hint:t.devicesHint,children:[(0,V.jsx)(re,{devices:Q,zh:e===`zh`}),(0,V.jsxs)(`div`,{className:`mb-4 grid gap-2 sm:grid-cols-[minmax(0,1fr)_11rem_11rem]`,children:[(0,V.jsxs)(`label`,{className:`relative block`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:t.searchDevices}),(0,V.jsx)(M,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,V.jsx)(`input`,{type:`search`,"aria-label":t.searchDevices,value:v,placeholder:t.searchDevices,className:`h-10 w-full rounded-lg border border-edge bg-surface-inset pl-9 pr-3 text-base text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:text-sm`,onChange:e=>He(()=>y(e.target.value))})]}),(0,V.jsx)(a,{value:S,options:[{value:`active`,label:t.filterActive},{value:`online`,label:t.status.online},{value:`offline`,label:t.status.offline},{value:`stale`,label:t.filterStale},{value:`revoked`,label:t.status.revoked},{value:`all`,label:t.filterAll}],placeholder:t.statusLabel,allowEmpty:!1,ariaLabel:t.statusLabel,onChange:e=>He(()=>C(e))}),(0,V.jsx)(a,{value:w,options:Ne.map(e=>({value:e,label:e})),placeholder:t.allPlatforms,emptyLabel:t.allPlatforms,ariaLabel:t.platformLabel,onChange:e=>He(()=>R(e))})]}),U.size>0?(0,V.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3 rounded-xl bg-accent-soft px-3 py-2`,children:[(0,V.jsx)(`p`,{className:`text-sm font-medium text-accent-fg`,children:t.selectedCount.replace(`{{count}}`,String(U.size))}),(0,V.jsxs)(x,{variant:`secondary`,className:`text-danger`,onClick:()=>{_(!1),p(Q.filter(e=>U.has(e.id)))},children:[(0,V.jsx)(te,{className:`size-4`,"aria-hidden":!0}),t.removeSelected]})]}):null,Q.length===0?(0,V.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noDevices}):Pe.length===0?(0,V.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noMatchingDevices}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`flex min-h-10 items-center gap-3 border-b border-edge-subtle px-1`,children:(0,V.jsxs)(`label`,{className:l(`touch-target flex items-center gap-2 text-xs text-fg-muted`,Le.length>0?`cursor-pointer`:`cursor-not-allowed opacity-50`),children:[(0,V.jsx)(`input`,{type:`checkbox`,"aria-label":t.selectPage,checked:Re,disabled:Le.length===0,className:`size-4 accent-accent`,onChange:e=>{W(t=>{let n=new Set(t);for(let t of Le)e.target.checked?n.add(t):n.delete(t);return n})}}),t.selectPage]})}),(0,V.jsx)(`ul`,{className:`divide-y divide-edge-subtle`,children:Ie.map(e=>{let n=G(e),r=e.kind===`mobile`?k:ne;return(0,V.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`label`,{className:l(`touch-target flex size-10 shrink-0 items-center justify-center`,n===`revoked`?`cursor-not-allowed opacity-40`:`cursor-pointer`),children:(0,V.jsx)(`input`,{type:`checkbox`,checked:U.has(e.id),disabled:n===`revoked`,"aria-label":t.selectDevice.replace(`{{name}}`,e.displayName),className:`size-4 accent-accent`,onChange:t=>{W(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})}})}),(0,V.jsxs)(`button`,{type:`button`,className:`touch-target flex min-w-0 flex-1 items-center gap-3 py-3 text-left hover:bg-surface-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>u(e),children:[(0,V.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-inset text-fg-muted`,children:(0,V.jsx)(r,{className:`size-4`,"aria-hidden":!0})}),(0,V.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.displayName}),(0,V.jsx)(Ce,{status:n,label:t.status[n]})]}),(0,V.jsxs)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:[e.platform,` · `,se(e.id),` · `,t.lastSeen,`: `,e.lastSeenAt?Oe.format(e.lastSeenAt):t.never]})]}),(0,V.jsx)(`span`,{className:`hidden shrink-0 text-right text-xs text-fg-muted sm:block`,children:t.endpointSummary.replace(`{{endpoints}}`,String(e.endpoints.length)).replace(`{{tools}}`,String(ie(e)))}),(0,V.jsx)(A,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0})]})]},e.id)})}),(0,V.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-edge-subtle pt-3`,children:[(0,V.jsx)(`p`,{className:`text-xs text-fg-muted`,children:t.paginationSummary.replace(`{{from}}`,String(($-1)*J+1)).replace(`{{to}}`,String(Math.min($*J,Pe.length))).replace(`{{total}}`,String(Pe.length))}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(x,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.previousPage,disabled:$<=1,onClick:()=>H(e=>Math.max(1,e-1)),children:(0,V.jsx)(P,{className:`size-4`,"aria-hidden":!0})}),(0,V.jsx)(x,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.nextPage,disabled:$>=Fe,onClick:()=>H(e=>Math.min(Fe,e+1)),children:(0,V.jsx)(A,{className:`size-4`,"aria-hidden":!0})})]})]})]})]}),(0,V.jsxs)(L,{id:`activity`,activeTab:o,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`,title:t.callsTitle,hint:t.callsHint,children:[(0,V.jsxs)(`div`,{className:`mb-4 grid gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,V.jsxs)(`label`,{className:`relative block sm:col-span-2 lg:col-span-1`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:t.searchActivity}),(0,V.jsx)(M,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,V.jsx)(`input`,{type:`search`,"aria-label":t.searchActivity,value:le,placeholder:t.searchActivity,className:`h-10 w-full rounded-lg border border-edge bg-surface-inset pl-9 pr-3 text-base text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:text-sm`,onChange:e=>{K(e.target.value),Y(1)}})]}),(0,V.jsx)(a,{value:fe,options:Q.map(e=>({value:e.id,label:`${e.displayName} · ${se(e.id)}`})),placeholder:t.allDevices,emptyLabel:t.allDevices,ariaLabel:t.deviceLabel,onChange:e=>{pe(e),Y(1)}}),(0,V.jsx)(a,{value:q,options:[{value:`running`,label:t.status.running},{value:`succeeded`,label:t.status.succeeded},{value:`failed`,label:t.status.failed}],placeholder:t.allStatuses,emptyLabel:t.allStatuses,ariaLabel:t.statusLabel,onChange:e=>{Se(e),Y(1)}}),(0,V.jsx)(a,{value:we,options:[{value:`read`,label:t.effects.read},{value:`write`,label:t.effects.write},{value:`destructive`,label:t.effects.destructive}],placeholder:t.allEffects,emptyLabel:t.allEffects,ariaLabel:t.effectLabel,onChange:e=>{Te(e),Y(1)}})]}),Z.isLoading&&!Z.data?(0,V.jsx)(O,{sections:1}):null,ke.length===0&&!Z.isLoading?(0,V.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noMatchingCalls}):null,(0,V.jsx)(`div`,{className:`space-y-2`,children:ke.map(e=>(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 rounded-lg bg-surface-base/55 px-3 py-2.5`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`p`,{className:`break-all text-sm font-medium text-fg`,children:e.toolName}),(0,V.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[Oe.format(e.startedAt),` · `,t.effects[e.effect],` · `,e.endpointId]}),e.errorMessage?(0,V.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:e.errorMessage}):null]}),(0,V.jsx)(Ce,{status:e.status,label:t.status[e.status]})]},e.id))}),Z.data&&Z.data.total>0?(0,V.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-edge-subtle pt-3`,children:[(0,V.jsx)(`p`,{className:`text-xs text-fg-muted`,children:t.paginationSummary.replace(`{{from}}`,String((Z.data.page-1)*Z.data.pageSize+1)).replace(`{{to}}`,String(Math.min(Z.data.page*Z.data.pageSize,Z.data.total))).replace(`{{total}}`,String(Z.data.total))}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(x,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.previousPage,disabled:Z.data.page<=1,onClick:()=>Y(e=>Math.max(1,e-1)),children:(0,V.jsx)(P,{className:`size-4`,"aria-hidden":!0})}),(0,V.jsx)(x,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.nextPage,disabled:Z.data.page>=Z.data.totalPages,onClick:()=>Y(e=>Math.min(Z.data.totalPages,e+1)),children:(0,V.jsx)(A,{className:`size-4`,"aria-hidden":!0})})]})]}):null]}),(0,V.jsx)(ce,{device:s,busy:m,onRename:async(e,t)=>{await ye(e.id,t,e.settingsRevision??0),u((await X.mutate())?.find(t=>t.id===e.id)??null)},onClose:()=>u(null),onRevoke:e=>{u(null),_(!1),p([e])}}),(0,V.jsx)(N,{open:f.length>0,title:f.length>1?t.removeManyTitle:t.removeTitle,description:`${f.length>1?t.removeManyDescription.replace(`{{count}}`,String(f.length)):t.removeDescription.replace(`{{name}}`,f[0]?.displayName??``)}${g?`\n\n${t.revokeError}`:``}`,confirmLabel:m?t.revoking:t.removeDevice,cancelLabel:t.cancel,destructive:!0,onConfirm:()=>void Ve(),onCancel:()=>{m||p([])}})]})}export{we as EndpointToolsManagementSettings};
|
package/dist/gateway/static/root/assets/{media-plugins-s6EqtAUQ.js → media-plugins-DQJXvbr_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-aKtaBQYM.js";import{a as e,n as t,t as n}from"./vendor-react-BOUWij0V.js";import{t as r}from"./messages-D__oW2yE.js";import{a as i}from"./attachment-utils-core-BIOUBrpT.js";import{t as a}from"./preview-open-alternatives-
|
|
1
|
+
import"./rolldown-runtime-aKtaBQYM.js";import{a as e,n as t,t as n}from"./vendor-react-BOUWij0V.js";import{t as r}from"./messages-D__oW2yE.js";import{a as i}from"./attachment-utils-core-BIOUBrpT.js";import{t as a}from"./preview-open-alternatives-2YjwlRHu.js";import{t as o}from"./use-blob-object-url-D4BFuzZB.js";var s=t();e();var c=n();function l(e){let t=(0,s.c)(2),n;return t[0]===e?n=t[1]:(n=(0,c.jsx)(d,{props:e,kind:`audio`}),t[0]=e,t[1]=n),n}function u(e){let t=(0,s.c)(2),n;return t[0]===e?n=t[1]:(n=(0,c.jsx)(d,{props:e,kind:`video`}),t[0]=e,t[1]=n),n}function d(e){let t=(0,s.c)(8),{props:n,kind:r}=e,a;bb0:{if(!n.binaryBuffer){a=null;break bb0}let e;if(t[0]!==r||t[1]!==n.binaryBuffer||t[2]!==n.descriptor.fileName||t[3]!==n.descriptor.mimeType){let a=i(n.descriptor.fileName)??n.descriptor.mimeType;e=new Blob([n.binaryBuffer],{type:a||`${r}/*`}),t[0]=r,t[1]=n.binaryBuffer,t[2]=n.descriptor.fileName,t[3]=n.descriptor.mimeType,t[4]=e}else e=t[4];a=e}let l=o(a);if(!l)return null;let u;return t[5]!==r||t[6]!==l?(u=(0,c.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto bg-surface-base p-4 dark:bg-surface-hover/20`,children:r===`audio`?(0,c.jsx)(`audio`,{src:l,controls:!0,className:`w-full max-w-2xl`}):(0,c.jsx)(`video`,{src:l,controls:!0,playsInline:!0,className:`max-h-full max-w-full rounded-md bg-black`})}),t[5]=r,t[6]=l,t[7]=u):u=t[7],u}function f(e){let t=(0,s.c)(12),n;t[0]===e.language?n=t[1]:(n=r(e.language),t[0]=e.language,t[1]=n);let i=n,o=e.descriptor.context===`workspace`,l=o?`${i.workspace.cannotPreviewType} ${i.workspace.openElsewhereHint}`:i.chat.attachmentPreviewOpenElsewhereHint,u=o?i.workspace.openSystemApp:void 0,d=o?i.workspace.chooseApp:void 0,f;return t[2]!==i.chat.attachmentPreviewDownloadFull||t[3]!==e.actions.canChooseOpenWithApp||t[4]!==e.actions.canOpenWithSystemApp||t[5]!==e.actions.onChooseOpenWithApp||t[6]!==e.actions.onDownload||t[7]!==e.actions.onOpenWithSystemApp||t[8]!==l||t[9]!==u||t[10]!==d?(f=(0,c.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4`,children:(0,c.jsx)(a,{message:l,downloadLabel:i.chat.attachmentPreviewDownloadFull,onDownload:e.actions.onDownload,openSystemLabel:u,onOpenWithSystemApp:e.actions.onOpenWithSystemApp,canOpenWithSystemApp:e.actions.canOpenWithSystemApp,chooseAppLabel:d,onChooseOpenWithApp:e.actions.onChooseOpenWithApp,canChooseOpenWithApp:e.actions.canChooseOpenWithApp})}),t[2]=i.chat.attachmentPreviewDownloadFull,t[3]=e.actions.canChooseOpenWithApp,t[4]=e.actions.canOpenWithSystemApp,t[5]=e.actions.onChooseOpenWithApp,t[6]=e.actions.onDownload,t[7]=e.actions.onOpenWithSystemApp,t[8]=l,t[9]=u,t[10]=d,t[11]=f):f=t[11],f}export{l as AudioPreviewPluginView,f as UnsupportedPreviewPluginView,u as VideoPreviewPluginView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Vc as e}from"./index-D2hEKnTM.js";export{e as Mermaid};
|